diff --git a/.github/workflows/check-chinese-content.yml b/.github/workflows/check-chinese-content.yml index 2382a9d0fc..7bbcabdefb 100644 --- a/.github/workflows/check-chinese-content.yml +++ b/.github/workflows/check-chinese-content.yml @@ -1,4 +1,5 @@ -# Copyright 2024-2026 the original author or authors. +# +# Copyright 2024-2025 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,21 +12,26 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -name: Check Chinese Content in Jmanus +# +name: 🔍 Check Chinese Content in Jmanus on: pull_request: paths: - 'spring-ai-alibaba-jmanus/src/main/java/**/*.java' + - 'spring-ai-alibaba-jmanus/ui-vue3/src/**' + +permissions: + contents: read jobs: check-chinese-content: runs-on: ubuntu-latest - name: Check for Chinese content in Java files + name: Check for Chinese content in Jmanus steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 @@ -34,22 +40,24 @@ jobs: with: python-version: '3.9' - - name: Check Chinese content in Jmanus Java files + - name: Check Chinese content in Jmanus run: | - cd spring-ai-alibaba-jmanus - echo "🔍 Checking for Chinese content in Java files..." + echo "🔍 Checking for Chinese content in Jmanus Java and frontend files..." + echo "📁 Checking directories:" + echo " - spring-ai-alibaba-jmanus/src/main/java" + echo " - spring-ai-alibaba-jmanus/ui-vue3/src (excluding i18n files)" echo "" - if python scripts/check-chinese-content.py --dir src/main/java --fail-on-found; then + if python tools/scripts/check-chinese-content.py --fail-on-found; then echo "✅ No Chinese content found - Check passed!" else echo "" - echo "## 🚨 Chinese Content Detected" + echo "## 🚨 Chinese Content Detected in Jmanus" echo "" - echo "Chinese content has been detected in Java files under spring-ai-alibaba-jmanus/src/main/java directory." + echo "Chinese content has been detected in Jmanus Java or frontend files." echo "" echo "### Detailed Check Results:" - python scripts/check-chinese-content.py --dir src/main/java + python tools/scripts/check-chinese-content.py echo "" echo "### Modification Suggestions:" echo "" @@ -60,21 +68,21 @@ jobs: echo "" echo "2. **Chinese Strings** → Extract to resource files or use English" echo " Example:" - echo " // ❌ Incorrect: throw new RuntimeException(\"用户不存在\");" - echo " // ✅ Correct: throw new RuntimeException(\"User not found\");" + echo " // ❌ Incorrect: String message = \"用户不存在\";" + echo " // ✅ Correct: String message = messageSource.getMessage(\"user.not.found\", null, locale);" echo "" - echo "3. **Chinese Identifiers** → Change to English Identifiers" + echo "3. **Chinese Identifiers** → Use English identifiers" echo " Example:" echo " // ❌ Incorrect: String 用户名 = \"admin\";" echo " // ✅ Correct: String username = \"admin\";" echo "" - echo "### Why Avoid Chinese Content?" + echo "4. **Vue Template Content** → Use i18n for internationalization" + echo " Example:" + echo " " + echo " " echo "" - echo "- 🌍 Internationalization Friendly: Facilitates project internationalization" - echo "- 🔧 Development Environment Compatibility: Avoids encoding issues" - echo "- 👥 Team Collaboration: Enables international team members to understand code" - echo "- 📚 Code Standards: Follows open source project best practices" + echo "**Note:** i18n configuration files are automatically excluded from this check." echo "" - echo "❌ Please modify the relevant files and resubmit." + echo "Please fix the Chinese content issues and commit the changes." exit 1 fi diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/cssMode-dU5ExThW.js b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/cssMode-CRvchvYB.js similarity index 99% rename from spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/cssMode-dU5ExThW.js rename to spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/cssMode-CRvchvYB.js index 64813c2f04..98f3c22692 100644 --- a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/cssMode-dU5ExThW.js +++ b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/cssMode-CRvchvYB.js @@ -1,4 +1,4 @@ -var Fe=Object.defineProperty;var Le=(e,n,i)=>n in e?Fe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>Le(e,typeof n!="symbol"?n+"":n,i);import{m as je}from"./index-H3fwLZKf.js";import"./index-SarmArA2.js";import"./iconify-B5kZhuXP.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./useMessage-BDFqrfR1.js";import"./index-BPwnW1su.js";/*!----------------------------------------------------------------------------- +var Fe=Object.defineProperty;var Le=(e,n,i)=>n in e?Fe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>Le(e,typeof n!="symbol"?n+"":n,i);import{m as je}from"./index-DOvRfojN.js";import"./index-W4k7xcj8.js";import"./iconify-bZOkqtWv.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./useMessage-QCjbpgZx.js";import"./index-0-ztzQqN.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56) * Released under the MIT license diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/freemarker2-CkAicm6I.js b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/freemarker2-C7VanfqX.js similarity index 98% rename from spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/freemarker2-CkAicm6I.js rename to spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/freemarker2-C7VanfqX.js index 3cb84c2beb..13f13d738c 100644 --- a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/freemarker2-CkAicm6I.js +++ b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/freemarker2-C7VanfqX.js @@ -1,4 +1,4 @@ -import{m as f}from"./index-H3fwLZKf.js";import"./index-SarmArA2.js";import"./iconify-B5kZhuXP.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./useMessage-BDFqrfR1.js";import"./index-BPwnW1su.js";/*!----------------------------------------------------------------------------- +import{m as f}from"./index-DOvRfojN.js";import"./index-W4k7xcj8.js";import"./iconify-bZOkqtWv.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./useMessage-QCjbpgZx.js";import"./index-0-ztzQqN.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56) * Released under the MIT license diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/handlebars-C5uyFx9F.js b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/handlebars-Ce5o-Jd2.js similarity index 96% rename from spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/handlebars-C5uyFx9F.js rename to spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/handlebars-Ce5o-Jd2.js index 6c1502d351..d41672d2b3 100644 --- a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/handlebars-C5uyFx9F.js +++ b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/handlebars-Ce5o-Jd2.js @@ -1,4 +1,4 @@ -import{m as i}from"./index-H3fwLZKf.js";import"./index-SarmArA2.js";import"./iconify-B5kZhuXP.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./useMessage-BDFqrfR1.js";import"./index-BPwnW1su.js";/*!----------------------------------------------------------------------------- +import{m as i}from"./index-DOvRfojN.js";import"./index-W4k7xcj8.js";import"./iconify-bZOkqtWv.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./useMessage-QCjbpgZx.js";import"./index-0-ztzQqN.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56) * Released under the MIT license diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/html-D2gt6e4j.js b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/html-BQBqHUj9.js similarity index 95% rename from spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/html-D2gt6e4j.js rename to spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/html-BQBqHUj9.js index e58b7b5da9..33894a755c 100644 --- a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/html-D2gt6e4j.js +++ b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/html-BQBqHUj9.js @@ -1,4 +1,4 @@ -import{m as s}from"./index-H3fwLZKf.js";import"./index-SarmArA2.js";import"./iconify-B5kZhuXP.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./useMessage-BDFqrfR1.js";import"./index-BPwnW1su.js";/*!----------------------------------------------------------------------------- +import{m as s}from"./index-DOvRfojN.js";import"./index-W4k7xcj8.js";import"./iconify-bZOkqtWv.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./useMessage-QCjbpgZx.js";import"./index-0-ztzQqN.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56) * Released under the MIT license diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/htmlMode-Cl5XUd21.js b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/htmlMode-k6nyQsqC.js similarity index 99% rename from spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/htmlMode-Cl5XUd21.js rename to spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/htmlMode-k6nyQsqC.js index f5c4b8f790..931533d887 100644 --- a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/htmlMode-Cl5XUd21.js +++ b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/htmlMode-k6nyQsqC.js @@ -1,4 +1,4 @@ -var Be=Object.defineProperty;var $e=(e,n,i)=>n in e?Be(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>$e(e,typeof n!="symbol"?n+"":n,i);import{m as qe}from"./index-H3fwLZKf.js";import"./index-SarmArA2.js";import"./iconify-B5kZhuXP.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./useMessage-BDFqrfR1.js";import"./index-BPwnW1su.js";/*!----------------------------------------------------------------------------- +var Be=Object.defineProperty;var $e=(e,n,i)=>n in e?Be(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>$e(e,typeof n!="symbol"?n+"":n,i);import{m as qe}from"./index-DOvRfojN.js";import"./index-W4k7xcj8.js";import"./iconify-bZOkqtWv.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./useMessage-QCjbpgZx.js";import"./index-0-ztzQqN.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56) * Released under the MIT license diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/iconify-B5kZhuXP.js b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/iconify-bZOkqtWv.js similarity index 93% rename from spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/iconify-B5kZhuXP.js rename to spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/iconify-bZOkqtWv.js index 4dfa103a54..f981ee4b35 100644 --- a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/iconify-B5kZhuXP.js +++ b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/iconify-bZOkqtWv.js @@ -1 +1 @@ -import{d as me,S as G}from"./index-SarmArA2.js";const se=/^[a-z0-9]+(-[a-z0-9]+)*$/,M=(e,n,o,i="")=>{const t=e.split(":");if(e.slice(0,1)==="@"){if(t.length<2||t.length>3)return null;i=t.shift().slice(1)}if(t.length>3||!t.length)return null;if(t.length>1){const c=t.pop(),l=t.pop(),f={provider:t.length>0?t[0]:i,prefix:l,name:c};return n&&!L(f)?null:f}const s=t[0],r=s.split("-");if(r.length>1){const c={provider:i,prefix:r.shift(),name:r.join("-")};return n&&!L(c)?null:c}if(o&&i===""){const c={provider:i,prefix:"",name:s};return n&&!L(c,o)?null:c}return null},L=(e,n)=>e?!!((n&&e.prefix===""||e.prefix)&&e.name):!1,re=Object.freeze({left:0,top:0,width:16,height:16}),A=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),N=Object.freeze({...re,...A}),z=Object.freeze({...N,body:"",hidden:!1});function ye(e,n){const o={};!e.hFlip!=!n.hFlip&&(o.hFlip=!0),!e.vFlip!=!n.vFlip&&(o.vFlip=!0);const i=((e.rotate||0)+(n.rotate||0))%4;return i&&(o.rotate=i),o}function B(e,n){const o=ye(e,n);for(const i in z)i in A?i in e&&!(i in o)&&(o[i]=A[i]):i in n?o[i]=n[i]:i in e&&(o[i]=e[i]);return o}function be(e,n){const o=e.icons,i=e.aliases||Object.create(null),t=Object.create(null);function s(r){if(o[r])return t[r]=[];if(!(r in t)){t[r]=null;const c=i[r]&&i[r].parent,l=c&&s(c);l&&(t[r]=[c].concat(l))}return t[r]}return Object.keys(o).concat(Object.keys(i)).forEach(s),t}function xe(e,n,o){const i=e.icons,t=e.aliases||Object.create(null);let s={};function r(c){s=B(i[c]||t[c],s)}return r(n),o.forEach(r),B(e,s)}function ce(e,n){const o=[];if(typeof e!="object"||typeof e.icons!="object")return o;e.not_found instanceof Array&&e.not_found.forEach(t=>{n(t,null),o.push(t)});const i=be(e);for(const t in i){const s=i[t];s&&(n(t,xe(e,t,s)),o.push(t))}return o}const Ie={provider:"",aliases:{},not_found:{},...re};function D(e,n){for(const o in n)if(o in e&&typeof e[o]!=typeof n[o])return!1;return!0}function le(e){if(typeof e!="object"||e===null)return null;const n=e;if(typeof n.prefix!="string"||!e.icons||typeof e.icons!="object"||!D(e,Ie))return null;const o=n.icons;for(const t in o){const s=o[t];if(!t||typeof s.body!="string"||!D(s,z))return null}const i=n.aliases||Object.create(null);for(const t in i){const s=i[t],r=s.parent;if(!t||typeof r!="string"||!o[r]&&!i[r]||!D(s,z))return null}return n}const K=Object.create(null);function we(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}function k(e,n){const o=K[e]||(K[e]=Object.create(null));return o[n]||(o[n]=we(e,n))}function fe(e,n){return le(n)?ce(n,(o,i)=>{i?e.icons[o]=i:e.missing.add(o)}):[]}function ve(e,n,o){try{if(typeof o.body=="string")return e.icons[n]={...o},!0}catch{}return!1}let j=!1;function ue(e){return typeof e=="boolean"&&(j=e),j}function Se(e){const n=typeof e=="string"?M(e,!0,j):e;if(n){const o=k(n.provider,n.prefix),i=n.name;return o.icons[i]||(o.missing.has(i)?null:void 0)}}function ke(e,n){const o=M(e,!0,j);if(!o)return!1;const i=k(o.provider,o.prefix);return n?ve(i,o.name,n):(i.missing.add(o.name),!0)}function Te(e,n){if(typeof e!="object")return!1;if(typeof n!="string"&&(n=e.provider||""),j&&!n&&!e.prefix){let t=!1;return le(e)&&(e.prefix="",ce(e,(s,r)=>{ke(s,r)&&(t=!0)})),t}const o=e.prefix;if(!L({prefix:o,name:"a"}))return!1;const i=k(n,o);return!!fe(i,e)}const ae=Object.freeze({width:null,height:null}),de=Object.freeze({...ae,...A}),Ce=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Pe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function W(e,n,o){if(n===1)return e;if(o=o||100,typeof e=="number")return Math.ceil(e*n*o)/o;if(typeof e!="string")return e;const i=e.split(Ce);if(i===null||!i.length)return e;const t=[];let s=i.shift(),r=Pe.test(s);for(;;){if(r){const c=parseFloat(s);isNaN(c)?t.push(s):t.push(Math.ceil(c*n*o)/o)}else t.push(s);if(s=i.shift(),s===void 0)return t.join("");r=!r}}function je(e,n="defs"){let o="";const i=e.indexOf("<"+n);for(;i>=0;){const t=e.indexOf(">",i),s=e.indexOf("",s);if(r===-1)break;o+=e.slice(t+1,s).trim(),e=e.slice(0,i).trim()+e.slice(r+1)}return{defs:o,content:e}}function Ee(e,n){return e?""+e+""+n:n}function Le(e,n,o){const i=je(e);return Ee(i.defs,n+i.content+o)}const Fe=e=>e==="unset"||e==="undefined"||e==="none";function Oe(e,n){const o={...N,...e},i={...de,...n},t={left:o.left,top:o.top,width:o.width,height:o.height};let s=o.body;[o,i].forEach(g=>{const u=[],S=g.hFlip,w=g.vFlip;let x=g.rotate;S?w?x+=2:(u.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),u.push("scale(-1 1)"),t.top=t.left=0):w&&(u.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),u.push("scale(1 -1)"),t.top=t.left=0);let y;switch(x<0&&(x-=Math.floor(x/4)*4),x=x%4,x){case 1:y=t.height/2+t.top,u.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:u.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:y=t.width/2+t.left,u.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}x%2===1&&(t.left!==t.top&&(y=t.left,t.left=t.top,t.top=y),t.width!==t.height&&(y=t.width,t.width=t.height,t.height=y)),u.length&&(s=Le(s,'',""))});const r=i.width,c=i.height,l=t.width,f=t.height;let a,d;r===null?(d=c===null?"1em":c==="auto"?f:c,a=W(d,l/f)):(a=r==="auto"?l:r,d=c===null?W(a,f/l):c==="auto"?f:c);const p={},m=(g,u)=>{Fe(u)||(p[g]=u.toString())};m("width",a),m("height",d);const I=[t.left,t.top,l,f];return p.viewBox=I.join(" "),{attributes:p,viewBox:I,body:s}}const Ae=/\sid="(\S+)"/g,Me="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Ne=0;function _e(e,n=Me){const o=[];let i;for(;i=Ae.exec(e);)o.push(i[1]);if(!o.length)return e;const t="suffix"+(Math.random()*16777216|Date.now()).toString(16);return o.forEach(s=>{const r=typeof n=="function"?n(s):n+(Ne++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+r+t+"$3")}),e=e.replace(new RegExp(t,"g"),""),e}const Q=Object.create(null);function De(e,n){Q[e]=n}function $(e){return Q[e]||Q[""]}function U(e){let n;if(typeof e.resources=="string")n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const H=Object.create(null),C=["https://api.simplesvg.com","https://api.unisvg.com"],F=[];for(;C.length>0;)C.length===1||Math.random()>.5?F.push(C.shift()):F.push(C.pop());H[""]=U({resources:["https://api.iconify.design"].concat(F)});function Re(e,n){const o=U(n);return o===null?!1:(H[e]=o,!0)}function V(e){return H[e]}const ze=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let J=ze();function Qe(e,n){const o=V(e);if(!o)return 0;let i;if(!o.maxURL)i=0;else{let t=0;o.resources.forEach(r=>{t=Math.max(t,r.length)});const s=n+".json?icons=";i=o.maxURL-t-o.path.length-s.length}return i}function $e(e){return e===404}const qe=(e,n,o)=>{const i=[],t=Qe(e,n),s="icons";let r={type:s,provider:e,prefix:n,icons:[]},c=0;return o.forEach((l,f)=>{c+=l.length+1,c>=t&&f>0&&(i.push(r),r={type:s,provider:e,prefix:n,icons:[]},c=l.length),r.icons.push(l)}),i.push(r),i};function Ue(e){if(typeof e=="string"){const n=V(e);if(n)return n.path}return"/"}const He=(e,n,o)=>{if(!J){o("abort",424);return}let i=Ue(n.provider);switch(n.type){case"icons":{const s=n.prefix,c=n.icons.join(","),l=new URLSearchParams({icons:c});i+=s+".json?"+l.toString();break}case"custom":{const s=n.uri;i+=s.slice(0,1)==="/"?s.slice(1):s;break}default:o("abort",400);return}let t=503;J(e+i).then(s=>{const r=s.status;if(r!==200){setTimeout(()=>{o($e(r)?"abort":"next",r)});return}return t=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?o("abort",s):o("next",t)});return}setTimeout(()=>{o("success",s)})}).catch(()=>{o("next",t)})},Ve={prepare:qe,send:He};function Ge(e){const n={loaded:[],missing:[],pending:[]},o=Object.create(null);e.sort((t,s)=>t.provider!==s.provider?t.provider.localeCompare(s.provider):t.prefix!==s.prefix?t.prefix.localeCompare(s.prefix):t.name.localeCompare(s.name));let i={provider:"",prefix:"",name:""};return e.forEach(t=>{if(i.name===t.name&&i.prefix===t.prefix&&i.provider===t.provider)return;i=t;const s=t.provider,r=t.prefix,c=t.name,l=o[s]||(o[s]=Object.create(null)),f=l[r]||(l[r]=k(s,r));let a;c in f.icons?a=n.loaded:r===""||f.missing.has(c)?a=n.missing:a=n.pending;const d={provider:s,prefix:r,name:c};a.push(d)}),n}function he(e,n){e.forEach(o=>{const i=o.loaderCallbacks;i&&(o.loaderCallbacks=i.filter(t=>t.id!==n))})}function Be(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!n.length)return;let o=!1;const i=e.provider,t=e.prefix;n.forEach(s=>{const r=s.icons,c=r.pending.length;r.pending=r.pending.filter(l=>{if(l.prefix!==t)return!0;const f=l.name;if(e.icons[f])r.loaded.push({provider:i,prefix:t,name:f});else if(e.missing.has(f))r.missing.push({provider:i,prefix:t,name:f});else return o=!0,!0;return!1}),r.pending.length!==c&&(o||he([e],s.id),s.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),s.abort))})}))}let Ke=0;function We(e,n,o){const i=Ke++,t=he.bind(null,o,i);if(!n.pending.length)return t;const s={id:i,icons:n,callback:e,abort:t};return o.forEach(r=>{(r.loaderCallbacks||(r.loaderCallbacks=[])).push(s)}),t}function Je(e,n=!0,o=!1){const i=[];return e.forEach(t=>{const s=typeof t=="string"?M(t,n,o):t;s&&i.push(s)}),i}var Xe={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ye(e,n,o,i){const t=e.resources.length,s=e.random?Math.floor(Math.random()*t):e.index;let r;if(e.random){let h=e.resources.slice(0);for(r=[];h.length>1;){const b=Math.floor(Math.random()*h.length);r.push(h[b]),h=h.slice(0,b).concat(h.slice(b+1))}r=r.concat(h)}else r=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let l="pending",f=0,a,d=null,p=[],m=[];typeof i=="function"&&m.push(i);function I(){d&&(clearTimeout(d),d=null)}function g(){l==="pending"&&(l="aborted"),I(),p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function u(h,b){b&&(m=[]),typeof h=="function"&&m.push(h)}function S(){return{startTime:c,payload:n,status:l,queriesSent:f,queriesPending:p.length,subscribe:u,abort:g}}function w(){l="failed",m.forEach(h=>{h(void 0,a)})}function x(){p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function y(h,b,T){const E=b!=="success";switch(p=p.filter(v=>v!==h),l){case"pending":break;case"failed":if(E||!e.dataAfterTimeout)return;break;default:return}if(b==="abort"){a=T,w();return}if(E){a=T,p.length||(r.length?_():w());return}if(I(),x(),!e.random){const v=e.resources.indexOf(h.resource);v!==-1&&v!==e.index&&(e.index=v)}l="completed",m.forEach(v=>{v(T)})}function _(){if(l!=="pending")return;I();const h=r.shift();if(h===void 0){if(p.length){d=setTimeout(()=>{I(),l==="pending"&&(x(),w())},e.timeout);return}w();return}const b={status:"pending",resource:h,callback:(T,E)=>{y(b,T,E)}};p.push(b),f++,d=setTimeout(_,e.rotate),o(h,n,b.callback)}return setTimeout(_),S}function pe(e){const n={...Xe,...e};let o=[];function i(){o=o.filter(c=>c().status==="pending")}function t(c,l,f){const a=Ye(n,c,l,(d,p)=>{i(),f&&f(d,p)});return o.push(a),a}function s(c){return o.find(l=>c(l))||null}return{query:t,find:s,setIndex:c=>{n.index=c},getIndex:()=>n.index,cleanup:i}}function X(){}const R=Object.create(null);function Ze(e){if(!R[e]){const n=V(e);if(!n)return;const o=pe(n),i={config:n,redundancy:o};R[e]=i}return R[e]}function et(e,n,o){let i,t;if(typeof e=="string"){const s=$(e);if(!s)return o(void 0,424),X;t=s.send;const r=Ze(e);r&&(i=r.redundancy)}else{const s=U(e);if(s){i=pe(s);const r=e.resources?e.resources[0]:"",c=$(r);c&&(t=c.send)}}return!i||!t?(o(void 0,424),X):i.query(n,t,o)().abort}function Y(){}function tt(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Be(e)}))}function nt(e){const n=[],o=[];return e.forEach(i=>{(i.match(se)?n:o).push(i)}),{valid:n,invalid:o}}function P(e,n,o){function i(){const t=e.pendingIcons;n.forEach(s=>{t&&t.delete(s),e.icons[s]||e.missing.add(s)})}if(o&&typeof o=="object")try{if(!fe(e,o).length){i();return}}catch(t){console.error(t)}i(),tt(e)}function Z(e,n){e instanceof Promise?e.then(o=>{n(o)}).catch(()=>{n(null)}):n(e)}function ot(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:o,prefix:i}=e,t=e.iconsToLoad;if(delete e.iconsToLoad,!t||!t.length)return;const s=e.loadIcon;if(e.loadIcons&&(t.length>1||!s)){Z(e.loadIcons(t,i,o),a=>{P(e,t,a)});return}if(s){t.forEach(a=>{const d=s(a,i,o);Z(d,p=>{const m=p?{prefix:i,icons:{[a]:p}}:null;P(e,[a],m)})});return}const{valid:r,invalid:c}=nt(t);if(c.length&&P(e,c,null),!r.length)return;const l=i.match(se)?$(o):null;if(!l){P(e,r,null);return}l.prepare(o,i,r).forEach(a=>{et(o,a,d=>{P(e,a.icons,d)})})}))}const it=(e,n)=>{const o=Je(e,!0,ue()),i=Ge(o);if(!i.pending.length){let l=!0;return n&&setTimeout(()=>{l&&n(i.loaded,i.missing,i.pending,Y)}),()=>{l=!1}}const t=Object.create(null),s=[];let r,c;return i.pending.forEach(l=>{const{provider:f,prefix:a}=l;if(a===c&&f===r)return;r=f,c=a,s.push(k(f,a));const d=t[f]||(t[f]=Object.create(null));d[a]||(d[a]=[])}),i.pending.forEach(l=>{const{provider:f,prefix:a,name:d}=l,p=k(f,a),m=p.pendingIcons||(p.pendingIcons=new Set);m.has(d)||(m.add(d),t[f][a].push(d))}),s.forEach(l=>{const f=t[l.provider][l.prefix];f.length&&ot(l,f)}),n?We(n,i,s):Y};function st(e,n){const o={...e};for(const i in n){const t=n[i],s=typeof t;i in ae?(t===null||t&&(s==="string"||s==="number"))&&(o[i]=t):s===typeof o[i]&&(o[i]=i==="rotate"?t%4:t)}return o}const rt=/[\s,]+/;function ct(e,n){n.split(rt).forEach(o=>{switch(o.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function lt(e,n=0){const o=e.replace(/^-?[0-9.]*/,"");function i(t){for(;t<0;)t+=4;return t%4}if(o===""){const t=parseInt(e);return isNaN(t)?0:i(t)}else if(o!==e){let t=0;switch(o){case"%":t=25;break;case"deg":t=90}if(t){let s=parseFloat(e.slice(0,e.length-o.length));return isNaN(s)?0:(s=s/t,s%1===0?i(s):0)}}return n}function ft(e,n){let o=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in n)o+=" "+i+'="'+n[i]+'"';return'"+e+""}function ut(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function at(e){return"data:image/svg+xml,"+ut(e)}function dt(e){return'url("'+at(e)+'")'}const ee={...de,inline:!1},ht={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},pt={display:"inline-block"},q={backgroundColor:"currentColor"},ge={backgroundColor:"transparent"},te={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},ne={webkitMask:q,mask:q,background:ge};for(const e in ne){const n=ne[e];for(const o in te)n[e+o]=te[o]}const O={};["horizontal","vertical"].forEach(e=>{const n=e.slice(0,1)+"Flip";O[e+"-flip"]=n,O[e.slice(0,1)+"-flip"]=n,O[e+"Flip"]=n});function oe(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const ie=(e,n)=>{const o=st(ee,n),i={...ht},t=n.mode||"svg",s={},r=n.style,c=typeof r=="object"&&!(r instanceof Array)?r:{};for(let g in n){const u=n[g];if(u!==void 0)switch(g){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":o[g]=u===!0||u==="true"||u===1;break;case"flip":typeof u=="string"&&ct(o,u);break;case"color":s.color=u;break;case"rotate":typeof u=="string"?o[g]=lt(u):typeof u=="number"&&(o[g]=u);break;case"ariaHidden":case"aria-hidden":u!==!0&&u!=="true"&&delete i["aria-hidden"];break;default:{const S=O[g];S?(u===!0||u==="true"||u===1)&&(o[S]=!0):ee[g]===void 0&&(i[g]=u)}}}const l=Oe(e,o),f=l.attributes;if(o.inline&&(s.verticalAlign="-0.125em"),t==="svg"){i.style={...s,...c},Object.assign(i,f);let g=0,u=n.id;return typeof u=="string"&&(u=u.replace(/-/g,"_")),i.innerHTML=_e(l.body,u?()=>u+"ID"+g++:"iconifyVue"),G("svg",i)}const{body:a,width:d,height:p}=e,m=t==="mask"||(t==="bg"?!1:a.indexOf("currentColor")!==-1),I=ft(a,{...f,width:d+"",height:p+""});return i.style={...s,"--svg":dt(I),width:oe(f.width),height:oe(f.height),...pt,...m?q:ge,...c},G("span",i)};ue(!0);De("",Ve);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const n=e.IconifyPreload,o="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!Te(i))&&console.error(o)}catch{console.error(o)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(let o in n){const i="IconifyProviders["+o+"] is invalid.";try{const t=n[o];if(typeof t!="object"||!t||t.resources===void 0)continue;Re(o,t)||console.error(i)}catch{console.error(i)}}}}const gt={...N,body:""},yt=me({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,n,o){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:e};let i;if(typeof e!="string"||(i=M(e,!1,!0))===null)return this.abortLoading(),null;let t=Se(i);if(!t)return(!this._loadingIcon||this._loadingIcon.name!==e)&&(this.abortLoading(),this._name="",t!==null&&(this._loadingIcon={name:e,abort:it([i],()=>{this.counter++})})),null;if(this.abortLoading(),this._name!==e&&(this._name=e,n&&n(e)),o){t=Object.assign({},t);const r=o(t.body,i.name,i.prefix,i.provider);typeof r=="string"&&(t.body=r)}const s=["iconify"];return i.prefix!==""&&s.push("iconify--"+i.prefix),i.provider!==""&&s.push("iconify--"+i.provider),{data:t,classes:s}}},render(){this.counter;const e=this.$attrs,n=this.iconMounted||e.ssr?this.getIcon(e.icon,e.onLoad,e.customise):null;if(!n)return ie(gt,e);let o=e;return n.classes&&(o={...e,class:(typeof e.class=="string"?e.class+" ":"")+n.classes.join(" ")}),ie({...N,...n.data},o)}});export{yt as I}; +import{d as me,R as G}from"./index-W4k7xcj8.js";const se=/^[a-z0-9]+(-[a-z0-9]+)*$/,M=(e,n,o,i="")=>{const t=e.split(":");if(e.slice(0,1)==="@"){if(t.length<2||t.length>3)return null;i=t.shift().slice(1)}if(t.length>3||!t.length)return null;if(t.length>1){const c=t.pop(),l=t.pop(),f={provider:t.length>0?t[0]:i,prefix:l,name:c};return n&&!L(f)?null:f}const s=t[0],r=s.split("-");if(r.length>1){const c={provider:i,prefix:r.shift(),name:r.join("-")};return n&&!L(c)?null:c}if(o&&i===""){const c={provider:i,prefix:"",name:s};return n&&!L(c,o)?null:c}return null},L=(e,n)=>e?!!((n&&e.prefix===""||e.prefix)&&e.name):!1,re=Object.freeze({left:0,top:0,width:16,height:16}),A=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),N=Object.freeze({...re,...A}),z=Object.freeze({...N,body:"",hidden:!1});function ye(e,n){const o={};!e.hFlip!=!n.hFlip&&(o.hFlip=!0),!e.vFlip!=!n.vFlip&&(o.vFlip=!0);const i=((e.rotate||0)+(n.rotate||0))%4;return i&&(o.rotate=i),o}function B(e,n){const o=ye(e,n);for(const i in z)i in A?i in e&&!(i in o)&&(o[i]=A[i]):i in n?o[i]=n[i]:i in e&&(o[i]=e[i]);return o}function be(e,n){const o=e.icons,i=e.aliases||Object.create(null),t=Object.create(null);function s(r){if(o[r])return t[r]=[];if(!(r in t)){t[r]=null;const c=i[r]&&i[r].parent,l=c&&s(c);l&&(t[r]=[c].concat(l))}return t[r]}return Object.keys(o).concat(Object.keys(i)).forEach(s),t}function xe(e,n,o){const i=e.icons,t=e.aliases||Object.create(null);let s={};function r(c){s=B(i[c]||t[c],s)}return r(n),o.forEach(r),B(e,s)}function ce(e,n){const o=[];if(typeof e!="object"||typeof e.icons!="object")return o;e.not_found instanceof Array&&e.not_found.forEach(t=>{n(t,null),o.push(t)});const i=be(e);for(const t in i){const s=i[t];s&&(n(t,xe(e,t,s)),o.push(t))}return o}const Ie={provider:"",aliases:{},not_found:{},...re};function _(e,n){for(const o in n)if(o in e&&typeof e[o]!=typeof n[o])return!1;return!0}function le(e){if(typeof e!="object"||e===null)return null;const n=e;if(typeof n.prefix!="string"||!e.icons||typeof e.icons!="object"||!_(e,Ie))return null;const o=n.icons;for(const t in o){const s=o[t];if(!t||typeof s.body!="string"||!_(s,z))return null}const i=n.aliases||Object.create(null);for(const t in i){const s=i[t],r=s.parent;if(!t||typeof r!="string"||!o[r]&&!i[r]||!_(s,z))return null}return n}const K=Object.create(null);function we(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}function k(e,n){const o=K[e]||(K[e]=Object.create(null));return o[n]||(o[n]=we(e,n))}function fe(e,n){return le(n)?ce(n,(o,i)=>{i?e.icons[o]=i:e.missing.add(o)}):[]}function ve(e,n,o){try{if(typeof o.body=="string")return e.icons[n]={...o},!0}catch{}return!1}let j=!1;function ue(e){return typeof e=="boolean"&&(j=e),j}function Se(e){const n=typeof e=="string"?M(e,!0,j):e;if(n){const o=k(n.provider,n.prefix),i=n.name;return o.icons[i]||(o.missing.has(i)?null:void 0)}}function ke(e,n){const o=M(e,!0,j);if(!o)return!1;const i=k(o.provider,o.prefix);return n?ve(i,o.name,n):(i.missing.add(o.name),!0)}function Te(e,n){if(typeof e!="object")return!1;if(typeof n!="string"&&(n=e.provider||""),j&&!n&&!e.prefix){let t=!1;return le(e)&&(e.prefix="",ce(e,(s,r)=>{ke(s,r)&&(t=!0)})),t}const o=e.prefix;if(!L({prefix:o,name:"a"}))return!1;const i=k(n,o);return!!fe(i,e)}const ae=Object.freeze({width:null,height:null}),de=Object.freeze({...ae,...A}),Ce=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Pe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function W(e,n,o){if(n===1)return e;if(o=o||100,typeof e=="number")return Math.ceil(e*n*o)/o;if(typeof e!="string")return e;const i=e.split(Ce);if(i===null||!i.length)return e;const t=[];let s=i.shift(),r=Pe.test(s);for(;;){if(r){const c=parseFloat(s);isNaN(c)?t.push(s):t.push(Math.ceil(c*n*o)/o)}else t.push(s);if(s=i.shift(),s===void 0)return t.join("");r=!r}}function je(e,n="defs"){let o="";const i=e.indexOf("<"+n);for(;i>=0;){const t=e.indexOf(">",i),s=e.indexOf("",s);if(r===-1)break;o+=e.slice(t+1,s).trim(),e=e.slice(0,i).trim()+e.slice(r+1)}return{defs:o,content:e}}function Ee(e,n){return e?""+e+""+n:n}function Le(e,n,o){const i=je(e);return Ee(i.defs,n+i.content+o)}const Fe=e=>e==="unset"||e==="undefined"||e==="none";function Oe(e,n){const o={...N,...e},i={...de,...n},t={left:o.left,top:o.top,width:o.width,height:o.height};let s=o.body;[o,i].forEach(g=>{const u=[],S=g.hFlip,w=g.vFlip;let x=g.rotate;S?w?x+=2:(u.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),u.push("scale(-1 1)"),t.top=t.left=0):w&&(u.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),u.push("scale(1 -1)"),t.top=t.left=0);let y;switch(x<0&&(x-=Math.floor(x/4)*4),x=x%4,x){case 1:y=t.height/2+t.top,u.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:u.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:y=t.width/2+t.left,u.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}x%2===1&&(t.left!==t.top&&(y=t.left,t.left=t.top,t.top=y),t.width!==t.height&&(y=t.width,t.width=t.height,t.height=y)),u.length&&(s=Le(s,'',""))});const r=i.width,c=i.height,l=t.width,f=t.height;let a,d;r===null?(d=c===null?"1em":c==="auto"?f:c,a=W(d,l/f)):(a=r==="auto"?l:r,d=c===null?W(a,f/l):c==="auto"?f:c);const p={},m=(g,u)=>{Fe(u)||(p[g]=u.toString())};m("width",a),m("height",d);const I=[t.left,t.top,l,f];return p.viewBox=I.join(" "),{attributes:p,viewBox:I,body:s}}const Ae=/\sid="(\S+)"/g,Me="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Ne=0;function Re(e,n=Me){const o=[];let i;for(;i=Ae.exec(e);)o.push(i[1]);if(!o.length)return e;const t="suffix"+(Math.random()*16777216|Date.now()).toString(16);return o.forEach(s=>{const r=typeof n=="function"?n(s):n+(Ne++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+r+t+"$3")}),e=e.replace(new RegExp(t,"g"),""),e}const Q=Object.create(null);function _e(e,n){Q[e]=n}function $(e){return Q[e]||Q[""]}function U(e){let n;if(typeof e.resources=="string")n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const H=Object.create(null),C=["https://api.simplesvg.com","https://api.unisvg.com"],F=[];for(;C.length>0;)C.length===1||Math.random()>.5?F.push(C.shift()):F.push(C.pop());H[""]=U({resources:["https://api.iconify.design"].concat(F)});function De(e,n){const o=U(n);return o===null?!1:(H[e]=o,!0)}function V(e){return H[e]}const ze=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let J=ze();function Qe(e,n){const o=V(e);if(!o)return 0;let i;if(!o.maxURL)i=0;else{let t=0;o.resources.forEach(r=>{t=Math.max(t,r.length)});const s=n+".json?icons=";i=o.maxURL-t-o.path.length-s.length}return i}function $e(e){return e===404}const qe=(e,n,o)=>{const i=[],t=Qe(e,n),s="icons";let r={type:s,provider:e,prefix:n,icons:[]},c=0;return o.forEach((l,f)=>{c+=l.length+1,c>=t&&f>0&&(i.push(r),r={type:s,provider:e,prefix:n,icons:[]},c=l.length),r.icons.push(l)}),i.push(r),i};function Ue(e){if(typeof e=="string"){const n=V(e);if(n)return n.path}return"/"}const He=(e,n,o)=>{if(!J){o("abort",424);return}let i=Ue(n.provider);switch(n.type){case"icons":{const s=n.prefix,c=n.icons.join(","),l=new URLSearchParams({icons:c});i+=s+".json?"+l.toString();break}case"custom":{const s=n.uri;i+=s.slice(0,1)==="/"?s.slice(1):s;break}default:o("abort",400);return}let t=503;J(e+i).then(s=>{const r=s.status;if(r!==200){setTimeout(()=>{o($e(r)?"abort":"next",r)});return}return t=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?o("abort",s):o("next",t)});return}setTimeout(()=>{o("success",s)})}).catch(()=>{o("next",t)})},Ve={prepare:qe,send:He};function Ge(e){const n={loaded:[],missing:[],pending:[]},o=Object.create(null);e.sort((t,s)=>t.provider!==s.provider?t.provider.localeCompare(s.provider):t.prefix!==s.prefix?t.prefix.localeCompare(s.prefix):t.name.localeCompare(s.name));let i={provider:"",prefix:"",name:""};return e.forEach(t=>{if(i.name===t.name&&i.prefix===t.prefix&&i.provider===t.provider)return;i=t;const s=t.provider,r=t.prefix,c=t.name,l=o[s]||(o[s]=Object.create(null)),f=l[r]||(l[r]=k(s,r));let a;c in f.icons?a=n.loaded:r===""||f.missing.has(c)?a=n.missing:a=n.pending;const d={provider:s,prefix:r,name:c};a.push(d)}),n}function he(e,n){e.forEach(o=>{const i=o.loaderCallbacks;i&&(o.loaderCallbacks=i.filter(t=>t.id!==n))})}function Be(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!n.length)return;let o=!1;const i=e.provider,t=e.prefix;n.forEach(s=>{const r=s.icons,c=r.pending.length;r.pending=r.pending.filter(l=>{if(l.prefix!==t)return!0;const f=l.name;if(e.icons[f])r.loaded.push({provider:i,prefix:t,name:f});else if(e.missing.has(f))r.missing.push({provider:i,prefix:t,name:f});else return o=!0,!0;return!1}),r.pending.length!==c&&(o||he([e],s.id),s.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),s.abort))})}))}let Ke=0;function We(e,n,o){const i=Ke++,t=he.bind(null,o,i);if(!n.pending.length)return t;const s={id:i,icons:n,callback:e,abort:t};return o.forEach(r=>{(r.loaderCallbacks||(r.loaderCallbacks=[])).push(s)}),t}function Je(e,n=!0,o=!1){const i=[];return e.forEach(t=>{const s=typeof t=="string"?M(t,n,o):t;s&&i.push(s)}),i}var Xe={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ye(e,n,o,i){const t=e.resources.length,s=e.random?Math.floor(Math.random()*t):e.index;let r;if(e.random){let h=e.resources.slice(0);for(r=[];h.length>1;){const b=Math.floor(Math.random()*h.length);r.push(h[b]),h=h.slice(0,b).concat(h.slice(b+1))}r=r.concat(h)}else r=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let l="pending",f=0,a,d=null,p=[],m=[];typeof i=="function"&&m.push(i);function I(){d&&(clearTimeout(d),d=null)}function g(){l==="pending"&&(l="aborted"),I(),p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function u(h,b){b&&(m=[]),typeof h=="function"&&m.push(h)}function S(){return{startTime:c,payload:n,status:l,queriesSent:f,queriesPending:p.length,subscribe:u,abort:g}}function w(){l="failed",m.forEach(h=>{h(void 0,a)})}function x(){p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function y(h,b,T){const E=b!=="success";switch(p=p.filter(v=>v!==h),l){case"pending":break;case"failed":if(E||!e.dataAfterTimeout)return;break;default:return}if(b==="abort"){a=T,w();return}if(E){a=T,p.length||(r.length?R():w());return}if(I(),x(),!e.random){const v=e.resources.indexOf(h.resource);v!==-1&&v!==e.index&&(e.index=v)}l="completed",m.forEach(v=>{v(T)})}function R(){if(l!=="pending")return;I();const h=r.shift();if(h===void 0){if(p.length){d=setTimeout(()=>{I(),l==="pending"&&(x(),w())},e.timeout);return}w();return}const b={status:"pending",resource:h,callback:(T,E)=>{y(b,T,E)}};p.push(b),f++,d=setTimeout(R,e.rotate),o(h,n,b.callback)}return setTimeout(R),S}function pe(e){const n={...Xe,...e};let o=[];function i(){o=o.filter(c=>c().status==="pending")}function t(c,l,f){const a=Ye(n,c,l,(d,p)=>{i(),f&&f(d,p)});return o.push(a),a}function s(c){return o.find(l=>c(l))||null}return{query:t,find:s,setIndex:c=>{n.index=c},getIndex:()=>n.index,cleanup:i}}function X(){}const D=Object.create(null);function Ze(e){if(!D[e]){const n=V(e);if(!n)return;const o=pe(n),i={config:n,redundancy:o};D[e]=i}return D[e]}function et(e,n,o){let i,t;if(typeof e=="string"){const s=$(e);if(!s)return o(void 0,424),X;t=s.send;const r=Ze(e);r&&(i=r.redundancy)}else{const s=U(e);if(s){i=pe(s);const r=e.resources?e.resources[0]:"",c=$(r);c&&(t=c.send)}}return!i||!t?(o(void 0,424),X):i.query(n,t,o)().abort}function Y(){}function tt(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Be(e)}))}function nt(e){const n=[],o=[];return e.forEach(i=>{(i.match(se)?n:o).push(i)}),{valid:n,invalid:o}}function P(e,n,o){function i(){const t=e.pendingIcons;n.forEach(s=>{t&&t.delete(s),e.icons[s]||e.missing.add(s)})}if(o&&typeof o=="object")try{if(!fe(e,o).length){i();return}}catch(t){console.error(t)}i(),tt(e)}function Z(e,n){e instanceof Promise?e.then(o=>{n(o)}).catch(()=>{n(null)}):n(e)}function ot(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:o,prefix:i}=e,t=e.iconsToLoad;if(delete e.iconsToLoad,!t||!t.length)return;const s=e.loadIcon;if(e.loadIcons&&(t.length>1||!s)){Z(e.loadIcons(t,i,o),a=>{P(e,t,a)});return}if(s){t.forEach(a=>{const d=s(a,i,o);Z(d,p=>{const m=p?{prefix:i,icons:{[a]:p}}:null;P(e,[a],m)})});return}const{valid:r,invalid:c}=nt(t);if(c.length&&P(e,c,null),!r.length)return;const l=i.match(se)?$(o):null;if(!l){P(e,r,null);return}l.prepare(o,i,r).forEach(a=>{et(o,a,d=>{P(e,a.icons,d)})})}))}const it=(e,n)=>{const o=Je(e,!0,ue()),i=Ge(o);if(!i.pending.length){let l=!0;return n&&setTimeout(()=>{l&&n(i.loaded,i.missing,i.pending,Y)}),()=>{l=!1}}const t=Object.create(null),s=[];let r,c;return i.pending.forEach(l=>{const{provider:f,prefix:a}=l;if(a===c&&f===r)return;r=f,c=a,s.push(k(f,a));const d=t[f]||(t[f]=Object.create(null));d[a]||(d[a]=[])}),i.pending.forEach(l=>{const{provider:f,prefix:a,name:d}=l,p=k(f,a),m=p.pendingIcons||(p.pendingIcons=new Set);m.has(d)||(m.add(d),t[f][a].push(d))}),s.forEach(l=>{const f=t[l.provider][l.prefix];f.length&&ot(l,f)}),n?We(n,i,s):Y};function st(e,n){const o={...e};for(const i in n){const t=n[i],s=typeof t;i in ae?(t===null||t&&(s==="string"||s==="number"))&&(o[i]=t):s===typeof o[i]&&(o[i]=i==="rotate"?t%4:t)}return o}const rt=/[\s,]+/;function ct(e,n){n.split(rt).forEach(o=>{switch(o.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function lt(e,n=0){const o=e.replace(/^-?[0-9.]*/,"");function i(t){for(;t<0;)t+=4;return t%4}if(o===""){const t=parseInt(e);return isNaN(t)?0:i(t)}else if(o!==e){let t=0;switch(o){case"%":t=25;break;case"deg":t=90}if(t){let s=parseFloat(e.slice(0,e.length-o.length));return isNaN(s)?0:(s=s/t,s%1===0?i(s):0)}}return n}function ft(e,n){let o=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in n)o+=" "+i+'="'+n[i]+'"';return'"+e+""}function ut(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function at(e){return"data:image/svg+xml,"+ut(e)}function dt(e){return'url("'+at(e)+'")'}const ee={...de,inline:!1},ht={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},pt={display:"inline-block"},q={backgroundColor:"currentColor"},ge={backgroundColor:"transparent"},te={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},ne={webkitMask:q,mask:q,background:ge};for(const e in ne){const n=ne[e];for(const o in te)n[e+o]=te[o]}const O={};["horizontal","vertical"].forEach(e=>{const n=e.slice(0,1)+"Flip";O[e+"-flip"]=n,O[e.slice(0,1)+"-flip"]=n,O[e+"Flip"]=n});function oe(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const ie=(e,n)=>{const o=st(ee,n),i={...ht},t=n.mode||"svg",s={},r=n.style,c=typeof r=="object"&&!(r instanceof Array)?r:{};for(let g in n){const u=n[g];if(u!==void 0)switch(g){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":o[g]=u===!0||u==="true"||u===1;break;case"flip":typeof u=="string"&&ct(o,u);break;case"color":s.color=u;break;case"rotate":typeof u=="string"?o[g]=lt(u):typeof u=="number"&&(o[g]=u);break;case"ariaHidden":case"aria-hidden":u!==!0&&u!=="true"&&delete i["aria-hidden"];break;default:{const S=O[g];S?(u===!0||u==="true"||u===1)&&(o[S]=!0):ee[g]===void 0&&(i[g]=u)}}}const l=Oe(e,o),f=l.attributes;if(o.inline&&(s.verticalAlign="-0.125em"),t==="svg"){i.style={...s,...c},Object.assign(i,f);let g=0,u=n.id;return typeof u=="string"&&(u=u.replace(/-/g,"_")),i.innerHTML=Re(l.body,u?()=>u+"ID"+g++:"iconifyVue"),G("svg",i)}const{body:a,width:d,height:p}=e,m=t==="mask"||(t==="bg"?!1:a.indexOf("currentColor")!==-1),I=ft(a,{...f,width:d+"",height:p+""});return i.style={...s,"--svg":dt(I),width:oe(f.width),height:oe(f.height),...pt,...m?q:ge,...c},G("span",i)};ue(!0);_e("",Ve);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const n=e.IconifyPreload,o="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!Te(i))&&console.error(o)}catch{console.error(o)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(let o in n){const i="IconifyProviders["+o+"] is invalid.";try{const t=n[o];if(typeof t!="object"||!t||t.resources===void 0)continue;De(o,t)||console.error(i)}catch{console.error(i)}}}}const gt={...N,body:""},yt=me({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,n,o){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:e};let i;if(typeof e!="string"||(i=M(e,!1,!0))===null)return this.abortLoading(),null;let t=Se(i);if(!t)return(!this._loadingIcon||this._loadingIcon.name!==e)&&(this.abortLoading(),this._name="",t!==null&&(this._loadingIcon={name:e,abort:it([i],()=>{this.counter++})})),null;if(this.abortLoading(),this._name!==e&&(this._name=e,n&&n(e)),o){t=Object.assign({},t);const r=o(t.body,i.name,i.prefix,i.provider);typeof r=="string"&&(t.body=r)}const s=["iconify"];return i.prefix!==""&&s.push("iconify--"+i.prefix),i.provider!==""&&s.push("iconify--"+i.provider),{data:t,classes:s}}},render(){this.counter;const e=this.$attrs,n=this.iconMounted||e.ssr?this.getIcon(e.icon,e.onLoad,e.customise):null;if(!n)return ie(gt,e);let o=e;return n.classes&&(o={...e,class:(typeof e.class=="string"?e.class+" ":"")+n.classes.join(" ")}),ie({...N,...n.data},o)}});export{yt as I}; diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-BPwnW1su.js b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-0-ztzQqN.js similarity index 79% rename from spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-BPwnW1su.js rename to spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-0-ztzQqN.js index 02ceeed882..aee2557b15 100644 --- a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-BPwnW1su.js +++ b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-0-ztzQqN.js @@ -1 +1 @@ -import{d as L,u as E,r as p,c as v,Q as $,o as B,A as I,a as r,b as l,e as t,f as g,g as h,x as u,t as d,h as x,F as D,l as F,n as N,s as w,R as U}from"./index-SarmArA2.js";import{I as i}from"./iconify-B5kZhuXP.js";import{_ as V}from"./_plugin-vue_export-helper-DlAUqK2U.js";const M={class:"language-switcher"},O=["title"],S={class:"current-lang"},z={class:"dropdown-header"},A={class:"language-options"},K=["disabled","onClick"],Q={class:"lang-code"},R={class:"lang-name"},j=L({__name:"index",setup(q){const{locale:_}=E(),a=p(!1),o=v(()=>_.value),f=v(()=>$.opts),b=v(()=>{const e=f.value.find(n=>n.value===o.value);return e?e.title:"Unknown"}),y=()=>{a.value=!a.value},c=p(!1),C=async e=>{if(!(c.value||o.value===e))try{c.value=!0,await U(e),a.value=!1}catch(n){console.error("Failed to change language:",n),a.value=!1}finally{c.value=!1}},k=e=>{e.target.closest(".language-switcher")||(a.value=!1)},m=e=>{e.key==="Escape"&&(a.value=!1)};return B(()=>{document.addEventListener("click",k),document.addEventListener("keydown",m)}),I(()=>{document.removeEventListener("click",k),document.removeEventListener("keydown",m)}),(e,n)=>(l(),r("div",M,[t("button",{class:"language-btn",onClick:y,title:e.$t("language.switch")},[h(u(i),{icon:"carbon:translate",width:"18"}),t("span",S,d(b.value),1),h(u(i),{icon:a.value?"carbon:chevron-up":"carbon:chevron-down",width:"14",class:"chevron"},null,8,["icon"])],8,O),a.value?(l(),r("div",{key:0,class:"language-dropdown",onClick:n[1]||(n[1]=x(()=>{},["stop"]))},[t("div",z,[t("span",null,d(e.$t("language.switch")),1),t("button",{class:"close-btn",onClick:n[0]||(n[0]=s=>a.value=!1)},[h(u(i),{icon:"carbon:close",width:"16"})])]),t("div",A,[(l(!0),r(D,null,F(f.value,s=>(l(),r("button",{key:s.value,class:N(["language-option",{active:o.value===s.value,loading:c.value&&o.value!==s.value}]),disabled:c.value,onClick:G=>C(s.value)},[t("span",Q,d(s.value.toUpperCase()),1),t("span",R,d(s.title),1),c.value&&o.value!==s.value?(l(),w(u(i),{key:0,icon:"carbon:circle-dash",width:"16",class:"loading-icon"})):o.value===s.value?(l(),w(u(i),{key:1,icon:"carbon:checkmark",width:"16",class:"check-icon"})):g("",!0)],10,K))),128))])])):g("",!0),a.value?(l(),r("div",{key:1,class:"backdrop",onClick:n[2]||(n[2]=s=>a.value=!1)})):g("",!0)]))}}),T=V(j,[["__scopeId","data-v-8dd61fe2"]]);export{T as L}; +import{d as L,u as E,r as p,c as v,P as $,o as B,A as I,a as r,b as l,e as t,f as g,g as h,x as u,t as d,h as x,F as D,l as F,n as N,s as w,Q as U}from"./index-W4k7xcj8.js";import{I as i}from"./iconify-bZOkqtWv.js";import{_ as V}from"./_plugin-vue_export-helper-DlAUqK2U.js";const M={class:"language-switcher"},O=["title"],S={class:"current-lang"},z={class:"dropdown-header"},A={class:"language-options"},K=["disabled","onClick"],P={class:"lang-code"},Q={class:"lang-name"},j=L({__name:"index",setup(q){const{locale:_}=E(),a=p(!1),o=v(()=>_.value),f=v(()=>$.opts),b=v(()=>{const e=f.value.find(n=>n.value===o.value);return e?e.title:"Unknown"}),y=()=>{a.value=!a.value},c=p(!1),C=async e=>{if(!(c.value||o.value===e))try{c.value=!0,await U(e),a.value=!1}catch(n){console.error("Failed to change language:",n),a.value=!1}finally{c.value=!1}},k=e=>{e.target.closest(".language-switcher")||(a.value=!1)},m=e=>{e.key==="Escape"&&(a.value=!1)};return B(()=>{document.addEventListener("click",k),document.addEventListener("keydown",m)}),I(()=>{document.removeEventListener("click",k),document.removeEventListener("keydown",m)}),(e,n)=>(l(),r("div",M,[t("button",{class:"language-btn",onClick:y,title:e.$t("language.switch")},[h(u(i),{icon:"carbon:translate",width:"18"}),t("span",S,d(b.value),1),h(u(i),{icon:a.value?"carbon:chevron-up":"carbon:chevron-down",width:"14",class:"chevron"},null,8,["icon"])],8,O),a.value?(l(),r("div",{key:0,class:"language-dropdown",onClick:n[1]||(n[1]=x(()=>{},["stop"]))},[t("div",z,[t("span",null,d(e.$t("language.switch")),1),t("button",{class:"close-btn",onClick:n[0]||(n[0]=s=>a.value=!1)},[h(u(i),{icon:"carbon:close",width:"16"})])]),t("div",A,[(l(!0),r(D,null,F(f.value,s=>(l(),r("button",{key:s.value,class:N(["language-option",{active:o.value===s.value,loading:c.value&&o.value!==s.value}]),disabled:c.value,onClick:G=>C(s.value)},[t("span",P,d(s.value.toUpperCase()),1),t("span",Q,d(s.title),1),c.value&&o.value!==s.value?(l(),w(u(i),{key:0,icon:"carbon:circle-dash",width:"16",class:"loading-icon"})):o.value===s.value?(l(),w(u(i),{key:1,icon:"carbon:checkmark",width:"16",class:"check-icon"})):g("",!0)],10,K))),128))])])):g("",!0),a.value?(l(),r("div",{key:1,class:"backdrop",onClick:n[2]||(n[2]=s=>a.value=!1)})):g("",!0)]))}}),T=V(j,[["__scopeId","data-v-25f759dc"]]);export{T as L}; diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-BijJLnMN.js b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-BijJLnMN.js deleted file mode 100644 index 718df0a902..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-BijJLnMN.js +++ /dev/null @@ -1,3 +0,0 @@ -var ct=Object.defineProperty;var rt=(w,n,s)=>n in w?ct(w,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):w[n]=s;var he=(w,n,s)=>rt(w,typeof n!="symbol"?n+"":n,s);import{d as Ce,u as Ie,c as _e,o as Se,a as g,b as p,n as te,x as l,e,f as q,t as i,g as b,i as Y,F as ge,l as ve,h as ie,w as de,j as fe,z as at,r as D,y as ne,A as De,s as ue,T as xe,k as Re,B as $e,q as Ue,C as Ne,D as ut,E as dt,p as lt,G as pt}from"./index-SarmArA2.js";import{I as P}from"./iconify-B5kZhuXP.js";import{s as m,P as Ae,u as it}from"./sidebar-EjrN4Sj7.js";import{_ as ye}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{L as ht}from"./llm-check-D2idVWhZ.js";import{L as gt}from"./index-BPwnW1su.js";import{u as mt,a as vt}from"./useMessage-BDFqrfR1.js";const ft={class:"sidebar-content"},bt={class:"sidebar-content-header"},kt={class:"sidebar-content-title"},_t={class:"tab-switcher"},$t=["disabled"],Pt={key:0,class:"tab-content"},Ct={class:"new-task-section"},St={class:"sidebar-content-list"},yt={key:0,class:"loading-state"},Et={key:1,class:"error-state"},wt={key:2,class:"empty-state"},Tt=["onClick"],It={class:"task-icon"},Dt={class:"task-details"},xt={class:"task-title"},Rt={class:"task-preview"},At={class:"task-time"},Mt={class:"task-actions"},Nt=["title","onClick"],Ut={key:1,class:"tab-content config-tab"},Lt={key:0,class:"config-container"},Vt={class:"template-info-header"},qt={class:"template-info"},Ft={class:"template-id"},Ot={class:"config-section"},Bt={class:"section-header"},Wt={class:"generator-content"},jt=["placeholder"],Ht={class:"generator-actions"},zt=["disabled"],Jt=["disabled"],Gt={class:"config-section"},Xt={class:"section-header"},Kt={class:"section-actions"},Qt=["disabled","title"],Yt=["disabled","title"],Zt=["disabled"],en=["placeholder"],tn={class:"config-section"},nn={class:"section-header"},sn={class:"execution-content"},on={class:"params-input-group"},an={class:"params-help-text"},ln={class:"params-input-container"},cn=["placeholder"],rn=["title"],un={class:"api-url-display"},dn={class:"api-url-label"},pn={class:"api-url"},hn={class:"api-url-display"},gn={class:"api-url-label"},mn=["disabled"],vn=Ce({__name:"index",emits:["planExecutionRequested"],setup(w,{expose:n,emit:s}){const{t:u}=Ie(),T=["currentPlanId","userRequest","rootPlanId"],f=_e({get(){try{if(!m.jsonContent)return"";const h={...JSON.parse(m.jsonContent)};return T.forEach(y=>{delete h[y]}),JSON.stringify(h,null,2)}catch{return m.jsonContent}},set(o){try{if(!o.trim()){m.jsonContent="";return}const h=JSON.parse(o);let y={};try{y=JSON.parse(m.jsonContent||"{}")}catch{}const K={...h};T.forEach(U=>{y[U]!==void 0&&(K[U]=y[U])}),m.jsonContent=JSON.stringify(K)}catch{m.jsonContent=o}}}),_=s,x=async()=>{try{const o=await m.saveTemplate();o!=null&&o.duplicate?alert(u("sidebar.saveCompleted",{message:o.message,versionCount:o.versionCount})):o!=null&&o.saved?alert(u("sidebar.saveSuccess",{message:o.message,versionCount:o.versionCount})):o!=null&&o.message&&alert(u("sidebar.saveStatus",{message:o.message}))}catch(o){console.error("Failed to save plan modifications:",o),alert(o.message||u("sidebar.saveFailed"))}},F=async()=>{var o;try{await m.generatePlan(),alert(u("sidebar.generateSuccess",{templateId:((o=m.selectedTemplate)==null?void 0:o.id)??u("sidebar.unknown")}))}catch(h){console.error("Failed to generate plan:",h),alert(u("sidebar.generateFailed")+": "+h.message)}},$=async()=>{try{await m.updatePlan(),alert(u("sidebar.updateSuccess"))}catch(o){console.error("Failed to update plan:",o),alert(u("sidebar.updateFailed")+": "+o.message)}},B=async()=>{console.log("[Sidebar] handleExecutePlan called");try{const o=m.preparePlanExecution();if(!o){console.log("[Sidebar] No plan data available, returning");return}console.log("[Sidebar] Triggering plan execution request:",o),console.log("[Sidebar] Emitting planExecutionRequested event"),_("planExecutionRequested",o),console.log("[Sidebar] Event emitted")}catch(o){console.error("Error executing plan:",o),alert(u("sidebar.executeFailed")+": "+o.message)}finally{m.finishPlanExecution()}},X=o=>{if(isNaN(o.getTime()))return console.warn("Invalid date received:",o),u("time.unknown");const y=new Date().getTime()-o.getTime(),K=Math.floor(y/6e4),U=Math.floor(y/36e5),V=Math.floor(y/864e5);return K<1?u("time.now"):K<60?u("time.minuteAgo",{count:K}):U<24?u("time.hourAgo",{count:U}):V<30?u("time.dayAgo",{count:V}):o.toLocaleDateString("zh-CN")},G=(o,h)=>!o||o.length<=h?o:o.substring(0,h)+"...";return Se(()=>{m.loadPlanTemplateList()}),n({loadPlanTemplateList:m.loadPlanTemplateList,toggleSidebar:m.toggleSidebar,currentPlanTemplateId:m.currentPlanTemplateId}),(o,h)=>(p(),g("div",{class:te(["sidebar-wrapper",{"sidebar-wrapper-collapsed":l(m).isCollapsed}])},[e("div",ft,[e("div",bt,[e("div",kt,i(o.$t("sidebar.title")),1)]),e("div",_t,[e("button",{class:te(["tab-button",{active:l(m).currentTab==="list"}]),onClick:h[0]||(h[0]=y=>l(m).switchToTab("list"))},[b(l(P),{icon:"carbon:list",width:"16"}),Y(" "+i(o.$t("sidebar.templateList")),1)],2),e("button",{class:te(["tab-button",{active:l(m).currentTab==="config"}]),onClick:h[1]||(h[1]=y=>l(m).switchToTab("config")),disabled:!l(m).selectedTemplate},[b(l(P),{icon:"carbon:settings",width:"16"}),Y(" "+i(o.$t("sidebar.configuration")),1)],10,$t)]),l(m).currentTab==="list"?(p(),g("div",Pt,[e("div",Ct,[e("button",{class:"new-task-btn",onClick:h[2]||(h[2]=y=>l(m).createNewTemplate())},[b(l(P),{icon:"carbon:add",width:"16"}),Y(" "+i(o.$t("sidebar.newPlan"))+" ",1),h[11]||(h[11]=e("span",{class:"shortcut"},"⌘ K",-1))])]),e("div",St,[l(m).isLoading?(p(),g("div",yt,[b(l(P),{icon:"carbon:circle-dash",width:"20",class:"spinning"}),e("span",null,i(o.$t("sidebar.loading")),1)])):l(m).errorMessage?(p(),g("div",Et,[b(l(P),{icon:"carbon:warning",width:"20"}),e("span",null,i(l(m).errorMessage),1),e("button",{onClick:h[3]||(h[3]=(...y)=>l(m).loadPlanTemplateList&&l(m).loadPlanTemplateList(...y)),class:"retry-btn"},i(o.$t("sidebar.retry")),1)])):l(m).planTemplateList.length===0?(p(),g("div",wt,[b(l(P),{icon:"carbon:document",width:"32"}),e("span",null,i(o.$t("sidebar.noTemplates")),1)])):(p(!0),g(ge,{key:3},ve(l(m).sortedTemplates,y=>(p(),g("div",{key:y.id,class:te(["sidebar-content-list-item",{"sidebar-content-list-item-active":y.id===l(m).currentPlanTemplateId}]),onClick:K=>l(m).selectTemplate(y)},[e("div",It,[b(l(P),{icon:"carbon:document",width:"20"})]),e("div",Dt,[e("div",xt,i(y.title||o.$t("sidebar.unnamedPlan")),1),e("div",Rt,i(G(y.description||o.$t("sidebar.noDescription"),40)),1)]),e("div",At,i(X(l(m).parseDateTime(y.updateTime||y.createTime))),1),e("div",Mt,[e("button",{class:"delete-task-btn",title:o.$t("sidebar.deleteTemplate"),onClick:ie(K=>l(m).deleteTemplate(y),["stop"])},[b(l(P),{icon:"carbon:close",width:"16"})],8,Nt)])],10,Tt))),128))])])):l(m).currentTab==="config"?(p(),g("div",Ut,[l(m).selectedTemplate?(p(),g("div",Lt,[e("div",Vt,[e("div",qt,[e("h3",null,i(l(m).selectedTemplate.title||o.$t("sidebar.unnamedPlan")),1),e("span",Ft,"ID: "+i(l(m).selectedTemplate.id),1)]),e("button",{class:"back-to-list-btn",onClick:h[4]||(h[4]=y=>l(m).switchToTab("list"))},[b(l(P),{icon:"carbon:arrow-left",width:"16"})])]),e("div",Ot,[e("div",Bt,[b(l(P),{icon:"carbon:generate",width:"16"}),e("span",null,i(o.$t("sidebar.planGenerator")),1)]),e("div",Wt,[de(e("textarea",{"onUpdate:modelValue":h[5]||(h[5]=y=>l(m).generatorPrompt=y),class:"prompt-input",placeholder:o.$t("sidebar.generatorPlaceholder"),rows:"3"},null,8,jt),[[fe,l(m).generatorPrompt]]),e("div",Ht,[e("button",{class:"btn btn-primary btn-sm",onClick:F,disabled:l(m).isGenerating||!l(m).generatorPrompt.trim()},[b(l(P),{icon:l(m).isGenerating?"carbon:circle-dash":"carbon:generate",width:"14",class:te({spinning:l(m).isGenerating})},null,8,["icon","class"]),Y(" "+i(l(m).isGenerating?o.$t("sidebar.generating"):o.$t("sidebar.generatePlan")),1)],8,zt),e("button",{class:"btn btn-secondary btn-sm",onClick:$,disabled:l(m).isGenerating||!l(m).generatorPrompt.trim()||!l(m).jsonContent.trim()},[b(l(P),{icon:"carbon:edit",width:"14"}),Y(" "+i(o.$t("sidebar.updatePlan")),1)],8,Jt)])])]),e("div",Gt,[e("div",Xt,[b(l(P),{icon:"carbon:code",width:"16"}),e("span",null,i(o.$t("sidebar.jsonTemplate")),1),e("div",Kt,[e("button",{class:"btn btn-sm",onClick:h[6]||(h[6]=(...y)=>l(m).rollbackVersion&&l(m).rollbackVersion(...y)),disabled:!l(m).canRollback,title:o.$t("sidebar.rollback")},[b(l(P),{icon:"carbon:undo",width:"14"})],8,Qt),e("button",{class:"btn btn-sm",onClick:h[7]||(h[7]=(...y)=>l(m).restoreVersion&&l(m).restoreVersion(...y)),disabled:!l(m).canRestore,title:o.$t("sidebar.restore")},[b(l(P),{icon:"carbon:redo",width:"14"})],8,Yt),e("button",{class:"btn btn-primary btn-sm",onClick:x,disabled:l(m).isGenerating||l(m).isExecuting},[b(l(P),{icon:"carbon:save",width:"14"})],8,Zt)])]),de(e("textarea",{"onUpdate:modelValue":h[8]||(h[8]=y=>f.value=y),class:"json-editor",placeholder:o.$t("sidebar.jsonPlaceholder"),rows:"12"},null,8,en),[[fe,f.value]])]),e("div",tn,[e("div",nn,[b(l(P),{icon:"carbon:play",width:"16"}),e("span",null,i(o.$t("sidebar.executionController")),1)]),e("div",sn,[e("div",on,[e("label",null,i(o.$t("sidebar.executionParams")),1),e("div",an,i(o.$t("sidebar.executionParamsHelp")),1),e("div",ln,[de(e("input",{"onUpdate:modelValue":h[9]||(h[9]=y=>l(m).executionParams=y),class:"params-input",placeholder:o.$t("sidebar.executionParamsPlaceholder")},null,8,cn),[[fe,l(m).executionParams]]),e("button",{class:"clear-params-btn",onClick:h[10]||(h[10]=(...y)=>l(m).clearExecutionParams&&l(m).clearExecutionParams(...y)),title:o.$t("sidebar.clearParams")},[b(l(P),{icon:"carbon:close",width:"12"})],8,rn)])]),e("div",un,[e("span",dn,i(o.$t("sidebar.apiUrl"))+":",1),e("code",pn,i(l(m).computedApiUrl),1)]),e("div",hn,[e("span",gn,i(o.$t("sidebar.statusApiUrl"))+":",1),h[12]||(h[12]=e("code",{class:"api-url"},"/api/executor/details/{planId}",-1))]),e("button",{class:"btn btn-primary execute-btn",onClick:B,disabled:l(m).isExecuting||l(m).isGenerating},[b(l(P),{icon:l(m).isExecuting?"carbon:circle-dash":"carbon:play",width:"16",class:te({spinning:l(m).isExecuting})},null,8,["icon","class"]),Y(" "+i(l(m).isExecuting?o.$t("sidebar.executing"):o.$t("sidebar.executePlan")),1)],8,mn)])])])):q("",!0)])):q("",!0)])],2))}}),fn=ye(vn,[["__scopeId","data-v-a66d585a"]]);class Ve{static async sendMessage(n){return ht.withLlmCheck(async()=>{const s=await fetch(`${this.BASE_URL}/execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:n})});if(!s.ok)throw new Error(`API request failed: ${s.status}`);return await s.json()})}}he(Ve,"BASE_URL","/api/executor");class qe{static async getDetails(n){try{const s=await fetch(`${this.BASE_URL}/details/${n}`);if(s.status===404)return null;if(!s.ok){const f=await s.text();throw new Error(`Failed to get detailed information: ${s.status} - ${f}`)}const u=await s.text(),T=JSON.parse(u);return T&&typeof T=="object"&&!T.currentPlanId&&(T.currentPlanId=n),T}catch(s){return console.error("[CommonApiService] Failed to get plan details:",s),{currentPlanId:n,status:"failed",message:s instanceof Error?s.message:"Failed to save, please retry"}}}static async submitFormInput(n,s){const u=await fetch(`${this.BASE_URL}/submit-input/${n}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!u.ok){let f;try{f=await u.json()}catch{f={message:`Failed to submit form input: ${u.status}`}}throw new Error(f.message||`Failed to submit form input: ${u.status}`)}const T=u.headers.get("content-type");return T&&T.indexOf("application/json")!==-1?await u.json():{success:!0}}static async getAllPrompts(){try{const n=await fetch(this.BASE_URL);return await(await this.handleResponse(n)).json()}catch(n){throw console.error("Failed to get Prompt list:",n),n}}static async handleResponse(n){if(!n.ok)try{const s=await n.json();throw new Error(s.message||`API request failed: ${n.status}`)}catch{throw new Error(`API request failed: ${n.status} ${n.statusText}`)}return n}}he(qe,"BASE_URL","/api/executor");const Pe=class Pe{constructor(){he(this,"POLL_INTERVAL",5e3);he(this,"state",at({activePlanId:null,lastSequenceSize:0,isPolling:!1,pollTimer:null}));he(this,"callbacks",{});he(this,"planExecutionCache",new Map);he(this,"uiStateCache",new Map);console.log("[PlanExecutionManager] Initialized with callback-based event system")}getCachedPlanRecord(n){return this.planExecutionCache.get(n)}getCachedUIState(n){return this.uiStateCache.get(n)}setCachedUIState(n,s){this.uiStateCache.set(n,s),console.log(`[PlanExecutionManager] Cached UI state for rootPlanId: ${n}`)}getAllCachedRecords(){return new Map(this.planExecutionCache)}hasCachedPlanRecord(n){return this.planExecutionCache.has(n)}setCachedPlanRecord(n,s){this.planExecutionCache.set(n,s),console.log(`[PlanExecutionManager] Cached plan execution record for rootPlanId: ${n}`)}clearCachedPlanRecord(n){const s=this.planExecutionCache.delete(n);return s&&console.log(`[PlanExecutionManager] Cleared cached plan execution record for rootPlanId: ${n}`),s}clearAllCachedRecords(){const n=this.planExecutionCache.size,s=this.uiStateCache.size;this.planExecutionCache.clear(),this.uiStateCache.clear(),console.log(`[PlanExecutionManager] Cleared all caches - Plans: ${n}, UI States: ${s}`)}static getInstance(){return Pe.instance||(Pe.instance=new Pe),Pe.instance}getActivePlanId(){return this.state.activePlanId}getState(){return this.state}setEventCallbacks(n){this.callbacks={...this.callbacks,...n},console.log("[PlanExecutionManager] Event callbacks set:",Object.keys(n))}async handleUserMessageSendRequested(n){if(this.validateAndPrepareUIForNewRequest(n))try{if(await this.sendUserMessageAndSetPlanId(n),this.state.activePlanId)this.initiatePlanExecutionSequence(n,this.state.activePlanId);else throw new Error("Failed to get valid plan ID")}catch(s){console.error("[PlanExecutionManager] Failed to send user message:",s);const u=this.state.activePlanId??"error";this.setCachedUIState(u,{enabled:!0}),this.emitChatInputUpdateState(u),this.state.activePlanId=null}}handlePlanExecutionRequested(n,s){console.log("[PlanExecutionManager] Received plan execution request:",{planId:n,query:s}),n?(this.state.activePlanId=n,this.initiatePlanExecutionSequence(s??"执行计划",n)):console.error("[PlanExecutionManager] Invalid plan execution request: missing planId")}handleCachedPlanExecution(n,s){const u=this.getCachedPlanRecord(n);return u!=null&&u.currentPlanId?(console.log(`[PlanExecutionManager] Found cached plan execution record for rootPlanId: ${n}`),this.handlePlanExecutionRequested(u.currentPlanId,s),!0):(console.log(`[PlanExecutionManager] No cached plan execution record found for rootPlanId: ${n}`),!1)}validateAndPrepareUIForNewRequest(n){if(!n)return console.warn("[PlanExecutionManager] Query is empty"),!1;if(this.state.activePlanId)return!1;this.emitChatInputClear();const s=this.state.activePlanId??"ui-state";return this.setCachedUIState(s,{enabled:!1,placeholder:"Processing..."}),this.emitChatInputUpdateState(s),!0}async sendUserMessageAndSetPlanId(n){try{const s=await Ve.sendMessage(n);if(s!=null&&s.planId)return this.state.activePlanId=s.planId,s;if(s!=null&&s.planTemplateId)return this.state.activePlanId=s.planTemplateId,{...s,planId:s.planTemplateId};throw console.error("[PlanExecutionManager] Failed to get planId from response:",s),new Error("Failed to get valid planId from API response")}catch(s){throw console.error("[PlanExecutionManager] API call failed:",s),s}}initiatePlanExecutionSequence(n,s){console.log(`[PlanExecutionManager] Starting plan execution sequence for query: "${n}", planId: ${s}`);const u=s;this.emitDialogRoundStart(u),this.startPolling()}handlePlanCompletion(n){this.emitPlanCompleted(n.rootPlanId??""),this.state.lastSequenceSize=0,this.stopPolling();try{setTimeout(async()=>{if(this.state.activePlanId)try{await Ae.deletePlanTemplate(this.state.activePlanId),console.log(`[PlanExecutionManager] Plan template ${this.state.activePlanId} deleted successfully`)}catch(s){console.log(`Delete plan execution record failed: ${s.message}`)}},5e3)}catch(s){console.log(`Delete plan execution record failed: ${s.message}`)}n.completed&&(this.state.activePlanId=null,this.emitChatInputUpdateState(n.rootPlanId??""))}handlePlanError(n){this.emitPlanError(n.message??""),this.state.lastSequenceSize=0,this.stopPolling();try{setTimeout(async()=>{if(this.state.activePlanId)try{await Ae.deletePlanTemplate(this.state.activePlanId),console.log(`[PlanExecutionManager] Plan template ${this.state.activePlanId} deleted successfully`)}catch(s){console.log(`Delete plan execution record failed: ${s.message}`)}},5e3)}catch(s){console.log(`Delete plan execution record failed: ${s.message}`)}}async pollPlanStatus(){if(this.state.activePlanId){if(this.state.isPolling){console.log("[PlanExecutionManager] Previous polling still in progress, skipping");return}try{this.state.isPolling=!0;const n=await this.getPlanDetails(this.state.activePlanId);if(!n){console.warn("[PlanExecutionManager] No details received from API");return}if(n.status&&n.status==="failed"){this.handlePlanError(n);return}if(n.rootPlanId&&this.setCachedPlanRecord(n.rootPlanId,n),!n.steps||n.steps.length===0){console.log("[PlanExecutionManager] Simple response without steps detected, handling as completed"),this.emitPlanUpdate(n.rootPlanId??""),this.handlePlanCompletion(n);return}this.emitPlanUpdate(n.rootPlanId??""),n.completed&&this.handlePlanCompletion(n)}catch(n){console.error("[PlanExecutionManager] Failed to poll plan status:",n)}finally{this.state.isPolling=!1}}}async getPlanDetails(n){try{const s=await qe.getDetails(n);return s!=null&&s.rootPlanId&&(this.planExecutionCache.set(s.rootPlanId,s),console.log(`[PlanExecutionManager] Cached plan execution record for rootPlanId: ${s.rootPlanId}`)),s}catch(s){return console.error("[PlanExecutionManager] Failed to get plan details:",s),{currentPlanId:n,status:"failed",message:s instanceof Error?s.message:"Failed to get plan"}}}startPolling(){this.state.pollTimer&&clearInterval(this.state.pollTimer),this.state.pollTimer=window.setInterval(()=>{this.pollPlanStatus()},this.POLL_INTERVAL),console.log("[PlanExecutionManager] Started polling")}async pollPlanStatusImmediately(){console.log("[PlanExecutionManager] Polling plan status immediately"),await this.pollPlanStatus()}stopPolling(){this.state.pollTimer&&(clearInterval(this.state.pollTimer),this.state.pollTimer=null),console.log("[PlanExecutionManager] Stopped polling")}cleanup(){this.stopPolling(),this.state.activePlanId=null,this.state.lastSequenceSize=0,this.state.isPolling=!1,this.clearAllCachedRecords()}emitChatInputClear(){this.callbacks.onChatInputClear&&this.callbacks.onChatInputClear()}emitChatInputUpdateState(n){this.callbacks.onChatInputUpdateState&&this.callbacks.onChatInputUpdateState(n)}emitDialogRoundStart(n){this.callbacks.onDialogRoundStart&&this.callbacks.onDialogRoundStart(n)}emitPlanUpdate(n){this.callbacks.onPlanUpdate&&this.callbacks.onPlanUpdate(n)}emitPlanCompleted(n){this.callbacks.onPlanCompleted&&this.callbacks.onPlanCompleted(n)}emitPlanError(n){this.callbacks.onPlanError&&this.callbacks.onPlanError(n)}};he(Pe,"instance",null);let Le=Pe;const oe=Le.getInstance(),bn={class:"right-panel"},kn={class:"preview-header"},_n={class:"preview-tabs"},$n={class:"tab-button active"},Pn={class:"preview-content"},Cn={class:"step-details"},Sn={key:0,class:"step-info-fixed"},yn={key:0,class:"agent-info"},En={class:"info-item"},wn={class:"label"},Tn={class:"value"},In={class:"info-item"},Dn={class:"label"},xn={class:"value"},Rn={class:"info-item"},An={class:"label"},Mn={class:"value"},Nn={class:"info-item"},Un={class:"label"},Ln={class:"value"},Vn={class:"info-item"},qn={class:"label"},Fn={class:"execution-status"},On={class:"status-item"},Bn={class:"status-text"},Wn={key:0},jn={key:0,class:"think-act-steps"},Hn={class:"steps-container"},zn={class:"step-header"},Jn={class:"step-number"},Gn={class:"think-section"},Xn={class:"think-content"},Kn={class:"input"},Qn={class:"label"},Yn={class:"output"},Zn={class:"label"},es={key:0,class:"action-section"},ts={class:"action-content"},ns={class:"tool-info"},ss={class:"label"},os={class:"value"},as={class:"input"},ls={class:"label"},is={class:"output"},cs={class:"label"},rs={key:0,class:"sub-plan-section"},us={class:"sub-plan-content"},ds={class:"sub-plan-header"},ps={class:"sub-plan-info"},hs={class:"value"},gs={key:0,class:"sub-plan-info"},ms={class:"value"},vs={class:"sub-plan-status"},fs={class:"status-text"},bs={key:0,class:"no-steps-message"},ks={key:1,class:"no-execution-message"},_s={class:"step-basic-info"},$s={class:"info-item"},Ps={class:"label"},Cs={class:"value"},Ss={key:0,class:"info-item"},ys={class:"value"},Es={class:"info-item"},ws={class:"no-execution-hint"},Ts={key:2,class:"execution-indicator"},Is={class:"execution-text"},Ds={key:1,class:"no-selection"},xs=["title"],Rs=Ce({__name:"index",setup(w,{expose:n}){const{t:s}=Ie(),u=D(),T=D(),f=D(),_=D(null),x=D(!1),F=D(!0),$=D(!0),B=_e(()=>f.value?f.value.completed?s("rightPanel.status.completed"):f.value.current?s("rightPanel.status.executing"):s("rightPanel.status.waiting"):""),X=C=>{var L;if(console.log(`[RightPanel] updateDisplayedPlanProgress called with rootPlanId: ${C}`),f.value&&_.value){const R=_.value.rootPlanId??T.value;if(R&&R!==C){console.log(`[RightPanel] Plan ID mismatch - skipping update. Current: ${R}, Requested: ${C}`);return}}console.log(`[RightPanel] Plan ID validation passed - proceeding with update for rootPlanId: ${C}`);const S=oe.getCachedPlanRecord(C);if(!S){console.warn(`[RightPanel] Plan data not found for rootPlanId: ${C}`);return}if(S.steps&&S.steps.length>0){const R=S.steps.length,E=(S.currentStepIndex??0)+1;console.log(`[RightPanel] Progress: ${E} / ${R}`)}if(f.value&&T.value&&(T.value===C||((L=_.value)==null?void 0:L.rootPlanId)===C)&&(console.log(`[RightPanel] Refreshing selected step details for plan: ${C}`),_.value)){const E=_.value,A=o(E.planId,E.rootPlanId,E.subPlanId);A?(h(A,E.stepIndex,E.planId,E.isSubPlan),O()):console.warn("[RightPanel] Could not find plan record for refresh:",E)}},G=(C,S,L,R,E)=>{console.log("[RightPanel] Step selected:",{planId:C,stepIndex:S,rootPlanId:L,subPlanId:R,subStepIndex:E});const A=!!(L&&R&&E!==void 0);_.value={planId:C,stepIndex:S,isSubPlan:A,...A&&{rootPlanId:L,subPlanId:R,subStepIndex:E}};const ee=o(C,L,R);if(!ee){console.warn("[RightPanel] Plan data not found:",{planId:C,rootPlanId:L,subPlanId:R}),f.value=null,_.value=null;return}h(ee,S,C,A)},o=(C,S,L)=>{var A;if(!S||!L)return oe.getCachedPlanRecord(C)??null;const R=oe.getCachedPlanRecord(C);if(R)return R;const E=oe.getCachedPlanRecord(S);if(!(E!=null&&E.agentExecutionSequence))return null;for(const ee of E.agentExecutionSequence)if(ee.thinkActSteps){for(const se of ee.thinkActSteps)if(((A=se.subPlanExecutionRecord)==null?void 0:A.currentPlanId)===L)return se.subPlanExecutionRecord}return null},h=(C,S,L,R)=>{var ke,re,v,c,k;if(!C.steps||S>=C.steps.length){f.value=null,_.value=null,console.warn("[RightPanel] Invalid step data:",{planId:L,stepIndex:S,hasSteps:!!C.steps,stepsLength:(ke=C.steps)==null?void 0:ke.length,message:"Invalid step index"});return}T.value=L;const E=C.steps[S],A=(re=C.agentExecutionSequence)==null?void 0:re[S];console.log("[RightPanel] Step data details:",{planId:L,stepIndex:S,step:E,hasAgentExecutionSequence:!!C.agentExecutionSequence,agentExecutionSequenceLength:(v=C.agentExecutionSequence)==null?void 0:v.length,agentExecution:A,hasThinkActSteps:!!(A!=null&&A.thinkActSteps),thinkActStepsLength:(c=A==null?void 0:A.thinkActSteps)==null?void 0:c.length,isSubPlan:R});const ee=(A==null?void 0:A.status)==="FINISHED",se=!ee&&S===C.currentStepIndex&&!C.completed,me={planId:L,index:S,title:typeof E=="string"?E:E.title||E.description||E.name||`${R?"子":""}步骤 ${S+1}`,description:typeof E=="string"?E:E.description||E,completed:ee,current:se};A&&(me.agentExecution=A),f.value=me,console.log("[RightPanel] Step details updated:",{planId:L,stepIndex:S,stepTitle:f.value.title,hasAgentExecution:!!A,hasThinkActSteps:(((k=A==null?void 0:A.thinkActSteps)==null?void 0:k.length)??0)>0,completed:ee,current:se,planCurrentStep:C.currentStepIndex,planCompleted:C.completed,isSubPlan:R}),A!=null&&A.thinkActSteps&&A.thinkActSteps.forEach((I,a)=>{I.subPlanExecutionRecord&&console.log(`[RightPanel] Found sub-plan in thinkActStep ${a}:`,I.subPlanExecutionRecord)}),setTimeout(()=>{U()},100),O()},y=(C,S,L,R)=>{console.log("[RightPanel] Sub plan step selected (delegating to unified handler):",{rootPlanId:C,subPlanId:S,stepIndex:L,subStepIndex:R}),G(S,R,C,S,R)},K=C=>{u.value=C??void 0},U=()=>{if(!u.value)return;const{scrollTop:C,scrollHeight:S,clientHeight:L}=u.value,R=S-C-L<50,E=S>L;F.value=R,x.value=E&&!R,R?$.value=!0:S-C-L>100&&($.value=!1),console.log("[RightPanel] Scroll state check:",{scrollTop:C,scrollHeight:S,clientHeight:L,isAtBottom:R,hasScrollableContent:E,showButton:x.value,shouldAutoScroll:$.value})},V=()=>{u.value&&(u.value.scrollTo({top:u.value.scrollHeight,behavior:"smooth"}),ne(()=>{$.value=!0,U()}))},O=()=>{!$.value||!u.value||ne(()=>{u.value&&(u.value.scrollTop=u.value.scrollHeight,console.log("[RightPanel] Auto scroll to bottom"))})},Q=C=>{if(C===null||typeof C>"u"||C==="")return"N/A";try{const S=typeof C=="object"?C:JSON.parse(C);return JSON.stringify(S,null,2)}catch{return String(C)}},ce=()=>{f.value=null,T.value=void 0,$.value=!0,u.value&&u.value.removeEventListener("scroll",U)},be=()=>{const C=()=>{const S=u.value;return S?(K(S),S.addEventListener("scroll",U),$.value=!0,U(),console.log("[RightPanel] Scroll listener initialized successfully"),!0):(console.log("[RightPanel] Scroll container not found, retrying..."),!1)};ne(()=>{C()||setTimeout(()=>{C()},100)})};return Se(()=>{console.log("[RightPanel] Component mounted"),ne(()=>{be()})}),De(()=>{console.log("[RightPanel] Component unmounting, cleaning up..."),_.value=null,ce()}),n({updateDisplayedPlanProgress:X,handleStepSelected:G,handleSubPlanStepSelected:y}),(C,S)=>{var L,R;return p(),g("div",bn,[e("div",kn,[e("div",_n,[e("button",$n,[b(l(P),{icon:"carbon:events"}),Y(" "+i(l(s)("rightPanel.stepExecutionDetails")),1)])])]),e("div",Pn,[e("div",Cn,[f.value?(p(),g("div",Sn,[e("h3",null,i(f.value.title||f.value.description||l(s)("rightPanel.defaultStepTitle",{number:f.value.index+1})),1),f.value.agentExecution?(p(),g("div",yn,[e("div",En,[e("span",wn,i(l(s)("rightPanel.executingAgent"))+":",1),e("span",Tn,i(f.value.agentExecution.agentName),1)]),e("div",In,[e("span",Dn,i(l(s)("rightPanel.description"))+":",1),e("span",xn,i(f.value.agentExecution.agentDescription||""),1)]),e("div",Rn,[e("span",An,i(l(s)("rightPanel.callingModel"))+":",1),e("span",Mn,i(f.value.agentExecution.modelName),1)]),e("div",Nn,[e("span",Un,i(l(s)("rightPanel.request"))+":",1),e("span",Ln,i(f.value.agentExecution.agentRequest||""),1)]),e("div",Vn,[e("span",qn,i(l(s)("rightPanel.executionResult"))+":",1),e("span",{class:te(["value",{success:f.value.agentExecution.status==="FINISHED"}])},i(f.value.agentExecution.status||l(s)("rightPanel.executing")),3)])])):q("",!0),e("div",Fn,[e("div",On,[f.value.completed?(p(),ue(l(P),{key:0,icon:"carbon:checkmark-filled",class:"status-icon success"})):f.value.current?(p(),ue(l(P),{key:1,icon:"carbon:in-progress",class:"status-icon progress"})):(p(),ue(l(P),{key:2,icon:"carbon:time",class:"status-icon pending"})),e("span",Bn,i(B.value),1)])])])):q("",!0),e("div",{ref_key:"scrollContainer",ref:u,class:"step-details-scroll-container",onScroll:U},[f.value?(p(),g("div",Wn,[(L=f.value.agentExecution)!=null&&L.thinkActSteps&&f.value.agentExecution.thinkActSteps.length>0?(p(),g("div",jn,[e("h4",null,i(l(s)("rightPanel.thinkAndActionSteps")),1),e("div",Hn,[(p(!0),g(ge,null,ve(f.value.agentExecution.thinkActSteps,(E,A)=>(p(),g("div",{key:A,class:"think-act-step"},[e("div",zn,[e("span",Jn,"#"+i(A+1),1),e("span",{class:te(["step-status",E.status])},i(E.status||l(s)("rightPanel.executing")),3)]),e("div",Gn,[e("h5",null,[b(l(P),{icon:"carbon:thinking"}),Y(" "+i(l(s)("rightPanel.thinking")),1)]),e("div",Xn,[e("div",Kn,[e("span",Qn,i(l(s)("rightPanel.input"))+":",1),e("pre",null,i(Q(E.thinkInput)),1)]),e("div",Yn,[e("span",Zn,i(l(s)("rightPanel.output"))+":",1),e("pre",null,i(Q(E.thinkOutput)),1)])])]),E.actionNeeded?(p(),g("div",es,[e("h5",null,[b(l(P),{icon:"carbon:play"}),Y(" "+i(l(s)("rightPanel.action")),1)]),e("div",ts,[(p(!0),g(ge,null,ve(E.actToolInfoList,(ee,se)=>(p(),g("div",{key:se},[e("div",ns,[e("span",ss,i(l(s)("rightPanel.tool"))+":",1),e("span",os,i(ee.name||""),1)]),e("div",as,[e("span",ls,i(l(s)("rightPanel.toolParameters"))+":",1),e("pre",null,i(Q(ee.parameters)),1)]),e("div",is,[e("span",cs,i(l(s)("rightPanel.executionResult"))+":",1),e("pre",null,i(Q(ee.result)),1)])]))),128))]),E.subPlanExecutionRecord?(p(),g("div",rs,[e("h5",null,[b(l(P),{icon:"carbon:tree-view"}),Y(" "+i(l(s)("rightPanel.subPlan")),1)]),e("div",us,[e("div",ds,[e("div",ps,[S[0]||(S[0]=e("span",{class:"label"},"子计划ID:",-1)),e("span",hs,i(E.subPlanExecutionRecord.currentPlanId),1)]),E.subPlanExecutionRecord.title?(p(),g("div",gs,[S[1]||(S[1]=e("span",{class:"label"},"标题:",-1)),e("span",ms,i(E.subPlanExecutionRecord.title),1)])):q("",!0),e("div",vs,[E.subPlanExecutionRecord.completed?(p(),ue(l(P),{key:0,icon:"carbon:checkmark-filled",class:"status-icon success"})):(p(),ue(l(P),{key:1,icon:"carbon:in-progress",class:"status-icon progress"})),e("span",fs,i(E.subPlanExecutionRecord.completed?"已完成":"执行中"),1)])])])])):q("",!0)])):q("",!0)]))),128))]),f.value.agentExecution&&!((R=f.value.agentExecution.thinkActSteps)!=null&&R.length)?(p(),g("div",bs,[e("p",null,i(l(s)("rightPanel.noStepDetails")),1)])):f.value.agentExecution?q("",!0):(p(),g("div",ks,[b(l(P),{icon:"carbon:information",class:"info-icon"}),e("h4",null,i(l(s)("rightPanel.stepInfo")),1),e("div",_s,[e("div",$s,[e("span",Ps,i(l(s)("rightPanel.stepName"))+":",1),e("span",Cs,i(f.value.title||f.value.description||`步骤 ${f.value.index+1}`),1)]),f.value.description?(p(),g("div",Ss,[S[2]||(S[2]=e("span",{class:"label"},"描述:",-1)),e("span",ys,i(f.value.description),1)])):q("",!0),e("div",Es,[S[3]||(S[3]=e("span",{class:"label"},"状态:",-1)),e("span",{class:te(["value",{"status-completed":f.value.completed,"status-current":f.value.current,"status-pending":!f.value.completed&&!f.value.current}])},i(f.value.completed?"已完成":f.value.current?"执行中":"待执行"),3)])]),e("p",ws,i(l(s)("rightPanel.noExecutionInfo")),1)])),f.value.current&&!f.value.completed?(p(),g("div",Ts,[S[4]||(S[4]=e("div",{class:"execution-waves"},[e("div",{class:"wave wave-1"}),e("div",{class:"wave wave-2"}),e("div",{class:"wave wave-3"})],-1)),e("p",Is,[b(l(P),{icon:"carbon:in-progress",class:"rotating-icon"}),Y(" "+i(l(s)("rightPanel.stepExecuting")),1)])])):q("",!0)])):(p(),g("div",Ds,[b(l(P),{icon:"carbon:events",class:"empty-icon"}),e("h3",null,i(l(s)("rightPanel.noStepSelected")),1),e("p",null,i(l(s)("rightPanel.selectStepHint")),1)]))])):q("",!0),b(xe,{name:"scroll-button"},{default:Re(()=>[x.value?(p(),g("button",{key:0,onClick:V,class:"scroll-to-bottom-btn",title:l(s)("rightPanel.scrollToBottom")},[b(l(P),{icon:"carbon:chevron-down"})],8,xs)):q("",!0)]),_:1})],544)])])])}}}),As=ye(Rs,[["__scopeId","data-v-e90596ce"]]);function Ms(){const w=oe,n=_e(()=>w.getActivePlanId()),s=_e(()=>w.getState()),u=_e(()=>s.value.isPolling),T=_e(()=>!!n.value),f=($,B)=>{w.initiatePlanExecutionSequence($,B)},_=()=>{w.stopPolling()},x=()=>{w.startPolling()},F=()=>{w.cleanup()};return De(()=>{F()}),{activePlanId:n,state:s,isPolling:u,hasActivePlan:T,startExecution:f,stopPolling:_,startPolling:x,cleanup:F}}const Ns={class:"chat-container"},Us={class:"message-content"},Ls={key:0,class:"user-message"},Vs={key:1,class:"assistant-message"},qs={key:0,class:"thinking-section"},Fs={class:"thinking-header"},Os={class:"thinking-avatar"},Bs={class:"thinking-label"},Ws={class:"thinking-content"},js={key:0,class:"thinking"},Hs={key:1,class:"progress"},zs={class:"progress-bar"},Js={class:"progress-text"},Gs={key:2,class:"steps-container"},Xs={class:"steps-title"},Ks=["onClick"],Qs={class:"section-header"},Ys={class:"step-icon"},Zs={class:"step-title"},eo={key:0,class:"step-status current"},to={key:1,class:"step-status completed"},no={key:2,class:"step-status pending"},so={key:0,class:"action-info"},oo={class:"action-description"},ao={class:"action-icon"},lo={key:0,class:"tool-params"},io={class:"param-label"},co={class:"param-content"},ro={key:1,class:"think-details"},uo={class:"think-header"},po={class:"think-label"},ho={class:"think-output"},go={class:"think-content"},mo={key:1,class:"sub-plan-steps"},vo={class:"sub-plan-header"},fo={class:"sub-plan-step-list"},bo=["onClick"],ko={class:"sub-step-indicator"},_o={class:"sub-step-icon"},$o={class:"sub-step-number"},Po={class:"sub-step-content"},Co={class:"sub-step-title"},So={key:2,class:"user-input-form-container"},yo={class:"user-input-message"},Eo={key:0,class:"form-description"},wo=["onSubmit"],To=["for"],Io=["id","name","onUpdate:modelValue"],Do={key:1,class:"form-group"},xo={for:"form-input-genericInput"},Ro=["onUpdate:modelValue"],Ao={type:"submit",class:"submit-user-input-btn"},Mo={key:3,class:"default-processing"},No={class:"processing-indicator"},Uo={class:"response-section"},Lo={class:"response-header"},Vo={class:"response-avatar"},qo={class:"response-name"},Fo={class:"response-content"},Oo={key:0,class:"final-response"},Bo=["innerHTML"],Wo={key:1,class:"response-placeholder"},jo={class:"typing-indicator"},Ho={class:"typing-text"},zo={key:0,class:"message assistant"},Jo={class:"message-content"},Go={class:"assistant-message"},Xo={class:"thinking-section"},Ko={class:"thinking-header"},Qo={class:"thinking-avatar"},Yo={class:"thinking-label"},Zo={class:"thinking-content"},ea={class:"default-processing"},ta={class:"processing-indicator"},na={class:"response-section"},sa={class:"response-header"},oa={class:"response-avatar"},aa={class:"response-name"},la={class:"response-content"},ia={class:"response-placeholder"},ca={class:"typing-indicator"},ra={class:"typing-text"},ua=["title"],da=Ce({__name:"index",props:{mode:{default:"plan"},initialPrompt:{default:""}},emits:["step-selected","sub-plan-step-selected"],setup(w,{expose:n,emit:s}){const u=w,T=s,{t:f}=Ie(),_=Ms(),x=D(),F=D(!1),$=D([]),B=D(),X=D(!1),G=at({}),o=(a,t,r)=>{const d={id:Date.now().toString(),type:a,content:t,timestamp:new Date,...r};return a==="assistant"&&!d.thinking&&!d.content&&(d.thinking=f("chat.thinking")),$.value.push(d),d},h=a=>{const t=$.value[$.value.length-1];t.type==="assistant"&&Object.assign(t,a)},y=async a=>{try{F.value=!0;const t=o("assistant","",{thinking:"正在理解您的请求并准备回复..."}),r=await Ve.sendMessage(a);if(r.planId)console.log("[ChatComponent] Received planId from direct execution:",r.planId),t.planExecution||(t.planExecution={}),t.planExecution.currentPlanId=r.planId,oe.handlePlanExecutionRequested(r.planId,a),delete t.thinking,console.log("[ChatComponent] Started polling for plan execution updates");else{delete t.thinking;const d=K(r,a);t.content=d}}catch(t){console.error("Direct mode error:",t),h({content:U(t)})}finally{F.value=!1}},K=(a,t)=>a.result??a.message??a.content??"",U=a=>{const t=(a==null?void 0:a.message)??(a==null?void 0:a.toString())??"未知错误";return t.includes("网络")||t.includes("network")||t.includes("timeout")?"抱歉,似乎网络连接有些问题。请检查您的网络连接后再试一次,或者稍等几分钟再重新提问。":t.includes("认证")||t.includes("权限")||t.includes("auth")?"抱歉,访问权限出现了问题。这可能是系统配置的问题,请联系管理员或稍后再试。":t.includes("格式")||t.includes("参数")||t.includes("invalid")?"抱歉,您的请求格式可能有些问题。能否请您重新表述一下您的需求?我会尽力理解并帮助您。":`抱歉,处理您的请求时遇到了一些问题(${t})。请稍后再试,或者换个方式表达您的需求,我会尽力帮助您的。`},V=(a=!1)=>{ne(()=>{if(x.value){const t=x.value;(a||t.scrollHeight-t.scrollTop-t.clientHeight<150)&&t.scrollTo({top:t.scrollHeight,behavior:a?"auto":"smooth"})}})},O=()=>{V(!0),X.value=!1},Q=()=>{if(x.value){const a=x.value,t=a.scrollHeight-a.scrollTop-a.clientHeight<150;X.value=!t&&$.value.length>0}},ce=()=>{x.value&&x.value.addEventListener("scroll",Q)},be=()=>{x.value&&x.value.removeEventListener("scroll",Q)},C=a=>{o("user",a),u.mode==="plan"?console.log("[ChatComponent] Plan mode message sent, parent should handle:",a):y(a)},S=(a,t)=>{var W;const r=((W=a.planExecution)==null?void 0:W.agentExecutionSequence)??[];return t<0||t>=r.length?"IDLE":r[t].status??"IDLE"},L=(a,t)=>{var r,d;if(!((r=a.planExecution)!=null&&r.currentPlanId)){console.warn("[ChatComponent] Cannot handle step click: missing currentPlanId");return}console.log("[ChatComponent] Step clicked:",{planId:a.planExecution.currentPlanId,stepIndex:t,stepTitle:(d=a.planExecution.steps)==null?void 0:d[t]}),T("step-selected",a.planExecution.currentPlanId,t)},R=(a,t)=>{var r;try{const d=(r=a.planExecution)==null?void 0:r.agentExecutionSequence;if(!(d!=null&&d.length))return console.log("[ChatComponent] No agentExecutionSequence found"),[];const W=d[t];if(!W)return console.log(`[ChatComponent] No agentExecution found for step ${t}`),[];if(!W.thinkActSteps)return console.log(`[ChatComponent] No thinkActSteps found for step ${t}`),[];for(const N of W.thinkActSteps)if(N.subPlanExecutionRecord)return console.log(`[ChatComponent] Found sub-plan for step ${t}:`,N.subPlanExecutionRecord),(N.subPlanExecutionRecord.steps??[]).map(j=>typeof j=="string"?j:typeof j=="object"&&j!==null&&(j.title||j.description)||"子步骤");return[]}catch(d){return console.warn("[ChatComponent] Error getting sub-plan steps:",d),[]}},E=(a,t,r)=>{var d;try{const W=(d=a.planExecution)==null?void 0:d.agentExecutionSequence;if(!(W!=null&&W.length))return"pending";const N=W[t];if(!N||!N.thinkActSteps)return"pending";let Z=null;for(const H of N.thinkActSteps)if(H.subPlanExecutionRecord){Z=H.subPlanExecutionRecord;break}if(!Z)return"pending";const j=Z.currentStepIndex;return Z.completed?"completed":j==null?r===0?"current":"pending":r{var d,W;try{const N=(d=a.planExecution)==null?void 0:d.agentExecutionSequence;if(!(N!=null&&N.length)){console.warn("[ChatComponent] No agentExecutionSequence data for sub-plan step click");return}const Z=N[t];if(!Z){console.warn("[ChatComponent] No agentExecution found for step",t);return}if(!Z.thinkActSteps){console.warn("[ChatComponent] No thinkActSteps found for step",t);return}let j=null;for(const H of Z.thinkActSteps)if(H.subPlanExecutionRecord){j=H.subPlanExecutionRecord;break}if(!(j!=null&&j.currentPlanId)){console.warn("[ChatComponent] No sub-plan data for step click");return}T("sub-plan-step-selected",((W=a.planExecution)==null?void 0:W.currentPlanId)??"",j.currentPlanId,t,r)}catch(N){console.error("[ChatComponent] Error handling sub-plan step click:",N)}},ee=(a,t)=>{var d,W,N,Z;if(!((d=a.planExecution)!=null&&d.steps))return;console.log("[ChatComponent] Starting to update step actions, steps count:",a.planExecution.steps.length,"execution sequence:",((W=t.agentExecutionSequence)==null?void 0:W.length)??0);const r=new Array(a.planExecution.steps.length).fill(null);if((N=t.agentExecutionSequence)!=null&&N.length){const j=Math.min(t.agentExecutionSequence.length,a.planExecution.steps.length);for(let H=0;Hj==null?void 0:j.actionDescription))),ne(()=>{console.log("[ChatComponent] UI update completed via reactivity")})},se=a=>{console.log("[ChatComponent] Starting dialog round with planId:",a),a&&($.value.findIndex(r=>{var d;return((d=r.planExecution)==null?void 0:d.currentPlanId)===a&&r.type==="assistant"})===-1?(o("assistant","",{planExecution:{currentPlanId:a},thinking:"正在准备执行计划..."}),console.log("[ChatComponent] Created new assistant message for planId:",a)):console.log("[ChatComponent] Found existing assistant message for planId:",a))},me=a=>{var N,Z,j,H;console.log("[ChatComponent] Processing plan update with rootPlanId:",a);const t=oe.getCachedPlanRecord(a);if(!t){console.warn("[ChatComponent] No cached plan data found for rootPlanId:",a);return}if(console.log("[ChatComponent] Retrieved plan details from cache:",t),console.log("[ChatComponent] Plan steps:",t.steps),console.log("[ChatComponent] Plan completed:",t.completed),!t.currentPlanId){console.warn("[ChatComponent] Plan update missing currentPlanId");return}const r=$.value.findIndex(M=>{var z;return((z=M.planExecution)==null?void 0:z.currentPlanId)===t.currentPlanId&&M.type==="assistant"});let d;if(r!==-1)d=$.value[r],console.log("[ChatComponent] Found existing assistant message for currentPlanId:",t.currentPlanId);else{console.warn("[ChatComponent] No existing assistant message found for currentPlanId:",t.currentPlanId),console.log("[ChatComponent] Current messages:",$.value.map(z=>{var ae;return{type:z.type,planId:(ae=z.planExecution)==null?void 0:ae.currentPlanId,content:z.content.substring(0,50)}}));let M=-1;for(let z=$.value.length-1;z>=0;z--)if($.value[z].type==="assistant"){M=z;break}if(M!==-1)d=$.value[M],d.planExecution||(d.planExecution={}),d.planExecution.currentPlanId=t.currentPlanId,console.log("[ChatComponent] Using last assistant message and updating planExecution.currentPlanId to:",t.currentPlanId);else{console.error("[ChatComponent] No assistant message found at all, this should not happen");return}}if(d.planExecution||(d.planExecution={}),d.planExecution=JSON.parse(JSON.stringify(t)),!t.steps||t.steps.length===0){if(console.log("[ChatComponent] Handling simple response without steps"),t.completed){delete d.thinking;const M=t.summary??t.result??t.message??"处理完成";d.content=ke(M),console.log("[ChatComponent] Set simple response content:",d.content)}else t.title&&(d.thinking=`正在执行: ${t.title}`);return}delete d.thinking;const W=t.steps.map(M=>typeof M=="string"?M:typeof M=="object"&&M!==null&&(M.title||M.description)||"步骤");if(d.planExecution&&(d.planExecution.steps=W),t.agentExecutionSequence&&t.agentExecutionSequence.length>0){console.log("[ChatComponent] 发现执行序列数据,数量:",t.agentExecutionSequence.length),ee(d,t);const M=t.currentStepIndex??0;if(M>=0&&M0){const Ee=ae[ae.length-1];if(Ee.thinkOutput){const Me=Ee.thinkOutput.length>150?Ee.thinkOutput.substring(0,150)+"...":Ee.thinkOutput;d.thinking=`正在思考: ${Me}`}}}}else if(d.planExecution){const M=d.planExecution.currentStepIndex??0,z=(N=d.planExecution.steps)==null?void 0:N[M],ae=typeof z=="string"?z:"";d.thinking=`正在执行: ${ae}`}if(t.userInputWaitState&&d.planExecution?(console.log("[ChatComponent] 需要用户输入:",t.userInputWaitState),d.planExecution.userInputWaitState||(d.planExecution.userInputWaitState={}),d.planExecution.userInputWaitState={message:t.userInputWaitState.message??"",formDescription:t.userInputWaitState.formDescription??"",formInputs:((Z=t.userInputWaitState.formInputs)==null?void 0:Z.map(M=>({label:M.label,value:M.value||""})))??[]},G[j=d.id]??(G[j]={}),d.thinking="等待用户输入..."):(H=d.planExecution)!=null&&H.userInputWaitState&&delete d.planExecution.userInputWaitState,t.completed??t.status==="completed"){console.log("[ChatComponent] Plan is completed, updating final response"),delete d.thinking;let M="";t.summary?M=t.summary:t.result?M=t.result:M="任务已完成",d.content=re(M),console.log("[ChatComponent] Updated completed message:",d.content)}ne(()=>{console.log("[ChatComponent] Plan update UI refresh completed via reactivity")})},ke=a=>a?a.includes("我")||a.includes("您")||a.includes("您好")||a.includes("可以")?a:a.length<10?`${a}!还有什么需要我帮助的吗?`:a.length<50?`好的,${a}。如果您还有其他问题,请随时告诉我。`:`${a} - -希望这个回答对您有帮助!还有什么我可以为您做的吗?`:"我明白了,还有什么我可以帮您的吗?",re=a=>a?`${a}`:"任务已完成!还有什么我可以帮您的吗?",v=a=>{console.log("[ChatComponent] Plan completed with rootPlanId:",a);const t=oe.getCachedPlanRecord(a);if(!t){console.warn("[ChatComponent] No cached plan data found for rootPlanId:",a);return}if(console.log("[ChatComponent] Plan details:",t),t.rootPlanId){const r=$.value.findIndex(d=>{var W;return((W=d.planExecution)==null?void 0:W.currentPlanId)===t.rootPlanId});if(r!==-1){const d=$.value[r];delete d.thinking;let N=t.summary??t.result??"任务已完成";!N.includes("我")&&!N.includes("您")&&(N.includes("成功")||N.includes("完成")?N=`很好!${N}。如果您还有其他需要帮助的地方,请随时告诉我。`:N=`我已经完成了您的请求:${N}`),d.content=N,console.log("[ChatComponent] Updated completed message:",d.content)}else console.warn("[ChatComponent] No message found for completed rootPlanId:",t.rootPlanId)}},c=a=>{F.value=!1,$.value[$.value.length-1]={id:Date.now().toString(),type:"assistant",content:a,timestamp:new Date}},k=a=>{if(!a)return"";let t=a.replace(/\n\n/g,"

").replace(/\n/g,"
");return t=t.replace(/(

)/g,"

"),t.includes("

")&&(t=`

${t}

`),t},I=async a=>{var t;if(!((t=a.planExecution)!=null&&t.currentPlanId)||!a.planExecution.userInputWaitState){console.error("[ChatComponent] 缺少planExecution.currentPlanId或userInputWaitState");return}try{const r={},d=a.planExecution.userInputWaitState.formInputs;d&&d.length>0?Object.entries(G[a.id]).forEach(([N,Z])=>{var M;const j=parseInt(N,10),H=((M=d[j])==null?void 0:M.label)||`input_${N}`;r[H]=Z}):r.genericInput=a.genericInput??"",console.log("[ChatComponent] 提交用户输入:",r);const W=await qe.submitFormInput(a.planExecution.currentPlanId,r);delete a.planExecution.userInputWaitState,delete a.genericInput,delete G[a.id],_.startPolling(),console.log("[ChatComponent] 用户输入提交成功:",W)}catch(r){console.error("[ChatComponent] 用户输入提交失败:",r),alert(`提交失败: ${(r==null?void 0:r.message)||"未知错误"}`)}};return $e(()=>u.initialPrompt,(a,t)=>{console.log("[ChatComponent] initialPrompt changed from:",t,"to:",a),a&&typeof a=="string"&&a.trim()&&a!==t&&(console.log("[ChatComponent] Processing changed initial prompt:",a),ne(()=>{C(a)}))},{immediate:!1}),Se(()=>{console.log("[ChatComponent] Mounted, setting up event listeners"),oe.setEventCallbacks({onPlanUpdate:me,onPlanCompleted:v,onDialogRoundStart:se,onChatInputUpdateState:a=>{console.log("[ChatComponent] Chat input state update for rootPlanId:",a)},onChatInputClear:()=>{console.log("[ChatComponent] Chat input clear requested")},onPlanError:c}),ne(()=>{ce()}),u.initialPrompt&&typeof u.initialPrompt=="string"&&u.initialPrompt.trim()&&(console.log("[ChatComponent] Processing initial prompt:",u.initialPrompt),ne(()=>{C(u.initialPrompt)}))}),De(()=>{console.log("[ChatComponent] Unmounting, cleaning up resources"),be(),B.value&&clearInterval(B.value),_.cleanup(),Object.keys(G).forEach(a=>delete G[a])}),n({handleSendMessage:C,handlePlanUpdate:me,handlePlanCompleted:v,handleDialogRoundStart:se,addMessage:o,handlePlanError:c}),(a,t)=>(p(),g("div",Ns,[e("div",{class:"messages",ref_key:"messagesRef",ref:x},[(p(!0),g(ge,null,ve($.value,r=>{var d,W,N,Z,j,H,M,z,ae;return p(),g("div",{key:r.id,class:te(["message",{user:r.type==="user",assistant:r.type==="assistant"}])},[e("div",Us,[r.type==="user"?(p(),g("div",Ls,i(r.content),1)):(p(),g("div",Vs,[r.thinking||((d=r.planExecution)==null?void 0:d.progress)!==void 0||(((N=(W=r.planExecution)==null?void 0:W.steps)==null?void 0:N.length)??0)>0?(p(),g("div",qs,[e("div",Fs,[e("div",Os,[b(l(P),{icon:"carbon:thinking",class:"thinking-icon"})]),e("div",Bs,i(a.$t("chat.thinkingLabel")),1)]),e("div",Ws,[r.thinking?(p(),g("div",js,[b(l(P),{icon:"carbon:thinking",class:"thinking-icon"}),e("span",null,i(r.thinking),1)])):q("",!0),((Z=r.planExecution)==null?void 0:Z.progress)!==void 0?(p(),g("div",Hs,[e("div",zs,[e("div",{class:"progress-fill",style:Ue({width:r.planExecution.progress+"%"})},null,4)]),e("span",Js,i(r.planExecution.progressText??a.$t("chat.processing")+"..."),1)])):q("",!0),(((H=(j=r.planExecution)==null?void 0:j.steps)==null?void 0:H.length)??0)>0?(p(),g("div",Gs,[e("h4",Xs,i(a.$t("chat.stepExecutionDetails")),1),(p(!0),g(ge,null,ve((M=r.planExecution)==null?void 0:M.steps,(Ee,J)=>{var Me,Fe,Oe,Be,We,je,He,ze,Je,Ge,Xe,Ke,Qe,Ye,Ze,et,tt,nt,st;return p(),g("div",{key:J,class:te(["ai-section",{running:S(r,J)==="RUNNING",completed:S(r,J)==="FINISHED",pending:S(r,J)==="IDLE"}]),onClick:ie(pe=>L(r,J),["stop"])},[e("div",Qs,[e("span",Ys,i(S(r,J)==="FINISHED"?"✓":S(r,J)==="RUNNING"?"▶":"○"),1),e("span",Zs,i(Ee||`${a.$t("chat.step")} ${J+1}`),1),S(r,J)==="RUNNING"?(p(),g("span",eo,i(a.$t("chat.status.executing")),1)):S(r,J)==="FINISHED"?(p(),g("span",to,i(a.$t("chat.status.completed")),1)):(p(),g("span",no,i(a.$t("chat.status.pending")),1))]),r.stepActions&&r.stepActions[J]?(p(),g("div",so,[e("div",oo,[e("span",ao,i(((Me=r.stepActions[J])==null?void 0:Me.status)==="current"?"🔄":((Fe=r.stepActions[J])==null?void 0:Fe.status)==="completed"?"✓":"⏳"),1),e("strong",null,i((Oe=r.stepActions[J])==null?void 0:Oe.actionDescription),1)]),(Be=r.stepActions[J])!=null&&Be.toolParameters?(p(),g("div",lo,[t[0]||(t[0]=e("span",{class:"tool-icon"},"⚙️",-1)),e("span",io,i(a.$t("common.parameters"))+":",1),e("pre",co,i((We=r.stepActions[J])==null?void 0:We.toolParameters),1)])):q("",!0),(je=r.stepActions[J])!=null&&je.thinkOutput?(p(),g("div",ro,[e("div",uo,[t[1]||(t[1]=e("span",{class:"think-icon"},"💭",-1)),e("span",po,i(a.$t("chat.thinkingOutput"))+":",1)]),e("div",ho,[e("pre",go,i((He=r.stepActions[J])==null?void 0:He.thinkOutput),1)])])):q("",!0)])):q("",!0),((ze=R(r,J))==null?void 0:ze.length)>0?(p(),g("div",mo,[e("div",vo,[b(l(P),{icon:"carbon:tree-view",class:"sub-plan-icon"}),t[2]||(t[2]=e("span",{class:"sub-plan-title"},"子执行计划",-1))]),e("div",fo,[(p(!0),g(ge,null,ve(R(r,J),(pe,le)=>(p(),g("div",{key:`sub-${J}-${le}`,class:te(["sub-plan-step-item",{completed:E(r,J,le)==="completed",current:E(r,J,le)==="current",pending:E(r,J,le)==="pending"}]),onClick:ie(ot=>A(r,J,le),["stop"])},[e("div",ko,[e("span",_o,i(E(r,J,le)==="completed"?"✓":E(r,J,le)==="current"?"▶":"○"),1),e("span",$o,i(le+1),1)]),e("div",Po,[e("span",Co,i(pe),1),t[3]||(t[3]=e("span",{class:"sub-step-badge"},"子步骤",-1))])],10,bo))),128))])])):q("",!0),(Je=r.planExecution)!=null&&Je.userInputWaitState&&S(r,J)==="RUNNING"?(p(),g("div",So,[e("p",yo,i(((Xe=(Ge=r.planExecution)==null?void 0:Ge.userInputWaitState)==null?void 0:Xe.message)??a.$t("chat.userInput.message")),1),(Qe=(Ke=r.planExecution)==null?void 0:Ke.userInputWaitState)!=null&&Qe.formDescription?(p(),g("p",Eo,i((Ze=(Ye=r.planExecution)==null?void 0:Ye.userInputWaitState)==null?void 0:Ze.formDescription),1)):q("",!0),e("form",{onSubmit:ie(pe=>I(r),["prevent"]),class:"user-input-form"},[(tt=(et=r.planExecution)==null?void 0:et.userInputWaitState)!=null&&tt.formInputs&&r.planExecution.userInputWaitState.formInputs.length>0?(p(!0),g(ge,{key:0},ve((st=(nt=r.planExecution)==null?void 0:nt.userInputWaitState)==null?void 0:st.formInputs,(pe,le)=>(p(),g("div",{key:le,class:"form-group"},[e("label",{for:`form-input-${pe.label.replace(/\W+/g,"_")}`},i(pe.label)+": ",9,To),de(e("input",{type:"text",id:`form-input-${pe.label.replace(/\W+/g,"_")}`,name:pe.label,"onUpdate:modelValue":ot=>G[r.id][le]=ot,class:"form-input"},null,8,Io),[[fe,G[r.id][le]]])]))),128)):(p(),g("div",Do,[e("label",xo,i(a.$t("common.input"))+":",1),de(e("input",{type:"text",id:"form-input-genericInput",name:"genericInput","onUpdate:modelValue":pe=>r.genericInput=pe,class:"form-input"},null,8,Ro),[[fe,r.genericInput]])])),e("button",Ao,i(a.$t("chat.userInput.submit")),1)],40,wo)])):q("",!0)],10,Ks)}),128))])):!r.content&&(r.thinking||((z=r.planExecution)==null?void 0:z.progress)!==void 0&&(((ae=r.planExecution)==null?void 0:ae.progress)??0)<100)?(p(),g("div",Mo,[e("div",No,[t[4]||(t[4]=e("div",{class:"thinking-dots"},[e("span"),e("span"),e("span")],-1)),e("span",null,i(r.thinking??a.$t("chat.thinkingProcessing")),1)])])):q("",!0)])])):q("",!0),e("div",Uo,[e("div",Lo,[e("div",Vo,[b(l(P),{icon:"carbon:bot",class:"bot-icon"})]),e("div",qo,i(a.$t("chat.botName")),1)]),e("div",Fo,[r.content?(p(),g("div",Oo,[e("div",{class:"response-text",innerHTML:k(r.content)},null,8,Bo)])):(p(),g("div",Wo,[e("div",jo,[t[5]||(t[5]=e("div",{class:"typing-dots"},[e("span"),e("span"),e("span")],-1)),e("span",Ho,i(a.$t("chat.thinkingResponse")),1)])]))])])]))])],2)}),128)),F.value?(p(),g("div",zo,[e("div",Jo,[e("div",Go,[e("div",Xo,[e("div",Ko,[e("div",Qo,[b(l(P),{icon:"carbon:thinking",class:"thinking-icon"})]),e("div",Yo,i(a.$t("chat.thinkingLabel")),1)]),e("div",Zo,[e("div",ea,[e("div",ta,[t[6]||(t[6]=e("div",{class:"thinking-dots"},[e("span"),e("span"),e("span")],-1)),e("span",null,i(a.$t("chat.thinking")),1)])])])]),e("div",na,[e("div",sa,[e("div",oa,[b(l(P),{icon:"carbon:bot",class:"bot-icon"})]),e("div",aa,i(a.$t("chat.botName")),1)]),e("div",la,[e("div",ia,[e("div",ca,[t[7]||(t[7]=e("div",{class:"typing-dots"},[e("span"),e("span"),e("span")],-1)),e("span",ra,i(a.$t("chat.thinkingResponse")),1)])])])])])])])):q("",!0)],512),X.value?(p(),g("div",{key:0,class:"scroll-to-bottom-btn",onClick:O,title:a.$t("chat.scrollToBottom")},[b(l(P),{icon:"carbon:chevron-down"})],8,ua)):q("",!0)]))}}),pa=ye(da,[["__scopeId","data-v-46f87864"]]),ha={class:"input-area"},ga={class:"input-container"},ma={class:"attach-btn",title:"附加文件"},va=["placeholder","disabled"],fa=["title"],ba=["disabled","title"],ka=Ce({__name:"index",props:{placeholder:{default:""},disabled:{type:Boolean,default:!1},initialValue:{default:""}},emits:["send","clear","update-state","plan-mode-clicked"],setup(w,{expose:n,emit:s}){const{t:u}=Ie(),T=w,f=s,_=D(),x=D(""),F=_e(()=>T.placeholder||u("input.placeholder")),$=D(F.value),B=_e(()=>!!T.disabled),X=()=>{ne(()=>{_.value&&(_.value.style.height="auto",_.value.style.height=Math.min(_.value.scrollHeight,120)+"px")})},G=O=>{O.key==="Enter"&&!O.shiftKey&&(O.preventDefault(),o())},o=()=>{if(!x.value.trim()||B.value)return;const O=x.value.trim();f("send",O),y()},h=()=>{f("plan-mode-clicked")},y=()=>{x.value="",X(),f("clear")},K=(O,Q)=>{Q&&($.value=O?Q:u("input.waiting")),f("update-state",O,Q)},U=O=>{x.value=O,X()},V=()=>x.value.trim();return $e(()=>T.initialValue,O=>{O&&O.trim()&&(x.value=O,X())},{immediate:!0}),n({clearInput:y,updateState:K,setInputValue:U,getQuery:V,focus:()=>{var O;return(O=_.value)==null?void 0:O.focus()}}),Se(()=>{}),De(()=>{}),(O,Q)=>(p(),g("div",ha,[e("div",ga,[e("button",ma,[b(l(P),{icon:"carbon:attachment"})]),de(e("textarea",{"onUpdate:modelValue":Q[0]||(Q[0]=ce=>x.value=ce),ref_key:"inputRef",ref:_,class:"chat-input",placeholder:$.value,disabled:B.value,onKeydown:G,onInput:X},null,40,va),[[fe,x.value]]),e("button",{class:"plan-mode-btn",title:O.$t("input.planMode"),onClick:h},[b(l(P),{icon:"carbon:document"}),Y(" "+i(O.$t("input.planMode")),1)],8,fa),e("button",{class:"send-button",disabled:!x.value.trim()||B.value,onClick:o,title:O.$t("input.send")},[b(l(P),{icon:"carbon:send-alt"}),Y(" "+i(O.$t("input.send")),1)],8,ba)])]))}}),_a=ye(ka,[["__scopeId","data-v-639c8b2a"]]);class we{static async getAllCronTasks(){try{const n=await fetch(this.BASE_URL);return await(await this.handleResponse(n)).json()}catch(n){throw console.error("Failed to get cron tasks:",n),n}}static async getCronTaskById(n){try{const s=await fetch(`${this.BASE_URL}/${n}`);return await(await this.handleResponse(s)).json()}catch(s){throw console.error("Failed to get cron task by id:",s),s}}static async createCronTask(n){try{const s=await fetch(this.BASE_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});return await(await this.handleResponse(s)).json()}catch(s){throw console.error("Failed to create cron task:",s),s}}static async updateCronTask(n,s){try{const u=await fetch(`${this.BASE_URL}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});return await(await this.handleResponse(u)).json()}catch(u){throw console.error("Failed to update cron task:",u),u}}static async updateTaskStatus(n,s){try{const u=await fetch(`${this.BASE_URL}/${n}/status?status=${s}`,{method:"PUT"});await this.handleResponse(u)}catch(u){throw console.error("Failed to update task status:",u),u}}static async deleteCronTask(n){try{const s=await fetch(`${this.BASE_URL}/${n}`,{method:"DELETE"});await this.handleResponse(s)}catch(s){throw console.error("Failed to delete cron task:",s),s}}static async handleResponse(n){if(!n.ok)try{const s=await n.json();throw new Error(s.message||`API request failed: ${n.status}`)}catch{throw new Error(`API request failed: ${n.status} ${n.statusText}`)}return n}}he(we,"BASE_URL","/api/cron-tasks");const Te={validateCronExpression(w){const n=w.trim().split(/\s+/);return n.length>=5&&n.length<=6},formatTime(w){return new Date(w).toLocaleString()},async saveTask(w){try{let n;return w.id?n=await we.updateCronTask(Number(w.id),w):n=await we.createCronTask(w),n}catch(n){throw console.error("Failed to save cron task:",n),n}},async deleteTask(w){try{await we.deleteCronTask(String(w))}catch(n){throw console.error("Failed to delete cron task:",n),n}},async toggleTaskStatus(w){if(!w.id)throw new Error("Task ID is required");const n=w.status===0?1:0;return await we.updateCronTask(Number(w.id),{...w,status:n})},prepareTaskExecution(w){return w.planTemplateId?{useTemplate:!0,planData:{title:w.cronName||"定时任务执行",planData:{id:w.planTemplateId,planTemplateId:w.planTemplateId,planId:w.planTemplateId},params:w.executionParams||void 0}}:{useTemplate:!1,taskContent:w.planDesc||w.cronName||""}}},$a={class:"modal-header"},Pa={class:"header-actions"},Ca={class:"status-switch"},Sa={class:"status-label"},ya={class:"toggle-switch"},Ea=["checked"],wa={class:"modal-content"},Ta={class:"form-group"},Ia={class:"form-label"},Da=["placeholder"],xa={class:"form-group"},Ra={class:"form-label"},Aa=["placeholder"],Ma={class:"form-help"},Na={class:"form-group"},Ua={class:"form-label"},La=["placeholder"],Va={class:"form-group"},qa={class:"form-label"},Fa={class:"template-toggle"},Oa={key:0,class:"template-selector"},Ba={value:""},Wa=["value"],ja={class:"form-help"},Ha={key:0,class:"form-group"},za={class:"time-info"},Ja={class:"time-label"},Ga={class:"time-value"},Xa={key:1,class:"form-group"},Ka={class:"time-info"},Qa={class:"time-label"},Ya={class:"time-value"},Za={class:"modal-footer"},el=["disabled"],tl=Ce({__name:"TaskDetailModal",props:{modelValue:{type:Boolean},task:{}},emits:["update:modelValue","save"],setup(w,{emit:n}){const s=w,u=n,T=D(!1),f=D([]),_=D({cronName:"",cronTime:"",planDesc:"",status:1,linkTemplate:!1,templateId:"",planTemplateId:""});Se(async()=>{try{const o=await Ae.getAllPlanTemplates();o&&o.templates&&(f.value=o.templates.map(h=>({id:h.id,name:h.title||"Unnamed Template"})))}catch(o){console.error("Failed to get template list:",o)}});const F=o=>{o.target===o.currentTarget&&u("update:modelValue",!1)},$=()=>{_.value.linkTemplate=!1,_.value.templateId="",_.value.planTemplateId=""},B=()=>_.value.cronName.trim()?_.value.cronTime.trim()?Te.validateCronExpression(_.value.cronTime)?_.value.planDesc.trim()?_.value.linkTemplate&&!_.value.templateId?(alert("Please select a plan template"),!1):!0:(alert("Task description cannot be empty"),!1):(alert("Invalid Cron expression format, should be 5-6 parts separated by spaces"),!1):(alert("Cron expression cannot be empty"),!1):(alert("Task name cannot be empty"),!1),X=o=>Te.formatTime(o),G=async()=>{var o;if(B()){T.value=!0;try{const h={..._.value,...((o=s.task)==null?void 0:o.id)!==void 0&&{id:s.task.id},cronName:_.value.cronName.trim(),cronTime:_.value.cronTime.trim(),planDesc:_.value.planDesc.trim(),status:_.value.status,planTemplateId:_.value.linkTemplate&&_.value.templateId||""};u("save",h)}finally{T.value=!1}}};return $e(()=>s.task,o=>{if(o){const h=o.templateId||o.planTemplateId||"";_.value={cronName:o.cronName||"",cronTime:o.cronTime||"",planDesc:o.planDesc||"",status:o.status??1,linkTemplate:!!h,templateId:h,planTemplateId:h}}else _.value={cronName:"",cronTime:"",planDesc:"",status:1,linkTemplate:!1,templateId:"",planTemplateId:""}},{immediate:!0}),$e(()=>s.modelValue,o=>{o||(_.value={cronName:"",cronTime:"",planDesc:"",status:1,linkTemplate:!1,templateId:"",planTemplateId:""})}),(o,h)=>(p(),ue(Ne,{to:"body"},[b(xe,{name:"modal"},{default:Re(()=>{var y,K,U;return[o.modelValue?(p(),g("div",{key:0,class:"modal-overlay",onClick:F},[e("div",{class:"modal-container",onClick:h[8]||(h[8]=ie(()=>{},["stop"]))},[e("div",$a,[e("h3",null,i(o.$t("cronTask.taskDetail")),1),e("div",Pa,[e("div",Ca,[e("span",Sa,i(o.$t("cronTask.taskStatus")),1),e("label",ya,[e("input",{type:"checkbox",checked:_.value.status===0,onChange:h[0]||(h[0]=V=>_.value.status=_.value.status===0?1:0)},null,40,Ea),h[9]||(h[9]=e("span",{class:"toggle-slider"},null,-1))])]),e("button",{class:"close-btn",onClick:h[1]||(h[1]=V=>o.$emit("update:modelValue",!1))},[b(l(P),{icon:"carbon:close"})])])]),e("div",wa,[e("form",{onSubmit:ie(G,["prevent"]),class:"task-form"},[e("div",Ta,[e("label",Ia,i(o.$t("cronTask.taskName")),1),de(e("input",{"onUpdate:modelValue":h[2]||(h[2]=V=>_.value.cronName=V),type:"text",class:"form-input",placeholder:o.$t("cronTask.taskNamePlaceholder"),required:""},null,8,Da),[[fe,_.value.cronName]])]),e("div",xa,[e("label",Ra,i(o.$t("cronTask.cronExpression")),1),de(e("input",{"onUpdate:modelValue":h[3]||(h[3]=V=>_.value.cronTime=V),type:"text",class:"form-input",placeholder:o.$t("cronTask.cronExpressionPlaceholder"),required:""},null,8,Aa),[[fe,_.value.cronTime]]),e("div",Ma,i(o.$t("cronTask.cronExpressionHelp")),1)]),e("div",Na,[e("label",Ua,i(o.$t("cronTask.taskDescription")),1),de(e("textarea",{"onUpdate:modelValue":h[4]||(h[4]=V=>_.value.planDesc=V),class:"form-textarea",placeholder:o.$t("cronTask.taskDescriptionPlaceholder"),rows:"4",required:""},null,8,La),[[fe,_.value.planDesc]])]),e("div",Va,[e("label",qa,i(o.$t("cronTask.planTemplate")),1),e("div",Fa,[e("button",{type:"button",class:te(["template-btn",_.value.linkTemplate?"active":""]),onClick:h[5]||(h[5]=V=>_.value.linkTemplate=!0)},[b(l(P),{icon:"carbon:checkmark"}),Y(" "+i(o.$t("cronTask.linkTemplate")),1)],2),e("button",{type:"button",class:te(["template-btn",_.value.linkTemplate?"":"active"]),onClick:$},[b(l(P),{icon:"carbon:close"}),Y(" "+i(o.$t("cronTask.noTemplate")),1)],2)]),_.value.linkTemplate?(p(),g("div",Oa,[de(e("select",{"onUpdate:modelValue":h[6]||(h[6]=V=>_.value.templateId=V),class:"form-select"},[e("option",Ba,i(o.$t("cronTask.selectTemplate")),1),(p(!0),g(ge,null,ve(f.value,V=>(p(),g("option",{key:V.id,value:V.id},i(V.name),9,Wa))),128))],512),[[ut,_.value.templateId]]),e("div",ja,i(o.$t("cronTask.templateHelpText")),1)])):q("",!0)]),(y=o.task)!=null&&y.createTime?(p(),g("div",Ha,[e("div",za,[e("span",Ja,i(o.$t("cronTask.createTime"))+":",1),e("span",Ga,i(X(o.task.createTime)),1)])])):q("",!0),(K=o.task)!=null&&K.updateTime?(p(),g("div",Xa,[e("div",Ka,[e("span",Qa,i(o.$t("cronTask.updateTime"))+":",1),e("span",Ya,i(X(o.task.updateTime)),1)])])):q("",!0)],32)]),e("div",Za,[e("button",{type:"button",class:"cancel-btn",onClick:h[7]||(h[7]=V=>o.$emit("update:modelValue",!1))},i(o.$t("common.cancel")),1),e("button",{type:"button",class:"save-btn",onClick:G,disabled:T.value},[T.value?(p(),ue(l(P),{key:0,icon:"carbon:loading",class:"loading-icon"})):q("",!0),Y(" "+i((U=s.task)!=null&&U.id?o.$t("common.save"):o.$t("common.create")),1)],8,el)])])])):q("",!0)]}),_:1})]))}}),nl=ye(tl,[["__scopeId","data-v-5b32448e"]]),sl={class:"modal-header"},ol={class:"header-actions"},al={class:"modal-content"},ll={key:0,class:"loading-container"},il={key:1,class:"empty-container"},cl={key:2,class:"task-list"},rl=["onClick"],ul={class:"task-main"},dl={class:"task-info"},pl={class:"task-header"},hl={class:"task-name"},gl={class:"task-description"},ml={class:"task-time"},vl=["onClick"],fl=["onClick","disabled","title"],bl=["onClick","title"],kl={class:"dropdown-menu"},_l=["onClick"],$l=["onClick","disabled"],Pl=["onClick","disabled"],Cl={class:"confirm-header"},Sl={class:"confirm-content"},yl={class:"confirm-actions"},El=["disabled"],wl={class:"confirm-header"},Tl={class:"confirm-content"},Il={class:"create-options"},Dl={class:"option-content"},xl={class:"option-title"},Rl={class:"option-desc"},Al={class:"option-content"},Ml={class:"option-title"},Nl={class:"option-desc"},Ul={class:"confirm-actions"},Ll=Ce({__name:"index",props:{modelValue:{type:Boolean,required:!0}},emits:["update:modelValue"],setup(w,{emit:n}){const s=lt(),u=it(),T=mt(),{t:f}=Ie(),_=w,x=n,F=D([]),$=D(!1),B=D(null),X=D(null),G=D(null),o=D(null),h=D(!1),y=D(null),K=D(!1),U=D(null),V=D(!1),O=c=>{c.target===c.currentTarget&&x("update:modelValue",!1)},Q=async()=>{$.value=!0;try{F.value=await we.getAllCronTasks()}catch(c){console.error("Failed to load cron tasks:",c),T.error(`Failed to load tasks: ${c instanceof Error?c.message:String(c)}`)}finally{$.value=!1}},ce=async c=>{B.value=c;try{const k=F.value.find(t=>t.id===c);if(!k){console.error("Task not found:",c);return}x("update:modelValue",!1);const I=Date.now().toString();await s.push({name:"direct",params:{id:I}}),await new Promise(t=>setTimeout(t,100));const a=Te.prepareTaskExecution(k);a.useTemplate&&a.planData?u.emitPlanExecutionRequested(a.planData):a.taskContent&&u.setTask(a.taskContent)}catch(k){console.error("Failed to execute task:",k),T.error(`Execution failed: ${k instanceof Error?k.message:String(k)}`)}finally{B.value=null}},be=c=>{y.value={...c},h.value=!0,o.value=null},C=async c=>{try{await Te.saveTask(c),await Q(),h.value=!1,T.success("Task saved successfully")}catch(k){console.error("Failed to save task:",k),T.error(`Save failed: ${k instanceof Error?k.message:String(k)}`)}},S=c=>{U.value=c,K.value=!0},L=async()=>{var c;if((c=U.value)!=null&&c.id){X.value=U.value.id;try{await Te.deleteTask(U.value.id),await Q(),K.value=!1,U.value=null,T.success("Task deleted successfully")}catch(k){console.error("Failed to delete task:",k),T.error(`Delete failed: ${k instanceof Error?k.message:String(k)}`)}finally{X.value=null}}},R=()=>{K.value=!1,U.value=null},E=c=>{o.value=o.value===c?null:c},A=async c=>{if(c.id){G.value=c.id;try{await Te.toggleTaskStatus(c),await Q(),o.value=null,T.success(`Task ${c.status===0?"disabled":"enabled"} successfully`)}catch(k){console.error("Failed to toggle task status:",k),T.error(`Status toggle failed: ${k instanceof Error?k.message:String(k)}`)}finally{G.value=null}}},ee=async c=>{try{await navigator.clipboard.writeText(c),T.success("Cron expression copied successfully")}catch(k){T.error(`Copy failed: ${k instanceof Error?k.message:String(k)}`)}},se=()=>{V.value=!0},me=()=>{V.value=!1;try{x("update:modelValue",!1);const c=f("cronTask.template");u.setTaskToInput(c);const k=Date.now().toString();s.push({name:"direct",params:{id:k}})}catch(c){console.error("Error in createWithJmanus:",c),T.error(`Creation failed: ${c instanceof Error?c.message:String(c)}`)}},ke=()=>{V.value=!1,y.value={cronName:"",cronTime:"",planDesc:"",status:0,planTemplateId:""},h.value=!0},re=()=>{V.value=!1},v=c=>{const k=c.target;!k.closest(".action-dropdown")&&!k.closest(".dropdown-menu")&&(o.value=null)};return Se(()=>{document.addEventListener("click",v,!0)}),De(()=>{document.removeEventListener("click",v,!0)}),$e(()=>_.modelValue,c=>{c&&Q()}),(c,k)=>(p(),g(ge,null,[(p(),ue(Ne,{to:"body"},[b(xe,{name:"modal"},{default:Re(()=>[w.modelValue?(p(),g("div",{key:0,class:"modal-overlay",onClick:O},[e("div",{class:"modal-container",onClick:k[3]||(k[3]=ie(()=>{},["stop"]))},[e("div",sl,[e("h3",null,i(c.$t("cronTask.title")),1),e("div",ol,[e("button",{class:"add-task-btn",onClick:[se,k[0]||(k[0]=ie(()=>{},["stop"]))]},[b(l(P),{icon:"carbon:add"}),Y(" "+i(c.$t("cronTask.addTask")),1)]),e("button",{class:"close-btn",onClick:k[1]||(k[1]=I=>c.$emit("update:modelValue",!1))},[b(l(P),{icon:"carbon:close"})])])]),e("div",al,[$.value?(p(),g("div",ll,[b(l(P),{icon:"carbon:loading",class:"loading-icon"}),e("span",null,i(c.$t("common.loading")),1)])):F.value.length===0?(p(),g("div",il,[b(l(P),{icon:"carbon:time",class:"empty-icon"}),e("span",null,i(c.$t("cronTask.noTasks")),1)])):(p(),g("div",cl,[(p(!0),g(ge,null,ve(F.value,I=>(p(),g("div",{key:I.id||"",class:"task-item",onClick:a=>be(I)},[e("div",ul,[e("div",dl,[e("div",pl,[e("div",hl,i(I.cronName),1),e("div",{class:te(["task-status-badge",I.status===0?"active":"inactive"])},[b(l(P),{icon:I.status===0?"carbon:checkmark-filled":"carbon:pause-filled"},null,8,["icon"]),e("span",null,i(I.status===0?c.$t("cronTask.active"):c.$t("cronTask.inactive")),1)],2)]),e("div",gl,i(I.planDesc),1),e("div",ml,[b(l(P),{icon:"carbon:time"}),e("span",{class:"cron-readable",style:{cursor:"pointer"},onClick:ie(a=>ee(I.cronTime),["stop"])},i(I.cronTime),9,vl)])])]),e("div",{class:"task-actions",onClick:k[2]||(k[2]=ie(()=>{},["stop"]))},[e("button",{class:"action-btn execute-btn",onClick:a=>ce(I.id),disabled:B.value===I.id,title:c.$t("cronTask.executeOnce")},[b(l(P),{icon:B.value===I.id?"carbon:loading":"carbon:play-filled"},null,8,["icon"]),Y(" "+i(c.$t("cronTask.executeOnce")),1)],8,fl),e("div",{class:te(["action-dropdown",{active:o.value===I.id}])},[e("button",{class:"action-btn dropdown-btn",onClick:a=>E(I.id),title:c.$t("cronTask.operations")},[b(l(P),{icon:"carbon:overflow-menu-horizontal"}),Y(" "+i(c.$t("cronTask.operations")),1)],8,bl),de(e("div",kl,[e("button",{class:"dropdown-item edit-btn",onClick:a=>be(I)},[b(l(P),{icon:"carbon:edit"}),Y(" "+i(c.$t("cronTask.edit")),1)],8,_l),e("button",{class:"dropdown-item toggle-btn",onClick:a=>A(I),disabled:G.value===I.id},[b(l(P),{icon:G.value===I.id?"carbon:loading":I.status===0?"carbon:pause-filled":"carbon:play-filled"},null,8,["icon"]),Y(" "+i(I.status===0?c.$t("cronTask.disable"):c.$t("cronTask.enable")),1)],8,$l),e("button",{class:"dropdown-item delete-btn",onClick:a=>S(I),disabled:X.value===I.id},[b(l(P),{icon:X.value===I.id?"carbon:loading":"carbon:trash-can"},null,8,["icon"]),Y(" "+i(c.$t("cronTask.delete")),1)],8,Pl)],512),[[dt,o.value===I.id]])],2)])],8,rl))),128))]))])])])):q("",!0)]),_:1})])),b(nl,{modelValue:h.value,"onUpdate:modelValue":k[4]||(k[4]=I=>h.value=I),task:y.value,onSave:C},null,8,["modelValue","task"]),(p(),ue(Ne,{to:"body"},[b(xe,{name:"modal"},{default:Re(()=>{var I,a,t,r;return[K.value?(p(),g("div",{key:0,class:"modal-overlay",onClick:R},[e("div",{class:"confirm-modal",onClick:k[5]||(k[5]=ie(()=>{},["stop"]))},[e("div",Cl,[b(l(P),{icon:"carbon:warning",class:"warning-icon"}),e("h3",null,i(c.$t("cronTask.deleteConfirm")),1)]),e("div",Sl,[e("p",null,i(c.$t("cronTask.deleteConfirmMessage",{taskName:((I=U.value)==null?void 0:I.cronName)||((a=U.value)==null?void 0:a.planDesc)||""})),1)]),e("div",yl,[e("button",{class:"confirm-btn cancel-btn",onClick:R},i(c.$t("common.cancel")),1),e("button",{class:"confirm-btn delete-btn",onClick:L,disabled:X.value===((t=U.value)==null?void 0:t.id)},[b(l(P),{icon:X.value===((r=U.value)==null?void 0:r.id)?"carbon:loading":"carbon:trash-can"},null,8,["icon"]),Y(" "+i(c.$t("cronTask.delete")),1)],8,El)])])])):q("",!0)]}),_:1})])),(p(),ue(Ne,{to:"body"},[b(xe,{name:"modal"},{default:Re(()=>[V.value?(p(),g("div",{key:0,class:"modal-overlay",onClick:re},[e("div",{class:"confirm-modal create-options-modal",onClick:k[6]||(k[6]=ie(()=>{},["stop"]))},[e("div",wl,[b(l(P),{icon:"carbon:time",class:"create-icon"}),e("h3",null,i(c.$t("cronTask.createTask")),1)]),e("div",Tl,[e("p",null,i(c.$t("cronTask.selectCreateMethod")),1),e("div",Il,[e("button",{class:"create-option-btn jmanus-btn",onClick:me},[b(l(P),{icon:"carbon:ai-status"}),e("div",Dl,[e("span",xl,i(c.$t("cronTask.createWithJmanus")),1),e("span",Rl,i(c.$t("cronTask.createWithJmanusDesc")),1)])]),e("button",{class:"create-option-btn manual-btn",onClick:ke},[b(l(P),{icon:"carbon:edit"}),e("div",Al,[e("span",Ml,i(c.$t("cronTask.createManually")),1),e("span",Nl,i(c.$t("cronTask.createManuallyDesc")),1)])])])]),e("div",Ul,[e("button",{class:"confirm-btn cancel-btn",onClick:re},i(c.$t("common.cancel")),1)])])])):q("",!0)]),_:1})]))],64))}}),Vl=ye(Ll,[["__scopeId","data-v-f31a9ce7"]]),ql={class:"direct-page"},Fl={class:"direct-chat"},Ol={class:"chat-header"},Bl={class:"header-actions"},Wl=["title"],jl=["title"],Hl={class:"chat-content"},zl=["title"],Jl={class:"message-content"},Gl=Ce({__name:"index",setup(w){const n=pt(),s=lt(),u=it(),{t:T}=Ie(),{message:f}=vt(),_=D(""),x=D(""),F=D(),$=D(),B=D(),X=D(!1),G=D(!1),o=D(null),h=D(!1),y=D(50),K=D(!1),U=D(0),V=D(0);Se(()=>{if(console.log("[Direct] onMounted called"),console.log("[Direct] taskStore.currentTask:",u.currentTask),console.log("[Direct] taskStore.hasUnprocessedTask():",u.hasUnprocessedTask()),oe.setEventCallbacks({onPlanUpdate:c=>{console.log("[Direct] Plan update event received for rootPlanId:",c),C(c)&&(console.log("[Direct] Processing plan update for current rootPlanId:",c),$.value&&typeof $.value.handlePlanUpdate=="function"?(console.log("[Direct] Calling chatRef.handlePlanUpdate with rootPlanId:",c),$.value.handlePlanUpdate(c)):console.warn("[Direct] chatRef.handlePlanUpdate method not available"),F.value&&typeof F.value.updateDisplayedPlanProgress=="function"?(console.log("[Direct] Calling rightPanelRef.updateDisplayedPlanProgress with rootPlanId:",c),F.value.updateDisplayedPlanProgress(c)):console.warn("[Direct] rightPanelRef.updateDisplayedPlanProgress method not available"))},onPlanCompleted:c=>{if(console.log("[Direct] Plan completed event received for rootPlanId:",c),!!C(c)){if(console.log("[Direct] Processing plan completion for current rootPlanId:",c),$.value&&typeof $.value.handlePlanCompleted=="function"){const k=oe.getCachedPlanRecord(c);console.log("[Direct] Calling chatRef.handlePlanCompleted with details:",k),$.value.handlePlanCompleted(k??{planId:c})}else console.warn("[Direct] chatRef.handlePlanCompleted method not available");o.value=null,console.log("[Direct] Cleared currentRootPlanId after plan completion")}},onDialogRoundStart:c=>{console.log("[Direct] Dialog round start event received for rootPlanId:",c),o.value=c,console.log("[Direct] Set currentRootPlanId to:",c),$.value&&typeof $.value.handleDialogRoundStart=="function"?(console.log("[Direct] Calling chatRef.handleDialogRoundStart with planId:",c),$.value.handleDialogRoundStart(c)):console.warn("[Direct] chatRef.handleDialogRoundStart method not available")},onChatInputClear:()=>{console.log("[Direct] Chat input clear event received"),L()},onChatInputUpdateState:c=>{if(console.log("[Direct] Chat input update state event received for rootPlanId:",c),!C(c,!0))return;const k=oe.getCachedUIState(c);k&&E(k.enabled,k.placeholder)},onPlanError:c=>{$.value.handlePlanError(c)}}),console.log("[Direct] Event callbacks registered to planExecutionManager"),m.loadPlanTemplateList(),u.hasUnprocessedTask()&&u.currentTask){const c=u.currentTask.prompt;console.log("[Direct] Found unprocessed task from store:",c),u.markTaskAsProcessed(),ne(()=>{$.value&&typeof $.value.handleSendMessage=="function"?(console.log("[Direct] Directly executing task via chatRef.handleSendMessage:",c),$.value.handleSendMessage(c)):(console.warn("[Direct] chatRef.handleSendMessage method not available, falling back to prompt"),_.value=c)})}else{const c=u.getAndClearTaskToInput();c?(x.value=c,console.log("[Direct] Setting inputOnlyContent for input only:",x.value)):(_.value=n.query.prompt||"",console.log("[Direct] Received task from URL:",_.value),console.log("[Direct] No unprocessed task in store"))}const v=localStorage.getItem("directPanelWidth");v&&(y.value=parseFloat(v)),console.log("[Direct] Final prompt value:",_.value),x.value&&ne(()=>{B.value&&typeof B.value.setInputValue=="function"&&(B.value.setInputValue(x.value),console.log("[Direct] Set input value:",x.value),x.value="")}),window.addEventListener("plan-execution-requested",c=>{console.log("[DirectView] Received plan-execution-requested event:",c.detail),re(c.detail)})}),$e(()=>u.currentTask,v=>{if(console.log("[Direct] Watch taskStore.currentTask triggered, newTask:",v),v&&!v.processed){const c=v.prompt;u.markTaskAsProcessed(),console.log("[Direct] Received new task from store:",c),ne(()=>{$.value&&typeof $.value.handleSendMessage=="function"?(console.log("[Direct] Directly executing new task via chatRef.handleSendMessage:",c),$.value.handleSendMessage(c)):console.warn("[Direct] chatRef.handleSendMessage method not available for new task")})}else console.log("[Direct] Task is null or already processed, ignoring")},{immediate:!1}),$e(()=>_.value,(v,c)=>{console.log("[Direct] prompt value changed from:",c,"to:",v)},{immediate:!1}),$e(()=>u.taskToInput,v=>{console.log("[Direct] Watch taskStore.taskToInput triggered, newTaskToInput:",v),v&&v.trim()&&(console.log("[Direct] Setting input value from taskToInput:",v),ne(()=>{B.value&&typeof B.value.setInputValue=="function"&&(B.value.setInputValue(v.trim()),console.log("[Direct] Input value set from taskToInput watch:",v.trim()),u.getAndClearTaskToInput())}))},{immediate:!1}),De(()=>{console.log("[Direct] onUnmounted called, cleaning up resources"),o.value=null,oe.cleanup(),document.removeEventListener("mousemove",Q),document.removeEventListener("mouseup",ce),window.removeEventListener("plan-execution-requested",v=>{re(v.detail)})});const O=v=>{K.value=!0,U.value=v.clientX,V.value=y.value,document.addEventListener("mousemove",Q),document.addEventListener("mouseup",ce),document.body.style.cursor="col-resize",document.body.style.userSelect="none",v.preventDefault()},Q=v=>{if(!K.value)return;const c=window.innerWidth,I=(v.clientX-U.value)/c*100;let a=V.value+I;a=Math.max(20,Math.min(80,a)),y.value=a},ce=()=>{K.value=!1,document.removeEventListener("mousemove",Q),document.removeEventListener("mouseup",ce),document.body.style.cursor="",document.body.style.userSelect="",localStorage.setItem("directPanelWidth",y.value.toString())},be=()=>{y.value=50,localStorage.setItem("directPanelWidth","50")},C=(v,c=!1)=>!o.value||v===o.value||c&&(v==="ui-state"||v==="error")?!0:(console.log("[Direct] Ignoring event for non-current rootPlanId:",v,"current:",o.value),!1),S=v=>{console.log("[DirectView] Send message from input:",v),$.value&&typeof $.value.handleSendMessage=="function"?(console.log("[DirectView] Calling chatRef.handleSendMessage:",v),$.value.handleSendMessage(v)):console.warn("[DirectView] chatRef.handleSendMessage method not available")},L=()=>{console.log("[DirectView] Input cleared"),B.value&&typeof B.value.clear=="function"&&B.value.clear()},R=()=>{console.log("[DirectView] Input focused")},E=(v,c)=>{console.log("[DirectView] Input state updated:",v,c),G.value=!v},A=(v,c)=>{console.log("[DirectView] Step selected:",v,c),F.value&&typeof F.value.handleStepSelected=="function"?(console.log("[DirectView] Forwarding step selection to right panel:",v,c),F.value.handleStepSelected(v,c)):console.warn("[DirectView] rightPanelRef.handleStepSelected method not available")},ee=(v,c,k,I)=>{console.log("[DirectView] Sub plan step selected:",{parentPlanId:v,subPlanId:c,stepIndex:k,subStepIndex:I}),F.value&&typeof F.value.handleSubPlanStepSelected=="function"?(console.log("[DirectView] Forwarding sub plan step selection to right panel:",{parentPlanId:v,subPlanId:c,stepIndex:k,subStepIndex:I}),F.value.handleSubPlanStepSelected(v,c,k,I)):console.warn("[DirectView] rightPanelRef.handleSubPlanStepSelected method not available")},se=()=>{console.log("[DirectView] Plan mode button clicked"),m.toggleSidebar(),console.log("[DirectView] Sidebar toggled, isCollapsed:",m.isCollapsed)},me=()=>{s.push("/home")},ke=()=>{s.push("/configs")},re=async v=>{var k,I,a,t;if(console.log("[DirectView] Plan execution requested:",v),X.value){console.log("[DirectView] Plan execution already in progress, ignoring request");return}X.value=!0;let c=!1;$.value&&typeof $.value.addMessage=="function"?(console.log("[DirectView] Calling chatRef.addMessage for plan execution:",v.title),$.value.addMessage("user",v.title),c=!0):console.warn("[DirectView] chatRef.addMessage method not available");try{const r=((k=v.planData)==null?void 0:k.planTemplateId)||((I=v.planData)==null?void 0:I.id)||((a=v.planData)==null?void 0:a.planId);if(!r)throw new Error("没有找到计划模板ID");console.log("[Direct] Executing plan with templateId:",r,"params:",v.params),console.log("[Direct] About to call PlanActApiService.executePlan");let d;if((t=v.params)!=null&&t.trim()?(console.log("[Direct] Calling executePlan with params:",v.params.trim()),d=await Ae.executePlan(r,v.params.trim())):(console.log("[Direct] Calling executePlan without params"),d=await Ae.executePlan(r)),console.log("[Direct] Plan execution API response:",d),d.planId)console.log("[Direct] Got planId from response:",d.planId,"starting plan execution"),o.value=d.planId,console.log("[Direct] Set currentRootPlanId to:",d.planId),console.log("[Direct] Delegating plan execution to planExecutionManager"),oe.handlePlanExecutionRequested(d.planId,v.title);else throw console.error("[Direct] No planId in response:",d),new Error("执行计划失败:未返回有效的计划ID")}catch(r){console.error("[Direct] Plan execution failed:",r),console.error("[Direct] Error details:",{message:r.message,stack:r.stack}),o.value=null,$.value&&typeof $.value.addMessage=="function"?(console.log("[Direct] Adding error messages to chat"),c||$.value.addMessage("user",v.title),$.value.addMessage("assistant",`执行计划失败: ${r.message||"未知错误"}`,{thinking:void 0})):(console.error("[Direct] Chat ref not available, showing alert"),alert(`执行计划失败: ${r.message||"未知错误"}`))}finally{console.log("[Direct] Plan execution finished, resetting isExecutingPlan flag"),X.value=!1}};return(v,c)=>(p(),g("div",ql,[e("div",Fl,[b(fn,{onPlanExecutionRequested:re}),e("div",{class:"left-panel",style:Ue({width:y.value+"%"})},[e("div",Ol,[e("button",{class:"back-button",onClick:me},[b(l(P),{icon:"carbon:arrow-left"})]),e("h2",null,i(v.$t("conversation")),1),e("div",Bl,[b(gt),e("button",{class:"config-button",onClick:ke,title:v.$t("direct.configuration")},[b(l(P),{icon:"carbon:settings-adjust",width:"20"})],8,Wl),e("button",{class:"cron-task-btn",onClick:c[0]||(c[0]=k=>h.value=!0),title:v.$t("cronTask.title")},[b(l(P),{icon:"carbon:alarm",width:"20"})],8,jl)])]),e("div",Hl,[b(pa,{ref_key:"chatRef",ref:$,mode:"direct","initial-prompt":_.value||"",onStepSelected:A,onSubPlanStepSelected:ee},null,8,["initial-prompt"])]),(p(),ue(_a,{key:v.$i18n.locale,ref_key:"inputRef",ref:B,disabled:G.value,placeholder:G.value?l(T)("input.waiting"):l(T)("input.placeholder"),"initial-value":_.value,onSend:S,onClear:L,onFocus:R,onUpdateState:E,onPlanModeClicked:se},null,8,["disabled","placeholder","initial-value"]))],4),e("div",{class:"panel-resizer",onMousedown:O,onDblclick:be,title:v.$t("direct.panelResizeHint")},c[2]||(c[2]=[e("div",{class:"resizer-line"},null,-1)]),40,zl),b(As,{ref_key:"rightPanelRef",ref:F,style:Ue({width:100-y.value+"%"})},null,8,["style"])]),b(Vl,{modelValue:h.value,"onUpdate:modelValue":c[1]||(c[1]=k=>h.value=k)},null,8,["modelValue"]),l(f).show?(p(),g("div",{key:0,class:te(["message-toast",l(f).type])},[e("div",Jl,[e("span",null,i(l(f).text),1)])],2)):q("",!0)]))}}),si=ye(Gl,[["__scopeId","data-v-ea79c7eb"]]);export{si as default}; diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-BSRSmj5D.css b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-Bve1G_0I.css similarity index 76% rename from spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-BSRSmj5D.css rename to spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-Bve1G_0I.css index 0bed525dba..a3ec3d9427 100644 --- a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-BSRSmj5D.css +++ b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-Bve1G_0I.css @@ -1 +1 @@ -.switch[data-v-d484b4a3]{position:relative;display:inline-flex;align-items:center;cursor:pointer}.switch input[data-v-d484b4a3]{opacity:0;width:0;height:0}.switch .slider[data-v-d484b4a3]{position:relative;display:inline-block;width:40px;height:20px;background:#ea66661a;border:1px solid rgba(234,102,102,.2);border-radius:20px;transition:all .3s;flex-shrink:0;vertical-align:middle}.switch .slider[data-v-d484b4a3]:before{position:absolute;content:"";height:16px;width:16px;left:2px;bottom:1px;background:#ea6666;border-radius:50%;transition:all .3s}.switch .switch-label[data-v-d484b4a3]{margin-left:8px;font-size:14px;line-height:20px;height:20px;color:#fff9;transition:color .3s}.switch .checkbox-label[data-v-d484b4a3]{display:flex;align-items:center;gap:8px;cursor:pointer}.switch .checkbox-label input[type=checkbox][data-v-d484b4a3]{width:16px;height:16px}.switch input:checked+.slider[data-v-d484b4a3]{background:#667eea1a;border-color:#667eea33}.switch input:checked+.slider[data-v-d484b4a3]:before{transform:translate(20px);background:#667eea}.switch input:checked+.slider+.switch-label[data-v-d484b4a3]{color:#667eea}.switch input:not(:checked)+.slider+.switch-label[data-v-d484b4a3]{color:#ea6666}.config-panel[data-v-5e6536ac]{position:relative}.config-header[data-v-5e6536ac]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.config-header h2[data-v-5e6536ac]{margin:0;font-size:20px;font-weight:500}.config-actions[data-v-5e6536ac]{display:flex;gap:12px}.loading-container[data-v-5e6536ac]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#ffffffb3}.loading-spinner[data-v-5e6536ac]{width:20px;height:20px;border:2px solid rgba(255,255,255,.3);border-top:2px solid #667eea;border-radius:50%;animation:spin-5e6536ac 1s linear infinite;margin-bottom:16px}@keyframes spin-5e6536ac{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.config-groups[data-v-5e6536ac]{display:flex;flex-direction:column;gap:32px}.config-group[data-v-5e6536ac]{background:#ffffff08;border-radius:12px;padding:24px;border:1px solid rgba(255,255,255,.1);transition:all .3s ease}.config-group[data-v-5e6536ac]:hover{background:#ffffff0d;border-color:#ffffff26}.group-header[data-v-5e6536ac]{display:flex;align-items:center;margin-bottom:20px;padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,.1)}.group-icon[data-v-5e6536ac]{font-size:20px;margin-right:12px;opacity:.8}.group-divider[data-v-5e6536ac]{flex:1;height:1px;background:linear-gradient(90deg,rgba(255,255,255,.1) 0%,transparent 100%);margin-left:16px}.config-items[data-v-5e6536ac]{display:flex;flex-direction:column;gap:20px;padding:16px}.config-item[data-v-5e6536ac]{position:relative;border:1px solid rgba(255,255,255,.08);border-radius:8px;margin-bottom:16px;transition:all .3s ease}.config-item[data-v-5e6536ac]:hover{border-color:#ffffff26;background:#ffffff05}.config-item.modified[data-v-5e6536ac]{border-left:3px solid #f9a825}.config-item-content[data-v-5e6536ac]{padding:14px 16px;display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.config-item-content.vertical-layout[data-v-5e6536ac]{flex-direction:column;align-items:stretch;gap:12px}.config-item-content.vertical-layout .config-item-info[data-v-5e6536ac]{width:100%}.config-item-content.vertical-layout .config-control[data-v-5e6536ac]{width:100%;min-width:auto}.config-item-header[data-v-5e6536ac]{display:flex;flex-direction:column;gap:6px}.config-item-info[data-v-5e6536ac]{flex:1;min-width:0}.config-label[data-v-5e6536ac]{font-weight:500;color:#ffffffe6;margin-bottom:4px;display:flex;align-items:center;flex-wrap:wrap;gap:8px}.vertical-layout .config-label[data-v-5e6536ac]{margin-bottom:0;font-size:14px;line-height:1.4}.config-key[data-v-5e6536ac]{display:block;font-size:12px;color:#ffffff80;margin-bottom:6px;font-family:monospace;background:#ffffff0d;padding:2px 6px;border-radius:4px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vertical-layout .config-key[data-v-5e6536ac]{margin-bottom:0;display:inline-block;max-width:fit-content}.config-description[data-v-5e6536ac]{font-size:13px;color:#ffffffb3;margin:6px 0;line-height:1.4}.type-badge[data-v-5e6536ac]{font-size:12px;padding:2px 6px;border-radius:3px;color:#ffffffe6;font-weight:400}.type-badge.boolean[data-v-5e6536ac]{background:#2196f333;color:#90caf9}.type-badge.number[data-v-5e6536ac]{background:#4caf5033;color:#a5d6a7}.type-badge.string[data-v-5e6536ac]{background:#9c27b033;color:#ce93d8}.type-badge.select[data-v-5e6536ac]{background:#ff980033;color:#ffcc80}.modified-badge[data-v-5e6536ac]{background:#f9a82533;color:#ffcc80;font-size:12px;padding:2px 6px;border-radius:3px;font-weight:400}.range-info[data-v-5e6536ac]{font-size:12px;color:#fff9;background:#ffffff0d;padding:3px 8px;border-radius:4px;display:inline-block;margin-top:6px;font-family:monospace}.config-control[data-v-5e6536ac]{min-width:160px}.vertical-layout .config-control[data-v-5e6536ac]{min-width:auto;max-width:400px}.config-input[data-v-5e6536ac]{width:100%;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:4px;padding:8px 12px;color:#ffffffe6;transition:all .3s}.config-input[data-v-5e6536ac]:focus{outline:none;border-color:#667eea80;background:#ffffff14}.config-input[data-v-5e6536ac]::placeholder{color:#fff6}.config-input.number-input[data-v-5e6536ac]{font-family:monospace;text-align:right}.empty-state[data-v-5e6536ac]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#ffffff80}.message-toast[data-v-5e6536ac]{position:fixed;top:20px;right:20px;padding:12px 20px;border-radius:8px;color:#fff;font-weight:500;z-index:1000;box-shadow:0 4px 12px #0000004d;transform:translate(100%);animation:slide-in-5e6536ac .3s ease-out forwards}.message-toast.success[data-v-5e6536ac]{background:#10b981}.message-toast.error[data-v-5e6536ac]{background:#ef4444}.message-fade-enter-active[data-v-5e6536ac],.message-fade-leave-active[data-v-5e6536ac]{transition:all .3s ease}.message-fade-enter-from[data-v-5e6536ac],.message-fade-leave-to[data-v-5e6536ac]{transform:translate(100%);opacity:0}@keyframes slide-in-5e6536ac{0%{transform:translate(100%)}to{transform:translate(0)}}.sub-group[data-v-5e6536ac]{margin-bottom:24px;border:1px solid rgba(255,255,255,.1);border-radius:8px;overflow:hidden;background:#ffffff05}.sub-group-header[data-v-5e6536ac]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#ffffff0d;cursor:pointer;-webkit-user-select:none;user-select:none;transition:all .3s ease}.sub-group-header[data-v-5e6536ac]:hover{background:#ffffff14}.sub-group-info[data-v-5e6536ac]{display:flex;align-items:center;gap:8px}.sub-group-icon[data-v-5e6536ac]{font-size:14px}.sub-group-title[data-v-5e6536ac]{margin:0;font-size:14px;font-weight:500;color:#ffffffe6}.item-count[data-v-5e6536ac]{font-size:12px;color:#fff9;background:#ffffff1a;padding:2px 6px;border-radius:10px}.collapse-icon[data-v-5e6536ac]{font-size:12px;color:#fff9;transition:transform .3s ease}.collapse-icon.collapsed[data-v-5e6536ac]{transform:rotate(-90deg)}.config-stats[data-v-5e6536ac]{margin-top:24px;color:#fff9}.header-left[data-v-5e6536ac],.header-right[data-v-5e6536ac]{display:flex;align-items:center}.config-stats[data-v-5e6536ac]{display:flex;margin-left:16px;gap:12px}.stat-item[data-v-5e6536ac]{display:flex;align-items:center;background:#ffffff0d;padding:4px 8px;border-radius:4px;font-size:12px}.stat-label[data-v-5e6536ac]{color:#fff9;margin-right:4px}.stat-value[data-v-5e6536ac]{color:#ffffffe6;font-weight:500}.stat-value.modified[data-v-5e6536ac]{color:#f9a825}.search-box[data-v-5e6536ac]{position:relative;margin-right:16px}.search-input[data-v-5e6536ac]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:4px;padding:6px 12px 6px 32px;color:#ffffffe6;width:220px;font-size:14px;transition:all .3s}.search-input[data-v-5e6536ac]:focus{outline:none;border-color:#667eea80;background:#ffffff14;width:260px}.search-input[data-v-5e6536ac]::placeholder{color:#fff6}.search-icon[data-v-5e6536ac]{position:absolute;left:10px;top:50%;transform:translateY(-50%);font-size:14px;opacity:.6}.toggle-btn[data-v-5e6536ac]{background:#ffffff1a;border:1px solid rgba(255,255,255,.2);border-radius:4px;color:#ffffffb3;padding:6px 12px;margin-right:12px;font-size:14px;cursor:pointer;transition:all .3s}.toggle-btn[data-v-5e6536ac]:hover{background:#ffffff26;color:#ffffffe6}.toggle-btn.active[data-v-5e6536ac]{background:#667eea33;border-color:#667eea80;color:#667eea}.group-info[data-v-5e6536ac]{display:flex;align-items:center}.group-actions[data-v-5e6536ac]{display:flex;gap:8px;margin-left:auto;margin-right:16px}.reset-btn[data-v-5e6536ac]{background:#f443361a;border:1px solid rgba(244,67,54,.3);border-radius:4px;color:#ef5350;padding:4px 8px;font-size:12px;cursor:pointer;transition:all .3s}.reset-btn[data-v-5e6536ac]:hover:not(:disabled){background:#f4433633;border-color:#f4433680}.reset-btn[data-v-5e6536ac]:disabled{opacity:.5;cursor:not-allowed}.import-export-actions[data-v-5e6536ac]{display:flex;gap:8px;margin-right:16px}.action-btn[data-v-5e6536ac]{background:#ffffff14;border:1px solid rgba(255,255,255,.15);border-radius:4px;color:#fffc;padding:6px 10px;font-size:12px;cursor:pointer;transition:all .3s;text-decoration:none;display:inline-flex;align-items:center;gap:4px}.action-btn[data-v-5e6536ac]:hover{background:#ffffff1f;color:#fffffff2;border-color:#ffffff40}.config-config[data-v-c91688e7]{height:100%;overflow:hidden;display:flex;flex-direction:column}.panel-header[data-v-c91688e7]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;padding-bottom:20px;border-bottom:1px solid rgba(255,255,255,.1)}.panel-actions[data-v-c91688e7]{display:flex;gap:12px}[data-v-c91688e7] .panel-header h2{margin-bottom:0!important}.modal-overlay[data-v-baaf1c89]{position:fixed;top:0;left:0;width:100%;height:100%;background:#000000b3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:1000}.modal-container[data-v-baaf1c89]{background:linear-gradient(135deg,#667eea1a,#764ba226);border:1px solid rgba(255,255,255,.1);border-radius:16px;width:90%;max-width:600px;max-height:90vh;overflow-y:auto;box-shadow:0 8px 32px #0006}.modal-header[data-v-baaf1c89]{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid rgba(255,255,255,.1)}.modal-header h3[data-v-baaf1c89]{margin:0;font-size:18px;font-weight:500;color:#ffffffe6}.close-btn[data-v-baaf1c89]{background:none;border:none;color:#fff9;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;transition:all .3s}.close-btn[data-v-baaf1c89]:hover{color:#ffffffe6}.modal-content[data-v-baaf1c89]{padding:24px}.modal-footer[data-v-baaf1c89]{padding:20px 24px;border-top:1px solid rgba(255,255,255,.1);display:flex;justify-content:flex-end;gap:12px}.cancel-btn[data-v-baaf1c89],.confirm-btn[data-v-baaf1c89]{padding:8px 16px;border-radius:6px;font-size:14px;cursor:pointer;transition:all .3s}.cancel-btn[data-v-baaf1c89]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);color:#fffc}.cancel-btn[data-v-baaf1c89]:hover{background:#ffffff1a}.confirm-btn[data-v-baaf1c89]{background:#667eea1a;border:1px solid rgba(102,126,234,.2);color:#667eea}.confirm-btn[data-v-baaf1c89]:hover{background:#667eea33}.modal-enter-active[data-v-baaf1c89],.modal-leave-active[data-v-baaf1c89]{transition:opacity .3s ease}.modal-enter-from[data-v-baaf1c89],.modal-leave-to[data-v-baaf1c89]{opacity:0}.tool-selection-content[data-v-79f6a572]{min-height:400px;max-height:600px;overflow-y:auto}.tool-controls[data-v-79f6a572]{display:flex;gap:12px;margin-bottom:16px;padding:12px;background:#ffffff0d;border-radius:8px;border:1px solid rgba(255,255,255,.1)}.search-container[data-v-79f6a572]{flex:1}.search-input[data-v-79f6a572]{width:100%;padding:8px 12px;border:1px solid rgba(255,255,255,.2);border-radius:6px;background:#ffffff0d;color:#ffffffe6;font-size:14px;transition:all .3s}.search-input[data-v-79f6a572]:focus{outline:none;border-color:#667eea80;background:#ffffff1a}.search-input[data-v-79f6a572]::placeholder{color:#ffffff80}.sort-container[data-v-79f6a572]{min-width:140px}.sort-select[data-v-79f6a572]{width:100%;padding:8px 12px;border:1px solid rgba(255,255,255,.2);border-radius:6px;background:#ffffff0d;color:#ffffffe6;font-size:14px;cursor:pointer}.tool-summary[data-v-79f6a572]{margin-bottom:16px;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.1)}.summary-text[data-v-79f6a572]{color:#ffffffb3;font-size:13px}.tool-group[data-v-79f6a572]{border:1px solid rgba(255,255,255,.1);border-radius:8px;overflow:hidden;margin-bottom:8px}.tool-group-header[data-v-79f6a572]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#ffffff0d;cursor:pointer;transition:all .3s;border-bottom:1px solid rgba(255,255,255,.1)}.tool-group-header[data-v-79f6a572]:hover{background:#ffffff14}.tool-group-header.collapsed[data-v-79f6a572]{border-bottom:none}.group-title-area[data-v-79f6a572]{display:flex;align-items:center;gap:8px;flex:1}.collapse-icon[data-v-79f6a572]{color:#fff9;transition:transform .3s}.group-icon[data-v-79f6a572]{color:#fffc}.group-name[data-v-79f6a572]{font-weight:500;color:#ffffffe6}.group-count[data-v-79f6a572]{color:#fff9;font-size:13px}.group-actions[data-v-79f6a572]{display:flex;align-items:center}.group-enable-all[data-v-79f6a572]{display:flex;align-items:center;gap:6px;cursor:pointer;color:#fffc;font-size:13px}.group-enable-checkbox[data-v-79f6a572]{cursor:pointer}.tool-group-content[data-v-79f6a572]{max-height:300px;overflow-y:auto;transition:all .3s}.tool-group-content.collapsed[data-v-79f6a572]{max-height:0;overflow:hidden}.tool-selection-item[data-v-79f6a572]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid rgba(255,255,255,.05);transition:background-color .3s}.tool-selection-item[data-v-79f6a572]:hover{background:#ffffff08}.tool-selection-item[data-v-79f6a572]:last-child{border-bottom:none}.tool-info[data-v-79f6a572]{flex:1}.tool-selection-name[data-v-79f6a572]{font-weight:500;color:#ffffffe6;margin-bottom:4px}.tool-selection-desc[data-v-79f6a572]{color:#fff9;font-size:13px;line-height:1.4}.tool-actions[data-v-79f6a572]{margin-left:12px}.tool-enable-switch[data-v-79f6a572]{position:relative;display:inline-block;width:44px;height:24px;cursor:pointer}.tool-enable-checkbox[data-v-79f6a572]{opacity:0;width:0;height:0}.tool-enable-slider[data-v-79f6a572]{position:absolute;top:0;left:0;right:0;bottom:0;background:#fff3;border-radius:24px;transition:all .3s}.tool-enable-slider[data-v-79f6a572]:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background:#fff;border-radius:50%;transition:all .3s}.tool-enable-checkbox:checked+.tool-enable-slider[data-v-79f6a572]{background:#667eeacc}.tool-enable-checkbox:checked+.tool-enable-slider[data-v-79f6a572]:before{transform:translate(20px)}.empty-state[data-v-79f6a572]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#ffffff80}.empty-icon[data-v-79f6a572]{font-size:48px;margin-bottom:16px;opacity:.6}.agent-layout[data-v-0eaff650]{display:flex;gap:30px;flex:1;min-height:0}.agent-list[data-v-0eaff650]{width:320px;flex-shrink:0;display:flex;flex-direction:column}.list-header[data-v-0eaff650]{display:flex;align-items:center;gap:8px;margin-bottom:16px}.list-header h3[data-v-0eaff650]{margin:0;font-size:18px}.agent-count[data-v-0eaff650]{color:#fff9;font-size:14px}.agents-container[data-v-0eaff650]{flex:1;overflow-y:auto;margin-bottom:16px}.loading-state[data-v-0eaff650]{display:flex;align-items:center;gap:8px;justify-content:center;padding:40px 0;color:#fff9}.empty-state[data-v-0eaff650]{text-align:center;padding:60px 20px;color:#fff9}.empty-icon[data-v-0eaff650]{font-size:48px;margin-bottom:16px;opacity:.4}.empty-tip[data-v-0eaff650]{font-size:14px;margin-top:8px}.agent-card[data-v-0eaff650]{background:#ffffff08;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:16px;margin-bottom:12px;cursor:pointer;transition:all .3s ease}.agent-card[data-v-0eaff650]:hover{background:#ffffff0d;border-color:#fff3}.agent-card.active[data-v-0eaff650]{border-color:#667eea;background:#667eea1a}.agent-card-header[data-v-0eaff650]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.agent-name[data-v-0eaff650]{font-weight:500;font-size:16px}.agent-desc[data-v-0eaff650]{color:#ffffffb3;font-size:14px;line-height:1.4;margin-bottom:12px}.agent-model[data-v-0eaff650]{display:flex;flex-wrap:wrap;gap:6px}.model-tag[data-v-0eaff650]{display:inline-block;padding:4px 8px;margin-bottom:10px;background:#b566ea33;border-radius:4px;font-size:12px;color:#a8b3ff}.agent-tools[data-v-0eaff650]{display:flex;flex-wrap:wrap;gap:6px}.tool-tag[data-v-0eaff650]{display:inline-block;padding:4px 8px;background:#667eea33;border-radius:4px;font-size:12px;color:#a8b3ff}.tool-more[data-v-0eaff650]{color:#ffffff80;font-size:12px;padding:4px 8px}.no-tools-indicator[data-v-0eaff650]{color:#fff6;font-size:12px;font-style:italic}.add-btn[data-v-0eaff650]{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:16px;background:#ffffff08;border:1px dashed rgba(255,255,255,.2);border-radius:8px;color:#fffc;cursor:pointer;transition:all .3s ease;font-size:14px}.add-btn[data-v-0eaff650]:hover{background:#ffffff0d;border-color:#ffffff4d;color:#fff}.agent-detail[data-v-0eaff650]{flex:1;background:#ffffff08;border-radius:12px;padding:24px;overflow-y:auto}.no-selection[data-v-0eaff650]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#fff9}.placeholder-icon[data-v-0eaff650]{font-size:64px;margin-bottom:24px;opacity:.3}.detail-header[data-v-0eaff650]{display:flex;justify-content:space-between;align-items:center;margin-bottom:32px;padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,.1)}.detail-header h3[data-v-0eaff650]{margin:0;font-size:20px}.detail-actions[data-v-0eaff650]{display:flex;gap:12px}.form-section[data-v-0eaff650]{margin-bottom:32px}.form-item[data-v-0eaff650]{margin-bottom:20px}.form-item label[data-v-0eaff650]{display:block;margin-bottom:8px;color:#ffffffe6;font-weight:500}.form-item input[data-v-0eaff650],.form-item textarea[data-v-0eaff650]{width:100%;padding:12px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;color:#fff;font-size:14px;transition:all .3s ease}.form-item input[data-v-0eaff650]:focus,.form-item textarea[data-v-0eaff650]:focus{border-color:#667eea;outline:none;background:#ffffff14}.form-item input[data-v-0eaff650]::placeholder,.form-item textarea[data-v-0eaff650]::placeholder{color:#fff6}.form-item textarea[data-v-0eaff650]{resize:vertical;min-height:80px;line-height:1.5}.required[data-v-0eaff650]{color:#ff6b6b}.model-section h4[data-v-0eaff650],.tools-section h4[data-v-0eaff650]{margin:0 0 20px;font-size:18px;color:#ffffffe6}.section-header[data-v-0eaff650]{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.section-header span[data-v-0eaff650]{font-weight:500;color:#fffc}.tools-grid[data-v-0eaff650]{display:flex;flex-direction:column;gap:8px}.tool-item[data-v-0eaff650]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;transition:all .3s ease}.tool-item.assigned[data-v-0eaff650]{border-color:#667eea4d;background:#667eea1a}.tool-info[data-v-0eaff650]{flex:1}.tool-info .tool-name[data-v-0eaff650]{display:block;font-weight:500;margin-bottom:4px}.tool-info .tool-desc[data-v-0eaff650]{font-size:12px;color:#fff9;line-height:1.3}.no-tools[data-v-0eaff650]{display:flex;align-items:center;justify-content:center;gap:8px;padding:40px;color:#fff6;font-style:italic}.action-btn[data-v-0eaff650]{display:flex;align-items:center;gap:6px;padding:10px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#fff;cursor:pointer;transition:all .3s ease;font-size:14px}.action-btn[data-v-0eaff650]:hover:not(:disabled){background:#ffffff1a;border-color:#fff3}.action-btn[data-v-0eaff650]:disabled{opacity:.5;cursor:not-allowed}.action-btn.primary[data-v-0eaff650]{background:#667eea33;border-color:#667eea4d;color:#a8b3ff}.action-btn.primary[data-v-0eaff650]:hover:not(:disabled){background:#667eea4d}.action-btn.danger[data-v-0eaff650]{background:#ea66661a;border-color:#ea666633;color:#ff8a8a}.action-btn.danger[data-v-0eaff650]:hover:not(:disabled){background:#ea666633}.action-btn.small[data-v-0eaff650]{padding:6px 12px;font-size:12px}.modal-form[data-v-0eaff650]{display:flex;flex-direction:column;gap:16px}.delete-confirm[data-v-0eaff650]{text-align:center;padding:20px 0}.delete-confirm p[data-v-0eaff650]{color:#fffc;margin:8px 0}.delete-confirm .warning-text[data-v-0eaff650]{color:#fff9;font-size:14px}.warning-icon[data-v-0eaff650]{font-size:48px;color:#ffa726;margin-bottom:16px}.confirm-btn[data-v-0eaff650],.cancel-btn[data-v-0eaff650]{padding:10px 20px;border-radius:6px;cursor:pointer;transition:all .3s ease}.confirm-btn.danger[data-v-0eaff650],.cancel-btn.danger[data-v-0eaff650]{background:#ea666633;border:1px solid rgba(234,102,102,.3);color:#ff8a8a}.confirm-btn.danger[data-v-0eaff650]:hover,.cancel-btn.danger[data-v-0eaff650]:hover{background:#ea66664d}.cancel-btn[data-v-0eaff650]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);color:#fff}.cancel-btn[data-v-0eaff650]:hover{background:#ffffff1a}.error-toast[data-v-0eaff650],.success-toast[data-v-0eaff650]{position:fixed;top:20px;right:20px;display:flex;align-items:center;gap:8px;padding:12px 16px;border-radius:8px;color:#fff;cursor:pointer;z-index:1000;animation:slideIn-0eaff650 .3s ease}.error-toast[data-v-0eaff650]{background:#ea6666e6;border:1px solid rgba(234,102,102,.5)}.success-toast[data-v-0eaff650]{background:#66ea66e6;border:1px solid rgba(102,234,102,.5)}@keyframes slideIn-0eaff650{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}.model-chooser[data-v-0eaff650]{position:relative;display:inline-block}.model-btn[data-v-0eaff650]{display:flex;align-items:center;gap:6px;padding:8px 12px;background:transparent;border:1.5px solid #667eea;border-radius:8px;color:#8da2fb;cursor:pointer;transition:all .2s ease;font-size:14px;font-weight:600;outline:none}.model-btn[data-v-0eaff650]:hover{background:#667eea26;border-color:#7c9eff;color:#a3bffa;box-shadow:0 0 15px #667eea33}.model-btn[data-v-0eaff650]:focus{box-shadow:0 0 0 3px #667eea80}.current-model[data-v-0eaff650]{color:inherit;font-weight:600;min-width:40px;text-align:left;text-shadow:none}.chevron[data-v-0eaff650]{transition:transform .3s cubic-bezier(.4,0,.2,1);opacity:.9;filter:none}.model-dropdown[data-v-0eaff650]{position:absolute;top:100%;left:0;z-index:9999;margin-top:4px;background:linear-gradient(135deg,#282832f2,#1e1e28f2);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid rgba(102,126,234,.3);border-radius:8px;box-shadow:0 8px 32px #0006,0 0 0 1px #667eea33;min-width:300px;animation:slideDown-0eaff650 .2s ease}.dropdown-header[data-v-0eaff650]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid rgba(102,126,234,.2);font-size:14px;font-weight:600;color:#fff;background:linear-gradient(135deg,#667eea1a,#667eea0d)}.close-btn[data-v-0eaff650]{background:none;border:none;color:#fff9;cursor:pointer;padding:4px;border-radius:4px;transition:all .2s ease}.close-btn[data-v-0eaff650]:hover{background:#ffffff1a;color:#fffc}.model-options[data-v-0eaff650]{padding:8px 0}.model-option[data-v-0eaff650]{display:flex;align-items:center;gap:12px;width:100%;padding:10px 16px;background:none;border:none;color:#ffffffb3;cursor:pointer;transition:all .2s ease;text-align:left}.model-option[data-v-0eaff650]:hover{background:#ffffff0d;color:#ffffffe6}.model-option.active[data-v-0eaff650]{background:linear-gradient(135deg,#667eea33,#667eea1a);color:#7c9eff;border-left:3px solid #667eea;padding-left:13px}.model-type[data-v-0eaff650]{display:inline-block;min-width:24px;font-size:12px;font-weight:600;opacity:.8}.model-name[data-v-0eaff650]{flex:1;font-size:14px;font-weight:500}.check-icon[data-v-0eaff650]{color:#667eea;opacity:.8}.spacer[data-v-0eaff650]{display:inline-block;width:12px}.backdrop[data-v-0eaff650]{position:fixed;top:0;left:0;right:0;bottom:0;z-index:9998;background:transparent}@keyframes slideDown-0eaff650{0%{opacity:0;transform:translateY(-8px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}.multi-language-content[data-v-0eaff650]{display:flex;flex-direction:column;gap:20px;padding:20px 0}.stats-section[data-v-0eaff650]{display:flex;gap:20px;padding:15px;background:#ffffff0d;border-radius:8px;border:1px solid rgba(255,255,255,.1)}.stat-item[data-v-0eaff650]{display:flex;flex-direction:column;gap:5px}.stat-label[data-v-0eaff650]{font-size:12px;color:#fff9;text-transform:uppercase;letter-spacing:.5px}.stat-value[data-v-0eaff650]{font-size:16px;font-weight:600;color:#fff}.language-selection[data-v-0eaff650]{display:flex;flex-direction:column;gap:10px}.selection-label[data-v-0eaff650]{font-size:14px;font-weight:500;color:#fffc}.language-select[data-v-0eaff650]{padding:10px 12px;background:#ffffff1a;border:1px solid rgba(255,255,255,.2);border-radius:6px;color:#fff;font-size:14px;outline:none;transition:all .2s ease}.language-select[data-v-0eaff650]:focus{border-color:#007acc;background:#ffffff26}.language-select option[data-v-0eaff650]{background:#2d2d2d;color:#fff}.warning-section[data-v-0eaff650]{margin:10px 0}.warning-box[data-v-0eaff650]{display:flex;align-items:flex-start;gap:12px;padding:15px;background:#ffc1071a;border:1px solid rgba(255,193,7,.3);border-radius:8px}.warning-icon[data-v-0eaff650]{color:#ffc107;font-size:20px;flex-shrink:0;margin-top:2px}.warning-text[data-v-0eaff650]{flex:1}.warning-text p[data-v-0eaff650]{margin:0;color:#ffffffe6;font-size:14px;line-height:1.5}.loading-icon[data-v-0eaff650]{animation:spin-0eaff650 1s linear infinite}@keyframes spin-0eaff650{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (max-width: 768px){.model-dropdown[data-v-0eaff650]{right:-8px;left:-8px;width:auto;min-width:auto}.model-btn[data-v-0eaff650]{padding:6px 10px;font-size:13px}.current-model[data-v-0eaff650]{min-width:35px}}@media (prefers-color-scheme: light){.model-dropdown[data-v-0eaff650]{background:#fffffff2;border-color:#0000001a;box-shadow:0 8px 32px #0000001a}.dropdown-header[data-v-0eaff650]{color:#000c;border-bottom-color:#0000001a}.close-btn[data-v-0eaff650]{color:#0009}.close-btn[data-v-0eaff650]:hover{background:#0000001a;color:#000c}.model-option[data-v-0eaff650]{color:#000000b3}.model-option[data-v-0eaff650]:hover{background:#0000000d;color:#000000e6}}.custom-select[data-v-579d8359]{position:relative;display:inline-block}.select-btn[data-v-579d8359]{display:flex;align-items:center;gap:6px;padding:8px 12px;background:transparent;border:1.5px solid #667eea;border-radius:8px;color:#8da2fb;cursor:pointer;transition:all .2s ease;font-size:14px;font-weight:600;outline:none}.select-btn[data-v-579d8359]:hover{background:#667eea26;border-color:#7c9eff;color:#a3bffa;box-shadow:0 0 15px #667eea33}.select-btn[data-v-579d8359]:focus{box-shadow:0 0 0 3px #667eea80}.current-option[data-v-579d8359]{color:inherit;font-weight:600;min-width:40px;text-align:left;text-shadow:none;display:flex;align-items:center;gap:0}.current-option .option-icon[data-v-579d8359]{color:inherit;opacity:.8}.chevron[data-v-579d8359]{transition:transform .3s cubic-bezier(.4,0,.2,1);opacity:.9;filter:none}.select-dropdown[data-v-579d8359]{position:absolute;top:100%;z-index:99999;margin-top:4px;background:linear-gradient(135deg,#282832f2,#1e1e28f2);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid rgba(102,126,234,.3);border-radius:8px;box-shadow:0 8px 32px #0006,0 0 0 1px #667eea33;min-width:300px}.select-dropdown.dropdown-top[data-v-579d8359]{top:auto;bottom:100%;margin-top:0;margin-bottom:4px}.dropdown-header[data-v-579d8359]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid rgba(102,126,234,.2);font-size:14px;font-weight:600;color:#fff;background:linear-gradient(135deg,#667eea1a,#667eea0d)}.close-btn[data-v-579d8359]{background:none;border:none;color:#fff9;cursor:pointer;padding:4px;border-radius:4px;transition:all .2s ease}.close-btn[data-v-579d8359]:hover{background:#ffffff1a;color:#fffc}.select-options[data-v-579d8359]{padding:8px 0}.select-option[data-v-579d8359]{display:flex;align-items:center;gap:0;width:100%;padding:10px 16px;background:none;border:none;color:#ffffffb3;cursor:pointer;transition:all .2s ease;text-align:left}.select-option[data-v-579d8359]:hover{background:#ffffff0d;color:#ffffffe6}.select-option.active[data-v-579d8359]{background:linear-gradient(135deg,#667eea33,#667eea1a);color:#7c9eff;border-left:3px solid #667eea;padding-left:13px}.option-type[data-v-579d8359]{display:inline-block;min-width:24px;font-size:12px;font-weight:600;opacity:.8}.option-name[data-v-579d8359]{flex:1;font-size:14px;font-weight:500}.option-icon[data-v-579d8359]{color:#fff9;margin-right:0}.check-icon[data-v-579d8359]{color:#667eea;opacity:.8}.spacer[data-v-579d8359]{display:inline-block;width:12px}.backdrop[data-v-579d8359]{position:fixed;top:0;left:0;right:0;bottom:0;z-index:99998;background:transparent}.slideDown-enter-active[data-v-579d8359],.slideDown-leave-active[data-v-579d8359]{transition:all .2s ease;transform-origin:top}.slideDown-enter-from[data-v-579d8359],.slideDown-leave-to[data-v-579d8359]{opacity:0;transform:translateY(-8px) scale(.95)}.grouped-select[data-v-8fbda373]{position:relative;width:100%}.select-btn[data-v-8fbda373]{width:100%;padding:12px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;color:#ffffffe6;cursor:pointer;display:flex;align-items:center;justify-content:space-between;transition:all .3s ease;font-size:14px}.select-btn[data-v-8fbda373]:hover{background:#ffffff1a;border-color:#fff3}.selected-text[data-v-8fbda373]{display:flex;align-items:center;gap:8px;flex:1}.placeholder-text[data-v-8fbda373]{color:#ffffff80;flex:1}.model-category[data-v-8fbda373]{color:#a8b3ff;font-size:12px;font-weight:500}.chevron[data-v-8fbda373]{color:#fff9;transition:transform .3s ease}.chevron.rotated[data-v-8fbda373]{transform:rotate(180deg)}.dropdown-overlay[data-v-8fbda373]{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999}.dropdown-content[data-v-8fbda373]{position:absolute;top:100%;left:0;right:0;background:#1a1a1a;border:1px solid rgba(255,255,255,.1);border-radius:8px;box-shadow:0 8px 32px #0006;z-index:1000;max-height:500px;overflow:hidden;display:flex;flex-direction:column}.dropdown-header[data-v-8fbda373]{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid rgba(255,255,255,.1)}.dropdown-header h3[data-v-8fbda373]{margin:0;color:#ffffffe6;font-size:16px;font-weight:600}.close-btn[data-v-8fbda373]{background:none;border:none;color:#fff9;cursor:pointer;padding:4px;border-radius:4px;transition:all .3s ease}.close-btn[data-v-8fbda373]:hover{background:#ffffff1a;color:#ffffffe6}.search-container[data-v-8fbda373]{position:relative;padding:12px 16px;border-bottom:1px solid rgba(255,255,255,.1)}.search-input[data-v-8fbda373]{width:100%;padding:8px 12px 8px 36px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#ffffffe6;font-size:14px;outline:none;transition:all .3s ease}.search-input[data-v-8fbda373]:focus{border-color:#a8b3ff;background:#ffffff1a}.search-input[data-v-8fbda373]::placeholder{color:#ffffff80}.search-icon[data-v-8fbda373]{position:absolute;left:24px;top:50%;transform:translateY(-50%);color:#ffffff80;font-size:16px}.groups-container[data-v-8fbda373]{flex:1;overflow-y:auto;padding:8px}.model-group[data-v-8fbda373]{margin-bottom:16px}.group-header[data-v-8fbda373]{display:flex;align-items:center;gap:8px;margin-bottom:8px;padding:0 8px}.group-title[data-v-8fbda373]{color:#a8b3ff;font-weight:600;font-size:14px}.group-count[data-v-8fbda373]{color:#ffffff80;font-size:12px}.models-grid[data-v-8fbda373]{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px;padding:0 8px}.model-option[data-v-8fbda373]{display:flex;flex-direction:column;align-items:flex-start;padding:12px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#ffffffe6;cursor:pointer;transition:all .3s ease;text-align:left;min-height:60px}.model-option[data-v-8fbda373]:hover{background:#ffffff1a;border-color:#fff3}.model-option.selected[data-v-8fbda373]{background:#a8b3ff33;border-color:#a8b3ff}.model-info[data-v-8fbda373]{flex:1;width:100%}.model-name[data-v-8fbda373]{font-weight:500;font-size:14px;margin-bottom:4px;color:#ffffffe6}.model-description[data-v-8fbda373]{font-size:12px;color:#fff9;line-height:1.3}.model-category-tag[data-v-8fbda373]{align-self:flex-end;color:#a8b3ff;font-size:11px;font-weight:500;margin-top:4px}@media (max-width: 768px){.models-grid[data-v-8fbda373]{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}}@media (max-width: 480px){.models-grid[data-v-8fbda373]{grid-template-columns:1fr}}.model-layout[data-v-31d9fbd5]{display:flex;gap:30px;flex:1;min-height:0}.model-list[data-v-31d9fbd5]{width:320px;flex-shrink:0;display:flex;flex-direction:column}.list-header[data-v-31d9fbd5]{display:flex;align-items:center;gap:8px;margin-bottom:16px}.list-header h3[data-v-31d9fbd5]{margin:0;font-size:18px}.model-count[data-v-31d9fbd5]{color:#fff9;font-size:14px}.models-container[data-v-31d9fbd5]{flex:1;overflow-y:auto;margin-bottom:16px}.loading-state[data-v-31d9fbd5]{display:flex;align-items:center;gap:8px;justify-content:center;padding:40px 0;color:#fff9}.empty-state[data-v-31d9fbd5]{text-align:center;padding:60px 20px;color:#fff9}.empty-icon[data-v-31d9fbd5]{font-size:48px;margin-bottom:16px;opacity:.4}.model-card[data-v-31d9fbd5]{background:#ffffff08;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:16px;margin-bottom:12px;cursor:pointer;transition:all .3s ease}.model-card[data-v-31d9fbd5]:hover{background:#ffffff0d;border-color:#fff3}.model-card.active[data-v-31d9fbd5]{border-color:#667eea;background:#667eea1a}.model-card-header[data-v-31d9fbd5]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.model-name[data-v-31d9fbd5]{font-weight:500;font-size:16px}.model-desc[data-v-31d9fbd5]{color:#ffffffb3;font-size:14px;line-height:1.4;margin-bottom:12px}.add-btn[data-v-31d9fbd5]{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:16px;background:#ffffff08;border:1px dashed rgba(255,255,255,.2);border-radius:8px;color:#fffc;cursor:pointer;transition:all .3s ease;font-size:14px}.add-btn[data-v-31d9fbd5]:hover{background:#ffffff0d;border-color:#ffffff4d;color:#fff}.model-detail[data-v-31d9fbd5]{flex:1;background:#ffffff08;border-radius:12px;padding:24px;overflow-y:auto}.no-selection[data-v-31d9fbd5]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#fff9}.placeholder-icon[data-v-31d9fbd5]{font-size:64px;margin-bottom:24px;opacity:.3}.detail-header[data-v-31d9fbd5]{display:flex;justify-content:space-between;align-items:center;margin-bottom:32px;padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,.1)}.detail-header h3[data-v-31d9fbd5]{margin:0;font-size:20px}.detail-actions[data-v-31d9fbd5]{display:flex;gap:12px}.form-item[data-v-31d9fbd5]{margin-bottom:20px}.form-item label[data-v-31d9fbd5]{display:block;margin-bottom:8px;color:#ffffffe6;font-weight:500}.form-item input[data-v-31d9fbd5],.form-item textarea[data-v-31d9fbd5]{width:100%;padding:12px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;color:#fff;font-size:14px;transition:all .3s ease}.form-item input[data-v-31d9fbd5]:focus,.form-item textarea[data-v-31d9fbd5]:focus{border-color:#667eea;outline:none;background:#ffffff14}.form-item input[data-v-31d9fbd5]::placeholder,.form-item textarea[data-v-31d9fbd5]::placeholder{color:#fff6}.form-item textarea[data-v-31d9fbd5]{resize:vertical;min-height:80px;line-height:1.5}.required[data-v-31d9fbd5]{color:#ff6b6b}.action-btn[data-v-31d9fbd5]{display:flex;align-items:center;gap:6px;padding:10px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#fff;cursor:pointer;transition:all .3s ease;font-size:14px}.action-btn[data-v-31d9fbd5]:hover:not(:disabled){background:#ffffff1a;border-color:#fff3}.action-btn[data-v-31d9fbd5]:disabled{opacity:.5;cursor:not-allowed}.action-btn.primary[data-v-31d9fbd5]{background:#667eea33;border-color:#667eea4d;color:#a8b3ff}.action-btn.primary[data-v-31d9fbd5]:hover:not(:disabled){background:#667eea4d}.action-btn.danger[data-v-31d9fbd5]{background:#ea66661a;border-color:#ea666633;color:#ff8a8a}.action-btn.danger[data-v-31d9fbd5]:hover:not(:disabled){background:#ea666633}.action-btn.small[data-v-31d9fbd5]{padding:6px 12px;font-size:12px}.modal-form[data-v-31d9fbd5]{display:flex;flex-direction:column;gap:16px}.delete-confirm[data-v-31d9fbd5]{text-align:center;padding:20px 0}.delete-confirm p[data-v-31d9fbd5]{color:#fffc;margin:8px 0}.delete-confirm .warning-text[data-v-31d9fbd5]{color:#fff9;font-size:14px}.warning-icon[data-v-31d9fbd5]{font-size:48px;color:#ffa726;margin-bottom:16px}.confirm-btn[data-v-31d9fbd5],.cancel-btn[data-v-31d9fbd5]{padding:10px 20px;border-radius:6px;cursor:pointer;transition:all .3s ease}.confirm-btn.danger[data-v-31d9fbd5],.cancel-btn.danger[data-v-31d9fbd5]{background:#ea666633;border:1px solid rgba(234,102,102,.3);color:#ff8a8a}.confirm-btn.danger[data-v-31d9fbd5]:hover,.cancel-btn.danger[data-v-31d9fbd5]:hover{background:#ea66664d}.cancel-btn[data-v-31d9fbd5]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);color:#fff}.cancel-btn[data-v-31d9fbd5]:hover{background:#ffffff1a}.model-type[data-v-31d9fbd5]{display:flex;flex-wrap:wrap;gap:6px}.model-tag[data-v-31d9fbd5]{display:inline-block;padding:4px 8px;background:#b566ea33;border-radius:4px;font-size:12px;color:#a8b3ff}.model-status[data-v-31d9fbd5]{display:flex;align-items:center;gap:8px}.default-badge[data-v-31d9fbd5]{display:flex;align-items:center;gap:4px;padding:2px 6px;background:#ffc10733;border:1px solid rgba(255,193,7,.3);border-radius:12px;font-size:11px;color:#ffc107;font-weight:500}.current-default[data-v-31d9fbd5]{display:flex;align-items:center;gap:4px;padding:8px 12px;background:#ffc10733;border:1px solid rgba(255,193,7,.3);border-radius:8px;font-size:12px;color:#ffc107;font-weight:500}.action-btn.default[data-v-31d9fbd5]{background:#ffc1071a;border:1px solid rgba(255,193,7,.3);color:#ffc107}.action-btn.default[data-v-31d9fbd5]:hover:not(:disabled){background:#ffc10733;border-color:#ffc10780}.action-btn.default[data-v-31d9fbd5]:disabled{opacity:.5;cursor:not-allowed}.api-key-container[data-v-31d9fbd5]{display:flex;gap:8px;align-items:center}.api-key-container input[data-v-31d9fbd5]{flex:1}.check-btn[data-v-31d9fbd5]{padding:12px 16px;background:#a8b3ff1a;border:1px solid rgba(168,179,255,.3);border-radius:8px;color:#a8b3ff;cursor:pointer;transition:all .3s ease;display:flex;align-items:center;justify-content:center;min-width:48px}.check-btn[data-v-31d9fbd5]:hover:not(:disabled){background:#a8b3ff33;border-color:#a8b3ff80}.check-btn[data-v-31d9fbd5]:disabled{opacity:.5;cursor:not-allowed}.loading-icon[data-v-31d9fbd5]{animation:spin-31d9fbd5 1s linear infinite}@keyframes spin-31d9fbd5{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.error-toast[data-v-31d9fbd5],.success-toast[data-v-31d9fbd5]{position:fixed;top:20px;right:20px;display:flex;align-items:center;gap:8px;padding:12px 16px;border-radius:8px;color:#fff;cursor:pointer;z-index:1000;animation:slideIn-31d9fbd5 .3s ease}.error-toast[data-v-31d9fbd5]{background:#ea6666e6;border:1px solid rgba(234,102,102,.5)}.success-toast[data-v-31d9fbd5]{background:#66ea66e6;border:1px solid rgba(102,234,102,.5)}@keyframes slideIn-31d9fbd5{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}.readonly-field[data-v-31d9fbd5]{width:100%;padding:12px 16px;background:#ffffff08;border:1px solid rgba(255,255,255,.1);border-radius:8px;color:#ffffffe6;font-size:14px;min-height:48px;display:flex;align-items:center;cursor:default;-webkit-user-select:none;user-select:none}.readonly-field.description-field[data-v-31d9fbd5]{min-height:80px;align-items:flex-start;padding-top:12px;line-height:1.5;white-space:pre-wrap}.description-field[data-v-31d9fbd5]{width:100%;padding:12px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;color:#ffffffe6;font-size:14px;min-height:80px;resize:vertical;transition:all .3s ease;font-family:inherit}.description-field[data-v-31d9fbd5]:focus{outline:none;border-color:#667eea80;background:#ffffff14}.description-field[data-v-31d9fbd5]::placeholder{color:#fff6}.monaco-editor{font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif;--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace}.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.hc-light .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-aria-container{position:absolute!important;top:0;height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%)}.monaco-aria-container{position:absolute;left:-999em}::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{position:relative;overflow:visible;-webkit-text-size-adjust:100%;color:var(--vscode-editor-foreground);background-color:var(--vscode-editor-background)}.monaco-editor-background{background-color:var(--vscode-editor-background)}.monaco-editor .rangeHighlight{background-color:var(--vscode-editor-rangeHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-rangeHighlightBorder)}.monaco-editor.hc-black .rangeHighlight,.monaco-editor.hc-light .rangeHighlight{border-style:dotted}.monaco-editor .symbolHighlight{background-color:var(--vscode-editor-symbolHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-symbolHighlightBorder)}.monaco-editor.hc-black .symbolHighlight,.monaco-editor.hc-light .symbolHighlight{border-style:dotted}.monaco-editor .overflow-guard{position:relative;overflow:hidden}.monaco-editor .view-overlays{position:absolute;top:0}.monaco-editor .squiggly-error{border-bottom:4px double var(--vscode-editorError-border)}.monaco-editor .squiggly-error:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorError-background)}.monaco-editor .squiggly-warning{border-bottom:4px double var(--vscode-editorWarning-border)}.monaco-editor .squiggly-warning:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorWarning-background)}.monaco-editor .squiggly-info{border-bottom:4px double var(--vscode-editorInfo-border)}.monaco-editor .squiggly-info:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorInfo-background)}.monaco-editor .squiggly-hint{border-bottom:2px dotted var(--vscode-editorHint-border)}.monaco-editor.showUnused .squiggly-unnecessary{border-bottom:2px dashed var(--vscode-editorUnnecessaryCode-border)}.monaco-editor.showDeprecated .squiggly-inline-deprecated{text-decoration:line-through;text-decoration-color:var(--vscode-editor-foreground, inherit)}.monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.monaco-scrollable-element>.shadow{position:absolute;display:none}.monaco-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.monaco-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset}.monaco-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.monaco-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset}.monaco-scrollable-element>.scrollbar>.slider{background:var(--vscode-scrollbarSlider-background)}.monaco-scrollable-element>.scrollbar>.slider:hover{background:var(--vscode-scrollbarSlider-hoverBackground)}.monaco-scrollable-element>.scrollbar>.slider.active{background:var(--vscode-scrollbarSlider-activeBackground)}.monaco-editor .inputarea{min-width:0;min-height:0;margin:0;padding:0;position:absolute;outline:none!important;resize:none;border:none;overflow:hidden;color:transparent;background-color:transparent;z-index:-10}.monaco-editor .inputarea.ime-input{z-index:10;caret-color:var(--vscode-editorCursor-foreground);color:var(--vscode-editor-foreground)}.monaco-editor .margin-view-overlays .line-numbers{font-variant-numeric:tabular-nums;position:absolute;text-align:right;display:inline-block;vertical-align:middle;box-sizing:border-box;cursor:default;height:100%}.monaco-editor .relative-current-line-number{text-align:left;display:inline-block;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}.monaco-editor .line-numbers{color:var(--vscode-editorLineNumber-foreground)}.monaco-editor .line-numbers.active-line-number{color:var(--vscode-editorLineNumber-activeForeground)}.monaco-editor .margin{background-color:var(--vscode-editorGutter-background)}.monaco-mouse-cursor-text{cursor:text}.monaco-editor .view-overlays .current-line,.monaco-editor .margin-view-overlays .current-line{display:block;position:absolute;left:0;top:0;box-sizing:border-box}.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both{border-right:0}.monaco-editor .lines-content .cdr{position:absolute}.monaco-editor .lines-content .core-guide{position:absolute;box-sizing:border-box}.mtkcontrol{color:#fff!important;background:#960000!important}.mtkoverflow{background-color:var(--vscode-button-background, var(--vscode-editor-background));color:var(--vscode-button-foreground, var(--vscode-editor-foreground));border-width:1px;border-style:solid;border-color:var(--vscode-contrastBorder);border-radius:2px;padding:4px;cursor:pointer}.mtkoverflow:hover{background-color:var(--vscode-button-hoverBackground)}.monaco-editor.no-user-select .lines-content,.monaco-editor.no-user-select .view-line,.monaco-editor.no-user-select .view-lines{user-select:none;-webkit-user-select:none}.monaco-editor.mac .lines-content:hover,.monaco-editor.mac .view-line:hover,.monaco-editor.mac .view-lines:hover{user-select:text;-webkit-user-select:text;-ms-user-select:text}.monaco-editor.enable-user-select{user-select:initial;-webkit-user-select:initial}.monaco-editor .view-lines{white-space:nowrap}.monaco-editor .view-line{position:absolute;width:100%}.monaco-editor .mtkw{color:var(--vscode-editorWhitespace-foreground)!important}.monaco-editor .mtkz{display:inline-block;color:var(--vscode-editorWhitespace-foreground)!important}.monaco-editor .lines-decorations{position:absolute;top:0;background:#fff}.monaco-editor .margin-view-overlays .cldr{position:absolute;height:100%}.monaco-editor .glyph-margin{position:absolute;top:0}.monaco-editor .glyph-margin-widgets .cgmr{position:absolute;display:flex;align-items:center;justify-content:center}.monaco-editor .glyph-margin-widgets .cgmr.codicon-modifier-spin:before{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.monaco-editor .margin-view-overlays .cmdr{position:absolute;left:0;width:100%;height:100%}.monaco-editor .minimap.slider-mouseover .minimap-slider{opacity:0;transition:opacity .1s linear}.monaco-editor .minimap.slider-mouseover:hover .minimap-slider,.monaco-editor .minimap.slider-mouseover .minimap-slider.active{opacity:1}.monaco-editor .minimap-slider .minimap-slider-horizontal{background:var(--vscode-minimapSlider-background)}.monaco-editor .minimap-slider:hover .minimap-slider-horizontal{background:var(--vscode-minimapSlider-hoverBackground)}.monaco-editor .minimap-slider.active .minimap-slider-horizontal{background:var(--vscode-minimapSlider-activeBackground)}.monaco-editor .minimap-shadow-visible{box-shadow:var(--vscode-scrollbar-shadow) -6px 0 6px -6px inset}.monaco-editor .minimap-shadow-hidden{position:absolute;width:0}.monaco-editor .minimap-shadow-visible{position:absolute;left:-6px;width:6px}.monaco-editor.no-minimap-shadow .minimap-shadow-visible{position:absolute;left:-1px;width:1px}.minimap.autohide{opacity:0;transition:opacity .5s}.minimap.autohide:hover{opacity:1}.monaco-editor .minimap{z-index:5}.monaco-editor .overlayWidgets{position:absolute;top:0;left:0}.monaco-editor .view-ruler{position:absolute;top:0;box-shadow:1px 0 0 0 var(--vscode-editorRuler-foreground) inset}.monaco-editor .scroll-decoration{position:absolute;top:0;left:0;height:6px;box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.monaco-editor .lines-content .cslr{position:absolute}.monaco-editor .focused .selected-text{background-color:var(--vscode-editor-selectionBackground)}.monaco-editor .selected-text{background-color:var(--vscode-editor-inactiveSelectionBackground)}.monaco-editor .top-left-radius{border-top-left-radius:3px}.monaco-editor .bottom-left-radius{border-bottom-left-radius:3px}.monaco-editor .top-right-radius{border-top-right-radius:3px}.monaco-editor .bottom-right-radius{border-bottom-right-radius:3px}.monaco-editor.hc-black .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-black .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-black .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-black .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor.hc-light .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-light .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-light .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-light .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor .cursors-layer{position:absolute;top:0}.monaco-editor .cursors-layer>.cursor{position:absolute;overflow:hidden;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-smooth-caret-animation>.cursor{transition:all 80ms}.monaco-editor .cursors-layer.cursor-block-outline-style>.cursor{background:transparent!important;border-style:solid;border-width:1px}.monaco-editor .cursors-layer.cursor-underline-style>.cursor{border-bottom-width:2px;border-bottom-style:solid;background:transparent!important}.monaco-editor .cursors-layer.cursor-underline-thin-style>.cursor{border-bottom-width:1px;border-bottom-style:solid;background:transparent!important}@keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}.cursor-smooth{animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate}.cursor-phase{animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate}.cursor-expand>.cursor{animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate}.monaco-editor .blockDecorations-container{position:absolute;top:0;pointer-events:none}.monaco-editor .blockDecorations-block{position:absolute;box-sizing:border-box}.monaco-editor .mwh{position:absolute;color:var(--vscode-editorWhitespace-foreground)!important}.context-view{position:absolute}.context-view.fixed{all:initial;font-family:inherit;font-size:13px;position:fixed;color:inherit}.monaco-list{position:relative;height:100%;width:100%;white-space:nowrap}.monaco-list.mouse-support{user-select:none;-webkit-user-select:none}.monaco-list>.monaco-scrollable-element{height:100%}.monaco-list-rows{position:relative;width:100%;height:100%}.monaco-list.horizontal-scrolling .monaco-list-rows{width:auto;min-width:100%}.monaco-list-row{position:absolute;box-sizing:border-box;overflow:hidden;width:100%}.monaco-list.mouse-support .monaco-list-row{cursor:pointer;touch-action:none}.monaco-list .monaco-scrollable-element>.scrollbar.vertical,.monaco-pane-view>.monaco-split-view2.vertical>.monaco-scrollable-element>.scrollbar.vertical{z-index:14}.monaco-list-row.scrolling{display:none!important}.monaco-list.element-focused,.monaco-list.selection-single,.monaco-list.selection-multiple{outline:0!important}.monaco-drag-image{display:inline-block;padding:1px 7px;border-radius:10px;font-size:12px;position:absolute;z-index:1000}.monaco-list-type-filter-message{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;padding:40px 1em 1em;text-align:center;white-space:normal;opacity:.7;pointer-events:none}.monaco-list-type-filter-message:empty{display:none}.monaco-select-box-dropdown-padding{--dropdown-padding-top: 1px;--dropdown-padding-bottom: 1px}.hc-black .monaco-select-box-dropdown-padding,.hc-light .monaco-select-box-dropdown-padding{--dropdown-padding-top: 3px;--dropdown-padding-bottom: 4px}.monaco-select-box-dropdown-container{display:none;box-sizing:border-box}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown *{margin:0}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown a:focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown code{line-height:15px;font-family:var(--monaco-monospace-font)}.monaco-select-box-dropdown-container.visible{display:flex;flex-direction:column;text-align:left;width:1px;overflow:hidden;border-bottom-left-radius:3px;border-bottom-right-radius:3px}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container{flex:0 0 auto;align-self:flex-start;padding-top:var(--dropdown-padding-top);padding-bottom:var(--dropdown-padding-bottom);padding-left:1px;padding-right:1px;width:100%;overflow:hidden;box-sizing:border-box}.monaco-select-box-dropdown-container>.select-box-details-pane{padding:5px}.hc-black .monaco-select-box-dropdown-container>.select-box-dropdown-list-container{padding-top:var(--dropdown-padding-top);padding-bottom:var(--dropdown-padding-bottom)}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row{cursor:pointer}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-text{text-overflow:ellipsis;overflow:hidden;padding-left:3.5px;white-space:nowrap;float:left}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-detail{text-overflow:ellipsis;overflow:hidden;padding-left:3.5px;white-space:nowrap;float:left;opacity:.7}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-decorator-right{text-overflow:ellipsis;overflow:hidden;padding-right:10px;white-space:nowrap;float:right}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.visually-hidden{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control{flex:1 1 auto;align-self:flex-start;opacity:0}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control>.width-control-div{overflow:hidden;max-height:0px}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control>.width-control-div>.option-text-width-control{padding-left:4px;padding-right:8px;white-space:nowrap}.monaco-select-box{width:100%;cursor:pointer;border-radius:2px}.monaco-select-box-dropdown-container{font-size:13px;font-weight:400;text-transform:none}.monaco-action-bar .action-item.select-container{cursor:default}.monaco-action-bar .action-item .monaco-select-box{cursor:pointer;min-width:100px;min-height:18px;padding:2px 23px 2px 8px}.mac .monaco-action-bar .action-item .monaco-select-box{font-size:11px;border-radius:5px}.monaco-action-bar{white-space:nowrap;height:100%}.monaco-action-bar .actions-container{display:flex;margin:0 auto;padding:0;height:100%;width:100%;align-items:center}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar .action-item{display:block;align-items:center;justify-content:center;cursor:pointer;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar .action-item .icon,.monaco-action-bar .action-item .codicon{display:block}.monaco-action-bar .action-item .codicon{display:flex;align-items:center;width:16px;height:16px}.monaco-action-bar .action-label{display:flex;font-size:11px;padding:3px;border-radius:5px}.monaco-action-bar .action-item.disabled .action-label,.monaco-action-bar .action-item.disabled .action-label:before,.monaco-action-bar .action-item.disabled .action-label:hover{opacity:.6}.monaco-action-bar.vertical{text-align:left}.monaco-action-bar.vertical .action-item{display:block}.monaco-action-bar.vertical .action-label.separator{display:block;border-bottom:1px solid #bbb;padding-top:1px;margin-left:.8em;margin-right:.8em}.monaco-action-bar .action-item .action-label.separator{width:1px;height:16px;margin:5px 4px!important;cursor:default;min-width:1px;padding:0;background-color:#bbb}.secondary-actions .monaco-action-bar .action-label{margin-left:6px}.monaco-action-bar .action-item.select-container{overflow:hidden;flex:1;max-width:170px;min-width:60px;display:flex;align-items:center;justify-content:center;margin-right:10px}.monaco-action-bar .action-item.action-dropdown-item{display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-dropdown-item-separator{display:flex;align-items:center;cursor:default}.monaco-action-bar .action-item.action-dropdown-item>.action-dropdown-item-separator>div{width:1px}.monaco-dropdown{height:100%;padding:0}.monaco-dropdown>.dropdown-label{cursor:pointer;height:100%;display:flex;align-items:center;justify-content:center}.monaco-dropdown>.dropdown-label>.action-label.disabled{cursor:default}.monaco-dropdown-with-primary{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-primary>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}.monaco-action-bar .action-item.menu-entry .action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-dropdown-with-default{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-default>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-default>.action-container.menu-entry>.action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}.quick-input-widget{font-size:13px}.quick-input-widget .monaco-highlighted-label .highlight{color:#0066bf}.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight{color:#9dddff}.vs-dark .quick-input-widget .monaco-highlighted-label .highlight{color:#0097fb}.hc-black .quick-input-widget .monaco-highlighted-label .highlight{color:#f38518}.hc-light .quick-input-widget .monaco-highlighted-label .highlight{color:#0f4a85}.monaco-keybinding>.monaco-keybinding-key{background-color:#ddd6;border:solid 1px rgba(204,204,204,.4);border-bottom-color:#bbb6;box-shadow:inset 0 -1px #bbb6;color:#555}.hc-black .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:solid 1px rgb(111,195,223);box-shadow:none;color:#fff}.hc-light .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:solid 1px #0F4A85;box-shadow:none;color:#292929}.vs-dark .monaco-keybinding>.monaco-keybinding-key{background-color:#8080802b;border:solid 1px rgba(51,51,51,.6);border-bottom-color:#4449;box-shadow:inset 0 -1px #4449;color:#ccc}:root{--vscode-sash-size: 4px;--vscode-sash-hover-size: 4px}.monaco-sash{position:absolute;z-index:35;touch-action:none}.monaco-sash.disabled{pointer-events:none}.monaco-sash.mac.vertical{cursor:col-resize}.monaco-sash.vertical.minimum{cursor:e-resize}.monaco-sash.vertical.maximum{cursor:w-resize}.monaco-sash.mac.horizontal{cursor:row-resize}.monaco-sash.horizontal.minimum{cursor:s-resize}.monaco-sash.horizontal.maximum{cursor:n-resize}.monaco-sash.disabled{cursor:default!important;pointer-events:none!important}.monaco-sash.vertical{cursor:ew-resize;top:0;width:var(--vscode-sash-size);height:100%}.monaco-sash.horizontal{cursor:ns-resize;left:0;width:100%;height:var(--vscode-sash-size)}.monaco-sash:not(.disabled)>.orthogonal-drag-handle{content:" ";height:calc(var(--vscode-sash-size) * 2);width:calc(var(--vscode-sash-size) * 2);z-index:100;display:block;cursor:all-scroll;position:absolute}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.start,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.end{cursor:nwse-resize}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.end,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.start{cursor:nesw-resize}.monaco-sash.vertical>.orthogonal-drag-handle.start{left:calc(var(--vscode-sash-size) * -.5);top:calc(var(--vscode-sash-size) * -1)}.monaco-sash.vertical>.orthogonal-drag-handle.end{left:calc(var(--vscode-sash-size) * -.5);bottom:calc(var(--vscode-sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.start{top:calc(var(--vscode-sash-size) * -.5);left:calc(var(--vscode-sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.end{top:calc(var(--vscode-sash-size) * -.5);right:calc(var(--vscode-sash-size) * -1)}.monaco-sash:before{content:"";pointer-events:none;position:absolute;width:100%;height:100%;background:transparent}.monaco-workbench:not(.reduce-motion) .monaco-sash:before{transition:background-color .1s ease-out}.monaco-sash.hover:before,.monaco-sash.active:before{background:var(--vscode-sash-hoverBorder)}.monaco-sash.vertical:before{width:var(--vscode-sash-hover-size);left:calc(50% - (var(--vscode-sash-hover-size) / 2))}.monaco-sash.horizontal:before{height:var(--vscode-sash-hover-size);top:calc(50% - (var(--vscode-sash-hover-size) / 2))}.pointer-events-disabled{pointer-events:none!important}.monaco-sash.debug{background:#0ff}.monaco-sash.debug.disabled{background:#0ff3}.monaco-sash.debug:not(.disabled)>.orthogonal-drag-handle{background:red}.monaco-split-view2{position:relative;width:100%;height:100%}.monaco-split-view2>.sash-container{position:absolute;width:100%;height:100%;pointer-events:none}.monaco-split-view2>.sash-container>.monaco-sash{pointer-events:initial}.monaco-split-view2>.monaco-scrollable-element{width:100%;height:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container{width:100%;height:100%;white-space:nowrap;position:relative}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view{white-space:initial;position:absolute}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view:not(.visible){display:none}.monaco-split-view2.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view{width:100%}.monaco-split-view2.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view{height:100%}.monaco-split-view2.separator-border>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{content:" ";position:absolute;top:0;left:0;z-index:5;pointer-events:none;background-color:var(--separator-border)}.monaco-split-view2.separator-border.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:100%;width:1px}.monaco-split-view2.separator-border.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:1px;width:100%}.monaco-table{display:flex;flex-direction:column;position:relative;height:100%;width:100%;white-space:nowrap;overflow:hidden}.monaco-table>.monaco-split-view2{border-bottom:1px solid transparent}.monaco-table>.monaco-list{flex:1}.monaco-table-tr{display:flex;height:100%}.monaco-table-th{width:100%;height:100%;font-weight:700;overflow:hidden;text-overflow:ellipsis}.monaco-table-th,.monaco-table-td{box-sizing:border-box;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{content:"";position:absolute;left:calc(var(--vscode-sash-size) / 2);width:0;border-left:1px solid transparent}.monaco-workbench:not(.reduce-motion) .monaco-table>.monaco-split-view2,.monaco-workbench:not(.reduce-motion) .monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{transition:border-color .2s ease-out}.monaco-custom-toggle{margin-left:2px;float:left;cursor:pointer;overflow:hidden;width:20px;height:20px;border-radius:3px;border:1px solid transparent;padding:1px;box-sizing:border-box;user-select:none;-webkit-user-select:none}.monaco-custom-toggle:hover{background-color:var(--vscode-inputOption-hoverBackground)}.hc-black .monaco-custom-toggle:hover,.hc-light .monaco-custom-toggle:hover{border:1px dashed var(--vscode-focusBorder)}.hc-black .monaco-custom-toggle,.hc-light .monaco-custom-toggle,.hc-black .monaco-custom-toggle:hover,.hc-light .monaco-custom-toggle:hover{background:none}.monaco-custom-toggle.monaco-checkbox{height:18px;width:18px;border:1px solid transparent;border-radius:3px;margin-right:9px;margin-left:0;padding:0;opacity:1;background-size:16px!important}.monaco-action-bar .checkbox-action-item{display:flex;align-items:center}.monaco-action-bar .checkbox-action-item>.monaco-custom-toggle.monaco-checkbox{margin-right:4px}.monaco-action-bar .checkbox-action-item>.checkbox-label{font-size:12px}.monaco-custom-toggle.monaco-checkbox:not(.checked):before{visibility:hidden}.monaco-inputbox{position:relative;display:block;padding:0;box-sizing:border-box;border-radius:2px;font-size:inherit}.monaco-inputbox>.ibwrapper>.input,.monaco-inputbox>.ibwrapper>.mirror{padding:4px 6px}.monaco-inputbox>.ibwrapper{position:relative;width:100%;height:100%}.monaco-inputbox>.ibwrapper>.input{display:inline-block;box-sizing:border-box;width:100%;height:100%;line-height:inherit;border:none;font-family:inherit;font-size:inherit;resize:none;color:inherit}.monaco-inputbox>.ibwrapper>input{text-overflow:ellipsis}.monaco-inputbox>.ibwrapper>textarea.input{display:block;scrollbar-width:none;outline:none}.monaco-inputbox>.ibwrapper>textarea.input::-webkit-scrollbar{display:none}.monaco-inputbox>.ibwrapper>textarea.input.empty{white-space:nowrap}.monaco-inputbox>.ibwrapper>.mirror{position:absolute;display:inline-block;width:100%;top:0;left:0;box-sizing:border-box;white-space:pre-wrap;visibility:hidden;word-wrap:break-word}.monaco-inputbox-container{text-align:right}.monaco-inputbox-container .monaco-inputbox-message{display:inline-block;overflow:hidden;text-align:left;width:100%;box-sizing:border-box;padding:.4em;font-size:12px;line-height:17px;margin-top:-1px;word-wrap:break-word}.monaco-inputbox .monaco-action-bar{position:absolute;right:2px;top:4px}.monaco-inputbox .monaco-action-bar .action-item{margin-left:2px}.monaco-inputbox .monaco-action-bar .action-item .codicon{background-repeat:no-repeat;width:16px;height:16px}.monaco-findInput{position:relative}.monaco-findInput .monaco-inputbox{font-size:13px;width:100%}.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.vs .monaco-findInput.disabled{background-color:#e1e1e1}.vs-dark .monaco-findInput.disabled{background-color:#333}.monaco-findInput.highlight-0 .controls,.hc-light .monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-0 .1s linear 0s}.monaco-findInput.highlight-1 .controls,.hc-light .monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-1 .1s linear 0s}.hc-black .monaco-findInput.highlight-0 .controls,.vs-dark .monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-dark-0 .1s linear 0s}.hc-black .monaco-findInput.highlight-1 .controls,.vs-dark .monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-dark-1 .1s linear 0s}@keyframes monaco-findInput-highlight-0{0%{background:#fdff00cc}to{background:transparent}}@keyframes monaco-findInput-highlight-1{0%{background:#fdff00cc}99%{background:transparent}}@keyframes monaco-findInput-highlight-dark-0{0%{background:#ffffff70}to{background:transparent}}@keyframes monaco-findInput-highlight-dark-1{0%{background:#ffffff70}99%{background:transparent}}.monaco-tl-row{display:flex;height:100%;align-items:center;position:relative}.monaco-tl-row.disabled{cursor:default}.monaco-tl-indent{height:100%;position:absolute;top:0;left:16px;pointer-events:none}.hide-arrows .monaco-tl-indent{left:12px}.monaco-tl-indent>.indent-guide{display:inline-block;box-sizing:border-box;height:100%;border-left:1px solid transparent}.monaco-workbench:not(.reduce-motion) .monaco-tl-indent>.indent-guide{transition:border-color .1s linear}.monaco-tl-twistie,.monaco-tl-contents{height:100%}.monaco-tl-twistie{font-size:10px;text-align:right;padding-right:6px;flex-shrink:0;width:16px;display:flex!important;align-items:center;justify-content:center;transform:translate(3px)}.monaco-tl-contents{flex:1;overflow:hidden}.monaco-tl-twistie:before{border-radius:20px}.monaco-tl-twistie.collapsed:before{transform:rotate(-90deg)}.monaco-tl-twistie.codicon-tree-item-loading:before{animation:codicon-spin 1.25s steps(30) infinite}.monaco-tree-type-filter{position:absolute;top:0;display:flex;padding:3px;max-width:200px;z-index:100;margin:0 6px;border:1px solid var(--vscode-widget-border);border-bottom-left-radius:4px;border-bottom-right-radius:4px}.monaco-workbench:not(.reduce-motion) .monaco-tree-type-filter{transition:top .3s}.monaco-tree-type-filter.disabled{top:-40px!important}.monaco-tree-type-filter-grab{display:flex!important;align-items:center;justify-content:center;cursor:grab;margin-right:2px}.monaco-tree-type-filter-grab.grabbing{cursor:grabbing}.monaco-tree-type-filter-input{flex:1}.monaco-tree-type-filter-input .monaco-inputbox{height:23px}.monaco-tree-type-filter-input .monaco-inputbox>.ibwrapper>.input,.monaco-tree-type-filter-input .monaco-inputbox>.ibwrapper>.mirror{padding:2px 4px}.monaco-tree-type-filter-input .monaco-findInput>.controls{top:2px}.monaco-tree-type-filter-actionbar{margin-left:4px}.monaco-tree-type-filter-actionbar .monaco-action-bar .action-label{padding:2px}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container{position:absolute;top:0;left:0;width:100%;height:0;z-index:13;background-color:var(--vscode-sideBar-background)}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row.monaco-list-row{position:absolute;width:100%;opacity:1!important;overflow:hidden;background-color:var(--vscode-sideBar-background)}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row:hover{background-color:var(--vscode-list-hoverBackground)!important;cursor:pointer}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow{position:absolute;bottom:-3px;left:0;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.monaco-text-button{box-sizing:border-box;display:flex;width:100%;padding:4px;border-radius:2px;text-align:center;cursor:pointer;justify-content:center;align-items:center;border:1px solid var(--vscode-button-border, transparent);line-height:18px}.monaco-text-button:focus{outline-offset:2px!important}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled:focus,.monaco-button.disabled{opacity:.4!important;cursor:default}.monaco-text-button .codicon{margin:0 .2em;color:inherit!important}.monaco-text-button.monaco-text-button-with-short-label{flex-direction:row;flex-wrap:wrap;padding:0 4px;overflow:hidden;height:28px}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label{flex-basis:100%}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label-short{flex-grow:1;width:0;overflow:hidden}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label,.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label-short{display:flex;justify-content:center;align-items:center;font-weight:400;font-style:inherit;padding:4px 0}.monaco-button-dropdown{display:flex;cursor:pointer}.monaco-button-dropdown.disabled{cursor:default}.monaco-button-dropdown>.monaco-button:focus{outline-offset:-1px!important}.monaco-button-dropdown.disabled>.monaco-button.disabled,.monaco-button-dropdown.disabled>.monaco-button.disabled:focus,.monaco-button-dropdown.disabled>.monaco-button-dropdown-separator{opacity:.4!important}.monaco-button-dropdown>.monaco-button.monaco-text-button{border-right-width:0!important}.monaco-button-dropdown .monaco-button-dropdown-separator{padding:4px 0;cursor:default}.monaco-button-dropdown .monaco-button-dropdown-separator>div{height:100%;width:1px}.monaco-button-dropdown>.monaco-button.monaco-dropdown-button{border:1px solid var(--vscode-button-border, transparent);border-left-width:0!important;border-radius:0 2px 2px 0;display:flex;align-items:center}.monaco-button-dropdown>.monaco-button.monaco-text-button{border-radius:2px 0 0 2px}.monaco-description-button{display:flex;flex-direction:column;align-items:center;margin:4px 5px}.monaco-description-button .monaco-button-description{font-style:italic;font-size:11px;padding:4px 20px}.monaco-description-button .monaco-button-label,.monaco-description-button .monaco-button-description{display:flex;justify-content:center;align-items:center}.monaco-description-button .monaco-button-label>.codicon,.monaco-description-button .monaco-button-description>.codicon{margin:0 .2em;color:inherit!important}.monaco-button.default-colors,.monaco-button-dropdown.default-colors>.monaco-button{color:var(--vscode-button-foreground);background-color:var(--vscode-button-background)}.monaco-button.default-colors:hover,.monaco-button-dropdown.default-colors>.monaco-button:hover{background-color:var(--vscode-button-hoverBackground)}.monaco-button.default-colors.secondary,.monaco-button-dropdown.default-colors>.monaco-button.secondary{color:var(--vscode-button-secondaryForeground);background-color:var(--vscode-button-secondaryBackground)}.monaco-button.default-colors.secondary:hover,.monaco-button-dropdown.default-colors>.monaco-button.secondary:hover{background-color:var(--vscode-button-secondaryHoverBackground)}.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator{background-color:var(--vscode-button-background);border-top:1px solid var(--vscode-button-border);border-bottom:1px solid var(--vscode-button-border)}.monaco-button-dropdown.default-colors .monaco-button.secondary+.monaco-button-dropdown-separator{background-color:var(--vscode-button-secondaryBackground)}.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator>div{background-color:var(--vscode-button-separator)}.monaco-count-badge{padding:3px 6px;border-radius:11px;font-size:11px;min-width:18px;min-height:18px;line-height:11px;font-weight:400;text-align:center;display:inline-block;box-sizing:border-box}.monaco-count-badge.long{padding:2px 3px;border-radius:2px;min-height:auto;line-height:normal}.monaco-progress-container{width:100%;height:2px;overflow:hidden}.monaco-progress-container .progress-bit{width:2%;height:2px;position:absolute;left:0;display:none}.monaco-progress-container.active .progress-bit{display:inherit}.monaco-progress-container.discrete .progress-bit{left:0;transition:width .1s linear}.monaco-progress-container.discrete.done .progress-bit{width:100%}.monaco-progress-container.infinite .progress-bit{animation-name:progress;animation-duration:4s;animation-iteration-count:infinite;transform:translateZ(0);animation-timing-function:linear}.monaco-progress-container.infinite.infinite-long-running .progress-bit{animation-timing-function:steps(100)}@keyframes progress{0%{transform:translate(0) scaleX(1)}50%{transform:translate(2500%) scaleX(3)}to{transform:translate(4900%) scaleX(1)}}.quick-input-widget{position:absolute;width:600px;z-index:2550;left:50%;margin-left:-300px;-webkit-app-region:no-drag;border-radius:6px}.quick-input-titlebar{display:flex;align-items:center;border-top-left-radius:5px;border-top-right-radius:5px}.quick-input-left-action-bar{display:flex;margin-left:4px;flex:1}.quick-input-title{padding:3px 0;text-align:center;text-overflow:ellipsis;overflow:hidden}.quick-input-right-action-bar{display:flex;margin-right:4px;flex:1}.quick-input-right-action-bar>.actions-container{justify-content:flex-end}.quick-input-titlebar .monaco-action-bar .action-label.codicon{background-position:center;background-repeat:no-repeat;padding:2px}.quick-input-description{margin:6px 6px 6px 11px}.quick-input-header .quick-input-description{margin:4px 2px;flex:1}.quick-input-header{display:flex;padding:8px 6px 6px}.quick-input-widget.hidden-input .quick-input-header{padding:0;margin-bottom:0}.quick-input-and-message{display:flex;flex-direction:column;flex-grow:1;min-width:0;position:relative}.quick-input-check-all{align-self:center;margin:0}.quick-input-filter{flex-grow:1;display:flex;position:relative}.quick-input-box{flex-grow:1}.quick-input-widget.show-checkboxes .quick-input-box,.quick-input-widget.show-checkboxes .quick-input-message{margin-left:5px}.quick-input-visible-count{position:absolute;left:-10000px}.quick-input-count{align-self:center;position:absolute;right:4px;display:flex;align-items:center}.quick-input-count .monaco-count-badge{vertical-align:middle;padding:2px 4px;border-radius:2px;min-height:auto;line-height:normal}.quick-input-action{margin-left:6px}.quick-input-action .monaco-text-button{font-size:11px;padding:0 6px;display:flex;height:25px;align-items:center}.quick-input-message{margin-top:-1px;padding:5px;overflow-wrap:break-word}.quick-input-message>.codicon{margin:0 .2em;vertical-align:text-bottom}.quick-input-message a{color:inherit}.quick-input-progress.monaco-progress-container{position:relative}.quick-input-list{line-height:22px}.quick-input-widget.hidden-input .quick-input-list{margin-top:4px;padding-bottom:4px}.quick-input-list .monaco-list{overflow:hidden;max-height:440px;padding-bottom:5px}.quick-input-list .monaco-scrollable-element{padding:0 5px}.quick-input-list .quick-input-list-entry{box-sizing:border-box;overflow:hidden;display:flex;height:100%;padding:0 6px}.quick-input-list .quick-input-list-entry.quick-input-list-separator-border{border-top-width:1px;border-top-style:solid}.quick-input-list .monaco-list-row{border-radius:3px}.quick-input-list .monaco-list-row[data-index="0"] .quick-input-list-entry.quick-input-list-separator-border{border-top-style:none}.quick-input-list .quick-input-list-label{overflow:hidden;display:flex;height:100%;flex:1}.quick-input-list .quick-input-list-checkbox{align-self:center;margin:0}.quick-input-list .quick-input-list-icon{background-size:16px;background-position:left center;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;display:flex;align-items:center;justify-content:center}.quick-input-list .quick-input-list-rows{overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;height:100%;flex:1;margin-left:5px}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows{margin-left:10px}.quick-input-widget .quick-input-list .quick-input-list-checkbox{display:none}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox{display:inline}.quick-input-list .quick-input-list-rows>.quick-input-list-row{display:flex;align-items:center}.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label,.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1}.quick-input-list .quick-input-list-rows>.quick-input-list-row .codicon[class*=codicon-]{vertical-align:text-bottom}.quick-input-list .quick-input-list-rows .monaco-highlighted-label>span{opacity:1}.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding{margin-right:8px}.quick-input-list .quick-input-list-label-meta{opacity:.7;line-height:normal;text-overflow:ellipsis;overflow:hidden}.quick-input-list .monaco-highlighted-label .highlight{font-weight:700}.quick-input-list .quick-input-list-entry .quick-input-list-separator{margin-right:4px}.quick-input-list .quick-input-list-entry-action-bar{display:flex;flex:0;overflow:visible}.quick-input-list .quick-input-list-entry-action-bar .action-label{display:none}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin-right:4px;padding:0 2px 2px}.quick-input-list .quick-input-list-entry-action-bar{margin-top:1px}.quick-input-list .quick-input-list-entry-action-bar{margin-right:4px}.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label{display:flex}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator{color:inherit}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key{background:none}.quick-input-list .quick-input-list-separator-as-item{font-weight:600;font-size:12px}.monaco-icon-label{display:flex;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label:before{background-size:16px;background-position:left center;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;line-height:inherit!important;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;flex-shrink:0}.monaco-icon-label-container.disabled{color:var(--vscode-disabledForeground)}.monaco-icon-label>.monaco-icon-label-container{min-width:0;overflow:hidden;text-overflow:ellipsis;flex:1}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{color:inherit;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name>.label-separator{margin:0 2px;opacity:.5}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-suffix-container>.label-suffix{opacity:.7;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.7;margin-left:.5em;font-size:.9em;white-space:pre}.monaco-icon-label.nowrap>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{white-space:nowrap}.vs .monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.95}.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{font-style:italic}.monaco-icon-label.deprecated{text-decoration:line-through;opacity:.66}.monaco-icon-label.italic:after{font-style:italic}.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{text-decoration:line-through}.monaco-icon-label:after{opacity:.75;font-size:90%;font-weight:600;margin:auto 16px 0 5px;text-align:center}.monaco-list:focus .selected .monaco-icon-label,.monaco-list:focus .selected .monaco-icon-label:after{color:inherit!important}.monaco-list-row.focused.selected .label-description,.monaco-list-row.selected .label-description{opacity:.8}.monaco-keybinding{display:flex;align-items:center;line-height:10px}.monaco-keybinding>.monaco-keybinding-key{display:inline-block;border-style:solid;border-width:1px;border-radius:3px;vertical-align:middle;font-size:11px;padding:3px 5px;margin:0 2px}.monaco-keybinding>.monaco-keybinding-key:first-child{margin-left:0}.monaco-keybinding>.monaco-keybinding-key:last-child{margin-right:0}.monaco-keybinding>.monaco-keybinding-key-separator{display:inline-block}.monaco-keybinding>.monaco-keybinding-key-chord-separator{width:6px}.monaco-editor .diff-hidden-lines-widget{width:100%}.monaco-editor .diff-hidden-lines{height:0px;transform:translateY(-10px);font-size:13px;line-height:14px}.monaco-editor .diff-hidden-lines:not(.dragging) .top:hover,.monaco-editor .diff-hidden-lines:not(.dragging) .bottom:hover,.monaco-editor .diff-hidden-lines .top.dragging,.monaco-editor .diff-hidden-lines .bottom.dragging{background-color:var(--vscode-focusBorder)}.monaco-editor .diff-hidden-lines .top,.monaco-editor .diff-hidden-lines .bottom{transition:background-color .1s ease-out;height:4px;background-color:transparent;background-clip:padding-box;border-bottom:2px solid transparent;border-top:4px solid transparent}.monaco-editor.draggingUnchangedRegion.canMoveTop:not(.canMoveBottom) *,.monaco-editor .diff-hidden-lines .top.canMoveTop:not(.canMoveBottom),.monaco-editor .diff-hidden-lines .bottom.canMoveTop:not(.canMoveBottom){cursor:n-resize!important}.monaco-editor.draggingUnchangedRegion:not(.canMoveTop).canMoveBottom *,.monaco-editor .diff-hidden-lines .top:not(.canMoveTop).canMoveBottom,.monaco-editor .diff-hidden-lines .bottom:not(.canMoveTop).canMoveBottom{cursor:s-resize!important}.monaco-editor.draggingUnchangedRegion.canMoveTop.canMoveBottom *,.monaco-editor .diff-hidden-lines .top.canMoveTop.canMoveBottom,.monaco-editor .diff-hidden-lines .bottom.canMoveTop.canMoveBottom{cursor:ns-resize!important}.monaco-editor .diff-hidden-lines .top{transform:translateY(4px)}.monaco-editor .diff-hidden-lines .bottom{transform:translateY(-6px)}.monaco-editor .diff-unchanged-lines{background:var(--vscode-diffEditor-unchangedCodeBackground)}.monaco-editor .noModificationsOverlay{z-index:1;background:var(--vscode-editor-background);display:flex;justify-content:center;align-items:center}.monaco-editor .diff-hidden-lines .center{background:var(--vscode-diffEditor-unchangedRegionBackground);color:var(--vscode-diffEditor-unchangedRegionForeground);overflow:hidden;display:block;text-overflow:ellipsis;white-space:nowrap;height:24px;box-shadow:inset 0 -5px 5px -7px var(--vscode-diffEditor-unchangedRegionShadow),inset 0 5px 5px -7px var(--vscode-diffEditor-unchangedRegionShadow)}.monaco-editor .diff-hidden-lines .center span.codicon{vertical-align:middle}.monaco-editor .diff-hidden-lines .center a:hover .codicon{cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .diff-hidden-lines div.breadcrumb-item{cursor:pointer}.monaco-editor .diff-hidden-lines div.breadcrumb-item:hover{color:var(--vscode-editorLink-activeForeground)}.monaco-editor .movedOriginal,.monaco-editor .movedModified{border:2px solid var(--vscode-diffEditor-move-border)}.monaco-editor .movedOriginal.currentMove,.monaco-editor .movedModified.currentMove{border:2px solid var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines path.currentMove{stroke:var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines path{pointer-events:visiblestroke}.monaco-diff-editor .moved-blocks-lines .arrow{fill:var(--vscode-diffEditor-move-border)}.monaco-diff-editor .moved-blocks-lines .arrow.currentMove{fill:var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines .arrow-rectangle{fill:var(--vscode-editor-background)}.monaco-diff-editor .moved-blocks-lines{position:absolute;pointer-events:none}.monaco-diff-editor .moved-blocks-lines path{fill:none;stroke:var(--vscode-diffEditor-move-border);stroke-width:2}.monaco-editor .char-delete.diff-range-empty{margin-left:-1px;border-left:solid var(--vscode-diffEditor-removedTextBackground) 3px}.monaco-editor .char-insert.diff-range-empty{border-left:solid var(--vscode-diffEditor-insertedTextBackground) 3px}.monaco-editor .fold-unchanged{cursor:pointer}.monaco-diff-editor .diff-moved-code-block{display:flex;justify-content:flex-end;margin-top:-4px}.monaco-diff-editor .diff-moved-code-block .action-bar .action-label.codicon{width:12px;height:12px;font-size:12px}.monaco-diff-editor .diffOverview{z-index:9}.monaco-diff-editor .diffOverview .diffViewport{z-index:10}.monaco-diff-editor.vs .diffOverview{background:#00000008}.monaco-diff-editor.vs-dark .diffOverview{background:#ffffff03}.monaco-scrollable-element.modified-in-monaco-diff-editor.vs .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark .scrollbar{background:#0000}.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-light .scrollbar{background:none}.monaco-scrollable-element.modified-in-monaco-diff-editor .slider{z-index:10}.modified-in-monaco-diff-editor .slider.active{background:#ababab66}.modified-in-monaco-diff-editor.hc-black .slider.active,.modified-in-monaco-diff-editor.hc-light .slider.active{background:none}.monaco-editor .insert-sign,.monaco-diff-editor .insert-sign,.monaco-editor .delete-sign,.monaco-diff-editor .delete-sign{font-size:11px!important;opacity:.7!important;display:flex!important;align-items:center}.monaco-editor.hc-black .insert-sign,.monaco-diff-editor.hc-black .insert-sign,.monaco-editor.hc-black .delete-sign,.monaco-diff-editor.hc-black .delete-sign,.monaco-editor.hc-light .insert-sign,.monaco-diff-editor.hc-light .insert-sign,.monaco-editor.hc-light .delete-sign,.monaco-diff-editor.hc-light .delete-sign{opacity:1}.monaco-editor .inline-deleted-margin-view-zone,.monaco-editor .inline-added-margin-view-zone{text-align:right}.monaco-editor .arrow-revert-change{z-index:10;position:absolute}.monaco-editor .arrow-revert-change:hover{cursor:pointer}.monaco-editor .view-zones .view-lines .view-line span{display:inline-block}.monaco-editor .margin-view-zones .lightbulb-glyph:hover{cursor:pointer}.monaco-editor .char-insert,.monaco-diff-editor .char-insert{background-color:var(--vscode-diffEditor-insertedTextBackground)}.monaco-editor .line-insert,.monaco-diff-editor .line-insert{background-color:var(--vscode-diffEditor-insertedLineBackground, var(--vscode-diffEditor-insertedTextBackground))}.monaco-editor .line-insert,.monaco-editor .char-insert{box-sizing:border-box;border:1px solid var(--vscode-diffEditor-insertedTextBorder)}.monaco-editor.hc-black .line-insert,.monaco-editor.hc-light .line-insert,.monaco-editor.hc-black .char-insert,.monaco-editor.hc-light .char-insert{border-style:dashed}.monaco-editor .line-delete,.monaco-editor .char-delete{box-sizing:border-box;border:1px solid var(--vscode-diffEditor-removedTextBorder)}.monaco-editor.hc-black .line-delete,.monaco-editor.hc-light .line-delete,.monaco-editor.hc-black .char-delete,.monaco-editor.hc-light .char-delete{border-style:dashed}.monaco-editor .inline-added-margin-view-zone,.monaco-editor .gutter-insert,.monaco-diff-editor .gutter-insert{background-color:var(--vscode-diffEditorGutter-insertedLineBackground, var(--vscode-diffEditor-insertedLineBackground), var(--vscode-diffEditor-insertedTextBackground))}.monaco-editor .char-delete,.monaco-diff-editor .char-delete{background-color:var(--vscode-diffEditor-removedTextBackground)}.monaco-editor .line-delete,.monaco-diff-editor .line-delete{background-color:var(--vscode-diffEditor-removedLineBackground, var(--vscode-diffEditor-removedTextBackground))}.monaco-editor .inline-deleted-margin-view-zone,.monaco-editor .gutter-delete,.monaco-diff-editor .gutter-delete{background-color:var(--vscode-diffEditorGutter-removedLineBackground, var(--vscode-diffEditor-removedLineBackground), var(--vscode-diffEditor-removedTextBackground))}.monaco-diff-editor.side-by-side .editor.modified{box-shadow:-6px 0 5px -5px var(--vscode-scrollbar-shadow);border-left:1px solid var(--vscode-diffEditor-border)}.monaco-diff-editor .diffViewport{background:var(--vscode-scrollbarSlider-background)}.monaco-diff-editor .diffViewport:hover{background:var(--vscode-scrollbarSlider-hoverBackground)}.monaco-diff-editor .diffViewport:active{background:var(--vscode-scrollbarSlider-activeBackground)}.monaco-editor .diagonal-fill{background-image:linear-gradient(-45deg,var(--vscode-diffEditor-diagonalFill) 12.5%,#0000 12.5%,#0000 50%,var(--vscode-diffEditor-diagonalFill) 50%,var(--vscode-diffEditor-diagonalFill) 62.5%,#0000 62.5%,#0000 100%);background-size:8px 8px}.monaco-diff-editor .diff-review-line-number{text-align:right;display:inline-block;color:var(--vscode-editorLineNumber-foreground)}.monaco-diff-editor .diff-review{position:absolute;user-select:none;-webkit-user-select:none;z-index:99}.monaco-diff-editor .diff-review-summary{padding-left:10px}.monaco-diff-editor .diff-review-shadow{position:absolute;box-shadow:var(--vscode-scrollbar-shadow) 0 -6px 6px -6px inset}.monaco-diff-editor .diff-review-row{white-space:pre}.monaco-diff-editor .diff-review-table{display:table;min-width:100%}.monaco-diff-editor .diff-review-row{display:table-row;width:100%}.monaco-diff-editor .diff-review-spacer{display:inline-block;width:10px;vertical-align:middle}.monaco-diff-editor .diff-review-spacer>.codicon{font-size:9px!important}.monaco-diff-editor .diff-review-actions{display:inline-block;position:absolute;right:10px;top:2px;z-index:100}.monaco-diff-editor .diff-review-actions .action-label{width:16px;height:16px;margin:2px 0}.monaco-diff-editor .revertButton{cursor:pointer}.monaco-component .multiDiffEntry{display:flex;flex-direction:column}.monaco-component .multiDiffEntry .editorParent{border-left:2px var(--vscode-tab-inactiveBackground) solid}.monaco-component .multiDiffEntry.focused .editorParent{border-left:2px var(--vscode-notebook-focusedCellBorder) solid}.monaco-component .multiDiffEntry .editorParent .editorContainer{border-left:17px var(--vscode-tab-inactiveBackground) solid}.monaco-component .multiDiffEntry .collapse-button{margin:0 5px;cursor:pointer}.monaco-component .multiDiffEntry .collapse-button a{display:block}.monaco-component .multiDiffEntry .header{display:flex;align-items:center;padding:8px 5px;color:var(--vscode-foreground);background:var(--vscode-editor-background);z-index:1000;border-bottom:1px var(--vscode-sideBarSectionHeader-border) solid;border-top:1px var(--vscode-sideBarSectionHeader-border) solid;border-left:2px var(--vscode-editor-background) solid}.monaco-component .multiDiffEntry.focused .header{border-left:2px var(--vscode-notebook-focusedCellBorder) solid}.monaco-component .multiDiffEntry .header.shadow{box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px}.monaco-component .multiDiffEntry .header .title{flex:1;font-size:14px;line-height:22px}.monaco-component .multiDiffEntry .header .actions{padding:0 8px}.monaco-toolbar{height:100%}.monaco-toolbar .toolbar-toggle-more{display:inline-block;padding:0}.monaco-editor .selection-anchor{background-color:#007acc;width:2px!important}.monaco-editor .bracket-match{box-sizing:border-box;background-color:var(--vscode-editorBracketMatch-background);border:1px solid var(--vscode-editorBracketMatch-border)}@font-face{font-family:codicon;font-display:block;src:url(/ui/assets/codicon-Hscy-R9e.ttf) format("truetype")}.codicon[class*=codicon-]{font: 16px/1 codicon;display:inline-block;text-decoration:none;text-rendering:auto;text-align:center;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;user-select:none;-webkit-user-select:none}.codicon-wrench-subaction{opacity:.5}@keyframes codicon-spin{to{transform:rotate(360deg)}}.codicon-sync.codicon-modifier-spin,.codicon-loading.codicon-modifier-spin,.codicon-gear.codicon-modifier-spin,.codicon-notebook-state-executing.codicon-modifier-spin{animation:codicon-spin 1.5s steps(30) infinite}.codicon-modifier-disabled{opacity:.4}.codicon-loading,.codicon-tree-item-loading:before{animation-duration:1s!important;animation-timing-function:cubic-bezier(.53,.21,.29,.67)!important}.monaco-editor .codicon.codicon-symbol-array,.monaco-workbench .codicon.codicon-symbol-array{color:var(--vscode-symbolIcon-arrayForeground)}.monaco-editor .codicon.codicon-symbol-boolean,.monaco-workbench .codicon.codicon-symbol-boolean{color:var(--vscode-symbolIcon-booleanForeground)}.monaco-editor .codicon.codicon-symbol-class,.monaco-workbench .codicon.codicon-symbol-class{color:var(--vscode-symbolIcon-classForeground)}.monaco-editor .codicon.codicon-symbol-method,.monaco-workbench .codicon.codicon-symbol-method{color:var(--vscode-symbolIcon-methodForeground)}.monaco-editor .codicon.codicon-symbol-color,.monaco-workbench .codicon.codicon-symbol-color{color:var(--vscode-symbolIcon-colorForeground)}.monaco-editor .codicon.codicon-symbol-constant,.monaco-workbench .codicon.codicon-symbol-constant{color:var(--vscode-symbolIcon-constantForeground)}.monaco-editor .codicon.codicon-symbol-constructor,.monaco-workbench .codicon.codicon-symbol-constructor{color:var(--vscode-symbolIcon-constructorForeground)}.monaco-editor .codicon.codicon-symbol-value,.monaco-workbench .codicon.codicon-symbol-value,.monaco-editor .codicon.codicon-symbol-enum,.monaco-workbench .codicon.codicon-symbol-enum{color:var(--vscode-symbolIcon-enumeratorForeground)}.monaco-editor .codicon.codicon-symbol-enum-member,.monaco-workbench .codicon.codicon-symbol-enum-member{color:var(--vscode-symbolIcon-enumeratorMemberForeground)}.monaco-editor .codicon.codicon-symbol-event,.monaco-workbench .codicon.codicon-symbol-event{color:var(--vscode-symbolIcon-eventForeground)}.monaco-editor .codicon.codicon-symbol-field,.monaco-workbench .codicon.codicon-symbol-field{color:var(--vscode-symbolIcon-fieldForeground)}.monaco-editor .codicon.codicon-symbol-file,.monaco-workbench .codicon.codicon-symbol-file{color:var(--vscode-symbolIcon-fileForeground)}.monaco-editor .codicon.codicon-symbol-folder,.monaco-workbench .codicon.codicon-symbol-folder{color:var(--vscode-symbolIcon-folderForeground)}.monaco-editor .codicon.codicon-symbol-function,.monaco-workbench .codicon.codicon-symbol-function{color:var(--vscode-symbolIcon-functionForeground)}.monaco-editor .codicon.codicon-symbol-interface,.monaco-workbench .codicon.codicon-symbol-interface{color:var(--vscode-symbolIcon-interfaceForeground)}.monaco-editor .codicon.codicon-symbol-key,.monaco-workbench .codicon.codicon-symbol-key{color:var(--vscode-symbolIcon-keyForeground)}.monaco-editor .codicon.codicon-symbol-keyword,.monaco-workbench .codicon.codicon-symbol-keyword{color:var(--vscode-symbolIcon-keywordForeground)}.monaco-editor .codicon.codicon-symbol-module,.monaco-workbench .codicon.codicon-symbol-module{color:var(--vscode-symbolIcon-moduleForeground)}.monaco-editor .codicon.codicon-symbol-namespace,.monaco-workbench .codicon.codicon-symbol-namespace{color:var(--vscode-symbolIcon-namespaceForeground)}.monaco-editor .codicon.codicon-symbol-null,.monaco-workbench .codicon.codicon-symbol-null{color:var(--vscode-symbolIcon-nullForeground)}.monaco-editor .codicon.codicon-symbol-number,.monaco-workbench .codicon.codicon-symbol-number{color:var(--vscode-symbolIcon-numberForeground)}.monaco-editor .codicon.codicon-symbol-object,.monaco-workbench .codicon.codicon-symbol-object{color:var(--vscode-symbolIcon-objectForeground)}.monaco-editor .codicon.codicon-symbol-operator,.monaco-workbench .codicon.codicon-symbol-operator{color:var(--vscode-symbolIcon-operatorForeground)}.monaco-editor .codicon.codicon-symbol-package,.monaco-workbench .codicon.codicon-symbol-package{color:var(--vscode-symbolIcon-packageForeground)}.monaco-editor .codicon.codicon-symbol-property,.monaco-workbench .codicon.codicon-symbol-property{color:var(--vscode-symbolIcon-propertyForeground)}.monaco-editor .codicon.codicon-symbol-reference,.monaco-workbench .codicon.codicon-symbol-reference{color:var(--vscode-symbolIcon-referenceForeground)}.monaco-editor .codicon.codicon-symbol-snippet,.monaco-workbench .codicon.codicon-symbol-snippet{color:var(--vscode-symbolIcon-snippetForeground)}.monaco-editor .codicon.codicon-symbol-string,.monaco-workbench .codicon.codicon-symbol-string{color:var(--vscode-symbolIcon-stringForeground)}.monaco-editor .codicon.codicon-symbol-struct,.monaco-workbench .codicon.codicon-symbol-struct{color:var(--vscode-symbolIcon-structForeground)}.monaco-editor .codicon.codicon-symbol-text,.monaco-workbench .codicon.codicon-symbol-text{color:var(--vscode-symbolIcon-textForeground)}.monaco-editor .codicon.codicon-symbol-type-parameter,.monaco-workbench .codicon.codicon-symbol-type-parameter{color:var(--vscode-symbolIcon-typeParameterForeground)}.monaco-editor .codicon.codicon-symbol-unit,.monaco-workbench .codicon.codicon-symbol-unit{color:var(--vscode-symbolIcon-unitForeground)}.monaco-editor .codicon.codicon-symbol-variable,.monaco-workbench .codicon.codicon-symbol-variable{color:var(--vscode-symbolIcon-variableForeground)}.monaco-editor .lightBulbWidget{display:flex;align-items:center;justify-content:center}.monaco-editor .lightBulbWidget:hover{cursor:pointer}.monaco-editor .lightBulbWidget.codicon-light-bulb,.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle{color:var(--vscode-editorLightBulb-foreground)}.monaco-editor .lightBulbWidget.codicon-lightbulb-autofix,.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle-autofix{color:var(--vscode-editorLightBulbAutoFix-foreground, var(--vscode-editorLightBulb-foreground))}.monaco-editor .lightBulbWidget.codicon-sparkle-filled{color:var(--vscode-editorLightBulbAi-foreground, var(--vscode-icon-foreground))}.monaco-editor .lightBulbWidget:before{position:relative;z-index:2}.monaco-editor .lightBulbWidget:after{position:absolute;top:0;left:0;content:"";display:block;width:100%;height:100%;opacity:.3;background-color:var(--vscode-editor-background);z-index:1}.monaco-editor .monaco-editor-overlaymessage{padding-bottom:8px;z-index:10000}.monaco-editor .monaco-editor-overlaymessage.below{padding-bottom:0;padding-top:8px;z-index:10000}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.monaco-editor .monaco-editor-overlaymessage.fadeIn{animation:fadeIn .15s ease-out}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.monaco-editor .monaco-editor-overlaymessage.fadeOut{animation:fadeOut .1s ease-out}.monaco-editor .monaco-editor-overlaymessage .message{padding:2px 4px;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-inputValidation-infoBorder);border-radius:3px}.monaco-editor .monaco-editor-overlaymessage .message p{margin-block:0px}.monaco-editor .monaco-editor-overlaymessage .message a{color:var(--vscode-textLink-foreground)}.monaco-editor .monaco-editor-overlaymessage .message a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor.hc-black .monaco-editor-overlaymessage .message,.monaco-editor.hc-light .monaco-editor-overlaymessage .message{border-width:2px}.monaco-editor .monaco-editor-overlaymessage .anchor{width:0!important;height:0!important;border-color:transparent;border-style:solid;z-index:1000;border-width:8px;position:absolute;left:2px}.monaco-editor .monaco-editor-overlaymessage .anchor.top{border-bottom-color:var(--vscode-inputValidation-infoBorder)}.monaco-editor .monaco-editor-overlaymessage .anchor.below{border-top-color:var(--vscode-inputValidation-infoBorder)}.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,.monaco-editor .monaco-editor-overlaymessage.below .anchor.below{display:none}.monaco-editor .monaco-editor-overlaymessage.below .anchor.top{display:inherit;top:-8px}.monaco-editor .rendered-markdown kbd{background-color:var(--vscode-keybindingLabel-background);color:var(--vscode-keybindingLabel-foreground);border-style:solid;border-width:1px;border-radius:3px;border-color:var(--vscode-keybindingLabel-border);border-bottom-color:var(--vscode-keybindingLabel-bottomBorder);box-shadow:inset 0 -1px 0 var(--vscode-widget-shadow);vertical-align:middle;padding:1px 3px}.action-widget{font-size:13px;min-width:160px;max-width:80vw;z-index:40;display:block;width:100%;border:1px solid var(--vscode-editorWidget-border)!important;border-radius:2px;background-color:var(--vscode-editorWidget-background);color:var(--vscode-editorWidget-foreground)}.context-view-block{position:fixed;cursor:initial;left:0;top:0;width:100%;height:100%;z-index:-1}.context-view-pointerBlock{position:fixed;cursor:initial;left:0;top:0;width:100%;height:100%;z-index:2}.action-widget .monaco-list{user-select:none;-webkit-user-select:none;border:none!important;border-width:0!important}.action-widget .monaco-list:focus:before{outline:0!important}.action-widget .monaco-list .monaco-scrollable-element{overflow:visible}.action-widget .monaco-list .monaco-list-row{padding:0 10px;white-space:nowrap;cursor:pointer;touch-action:none;width:100%}.action-widget .monaco-list .monaco-list-row.action.focused:not(.option-disabled){background-color:var(--vscode-quickInputList-focusBackground)!important;color:var(--vscode-quickInputList-focusForeground);outline:1px solid var(--vscode-menu-selectionBorder, transparent);outline-offset:-1px}.action-widget .monaco-list-row.group-header{color:var(--vscode-descriptionForeground)!important;font-weight:600}.action-widget .monaco-list .group-header,.action-widget .monaco-list .option-disabled,.action-widget .monaco-list .option-disabled:before,.action-widget .monaco-list .option-disabled .focused,.action-widget .monaco-list .option-disabled .focused:before{cursor:default!important;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;background-color:transparent!important;outline:0 solid!important}.action-widget .monaco-list-row.action{display:flex;gap:6px;align-items:center}.action-widget .monaco-list-row.action.option-disabled,.action-widget .monaco-list:focus .monaco-list-row.focused.action.option-disabled,.action-widget .monaco-list-row.action.option-disabled .codicon,.action-widget .monaco-list:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused).option-disabled{color:var(--vscode-disabledForeground)}.action-widget .monaco-list-row.action:not(.option-disabled) .codicon{color:inherit}.action-widget .monaco-list-row.action .title{flex:1;overflow:hidden;text-overflow:ellipsis}.action-widget .action-widget-action-bar{background-color:var(--vscode-editorHoverWidget-statusBarBackground);border-top:1px solid var(--vscode-editorHoverWidget-border)}.action-widget .action-widget-action-bar:before{display:block;content:"";width:100%}.action-widget .action-widget-action-bar .actions-container{padding:0 8px}.action-widget-action-bar .action-label{color:var(--vscode-textLink-activeForeground);font-size:12px;line-height:22px;padding:0;pointer-events:all}.action-widget-action-bar .action-item{margin-right:16px;pointer-events:none}.action-widget-action-bar .action-label:hover{background-color:transparent!important}.monaco-action-bar .actions-container.highlight-toggled .action-label.checked{background:var(--vscode-actionBar-toggledBackground)!important}.monaco-editor .codelens-decoration{overflow:hidden;display:inline-block;text-overflow:ellipsis;white-space:nowrap;color:var(--vscode-editorCodeLens-foreground);line-height:var(--vscode-editorCodeLens-lineHeight);font-size:var(--vscode-editorCodeLens-fontSize);padding-right:calc(var(--vscode-editorCodeLens-fontSize)*.5);font-feature-settings:var(--vscode-editorCodeLens-fontFeatureSettings);font-family:var(--vscode-editorCodeLens-fontFamily),var(--vscode-editorCodeLens-fontFamilyDefault)}.monaco-editor .codelens-decoration>span,.monaco-editor .codelens-decoration>a{user-select:none;-webkit-user-select:none;white-space:nowrap;vertical-align:sub}.monaco-editor .codelens-decoration>a{text-decoration:none}.monaco-editor .codelens-decoration>a:hover{cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .codelens-decoration>a:hover .codicon{color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .codelens-decoration .codicon{vertical-align:middle;color:currentColor!important;color:var(--vscode-editorCodeLens-foreground);line-height:var(--vscode-editorCodeLens-lineHeight);font-size:var(--vscode-editorCodeLens-fontSize)}.monaco-editor .codelens-decoration>a:hover .codicon:before{cursor:pointer}@keyframes fadein{0%{opacity:0;visibility:visible}to{opacity:1}}.monaco-editor .codelens-decoration.fadein{animation:fadein .1s linear}.colorpicker-widget{height:190px;user-select:none;-webkit-user-select:none}.colorpicker-color-decoration,.hc-light .colorpicker-color-decoration{border:solid .1em #000;box-sizing:border-box;margin:.1em .2em 0;width:.8em;height:.8em;line-height:.8em;display:inline-block;cursor:pointer}.hc-black .colorpicker-color-decoration,.vs-dark .colorpicker-color-decoration{border:solid .1em #eee}.colorpicker-header{display:flex;height:24px;position:relative;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-header .picked-color{width:240px;display:flex;align-items:center;justify-content:center;line-height:24px;cursor:pointer;color:#fff;flex:1;white-space:nowrap;overflow:hidden}.colorpicker-header .picked-color .picked-color-presentation{white-space:nowrap;margin-left:5px;margin-right:5px}.colorpicker-header .picked-color .codicon{color:inherit;font-size:14px}.colorpicker-header .picked-color.light{color:#000}.colorpicker-header .original-color{width:74px;z-index:inherit;cursor:pointer}.standalone-colorpicker{color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.colorpicker-header.standalone-colorpicker{border-bottom:none}.colorpicker-header .close-button{cursor:pointer;background-color:var(--vscode-editorHoverWidget-background);border-left:1px solid var(--vscode-editorHoverWidget-border)}.colorpicker-header .close-button-inner-div{width:100%;height:100%;text-align:center}.colorpicker-header .close-button-inner-div:hover{background-color:var(--vscode-toolbar-hoverBackground)}.colorpicker-header .close-icon{padding:3px}.colorpicker-body{display:flex;padding:8px;position:relative}.colorpicker-body .saturation-wrap{overflow:hidden;height:150px;position:relative;min-width:220px;flex:1}.colorpicker-body .saturation-box{height:150px;position:absolute}.colorpicker-body .saturation-selection{width:9px;height:9px;margin:-5px 0 0 -5px;border:1px solid rgb(255,255,255);border-radius:100%;box-shadow:0 0 2px #000c;position:absolute}.colorpicker-body .strip{width:25px;height:150px}.colorpicker-body .standalone-strip{width:25px;height:122px}.colorpicker-body .hue-strip{position:relative;margin-left:8px;cursor:grab;background:linear-gradient(to bottom,red,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red)}.colorpicker-body .opacity-strip{position:relative;margin-left:8px;cursor:grab;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-body .strip.grabbing{cursor:grabbing}.colorpicker-body .slider{position:absolute;top:0;left:-2px;width:calc(100% + 4px);height:4px;box-sizing:border-box;border:1px solid rgba(255,255,255,.71);box-shadow:0 0 1px #000000d9}.colorpicker-body .strip .overlay{height:150px;pointer-events:none}.colorpicker-body .standalone-strip .standalone-overlay{height:122px;pointer-events:none}.standalone-colorpicker-body{display:block;border:1px solid transparent;border-bottom:1px solid var(--vscode-editorHoverWidget-border);overflow:hidden}.colorpicker-body .insert-button{position:absolute;height:20px;width:58px;padding:0;right:8px;bottom:8px;background:var(--vscode-button-background);color:var(--vscode-button-foreground);border-radius:2px;border:none;cursor:pointer}.colorpicker-body .insert-button:hover{background:var(--vscode-button-hoverBackground)}.monaco-editor .goto-definition-link{text-decoration:underline;cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .peekview-widget .head{box-sizing:border-box;display:flex;justify-content:space-between;flex-wrap:nowrap}.monaco-editor .peekview-widget .head .peekview-title{display:flex;align-items:baseline;font-size:13px;margin-left:20px;min-width:0;text-overflow:ellipsis;overflow:hidden}.monaco-editor .peekview-widget .head .peekview-title.clickable{cursor:pointer}.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty){font-size:.9em;margin-left:.5em}.monaco-editor .peekview-widget .head .peekview-title .meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.monaco-editor .peekview-widget .head .peekview-title .dirname,.monaco-editor .peekview-widget .head .peekview-title .filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty):before{content:"-";padding:0 .3em}.monaco-editor .peekview-widget .head .peekview-actions{flex:1;text-align:right;padding-right:2px}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar{display:inline-block}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar,.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar>.actions-container{height:100%}.monaco-editor .peekview-widget>.body{border-top:1px solid;position:relative}.monaco-editor .peekview-widget .head .peekview-title .codicon{margin-right:4px;align-self:center}.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon{color:inherit!important}.monaco-editor .zone-widget{position:absolute;z-index:10}.monaco-editor .zone-widget .zone-widget-container{border-top-style:solid;border-bottom-style:solid;border-top-width:0;border-bottom-width:0;position:relative}.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget{border-top-width:1px;border-bottom-width:1px}.monaco-editor .reference-zone-widget .inline{display:inline-block;vertical-align:top}.monaco-editor .reference-zone-widget .messages{height:100%;width:100%;text-align:center;padding:3em 0}.monaco-editor .reference-zone-widget .ref-tree{line-height:23px;background-color:var(--vscode-peekViewResult-background);color:var(--vscode-peekViewResult-lineForeground)}.monaco-editor .reference-zone-widget .ref-tree .reference{text-overflow:ellipsis;overflow:hidden}.monaco-editor .reference-zone-widget .ref-tree .reference-file{display:inline-flex;width:100%;height:100%;color:var(--vscode-peekViewResult-fileForeground)}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file{color:inherit!important}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows>.monaco-list-row.selected:not(.highlighted){background-color:var(--vscode-peekViewResult-selectionBackground);color:var(--vscode-peekViewResult-selectionForeground)!important}.monaco-editor .reference-zone-widget .ref-tree .reference-file .count{margin-right:12px;margin-left:auto}.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight{background-color:var(--vscode-peekViewResult-matchHighlightBackground)}.monaco-editor .reference-zone-widget .preview .reference-decoration{background-color:var(--vscode-peekViewEditor-matchHighlightBackground);border:2px solid var(--vscode-peekViewEditor-matchHighlightBorder);box-sizing:border-box}.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input{background-color:var(--vscode-peekViewEditor-background)}.monaco-editor .reference-zone-widget .preview .monaco-editor .margin{background-color:var(--vscode-peekViewEditorGutter-background)}.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file,.monaco-editor.hc-light .reference-zone-widget .ref-tree .reference-file{font-weight:700}.monaco-editor.hc-black .reference-zone-widget .ref-tree .referenceMatch .highlight,.monaco-editor.hc-light .reference-zone-widget .ref-tree .referenceMatch .highlight{border:1px dotted var(--vscode-contrastActiveBorder, transparent);box-sizing:border-box}.monaco-hover{cursor:default;position:absolute;overflow:hidden;user-select:text;-webkit-user-select:text;box-sizing:border-box;animation:fadein .1s linear;line-height:1.5em;white-space:var(--vscode-hover-whiteSpace, normal)}.monaco-hover.hidden{display:none}.monaco-hover a:hover:not(.disabled){cursor:pointer}.monaco-hover .hover-contents:not(.html-hover-contents){padding:4px 8px}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents){max-width:var(--vscode-hover-maxWidth, 500px);word-wrap:break-word}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents) hr{min-width:100%}.monaco-hover p,.monaco-hover .code,.monaco-hover ul,.monaco-hover h1,.monaco-hover h2,.monaco-hover h3,.monaco-hover h4,.monaco-hover h5,.monaco-hover h6{margin:8px 0}.monaco-hover h1,.monaco-hover h2,.monaco-hover h3,.monaco-hover h4,.monaco-hover h5,.monaco-hover h6{line-height:1.1}.monaco-hover code{font-family:var(--monaco-monospace-font)}.monaco-hover hr{box-sizing:border-box;border-left:0px;border-right:0px;margin:4px -8px -4px;height:1px}.monaco-hover p:first-child,.monaco-hover .code:first-child,.monaco-hover ul:first-child{margin-top:0}.monaco-hover p:last-child,.monaco-hover .code:last-child,.monaco-hover ul:last-child{margin-bottom:0}.monaco-hover ul,.monaco-hover ol{padding-left:20px}.monaco-hover li>p{margin-bottom:0}.monaco-hover li>ul{margin-top:0}.monaco-hover code{border-radius:3px;padding:0 .4em}.monaco-hover .monaco-tokenized-source{white-space:var(--vscode-hover-sourceWhiteSpace, pre-wrap)}.monaco-hover .hover-row.status-bar{font-size:12px;line-height:22px}.monaco-hover .hover-row.status-bar .info{font-style:italic;padding:0 8px}.monaco-hover .hover-row.status-bar .actions{display:flex;padding:0 8px}.monaco-hover .hover-row.status-bar .actions .action-container{margin-right:16px;cursor:pointer}.monaco-hover .hover-row.status-bar .actions .action-container .action .icon{padding-right:4px}.monaco-hover .markdown-hover .hover-contents .codicon{color:inherit;font-size:inherit;vertical-align:middle}.monaco-hover .hover-contents a.code-link:hover,.monaco-hover .hover-contents a.code-link{color:inherit}.monaco-hover .hover-contents a.code-link:before{content:"("}.monaco-hover .hover-contents a.code-link:after{content:")"}.monaco-hover .hover-contents a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under;color:var(--vscode-textLink-foreground)}.monaco-hover .hover-contents a.code-link>span:hover{color:var(--vscode-textLink-activeForeground)}.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span{margin-bottom:4px;display:inline-block}.monaco-hover-content .action-container a{-webkit-user-select:none;user-select:none}.monaco-hover-content .action-container.disabled{pointer-events:none;opacity:.4;cursor:default}.monaco-editor .peekview-widget .head .peekview-title .severity-icon{display:inline-block;vertical-align:text-top;margin-right:4px}.monaco-editor .marker-widget{text-overflow:ellipsis;white-space:nowrap}.monaco-editor .marker-widget>.stale{opacity:.6;font-style:italic}.monaco-editor .marker-widget .title{display:inline-block;padding-right:5px}.monaco-editor .marker-widget .descriptioncontainer{position:absolute;white-space:pre;user-select:text;-webkit-user-select:text;padding:8px 12px 0 20px}.monaco-editor .marker-widget .descriptioncontainer .message{display:flex;flex-direction:column}.monaco-editor .marker-widget .descriptioncontainer .message .details{padding-left:6px}.monaco-editor .marker-widget .descriptioncontainer .message .source,.monaco-editor .marker-widget .descriptioncontainer .message span.code{opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link{opacity:.6;color:inherit}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before{content:"("}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after{content:")"}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under;color:var(--vscode-textLink-foreground)}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link>span{color:var(--vscode-textLink-activeForeground)}.monaco-editor .marker-widget .descriptioncontainer .filename{cursor:pointer}.monaco-editor .zone-widget .codicon.codicon-error,.markers-panel .marker-icon.error,.markers-panel .marker-icon .codicon.codicon-error,.text-search-provider-messages .providerMessage .codicon.codicon-error,.extensions-viewlet>.extensions .codicon.codicon-error,.extension-editor .codicon.codicon-error,.preferences-editor .codicon.codicon-error{color:var(--vscode-problemsErrorIcon-foreground)}.monaco-editor .zone-widget .codicon.codicon-warning,.markers-panel .marker-icon.warning,.markers-panel .marker-icon .codicon.codicon-warning,.text-search-provider-messages .providerMessage .codicon.codicon-warning,.extensions-viewlet>.extensions .codicon.codicon-warning,.extension-editor .codicon.codicon-warning,.preferences-editor .codicon.codicon-warning{color:var(--vscode-problemsWarningIcon-foreground)}.monaco-editor .zone-widget .codicon.codicon-info,.markers-panel .marker-icon.info,.markers-panel .marker-icon .codicon.codicon-info,.text-search-provider-messages .providerMessage .codicon.codicon-info,.extensions-viewlet>.extensions .codicon.codicon-info,.extension-editor .codicon.codicon-info,.preferences-editor .codicon.codicon-info{color:var(--vscode-problemsInfoIcon-foreground)}.monaco-editor .inlineSuggestionsHints.withBorder{z-index:39;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor .inlineSuggestionsHints a,.monaco-editor .inlineSuggestionsHints a:hover{color:var(--vscode-foreground)}.monaco-editor .inlineSuggestionsHints .keybinding{display:flex;margin-left:4px;opacity:.6}.monaco-editor .inlineSuggestionsHints .keybinding .monaco-keybinding-key{font-size:8px;padding:2px 3px}.monaco-editor .inlineSuggestionsHints .availableSuggestionCount a{display:flex;min-width:19px;justify-content:center}.monaco-editor .inlineSuggestionStatusBarItemLabel{margin-right:2px}.monaco-editor .hoverHighlight{background-color:var(--vscode-editor-hoverHighlightBackground)}.monaco-editor .monaco-hover{color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border);border-radius:3px}.monaco-editor .monaco-hover a{color:var(--vscode-textLink-foreground)}.monaco-editor .monaco-hover a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor .monaco-hover .hover-row .actions{background-color:var(--vscode-editorHoverWidget-statusBarBackground)}.monaco-editor .monaco-hover code{background-color:var(--vscode-textCodeBlock-background)}.monaco-editor.vs .dnd-target,.monaco-editor.hc-light .dnd-target{border-right:2px dotted black;color:#fff}.monaco-editor.vs-dark .dnd-target{border-right:2px dotted #AEAFAD;color:#51504f}.monaco-editor.hc-black .dnd-target{border-right:2px dotted #fff;color:#000}.monaco-editor.mouse-default .view-lines,.monaco-editor.vs-dark.mac.mouse-default .view-lines,.monaco-editor.hc-black.mac.mouse-default .view-lines,.monaco-editor.hc-light.mac.mouse-default .view-lines{cursor:default}.monaco-editor.mouse-copy .view-lines,.monaco-editor.vs-dark.mac.mouse-copy .view-lines,.monaco-editor.hc-black.mac.mouse-copy .view-lines,.monaco-editor.hc-light.mac.mouse-copy .view-lines{cursor:copy}.inline-editor-progress-decoration{display:inline-block;width:1em;height:1em}.inline-progress-widget{display:flex!important;justify-content:center;align-items:center}.inline-progress-widget .icon{font-size:80%!important}.inline-progress-widget:hover .icon{font-size:90%!important;animation:none}.inline-progress-widget:hover .icon:before{content:""}.post-edit-widget{box-shadow:0 0 8px 2px var(--vscode-widget-shadow);border:1px solid var(--vscode-widget-border, transparent);border-radius:4px;background-color:var(--vscode-editorWidget-background);overflow:hidden}.post-edit-widget .monaco-button{padding:2px;border:none;border-radius:0}.post-edit-widget .monaco-button:hover{background-color:var(--vscode-button-secondaryHoverBackground)!important}.post-edit-widget .monaco-button .codicon{margin:0}.monaco-editor .findOptionsWidget{background-color:var(--vscode-editorWidget-background);color:var(--vscode-editorWidget-foreground);box-shadow:0 0 8px 2px var(--vscode-widget-shadow);border:2px solid var(--vscode-contrastBorder)}.monaco-editor .find-widget{position:absolute;z-index:35;height:33px;overflow:hidden;line-height:19px;transition:transform .2s linear;padding:0 4px;box-sizing:border-box;transform:translateY(calc(-100% - 10px));border-bottom-left-radius:4px;border-bottom-right-radius:4px}.monaco-workbench.reduce-motion .monaco-editor .find-widget{transition:transform 0ms linear}.monaco-editor .find-widget textarea{margin:0}.monaco-editor .find-widget.hiddenEditor{display:none}.monaco-editor .find-widget.replaceToggled>.replace-part{display:flex}.monaco-editor .find-widget.visible{transform:translateY(0)}.monaco-editor .find-widget .monaco-inputbox.synthetic-focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-editor .find-widget .monaco-inputbox .input{background-color:transparent;min-height:0}.monaco-editor .find-widget .monaco-findInput .input{font-size:13px}.monaco-editor .find-widget>.find-part,.monaco-editor .find-widget>.replace-part{margin:3px 25px 0 17px;font-size:12px;display:flex}.monaco-editor .find-widget>.find-part .monaco-inputbox,.monaco-editor .find-widget>.replace-part .monaco-inputbox{min-height:25px}.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-right:22px}.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.mirror,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-top:2px;padding-bottom:2px}.monaco-editor .find-widget>.find-part .find-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget>.replace-part .replace-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget .monaco-findInput{vertical-align:middle;display:flex;flex:1}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element{width:100%}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical{opacity:0}.monaco-editor .find-widget .matchesCount{display:flex;flex:initial;margin:0 0 0 3px;padding:2px 0 0 2px;height:25px;vertical-align:middle;box-sizing:border-box;text-align:center;line-height:23px}.monaco-editor .find-widget .button{width:16px;height:16px;padding:3px;border-radius:5px;flex:initial;margin-left:3px;background-position:center center;background-repeat:no-repeat;cursor:pointer;display:flex;align-items:center;justify-content:center}.monaco-editor .find-widget .codicon-find-selection{width:22px;height:22px;padding:3px;border-radius:5px}.monaco-editor .find-widget .button.left{margin-left:0;margin-right:3px}.monaco-editor .find-widget .button.wide{width:auto;padding:1px 6px;top:-1px}.monaco-editor .find-widget .button.toggle{position:absolute;top:0;left:3px;width:18px;height:100%;border-radius:0;box-sizing:border-box}.monaco-editor .find-widget .button.toggle.disabled{display:none}.monaco-editor .find-widget .disabled{color:var(--vscode-disabledForeground);cursor:default}.monaco-editor .find-widget>.replace-part{display:none}.monaco-editor .find-widget>.replace-part>.monaco-findInput{position:relative;display:flex;vertical-align:middle;flex:auto;flex-grow:0;flex-shrink:0}.monaco-editor .find-widget>.replace-part>.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.monaco-editor .find-widget.reduced-find-widget .matchesCount{display:none}.monaco-editor .find-widget.narrow-find-widget{max-width:257px!important}.monaco-editor .find-widget.collapsed-find-widget{max-width:170px!important}.monaco-editor .find-widget.collapsed-find-widget .button.previous,.monaco-editor .find-widget.collapsed-find-widget .button.next,.monaco-editor .find-widget.collapsed-find-widget .button.replace,.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,.monaco-editor .find-widget.collapsed-find-widget>.find-part .monaco-findInput .controls{display:none}.monaco-editor .findMatch{animation-duration:0;animation-name:inherit!important}.monaco-editor .find-widget .monaco-sash{left:0!important}.monaco-editor.hc-black .find-widget .button:before{position:relative;top:1px;left:2px}.monaco-editor .find-widget>.button.codicon-widget-close{position:absolute;top:5px;right:4px}.monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,.monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,.monaco-editor .margin-view-overlays .codicon-folding-expanded,.monaco-editor .margin-view-overlays .codicon-folding-collapsed{cursor:pointer;opacity:0;transition:opacity .5s;display:flex;align-items:center;justify-content:center;font-size:140%;margin-left:2px}.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-expanded,.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-collapsed{transition:initial}.monaco-editor .margin-view-overlays:hover .codicon,.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,.monaco-editor .margin-view-overlays .codicon.codicon-folding-manual-collapsed,.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons{opacity:1}.monaco-editor .inline-folded:after{color:gray;margin:.1em .2em 0;content:"⋯";display:inline;line-height:1em;cursor:pointer}.monaco-editor .folded-background{background-color:var(--vscode-editor-foldBackground)}.monaco-editor .cldr.codicon.codicon-folding-expanded,.monaco-editor .cldr.codicon.codicon-folding-collapsed,.monaco-editor .cldr.codicon.codicon-folding-manual-expanded,.monaco-editor .cldr.codicon.codicon-folding-manual-collapsed{color:var(--vscode-editorGutter-foldingControlForeground)!important}.monaco-editor .suggest-preview-additional-widget{white-space:nowrap}.monaco-editor .suggest-preview-additional-widget .content-spacer{color:transparent;white-space:pre}.monaco-editor .suggest-preview-additional-widget .button{display:inline-block;cursor:pointer;text-decoration:underline;text-underline-position:under}.monaco-editor .ghost-text-hidden{opacity:0;font-size:0}.monaco-editor .ghost-text-decoration,.monaco-editor .suggest-preview-text .ghost-text{font-style:italic}.monaco-editor .inline-completion-text-to-replace{text-decoration:underline;text-underline-position:under}.monaco-editor .ghost-text-decoration,.monaco-editor .ghost-text-decoration-preview,.monaco-editor .suggest-preview-text .ghost-text{color:var(--vscode-editorGhostText-foreground)!important;background-color:var(--vscode-editorGhostText-background);border:1px solid var(--vscode-editorGhostText-border)}.monaco-editor .snippet-placeholder{min-width:2px;outline-style:solid;outline-width:1px;background-color:var(--vscode-editor-snippetTabstopHighlightBackground, transparent);outline-color:var(--vscode-editor-snippetTabstopHighlightBorder, transparent)}.monaco-editor .finish-snippet-placeholder{outline-style:solid;outline-width:1px;background-color:var(--vscode-editor-snippetFinalTabstopHighlightBackground, transparent);outline-color:var(--vscode-editor-snippetFinalTabstopHighlightBorder, transparent)}.monaco-editor .suggest-widget{width:430px;z-index:40;display:flex;flex-direction:column;border-radius:3px}.monaco-editor .suggest-widget.message{flex-direction:row;align-items:center}.monaco-editor .suggest-widget,.monaco-editor .suggest-details{flex:0 1 auto;width:100%;border-style:solid;border-width:1px;border-color:var(--vscode-editorSuggestWidget-border);background-color:var(--vscode-editorSuggestWidget-background)}.monaco-editor.hc-black .suggest-widget,.monaco-editor.hc-black .suggest-details,.monaco-editor.hc-light .suggest-widget,.monaco-editor.hc-light .suggest-details{border-width:2px}.monaco-editor .suggest-widget .suggest-status-bar{box-sizing:border-box;display:none;flex-flow:row nowrap;justify-content:space-between;width:100%;font-size:80%;padding:0 4px;border-top:1px solid var(--vscode-editorSuggestWidget-border);overflow:hidden}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar{display:flex}.monaco-editor .suggest-widget .suggest-status-bar .left{padding-right:8px}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label{color:var(--vscode-editorSuggestWidgetStatus-foreground)}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label{margin-right:0}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label:after{content:", ";margin-right:.3em}.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:100%}.monaco-editor .suggest-widget>.message{padding-left:22px}.monaco-editor .suggest-widget>.tree{height:100%;width:100%}.monaco-editor .suggest-widget .monaco-list{user-select:none;-webkit-user-select:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row{display:flex;-mox-box-sizing:border-box;box-sizing:border-box;padding-right:10px;background-repeat:no-repeat;background-position:2px 2px;white-space:nowrap;cursor:pointer;touch-action:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused{color:var(--vscode-editorSuggestWidget-selectedForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon{color:var(--vscode-editorSuggestWidget-selectedIconForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents{flex:1;height:100%;overflow:hidden;padding-left:2px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main{display:flex;overflow:hidden;text-overflow:ellipsis;white-space:pre;justify-content:space-between}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{display:flex}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.focused)>.contents>.main .monaco-icon-label{color:var(--vscode-editorSuggestWidget-foreground)}.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight{font-weight:700}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main .monaco-highlighted-label .highlight{color:var(--vscode-editorSuggestWidget-highlightForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused>.contents>.main .monaco-highlighted-label .highlight{color:var(--vscode-editorSuggestWidget-focusHighlightForeground)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:before{color:inherit;opacity:1;font-size:14px;cursor:pointer}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close{position:absolute;top:6px;right:2px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover{opacity:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{opacity:.7}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label{overflow:hidden;text-overflow:ellipsis;opacity:.6}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label{margin-left:12px;opacity:.4;font-size:85%;line-height:initial;text-overflow:ellipsis;overflow:hidden;align-self:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{font-size:85%;margin-left:1.1em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{display:none}.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right.can-expand-details>.details-label{width:calc(100% - 26px)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left{flex-shrink:1;flex-grow:1;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label{flex-shrink:0}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label{max-width:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label{flex-shrink:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{overflow:hidden;flex-shrink:4;max-width:70%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:inline-block;position:absolute;right:10px;width:18px;height:18px;visibility:hidden}.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none!important}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:inline-block}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right>.readMore{visibility:visible}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated{opacity:.66;text-decoration:unset}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container{text-decoration:line-through}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label:before{height:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon{display:block;height:16px;width:16px;margin-left:2px;background-repeat:no-repeat;background-size:80%;background-position:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon{display:flex;align-items:center;margin-right:4px}.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon:before{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan{margin:0 0 0 .3em;border:.1em solid #000;width:.7em;height:.7em;display:inline-block}.monaco-editor .suggest-details-container{z-index:41}.monaco-editor .suggest-details{display:flex;flex-direction:column;cursor:default;color:var(--vscode-editorSuggestWidget-foreground)}.monaco-editor .suggest-details.focused{border-color:var(--vscode-focusBorder)}.monaco-editor .suggest-details a{color:var(--vscode-textLink-foreground)}.monaco-editor .suggest-details a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor .suggest-details code{background-color:var(--vscode-textCodeBlock-background)}.monaco-editor .suggest-details.no-docs{display:none}.monaco-editor .suggest-details>.monaco-scrollable-element{flex:1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body{box-sizing:border-box;height:100%;width:100%}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type{flex:2;overflow:hidden;text-overflow:ellipsis;opacity:.7;white-space:pre;margin:0 24px 0 0;padding:4px 0 12px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap{white-space:normal;word-break:break-all}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs{margin:0;padding:4px 5px;white-space:pre-wrap}.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs{margin-right:24px;overflow:hidden}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs{padding:0;white-space:initial;min-height:calc(1rem + 8px)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty){padding:4px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child{margin-top:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child{margin-bottom:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .monaco-tokenized-source{white-space:pre}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code{white-space:pre-wrap;word-wrap:break-word}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon{vertical-align:sub}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty{display:none}.monaco-editor .suggest-details code{border-radius:3px;padding:0 .4em}.monaco-editor .suggest-details ul,.monaco-editor .suggest-details ol{padding-left:20px}.monaco-editor .suggest-details p code{font-family:var(--monaco-monospace-font)}.monaco-editor.vs .valueSetReplacement{outline:solid 2px var(--vscode-editorBracketMatch-border)}.monaco-editor .linked-editing-decoration{background-color:var(--vscode-editor-linkedEditingBackground);min-width:1px}.monaco-editor .detected-link,.monaco-editor .detected-link-active{text-decoration:underline;text-underline-position:under}.monaco-editor .detected-link-active{cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .focused .selectionHighlight{background-color:var(--vscode-editor-selectionHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-selectionHighlightBorder)}.monaco-editor.hc-black .focused .selectionHighlight,.monaco-editor.hc-light .focused .selectionHighlight{border-style:dotted}.monaco-editor .wordHighlight{background-color:var(--vscode-editor-wordHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-wordHighlightBorder)}.monaco-editor.hc-black .wordHighlight,.monaco-editor.hc-light .wordHighlight{border-style:dotted}.monaco-editor .wordHighlightStrong{background-color:var(--vscode-editor-wordHighlightStrongBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-wordHighlightStrongBorder)}.monaco-editor.hc-black .wordHighlightStrong,.monaco-editor.hc-light .wordHighlightStrong{border-style:dotted}.monaco-editor .wordHighlightText{background-color:var(--vscode-editor-wordHighlightTextBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-wordHighlightTextBorder)}.monaco-editor.hc-black .wordHighlightText,.monaco-editor.hc-light .wordHighlightText{border-style:dotted}.monaco-editor .parameter-hints-widget{z-index:39;display:flex;flex-direction:column;line-height:1.5em;cursor:default;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.hc-black .monaco-editor .parameter-hints-widget,.hc-light .monaco-editor .parameter-hints-widget{border-width:2px}.monaco-editor .parameter-hints-widget>.phwrapper{max-width:440px;display:flex;flex-direction:row}.monaco-editor .parameter-hints-widget.multiple{min-height:3.3em;padding:0}.monaco-editor .parameter-hints-widget.multiple .body:before{content:"";display:block;height:100%;position:absolute;opacity:.5;border-left:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor .parameter-hints-widget p,.monaco-editor .parameter-hints-widget ul{margin:8px 0}.monaco-editor .parameter-hints-widget .monaco-scrollable-element,.monaco-editor .parameter-hints-widget .body{display:flex;flex:1;flex-direction:column;min-height:100%}.monaco-editor .parameter-hints-widget .signature{padding:4px 5px;position:relative}.monaco-editor .parameter-hints-widget .signature.has-docs:after{content:"";display:block;position:absolute;left:0;width:100%;padding-top:4px;opacity:.5;border-bottom:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor .parameter-hints-widget .docs{padding:0 10px 0 5px;white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs.empty{display:none}.monaco-editor .parameter-hints-widget .docs a{color:var(--vscode-textLink-foreground)}.monaco-editor .parameter-hints-widget .docs a:hover{color:var(--vscode-textLink-activeForeground);cursor:pointer}.monaco-editor .parameter-hints-widget .docs .markdown-docs{white-space:initial}.monaco-editor .parameter-hints-widget .docs code{font-family:var(--monaco-monospace-font);border-radius:3px;padding:0 .4em;background-color:var(--vscode-textCodeBlock-background)}.monaco-editor .parameter-hints-widget .docs .monaco-tokenized-source,.monaco-editor .parameter-hints-widget .docs .code{white-space:pre-wrap}.monaco-editor .parameter-hints-widget .controls{display:none;flex-direction:column;align-items:center;min-width:22px;justify-content:flex-end}.monaco-editor .parameter-hints-widget.multiple .controls{display:flex;padding:0 2px}.monaco-editor .parameter-hints-widget.multiple .button{width:16px;height:16px;background-repeat:no-repeat;cursor:pointer}.monaco-editor .parameter-hints-widget .button.previous{bottom:24px}.monaco-editor .parameter-hints-widget .overloads{text-align:center;height:12px;line-height:12px;font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .signature .parameter.active{color:var(--vscode-editorHoverWidget-highlightForeground);font-weight:700}.monaco-editor .parameter-hints-widget .documentation-parameter>.parameter{font-weight:700;margin-right:.5em}.monaco-editor .rename-box{z-index:100;color:inherit;border-radius:4px}.monaco-editor .rename-box.preview{padding:4px 4px 0}.monaco-editor .rename-box .rename-input{padding:3px;border-radius:2px}.monaco-editor .rename-box .rename-label{display:none;opacity:.8}.monaco-editor .rename-box.preview .rename-label{display:inherit}.monaco-editor .sticky-widget{overflow:hidden}.monaco-editor .sticky-widget-line-numbers{float:left;background-color:inherit}.monaco-editor .sticky-widget-lines-scrollable{display:inline-block;position:absolute;overflow:hidden;width:var(--vscode-editorStickyScroll-scrollableWidth);background-color:inherit}.monaco-editor .sticky-widget-lines{position:absolute;background-color:inherit}.monaco-editor .sticky-line-number,.monaco-editor .sticky-line-content{color:var(--vscode-editorLineNumber-foreground);white-space:nowrap;display:inline-block;position:absolute;background-color:inherit}.monaco-editor .sticky-line-number .codicon-folding-expanded,.monaco-editor .sticky-line-number .codicon-folding-collapsed{float:right;transition:var(--vscode-editorStickyScroll-foldingOpacityTransition)}.monaco-editor .sticky-line-content{width:var(--vscode-editorStickyScroll-scrollableWidth);background-color:inherit;white-space:nowrap}.monaco-editor .sticky-line-number-inner{display:inline-block;text-align:right}.monaco-editor.hc-black .sticky-widget,.monaco-editor.hc-light .sticky-widget{border-bottom:1px solid var(--vscode-contrastBorder)}.monaco-editor .sticky-line-content:hover{background-color:var(--vscode-editorStickyScrollHover-background);cursor:pointer}.monaco-editor .sticky-widget{width:100%;box-shadow:var(--vscode-scrollbar-shadow) 0 3px 2px -2px;z-index:4;background-color:var(--vscode-editorStickyScroll-background)}.monaco-editor .sticky-widget.peek{background-color:var(--vscode-peekViewEditorStickyScroll-background)}.monaco-editor .unicode-highlight{border:1px solid var(--vscode-editorUnicodeHighlight-border);background-color:var(--vscode-editorUnicodeHighlight-background);box-sizing:border-box}.editor-banner{box-sizing:border-box;cursor:default;width:100%;font-size:12px;display:flex;overflow:visible;height:26px;background:var(--vscode-banner-background)}.editor-banner .icon-container{display:flex;flex-shrink:0;align-items:center;padding:0 6px 0 10px}.editor-banner .icon-container.custom-icon{background-repeat:no-repeat;background-position:center center;background-size:16px;width:16px;padding:0;margin:0 6px 0 10px}.editor-banner .message-container{display:flex;align-items:center;line-height:26px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.editor-banner .message-container p{margin-block-start:0;margin-block-end:0}.editor-banner .message-actions-container{flex-grow:1;flex-shrink:0;line-height:26px;margin:0 4px}.editor-banner .message-actions-container a.monaco-button{width:inherit;margin:2px 8px;padding:0 12px}.editor-banner .message-actions-container a{padding:3px;margin-left:12px;text-decoration:underline}.editor-banner .action-container{padding:0 10px 0 6px}.editor-banner{background-color:var(--vscode-banner-background)}.editor-banner,.editor-banner .action-container .codicon,.editor-banner .message-actions-container .monaco-link{color:var(--vscode-banner-foreground)}.editor-banner .icon-container .codicon{color:var(--vscode-banner-iconForeground)}.monaco-link{color:var(--vscode-textLink-foreground)}.monaco-link:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor .iPadShowKeyboard{width:58px;min-width:0;height:36px;min-height:0;margin:0;padding:0;position:absolute;resize:none;overflow:hidden;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjNDI0MjQyIi8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #F6F6F6;border-radius:4px}.monaco-editor.vs-dark .iPadShowKeyboard{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjQzVDNUM1Ii8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #252526}.monaco-editor .tokens-inspect-widget{z-index:50;user-select:text;-webkit-user-select:text;padding:10px;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor.hc-black .tokens-inspect-widget,.monaco-editor.hc-light .tokens-inspect-widget{border-width:2px}.monaco-editor .tokens-inspect-widget .tokens-inspect-separator{height:1px;border:0;background-color:var(--vscode-editorHoverWidget-border)}.monaco-editor .tokens-inspect-widget .tm-token{font-family:var(--monaco-monospace-font)}.monaco-editor .tokens-inspect-widget .tm-token-length{font-weight:400;font-size:60%;float:right}.monaco-editor .tokens-inspect-widget .tm-metadata-table{width:100%}.monaco-editor .tokens-inspect-widget .tm-metadata-value{font-family:var(--monaco-monospace-font);text-align:right}.monaco-editor .tokens-inspect-widget .tm-token-type{font-family:var(--monaco-monospace-font)}.monaco-editor-container[data-v-df421d9b]{position:relative;border:none;border-radius:0;overflow:hidden;background:#ffffff0d}.editor-wrapper[data-v-df421d9b]{height:100%;min-height:300px}[data-v-df421d9b] .monaco-editor{border-radius:0}[data-v-df421d9b] .monaco-editor .margin{background-color:#ffffff0d!important}[data-v-df421d9b] .monaco-editor .line-numbers{color:#9ca3afcc!important}[data-v-df421d9b] .monaco-editor .current-line{background-color:#37415180!important}[data-v-df421d9b] .monaco-editor .selection{background-color:#3b82f64d!important}[data-v-df421d9b] .monaco-editor .cursor{border-left-color:#f9fafbe6!important}[data-v-df421d9b] .monaco-editor .scrollbar .slider{background-color:#9ca3af4d!important}[data-v-df421d9b] .monaco-editor .scrollbar .slider:hover{background-color:#9ca3af80!important}[data-v-df421d9b] .monaco-editor .scrollbar .slider.active{background-color:#9ca3afb3!important}.mcp-config-form[data-v-c7dc6c11]{width:100%}.form-item[data-v-c7dc6c11]{margin-bottom:20px}.form-item label[data-v-c7dc6c11]{display:block;margin-bottom:8px;font-weight:500;color:#e5e7eb}.required[data-v-c7dc6c11]{color:#ef4444}.config-input[data-v-c7dc6c11],.config-textarea[data-v-c7dc6c11]{width:100%;padding:12px;border:1px solid rgba(255,255,255,.1);border-radius:4px;background:#ffffff0d;color:#ffffffe6;font-size:14px;transition:all .3s}.config-input[data-v-c7dc6c11]:focus,.config-textarea[data-v-c7dc6c11]:focus{outline:none;border-color:#667eea80;background:#ffffff14}.config-textarea[data-v-c7dc6c11]{resize:vertical;min-height:80px}.config-input[data-v-c7dc6c11]::placeholder,.config-textarea[data-v-c7dc6c11]::placeholder{color:#fff6}.usage-instructions[data-v-c7dc6c11]{margin-top:24px;padding:16px;background:#ffffff08;border:1px solid rgba(102,126,234,.5);border-radius:8px;box-shadow:0 2px 8px #0000001a;position:relative}.usage-instructions[data-v-c7dc6c11]:before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:#667eeacc;border-radius:8px 8px 0 0}.instructions-header[data-v-c7dc6c11]{display:flex;align-items:center;gap:8px;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid rgba(255,255,255,.1)}.instructions-icon[data-v-c7dc6c11]{font-size:16px;color:#667eea}.instructions-header h4[data-v-c7dc6c11]{margin:0;font-size:16px;font-weight:600;color:#ffffffe6}.instructions-content[data-v-c7dc6c11]{color:#fffc;line-height:1.5;font-size:14px}.instructions-list[data-v-c7dc6c11]{margin:0;padding-left:16px}.instructions-list>li[data-v-c7dc6c11]{margin-bottom:12px;position:relative;padding-left:4px}.instructions-list>li[data-v-c7dc6c11]::marker{color:#667eea;font-weight:600;font-size:14px}.instructions-list>li[data-v-c7dc6c11]:last-child{margin-bottom:0}.instructions-list strong[data-v-c7dc6c11]{color:#fffffff2;font-weight:600;display:block;margin-bottom:6px;font-size:14px}.instructions-list ul[data-v-c7dc6c11]{margin:6px 0 0;padding-left:16px;list-style-type:disc}.instructions-list ul li[data-v-c7dc6c11]{margin-bottom:3px;color:#ffffffbf;font-size:13px;line-height:1.4}.instructions-list ul li strong[data-v-c7dc6c11]{color:#ffffffe6;font-weight:500;display:inline;margin-bottom:0}.instructions-list code[data-v-c7dc6c11]{background:#667eea26;color:#a8b3ff;padding:1px 4px;border-radius:3px;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px;border:1px solid rgba(102,126,234,.2)}@media (max-width: 768px){.usage-instructions[data-v-c7dc6c11]{margin-top:20px;padding:12px}.instructions-header h4[data-v-c7dc6c11]{font-size:15px}.instructions-content[data-v-c7dc6c11]{font-size:13px}.instructions-list[data-v-c7dc6c11]{padding-left:12px}.instructions-list>li[data-v-c7dc6c11]{margin-bottom:10px}.instructions-list ul li[data-v-c7dc6c11]{font-size:12px}}.tab-panel[data-v-dd5c9237]{width:100%}.tab-header[data-v-dd5c9237]{display:flex;border-bottom:1px solid rgba(255,255,255,.1);margin-bottom:16px}.tab-button[data-v-dd5c9237]{padding:8px 16px;background:none;border:none;border-bottom:2px solid transparent;color:#fff9;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s ease}.tab-button[data-v-dd5c9237]:hover{color:#fffc;background-color:#ffffff0d}.tab-button.active[data-v-dd5c9237]{color:#3b82f6;border-bottom-color:#3b82f6;background-color:#ffffff08}.tab-content[data-v-dd5c9237]{min-height:200px;background-color:#ffffff08;border:1px solid rgba(255,255,255,.1);border-radius:4px;padding:16px}.tab-pane[data-v-dd5c9237]{width:100%}.json-import-panel[data-v-db4635ee]{height:100%;display:flex;flex-direction:column}.form-item[data-v-db4635ee]{flex:1;display:flex;flex-direction:column}.json-tab-panel[data-v-db4635ee]{margin-top:8px}.validation-errors[data-v-db4635ee]{margin-top:12px;padding:12px;background:#ff00001a;border:1px solid rgba(255,0,0,.3);border-radius:4px}.error-item[data-v-db4635ee]{color:#f44;font-size:14px;margin-bottom:4px}.error-item[data-v-db4635ee]:last-child{margin-bottom:0}.example-json[data-v-db4635ee]{margin:0;padding:12px;background:#ffffff08;overflow-x:auto;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:13px;line-height:1.4}.example-json code[data-v-db4635ee]{color:#ffffffe6;background:none;padding:0;border:none;border-radius:0;font-family:inherit;font-size:inherit}.example-json .string[data-v-db4635ee]{color:#a78bfa}.example-json .number[data-v-db4635ee]{color:#fbbf24}.example-json .boolean[data-v-db4635ee]{color:#f87171}.example-json .null[data-v-db4635ee]{color:#fff9}.example-json .key[data-v-db4635ee]{color:#34d399}.json-config-container[data-v-db4635ee]{display:flex;flex-direction:column;height:100%}.usage-instructions[data-v-db4635ee]{margin-top:16px;padding:16px;background:#ffffff08;border:1px solid rgba(102,126,234,.5);border-radius:8px;box-shadow:0 2px 8px #0000001a;position:relative}.usage-instructions[data-v-db4635ee]:before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:#667eeacc;border-radius:8px 8px 0 0}.instructions-header[data-v-db4635ee]{display:flex;align-items:center;gap:8px;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid rgba(255,255,255,.1)}.instructions-icon[data-v-db4635ee]{font-size:16px;color:#667eea}.instructions-header h4[data-v-db4635ee]{margin:0;font-size:16px;font-weight:600;color:#ffffffe6}.instructions-content[data-v-db4635ee]{color:#fffc;line-height:1.5;font-size:14px}.instructions-list[data-v-db4635ee]{margin:0;padding-left:16px}.instructions-list>li[data-v-db4635ee]{margin-bottom:12px;position:relative;padding-left:4px}.instructions-list>li[data-v-db4635ee]::marker{color:#667eea;font-weight:600;font-size:14px}.instructions-list>li[data-v-db4635ee]:last-child{margin-bottom:0}.instructions-list strong[data-v-db4635ee]{color:#fffffff2;font-weight:600;display:block;margin-bottom:6px;font-size:14px}.instructions-list ul[data-v-db4635ee]{margin:6px 0 0;padding-left:16px;list-style-type:disc}.instructions-list ul li[data-v-db4635ee]{margin-bottom:3px;color:#ffffffbf;font-size:13px;line-height:1.4}.instructions-list ul li strong[data-v-db4635ee]{color:#ffffffe6;font-weight:500;display:inline;margin-bottom:0}.instructions-list code[data-v-db4635ee]{background:#667eea26;color:#a8b3ff;padding:1px 4px;border-radius:3px;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px;border:1px solid rgba(102,126,234,.2)}.mcp-config-panel[data-v-163c5416]{position:relative}.mcp-header[data-v-163c5416]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.mcp-header h2[data-v-163c5416]{margin:0;font-size:20px;font-weight:500}.header-left[data-v-163c5416],.header-right[data-v-163c5416]{display:flex;align-items:center}.mcp-stats[data-v-163c5416]{display:flex;margin-left:16px;gap:12px}.stat-item[data-v-163c5416]{display:flex;align-items:center;background:#ffffff0d;padding:4px 8px;border-radius:4px;font-size:12px}.stat-label[data-v-163c5416]{color:#fff9;margin-right:4px}.stat-value[data-v-163c5416]{color:#ffffffe6;font-weight:500}.loading-container[data-v-163c5416]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#ffffffb3}.loading-spinner[data-v-163c5416]{width:20px;height:20px;border:2px solid rgba(255,255,255,.3);border-top:2px solid #667eea;border-radius:50%;animation:spin-163c5416 1s linear infinite;margin-bottom:16px}@keyframes spin-163c5416{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.mcp-layout[data-v-163c5416]{display:flex;gap:30px;flex:1;min-height:0}.server-list[data-v-163c5416]{width:320px;flex-shrink:0;display:flex;flex-direction:column}.list-header[data-v-163c5416]{display:flex;align-items:center;gap:8px;margin-bottom:16px}.list-header h3[data-v-163c5416]{margin:0;font-size:18px}.server-count[data-v-163c5416]{font-size:14px;color:#fff9}.search-box[data-v-163c5416]{position:relative;margin-bottom:20px}.search-input[data-v-163c5416]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:4px;padding:6px 12px 6px 32px;color:#ffffffe6;width:100%;font-size:14px;transition:all .3s}.search-input[data-v-163c5416]:focus{outline:none;border-color:#667eea80;background:#ffffff14;width:100%}.search-input[data-v-163c5416]::placeholder{color:#fff6}.search-icon[data-v-163c5416]{position:absolute;left:10px;top:50%;transform:translateY(-50%);font-size:14px;opacity:.6}.servers-container[data-v-163c5416]{flex:1;overflow-y:auto;margin-bottom:16px}.servers-container[data-v-163c5416]::-webkit-scrollbar{width:6px}.servers-container[data-v-163c5416]::-webkit-scrollbar-track{background:#ffffff0d;border-radius:3px}.servers-container[data-v-163c5416]::-webkit-scrollbar-thumb{background:#fff3;border-radius:3px}.servers-container[data-v-163c5416]::-webkit-scrollbar-thumb:hover{background:#ffffff4d}.server-card[data-v-163c5416]{background:#ffffff08;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:16px;margin-bottom:12px;cursor:pointer;transition:all .3s ease;display:flex;flex-direction:column;gap:8px}.server-card[data-v-163c5416]:hover:not(.active){background:#ffffff0d;border-color:#fff3}.server-card.active[data-v-163c5416]{border-color:#667eea;background:#667eea1a}.server-card-header[data-v-163c5416]{display:flex;justify-content:space-between;align-items:center;font-size:15px;font-weight:500;color:#ffffffe6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;gap:10px}.server-name[data-v-163c5416]{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.server-connection-type[data-v-163c5416]{font-size:12px;color:#ffffffb3;display:flex;align-items:center;gap:6px}.connection-type-icon[data-v-163c5416]{font-size:14px;opacity:.8}.connection-type-badge[data-v-163c5416]{display:inline-block;padding:4px 8px;border-radius:4px;font-size:11px;font-weight:500;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#9e9e9e33;color:#bdbdbd}.connection-type-badge.studio[data-v-163c5416]{background:#2196f333;color:#90caf9}.connection-type-badge.sse[data-v-163c5416]{background:#4caf5033;color:#a5d6a7}.connection-type-badge.streaming[data-v-163c5416]{background:#9c27b033;color:#ce93d8}.server-config-summary[data-v-163c5416]{margin-top:12px;padding-top:12px;border-top:1px solid rgba(255,255,255,.1)}.config-item[data-v-163c5416]{display:flex;align-items:flex-start;margin-bottom:6px;font-size:12px;line-height:1.4}.config-label[data-v-163c5416]{color:#fff9;font-weight:500;min-width:50px;margin-right:8px}.config-value[data-v-163c5416]{color:#fffc;word-break:break-all;flex:1}.server-config-preview[data-v-163c5416]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;padding:8px 12px;max-height:120px;overflow-y:auto;overflow-x:auto}.config-preview[data-v-163c5416]{margin:0;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:10px;line-height:1.3;color:#ffffffe6;white-space:pre-wrap;word-break:break-all}.config-preview .json-key[data-v-163c5416]{color:#90caf9}.config-preview .json-string[data-v-163c5416]{color:#a5d6a7}.config-preview .json-number[data-v-163c5416]{color:#f39c12}.config-preview .json-boolean[data-v-163c5416]{color:#e74c3c}.config-preview .json-null[data-v-163c5416]{color:#95a5a6}.loading-state[data-v-163c5416]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#ffffffb3}.loading-icon[data-v-163c5416]{font-size:32px;margin-bottom:16px}.empty-state[data-v-163c5416]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#ffffff80;text-align:center}.empty-icon[data-v-163c5416]{font-size:48px;margin-bottom:16px;opacity:.5}.add-config-button-container[data-v-163c5416]{margin-top:0}.add-btn[data-v-163c5416]{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:16px;background:#ffffff08;border:1px dashed rgba(255,255,255,.2);border-radius:8px;color:#fffc;cursor:pointer;transition:all .3s ease;font-size:14px}.add-btn[data-v-163c5416]:hover{background:#ffffff0d;border-color:#ffffff4d;color:#fff}.add-btn[data-v-163c5416]:disabled{opacity:.5;cursor:not-allowed}.add-btn.primary[data-v-163c5416]{background:#667eea33;border-color:#667eea4d;color:#a8b3ff}.add-btn.primary[data-v-163c5416]:hover:not(:disabled){background:#667eea4d}.add-btn.danger[data-v-163c5416]{background:#ea66661a;border-color:#ea666633;color:#ff8a8a}.add-btn.danger[data-v-163c5416]:hover:not(:disabled){background:#ea666633}.add-btn.small[data-v-163c5416]{padding:6px 12px;font-size:12px}.form-row[data-v-163c5416]{display:flex;gap:20px}.form-actions[data-v-163c5416]{display:flex;gap:12px;justify-content:flex-end}.server-detail[data-v-163c5416]{flex:1;background:#ffffff08;border-radius:12px;padding:24px;overflow-y:auto}.detail-header[data-v-163c5416]{display:flex;justify-content:space-between;align-items:center;margin-bottom:32px;padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,.1)}.detail-header h3[data-v-163c5416]{margin:0;font-size:20px}.detail-actions[data-v-163c5416]{display:flex;gap:12px}.detail-content[data-v-163c5416]{display:flex;flex-direction:column;gap:20px;flex:1;overflow-y:auto;padding-right:4px}.detail-content[data-v-163c5416]::-webkit-scrollbar{width:6px}.detail-content[data-v-163c5416]::-webkit-scrollbar-track{background:#ffffff0d;border-radius:3px}.detail-content[data-v-163c5416]::-webkit-scrollbar-thumb{background:#fff3;border-radius:3px}.detail-content[data-v-163c5416]::-webkit-scrollbar-thumb:hover{background:#ffffff4d}.action-btn[data-v-163c5416]{display:flex;align-items:center;gap:6px;padding:10px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#fff;cursor:pointer;transition:all .3s ease;font-size:14px}.action-btn[data-v-163c5416]:hover:not(:disabled){background:#ffffff1a;border-color:#fff3}.action-btn[data-v-163c5416]:disabled{opacity:.5;cursor:not-allowed}.action-btn.primary[data-v-163c5416]{background:#667eea33;border-color:#667eea4d;color:#a8b3ff}.action-btn.primary[data-v-163c5416]:hover:not(:disabled){background:#667eea4d}.action-btn.danger[data-v-163c5416]{background:#ea66661a;border-color:#ea666633;color:#ff8a8a}.action-btn.danger[data-v-163c5416]:hover:not(:disabled){background:#ea666633}.action-btn.small[data-v-163c5416]{padding:6px 12px;font-size:12px}.form-item[data-v-163c5416]{margin-bottom:20px}.form-item label[data-v-163c5416]{display:block;margin-bottom:8px;font-weight:500;color:#ffffffe6;font-size:14px}.form-item .required[data-v-163c5416]{color:#ef5350;margin-left:4px}.json-editor-container[data-v-163c5416]{position:relative}.json-editor-header[data-v-163c5416]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.json-status[data-v-163c5416]{font-size:12px;padding:8px 12px;border-radius:4px;font-weight:500;max-width:400px;word-wrap:break-word;white-space:pre-line;line-height:1.4;min-height:20px}.json-status.valid[data-v-163c5416]{background:#10b98133;color:#34d399}.json-status.invalid[data-v-163c5416]{background:#ef444433;color:#f87171}.format-btn[data-v-163c5416]{display:flex;align-items:center;gap:4px;background:#667eea1a;border:1px solid rgba(102,126,234,.3);border-radius:4px;color:#a8b3ff;padding:4px 8px;font-size:12px;cursor:pointer;transition:all .3s}.format-btn[data-v-163c5416]:hover:not(:disabled){background:#667eea33;border-color:#667eea80}.format-btn[data-v-163c5416]:disabled{opacity:.5;cursor:not-allowed}.format-icon[data-v-163c5416]{font-size:12px}.json-editor-wrapper[data-v-163c5416]{position:relative;border:1px solid rgba(255,255,255,.1);border-radius:4px;overflow:hidden;background:#ffffff0d;min-height:300px}.json-editor[data-v-163c5416]{height:100%;min-height:280px}.config-textarea[data-v-163c5416]{width:100%;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:4px;padding:12px;color:#ffffffe6;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:13px;line-height:1.4;resize:vertical;transition:all .3s}.config-textarea[data-v-163c5416]:focus{outline:none;border-color:#667eea80;background:#ffffff14}.config-textarea[data-v-163c5416]::placeholder{color:#fff6}.config-input[data-v-163c5416]{width:100%;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:4px;padding:12px;color:#ffffffe6;font-size:14px;transition:all .3s}.config-input[data-v-163c5416]:focus{outline:none;border-color:#667eea80;background:#ffffff14}.config-input[data-v-163c5416]::placeholder{color:#fff6}.no-selection[data-v-163c5416]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#ffffff80;text-align:center}.placeholder-icon[data-v-163c5416]{font-size:48px;margin-bottom:16px;opacity:.5}.message-toast[data-v-163c5416]{position:fixed;top:20px;right:20px;padding:12px 20px;border-radius:8px;color:#fff;font-weight:500;z-index:9999;box-shadow:0 4px 12px #0000004d;max-width:400px;word-wrap:break-word;white-space:pre-line;line-height:1.4}.message-toast.success[data-v-163c5416]{background:#10b981}.message-toast.error[data-v-163c5416]{background:#ef4444}.message-toast.info[data-v-163c5416]{background:#667eea}.message-fade-enter-active[data-v-163c5416],.message-fade-leave-active[data-v-163c5416]{transition:all .3s ease}.message-fade-enter-from[data-v-163c5416],.message-fade-leave-to[data-v-163c5416]{transform:translate(100%);opacity:0}@media (max-width: 1200px){.mcp-layout[data-v-163c5416]{flex-direction:column}.server-list[data-v-163c5416],.server-detail[data-v-163c5416]{width:100%}.server-list[data-v-163c5416]{order:2}.server-detail[data-v-163c5416]{order:1}}.wide-modal[data-v-163c5416]{width:80vw!important;max-width:1200px!important}.form-row[data-v-163c5416]{display:flex;gap:20px;margin-bottom:20px}.form-row .form-item[data-v-163c5416]{flex:1}.narrow-input[data-v-163c5416]{width:70%}.narrow-input .config-input[data-v-163c5416],.narrow-input .config-textarea[data-v-163c5416]{width:100%}.status-toggle-container[data-v-163c5416]{display:flex;align-items:center}.status-toggle[data-v-163c5416]{position:relative;width:60px;height:30px;background:#6b7280;border-radius:15px;cursor:pointer;transition:all .3s ease;display:flex;align-items:center;justify-content:space-between;padding:0 8px}.status-toggle.enabled[data-v-163c5416]{background:#10b981}.toggle-thumb[data-v-163c5416]{position:absolute;width:24px;height:24px;background:#fff;border-radius:50%;top:3px;left:3px;transition:all .3s ease;box-shadow:0 2px 4px #0003}.status-toggle.enabled .toggle-thumb[data-v-163c5416]{left:33px}.toggle-label[data-v-163c5416]{color:#fff;font-size:12px;font-weight:500;-webkit-user-select:none;user-select:none}.server-status-toggle[data-v-163c5416]{display:flex;align-items:center}.server-card-header .status-toggle[data-v-163c5416]{width:50px;height:24px}.server-card-header .toggle-thumb[data-v-163c5416]{width:18px;height:18px;top:3px;left:3px}.server-card-header .status-toggle.enabled .toggle-thumb[data-v-163c5416]{left:29px}.server-card-header .toggle-label[data-v-163c5416]{font-size:10px}@media (max-width: 768px){.mcp-header[data-v-163c5416]{flex-direction:column;gap:16px;align-items:stretch}.search-input[data-v-163c5416]{width:100%}.search-input[data-v-163c5416]:focus{width:100%}.mcp-table-wrapper[data-v-163c5416]{overflow-x:scroll}.mcp-table[data-v-163c5416]{min-width:600px}.connection-type-options[data-v-163c5416],.mcp-form-actions[data-v-163c5416]{flex-direction:column;gap:12px}.mcp-form-actions button[data-v-163c5416]{width:100%}.form-row[data-v-163c5416]{flex-direction:column;gap:15px}.narrow-input[data-v-163c5416]{width:100%}.server-detail[data-v-163c5416]{padding:16px}.detail-header[data-v-163c5416]{margin-bottom:16px}.detail-content[data-v-163c5416]{gap:16px}.form-row[data-v-163c5416]{flex-direction:column;gap:16px}.form-actions[data-v-163c5416]{flex-direction:column;gap:8px}.form-actions .action-btn[data-v-163c5416]{width:100%}}.json-actions[data-v-163c5416]{display:flex;gap:8px;align-items:center}.json-import-form[data-v-163c5416]{height:100%;display:flex;flex-direction:column}.json-import-form .form-item[data-v-163c5416]{flex:1;display:flex;flex-direction:column}.json-import-form .form-item label[data-v-163c5416]{margin-bottom:8px}.json-import-form .monaco-editor[data-v-163c5416]{flex:1;min-height:600px;border:none;border-radius:0}.validation-errors[data-v-163c5416]{margin-top:12px;padding:12px;background:#ff00001a;border:1px solid rgba(255,0,0,.3);border-radius:4px}.error-item[data-v-163c5416]{color:#f44;font-size:14px;margin-bottom:4px}.error-item[data-v-163c5416]:last-child{margin-bottom:0}.json-tab-panel[data-v-163c5416]{margin-top:8px}.example-json[data-v-163c5416]{margin:0;padding:12px;background:#ffffff08;overflow-x:auto;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:13px;line-height:1.4}.example-json code[data-v-163c5416]{color:#ffffffe6;background:none;padding:0;border:none;border-radius:0;font-family:inherit;font-size:inherit}.example-json .string[data-v-163c5416]{color:#a78bfa}.example-json .number[data-v-163c5416]{color:#fbbf24}.example-json .boolean[data-v-163c5416]{color:#f87171}.example-json .null[data-v-163c5416]{color:#fff9}.example-json .key[data-v-163c5416]{color:#34d399}.custom-select[data-v-4c6d676f]{position:relative;display:inline-block}.select-btn[data-v-4c6d676f]{display:flex;align-items:center;gap:6px;padding:8px 12px;background:#ffffff0d;border:1px solid rgba(80 78 78);border-radius:8px;color:#fff;cursor:pointer;transition:all .2s ease;font-size:14px;font-weight:600;outline:none}.select-btn[data-v-4c6d676f]:hover{background:#667eea26;border-color:#7c9eff;color:#a3bffa;box-shadow:0 0 15px #667eea33}.select-btn[data-v-4c6d676f]:focus{box-shadow:0 0 0 3px #667eea80}.current-option[data-v-4c6d676f]{color:inherit;font-weight:600;min-width:40px;text-align:left;text-shadow:none}.chevron[data-v-4c6d676f]{transition:transform .3s cubic-bezier(.4,0,.2,1);opacity:.9;filter:none}.select-dropdown[data-v-4c6d676f]{position:absolute;top:100%;left:0;z-index:9999;margin-top:4px;background:linear-gradient(135deg,#282832f2,#1e1e28f2);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid rgba(102,126,234,.3);border-radius:8px;box-shadow:0 8px 32px #0006,0 0 0 1px #667eea33;min-width:300px}.dropdown-header[data-v-4c6d676f]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid rgba(102,126,234,.2);font-size:14px;font-weight:600;color:#fff;background:linear-gradient(135deg,#667eea1a,#667eea0d)}.close-btn[data-v-4c6d676f]{background:none;border:none;color:#fff9;cursor:pointer;padding:4px;border-radius:4px;transition:all .2s ease}.close-btn[data-v-4c6d676f]:hover{background:#ffffff1a;color:#fffc}.select-options[data-v-4c6d676f]{padding:8px 0}.select-option[data-v-4c6d676f]{display:flex;align-items:center;gap:12px;width:100%;padding:10px 16px;background:none;border:none;color:#ffffffb3;cursor:pointer;transition:all .2s ease;text-align:left}.select-option[data-v-4c6d676f]:hover{background:#ffffff0d;color:#ffffffe6}.select-option.active[data-v-4c6d676f]{background:linear-gradient(135deg,#667eea33,#667eea1a);color:#7c9eff;border-left:3px solid #667eea;padding-left:13px}.option-type[data-v-4c6d676f]{display:inline-block;min-width:24px;font-size:12px;font-weight:600;opacity:.8}.option-name[data-v-4c6d676f]{flex:1;font-size:14px;font-weight:500}.check-icon[data-v-4c6d676f]{color:#667eea;opacity:.8}.spacer[data-v-4c6d676f]{display:inline-block;width:12px}.backdrop[data-v-4c6d676f]{position:fixed;top:0;left:0;right:0;bottom:0;z-index:9998;background:transparent}.slideDown-enter-active[data-v-4c6d676f],.slideDown-leave-active[data-v-4c6d676f]{transition:all .2s ease;transform-origin:top}.slideDown-enter-from[data-v-4c6d676f],.slideDown-leave-to[data-v-4c6d676f]{opacity:0;transform:translateY(-8px) scale(.95)}.actions-container[data-v-86dcf751]{display:flex;align-items:center;gap:16px}.action-btn.warning[data-v-86dcf751]{background:#f59e0b;color:#fff}.action-btn.warning[data-v-86dcf751]:hover{background:#d97706}.action-btn.info[data-v-86dcf751]{background:#3b82f6;color:#fff}.action-btn.info[data-v-86dcf751]:hover{background:#2563eb}.import-language-dropdown[data-v-86dcf751]{display:inline-block}.language-select-modal[data-v-86dcf751]{width:100%;padding:8px 12px;border:1px solid rgba(255,255,255,.2);border-radius:4px;background:#ffffff0d;color:#fff;font-size:14px;outline:none}.language-select-modal[data-v-86dcf751]:focus{border-color:#409eff}.warning-notice[data-v-86dcf751]{display:flex;align-items:flex-start;gap:8px;padding:12px;margin-top:16px;background:#f59e0b1a;border:1px solid rgba(245,158,11,.3);border-radius:6px}.warning-icon-small[data-v-86dcf751]{color:#f59e0b;font-size:16px;margin-top:2px;flex-shrink:0}.warning-notice p[data-v-86dcf751]{margin:0;font-size:14px;color:#fffc}.prompt-layout[data-v-86dcf751]{display:flex;gap:12px;flex:1;min-height:0}.prompt-list[data-v-86dcf751]{width:336px;flex-shrink:0;display:flex;flex-direction:column}.list-header[data-v-86dcf751]{display:flex;align-items:center;gap:8px;margin-bottom:16px}.list-header h3[data-v-86dcf751]{margin:0;font-size:18px}.prompt-count[data-v-86dcf751]{color:#fff9;font-size:14px}.prompts-container[data-v-86dcf751]{flex:1;overflow-y:auto;margin-bottom:16px;padding-right:6px}.loading-state[data-v-86dcf751]{display:flex;align-items:center;gap:8px;justify-content:center;padding:40px 0;color:#fff9}.loading-icon[data-v-86dcf751]{animation:spin-86dcf751 1s linear infinite}@keyframes spin-86dcf751{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.empty-state[data-v-86dcf751]{text-align:center;padding:60px 20px;color:#fff9}.empty-icon[data-v-86dcf751]{font-size:48px;margin-bottom:16px;opacity:.4}.empty-tip[data-v-86dcf751]{font-size:14px;margin-top:8px}.prompt-card[data-v-86dcf751]{background:#ffffff08;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:16px;margin-bottom:12px;cursor:pointer;transition:all .3s ease}.prompt-card[data-v-86dcf751]:hover{background:#ffffff0d;border-color:#fff3}.prompt-card.active[data-v-86dcf751]{border-color:#667eea;background:#667eea1a}.prompt-card-header[data-v-86dcf751]{display:flex;justify-content:space-between;align-items:center}.prompt-name[data-v-86dcf751]{font-weight:500;font-size:16px}.prompt-desc[data-v-86dcf751]{color:#ffffffb3;font-size:14px;line-height:1.4;margin-bottom:0;margin-top:8px}.prompt-tools[data-v-86dcf751]{display:flex;flex-wrap:wrap;gap:6px}.tool-tag[data-v-86dcf751]{display:inline-block;padding:4px 8px;background:#667eea33;border-radius:4px;font-size:12px;color:#a8b3ff}.tool-more[data-v-86dcf751]{color:#ffffff80;font-size:12px;padding:4px 8px}.no-tools-indicator[data-v-86dcf751]{color:#fff6;font-size:12px;font-style:italic}.add-btn[data-v-86dcf751]{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:16px;background:#ffffff08;border:1px dashed rgba(255,255,255,.2);border-radius:8px;color:#fffc;cursor:pointer;transition:all .3s ease;font-size:14px}.add-btn[data-v-86dcf751]:hover{background:#ffffff0d;border-color:#ffffff4d;color:#fff}.prompt-detail[data-v-86dcf751]{flex:1;background:#ffffff08;border-radius:12px;padding:12px 24px;overflow-y:auto}.no-selection[data-v-86dcf751]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#fff9}.placeholder-icon[data-v-86dcf751]{font-size:64px;margin-bottom:24px;opacity:.3}.detail-header[data-v-86dcf751]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,.1)}.detail-header h3[data-v-86dcf751]{margin:0;font-size:20px}.detail-actions[data-v-86dcf751]{display:flex;gap:12px}.form-section[data-v-86dcf751]{margin-bottom:32px}.form-item[data-v-86dcf751]{margin-bottom:20px}.form-item label[data-v-86dcf751]{display:block;margin-bottom:8px;color:#ffffffe6;font-weight:500}.form-item input[data-v-86dcf751],.form-item textarea[data-v-86dcf751]{width:100%;padding:12px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;color:#fff;font-size:14px;transition:all .3s ease}.form-item input[data-v-86dcf751]:focus,.form-item textarea[data-v-86dcf751]:focus{border-color:#667eea;outline:none;background:#ffffff14}.form-item input[data-v-86dcf751]::placeholder,.form-item textarea[data-v-86dcf751]::placeholder{color:#fff6}.form-item input[data-v-86dcf751]:disabled,.form-item textarea[data-v-86dcf751]:disabled{cursor:not-allowed;background:#ffffff08;color:#fff;border-color:#ffffff0d;opacity:.6}.form-item textarea[data-v-86dcf751]{resize:vertical;min-height:80px;line-height:1.5}.required[data-v-86dcf751]{color:#ff6b6b}.section-header[data-v-86dcf751]{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.section-header span[data-v-86dcf751]{font-weight:500;color:#fffc}.action-btn[data-v-86dcf751]{display:flex;align-items:center;gap:6px;padding:10px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#fff;cursor:pointer;transition:all .3s ease;font-size:14px}.action-btn[data-v-86dcf751]:hover:not(:disabled){background:#ffffff1a;border-color:#fff3}.action-btn[data-v-86dcf751]:disabled{opacity:.5;cursor:not-allowed}.action-btn.primary[data-v-86dcf751]{background:#667eea33;border-color:#667eea4d;color:#a8b3ff}.action-btn.primary[data-v-86dcf751]:hover:not(:disabled){background:#667eea4d}.action-btn.danger[data-v-86dcf751]{background:#ea66661a;border-color:#ea666633;color:#ff8a8a}.action-btn.danger[data-v-86dcf751]:hover:not(:disabled){background:#ea666633}.action-btn.small[data-v-86dcf751]{padding:6px 12px;font-size:12px}.modal-form[data-v-86dcf751]{display:flex;flex-direction:column;gap:16px}.delete-confirm[data-v-86dcf751]{text-align:center;padding:20px 0}.delete-confirm p[data-v-86dcf751]{color:#fffc;margin:8px 0}.delete-confirm .warning-text[data-v-86dcf751]{color:#fff9;font-size:14px}.warning-icon[data-v-86dcf751]{font-size:48px;color:#ffa726;margin-bottom:16px}.confirm-btn[data-v-86dcf751],.cancel-btn[data-v-86dcf751]{padding:10px 20px;border-radius:6px;cursor:pointer;transition:all .3s ease}.confirm-btn.danger[data-v-86dcf751],.cancel-btn.danger[data-v-86dcf751]{background:#ea666633;border:1px solid rgba(234,102,102,.3);color:#ff8a8a}.confirm-btn.danger[data-v-86dcf751]:hover,.cancel-btn.danger[data-v-86dcf751]:hover{background:#ea66664d}.tags[data-v-86dcf751]{margin-top:8px}.tags .tag[data-v-86dcf751]{display:inline-block;padding:4px 8px;background:#667eea33;border-radius:4px;font-size:12px;color:#a8b3ff}.cancel-btn[data-v-86dcf751]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);color:#fff}.cancel-btn[data-v-86dcf751]:hover{background:#ffffff1a}@keyframes slideIn-86dcf751{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}.namespace-layout[data-v-c4f8fbf9]{display:flex;gap:12px;flex:1;min-height:0}.namespace-list[data-v-c4f8fbf9]{width:336px;flex-shrink:0;display:flex;flex-direction:column}.list-header[data-v-c4f8fbf9]{display:flex;align-items:center;gap:8px;margin-bottom:16px}.list-header h3[data-v-c4f8fbf9]{margin:0;font-size:18px}.namespace-count[data-v-c4f8fbf9]{color:#fff9;font-size:14px}.namespaces-container[data-v-c4f8fbf9]{flex:1;overflow-y:auto;margin-bottom:16px;padding-right:6px}.loading-state[data-v-c4f8fbf9]{display:flex;align-items:center;gap:8px;justify-content:center;padding:40px 0;color:#fff9}.loading-icon[data-v-c4f8fbf9]{animation:spin-c4f8fbf9 1s linear infinite}@keyframes spin-c4f8fbf9{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.empty-state[data-v-c4f8fbf9]{text-align:center;padding:60px 20px;color:#fff9}.empty-icon[data-v-c4f8fbf9]{font-size:48px;margin-bottom:16px;opacity:.4}.empty-tip[data-v-c4f8fbf9]{font-size:14px;margin-top:8px}.namespace-card[data-v-c4f8fbf9]{background:#ffffff08;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:16px;margin-bottom:12px;cursor:pointer;transition:all .3s ease}.namespace-card[data-v-c4f8fbf9]:hover{background:#ffffff0d;border-color:#fff3}.namespace-card.active[data-v-c4f8fbf9]{border-color:#667eea;background:#667eea1a}.namespace-card-header[data-v-c4f8fbf9]{display:flex;justify-content:space-between;align-items:center}.namespace-name[data-v-c4f8fbf9]{font-weight:500;font-size:16px}.namespace-desc[data-v-c4f8fbf9]{color:#ffffffb3;font-size:14px;line-height:1.4;margin-bottom:0;margin-top:8px}.namespace-tools[data-v-c4f8fbf9]{display:flex;flex-wrap:wrap;gap:6px}.tool-tag[data-v-c4f8fbf9]{display:inline-block;padding:4px 8px;background:#667eea33;border-radius:4px;font-size:12px;color:#a8b3ff}.tool-more[data-v-c4f8fbf9]{color:#ffffff80;font-size:12px;padding:4px 8px}.no-tools-indicator[data-v-c4f8fbf9]{color:#fff6;font-size:12px;font-style:italic}.add-btn[data-v-c4f8fbf9]{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:16px;background:#ffffff08;border:1px dashed rgba(255,255,255,.2);border-radius:8px;color:#fffc;cursor:pointer;transition:all .3s ease;font-size:14px}.add-btn[data-v-c4f8fbf9]:hover{background:#ffffff0d;border-color:#ffffff4d;color:#fff}.namespace-detail[data-v-c4f8fbf9]{flex:1;background:#ffffff08;border-radius:12px;padding:12px 24px;overflow-y:auto}.no-selection[data-v-c4f8fbf9]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#fff9}.placeholder-icon[data-v-c4f8fbf9]{font-size:64px;margin-bottom:24px;opacity:.3}.detail-header[data-v-c4f8fbf9]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,.1)}.detail-header h3[data-v-c4f8fbf9]{margin:0;font-size:20px}.detail-actions[data-v-c4f8fbf9]{display:flex;gap:12px}.form-section[data-v-c4f8fbf9]{margin-bottom:32px}.form-item[data-v-c4f8fbf9]{margin-bottom:20px}.form-item label[data-v-c4f8fbf9]{display:block;margin-bottom:8px;color:#ffffffe6;font-weight:500}.form-item input[data-v-c4f8fbf9],.form-item textarea[data-v-c4f8fbf9]{width:100%;padding:12px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;color:#fff;font-size:14px;transition:all .3s ease}.form-item input[data-v-c4f8fbf9]:focus,.form-item textarea[data-v-c4f8fbf9]:focus{border-color:#667eea;outline:none;background:#ffffff14}.form-item input[data-v-c4f8fbf9]::placeholder,.form-item textarea[data-v-c4f8fbf9]::placeholder{color:#fff6}.form-item input[data-v-c4f8fbf9]:disabled,.form-item textarea[data-v-c4f8fbf9]:disabled{cursor:not-allowed;background:#ffffff08;color:#fff;border-color:#ffffff0d;opacity:.6}.form-item textarea[data-v-c4f8fbf9]{resize:vertical;min-height:80px;line-height:1.5}.required[data-v-c4f8fbf9]{color:#ff6b6b}.section-header[data-v-c4f8fbf9]{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.section-header span[data-v-c4f8fbf9]{font-weight:500;color:#fffc}.action-btn[data-v-c4f8fbf9]{display:flex;align-items:center;gap:6px;padding:10px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#fff;cursor:pointer;transition:all .3s ease;font-size:14px}.action-btn[data-v-c4f8fbf9]:hover:not(:disabled){background:#ffffff1a;border-color:#fff3}.action-btn[data-v-c4f8fbf9]:disabled{opacity:.5;cursor:not-allowed}.action-btn.primary[data-v-c4f8fbf9]{background:#667eea33;border-color:#667eea4d;color:#a8b3ff}.action-btn.primary[data-v-c4f8fbf9]:hover:not(:disabled){background:#667eea4d}.action-btn.danger[data-v-c4f8fbf9]{background:#ea66661a;border-color:#ea666633;color:#ff8a8a}.action-btn.danger[data-v-c4f8fbf9]:hover:not(:disabled){background:#ea666633}.action-btn.small[data-v-c4f8fbf9]{padding:6px 12px;font-size:12px}.modal-form[data-v-c4f8fbf9]{display:flex;flex-direction:column;gap:16px}.delete-confirm[data-v-c4f8fbf9]{text-align:center;padding:20px 0}.delete-confirm p[data-v-c4f8fbf9]{color:#fffc;margin:8px 0}.delete-confirm .warning-text[data-v-c4f8fbf9]{color:#fff9;font-size:14px}.warning-icon[data-v-c4f8fbf9]{font-size:48px;color:#ffa726;margin-bottom:16px}.confirm-btn[data-v-c4f8fbf9],.cancel-btn[data-v-c4f8fbf9]{padding:10px 20px;border-radius:6px;cursor:pointer;transition:all .3s ease}.confirm-btn.danger[data-v-c4f8fbf9],.cancel-btn.danger[data-v-c4f8fbf9]{background:#ea666633;border:1px solid rgba(234,102,102,.3);color:#ff8a8a}.confirm-btn.danger[data-v-c4f8fbf9]:hover,.cancel-btn.danger[data-v-c4f8fbf9]:hover{background:#ea66664d}.tags[data-v-c4f8fbf9]{margin-top:8px}.tags .tag[data-v-c4f8fbf9]{display:inline-block;padding:4px 8px;background:#667eea33;border-radius:4px;font-size:12px;color:#a8b3ff}.cancel-btn[data-v-c4f8fbf9]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);color:#fff}.cancel-btn[data-v-c4f8fbf9]:hover{background:#ffffff1a}@keyframes slideIn-c4f8fbf9{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}.setting-icon[data-v-4727c0a4]{color:#667eea;margin-left:4px;cursor:pointer}.config-container[data-v-29da4edc]{height:100vh;background:#ffffff05;color:#fff}.config-header[data-v-29da4edc]{display:flex;justify-content:space-between;align-items:center;padding:20px;border-bottom:1px solid rgba(255,255,255,.1)}.header-actions[data-v-29da4edc]{display:flex;justify-content:space-between;align-items:center;width:100%}.header-actions-left[data-v-29da4edc]{display:flex;align-items:center;gap:14px}.config-header h1[data-v-29da4edc]{background:linear-gradient(135deg,#667eea,#764ba2);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-size:24px;font-weight:600}.config-content[data-v-29da4edc]{display:flex;height:calc(100vh - 80px)}.config-nav[data-v-29da4edc]{width:242px;padding:20px;border-right:1px solid rgba(255,255,255,.1)}.nav-item[data-v-29da4edc]{display:flex;align-items:center;gap:10px;padding:12px;margin-bottom:8px;border-radius:8px;cursor:pointer;transition:all .3s}.nav-item[data-v-29da4edc]:hover{background:#ffffff0d}.nav-item.active[data-v-29da4edc]{background:#667eea1a;border:1px solid rgba(102,126,234,.2)}.config-details[data-v-29da4edc]{flex:1;padding:24px 30px;overflow-y:auto}.action-btn[data-v-29da4edc]{display:flex;align-items:center;gap:6px;padding:8px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#fff;cursor:pointer;transition:all .3s}.action-btn[data-v-29da4edc]:hover{background:#ffffff1a} +.switch[data-v-d484b4a3]{position:relative;display:inline-flex;align-items:center;cursor:pointer}.switch input[data-v-d484b4a3]{opacity:0;width:0;height:0}.switch .slider[data-v-d484b4a3]{position:relative;display:inline-block;width:40px;height:20px;background:#ea66661a;border:1px solid rgba(234,102,102,.2);border-radius:20px;transition:all .3s;flex-shrink:0;vertical-align:middle}.switch .slider[data-v-d484b4a3]:before{position:absolute;content:"";height:16px;width:16px;left:2px;bottom:1px;background:#ea6666;border-radius:50%;transition:all .3s}.switch .switch-label[data-v-d484b4a3]{margin-left:8px;font-size:14px;line-height:20px;height:20px;color:#fff9;transition:color .3s}.switch .checkbox-label[data-v-d484b4a3]{display:flex;align-items:center;gap:8px;cursor:pointer}.switch .checkbox-label input[type=checkbox][data-v-d484b4a3]{width:16px;height:16px}.switch input:checked+.slider[data-v-d484b4a3]{background:#667eea1a;border-color:#667eea33}.switch input:checked+.slider[data-v-d484b4a3]:before{transform:translate(20px);background:#667eea}.switch input:checked+.slider+.switch-label[data-v-d484b4a3]{color:#667eea}.switch input:not(:checked)+.slider+.switch-label[data-v-d484b4a3]{color:#ea6666}.config-panel[data-v-cf54ca62]{position:relative}.config-header[data-v-cf54ca62]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.config-header h2[data-v-cf54ca62]{margin:0;font-size:20px;font-weight:500}.config-actions[data-v-cf54ca62]{display:flex;gap:12px}.loading-container[data-v-cf54ca62]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#ffffffb3}.loading-spinner[data-v-cf54ca62]{width:20px;height:20px;border:2px solid rgba(255,255,255,.3);border-top:2px solid #667eea;border-radius:50%;animation:spin-cf54ca62 1s linear infinite;margin-bottom:16px}@keyframes spin-cf54ca62{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.config-groups[data-v-cf54ca62]{display:flex;flex-direction:column;gap:32px}.config-group[data-v-cf54ca62]{background:#ffffff08;border-radius:12px;padding:24px;border:1px solid rgba(255,255,255,.1);transition:all .3s ease}.config-group[data-v-cf54ca62]:hover{background:#ffffff0d;border-color:#ffffff26}.group-header[data-v-cf54ca62]{display:flex;align-items:center;margin-bottom:20px;padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,.1)}.group-icon[data-v-cf54ca62]{font-size:20px;margin-right:12px;opacity:.8}.group-divider[data-v-cf54ca62]{flex:1;height:1px;background:linear-gradient(90deg,rgba(255,255,255,.1) 0%,transparent 100%);margin-left:16px}.config-items[data-v-cf54ca62]{display:flex;flex-direction:column;gap:20px;padding:16px}.config-item[data-v-cf54ca62]{position:relative;border:1px solid rgba(255,255,255,.08);border-radius:8px;margin-bottom:16px;transition:all .3s ease}.config-item[data-v-cf54ca62]:hover{border-color:#ffffff26;background:#ffffff05}.config-item.modified[data-v-cf54ca62]{border-left:3px solid #f9a825}.config-item-content[data-v-cf54ca62]{padding:14px 16px;display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.config-item-content.vertical-layout[data-v-cf54ca62]{flex-direction:column;align-items:stretch;gap:12px}.config-item-content.vertical-layout .config-item-info[data-v-cf54ca62]{width:100%}.config-item-content.vertical-layout .config-control[data-v-cf54ca62]{width:100%;min-width:auto}.config-item-header[data-v-cf54ca62]{display:flex;flex-direction:column;gap:6px}.config-item-info[data-v-cf54ca62]{flex:1;min-width:0}.config-label[data-v-cf54ca62]{font-weight:500;color:#ffffffe6;margin-bottom:4px;display:flex;align-items:center;flex-wrap:wrap;gap:8px}.vertical-layout .config-label[data-v-cf54ca62]{margin-bottom:0;font-size:14px;line-height:1.4}.config-key[data-v-cf54ca62]{display:block;font-size:12px;color:#ffffff80;margin-bottom:6px;font-family:monospace;background:#ffffff0d;padding:2px 6px;border-radius:4px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vertical-layout .config-key[data-v-cf54ca62]{margin-bottom:0;display:inline-block;max-width:fit-content}.config-description[data-v-cf54ca62]{font-size:13px;color:#ffffffb3;margin:6px 0;line-height:1.4}.type-badge[data-v-cf54ca62]{font-size:12px;padding:2px 6px;border-radius:3px;color:#ffffffe6;font-weight:400}.type-badge.boolean[data-v-cf54ca62]{background:#2196f333;color:#90caf9}.type-badge.number[data-v-cf54ca62]{background:#4caf5033;color:#a5d6a7}.type-badge.string[data-v-cf54ca62]{background:#9c27b033;color:#ce93d8}.type-badge.select[data-v-cf54ca62]{background:#ff980033;color:#ffcc80}.modified-badge[data-v-cf54ca62]{background:#f9a82533;color:#ffcc80;font-size:12px;padding:2px 6px;border-radius:3px;font-weight:400}.range-info[data-v-cf54ca62]{font-size:12px;color:#fff9;background:#ffffff0d;padding:3px 8px;border-radius:4px;display:inline-block;margin-top:6px;font-family:monospace}.config-control[data-v-cf54ca62]{min-width:160px}.vertical-layout .config-control[data-v-cf54ca62]{min-width:auto;max-width:400px}.config-input[data-v-cf54ca62]{width:100%;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:4px;padding:8px 12px;color:#ffffffe6;transition:all .3s}.config-input[data-v-cf54ca62]:focus{outline:none;border-color:#667eea80;background:#ffffff14}.config-input[data-v-cf54ca62]::placeholder{color:#fff6}.config-input.number-input[data-v-cf54ca62]{font-family:monospace;text-align:right}.empty-state[data-v-cf54ca62]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#ffffff80}.message-toast[data-v-cf54ca62]{position:fixed;top:20px;right:20px;padding:12px 20px;border-radius:8px;color:#fff;font-weight:500;z-index:1000;box-shadow:0 4px 12px #0000004d;transform:translate(100%);animation:slide-in-cf54ca62 .3s ease-out forwards}.message-toast.success[data-v-cf54ca62]{background:#10b981}.message-toast.error[data-v-cf54ca62]{background:#ef4444}.message-fade-enter-active[data-v-cf54ca62],.message-fade-leave-active[data-v-cf54ca62]{transition:all .3s ease}.message-fade-enter-from[data-v-cf54ca62],.message-fade-leave-to[data-v-cf54ca62]{transform:translate(100%);opacity:0}@keyframes slide-in-cf54ca62{0%{transform:translate(100%)}to{transform:translate(0)}}.sub-group[data-v-cf54ca62]{margin-bottom:24px;border:1px solid rgba(255,255,255,.1);border-radius:8px;overflow:hidden;background:#ffffff05}.sub-group-header[data-v-cf54ca62]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#ffffff0d;cursor:pointer;-webkit-user-select:none;user-select:none;transition:all .3s ease}.sub-group-header[data-v-cf54ca62]:hover{background:#ffffff14}.sub-group-info[data-v-cf54ca62]{display:flex;align-items:center;gap:8px}.sub-group-icon[data-v-cf54ca62]{font-size:14px}.sub-group-title[data-v-cf54ca62]{margin:0;font-size:14px;font-weight:500;color:#ffffffe6}.item-count[data-v-cf54ca62]{font-size:12px;color:#fff9;background:#ffffff1a;padding:2px 6px;border-radius:10px}.collapse-icon[data-v-cf54ca62]{font-size:12px;color:#fff9;transition:transform .3s ease}.collapse-icon.collapsed[data-v-cf54ca62]{transform:rotate(-90deg)}.config-stats[data-v-cf54ca62]{margin-top:24px;color:#fff9}.header-left[data-v-cf54ca62],.header-right[data-v-cf54ca62]{display:flex;align-items:center}.config-stats[data-v-cf54ca62]{display:flex;margin-left:16px;gap:12px}.stat-item[data-v-cf54ca62]{display:flex;align-items:center;background:#ffffff0d;padding:4px 8px;border-radius:4px;font-size:12px}.stat-label[data-v-cf54ca62]{color:#fff9;margin-right:4px}.stat-value[data-v-cf54ca62]{color:#ffffffe6;font-weight:500}.stat-value.modified[data-v-cf54ca62]{color:#f9a825}.search-box[data-v-cf54ca62]{position:relative;margin-right:16px}.search-input[data-v-cf54ca62]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:4px;padding:6px 12px 6px 32px;color:#ffffffe6;width:220px;font-size:14px;transition:all .3s}.search-input[data-v-cf54ca62]:focus{outline:none;border-color:#667eea80;background:#ffffff14;width:260px}.search-input[data-v-cf54ca62]::placeholder{color:#fff6}.search-icon[data-v-cf54ca62]{position:absolute;left:10px;top:50%;transform:translateY(-50%);font-size:14px;opacity:.6}.toggle-btn[data-v-cf54ca62]{background:#ffffff1a;border:1px solid rgba(255,255,255,.2);border-radius:4px;color:#ffffffb3;padding:6px 12px;margin-right:12px;font-size:14px;cursor:pointer;transition:all .3s}.toggle-btn[data-v-cf54ca62]:hover{background:#ffffff26;color:#ffffffe6}.toggle-btn.active[data-v-cf54ca62]{background:#667eea33;border-color:#667eea80;color:#667eea}.group-info[data-v-cf54ca62]{display:flex;align-items:center}.group-actions[data-v-cf54ca62]{display:flex;gap:8px;margin-left:auto;margin-right:16px}.reset-btn[data-v-cf54ca62]{background:#f443361a;border:1px solid rgba(244,67,54,.3);border-radius:4px;color:#ef5350;padding:4px 8px;font-size:12px;cursor:pointer;transition:all .3s}.reset-btn[data-v-cf54ca62]:hover:not(:disabled){background:#f4433633;border-color:#f4433680}.reset-btn[data-v-cf54ca62]:disabled{opacity:.5;cursor:not-allowed}.import-export-actions[data-v-cf54ca62]{display:flex;gap:8px;margin-right:16px}.action-btn[data-v-cf54ca62]{background:#ffffff14;border:1px solid rgba(255,255,255,.15);border-radius:4px;color:#fffc;padding:6px 10px;font-size:12px;cursor:pointer;transition:all .3s;text-decoration:none;display:inline-flex;align-items:center;gap:4px}.action-btn[data-v-cf54ca62]:hover{background:#ffffff1f;color:#fffffff2;border-color:#ffffff40}.config-config[data-v-c91688e7]{height:100%;overflow:hidden;display:flex;flex-direction:column}.panel-header[data-v-c91688e7]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;padding-bottom:20px;border-bottom:1px solid rgba(255,255,255,.1)}.panel-actions[data-v-c91688e7]{display:flex;gap:12px}[data-v-c91688e7] .panel-header h2{margin-bottom:0!important}.modal-overlay[data-v-baaf1c89]{position:fixed;top:0;left:0;width:100%;height:100%;background:#000000b3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:1000}.modal-container[data-v-baaf1c89]{background:linear-gradient(135deg,#667eea1a,#764ba226);border:1px solid rgba(255,255,255,.1);border-radius:16px;width:90%;max-width:600px;max-height:90vh;overflow-y:auto;box-shadow:0 8px 32px #0006}.modal-header[data-v-baaf1c89]{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid rgba(255,255,255,.1)}.modal-header h3[data-v-baaf1c89]{margin:0;font-size:18px;font-weight:500;color:#ffffffe6}.close-btn[data-v-baaf1c89]{background:none;border:none;color:#fff9;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;transition:all .3s}.close-btn[data-v-baaf1c89]:hover{color:#ffffffe6}.modal-content[data-v-baaf1c89]{padding:24px}.modal-footer[data-v-baaf1c89]{padding:20px 24px;border-top:1px solid rgba(255,255,255,.1);display:flex;justify-content:flex-end;gap:12px}.cancel-btn[data-v-baaf1c89],.confirm-btn[data-v-baaf1c89]{padding:8px 16px;border-radius:6px;font-size:14px;cursor:pointer;transition:all .3s}.cancel-btn[data-v-baaf1c89]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);color:#fffc}.cancel-btn[data-v-baaf1c89]:hover{background:#ffffff1a}.confirm-btn[data-v-baaf1c89]{background:#667eea1a;border:1px solid rgba(102,126,234,.2);color:#667eea}.confirm-btn[data-v-baaf1c89]:hover{background:#667eea33}.modal-enter-active[data-v-baaf1c89],.modal-leave-active[data-v-baaf1c89]{transition:opacity .3s ease}.modal-enter-from[data-v-baaf1c89],.modal-leave-to[data-v-baaf1c89]{opacity:0}.tool-selection-content[data-v-0237b039]{min-height:400px;max-height:600px;overflow-y:auto}.tool-controls[data-v-0237b039]{display:flex;gap:12px;margin-bottom:16px;padding:12px;background:#ffffff0d;border-radius:8px;border:1px solid rgba(255,255,255,.1)}.search-container[data-v-0237b039]{flex:1}.search-input[data-v-0237b039]{width:100%;padding:8px 12px;border:1px solid rgba(255,255,255,.2);border-radius:6px;background:#ffffff0d;color:#ffffffe6;font-size:14px;transition:all .3s}.search-input[data-v-0237b039]:focus{outline:none;border-color:#667eea80;background:#ffffff1a}.search-input[data-v-0237b039]::placeholder{color:#ffffff80}.sort-container[data-v-0237b039]{min-width:140px}.sort-select[data-v-0237b039]{width:100%;padding:8px 12px;border:1px solid rgba(255,255,255,.2);border-radius:6px;background:#ffffff0d;color:#ffffffe6;font-size:14px;cursor:pointer}.tool-summary[data-v-0237b039]{margin-bottom:16px;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.1)}.summary-text[data-v-0237b039]{color:#ffffffb3;font-size:13px}.tool-group[data-v-0237b039]{border:1px solid rgba(255,255,255,.1);border-radius:8px;overflow:hidden;margin-bottom:8px}.tool-group-header[data-v-0237b039]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#ffffff0d;cursor:pointer;transition:all .3s;border-bottom:1px solid rgba(255,255,255,.1)}.tool-group-header[data-v-0237b039]:hover{background:#ffffff14}.tool-group-header.collapsed[data-v-0237b039]{border-bottom:none}.group-title-area[data-v-0237b039]{display:flex;align-items:center;gap:8px;flex:1}.collapse-icon[data-v-0237b039]{color:#fff9;transition:transform .3s}.group-icon[data-v-0237b039]{color:#fffc}.group-name[data-v-0237b039]{font-weight:500;color:#ffffffe6}.group-count[data-v-0237b039]{color:#fff9;font-size:13px}.group-actions[data-v-0237b039]{display:flex;align-items:center}.group-enable-all[data-v-0237b039]{display:flex;align-items:center;gap:6px;cursor:pointer;color:#fffc;font-size:13px}.group-enable-checkbox[data-v-0237b039]{cursor:pointer}.tool-group-content[data-v-0237b039]{max-height:300px;overflow-y:auto;transition:all .3s}.tool-group-content.collapsed[data-v-0237b039]{max-height:0;overflow:hidden}.tool-selection-item[data-v-0237b039]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid rgba(255,255,255,.05);transition:background-color .3s}.tool-selection-item[data-v-0237b039]:hover{background:#ffffff08}.tool-selection-item[data-v-0237b039]:last-child{border-bottom:none}.tool-info[data-v-0237b039]{flex:1}.tool-selection-name[data-v-0237b039]{font-weight:500;color:#ffffffe6;margin-bottom:4px}.tool-selection-desc[data-v-0237b039]{color:#fff9;font-size:13px;line-height:1.4}.tool-actions[data-v-0237b039]{margin-left:12px}.tool-enable-switch[data-v-0237b039]{position:relative;display:inline-block;width:44px;height:24px;cursor:pointer}.tool-enable-checkbox[data-v-0237b039]{opacity:0;width:0;height:0}.tool-enable-slider[data-v-0237b039]{position:absolute;top:0;left:0;right:0;bottom:0;background:#fff3;border-radius:24px;transition:all .3s}.tool-enable-slider[data-v-0237b039]:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background:#fff;border-radius:50%;transition:all .3s}.tool-enable-checkbox:checked+.tool-enable-slider[data-v-0237b039]{background:#667eeacc}.tool-enable-checkbox:checked+.tool-enable-slider[data-v-0237b039]:before{transform:translate(20px)}.empty-state[data-v-0237b039]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#ffffff80}.empty-icon[data-v-0237b039]{font-size:48px;margin-bottom:16px;opacity:.6}.agent-layout[data-v-c305016e]{display:flex;gap:30px;flex:1;min-height:0}.agent-list[data-v-c305016e]{width:320px;flex-shrink:0;display:flex;flex-direction:column}.list-header[data-v-c305016e]{display:flex;align-items:center;gap:8px;margin-bottom:16px}.list-header h3[data-v-c305016e]{margin:0;font-size:18px}.agent-count[data-v-c305016e]{color:#fff9;font-size:14px}.agents-container[data-v-c305016e]{flex:1;overflow-y:auto;margin-bottom:16px}.loading-state[data-v-c305016e]{display:flex;align-items:center;gap:8px;justify-content:center;padding:40px 0;color:#fff9}.empty-state[data-v-c305016e]{text-align:center;padding:60px 20px;color:#fff9}.empty-icon[data-v-c305016e]{font-size:48px;margin-bottom:16px;opacity:.4}.empty-tip[data-v-c305016e]{font-size:14px;margin-top:8px}.agent-card[data-v-c305016e]{background:#ffffff08;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:16px;margin-bottom:12px;cursor:pointer;transition:all .3s ease}.agent-card[data-v-c305016e]:hover{background:#ffffff0d;border-color:#fff3}.agent-card.active[data-v-c305016e]{border-color:#667eea;background:#667eea1a}.agent-card-header[data-v-c305016e]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.agent-name[data-v-c305016e]{font-weight:500;font-size:16px}.agent-desc[data-v-c305016e]{color:#ffffffb3;font-size:14px;line-height:1.4;margin-bottom:12px}.agent-model[data-v-c305016e]{display:flex;flex-wrap:wrap;gap:6px}.model-tag[data-v-c305016e]{display:inline-block;padding:4px 8px;margin-bottom:10px;background:#b566ea33;border-radius:4px;font-size:12px;color:#a8b3ff}.agent-tools[data-v-c305016e]{display:flex;flex-wrap:wrap;gap:6px}.tool-tag[data-v-c305016e]{display:inline-block;padding:4px 8px;background:#667eea33;border-radius:4px;font-size:12px;color:#a8b3ff}.tool-more[data-v-c305016e]{color:#ffffff80;font-size:12px;padding:4px 8px}.no-tools-indicator[data-v-c305016e]{color:#fff6;font-size:12px;font-style:italic}.add-btn[data-v-c305016e]{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:16px;background:#ffffff08;border:1px dashed rgba(255,255,255,.2);border-radius:8px;color:#fffc;cursor:pointer;transition:all .3s ease;font-size:14px}.add-btn[data-v-c305016e]:hover{background:#ffffff0d;border-color:#ffffff4d;color:#fff}.agent-detail[data-v-c305016e]{flex:1;background:#ffffff08;border-radius:12px;padding:24px;overflow-y:auto}.no-selection[data-v-c305016e]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#fff9}.placeholder-icon[data-v-c305016e]{font-size:64px;margin-bottom:24px;opacity:.3}.detail-header[data-v-c305016e]{display:flex;justify-content:space-between;align-items:center;margin-bottom:32px;padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,.1)}.detail-header h3[data-v-c305016e]{margin:0;font-size:20px}.detail-actions[data-v-c305016e]{display:flex;gap:12px}.form-section[data-v-c305016e]{margin-bottom:32px}.form-item[data-v-c305016e]{margin-bottom:20px}.form-item label[data-v-c305016e]{display:block;margin-bottom:8px;color:#ffffffe6;font-weight:500}.form-item input[data-v-c305016e],.form-item textarea[data-v-c305016e]{width:100%;padding:12px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;color:#fff;font-size:14px;transition:all .3s ease}.form-item input[data-v-c305016e]:focus,.form-item textarea[data-v-c305016e]:focus{border-color:#667eea;outline:none;background:#ffffff14}.form-item input[data-v-c305016e]::placeholder,.form-item textarea[data-v-c305016e]::placeholder{color:#fff6}.form-item textarea[data-v-c305016e]{resize:vertical;min-height:80px;line-height:1.5}.required[data-v-c305016e]{color:#ff6b6b}.model-section h4[data-v-c305016e],.tools-section h4[data-v-c305016e]{margin:0 0 20px;font-size:18px;color:#ffffffe6}.section-header[data-v-c305016e]{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.section-header span[data-v-c305016e]{font-weight:500;color:#fffc}.tools-grid[data-v-c305016e]{display:flex;flex-direction:column;gap:8px}.tool-item[data-v-c305016e]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;transition:all .3s ease}.tool-item.assigned[data-v-c305016e]{border-color:#667eea4d;background:#667eea1a}.tool-info[data-v-c305016e]{flex:1}.tool-info .tool-name[data-v-c305016e]{display:block;font-weight:500;margin-bottom:4px}.tool-info .tool-desc[data-v-c305016e]{font-size:12px;color:#fff9;line-height:1.3}.no-tools[data-v-c305016e]{display:flex;align-items:center;justify-content:center;gap:8px;padding:40px;color:#fff6;font-style:italic}.action-btn[data-v-c305016e]{display:flex;align-items:center;gap:6px;padding:10px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#fff;cursor:pointer;transition:all .3s ease;font-size:14px}.action-btn[data-v-c305016e]:hover:not(:disabled){background:#ffffff1a;border-color:#fff3}.action-btn[data-v-c305016e]:disabled{opacity:.5;cursor:not-allowed}.action-btn.primary[data-v-c305016e]{background:#667eea33;border-color:#667eea4d;color:#a8b3ff}.action-btn.primary[data-v-c305016e]:hover:not(:disabled){background:#667eea4d}.action-btn.danger[data-v-c305016e]{background:#ea66661a;border-color:#ea666633;color:#ff8a8a}.action-btn.danger[data-v-c305016e]:hover:not(:disabled){background:#ea666633}.action-btn.small[data-v-c305016e]{padding:6px 12px;font-size:12px}.modal-form[data-v-c305016e]{display:flex;flex-direction:column;gap:16px}.delete-confirm[data-v-c305016e]{text-align:center;padding:20px 0}.delete-confirm p[data-v-c305016e]{color:#fffc;margin:8px 0}.delete-confirm .warning-text[data-v-c305016e]{color:#fff9;font-size:14px}.warning-icon[data-v-c305016e]{font-size:48px;color:#ffa726;margin-bottom:16px}.confirm-btn[data-v-c305016e],.cancel-btn[data-v-c305016e]{padding:10px 20px;border-radius:6px;cursor:pointer;transition:all .3s ease}.confirm-btn.danger[data-v-c305016e],.cancel-btn.danger[data-v-c305016e]{background:#ea666633;border:1px solid rgba(234,102,102,.3);color:#ff8a8a}.confirm-btn.danger[data-v-c305016e]:hover,.cancel-btn.danger[data-v-c305016e]:hover{background:#ea66664d}.cancel-btn[data-v-c305016e]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);color:#fff}.cancel-btn[data-v-c305016e]:hover{background:#ffffff1a}.error-toast[data-v-c305016e],.success-toast[data-v-c305016e]{position:fixed;top:20px;right:20px;display:flex;align-items:center;gap:8px;padding:12px 16px;border-radius:8px;color:#fff;cursor:pointer;z-index:1000;animation:slideIn-c305016e .3s ease}.error-toast[data-v-c305016e]{background:#ea6666e6;border:1px solid rgba(234,102,102,.5)}.success-toast[data-v-c305016e]{background:#66ea66e6;border:1px solid rgba(102,234,102,.5)}@keyframes slideIn-c305016e{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}.model-chooser[data-v-c305016e]{position:relative;display:inline-block}.model-btn[data-v-c305016e]{display:flex;align-items:center;gap:6px;padding:8px 12px;background:transparent;border:1.5px solid #667eea;border-radius:8px;color:#8da2fb;cursor:pointer;transition:all .2s ease;font-size:14px;font-weight:600;outline:none}.model-btn[data-v-c305016e]:hover{background:#667eea26;border-color:#7c9eff;color:#a3bffa;box-shadow:0 0 15px #667eea33}.model-btn[data-v-c305016e]:focus{box-shadow:0 0 0 3px #667eea80}.current-model[data-v-c305016e]{color:inherit;font-weight:600;min-width:40px;text-align:left;text-shadow:none}.chevron[data-v-c305016e]{transition:transform .3s cubic-bezier(.4,0,.2,1);opacity:.9;filter:none}.model-dropdown[data-v-c305016e]{position:absolute;top:100%;left:0;z-index:9999;margin-top:4px;background:linear-gradient(135deg,#282832f2,#1e1e28f2);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid rgba(102,126,234,.3);border-radius:8px;box-shadow:0 8px 32px #0006,0 0 0 1px #667eea33;min-width:300px;animation:slideDown-c305016e .2s ease}.dropdown-header[data-v-c305016e]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid rgba(102,126,234,.2);font-size:14px;font-weight:600;color:#fff;background:linear-gradient(135deg,#667eea1a,#667eea0d)}.close-btn[data-v-c305016e]{background:none;border:none;color:#fff9;cursor:pointer;padding:4px;border-radius:4px;transition:all .2s ease}.close-btn[data-v-c305016e]:hover{background:#ffffff1a;color:#fffc}.model-options[data-v-c305016e]{padding:8px 0}.model-option[data-v-c305016e]{display:flex;align-items:center;gap:12px;width:100%;padding:10px 16px;background:none;border:none;color:#ffffffb3;cursor:pointer;transition:all .2s ease;text-align:left}.model-option[data-v-c305016e]:hover{background:#ffffff0d;color:#ffffffe6}.model-option.active[data-v-c305016e]{background:linear-gradient(135deg,#667eea33,#667eea1a);color:#7c9eff;border-left:3px solid #667eea;padding-left:13px}.model-type[data-v-c305016e]{display:inline-block;min-width:24px;font-size:12px;font-weight:600;opacity:.8}.model-name[data-v-c305016e]{flex:1;font-size:14px;font-weight:500}.check-icon[data-v-c305016e]{color:#667eea;opacity:.8}.spacer[data-v-c305016e]{display:inline-block;width:12px}.backdrop[data-v-c305016e]{position:fixed;top:0;left:0;right:0;bottom:0;z-index:9998;background:transparent}@keyframes slideDown-c305016e{0%{opacity:0;transform:translateY(-8px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}.multi-language-content[data-v-c305016e]{display:flex;flex-direction:column;gap:20px;padding:20px 0}.stats-section[data-v-c305016e]{display:flex;gap:20px;padding:15px;background:#ffffff0d;border-radius:8px;border:1px solid rgba(255,255,255,.1)}.stat-item[data-v-c305016e]{display:flex;flex-direction:column;gap:5px}.stat-label[data-v-c305016e]{font-size:12px;color:#fff9;text-transform:uppercase;letter-spacing:.5px}.stat-value[data-v-c305016e]{font-size:16px;font-weight:600;color:#fff}.language-selection[data-v-c305016e]{display:flex;flex-direction:column;gap:10px}.selection-label[data-v-c305016e]{font-size:14px;font-weight:500;color:#fffc}.language-select[data-v-c305016e]{padding:10px 12px;background:#ffffff1a;border:1px solid rgba(255,255,255,.2);border-radius:6px;color:#fff;font-size:14px;outline:none;transition:all .2s ease}.language-select[data-v-c305016e]:focus{border-color:#007acc;background:#ffffff26}.language-select option[data-v-c305016e]{background:#2d2d2d;color:#fff}.warning-section[data-v-c305016e]{margin:10px 0}.warning-box[data-v-c305016e]{display:flex;align-items:flex-start;gap:12px;padding:15px;background:#ffc1071a;border:1px solid rgba(255,193,7,.3);border-radius:8px}.warning-icon[data-v-c305016e]{color:#ffc107;font-size:20px;flex-shrink:0;margin-top:2px}.warning-text[data-v-c305016e]{flex:1}.warning-text p[data-v-c305016e]{margin:0;color:#ffffffe6;font-size:14px;line-height:1.5}.loading-icon[data-v-c305016e]{animation:spin-c305016e 1s linear infinite}@keyframes spin-c305016e{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (max-width: 768px){.model-dropdown[data-v-c305016e]{right:-8px;left:-8px;width:auto;min-width:auto}.model-btn[data-v-c305016e]{padding:6px 10px;font-size:13px}.current-model[data-v-c305016e]{min-width:35px}}@media (prefers-color-scheme: light){.model-dropdown[data-v-c305016e]{background:#fffffff2;border-color:#0000001a;box-shadow:0 8px 32px #0000001a}.dropdown-header[data-v-c305016e]{color:#000c;border-bottom-color:#0000001a}.close-btn[data-v-c305016e]{color:#0009}.close-btn[data-v-c305016e]:hover{background:#0000001a;color:#000c}.model-option[data-v-c305016e]{color:#000000b3}.model-option[data-v-c305016e]:hover{background:#0000000d;color:#000000e6}}.custom-select[data-v-579d8359]{position:relative;display:inline-block}.select-btn[data-v-579d8359]{display:flex;align-items:center;gap:6px;padding:8px 12px;background:transparent;border:1.5px solid #667eea;border-radius:8px;color:#8da2fb;cursor:pointer;transition:all .2s ease;font-size:14px;font-weight:600;outline:none}.select-btn[data-v-579d8359]:hover{background:#667eea26;border-color:#7c9eff;color:#a3bffa;box-shadow:0 0 15px #667eea33}.select-btn[data-v-579d8359]:focus{box-shadow:0 0 0 3px #667eea80}.current-option[data-v-579d8359]{color:inherit;font-weight:600;min-width:40px;text-align:left;text-shadow:none;display:flex;align-items:center;gap:0}.current-option .option-icon[data-v-579d8359]{color:inherit;opacity:.8}.chevron[data-v-579d8359]{transition:transform .3s cubic-bezier(.4,0,.2,1);opacity:.9;filter:none}.select-dropdown[data-v-579d8359]{position:absolute;top:100%;z-index:99999;margin-top:4px;background:linear-gradient(135deg,#282832f2,#1e1e28f2);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid rgba(102,126,234,.3);border-radius:8px;box-shadow:0 8px 32px #0006,0 0 0 1px #667eea33;min-width:300px}.select-dropdown.dropdown-top[data-v-579d8359]{top:auto;bottom:100%;margin-top:0;margin-bottom:4px}.dropdown-header[data-v-579d8359]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid rgba(102,126,234,.2);font-size:14px;font-weight:600;color:#fff;background:linear-gradient(135deg,#667eea1a,#667eea0d)}.close-btn[data-v-579d8359]{background:none;border:none;color:#fff9;cursor:pointer;padding:4px;border-radius:4px;transition:all .2s ease}.close-btn[data-v-579d8359]:hover{background:#ffffff1a;color:#fffc}.select-options[data-v-579d8359]{padding:8px 0}.select-option[data-v-579d8359]{display:flex;align-items:center;gap:0;width:100%;padding:10px 16px;background:none;border:none;color:#ffffffb3;cursor:pointer;transition:all .2s ease;text-align:left}.select-option[data-v-579d8359]:hover{background:#ffffff0d;color:#ffffffe6}.select-option.active[data-v-579d8359]{background:linear-gradient(135deg,#667eea33,#667eea1a);color:#7c9eff;border-left:3px solid #667eea;padding-left:13px}.option-type[data-v-579d8359]{display:inline-block;min-width:24px;font-size:12px;font-weight:600;opacity:.8}.option-name[data-v-579d8359]{flex:1;font-size:14px;font-weight:500}.option-icon[data-v-579d8359]{color:#fff9;margin-right:0}.check-icon[data-v-579d8359]{color:#667eea;opacity:.8}.spacer[data-v-579d8359]{display:inline-block;width:12px}.backdrop[data-v-579d8359]{position:fixed;top:0;left:0;right:0;bottom:0;z-index:99998;background:transparent}.slideDown-enter-active[data-v-579d8359],.slideDown-leave-active[data-v-579d8359]{transition:all .2s ease;transform-origin:top}.slideDown-enter-from[data-v-579d8359],.slideDown-leave-to[data-v-579d8359]{opacity:0;transform:translateY(-8px) scale(.95)}.grouped-select[data-v-08a99d28]{position:relative;width:100%}.select-btn[data-v-08a99d28]{width:100%;padding:12px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;color:#ffffffe6;cursor:pointer;display:flex;align-items:center;justify-content:space-between;transition:all .3s ease;font-size:14px}.select-btn[data-v-08a99d28]:hover{background:#ffffff1a;border-color:#fff3}.selected-text[data-v-08a99d28]{display:flex;align-items:center;gap:8px;flex:1}.placeholder-text[data-v-08a99d28]{color:#ffffff80;flex:1}.model-category[data-v-08a99d28]{color:#a8b3ff;font-size:12px;font-weight:500}.chevron[data-v-08a99d28]{color:#fff9;transition:transform .3s ease}.chevron.rotated[data-v-08a99d28]{transform:rotate(180deg)}.dropdown-overlay[data-v-08a99d28]{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999}.dropdown-content[data-v-08a99d28]{position:absolute;top:100%;left:0;right:0;background:#1a1a1a;border:1px solid rgba(255,255,255,.1);border-radius:8px;box-shadow:0 8px 32px #0006;z-index:1000;max-height:500px;overflow:hidden;display:flex;flex-direction:column}.dropdown-header[data-v-08a99d28]{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid rgba(255,255,255,.1)}.dropdown-header h3[data-v-08a99d28]{margin:0;color:#ffffffe6;font-size:16px;font-weight:600}.close-btn[data-v-08a99d28]{background:none;border:none;color:#fff9;cursor:pointer;padding:4px;border-radius:4px;transition:all .3s ease}.close-btn[data-v-08a99d28]:hover{background:#ffffff1a;color:#ffffffe6}.search-container[data-v-08a99d28]{position:relative;padding:12px 16px;border-bottom:1px solid rgba(255,255,255,.1)}.search-input[data-v-08a99d28]{width:100%;padding:8px 12px 8px 36px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#ffffffe6;font-size:14px;outline:none;transition:all .3s ease}.search-input[data-v-08a99d28]:focus{border-color:#a8b3ff;background:#ffffff1a}.search-input[data-v-08a99d28]::placeholder{color:#ffffff80}.search-icon[data-v-08a99d28]{position:absolute;left:24px;top:50%;transform:translateY(-50%);color:#ffffff80;font-size:16px}.groups-container[data-v-08a99d28]{flex:1;overflow-y:auto;padding:8px}.model-group[data-v-08a99d28]{margin-bottom:16px}.group-header[data-v-08a99d28]{display:flex;align-items:center;gap:8px;margin-bottom:8px;padding:0 8px}.group-title[data-v-08a99d28]{color:#a8b3ff;font-weight:600;font-size:14px}.group-count[data-v-08a99d28]{color:#ffffff80;font-size:12px}.models-grid[data-v-08a99d28]{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px;padding:0 8px}.model-option[data-v-08a99d28]{display:flex;flex-direction:column;align-items:flex-start;padding:12px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#ffffffe6;cursor:pointer;transition:all .3s ease;text-align:left;min-height:60px}.model-option[data-v-08a99d28]:hover{background:#ffffff1a;border-color:#fff3}.model-option.selected[data-v-08a99d28]{background:#a8b3ff33;border-color:#a8b3ff}.model-info[data-v-08a99d28]{flex:1;width:100%}.model-name[data-v-08a99d28]{font-weight:500;font-size:14px;margin-bottom:4px;color:#ffffffe6}.model-description[data-v-08a99d28]{font-size:12px;color:#fff9;line-height:1.3}.model-category-tag[data-v-08a99d28]{align-self:flex-end;color:#a8b3ff;font-size:11px;font-weight:500;margin-top:4px}@media (max-width: 768px){.models-grid[data-v-08a99d28]{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}}@media (max-width: 480px){.models-grid[data-v-08a99d28]{grid-template-columns:1fr}}.model-layout[data-v-be6fda70]{display:flex;gap:30px;flex:1;min-height:0}.model-list[data-v-be6fda70]{width:320px;flex-shrink:0;display:flex;flex-direction:column}.list-header[data-v-be6fda70]{display:flex;align-items:center;gap:8px;margin-bottom:16px}.list-header h3[data-v-be6fda70]{margin:0;font-size:18px}.model-count[data-v-be6fda70]{color:#fff9;font-size:14px}.models-container[data-v-be6fda70]{flex:1;overflow-y:auto;margin-bottom:16px}.loading-state[data-v-be6fda70]{display:flex;align-items:center;gap:8px;justify-content:center;padding:40px 0;color:#fff9}.empty-state[data-v-be6fda70]{text-align:center;padding:60px 20px;color:#fff9}.empty-icon[data-v-be6fda70]{font-size:48px;margin-bottom:16px;opacity:.4}.model-card[data-v-be6fda70]{background:#ffffff08;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:16px;margin-bottom:12px;cursor:pointer;transition:all .3s ease}.model-card[data-v-be6fda70]:hover{background:#ffffff0d;border-color:#fff3}.model-card.active[data-v-be6fda70]{border-color:#667eea;background:#667eea1a}.model-card-header[data-v-be6fda70]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.model-name[data-v-be6fda70]{font-weight:500;font-size:16px}.model-desc[data-v-be6fda70]{color:#ffffffb3;font-size:14px;line-height:1.4;margin-bottom:12px}.add-btn[data-v-be6fda70]{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:16px;background:#ffffff08;border:1px dashed rgba(255,255,255,.2);border-radius:8px;color:#fffc;cursor:pointer;transition:all .3s ease;font-size:14px}.add-btn[data-v-be6fda70]:hover{background:#ffffff0d;border-color:#ffffff4d;color:#fff}.model-detail[data-v-be6fda70]{flex:1;background:#ffffff08;border-radius:12px;padding:24px;overflow-y:auto}.no-selection[data-v-be6fda70]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#fff9}.placeholder-icon[data-v-be6fda70]{font-size:64px;margin-bottom:24px;opacity:.3}.detail-header[data-v-be6fda70]{display:flex;justify-content:space-between;align-items:center;margin-bottom:32px;padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,.1)}.detail-header h3[data-v-be6fda70]{margin:0;font-size:20px}.detail-actions[data-v-be6fda70]{display:flex;gap:12px}.form-item[data-v-be6fda70]{margin-bottom:20px}.form-item label[data-v-be6fda70]{display:block;margin-bottom:8px;color:#ffffffe6;font-weight:500}.form-item input[data-v-be6fda70],.form-item textarea[data-v-be6fda70]{width:100%;padding:12px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;color:#fff;font-size:14px;transition:all .3s ease}.form-item input[data-v-be6fda70]:focus,.form-item textarea[data-v-be6fda70]:focus{border-color:#667eea;outline:none;background:#ffffff14}.form-item input[data-v-be6fda70]::placeholder,.form-item textarea[data-v-be6fda70]::placeholder{color:#fff6}.form-item textarea[data-v-be6fda70]{resize:vertical;min-height:80px;line-height:1.5}.required[data-v-be6fda70]{color:#ff6b6b}.action-btn[data-v-be6fda70]{display:flex;align-items:center;gap:6px;padding:10px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#fff;cursor:pointer;transition:all .3s ease;font-size:14px}.action-btn[data-v-be6fda70]:hover:not(:disabled){background:#ffffff1a;border-color:#fff3}.action-btn[data-v-be6fda70]:disabled{opacity:.5;cursor:not-allowed}.action-btn.primary[data-v-be6fda70]{background:#667eea33;border-color:#667eea4d;color:#a8b3ff}.action-btn.primary[data-v-be6fda70]:hover:not(:disabled){background:#667eea4d}.action-btn.danger[data-v-be6fda70]{background:#ea66661a;border-color:#ea666633;color:#ff8a8a}.action-btn.danger[data-v-be6fda70]:hover:not(:disabled){background:#ea666633}.action-btn.small[data-v-be6fda70]{padding:6px 12px;font-size:12px}.modal-form[data-v-be6fda70]{display:flex;flex-direction:column;gap:16px}.delete-confirm[data-v-be6fda70]{text-align:center;padding:20px 0}.delete-confirm p[data-v-be6fda70]{color:#fffc;margin:8px 0}.delete-confirm .warning-text[data-v-be6fda70]{color:#fff9;font-size:14px}.warning-icon[data-v-be6fda70]{font-size:48px;color:#ffa726;margin-bottom:16px}.confirm-btn[data-v-be6fda70],.cancel-btn[data-v-be6fda70]{padding:10px 20px;border-radius:6px;cursor:pointer;transition:all .3s ease}.confirm-btn.danger[data-v-be6fda70],.cancel-btn.danger[data-v-be6fda70]{background:#ea666633;border:1px solid rgba(234,102,102,.3);color:#ff8a8a}.confirm-btn.danger[data-v-be6fda70]:hover,.cancel-btn.danger[data-v-be6fda70]:hover{background:#ea66664d}.cancel-btn[data-v-be6fda70]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);color:#fff}.cancel-btn[data-v-be6fda70]:hover{background:#ffffff1a}.model-type[data-v-be6fda70]{display:flex;flex-wrap:wrap;gap:6px}.model-tag[data-v-be6fda70]{display:inline-block;padding:4px 8px;background:#b566ea33;border-radius:4px;font-size:12px;color:#a8b3ff}.model-status[data-v-be6fda70]{display:flex;align-items:center;gap:8px}.default-badge[data-v-be6fda70]{display:flex;align-items:center;gap:4px;padding:2px 6px;background:#ffc10733;border:1px solid rgba(255,193,7,.3);border-radius:12px;font-size:11px;color:#ffc107;font-weight:500}.current-default[data-v-be6fda70]{display:flex;align-items:center;gap:4px;padding:8px 12px;background:#ffc10733;border:1px solid rgba(255,193,7,.3);border-radius:8px;font-size:12px;color:#ffc107;font-weight:500}.action-btn.default[data-v-be6fda70]{background:#ffc1071a;border:1px solid rgba(255,193,7,.3);color:#ffc107}.action-btn.default[data-v-be6fda70]:hover:not(:disabled){background:#ffc10733;border-color:#ffc10780}.action-btn.default[data-v-be6fda70]:disabled{opacity:.5;cursor:not-allowed}.api-key-container[data-v-be6fda70]{display:flex;gap:8px;align-items:center}.api-key-container input[data-v-be6fda70]{flex:1}.check-btn[data-v-be6fda70]{padding:12px 16px;background:#a8b3ff1a;border:1px solid rgba(168,179,255,.3);border-radius:8px;color:#a8b3ff;cursor:pointer;transition:all .3s ease;display:flex;align-items:center;justify-content:center;min-width:48px}.check-btn[data-v-be6fda70]:hover:not(:disabled){background:#a8b3ff33;border-color:#a8b3ff80}.check-btn[data-v-be6fda70]:disabled{opacity:.5;cursor:not-allowed}.loading-icon[data-v-be6fda70]{animation:spin-be6fda70 1s linear infinite}@keyframes spin-be6fda70{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.error-toast[data-v-be6fda70],.success-toast[data-v-be6fda70]{position:fixed;top:20px;right:20px;display:flex;align-items:center;gap:8px;padding:12px 16px;border-radius:8px;color:#fff;cursor:pointer;z-index:1000;animation:slideIn-be6fda70 .3s ease}.error-toast[data-v-be6fda70]{background:#ea6666e6;border:1px solid rgba(234,102,102,.5)}.success-toast[data-v-be6fda70]{background:#66ea66e6;border:1px solid rgba(102,234,102,.5)}@keyframes slideIn-be6fda70{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}.readonly-field[data-v-be6fda70]{width:100%;padding:12px 16px;background:#ffffff08;border:1px solid rgba(255,255,255,.1);border-radius:8px;color:#ffffffe6;font-size:14px;min-height:48px;display:flex;align-items:center;cursor:default;-webkit-user-select:none;user-select:none}.readonly-field.description-field[data-v-be6fda70]{min-height:80px;align-items:flex-start;padding-top:12px;line-height:1.5;white-space:pre-wrap}.description-field[data-v-be6fda70]{width:100%;padding:12px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;color:#ffffffe6;font-size:14px;min-height:80px;resize:vertical;transition:all .3s ease;font-family:inherit}.description-field[data-v-be6fda70]:focus{outline:none;border-color:#667eea80;background:#ffffff14}.description-field[data-v-be6fda70]::placeholder{color:#fff6}.monaco-editor{font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif;--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace}.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.hc-light .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-aria-container{position:absolute!important;top:0;height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%)}.monaco-aria-container{position:absolute;left:-999em}::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{position:relative;overflow:visible;-webkit-text-size-adjust:100%;color:var(--vscode-editor-foreground);background-color:var(--vscode-editor-background)}.monaco-editor-background{background-color:var(--vscode-editor-background)}.monaco-editor .rangeHighlight{background-color:var(--vscode-editor-rangeHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-rangeHighlightBorder)}.monaco-editor.hc-black .rangeHighlight,.monaco-editor.hc-light .rangeHighlight{border-style:dotted}.monaco-editor .symbolHighlight{background-color:var(--vscode-editor-symbolHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-symbolHighlightBorder)}.monaco-editor.hc-black .symbolHighlight,.monaco-editor.hc-light .symbolHighlight{border-style:dotted}.monaco-editor .overflow-guard{position:relative;overflow:hidden}.monaco-editor .view-overlays{position:absolute;top:0}.monaco-editor .squiggly-error{border-bottom:4px double var(--vscode-editorError-border)}.monaco-editor .squiggly-error:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorError-background)}.monaco-editor .squiggly-warning{border-bottom:4px double var(--vscode-editorWarning-border)}.monaco-editor .squiggly-warning:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorWarning-background)}.monaco-editor .squiggly-info{border-bottom:4px double var(--vscode-editorInfo-border)}.monaco-editor .squiggly-info:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorInfo-background)}.monaco-editor .squiggly-hint{border-bottom:2px dotted var(--vscode-editorHint-border)}.monaco-editor.showUnused .squiggly-unnecessary{border-bottom:2px dashed var(--vscode-editorUnnecessaryCode-border)}.monaco-editor.showDeprecated .squiggly-inline-deprecated{text-decoration:line-through;text-decoration-color:var(--vscode-editor-foreground, inherit)}.monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.monaco-scrollable-element>.shadow{position:absolute;display:none}.monaco-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.monaco-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset}.monaco-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.monaco-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset}.monaco-scrollable-element>.scrollbar>.slider{background:var(--vscode-scrollbarSlider-background)}.monaco-scrollable-element>.scrollbar>.slider:hover{background:var(--vscode-scrollbarSlider-hoverBackground)}.monaco-scrollable-element>.scrollbar>.slider.active{background:var(--vscode-scrollbarSlider-activeBackground)}.monaco-editor .inputarea{min-width:0;min-height:0;margin:0;padding:0;position:absolute;outline:none!important;resize:none;border:none;overflow:hidden;color:transparent;background-color:transparent;z-index:-10}.monaco-editor .inputarea.ime-input{z-index:10;caret-color:var(--vscode-editorCursor-foreground);color:var(--vscode-editor-foreground)}.monaco-editor .margin-view-overlays .line-numbers{font-variant-numeric:tabular-nums;position:absolute;text-align:right;display:inline-block;vertical-align:middle;box-sizing:border-box;cursor:default;height:100%}.monaco-editor .relative-current-line-number{text-align:left;display:inline-block;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}.monaco-editor .line-numbers{color:var(--vscode-editorLineNumber-foreground)}.monaco-editor .line-numbers.active-line-number{color:var(--vscode-editorLineNumber-activeForeground)}.monaco-editor .margin{background-color:var(--vscode-editorGutter-background)}.monaco-mouse-cursor-text{cursor:text}.monaco-editor .view-overlays .current-line,.monaco-editor .margin-view-overlays .current-line{display:block;position:absolute;left:0;top:0;box-sizing:border-box}.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both{border-right:0}.monaco-editor .lines-content .cdr{position:absolute}.monaco-editor .lines-content .core-guide{position:absolute;box-sizing:border-box}.mtkcontrol{color:#fff!important;background:#960000!important}.mtkoverflow{background-color:var(--vscode-button-background, var(--vscode-editor-background));color:var(--vscode-button-foreground, var(--vscode-editor-foreground));border-width:1px;border-style:solid;border-color:var(--vscode-contrastBorder);border-radius:2px;padding:4px;cursor:pointer}.mtkoverflow:hover{background-color:var(--vscode-button-hoverBackground)}.monaco-editor.no-user-select .lines-content,.monaco-editor.no-user-select .view-line,.monaco-editor.no-user-select .view-lines{user-select:none;-webkit-user-select:none}.monaco-editor.mac .lines-content:hover,.monaco-editor.mac .view-line:hover,.monaco-editor.mac .view-lines:hover{user-select:text;-webkit-user-select:text;-ms-user-select:text}.monaco-editor.enable-user-select{user-select:initial;-webkit-user-select:initial}.monaco-editor .view-lines{white-space:nowrap}.monaco-editor .view-line{position:absolute;width:100%}.monaco-editor .mtkw{color:var(--vscode-editorWhitespace-foreground)!important}.monaco-editor .mtkz{display:inline-block;color:var(--vscode-editorWhitespace-foreground)!important}.monaco-editor .lines-decorations{position:absolute;top:0;background:#fff}.monaco-editor .margin-view-overlays .cldr{position:absolute;height:100%}.monaco-editor .glyph-margin{position:absolute;top:0}.monaco-editor .glyph-margin-widgets .cgmr{position:absolute;display:flex;align-items:center;justify-content:center}.monaco-editor .glyph-margin-widgets .cgmr.codicon-modifier-spin:before{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.monaco-editor .margin-view-overlays .cmdr{position:absolute;left:0;width:100%;height:100%}.monaco-editor .minimap.slider-mouseover .minimap-slider{opacity:0;transition:opacity .1s linear}.monaco-editor .minimap.slider-mouseover:hover .minimap-slider,.monaco-editor .minimap.slider-mouseover .minimap-slider.active{opacity:1}.monaco-editor .minimap-slider .minimap-slider-horizontal{background:var(--vscode-minimapSlider-background)}.monaco-editor .minimap-slider:hover .minimap-slider-horizontal{background:var(--vscode-minimapSlider-hoverBackground)}.monaco-editor .minimap-slider.active .minimap-slider-horizontal{background:var(--vscode-minimapSlider-activeBackground)}.monaco-editor .minimap-shadow-visible{box-shadow:var(--vscode-scrollbar-shadow) -6px 0 6px -6px inset}.monaco-editor .minimap-shadow-hidden{position:absolute;width:0}.monaco-editor .minimap-shadow-visible{position:absolute;left:-6px;width:6px}.monaco-editor.no-minimap-shadow .minimap-shadow-visible{position:absolute;left:-1px;width:1px}.minimap.autohide{opacity:0;transition:opacity .5s}.minimap.autohide:hover{opacity:1}.monaco-editor .minimap{z-index:5}.monaco-editor .overlayWidgets{position:absolute;top:0;left:0}.monaco-editor .view-ruler{position:absolute;top:0;box-shadow:1px 0 0 0 var(--vscode-editorRuler-foreground) inset}.monaco-editor .scroll-decoration{position:absolute;top:0;left:0;height:6px;box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.monaco-editor .lines-content .cslr{position:absolute}.monaco-editor .focused .selected-text{background-color:var(--vscode-editor-selectionBackground)}.monaco-editor .selected-text{background-color:var(--vscode-editor-inactiveSelectionBackground)}.monaco-editor .top-left-radius{border-top-left-radius:3px}.monaco-editor .bottom-left-radius{border-bottom-left-radius:3px}.monaco-editor .top-right-radius{border-top-right-radius:3px}.monaco-editor .bottom-right-radius{border-bottom-right-radius:3px}.monaco-editor.hc-black .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-black .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-black .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-black .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor.hc-light .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-light .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-light .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-light .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor .cursors-layer{position:absolute;top:0}.monaco-editor .cursors-layer>.cursor{position:absolute;overflow:hidden;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-smooth-caret-animation>.cursor{transition:all 80ms}.monaco-editor .cursors-layer.cursor-block-outline-style>.cursor{background:transparent!important;border-style:solid;border-width:1px}.monaco-editor .cursors-layer.cursor-underline-style>.cursor{border-bottom-width:2px;border-bottom-style:solid;background:transparent!important}.monaco-editor .cursors-layer.cursor-underline-thin-style>.cursor{border-bottom-width:1px;border-bottom-style:solid;background:transparent!important}@keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}.cursor-smooth{animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate}.cursor-phase{animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate}.cursor-expand>.cursor{animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate}.monaco-editor .blockDecorations-container{position:absolute;top:0;pointer-events:none}.monaco-editor .blockDecorations-block{position:absolute;box-sizing:border-box}.monaco-editor .mwh{position:absolute;color:var(--vscode-editorWhitespace-foreground)!important}.context-view{position:absolute}.context-view.fixed{all:initial;font-family:inherit;font-size:13px;position:fixed;color:inherit}.monaco-list{position:relative;height:100%;width:100%;white-space:nowrap}.monaco-list.mouse-support{user-select:none;-webkit-user-select:none}.monaco-list>.monaco-scrollable-element{height:100%}.monaco-list-rows{position:relative;width:100%;height:100%}.monaco-list.horizontal-scrolling .monaco-list-rows{width:auto;min-width:100%}.monaco-list-row{position:absolute;box-sizing:border-box;overflow:hidden;width:100%}.monaco-list.mouse-support .monaco-list-row{cursor:pointer;touch-action:none}.monaco-list .monaco-scrollable-element>.scrollbar.vertical,.monaco-pane-view>.monaco-split-view2.vertical>.monaco-scrollable-element>.scrollbar.vertical{z-index:14}.monaco-list-row.scrolling{display:none!important}.monaco-list.element-focused,.monaco-list.selection-single,.monaco-list.selection-multiple{outline:0!important}.monaco-drag-image{display:inline-block;padding:1px 7px;border-radius:10px;font-size:12px;position:absolute;z-index:1000}.monaco-list-type-filter-message{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;padding:40px 1em 1em;text-align:center;white-space:normal;opacity:.7;pointer-events:none}.monaco-list-type-filter-message:empty{display:none}.monaco-select-box-dropdown-padding{--dropdown-padding-top: 1px;--dropdown-padding-bottom: 1px}.hc-black .monaco-select-box-dropdown-padding,.hc-light .monaco-select-box-dropdown-padding{--dropdown-padding-top: 3px;--dropdown-padding-bottom: 4px}.monaco-select-box-dropdown-container{display:none;box-sizing:border-box}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown *{margin:0}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown a:focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown code{line-height:15px;font-family:var(--monaco-monospace-font)}.monaco-select-box-dropdown-container.visible{display:flex;flex-direction:column;text-align:left;width:1px;overflow:hidden;border-bottom-left-radius:3px;border-bottom-right-radius:3px}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container{flex:0 0 auto;align-self:flex-start;padding-top:var(--dropdown-padding-top);padding-bottom:var(--dropdown-padding-bottom);padding-left:1px;padding-right:1px;width:100%;overflow:hidden;box-sizing:border-box}.monaco-select-box-dropdown-container>.select-box-details-pane{padding:5px}.hc-black .monaco-select-box-dropdown-container>.select-box-dropdown-list-container{padding-top:var(--dropdown-padding-top);padding-bottom:var(--dropdown-padding-bottom)}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row{cursor:pointer}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-text{text-overflow:ellipsis;overflow:hidden;padding-left:3.5px;white-space:nowrap;float:left}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-detail{text-overflow:ellipsis;overflow:hidden;padding-left:3.5px;white-space:nowrap;float:left;opacity:.7}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-decorator-right{text-overflow:ellipsis;overflow:hidden;padding-right:10px;white-space:nowrap;float:right}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.visually-hidden{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control{flex:1 1 auto;align-self:flex-start;opacity:0}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control>.width-control-div{overflow:hidden;max-height:0px}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control>.width-control-div>.option-text-width-control{padding-left:4px;padding-right:8px;white-space:nowrap}.monaco-select-box{width:100%;cursor:pointer;border-radius:2px}.monaco-select-box-dropdown-container{font-size:13px;font-weight:400;text-transform:none}.monaco-action-bar .action-item.select-container{cursor:default}.monaco-action-bar .action-item .monaco-select-box{cursor:pointer;min-width:100px;min-height:18px;padding:2px 23px 2px 8px}.mac .monaco-action-bar .action-item .monaco-select-box{font-size:11px;border-radius:5px}.monaco-action-bar{white-space:nowrap;height:100%}.monaco-action-bar .actions-container{display:flex;margin:0 auto;padding:0;height:100%;width:100%;align-items:center}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar .action-item{display:block;align-items:center;justify-content:center;cursor:pointer;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar .action-item .icon,.monaco-action-bar .action-item .codicon{display:block}.monaco-action-bar .action-item .codicon{display:flex;align-items:center;width:16px;height:16px}.monaco-action-bar .action-label{display:flex;font-size:11px;padding:3px;border-radius:5px}.monaco-action-bar .action-item.disabled .action-label,.monaco-action-bar .action-item.disabled .action-label:before,.monaco-action-bar .action-item.disabled .action-label:hover{opacity:.6}.monaco-action-bar.vertical{text-align:left}.monaco-action-bar.vertical .action-item{display:block}.monaco-action-bar.vertical .action-label.separator{display:block;border-bottom:1px solid #bbb;padding-top:1px;margin-left:.8em;margin-right:.8em}.monaco-action-bar .action-item .action-label.separator{width:1px;height:16px;margin:5px 4px!important;cursor:default;min-width:1px;padding:0;background-color:#bbb}.secondary-actions .monaco-action-bar .action-label{margin-left:6px}.monaco-action-bar .action-item.select-container{overflow:hidden;flex:1;max-width:170px;min-width:60px;display:flex;align-items:center;justify-content:center;margin-right:10px}.monaco-action-bar .action-item.action-dropdown-item{display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-dropdown-item-separator{display:flex;align-items:center;cursor:default}.monaco-action-bar .action-item.action-dropdown-item>.action-dropdown-item-separator>div{width:1px}.monaco-dropdown{height:100%;padding:0}.monaco-dropdown>.dropdown-label{cursor:pointer;height:100%;display:flex;align-items:center;justify-content:center}.monaco-dropdown>.dropdown-label>.action-label.disabled{cursor:default}.monaco-dropdown-with-primary{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-primary>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}.monaco-action-bar .action-item.menu-entry .action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-dropdown-with-default{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-default>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-default>.action-container.menu-entry>.action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}.quick-input-widget{font-size:13px}.quick-input-widget .monaco-highlighted-label .highlight{color:#0066bf}.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight{color:#9dddff}.vs-dark .quick-input-widget .monaco-highlighted-label .highlight{color:#0097fb}.hc-black .quick-input-widget .monaco-highlighted-label .highlight{color:#f38518}.hc-light .quick-input-widget .monaco-highlighted-label .highlight{color:#0f4a85}.monaco-keybinding>.monaco-keybinding-key{background-color:#ddd6;border:solid 1px rgba(204,204,204,.4);border-bottom-color:#bbb6;box-shadow:inset 0 -1px #bbb6;color:#555}.hc-black .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:solid 1px rgb(111,195,223);box-shadow:none;color:#fff}.hc-light .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:solid 1px #0F4A85;box-shadow:none;color:#292929}.vs-dark .monaco-keybinding>.monaco-keybinding-key{background-color:#8080802b;border:solid 1px rgba(51,51,51,.6);border-bottom-color:#4449;box-shadow:inset 0 -1px #4449;color:#ccc}:root{--vscode-sash-size: 4px;--vscode-sash-hover-size: 4px}.monaco-sash{position:absolute;z-index:35;touch-action:none}.monaco-sash.disabled{pointer-events:none}.monaco-sash.mac.vertical{cursor:col-resize}.monaco-sash.vertical.minimum{cursor:e-resize}.monaco-sash.vertical.maximum{cursor:w-resize}.monaco-sash.mac.horizontal{cursor:row-resize}.monaco-sash.horizontal.minimum{cursor:s-resize}.monaco-sash.horizontal.maximum{cursor:n-resize}.monaco-sash.disabled{cursor:default!important;pointer-events:none!important}.monaco-sash.vertical{cursor:ew-resize;top:0;width:var(--vscode-sash-size);height:100%}.monaco-sash.horizontal{cursor:ns-resize;left:0;width:100%;height:var(--vscode-sash-size)}.monaco-sash:not(.disabled)>.orthogonal-drag-handle{content:" ";height:calc(var(--vscode-sash-size) * 2);width:calc(var(--vscode-sash-size) * 2);z-index:100;display:block;cursor:all-scroll;position:absolute}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.start,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.end{cursor:nwse-resize}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.end,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.start{cursor:nesw-resize}.monaco-sash.vertical>.orthogonal-drag-handle.start{left:calc(var(--vscode-sash-size) * -.5);top:calc(var(--vscode-sash-size) * -1)}.monaco-sash.vertical>.orthogonal-drag-handle.end{left:calc(var(--vscode-sash-size) * -.5);bottom:calc(var(--vscode-sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.start{top:calc(var(--vscode-sash-size) * -.5);left:calc(var(--vscode-sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.end{top:calc(var(--vscode-sash-size) * -.5);right:calc(var(--vscode-sash-size) * -1)}.monaco-sash:before{content:"";pointer-events:none;position:absolute;width:100%;height:100%;background:transparent}.monaco-workbench:not(.reduce-motion) .monaco-sash:before{transition:background-color .1s ease-out}.monaco-sash.hover:before,.monaco-sash.active:before{background:var(--vscode-sash-hoverBorder)}.monaco-sash.vertical:before{width:var(--vscode-sash-hover-size);left:calc(50% - (var(--vscode-sash-hover-size) / 2))}.monaco-sash.horizontal:before{height:var(--vscode-sash-hover-size);top:calc(50% - (var(--vscode-sash-hover-size) / 2))}.pointer-events-disabled{pointer-events:none!important}.monaco-sash.debug{background:#0ff}.monaco-sash.debug.disabled{background:#0ff3}.monaco-sash.debug:not(.disabled)>.orthogonal-drag-handle{background:red}.monaco-split-view2{position:relative;width:100%;height:100%}.monaco-split-view2>.sash-container{position:absolute;width:100%;height:100%;pointer-events:none}.monaco-split-view2>.sash-container>.monaco-sash{pointer-events:initial}.monaco-split-view2>.monaco-scrollable-element{width:100%;height:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container{width:100%;height:100%;white-space:nowrap;position:relative}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view{white-space:initial;position:absolute}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view:not(.visible){display:none}.monaco-split-view2.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view{width:100%}.monaco-split-view2.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view{height:100%}.monaco-split-view2.separator-border>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{content:" ";position:absolute;top:0;left:0;z-index:5;pointer-events:none;background-color:var(--separator-border)}.monaco-split-view2.separator-border.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:100%;width:1px}.monaco-split-view2.separator-border.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:1px;width:100%}.monaco-table{display:flex;flex-direction:column;position:relative;height:100%;width:100%;white-space:nowrap;overflow:hidden}.monaco-table>.monaco-split-view2{border-bottom:1px solid transparent}.monaco-table>.monaco-list{flex:1}.monaco-table-tr{display:flex;height:100%}.monaco-table-th{width:100%;height:100%;font-weight:700;overflow:hidden;text-overflow:ellipsis}.monaco-table-th,.monaco-table-td{box-sizing:border-box;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{content:"";position:absolute;left:calc(var(--vscode-sash-size) / 2);width:0;border-left:1px solid transparent}.monaco-workbench:not(.reduce-motion) .monaco-table>.monaco-split-view2,.monaco-workbench:not(.reduce-motion) .monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{transition:border-color .2s ease-out}.monaco-custom-toggle{margin-left:2px;float:left;cursor:pointer;overflow:hidden;width:20px;height:20px;border-radius:3px;border:1px solid transparent;padding:1px;box-sizing:border-box;user-select:none;-webkit-user-select:none}.monaco-custom-toggle:hover{background-color:var(--vscode-inputOption-hoverBackground)}.hc-black .monaco-custom-toggle:hover,.hc-light .monaco-custom-toggle:hover{border:1px dashed var(--vscode-focusBorder)}.hc-black .monaco-custom-toggle,.hc-light .monaco-custom-toggle,.hc-black .monaco-custom-toggle:hover,.hc-light .monaco-custom-toggle:hover{background:none}.monaco-custom-toggle.monaco-checkbox{height:18px;width:18px;border:1px solid transparent;border-radius:3px;margin-right:9px;margin-left:0;padding:0;opacity:1;background-size:16px!important}.monaco-action-bar .checkbox-action-item{display:flex;align-items:center}.monaco-action-bar .checkbox-action-item>.monaco-custom-toggle.monaco-checkbox{margin-right:4px}.monaco-action-bar .checkbox-action-item>.checkbox-label{font-size:12px}.monaco-custom-toggle.monaco-checkbox:not(.checked):before{visibility:hidden}.monaco-inputbox{position:relative;display:block;padding:0;box-sizing:border-box;border-radius:2px;font-size:inherit}.monaco-inputbox>.ibwrapper>.input,.monaco-inputbox>.ibwrapper>.mirror{padding:4px 6px}.monaco-inputbox>.ibwrapper{position:relative;width:100%;height:100%}.monaco-inputbox>.ibwrapper>.input{display:inline-block;box-sizing:border-box;width:100%;height:100%;line-height:inherit;border:none;font-family:inherit;font-size:inherit;resize:none;color:inherit}.monaco-inputbox>.ibwrapper>input{text-overflow:ellipsis}.monaco-inputbox>.ibwrapper>textarea.input{display:block;scrollbar-width:none;outline:none}.monaco-inputbox>.ibwrapper>textarea.input::-webkit-scrollbar{display:none}.monaco-inputbox>.ibwrapper>textarea.input.empty{white-space:nowrap}.monaco-inputbox>.ibwrapper>.mirror{position:absolute;display:inline-block;width:100%;top:0;left:0;box-sizing:border-box;white-space:pre-wrap;visibility:hidden;word-wrap:break-word}.monaco-inputbox-container{text-align:right}.monaco-inputbox-container .monaco-inputbox-message{display:inline-block;overflow:hidden;text-align:left;width:100%;box-sizing:border-box;padding:.4em;font-size:12px;line-height:17px;margin-top:-1px;word-wrap:break-word}.monaco-inputbox .monaco-action-bar{position:absolute;right:2px;top:4px}.monaco-inputbox .monaco-action-bar .action-item{margin-left:2px}.monaco-inputbox .monaco-action-bar .action-item .codicon{background-repeat:no-repeat;width:16px;height:16px}.monaco-findInput{position:relative}.monaco-findInput .monaco-inputbox{font-size:13px;width:100%}.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.vs .monaco-findInput.disabled{background-color:#e1e1e1}.vs-dark .monaco-findInput.disabled{background-color:#333}.monaco-findInput.highlight-0 .controls,.hc-light .monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-0 .1s linear 0s}.monaco-findInput.highlight-1 .controls,.hc-light .monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-1 .1s linear 0s}.hc-black .monaco-findInput.highlight-0 .controls,.vs-dark .monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-dark-0 .1s linear 0s}.hc-black .monaco-findInput.highlight-1 .controls,.vs-dark .monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-dark-1 .1s linear 0s}@keyframes monaco-findInput-highlight-0{0%{background:#fdff00cc}to{background:transparent}}@keyframes monaco-findInput-highlight-1{0%{background:#fdff00cc}99%{background:transparent}}@keyframes monaco-findInput-highlight-dark-0{0%{background:#ffffff70}to{background:transparent}}@keyframes monaco-findInput-highlight-dark-1{0%{background:#ffffff70}99%{background:transparent}}.monaco-tl-row{display:flex;height:100%;align-items:center;position:relative}.monaco-tl-row.disabled{cursor:default}.monaco-tl-indent{height:100%;position:absolute;top:0;left:16px;pointer-events:none}.hide-arrows .monaco-tl-indent{left:12px}.monaco-tl-indent>.indent-guide{display:inline-block;box-sizing:border-box;height:100%;border-left:1px solid transparent}.monaco-workbench:not(.reduce-motion) .monaco-tl-indent>.indent-guide{transition:border-color .1s linear}.monaco-tl-twistie,.monaco-tl-contents{height:100%}.monaco-tl-twistie{font-size:10px;text-align:right;padding-right:6px;flex-shrink:0;width:16px;display:flex!important;align-items:center;justify-content:center;transform:translate(3px)}.monaco-tl-contents{flex:1;overflow:hidden}.monaco-tl-twistie:before{border-radius:20px}.monaco-tl-twistie.collapsed:before{transform:rotate(-90deg)}.monaco-tl-twistie.codicon-tree-item-loading:before{animation:codicon-spin 1.25s steps(30) infinite}.monaco-tree-type-filter{position:absolute;top:0;display:flex;padding:3px;max-width:200px;z-index:100;margin:0 6px;border:1px solid var(--vscode-widget-border);border-bottom-left-radius:4px;border-bottom-right-radius:4px}.monaco-workbench:not(.reduce-motion) .monaco-tree-type-filter{transition:top .3s}.monaco-tree-type-filter.disabled{top:-40px!important}.monaco-tree-type-filter-grab{display:flex!important;align-items:center;justify-content:center;cursor:grab;margin-right:2px}.monaco-tree-type-filter-grab.grabbing{cursor:grabbing}.monaco-tree-type-filter-input{flex:1}.monaco-tree-type-filter-input .monaco-inputbox{height:23px}.monaco-tree-type-filter-input .monaco-inputbox>.ibwrapper>.input,.monaco-tree-type-filter-input .monaco-inputbox>.ibwrapper>.mirror{padding:2px 4px}.monaco-tree-type-filter-input .monaco-findInput>.controls{top:2px}.monaco-tree-type-filter-actionbar{margin-left:4px}.monaco-tree-type-filter-actionbar .monaco-action-bar .action-label{padding:2px}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container{position:absolute;top:0;left:0;width:100%;height:0;z-index:13;background-color:var(--vscode-sideBar-background)}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row.monaco-list-row{position:absolute;width:100%;opacity:1!important;overflow:hidden;background-color:var(--vscode-sideBar-background)}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row:hover{background-color:var(--vscode-list-hoverBackground)!important;cursor:pointer}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow{position:absolute;bottom:-3px;left:0;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.monaco-text-button{box-sizing:border-box;display:flex;width:100%;padding:4px;border-radius:2px;text-align:center;cursor:pointer;justify-content:center;align-items:center;border:1px solid var(--vscode-button-border, transparent);line-height:18px}.monaco-text-button:focus{outline-offset:2px!important}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled:focus,.monaco-button.disabled{opacity:.4!important;cursor:default}.monaco-text-button .codicon{margin:0 .2em;color:inherit!important}.monaco-text-button.monaco-text-button-with-short-label{flex-direction:row;flex-wrap:wrap;padding:0 4px;overflow:hidden;height:28px}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label{flex-basis:100%}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label-short{flex-grow:1;width:0;overflow:hidden}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label,.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label-short{display:flex;justify-content:center;align-items:center;font-weight:400;font-style:inherit;padding:4px 0}.monaco-button-dropdown{display:flex;cursor:pointer}.monaco-button-dropdown.disabled{cursor:default}.monaco-button-dropdown>.monaco-button:focus{outline-offset:-1px!important}.monaco-button-dropdown.disabled>.monaco-button.disabled,.monaco-button-dropdown.disabled>.monaco-button.disabled:focus,.monaco-button-dropdown.disabled>.monaco-button-dropdown-separator{opacity:.4!important}.monaco-button-dropdown>.monaco-button.monaco-text-button{border-right-width:0!important}.monaco-button-dropdown .monaco-button-dropdown-separator{padding:4px 0;cursor:default}.monaco-button-dropdown .monaco-button-dropdown-separator>div{height:100%;width:1px}.monaco-button-dropdown>.monaco-button.monaco-dropdown-button{border:1px solid var(--vscode-button-border, transparent);border-left-width:0!important;border-radius:0 2px 2px 0;display:flex;align-items:center}.monaco-button-dropdown>.monaco-button.monaco-text-button{border-radius:2px 0 0 2px}.monaco-description-button{display:flex;flex-direction:column;align-items:center;margin:4px 5px}.monaco-description-button .monaco-button-description{font-style:italic;font-size:11px;padding:4px 20px}.monaco-description-button .monaco-button-label,.monaco-description-button .monaco-button-description{display:flex;justify-content:center;align-items:center}.monaco-description-button .monaco-button-label>.codicon,.monaco-description-button .monaco-button-description>.codicon{margin:0 .2em;color:inherit!important}.monaco-button.default-colors,.monaco-button-dropdown.default-colors>.monaco-button{color:var(--vscode-button-foreground);background-color:var(--vscode-button-background)}.monaco-button.default-colors:hover,.monaco-button-dropdown.default-colors>.monaco-button:hover{background-color:var(--vscode-button-hoverBackground)}.monaco-button.default-colors.secondary,.monaco-button-dropdown.default-colors>.monaco-button.secondary{color:var(--vscode-button-secondaryForeground);background-color:var(--vscode-button-secondaryBackground)}.monaco-button.default-colors.secondary:hover,.monaco-button-dropdown.default-colors>.monaco-button.secondary:hover{background-color:var(--vscode-button-secondaryHoverBackground)}.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator{background-color:var(--vscode-button-background);border-top:1px solid var(--vscode-button-border);border-bottom:1px solid var(--vscode-button-border)}.monaco-button-dropdown.default-colors .monaco-button.secondary+.monaco-button-dropdown-separator{background-color:var(--vscode-button-secondaryBackground)}.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator>div{background-color:var(--vscode-button-separator)}.monaco-count-badge{padding:3px 6px;border-radius:11px;font-size:11px;min-width:18px;min-height:18px;line-height:11px;font-weight:400;text-align:center;display:inline-block;box-sizing:border-box}.monaco-count-badge.long{padding:2px 3px;border-radius:2px;min-height:auto;line-height:normal}.monaco-progress-container{width:100%;height:2px;overflow:hidden}.monaco-progress-container .progress-bit{width:2%;height:2px;position:absolute;left:0;display:none}.monaco-progress-container.active .progress-bit{display:inherit}.monaco-progress-container.discrete .progress-bit{left:0;transition:width .1s linear}.monaco-progress-container.discrete.done .progress-bit{width:100%}.monaco-progress-container.infinite .progress-bit{animation-name:progress;animation-duration:4s;animation-iteration-count:infinite;transform:translateZ(0);animation-timing-function:linear}.monaco-progress-container.infinite.infinite-long-running .progress-bit{animation-timing-function:steps(100)}@keyframes progress{0%{transform:translate(0) scaleX(1)}50%{transform:translate(2500%) scaleX(3)}to{transform:translate(4900%) scaleX(1)}}.quick-input-widget{position:absolute;width:600px;z-index:2550;left:50%;margin-left:-300px;-webkit-app-region:no-drag;border-radius:6px}.quick-input-titlebar{display:flex;align-items:center;border-top-left-radius:5px;border-top-right-radius:5px}.quick-input-left-action-bar{display:flex;margin-left:4px;flex:1}.quick-input-title{padding:3px 0;text-align:center;text-overflow:ellipsis;overflow:hidden}.quick-input-right-action-bar{display:flex;margin-right:4px;flex:1}.quick-input-right-action-bar>.actions-container{justify-content:flex-end}.quick-input-titlebar .monaco-action-bar .action-label.codicon{background-position:center;background-repeat:no-repeat;padding:2px}.quick-input-description{margin:6px 6px 6px 11px}.quick-input-header .quick-input-description{margin:4px 2px;flex:1}.quick-input-header{display:flex;padding:8px 6px 6px}.quick-input-widget.hidden-input .quick-input-header{padding:0;margin-bottom:0}.quick-input-and-message{display:flex;flex-direction:column;flex-grow:1;min-width:0;position:relative}.quick-input-check-all{align-self:center;margin:0}.quick-input-filter{flex-grow:1;display:flex;position:relative}.quick-input-box{flex-grow:1}.quick-input-widget.show-checkboxes .quick-input-box,.quick-input-widget.show-checkboxes .quick-input-message{margin-left:5px}.quick-input-visible-count{position:absolute;left:-10000px}.quick-input-count{align-self:center;position:absolute;right:4px;display:flex;align-items:center}.quick-input-count .monaco-count-badge{vertical-align:middle;padding:2px 4px;border-radius:2px;min-height:auto;line-height:normal}.quick-input-action{margin-left:6px}.quick-input-action .monaco-text-button{font-size:11px;padding:0 6px;display:flex;height:25px;align-items:center}.quick-input-message{margin-top:-1px;padding:5px;overflow-wrap:break-word}.quick-input-message>.codicon{margin:0 .2em;vertical-align:text-bottom}.quick-input-message a{color:inherit}.quick-input-progress.monaco-progress-container{position:relative}.quick-input-list{line-height:22px}.quick-input-widget.hidden-input .quick-input-list{margin-top:4px;padding-bottom:4px}.quick-input-list .monaco-list{overflow:hidden;max-height:440px;padding-bottom:5px}.quick-input-list .monaco-scrollable-element{padding:0 5px}.quick-input-list .quick-input-list-entry{box-sizing:border-box;overflow:hidden;display:flex;height:100%;padding:0 6px}.quick-input-list .quick-input-list-entry.quick-input-list-separator-border{border-top-width:1px;border-top-style:solid}.quick-input-list .monaco-list-row{border-radius:3px}.quick-input-list .monaco-list-row[data-index="0"] .quick-input-list-entry.quick-input-list-separator-border{border-top-style:none}.quick-input-list .quick-input-list-label{overflow:hidden;display:flex;height:100%;flex:1}.quick-input-list .quick-input-list-checkbox{align-self:center;margin:0}.quick-input-list .quick-input-list-icon{background-size:16px;background-position:left center;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;display:flex;align-items:center;justify-content:center}.quick-input-list .quick-input-list-rows{overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;height:100%;flex:1;margin-left:5px}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows{margin-left:10px}.quick-input-widget .quick-input-list .quick-input-list-checkbox{display:none}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox{display:inline}.quick-input-list .quick-input-list-rows>.quick-input-list-row{display:flex;align-items:center}.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label,.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1}.quick-input-list .quick-input-list-rows>.quick-input-list-row .codicon[class*=codicon-]{vertical-align:text-bottom}.quick-input-list .quick-input-list-rows .monaco-highlighted-label>span{opacity:1}.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding{margin-right:8px}.quick-input-list .quick-input-list-label-meta{opacity:.7;line-height:normal;text-overflow:ellipsis;overflow:hidden}.quick-input-list .monaco-highlighted-label .highlight{font-weight:700}.quick-input-list .quick-input-list-entry .quick-input-list-separator{margin-right:4px}.quick-input-list .quick-input-list-entry-action-bar{display:flex;flex:0;overflow:visible}.quick-input-list .quick-input-list-entry-action-bar .action-label{display:none}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin-right:4px;padding:0 2px 2px}.quick-input-list .quick-input-list-entry-action-bar{margin-top:1px}.quick-input-list .quick-input-list-entry-action-bar{margin-right:4px}.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label{display:flex}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator{color:inherit}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key{background:none}.quick-input-list .quick-input-list-separator-as-item{font-weight:600;font-size:12px}.monaco-icon-label{display:flex;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label:before{background-size:16px;background-position:left center;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;line-height:inherit!important;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;flex-shrink:0}.monaco-icon-label-container.disabled{color:var(--vscode-disabledForeground)}.monaco-icon-label>.monaco-icon-label-container{min-width:0;overflow:hidden;text-overflow:ellipsis;flex:1}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{color:inherit;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name>.label-separator{margin:0 2px;opacity:.5}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-suffix-container>.label-suffix{opacity:.7;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.7;margin-left:.5em;font-size:.9em;white-space:pre}.monaco-icon-label.nowrap>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{white-space:nowrap}.vs .monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.95}.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{font-style:italic}.monaco-icon-label.deprecated{text-decoration:line-through;opacity:.66}.monaco-icon-label.italic:after{font-style:italic}.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{text-decoration:line-through}.monaco-icon-label:after{opacity:.75;font-size:90%;font-weight:600;margin:auto 16px 0 5px;text-align:center}.monaco-list:focus .selected .monaco-icon-label,.monaco-list:focus .selected .monaco-icon-label:after{color:inherit!important}.monaco-list-row.focused.selected .label-description,.monaco-list-row.selected .label-description{opacity:.8}.monaco-keybinding{display:flex;align-items:center;line-height:10px}.monaco-keybinding>.monaco-keybinding-key{display:inline-block;border-style:solid;border-width:1px;border-radius:3px;vertical-align:middle;font-size:11px;padding:3px 5px;margin:0 2px}.monaco-keybinding>.monaco-keybinding-key:first-child{margin-left:0}.monaco-keybinding>.monaco-keybinding-key:last-child{margin-right:0}.monaco-keybinding>.monaco-keybinding-key-separator{display:inline-block}.monaco-keybinding>.monaco-keybinding-key-chord-separator{width:6px}.monaco-editor .diff-hidden-lines-widget{width:100%}.monaco-editor .diff-hidden-lines{height:0px;transform:translateY(-10px);font-size:13px;line-height:14px}.monaco-editor .diff-hidden-lines:not(.dragging) .top:hover,.monaco-editor .diff-hidden-lines:not(.dragging) .bottom:hover,.monaco-editor .diff-hidden-lines .top.dragging,.monaco-editor .diff-hidden-lines .bottom.dragging{background-color:var(--vscode-focusBorder)}.monaco-editor .diff-hidden-lines .top,.monaco-editor .diff-hidden-lines .bottom{transition:background-color .1s ease-out;height:4px;background-color:transparent;background-clip:padding-box;border-bottom:2px solid transparent;border-top:4px solid transparent}.monaco-editor.draggingUnchangedRegion.canMoveTop:not(.canMoveBottom) *,.monaco-editor .diff-hidden-lines .top.canMoveTop:not(.canMoveBottom),.monaco-editor .diff-hidden-lines .bottom.canMoveTop:not(.canMoveBottom){cursor:n-resize!important}.monaco-editor.draggingUnchangedRegion:not(.canMoveTop).canMoveBottom *,.monaco-editor .diff-hidden-lines .top:not(.canMoveTop).canMoveBottom,.monaco-editor .diff-hidden-lines .bottom:not(.canMoveTop).canMoveBottom{cursor:s-resize!important}.monaco-editor.draggingUnchangedRegion.canMoveTop.canMoveBottom *,.monaco-editor .diff-hidden-lines .top.canMoveTop.canMoveBottom,.monaco-editor .diff-hidden-lines .bottom.canMoveTop.canMoveBottom{cursor:ns-resize!important}.monaco-editor .diff-hidden-lines .top{transform:translateY(4px)}.monaco-editor .diff-hidden-lines .bottom{transform:translateY(-6px)}.monaco-editor .diff-unchanged-lines{background:var(--vscode-diffEditor-unchangedCodeBackground)}.monaco-editor .noModificationsOverlay{z-index:1;background:var(--vscode-editor-background);display:flex;justify-content:center;align-items:center}.monaco-editor .diff-hidden-lines .center{background:var(--vscode-diffEditor-unchangedRegionBackground);color:var(--vscode-diffEditor-unchangedRegionForeground);overflow:hidden;display:block;text-overflow:ellipsis;white-space:nowrap;height:24px;box-shadow:inset 0 -5px 5px -7px var(--vscode-diffEditor-unchangedRegionShadow),inset 0 5px 5px -7px var(--vscode-diffEditor-unchangedRegionShadow)}.monaco-editor .diff-hidden-lines .center span.codicon{vertical-align:middle}.monaco-editor .diff-hidden-lines .center a:hover .codicon{cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .diff-hidden-lines div.breadcrumb-item{cursor:pointer}.monaco-editor .diff-hidden-lines div.breadcrumb-item:hover{color:var(--vscode-editorLink-activeForeground)}.monaco-editor .movedOriginal,.monaco-editor .movedModified{border:2px solid var(--vscode-diffEditor-move-border)}.monaco-editor .movedOriginal.currentMove,.monaco-editor .movedModified.currentMove{border:2px solid var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines path.currentMove{stroke:var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines path{pointer-events:visiblestroke}.monaco-diff-editor .moved-blocks-lines .arrow{fill:var(--vscode-diffEditor-move-border)}.monaco-diff-editor .moved-blocks-lines .arrow.currentMove{fill:var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines .arrow-rectangle{fill:var(--vscode-editor-background)}.monaco-diff-editor .moved-blocks-lines{position:absolute;pointer-events:none}.monaco-diff-editor .moved-blocks-lines path{fill:none;stroke:var(--vscode-diffEditor-move-border);stroke-width:2}.monaco-editor .char-delete.diff-range-empty{margin-left:-1px;border-left:solid var(--vscode-diffEditor-removedTextBackground) 3px}.monaco-editor .char-insert.diff-range-empty{border-left:solid var(--vscode-diffEditor-insertedTextBackground) 3px}.monaco-editor .fold-unchanged{cursor:pointer}.monaco-diff-editor .diff-moved-code-block{display:flex;justify-content:flex-end;margin-top:-4px}.monaco-diff-editor .diff-moved-code-block .action-bar .action-label.codicon{width:12px;height:12px;font-size:12px}.monaco-diff-editor .diffOverview{z-index:9}.monaco-diff-editor .diffOverview .diffViewport{z-index:10}.monaco-diff-editor.vs .diffOverview{background:#00000008}.monaco-diff-editor.vs-dark .diffOverview{background:#ffffff03}.monaco-scrollable-element.modified-in-monaco-diff-editor.vs .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark .scrollbar{background:#0000}.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-light .scrollbar{background:none}.monaco-scrollable-element.modified-in-monaco-diff-editor .slider{z-index:10}.modified-in-monaco-diff-editor .slider.active{background:#ababab66}.modified-in-monaco-diff-editor.hc-black .slider.active,.modified-in-monaco-diff-editor.hc-light .slider.active{background:none}.monaco-editor .insert-sign,.monaco-diff-editor .insert-sign,.monaco-editor .delete-sign,.monaco-diff-editor .delete-sign{font-size:11px!important;opacity:.7!important;display:flex!important;align-items:center}.monaco-editor.hc-black .insert-sign,.monaco-diff-editor.hc-black .insert-sign,.monaco-editor.hc-black .delete-sign,.monaco-diff-editor.hc-black .delete-sign,.monaco-editor.hc-light .insert-sign,.monaco-diff-editor.hc-light .insert-sign,.monaco-editor.hc-light .delete-sign,.monaco-diff-editor.hc-light .delete-sign{opacity:1}.monaco-editor .inline-deleted-margin-view-zone,.monaco-editor .inline-added-margin-view-zone{text-align:right}.monaco-editor .arrow-revert-change{z-index:10;position:absolute}.monaco-editor .arrow-revert-change:hover{cursor:pointer}.monaco-editor .view-zones .view-lines .view-line span{display:inline-block}.monaco-editor .margin-view-zones .lightbulb-glyph:hover{cursor:pointer}.monaco-editor .char-insert,.monaco-diff-editor .char-insert{background-color:var(--vscode-diffEditor-insertedTextBackground)}.monaco-editor .line-insert,.monaco-diff-editor .line-insert{background-color:var(--vscode-diffEditor-insertedLineBackground, var(--vscode-diffEditor-insertedTextBackground))}.monaco-editor .line-insert,.monaco-editor .char-insert{box-sizing:border-box;border:1px solid var(--vscode-diffEditor-insertedTextBorder)}.monaco-editor.hc-black .line-insert,.monaco-editor.hc-light .line-insert,.monaco-editor.hc-black .char-insert,.monaco-editor.hc-light .char-insert{border-style:dashed}.monaco-editor .line-delete,.monaco-editor .char-delete{box-sizing:border-box;border:1px solid var(--vscode-diffEditor-removedTextBorder)}.monaco-editor.hc-black .line-delete,.monaco-editor.hc-light .line-delete,.monaco-editor.hc-black .char-delete,.monaco-editor.hc-light .char-delete{border-style:dashed}.monaco-editor .inline-added-margin-view-zone,.monaco-editor .gutter-insert,.monaco-diff-editor .gutter-insert{background-color:var(--vscode-diffEditorGutter-insertedLineBackground, var(--vscode-diffEditor-insertedLineBackground), var(--vscode-diffEditor-insertedTextBackground))}.monaco-editor .char-delete,.monaco-diff-editor .char-delete{background-color:var(--vscode-diffEditor-removedTextBackground)}.monaco-editor .line-delete,.monaco-diff-editor .line-delete{background-color:var(--vscode-diffEditor-removedLineBackground, var(--vscode-diffEditor-removedTextBackground))}.monaco-editor .inline-deleted-margin-view-zone,.monaco-editor .gutter-delete,.monaco-diff-editor .gutter-delete{background-color:var(--vscode-diffEditorGutter-removedLineBackground, var(--vscode-diffEditor-removedLineBackground), var(--vscode-diffEditor-removedTextBackground))}.monaco-diff-editor.side-by-side .editor.modified{box-shadow:-6px 0 5px -5px var(--vscode-scrollbar-shadow);border-left:1px solid var(--vscode-diffEditor-border)}.monaco-diff-editor .diffViewport{background:var(--vscode-scrollbarSlider-background)}.monaco-diff-editor .diffViewport:hover{background:var(--vscode-scrollbarSlider-hoverBackground)}.monaco-diff-editor .diffViewport:active{background:var(--vscode-scrollbarSlider-activeBackground)}.monaco-editor .diagonal-fill{background-image:linear-gradient(-45deg,var(--vscode-diffEditor-diagonalFill) 12.5%,#0000 12.5%,#0000 50%,var(--vscode-diffEditor-diagonalFill) 50%,var(--vscode-diffEditor-diagonalFill) 62.5%,#0000 62.5%,#0000 100%);background-size:8px 8px}.monaco-diff-editor .diff-review-line-number{text-align:right;display:inline-block;color:var(--vscode-editorLineNumber-foreground)}.monaco-diff-editor .diff-review{position:absolute;user-select:none;-webkit-user-select:none;z-index:99}.monaco-diff-editor .diff-review-summary{padding-left:10px}.monaco-diff-editor .diff-review-shadow{position:absolute;box-shadow:var(--vscode-scrollbar-shadow) 0 -6px 6px -6px inset}.monaco-diff-editor .diff-review-row{white-space:pre}.monaco-diff-editor .diff-review-table{display:table;min-width:100%}.monaco-diff-editor .diff-review-row{display:table-row;width:100%}.monaco-diff-editor .diff-review-spacer{display:inline-block;width:10px;vertical-align:middle}.monaco-diff-editor .diff-review-spacer>.codicon{font-size:9px!important}.monaco-diff-editor .diff-review-actions{display:inline-block;position:absolute;right:10px;top:2px;z-index:100}.monaco-diff-editor .diff-review-actions .action-label{width:16px;height:16px;margin:2px 0}.monaco-diff-editor .revertButton{cursor:pointer}.monaco-component .multiDiffEntry{display:flex;flex-direction:column}.monaco-component .multiDiffEntry .editorParent{border-left:2px var(--vscode-tab-inactiveBackground) solid}.monaco-component .multiDiffEntry.focused .editorParent{border-left:2px var(--vscode-notebook-focusedCellBorder) solid}.monaco-component .multiDiffEntry .editorParent .editorContainer{border-left:17px var(--vscode-tab-inactiveBackground) solid}.monaco-component .multiDiffEntry .collapse-button{margin:0 5px;cursor:pointer}.monaco-component .multiDiffEntry .collapse-button a{display:block}.monaco-component .multiDiffEntry .header{display:flex;align-items:center;padding:8px 5px;color:var(--vscode-foreground);background:var(--vscode-editor-background);z-index:1000;border-bottom:1px var(--vscode-sideBarSectionHeader-border) solid;border-top:1px var(--vscode-sideBarSectionHeader-border) solid;border-left:2px var(--vscode-editor-background) solid}.monaco-component .multiDiffEntry.focused .header{border-left:2px var(--vscode-notebook-focusedCellBorder) solid}.monaco-component .multiDiffEntry .header.shadow{box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px}.monaco-component .multiDiffEntry .header .title{flex:1;font-size:14px;line-height:22px}.monaco-component .multiDiffEntry .header .actions{padding:0 8px}.monaco-toolbar{height:100%}.monaco-toolbar .toolbar-toggle-more{display:inline-block;padding:0}.monaco-editor .selection-anchor{background-color:#007acc;width:2px!important}.monaco-editor .bracket-match{box-sizing:border-box;background-color:var(--vscode-editorBracketMatch-background);border:1px solid var(--vscode-editorBracketMatch-border)}@font-face{font-family:codicon;font-display:block;src:url(/ui/assets/codicon-Hscy-R9e.ttf) format("truetype")}.codicon[class*=codicon-]{font: 16px/1 codicon;display:inline-block;text-decoration:none;text-rendering:auto;text-align:center;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;user-select:none;-webkit-user-select:none}.codicon-wrench-subaction{opacity:.5}@keyframes codicon-spin{to{transform:rotate(360deg)}}.codicon-sync.codicon-modifier-spin,.codicon-loading.codicon-modifier-spin,.codicon-gear.codicon-modifier-spin,.codicon-notebook-state-executing.codicon-modifier-spin{animation:codicon-spin 1.5s steps(30) infinite}.codicon-modifier-disabled{opacity:.4}.codicon-loading,.codicon-tree-item-loading:before{animation-duration:1s!important;animation-timing-function:cubic-bezier(.53,.21,.29,.67)!important}.monaco-editor .codicon.codicon-symbol-array,.monaco-workbench .codicon.codicon-symbol-array{color:var(--vscode-symbolIcon-arrayForeground)}.monaco-editor .codicon.codicon-symbol-boolean,.monaco-workbench .codicon.codicon-symbol-boolean{color:var(--vscode-symbolIcon-booleanForeground)}.monaco-editor .codicon.codicon-symbol-class,.monaco-workbench .codicon.codicon-symbol-class{color:var(--vscode-symbolIcon-classForeground)}.monaco-editor .codicon.codicon-symbol-method,.monaco-workbench .codicon.codicon-symbol-method{color:var(--vscode-symbolIcon-methodForeground)}.monaco-editor .codicon.codicon-symbol-color,.monaco-workbench .codicon.codicon-symbol-color{color:var(--vscode-symbolIcon-colorForeground)}.monaco-editor .codicon.codicon-symbol-constant,.monaco-workbench .codicon.codicon-symbol-constant{color:var(--vscode-symbolIcon-constantForeground)}.monaco-editor .codicon.codicon-symbol-constructor,.monaco-workbench .codicon.codicon-symbol-constructor{color:var(--vscode-symbolIcon-constructorForeground)}.monaco-editor .codicon.codicon-symbol-value,.monaco-workbench .codicon.codicon-symbol-value,.monaco-editor .codicon.codicon-symbol-enum,.monaco-workbench .codicon.codicon-symbol-enum{color:var(--vscode-symbolIcon-enumeratorForeground)}.monaco-editor .codicon.codicon-symbol-enum-member,.monaco-workbench .codicon.codicon-symbol-enum-member{color:var(--vscode-symbolIcon-enumeratorMemberForeground)}.monaco-editor .codicon.codicon-symbol-event,.monaco-workbench .codicon.codicon-symbol-event{color:var(--vscode-symbolIcon-eventForeground)}.monaco-editor .codicon.codicon-symbol-field,.monaco-workbench .codicon.codicon-symbol-field{color:var(--vscode-symbolIcon-fieldForeground)}.monaco-editor .codicon.codicon-symbol-file,.monaco-workbench .codicon.codicon-symbol-file{color:var(--vscode-symbolIcon-fileForeground)}.monaco-editor .codicon.codicon-symbol-folder,.monaco-workbench .codicon.codicon-symbol-folder{color:var(--vscode-symbolIcon-folderForeground)}.monaco-editor .codicon.codicon-symbol-function,.monaco-workbench .codicon.codicon-symbol-function{color:var(--vscode-symbolIcon-functionForeground)}.monaco-editor .codicon.codicon-symbol-interface,.monaco-workbench .codicon.codicon-symbol-interface{color:var(--vscode-symbolIcon-interfaceForeground)}.monaco-editor .codicon.codicon-symbol-key,.monaco-workbench .codicon.codicon-symbol-key{color:var(--vscode-symbolIcon-keyForeground)}.monaco-editor .codicon.codicon-symbol-keyword,.monaco-workbench .codicon.codicon-symbol-keyword{color:var(--vscode-symbolIcon-keywordForeground)}.monaco-editor .codicon.codicon-symbol-module,.monaco-workbench .codicon.codicon-symbol-module{color:var(--vscode-symbolIcon-moduleForeground)}.monaco-editor .codicon.codicon-symbol-namespace,.monaco-workbench .codicon.codicon-symbol-namespace{color:var(--vscode-symbolIcon-namespaceForeground)}.monaco-editor .codicon.codicon-symbol-null,.monaco-workbench .codicon.codicon-symbol-null{color:var(--vscode-symbolIcon-nullForeground)}.monaco-editor .codicon.codicon-symbol-number,.monaco-workbench .codicon.codicon-symbol-number{color:var(--vscode-symbolIcon-numberForeground)}.monaco-editor .codicon.codicon-symbol-object,.monaco-workbench .codicon.codicon-symbol-object{color:var(--vscode-symbolIcon-objectForeground)}.monaco-editor .codicon.codicon-symbol-operator,.monaco-workbench .codicon.codicon-symbol-operator{color:var(--vscode-symbolIcon-operatorForeground)}.monaco-editor .codicon.codicon-symbol-package,.monaco-workbench .codicon.codicon-symbol-package{color:var(--vscode-symbolIcon-packageForeground)}.monaco-editor .codicon.codicon-symbol-property,.monaco-workbench .codicon.codicon-symbol-property{color:var(--vscode-symbolIcon-propertyForeground)}.monaco-editor .codicon.codicon-symbol-reference,.monaco-workbench .codicon.codicon-symbol-reference{color:var(--vscode-symbolIcon-referenceForeground)}.monaco-editor .codicon.codicon-symbol-snippet,.monaco-workbench .codicon.codicon-symbol-snippet{color:var(--vscode-symbolIcon-snippetForeground)}.monaco-editor .codicon.codicon-symbol-string,.monaco-workbench .codicon.codicon-symbol-string{color:var(--vscode-symbolIcon-stringForeground)}.monaco-editor .codicon.codicon-symbol-struct,.monaco-workbench .codicon.codicon-symbol-struct{color:var(--vscode-symbolIcon-structForeground)}.monaco-editor .codicon.codicon-symbol-text,.monaco-workbench .codicon.codicon-symbol-text{color:var(--vscode-symbolIcon-textForeground)}.monaco-editor .codicon.codicon-symbol-type-parameter,.monaco-workbench .codicon.codicon-symbol-type-parameter{color:var(--vscode-symbolIcon-typeParameterForeground)}.monaco-editor .codicon.codicon-symbol-unit,.monaco-workbench .codicon.codicon-symbol-unit{color:var(--vscode-symbolIcon-unitForeground)}.monaco-editor .codicon.codicon-symbol-variable,.monaco-workbench .codicon.codicon-symbol-variable{color:var(--vscode-symbolIcon-variableForeground)}.monaco-editor .lightBulbWidget{display:flex;align-items:center;justify-content:center}.monaco-editor .lightBulbWidget:hover{cursor:pointer}.monaco-editor .lightBulbWidget.codicon-light-bulb,.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle{color:var(--vscode-editorLightBulb-foreground)}.monaco-editor .lightBulbWidget.codicon-lightbulb-autofix,.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle-autofix{color:var(--vscode-editorLightBulbAutoFix-foreground, var(--vscode-editorLightBulb-foreground))}.monaco-editor .lightBulbWidget.codicon-sparkle-filled{color:var(--vscode-editorLightBulbAi-foreground, var(--vscode-icon-foreground))}.monaco-editor .lightBulbWidget:before{position:relative;z-index:2}.monaco-editor .lightBulbWidget:after{position:absolute;top:0;left:0;content:"";display:block;width:100%;height:100%;opacity:.3;background-color:var(--vscode-editor-background);z-index:1}.monaco-editor .monaco-editor-overlaymessage{padding-bottom:8px;z-index:10000}.monaco-editor .monaco-editor-overlaymessage.below{padding-bottom:0;padding-top:8px;z-index:10000}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.monaco-editor .monaco-editor-overlaymessage.fadeIn{animation:fadeIn .15s ease-out}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.monaco-editor .monaco-editor-overlaymessage.fadeOut{animation:fadeOut .1s ease-out}.monaco-editor .monaco-editor-overlaymessage .message{padding:2px 4px;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-inputValidation-infoBorder);border-radius:3px}.monaco-editor .monaco-editor-overlaymessage .message p{margin-block:0px}.monaco-editor .monaco-editor-overlaymessage .message a{color:var(--vscode-textLink-foreground)}.monaco-editor .monaco-editor-overlaymessage .message a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor.hc-black .monaco-editor-overlaymessage .message,.monaco-editor.hc-light .monaco-editor-overlaymessage .message{border-width:2px}.monaco-editor .monaco-editor-overlaymessage .anchor{width:0!important;height:0!important;border-color:transparent;border-style:solid;z-index:1000;border-width:8px;position:absolute;left:2px}.monaco-editor .monaco-editor-overlaymessage .anchor.top{border-bottom-color:var(--vscode-inputValidation-infoBorder)}.monaco-editor .monaco-editor-overlaymessage .anchor.below{border-top-color:var(--vscode-inputValidation-infoBorder)}.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,.monaco-editor .monaco-editor-overlaymessage.below .anchor.below{display:none}.monaco-editor .monaco-editor-overlaymessage.below .anchor.top{display:inherit;top:-8px}.monaco-editor .rendered-markdown kbd{background-color:var(--vscode-keybindingLabel-background);color:var(--vscode-keybindingLabel-foreground);border-style:solid;border-width:1px;border-radius:3px;border-color:var(--vscode-keybindingLabel-border);border-bottom-color:var(--vscode-keybindingLabel-bottomBorder);box-shadow:inset 0 -1px 0 var(--vscode-widget-shadow);vertical-align:middle;padding:1px 3px}.action-widget{font-size:13px;min-width:160px;max-width:80vw;z-index:40;display:block;width:100%;border:1px solid var(--vscode-editorWidget-border)!important;border-radius:2px;background-color:var(--vscode-editorWidget-background);color:var(--vscode-editorWidget-foreground)}.context-view-block{position:fixed;cursor:initial;left:0;top:0;width:100%;height:100%;z-index:-1}.context-view-pointerBlock{position:fixed;cursor:initial;left:0;top:0;width:100%;height:100%;z-index:2}.action-widget .monaco-list{user-select:none;-webkit-user-select:none;border:none!important;border-width:0!important}.action-widget .monaco-list:focus:before{outline:0!important}.action-widget .monaco-list .monaco-scrollable-element{overflow:visible}.action-widget .monaco-list .monaco-list-row{padding:0 10px;white-space:nowrap;cursor:pointer;touch-action:none;width:100%}.action-widget .monaco-list .monaco-list-row.action.focused:not(.option-disabled){background-color:var(--vscode-quickInputList-focusBackground)!important;color:var(--vscode-quickInputList-focusForeground);outline:1px solid var(--vscode-menu-selectionBorder, transparent);outline-offset:-1px}.action-widget .monaco-list-row.group-header{color:var(--vscode-descriptionForeground)!important;font-weight:600}.action-widget .monaco-list .group-header,.action-widget .monaco-list .option-disabled,.action-widget .monaco-list .option-disabled:before,.action-widget .monaco-list .option-disabled .focused,.action-widget .monaco-list .option-disabled .focused:before{cursor:default!important;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;background-color:transparent!important;outline:0 solid!important}.action-widget .monaco-list-row.action{display:flex;gap:6px;align-items:center}.action-widget .monaco-list-row.action.option-disabled,.action-widget .monaco-list:focus .monaco-list-row.focused.action.option-disabled,.action-widget .monaco-list-row.action.option-disabled .codicon,.action-widget .monaco-list:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused).option-disabled{color:var(--vscode-disabledForeground)}.action-widget .monaco-list-row.action:not(.option-disabled) .codicon{color:inherit}.action-widget .monaco-list-row.action .title{flex:1;overflow:hidden;text-overflow:ellipsis}.action-widget .action-widget-action-bar{background-color:var(--vscode-editorHoverWidget-statusBarBackground);border-top:1px solid var(--vscode-editorHoverWidget-border)}.action-widget .action-widget-action-bar:before{display:block;content:"";width:100%}.action-widget .action-widget-action-bar .actions-container{padding:0 8px}.action-widget-action-bar .action-label{color:var(--vscode-textLink-activeForeground);font-size:12px;line-height:22px;padding:0;pointer-events:all}.action-widget-action-bar .action-item{margin-right:16px;pointer-events:none}.action-widget-action-bar .action-label:hover{background-color:transparent!important}.monaco-action-bar .actions-container.highlight-toggled .action-label.checked{background:var(--vscode-actionBar-toggledBackground)!important}.monaco-editor .codelens-decoration{overflow:hidden;display:inline-block;text-overflow:ellipsis;white-space:nowrap;color:var(--vscode-editorCodeLens-foreground);line-height:var(--vscode-editorCodeLens-lineHeight);font-size:var(--vscode-editorCodeLens-fontSize);padding-right:calc(var(--vscode-editorCodeLens-fontSize)*.5);font-feature-settings:var(--vscode-editorCodeLens-fontFeatureSettings);font-family:var(--vscode-editorCodeLens-fontFamily),var(--vscode-editorCodeLens-fontFamilyDefault)}.monaco-editor .codelens-decoration>span,.monaco-editor .codelens-decoration>a{user-select:none;-webkit-user-select:none;white-space:nowrap;vertical-align:sub}.monaco-editor .codelens-decoration>a{text-decoration:none}.monaco-editor .codelens-decoration>a:hover{cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .codelens-decoration>a:hover .codicon{color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .codelens-decoration .codicon{vertical-align:middle;color:currentColor!important;color:var(--vscode-editorCodeLens-foreground);line-height:var(--vscode-editorCodeLens-lineHeight);font-size:var(--vscode-editorCodeLens-fontSize)}.monaco-editor .codelens-decoration>a:hover .codicon:before{cursor:pointer}@keyframes fadein{0%{opacity:0;visibility:visible}to{opacity:1}}.monaco-editor .codelens-decoration.fadein{animation:fadein .1s linear}.colorpicker-widget{height:190px;user-select:none;-webkit-user-select:none}.colorpicker-color-decoration,.hc-light .colorpicker-color-decoration{border:solid .1em #000;box-sizing:border-box;margin:.1em .2em 0;width:.8em;height:.8em;line-height:.8em;display:inline-block;cursor:pointer}.hc-black .colorpicker-color-decoration,.vs-dark .colorpicker-color-decoration{border:solid .1em #eee}.colorpicker-header{display:flex;height:24px;position:relative;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-header .picked-color{width:240px;display:flex;align-items:center;justify-content:center;line-height:24px;cursor:pointer;color:#fff;flex:1;white-space:nowrap;overflow:hidden}.colorpicker-header .picked-color .picked-color-presentation{white-space:nowrap;margin-left:5px;margin-right:5px}.colorpicker-header .picked-color .codicon{color:inherit;font-size:14px}.colorpicker-header .picked-color.light{color:#000}.colorpicker-header .original-color{width:74px;z-index:inherit;cursor:pointer}.standalone-colorpicker{color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.colorpicker-header.standalone-colorpicker{border-bottom:none}.colorpicker-header .close-button{cursor:pointer;background-color:var(--vscode-editorHoverWidget-background);border-left:1px solid var(--vscode-editorHoverWidget-border)}.colorpicker-header .close-button-inner-div{width:100%;height:100%;text-align:center}.colorpicker-header .close-button-inner-div:hover{background-color:var(--vscode-toolbar-hoverBackground)}.colorpicker-header .close-icon{padding:3px}.colorpicker-body{display:flex;padding:8px;position:relative}.colorpicker-body .saturation-wrap{overflow:hidden;height:150px;position:relative;min-width:220px;flex:1}.colorpicker-body .saturation-box{height:150px;position:absolute}.colorpicker-body .saturation-selection{width:9px;height:9px;margin:-5px 0 0 -5px;border:1px solid rgb(255,255,255);border-radius:100%;box-shadow:0 0 2px #000c;position:absolute}.colorpicker-body .strip{width:25px;height:150px}.colorpicker-body .standalone-strip{width:25px;height:122px}.colorpicker-body .hue-strip{position:relative;margin-left:8px;cursor:grab;background:linear-gradient(to bottom,red,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red)}.colorpicker-body .opacity-strip{position:relative;margin-left:8px;cursor:grab;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-body .strip.grabbing{cursor:grabbing}.colorpicker-body .slider{position:absolute;top:0;left:-2px;width:calc(100% + 4px);height:4px;box-sizing:border-box;border:1px solid rgba(255,255,255,.71);box-shadow:0 0 1px #000000d9}.colorpicker-body .strip .overlay{height:150px;pointer-events:none}.colorpicker-body .standalone-strip .standalone-overlay{height:122px;pointer-events:none}.standalone-colorpicker-body{display:block;border:1px solid transparent;border-bottom:1px solid var(--vscode-editorHoverWidget-border);overflow:hidden}.colorpicker-body .insert-button{position:absolute;height:20px;width:58px;padding:0;right:8px;bottom:8px;background:var(--vscode-button-background);color:var(--vscode-button-foreground);border-radius:2px;border:none;cursor:pointer}.colorpicker-body .insert-button:hover{background:var(--vscode-button-hoverBackground)}.monaco-editor .goto-definition-link{text-decoration:underline;cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .peekview-widget .head{box-sizing:border-box;display:flex;justify-content:space-between;flex-wrap:nowrap}.monaco-editor .peekview-widget .head .peekview-title{display:flex;align-items:baseline;font-size:13px;margin-left:20px;min-width:0;text-overflow:ellipsis;overflow:hidden}.monaco-editor .peekview-widget .head .peekview-title.clickable{cursor:pointer}.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty){font-size:.9em;margin-left:.5em}.monaco-editor .peekview-widget .head .peekview-title .meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.monaco-editor .peekview-widget .head .peekview-title .dirname,.monaco-editor .peekview-widget .head .peekview-title .filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty):before{content:"-";padding:0 .3em}.monaco-editor .peekview-widget .head .peekview-actions{flex:1;text-align:right;padding-right:2px}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar{display:inline-block}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar,.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar>.actions-container{height:100%}.monaco-editor .peekview-widget>.body{border-top:1px solid;position:relative}.monaco-editor .peekview-widget .head .peekview-title .codicon{margin-right:4px;align-self:center}.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon{color:inherit!important}.monaco-editor .zone-widget{position:absolute;z-index:10}.monaco-editor .zone-widget .zone-widget-container{border-top-style:solid;border-bottom-style:solid;border-top-width:0;border-bottom-width:0;position:relative}.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget{border-top-width:1px;border-bottom-width:1px}.monaco-editor .reference-zone-widget .inline{display:inline-block;vertical-align:top}.monaco-editor .reference-zone-widget .messages{height:100%;width:100%;text-align:center;padding:3em 0}.monaco-editor .reference-zone-widget .ref-tree{line-height:23px;background-color:var(--vscode-peekViewResult-background);color:var(--vscode-peekViewResult-lineForeground)}.monaco-editor .reference-zone-widget .ref-tree .reference{text-overflow:ellipsis;overflow:hidden}.monaco-editor .reference-zone-widget .ref-tree .reference-file{display:inline-flex;width:100%;height:100%;color:var(--vscode-peekViewResult-fileForeground)}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file{color:inherit!important}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows>.monaco-list-row.selected:not(.highlighted){background-color:var(--vscode-peekViewResult-selectionBackground);color:var(--vscode-peekViewResult-selectionForeground)!important}.monaco-editor .reference-zone-widget .ref-tree .reference-file .count{margin-right:12px;margin-left:auto}.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight{background-color:var(--vscode-peekViewResult-matchHighlightBackground)}.monaco-editor .reference-zone-widget .preview .reference-decoration{background-color:var(--vscode-peekViewEditor-matchHighlightBackground);border:2px solid var(--vscode-peekViewEditor-matchHighlightBorder);box-sizing:border-box}.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input{background-color:var(--vscode-peekViewEditor-background)}.monaco-editor .reference-zone-widget .preview .monaco-editor .margin{background-color:var(--vscode-peekViewEditorGutter-background)}.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file,.monaco-editor.hc-light .reference-zone-widget .ref-tree .reference-file{font-weight:700}.monaco-editor.hc-black .reference-zone-widget .ref-tree .referenceMatch .highlight,.monaco-editor.hc-light .reference-zone-widget .ref-tree .referenceMatch .highlight{border:1px dotted var(--vscode-contrastActiveBorder, transparent);box-sizing:border-box}.monaco-hover{cursor:default;position:absolute;overflow:hidden;user-select:text;-webkit-user-select:text;box-sizing:border-box;animation:fadein .1s linear;line-height:1.5em;white-space:var(--vscode-hover-whiteSpace, normal)}.monaco-hover.hidden{display:none}.monaco-hover a:hover:not(.disabled){cursor:pointer}.monaco-hover .hover-contents:not(.html-hover-contents){padding:4px 8px}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents){max-width:var(--vscode-hover-maxWidth, 500px);word-wrap:break-word}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents) hr{min-width:100%}.monaco-hover p,.monaco-hover .code,.monaco-hover ul,.monaco-hover h1,.monaco-hover h2,.monaco-hover h3,.monaco-hover h4,.monaco-hover h5,.monaco-hover h6{margin:8px 0}.monaco-hover h1,.monaco-hover h2,.monaco-hover h3,.monaco-hover h4,.monaco-hover h5,.monaco-hover h6{line-height:1.1}.monaco-hover code{font-family:var(--monaco-monospace-font)}.monaco-hover hr{box-sizing:border-box;border-left:0px;border-right:0px;margin:4px -8px -4px;height:1px}.monaco-hover p:first-child,.monaco-hover .code:first-child,.monaco-hover ul:first-child{margin-top:0}.monaco-hover p:last-child,.monaco-hover .code:last-child,.monaco-hover ul:last-child{margin-bottom:0}.monaco-hover ul,.monaco-hover ol{padding-left:20px}.monaco-hover li>p{margin-bottom:0}.monaco-hover li>ul{margin-top:0}.monaco-hover code{border-radius:3px;padding:0 .4em}.monaco-hover .monaco-tokenized-source{white-space:var(--vscode-hover-sourceWhiteSpace, pre-wrap)}.monaco-hover .hover-row.status-bar{font-size:12px;line-height:22px}.monaco-hover .hover-row.status-bar .info{font-style:italic;padding:0 8px}.monaco-hover .hover-row.status-bar .actions{display:flex;padding:0 8px}.monaco-hover .hover-row.status-bar .actions .action-container{margin-right:16px;cursor:pointer}.monaco-hover .hover-row.status-bar .actions .action-container .action .icon{padding-right:4px}.monaco-hover .markdown-hover .hover-contents .codicon{color:inherit;font-size:inherit;vertical-align:middle}.monaco-hover .hover-contents a.code-link:hover,.monaco-hover .hover-contents a.code-link{color:inherit}.monaco-hover .hover-contents a.code-link:before{content:"("}.monaco-hover .hover-contents a.code-link:after{content:")"}.monaco-hover .hover-contents a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under;color:var(--vscode-textLink-foreground)}.monaco-hover .hover-contents a.code-link>span:hover{color:var(--vscode-textLink-activeForeground)}.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span{margin-bottom:4px;display:inline-block}.monaco-hover-content .action-container a{-webkit-user-select:none;user-select:none}.monaco-hover-content .action-container.disabled{pointer-events:none;opacity:.4;cursor:default}.monaco-editor .peekview-widget .head .peekview-title .severity-icon{display:inline-block;vertical-align:text-top;margin-right:4px}.monaco-editor .marker-widget{text-overflow:ellipsis;white-space:nowrap}.monaco-editor .marker-widget>.stale{opacity:.6;font-style:italic}.monaco-editor .marker-widget .title{display:inline-block;padding-right:5px}.monaco-editor .marker-widget .descriptioncontainer{position:absolute;white-space:pre;user-select:text;-webkit-user-select:text;padding:8px 12px 0 20px}.monaco-editor .marker-widget .descriptioncontainer .message{display:flex;flex-direction:column}.monaco-editor .marker-widget .descriptioncontainer .message .details{padding-left:6px}.monaco-editor .marker-widget .descriptioncontainer .message .source,.monaco-editor .marker-widget .descriptioncontainer .message span.code{opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link{opacity:.6;color:inherit}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before{content:"("}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after{content:")"}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under;color:var(--vscode-textLink-foreground)}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link>span{color:var(--vscode-textLink-activeForeground)}.monaco-editor .marker-widget .descriptioncontainer .filename{cursor:pointer}.monaco-editor .zone-widget .codicon.codicon-error,.markers-panel .marker-icon.error,.markers-panel .marker-icon .codicon.codicon-error,.text-search-provider-messages .providerMessage .codicon.codicon-error,.extensions-viewlet>.extensions .codicon.codicon-error,.extension-editor .codicon.codicon-error,.preferences-editor .codicon.codicon-error{color:var(--vscode-problemsErrorIcon-foreground)}.monaco-editor .zone-widget .codicon.codicon-warning,.markers-panel .marker-icon.warning,.markers-panel .marker-icon .codicon.codicon-warning,.text-search-provider-messages .providerMessage .codicon.codicon-warning,.extensions-viewlet>.extensions .codicon.codicon-warning,.extension-editor .codicon.codicon-warning,.preferences-editor .codicon.codicon-warning{color:var(--vscode-problemsWarningIcon-foreground)}.monaco-editor .zone-widget .codicon.codicon-info,.markers-panel .marker-icon.info,.markers-panel .marker-icon .codicon.codicon-info,.text-search-provider-messages .providerMessage .codicon.codicon-info,.extensions-viewlet>.extensions .codicon.codicon-info,.extension-editor .codicon.codicon-info,.preferences-editor .codicon.codicon-info{color:var(--vscode-problemsInfoIcon-foreground)}.monaco-editor .inlineSuggestionsHints.withBorder{z-index:39;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor .inlineSuggestionsHints a,.monaco-editor .inlineSuggestionsHints a:hover{color:var(--vscode-foreground)}.monaco-editor .inlineSuggestionsHints .keybinding{display:flex;margin-left:4px;opacity:.6}.monaco-editor .inlineSuggestionsHints .keybinding .monaco-keybinding-key{font-size:8px;padding:2px 3px}.monaco-editor .inlineSuggestionsHints .availableSuggestionCount a{display:flex;min-width:19px;justify-content:center}.monaco-editor .inlineSuggestionStatusBarItemLabel{margin-right:2px}.monaco-editor .hoverHighlight{background-color:var(--vscode-editor-hoverHighlightBackground)}.monaco-editor .monaco-hover{color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border);border-radius:3px}.monaco-editor .monaco-hover a{color:var(--vscode-textLink-foreground)}.monaco-editor .monaco-hover a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor .monaco-hover .hover-row .actions{background-color:var(--vscode-editorHoverWidget-statusBarBackground)}.monaco-editor .monaco-hover code{background-color:var(--vscode-textCodeBlock-background)}.monaco-editor.vs .dnd-target,.monaco-editor.hc-light .dnd-target{border-right:2px dotted black;color:#fff}.monaco-editor.vs-dark .dnd-target{border-right:2px dotted #AEAFAD;color:#51504f}.monaco-editor.hc-black .dnd-target{border-right:2px dotted #fff;color:#000}.monaco-editor.mouse-default .view-lines,.monaco-editor.vs-dark.mac.mouse-default .view-lines,.monaco-editor.hc-black.mac.mouse-default .view-lines,.monaco-editor.hc-light.mac.mouse-default .view-lines{cursor:default}.monaco-editor.mouse-copy .view-lines,.monaco-editor.vs-dark.mac.mouse-copy .view-lines,.monaco-editor.hc-black.mac.mouse-copy .view-lines,.monaco-editor.hc-light.mac.mouse-copy .view-lines{cursor:copy}.inline-editor-progress-decoration{display:inline-block;width:1em;height:1em}.inline-progress-widget{display:flex!important;justify-content:center;align-items:center}.inline-progress-widget .icon{font-size:80%!important}.inline-progress-widget:hover .icon{font-size:90%!important;animation:none}.inline-progress-widget:hover .icon:before{content:""}.post-edit-widget{box-shadow:0 0 8px 2px var(--vscode-widget-shadow);border:1px solid var(--vscode-widget-border, transparent);border-radius:4px;background-color:var(--vscode-editorWidget-background);overflow:hidden}.post-edit-widget .monaco-button{padding:2px;border:none;border-radius:0}.post-edit-widget .monaco-button:hover{background-color:var(--vscode-button-secondaryHoverBackground)!important}.post-edit-widget .monaco-button .codicon{margin:0}.monaco-editor .findOptionsWidget{background-color:var(--vscode-editorWidget-background);color:var(--vscode-editorWidget-foreground);box-shadow:0 0 8px 2px var(--vscode-widget-shadow);border:2px solid var(--vscode-contrastBorder)}.monaco-editor .find-widget{position:absolute;z-index:35;height:33px;overflow:hidden;line-height:19px;transition:transform .2s linear;padding:0 4px;box-sizing:border-box;transform:translateY(calc(-100% - 10px));border-bottom-left-radius:4px;border-bottom-right-radius:4px}.monaco-workbench.reduce-motion .monaco-editor .find-widget{transition:transform 0ms linear}.monaco-editor .find-widget textarea{margin:0}.monaco-editor .find-widget.hiddenEditor{display:none}.monaco-editor .find-widget.replaceToggled>.replace-part{display:flex}.monaco-editor .find-widget.visible{transform:translateY(0)}.monaco-editor .find-widget .monaco-inputbox.synthetic-focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-editor .find-widget .monaco-inputbox .input{background-color:transparent;min-height:0}.monaco-editor .find-widget .monaco-findInput .input{font-size:13px}.monaco-editor .find-widget>.find-part,.monaco-editor .find-widget>.replace-part{margin:3px 25px 0 17px;font-size:12px;display:flex}.monaco-editor .find-widget>.find-part .monaco-inputbox,.monaco-editor .find-widget>.replace-part .monaco-inputbox{min-height:25px}.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-right:22px}.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.mirror,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-top:2px;padding-bottom:2px}.monaco-editor .find-widget>.find-part .find-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget>.replace-part .replace-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget .monaco-findInput{vertical-align:middle;display:flex;flex:1}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element{width:100%}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical{opacity:0}.monaco-editor .find-widget .matchesCount{display:flex;flex:initial;margin:0 0 0 3px;padding:2px 0 0 2px;height:25px;vertical-align:middle;box-sizing:border-box;text-align:center;line-height:23px}.monaco-editor .find-widget .button{width:16px;height:16px;padding:3px;border-radius:5px;flex:initial;margin-left:3px;background-position:center center;background-repeat:no-repeat;cursor:pointer;display:flex;align-items:center;justify-content:center}.monaco-editor .find-widget .codicon-find-selection{width:22px;height:22px;padding:3px;border-radius:5px}.monaco-editor .find-widget .button.left{margin-left:0;margin-right:3px}.monaco-editor .find-widget .button.wide{width:auto;padding:1px 6px;top:-1px}.monaco-editor .find-widget .button.toggle{position:absolute;top:0;left:3px;width:18px;height:100%;border-radius:0;box-sizing:border-box}.monaco-editor .find-widget .button.toggle.disabled{display:none}.monaco-editor .find-widget .disabled{color:var(--vscode-disabledForeground);cursor:default}.monaco-editor .find-widget>.replace-part{display:none}.monaco-editor .find-widget>.replace-part>.monaco-findInput{position:relative;display:flex;vertical-align:middle;flex:auto;flex-grow:0;flex-shrink:0}.monaco-editor .find-widget>.replace-part>.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.monaco-editor .find-widget.reduced-find-widget .matchesCount{display:none}.monaco-editor .find-widget.narrow-find-widget{max-width:257px!important}.monaco-editor .find-widget.collapsed-find-widget{max-width:170px!important}.monaco-editor .find-widget.collapsed-find-widget .button.previous,.monaco-editor .find-widget.collapsed-find-widget .button.next,.monaco-editor .find-widget.collapsed-find-widget .button.replace,.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,.monaco-editor .find-widget.collapsed-find-widget>.find-part .monaco-findInput .controls{display:none}.monaco-editor .findMatch{animation-duration:0;animation-name:inherit!important}.monaco-editor .find-widget .monaco-sash{left:0!important}.monaco-editor.hc-black .find-widget .button:before{position:relative;top:1px;left:2px}.monaco-editor .find-widget>.button.codicon-widget-close{position:absolute;top:5px;right:4px}.monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,.monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,.monaco-editor .margin-view-overlays .codicon-folding-expanded,.monaco-editor .margin-view-overlays .codicon-folding-collapsed{cursor:pointer;opacity:0;transition:opacity .5s;display:flex;align-items:center;justify-content:center;font-size:140%;margin-left:2px}.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-expanded,.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-collapsed{transition:initial}.monaco-editor .margin-view-overlays:hover .codicon,.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,.monaco-editor .margin-view-overlays .codicon.codicon-folding-manual-collapsed,.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons{opacity:1}.monaco-editor .inline-folded:after{color:gray;margin:.1em .2em 0;content:"⋯";display:inline;line-height:1em;cursor:pointer}.monaco-editor .folded-background{background-color:var(--vscode-editor-foldBackground)}.monaco-editor .cldr.codicon.codicon-folding-expanded,.monaco-editor .cldr.codicon.codicon-folding-collapsed,.monaco-editor .cldr.codicon.codicon-folding-manual-expanded,.monaco-editor .cldr.codicon.codicon-folding-manual-collapsed{color:var(--vscode-editorGutter-foldingControlForeground)!important}.monaco-editor .suggest-preview-additional-widget{white-space:nowrap}.monaco-editor .suggest-preview-additional-widget .content-spacer{color:transparent;white-space:pre}.monaco-editor .suggest-preview-additional-widget .button{display:inline-block;cursor:pointer;text-decoration:underline;text-underline-position:under}.monaco-editor .ghost-text-hidden{opacity:0;font-size:0}.monaco-editor .ghost-text-decoration,.monaco-editor .suggest-preview-text .ghost-text{font-style:italic}.monaco-editor .inline-completion-text-to-replace{text-decoration:underline;text-underline-position:under}.monaco-editor .ghost-text-decoration,.monaco-editor .ghost-text-decoration-preview,.monaco-editor .suggest-preview-text .ghost-text{color:var(--vscode-editorGhostText-foreground)!important;background-color:var(--vscode-editorGhostText-background);border:1px solid var(--vscode-editorGhostText-border)}.monaco-editor .snippet-placeholder{min-width:2px;outline-style:solid;outline-width:1px;background-color:var(--vscode-editor-snippetTabstopHighlightBackground, transparent);outline-color:var(--vscode-editor-snippetTabstopHighlightBorder, transparent)}.monaco-editor .finish-snippet-placeholder{outline-style:solid;outline-width:1px;background-color:var(--vscode-editor-snippetFinalTabstopHighlightBackground, transparent);outline-color:var(--vscode-editor-snippetFinalTabstopHighlightBorder, transparent)}.monaco-editor .suggest-widget{width:430px;z-index:40;display:flex;flex-direction:column;border-radius:3px}.monaco-editor .suggest-widget.message{flex-direction:row;align-items:center}.monaco-editor .suggest-widget,.monaco-editor .suggest-details{flex:0 1 auto;width:100%;border-style:solid;border-width:1px;border-color:var(--vscode-editorSuggestWidget-border);background-color:var(--vscode-editorSuggestWidget-background)}.monaco-editor.hc-black .suggest-widget,.monaco-editor.hc-black .suggest-details,.monaco-editor.hc-light .suggest-widget,.monaco-editor.hc-light .suggest-details{border-width:2px}.monaco-editor .suggest-widget .suggest-status-bar{box-sizing:border-box;display:none;flex-flow:row nowrap;justify-content:space-between;width:100%;font-size:80%;padding:0 4px;border-top:1px solid var(--vscode-editorSuggestWidget-border);overflow:hidden}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar{display:flex}.monaco-editor .suggest-widget .suggest-status-bar .left{padding-right:8px}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label{color:var(--vscode-editorSuggestWidgetStatus-foreground)}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label{margin-right:0}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label:after{content:", ";margin-right:.3em}.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:100%}.monaco-editor .suggest-widget>.message{padding-left:22px}.monaco-editor .suggest-widget>.tree{height:100%;width:100%}.monaco-editor .suggest-widget .monaco-list{user-select:none;-webkit-user-select:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row{display:flex;-mox-box-sizing:border-box;box-sizing:border-box;padding-right:10px;background-repeat:no-repeat;background-position:2px 2px;white-space:nowrap;cursor:pointer;touch-action:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused{color:var(--vscode-editorSuggestWidget-selectedForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon{color:var(--vscode-editorSuggestWidget-selectedIconForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents{flex:1;height:100%;overflow:hidden;padding-left:2px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main{display:flex;overflow:hidden;text-overflow:ellipsis;white-space:pre;justify-content:space-between}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{display:flex}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.focused)>.contents>.main .monaco-icon-label{color:var(--vscode-editorSuggestWidget-foreground)}.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight{font-weight:700}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main .monaco-highlighted-label .highlight{color:var(--vscode-editorSuggestWidget-highlightForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused>.contents>.main .monaco-highlighted-label .highlight{color:var(--vscode-editorSuggestWidget-focusHighlightForeground)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:before{color:inherit;opacity:1;font-size:14px;cursor:pointer}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close{position:absolute;top:6px;right:2px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover{opacity:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{opacity:.7}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label{overflow:hidden;text-overflow:ellipsis;opacity:.6}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label{margin-left:12px;opacity:.4;font-size:85%;line-height:initial;text-overflow:ellipsis;overflow:hidden;align-self:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{font-size:85%;margin-left:1.1em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{display:none}.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right.can-expand-details>.details-label{width:calc(100% - 26px)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left{flex-shrink:1;flex-grow:1;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label{flex-shrink:0}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label{max-width:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label{flex-shrink:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{overflow:hidden;flex-shrink:4;max-width:70%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:inline-block;position:absolute;right:10px;width:18px;height:18px;visibility:hidden}.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none!important}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:inline-block}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right>.readMore{visibility:visible}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated{opacity:.66;text-decoration:unset}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container{text-decoration:line-through}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label:before{height:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon{display:block;height:16px;width:16px;margin-left:2px;background-repeat:no-repeat;background-size:80%;background-position:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon{display:flex;align-items:center;margin-right:4px}.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon:before{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan{margin:0 0 0 .3em;border:.1em solid #000;width:.7em;height:.7em;display:inline-block}.monaco-editor .suggest-details-container{z-index:41}.monaco-editor .suggest-details{display:flex;flex-direction:column;cursor:default;color:var(--vscode-editorSuggestWidget-foreground)}.monaco-editor .suggest-details.focused{border-color:var(--vscode-focusBorder)}.monaco-editor .suggest-details a{color:var(--vscode-textLink-foreground)}.monaco-editor .suggest-details a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor .suggest-details code{background-color:var(--vscode-textCodeBlock-background)}.monaco-editor .suggest-details.no-docs{display:none}.monaco-editor .suggest-details>.monaco-scrollable-element{flex:1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body{box-sizing:border-box;height:100%;width:100%}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type{flex:2;overflow:hidden;text-overflow:ellipsis;opacity:.7;white-space:pre;margin:0 24px 0 0;padding:4px 0 12px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap{white-space:normal;word-break:break-all}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs{margin:0;padding:4px 5px;white-space:pre-wrap}.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs{margin-right:24px;overflow:hidden}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs{padding:0;white-space:initial;min-height:calc(1rem + 8px)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty){padding:4px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child{margin-top:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child{margin-bottom:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .monaco-tokenized-source{white-space:pre}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code{white-space:pre-wrap;word-wrap:break-word}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon{vertical-align:sub}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty{display:none}.monaco-editor .suggest-details code{border-radius:3px;padding:0 .4em}.monaco-editor .suggest-details ul,.monaco-editor .suggest-details ol{padding-left:20px}.monaco-editor .suggest-details p code{font-family:var(--monaco-monospace-font)}.monaco-editor.vs .valueSetReplacement{outline:solid 2px var(--vscode-editorBracketMatch-border)}.monaco-editor .linked-editing-decoration{background-color:var(--vscode-editor-linkedEditingBackground);min-width:1px}.monaco-editor .detected-link,.monaco-editor .detected-link-active{text-decoration:underline;text-underline-position:under}.monaco-editor .detected-link-active{cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .focused .selectionHighlight{background-color:var(--vscode-editor-selectionHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-selectionHighlightBorder)}.monaco-editor.hc-black .focused .selectionHighlight,.monaco-editor.hc-light .focused .selectionHighlight{border-style:dotted}.monaco-editor .wordHighlight{background-color:var(--vscode-editor-wordHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-wordHighlightBorder)}.monaco-editor.hc-black .wordHighlight,.monaco-editor.hc-light .wordHighlight{border-style:dotted}.monaco-editor .wordHighlightStrong{background-color:var(--vscode-editor-wordHighlightStrongBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-wordHighlightStrongBorder)}.monaco-editor.hc-black .wordHighlightStrong,.monaco-editor.hc-light .wordHighlightStrong{border-style:dotted}.monaco-editor .wordHighlightText{background-color:var(--vscode-editor-wordHighlightTextBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-wordHighlightTextBorder)}.monaco-editor.hc-black .wordHighlightText,.monaco-editor.hc-light .wordHighlightText{border-style:dotted}.monaco-editor .parameter-hints-widget{z-index:39;display:flex;flex-direction:column;line-height:1.5em;cursor:default;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.hc-black .monaco-editor .parameter-hints-widget,.hc-light .monaco-editor .parameter-hints-widget{border-width:2px}.monaco-editor .parameter-hints-widget>.phwrapper{max-width:440px;display:flex;flex-direction:row}.monaco-editor .parameter-hints-widget.multiple{min-height:3.3em;padding:0}.monaco-editor .parameter-hints-widget.multiple .body:before{content:"";display:block;height:100%;position:absolute;opacity:.5;border-left:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor .parameter-hints-widget p,.monaco-editor .parameter-hints-widget ul{margin:8px 0}.monaco-editor .parameter-hints-widget .monaco-scrollable-element,.monaco-editor .parameter-hints-widget .body{display:flex;flex:1;flex-direction:column;min-height:100%}.monaco-editor .parameter-hints-widget .signature{padding:4px 5px;position:relative}.monaco-editor .parameter-hints-widget .signature.has-docs:after{content:"";display:block;position:absolute;left:0;width:100%;padding-top:4px;opacity:.5;border-bottom:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor .parameter-hints-widget .docs{padding:0 10px 0 5px;white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs.empty{display:none}.monaco-editor .parameter-hints-widget .docs a{color:var(--vscode-textLink-foreground)}.monaco-editor .parameter-hints-widget .docs a:hover{color:var(--vscode-textLink-activeForeground);cursor:pointer}.monaco-editor .parameter-hints-widget .docs .markdown-docs{white-space:initial}.monaco-editor .parameter-hints-widget .docs code{font-family:var(--monaco-monospace-font);border-radius:3px;padding:0 .4em;background-color:var(--vscode-textCodeBlock-background)}.monaco-editor .parameter-hints-widget .docs .monaco-tokenized-source,.monaco-editor .parameter-hints-widget .docs .code{white-space:pre-wrap}.monaco-editor .parameter-hints-widget .controls{display:none;flex-direction:column;align-items:center;min-width:22px;justify-content:flex-end}.monaco-editor .parameter-hints-widget.multiple .controls{display:flex;padding:0 2px}.monaco-editor .parameter-hints-widget.multiple .button{width:16px;height:16px;background-repeat:no-repeat;cursor:pointer}.monaco-editor .parameter-hints-widget .button.previous{bottom:24px}.monaco-editor .parameter-hints-widget .overloads{text-align:center;height:12px;line-height:12px;font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .signature .parameter.active{color:var(--vscode-editorHoverWidget-highlightForeground);font-weight:700}.monaco-editor .parameter-hints-widget .documentation-parameter>.parameter{font-weight:700;margin-right:.5em}.monaco-editor .rename-box{z-index:100;color:inherit;border-radius:4px}.monaco-editor .rename-box.preview{padding:4px 4px 0}.monaco-editor .rename-box .rename-input{padding:3px;border-radius:2px}.monaco-editor .rename-box .rename-label{display:none;opacity:.8}.monaco-editor .rename-box.preview .rename-label{display:inherit}.monaco-editor .sticky-widget{overflow:hidden}.monaco-editor .sticky-widget-line-numbers{float:left;background-color:inherit}.monaco-editor .sticky-widget-lines-scrollable{display:inline-block;position:absolute;overflow:hidden;width:var(--vscode-editorStickyScroll-scrollableWidth);background-color:inherit}.monaco-editor .sticky-widget-lines{position:absolute;background-color:inherit}.monaco-editor .sticky-line-number,.monaco-editor .sticky-line-content{color:var(--vscode-editorLineNumber-foreground);white-space:nowrap;display:inline-block;position:absolute;background-color:inherit}.monaco-editor .sticky-line-number .codicon-folding-expanded,.monaco-editor .sticky-line-number .codicon-folding-collapsed{float:right;transition:var(--vscode-editorStickyScroll-foldingOpacityTransition)}.monaco-editor .sticky-line-content{width:var(--vscode-editorStickyScroll-scrollableWidth);background-color:inherit;white-space:nowrap}.monaco-editor .sticky-line-number-inner{display:inline-block;text-align:right}.monaco-editor.hc-black .sticky-widget,.monaco-editor.hc-light .sticky-widget{border-bottom:1px solid var(--vscode-contrastBorder)}.monaco-editor .sticky-line-content:hover{background-color:var(--vscode-editorStickyScrollHover-background);cursor:pointer}.monaco-editor .sticky-widget{width:100%;box-shadow:var(--vscode-scrollbar-shadow) 0 3px 2px -2px;z-index:4;background-color:var(--vscode-editorStickyScroll-background)}.monaco-editor .sticky-widget.peek{background-color:var(--vscode-peekViewEditorStickyScroll-background)}.monaco-editor .unicode-highlight{border:1px solid var(--vscode-editorUnicodeHighlight-border);background-color:var(--vscode-editorUnicodeHighlight-background);box-sizing:border-box}.editor-banner{box-sizing:border-box;cursor:default;width:100%;font-size:12px;display:flex;overflow:visible;height:26px;background:var(--vscode-banner-background)}.editor-banner .icon-container{display:flex;flex-shrink:0;align-items:center;padding:0 6px 0 10px}.editor-banner .icon-container.custom-icon{background-repeat:no-repeat;background-position:center center;background-size:16px;width:16px;padding:0;margin:0 6px 0 10px}.editor-banner .message-container{display:flex;align-items:center;line-height:26px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.editor-banner .message-container p{margin-block-start:0;margin-block-end:0}.editor-banner .message-actions-container{flex-grow:1;flex-shrink:0;line-height:26px;margin:0 4px}.editor-banner .message-actions-container a.monaco-button{width:inherit;margin:2px 8px;padding:0 12px}.editor-banner .message-actions-container a{padding:3px;margin-left:12px;text-decoration:underline}.editor-banner .action-container{padding:0 10px 0 6px}.editor-banner{background-color:var(--vscode-banner-background)}.editor-banner,.editor-banner .action-container .codicon,.editor-banner .message-actions-container .monaco-link{color:var(--vscode-banner-foreground)}.editor-banner .icon-container .codicon{color:var(--vscode-banner-iconForeground)}.monaco-link{color:var(--vscode-textLink-foreground)}.monaco-link:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor .iPadShowKeyboard{width:58px;min-width:0;height:36px;min-height:0;margin:0;padding:0;position:absolute;resize:none;overflow:hidden;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjNDI0MjQyIi8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #F6F6F6;border-radius:4px}.monaco-editor.vs-dark .iPadShowKeyboard{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjQzVDNUM1Ii8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #252526}.monaco-editor .tokens-inspect-widget{z-index:50;user-select:text;-webkit-user-select:text;padding:10px;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor.hc-black .tokens-inspect-widget,.monaco-editor.hc-light .tokens-inspect-widget{border-width:2px}.monaco-editor .tokens-inspect-widget .tokens-inspect-separator{height:1px;border:0;background-color:var(--vscode-editorHoverWidget-border)}.monaco-editor .tokens-inspect-widget .tm-token{font-family:var(--monaco-monospace-font)}.monaco-editor .tokens-inspect-widget .tm-token-length{font-weight:400;font-size:60%;float:right}.monaco-editor .tokens-inspect-widget .tm-metadata-table{width:100%}.monaco-editor .tokens-inspect-widget .tm-metadata-value{font-family:var(--monaco-monospace-font);text-align:right}.monaco-editor .tokens-inspect-widget .tm-token-type{font-family:var(--monaco-monospace-font)}.monaco-editor-container[data-v-df421d9b]{position:relative;border:none;border-radius:0;overflow:hidden;background:#ffffff0d}.editor-wrapper[data-v-df421d9b]{height:100%;min-height:300px}[data-v-df421d9b] .monaco-editor{border-radius:0}[data-v-df421d9b] .monaco-editor .margin{background-color:#ffffff0d!important}[data-v-df421d9b] .monaco-editor .line-numbers{color:#9ca3afcc!important}[data-v-df421d9b] .monaco-editor .current-line{background-color:#37415180!important}[data-v-df421d9b] .monaco-editor .selection{background-color:#3b82f64d!important}[data-v-df421d9b] .monaco-editor .cursor{border-left-color:#f9fafbe6!important}[data-v-df421d9b] .monaco-editor .scrollbar .slider{background-color:#9ca3af4d!important}[data-v-df421d9b] .monaco-editor .scrollbar .slider:hover{background-color:#9ca3af80!important}[data-v-df421d9b] .monaco-editor .scrollbar .slider.active{background-color:#9ca3afb3!important}.mcp-config-form[data-v-7a2b7153]{width:100%}.form-item[data-v-7a2b7153]{margin-bottom:20px}.form-item label[data-v-7a2b7153]{display:block;margin-bottom:8px;font-weight:500;color:#e5e7eb}.required[data-v-7a2b7153]{color:#ef4444}.config-input[data-v-7a2b7153],.config-textarea[data-v-7a2b7153]{width:100%;padding:12px;border:1px solid rgba(255,255,255,.1);border-radius:4px;background:#ffffff0d;color:#ffffffe6;font-size:14px;transition:all .3s}.config-input[data-v-7a2b7153]:focus,.config-textarea[data-v-7a2b7153]:focus{outline:none;border-color:#667eea80;background:#ffffff14}.config-textarea[data-v-7a2b7153]{resize:vertical;min-height:80px}.config-input[data-v-7a2b7153]::placeholder,.config-textarea[data-v-7a2b7153]::placeholder{color:#fff6}.usage-instructions[data-v-7a2b7153]{margin-top:24px;padding:16px;background:#ffffff08;border:1px solid rgba(102,126,234,.5);border-radius:8px;box-shadow:0 2px 8px #0000001a;position:relative}.usage-instructions[data-v-7a2b7153]:before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:#667eeacc;border-radius:8px 8px 0 0}.instructions-header[data-v-7a2b7153]{display:flex;align-items:center;gap:8px;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid rgba(255,255,255,.1)}.instructions-icon[data-v-7a2b7153]{font-size:16px;color:#667eea}.instructions-header h4[data-v-7a2b7153]{margin:0;font-size:16px;font-weight:600;color:#ffffffe6}.instructions-content[data-v-7a2b7153]{color:#fffc;line-height:1.5;font-size:14px}.instructions-list[data-v-7a2b7153]{margin:0;padding-left:16px}.instructions-list>li[data-v-7a2b7153]{margin-bottom:12px;position:relative;padding-left:4px}.instructions-list>li[data-v-7a2b7153]::marker{color:#667eea;font-weight:600;font-size:14px}.instructions-list>li[data-v-7a2b7153]:last-child{margin-bottom:0}.instructions-list strong[data-v-7a2b7153]{color:#fffffff2;font-weight:600;display:block;margin-bottom:6px;font-size:14px}.instructions-list ul[data-v-7a2b7153]{margin:6px 0 0;padding-left:16px;list-style-type:disc}.instructions-list ul li[data-v-7a2b7153]{margin-bottom:3px;color:#ffffffbf;font-size:13px;line-height:1.4}.instructions-list ul li strong[data-v-7a2b7153]{color:#ffffffe6;font-weight:500;display:inline;margin-bottom:0}.instructions-list code[data-v-7a2b7153]{background:#667eea26;color:#a8b3ff;padding:1px 4px;border-radius:3px;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px;border:1px solid rgba(102,126,234,.2)}@media (max-width: 768px){.usage-instructions[data-v-7a2b7153]{margin-top:20px;padding:12px}.instructions-header h4[data-v-7a2b7153]{font-size:15px}.instructions-content[data-v-7a2b7153]{font-size:13px}.instructions-list[data-v-7a2b7153]{padding-left:12px}.instructions-list>li[data-v-7a2b7153]{margin-bottom:10px}.instructions-list ul li[data-v-7a2b7153]{font-size:12px}}.tab-panel[data-v-dd5c9237]{width:100%}.tab-header[data-v-dd5c9237]{display:flex;border-bottom:1px solid rgba(255,255,255,.1);margin-bottom:16px}.tab-button[data-v-dd5c9237]{padding:8px 16px;background:none;border:none;border-bottom:2px solid transparent;color:#fff9;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s ease}.tab-button[data-v-dd5c9237]:hover{color:#fffc;background-color:#ffffff0d}.tab-button.active[data-v-dd5c9237]{color:#3b82f6;border-bottom-color:#3b82f6;background-color:#ffffff08}.tab-content[data-v-dd5c9237]{min-height:200px;background-color:#ffffff08;border:1px solid rgba(255,255,255,.1);border-radius:4px;padding:16px}.tab-pane[data-v-dd5c9237]{width:100%}.json-import-panel[data-v-acbd9f22]{height:100%;display:flex;flex-direction:column}.form-item[data-v-acbd9f22]{flex:1;display:flex;flex-direction:column}.json-tab-panel[data-v-acbd9f22]{margin-top:8px}.validation-errors[data-v-acbd9f22]{margin-top:12px;padding:12px;background:#ff00001a;border:1px solid rgba(255,0,0,.3);border-radius:4px}.error-item[data-v-acbd9f22]{color:#f44;font-size:14px;margin-bottom:4px}.error-item[data-v-acbd9f22]:last-child{margin-bottom:0}.example-json[data-v-acbd9f22]{margin:0;padding:12px;background:#ffffff08;overflow-x:auto;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:13px;line-height:1.4}.example-json code[data-v-acbd9f22]{color:#ffffffe6;background:none;padding:0;border:none;border-radius:0;font-family:inherit;font-size:inherit}.example-json .string[data-v-acbd9f22]{color:#a78bfa}.example-json .number[data-v-acbd9f22]{color:#fbbf24}.example-json .boolean[data-v-acbd9f22]{color:#f87171}.example-json .null[data-v-acbd9f22]{color:#fff9}.example-json .key[data-v-acbd9f22]{color:#34d399}.json-config-container[data-v-acbd9f22]{display:flex;flex-direction:column;height:100%}.usage-instructions[data-v-acbd9f22]{margin-top:16px;padding:16px;background:#ffffff08;border:1px solid rgba(102,126,234,.5);border-radius:8px;box-shadow:0 2px 8px #0000001a;position:relative}.usage-instructions[data-v-acbd9f22]:before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:#667eeacc;border-radius:8px 8px 0 0}.instructions-header[data-v-acbd9f22]{display:flex;align-items:center;gap:8px;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid rgba(255,255,255,.1)}.instructions-icon[data-v-acbd9f22]{font-size:16px;color:#667eea}.instructions-header h4[data-v-acbd9f22]{margin:0;font-size:16px;font-weight:600;color:#ffffffe6}.instructions-content[data-v-acbd9f22]{color:#fffc;line-height:1.5;font-size:14px}.instructions-list[data-v-acbd9f22]{margin:0;padding-left:16px}.instructions-list>li[data-v-acbd9f22]{margin-bottom:12px;position:relative;padding-left:4px}.instructions-list>li[data-v-acbd9f22]::marker{color:#667eea;font-weight:600;font-size:14px}.instructions-list>li[data-v-acbd9f22]:last-child{margin-bottom:0}.instructions-list strong[data-v-acbd9f22]{color:#fffffff2;font-weight:600;display:block;margin-bottom:6px;font-size:14px}.instructions-list ul[data-v-acbd9f22]{margin:6px 0 0;padding-left:16px;list-style-type:disc}.instructions-list ul li[data-v-acbd9f22]{margin-bottom:3px;color:#ffffffbf;font-size:13px;line-height:1.4}.instructions-list ul li strong[data-v-acbd9f22]{color:#ffffffe6;font-weight:500;display:inline;margin-bottom:0}.instructions-list code[data-v-acbd9f22]{background:#667eea26;color:#a8b3ff;padding:1px 4px;border-radius:3px;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px;border:1px solid rgba(102,126,234,.2)}.mcp-config-panel[data-v-05c331dc]{position:relative}.mcp-header[data-v-05c331dc]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.mcp-header h2[data-v-05c331dc]{margin:0;font-size:20px;font-weight:500}.header-left[data-v-05c331dc],.header-right[data-v-05c331dc]{display:flex;align-items:center}.mcp-stats[data-v-05c331dc]{display:flex;margin-left:16px;gap:12px}.stat-item[data-v-05c331dc]{display:flex;align-items:center;background:#ffffff0d;padding:4px 8px;border-radius:4px;font-size:12px}.stat-label[data-v-05c331dc]{color:#fff9;margin-right:4px}.stat-value[data-v-05c331dc]{color:#ffffffe6;font-weight:500}.loading-container[data-v-05c331dc]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#ffffffb3}.loading-spinner[data-v-05c331dc]{width:20px;height:20px;border:2px solid rgba(255,255,255,.3);border-top:2px solid #667eea;border-radius:50%;animation:spin-05c331dc 1s linear infinite;margin-bottom:16px}@keyframes spin-05c331dc{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.mcp-layout[data-v-05c331dc]{display:flex;gap:30px;flex:1;min-height:0}.server-list[data-v-05c331dc]{width:320px;flex-shrink:0;display:flex;flex-direction:column}.list-header[data-v-05c331dc]{display:flex;align-items:center;gap:8px;margin-bottom:16px}.list-header h3[data-v-05c331dc]{margin:0;font-size:18px}.server-count[data-v-05c331dc]{font-size:14px;color:#fff9}.search-box[data-v-05c331dc]{position:relative;margin-bottom:20px}.search-input[data-v-05c331dc]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:4px;padding:6px 12px 6px 32px;color:#ffffffe6;width:100%;font-size:14px;transition:all .3s}.search-input[data-v-05c331dc]:focus{outline:none;border-color:#667eea80;background:#ffffff14;width:100%}.search-input[data-v-05c331dc]::placeholder{color:#fff6}.search-icon[data-v-05c331dc]{position:absolute;left:10px;top:50%;transform:translateY(-50%);font-size:14px;opacity:.6}.servers-container[data-v-05c331dc]{flex:1;overflow-y:auto;margin-bottom:16px}.servers-container[data-v-05c331dc]::-webkit-scrollbar{width:6px}.servers-container[data-v-05c331dc]::-webkit-scrollbar-track{background:#ffffff0d;border-radius:3px}.servers-container[data-v-05c331dc]::-webkit-scrollbar-thumb{background:#fff3;border-radius:3px}.servers-container[data-v-05c331dc]::-webkit-scrollbar-thumb:hover{background:#ffffff4d}.server-card[data-v-05c331dc]{background:#ffffff08;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:16px;margin-bottom:12px;cursor:pointer;transition:all .3s ease;display:flex;flex-direction:column;gap:8px}.server-card[data-v-05c331dc]:hover:not(.active){background:#ffffff0d;border-color:#fff3}.server-card.active[data-v-05c331dc]{border-color:#667eea;background:#667eea1a}.server-card-header[data-v-05c331dc]{display:flex;justify-content:space-between;align-items:center;font-size:15px;font-weight:500;color:#ffffffe6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;gap:10px}.server-name[data-v-05c331dc]{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.server-connection-type[data-v-05c331dc]{font-size:12px;color:#ffffffb3;display:flex;align-items:center;gap:6px}.connection-type-icon[data-v-05c331dc]{font-size:14px;opacity:.8}.connection-type-badge[data-v-05c331dc]{display:inline-block;padding:4px 8px;border-radius:4px;font-size:11px;font-weight:500;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#9e9e9e33;color:#bdbdbd}.connection-type-badge.studio[data-v-05c331dc]{background:#2196f333;color:#90caf9}.connection-type-badge.sse[data-v-05c331dc]{background:#4caf5033;color:#a5d6a7}.connection-type-badge.streaming[data-v-05c331dc]{background:#9c27b033;color:#ce93d8}.server-config-summary[data-v-05c331dc]{margin-top:12px;padding-top:12px;border-top:1px solid rgba(255,255,255,.1)}.config-item[data-v-05c331dc]{display:flex;align-items:flex-start;margin-bottom:6px;font-size:12px;line-height:1.4}.config-label[data-v-05c331dc]{color:#fff9;font-weight:500;min-width:50px;margin-right:8px}.config-value[data-v-05c331dc]{color:#fffc;word-break:break-all;flex:1}.server-config-preview[data-v-05c331dc]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;padding:8px 12px;max-height:120px;overflow-y:auto;overflow-x:auto}.config-preview[data-v-05c331dc]{margin:0;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:10px;line-height:1.3;color:#ffffffe6;white-space:pre-wrap;word-break:break-all}.config-preview .json-key[data-v-05c331dc]{color:#90caf9}.config-preview .json-string[data-v-05c331dc]{color:#a5d6a7}.config-preview .json-number[data-v-05c331dc]{color:#f39c12}.config-preview .json-boolean[data-v-05c331dc]{color:#e74c3c}.config-preview .json-null[data-v-05c331dc]{color:#95a5a6}.loading-state[data-v-05c331dc]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#ffffffb3}.loading-icon[data-v-05c331dc]{font-size:32px;margin-bottom:16px}.empty-state[data-v-05c331dc]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:#ffffff80;text-align:center}.empty-icon[data-v-05c331dc]{font-size:48px;margin-bottom:16px;opacity:.5}.add-config-button-container[data-v-05c331dc]{margin-top:0}.add-btn[data-v-05c331dc]{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:16px;background:#ffffff08;border:1px dashed rgba(255,255,255,.2);border-radius:8px;color:#fffc;cursor:pointer;transition:all .3s ease;font-size:14px}.add-btn[data-v-05c331dc]:hover{background:#ffffff0d;border-color:#ffffff4d;color:#fff}.add-btn[data-v-05c331dc]:disabled{opacity:.5;cursor:not-allowed}.add-btn.primary[data-v-05c331dc]{background:#667eea33;border-color:#667eea4d;color:#a8b3ff}.add-btn.primary[data-v-05c331dc]:hover:not(:disabled){background:#667eea4d}.add-btn.danger[data-v-05c331dc]{background:#ea66661a;border-color:#ea666633;color:#ff8a8a}.add-btn.danger[data-v-05c331dc]:hover:not(:disabled){background:#ea666633}.add-btn.small[data-v-05c331dc]{padding:6px 12px;font-size:12px}.form-row[data-v-05c331dc]{display:flex;gap:20px}.form-actions[data-v-05c331dc]{display:flex;gap:12px;justify-content:flex-end}.server-detail[data-v-05c331dc]{flex:1;background:#ffffff08;border-radius:12px;padding:24px;overflow-y:auto}.detail-header[data-v-05c331dc]{display:flex;justify-content:space-between;align-items:center;margin-bottom:32px;padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,.1)}.detail-header h3[data-v-05c331dc]{margin:0;font-size:20px}.detail-actions[data-v-05c331dc]{display:flex;gap:12px}.detail-content[data-v-05c331dc]{display:flex;flex-direction:column;gap:20px;flex:1;overflow-y:auto;padding-right:4px}.detail-content[data-v-05c331dc]::-webkit-scrollbar{width:6px}.detail-content[data-v-05c331dc]::-webkit-scrollbar-track{background:#ffffff0d;border-radius:3px}.detail-content[data-v-05c331dc]::-webkit-scrollbar-thumb{background:#fff3;border-radius:3px}.detail-content[data-v-05c331dc]::-webkit-scrollbar-thumb:hover{background:#ffffff4d}.action-btn[data-v-05c331dc]{display:flex;align-items:center;gap:6px;padding:10px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#fff;cursor:pointer;transition:all .3s ease;font-size:14px}.action-btn[data-v-05c331dc]:hover:not(:disabled){background:#ffffff1a;border-color:#fff3}.action-btn[data-v-05c331dc]:disabled{opacity:.5;cursor:not-allowed}.action-btn.primary[data-v-05c331dc]{background:#667eea33;border-color:#667eea4d;color:#a8b3ff}.action-btn.primary[data-v-05c331dc]:hover:not(:disabled){background:#667eea4d}.action-btn.danger[data-v-05c331dc]{background:#ea66661a;border-color:#ea666633;color:#ff8a8a}.action-btn.danger[data-v-05c331dc]:hover:not(:disabled){background:#ea666633}.action-btn.small[data-v-05c331dc]{padding:6px 12px;font-size:12px}.form-item[data-v-05c331dc]{margin-bottom:20px}.form-item label[data-v-05c331dc]{display:block;margin-bottom:8px;font-weight:500;color:#ffffffe6;font-size:14px}.form-item .required[data-v-05c331dc]{color:#ef5350;margin-left:4px}.json-editor-container[data-v-05c331dc]{position:relative}.json-editor-header[data-v-05c331dc]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.json-status[data-v-05c331dc]{font-size:12px;padding:8px 12px;border-radius:4px;font-weight:500;max-width:400px;word-wrap:break-word;white-space:pre-line;line-height:1.4;min-height:20px}.json-status.valid[data-v-05c331dc]{background:#10b98133;color:#34d399}.json-status.invalid[data-v-05c331dc]{background:#ef444433;color:#f87171}.format-btn[data-v-05c331dc]{display:flex;align-items:center;gap:4px;background:#667eea1a;border:1px solid rgba(102,126,234,.3);border-radius:4px;color:#a8b3ff;padding:4px 8px;font-size:12px;cursor:pointer;transition:all .3s}.format-btn[data-v-05c331dc]:hover:not(:disabled){background:#667eea33;border-color:#667eea80}.format-btn[data-v-05c331dc]:disabled{opacity:.5;cursor:not-allowed}.format-icon[data-v-05c331dc]{font-size:12px}.json-editor-wrapper[data-v-05c331dc]{position:relative;border:1px solid rgba(255,255,255,.1);border-radius:4px;overflow:hidden;background:#ffffff0d;min-height:300px}.json-editor[data-v-05c331dc]{height:100%;min-height:280px}.config-textarea[data-v-05c331dc]{width:100%;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:4px;padding:12px;color:#ffffffe6;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:13px;line-height:1.4;resize:vertical;transition:all .3s}.config-textarea[data-v-05c331dc]:focus{outline:none;border-color:#667eea80;background:#ffffff14}.config-textarea[data-v-05c331dc]::placeholder{color:#fff6}.config-input[data-v-05c331dc]{width:100%;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:4px;padding:12px;color:#ffffffe6;font-size:14px;transition:all .3s}.config-input[data-v-05c331dc]:focus{outline:none;border-color:#667eea80;background:#ffffff14}.config-input[data-v-05c331dc]::placeholder{color:#fff6}.no-selection[data-v-05c331dc]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:#ffffff80;text-align:center}.placeholder-icon[data-v-05c331dc]{font-size:48px;margin-bottom:16px;opacity:.5}.message-toast[data-v-05c331dc]{position:fixed;top:20px;right:20px;padding:12px 20px;border-radius:8px;color:#fff;font-weight:500;z-index:9999;box-shadow:0 4px 12px #0000004d;max-width:400px;word-wrap:break-word;white-space:pre-line;line-height:1.4}.message-toast.success[data-v-05c331dc]{background:#10b981}.message-toast.error[data-v-05c331dc]{background:#ef4444}.message-toast.info[data-v-05c331dc]{background:#667eea}.message-fade-enter-active[data-v-05c331dc],.message-fade-leave-active[data-v-05c331dc]{transition:all .3s ease}.message-fade-enter-from[data-v-05c331dc],.message-fade-leave-to[data-v-05c331dc]{transform:translate(100%);opacity:0}@media (max-width: 1200px){.mcp-layout[data-v-05c331dc]{flex-direction:column}.server-list[data-v-05c331dc],.server-detail[data-v-05c331dc]{width:100%}.server-list[data-v-05c331dc]{order:2}.server-detail[data-v-05c331dc]{order:1}}.wide-modal[data-v-05c331dc]{width:80vw!important;max-width:1200px!important}.form-row[data-v-05c331dc]{display:flex;gap:20px;margin-bottom:20px}.form-row .form-item[data-v-05c331dc]{flex:1}.narrow-input[data-v-05c331dc]{width:70%}.narrow-input .config-input[data-v-05c331dc],.narrow-input .config-textarea[data-v-05c331dc]{width:100%}.status-toggle-container[data-v-05c331dc]{display:flex;align-items:center}.status-toggle[data-v-05c331dc]{position:relative;width:60px;height:30px;background:#6b7280;border-radius:15px;cursor:pointer;transition:all .3s ease;display:flex;align-items:center;justify-content:space-between;padding:0 8px}.status-toggle.enabled[data-v-05c331dc]{background:#10b981}.toggle-thumb[data-v-05c331dc]{position:absolute;width:24px;height:24px;background:#fff;border-radius:50%;top:3px;left:3px;transition:all .3s ease;box-shadow:0 2px 4px #0003}.status-toggle.enabled .toggle-thumb[data-v-05c331dc]{left:33px}.toggle-label[data-v-05c331dc]{color:#fff;font-size:12px;font-weight:500;-webkit-user-select:none;user-select:none}.server-status-toggle[data-v-05c331dc]{display:flex;align-items:center}.server-card-header .status-toggle[data-v-05c331dc]{width:50px;height:24px}.server-card-header .toggle-thumb[data-v-05c331dc]{width:18px;height:18px;top:3px;left:3px}.server-card-header .status-toggle.enabled .toggle-thumb[data-v-05c331dc]{left:29px}.server-card-header .toggle-label[data-v-05c331dc]{font-size:10px}@media (max-width: 768px){.mcp-header[data-v-05c331dc]{flex-direction:column;gap:16px;align-items:stretch}.search-input[data-v-05c331dc]{width:100%}.search-input[data-v-05c331dc]:focus{width:100%}.mcp-table-wrapper[data-v-05c331dc]{overflow-x:scroll}.mcp-table[data-v-05c331dc]{min-width:600px}.connection-type-options[data-v-05c331dc],.mcp-form-actions[data-v-05c331dc]{flex-direction:column;gap:12px}.mcp-form-actions button[data-v-05c331dc]{width:100%}.form-row[data-v-05c331dc]{flex-direction:column;gap:15px}.narrow-input[data-v-05c331dc]{width:100%}.server-detail[data-v-05c331dc]{padding:16px}.detail-header[data-v-05c331dc]{margin-bottom:16px}.detail-content[data-v-05c331dc]{gap:16px}.form-row[data-v-05c331dc]{flex-direction:column;gap:16px}.form-actions[data-v-05c331dc]{flex-direction:column;gap:8px}.form-actions .action-btn[data-v-05c331dc]{width:100%}}.json-actions[data-v-05c331dc]{display:flex;gap:8px;align-items:center}.json-import-form[data-v-05c331dc]{height:100%;display:flex;flex-direction:column}.json-import-form .form-item[data-v-05c331dc]{flex:1;display:flex;flex-direction:column}.json-import-form .form-item label[data-v-05c331dc]{margin-bottom:8px}.json-import-form .monaco-editor[data-v-05c331dc]{flex:1;min-height:600px;border:none;border-radius:0}.validation-errors[data-v-05c331dc]{margin-top:12px;padding:12px;background:#ff00001a;border:1px solid rgba(255,0,0,.3);border-radius:4px}.error-item[data-v-05c331dc]{color:#f44;font-size:14px;margin-bottom:4px}.error-item[data-v-05c331dc]:last-child{margin-bottom:0}.json-tab-panel[data-v-05c331dc]{margin-top:8px}.example-json[data-v-05c331dc]{margin:0;padding:12px;background:#ffffff08;overflow-x:auto;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:13px;line-height:1.4}.example-json code[data-v-05c331dc]{color:#ffffffe6;background:none;padding:0;border:none;border-radius:0;font-family:inherit;font-size:inherit}.example-json .string[data-v-05c331dc]{color:#a78bfa}.example-json .number[data-v-05c331dc]{color:#fbbf24}.example-json .boolean[data-v-05c331dc]{color:#f87171}.example-json .null[data-v-05c331dc]{color:#fff9}.example-json .key[data-v-05c331dc]{color:#34d399}.custom-select[data-v-4c6d676f]{position:relative;display:inline-block}.select-btn[data-v-4c6d676f]{display:flex;align-items:center;gap:6px;padding:8px 12px;background:#ffffff0d;border:1px solid rgba(80 78 78);border-radius:8px;color:#fff;cursor:pointer;transition:all .2s ease;font-size:14px;font-weight:600;outline:none}.select-btn[data-v-4c6d676f]:hover{background:#667eea26;border-color:#7c9eff;color:#a3bffa;box-shadow:0 0 15px #667eea33}.select-btn[data-v-4c6d676f]:focus{box-shadow:0 0 0 3px #667eea80}.current-option[data-v-4c6d676f]{color:inherit;font-weight:600;min-width:40px;text-align:left;text-shadow:none}.chevron[data-v-4c6d676f]{transition:transform .3s cubic-bezier(.4,0,.2,1);opacity:.9;filter:none}.select-dropdown[data-v-4c6d676f]{position:absolute;top:100%;left:0;z-index:9999;margin-top:4px;background:linear-gradient(135deg,#282832f2,#1e1e28f2);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid rgba(102,126,234,.3);border-radius:8px;box-shadow:0 8px 32px #0006,0 0 0 1px #667eea33;min-width:300px}.dropdown-header[data-v-4c6d676f]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid rgba(102,126,234,.2);font-size:14px;font-weight:600;color:#fff;background:linear-gradient(135deg,#667eea1a,#667eea0d)}.close-btn[data-v-4c6d676f]{background:none;border:none;color:#fff9;cursor:pointer;padding:4px;border-radius:4px;transition:all .2s ease}.close-btn[data-v-4c6d676f]:hover{background:#ffffff1a;color:#fffc}.select-options[data-v-4c6d676f]{padding:8px 0}.select-option[data-v-4c6d676f]{display:flex;align-items:center;gap:12px;width:100%;padding:10px 16px;background:none;border:none;color:#ffffffb3;cursor:pointer;transition:all .2s ease;text-align:left}.select-option[data-v-4c6d676f]:hover{background:#ffffff0d;color:#ffffffe6}.select-option.active[data-v-4c6d676f]{background:linear-gradient(135deg,#667eea33,#667eea1a);color:#7c9eff;border-left:3px solid #667eea;padding-left:13px}.option-type[data-v-4c6d676f]{display:inline-block;min-width:24px;font-size:12px;font-weight:600;opacity:.8}.option-name[data-v-4c6d676f]{flex:1;font-size:14px;font-weight:500}.check-icon[data-v-4c6d676f]{color:#667eea;opacity:.8}.spacer[data-v-4c6d676f]{display:inline-block;width:12px}.backdrop[data-v-4c6d676f]{position:fixed;top:0;left:0;right:0;bottom:0;z-index:9998;background:transparent}.slideDown-enter-active[data-v-4c6d676f],.slideDown-leave-active[data-v-4c6d676f]{transition:all .2s ease;transform-origin:top}.slideDown-enter-from[data-v-4c6d676f],.slideDown-leave-to[data-v-4c6d676f]{opacity:0;transform:translateY(-8px) scale(.95)}.actions-container[data-v-7add0284]{display:flex;align-items:center;gap:16px}.action-btn.warning[data-v-7add0284]{background:#f59e0b;color:#fff}.action-btn.warning[data-v-7add0284]:hover{background:#d97706}.action-btn.info[data-v-7add0284]{background:#3b82f6;color:#fff}.action-btn.info[data-v-7add0284]:hover{background:#2563eb}.import-language-dropdown[data-v-7add0284]{display:inline-block}.language-select-modal[data-v-7add0284]{width:100%;padding:8px 12px;border:1px solid rgba(255,255,255,.2);border-radius:4px;background:#ffffff0d;color:#fff;font-size:14px;outline:none}.language-select-modal[data-v-7add0284]:focus{border-color:#409eff}.warning-notice[data-v-7add0284]{display:flex;align-items:flex-start;gap:8px;padding:12px;margin-top:16px;background:#f59e0b1a;border:1px solid rgba(245,158,11,.3);border-radius:6px}.warning-icon-small[data-v-7add0284]{color:#f59e0b;font-size:16px;margin-top:2px;flex-shrink:0}.warning-notice p[data-v-7add0284]{margin:0;font-size:14px;color:#fffc}.prompt-layout[data-v-7add0284]{display:flex;gap:12px;flex:1;min-height:0}.prompt-list[data-v-7add0284]{width:336px;flex-shrink:0;display:flex;flex-direction:column}.list-header[data-v-7add0284]{display:flex;align-items:center;gap:8px;margin-bottom:16px}.list-header h3[data-v-7add0284]{margin:0;font-size:18px}.prompt-count[data-v-7add0284]{color:#fff9;font-size:14px}.prompts-container[data-v-7add0284]{flex:1;overflow-y:auto;margin-bottom:16px;padding-right:6px}.loading-state[data-v-7add0284]{display:flex;align-items:center;gap:8px;justify-content:center;padding:40px 0;color:#fff9}.loading-icon[data-v-7add0284]{animation:spin-7add0284 1s linear infinite}@keyframes spin-7add0284{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.empty-state[data-v-7add0284]{text-align:center;padding:60px 20px;color:#fff9}.empty-icon[data-v-7add0284]{font-size:48px;margin-bottom:16px;opacity:.4}.empty-tip[data-v-7add0284]{font-size:14px;margin-top:8px}.prompt-card[data-v-7add0284]{background:#ffffff08;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:16px;margin-bottom:12px;cursor:pointer;transition:all .3s ease}.prompt-card[data-v-7add0284]:hover{background:#ffffff0d;border-color:#fff3}.prompt-card.active[data-v-7add0284]{border-color:#667eea;background:#667eea1a}.prompt-card-header[data-v-7add0284]{display:flex;justify-content:space-between;align-items:center}.prompt-name[data-v-7add0284]{font-weight:500;font-size:16px}.prompt-desc[data-v-7add0284]{color:#ffffffb3;font-size:14px;line-height:1.4;margin-bottom:0;margin-top:8px}.prompt-tools[data-v-7add0284]{display:flex;flex-wrap:wrap;gap:6px}.tool-tag[data-v-7add0284]{display:inline-block;padding:4px 8px;background:#667eea33;border-radius:4px;font-size:12px;color:#a8b3ff}.tool-more[data-v-7add0284]{color:#ffffff80;font-size:12px;padding:4px 8px}.no-tools-indicator[data-v-7add0284]{color:#fff6;font-size:12px;font-style:italic}.add-btn[data-v-7add0284]{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:16px;background:#ffffff08;border:1px dashed rgba(255,255,255,.2);border-radius:8px;color:#fffc;cursor:pointer;transition:all .3s ease;font-size:14px}.add-btn[data-v-7add0284]:hover{background:#ffffff0d;border-color:#ffffff4d;color:#fff}.prompt-detail[data-v-7add0284]{flex:1;background:#ffffff08;border-radius:12px;padding:12px 24px;overflow-y:auto}.no-selection[data-v-7add0284]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#fff9}.placeholder-icon[data-v-7add0284]{font-size:64px;margin-bottom:24px;opacity:.3}.detail-header[data-v-7add0284]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,.1)}.detail-header h3[data-v-7add0284]{margin:0;font-size:20px}.detail-actions[data-v-7add0284]{display:flex;gap:12px}.form-section[data-v-7add0284]{margin-bottom:32px}.form-item[data-v-7add0284]{margin-bottom:20px}.form-item label[data-v-7add0284]{display:block;margin-bottom:8px;color:#ffffffe6;font-weight:500}.form-item input[data-v-7add0284],.form-item textarea[data-v-7add0284]{width:100%;padding:12px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;color:#fff;font-size:14px;transition:all .3s ease}.form-item input[data-v-7add0284]:focus,.form-item textarea[data-v-7add0284]:focus{border-color:#667eea;outline:none;background:#ffffff14}.form-item input[data-v-7add0284]::placeholder,.form-item textarea[data-v-7add0284]::placeholder{color:#fff6}.form-item input[data-v-7add0284]:disabled,.form-item textarea[data-v-7add0284]:disabled{cursor:not-allowed;background:#ffffff08;color:#fff;border-color:#ffffff0d;opacity:.6}.form-item textarea[data-v-7add0284]{resize:vertical;min-height:80px;line-height:1.5}.required[data-v-7add0284]{color:#ff6b6b}.section-header[data-v-7add0284]{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.section-header span[data-v-7add0284]{font-weight:500;color:#fffc}.action-btn[data-v-7add0284]{display:flex;align-items:center;gap:6px;padding:10px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#fff;cursor:pointer;transition:all .3s ease;font-size:14px}.action-btn[data-v-7add0284]:hover:not(:disabled){background:#ffffff1a;border-color:#fff3}.action-btn[data-v-7add0284]:disabled{opacity:.5;cursor:not-allowed}.action-btn.primary[data-v-7add0284]{background:#667eea33;border-color:#667eea4d;color:#a8b3ff}.action-btn.primary[data-v-7add0284]:hover:not(:disabled){background:#667eea4d}.action-btn.danger[data-v-7add0284]{background:#ea66661a;border-color:#ea666633;color:#ff8a8a}.action-btn.danger[data-v-7add0284]:hover:not(:disabled){background:#ea666633}.action-btn.small[data-v-7add0284]{padding:6px 12px;font-size:12px}.modal-form[data-v-7add0284]{display:flex;flex-direction:column;gap:16px}.delete-confirm[data-v-7add0284]{text-align:center;padding:20px 0}.delete-confirm p[data-v-7add0284]{color:#fffc;margin:8px 0}.delete-confirm .warning-text[data-v-7add0284]{color:#fff9;font-size:14px}.warning-icon[data-v-7add0284]{font-size:48px;color:#ffa726;margin-bottom:16px}.confirm-btn[data-v-7add0284],.cancel-btn[data-v-7add0284]{padding:10px 20px;border-radius:6px;cursor:pointer;transition:all .3s ease}.confirm-btn.danger[data-v-7add0284],.cancel-btn.danger[data-v-7add0284]{background:#ea666633;border:1px solid rgba(234,102,102,.3);color:#ff8a8a}.confirm-btn.danger[data-v-7add0284]:hover,.cancel-btn.danger[data-v-7add0284]:hover{background:#ea66664d}.tags[data-v-7add0284]{margin-top:8px}.tags .tag[data-v-7add0284]{display:inline-block;padding:4px 8px;background:#667eea33;border-radius:4px;font-size:12px;color:#a8b3ff}.cancel-btn[data-v-7add0284]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);color:#fff}.cancel-btn[data-v-7add0284]:hover{background:#ffffff1a}@keyframes slideIn-7add0284{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}.namespace-layout[data-v-1399730e]{display:flex;gap:12px;flex:1;min-height:0}.namespace-list[data-v-1399730e]{width:336px;flex-shrink:0;display:flex;flex-direction:column}.list-header[data-v-1399730e]{display:flex;align-items:center;gap:8px;margin-bottom:16px}.list-header h3[data-v-1399730e]{margin:0;font-size:18px}.namespace-count[data-v-1399730e]{color:#fff9;font-size:14px}.namespaces-container[data-v-1399730e]{flex:1;overflow-y:auto;margin-bottom:16px;padding-right:6px}.loading-state[data-v-1399730e]{display:flex;align-items:center;gap:8px;justify-content:center;padding:40px 0;color:#fff9}.loading-icon[data-v-1399730e]{animation:spin-1399730e 1s linear infinite}@keyframes spin-1399730e{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.empty-state[data-v-1399730e]{text-align:center;padding:60px 20px;color:#fff9}.empty-icon[data-v-1399730e]{font-size:48px;margin-bottom:16px;opacity:.4}.empty-tip[data-v-1399730e]{font-size:14px;margin-top:8px}.namespace-card[data-v-1399730e]{background:#ffffff08;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:16px;margin-bottom:12px;cursor:pointer;transition:all .3s ease}.namespace-card[data-v-1399730e]:hover{background:#ffffff0d;border-color:#fff3}.namespace-card.active[data-v-1399730e]{border-color:#667eea;background:#667eea1a}.namespace-card-header[data-v-1399730e]{display:flex;justify-content:space-between;align-items:center}.namespace-name[data-v-1399730e]{font-weight:500;font-size:16px}.namespace-desc[data-v-1399730e]{color:#ffffffb3;font-size:14px;line-height:1.4;margin-bottom:0;margin-top:8px}.namespace-tools[data-v-1399730e]{display:flex;flex-wrap:wrap;gap:6px}.tool-tag[data-v-1399730e]{display:inline-block;padding:4px 8px;background:#667eea33;border-radius:4px;font-size:12px;color:#a8b3ff}.tool-more[data-v-1399730e]{color:#ffffff80;font-size:12px;padding:4px 8px}.no-tools-indicator[data-v-1399730e]{color:#fff6;font-size:12px;font-style:italic}.add-btn[data-v-1399730e]{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:16px;background:#ffffff08;border:1px dashed rgba(255,255,255,.2);border-radius:8px;color:#fffc;cursor:pointer;transition:all .3s ease;font-size:14px}.add-btn[data-v-1399730e]:hover{background:#ffffff0d;border-color:#ffffff4d;color:#fff}.namespace-detail[data-v-1399730e]{flex:1;background:#ffffff08;border-radius:12px;padding:12px 24px;overflow-y:auto}.no-selection[data-v-1399730e]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#fff9}.placeholder-icon[data-v-1399730e]{font-size:64px;margin-bottom:24px;opacity:.3}.detail-header[data-v-1399730e]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,.1)}.detail-header h3[data-v-1399730e]{margin:0;font-size:20px}.detail-actions[data-v-1399730e]{display:flex;gap:12px}.form-section[data-v-1399730e]{margin-bottom:32px}.form-item[data-v-1399730e]{margin-bottom:20px}.form-item label[data-v-1399730e]{display:block;margin-bottom:8px;color:#ffffffe6;font-weight:500}.form-item input[data-v-1399730e],.form-item textarea[data-v-1399730e]{width:100%;padding:12px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;color:#fff;font-size:14px;transition:all .3s ease}.form-item input[data-v-1399730e]:focus,.form-item textarea[data-v-1399730e]:focus{border-color:#667eea;outline:none;background:#ffffff14}.form-item input[data-v-1399730e]::placeholder,.form-item textarea[data-v-1399730e]::placeholder{color:#fff6}.form-item input[data-v-1399730e]:disabled,.form-item textarea[data-v-1399730e]:disabled{cursor:not-allowed;background:#ffffff08;color:#fff;border-color:#ffffff0d;opacity:.6}.form-item textarea[data-v-1399730e]{resize:vertical;min-height:80px;line-height:1.5}.required[data-v-1399730e]{color:#ff6b6b}.section-header[data-v-1399730e]{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.section-header span[data-v-1399730e]{font-weight:500;color:#fffc}.action-btn[data-v-1399730e]{display:flex;align-items:center;gap:6px;padding:10px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#fff;cursor:pointer;transition:all .3s ease;font-size:14px}.action-btn[data-v-1399730e]:hover:not(:disabled){background:#ffffff1a;border-color:#fff3}.action-btn[data-v-1399730e]:disabled{opacity:.5;cursor:not-allowed}.action-btn.primary[data-v-1399730e]{background:#667eea33;border-color:#667eea4d;color:#a8b3ff}.action-btn.primary[data-v-1399730e]:hover:not(:disabled){background:#667eea4d}.action-btn.danger[data-v-1399730e]{background:#ea66661a;border-color:#ea666633;color:#ff8a8a}.action-btn.danger[data-v-1399730e]:hover:not(:disabled){background:#ea666633}.action-btn.small[data-v-1399730e]{padding:6px 12px;font-size:12px}.modal-form[data-v-1399730e]{display:flex;flex-direction:column;gap:16px}.delete-confirm[data-v-1399730e]{text-align:center;padding:20px 0}.delete-confirm p[data-v-1399730e]{color:#fffc;margin:8px 0}.delete-confirm .warning-text[data-v-1399730e]{color:#fff9;font-size:14px}.warning-icon[data-v-1399730e]{font-size:48px;color:#ffa726;margin-bottom:16px}.confirm-btn[data-v-1399730e],.cancel-btn[data-v-1399730e]{padding:10px 20px;border-radius:6px;cursor:pointer;transition:all .3s ease}.confirm-btn.danger[data-v-1399730e],.cancel-btn.danger[data-v-1399730e]{background:#ea666633;border:1px solid rgba(234,102,102,.3);color:#ff8a8a}.confirm-btn.danger[data-v-1399730e]:hover,.cancel-btn.danger[data-v-1399730e]:hover{background:#ea66664d}.tags[data-v-1399730e]{margin-top:8px}.tags .tag[data-v-1399730e]{display:inline-block;padding:4px 8px;background:#667eea33;border-radius:4px;font-size:12px;color:#a8b3ff}.cancel-btn[data-v-1399730e]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);color:#fff}.cancel-btn[data-v-1399730e]:hover{background:#ffffff1a}@keyframes slideIn-1399730e{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}.setting-icon[data-v-4727c0a4]{color:#667eea;margin-left:4px;cursor:pointer}.config-container[data-v-29da4edc]{height:100vh;background:#ffffff05;color:#fff}.config-header[data-v-29da4edc]{display:flex;justify-content:space-between;align-items:center;padding:20px;border-bottom:1px solid rgba(255,255,255,.1)}.header-actions[data-v-29da4edc]{display:flex;justify-content:space-between;align-items:center;width:100%}.header-actions-left[data-v-29da4edc]{display:flex;align-items:center;gap:14px}.config-header h1[data-v-29da4edc]{background:linear-gradient(135deg,#667eea,#764ba2);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-size:24px;font-weight:600}.config-content[data-v-29da4edc]{display:flex;height:calc(100vh - 80px)}.config-nav[data-v-29da4edc]{width:242px;padding:20px;border-right:1px solid rgba(255,255,255,.1)}.nav-item[data-v-29da4edc]{display:flex;align-items:center;gap:10px;padding:12px;margin-bottom:8px;border-radius:8px;cursor:pointer;transition:all .3s}.nav-item[data-v-29da4edc]:hover{background:#ffffff0d}.nav-item.active[data-v-29da4edc]{background:#667eea1a;border:1px solid rgba(102,126,234,.2)}.config-details[data-v-29da4edc]{flex:1;padding:24px 30px;overflow-y:auto}.action-btn[data-v-29da4edc]{display:flex;align-items:center;gap:6px;padding:8px 16px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#fff;cursor:pointer;transition:all .3s}.action-btn[data-v-29da4edc]:hover{background:#ffffff1a} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-CXUcGEY4.css b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-Bve_wuYa.css similarity index 54% rename from spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-CXUcGEY4.css rename to spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-Bve_wuYa.css index ac5ca29662..b7dbae04e7 100644 --- a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-CXUcGEY4.css +++ b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-Bve_wuYa.css @@ -1 +1 @@ -.blur-card[data-v-48da0039]{width:100%;height:100%;box-sizing:border-box;background:#ffffff08;border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:20px;cursor:pointer;transition:all .3s ease;text-align:left;display:flex;align-items:flex-start;gap:16px}.blur-card[data-v-48da0039]:hover{background:#ffffff0d;border-color:#667eea4d;transform:translateY(-2px);box-shadow:0 8px 25px #0003}.blur-card .blur-card-icon[data-v-48da0039]{font-size:24px;color:#667eea;margin-top:4px;flex-shrink:0}.blur-card .blur-card-content[data-v-48da0039]{flex:1;display:flex;flex-direction:column}.blur-card .blur-card-content h3[data-v-48da0039]{font-size:16px;font-weight:600;color:#fff;margin:0 0 8px}.blur-card .blur-card-content p[data-v-48da0039]{font-size:14px;color:#888;margin:0;line-height:1.4}.home-page[data-v-8a1c50e1]{width:100%;height:100vh;position:relative;overflow-y:auto}.welcome-container[data-v-8a1c50e1]{flex:1;height:100vh;background:#0a0a0a;position:relative;display:flex;flex-direction:column}.background-effects[data-v-8a1c50e1]{position:fixed;width:100vw;height:100vh;top:0;left:0;right:0;bottom:0;pointer-events:none;z-index:0}.gradient-orb[data-v-8a1c50e1]{position:absolute;border-radius:50%;filter:blur(100px);opacity:.3;animation:float-8a1c50e1 6s ease-in-out infinite}.gradient-orb.orb-1[data-v-8a1c50e1]{width:400px;height:400px;background:linear-gradient(135deg,#667eea,#764ba2);top:-200px;right:-200px;animation-delay:0s}.gradient-orb.orb-2[data-v-8a1c50e1]{width:300px;height:300px;background:linear-gradient(135deg,#f093fb,#f5576c);bottom:-150px;left:-150px;animation-delay:2s}.gradient-orb.orb-3[data-v-8a1c50e1]{width:250px;height:250px;background:linear-gradient(135deg,#4facfe,#00f2fe);top:50%;left:50%;transform:translate(-50%,-50%);animation-delay:4s}@keyframes float-8a1c50e1{0%,to{transform:translateY(0) rotate(0)}33%{transform:translateY(-20px) rotate(120deg)}66%{transform:translateY(10px) rotate(240deg)}}.header[data-v-8a1c50e1]{position:relative;z-index:1000;padding:32px 32px 0}.header-top[data-v-8a1c50e1]{display:flex;justify-content:flex-end;margin-bottom:20px;position:relative;z-index:1001}.logo-container[data-v-8a1c50e1]{text-align:center}.logo-container .logo[data-v-8a1c50e1]{display:flex;align-items:center;justify-content:center}.logo-container img[data-v-8a1c50e1]{height:52px;margin-bottom:12px}.logo-container h1[data-v-8a1c50e1]{font-size:48px;font-weight:700;margin:0 0 8px;background:linear-gradient(135deg,#667eea,#764ba2);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.logo-container .tagline[data-v-8a1c50e1]{color:#888;font-size:16px;font-weight:400}.main-content[data-v-8a1c50e1]{flex:1;display:flex;align-items:center;justify-content:center;padding:0 32px 32px;position:relative;z-index:1}.conversation-container[data-v-8a1c50e1]{width:100%;max-width:800px}.welcome-section[data-v-8a1c50e1]{text-align:center;margin-bottom:48px}.welcome-title[data-v-8a1c50e1]{font-size:32px;font-weight:600;color:#fff;margin:0 0 16px}.welcome-subtitle[data-v-8a1c50e1]{font-size:18px;color:#888;margin:0;line-height:1.5}.input-section[data-v-8a1c50e1]{margin-bottom:48px}.input-container[data-v-8a1c50e1]{position:relative;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:16px;padding:20px;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);box-shadow:0 8px 32px #0000004d;transition:all .3s ease}.input-container[data-v-8a1c50e1]:focus-within{border-color:#667eea;box-shadow:0 8px 32px #667eea33}.main-input[data-v-8a1c50e1]{width:100%;background:transparent;border:none;outline:none;color:#fff;font-size:16px;line-height:1.5;resize:none;min-height:24px;max-height:200px;padding-right:60px}.main-input[data-v-8a1c50e1]::placeholder{color:#666}.send-button[data-v-8a1c50e1]{position:absolute;right:16px;bottom:16px;width:40px;height:40px;border:none;border-radius:8px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.send-button[data-v-8a1c50e1]:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 8px 25px #667eea66}.send-button[data-v-8a1c50e1]:disabled{opacity:.5;cursor:not-allowed}.send-button svg[data-v-8a1c50e1]{font-size:18px}.examples-section[data-v-8a1c50e1]{margin-bottom:48px}.examples-section .examples-grid[data-v-8a1c50e1]{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}.examples-section .examples-grid .card-with-type[data-v-8a1c50e1]{width:100%;min-width:300px}.examples-section .examples-grid .card-with-type:hover .card-type[data-v-8a1c50e1]{transform:translateY(-1px);box-shadow:0 8px 25px #8297f666}.card-with-type[data-v-8a1c50e1]{position:relative}.card-type[data-v-8a1c50e1]{position:absolute;top:12px;right:12px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;padding:4px 8px;border-radius:4px;font-size:12px;font-weight:600;z-index:1}.config-view[data-v-8a1c50e1]{flex:1;height:100vh;background:#0a0a0a;display:flex;flex-direction:column;position:relative}.config-header-bar[data-v-8a1c50e1]{display:flex;align-items:center;padding:16px 24px;background:#ffffff0d;border-bottom:1px solid rgba(255,255,255,.1);gap:16px}.config-header-bar .back-button[data-v-8a1c50e1]{display:flex;align-items:center;gap:8px;padding:8px 16px;background:#ffffff1a;border:1px solid rgba(255,255,255,.2);border-radius:8px;color:#fff;font-size:14px;cursor:pointer;transition:all .2s ease}.config-header-bar .back-button[data-v-8a1c50e1]:hover{background:#ffffff26;border-color:#ffffff4d;transform:translateY(-1px)}.config-header-bar .config-title[data-v-8a1c50e1]{font-size:20px;font-weight:600;color:#fff;background:linear-gradient(135deg,#667eea,#764ba2);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.direct-button[data-v-8a1c50e1]{margin-top:20px;padding:12px 24px;border:none;border-radius:8px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;font-size:16px;cursor:pointer;transition:all .2s ease}.direct-button[data-v-8a1c50e1]:hover{transform:translateY(-2px);box-shadow:0 8px 25px #667eea66} +.blur-card[data-v-48da0039]{width:100%;height:100%;box-sizing:border-box;background:#ffffff08;border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:20px;cursor:pointer;transition:all .3s ease;text-align:left;display:flex;align-items:flex-start;gap:16px}.blur-card[data-v-48da0039]:hover{background:#ffffff0d;border-color:#667eea4d;transform:translateY(-2px);box-shadow:0 8px 25px #0003}.blur-card .blur-card-icon[data-v-48da0039]{font-size:24px;color:#667eea;margin-top:4px;flex-shrink:0}.blur-card .blur-card-content[data-v-48da0039]{flex:1;display:flex;flex-direction:column}.blur-card .blur-card-content h3[data-v-48da0039]{font-size:16px;font-weight:600;color:#fff;margin:0 0 8px}.blur-card .blur-card-content p[data-v-48da0039]{font-size:14px;color:#888;margin:0;line-height:1.4}.home-page[data-v-5aee9964]{width:100%;height:100vh;position:relative;overflow-y:auto}.welcome-container[data-v-5aee9964]{flex:1;height:100vh;background:#0a0a0a;position:relative;display:flex;flex-direction:column}.background-effects[data-v-5aee9964]{position:fixed;width:100vw;height:100vh;top:0;left:0;right:0;bottom:0;pointer-events:none;z-index:0}.gradient-orb[data-v-5aee9964]{position:absolute;border-radius:50%;filter:blur(100px);opacity:.3;animation:float-5aee9964 6s ease-in-out infinite}.gradient-orb.orb-1[data-v-5aee9964]{width:400px;height:400px;background:linear-gradient(135deg,#667eea,#764ba2);top:-200px;right:-200px;animation-delay:0s}.gradient-orb.orb-2[data-v-5aee9964]{width:300px;height:300px;background:linear-gradient(135deg,#f093fb,#f5576c);bottom:-150px;left:-150px;animation-delay:2s}.gradient-orb.orb-3[data-v-5aee9964]{width:250px;height:250px;background:linear-gradient(135deg,#4facfe,#00f2fe);top:50%;left:50%;transform:translate(-50%,-50%);animation-delay:4s}@keyframes float-5aee9964{0%,to{transform:translateY(0) rotate(0)}33%{transform:translateY(-20px) rotate(120deg)}66%{transform:translateY(10px) rotate(240deg)}}.header[data-v-5aee9964]{position:relative;z-index:1000;padding:32px 32px 0}.header-top[data-v-5aee9964]{display:flex;justify-content:flex-end;margin-bottom:20px;position:relative;z-index:1001}.logo-container[data-v-5aee9964]{text-align:center}.logo-container .logo[data-v-5aee9964]{display:flex;align-items:center;justify-content:center}.logo-container img[data-v-5aee9964]{height:52px;margin-bottom:12px}.logo-container h1[data-v-5aee9964]{font-size:48px;font-weight:700;margin:0 0 8px;background:linear-gradient(135deg,#667eea,#764ba2);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.logo-container .tagline[data-v-5aee9964]{color:#888;font-size:16px;font-weight:400}.main-content[data-v-5aee9964]{flex:1;display:flex;align-items:center;justify-content:center;padding:0 32px 32px;position:relative;z-index:1}.conversation-container[data-v-5aee9964]{width:100%;max-width:800px}.welcome-section[data-v-5aee9964]{text-align:center;margin-bottom:48px}.welcome-title[data-v-5aee9964]{font-size:32px;font-weight:600;color:#fff;margin:0 0 16px}.welcome-subtitle[data-v-5aee9964]{font-size:18px;color:#888;margin:0;line-height:1.5}.input-section[data-v-5aee9964]{margin-bottom:48px}.input-container[data-v-5aee9964]{position:relative;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:16px;padding:20px;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);box-shadow:0 8px 32px #0000004d;transition:all .3s ease}.input-container[data-v-5aee9964]:focus-within{border-color:#667eea;box-shadow:0 8px 32px #667eea33}.main-input[data-v-5aee9964]{width:100%;background:transparent;border:none;outline:none;color:#fff;font-size:16px;line-height:1.5;resize:none;min-height:24px;max-height:200px;padding-right:60px}.main-input[data-v-5aee9964]::placeholder{color:#666}.send-button[data-v-5aee9964]{position:absolute;right:16px;bottom:16px;width:40px;height:40px;border:none;border-radius:8px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.send-button[data-v-5aee9964]:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 8px 25px #667eea66}.send-button[data-v-5aee9964]:disabled{opacity:.5;cursor:not-allowed}.send-button svg[data-v-5aee9964]{font-size:18px}.examples-section[data-v-5aee9964]{margin-bottom:48px}.examples-section .examples-grid[data-v-5aee9964]{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}.examples-section .examples-grid .card-with-type[data-v-5aee9964]{width:100%;min-width:300px}.examples-section .examples-grid .card-with-type:hover .card-type[data-v-5aee9964]{transform:translateY(-1px);box-shadow:0 8px 25px #8297f666}.card-with-type[data-v-5aee9964]{position:relative}.card-type[data-v-5aee9964]{position:absolute;top:12px;right:12px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;padding:4px 8px;border-radius:4px;font-size:12px;font-weight:600;z-index:1}.config-view[data-v-5aee9964]{flex:1;height:100vh;background:#0a0a0a;display:flex;flex-direction:column;position:relative}.config-header-bar[data-v-5aee9964]{display:flex;align-items:center;padding:16px 24px;background:#ffffff0d;border-bottom:1px solid rgba(255,255,255,.1);gap:16px}.config-header-bar .back-button[data-v-5aee9964]{display:flex;align-items:center;gap:8px;padding:8px 16px;background:#ffffff1a;border:1px solid rgba(255,255,255,.2);border-radius:8px;color:#fff;font-size:14px;cursor:pointer;transition:all .2s ease}.config-header-bar .back-button[data-v-5aee9964]:hover{background:#ffffff26;border-color:#ffffff4d;transform:translateY(-1px)}.config-header-bar .config-title[data-v-5aee9964]{font-size:20px;font-weight:600;color:#fff;background:linear-gradient(135deg,#667eea,#764ba2);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.direct-button[data-v-5aee9964]{margin-top:20px;padding:12px 24px;border:none;border-radius:8px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;font-size:16px;cursor:pointer;transition:all .2s ease}.direct-button[data-v-5aee9964]:hover{transform:translateY(-2px);box-shadow:0 8px 25px #667eea66} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-BxnqWDJP.js b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-BxnqWDJP.js new file mode 100644 index 0000000000..1fa54fd85d --- /dev/null +++ b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-BxnqWDJP.js @@ -0,0 +1,3 @@ +var ct=Object.defineProperty;var rt=(T,n,s)=>n in T?ct(T,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):T[n]=s;var he=(T,n,s)=>rt(T,typeof n!="symbol"?n+"":n,s);import{d as Ce,u as Ie,c as _e,o as Se,a as m,b as h,n as te,x as i,e,f as F,t as l,g as k,i as Y,F as ge,l as ve,h as ie,w as de,j as fe,z as at,r as D,y as ne,A as De,s as ue,T as xe,k as Re,B as $e,q as Ue,C as Ne,D as ut,E as dt,p as lt,G as pt}from"./index-W4k7xcj8.js";import{I as C}from"./iconify-bZOkqtWv.js";import{s as f,P as Ae,u as it}from"./sidebar-Cklmpi9w.js";import{_ as ye}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{L as ht}from"./llm-check-BVkAKrj3.js";import{L as gt}from"./index-0-ztzQqN.js";import{u as mt,a as vt}from"./useMessage-QCjbpgZx.js";const ft={class:"sidebar-content"},bt={class:"sidebar-content-header"},kt={class:"sidebar-content-title"},_t={class:"tab-switcher"},$t=["disabled"],Pt={key:0,class:"tab-content"},Ct={class:"new-task-section"},St={class:"sidebar-content-list"},yt={key:0,class:"loading-state"},Et={key:1,class:"error-state"},wt={key:2,class:"empty-state"},Tt=["onClick"],It={class:"task-icon"},Dt={class:"task-details"},xt={class:"task-title"},Rt={class:"task-preview"},At={class:"task-time"},Mt={class:"task-actions"},Nt=["title","onClick"],Ut={key:1,class:"tab-content config-tab"},Lt={key:0,class:"config-container"},qt={class:"template-info-header"},Ft={class:"template-info"},Vt={class:"template-id"},Ot={class:"config-section"},Bt={class:"section-header"},Wt={class:"generator-content"},jt=["placeholder"],Ht={class:"generator-actions"},zt=["disabled"],Jt=["disabled"],Gt={class:"config-section"},Xt={class:"section-header"},Kt={class:"section-actions"},Qt=["disabled","title"],Yt=["disabled","title"],Zt=["disabled"],en=["placeholder"],tn={class:"config-section"},nn={class:"section-header"},sn={class:"execution-content"},on={class:"params-input-group"},an={class:"params-help-text"},ln={class:"params-input-container"},cn=["placeholder"],rn=["title"],un={class:"api-url-display"},dn={class:"api-url-label"},pn={class:"api-url"},hn={class:"api-url-display"},gn={class:"api-url-label"},mn=["disabled"],vn=Ce({__name:"index",emits:["planExecutionRequested"],setup(T,{expose:n,emit:s}){const{t:d}=Ie(),E=["currentPlanId","userRequest","rootPlanId"],u=_e({get(){try{if(!f.jsonContent)return"";const g={...JSON.parse(f.jsonContent)};return E.forEach(S=>{delete g[S]}),JSON.stringify(g,null,2)}catch{return f.jsonContent}},set(o){try{if(!o.trim()){f.jsonContent="";return}const g=JSON.parse(o);let S={};try{S=JSON.parse(f.jsonContent||"{}")}catch{}const K={...g};E.forEach(U=>{S[U]!==void 0&&(K[U]=S[U])}),f.jsonContent=JSON.stringify(K)}catch{f.jsonContent=o}}}),$=s,x=async()=>{try{const o=await f.saveTemplate();o!=null&&o.duplicate?alert(d("sidebar.saveCompleted",{message:o.message,versionCount:o.versionCount})):o!=null&&o.saved?alert(d("sidebar.saveSuccess",{message:o.message,versionCount:o.versionCount})):o!=null&&o.message&&alert(d("sidebar.saveStatus",{message:o.message}))}catch(o){console.error("Failed to save plan modifications:",o),alert(o.message||d("sidebar.saveFailed"))}},O=async()=>{var o;try{await f.generatePlan(),alert(d("sidebar.generateSuccess",{templateId:((o=f.selectedTemplate)==null?void 0:o.id)??d("sidebar.unknown")}))}catch(g){console.error("Failed to generate plan:",g),alert(d("sidebar.generateFailed")+": "+g.message)}},P=async()=>{try{await f.updatePlan(),alert(d("sidebar.updateSuccess"))}catch(o){console.error("Failed to update plan:",o),alert(d("sidebar.updateFailed")+": "+o.message)}},B=async()=>{console.log("[Sidebar] handleExecutePlan called");try{const o=f.preparePlanExecution();if(!o){console.log("[Sidebar] No plan data available, returning");return}console.log("[Sidebar] Triggering plan execution request:",o),console.log("[Sidebar] Emitting planExecutionRequested event"),$("planExecutionRequested",o),console.log("[Sidebar] Event emitted")}catch(o){console.error("Error executing plan:",o),alert(d("sidebar.executeFailed")+": "+o.message)}finally{f.finishPlanExecution()}},X=o=>{if(isNaN(o.getTime()))return console.warn("Invalid date received:",o),d("time.unknown");const S=new Date().getTime()-o.getTime(),K=Math.floor(S/6e4),U=Math.floor(S/36e5),q=Math.floor(S/864e5);return K<1?d("time.now"):K<60?d("time.minuteAgo",{count:K}):U<24?d("time.hourAgo",{count:U}):q<30?d("time.dayAgo",{count:q}):o.toLocaleDateString("zh-CN")},G=(o,g)=>!o||o.length<=g?o:o.substring(0,g)+"...";return Se(()=>{f.loadPlanTemplateList()}),n({loadPlanTemplateList:f.loadPlanTemplateList,toggleSidebar:f.toggleSidebar,currentPlanTemplateId:f.currentPlanTemplateId}),(o,g)=>(h(),m("div",{class:te(["sidebar-wrapper",{"sidebar-wrapper-collapsed":i(f).isCollapsed}])},[e("div",ft,[e("div",bt,[e("div",kt,l(o.$t("sidebar.title")),1)]),e("div",_t,[e("button",{class:te(["tab-button",{active:i(f).currentTab==="list"}]),onClick:g[0]||(g[0]=S=>i(f).switchToTab("list"))},[k(i(C),{icon:"carbon:list",width:"16"}),Y(" "+l(o.$t("sidebar.templateList")),1)],2),e("button",{class:te(["tab-button",{active:i(f).currentTab==="config"}]),onClick:g[1]||(g[1]=S=>i(f).switchToTab("config")),disabled:!i(f).selectedTemplate},[k(i(C),{icon:"carbon:settings",width:"16"}),Y(" "+l(o.$t("sidebar.configuration")),1)],10,$t)]),i(f).currentTab==="list"?(h(),m("div",Pt,[e("div",Ct,[e("button",{class:"new-task-btn",onClick:g[2]||(g[2]=S=>i(f).createNewTemplate())},[k(i(C),{icon:"carbon:add",width:"16"}),Y(" "+l(o.$t("sidebar.newPlan"))+" ",1),g[11]||(g[11]=e("span",{class:"shortcut"},"⌘ K",-1))])]),e("div",St,[i(f).isLoading?(h(),m("div",yt,[k(i(C),{icon:"carbon:circle-dash",width:"20",class:"spinning"}),e("span",null,l(o.$t("sidebar.loading")),1)])):i(f).errorMessage?(h(),m("div",Et,[k(i(C),{icon:"carbon:warning",width:"20"}),e("span",null,l(i(f).errorMessage),1),e("button",{onClick:g[3]||(g[3]=(...S)=>i(f).loadPlanTemplateList&&i(f).loadPlanTemplateList(...S)),class:"retry-btn"},l(o.$t("sidebar.retry")),1)])):i(f).planTemplateList.length===0?(h(),m("div",wt,[k(i(C),{icon:"carbon:document",width:"32"}),e("span",null,l(o.$t("sidebar.noTemplates")),1)])):(h(!0),m(ge,{key:3},ve(i(f).sortedTemplates,S=>(h(),m("div",{key:S.id,class:te(["sidebar-content-list-item",{"sidebar-content-list-item-active":S.id===i(f).currentPlanTemplateId}]),onClick:K=>i(f).selectTemplate(S)},[e("div",It,[k(i(C),{icon:"carbon:document",width:"20"})]),e("div",Dt,[e("div",xt,l(S.title||o.$t("sidebar.unnamedPlan")),1),e("div",Rt,l(G(S.description||o.$t("sidebar.noDescription"),40)),1)]),e("div",At,l(X(i(f).parseDateTime(S.updateTime||S.createTime))),1),e("div",Mt,[e("button",{class:"delete-task-btn",title:o.$t("sidebar.deleteTemplate"),onClick:ie(K=>i(f).deleteTemplate(S),["stop"])},[k(i(C),{icon:"carbon:close",width:"16"})],8,Nt)])],10,Tt))),128))])])):i(f).currentTab==="config"?(h(),m("div",Ut,[i(f).selectedTemplate?(h(),m("div",Lt,[e("div",qt,[e("div",Ft,[e("h3",null,l(i(f).selectedTemplate.title||o.$t("sidebar.unnamedPlan")),1),e("span",Vt,"ID: "+l(i(f).selectedTemplate.id),1)]),e("button",{class:"back-to-list-btn",onClick:g[4]||(g[4]=S=>i(f).switchToTab("list"))},[k(i(C),{icon:"carbon:arrow-left",width:"16"})])]),e("div",Ot,[e("div",Bt,[k(i(C),{icon:"carbon:generate",width:"16"}),e("span",null,l(o.$t("sidebar.planGenerator")),1)]),e("div",Wt,[de(e("textarea",{"onUpdate:modelValue":g[5]||(g[5]=S=>i(f).generatorPrompt=S),class:"prompt-input",placeholder:o.$t("sidebar.generatorPlaceholder"),rows:"3"},null,8,jt),[[fe,i(f).generatorPrompt]]),e("div",Ht,[e("button",{class:"btn btn-primary btn-sm",onClick:O,disabled:i(f).isGenerating||!i(f).generatorPrompt.trim()},[k(i(C),{icon:i(f).isGenerating?"carbon:circle-dash":"carbon:generate",width:"14",class:te({spinning:i(f).isGenerating})},null,8,["icon","class"]),Y(" "+l(i(f).isGenerating?o.$t("sidebar.generating"):o.$t("sidebar.generatePlan")),1)],8,zt),e("button",{class:"btn btn-secondary btn-sm",onClick:P,disabled:i(f).isGenerating||!i(f).generatorPrompt.trim()||!i(f).jsonContent.trim()},[k(i(C),{icon:"carbon:edit",width:"14"}),Y(" "+l(o.$t("sidebar.updatePlan")),1)],8,Jt)])])]),e("div",Gt,[e("div",Xt,[k(i(C),{icon:"carbon:code",width:"16"}),e("span",null,l(o.$t("sidebar.jsonTemplate")),1),e("div",Kt,[e("button",{class:"btn btn-sm",onClick:g[6]||(g[6]=(...S)=>i(f).rollbackVersion&&i(f).rollbackVersion(...S)),disabled:!i(f).canRollback,title:o.$t("sidebar.rollback")},[k(i(C),{icon:"carbon:undo",width:"14"})],8,Qt),e("button",{class:"btn btn-sm",onClick:g[7]||(g[7]=(...S)=>i(f).restoreVersion&&i(f).restoreVersion(...S)),disabled:!i(f).canRestore,title:o.$t("sidebar.restore")},[k(i(C),{icon:"carbon:redo",width:"14"})],8,Yt),e("button",{class:"btn btn-primary btn-sm",onClick:x,disabled:i(f).isGenerating||i(f).isExecuting},[k(i(C),{icon:"carbon:save",width:"14"})],8,Zt)])]),de(e("textarea",{"onUpdate:modelValue":g[8]||(g[8]=S=>u.value=S),class:"json-editor",placeholder:o.$t("sidebar.jsonPlaceholder"),rows:"12"},null,8,en),[[fe,u.value]])]),e("div",tn,[e("div",nn,[k(i(C),{icon:"carbon:play",width:"16"}),e("span",null,l(o.$t("sidebar.executionController")),1)]),e("div",sn,[e("div",on,[e("label",null,l(o.$t("sidebar.executionParams")),1),e("div",an,l(o.$t("sidebar.executionParamsHelp")),1),e("div",ln,[de(e("input",{"onUpdate:modelValue":g[9]||(g[9]=S=>i(f).executionParams=S),class:"params-input",placeholder:o.$t("sidebar.executionParamsPlaceholder")},null,8,cn),[[fe,i(f).executionParams]]),e("button",{class:"clear-params-btn",onClick:g[10]||(g[10]=(...S)=>i(f).clearExecutionParams&&i(f).clearExecutionParams(...S)),title:o.$t("sidebar.clearParams")},[k(i(C),{icon:"carbon:close",width:"12"})],8,rn)])]),e("div",un,[e("span",dn,l(o.$t("sidebar.apiUrl"))+":",1),e("code",pn,l(i(f).computedApiUrl),1)]),e("div",hn,[e("span",gn,l(o.$t("sidebar.statusApiUrl"))+":",1),g[12]||(g[12]=e("code",{class:"api-url"},"/api/executor/details/{planId}",-1))]),e("button",{class:"btn btn-primary execute-btn",onClick:B,disabled:i(f).isExecuting||i(f).isGenerating},[k(i(C),{icon:i(f).isExecuting?"carbon:circle-dash":"carbon:play",width:"16",class:te({spinning:i(f).isExecuting})},null,8,["icon","class"]),Y(" "+l(i(f).isExecuting?o.$t("sidebar.executing"):o.$t("sidebar.executePlan")),1)],8,mn)])])])):F("",!0)])):F("",!0)])],2))}}),fn=ye(vn,[["__scopeId","data-v-3c0cf310"]]);class qe{static async sendMessage(n){return ht.withLlmCheck(async()=>{const s=await fetch(`${this.BASE_URL}/execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:n})});if(!s.ok)throw new Error(`API request failed: ${s.status}`);return await s.json()})}}he(qe,"BASE_URL","/api/executor");class Fe{static async getDetails(n){try{const s=await fetch(`${this.BASE_URL}/details/${n}`);if(s.status===404)return null;if(!s.ok){const u=await s.text();throw new Error(`Failed to get detailed information: ${s.status} - ${u}`)}const d=await s.text(),E=JSON.parse(d);return E&&typeof E=="object"&&!E.currentPlanId&&(E.currentPlanId=n),E}catch(s){return console.error("[CommonApiService] Failed to get plan details:",s),{currentPlanId:n,status:"failed",message:s instanceof Error?s.message:"Failed to save, please retry"}}}static async submitFormInput(n,s){const d=await fetch(`${this.BASE_URL}/submit-input/${n}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!d.ok){let u;try{u=await d.json()}catch{u={message:`Failed to submit form input: ${d.status}`}}throw new Error(u.message||`Failed to submit form input: ${d.status}`)}const E=d.headers.get("content-type");return E&&E.indexOf("application/json")!==-1?await d.json():{success:!0}}static async getAllPrompts(){try{const n=await fetch(this.BASE_URL);return await(await this.handleResponse(n)).json()}catch(n){throw console.error("Failed to get Prompt list:",n),n}}static async handleResponse(n){if(!n.ok)try{const s=await n.json();throw new Error(s.message||`API request failed: ${n.status}`)}catch{throw new Error(`API request failed: ${n.status} ${n.statusText}`)}return n}}he(Fe,"BASE_URL","/api/executor");const Pe=class Pe{constructor(){he(this,"POLL_INTERVAL",5e3);he(this,"state",at({activePlanId:null,lastSequenceSize:0,isPolling:!1,pollTimer:null}));he(this,"callbacks",{});he(this,"planExecutionCache",new Map);he(this,"uiStateCache",new Map);console.log("[PlanExecutionManager] Initialized with callback-based event system")}getCachedPlanRecord(n){return this.planExecutionCache.get(n)}getCachedUIState(n){return this.uiStateCache.get(n)}setCachedUIState(n,s){this.uiStateCache.set(n,s),console.log(`[PlanExecutionManager] Cached UI state for rootPlanId: ${n}`)}getAllCachedRecords(){return new Map(this.planExecutionCache)}hasCachedPlanRecord(n){return this.planExecutionCache.has(n)}setCachedPlanRecord(n,s){this.planExecutionCache.set(n,s),console.log(`[PlanExecutionManager] Cached plan execution record for rootPlanId: ${n}`)}clearCachedPlanRecord(n){const s=this.planExecutionCache.delete(n);return s&&console.log(`[PlanExecutionManager] Cleared cached plan execution record for rootPlanId: ${n}`),s}clearAllCachedRecords(){const n=this.planExecutionCache.size,s=this.uiStateCache.size;this.planExecutionCache.clear(),this.uiStateCache.clear(),console.log(`[PlanExecutionManager] Cleared all caches - Plans: ${n}, UI States: ${s}`)}static getInstance(){return Pe.instance||(Pe.instance=new Pe),Pe.instance}getActivePlanId(){return this.state.activePlanId}getState(){return this.state}setEventCallbacks(n){this.callbacks={...this.callbacks,...n},console.log("[PlanExecutionManager] Event callbacks set:",Object.keys(n))}async handleUserMessageSendRequested(n){if(this.validateAndPrepareUIForNewRequest(n))try{if(await this.sendUserMessageAndSetPlanId(n),this.state.activePlanId)this.initiatePlanExecutionSequence(n,this.state.activePlanId);else throw new Error("Failed to get valid plan ID")}catch(s){console.error("[PlanExecutionManager] Failed to send user message:",s);const d=this.state.activePlanId??"error";this.setCachedUIState(d,{enabled:!0}),this.emitChatInputUpdateState(d),this.state.activePlanId=null}}handlePlanExecutionRequested(n,s){console.log("[PlanExecutionManager] Received plan execution request:",{planId:n,query:s}),n?(this.state.activePlanId=n,this.initiatePlanExecutionSequence(s??"Execute Plan",n)):console.error("[PlanExecutionManager] Invalid plan execution request: missing planId")}handleCachedPlanExecution(n,s){const d=this.getCachedPlanRecord(n);return d!=null&&d.currentPlanId?(console.log(`[PlanExecutionManager] Found cached plan execution record for rootPlanId: ${n}`),this.handlePlanExecutionRequested(d.currentPlanId,s),!0):(console.log(`[PlanExecutionManager] No cached plan execution record found for rootPlanId: ${n}`),!1)}validateAndPrepareUIForNewRequest(n){if(!n)return console.warn("[PlanExecutionManager] Query is empty"),!1;if(this.state.activePlanId)return!1;this.emitChatInputClear();const s=this.state.activePlanId??"ui-state";return this.setCachedUIState(s,{enabled:!1,placeholder:"Processing..."}),this.emitChatInputUpdateState(s),!0}async sendUserMessageAndSetPlanId(n){try{const s=await qe.sendMessage(n);if(s!=null&&s.planId)return this.state.activePlanId=s.planId,s;if(s!=null&&s.planTemplateId)return this.state.activePlanId=s.planTemplateId,{...s,planId:s.planTemplateId};throw console.error("[PlanExecutionManager] Failed to get planId from response:",s),new Error("Failed to get valid planId from API response")}catch(s){throw console.error("[PlanExecutionManager] API call failed:",s),s}}initiatePlanExecutionSequence(n,s){console.log(`[PlanExecutionManager] Starting plan execution sequence for query: "${n}", planId: ${s}`);const d=s;this.emitDialogRoundStart(d),this.startPolling()}handlePlanCompletion(n){this.emitPlanCompleted(n.rootPlanId??""),this.state.lastSequenceSize=0,this.stopPolling();try{setTimeout(async()=>{if(this.state.activePlanId)try{await Ae.deletePlanTemplate(this.state.activePlanId),console.log(`[PlanExecutionManager] Plan template ${this.state.activePlanId} deleted successfully`)}catch(s){console.log(`Delete plan execution record failed: ${s.message}`)}},5e3)}catch(s){console.log(`Delete plan execution record failed: ${s.message}`)}n.completed&&(this.state.activePlanId=null,this.emitChatInputUpdateState(n.rootPlanId??""))}handlePlanError(n){this.emitPlanError(n.message??""),this.state.lastSequenceSize=0,this.stopPolling();try{setTimeout(async()=>{if(this.state.activePlanId)try{await Ae.deletePlanTemplate(this.state.activePlanId),console.log(`[PlanExecutionManager] Plan template ${this.state.activePlanId} deleted successfully`)}catch(s){console.log(`Delete plan execution record failed: ${s.message}`)}},5e3)}catch(s){console.log(`Delete plan execution record failed: ${s.message}`)}}async pollPlanStatus(){if(this.state.activePlanId){if(this.state.isPolling){console.log("[PlanExecutionManager] Previous polling still in progress, skipping");return}try{this.state.isPolling=!0;const n=await this.getPlanDetails(this.state.activePlanId);if(!n){console.warn("[PlanExecutionManager] No details received from API");return}if(n.status&&n.status==="failed"){this.handlePlanError(n);return}if(n.rootPlanId&&this.setCachedPlanRecord(n.rootPlanId,n),!n.steps||n.steps.length===0){console.log("[PlanExecutionManager] Simple response without steps detected, handling as completed"),this.emitPlanUpdate(n.rootPlanId??""),this.handlePlanCompletion(n);return}this.emitPlanUpdate(n.rootPlanId??""),n.completed&&this.handlePlanCompletion(n)}catch(n){console.error("[PlanExecutionManager] Failed to poll plan status:",n)}finally{this.state.isPolling=!1}}}async getPlanDetails(n){try{const s=await Fe.getDetails(n);return s!=null&&s.rootPlanId&&(this.planExecutionCache.set(s.rootPlanId,s),console.log(`[PlanExecutionManager] Cached plan execution record for rootPlanId: ${s.rootPlanId}`)),s}catch(s){return console.error("[PlanExecutionManager] Failed to get plan details:",s),{currentPlanId:n,status:"failed",message:s instanceof Error?s.message:"Failed to get plan"}}}startPolling(){this.state.pollTimer&&clearInterval(this.state.pollTimer),this.state.pollTimer=window.setInterval(()=>{this.pollPlanStatus()},this.POLL_INTERVAL),console.log("[PlanExecutionManager] Started polling")}async pollPlanStatusImmediately(){console.log("[PlanExecutionManager] Polling plan status immediately"),await this.pollPlanStatus()}stopPolling(){this.state.pollTimer&&(clearInterval(this.state.pollTimer),this.state.pollTimer=null),console.log("[PlanExecutionManager] Stopped polling")}cleanup(){this.stopPolling(),this.state.activePlanId=null,this.state.lastSequenceSize=0,this.state.isPolling=!1,this.clearAllCachedRecords()}emitChatInputClear(){this.callbacks.onChatInputClear&&this.callbacks.onChatInputClear()}emitChatInputUpdateState(n){this.callbacks.onChatInputUpdateState&&this.callbacks.onChatInputUpdateState(n)}emitDialogRoundStart(n){this.callbacks.onDialogRoundStart&&this.callbacks.onDialogRoundStart(n)}emitPlanUpdate(n){this.callbacks.onPlanUpdate&&this.callbacks.onPlanUpdate(n)}emitPlanCompleted(n){this.callbacks.onPlanCompleted&&this.callbacks.onPlanCompleted(n)}emitPlanError(n){this.callbacks.onPlanError&&this.callbacks.onPlanError(n)}};he(Pe,"instance",null);let Le=Pe;const oe=Le.getInstance(),bn={class:"right-panel"},kn={class:"preview-header"},_n={class:"preview-tabs"},$n={class:"tab-button active"},Pn={class:"preview-content"},Cn={class:"step-details"},Sn={key:0,class:"step-info-fixed"},yn={key:0,class:"agent-info"},En={class:"info-item"},wn={class:"label"},Tn={class:"value"},In={class:"info-item"},Dn={class:"label"},xn={class:"value"},Rn={class:"info-item"},An={class:"label"},Mn={class:"value"},Nn={class:"info-item"},Un={class:"label"},Ln={class:"value"},qn={class:"info-item"},Fn={class:"label"},Vn={class:"execution-status"},On={class:"status-item"},Bn={class:"status-text"},Wn={key:0},jn={key:0,class:"think-act-steps"},Hn={class:"steps-container"},zn={class:"step-header"},Jn={class:"step-number"},Gn={class:"think-section"},Xn={class:"think-content"},Kn={class:"input"},Qn={class:"label"},Yn={class:"output"},Zn={class:"label"},es={key:0,class:"action-section"},ts={class:"action-content"},ns={class:"tool-info"},ss={class:"label"},os={class:"value"},as={class:"input"},ls={class:"label"},is={class:"output"},cs={class:"label"},rs={key:0,class:"sub-plan-section"},us={class:"sub-plan-content"},ds={class:"sub-plan-header"},ps={class:"sub-plan-info"},hs={class:"label"},gs={class:"value"},ms={key:0,class:"sub-plan-info"},vs={class:"label"},fs={class:"value"},bs={class:"sub-plan-status"},ks={class:"status-text"},_s={key:0,class:"no-steps-message"},$s={key:1,class:"no-execution-message"},Ps={class:"step-basic-info"},Cs={class:"info-item"},Ss={class:"label"},ys={class:"value"},Es={key:0,class:"info-item"},ws={class:"label"},Ts={class:"value"},Is={class:"info-item"},Ds={class:"label"},xs={class:"no-execution-hint"},Rs={key:2,class:"execution-indicator"},As={class:"execution-text"},Ms={key:1,class:"no-selection"},Ns=["title"],Us=Ce({__name:"index",setup(T,{expose:n}){const{t:s}=Ie(),d=D(),E=D(),u=D(),$=D(null),x=D(!1),O=D(!0),P=D(!0),B=_e(()=>u.value?u.value.completed?s("rightPanel.status.completed"):u.value.current?s("rightPanel.status.executing"):s("rightPanel.status.waiting"):""),X=v=>{var L;if(console.log(`[RightPanel] updateDisplayedPlanProgress called with rootPlanId: ${v}`),u.value&&$.value){const R=$.value.rootPlanId??E.value;if(R&&R!==v){console.log(`[RightPanel] Plan ID mismatch - skipping update. Current: ${R}, Requested: ${v}`);return}}console.log(`[RightPanel] Plan ID validation passed - proceeding with update for rootPlanId: ${v}`);const w=oe.getCachedPlanRecord(v);if(!w){console.warn(`[RightPanel] Plan data not found for rootPlanId: ${v}`);return}if(w.steps&&w.steps.length>0){const R=w.steps.length,y=(w.currentStepIndex??0)+1;console.log(`[RightPanel] Progress: ${y} / ${R}`)}if(u.value&&E.value&&(E.value===v||((L=$.value)==null?void 0:L.rootPlanId)===v)&&(console.log(`[RightPanel] Refreshing selected step details for plan: ${v}`),$.value)){const y=$.value,A=o(y.planId,y.rootPlanId,y.subPlanId);A?(g(A,y.stepIndex,y.planId,y.isSubPlan),V()):console.warn("[RightPanel] Could not find plan record for refresh:",y)}},G=(v,w,L,R,y)=>{console.log("[RightPanel] Step selected:",{planId:v,stepIndex:w,rootPlanId:L,subPlanId:R,subStepIndex:y});const A=!!(L&&R&&y!==void 0);$.value={planId:v,stepIndex:w,isSubPlan:A,...A&&{rootPlanId:L,subPlanId:R,subStepIndex:y}};const ee=o(v,L,R);if(!ee){console.warn("[RightPanel] Plan data not found:",{planId:v,rootPlanId:L,subPlanId:R}),u.value=null,$.value=null;return}g(ee,w,v,A)},o=(v,w,L)=>{var A;if(!w||!L)return oe.getCachedPlanRecord(v)??null;const R=oe.getCachedPlanRecord(v);if(R)return R;const y=oe.getCachedPlanRecord(w);if(!(y!=null&&y.agentExecutionSequence))return null;for(const ee of y.agentExecutionSequence)if(ee.thinkActSteps){for(const se of ee.thinkActSteps)if(((A=se.subPlanExecutionRecord)==null?void 0:A.currentPlanId)===L)return se.subPlanExecutionRecord}return null},g=(v,w,L,R)=>{var ke,re,b,c,_;if(!v.steps||w>=v.steps.length){u.value=null,$.value=null,console.warn("[RightPanel] Invalid step data:",{planId:L,stepIndex:w,hasSteps:!!v.steps,stepsLength:(ke=v.steps)==null?void 0:ke.length,message:"Invalid step index"});return}E.value=L;const y=v.steps[w],A=(re=v.agentExecutionSequence)==null?void 0:re[w];console.log("[RightPanel] Step data details:",{planId:L,stepIndex:w,step:y,hasAgentExecutionSequence:!!v.agentExecutionSequence,agentExecutionSequenceLength:(b=v.agentExecutionSequence)==null?void 0:b.length,agentExecution:A,hasThinkActSteps:!!(A!=null&&A.thinkActSteps),thinkActStepsLength:(c=A==null?void 0:A.thinkActSteps)==null?void 0:c.length,isSubPlan:R});const ee=(A==null?void 0:A.status)==="FINISHED",se=!ee&&w===v.currentStepIndex&&!v.completed,me={planId:L,index:w,title:typeof y=="string"?y:y.title||y.description||y.name||`${R?"Sub ":""}Step ${w+1}`,description:typeof y=="string"?y:y.description||y,completed:ee,current:se};A&&(me.agentExecution=A),u.value=me,console.log("[RightPanel] Step details updated:",{planId:L,stepIndex:w,stepTitle:u.value.title,hasAgentExecution:!!A,hasThinkActSteps:(((_=A==null?void 0:A.thinkActSteps)==null?void 0:_.length)??0)>0,completed:ee,current:se,planCurrentStep:v.currentStepIndex,planCompleted:v.completed,isSubPlan:R}),A!=null&&A.thinkActSteps&&A.thinkActSteps.forEach((I,t)=>{I.subPlanExecutionRecord&&console.log(`[RightPanel] Found sub-plan in thinkActStep ${t}:`,I.subPlanExecutionRecord)}),setTimeout(()=>{U()},100),V()},S=(v,w,L,R)=>{console.log("[RightPanel] Sub plan step selected (delegating to unified handler):",{rootPlanId:v,subPlanId:w,stepIndex:L,subStepIndex:R}),G(w,R,v,w,R)},K=v=>{d.value=v??void 0},U=()=>{if(!d.value)return;const{scrollTop:v,scrollHeight:w,clientHeight:L}=d.value,R=w-v-L<50,y=w>L;O.value=R,x.value=y&&!R,R?P.value=!0:w-v-L>100&&(P.value=!1),console.log("[RightPanel] Scroll state check:",{scrollTop:v,scrollHeight:w,clientHeight:L,isAtBottom:R,hasScrollableContent:y,showButton:x.value,shouldAutoScroll:P.value})},q=()=>{d.value&&(d.value.scrollTo({top:d.value.scrollHeight,behavior:"smooth"}),ne(()=>{P.value=!0,U()}))},V=()=>{!P.value||!d.value||ne(()=>{d.value&&(d.value.scrollTop=d.value.scrollHeight,console.log("[RightPanel] Auto scroll to bottom"))})},Q=v=>{if(v===null||typeof v>"u"||v==="")return"N/A";try{const w=typeof v=="object"?v:JSON.parse(v);return JSON.stringify(w,null,2)}catch{return String(v)}},ce=()=>{u.value=null,E.value=void 0,P.value=!0,d.value&&d.value.removeEventListener("scroll",U)},be=()=>{const v=()=>{const w=d.value;return w?(K(w),w.addEventListener("scroll",U),P.value=!0,U(),console.log("[RightPanel] Scroll listener initialized successfully"),!0):(console.log("[RightPanel] Scroll container not found, retrying..."),!1)};ne(()=>{v()||setTimeout(()=>{v()},100)})};return Se(()=>{console.log("[RightPanel] Component mounted"),ne(()=>{be()})}),De(()=>{console.log("[RightPanel] Component unmounting, cleaning up..."),$.value=null,ce()}),n({updateDisplayedPlanProgress:X,handleStepSelected:G,handleSubPlanStepSelected:S}),(v,w)=>{var L,R;return h(),m("div",bn,[e("div",kn,[e("div",_n,[e("button",$n,[k(i(C),{icon:"carbon:events"}),Y(" "+l(i(s)("rightPanel.stepExecutionDetails")),1)])])]),e("div",Pn,[e("div",Cn,[u.value?(h(),m("div",Sn,[e("h3",null,l(u.value.title||u.value.description||i(s)("rightPanel.defaultStepTitle",{number:u.value.index+1})),1),u.value.agentExecution?(h(),m("div",yn,[e("div",En,[e("span",wn,l(i(s)("rightPanel.executingAgent"))+":",1),e("span",Tn,l(u.value.agentExecution.agentName),1)]),e("div",In,[e("span",Dn,l(i(s)("rightPanel.description"))+":",1),e("span",xn,l(u.value.agentExecution.agentDescription||""),1)]),e("div",Rn,[e("span",An,l(i(s)("rightPanel.callingModel"))+":",1),e("span",Mn,l(u.value.agentExecution.modelName),1)]),e("div",Nn,[e("span",Un,l(i(s)("rightPanel.request"))+":",1),e("span",Ln,l(u.value.agentExecution.agentRequest||""),1)]),e("div",qn,[e("span",Fn,l(i(s)("rightPanel.executionResult"))+":",1),e("span",{class:te(["value",{success:u.value.agentExecution.status==="FINISHED"}])},l(u.value.agentExecution.status||i(s)("rightPanel.executing")),3)])])):F("",!0),e("div",Vn,[e("div",On,[u.value.completed?(h(),ue(i(C),{key:0,icon:"carbon:checkmark-filled",class:"status-icon success"})):u.value.current?(h(),ue(i(C),{key:1,icon:"carbon:in-progress",class:"status-icon progress"})):(h(),ue(i(C),{key:2,icon:"carbon:time",class:"status-icon pending"})),e("span",Bn,l(B.value),1)])])])):F("",!0),e("div",{ref_key:"scrollContainer",ref:d,class:"step-details-scroll-container",onScroll:U},[u.value?(h(),m("div",Wn,[(L=u.value.agentExecution)!=null&&L.thinkActSteps&&u.value.agentExecution.thinkActSteps.length>0?(h(),m("div",jn,[e("h4",null,l(i(s)("rightPanel.thinkAndActionSteps")),1),e("div",Hn,[(h(!0),m(ge,null,ve(u.value.agentExecution.thinkActSteps,(y,A)=>(h(),m("div",{key:A,class:"think-act-step"},[e("div",zn,[e("span",Jn,"#"+l(A+1),1),e("span",{class:te(["step-status",y.status])},l(y.status||i(s)("rightPanel.executing")),3)]),e("div",Gn,[e("h5",null,[k(i(C),{icon:"carbon:thinking"}),Y(" "+l(i(s)("rightPanel.thinking")),1)]),e("div",Xn,[e("div",Kn,[e("span",Qn,l(i(s)("rightPanel.input"))+":",1),e("pre",null,l(Q(y.thinkInput)),1)]),e("div",Yn,[e("span",Zn,l(i(s)("rightPanel.output"))+":",1),e("pre",null,l(Q(y.thinkOutput)),1)])])]),y.actionNeeded?(h(),m("div",es,[e("h5",null,[k(i(C),{icon:"carbon:play"}),Y(" "+l(i(s)("rightPanel.action")),1)]),e("div",ts,[(h(!0),m(ge,null,ve(y.actToolInfoList,(ee,se)=>(h(),m("div",{key:se},[e("div",ns,[e("span",ss,l(i(s)("rightPanel.tool"))+":",1),e("span",os,l(ee.name||""),1)]),e("div",as,[e("span",ls,l(i(s)("rightPanel.toolParameters"))+":",1),e("pre",null,l(Q(ee.parameters)),1)]),e("div",is,[e("span",cs,l(i(s)("rightPanel.executionResult"))+":",1),e("pre",null,l(Q(ee.result)),1)])]))),128))]),y.subPlanExecutionRecord?(h(),m("div",rs,[e("h5",null,[k(i(C),{icon:"carbon:tree-view"}),Y(" "+l(i(s)("rightPanel.subPlan")),1)]),e("div",us,[e("div",ds,[e("div",ps,[e("span",hs,l(v.$t("rightPanel.subPlanId"))+":",1),e("span",gs,l(y.subPlanExecutionRecord.currentPlanId),1)]),y.subPlanExecutionRecord.title?(h(),m("div",ms,[e("span",vs,l(v.$t("rightPanel.title"))+":",1),e("span",fs,l(y.subPlanExecutionRecord.title),1)])):F("",!0),e("div",bs,[y.subPlanExecutionRecord.completed?(h(),ue(i(C),{key:0,icon:"carbon:checkmark-filled",class:"status-icon success"})):(h(),ue(i(C),{key:1,icon:"carbon:in-progress",class:"status-icon progress"})),e("span",ks,l(y.subPlanExecutionRecord.completed?v.$t("rightPanel.status.completed"):v.$t("rightPanel.status.executing")),1)])])])])):F("",!0)])):F("",!0)]))),128))]),u.value.agentExecution&&!((R=u.value.agentExecution.thinkActSteps)!=null&&R.length)?(h(),m("div",_s,[e("p",null,l(i(s)("rightPanel.noStepDetails")),1)])):u.value.agentExecution?F("",!0):(h(),m("div",$s,[k(i(C),{icon:"carbon:information",class:"info-icon"}),e("h4",null,l(i(s)("rightPanel.stepInfo")),1),e("div",Ps,[e("div",Cs,[e("span",Ss,l(i(s)("rightPanel.stepName"))+":",1),e("span",ys,l(u.value.title||u.value.description||v.$t("rightPanel.stepNumber",{number:u.value.index+1})),1)]),u.value.description?(h(),m("div",Es,[e("span",ws,l(v.$t("rightPanel.description"))+":",1),e("span",Ts,l(u.value.description),1)])):F("",!0),e("div",Is,[e("span",Ds,l(v.$t("rightPanel.status.label"))+":",1),e("span",{class:te(["value",{"status-completed":u.value.completed,"status-current":u.value.current,"status-pending":!u.value.completed&&!u.value.current}])},l(u.value.completed?v.$t("rightPanel.status.completed"):u.value.current?v.$t("rightPanel.status.executing"):v.$t("rightPanel.status.pending")),3)])]),e("p",xs,l(i(s)("rightPanel.noExecutionInfo")),1)])),u.value.current&&!u.value.completed?(h(),m("div",Rs,[w[0]||(w[0]=e("div",{class:"execution-waves"},[e("div",{class:"wave wave-1"}),e("div",{class:"wave wave-2"}),e("div",{class:"wave wave-3"})],-1)),e("p",As,[k(i(C),{icon:"carbon:in-progress",class:"rotating-icon"}),Y(" "+l(i(s)("rightPanel.stepExecuting")),1)])])):F("",!0)])):(h(),m("div",Ms,[k(i(C),{icon:"carbon:events",class:"empty-icon"}),e("h3",null,l(i(s)("rightPanel.noStepSelected")),1),e("p",null,l(i(s)("rightPanel.selectStepHint")),1)]))])):F("",!0),k(xe,{name:"scroll-button"},{default:Re(()=>[x.value?(h(),m("button",{key:0,onClick:q,class:"scroll-to-bottom-btn",title:i(s)("rightPanel.scrollToBottom")},[k(i(C),{icon:"carbon:chevron-down"})],8,Ns)):F("",!0)]),_:1})],544)])])])}}}),Ls=ye(Us,[["__scopeId","data-v-3c3758b3"]]);function qs(){const T=oe,n=_e(()=>T.getActivePlanId()),s=_e(()=>T.getState()),d=_e(()=>s.value.isPolling),E=_e(()=>!!n.value),u=(P,B)=>{T.initiatePlanExecutionSequence(P,B)},$=()=>{T.stopPolling()},x=()=>{T.startPolling()},O=()=>{T.cleanup()};return De(()=>{O()}),{activePlanId:n,state:s,isPolling:d,hasActivePlan:E,startExecution:u,stopPolling:$,startPolling:x,cleanup:O}}const Fs={class:"chat-container"},Vs={class:"message-content"},Os={key:0,class:"user-message"},Bs={key:1,class:"assistant-message"},Ws={key:0,class:"thinking-section"},js={class:"thinking-header"},Hs={class:"thinking-avatar"},zs={class:"thinking-label"},Js={class:"thinking-content"},Gs={key:0,class:"thinking"},Xs={key:1,class:"progress"},Ks={class:"progress-bar"},Qs={class:"progress-text"},Ys={key:2,class:"steps-container"},Zs={class:"steps-title"},eo=["onClick"],to={class:"section-header"},no={class:"step-icon"},so={class:"step-title"},oo={key:0,class:"step-status current"},ao={key:1,class:"step-status completed"},lo={key:2,class:"step-status pending"},io={key:0,class:"action-info"},co={class:"action-description"},ro={class:"action-icon"},uo={key:0,class:"tool-params"},po={class:"param-label"},ho={class:"param-content"},go={key:1,class:"think-details"},mo={class:"think-header"},vo={class:"think-label"},fo={class:"think-output"},bo={class:"think-content"},ko={key:1,class:"sub-plan-steps"},_o={class:"sub-plan-header"},$o={class:"sub-plan-title"},Po={class:"sub-plan-step-list"},Co=["onClick"],So={class:"sub-step-indicator"},yo={class:"sub-step-icon"},Eo={class:"sub-step-number"},wo={class:"sub-step-content"},To={class:"sub-step-title"},Io={class:"sub-step-badge"},Do={key:2,class:"user-input-form-container"},xo={class:"user-input-message"},Ro={key:0,class:"form-description"},Ao=["onSubmit"],Mo=["for"],No=["id","name","onUpdate:modelValue"],Uo={key:1,class:"form-group"},Lo={for:"form-input-genericInput"},qo=["onUpdate:modelValue"],Fo={type:"submit",class:"submit-user-input-btn"},Vo={key:3,class:"default-processing"},Oo={class:"processing-indicator"},Bo={class:"response-section"},Wo={class:"response-header"},jo={class:"response-avatar"},Ho={class:"response-name"},zo={class:"response-content"},Jo={key:0,class:"final-response"},Go=["innerHTML"],Xo={key:1,class:"response-placeholder"},Ko={class:"typing-indicator"},Qo={class:"typing-text"},Yo={key:0,class:"message assistant"},Zo={class:"message-content"},ea={class:"assistant-message"},ta={class:"thinking-section"},na={class:"thinking-header"},sa={class:"thinking-avatar"},oa={class:"thinking-label"},aa={class:"thinking-content"},la={class:"default-processing"},ia={class:"processing-indicator"},ca={class:"response-section"},ra={class:"response-header"},ua={class:"response-avatar"},da={class:"response-name"},pa={class:"response-content"},ha={class:"response-placeholder"},ga={class:"typing-indicator"},ma={class:"typing-text"},va=["title"],fa=Ce({__name:"index",props:{mode:{default:"plan"},initialPrompt:{default:""}},emits:["step-selected","sub-plan-step-selected"],setup(T,{expose:n,emit:s}){const d=T,E=s,{t:u}=Ie(),$=qs(),x=D(),O=D(!1),P=D([]),B=D(),X=D(!1),G=at({}),o=(t,a,r)=>{const p={id:Date.now().toString(),type:t,content:a,timestamp:new Date,...r};return t==="assistant"&&!p.thinking&&!p.content&&(p.thinking=u("chat.thinking")),P.value.push(p),p},g=t=>{const a=P.value[P.value.length-1];a.type==="assistant"&&Object.assign(a,t)},S=async t=>{try{O.value=!0;const a=o("assistant","",{thinking:u("chat.thinkingProcessing")}),r=await qe.sendMessage(t);if(r.planId)console.log("[ChatComponent] Received planId from direct execution:",r.planId),a.planExecution||(a.planExecution={}),a.planExecution.currentPlanId=r.planId,oe.handlePlanExecutionRequested(r.planId,t),delete a.thinking,console.log("[ChatComponent] Started polling for plan execution updates");else{delete a.thinking;const p=K(r,t);a.content=p}}catch(a){console.error("Direct mode error:",a),g({content:U(a)})}finally{O.value=!1}},K=(t,a)=>t.result??t.message??t.content??"",U=t=>{const a=(t==null?void 0:t.message)??(t==null?void 0:t.toString())??u("chat.unknownError");return a.includes("network")||a.includes("timeout")?u("chat.networkError"):a.includes("auth")||a.includes("unauthorized")?u("chat.authError"):a.includes("invalid")||a.includes("format")||a.includes("parameter")?u("chat.formatError"):`${u("chat.unknownError")} (${a})`},q=(t=!1)=>{ne(()=>{if(x.value){const a=x.value;(t||a.scrollHeight-a.scrollTop-a.clientHeight<150)&&a.scrollTo({top:a.scrollHeight,behavior:t?"auto":"smooth"})}})},V=()=>{q(!0),X.value=!1},Q=()=>{if(x.value){const t=x.value,a=t.scrollHeight-t.scrollTop-t.clientHeight<150;X.value=!a&&P.value.length>0}},ce=()=>{x.value&&x.value.addEventListener("scroll",Q)},be=()=>{x.value&&x.value.removeEventListener("scroll",Q)},v=t=>{o("user",t),d.mode==="plan"?console.log("[ChatComponent] Plan mode message sent, parent should handle:",t):S(t)},w=(t,a)=>{var W;const r=((W=t.planExecution)==null?void 0:W.agentExecutionSequence)??[];return a<0||a>=r.length?"IDLE":r[a].status??"IDLE"},L=(t,a)=>{var r,p;if(!((r=t.planExecution)!=null&&r.currentPlanId)){console.warn("[ChatComponent] Cannot handle step click: missing currentPlanId");return}console.log("[ChatComponent] Step clicked:",{planId:t.planExecution.currentPlanId,stepIndex:a,stepTitle:(p=t.planExecution.steps)==null?void 0:p[a]}),E("step-selected",t.planExecution.currentPlanId,a)},R=(t,a)=>{var r;try{const p=(r=t.planExecution)==null?void 0:r.agentExecutionSequence;if(!(p!=null&&p.length))return console.log("[ChatComponent] No agentExecutionSequence found"),[];const W=p[a];if(!W)return console.log(`[ChatComponent] No agentExecution found for step ${a}`),[];if(!W.thinkActSteps)return console.log(`[ChatComponent] No thinkActSteps found for step ${a}`),[];for(const N of W.thinkActSteps)if(N.subPlanExecutionRecord)return console.log(`[ChatComponent] Found sub-plan for step ${a}:`,N.subPlanExecutionRecord),(N.subPlanExecutionRecord.steps??[]).map(j=>typeof j=="string"?j:typeof j=="object"&&j!==null&&(j.title||j.description)||u("rightPanel.subStep"));return[]}catch(p){return console.warn("[ChatComponent] Error getting sub-plan steps:",p),[]}},y=(t,a,r)=>{var p;try{const W=(p=t.planExecution)==null?void 0:p.agentExecutionSequence;if(!(W!=null&&W.length))return"pending";const N=W[a];if(!N||!N.thinkActSteps)return"pending";let Z=null;for(const H of N.thinkActSteps)if(H.subPlanExecutionRecord){Z=H.subPlanExecutionRecord;break}if(!Z)return"pending";const j=Z.currentStepIndex;return Z.completed?"completed":j==null?r===0?"current":"pending":r{var p,W;try{const N=(p=t.planExecution)==null?void 0:p.agentExecutionSequence;if(!(N!=null&&N.length)){console.warn("[ChatComponent] No agentExecutionSequence data for sub-plan step click");return}const Z=N[a];if(!Z){console.warn("[ChatComponent] No agentExecution found for step",a);return}if(!Z.thinkActSteps){console.warn("[ChatComponent] No thinkActSteps found for step",a);return}let j=null;for(const H of Z.thinkActSteps)if(H.subPlanExecutionRecord){j=H.subPlanExecutionRecord;break}if(!(j!=null&&j.currentPlanId)){console.warn("[ChatComponent] No sub-plan data for step click");return}E("sub-plan-step-selected",((W=t.planExecution)==null?void 0:W.currentPlanId)??"",j.currentPlanId,a,r)}catch(N){console.error("[ChatComponent] Error handling sub-plan step click:",N)}},ee=(t,a)=>{var p,W,N,Z;if(!((p=t.planExecution)!=null&&p.steps))return;console.log("[ChatComponent] Starting to update step actions, steps count:",t.planExecution.steps.length,"execution sequence:",((W=a.agentExecutionSequence)==null?void 0:W.length)??0);const r=new Array(t.planExecution.steps.length).fill(null);if((N=a.agentExecutionSequence)!=null&&N.length){const j=Math.min(a.agentExecutionSequence.length,t.planExecution.steps.length);for(let H=0;Hj==null?void 0:j.actionDescription))),ne(()=>{console.log("[ChatComponent] UI update completed via reactivity")})},se=t=>{console.log("[ChatComponent] Starting dialog round with planId:",t),t&&(P.value.findIndex(r=>{var p;return((p=r.planExecution)==null?void 0:p.currentPlanId)===t&&r.type==="assistant"})===-1?(o("assistant","",{planExecution:{currentPlanId:t},thinking:u("chat.preparingExecution")}),console.log("[ChatComponent] Created new assistant message for planId:",t)):console.log("[ChatComponent] Found existing assistant message for planId:",t))},me=t=>{var N,Z,j,H;console.log("[ChatComponent] Processing plan update with rootPlanId:",t);const a=oe.getCachedPlanRecord(t);if(!a){console.warn("[ChatComponent] No cached plan data found for rootPlanId:",t);return}if(console.log("[ChatComponent] Retrieved plan details from cache:",a),console.log("[ChatComponent] Plan steps:",a.steps),console.log("[ChatComponent] Plan completed:",a.completed),!a.currentPlanId){console.warn("[ChatComponent] Plan update missing currentPlanId");return}const r=P.value.findIndex(M=>{var z;return((z=M.planExecution)==null?void 0:z.currentPlanId)===a.currentPlanId&&M.type==="assistant"});let p;if(r!==-1)p=P.value[r],console.log("[ChatComponent] Found existing assistant message for currentPlanId:",a.currentPlanId);else{console.warn("[ChatComponent] No existing assistant message found for currentPlanId:",a.currentPlanId),console.log("[ChatComponent] Current messages:",P.value.map(z=>{var ae;return{type:z.type,planId:(ae=z.planExecution)==null?void 0:ae.currentPlanId,content:z.content.substring(0,50)}}));let M=-1;for(let z=P.value.length-1;z>=0;z--)if(P.value[z].type==="assistant"){M=z;break}if(M!==-1)p=P.value[M],p.planExecution||(p.planExecution={}),p.planExecution.currentPlanId=a.currentPlanId,console.log("[ChatComponent] Using last assistant message and updating planExecution.currentPlanId to:",a.currentPlanId);else{console.error("[ChatComponent] No assistant message found at all, this should not happen");return}}if(p.planExecution||(p.planExecution={}),p.planExecution=JSON.parse(JSON.stringify(a)),!a.steps||a.steps.length===0){if(console.log("[ChatComponent] Handling simple response without steps"),a.completed){delete p.thinking;const M=a.summary??a.result??a.message??u("chat.executionCompleted");p.content=ke(M),console.log("[ChatComponent] Set simple response content:",p.content)}else a.title&&(p.thinking=`${u("chat.thinkingExecuting",{title:a.title})}`);return}delete p.thinking;const W=a.steps.map(M=>typeof M=="string"?M:typeof M=="object"&&M!==null&&(M.title||M.description)||u("chat.step"));if(p.planExecution&&(p.planExecution.steps=W),a.agentExecutionSequence&&a.agentExecutionSequence.length>0){console.log("[ChatComponent] Found execution sequence data, count:",a.agentExecutionSequence.length),ee(p,a);const M=a.currentStepIndex??0;if(M>=0&&M0){const Ee=ae[ae.length-1];if(Ee.thinkOutput){const Me=Ee.thinkOutput.length>150?Ee.thinkOutput.substring(0,150)+"...":Ee.thinkOutput;p.thinking=`${u("chat.thinking")}: ${Me}`}}}}else if(p.planExecution){const M=p.planExecution.currentStepIndex??0,z=(N=p.planExecution.steps)==null?void 0:N[M],ae=typeof z=="string"?z:"";p.thinking=`${u("chat.thinkingExecuting",{title:ae})}`}if(a.userInputWaitState&&p.planExecution?(console.log("[ChatComponent] User input required:",a.userInputWaitState),p.planExecution.userInputWaitState||(p.planExecution.userInputWaitState={}),p.planExecution.userInputWaitState={message:a.userInputWaitState.message??"",formDescription:a.userInputWaitState.formDescription??"",formInputs:((Z=a.userInputWaitState.formInputs)==null?void 0:Z.map(M=>({label:M.label,value:M.value||""})))??[]},G[j=p.id]??(G[j]={}),p.thinking=u("input.waiting")):(H=p.planExecution)!=null&&H.userInputWaitState&&delete p.planExecution.userInputWaitState,a.completed??a.status==="completed"){console.log("[ChatComponent] Plan is completed, updating final response"),delete p.thinking;let M="";a.summary?M=a.summary:a.result?M=a.result:M=u("chat.executionCompleted"),p.content=re(M),console.log("[ChatComponent] Updated completed message:",p.content)}ne(()=>{console.log("[ChatComponent] Plan update UI refresh completed via reactivity")})},ke=t=>t?t.includes("I ")||t.includes("you")||t.includes("hello")||t.includes("can")||t.includes("I")||t.includes("you")||t.includes("can")?t:t.length<10?`${t}! ${u("chat.anythingElse")}`:t.length<50?`${u("chat.okayDone",{text:t})}. ${u("chat.ifOtherQuestions")}`:`${t} + +${u("chat.hopeHelpful")} ${u("chat.anythingElse")}`:u("chat.defaultResponse"),re=t=>t?`${t}`:`${u("chat.executionCompleted")}! ${u("chat.anythingElse")}`,b=t=>{console.log("[ChatComponent] Plan completed with rootPlanId:",t);const a=oe.getCachedPlanRecord(t);if(!a){console.warn("[ChatComponent] No cached plan data found for rootPlanId:",t);return}if(console.log("[ChatComponent] Plan details:",a),a.rootPlanId){const r=P.value.findIndex(p=>{var W;return((W=p.planExecution)==null?void 0:W.currentPlanId)===a.rootPlanId});if(r!==-1){const p=P.value[r];delete p.thinking;let N=a.summary??a.result??u("chat.executionCompleted");!N.includes("I")&&!N.includes("you")&&(N.includes("success")||N.includes("complete")||N.includes("finished")?N=`${u("chat.great")}${N}. ${u("chat.ifOtherHelp")}`:N=`${u("chat.completedRequest",{result:N})}`),p.content=N,console.log("[ChatComponent] Updated completed message:",p.content)}else console.warn("[ChatComponent] No message found for completed rootPlanId:",a.rootPlanId)}},c=t=>{O.value=!1,P.value[P.value.length-1]={id:Date.now().toString(),type:"assistant",content:t,timestamp:new Date}},_=t=>{if(!t)return"";let a=t.replace(/\n\n/g,"

").replace(/\n/g,"
");return a=a.replace(/(

)/g,"

"),a.includes("

")&&(a=`

${a}

`),a},I=async t=>{var a;if(!((a=t.planExecution)!=null&&a.currentPlanId)||!t.planExecution.userInputWaitState){console.error("[ChatComponent] Missing planExecution.currentPlanId or userInputWaitState");return}try{const r={},p=t.planExecution.userInputWaitState.formInputs;p&&p.length>0?Object.entries(G[t.id]).forEach(([N,Z])=>{var M;const j=parseInt(N,10),H=((M=p[j])==null?void 0:M.label)||`input_${N}`;r[H]=Z}):r.genericInput=t.genericInput??"",console.log("[ChatComponent] Submitting user input:",r);const W=await Fe.submitFormInput(t.planExecution.currentPlanId,r);delete t.planExecution.userInputWaitState,delete t.genericInput,delete G[t.id],$.startPolling(),console.log("[ChatComponent] User input submitted successfully:",W)}catch(r){console.error("[ChatComponent] User input submission failed:",r),alert(`${u("common.submitFailed")}: ${(r==null?void 0:r.message)||u("common.unknownError")}`)}};return $e(()=>d.initialPrompt,(t,a)=>{console.log("[ChatComponent] initialPrompt changed from:",a,"to:",t),t&&typeof t=="string"&&t.trim()&&t!==a&&(console.log("[ChatComponent] Processing changed initial prompt:",t),ne(()=>{v(t)}))},{immediate:!1}),Se(()=>{console.log("[ChatComponent] Mounted, setting up event listeners"),oe.setEventCallbacks({onPlanUpdate:me,onPlanCompleted:b,onDialogRoundStart:se,onChatInputUpdateState:t=>{console.log("[ChatComponent] Chat input state update for rootPlanId:",t)},onChatInputClear:()=>{console.log("[ChatComponent] Chat input clear requested")},onPlanError:c}),ne(()=>{ce()}),d.initialPrompt&&typeof d.initialPrompt=="string"&&d.initialPrompt.trim()&&(console.log("[ChatComponent] Processing initial prompt:",d.initialPrompt),ne(()=>{v(d.initialPrompt)}))}),De(()=>{console.log("[ChatComponent] Unmounting, cleaning up resources"),be(),B.value&&clearInterval(B.value),$.cleanup(),Object.keys(G).forEach(t=>delete G[t])}),n({handleSendMessage:v,handlePlanUpdate:me,handlePlanCompleted:b,handleDialogRoundStart:se,addMessage:o,handlePlanError:c}),(t,a)=>(h(),m("div",Fs,[e("div",{class:"messages",ref_key:"messagesRef",ref:x},[(h(!0),m(ge,null,ve(P.value,r=>{var p,W,N,Z,j,H,M,z,ae;return h(),m("div",{key:r.id,class:te(["message",{user:r.type==="user",assistant:r.type==="assistant"}])},[e("div",Vs,[r.type==="user"?(h(),m("div",Os,l(r.content),1)):(h(),m("div",Bs,[r.thinking||((p=r.planExecution)==null?void 0:p.progress)!==void 0||(((N=(W=r.planExecution)==null?void 0:W.steps)==null?void 0:N.length)??0)>0?(h(),m("div",Ws,[e("div",js,[e("div",Hs,[k(i(C),{icon:"carbon:thinking",class:"thinking-icon"})]),e("div",zs,l(t.$t("chat.thinkingLabel")),1)]),e("div",Js,[r.thinking?(h(),m("div",Gs,[k(i(C),{icon:"carbon:thinking",class:"thinking-icon"}),e("span",null,l(r.thinking),1)])):F("",!0),((Z=r.planExecution)==null?void 0:Z.progress)!==void 0?(h(),m("div",Xs,[e("div",Ks,[e("div",{class:"progress-fill",style:Ue({width:r.planExecution.progress+"%"})},null,4)]),e("span",Qs,l(r.planExecution.progressText??t.$t("chat.processing")+"..."),1)])):F("",!0),(((H=(j=r.planExecution)==null?void 0:j.steps)==null?void 0:H.length)??0)>0?(h(),m("div",Ys,[e("h4",Zs,l(t.$t("chat.stepExecutionDetails")),1),(h(!0),m(ge,null,ve((M=r.planExecution)==null?void 0:M.steps,(Ee,J)=>{var Me,Ve,Oe,Be,We,je,He,ze,Je,Ge,Xe,Ke,Qe,Ye,Ze,et,tt,nt,st;return h(),m("div",{key:J,class:te(["ai-section",{running:w(r,J)==="RUNNING",completed:w(r,J)==="FINISHED",pending:w(r,J)==="IDLE"}]),onClick:ie(pe=>L(r,J),["stop"])},[e("div",to,[e("span",no,l(w(r,J)==="FINISHED"?"✓":w(r,J)==="RUNNING"?"▶":"○"),1),e("span",so,l(Ee||`${t.$t("chat.step")} ${J+1}`),1),w(r,J)==="RUNNING"?(h(),m("span",oo,l(t.$t("chat.status.executing")),1)):w(r,J)==="FINISHED"?(h(),m("span",ao,l(t.$t("chat.status.completed")),1)):(h(),m("span",lo,l(t.$t("chat.status.pending")),1))]),r.stepActions&&r.stepActions[J]?(h(),m("div",io,[e("div",co,[e("span",ro,l(((Me=r.stepActions[J])==null?void 0:Me.status)==="current"?"🔄":((Ve=r.stepActions[J])==null?void 0:Ve.status)==="completed"?"✓":"⏳"),1),e("strong",null,l((Oe=r.stepActions[J])==null?void 0:Oe.actionDescription),1)]),(Be=r.stepActions[J])!=null&&Be.toolParameters?(h(),m("div",uo,[a[0]||(a[0]=e("span",{class:"tool-icon"},"⚙️",-1)),e("span",po,l(t.$t("common.parameters"))+":",1),e("pre",ho,l((We=r.stepActions[J])==null?void 0:We.toolParameters),1)])):F("",!0),(je=r.stepActions[J])!=null&&je.thinkOutput?(h(),m("div",go,[e("div",mo,[a[1]||(a[1]=e("span",{class:"think-icon"},"💭",-1)),e("span",vo,l(t.$t("chat.thinkingOutput"))+":",1)]),e("div",fo,[e("pre",bo,l((He=r.stepActions[J])==null?void 0:He.thinkOutput),1)])])):F("",!0)])):F("",!0),((ze=R(r,J))==null?void 0:ze.length)>0?(h(),m("div",ko,[e("div",_o,[k(i(C),{icon:"carbon:tree-view",class:"sub-plan-icon"}),e("span",$o,l(t.$t("rightPanel.subPlan")),1)]),e("div",Po,[(h(!0),m(ge,null,ve(R(r,J),(pe,le)=>(h(),m("div",{key:`sub-${J}-${le}`,class:te(["sub-plan-step-item",{completed:y(r,J,le)==="completed",current:y(r,J,le)==="current",pending:y(r,J,le)==="pending"}]),onClick:ie(ot=>A(r,J,le),["stop"])},[e("div",So,[e("span",yo,l(y(r,J,le)==="completed"?"✓":y(r,J,le)==="current"?"▶":"○"),1),e("span",Eo,l(le+1),1)]),e("div",wo,[e("span",To,l(pe),1),e("span",Io,l(t.$t("rightPanel.subStep")),1)])],10,Co))),128))])])):F("",!0),(Je=r.planExecution)!=null&&Je.userInputWaitState&&w(r,J)==="RUNNING"?(h(),m("div",Do,[e("p",xo,l(((Xe=(Ge=r.planExecution)==null?void 0:Ge.userInputWaitState)==null?void 0:Xe.message)??t.$t("chat.userInput.message")),1),(Qe=(Ke=r.planExecution)==null?void 0:Ke.userInputWaitState)!=null&&Qe.formDescription?(h(),m("p",Ro,l((Ze=(Ye=r.planExecution)==null?void 0:Ye.userInputWaitState)==null?void 0:Ze.formDescription),1)):F("",!0),e("form",{onSubmit:ie(pe=>I(r),["prevent"]),class:"user-input-form"},[(tt=(et=r.planExecution)==null?void 0:et.userInputWaitState)!=null&&tt.formInputs&&r.planExecution.userInputWaitState.formInputs.length>0?(h(!0),m(ge,{key:0},ve((st=(nt=r.planExecution)==null?void 0:nt.userInputWaitState)==null?void 0:st.formInputs,(pe,le)=>(h(),m("div",{key:le,class:"form-group"},[e("label",{for:`form-input-${pe.label.replace(/\W+/g,"_")}`},l(pe.label)+": ",9,Mo),de(e("input",{type:"text",id:`form-input-${pe.label.replace(/\W+/g,"_")}`,name:pe.label,"onUpdate:modelValue":ot=>G[r.id][le]=ot,class:"form-input"},null,8,No),[[fe,G[r.id][le]]])]))),128)):(h(),m("div",Uo,[e("label",Lo,l(t.$t("common.input"))+":",1),de(e("input",{type:"text",id:"form-input-genericInput",name:"genericInput","onUpdate:modelValue":pe=>r.genericInput=pe,class:"form-input"},null,8,qo),[[fe,r.genericInput]])])),e("button",Fo,l(t.$t("chat.userInput.submit")),1)],40,Ao)])):F("",!0)],10,eo)}),128))])):!r.content&&(r.thinking||((z=r.planExecution)==null?void 0:z.progress)!==void 0&&(((ae=r.planExecution)==null?void 0:ae.progress)??0)<100)?(h(),m("div",Vo,[e("div",Oo,[a[2]||(a[2]=e("div",{class:"thinking-dots"},[e("span"),e("span"),e("span")],-1)),e("span",null,l(r.thinking??t.$t("chat.thinkingProcessing")),1)])])):F("",!0)])])):F("",!0),e("div",Bo,[e("div",Wo,[e("div",jo,[k(i(C),{icon:"carbon:bot",class:"bot-icon"})]),e("div",Ho,l(t.$t("chat.botName")),1)]),e("div",zo,[r.content?(h(),m("div",Jo,[e("div",{class:"response-text",innerHTML:_(r.content)},null,8,Go)])):(h(),m("div",Xo,[e("div",Ko,[a[3]||(a[3]=e("div",{class:"typing-dots"},[e("span"),e("span"),e("span")],-1)),e("span",Qo,l(t.$t("chat.thinkingResponse")),1)])]))])])]))])],2)}),128)),O.value?(h(),m("div",Yo,[e("div",Zo,[e("div",ea,[e("div",ta,[e("div",na,[e("div",sa,[k(i(C),{icon:"carbon:thinking",class:"thinking-icon"})]),e("div",oa,l(t.$t("chat.thinkingLabel")),1)]),e("div",aa,[e("div",la,[e("div",ia,[a[4]||(a[4]=e("div",{class:"thinking-dots"},[e("span"),e("span"),e("span")],-1)),e("span",null,l(t.$t("chat.thinking")),1)])])])]),e("div",ca,[e("div",ra,[e("div",ua,[k(i(C),{icon:"carbon:bot",class:"bot-icon"})]),e("div",da,l(t.$t("chat.botName")),1)]),e("div",pa,[e("div",ha,[e("div",ga,[a[5]||(a[5]=e("div",{class:"typing-dots"},[e("span"),e("span"),e("span")],-1)),e("span",ma,l(t.$t("chat.thinkingResponse")),1)])])])])])])])):F("",!0)],512),X.value?(h(),m("div",{key:0,class:"scroll-to-bottom-btn",onClick:V,title:t.$t("chat.scrollToBottom")},[k(i(C),{icon:"carbon:chevron-down"})],8,va)):F("",!0)]))}}),ba=ye(fa,[["__scopeId","data-v-717f23cf"]]),ka={class:"input-area"},_a={class:"input-container"},$a=["title"],Pa=["placeholder","disabled"],Ca=["title"],Sa=["disabled","title"],ya=Ce({__name:"index",props:{placeholder:{default:""},disabled:{type:Boolean,default:!1},initialValue:{default:""}},emits:["send","clear","update-state","plan-mode-clicked"],setup(T,{expose:n,emit:s}){const{t:d}=Ie(),E=T,u=s,$=D(),x=D(""),O=_e(()=>E.placeholder||d("input.placeholder")),P=D(O.value),B=_e(()=>!!E.disabled),X=()=>{ne(()=>{$.value&&($.value.style.height="auto",$.value.style.height=Math.min($.value.scrollHeight,120)+"px")})},G=V=>{V.key==="Enter"&&!V.shiftKey&&(V.preventDefault(),o())},o=()=>{if(!x.value.trim()||B.value)return;const V=x.value.trim();u("send",V),S()},g=()=>{u("plan-mode-clicked")},S=()=>{x.value="",X(),u("clear")},K=(V,Q)=>{Q&&(P.value=V?Q:d("input.waiting")),u("update-state",V,Q)},U=V=>{x.value=V,X()},q=()=>x.value.trim();return $e(()=>E.initialValue,V=>{V&&V.trim()&&(x.value=V,X())},{immediate:!0}),n({clearInput:S,updateState:K,setInputValue:U,getQuery:q,focus:()=>{var V;return(V=$.value)==null?void 0:V.focus()}}),Se(()=>{}),De(()=>{}),(V,Q)=>(h(),m("div",ka,[e("div",_a,[e("button",{class:"attach-btn",title:V.$t("input.attachFile")},[k(i(C),{icon:"carbon:attachment"})],8,$a),de(e("textarea",{"onUpdate:modelValue":Q[0]||(Q[0]=ce=>x.value=ce),ref_key:"inputRef",ref:$,class:"chat-input",placeholder:P.value,disabled:B.value,onKeydown:G,onInput:X},null,40,Pa),[[fe,x.value]]),e("button",{class:"plan-mode-btn",title:V.$t("input.planMode"),onClick:g},[k(i(C),{icon:"carbon:document"}),Y(" "+l(V.$t("input.planMode")),1)],8,Ca),e("button",{class:"send-button",disabled:!x.value.trim()||B.value,onClick:o,title:V.$t("input.send")},[k(i(C),{icon:"carbon:send-alt"}),Y(" "+l(V.$t("input.send")),1)],8,Sa)])]))}}),Ea=ye(ya,[["__scopeId","data-v-4b2cba42"]]);class we{static async getAllCronTasks(){try{const n=await fetch(this.BASE_URL);return await(await this.handleResponse(n)).json()}catch(n){throw console.error("Failed to get cron tasks:",n),n}}static async getCronTaskById(n){try{const s=await fetch(`${this.BASE_URL}/${n}`);return await(await this.handleResponse(s)).json()}catch(s){throw console.error("Failed to get cron task by id:",s),s}}static async createCronTask(n){try{const s=await fetch(this.BASE_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});return await(await this.handleResponse(s)).json()}catch(s){throw console.error("Failed to create cron task:",s),s}}static async updateCronTask(n,s){try{const d=await fetch(`${this.BASE_URL}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});return await(await this.handleResponse(d)).json()}catch(d){throw console.error("Failed to update cron task:",d),d}}static async updateTaskStatus(n,s){try{const d=await fetch(`${this.BASE_URL}/${n}/status?status=${s}`,{method:"PUT"});await this.handleResponse(d)}catch(d){throw console.error("Failed to update task status:",d),d}}static async deleteCronTask(n){try{const s=await fetch(`${this.BASE_URL}/${n}`,{method:"DELETE"});await this.handleResponse(s)}catch(s){throw console.error("Failed to delete cron task:",s),s}}static async handleResponse(n){if(!n.ok)try{const s=await n.json();throw new Error(s.message||`API request failed: ${n.status}`)}catch{throw new Error(`API request failed: ${n.status} ${n.statusText}`)}return n}}he(we,"BASE_URL","/api/cron-tasks");const Te={validateCronExpression(T){const n=T.trim().split(/\s+/);return n.length>=5&&n.length<=6},formatTime(T){return new Date(T).toLocaleString()},async saveTask(T){try{let n;return T.id?n=await we.updateCronTask(Number(T.id),T):n=await we.createCronTask(T),n}catch(n){throw console.error("Failed to save cron task:",n),n}},async deleteTask(T){try{await we.deleteCronTask(String(T))}catch(n){throw console.error("Failed to delete cron task:",n),n}},async toggleTaskStatus(T){if(!T.id)throw new Error("Task ID is required");const n=T.status===0?1:0;return await we.updateCronTask(Number(T.id),{...T,status:n})},prepareTaskExecution(T){return T.planTemplateId?{useTemplate:!0,planData:{title:T.cronName||"Scheduled Task Execution",planData:{id:T.planTemplateId,planTemplateId:T.planTemplateId,planId:T.planTemplateId},params:T.executionParams||void 0}}:{useTemplate:!1,taskContent:T.planDesc||T.cronName||""}}},wa={class:"modal-header"},Ta={class:"header-actions"},Ia={class:"status-switch"},Da={class:"status-label"},xa={class:"toggle-switch"},Ra=["checked"],Aa={class:"modal-content"},Ma={class:"form-group"},Na={class:"form-label"},Ua=["placeholder"],La={class:"form-group"},qa={class:"form-label"},Fa=["placeholder"],Va={class:"form-help"},Oa={class:"form-group"},Ba={class:"form-label"},Wa=["placeholder"],ja={class:"form-group"},Ha={class:"form-label"},za={class:"template-toggle"},Ja={key:0,class:"template-selector"},Ga={value:""},Xa=["value"],Ka={class:"form-help"},Qa={key:0,class:"form-group"},Ya={class:"time-info"},Za={class:"time-label"},el={class:"time-value"},tl={key:1,class:"form-group"},nl={class:"time-info"},sl={class:"time-label"},ol={class:"time-value"},al={class:"modal-footer"},ll=["disabled"],il=Ce({__name:"TaskDetailModal",props:{modelValue:{type:Boolean},task:{}},emits:["update:modelValue","save"],setup(T,{emit:n}){const s=T,d=n,E=D(!1),u=D([]),$=D({cronName:"",cronTime:"",planDesc:"",status:1,linkTemplate:!1,templateId:"",planTemplateId:""});Se(async()=>{try{const o=await Ae.getAllPlanTemplates();o&&o.templates&&(u.value=o.templates.map(g=>({id:g.id,name:g.title||"Unnamed Template"})))}catch(o){console.error("Failed to get template list:",o)}});const O=o=>{o.target===o.currentTarget&&d("update:modelValue",!1)},P=()=>{$.value.linkTemplate=!1,$.value.templateId="",$.value.planTemplateId=""},B=()=>$.value.cronName.trim()?$.value.cronTime.trim()?Te.validateCronExpression($.value.cronTime)?$.value.planDesc.trim()?$.value.linkTemplate&&!$.value.templateId?(alert("Please select a plan template"),!1):!0:(alert("Task description cannot be empty"),!1):(alert("Invalid Cron expression format, should be 5-6 parts separated by spaces"),!1):(alert("Cron expression cannot be empty"),!1):(alert("Task name cannot be empty"),!1),X=o=>Te.formatTime(o),G=async()=>{var o;if(B()){E.value=!0;try{const g={...$.value,...((o=s.task)==null?void 0:o.id)!==void 0&&{id:s.task.id},cronName:$.value.cronName.trim(),cronTime:$.value.cronTime.trim(),planDesc:$.value.planDesc.trim(),status:$.value.status,planTemplateId:$.value.linkTemplate&&$.value.templateId||""};d("save",g)}finally{E.value=!1}}};return $e(()=>s.task,o=>{if(o){const g=o.templateId||o.planTemplateId||"";$.value={cronName:o.cronName||"",cronTime:o.cronTime||"",planDesc:o.planDesc||"",status:o.status??1,linkTemplate:!!g,templateId:g,planTemplateId:g}}else $.value={cronName:"",cronTime:"",planDesc:"",status:1,linkTemplate:!1,templateId:"",planTemplateId:""}},{immediate:!0}),$e(()=>s.modelValue,o=>{o||($.value={cronName:"",cronTime:"",planDesc:"",status:1,linkTemplate:!1,templateId:"",planTemplateId:""})}),(o,g)=>(h(),ue(Ne,{to:"body"},[k(xe,{name:"modal"},{default:Re(()=>{var S,K,U;return[o.modelValue?(h(),m("div",{key:0,class:"modal-overlay",onClick:O},[e("div",{class:"modal-container",onClick:g[8]||(g[8]=ie(()=>{},["stop"]))},[e("div",wa,[e("h3",null,l(o.$t("cronTask.taskDetail")),1),e("div",Ta,[e("div",Ia,[e("span",Da,l(o.$t("cronTask.taskStatus")),1),e("label",xa,[e("input",{type:"checkbox",checked:$.value.status===0,onChange:g[0]||(g[0]=q=>$.value.status=$.value.status===0?1:0)},null,40,Ra),g[9]||(g[9]=e("span",{class:"toggle-slider"},null,-1))])]),e("button",{class:"close-btn",onClick:g[1]||(g[1]=q=>o.$emit("update:modelValue",!1))},[k(i(C),{icon:"carbon:close"})])])]),e("div",Aa,[e("form",{onSubmit:ie(G,["prevent"]),class:"task-form"},[e("div",Ma,[e("label",Na,l(o.$t("cronTask.taskName")),1),de(e("input",{"onUpdate:modelValue":g[2]||(g[2]=q=>$.value.cronName=q),type:"text",class:"form-input",placeholder:o.$t("cronTask.taskNamePlaceholder"),required:""},null,8,Ua),[[fe,$.value.cronName]])]),e("div",La,[e("label",qa,l(o.$t("cronTask.cronExpression")),1),de(e("input",{"onUpdate:modelValue":g[3]||(g[3]=q=>$.value.cronTime=q),type:"text",class:"form-input",placeholder:o.$t("cronTask.cronExpressionPlaceholder"),required:""},null,8,Fa),[[fe,$.value.cronTime]]),e("div",Va,l(o.$t("cronTask.cronExpressionHelp")),1)]),e("div",Oa,[e("label",Ba,l(o.$t("cronTask.taskDescription")),1),de(e("textarea",{"onUpdate:modelValue":g[4]||(g[4]=q=>$.value.planDesc=q),class:"form-textarea",placeholder:o.$t("cronTask.taskDescriptionPlaceholder"),rows:"4",required:""},null,8,Wa),[[fe,$.value.planDesc]])]),e("div",ja,[e("label",Ha,l(o.$t("cronTask.planTemplate")),1),e("div",za,[e("button",{type:"button",class:te(["template-btn",$.value.linkTemplate?"active":""]),onClick:g[5]||(g[5]=q=>$.value.linkTemplate=!0)},[k(i(C),{icon:"carbon:checkmark"}),Y(" "+l(o.$t("cronTask.linkTemplate")),1)],2),e("button",{type:"button",class:te(["template-btn",$.value.linkTemplate?"":"active"]),onClick:P},[k(i(C),{icon:"carbon:close"}),Y(" "+l(o.$t("cronTask.noTemplate")),1)],2)]),$.value.linkTemplate?(h(),m("div",Ja,[de(e("select",{"onUpdate:modelValue":g[6]||(g[6]=q=>$.value.templateId=q),class:"form-select"},[e("option",Ga,l(o.$t("cronTask.selectTemplate")),1),(h(!0),m(ge,null,ve(u.value,q=>(h(),m("option",{key:q.id,value:q.id},l(q.name),9,Xa))),128))],512),[[ut,$.value.templateId]]),e("div",Ka,l(o.$t("cronTask.templateHelpText")),1)])):F("",!0)]),(S=o.task)!=null&&S.createTime?(h(),m("div",Qa,[e("div",Ya,[e("span",Za,l(o.$t("cronTask.createTime"))+":",1),e("span",el,l(X(o.task.createTime)),1)])])):F("",!0),(K=o.task)!=null&&K.updateTime?(h(),m("div",tl,[e("div",nl,[e("span",sl,l(o.$t("cronTask.updateTime"))+":",1),e("span",ol,l(X(o.task.updateTime)),1)])])):F("",!0)],32)]),e("div",al,[e("button",{type:"button",class:"cancel-btn",onClick:g[7]||(g[7]=q=>o.$emit("update:modelValue",!1))},l(o.$t("common.cancel")),1),e("button",{type:"button",class:"save-btn",onClick:G,disabled:E.value},[E.value?(h(),ue(i(C),{key:0,icon:"carbon:loading",class:"loading-icon"})):F("",!0),Y(" "+l((U=s.task)!=null&&U.id?o.$t("common.save"):o.$t("common.create")),1)],8,ll)])])])):F("",!0)]}),_:1})]))}}),cl=ye(il,[["__scopeId","data-v-5b32448e"]]),rl={class:"modal-header"},ul={class:"header-actions"},dl={class:"modal-content"},pl={key:0,class:"loading-container"},hl={key:1,class:"empty-container"},gl={key:2,class:"task-list"},ml=["onClick"],vl={class:"task-main"},fl={class:"task-info"},bl={class:"task-header"},kl={class:"task-name"},_l={class:"task-description"},$l={class:"task-time"},Pl=["onClick"],Cl=["onClick","disabled","title"],Sl=["onClick","title"],yl={class:"dropdown-menu"},El=["onClick"],wl=["onClick","disabled"],Tl=["onClick","disabled"],Il={class:"confirm-header"},Dl={class:"confirm-content"},xl={class:"confirm-actions"},Rl=["disabled"],Al={class:"confirm-header"},Ml={class:"confirm-content"},Nl={class:"create-options"},Ul={class:"option-content"},Ll={class:"option-title"},ql={class:"option-desc"},Fl={class:"option-content"},Vl={class:"option-title"},Ol={class:"option-desc"},Bl={class:"confirm-actions"},Wl=Ce({__name:"index",props:{modelValue:{type:Boolean,required:!0}},emits:["update:modelValue"],setup(T,{emit:n}){const s=lt(),d=it(),E=mt(),{t:u}=Ie(),$=T,x=n,O=D([]),P=D(!1),B=D(null),X=D(null),G=D(null),o=D(null),g=D(!1),S=D(null),K=D(!1),U=D(null),q=D(!1),V=c=>{c.target===c.currentTarget&&x("update:modelValue",!1)},Q=async()=>{P.value=!0;try{O.value=await we.getAllCronTasks()}catch(c){console.error("Failed to load cron tasks:",c),E.error(`Failed to load tasks: ${c instanceof Error?c.message:String(c)}`)}finally{P.value=!1}},ce=async c=>{B.value=c;try{const _=O.value.find(a=>a.id===c);if(!_){console.error("Task not found:",c);return}x("update:modelValue",!1);const I=Date.now().toString();await s.push({name:"direct",params:{id:I}}),await new Promise(a=>setTimeout(a,100));const t=Te.prepareTaskExecution(_);t.useTemplate&&t.planData?d.emitPlanExecutionRequested(t.planData):t.taskContent&&d.setTask(t.taskContent)}catch(_){console.error("Failed to execute task:",_),E.error(`Execution failed: ${_ instanceof Error?_.message:String(_)}`)}finally{B.value=null}},be=c=>{S.value={...c},g.value=!0,o.value=null},v=async c=>{try{await Te.saveTask(c),await Q(),g.value=!1,E.success("Task saved successfully")}catch(_){console.error("Failed to save task:",_),E.error(`Save failed: ${_ instanceof Error?_.message:String(_)}`)}},w=c=>{U.value=c,K.value=!0},L=async()=>{var c;if((c=U.value)!=null&&c.id){X.value=U.value.id;try{await Te.deleteTask(U.value.id),await Q(),K.value=!1,U.value=null,E.success("Task deleted successfully")}catch(_){console.error("Failed to delete task:",_),E.error(`Delete failed: ${_ instanceof Error?_.message:String(_)}`)}finally{X.value=null}}},R=()=>{K.value=!1,U.value=null},y=c=>{o.value=o.value===c?null:c},A=async c=>{if(c.id){G.value=c.id;try{await Te.toggleTaskStatus(c),await Q(),o.value=null,E.success(`Task ${c.status===0?"disabled":"enabled"} successfully`)}catch(_){console.error("Failed to toggle task status:",_),E.error(`Status toggle failed: ${_ instanceof Error?_.message:String(_)}`)}finally{G.value=null}}},ee=async c=>{try{await navigator.clipboard.writeText(c),E.success("Cron expression copied successfully")}catch(_){E.error(`Copy failed: ${_ instanceof Error?_.message:String(_)}`)}},se=()=>{q.value=!0},me=()=>{q.value=!1;try{x("update:modelValue",!1);const c=u("cronTask.template");d.setTaskToInput(c);const _=Date.now().toString();s.push({name:"direct",params:{id:_}})}catch(c){console.error("Error in createWithJmanus:",c),E.error(`Creation failed: ${c instanceof Error?c.message:String(c)}`)}},ke=()=>{q.value=!1,S.value={cronName:"",cronTime:"",planDesc:"",status:0,planTemplateId:""},g.value=!0},re=()=>{q.value=!1},b=c=>{const _=c.target;!_.closest(".action-dropdown")&&!_.closest(".dropdown-menu")&&(o.value=null)};return Se(()=>{document.addEventListener("click",b,!0)}),De(()=>{document.removeEventListener("click",b,!0)}),$e(()=>$.modelValue,c=>{c&&Q()}),(c,_)=>(h(),m(ge,null,[(h(),ue(Ne,{to:"body"},[k(xe,{name:"modal"},{default:Re(()=>[T.modelValue?(h(),m("div",{key:0,class:"modal-overlay",onClick:V},[e("div",{class:"modal-container",onClick:_[3]||(_[3]=ie(()=>{},["stop"]))},[e("div",rl,[e("h3",null,l(c.$t("cronTask.title")),1),e("div",ul,[e("button",{class:"add-task-btn",onClick:[se,_[0]||(_[0]=ie(()=>{},["stop"]))]},[k(i(C),{icon:"carbon:add"}),Y(" "+l(c.$t("cronTask.addTask")),1)]),e("button",{class:"close-btn",onClick:_[1]||(_[1]=I=>c.$emit("update:modelValue",!1))},[k(i(C),{icon:"carbon:close"})])])]),e("div",dl,[P.value?(h(),m("div",pl,[k(i(C),{icon:"carbon:loading",class:"loading-icon"}),e("span",null,l(c.$t("common.loading")),1)])):O.value.length===0?(h(),m("div",hl,[k(i(C),{icon:"carbon:time",class:"empty-icon"}),e("span",null,l(c.$t("cronTask.noTasks")),1)])):(h(),m("div",gl,[(h(!0),m(ge,null,ve(O.value,I=>(h(),m("div",{key:I.id||"",class:"task-item",onClick:t=>be(I)},[e("div",vl,[e("div",fl,[e("div",bl,[e("div",kl,l(I.cronName),1),e("div",{class:te(["task-status-badge",I.status===0?"active":"inactive"])},[k(i(C),{icon:I.status===0?"carbon:checkmark-filled":"carbon:pause-filled"},null,8,["icon"]),e("span",null,l(I.status===0?c.$t("cronTask.active"):c.$t("cronTask.inactive")),1)],2)]),e("div",_l,l(I.planDesc),1),e("div",$l,[k(i(C),{icon:"carbon:time"}),e("span",{class:"cron-readable",style:{cursor:"pointer"},onClick:ie(t=>ee(I.cronTime),["stop"])},l(I.cronTime),9,Pl)])])]),e("div",{class:"task-actions",onClick:_[2]||(_[2]=ie(()=>{},["stop"]))},[e("button",{class:"action-btn execute-btn",onClick:t=>ce(I.id),disabled:B.value===I.id,title:c.$t("cronTask.executeOnce")},[k(i(C),{icon:B.value===I.id?"carbon:loading":"carbon:play-filled"},null,8,["icon"]),Y(" "+l(c.$t("cronTask.executeOnce")),1)],8,Cl),e("div",{class:te(["action-dropdown",{active:o.value===I.id}])},[e("button",{class:"action-btn dropdown-btn",onClick:t=>y(I.id),title:c.$t("cronTask.operations")},[k(i(C),{icon:"carbon:overflow-menu-horizontal"}),Y(" "+l(c.$t("cronTask.operations")),1)],8,Sl),de(e("div",yl,[e("button",{class:"dropdown-item edit-btn",onClick:t=>be(I)},[k(i(C),{icon:"carbon:edit"}),Y(" "+l(c.$t("cronTask.edit")),1)],8,El),e("button",{class:"dropdown-item toggle-btn",onClick:t=>A(I),disabled:G.value===I.id},[k(i(C),{icon:G.value===I.id?"carbon:loading":I.status===0?"carbon:pause-filled":"carbon:play-filled"},null,8,["icon"]),Y(" "+l(I.status===0?c.$t("cronTask.disable"):c.$t("cronTask.enable")),1)],8,wl),e("button",{class:"dropdown-item delete-btn",onClick:t=>w(I),disabled:X.value===I.id},[k(i(C),{icon:X.value===I.id?"carbon:loading":"carbon:trash-can"},null,8,["icon"]),Y(" "+l(c.$t("cronTask.delete")),1)],8,Tl)],512),[[dt,o.value===I.id]])],2)])],8,ml))),128))]))])])])):F("",!0)]),_:1})])),k(cl,{modelValue:g.value,"onUpdate:modelValue":_[4]||(_[4]=I=>g.value=I),task:S.value,onSave:v},null,8,["modelValue","task"]),(h(),ue(Ne,{to:"body"},[k(xe,{name:"modal"},{default:Re(()=>{var I,t,a,r;return[K.value?(h(),m("div",{key:0,class:"modal-overlay",onClick:R},[e("div",{class:"confirm-modal",onClick:_[5]||(_[5]=ie(()=>{},["stop"]))},[e("div",Il,[k(i(C),{icon:"carbon:warning",class:"warning-icon"}),e("h3",null,l(c.$t("cronTask.deleteConfirm")),1)]),e("div",Dl,[e("p",null,l(c.$t("cronTask.deleteConfirmMessage",{taskName:((I=U.value)==null?void 0:I.cronName)||((t=U.value)==null?void 0:t.planDesc)||""})),1)]),e("div",xl,[e("button",{class:"confirm-btn cancel-btn",onClick:R},l(c.$t("common.cancel")),1),e("button",{class:"confirm-btn delete-btn",onClick:L,disabled:X.value===((a=U.value)==null?void 0:a.id)},[k(i(C),{icon:X.value===((r=U.value)==null?void 0:r.id)?"carbon:loading":"carbon:trash-can"},null,8,["icon"]),Y(" "+l(c.$t("cronTask.delete")),1)],8,Rl)])])])):F("",!0)]}),_:1})])),(h(),ue(Ne,{to:"body"},[k(xe,{name:"modal"},{default:Re(()=>[q.value?(h(),m("div",{key:0,class:"modal-overlay",onClick:re},[e("div",{class:"confirm-modal create-options-modal",onClick:_[6]||(_[6]=ie(()=>{},["stop"]))},[e("div",Al,[k(i(C),{icon:"carbon:time",class:"create-icon"}),e("h3",null,l(c.$t("cronTask.createTask")),1)]),e("div",Ml,[e("p",null,l(c.$t("cronTask.selectCreateMethod")),1),e("div",Nl,[e("button",{class:"create-option-btn jmanus-btn",onClick:me},[k(i(C),{icon:"carbon:ai-status"}),e("div",Ul,[e("span",Ll,l(c.$t("cronTask.createWithJmanus")),1),e("span",ql,l(c.$t("cronTask.createWithJmanusDesc")),1)])]),e("button",{class:"create-option-btn manual-btn",onClick:ke},[k(i(C),{icon:"carbon:edit"}),e("div",Fl,[e("span",Vl,l(c.$t("cronTask.createManually")),1),e("span",Ol,l(c.$t("cronTask.createManuallyDesc")),1)])])])]),e("div",Bl,[e("button",{class:"confirm-btn cancel-btn",onClick:re},l(c.$t("common.cancel")),1)])])])):F("",!0)]),_:1})]))],64))}}),jl=ye(Wl,[["__scopeId","data-v-837947df"]]),Hl={class:"direct-page"},zl={class:"direct-chat"},Jl={class:"chat-header"},Gl={class:"header-actions"},Xl=["title"],Kl=["title"],Ql={class:"chat-content"},Yl=["title"],Zl={class:"message-content"},ei=Ce({__name:"index",setup(T){const n=pt(),s=lt(),d=it(),{t:E}=Ie(),{message:u}=vt(),$=D(""),x=D(""),O=D(),P=D(),B=D(),X=D(!1),G=D(!1),o=D(null),g=D(!1),S=D(50),K=D(!1),U=D(0),q=D(0);Se(()=>{if(console.log("[Direct] onMounted called"),console.log("[Direct] taskStore.currentTask:",d.currentTask),console.log("[Direct] taskStore.hasUnprocessedTask():",d.hasUnprocessedTask()),oe.setEventCallbacks({onPlanUpdate:c=>{console.log("[Direct] Plan update event received for rootPlanId:",c),v(c)&&(console.log("[Direct] Processing plan update for current rootPlanId:",c),P.value&&typeof P.value.handlePlanUpdate=="function"?(console.log("[Direct] Calling chatRef.handlePlanUpdate with rootPlanId:",c),P.value.handlePlanUpdate(c)):console.warn("[Direct] chatRef.handlePlanUpdate method not available"),O.value&&typeof O.value.updateDisplayedPlanProgress=="function"?(console.log("[Direct] Calling rightPanelRef.updateDisplayedPlanProgress with rootPlanId:",c),O.value.updateDisplayedPlanProgress(c)):console.warn("[Direct] rightPanelRef.updateDisplayedPlanProgress method not available"))},onPlanCompleted:c=>{if(console.log("[Direct] Plan completed event received for rootPlanId:",c),!!v(c)){if(console.log("[Direct] Processing plan completion for current rootPlanId:",c),P.value&&typeof P.value.handlePlanCompleted=="function"){const _=oe.getCachedPlanRecord(c);console.log("[Direct] Calling chatRef.handlePlanCompleted with details:",_),P.value.handlePlanCompleted(_??{planId:c})}else console.warn("[Direct] chatRef.handlePlanCompleted method not available");o.value=null,console.log("[Direct] Cleared currentRootPlanId after plan completion")}},onDialogRoundStart:c=>{console.log("[Direct] Dialog round start event received for rootPlanId:",c),o.value=c,console.log("[Direct] Set currentRootPlanId to:",c),P.value&&typeof P.value.handleDialogRoundStart=="function"?(console.log("[Direct] Calling chatRef.handleDialogRoundStart with planId:",c),P.value.handleDialogRoundStart(c)):console.warn("[Direct] chatRef.handleDialogRoundStart method not available")},onChatInputClear:()=>{console.log("[Direct] Chat input clear event received"),L()},onChatInputUpdateState:c=>{if(console.log("[Direct] Chat input update state event received for rootPlanId:",c),!v(c,!0))return;const _=oe.getCachedUIState(c);_&&y(_.enabled,_.placeholder)},onPlanError:c=>{P.value.handlePlanError(c)}}),console.log("[Direct] Event callbacks registered to planExecutionManager"),f.loadPlanTemplateList(),d.hasUnprocessedTask()&&d.currentTask){const c=d.currentTask.prompt;console.log("[Direct] Found unprocessed task from store:",c),d.markTaskAsProcessed(),ne(()=>{P.value&&typeof P.value.handleSendMessage=="function"?(console.log("[Direct] Directly executing task via chatRef.handleSendMessage:",c),P.value.handleSendMessage(c)):(console.warn("[Direct] chatRef.handleSendMessage method not available, falling back to prompt"),$.value=c)})}else{const c=d.getAndClearTaskToInput();c?(x.value=c,console.log("[Direct] Setting inputOnlyContent for input only:",x.value)):($.value=n.query.prompt||"",console.log("[Direct] Received task from URL:",$.value),console.log("[Direct] No unprocessed task in store"))}const b=localStorage.getItem("directPanelWidth");b&&(S.value=parseFloat(b)),console.log("[Direct] Final prompt value:",$.value),x.value&&ne(()=>{B.value&&typeof B.value.setInputValue=="function"&&(B.value.setInputValue(x.value),console.log("[Direct] Set input value:",x.value),x.value="")}),window.addEventListener("plan-execution-requested",c=>{console.log("[DirectView] Received plan-execution-requested event:",c.detail),re(c.detail)})}),$e(()=>d.currentTask,b=>{if(console.log("[Direct] Watch taskStore.currentTask triggered, newTask:",b),b&&!b.processed){const c=b.prompt;d.markTaskAsProcessed(),console.log("[Direct] Received new task from store:",c),ne(()=>{P.value&&typeof P.value.handleSendMessage=="function"?(console.log("[Direct] Directly executing new task via chatRef.handleSendMessage:",c),P.value.handleSendMessage(c)):console.warn("[Direct] chatRef.handleSendMessage method not available for new task")})}else console.log("[Direct] Task is null or already processed, ignoring")},{immediate:!1}),$e(()=>$.value,(b,c)=>{console.log("[Direct] prompt value changed from:",c,"to:",b)},{immediate:!1}),$e(()=>d.taskToInput,b=>{console.log("[Direct] Watch taskStore.taskToInput triggered, newTaskToInput:",b),b&&b.trim()&&(console.log("[Direct] Setting input value from taskToInput:",b),ne(()=>{B.value&&typeof B.value.setInputValue=="function"&&(B.value.setInputValue(b.trim()),console.log("[Direct] Input value set from taskToInput watch:",b.trim()),d.getAndClearTaskToInput())}))},{immediate:!1}),De(()=>{console.log("[Direct] onUnmounted called, cleaning up resources"),o.value=null,oe.cleanup(),document.removeEventListener("mousemove",Q),document.removeEventListener("mouseup",ce),window.removeEventListener("plan-execution-requested",b=>{re(b.detail)})});const V=b=>{K.value=!0,U.value=b.clientX,q.value=S.value,document.addEventListener("mousemove",Q),document.addEventListener("mouseup",ce),document.body.style.cursor="col-resize",document.body.style.userSelect="none",b.preventDefault()},Q=b=>{if(!K.value)return;const c=window.innerWidth,I=(b.clientX-U.value)/c*100;let t=q.value+I;t=Math.max(20,Math.min(80,t)),S.value=t},ce=()=>{K.value=!1,document.removeEventListener("mousemove",Q),document.removeEventListener("mouseup",ce),document.body.style.cursor="",document.body.style.userSelect="",localStorage.setItem("directPanelWidth",S.value.toString())},be=()=>{S.value=50,localStorage.setItem("directPanelWidth","50")},v=(b,c=!1)=>!o.value||b===o.value||c&&(b==="ui-state"||b==="error")?!0:(console.log("[Direct] Ignoring event for non-current rootPlanId:",b,"current:",o.value),!1),w=b=>{console.log("[DirectView] Send message from input:",b),P.value&&typeof P.value.handleSendMessage=="function"?(console.log("[DirectView] Calling chatRef.handleSendMessage:",b),P.value.handleSendMessage(b)):console.warn("[DirectView] chatRef.handleSendMessage method not available")},L=()=>{console.log("[DirectView] Input cleared"),B.value&&typeof B.value.clear=="function"&&B.value.clear()},R=()=>{console.log("[DirectView] Input focused")},y=(b,c)=>{console.log("[DirectView] Input state updated:",b,c),G.value=!b},A=(b,c)=>{console.log("[DirectView] Step selected:",b,c),O.value&&typeof O.value.handleStepSelected=="function"?(console.log("[DirectView] Forwarding step selection to right panel:",b,c),O.value.handleStepSelected(b,c)):console.warn("[DirectView] rightPanelRef.handleStepSelected method not available")},ee=(b,c,_,I)=>{console.log("[DirectView] Sub plan step selected:",{parentPlanId:b,subPlanId:c,stepIndex:_,subStepIndex:I}),O.value&&typeof O.value.handleSubPlanStepSelected=="function"?(console.log("[DirectView] Forwarding sub plan step selection to right panel:",{parentPlanId:b,subPlanId:c,stepIndex:_,subStepIndex:I}),O.value.handleSubPlanStepSelected(b,c,_,I)):console.warn("[DirectView] rightPanelRef.handleSubPlanStepSelected method not available")},se=()=>{console.log("[DirectView] Plan mode button clicked"),f.toggleSidebar(),console.log("[DirectView] Sidebar toggled, isCollapsed:",f.isCollapsed)},me=()=>{s.push("/home")},ke=()=>{s.push("/configs")},re=async b=>{var _,I,t,a;if(console.log("[DirectView] Plan execution requested:",b),X.value){console.log("[DirectView] Plan execution already in progress, ignoring request");return}X.value=!0;let c=!1;P.value&&typeof P.value.addMessage=="function"?(console.log("[DirectView] Calling chatRef.addMessage for plan execution:",b.title),P.value.addMessage("user",b.title),c=!0):console.warn("[DirectView] chatRef.addMessage method not available");try{const r=((_=b.planData)==null?void 0:_.planTemplateId)||((I=b.planData)==null?void 0:I.id)||((t=b.planData)==null?void 0:t.planId);if(!r)throw new Error(E("direct.planTemplateIdNotFound"));console.log("[Direct] Executing plan with templateId:",r,"params:",b.params),console.log("[Direct] About to call PlanActApiService.executePlan");let p;if((a=b.params)!=null&&a.trim()?(console.log("[Direct] Calling executePlan with params:",b.params.trim()),p=await Ae.executePlan(r,b.params.trim())):(console.log("[Direct] Calling executePlan without params"),p=await Ae.executePlan(r)),console.log("[Direct] Plan execution API response:",p),p.planId)console.log("[Direct] Got planId from response:",p.planId,"starting plan execution"),o.value=p.planId,console.log("[Direct] Set currentRootPlanId to:",p.planId),console.log("[Direct] Delegating plan execution to planExecutionManager"),oe.handlePlanExecutionRequested(p.planId,b.title);else throw console.error("[Direct] No planId in response:",p),new Error(E("direct.executionFailedNoPlanId"))}catch(r){console.error("[Direct] Plan execution failed:",r),console.error("[Direct] Error details:",{message:r.message,stack:r.stack}),o.value=null,P.value&&typeof P.value.addMessage=="function"?(console.log("[Direct] Adding error messages to chat"),c||P.value.addMessage("user",b.title),P.value.addMessage("assistant",`${E("direct.executionFailed")}: ${r.message||E("common.unknownError")}`,{thinking:void 0})):(console.error("[Direct] Chat ref not available, showing alert"),alert(`${E("direct.executionFailed")}: ${r.message||E("common.unknownError")}`))}finally{console.log("[Direct] Plan execution finished, resetting isExecutingPlan flag"),X.value=!1}};return(b,c)=>(h(),m("div",Hl,[e("div",zl,[k(fn,{onPlanExecutionRequested:re}),e("div",{class:"left-panel",style:Ue({width:S.value+"%"})},[e("div",Jl,[e("button",{class:"back-button",onClick:me},[k(i(C),{icon:"carbon:arrow-left"})]),e("h2",null,l(b.$t("conversation")),1),e("div",Gl,[k(gt),e("button",{class:"config-button",onClick:ke,title:b.$t("direct.configuration")},[k(i(C),{icon:"carbon:settings-adjust",width:"20"})],8,Xl),e("button",{class:"cron-task-btn",onClick:c[0]||(c[0]=_=>g.value=!0),title:b.$t("cronTask.title")},[k(i(C),{icon:"carbon:alarm",width:"20"})],8,Kl)])]),e("div",Ql,[k(ba,{ref_key:"chatRef",ref:P,mode:"direct","initial-prompt":$.value||"",onStepSelected:A,onSubPlanStepSelected:ee},null,8,["initial-prompt"])]),(h(),ue(Ea,{key:b.$i18n.locale,ref_key:"inputRef",ref:B,disabled:G.value,placeholder:G.value?i(E)("input.waiting"):i(E)("input.placeholder"),"initial-value":$.value,onSend:w,onClear:L,onFocus:R,onUpdateState:y,onPlanModeClicked:se},null,8,["disabled","placeholder","initial-value"]))],4),e("div",{class:"panel-resizer",onMousedown:V,onDblclick:be,title:b.$t("direct.panelResizeHint")},c[2]||(c[2]=[e("div",{class:"resizer-line"},null,-1)]),40,Yl),k(Ls,{ref_key:"rightPanelRef",ref:O,style:Ue({width:100-S.value+"%"})},null,8,["style"])]),k(jl,{modelValue:g.value,"onUpdate:modelValue":c[1]||(c[1]=_=>g.value=_)},null,8,["modelValue"]),i(u).show?(h(),m("div",{key:0,class:te(["message-toast",i(u).type])},[e("div",Zl,[e("span",null,l(i(u).text),1)])],2)):F("",!0)]))}}),ri=ye(ei,[["__scopeId","data-v-eab98c50"]]);export{ri as default}; diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-CAOqiiSi.js b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-CAOqiiSi.js new file mode 100644 index 0000000000..04dbaf55eb --- /dev/null +++ b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-CAOqiiSi.js @@ -0,0 +1 @@ +import{d as q,u as T,r as f,c as A,o as I,L as R,a as u,b as c,e,f as m,g as k,t,n as g,w as p,v as y,h as z,i as b,j as h,k as U,T as K,F as P,l as E,m as F,p as O}from"./index-W4k7xcj8.js";import{L as j}from"./llm-check-BVkAKrj3.js";import{_ as B}from"./_plugin-vue_export-helper-DlAUqK2U.js";const H={class:"init-container"},J={class:"init-card"},G={class:"init-header"},W={class:"description"},Q={class:"step-indicator"},X={class:"step-label"},Y={class:"step-label"},Z={key:0,class:"init-form language-selection"},x={class:"form-group"},ee={class:"form-label"},se={class:"language-options"},ae={class:"language-content"},le={class:"language-text"},te={class:"form-actions single"},oe=["disabled"],ie={key:1,class:"init-form"},ne={class:"form-group"},de={class:"form-label"},re={class:"config-mode-selection"},ue={class:"radio-text"},ce={class:"radio-text"},pe={key:0,class:"form-group"},me={for:"apiKey",class:"form-label"},ve=["placeholder","disabled"],fe={class:"form-hint"},ge={href:"https://bailian.console.aliyun.com/?tab=model#/api-key",target:"_blank",class:"help-link"},be={key:1,class:"custom-config-section"},he={class:"form-group"},ye={for:"baseUrl",class:"form-label"},_e=["placeholder","disabled"],$e={class:"form-hint"},Ne={class:"form-group"},Me={for:"customApiKey",class:"form-label"},ke=["placeholder","disabled"],Ue={class:"form-group"},Ke={for:"modelName",class:"form-label"},Le=["placeholder","disabled"],Se={class:"form-hint"},we={class:"form-group"},Ce={for:"modelDisplayName",class:"form-label"},De=["placeholder","disabled"],Ve={class:"form-actions"},qe=["disabled"],Te=["disabled"],Ae={key:0,class:"loading-spinner"},Ie={key:0,class:"error-message"},Re={key:0,class:"success-message"},ze={class:"background-animation"},Pe=q({__name:"index",setup(Ee){const{t:v,locale:$}=T(),_=O(),n=f(1),d=f($.value||"en"),l=f({configMode:"dashscope",apiKey:"",baseUrl:"",modelName:"",modelDisplayName:""}),i=f(!1),r=f(""),N=f(!1),L=A(()=>l.value.apiKey.trim()?l.value.configMode==="custom"?l.value.baseUrl.trim()&&l.value.modelName.trim():!0:!1),S=async()=>{if(d.value)try{i.value=!0,await F(d.value),n.value=2}catch(s){console.warn("Failed to switch language:",s),n.value=2}finally{i.value=!1}},w=()=>{n.value=1},M=()=>{l.value.apiKey="",l.value.baseUrl="",l.value.modelName="",l.value.modelDisplayName="",r.value=""},C=()=>{if(!l.value.apiKey.trim())return r.value=v("init.apiKeyRequired"),!1;if(l.value.configMode==="custom"){if(!l.value.baseUrl.trim())return r.value=v("init.baseUrlRequired"),!1;if(!l.value.modelName.trim())return r.value=v("init.modelNameRequired"),!1}return!0},D=async()=>{if(C())try{i.value=!0,r.value="";const s={configMode:l.value.configMode,apiKey:l.value.apiKey.trim()};l.value.configMode==="custom"&&(s.baseUrl=l.value.baseUrl.trim(),s.modelName=l.value.modelName.trim(),s.modelDisplayName=l.value.modelDisplayName.trim()||l.value.modelName.trim());const o=await(await fetch("/api/init/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})).json();o.success?(N.value=!0,localStorage.setItem("hasInitialized","true"),localStorage.setItem("hasVisitedHome","true"),j.clearCache(),o.requiresRestart?setTimeout(()=>{confirm(v("init.restartRequired"))?window.location.reload():_.push("/home")},2e3):setTimeout(()=>{_.push("/home")},2e3)):r.value=o.error||v("init.saveFailed")}catch(s){console.error("Save config failed:",s),r.value=v("init.networkError")}finally{i.value=!1}},V=async()=>{try{const a=await(await fetch("/api/init/status")).json();a.success&&a.initialized&&(localStorage.setItem("hasInitialized","true"),_.push("/home"))}catch(s){console.error("Check init status failed:",s)}};return I(()=>{const s=localStorage.getItem(R);s&&(s==="zh"||s==="en")&&(d.value=s,$.value=s),V()}),(s,a)=>(c(),u("div",H,[e("div",J,[e("div",G,[a[9]||(a[9]=e("div",{class:"logo"},[e("h1",null,"🤖 JManus")],-1)),e("h2",null,t(n.value===1?s.$t("init.welcomeStep"):s.$t("init.welcome")),1),e("p",W,t(n.value===1?s.$t("init.languageStepDescription"):s.$t("init.description")),1)]),e("div",Q,[e("div",{class:g(["step",{active:n.value>=1,completed:n.value>1}])},[a[10]||(a[10]=e("span",{class:"step-number"},"1",-1)),e("span",X,t(s.$t("init.stepLanguage")),1)],2),a[12]||(a[12]=e("div",{class:"step-divider"},null,-1)),e("div",{class:g(["step",{active:n.value>=2,completed:n.value>2}])},[a[11]||(a[11]=e("span",{class:"step-number"},"2",-1)),e("span",Y,t(s.$t("init.stepModel")),1)],2)]),n.value===1?(c(),u("div",Z,[e("div",x,[e("label",ee,t(s.$t("init.selectLanguageLabel")),1),e("div",se,[e("label",{class:g(["language-option",{active:d.value==="zh"}])},[p(e("input",{type:"radio","onUpdate:modelValue":a[0]||(a[0]=o=>d.value=o),value:"zh"},null,512),[[y,d.value]]),e("span",ae,[a[13]||(a[13]=e("span",{class:"language-flag"},"🇨🇳",-1)),e("span",le,[e("strong",null,t(s.$t("language.zh")),1),e("small",null,t(s.$t("init.simplifiedChinese")),1)])])],2),e("label",{class:g(["language-option",{active:d.value==="en"}])},[p(e("input",{type:"radio","onUpdate:modelValue":a[1]||(a[1]=o=>d.value=o),value:"en"},null,512),[[y,d.value]]),a[14]||(a[14]=e("span",{class:"language-content"},[e("span",{class:"language-flag"},"🇺🇸"),e("span",{class:"language-text"},[e("strong",null,"English"),e("small",null,"English (US)")])],-1))],2)])]),e("div",te,[e("button",{type:"button",class:"submit-btn",disabled:!d.value,onClick:S},t(s.$t("init.continueToModel")),9,oe)])])):m("",!0),n.value===2?(c(),u("div",ie,[e("form",{onSubmit:z(D,["prevent"])},[e("div",ne,[e("label",de,t(s.$t("init.configModeLabel")),1),e("div",re,[e("label",{class:g(["radio-option",{active:l.value.configMode==="dashscope"}])},[p(e("input",{type:"radio","onUpdate:modelValue":a[2]||(a[2]=o=>l.value.configMode=o),value:"dashscope",onChange:M},null,544),[[y,l.value.configMode]]),e("span",ue,[e("strong",null,t(s.$t("init.dashscopeMode")),1),e("small",null,t(s.$t("init.dashscopeModeDesc")),1)])],2),e("label",{class:g(["radio-option",{active:l.value.configMode==="custom"}])},[p(e("input",{type:"radio","onUpdate:modelValue":a[3]||(a[3]=o=>l.value.configMode=o),value:"custom",onChange:M},null,544),[[y,l.value.configMode]]),e("span",ce,[e("strong",null,t(s.$t("init.customMode")),1),e("small",null,t(s.$t("init.customModeDesc")),1)])],2)])]),l.value.configMode==="dashscope"?(c(),u("div",pe,[e("label",me,[b(t(s.$t("init.apiKeyLabel"))+" ",1),a[15]||(a[15]=e("span",{class:"required"},"*",-1))]),p(e("input",{id:"apiKey","onUpdate:modelValue":a[4]||(a[4]=o=>l.value.apiKey=o),type:"password",class:"form-input",placeholder:s.$t("init.apiKeyPlaceholder"),disabled:i.value,required:""},null,8,ve),[[h,l.value.apiKey]]),e("div",fe,[b(t(s.$t("init.apiKeyHint"))+" ",1),e("a",ge,t(s.$t("init.getApiKey")),1)])])):m("",!0),l.value.configMode==="custom"?(c(),u("div",be,[e("div",he,[e("label",ye,[b(t(s.$t("init.baseUrlLabel"))+" ",1),a[16]||(a[16]=e("span",{class:"required"},"*",-1))]),p(e("input",{id:"baseUrl","onUpdate:modelValue":a[5]||(a[5]=o=>l.value.baseUrl=o),type:"url",class:"form-input",placeholder:s.$t("init.baseUrlPlaceholder"),disabled:i.value,required:""},null,8,_e),[[h,l.value.baseUrl]]),e("div",$e,t(s.$t("init.baseUrlHint")),1)]),e("div",Ne,[e("label",Me,[b(t(s.$t("init.customApiKeyLabel"))+" ",1),a[17]||(a[17]=e("span",{class:"required"},"*",-1))]),p(e("input",{id:"customApiKey","onUpdate:modelValue":a[6]||(a[6]=o=>l.value.apiKey=o),type:"password",class:"form-input",placeholder:s.$t("init.customApiKeyPlaceholder"),disabled:i.value,required:""},null,8,ke),[[h,l.value.apiKey]])]),e("div",Ue,[e("label",Ke,[b(t(s.$t("init.modelNameLabel"))+" ",1),a[18]||(a[18]=e("span",{class:"required"},"*",-1))]),p(e("input",{id:"modelName","onUpdate:modelValue":a[7]||(a[7]=o=>l.value.modelName=o),type:"text",class:"form-input",placeholder:s.$t("init.modelNamePlaceholder"),disabled:i.value,required:""},null,8,Le),[[h,l.value.modelName]]),e("div",Se,t(s.$t("init.modelNameHint")),1)]),e("div",we,[e("label",Ce,t(s.$t("init.modelDisplayNameLabel")),1),p(e("input",{id:"modelDisplayName","onUpdate:modelValue":a[8]||(a[8]=o=>l.value.modelDisplayName=o),type:"text",class:"form-input",placeholder:s.$t("init.modelDisplayNamePlaceholder"),disabled:i.value},null,8,De),[[h,l.value.modelDisplayName]])])])):m("",!0),e("div",Ve,[e("button",{type:"button",class:"back-btn",onClick:w,disabled:i.value},t(s.$t("init.back")),9,qe),e("button",{type:"submit",class:"submit-btn",disabled:i.value||!L.value},[i.value?(c(),u("span",Ae)):m("",!0),b(" "+t(i.value?s.$t("init.saving"):s.$t("init.saveAndContinue")),1)],8,Te)])],32)])):m("",!0),k(K,{name:"error-fade"},{default:U(()=>[r.value?(c(),u("div",Ie,t(r.value),1)):m("",!0)]),_:1}),k(K,{name:"success-fade"},{default:U(()=>[N.value?(c(),u("div",Re,t(s.$t("init.successMessage")),1)):m("",!0)]),_:1})]),e("div",ze,[(c(),u(P,null,E(6,o=>e("div",{class:"floating-shape",key:o})),64))]),a[19]||(a[19]=e("div",{class:"background-effects"},[e("div",{class:"gradient-orb orb-1"}),e("div",{class:"gradient-orb orb-2"}),e("div",{class:"gradient-orb orb-3"})],-1))]))}}),Be=B(Pe,[["__scopeId","data-v-e11ff624"]]);export{Be as default}; diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-CZriWw3M.js b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-CZriWw3M.js new file mode 100644 index 0000000000..18ffc65486 --- /dev/null +++ b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-CZriWw3M.js @@ -0,0 +1 @@ +import{d as I,a as u,b as m,q as $,s as j,f as C,x as q,e as s,t as c,r as T,u as M,c as _,o as L,g as f,w as O,j as V,F,l as K,p as R,y as H}from"./index-W4k7xcj8.js";import{_ as z}from"./Java-AI-BYpq8IxI.js";import{I as P}from"./iconify-bZOkqtWv.js";import{_ as N}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{L as U}from"./index-0-ztzQqN.js";import{u as A,s as r}from"./sidebar-Cklmpi9w.js";import"./llm-check-BVkAKrj3.js";const G={key:1,class:"blur-card-content"},Q=I({__name:"index",props:{content:{},wrapperStyle:{}},emits:["clickCard"],setup(x,{emit:p}){const n=x,l=p,i=()=>{console.log("[BlurCard] handleClick called with content:",n.content),l("clickCard",n.content),console.log("[BlurCard] clickCard event emitted")};return(e,S)=>{var d,h,g,v,b;return m(),u("button",{class:"blur-card",onClick:i,style:$(e.wrapperStyle)},[(d=e.content)!=null&&d.icon?(m(),j(q(P),{key:0,icon:e.content.icon,class:"blur-card-icon"},null,8,["icon"])):C("",!0),(h=e.content)!=null&&h.title||(g=e.content)!=null&&g.description?(m(),u("div",G,[s("h3",null,c((v=e.content)==null?void 0:v.title),1),s("p",null,c((b=e.content)==null?void 0:b.description),1)])):C("",!0)],4)}}}),W=N(Q,[["__scopeId","data-v-48da0039"]]),X={class:"home-page"},Y={class:"welcome-container"},Z={class:"header"},ee={class:"header-top"},oe={class:"logo-container"},te={class:"tagline"},se={class:"main-content"},ae={class:"conversation-container"},ne={class:"welcome-section"},le={class:"welcome-title"},re={class:"welcome-subtitle"},ie={class:"input-section"},ce={class:"input-container"},pe=["placeholder"],me=["disabled"],de={class:"examples-section"},ue={class:"examples-grid"},he={class:"card-type"},ge=I({__name:"index",setup(x){const p=R(),n=A(),l=T(""),i=T(),{t:e}=M(),S=()=>{const t=Date.now().toString();p.push({name:"direct",params:{id:t}}).then(()=>{console.log("[Home] jump to direct page"+e("common.success"))}).catch(o=>{console.error("[Home] jump to direct page"+e("common.error"),o)})},d=_(()=>[{title:e("home.examples.stockPrice.title"),type:"message",description:e("home.examples.stockPrice.description"),icon:"carbon:chart-line-data",prompt:e("home.examples.stockPrice.prompt")},{title:e("home.examples.weather.title"),type:"message",description:e("home.examples.weather.description"),icon:"carbon:partly-cloudy",prompt:e("home.examples.weather.prompt")}]),h=_(()=>[{title:e("home.examples.queryplan.title"),type:"plan-act",description:e("home.examples.queryplan.description"),icon:"carbon:plan",prompt:e("home.examples.queryplan.prompt"),planJson:{planType:"simple",title:e("home.examples.queryplan.planTitle"),steps:[{stepRequirement:e("home.examples.queryplan.step1"),terminateColumns:e("home.examples.queryplan.step1Output")},{stepRequirement:e("home.examples.queryplan.step2"),terminateColumns:e("home.examples.queryplan.step2Output")}],planId:"planTemplate-1749200517403"}},{title:e("home.examples.ainovel.title"),type:"plan-act",description:e("home.examples.ainovel.description"),icon:"carbon:document-tasks",prompt:e("home.examples.ainovel.prompt"),planJson:{planType:"simple",title:e("home.examples.ainovel.planTitle"),steps:[{stepRequirement:e("home.examples.ainovel.step1"),terminateColumns:e("home.examples.ainovel.step1Output")},{stepRequirement:e("home.examples.ainovel.step2"),terminateColumns:e("home.examples.ainovel.step2Output")}],planId:"planTemplate-1753622676988"}}]),g=_(()=>[...d.value,...h.value]),v=t=>{t.type==="message"?E(t):t.type==="plan-act"&&J(t)};L(()=>{console.log("[Home] onMounted called"),console.log("[Home] taskStore:",n),console.log("[Home] examples:",d),n.markHomeVisited(),console.log("[Home] Home visited marked")});const b=async t=>{try{r.createNewTemplate(),r.jsonContent=JSON.stringify(t);const o=await r.saveTemplate();o!=null&&o.duplicate?console.log("[Sidebar] "+e("sidebar.saveCompleted",{message:o.message,versionCount:o.versionCount})):o!=null&&o.saved?console.log("[Sidebar] "+e("sidebar.saveSuccess",{message:o.message,versionCount:o.versionCount})):o!=null&&o.message&&console.log("[Sidebar] "+e("sidebar.saveStatus",{message:o.message}))}catch(o){console.error("[Sidebar] Failed to save the plan to the template library:",o),alert(o.message||e("sidebar.saveFailed"))}},B=()=>{H(()=>{i.value&&(i.value.style.height="auto",i.value.style.height=Math.min(i.value.scrollHeight,200)+"px")})},D=t=>{console.log("[Home] handleKeydown called, key:",t.key),t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),console.log("[Home] Enter key pressed, calling handleSend"),w())},w=()=>{if(console.log("[Home] handleSend called, userInput:",l.value),!l.value.trim()){console.log("[Home] handleSend aborted - empty input");return}const t=l.value.trim();console.log("[Home] Setting task to store:",t),n.setTask(t),console.log("[Home] Task set to store, current task:",n.currentTask);const o=Date.now().toString();console.log("[Home] Navigating to direct page with chatId:",o),p.push({name:"direct",params:{id:o}}).then(()=>{console.log("[Home] Navigation to direct page completed")}).catch(a=>{console.error("[Home] Navigation error:",a)})},E=t=>{console.log("[Home] selectExample called with example:",t),console.log("[Home] Example prompt:",t.prompt),n.setTask(t.prompt),console.log("[Home] Task set to store from example, current task:",n.currentTask);const o=Date.now().toString();console.log("[Home] Navigating to direct page with chatId:",o),p.push({name:"direct",params:{id:o}}).then(()=>{console.log("[Home] Navigation to direct page completed (from example)")}).catch(a=>{console.error("[Home] Navigation error (from example):",a)})},J=async t=>{console.log("[Home] selectPlan called with plan:",t);try{await b(t.planJson),console.log("[Home] Plan saved to templates");const o=Date.now().toString();await p.push({name:"direct",params:{id:o}}),H(async()=>{await new Promise(k=>setTimeout(k,300)),r.isCollapsed?(await r.toggleSidebar(),console.log("[Sidebar] Sidebar toggled")):console.log("[Sidebar] Sidebar is already open"),await r.loadPlanTemplateList(),console.log("[Sidebar] Template list loaded");const a=r.planTemplateList.find(k=>k.id===t.planJson.planId);if(!a){console.error("[Sidebar] Template not found");return}await r.selectTemplate(a),console.log("[Sidebar] Template selected:",a.title);const y=document.querySelector(".execute-btn");y.disabled?console.error("[Sidebar] Execute button not found or disabled"):(console.log("[Sidebar] Triggering execute button click"),y.click())})}catch(o){console.error("[Home] Error in selectPlan:",o)}};return(t,o)=>(m(),u("div",X,[s("div",Y,[o[2]||(o[2]=s("div",{class:"background-effects"},[s("div",{class:"gradient-orb orb-1"}),s("div",{class:"gradient-orb orb-2"}),s("div",{class:"gradient-orb orb-3"})],-1)),s("header",Z,[s("div",ee,[f(U)]),s("div",oe,[o[1]||(o[1]=s("div",{class:"logo"},[s("img",{src:z,alt:"JManus",class:"java-logo"}),s("h1",null,"JManus")],-1)),s("span",te,c(t.$t("home.tagline")),1)])]),s("main",se,[s("div",ae,[s("div",ne,[s("h2",le,c(t.$t("home.welcomeTitle")),1),s("p",re,c(t.$t("home.welcomeSubtitle")),1),s("button",{class:"direct-button",onClick:S},c(t.$t("home.directButton")),1)]),s("div",ie,[s("div",ce,[O(s("textarea",{"onUpdate:modelValue":o[0]||(o[0]=a=>l.value=a),ref_key:"textareaRef",ref:i,class:"main-input",placeholder:t.$t("home.inputPlaceholder"),onKeydown:D,onInput:B},null,40,pe),[[V,l.value]]),s("button",{class:"send-button",disabled:!l.value.trim(),onClick:w},[f(q(P),{icon:"carbon:send-alt"})],8,me)])]),s("div",de,[s("div",ue,[(m(!0),u(F,null,K(g.value,a=>(m(),u("div",{key:a.title,class:"card-with-type"},[f(W,{content:a,onClickCard:y=>v(a)},null,8,["content","onClickCard"]),s("span",he,c(a.type),1)]))),128))])])])])])]))}}),Se=N(ge,[["__scopeId","data-v-5aee9964"]]);export{Se as default}; diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-Clz_zCtn.js b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-Clz_zCtn.js deleted file mode 100644 index 615e07f9ec..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-Clz_zCtn.js +++ /dev/null @@ -1 +0,0 @@ -import{d as q,u as T,r as f,c as A,o as I,L as R,a as u,b as c,e,f as m,g as k,t,n as g,w as p,v as y,h as z,i as b,j as h,k as U,T as K,F as P,l as E,m as F,p as O}from"./index-SarmArA2.js";import{L as j}from"./llm-check-D2idVWhZ.js";import{_ as B}from"./_plugin-vue_export-helper-DlAUqK2U.js";const H={class:"init-container"},J={class:"init-card"},G={class:"init-header"},W={class:"description"},Q={class:"step-indicator"},X={class:"step-label"},Y={class:"step-label"},Z={key:0,class:"init-form language-selection"},x={class:"form-group"},ee={class:"form-label"},se={class:"language-options"},ae={class:"form-actions single"},le=["disabled"],te={key:1,class:"init-form"},oe={class:"form-group"},ie={class:"form-label"},ne={class:"config-mode-selection"},de={class:"radio-text"},re={class:"radio-text"},ue={key:0,class:"form-group"},ce={for:"apiKey",class:"form-label"},pe=["placeholder","disabled"],me={class:"form-hint"},ve={href:"https://bailian.console.aliyun.com/?tab=model#/api-key",target:"_blank",class:"help-link"},fe={key:1,class:"custom-config-section"},ge={class:"form-group"},be={for:"baseUrl",class:"form-label"},he=["placeholder","disabled"],ye={class:"form-hint"},_e={class:"form-group"},Ne={for:"customApiKey",class:"form-label"},$e=["placeholder","disabled"],Me={class:"form-group"},ke={for:"modelName",class:"form-label"},Ue=["placeholder","disabled"],Ke={class:"form-hint"},Le={class:"form-group"},Se={for:"modelDisplayName",class:"form-label"},we=["placeholder","disabled"],Ce={class:"form-actions"},De=["disabled"],Ve=["disabled"],qe={key:0,class:"loading-spinner"},Te={key:0,class:"error-message"},Ae={key:0,class:"success-message"},Ie={class:"background-animation"},Re=q({__name:"index",setup(ze){const{t:v,locale:N}=T(),_=O(),n=f(1),d=f(N.value||"en"),l=f({configMode:"dashscope",apiKey:"",baseUrl:"",modelName:"",modelDisplayName:""}),i=f(!1),r=f(""),$=f(!1),L=A(()=>l.value.apiKey.trim()?l.value.configMode==="custom"?l.value.baseUrl.trim()&&l.value.modelName.trim():!0:!1),S=async()=>{if(d.value)try{i.value=!0,await F(d.value),n.value=2}catch(s){console.warn("Failed to switch language:",s),n.value=2}finally{i.value=!1}},w=()=>{n.value=1},M=()=>{l.value.apiKey="",l.value.baseUrl="",l.value.modelName="",l.value.modelDisplayName="",r.value=""},C=()=>{if(!l.value.apiKey.trim())return r.value=v("init.apiKeyRequired"),!1;if(l.value.configMode==="custom"){if(!l.value.baseUrl.trim())return r.value=v("init.baseUrlRequired"),!1;if(!l.value.modelName.trim())return r.value=v("init.modelNameRequired"),!1}return!0},D=async()=>{if(C())try{i.value=!0,r.value="";const s={configMode:l.value.configMode,apiKey:l.value.apiKey.trim()};l.value.configMode==="custom"&&(s.baseUrl=l.value.baseUrl.trim(),s.modelName=l.value.modelName.trim(),s.modelDisplayName=l.value.modelDisplayName.trim()||l.value.modelName.trim());const o=await(await fetch("/api/init/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})).json();o.success?($.value=!0,localStorage.setItem("hasInitialized","true"),localStorage.setItem("hasVisitedHome","true"),j.clearCache(),o.requiresRestart?setTimeout(()=>{confirm(v("init.restartRequired"))?window.location.reload():_.push("/home")},2e3):setTimeout(()=>{_.push("/home")},2e3)):r.value=o.error||v("init.saveFailed")}catch(s){console.error("Save config failed:",s),r.value=v("init.networkError")}finally{i.value=!1}},V=async()=>{try{const a=await(await fetch("/api/init/status")).json();a.success&&a.initialized&&(localStorage.setItem("hasInitialized","true"),_.push("/home"))}catch(s){console.error("Check init status failed:",s)}};return I(()=>{const s=localStorage.getItem(R);s&&(s==="zh"||s==="en")&&(d.value=s,N.value=s),V()}),(s,a)=>(c(),u("div",H,[e("div",J,[e("div",G,[a[9]||(a[9]=e("div",{class:"logo"},[e("h1",null,"🤖 JManus")],-1)),e("h2",null,t(n.value===1?s.$t("init.welcomeStep"):s.$t("init.welcome")),1),e("p",W,t(n.value===1?s.$t("init.languageStepDescription"):s.$t("init.description")),1)]),e("div",Q,[e("div",{class:g(["step",{active:n.value>=1,completed:n.value>1}])},[a[10]||(a[10]=e("span",{class:"step-number"},"1",-1)),e("span",X,t(s.$t("init.stepLanguage")),1)],2),a[12]||(a[12]=e("div",{class:"step-divider"},null,-1)),e("div",{class:g(["step",{active:n.value>=2,completed:n.value>2}])},[a[11]||(a[11]=e("span",{class:"step-number"},"2",-1)),e("span",Y,t(s.$t("init.stepModel")),1)],2)]),n.value===1?(c(),u("div",Z,[e("div",x,[e("label",ee,t(s.$t("init.selectLanguageLabel")),1),e("div",se,[e("label",{class:g(["language-option",{active:d.value==="zh"}])},[p(e("input",{type:"radio","onUpdate:modelValue":a[0]||(a[0]=o=>d.value=o),value:"zh"},null,512),[[y,d.value]]),a[13]||(a[13]=e("span",{class:"language-content"},[e("span",{class:"language-flag"},"🇨🇳"),e("span",{class:"language-text"},[e("strong",null,"中文"),e("small",null,"简体中文")])],-1))],2),e("label",{class:g(["language-option",{active:d.value==="en"}])},[p(e("input",{type:"radio","onUpdate:modelValue":a[1]||(a[1]=o=>d.value=o),value:"en"},null,512),[[y,d.value]]),a[14]||(a[14]=e("span",{class:"language-content"},[e("span",{class:"language-flag"},"🇺🇸"),e("span",{class:"language-text"},[e("strong",null,"English"),e("small",null,"English (US)")])],-1))],2)])]),e("div",ae,[e("button",{type:"button",class:"submit-btn",disabled:!d.value,onClick:S},t(s.$t("init.continueToModel")),9,le)])])):m("",!0),n.value===2?(c(),u("div",te,[e("form",{onSubmit:z(D,["prevent"])},[e("div",oe,[e("label",ie,t(s.$t("init.configModeLabel")),1),e("div",ne,[e("label",{class:g(["radio-option",{active:l.value.configMode==="dashscope"}])},[p(e("input",{type:"radio","onUpdate:modelValue":a[2]||(a[2]=o=>l.value.configMode=o),value:"dashscope",onChange:M},null,544),[[y,l.value.configMode]]),e("span",de,[e("strong",null,t(s.$t("init.dashscopeMode")),1),e("small",null,t(s.$t("init.dashscopeModeDesc")),1)])],2),e("label",{class:g(["radio-option",{active:l.value.configMode==="custom"}])},[p(e("input",{type:"radio","onUpdate:modelValue":a[3]||(a[3]=o=>l.value.configMode=o),value:"custom",onChange:M},null,544),[[y,l.value.configMode]]),e("span",re,[e("strong",null,t(s.$t("init.customMode")),1),e("small",null,t(s.$t("init.customModeDesc")),1)])],2)])]),l.value.configMode==="dashscope"?(c(),u("div",ue,[e("label",ce,[b(t(s.$t("init.apiKeyLabel"))+" ",1),a[15]||(a[15]=e("span",{class:"required"},"*",-1))]),p(e("input",{id:"apiKey","onUpdate:modelValue":a[4]||(a[4]=o=>l.value.apiKey=o),type:"password",class:"form-input",placeholder:s.$t("init.apiKeyPlaceholder"),disabled:i.value,required:""},null,8,pe),[[h,l.value.apiKey]]),e("div",me,[b(t(s.$t("init.apiKeyHint"))+" ",1),e("a",ve,t(s.$t("init.getApiKey")),1)])])):m("",!0),l.value.configMode==="custom"?(c(),u("div",fe,[e("div",ge,[e("label",be,[b(t(s.$t("init.baseUrlLabel"))+" ",1),a[16]||(a[16]=e("span",{class:"required"},"*",-1))]),p(e("input",{id:"baseUrl","onUpdate:modelValue":a[5]||(a[5]=o=>l.value.baseUrl=o),type:"url",class:"form-input",placeholder:s.$t("init.baseUrlPlaceholder"),disabled:i.value,required:""},null,8,he),[[h,l.value.baseUrl]]),e("div",ye,t(s.$t("init.baseUrlHint")),1)]),e("div",_e,[e("label",Ne,[b(t(s.$t("init.customApiKeyLabel"))+" ",1),a[17]||(a[17]=e("span",{class:"required"},"*",-1))]),p(e("input",{id:"customApiKey","onUpdate:modelValue":a[6]||(a[6]=o=>l.value.apiKey=o),type:"password",class:"form-input",placeholder:s.$t("init.customApiKeyPlaceholder"),disabled:i.value,required:""},null,8,$e),[[h,l.value.apiKey]])]),e("div",Me,[e("label",ke,[b(t(s.$t("init.modelNameLabel"))+" ",1),a[18]||(a[18]=e("span",{class:"required"},"*",-1))]),p(e("input",{id:"modelName","onUpdate:modelValue":a[7]||(a[7]=o=>l.value.modelName=o),type:"text",class:"form-input",placeholder:s.$t("init.modelNamePlaceholder"),disabled:i.value,required:""},null,8,Ue),[[h,l.value.modelName]]),e("div",Ke,t(s.$t("init.modelNameHint")),1)]),e("div",Le,[e("label",Se,t(s.$t("init.modelDisplayNameLabel")),1),p(e("input",{id:"modelDisplayName","onUpdate:modelValue":a[8]||(a[8]=o=>l.value.modelDisplayName=o),type:"text",class:"form-input",placeholder:s.$t("init.modelDisplayNamePlaceholder"),disabled:i.value},null,8,we),[[h,l.value.modelDisplayName]])])])):m("",!0),e("div",Ce,[e("button",{type:"button",class:"back-btn",onClick:w,disabled:i.value},t(s.$t("init.back")),9,De),e("button",{type:"submit",class:"submit-btn",disabled:i.value||!L.value},[i.value?(c(),u("span",qe)):m("",!0),b(" "+t(i.value?s.$t("init.saving"):s.$t("init.saveAndContinue")),1)],8,Ve)])],32)])):m("",!0),k(K,{name:"error-fade"},{default:U(()=>[r.value?(c(),u("div",Te,t(r.value),1)):m("",!0)]),_:1}),k(K,{name:"success-fade"},{default:U(()=>[$.value?(c(),u("div",Ae,t(s.$t("init.successMessage")),1)):m("",!0)]),_:1})]),e("div",Ie,[(c(),u(P,null,E(6,o=>e("div",{class:"floating-shape",key:o})),64))]),a[19]||(a[19]=e("div",{class:"background-effects"},[e("div",{class:"gradient-orb orb-1"}),e("div",{class:"gradient-orb orb-2"}),e("div",{class:"gradient-orb orb-3"})],-1))]))}}),Oe=B(Re,[["__scopeId","data-v-104afced"]]);export{Oe as default}; diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-CxnUfhp1.css b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-CxnUfhp1.css new file mode 100644 index 0000000000..5b5d12beff --- /dev/null +++ b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-CxnUfhp1.css @@ -0,0 +1 @@ +.language-switcher[data-v-25f759dc]{position:relative;display:inline-block}.language-btn[data-v-25f759dc]{display:flex;align-items:center;gap:6px;padding:8px 12px;background:transparent;border:1.5px solid #667eea;border-radius:8px;color:#8da2fb;cursor:pointer;transition:all .2s ease;font-size:14px;font-weight:600;outline:none}.language-btn[data-v-25f759dc]:hover{background:#667eea26;border-color:#7c9eff;color:#a3bffa;box-shadow:0 0 15px #667eea33}.language-btn[data-v-25f759dc]:focus{box-shadow:0 0 0 3px #667eea80}.current-lang[data-v-25f759dc]{color:inherit;font-weight:600;min-width:40px;text-align:left;text-shadow:none}.chevron[data-v-25f759dc]{transition:transform .3s cubic-bezier(.4,0,.2,1);opacity:.9;filter:none}.language-dropdown[data-v-25f759dc]{position:absolute;top:100%;right:0;z-index:9999;margin-top:4px;background:linear-gradient(135deg,#282832f2,#1e1e28f2);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid rgba(102,126,234,.3);border-radius:8px;box-shadow:0 8px 32px #0006,0 0 0 1px #667eea33;min-width:200px;animation:slideDown-25f759dc .2s ease}.dropdown-header[data-v-25f759dc]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid rgba(102,126,234,.2);font-size:14px;font-weight:600;color:#fff;background:linear-gradient(135deg,#667eea1a,#667eea0d)}.close-btn[data-v-25f759dc]{background:none;border:none;color:#fff9;cursor:pointer;padding:4px;border-radius:4px;transition:all .2s ease}.close-btn[data-v-25f759dc]:hover{background:#ffffff1a;color:#fffc}.language-options[data-v-25f759dc]{padding:8px 0}.language-option[data-v-25f759dc]{display:flex;align-items:center;gap:12px;width:100%;padding:10px 16px;background:none;border:none;color:#ffffffb3;cursor:pointer;transition:all .2s ease;text-align:left}.language-option[data-v-25f759dc]:hover{background:#ffffff0d;color:#ffffffe6}.language-option.active[data-v-25f759dc]{background:linear-gradient(135deg,#667eea33,#667eea1a);color:#7c9eff;border-left:3px solid #667eea;padding-left:13px}.language-option.loading[data-v-25f759dc]{opacity:.6;cursor:not-allowed}.language-option[data-v-25f759dc]:disabled{cursor:not-allowed;opacity:.6}.lang-code[data-v-25f759dc]{display:inline-block;min-width:24px;font-size:12px;font-weight:600;text-transform:uppercase;opacity:.8}.lang-name[data-v-25f759dc]{flex:1;font-size:14px;font-weight:500}.check-icon[data-v-25f759dc]{color:#667eea;opacity:.8}.loading-icon[data-v-25f759dc]{color:#667eea;opacity:.8;animation:spin-25f759dc 1s linear infinite}@keyframes spin-25f759dc{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.backdrop[data-v-25f759dc]{position:fixed;top:0;left:0;right:0;bottom:0;z-index:9998;background:transparent}@keyframes slideDown-25f759dc{0%{opacity:0;transform:translateY(-8px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}@media (max-width: 768px){.language-dropdown[data-v-25f759dc]{right:-8px;left:-8px;width:auto;min-width:auto}.language-btn[data-v-25f759dc]{padding:6px 10px;font-size:13px}.current-lang[data-v-25f759dc]{min-width:35px}}@media (prefers-color-scheme: light){.language-dropdown[data-v-25f759dc]{background:#fffffff2;border-color:#0000001a;box-shadow:0 8px 32px #0000001a}.dropdown-header[data-v-25f759dc]{color:#000c;border-bottom-color:#0000001a}.close-btn[data-v-25f759dc]{color:#0009}.close-btn[data-v-25f759dc]:hover{background:#0000001a;color:#000c}.language-option[data-v-25f759dc]{color:#000000b3}.language-option[data-v-25f759dc]:hover{background:#0000000d;color:#000000e6}} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-H3fwLZKf.js b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-DOvRfojN.js similarity index 86% rename from spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-H3fwLZKf.js rename to spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-DOvRfojN.js index 4579d3467c..4f31ea8674 100644 --- a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-H3fwLZKf.js +++ b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-DOvRfojN.js @@ -1,38 +1,38 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/freemarker2-CkAicm6I.js","assets/index-SarmArA2.js","assets/index-DN-vOy2S.css","assets/iconify-B5kZhuXP.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/useMessage-BDFqrfR1.js","assets/useMessage-B772OobR.css","assets/index-BPwnW1su.js","assets/index-TjSmldwt.css","assets/handlebars-C5uyFx9F.js","assets/html-D2gt6e4j.js","assets/javascript-DjmYe7rk.js","assets/typescript-BfLRVFnk.js","assets/liquid-BpyfeEKH.js","assets/mdx-DyHo1t2K.js","assets/python-DPicRBVQ.js","assets/razor-B_0SmNCn.js","assets/xml-BJKkYGLb.js","assets/yaml-DXnlxOOm.js","assets/cssMode-dU5ExThW.js","assets/htmlMode-Cl5XUd21.js","assets/jsonMode-DrXkewyD.js","assets/tsMode-CA06cS6L.js"])))=>i.map(i=>d[i]); -var xz=Object.defineProperty;var kz=(o,e,t)=>e in o?xz(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var ri=(o,e,t)=>kz(o,typeof e!="symbol"?e+"":e,t);import{d as Ss,a as ue,b as ne,e as D,t as B,u as Pa,r as Ye,z as ar,c as Xn,o as Kd,g as xe,f as at,i as Ae,w as Vt,j as ti,F as Ji,l as ln,n as Nn,E as ny,s as In,k as Zt,T as qb,J as Gf,C as Iz,x as P,h as Zh,B as cr,D as X1,y as I9,H as Ez,K as K2,q as Nz,A as E9,_ as Oe,M as Tz,N as Mz,p as N9,G as T9,O as Az}from"./index-SarmArA2.js";import{I as Pe}from"./iconify-B5kZhuXP.js";import{_ as us}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{a as Rz,u as M9}from"./useMessage-BDFqrfR1.js";import{L as Pz}from"./index-BPwnW1su.js";const Oz={class:"switch"},Fz=["checked"],Bz={class:"switch-label"},Wz=Ss({__name:"index",props:{enabled:{type:Boolean},label:{}},emits:["update:switchValue"],setup(o,{emit:e}){const t=e,i=n=>{const s=n.target.checked;t("update:switchValue",s)};return(n,s)=>(ne(),ue("label",Oz,[D("input",{type:"checkbox",checked:n.enabled,onChange:i},null,40,Fz),s[0]||(s[0]=D("span",{class:"slider"},null,-1)),D("span",Bz,B(n.label),1)]))}}),Vz=us(Wz,[["__scopeId","data-v-d484b4a3"]]);class u_{static async getConfigsByGroup(e){try{const t=await fetch(`${this.BASE_URL}/group/${e}`);if(!t.ok)throw new Error(`Failed to get ${e} group configuration: ${t.status}`);return await t.json()}catch(t){throw console.error(`Failed to get ${e} group configuration:`,t),t}}static async batchUpdateConfigs(e){if(e.length===0)return{success:!0,message:"No configuration needs to be updated"};try{const t=await fetch(`${this.BASE_URL}/batch-update`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`Batch update configuration failed: ${t.status}`);return{success:!0,message:"Configuration saved successfully"}}catch(t){return console.error("Batch update configuration failed:",t),{success:!1,message:t instanceof Error?t.message:"Update failed, please try again"}}}static async getConfigById(e){try{const t=await fetch(`${this.BASE_URL}/${e}`);if(!t.ok)throw new Error(`Failed to get configuration item: ${t.status}`);return await t.json()}catch(t){throw console.error(`Failed to get configuration item[${e}]:`,t),t}}static async updateConfig(e){try{const t=await fetch(`${this.BASE_URL}/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`Failed to update configuration item: ${t.status}`);return{success:!0,message:"Configuration updated successfully"}}catch(t){return console.error("Failed to update configuration item:",t),{success:!1,message:t instanceof Error?t.message:"Update failed, please try again"}}}}ri(u_,"BASE_URL","/api/config");const Hz={class:"config-panel"},zz={class:"config-header"},$z={class:"header-left"},Uz={class:"config-stats"},jz={class:"stat-item"},Kz={class:"stat-label"},qz={class:"stat-value"},Gz={key:0,class:"stat-item"},Zz={class:"stat-label"},Yz={class:"stat-value modified"},Xz={class:"header-right"},Qz={class:"import-export-actions"},Jz=["title"],e$=["title"],t$={class:"search-box"},i$=["placeholder"],n$={key:0,class:"loading-container"},s$={key:1,class:"config-groups"},o$={class:"group-header"},r$={class:"group-info"},a$={class:"group-icon"},l$={class:"group-actions"},d$=["onClick","disabled","title"],c$={class:"sub-groups"},u$=["onClick"],h$={class:"sub-group-info"},g$={class:"sub-group-title"},f$={class:"item-count"},p$={class:"config-items"},m$={key:0,class:"config-item-content vertical-layout"},_$={class:"config-item-info"},v$={class:"config-item-header"},b$={class:"config-label"},C$={class:"type-badge boolean"},w$={key:0,class:"modified-badge"},S$=["title"],y$={class:"config-control"},L$=["value","onChange"],D$=["value"],x$={key:1,class:"config-item-content vertical-layout"},k$={class:"config-item-info"},I$={class:"config-item-header"},E$={class:"config-label"},N$={class:"type-badge select"},T$={key:0,class:"modified-badge"},M$=["title"],A$={class:"config-control"},R$=["value","onChange"],P$=["value"],O$={key:2,class:"config-item-content vertical-layout"},F$={class:"config-item-info"},B$={class:"config-item-header"},W$={class:"config-label"},V$={class:"type-badge textarea"},H$={key:0,class:"modified-badge"},z$=["title"],$$={class:"config-control"},U$=["value","onInput"],j$={key:3,class:"config-item-content vertical-layout"},K$={class:"config-item-info"},q$={class:"config-item-header"},G$={class:"config-label"},Z$={class:"type-badge number"},Y$={key:0,class:"modified-badge"},X$=["title"],Q$={key:0,class:"config-meta"},J$={class:"range-info"},eU={class:"config-control"},tU=["value","onInput","min","max"],iU={key:4,class:"config-item-content vertical-layout"},nU={class:"config-item-info"},sU={class:"config-item-header"},oU={class:"config-label"},rU={class:"type-badge string"},aU={key:0,class:"modified-badge"},lU=["title"],dU={class:"config-control"},cU=["value","onInput"],uU={key:2,class:"empty-state"},hU=Ss({__name:"basicConfig",setup(o){const{t:e}=Pa(),t=Ye(!0),i=Ye(!1),n=Ye([]),s=Ye(new Map),r=Ye(new Set),a=ar({show:!1,text:"",type:"success"}),l=Ye(""),d={headless:"config.basicConfig.browserSettings.headless",requestTimeout:"config.basicConfig.browserSettings.requestTimeout",debugDetail:"config.basicConfig.general.debugDetail",baseDir:"config.basicConfig.general.baseDir",openBrowser:"config.basicConfig.interactionSettings.openBrowser",maxSteps:"config.basicConfig.agentSettings.maxSteps",userInputTimeout:"config.basicConfig.agentSettings.userInputTimeout",maxMemory:"config.basicConfig.agentSettings.maxMemory",parallelToolCalls:"config.basicConfig.agentSettings.parallelToolCalls",forceOverrideFromYaml:"config.basicConfig.agents.forceOverrideFromYaml",enabled:"config.basicConfig.infiniteContext.enabled",parallelThreads:"config.basicConfig.infiniteContext.parallelThreads",taskContextSize:"config.basicConfig.infiniteContext.taskContextSize",allowExternalAccess:"config.basicConfig.fileSystem.allowExternalAccess",connectionTimeoutSeconds:"config.basicConfig.mcpServiceLoader.connectionTimeoutSeconds",maxRetryCount:"config.basicConfig.mcpServiceLoader.maxRetryCount",maxConcurrentConnections:"config.basicConfig.mcpServiceLoader.maxConcurrentConnections"},c={manus:"config.basicConfig.groupDisplayNames.manus"},u={manus:"🤖",browser:"🌐",interaction:"🖥️",system:"⚙️",performance:"⚡"},h={agent:"config.subGroupDisplayNames.agent",browser:"config.subGroupDisplayNames.browser",interaction:"config.subGroupDisplayNames.interaction",agents:"config.subGroupDisplayNames.agents",infiniteContext:"config.subGroupDisplayNames.infiniteContext",general:"config.subGroupDisplayNames.general",filesystem:"config.subGroupDisplayNames.filesystem",mcpServiceLoader:"config.subGroupDisplayNames.mcpServiceLoader"},g=Xn(()=>n.value.some(V=>V.subGroups.some(Q=>Q.items.some(H=>s.value.get(H.id)!==H.configValue)))),f=V=>V==="true",m=V=>parseFloat(V)||0,v=V=>({maxSteps:1,browserTimeout:1,maxThreads:1,timeoutSeconds:5,maxMemory:1})[V]||1,_=V=>({maxSteps:100,browserTimeout:600,maxThreads:32,timeoutSeconds:300,maxMemory:1e3})[V]||1e4,b=V=>typeof V=="string"?V:V.value,C=V=>typeof V=="string"?V:V.label,w=(V,Q)=>{if(typeof Q=="boolean")return Q.toString();if(typeof Q=="string"){if(V.options&&V.options.length>0){const H=V.options.find(G=>(typeof G=="string"?G:G.label)===Q||(typeof G=="string"?G:G.value)===Q);if(H)return typeof H=="string"?H:H.value}return Q}return String(Q)},S=(V,Q,H=!1)=>{let G;V.inputType==="BOOLEAN"||V.inputType==="CHECKBOX"?G=w(V,Q):G=String(Q),V.configValue!==G&&(V.configValue=G,V._modified=!0,(H||V.inputType==="BOOLEAN"||V.inputType==="CHECKBOX"||V.inputType==="SELECT")&&y())};let x=null;const y=()=>{x&&clearTimeout(x),x=window.setTimeout(()=>{R()},500)},I=(V,Q="success")=>{a.text=V,a.type=Q,a.show=!0,setTimeout(()=>{a.show=!1},3e3)},E=async()=>{try{t.value=!0;const Q=["manus"].map(async G=>{try{const Z=await u_.getConfigsByGroup(G);if(Z.length===0)return null;const $e=Z.map(Ce=>({...Ce,displayName:d[Ce.configKey]||Ce.configKey,min:v(Ce.configKey),max:_(Ce.configKey)}));$e.forEach(Ce=>{s.value.set(Ce.id,Ce.configValue)});const ft=new Map;$e.forEach(Ce=>{const re=Ce.configSubGroup??"general";ft.has(re)||ft.set(re,[]),ft.get(re).push(Ce)});const Bt=Array.from(ft.entries()).map(([Ce,re])=>({name:Ce,displayName:h[Ce]||Ce,items:re}));return{name:G,displayName:c[G]||G,subGroups:Bt}}catch(Z){return console.warn(`加载配置组 ${G} 失败,跳过:`,Z),null}}),H=await Promise.all(Q);n.value=H.filter(G=>G!==null),console.log(e("config.basicConfig.loadConfigSuccess"),n.value)}catch(V){console.error(e("config.basicConfig.loadConfigFailed"),V),I(e("config.basicConfig.loadConfigFailed"),"error")}finally{t.value=!1}},R=async()=>{if(!(i.value||!g.value))try{i.value=!0;const V=[];if(n.value.forEach(H=>{H.subGroups.forEach(G=>{const Z=G.items.filter($e=>$e._modified);V.push(...Z)})}),V.length===0){I(e("config.basicConfig.noModified"));return}const Q=await u_.batchUpdateConfigs(V);Q.success?(V.forEach(H=>{s.value.set(H.id,H.configValue),H._modified=!1}),I(e("config.basicConfig.saveSuccess"))):I(Q.message||e("config.basicConfig.saveFailed"),"error")}catch(V){console.error(e("config.basicConfig.saveFailed"),V),I(e("config.basicConfig.saveFailed"),"error")}finally{i.value=!1}},j=async V=>{if(confirm(e("config.basicConfig.resetGroupConfirm",c[V]||V)))try{i.value=!0;const H=n.value.find($e=>$e.name===V);if(!H)return;const G=[];if(H.subGroups.forEach($e=>{$e.items.forEach(ft=>{const Bt=O(ft.configKey);Bt!==ft.configValue&&G.push({...ft,configValue:Bt})})}),G.length===0){I(e("config.basicConfig.isDefault"));return}const Z=await u_.batchUpdateConfigs(G);Z.success?(await E(),I(e("config.basicConfig.resetSuccess",G.length))):I(Z.message||e("config.basicConfig.resetFailed"),"error")}catch(H){console.error(e("config.basicConfig.resetFailed"),H),I(e("config.basicConfig.resetFailed"),"error")}finally{i.value=!1}},O=V=>({systemName:"JManus",language:"zh-CN",maxThreads:"8",timeoutSeconds:"60",autoOpenBrowser:"false",headlessBrowser:"true",maxMemory:"1000"})[V]||"",$=(V,Q)=>{const H=`${V}-${Q}`;r.value.has(H)?r.value.delete(H):r.value.add(H)},K=(V,Q)=>r.value.has(`${V}-${Q}`),oe=Xn(()=>{const V=n.value.reduce((H,G)=>H+G.subGroups.reduce((Z,$e)=>Z+$e.items.length,0),0),Q=n.value.reduce((H,G)=>H+G.subGroups.reduce((Z,$e)=>Z+$e.items.filter(ft=>s.value.get(ft.id)!==ft.configValue).length,0),0);return{total:V,modified:Q}}),Le=Xn(()=>{if(!l.value.trim())return n.value;const V=l.value.toLowerCase();return n.value.map(Q=>({...Q,subGroups:Q.subGroups.map(H=>({...H,items:H.items.filter(G=>G.displayName.toLowerCase().includes(V)||G.configKey.toLowerCase().includes(V)||G.description&&G.description.toLowerCase().includes(V))})).filter(H=>H.items.length>0)})).filter(Q=>Q.subGroups.length>0)}),he=()=>{try{const V={timestamp:new Date().toISOString(),version:"1.0",configs:n.value.reduce((Z,$e)=>($e.subGroups.forEach(ft=>{ft.items.forEach(Bt=>{Z[Bt.configKey]=Bt.configValue})}),Z),{})},Q=JSON.stringify(V,null,2),H=new Blob([Q],{type:"application/json"}),G=document.createElement("a");G.href=URL.createObjectURL(H),G.download=`config-export-${new Date().toISOString().split("T")[0]}.json`,G.click(),I(e("config.basicConfig.exportSuccess"))}catch(V){console.error(e("config.basicConfig.exportFailed"),V),I(e("config.basicConfig.exportFailed"),"error")}},se=V=>{var Z;const Q=V.target,H=(Z=Q.files)==null?void 0:Z[0];if(!H)return;const G=new FileReader;G.onload=async $e=>{var ft;try{const Bt=JSON.parse((ft=$e.target)==null?void 0:ft.result);if(!Bt.configs)throw new Error(e("config.basicConfig.invalidFormat"));if(!confirm(e("config.importConfirm")))return;i.value=!0;const re=[];if(n.value.forEach(ce=>{ce.subGroups.forEach(Ie=>{Ie.items.forEach(mt=>{Object.prototype.hasOwnProperty.call(Bt.configs,mt.configKey)&&re.push({...mt,configValue:Bt.configs[mt.configKey]})})})}),re.length===0){I(e("config.basicConfig.notFound"));return}const ke=await u_.batchUpdateConfigs(re);ke.success?(await E(),I(e("config.basicConfig.importSuccess"))):I(ke.message||e("config.basicConfig.importFailed"),"error")}catch(Bt){console.error(e("config.basicConfig.importFailed"),Bt),I(e("config.basicConfig.importFailed"),"error")}finally{i.value=!1,Q.value=""}},G.readAsText(H)};return Kd(()=>{E()}),(V,Q)=>(ne(),ue("div",Hz,[D("div",zz,[D("div",$z,[D("h2",null,B(V.$t("config.basicConfig.title")),1),D("div",Uz,[D("span",jz,[D("span",Kz,B(V.$t("config.basicConfig.totalConfigs"))+":",1),D("span",qz,B(oe.value.total),1)]),oe.value.modified>0?(ne(),ue("span",Gz,[D("span",Zz,B(V.$t("config.basicConfig.modified"))+":",1),D("span",Yz,B(oe.value.modified),1)])):at("",!0)])]),D("div",Xz,[D("div",Qz,[D("button",{onClick:he,class:"action-btn",title:V.$t("config.basicConfig.exportConfigs")}," 📤 ",8,Jz),D("label",{class:"action-btn",title:V.$t("config.basicConfig.importConfigs")},[Q[1]||(Q[1]=Ae(" 📥 ")),D("input",{type:"file",accept:".json",onChange:se,style:{display:"none"}},null,32)],8,e$)]),D("div",t$,[Vt(D("input",{"onUpdate:modelValue":Q[0]||(Q[0]=H=>l.value=H),type:"text",placeholder:V.$t("config.search"),class:"search-input"},null,8,i$),[[ti,l.value]]),Q[2]||(Q[2]=D("span",{class:"search-icon"},"🔍",-1))])])]),t.value?(ne(),ue("div",n$,[Q[3]||(Q[3]=D("div",{class:"loading-spinner"},null,-1)),D("p",null,B(V.$t("config.loading")),1)])):Le.value.length>0?(ne(),ue("div",s$,[(ne(!0),ue(Ji,null,ln(Le.value,H=>(ne(),ue("div",{key:H.name,class:"config-group"},[D("div",o$,[D("div",r$,[D("span",a$,B(u[H.name]||"⚙️"),1)]),D("div",l$,[D("button",{onClick:G=>j(H.name),class:"reset-btn",disabled:i.value,title:V.$t("config.resetGroupConfirm")},B(V.$t("config.reset")),9,d$)]),Q[4]||(Q[4]=D("div",{class:"group-divider"},null,-1))]),D("div",c$,[(ne(!0),ue(Ji,null,ln(H.subGroups,G=>(ne(),ue("div",{key:G.name,class:"sub-group"},[D("div",{class:"sub-group-header",onClick:Z=>$(H.name,G.name)},[D("div",h$,[Q[5]||(Q[5]=D("span",{class:"sub-group-icon"},"📁",-1)),D("h4",g$,B(V.$t(G.displayName)),1),D("span",f$,"("+B(G.items.length)+")",1)]),D("span",{class:Nn(["collapse-icon",{collapsed:K(H.name,G.name)}])}," ▼ ",2)],8,u$),Vt(D("div",p$,[(ne(!0),ue(Ji,null,ln(G.items,Z=>(ne(),ue("div",{key:Z.id,class:Nn(["config-item",{modified:s.value.get(Z.id)!==Z.configValue}])},[Z.inputType==="BOOLEAN"||Z.inputType==="CHECKBOX"?(ne(),ue("div",m$,[D("div",_$,[D("div",v$,[D("label",b$,[Ae(B(V.$t(Z.displayName)||Z.description)+" ",1),D("span",C$,B(Z.inputType==="CHECKBOX"?V.$t("config.types.checkbox"):V.$t("config.types.boolean")),1),s.value.get(Z.id)!==Z.configValue?(ne(),ue("span",w$,B(V.$t("config.modified")),1)):at("",!0)]),D("span",{class:"config-key",title:Z.configKey},B(Z.configKey),9,S$)])]),D("div",y$,[Z.options&&Z.options.length>0?(ne(),ue("select",{key:0,class:"config-input select-input",value:Z.configValue,onChange:$e=>{var ft;return S(Z,((ft=$e.target)==null?void 0:ft.value)||"")}},[(ne(!0),ue(Ji,null,ln(Z.options,$e=>(ne(),ue("option",{key:b($e),value:b($e)},B(C($e)),9,D$))),128))],40,L$)):(ne(),In(Vz,{key:1,enabled:f(Z.configValue),label:"","onUpdate:switchValue":$e=>S(Z,$e)},null,8,["enabled","onUpdate:switchValue"]))])])):Z.inputType==="SELECT"?(ne(),ue("div",x$,[D("div",k$,[D("div",I$,[D("label",E$,[Ae(B(V.$t(Z.displayName)||Z.description)+" ",1),D("span",N$,B(V.$t("config.types.select")),1),s.value.get(Z.id)!==Z.configValue?(ne(),ue("span",T$,B(V.$t("config.modified")),1)):at("",!0)]),D("span",{class:"config-key",title:Z.configKey},B(Z.configKey),9,M$)])]),D("div",A$,[D("select",{class:"config-input select-input",value:Z.configValue,onChange:$e=>{var ft;return S(Z,((ft=$e.target)==null?void 0:ft.value)||"")}},[(ne(!0),ue(Ji,null,ln(Z.options||[],$e=>(ne(),ue("option",{key:b($e),value:b($e)},B(C($e)),9,P$))),128))],40,R$)])])):Z.inputType==="TEXTAREA"?(ne(),ue("div",O$,[D("div",F$,[D("div",B$,[D("label",W$,[Ae(B(V.$t(Z.displayName)||Z.description)+" ",1),D("span",V$,B(V.$t("config.types.textarea")),1),s.value.get(Z.id)!==Z.configValue?(ne(),ue("span",H$,B(V.$t("config.modified")),1)):at("",!0)]),D("span",{class:"config-key",title:Z.configKey},B(Z.configKey),9,z$)])]),D("div",$$,[D("textarea",{class:"config-input textarea-input",value:Z.configValue,onInput:$e=>{var ft;return S(Z,((ft=$e.target)==null?void 0:ft.value)||"")},onBlur:y,rows:"3"},null,40,U$)])])):Z.inputType==="NUMBER"?(ne(),ue("div",j$,[D("div",K$,[D("div",q$,[D("label",G$,[Ae(B(V.$t(Z.displayName)||Z.description)+" ",1),D("span",Z$,B(V.$t("config.types.number")),1),s.value.get(Z.id)!==Z.configValue?(ne(),ue("span",Y$,B(V.$t("config.modified")),1)):at("",!0)]),D("span",{class:"config-key",title:Z.configKey},B(Z.configKey),9,X$),Z.min||Z.max?(ne(),ue("div",Q$,[D("span",J$,B(V.$t("config.range"))+": "+B(Z.min||0)+" - "+B(Z.max||"∞"),1)])):at("",!0)])]),D("div",eU,[D("input",{type:"number",class:"config-input number-input",value:m(Z.configValue),onInput:$e=>{var ft;return S(Z,((ft=$e.target)==null?void 0:ft.value)||"")},onBlur:y,min:Z.min||1,max:Z.max||1e4},null,40,tU)])])):(ne(),ue("div",iU,[D("div",nU,[D("div",sU,[D("label",oU,[Ae(B(V.$t(Z.displayName)||Z.description)+" ",1),D("span",rU,B(Z.inputType==="TEXT"?V.$t("config.types.text"):V.$t("config.types.string")),1),s.value.get(Z.id)!==Z.configValue?(ne(),ue("span",aU,B(V.$t("config.modified")),1)):at("",!0)]),D("span",{class:"config-key",title:Z.configKey},B(Z.configKey),9,lU)])]),D("div",dU,[D("input",{type:"text",class:"config-input text-input",value:Z.configValue,onInput:$e=>{var ft;return S(Z,((ft=$e.target)==null?void 0:ft.value)||"")},onBlur:y},null,40,cU)])]))],2))),128))],512),[[ny,!K(H.name,G.name)]])]))),128))])]))),128))])):(ne(),ue("div",uU,[D("p",null,B(V.$t("config.notFound")),1)])),xe(qb,{name:"message-fade"},{default:Zt(()=>[a.show?(ne(),ue("div",{key:0,class:Nn(["message-toast",a.type])},B(a.text),3)):at("",!0)]),_:1})]))}}),xP=us(hU,[["__scopeId","data-v-5e6536ac"]]),gU={},fU={class:"config-config"},pU={class:"panel-header"},mU={class:"panel-actions"};function _U(o,e){return ne(),ue("div",fU,[D("div",pU,[Gf(o.$slots,"title",{},void 0),D("div",mU,[Gf(o.$slots,"actions",{},void 0)])]),Gf(o.$slots,"default",{},void 0)])}const Gb=us(gU,[["render",_U],["__scopeId","data-v-c91688e7"]]),vU={class:"modal-header"},bU={class:"modal-content"},CU={class:"modal-footer"},wU=Ss({__name:"index",props:{modelValue:{type:Boolean,required:!0},title:{type:String,default:""}},emits:["update:modelValue","confirm"],setup(o){const e=t=>{t.target===t.currentTarget&&(t.stopPropagation(),t.preventDefault())};return(t,i)=>(ne(),In(Iz,{to:"body"},[xe(qb,{name:"modal"},{default:Zt(()=>[o.modelValue?(ne(),ue("div",{key:0,class:"modal-overlay",onClick:e},[D("div",{class:"modal-container",onClick:i[3]||(i[3]=Zh(()=>{},["stop"]))},[D("div",vU,[D("h3",null,B(o.title),1),D("button",{class:"close-btn",onClick:i[0]||(i[0]=n=>t.$emit("update:modelValue",!1))},[xe(P(Pe),{icon:"carbon:close"})])]),D("div",bU,[Gf(t.$slots,"default",{},void 0,!0)]),D("div",CU,[Gf(t.$slots,"footer",{},()=>[D("button",{class:"cancel-btn",onClick:i[1]||(i[1]=n=>t.$emit("update:modelValue",!1))},B(t.$t("common.cancel")),1),D("button",{class:"confirm-btn",onClick:i[2]||(i[2]=n=>t.$emit("confirm"))},B(t.$t("common.confirm")),1)],!0)])])])):at("",!0)]),_:3})]))}}),Wo=us(wU,[["__scopeId","data-v-baaf1c89"]]),SU={class:"tool-selection-content"},yU={class:"tool-controls"},LU={class:"search-container"},DU={class:"sort-container"},xU={class:"tool-summary"},kU={class:"summary-text"},IU={key:0,class:"tool-groups"},EU=["onClick"],NU={class:"group-title-area"},TU={class:"group-name"},MU={class:"group-count"},AU={class:"group-enable-all"},RU=["checked","onChange","data-group"],PU={class:"tool-info"},OU={class:"tool-selection-name"},FU={key:0,class:"tool-selection-desc"},BU={class:"tool-actions"},WU=["checked","onChange"],VU={key:1,class:"empty-state"},HU=Ss({__name:"index",props:{modelValue:{type:Boolean},tools:{},selectedToolIds:{}},emits:["update:modelValue","confirm"],setup(o,{emit:e}){const t=o,i=e,n=Xn({get:()=>t.modelValue,set:x=>i("update:modelValue",x)}),s=Ye(""),r=Ye("group"),a=Ye(new Set),l=Ye([]),d=(x,y)=>{const I=document.querySelector(`input[data-group="${x}"]`);I&&(I.indeterminate=_(y))};cr(()=>t.selectedToolIds,x=>{l.value=[...x]},{immediate:!0});const c=Xn(()=>{let x=t.tools.filter(y=>y.key);if(s.value){const y=s.value.toLowerCase();x=x.filter(I=>{var E;return I.name.toLowerCase().includes(y)||I.description.toLowerCase().includes(y)||(((E=I.serviceGroup)==null?void 0:E.toLowerCase().includes(y))??!1)})}switch(r.value){case"name":x=[...x].sort((y,I)=>y.name.localeCompare(I.name));break;case"enabled":x=[...x].sort((y,I)=>{const E=l.value.includes(y.key),R=l.value.includes(I.key);return E&&!R?-1:!E&&R?1:y.name.localeCompare(I.name)});break;case"group":default:x=[...x].sort((y,I)=>{const E=y.serviceGroup??"未分组",R=I.serviceGroup??"未分组";return E!==R?E.localeCompare(R):y.name.localeCompare(I.name)});break}return x}),u=Xn(()=>{const x=new Map;return c.value.forEach(y=>{const I=y.serviceGroup??"未分组";x.has(I)||x.set(I,[]),x.get(I).push(y)}),new Map([...x.entries()].sort())}),h=Xn(()=>c.value.length);cr([l,u],()=>{I9(()=>{for(const[x,y]of u.value)d(x,y)})},{flush:"post",deep:!1});const g=x=>l.value.includes(x),f=(x,y)=>{y.stopPropagation();const E=y.target.checked;if(!x){console.error("toolKey is undefined, cannot proceed");return}E?l.value.includes(x)||(l.value=[...l.value,x]):l.value=l.value.filter(R=>R!==x)},m=x=>x.filter(y=>l.value.includes(y.key)),v=x=>x.length>0&&x.every(y=>l.value.includes(y.key)),_=x=>{const y=m(x).length;return y>0&&y{y.stopPropagation();const E=y.target.checked,R=x.map(j=>j.key);if(E){const j=[...l.value];R.forEach(O=>{j.includes(O)||j.push(O)}),l.value=j}else l.value=l.value.filter(j=>!R.includes(j))},C=x=>{a.value.has(x)?a.value.delete(x):a.value.add(x)},w=()=>{i("confirm",[...l.value]),i("update:modelValue",!1)},S=()=>{l.value=[...t.selectedToolIds],i("update:modelValue",!1)};return cr(n,x=>{if(x){a.value.clear();const y=Array.from(u.value.keys());y.length>1&&y.slice(1).forEach(I=>{a.value.add(I)})}}),(x,y)=>(ne(),In(Wo,{modelValue:n.value,"onUpdate:modelValue":[y[4]||(y[4]=I=>n.value=I),S],title:"选择工具",onConfirm:w},{default:Zt(()=>[D("div",SU,[D("div",yU,[D("div",LU,[Vt(D("input",{"onUpdate:modelValue":y[0]||(y[0]=I=>s.value=I),type:"text",class:"search-input",placeholder:"搜索工具..."},null,512),[[ti,s.value]])]),D("div",DU,[Vt(D("select",{"onUpdate:modelValue":y[1]||(y[1]=I=>r.value=I),class:"sort-select"},y[5]||(y[5]=[D("option",{value:"group"},"按服务组排序",-1),D("option",{value:"name"},"按名称排序",-1),D("option",{value:"enabled"},"按启用状态排序",-1)]),512),[[X1,r.value]])])]),D("div",xU,[D("span",kU," 共 "+B(u.value.size)+" 个服务组,"+B(h.value)+" 个工具 (已选择 "+B(l.value.length)+" 个) ",1)]),u.value.size>0?(ne(),ue("div",IU,[(ne(!0),ue(Ji,null,ln(u.value,([I,E])=>(ne(),ue("div",{key:I,class:"tool-group"},[D("div",{class:Nn(["tool-group-header",{collapsed:a.value.has(I)}]),onClick:R=>C(I)},[D("div",NU,[xe(P(Pe),{icon:a.value.has(I)?"carbon:chevron-right":"carbon:chevron-down",class:"collapse-icon"},null,8,["icon"]),xe(P(Pe),{icon:"carbon:folder",class:"group-icon"}),D("span",TU,B(I),1),D("span",MU," ("+B(m(E).length)+"/"+B(E.length)+") ",1)]),D("div",{class:"group-actions",onClick:y[2]||(y[2]=Zh(()=>{},["stop"]))},[D("label",AU,[D("input",{type:"checkbox",class:"group-enable-checkbox",checked:v(E),onChange:R=>b(E,R),"data-group":I},null,40,RU),y[6]||(y[6]=D("span",{class:"enable-label"},"启用全部",-1))])])],10,EU),D("div",{class:Nn(["tool-group-content",{collapsed:a.value.has(I)}])},[(ne(!0),ue(Ji,null,ln(E.filter(R=>R&&R.key),R=>(ne(),ue("div",{key:R.key,class:"tool-selection-item"},[D("div",PU,[D("div",OU,B(R.name),1),R.description?(ne(),ue("div",FU,B(R.description),1)):at("",!0)]),D("div",BU,[D("label",{class:"tool-enable-switch",onClick:y[3]||(y[3]=Zh(()=>{},["stop"]))},[D("input",{type:"checkbox",class:"tool-enable-checkbox",checked:g(R.key),onChange:j=>f(R.key,j)},null,40,WU),y[7]||(y[7]=D("span",{class:"tool-enable-slider"},null,-1))])])]))),128))],2)]))),128))])):(ne(),ue("div",VU,[xe(P(Pe),{icon:"carbon:tools",class:"empty-icon"}),y[8]||(y[8]=D("p",null,"没有找到工具",-1))]))])]),_:1},8,["modelValue"]))}}),zU=us(HU,[["__scopeId","data-v-79f6a572"]]);class ac{static async handleResponse(e){if(!e.ok)try{const t=await e.json();throw new Error(t.message||`API request failed: ${e.status}`)}catch{throw new Error(`API request failed: ${e.status} ${e.statusText}`)}return e}static async getAllAgents(e){try{if(e){const t=await fetch(`${this.BASE_URL}/namespace/${e}`);return await(await this.handleResponse(t)).json()}else{const t=await fetch(`${this.BASE_URL}`);return await(await this.handleResponse(t)).json()}}catch(t){throw console.error("Failed to get Agent list:",t),t}}static async getAgentById(e){try{const t=await fetch(`${this.BASE_URL}/${e}`);return await(await this.handleResponse(t)).json()}catch(t){throw console.error(`Failed to get Agent[${e}] details:`,t),t}}static async createAgent(e){try{const t=await fetch(this.BASE_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await(await this.handleResponse(t)).json()}catch(t){throw console.error("Failed to create Agent:",t),t}}static async updateAgent(e,t){try{const i=await fetch(`${this.BASE_URL}/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await(await this.handleResponse(i)).json()}catch(i){throw console.error(`Failed to update Agent[${e}]:`,i),i}}static async deleteAgent(e){try{const t=await fetch(`${this.BASE_URL}/${e}`,{method:"DELETE"});if(t.status===400)throw new Error("Cannot delete default Agent");await this.handleResponse(t)}catch(t){throw console.error(`Failed to delete Agent[${e}]:`,t),t}}static async getAvailableTools(){try{const e=await fetch(`${this.BASE_URL}/tools`);return await(await this.handleResponse(e)).json()}catch(e){throw console.error("Failed to get available tools list:",e),e}}}ri(ac,"BASE_URL","/api/agents");class ko{static async handleResponse(e){if(!e.ok)try{const t=await e.json();throw new Error(t.message||`API request failed: ${e.status}`)}catch{throw new Error(`API request failed: ${e.status} ${e.statusText}`)}return e}static async getAllModels(){try{const e=await fetch(this.BASE_URL);return await(await this.handleResponse(e)).json()}catch(e){throw console.error("Failed to get Model list:",e),e}}static async getAllTypes(){try{const e=await fetch(`${this.BASE_URL}/types`);return await(await this.handleResponse(e)).json()}catch(e){throw console.error("Failed to get Model list:",e),e}}static async getModelById(e){try{const t=await fetch(`${this.BASE_URL}/${e}`);return await(await this.handleResponse(t)).json()}catch(t){throw console.error(`Failed to get Model[${e}] details:`,t),t}}static async createModel(e){try{const t=JSON.stringify(e,(s,r)=>(s==="temperature"||s==="topP")&&r===void 0?null:r),i=await fetch(this.BASE_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:t});return await(await this.handleResponse(i)).json()}catch(t){throw console.error("Failed to create Model:",t),t}}static async updateModel(e,t){try{const i=JSON.stringify(t,(r,a)=>(r==="temperature"||r==="topP")&&a===void 0?null:a),n=await fetch(`${this.BASE_URL}/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:i});if(n.status===499)throw new Error("Request rejected, please modify the model configuration in the configuration file");return await(await this.handleResponse(n)).json()}catch(i){throw console.error(`Failed to update Model[${e}]:`,i),i}}static async deleteModel(e){try{const t=await fetch(`${this.BASE_URL}/${e}`,{method:"DELETE"});if(t.status===400)throw new Error("Cannot delete default Model");if(t.status===499)throw new Error("Request rejected, please modify the model configuration in the configuration file");await this.handleResponse(t)}catch(t){throw console.error(`Failed to delete Model[${e}]:`,t),t}}static async validateConfig(e){try{const t=await fetch(`${this.BASE_URL}/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await(await this.handleResponse(t)).json()}catch(t){throw console.error("Failed to validate model configuration:",t),t}}static async setDefaultModel(e){try{const t=await fetch(`${this.BASE_URL}/${e}/set-default`,{method:"POST",headers:{"Content-Type":"application/json"}});return await(await this.handleResponse(t)).json()}catch(t){throw console.error(`Failed to set model[${e}] as default:`,t),t}}}ri(ko,"BASE_URL","/api/models");const sy=Ez("namespace",()=>{const o=Ye("default");function e(n){o.value=n}const t=Ye([]);function i(n){t.value=n}return{namespace:o,namespaces:t,setCurrentNs:e,setNamespaces:i}}),q2=async o=>{if(!o.ok){const e=await o.json().catch(()=>({message:"Network error"}));throw new Error(e.message||`HTTP error! status: ${o.status}`)}return o.json()},$U=async()=>{const o=await fetch("/api/agent-management/languages");return q2(o)},UU=async o=>{const e=await fetch("/api/agent-management/reset",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});return q2(e)},jU=async()=>{const o=await fetch("/api/agent-management/stats");return q2(o)},KU=["disabled"],qU={class:"agent-layout"},GU={class:"agent-list"},ZU={class:"list-header"},YU={class:"agent-count"},XU={key:0,class:"agents-container"},QU=["onClick"],JU={class:"agent-card-header"},ej={class:"agent-name"},tj={class:"agent-desc"},ij={key:0,class:"agent-model"},nj={class:"model-tag"},sj={class:"model-tag"},oj={key:1,class:"agent-tools"},rj={key:0,class:"tool-more"},aj={key:1,class:"loading-state"},lj={key:2,class:"empty-state"},dj={key:0,class:"agent-detail"},cj={class:"detail-header"},uj={class:"detail-actions"},hj={class:"form-item"},gj=["placeholder"],fj={class:"form-item"},pj=["placeholder"],mj={class:"form-item"},_j=["value","placeholder"],vj={class:"model-section"},bj={class:"form-item"},Cj={class:"model-chooser"},wj=["title"],Sj={key:0,class:"current-model"},yj={class:"model-type"},Lj={class:"model-name"},Dj={key:1,class:"current-model"},xj={class:"current-model"},kj={class:"dropdown-header"},Ij={class:"model-options"},Ej=["onClick"],Nj={class:"model-type"},Tj={class:"model-name"},Mj={class:"tools-section"},Aj={class:"assigned-tools"},Rj={class:"section-header"},Pj={class:"tools-grid"},Oj={class:"tool-info"},Fj={class:"tool-name"},Bj={class:"tool-desc"},Wj={key:0,class:"no-tools"},Vj={key:1,class:"no-selection"},Hj={class:"modal-form"},zj={class:"form-item"},$j=["placeholder"],Uj={class:"form-item"},jj=["placeholder"],Kj={class:"form-item"},qj=["value","placeholder"],Gj={class:"delete-confirm"},Zj={class:"warning-text"},Yj={class:"multi-language-content"},Xj={class:"stats-section"},Qj={class:"stat-item"},Jj={class:"stat-label"},eK={class:"stat-value"},tK={class:"stat-item"},iK={class:"stat-label"},nK={class:"stat-value"},sK={class:"language-selection"},oK={class:"selection-label"},rK={value:""},aK=["value"],lK={class:"warning-section"},dK={class:"warning-box"},cK={class:"warning-text"},uK=Ss({__name:"agentConfig",setup(o){const{t:e}=Pa(),t=sy(),{namespace:i}=K2(t),n=Ye(!1),s=Ye(""),r=Ye(""),a=ar([]),l=Ye(null),d=ar([]),c=Ye(!1),u=Ye(!1),h=Ye(!1),g=Ye(!1),f=Ye(null),m=ar([]),v=Ye(!1),_=Ye([]),b=Ye(""),C=Ye(!1),w=Ye({total:0,namespace:"",supportedLanguages:[]}),S=()=>{g.value=!g.value},x=Ce=>{f.value=Ce,g.value=!1},y=ar({name:"",description:"",nextStepPrompt:""}),I=Ce=>{const re=d.find(ke=>ke.key===Ce);return re?re.name:Ce},E=Ce=>{const re=d.find(ke=>ke.key===Ce);return re?re.description:""},R=(Ce,re)=>{re==="success"?(r.value=Ce,setTimeout(()=>{r.value=""},3e3)):(s.value=Ce,setTimeout(()=>{s.value=""},5e3))},j=async()=>{n.value=!0;try{const[Ce,re,ke]=await Promise.all([ac.getAllAgents(i.value),ac.getAvailableTools(),ko.getAllModels()]),ce=Ce.map(Ie=>({...Ie,availableTools:Ie.availableTools,...ke}));a.splice(0,a.length,...ce),d.splice(0,d.length,...re),m.splice(0,m.length,...ke),ce.length>0&&await O(ce[0])}catch(Ce){console.error("加载数据失败:",Ce),R(e("config.agentConfig.loadDataFailed")+": "+Ce.message,"error");const re=[{key:"search-web",name:"网络搜索",description:"在互联网上搜索信息",enabled:!0,serviceGroup:"搜索服务"},{key:"search-local",name:"本地搜索",description:"在本地文件中搜索内容",enabled:!0,serviceGroup:"搜索服务"},{key:"file-read",name:"读取文件",description:"读取本地或远程文件内容",enabled:!0,serviceGroup:"文件服务"},{key:"file-write",name:"写入文件",description:"创建或修改文件内容",enabled:!0,serviceGroup:"文件服务"},{key:"file-delete",name:"删除文件",description:"删除指定的文件",enabled:!1,serviceGroup:"文件服务"},{key:"calculator",name:"计算器",description:"执行数学计算",enabled:!0,serviceGroup:"计算服务"},{key:"code-execute",name:"代码执行",description:"执行Python或JavaScript代码",enabled:!0,serviceGroup:"计算服务"},{key:"weather",name:"天气查询",description:"获取指定地区的天气信息",enabled:!0,serviceGroup:"信息服务"},{key:"currency",name:"汇率查询",description:"查询货币汇率信息",enabled:!0,serviceGroup:"信息服务"},{key:"email",name:"发送邮件",description:"发送电子邮件",enabled:!1,serviceGroup:"通信服务"},{key:"sms",name:"发送短信",description:"发送短信消息",enabled:!1,serviceGroup:"通信服务"}],ke=[{id:"demo-1",name:"通用助手",description:"一个能够处理各种任务的智能助手",nextStepPrompt:"You are a helpful assistant that can answer questions and help with various tasks. What would you like me to help you with next?",availableTools:["search-web","calculator","weather"]},{id:"demo-2",name:"数据分析师",description:"专门用于数据分析和可视化的Agent",nextStepPrompt:"You are a data analyst assistant specialized in analyzing data and creating visualizations. Please provide the data you would like me to analyze.",availableTools:["file-read","file-write","calculator","code-execute"]}];d.splice(0,d.length,...re),a.splice(0,a.length,...ke),ke.length>0&&(l.value=ke[0])}finally{n.value=!1}},O=async Ce=>{try{const re=await ac.getAgentById(Ce.id);l.value={...re,availableTools:re.availableTools},f.value=re.model??null}catch(re){console.error("加载Agent详情失败:",re),R(e("config.agentConfig.loadDetailsFailed")+": "+re.message,"error"),l.value={...Ce,availableTools:Ce.availableTools}}},$=()=>{y.name="",y.description="",y.nextStepPrompt="",c.value=!0},K=async()=>{var Ce;if(!y.name.trim()||!y.description.trim()){R(e("config.agentConfig.requiredFields"),"error");return}try{const re={name:y.name.trim(),description:y.description.trim(),nextStepPrompt:((Ce=y.nextStepPrompt)==null?void 0:Ce.trim())??"",availableTools:[],namespace:i.value},ke=await ac.createAgent(re);a.push(ke),l.value=ke,c.value=!1,R(e("config.agentConfig.createSuccess"),"success")}catch(re){R(e("config.agentConfig.createFailed")+": "+re.message,"error")}},oe=()=>{h.value=!0},Le=Ce=>{l.value&&(l.value.availableTools=[...Ce])},he=async()=>{if(l.value){if(!l.value.name.trim()||!l.value.description.trim()){R(e("config.agentConfig.requiredFields"),"error");return}try{l.value.model=f.value;const Ce=await ac.updateAgent(l.value.id,l.value),re=a.findIndex(ke=>ke.id===Ce.id);re!==-1&&(a[re]=Ce),l.value=Ce,l.value.model=f.value,R(e("config.agentConfig.saveSuccess"),"success")}catch(Ce){R(e("config.agentConfig.saveFailed")+": "+Ce.message,"error")}}},se=()=>{u.value=!0},V=async()=>{if(l.value)try{await ac.deleteAgent(l.value.id);const Ce=a.findIndex(re=>re.id===l.value.id);Ce!==-1&&a.splice(Ce,1),l.value=a.length>0?a[0]:null,u.value=!1,R(e("config.agentConfig.deleteSuccess"),"success")}catch(Ce){R(e("config.agentConfig.deleteFailed")+": "+Ce.message,"error")}},Q=()=>{const Ce=document.createElement("input");Ce.type="file",Ce.accept=".json",Ce.onchange=re=>{var ce;const ke=(ce=re.target.files)==null?void 0:ce[0];if(ke){const Ie=new FileReader;Ie.onload=async mt=>{var Ct;try{const Mt=JSON.parse((Ct=mt.target)==null?void 0:Ct.result);if(!Mt.name||!Mt.description)throw new Error(e("config.agentConfig.invalidFormat"));const{id:ci,...yn}=Mt,Qs=await ac.createAgent(yn);a.push(Qs),l.value=Qs,R(e("config.agentConfig.importSuccess"),"success")}catch(Mt){R(e("config.agentConfig.importFailed")+": "+Mt.message,"error")}},Ie.readAsText(ke)}},Ce.click()},H=()=>{if(l.value)try{const Ce=JSON.stringify(l.value,null,2),re=new Blob([Ce],{type:"application/json"}),ke=URL.createObjectURL(re),ce=document.createElement("a");ce.href=ke,ce.download=`agent-${l.value.name}-${new Date().toISOString().split("T")[0]}.json`,ce.click(),URL.revokeObjectURL(ke),R(e("config.agentConfig.exportSuccess"),"success")}catch(Ce){R(e("config.agentConfig.exportFailed")+": "+Ce.message,"error")}},G=Ce=>({zh:"中文",en:"English"})[Ce]||Ce,Z=async()=>{try{const Ce=await $U();_.value=Ce.languages,!b.value&&Ce.default&&(b.value=Ce.default)}catch(Ce){console.error("Failed to load supported languages:",Ce),R(e("common.loadFailed"),"error")}},$e=async()=>{try{const Ce=await jU();w.value=Ce}catch(Ce){console.error("Failed to load agent stats:",Ce)}},ft=async()=>{await Promise.all([Z(),$e()]),v.value=!0},Bt=async()=>{if(!b.value){R(e("agent.multiLanguage.selectLanguage"),"error");return}C.value=!0;try{await UU({language:b.value}),R(e("agent.multiLanguage.resetSuccess"),"success"),v.value=!1,await Promise.all([j(),$e()])}catch(Ce){console.error("Failed to reset agents:",Ce),R(Ce.message||e("agent.multiLanguage.resetFailed"),"error")}finally{C.value=!1}};return Kd(()=>{j()}),cr(()=>i.value,(Ce,re)=>{Ce!==re&&(a.splice(0),l.value=null,j())}),(Ce,re)=>(ne(),In(Gb,null,{title:Zt(()=>[D("h2",null,B(P(e)("config.agentConfig.title")),1)]),actions:Zt(()=>[D("button",{class:"action-btn",onClick:ft},[xe(P(Pe),{icon:"carbon:language"}),Ae(" "+B(P(e)("agent.multiLanguage.title")),1)]),D("button",{class:"action-btn",onClick:Q},[xe(P(Pe),{icon:"carbon:upload"}),Ae(" "+B(P(e)("config.agentConfig.import")),1)]),D("button",{class:"action-btn",onClick:H,disabled:!l.value},[xe(P(Pe),{icon:"carbon:download"}),Ae(" "+B(P(e)("config.agentConfig.export")),1)],8,KU)]),default:Zt(()=>{var ke;return[D("div",qU,[D("div",GU,[D("div",ZU,[D("h3",null,B(P(e)("config.agentConfig.configuredAgents")),1),D("span",YU,"("+B(a.length)+B(P(e)("config.agentConfig.agentCount"))+")",1)]),n.value?at("",!0):(ne(),ue("div",XU,[(ne(!0),ue(Ji,null,ln(a,ce=>{var Ie,mt;return ne(),ue("div",{key:ce.id,class:Nn(["agent-card",{active:((Ie=l.value)==null?void 0:Ie.id)===ce.id}]),onClick:Ct=>O(ce)},[D("div",JU,[D("span",ej,B(ce.name),1),xe(P(Pe),{icon:"carbon:chevron-right"})]),D("p",tj,B(ce.description),1),ce.model?(ne(),ue("div",ij,[D("span",nj,B(ce.model.type),1),D("span",sj,B(ce.model.modelName),1)])):at("",!0),((mt=ce.availableTools)==null?void 0:mt.length)>0?(ne(),ue("div",oj,[(ne(!0),ue(Ji,null,ln(ce.availableTools.slice(0,3),Ct=>(ne(),ue("span",{key:Ct,class:"tool-tag"},B(I(Ct)),1))),128)),ce.availableTools.length>3?(ne(),ue("span",rj," +"+B(ce.availableTools.length-3),1)):at("",!0)])):at("",!0)],10,QU)}),128))])),n.value?(ne(),ue("div",aj,[xe(P(Pe),{icon:"carbon:loading",class:"loading-icon"}),Ae(" "+B(P(e)("common.loading")),1)])):at("",!0),!n.value&&a.length===0?(ne(),ue("div",lj,[xe(P(Pe),{icon:"carbon:bot",class:"empty-icon"}),D("p",null,B(P(e)("config.agentConfig.noAgent")),1)])):at("",!0),D("button",{class:"add-btn",onClick:$},[xe(P(Pe),{icon:"carbon:add"}),Ae(" "+B(P(e)("config.agentConfig.createNew")),1)])]),l.value?(ne(),ue("div",dj,[D("div",cj,[D("h3",null,B(l.value.name),1),D("div",uj,[D("button",{class:"action-btn primary",onClick:he},[xe(P(Pe),{icon:"carbon:save"}),Ae(" "+B(P(e)("common.save")),1)]),D("button",{class:"action-btn danger",onClick:se},[xe(P(Pe),{icon:"carbon:trash-can"}),Ae(" "+B(P(e)("common.delete")),1)])])]),D("div",hj,[D("label",null,[Ae(B(P(e)("config.agentConfig.agentName"))+" ",1),re[17]||(re[17]=D("span",{class:"required"},"*",-1))]),Vt(D("input",{type:"text","onUpdate:modelValue":re[0]||(re[0]=ce=>l.value.name=ce),placeholder:P(e)("config.agentConfig.agentNamePlaceholder"),required:""},null,8,gj),[[ti,l.value.name]])]),D("div",fj,[D("label",null,[Ae(B(P(e)("config.agentConfig.description"))+" ",1),re[18]||(re[18]=D("span",{class:"required"},"*",-1))]),Vt(D("textarea",{"onUpdate:modelValue":re[1]||(re[1]=ce=>l.value.description=ce),rows:"3",placeholder:P(e)("config.agentConfig.descriptionPlaceholder"),required:""},null,8,pj),[[ti,l.value.description]])]),D("div",mj,[D("label",null,B(P(e)("config.agentConfig.nextStepPrompt")),1),D("textarea",{value:l.value.nextStepPrompt||"",onInput:re[2]||(re[2]=ce=>l.value.nextStepPrompt=ce.target.value),rows:"8",placeholder:P(e)("config.agentConfig.nextStepPromptPlaceholder")},null,40,_j)]),D("div",vj,[D("h4",null,B(P(e)("config.agentConfig.modelConfiguration")),1),D("div",bj,[D("div",Cj,[D("button",{class:"model-btn",onClick:S,title:Ce.$t("model.switch")},[xe(P(Pe),{icon:"carbon:build-run",width:"18"}),f.value?(ne(),ue("span",Sj,[D("span",yj,B(f.value.type),1),re[19]||(re[19]=D("span",{class:"spacer"},null,-1)),D("span",Lj,B(f.value.modelName),1)])):(ne(),ue("span",Dj,[D("span",xj,B(P(e)("config.agentConfig.modelConfigurationLabel")),1)])),xe(P(Pe),{icon:g.value?"carbon:chevron-up":"carbon:chevron-down",width:"14",class:"chevron"},null,8,["icon"])],8,wj),g.value?(ne(),ue("div",{key:0,class:"model-dropdown",onClick:re[4]||(re[4]=Zh(()=>{},["stop"]))},[D("div",kj,[D("span",null,B(P(e)("config.agentConfig.modelConfigurationLabel")),1),D("button",{class:"close-btn",onClick:re[3]||(re[3]=ce=>g.value=!1)},[xe(P(Pe),{icon:"carbon:close",width:"16"})])]),D("div",Ij,[(ne(!0),ue(Ji,null,ln(m,ce=>{var Ie,mt;return ne(),ue("button",{key:ce.id,class:Nn(["model-option",{active:((Ie=f.value)==null?void 0:Ie.id)===ce.id}]),onClick:Ct=>x(ce)},[D("span",Nj,B(ce.type),1),D("span",Tj,B(ce.modelName),1),((mt=f.value)==null?void 0:mt.id)===ce.id?(ne(),In(P(Pe),{key:0,icon:"carbon:checkmark",width:"16",class:"check-icon"})):at("",!0)],10,Ej)}),128))])])):at("",!0),g.value?(ne(),ue("div",{key:1,class:"backdrop",onClick:re[5]||(re[5]=ce=>g.value=!1)})):at("",!0)])])]),D("div",Mj,[D("h4",null,B(P(e)("config.agentConfig.toolConfiguration")),1),D("div",Aj,[D("div",Rj,[D("span",null,B(P(e)("config.agentConfig.assignedTools"))+" ("+B((l.value.availableTools||[]).length)+")",1),d.length>0?(ne(),ue("button",{key:0,class:"action-btn small",onClick:oe},[xe(P(Pe),{icon:"carbon:add"}),Ae(" "+B(P(e)("config.agentConfig.addRemoveTools")),1)])):at("",!0)]),D("div",Pj,[(ne(!0),ue(Ji,null,ln(l.value.availableTools||[],ce=>(ne(),ue("div",{key:ce,class:"tool-item assigned"},[D("div",Oj,[D("span",Fj,B(I(ce)),1),D("span",Bj,B(E(ce)),1)])]))),128)),l.value.availableTools.length===0?(ne(),ue("div",Wj,[xe(P(Pe),{icon:"carbon:tool-box"}),D("span",null,B(P(e)("config.agentConfig.noAssignedTools")),1)])):at("",!0)])])])])):(ne(),ue("div",Vj,[xe(P(Pe),{icon:"carbon:bot",class:"placeholder-icon"}),D("p",null,B(P(e)("config.agentConfig.selectAgentHint")),1)]))]),xe(Wo,{modelValue:c.value,"onUpdate:modelValue":re[9]||(re[9]=ce=>c.value=ce),title:P(e)("config.agentConfig.newAgent"),onConfirm:K},{default:Zt(()=>[D("div",Hj,[D("div",zj,[D("label",null,[Ae(B(P(e)("config.agentConfig.agentName"))+" ",1),re[20]||(re[20]=D("span",{class:"required"},"*",-1))]),Vt(D("input",{type:"text","onUpdate:modelValue":re[6]||(re[6]=ce=>y.name=ce),placeholder:P(e)("config.agentConfig.agentNamePlaceholder"),required:""},null,8,$j),[[ti,y.name]])]),D("div",Uj,[D("label",null,[Ae(B(P(e)("config.agentConfig.description"))+" ",1),re[21]||(re[21]=D("span",{class:"required"},"*",-1))]),Vt(D("textarea",{"onUpdate:modelValue":re[7]||(re[7]=ce=>y.description=ce),rows:"3",placeholder:P(e)("config.agentConfig.descriptionPlaceholder"),required:""},null,8,jj),[[ti,y.description]])]),D("div",Kj,[D("label",null,B(P(e)("config.agentConfig.nextStepPrompt")),1),D("textarea",{value:y.nextStepPrompt||"",onInput:re[8]||(re[8]=ce=>y.nextStepPrompt=ce.target.value),rows:"8",placeholder:P(e)("config.agentConfig.nextStepPromptPlaceholder")},null,40,qj)])])]),_:1},8,["modelValue","title"]),xe(zU,{modelValue:h.value,"onUpdate:modelValue":re[10]||(re[10]=ce=>h.value=ce),tools:d,"selected-tool-ids":((ke=l.value)==null?void 0:ke.availableTools)||[],onConfirm:Le},null,8,["modelValue","tools","selected-tool-ids"]),xe(Wo,{modelValue:u.value,"onUpdate:modelValue":re[12]||(re[12]=ce=>u.value=ce),title:P(e)("config.agentConfig.deleteConfirm")},{footer:Zt(()=>[D("button",{class:"cancel-btn",onClick:re[11]||(re[11]=ce=>u.value=!1)},B(P(e)("common.cancel")),1),D("button",{class:"confirm-btn danger",onClick:V},B(P(e)("common.delete")),1)]),default:Zt(()=>{var ce;return[D("div",Gj,[xe(P(Pe),{icon:"carbon:warning",class:"warning-icon"}),D("p",null,[Ae(B(P(e)("config.agentConfig.deleteConfirmText"))+" ",1),D("strong",null,B((ce=l.value)==null?void 0:ce.name),1),Ae(" "+B(P(e)("common.confirm"))+"? ",1)]),D("p",Zj,B(P(e)("config.agentConfig.deleteWarning")),1)])]}),_:1},8,["modelValue","title"]),s.value?(ne(),ue("div",{key:0,class:"error-toast",onClick:re[13]||(re[13]=ce=>s.value="")},[xe(P(Pe),{icon:"carbon:error"}),Ae(" "+B(s.value),1)])):at("",!0),r.value?(ne(),ue("div",{key:1,class:"success-toast",onClick:re[14]||(re[14]=ce=>r.value="")},[xe(P(Pe),{icon:"carbon:checkmark"}),Ae(" "+B(r.value),1)])):at("",!0),xe(Wo,{modelValue:v.value,"onUpdate:modelValue":re[16]||(re[16]=ce=>v.value=ce),title:P(e)("agent.multiLanguage.title"),onConfirm:Bt},{title:Zt(()=>[Ae(B(P(e)("agent.multiLanguage.title")),1)]),default:Zt(()=>[D("div",Yj,[D("div",Xj,[D("div",Qj,[D("span",Jj,B(P(e)("agent.multiLanguage.currentLanguage"))+":",1),D("span",eK,B(G(Ce.$i18n.locale)),1)]),D("div",tK,[D("span",iK,B(P(e)("common.total"))+":",1),D("span",nK,B(w.value.total),1)])]),D("div",sK,[D("label",oK,B(P(e)("agent.multiLanguage.selectLanguage"))+":",1),Vt(D("select",{"onUpdate:modelValue":re[15]||(re[15]=ce=>b.value=ce),class:"language-select"},[D("option",rK,B(P(e)("agent.multiLanguage.selectLanguage")),1),(ne(!0),ue(Ji,null,ln(_.value,ce=>(ne(),ue("option",{key:ce,value:ce},B(G(ce)),9,aK))),128))],512),[[X1,b.value]])]),D("div",lK,[D("div",dK,[xe(P(Pe),{icon:"carbon:warning",class:"warning-icon"}),D("div",cK,[D("p",null,B(P(e)("agent.multiLanguage.resetAllWarning")),1)])])])])]),_:1},8,["modelValue","title"])]}),_:1}))}}),hK=us(uK,[["__scopeId","data-v-0eaff650"]]),gK={class:"custom-select"},fK=["title"],pK={key:0,class:"current-option"},mK={class:"option-name"},_K={key:1,class:"current-option"},vK={class:"dropdown-header"},bK={class:"select-options"},CK=["onClick"],wK={class:"option-name"},SK=Ss({__name:"index",props:{modelValue:{},options:{},placeholder:{},dropdownTitle:{},icon:{},direction:{},dropStyles:{},onChange:{type:Function}},emits:["update:modelValue"],setup(o,{emit:e}){const t=o,i=e,n=Ye(!1),s=Ye("bottom"),r=Xn(()=>t.options.find(u=>u.id===t.modelValue)),a=u=>u.id===t.modelValue,l=()=>{n.value||d(),n.value=!n.value},d=()=>{const u=document.querySelector(".custom-select");if(!u)return;const h=u.getBoundingClientRect(),g=window.innerHeight;h.bottom+200>g?s.value="top":s.value="bottom"},c=u=>{t.onChange?t.onChange(u.id,u):i("update:modelValue",u.id),n.value=!1};return(u,h)=>(ne(),ue("div",gK,[D("button",{class:"select-btn",onClick:l,title:u.placeholder},[xe(P(Pe),{icon:t.icon||"carbon:select-01",width:"18"},null,8,["icon"]),r.value?(ne(),ue("span",pK,[r.value.icon?(ne(),In(P(Pe),{key:0,icon:r.value.icon,width:"16",class:"option-icon"},null,8,["icon"])):at("",!0),D("span",mK,B(r.value.name),1)])):(ne(),ue("span",_K,B(u.placeholder),1)),xe(P(Pe),{icon:n.value?"carbon:chevron-up":"carbon:chevron-down",width:"14",class:"chevron"},null,8,["icon"])],8,fK),xe(qb,{name:"slideDown"},{default:Zt(()=>[Vt(D("div",{class:Nn(["select-dropdown",{"dropdown-top":s.value==="top"}]),style:Nz({...u.dropStyles,...t.direction==="right"?{right:0}:{left:0}}),onClick:h[1]||(h[1]=Zh(()=>{},["stop"]))},[D("div",vK,[D("span",null,B(u.dropdownTitle),1),D("button",{class:"close-btn",onClick:h[0]||(h[0]=g=>n.value=!1)},[xe(P(Pe),{icon:"carbon:close",width:"16"})])]),D("div",bK,[(ne(!0),ue(Ji,null,ln(u.options,g=>(ne(),ue("button",{key:g.id,class:Nn(["select-option",{active:a(g)}]),onClick:f=>c(g)},[g.icon?(ne(),In(P(Pe),{key:0,icon:g.icon,width:"16",class:"option-icon"},null,8,["icon"])):at("",!0),D("span",wK,B(g.name),1),a(g)?(ne(),In(P(Pe),{key:1,icon:"carbon:checkmark",width:"16",class:"check-icon"})):at("",!0)],10,CK))),128))])],6),[[ny,n.value]])]),_:1}),n.value?(ne(),ue("div",{key:0,class:"backdrop",onClick:h[2]||(h[2]=g=>n.value=!1)})):at("",!0)]))}}),Q1=us(SK,[["__scopeId","data-v-579d8359"]]),yK={class:"grouped-select"},LK=["title"],DK={key:0,class:"selected-text"},xK={class:"model-category"},kK={key:1,class:"placeholder-text"},IK={key:1,class:"dropdown-content"},EK={class:"dropdown-header"},NK={class:"search-container"},TK=["placeholder"],MK={class:"groups-container"},AK={class:"group-header"},RK={class:"group-title"},PK={class:"group-count"},OK={class:"models-grid"},FK=["onClick","title"],BK={class:"model-info"},WK={class:"model-name"},VK={class:"model-description"},HK={class:"model-category-tag"},zK=Ss({__name:"GroupedSelect",props:{modelValue:{},options:{},placeholder:{default:"请选择模型"},dropdownTitle:{default:"可用模型"}},emits:["update:modelValue"],setup(o,{emit:e}){const t=o,i=e,{t:n}=Pa(),s=Ye(!1),r=Ye(""),a=Xn(()=>{const f={};return t.options.forEach(v=>{f[v.category]||(f[v.category]=[]),f[v.category].push(v)}),["Turbo","Plus","Max","Coder","Math","Vision","TTS","Standard"].filter(v=>f[v]).map(v=>({category:v,models:f[v].sort((_,b)=>_.name.localeCompare(b.name))}))}),l=Xn(()=>r.value?a.value.map(f=>({...f,models:f.models.filter(m=>m.name.toLowerCase().includes(r.value.toLowerCase())||m.description.toLowerCase().includes(r.value.toLowerCase())||m.category.toLowerCase().includes(r.value.toLowerCase()))})).filter(f=>f.models.length>0):a.value),d=Xn(()=>t.options.find(f=>f.id===t.modelValue)),c=()=>{s.value=!s.value,s.value&&(r.value="")},u=()=>{s.value=!1,r.value=""},h=f=>{i("update:modelValue",f.id),u()},g=f=>{f.target.closest(".grouped-select")||u()};return Kd(()=>{document.addEventListener("click",g)}),E9(()=>{document.removeEventListener("click",g)}),(f,m)=>(ne(),ue("div",yK,[D("button",{class:"select-btn",onClick:c,title:f.placeholder||""},[d.value?(ne(),ue("span",DK,[Ae(B(d.value.name)+" ",1),D("span",xK,"["+B(d.value.category)+"]",1)])):(ne(),ue("span",kK,B(f.placeholder),1)),xe(P(Pe),{icon:"carbon:chevron-down",class:Nn(["chevron",{rotated:s.value}])},null,8,["class"])],8,LK),s.value?(ne(),ue("div",{key:0,class:"dropdown-overlay",onClick:u})):at("",!0),s.value?(ne(),ue("div",IK,[D("div",EK,[D("h3",null,B(f.dropdownTitle),1),D("button",{class:"close-btn",onClick:u},[xe(P(Pe),{icon:"carbon:close"})])]),D("div",NK,[Vt(D("input",{"onUpdate:modelValue":m[0]||(m[0]=v=>r.value=v),type:"text",placeholder:P(n)("config.modelConfig.searchModels"),class:"search-input"},null,8,TK),[[ti,r.value]]),xe(P(Pe),{icon:"carbon:search",class:"search-icon"})]),D("div",MK,[(ne(!0),ue(Ji,null,ln(l.value,v=>(ne(),ue("div",{key:v.category,class:"model-group"},[D("div",AK,[D("span",RK,B(v.category),1),D("span",PK,"("+B(v.models.length)+")",1)]),D("div",OK,[(ne(!0),ue(Ji,null,ln(v.models,_=>(ne(),ue("button",{key:_.id,class:Nn(["model-option",{selected:_.id===f.modelValue}]),onClick:b=>h(_),title:_.description},[D("div",BK,[D("div",WK,B(_.name),1),D("div",VK,B(_.description),1)]),D("div",HK,"["+B(_.category)+"]",1)],10,FK))),128))])]))),128))])])):at("",!0)]))}}),kP=us(zK,[["__scopeId","data-v-8fbda373"]]),$K=["disabled"],UK={class:"model-layout"},jK={class:"model-list"},KK={class:"list-header"},qK={class:"model-count"},GK={key:0,class:"models-container"},ZK=["onClick"],YK={class:"model-card-header"},XK={class:"model-name"},QK={class:"model-status"},JK={key:0,class:"default-badge"},eq={class:"model-desc"},tq={key:0,class:"model-type"},iq={class:"model-tag"},nq={key:1,class:"loading-state"},sq={key:2,class:"empty-state"},oq={key:0,class:"model-detail"},rq={class:"detail-header"},aq={class:"detail-actions"},lq=["disabled"],dq={key:1,class:"current-default"},cq={class:"form-item"},uq={class:"form-item"},hq=["placeholder"],gq={class:"form-item"},fq=["placeholder"],pq={class:"form-item"},mq={class:"api-key-container"},_q=["placeholder"],vq=["disabled","title"],bq={class:"form-item"},Cq={key:1,class:"readonly-field"},wq={class:"form-item"},Sq=["placeholder"],yq={class:"form-item"},Lq=["placeholder"],Dq={class:"form-item"},xq=["placeholder"],kq={key:1,class:"no-selection"},Iq={class:"modal-form"},Eq={class:"form-item"},Nq={class:"form-item"},Tq=["placeholder"],Mq={class:"form-item"},Aq=["placeholder"],Rq={class:"form-item"},Pq={class:"api-key-container"},Oq=["placeholder"],Fq=["disabled","title"],Bq={class:"form-item"},Wq={key:1,class:"readonly-field"},Vq={class:"form-item"},Hq=["placeholder"],zq={class:"form-item"},$q=["placeholder"],Uq={class:"form-item"},jq=["placeholder"],Kq={class:"delete-confirm"},qq={class:"warning-text"},Gq=Ss({__name:"modelConfig",setup(o){const{t:e}=Pa(),t=Ye(!1),i=Ye(""),n=Ye(""),s=ar([]),r=ar([]),a=Ye(null),l=Ye(!1),d=Ye(!1),c=Ye(!1),u=Ye(!1),h=Ye(new Map),g=Ye(!1),f=Ye([]),m=Xn({get(){var Q;return(Q=a.value)!=null&&Q.headers?JSON.stringify(a.value.headers,null,2):""},set(Q){a.value&&(a.value.headers=Q.trim()?JSON.parse(Q):null)}}),v=Xn({get(){return _.headers?JSON.stringify(_.headers,null,2):""},set(Q){_.headers=Q.trim()?JSON.parse(Q):null}}),_=ar({baseUrl:"",headers:null,apiKey:"",modelName:"",modelDescription:"",type:""}),b=(Q,H)=>{H==="success"?(n.value=Q,setTimeout(()=>{n.value=""},3e3)):H==="error"?(i.value=Q,setTimeout(()=>{i.value=""},5e3)):H==="info"&&(n.value=Q,setTimeout(()=>{n.value=""},2e3))},C=async()=>{t.value=!0;try{const[Q,H]=await Promise.all([ko.getAllModels(),ko.getAllTypes()]),G=Q.map(Z=>({...Z}));s.splice(0,s.length,...G),r.splice(0,r.length,...H),G.length>0&&await w(G[0])}catch(Q){console.error("加载数据失败:",Q),b(e("config.modelConfig.loadDataFailed")+": "+Q.message,"error")}finally{t.value=!1}},w=async Q=>{try{const H=await ko.getModelById(Q.id);a.value={...H},c.value=!1}catch(H){console.error("加载Model详情失败:",H),b(e("config.modelConfig.loadDetailsFailed")+": "+H.message,"error"),a.value={...Q}}},S=()=>{_.baseUrl="",_.headers=null,_.apiKey="",_.modelName="",_.modelDescription="",_.type="",delete _.temperature,delete _.topP,g.value=!1,f.value=[],l.value=!0},x=async()=>{var Q,H,G,Z;if(!((Q=a.value)!=null&&Q.baseUrl)||!((H=a.value)!=null&&H.apiKey)){b(e("config.modelConfig.pleaseEnterBaseUrlAndApiKey"),"error");return}c.value=!0;try{const $e=await ko.validateConfig({baseUrl:a.value.baseUrl,apiKey:a.value.apiKey});$e.valid?(b(e("config.modelConfig.validationSuccess")+` - ${e("config.modelConfig.getModelsCount",{count:((G=$e.availableModels)==null?void 0:G.length)||0})}`,"success"),(Z=a.value)!=null&&Z.id&&h.value.set(a.value.id,$e.availableModels||[]),$e.availableModels&&$e.availableModels.length>0&&(a.value.modelName=$e.availableModels[0].modelName,a.value.modelDescription=I($e.availableModels[0].modelName))):b(e("config.modelConfig.validationFailed")+": "+$e.message,"error")}catch($e){b(e("config.modelConfig.validationFailed")+": "+$e.message,"error")}finally{c.value=!1}},y=Q=>{const H=Q.toLowerCase();return H.includes("turbo")?"Turbo":H.includes("plus")?"Plus":H.includes("max")?"Max":H.includes("coder")||H.includes("code")?"Coder":H.includes("math")?"Math":H.includes("vision")||H.includes("vl")?"Vision":H.includes("tts")?"TTS":"Standard"},I=Q=>{const H=Q.toLowerCase();return H.includes("turbo")?"Turbo 模型,快速响应":H.includes("plus")?"Plus 模型,平衡性能":H.includes("max")?"Max 模型,最强性能":H.includes("coder")||H.includes("code")?"Coder 模型,代码生成专用":H.includes("math")?"Math 模型,数学计算专用":H.includes("vision")||H.includes("vl")?"Vision 模型,视觉理解专用":H.includes("tts")?"TTS 模型,文本转语音专用":"标准模型"},E=()=>{var Q;return(Q=a.value)!=null&&Q.id?h.value.get(a.value.id)||[]:[]},R=Q=>{a.value&&Q&&E().find(Z=>Z.modelName===Q)&&(a.value.modelDescription=I(Q))},j=async()=>{var Q;if(!_.baseUrl||!_.apiKey){b(e("config.modelConfig.pleaseEnterBaseUrlAndApiKey"),"error");return}g.value=!0;try{const H=await ko.validateConfig({baseUrl:_.baseUrl,apiKey:_.apiKey});H.valid?(b(e("config.modelConfig.validationSuccess")+` - ${e("config.modelConfig.getModelsCount",{count:((Q=H.availableModels)==null?void 0:Q.length)||0})}`,"success"),f.value=H.availableModels||[],H.availableModels&&H.availableModels.length>0&&(_.modelName=H.availableModels[0].modelName,_.modelDescription=I(H.availableModels[0].modelName))):b(e("config.modelConfig.validationFailed")+": "+H.message,"error")}catch(H){b(e("config.modelConfig.validationFailed")+": "+H.message,"error")}finally{g.value=!1}},O=Q=>{Q&&f.value.find(G=>G.modelName===Q)&&(_.modelDescription=I(Q))},$=async()=>{if(!_.modelName.trim()||!_.modelDescription.trim()){b(e("config.modelConfig.requiredFields"),"error");return}if(!_.baseUrl.trim()||!_.apiKey.trim()){b(e("config.modelConfig.pleaseEnterBaseUrlAndApiKey"),"error");return}b(e("config.modelConfig.validatingBeforeSave"),"info");try{const Q=await ko.validateConfig({baseUrl:_.baseUrl.trim(),apiKey:_.apiKey.trim()});if(!Q.valid){b(e("config.modelConfig.validationFailedCannotSave")+": "+Q.message,"error");return}}catch(Q){b(e("config.modelConfig.validationFailedCannotSave")+": "+Q.message,"error");return}try{const Q={baseUrl:_.baseUrl.trim(),headers:_.headers,apiKey:_.apiKey.trim(),modelName:_.modelName.trim(),modelDescription:_.modelDescription.trim(),type:_.type.trim(),temperature:isNaN(_.temperature)?null:_.temperature,topP:isNaN(_.topP)?null:_.topP},H=await ko.createModel(Q);s.push(H),a.value=H,l.value=!1,b(e("config.modelConfig.createSuccess"),"success")}catch(Q){b(e("config.modelConfig.createFailed")+": "+Q.message,"error")}},K=async()=>{if(!a.value)return;if(!a.value.modelName.trim()||!a.value.modelDescription.trim()){b(e("config.modelConfig.requiredFields"),"error");return}if(!a.value.baseUrl||!a.value.apiKey){b(e("config.modelConfig.pleaseEnterBaseUrlAndApiKey"),"error");return}if(!a.value.apiKey.includes("*")||!h.value.has(a.value.id)){b(e("config.modelConfig.validatingBeforeSave"),"info");try{const H=await ko.validateConfig({baseUrl:a.value.baseUrl,apiKey:a.value.apiKey});if(!H.valid){b(e("config.modelConfig.validationFailedCannotSave")+": "+H.message,"error");return}h.value.set(a.value.id,H.availableModels||[])}catch(H){b(e("config.modelConfig.validationFailedCannotSave")+": "+H.message,"error");return}}try{const H={...a.value,temperature:isNaN(a.value.temperature)?null:a.value.temperature,topP:isNaN(a.value.topP)?null:a.value.topP},G=await ko.updateModel(a.value.id,H),Z=s.findIndex($e=>$e.id===G.id);Z!==-1&&(s[Z]=G),a.value=G,b(e("config.modelConfig.saveSuccess"),"success")}catch(H){b(e("config.modelConfig.saveFailed")+": "+H.message,"error")}},oe=()=>{d.value=!0},Le=async()=>{if(a.value){u.value=!0;try{await ko.setDefaultModel(a.value.id),s.forEach(Q=>{Q.isDefault=Q.id===a.value.id}),a.value.isDefault=!0,b(e("config.modelConfig.setDefaultSuccess"),"success")}catch(Q){b(e("config.modelConfig.setDefaultFailed")+": "+Q.message,"error")}finally{u.value=!1}}},he=async()=>{if(a.value)try{await ko.deleteModel(a.value.id);const Q=s.findIndex(H=>H.id===a.value.id);Q!==-1&&s.splice(Q,1),a.value=s.length>0?s[0]:null,d.value=!1,b(e("config.modelConfig.deleteSuccess"),"success")}catch(Q){b(e("config.modelConfig.deleteFailed")+": "+Q.message,"error")}},se=()=>{const Q=document.createElement("input");Q.type="file",Q.accept=".json",Q.onchange=H=>{var Z;const G=(Z=H.target.files)==null?void 0:Z[0];if(G){const $e=new FileReader;$e.onload=async ft=>{var Bt;try{const Ce=JSON.parse((Bt=ft.target)==null?void 0:Bt.result);if(!Ce.modelName||!Ce.modelDescription)throw new Error(e("config.modelConfig.invalidFormat"));const{id:re,...ke}=Ce,ce=await ko.createModel(ke);s.push(ce),a.value=ce,b(e("config.modelConfig.importSuccess"),"success")}catch(Ce){b(e("config.modelConfig.importFailed")+": "+Ce.message,"error")}},$e.readAsText(G)}},Q.click()},V=()=>{if(a.value)try{const Q=JSON.stringify(a.value,null,2),H=new Blob([Q],{type:"application/json"}),G=URL.createObjectURL(H),Z=document.createElement("a");Z.href=G,Z.download=`model-${a.value.modelName}-${new Date().toISOString().split("T")[0]}.json`,Z.click(),URL.revokeObjectURL(G),b(e("config.modelConfig.exportSuccess"),"success")}catch(Q){b(e("config.modelConfig.exportFailed")+": "+Q.message,"error")}};return Kd(()=>{C()}),(Q,H)=>(ne(),In(Gb,null,{title:Zt(()=>[D("h2",null,B(P(e)("config.modelConfig.title")),1)]),actions:Zt(()=>[D("button",{class:"action-btn",onClick:se},[xe(P(Pe),{icon:"carbon:upload"}),Ae(" "+B(P(e)("config.modelConfig.import")),1)]),D("button",{class:"action-btn",onClick:V,disabled:!a.value},[xe(P(Pe),{icon:"carbon:download"}),Ae(" "+B(P(e)("config.modelConfig.export")),1)],8,$K)]),default:Zt(()=>[D("div",UK,[D("div",jK,[D("div",KK,[D("h3",null,B(P(e)("config.modelConfig.configuredModels")),1),D("span",qK,"("+B(s.length)+")",1)]),t.value?at("",!0):(ne(),ue("div",GK,[(ne(!0),ue(Ji,null,ln(s,G=>{var Z;return ne(),ue("div",{key:G.id,class:Nn(["model-card",{active:((Z=a.value)==null?void 0:Z.id)===G.id}]),onClick:$e=>w(G)},[D("div",YK,[D("span",XK,B(G.modelName),1),D("div",QK,[G.isDefault?(ne(),ue("span",JK,[xe(P(Pe),{icon:"carbon:star-filled"}),Ae(" "+B(P(e)("config.modelConfig.default")),1)])):at("",!0),xe(P(Pe),{icon:"carbon:chevron-right"})])]),D("p",eq,B(G.modelDescription),1),G.type?(ne(),ue("div",tq,[D("span",iq,B(G.type),1)])):at("",!0)],10,ZK)}),128))])),t.value?(ne(),ue("div",nq,[xe(P(Pe),{icon:"carbon:loading",class:"loading-icon"}),Ae(" "+B(P(e)("common.loading")),1)])):at("",!0),!t.value&&s.length===0?(ne(),ue("div",sq,[xe(P(Pe),{icon:"carbon:bot",class:"empty-icon"}),D("p",null,B(P(e)("config.modelConfig.noModel")),1)])):at("",!0),D("button",{class:"add-btn",onClick:S},[xe(P(Pe),{icon:"carbon:add"}),Ae(" "+B(P(e)("config.modelConfig.createNew")),1)])]),a.value?(ne(),ue("div",oq,[D("div",rq,[D("h3",null,B(a.value.modelName),1),D("div",aq,[a.value.isDefault?(ne(),ue("span",dq,[xe(P(Pe),{icon:"carbon:star-filled"}),Ae(" "+B(P(e)("config.modelConfig.currentDefault")),1)])):(ne(),ue("button",{key:0,class:"action-btn default",onClick:Le,disabled:u.value},[xe(P(Pe),{icon:"carbon:star"}),Ae(" "+B(P(e)("config.modelConfig.setAsDefault")),1)],8,lq)),D("button",{class:"action-btn primary",onClick:K},[xe(P(Pe),{icon:"carbon:save"}),Ae(" "+B(P(e)("common.save")),1)]),D("button",{class:"action-btn danger",onClick:oe},[xe(P(Pe),{icon:"carbon:trash-can"}),Ae(" "+B(P(e)("common.delete")),1)])])]),D("div",cq,[D("label",null,[Ae(B(P(e)("config.modelConfig.type"))+" ",1),H[21]||(H[21]=D("span",{class:"required"},"*",-1))]),xe(Q1,{modelValue:a.value.type,"onUpdate:modelValue":H[0]||(H[0]=G=>a.value.type=G),options:r.map(G=>({id:G,name:G})),placeholder:P(e)("config.modelConfig.typePlaceholder"),"dropdown-title":P(e)("config.modelConfig.typePlaceholder"),icon:"carbon:types"},null,8,["modelValue","options","placeholder","dropdown-title"])]),D("div",uq,[D("label",null,[Ae(B(P(e)("config.modelConfig.baseUrl"))+" ",1),H[22]||(H[22]=D("span",{class:"required"},"*",-1))]),Vt(D("input",{type:"text","onUpdate:modelValue":H[1]||(H[1]=G=>a.value.baseUrl=G),placeholder:P(e)("config.modelConfig.baseUrlPlaceholder"),required:""},null,8,hq),[[ti,a.value.baseUrl]])]),D("div",gq,[D("label",null,B(P(e)("config.modelConfig.headers")),1),Vt(D("input",{type:"text","onUpdate:modelValue":H[2]||(H[2]=G=>m.value=G),placeholder:P(e)("config.modelConfig.headersPlaceholder")},null,8,fq),[[ti,m.value]])]),D("div",pq,[D("label",null,[Ae(B(P(e)("config.modelConfig.apiKey"))+" ",1),H[23]||(H[23]=D("span",{class:"required"},"*",-1))]),D("div",mq,[Vt(D("input",{type:"text","onUpdate:modelValue":H[3]||(H[3]=G=>a.value.apiKey=G),placeholder:P(e)("config.modelConfig.apiKeyPlaceholder"),required:""},null,8,_q),[[ti,a.value.apiKey]]),D("button",{class:"check-btn",onClick:x,disabled:c.value||!a.value.baseUrl||!a.value.apiKey,title:P(e)("config.modelConfig.validateConfig")},[c.value?(ne(),In(P(Pe),{key:1,icon:"carbon:loading",class:"loading-icon"})):(ne(),In(P(Pe),{key:0,icon:"carbon:checkmark"}))],8,vq)])]),D("div",bq,[D("label",null,[Ae(B(P(e)("config.modelConfig.modelName"))+" ",1),H[24]||(H[24]=D("span",{class:"required"},"*",-1))]),E().length>0?(ne(),In(kP,{key:0,modelValue:a.value.modelName,"onUpdate:modelValue":[H[4]||(H[4]=G=>a.value.modelName=G),R],options:E().map(G=>({id:G.modelName,name:G.modelName,description:I(G.modelName),category:y(G.modelName)})),placeholder:P(e)("config.modelConfig.selectModel"),"dropdown-title":P(e)("config.modelConfig.availableModels")},null,8,["modelValue","options","placeholder","dropdown-title"])):(ne(),ue("div",Cq,B(a.value.modelName||P(e)("config.modelConfig.modelNamePlaceholder")),1))]),D("div",wq,[D("label",null,[Ae(B(P(e)("config.modelConfig.description"))+" ",1),H[25]||(H[25]=D("span",{class:"required"},"*",-1))]),Vt(D("textarea",{"onUpdate:modelValue":H[5]||(H[5]=G=>a.value.modelDescription=G),placeholder:P(e)("config.modelConfig.descriptionPlaceholder"),class:"description-field",rows:"3"},null,8,Sq),[[ti,a.value.modelDescription]])]),D("div",yq,[D("label",null,B(P(e)("config.modelConfig.temperature")),1),Vt(D("input",{type:"number","onUpdate:modelValue":H[6]||(H[6]=G=>a.value.temperature=G),placeholder:P(e)("config.modelConfig.temperaturePlaceholder"),step:"0.1",min:"0",max:"2"},null,8,Lq),[[ti,a.value.temperature,void 0,{number:!0}]])]),D("div",Dq,[D("label",null,B(P(e)("config.modelConfig.topP")),1),Vt(D("input",{type:"number","onUpdate:modelValue":H[7]||(H[7]=G=>a.value.topP=G),placeholder:P(e)("config.modelConfig.topPPlaceholder"),step:"0.1",min:"0",max:"1"},null,8,xq),[[ti,a.value.topP,void 0,{number:!0}]])])])):(ne(),ue("div",kq,[xe(P(Pe),{icon:"carbon:bot",class:"placeholder-icon"}),D("p",null,B(P(e)("config.modelConfig.selectModelHint")),1)]))]),xe(Wo,{modelValue:l.value,"onUpdate:modelValue":H[16]||(H[16]=G=>l.value=G),title:P(e)("config.modelConfig.newModel"),onConfirm:$},{default:Zt(()=>[D("div",Iq,[D("div",Eq,[D("label",null,[Ae(B(P(e)("config.modelConfig.type"))+" ",1),H[26]||(H[26]=D("span",{class:"required"},"*",-1))]),xe(Q1,{modelValue:_.type,"onUpdate:modelValue":H[8]||(H[8]=G=>_.type=G),options:r.map(G=>({id:G,name:G})),placeholder:P(e)("config.modelConfig.typePlaceholder"),"dropdown-title":P(e)("config.modelConfig.typePlaceholder"),icon:"carbon:types"},null,8,["modelValue","options","placeholder","dropdown-title"])]),D("div",Nq,[D("label",null,[Ae(B(P(e)("config.modelConfig.baseUrl"))+" ",1),H[27]||(H[27]=D("span",{class:"required"},"*",-1))]),Vt(D("input",{type:"text","onUpdate:modelValue":H[9]||(H[9]=G=>_.baseUrl=G),placeholder:P(e)("config.modelConfig.baseUrlPlaceholder"),required:""},null,8,Tq),[[ti,_.baseUrl]])]),D("div",Mq,[D("label",null,B(P(e)("config.modelConfig.headers")),1),Vt(D("input",{type:"text","onUpdate:modelValue":H[10]||(H[10]=G=>v.value=G),placeholder:P(e)("config.modelConfig.headersPlaceholder")},null,8,Aq),[[ti,v.value]])]),D("div",Rq,[D("label",null,[Ae(B(P(e)("config.modelConfig.apiKey"))+" ",1),H[28]||(H[28]=D("span",{class:"required"},"*",-1))]),D("div",Pq,[Vt(D("input",{type:"text","onUpdate:modelValue":H[11]||(H[11]=G=>_.apiKey=G),placeholder:P(e)("config.modelConfig.apiKeyPlaceholder"),required:""},null,8,Oq),[[ti,_.apiKey]]),D("button",{class:"check-btn",onClick:j,disabled:g.value||!_.baseUrl||!_.apiKey,title:P(e)("config.modelConfig.validateConfig")},[g.value?(ne(),In(P(Pe),{key:1,icon:"carbon:loading",class:"loading-icon"})):(ne(),In(P(Pe),{key:0,icon:"carbon:checkmark"}))],8,Fq)])]),D("div",Bq,[D("label",null,[Ae(B(P(e)("config.modelConfig.modelName"))+" ",1),H[29]||(H[29]=D("span",{class:"required"},"*",-1))]),f.value.length>0?(ne(),In(kP,{key:0,modelValue:_.modelName,"onUpdate:modelValue":[H[12]||(H[12]=G=>_.modelName=G),O],options:f.value.map(G=>({id:G.modelName,name:G.modelName,description:I(G.modelName),category:y(G.modelName)})),placeholder:P(e)("config.modelConfig.selectModel"),"dropdown-title":P(e)("config.modelConfig.availableModels")},null,8,["modelValue","options","placeholder","dropdown-title"])):(ne(),ue("div",Wq,B(_.modelName||P(e)("config.modelConfig.modelNamePlaceholder")),1))]),D("div",Vq,[D("label",null,[Ae(B(P(e)("config.modelConfig.description"))+" ",1),H[30]||(H[30]=D("span",{class:"required"},"*",-1))]),Vt(D("textarea",{"onUpdate:modelValue":H[13]||(H[13]=G=>_.modelDescription=G),placeholder:P(e)("config.modelConfig.descriptionPlaceholder"),class:"description-field",rows:"3"},null,8,Hq),[[ti,_.modelDescription]])]),D("div",zq,[D("label",null,B(P(e)("config.modelConfig.temperature")),1),Vt(D("input",{type:"number","onUpdate:modelValue":H[14]||(H[14]=G=>_.temperature=G),placeholder:P(e)("config.modelConfig.temperaturePlaceholder"),step:"0.1",min:"0",max:"2"},null,8,$q),[[ti,_.temperature,void 0,{number:!0}]])]),D("div",Uq,[D("label",null,B(P(e)("config.modelConfig.topP")),1),Vt(D("input",{type:"number","onUpdate:modelValue":H[15]||(H[15]=G=>_.topP=G),placeholder:P(e)("config.modelConfig.topPPlaceholder"),step:"0.1",min:"0",max:"1"},null,8,jq),[[ti,_.topP,void 0,{number:!0}]])])])]),_:1},8,["modelValue","title"]),xe(Wo,{modelValue:d.value,"onUpdate:modelValue":H[18]||(H[18]=G=>d.value=G),title:"Delete confirmation"},{footer:Zt(()=>[D("button",{class:"cancel-btn",onClick:H[17]||(H[17]=G=>d.value=!1)},B(P(e)("common.cancel")),1),D("button",{class:"confirm-btn danger",onClick:he},B(P(e)("common.delete")),1)]),default:Zt(()=>{var G;return[D("div",Kq,[xe(P(Pe),{icon:"carbon:warning",class:"warning-icon"}),D("p",null,[Ae(B(P(e)("config.modelConfig.deleteConfirmText"))+" ",1),D("strong",null,B((G=a.value)==null?void 0:G.modelName),1),Ae(" "+B(P(e)("common.confirm"))+"? ",1)]),D("p",qq,B(P(e)("config.modelConfig.deleteWarning")),1)])]}),_:1},8,["modelValue"]),i.value?(ne(),ue("div",{key:0,class:"error-toast",onClick:H[19]||(H[19]=G=>i.value="")},[xe(P(Pe),{icon:"carbon:error"}),Ae(" "+B(i.value),1)])):at("",!0),n.value?(ne(),ue("div",{key:1,class:"success-toast",onClick:H[20]||(H[20]=G=>n.value="")},[xe(P(Pe),{icon:"carbon:checkmark"}),Ae(" "+B(n.value),1)])):at("",!0)]),_:1}))}}),Zq=us(Gq,[["__scopeId","data-v-31d9fbd5"]]);class od{static async getAllMcpServers(){const e=await fetch(`${this.BASE_URL}/list`);if(!e.ok)throw new Error(`Failed to get MCP server list: ${e.status}`);return await e.json()}static async addMcpServer(e){try{const t=await fetch(`${this.BASE_URL}/add`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const i=await t.text();throw new Error(`Failed to add MCP server: ${t.status} - ${i}`)}return{success:!0,message:"Successfully added MCP server"}}catch(t){return console.error("Failed to add MCP server:",t),{success:!1,message:t instanceof Error?t.message:"Failed to add, please retry"}}}static async importMcpServers(e){try{const t=await fetch(`${this.BASE_URL}/batch-import`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configJson:JSON.stringify(e),overwrite:!1})});if(!t.ok){const i=await t.text();throw new Error(`Failed to import MCP servers: ${t.status} - ${i}`)}return{success:!0,message:"Successfully imported MCP servers"}}catch(t){return console.error("Failed to import MCP servers:",t),{success:!1,message:t instanceof Error?t.message:"Failed to import, please retry"}}}static async saveMcpServer(e){try{const t=await fetch(`${this.BASE_URL}/server`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.text(),s=e.id!==void 0?"update":"add";throw new Error(`Failed to ${s} MCP server: ${t.status} - ${n}`)}return{success:!0,message:`Successfully ${e.id!==void 0?"updated":"added"} MCP server`}}catch(t){return console.error("Failed to save MCP server:",t),{success:!1,message:t instanceof Error?t.message:"Failed to save, please retry"}}}static async updateMcpServer(e,t){return this.saveMcpServer({...t,id:e})}static async removeMcpServer(e){try{const t=await fetch(`${this.BASE_URL}/remove?id=${e}`);if(!t.ok)throw new Error(`Failed to delete MCP server: ${t.status}`);return{success:!0,message:"Successfully deleted MCP server"}}catch(t){return console.error(`Failed to delete MCP server[${e}]:`,t),{success:!1,message:t instanceof Error?t.message:"Failed to delete, please retry"}}}static async enableMcpServer(e){try{const t=await fetch(`${this.BASE_URL}/enable/${e}`,{method:"POST"});if(!t.ok){const i=await t.text();throw new Error(`Failed to enable MCP server: ${t.status} - ${i}`)}return{success:!0,message:"Successfully enabled MCP server"}}catch(t){return console.error(`Failed to enable MCP server[${e}]:`,t),{success:!1,message:t instanceof Error?t.message:"Failed to enable, please retry"}}}static async disableMcpServer(e){try{const t=await fetch(`${this.BASE_URL}/disable/${e}`,{method:"POST"});if(!t.ok){const i=await t.text();throw new Error(`Failed to disable MCP server: ${t.status} - ${i}`)}return{success:!0,message:"Successfully disabled MCP server"}}catch(t){return console.error(`Failed to disable MCP server[${e}]:`,t),{success:!1,message:t instanceof Error?t.message:"Failed to disable, please retry"}}}}ri(od,"BASE_URL","/api/mcp");function er(o,e=0){return o[o.length-(1+e)]}function Yq(o){if(o.length===0)throw new Error("Invalid tail call");return[o.slice(0,o.length-1),o[o.length-1]]}function Bi(o,e,t=(i,n)=>i===n){if(o===e)return!0;if(!o||!e||o.length!==e.length)return!1;for(let i=0,n=o.length;it(o[i],e))}function Qq(o,e){let t=0,i=o-1;for(;t<=i;){const n=(t+i)/2|0,s=e(n);if(s<0)t=n+1;else if(s>0)i=n-1;else return n}return-(t+1)}function Mk(o,e,t){if(o=o|0,o>=e.length)throw new TypeError("invalid index");const i=e[Math.floor(e.length*Math.random())],n=[],s=[],r=[];for(const a of e){const l=t(a,i);l<0?n.push(a):l>0?s.push(a):r.push(a)}return o!!e)}function EP(o){let e=0;for(let t=0;t0}function iu(o,e=t=>t){const t=new Set;return o.filter(i=>{const n=e(i);return t.has(n)?!1:(t.add(n),!0)})}function G2(o,e){return o.length>0?o[0]:e}function Ls(o,e){let t=typeof e=="number"?o:0;typeof e=="number"?t=o:(t=0,e=o);const i=[];if(t<=e)for(let n=t;ne;n--)i.push(n);return i}function oy(o,e,t){const i=o.slice(0,e),n=o.slice(e);return i.concat(t,n)}function DD(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.unshift(e))}function $0(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.push(e))}function Ak(o,e){for(const t of e)o.push(t)}function Z2(o){return Array.isArray(o)?o:[o]}function eG(o,e,t){const i=O9(o,e),n=o.length,s=t.length;o.length=n+s;for(let r=n-1;r>=i;r--)o[r+s]=o[r];for(let r=0;r0}o.isGreaterThan=i;function n(s){return s===0}o.isNeitherLessOrGreaterThan=n,o.greaterThan=1,o.lessThan=-1,o.neitherLessOrGreaterThan=0})(pv||(pv={}));function ur(o,e){return(t,i)=>e(o(t),o(i))}function tG(...o){return(e,t)=>{for(const i of o){const n=i(e,t);if(!pv.isNeitherLessOrGreaterThan(n))return n}return pv.neitherLessOrGreaterThan}}const Md=(o,e)=>o-e,iG=(o,e)=>Md(o?1:0,e?1:0);function F9(o){return(e,t)=>-o(e,t)}class Hd{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class Dl{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new Dl(t=>this.iterate(i=>e(i)?t(i):!0))}map(e){return new Dl(t=>this.iterate(i=>t(e(i))))}findLast(e){let t;return this.iterate(i=>(e(i)&&(t=i),!0)),t}findLastMaxBy(e){let t,i=!0;return this.iterate(n=>((i||pv.isGreaterThan(e(n,t)))&&(i=!1,t=n),!0)),t}}Dl.empty=new Dl(o=>{});function As(o){return typeof o=="string"}function Es(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function nG(o){const e=Object.getPrototypeOf(Uint8Array);return typeof o=="object"&&o instanceof e}function nu(o){return typeof o=="number"&&!isNaN(o)}function TP(o){return!!o&&typeof o[Symbol.iterator]=="function"}function B9(o){return o===!0||o===!1}function ro(o){return typeof o>"u"}function mv(o){return!Ro(o)}function Ro(o){return ro(o)||o===null}function qt(o,e){if(!o)throw new Error("Unexpected type")}function Lc(o){if(Ro(o))throw new Error("Assertion Failed: argument is undefined or null");return o}function _v(o){return typeof o=="function"}function sG(o,e){const t=Math.min(o.length,e.length);for(let i=0;i{e[t]=i&&typeof i=="object"?gd(i):i}),e}function rG(o){if(!o||typeof o!="object")return o;const e=[o];for(;e.length>0;){const t=e.shift();Object.freeze(t);for(const i in t)if(W9.call(t,i)){const n=t[i];typeof n=="object"&&!Object.isFrozen(n)&&!nG(n)&&e.push(n)}}return o}const W9=Object.prototype.hasOwnProperty;function V9(o,e){return Rk(o,e,new Set)}function Rk(o,e,t){if(Ro(o))return o;const i=e(o);if(typeof i<"u")return i;if(Array.isArray(o)){const n=[];for(const s of o)n.push(Rk(s,e,t));return n}if(Es(o)){if(t.has(o))throw new Error("Cannot clone recursive data-structure");t.add(o);const n={};for(const s in o)W9.call(o,s)&&(n[s]=Rk(o[s],e,t));return t.delete(o),n}return o}function ry(o,e,t=!0){return Es(o)?(Es(e)&&Object.keys(e).forEach(i=>{i in o?t&&(Es(o[i])&&Es(e[i])?ry(o[i],e[i],t):o[i]=e[i]):o[i]=e[i]}),o):e}function Uo(o,e){if(o===e)return!0;if(o==null||e===null||e===void 0||typeof o!=typeof e||typeof o!="object"||Array.isArray(o)!==Array.isArray(e))return!1;let t,i;if(Array.isArray(o)){if(o.length!==e.length)return!1;for(t=0;tfunction(){const s=Array.prototype.slice.call(arguments,0);return e(n,s)},i={};for(const n of o)i[n]=t(n);return i}let dG=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function H9(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(i,n)=>{const s=n[0],r=e[s];let a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),dG&&(t="["+t.replace(/[aouei]/g,"$&$&")+"]"),t}function p(o,e,...t){return H9(e,t)}function cG(o,e,...t){const i=H9(e,t);return{value:i,original:i}}var xD;const wf="en";let J1=!1,ew=!1,h1=!1,z9=!1,X2=!1,Q2=!1,$9=!1,U0,g1=wf,MP=wf,uG,ia;const Ad=globalThis;let Ds;typeof Ad.vscode<"u"&&typeof Ad.vscode.process<"u"?Ds=Ad.vscode.process:typeof process<"u"&&(Ds=process);const hG=typeof((xD=Ds==null?void 0:Ds.versions)===null||xD===void 0?void 0:xD.electron)=="string",gG=hG&&(Ds==null?void 0:Ds.type)==="renderer";if(typeof navigator=="object"&&!gG)ia=navigator.userAgent,J1=ia.indexOf("Windows")>=0,ew=ia.indexOf("Macintosh")>=0,Q2=(ia.indexOf("Macintosh")>=0||ia.indexOf("iPad")>=0||ia.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,h1=ia.indexOf("Linux")>=0,$9=(ia==null?void 0:ia.indexOf("Mobi"))>=0,X2=!0,p({},"_"),U0=wf,g1=U0,MP=navigator.language;else if(typeof Ds=="object"){J1=Ds.platform==="win32",ew=Ds.platform==="darwin",h1=Ds.platform==="linux",h1&&Ds.env.SNAP&&Ds.env.SNAP_REVISION,Ds.env.CI||Ds.env.BUILD_ARTIFACTSTAGINGDIRECTORY,U0=wf,g1=wf;const o=Ds.env.VSCODE_NLS_CONFIG;if(o)try{const e=JSON.parse(o),t=e.availableLanguages["*"];U0=e.locale,MP=e.osLocale,g1=t||wf,uG=e._translationsConfigFile}catch{}z9=!0}else console.error("Unable to resolve platform.");const is=J1,It=ew,ws=h1,Ml=z9,Tu=X2,fG=X2&&typeof Ad.importScripts=="function",pG=fG?Ad.origin:void 0,Ea=Q2,mG=$9,Al=ia,_G=g1,vG=typeof Ad.postMessage=="function"&&!Ad.importScripts,U9=(()=>{if(vG){const o=[];Ad.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=o.length;i{const i=++e;o.push({id:i,callback:t}),Ad.postMessage({vscodeScheduleAsyncWork:i},"*")}}return o=>setTimeout(o)})(),Vo=ew||Q2?2:J1?1:3;let AP=!0,RP=!1;function j9(){if(!RP){RP=!0;const o=new Uint8Array(2);o[0]=1,o[1]=2,AP=new Uint16Array(o.buffer)[0]===513}return AP}const K9=!!(Al&&Al.indexOf("Chrome")>=0),bG=!!(Al&&Al.indexOf("Firefox")>=0),CG=!!(!K9&&Al&&Al.indexOf("Safari")>=0),wG=!!(Al&&Al.indexOf("Edg/")>=0);Al&&Al.indexOf("Android")>=0;const rs={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}};var wt;(function(o){function e(b){return b&&typeof b=="object"&&typeof b[Symbol.iterator]=="function"}o.is=e;const t=Object.freeze([]);function i(){return t}o.empty=i;function*n(b){yield b}o.single=n;function s(b){return e(b)?b:n(b)}o.wrap=s;function r(b){return b||t}o.from=r;function*a(b){for(let C=b.length-1;C>=0;C--)yield b[C]}o.reverse=a;function l(b){return!b||b[Symbol.iterator]().next().done===!0}o.isEmpty=l;function d(b){return b[Symbol.iterator]().next().value}o.first=d;function c(b,C){for(const w of b)if(C(w))return!0;return!1}o.some=c;function u(b,C){for(const w of b)if(C(w))return w}o.find=u;function*h(b,C){for(const w of b)C(w)&&(yield w)}o.filter=h;function*g(b,C){let w=0;for(const S of b)yield C(S,w++)}o.map=g;function*f(...b){for(const C of b)yield*C}o.concat=f;function m(b,C,w){let S=w;for(const x of b)S=C(S,x);return S}o.reduce=m;function*v(b,C,w=b.length){for(C<0&&(C+=b.length),w<0?w+=b.length:w>b.length&&(w=b.length);C{n||(n=!0,this._remove(i))}}shift(){if(this._first!==cn.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==cn.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==cn.Undefined&&e.next!==cn.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===cn.Undefined&&e.next===cn.Undefined?(this._first=cn.Undefined,this._last=cn.Undefined):e.next===cn.Undefined?(this._last=this._last.prev,this._last.next=cn.Undefined):e.prev===cn.Undefined&&(this._first=this._first.next,this._first.prev=cn.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==cn.Undefined;)yield e.element,e=e.next}}const q9="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function SG(o=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of q9)o.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const J2=SG();function eM(o){let e=J2;if(o&&o instanceof RegExp)if(o.global)e=o;else{let t="g";o.ignoreCase&&(t+="i"),o.multiline&&(t+="m"),o.unicode&&(t+="u"),e=new RegExp(o.source,t)}return e.lastIndex=0,e}const G9=new Ns;G9.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function vv(o,e,t,i,n){if(e=eM(e),n||(n=wt.first(G9)),t.length>n.maxLen){let d=o-n.maxLen/2;return d<0?d=0:i+=d,t=t.substring(d,o+n.maxLen/2),vv(o,e,t,i,n)}const s=Date.now(),r=o-1-i;let a=-1,l=null;for(let d=1;!(Date.now()-s>=n.timeBudget);d++){const c=r-n.windowSize*d;e.lastIndex=Math.max(0,c);const u=yG(e,t,r,a);if(!u&&l||(l=u,c<=0))break;a=c}if(l){const d={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,d}return null}function yG(o,e,t,i){let n;for(;n=o.exec(e);){const s=n.index||0;if(s<=t&&o.lastIndex>=t)return n;if(i>0&&s>i)return null}return null}const lc=8;class Z9{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class Y9{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class Di{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return ay(e,t)}compute(e,t,i){return i}}class P_{constructor(e,t){this.newValue=e,this.didChange=t}}function ay(o,e){if(typeof o!="object"||typeof e!="object"||!o||!e)return new P_(e,o!==e);if(Array.isArray(o)||Array.isArray(e)){const i=Array.isArray(o)&&Array.isArray(e)&&Bi(o,e);return new P_(e,!i)}let t=!1;for(const i in e)if(e.hasOwnProperty(i)){const n=ay(o[i],e[i]);n.didChange&&(o[i]=n.newValue,t=!0)}return new P_(o,t)}class Zb{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return ay(e,t)}validate(e){return this.defaultValue}}class um{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return ay(e,t)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,i){return i}}function Be(o,e){return typeof o>"u"?e:o==="false"?!1:!!o}class Nt extends um{constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return Be(e,this.defaultValue)}}function ah(o,e,t,i){if(typeof o>"u")return e;let n=parseInt(o,10);return isNaN(n)?e:(n=Math.max(t,n),n=Math.min(i,n),n|0)}class Jt extends um{static clampedInt(e,t,i,n){return ah(e,t,i,n)}constructor(e,t,i,n,s,r=void 0){typeof r<"u"&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=s),super(e,t,i,r),this.minimum=n,this.maximum=s}validate(e){return Jt.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function LG(o,e,t,i){if(typeof o>"u")return e;const n=Rr.float(o,e);return Rr.clamp(n,t,i)}class Rr extends um{static clamp(e,t,i){return ei?i:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;const i=parseFloat(e);return isNaN(i)?t:i}constructor(e,t,i,n,s){typeof s<"u"&&(s.type="number",s.default=i),super(e,t,i,s),this.validationFn=n}validate(e){return this.validationFn(Rr.float(e,this.defaultValue))}}class no extends um{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return no.string(e,this.defaultValue)}}function Ki(o,e,t,i){return typeof o!="string"?e:i&&o in i?i[o]:t.indexOf(o)===-1?e:o}class ki extends um{constructor(e,t,i,n,s=void 0){typeof s<"u"&&(s.type="string",s.enum=n,s.default=i),super(e,t,i,s),this._allowedValues=n}validate(e){return Ki(e,this.defaultValue,this._allowedValues)}}class j0 extends Di{constructor(e,t,i,n,s,r,a=void 0){typeof a<"u"&&(a.type="string",a.enum=s,a.default=n),super(e,t,i,a),this._allowedValues=s,this._convert=r}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function DG(o){switch(o){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class xG extends Di{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[p("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),p("accessibilitySupport.on","Optimize for usage with a Screen Reader."),p("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:p("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return i===0?e.accessibilitySupport:i}}class kG extends Di{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:p("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:p("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:Be(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:Be(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function IG(o){switch(o){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var Vn;(function(o){o[o.Line=1]="Line",o[o.Block=2]="Block",o[o.Underline=3]="Underline",o[o.LineThin=4]="LineThin",o[o.BlockOutline=5]="BlockOutline",o[o.UnderlineThin=6]="UnderlineThin"})(Vn||(Vn={}));function EG(o){switch(o){case"line":return Vn.Line;case"block":return Vn.Block;case"underline":return Vn.Underline;case"line-thin":return Vn.LineThin;case"block-outline":return Vn.BlockOutline;case"underline-thin":return Vn.UnderlineThin}}class NG extends Zb{constructor(){super(140)}compute(e,t,i){const n=["monaco-editor"];return t.get(39)&&n.push(t.get(39)),e.extraEditorClassName&&n.push(e.extraEditorClassName),t.get(73)==="default"?n.push("mouse-default"):t.get(73)==="copy"&&n.push("mouse-copy"),t.get(110)&&n.push("showUnused"),t.get(138)&&n.push("showDeprecated"),n.join(" ")}}class TG extends Nt{constructor(){super(37,"emptySelectionClipboard",!0,{description:p("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class MG extends Di{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:p("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[p("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),p("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),p("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:p("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[p("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),p("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),p("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:p("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:p("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:It},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:p("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:p("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:Be(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Ki(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Ki(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:Be(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:Be(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:Be(t.loop,this.defaultValue.loop)}}}class Po extends Di{constructor(){super(51,"fontLigatures",Po.OFF,{anyOf:[{type:"boolean",description:p("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:p("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:p("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?Po.OFF:e==="true"?Po.ON:e:e?Po.ON:Po.OFF}}Po.OFF='"liga" off, "calt" off';Po.ON='"liga" on, "calt" on';class _a extends Di{constructor(){super(54,"fontVariations",_a.OFF,{anyOf:[{type:"boolean",description:p("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:p("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:p("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?_a.OFF:e==="true"?_a.TRANSLATE:e:e?_a.TRANSLATE:_a.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}}_a.OFF="normal";_a.TRANSLATE="translate";class AG extends Zb{constructor(){super(50)}compute(e,t,i){return e.fontInfo}}class RG extends um{constructor(){super(52,"fontSize",co.fontSize,{type:"number",minimum:6,maximum:100,default:co.fontSize,description:p("fontSize","Controls the font size in pixels.")})}validate(e){const t=Rr.float(e,this.defaultValue);return t===0?co.fontSize:Rr.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class ol extends Di{constructor(){super(53,"fontWeight",co.fontWeight,{anyOf:[{type:"number",minimum:ol.MINIMUM_VALUE,maximum:ol.MAXIMUM_VALUE,errorMessage:p("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:ol.SUGGESTION_VALUES}],default:co.fontWeight,description:p("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(Jt.clampedInt(e,co.fontWeight,ol.MINIMUM_VALUE,ol.MAXIMUM_VALUE))}}ol.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];ol.MINIMUM_VALUE=1;ol.MAXIMUM_VALUE=1e3;class PG extends Di{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[p("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),p("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),p("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:p("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:p("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:p("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:p("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:p("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:p("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:p("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:p("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:p("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:p("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:p("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,s,r;if(!e||typeof e!="object")return this.defaultValue;const a=e;return{multiple:Ki(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:Ki(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(i=a.multipleTypeDefinitions)!==null&&i!==void 0?i:Ki(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(n=a.multipleDeclarations)!==null&&n!==void 0?n:Ki(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(s=a.multipleImplementations)!==null&&s!==void 0?s:Ki(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(r=a.multipleReferences)!==null&&r!==void 0?r:Ki(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:no.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:no.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:no.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:no.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:no.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class OG extends Di{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:p("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:p("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:p("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:p("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:p("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Be(t.enabled,this.defaultValue.enabled),delay:Jt.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:Be(t.sticky,this.defaultValue.sticky),hidingDelay:Jt.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:Be(t.above,this.defaultValue.above)}}}class Zf extends Zb{constructor(){super(143)}compute(e,t,i){return Zf.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight);let n=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(n=Math.max(n,t-1));const s=(i+e.viewLineCount+n)/(e.pixelRatio*e.height),r=Math.floor(e.viewLineCount/s);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:s,minimapLineCount:r}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,s=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(s*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const r=t.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.paddingTop===r.paddingTop&&e.paddingBottom===r.paddingBottom&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,d=e.typicalHalfwidthCharacterWidth,c=e.scrollBeyondLastLine,u=e.minimap.renderCharacters;let h=s>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const g=e.minimap.maxColumn,f=e.minimap.size,m=e.minimap.side,v=e.verticalScrollbarWidth,_=e.viewLineCount,b=e.remainingWidth,C=e.isViewportWrapping,w=u?2:3;let S=Math.floor(s*n);const x=S/s;let y=!1,I=!1,E=w*h,R=h/s,j=1;if(f==="fill"||f==="fit"){const{typicalViewportLineCount:se,extraLinesBeforeFirstLine:V,extraLinesBeyondLastLine:Q,desiredRatio:H,minimapLineCount:G}=Zf.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:c,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:l,pixelRatio:s});if(_/G>1)y=!0,I=!0,h=1,E=1,R=h/s;else{let $e=!1,ft=h+1;if(f==="fit"){const Bt=Math.ceil((V+_+Q)*E);C&&a&&b<=t.stableFitRemainingWidth?($e=!0,ft=t.stableFitMaxMinimapScale):$e=Bt>S}if(f==="fill"||$e){y=!0;const Bt=h;E=Math.min(l*s,Math.max(1,Math.floor(1/H))),C&&a&&b<=t.stableFitRemainingWidth&&(ft=t.stableFitMaxMinimapScale),h=Math.min(ft,Math.max(1,Math.floor(E/w))),h>Bt&&(j=Math.min(2,h/Bt)),R=h/s/j,S=Math.ceil(Math.max(se,V+_+Q)*E),C?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const O=Math.floor(g*R),$=Math.min(O,Math.max(0,Math.floor((b-v-2)*R/(d+R)))+lc);let K=Math.floor(s*$);const oe=K/s;K=Math.floor(K*j);const Le=u?1:2,he=m==="left"?0:i-$-v;return{renderMinimap:Le,minimapLeft:he,minimapWidth:$,minimapHeightIsEditorHeight:y,minimapIsSampling:I,minimapScale:h,minimapLineHeight:E,minimapCanvasInnerWidth:K,minimapCanvasInnerHeight:S,minimapCanvasOuterWidth:oe,minimapCanvasOuterHeight:x}}static computeLayout(e,t){const i=t.outerWidth|0,n=t.outerHeight|0,s=t.lineHeight|0,r=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,d=t.pixelRatio,c=t.viewLineCount,u=e.get(135),h=u==="inherit"?e.get(134):u,g=h==="inherit"?e.get(130):h,f=e.get(133),m=t.isDominatedByLongLines,v=e.get(57),_=e.get(67).renderType!==0,b=e.get(68),C=e.get(104),w=e.get(83),S=e.get(72),x=e.get(102),y=x.verticalScrollbarSize,I=x.verticalHasArrows,E=x.arrowSize,R=x.horizontalScrollbarSize,j=e.get(43),O=e.get(109)!=="never";let $=e.get(65);j&&O&&($+=16);let K=0;if(_){const re=Math.max(r,b);K=Math.round(re*l)}let oe=0;v&&(oe=s*t.glyphMarginDecorationLaneCount);let Le=0,he=Le+oe,se=he+K,V=se+$;const Q=i-oe-K-$;let H=!1,G=!1,Z=-1;h==="inherit"&&m?(H=!0,G=!0):g==="on"||g==="bounded"?G=!0:g==="wordWrapColumn"&&(Z=f);const $e=Zf._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:a,pixelRatio:d,scrollBeyondLastLine:C,paddingTop:w.top,paddingBottom:w.bottom,minimap:S,verticalScrollbarWidth:y,viewLineCount:c,remainingWidth:Q,isViewportWrapping:G},t.memory||new Y9);$e.renderMinimap!==0&&$e.minimapLeft===0&&(Le+=$e.minimapWidth,he+=$e.minimapWidth,se+=$e.minimapWidth,V+=$e.minimapWidth);const ft=Q-$e.minimapWidth,Bt=Math.max(1,Math.floor((ft-y-2)/a)),Ce=I?E:0;return G&&(Z=Math.max(1,Bt),g==="bounded"&&(Z=Math.min(Z,f))),{width:i,height:n,glyphMarginLeft:Le,glyphMarginWidth:oe,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:he,lineNumbersWidth:K,decorationsLeft:se,decorationsWidth:$,contentLeft:V,contentWidth:ft,minimap:$e,viewportColumn:Bt,isWordWrapMinified:H,isViewportWrapping:G,wrappingColumn:Z,verticalScrollbarWidth:y,horizontalScrollbarHeight:R,overviewRuler:{top:Ce,width:y,height:n-2*Ce,right:0}}}}class FG extends Di{constructor(){super(137,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[p("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),p("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:p("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return Ki(e,"simple",["simple","advanced"])}compute(e,t,i){return t.get(2)===2?"advanced":i}}var so;(function(o){o.Off="off",o.OnCode="onCode",o.On="on"})(so||(so={}));class BG extends Di{constructor(){const e={enabled:!0,experimental:{showAiIcon:so.Off}};super(64,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:p("codeActions","Enables the Code Action lightbulb in the editor.")},"editor.lightbulb.experimental.showAiIcon":{type:"string",enum:[so.Off,so.OnCode,so.On],default:e.experimental.showAiIcon,enumDescriptions:[p("editor.lightbulb.showAiIcon.off","Don not show the AI icon."),p("editor.lightbulb.showAiIcon.onCode","Show an AI icon when the code action menu contains an AI action, but only on code."),p("editor.lightbulb.showAiIcon.on","Show an AI icon when the code action menu contains an AI action, on code and empty lines.")],description:p("showAiIcons","Show an AI icon along with the lightbulb when the code action menu contains an AI action.")}})}validate(e){var t,i;if(!e||typeof e!="object")return this.defaultValue;const n=e;return{enabled:Be(n.enabled,this.defaultValue.enabled),experimental:{showAiIcon:Ki((t=n.experimental)===null||t===void 0?void 0:t.showAiIcon,(i=this.defaultValue.experimental)===null||i===void 0?void 0:i.showAiIcon,[so.Off,so.OnCode,so.On])}}}}class WG extends Di{constructor(){const e={enabled:!1,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(114,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:p("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor.")},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:10,description:p("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:p("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:p("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Be(t.enabled,this.defaultValue.enabled),maxLineCount:Jt.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:Ki(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:Be(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class VG extends Di{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(139,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:p("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[p("editor.inlayHints.on","Inlay hints are enabled"),p("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",It?"Ctrl+Option":"Ctrl+Alt"),p("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",It?"Ctrl+Option":"Ctrl+Alt"),p("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:p("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:p("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:p("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:Ki(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Jt.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:no.string(t.fontFamily,this.defaultValue.fontFamily),padding:Be(t.padding,this.defaultValue.padding)}}}class HG extends Di{constructor(){super(65,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):Jt.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?Jt.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}class zG extends Rr{constructor(){super(66,"lineHeight",co.lineHeight,e=>Rr.clamp(e,0,150),{markdownDescription:p("lineHeight",`Controls the line height. +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/freemarker2-C7VanfqX.js","assets/index-W4k7xcj8.js","assets/index-DN-vOy2S.css","assets/iconify-bZOkqtWv.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/useMessage-QCjbpgZx.js","assets/useMessage-B772OobR.css","assets/index-0-ztzQqN.js","assets/index-CxnUfhp1.css","assets/handlebars-Ce5o-Jd2.js","assets/html-BQBqHUj9.js","assets/javascript-ClmtgjpZ.js","assets/typescript-DIQD8-gM.js","assets/liquid-jrk-G9V0.js","assets/mdx-W_e0gsbC.js","assets/python-CizQR6lC.js","assets/razor-ByehaRkx.js","assets/xml-zvgeEvYc.js","assets/yaml-C5T5Ig_l.js","assets/cssMode-CRvchvYB.js","assets/htmlMode-k6nyQsqC.js","assets/jsonMode-CA0blgmE.js","assets/tsMode-BQcOR96Y.js"])))=>i.map(i=>d[i]); +var xz=Object.defineProperty;var kz=(o,e,t)=>e in o?xz(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var ri=(o,e,t)=>kz(o,typeof e!="symbol"?e+"":e,t);import{d as Ss,a as ue,b as ne,e as L,t as B,u as Pa,r as Ye,z as ar,c as Xn,o as Kd,g as xe,f as at,i as Pe,w as Vt,j as ti,F as Ji,l as ln,n as Nn,E as ny,s as In,k as Zt,T as qb,J as Gf,C as Iz,x as P,h as Zh,B as cr,D as X1,y as I9,H as Ez,K as K2,q as Nz,A as E9,_ as Oe,M as Tz,p as N9,G as T9,N as Mz}from"./index-W4k7xcj8.js";import{I as Re}from"./iconify-bZOkqtWv.js";import{_ as us}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{a as Az,u as M9}from"./useMessage-QCjbpgZx.js";import{L as Rz}from"./index-0-ztzQqN.js";const Pz={class:"switch"},Oz=["checked"],Fz={class:"switch-label"},Bz=Ss({__name:"index",props:{enabled:{type:Boolean},label:{}},emits:["update:switchValue"],setup(o,{emit:e}){const t=e,i=n=>{const s=n.target.checked;t("update:switchValue",s)};return(n,s)=>(ne(),ue("label",Pz,[L("input",{type:"checkbox",checked:n.enabled,onChange:i},null,40,Oz),s[0]||(s[0]=L("span",{class:"slider"},null,-1)),L("span",Fz,B(n.label),1)]))}}),Wz=us(Bz,[["__scopeId","data-v-d484b4a3"]]);class u_{static async getConfigsByGroup(e){try{const t=await fetch(`${this.BASE_URL}/group/${e}`);if(!t.ok)throw new Error(`Failed to get ${e} group configuration: ${t.status}`);return await t.json()}catch(t){throw console.error(`Failed to get ${e} group configuration:`,t),t}}static async batchUpdateConfigs(e){if(e.length===0)return{success:!0,message:"No configuration needs to be updated"};try{const t=await fetch(`${this.BASE_URL}/batch-update`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`Batch update configuration failed: ${t.status}`);return{success:!0,message:"Configuration saved successfully"}}catch(t){return console.error("Batch update configuration failed:",t),{success:!1,message:t instanceof Error?t.message:"Update failed, please try again"}}}static async getConfigById(e){try{const t=await fetch(`${this.BASE_URL}/${e}`);if(!t.ok)throw new Error(`Failed to get configuration item: ${t.status}`);return await t.json()}catch(t){throw console.error(`Failed to get configuration item[${e}]:`,t),t}}static async updateConfig(e){try{const t=await fetch(`${this.BASE_URL}/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`Failed to update configuration item: ${t.status}`);return{success:!0,message:"Configuration updated successfully"}}catch(t){return console.error("Failed to update configuration item:",t),{success:!1,message:t instanceof Error?t.message:"Update failed, please try again"}}}}ri(u_,"BASE_URL","/api/config");const Vz={class:"config-panel"},Hz={class:"config-header"},zz={class:"header-left"},$z={class:"config-stats"},Uz={class:"stat-item"},jz={class:"stat-label"},Kz={class:"stat-value"},qz={key:0,class:"stat-item"},Gz={class:"stat-label"},Zz={class:"stat-value modified"},Yz={class:"header-right"},Xz={class:"import-export-actions"},Qz=["title"],Jz=["title"],e$={class:"search-box"},t$=["placeholder"],i$={key:0,class:"loading-container"},n$={key:1,class:"config-groups"},s$={class:"group-header"},o$={class:"group-info"},r$={class:"group-icon"},a$={class:"group-actions"},l$=["onClick","disabled","title"],d$={class:"sub-groups"},c$=["onClick"],u$={class:"sub-group-info"},h$={class:"sub-group-title"},g$={class:"item-count"},f$={class:"config-items"},p$={key:0,class:"config-item-content vertical-layout"},m$={class:"config-item-info"},_$={class:"config-item-header"},v$={class:"config-label"},b$={class:"type-badge boolean"},C$={key:0,class:"modified-badge"},w$=["title"],S$={class:"config-control"},y$=["value","onChange"],L$=["value"],D$={key:1,class:"config-item-content vertical-layout"},x$={class:"config-item-info"},k$={class:"config-item-header"},I$={class:"config-label"},E$={class:"type-badge select"},N$={key:0,class:"modified-badge"},T$=["title"],M$={class:"config-control"},A$=["value","onChange"],R$=["value"],P$={key:2,class:"config-item-content vertical-layout"},O$={class:"config-item-info"},F$={class:"config-item-header"},B$={class:"config-label"},W$={class:"type-badge textarea"},V$={key:0,class:"modified-badge"},H$=["title"],z$={class:"config-control"},$$=["value","onInput"],U$={key:3,class:"config-item-content vertical-layout"},j$={class:"config-item-info"},K$={class:"config-item-header"},q$={class:"config-label"},G$={class:"type-badge number"},Z$={key:0,class:"modified-badge"},Y$=["title"],X$={key:0,class:"config-meta"},Q$={class:"range-info"},J$={class:"config-control"},eU=["value","onInput","min","max"],tU={key:4,class:"config-item-content vertical-layout"},iU={class:"config-item-info"},nU={class:"config-item-header"},sU={class:"config-label"},oU={class:"type-badge string"},rU={key:0,class:"modified-badge"},aU=["title"],lU={class:"config-control"},dU=["value","onInput"],cU={key:2,class:"empty-state"},uU=Ss({__name:"basicConfig",setup(o){const{t:e}=Pa(),t=Ye(!0),i=Ye(!1),n=Ye([]),s=Ye(new Map),r=Ye(new Set),a=ar({show:!1,text:"",type:"success"}),l=Ye(""),d={headless:"config.basicConfig.browserSettings.headless",requestTimeout:"config.basicConfig.browserSettings.requestTimeout",debugDetail:"config.basicConfig.general.debugDetail",baseDir:"config.basicConfig.general.baseDir",openBrowser:"config.basicConfig.interactionSettings.openBrowser",maxSteps:"config.basicConfig.agentSettings.maxSteps",userInputTimeout:"config.basicConfig.agentSettings.userInputTimeout",maxMemory:"config.basicConfig.agentSettings.maxMemory",parallelToolCalls:"config.basicConfig.agentSettings.parallelToolCalls",forceOverrideFromYaml:"config.basicConfig.agents.forceOverrideFromYaml",enabled:"config.basicConfig.infiniteContext.enabled",parallelThreads:"config.basicConfig.infiniteContext.parallelThreads",taskContextSize:"config.basicConfig.infiniteContext.taskContextSize",allowExternalAccess:"config.basicConfig.fileSystem.allowExternalAccess",connectionTimeoutSeconds:"config.basicConfig.mcpServiceLoader.connectionTimeoutSeconds",maxRetryCount:"config.basicConfig.mcpServiceLoader.maxRetryCount",maxConcurrentConnections:"config.basicConfig.mcpServiceLoader.maxConcurrentConnections"},c={manus:"config.basicConfig.groupDisplayNames.manus"},u={manus:"🤖",browser:"🌐",interaction:"🖥️",system:"⚙️",performance:"⚡"},h={agent:"config.subGroupDisplayNames.agent",browser:"config.subGroupDisplayNames.browser",interaction:"config.subGroupDisplayNames.interaction",agents:"config.subGroupDisplayNames.agents",infiniteContext:"config.subGroupDisplayNames.infiniteContext",general:"config.subGroupDisplayNames.general",filesystem:"config.subGroupDisplayNames.filesystem",mcpServiceLoader:"config.subGroupDisplayNames.mcpServiceLoader"},g=Xn(()=>n.value.some(V=>V.subGroups.some(Q=>Q.items.some(H=>s.value.get(H.id)!==H.configValue)))),f=V=>V==="true",m=V=>parseFloat(V)||0,v=V=>({maxSteps:1,browserTimeout:1,maxThreads:1,timeoutSeconds:5,maxMemory:1})[V]||1,_=V=>({maxSteps:100,browserTimeout:600,maxThreads:32,timeoutSeconds:300,maxMemory:1e3})[V]||1e4,b=V=>typeof V=="string"?V:V.value,C=V=>typeof V=="string"?V:V.label,w=(V,Q)=>{if(typeof Q=="boolean")return Q.toString();if(typeof Q=="string"){if(V.options&&V.options.length>0){const H=V.options.find(G=>(typeof G=="string"?G:G.label)===Q||(typeof G=="string"?G:G.value)===Q);if(H)return typeof H=="string"?H:H.value}return Q}return String(Q)},S=(V,Q,H=!1)=>{let G;V.inputType==="BOOLEAN"||V.inputType==="CHECKBOX"?G=w(V,Q):G=String(Q),V.configValue!==G&&(V.configValue=G,V._modified=!0,(H||V.inputType==="BOOLEAN"||V.inputType==="CHECKBOX"||V.inputType==="SELECT")&&y())};let x=null;const y=()=>{x&&clearTimeout(x),x=window.setTimeout(()=>{R()},500)},I=(V,Q="success")=>{a.text=V,a.type=Q,a.show=!0,setTimeout(()=>{a.show=!1},3e3)},E=async()=>{try{t.value=!0;const Q=["manus"].map(async G=>{try{const Z=await u_.getConfigsByGroup(G);if(Z.length===0)return null;const $e=Z.map(Ce=>({...Ce,displayName:d[Ce.configKey]||Ce.configKey,min:v(Ce.configKey),max:_(Ce.configKey)}));$e.forEach(Ce=>{s.value.set(Ce.id,Ce.configValue)});const ft=new Map;$e.forEach(Ce=>{const re=Ce.configSubGroup??"general";ft.has(re)||ft.set(re,[]),ft.get(re).push(Ce)});const Bt=Array.from(ft.entries()).map(([Ce,re])=>({name:Ce,displayName:h[Ce]||Ce,items:re}));return{name:G,displayName:c[G]||G,subGroups:Bt}}catch(Z){return console.warn(`Failed to load config group ${G}, skipping:`,Z),null}}),H=await Promise.all(Q);n.value=H.filter(G=>G!==null),console.log(e("config.basicConfig.loadConfigSuccess"),n.value)}catch(V){console.error(e("config.basicConfig.loadConfigFailed"),V),I(e("config.basicConfig.loadConfigFailed"),"error")}finally{t.value=!1}},R=async()=>{if(!(i.value||!g.value))try{i.value=!0;const V=[];if(n.value.forEach(H=>{H.subGroups.forEach(G=>{const Z=G.items.filter($e=>$e._modified);V.push(...Z)})}),V.length===0){I(e("config.basicConfig.noModified"));return}const Q=await u_.batchUpdateConfigs(V);Q.success?(V.forEach(H=>{s.value.set(H.id,H.configValue),H._modified=!1}),I(e("config.basicConfig.saveSuccess"))):I(Q.message||e("config.basicConfig.saveFailed"),"error")}catch(V){console.error(e("config.basicConfig.saveFailed"),V),I(e("config.basicConfig.saveFailed"),"error")}finally{i.value=!1}},j=async V=>{if(confirm(e("config.basicConfig.resetGroupConfirm",c[V]||V)))try{i.value=!0;const H=n.value.find($e=>$e.name===V);if(!H)return;const G=[];if(H.subGroups.forEach($e=>{$e.items.forEach(ft=>{const Bt=O(ft.configKey);Bt!==ft.configValue&&G.push({...ft,configValue:Bt})})}),G.length===0){I(e("config.basicConfig.isDefault"));return}const Z=await u_.batchUpdateConfigs(G);Z.success?(await E(),I(e("config.basicConfig.resetSuccess",G.length))):I(Z.message||e("config.basicConfig.resetFailed"),"error")}catch(H){console.error(e("config.basicConfig.resetFailed"),H),I(e("config.basicConfig.resetFailed"),"error")}finally{i.value=!1}},O=V=>({systemName:"JManus",language:"zh-CN",maxThreads:"8",timeoutSeconds:"60",autoOpenBrowser:"false",headlessBrowser:"true",maxMemory:"1000"})[V]||"",$=(V,Q)=>{const H=`${V}-${Q}`;r.value.has(H)?r.value.delete(H):r.value.add(H)},K=(V,Q)=>r.value.has(`${V}-${Q}`),oe=Xn(()=>{const V=n.value.reduce((H,G)=>H+G.subGroups.reduce((Z,$e)=>Z+$e.items.length,0),0),Q=n.value.reduce((H,G)=>H+G.subGroups.reduce((Z,$e)=>Z+$e.items.filter(ft=>s.value.get(ft.id)!==ft.configValue).length,0),0);return{total:V,modified:Q}}),Le=Xn(()=>{if(!l.value.trim())return n.value;const V=l.value.toLowerCase();return n.value.map(Q=>({...Q,subGroups:Q.subGroups.map(H=>({...H,items:H.items.filter(G=>G.displayName.toLowerCase().includes(V)||G.configKey.toLowerCase().includes(V)||G.description&&G.description.toLowerCase().includes(V))})).filter(H=>H.items.length>0)})).filter(Q=>Q.subGroups.length>0)}),he=()=>{try{const V={timestamp:new Date().toISOString(),version:"1.0",configs:n.value.reduce((Z,$e)=>($e.subGroups.forEach(ft=>{ft.items.forEach(Bt=>{Z[Bt.configKey]=Bt.configValue})}),Z),{})},Q=JSON.stringify(V,null,2),H=new Blob([Q],{type:"application/json"}),G=document.createElement("a");G.href=URL.createObjectURL(H),G.download=`config-export-${new Date().toISOString().split("T")[0]}.json`,G.click(),I(e("config.basicConfig.exportSuccess"))}catch(V){console.error(e("config.basicConfig.exportFailed"),V),I(e("config.basicConfig.exportFailed"),"error")}},se=V=>{var Z;const Q=V.target,H=(Z=Q.files)==null?void 0:Z[0];if(!H)return;const G=new FileReader;G.onload=async $e=>{var ft;try{const Bt=JSON.parse((ft=$e.target)==null?void 0:ft.result);if(!Bt.configs)throw new Error(e("config.basicConfig.invalidFormat"));if(!confirm(e("config.importConfirm")))return;i.value=!0;const re=[];if(n.value.forEach(ce=>{ce.subGroups.forEach(Ie=>{Ie.items.forEach(mt=>{Object.prototype.hasOwnProperty.call(Bt.configs,mt.configKey)&&re.push({...mt,configValue:Bt.configs[mt.configKey]})})})}),re.length===0){I(e("config.basicConfig.notFound"));return}const ke=await u_.batchUpdateConfigs(re);ke.success?(await E(),I(e("config.basicConfig.importSuccess"))):I(ke.message||e("config.basicConfig.importFailed"),"error")}catch(Bt){console.error(e("config.basicConfig.importFailed"),Bt),I(e("config.basicConfig.importFailed"),"error")}finally{i.value=!1,Q.value=""}},G.readAsText(H)};return Kd(()=>{E()}),(V,Q)=>(ne(),ue("div",Vz,[L("div",Hz,[L("div",zz,[L("h2",null,B(V.$t("config.basicConfig.title")),1),L("div",$z,[L("span",Uz,[L("span",jz,B(V.$t("config.basicConfig.totalConfigs"))+":",1),L("span",Kz,B(oe.value.total),1)]),oe.value.modified>0?(ne(),ue("span",qz,[L("span",Gz,B(V.$t("config.basicConfig.modified"))+":",1),L("span",Zz,B(oe.value.modified),1)])):at("",!0)])]),L("div",Yz,[L("div",Xz,[L("button",{onClick:he,class:"action-btn",title:V.$t("config.basicConfig.exportConfigs")}," 📤 ",8,Qz),L("label",{class:"action-btn",title:V.$t("config.basicConfig.importConfigs")},[Q[1]||(Q[1]=Pe(" 📥 ")),L("input",{type:"file",accept:".json",onChange:se,style:{display:"none"}},null,32)],8,Jz)]),L("div",e$,[Vt(L("input",{"onUpdate:modelValue":Q[0]||(Q[0]=H=>l.value=H),type:"text",placeholder:V.$t("config.search"),class:"search-input"},null,8,t$),[[ti,l.value]]),Q[2]||(Q[2]=L("span",{class:"search-icon"},"🔍",-1))])])]),t.value?(ne(),ue("div",i$,[Q[3]||(Q[3]=L("div",{class:"loading-spinner"},null,-1)),L("p",null,B(V.$t("config.loading")),1)])):Le.value.length>0?(ne(),ue("div",n$,[(ne(!0),ue(Ji,null,ln(Le.value,H=>(ne(),ue("div",{key:H.name,class:"config-group"},[L("div",s$,[L("div",o$,[L("span",r$,B(u[H.name]||"⚙️"),1)]),L("div",a$,[L("button",{onClick:G=>j(H.name),class:"reset-btn",disabled:i.value,title:V.$t("config.resetGroupConfirm")},B(V.$t("config.reset")),9,l$)]),Q[4]||(Q[4]=L("div",{class:"group-divider"},null,-1))]),L("div",d$,[(ne(!0),ue(Ji,null,ln(H.subGroups,G=>(ne(),ue("div",{key:G.name,class:"sub-group"},[L("div",{class:"sub-group-header",onClick:Z=>$(H.name,G.name)},[L("div",u$,[Q[5]||(Q[5]=L("span",{class:"sub-group-icon"},"📁",-1)),L("h4",h$,B(V.$t(G.displayName)),1),L("span",g$,"("+B(G.items.length)+")",1)]),L("span",{class:Nn(["collapse-icon",{collapsed:K(H.name,G.name)}])}," ▼ ",2)],8,c$),Vt(L("div",f$,[(ne(!0),ue(Ji,null,ln(G.items,Z=>(ne(),ue("div",{key:Z.id,class:Nn(["config-item",{modified:s.value.get(Z.id)!==Z.configValue}])},[Z.inputType==="BOOLEAN"||Z.inputType==="CHECKBOX"?(ne(),ue("div",p$,[L("div",m$,[L("div",_$,[L("label",v$,[Pe(B(V.$t(Z.displayName)||Z.description)+" ",1),L("span",b$,B(Z.inputType==="CHECKBOX"?V.$t("config.types.checkbox"):V.$t("config.types.boolean")),1),s.value.get(Z.id)!==Z.configValue?(ne(),ue("span",C$,B(V.$t("config.modified")),1)):at("",!0)]),L("span",{class:"config-key",title:Z.configKey},B(Z.configKey),9,w$)])]),L("div",S$,[Z.options&&Z.options.length>0?(ne(),ue("select",{key:0,class:"config-input select-input",value:Z.configValue,onChange:$e=>{var ft;return S(Z,((ft=$e.target)==null?void 0:ft.value)||"")}},[(ne(!0),ue(Ji,null,ln(Z.options,$e=>(ne(),ue("option",{key:b($e),value:b($e)},B(C($e)),9,L$))),128))],40,y$)):(ne(),In(Wz,{key:1,enabled:f(Z.configValue),label:"","onUpdate:switchValue":$e=>S(Z,$e)},null,8,["enabled","onUpdate:switchValue"]))])])):Z.inputType==="SELECT"?(ne(),ue("div",D$,[L("div",x$,[L("div",k$,[L("label",I$,[Pe(B(V.$t(Z.displayName)||Z.description)+" ",1),L("span",E$,B(V.$t("config.types.select")),1),s.value.get(Z.id)!==Z.configValue?(ne(),ue("span",N$,B(V.$t("config.modified")),1)):at("",!0)]),L("span",{class:"config-key",title:Z.configKey},B(Z.configKey),9,T$)])]),L("div",M$,[L("select",{class:"config-input select-input",value:Z.configValue,onChange:$e=>{var ft;return S(Z,((ft=$e.target)==null?void 0:ft.value)||"")}},[(ne(!0),ue(Ji,null,ln(Z.options||[],$e=>(ne(),ue("option",{key:b($e),value:b($e)},B(C($e)),9,R$))),128))],40,A$)])])):Z.inputType==="TEXTAREA"?(ne(),ue("div",P$,[L("div",O$,[L("div",F$,[L("label",B$,[Pe(B(V.$t(Z.displayName)||Z.description)+" ",1),L("span",W$,B(V.$t("config.types.textarea")),1),s.value.get(Z.id)!==Z.configValue?(ne(),ue("span",V$,B(V.$t("config.modified")),1)):at("",!0)]),L("span",{class:"config-key",title:Z.configKey},B(Z.configKey),9,H$)])]),L("div",z$,[L("textarea",{class:"config-input textarea-input",value:Z.configValue,onInput:$e=>{var ft;return S(Z,((ft=$e.target)==null?void 0:ft.value)||"")},onBlur:y,rows:"3"},null,40,$$)])])):Z.inputType==="NUMBER"?(ne(),ue("div",U$,[L("div",j$,[L("div",K$,[L("label",q$,[Pe(B(V.$t(Z.displayName)||Z.description)+" ",1),L("span",G$,B(V.$t("config.types.number")),1),s.value.get(Z.id)!==Z.configValue?(ne(),ue("span",Z$,B(V.$t("config.modified")),1)):at("",!0)]),L("span",{class:"config-key",title:Z.configKey},B(Z.configKey),9,Y$),Z.min||Z.max?(ne(),ue("div",X$,[L("span",Q$,B(V.$t("config.range"))+": "+B(Z.min||0)+" - "+B(Z.max||"∞"),1)])):at("",!0)])]),L("div",J$,[L("input",{type:"number",class:"config-input number-input",value:m(Z.configValue),onInput:$e=>{var ft;return S(Z,((ft=$e.target)==null?void 0:ft.value)||"")},onBlur:y,min:Z.min||1,max:Z.max||1e4},null,40,eU)])])):(ne(),ue("div",tU,[L("div",iU,[L("div",nU,[L("label",sU,[Pe(B(V.$t(Z.displayName)||Z.description)+" ",1),L("span",oU,B(Z.inputType==="TEXT"?V.$t("config.types.text"):V.$t("config.types.string")),1),s.value.get(Z.id)!==Z.configValue?(ne(),ue("span",rU,B(V.$t("config.modified")),1)):at("",!0)]),L("span",{class:"config-key",title:Z.configKey},B(Z.configKey),9,aU)])]),L("div",lU,[L("input",{type:"text",class:"config-input text-input",value:Z.configValue,onInput:$e=>{var ft;return S(Z,((ft=$e.target)==null?void 0:ft.value)||"")},onBlur:y},null,40,dU)])]))],2))),128))],512),[[ny,!K(H.name,G.name)]])]))),128))])]))),128))])):(ne(),ue("div",cU,[L("p",null,B(V.$t("config.notFound")),1)])),xe(qb,{name:"message-fade"},{default:Zt(()=>[a.show?(ne(),ue("div",{key:0,class:Nn(["message-toast",a.type])},B(a.text),3)):at("",!0)]),_:1})]))}}),xP=us(uU,[["__scopeId","data-v-cf54ca62"]]),hU={},gU={class:"config-config"},fU={class:"panel-header"},pU={class:"panel-actions"};function mU(o,e){return ne(),ue("div",gU,[L("div",fU,[Gf(o.$slots,"title",{},void 0),L("div",pU,[Gf(o.$slots,"actions",{},void 0)])]),Gf(o.$slots,"default",{},void 0)])}const Gb=us(hU,[["render",mU],["__scopeId","data-v-c91688e7"]]),_U={class:"modal-header"},vU={class:"modal-content"},bU={class:"modal-footer"},CU=Ss({__name:"index",props:{modelValue:{type:Boolean,required:!0},title:{type:String,default:""}},emits:["update:modelValue","confirm"],setup(o){const e=t=>{t.target===t.currentTarget&&(t.stopPropagation(),t.preventDefault())};return(t,i)=>(ne(),In(Iz,{to:"body"},[xe(qb,{name:"modal"},{default:Zt(()=>[o.modelValue?(ne(),ue("div",{key:0,class:"modal-overlay",onClick:e},[L("div",{class:"modal-container",onClick:i[3]||(i[3]=Zh(()=>{},["stop"]))},[L("div",_U,[L("h3",null,B(o.title),1),L("button",{class:"close-btn",onClick:i[0]||(i[0]=n=>t.$emit("update:modelValue",!1))},[xe(P(Re),{icon:"carbon:close"})])]),L("div",vU,[Gf(t.$slots,"default",{},void 0,!0)]),L("div",bU,[Gf(t.$slots,"footer",{},()=>[L("button",{class:"cancel-btn",onClick:i[1]||(i[1]=n=>t.$emit("update:modelValue",!1))},B(t.$t("common.cancel")),1),L("button",{class:"confirm-btn",onClick:i[2]||(i[2]=n=>t.$emit("confirm"))},B(t.$t("common.confirm")),1)],!0)])])])):at("",!0)]),_:3})]))}}),Wo=us(CU,[["__scopeId","data-v-baaf1c89"]]),wU={class:"tool-selection-content"},SU={class:"tool-controls"},yU={class:"search-container"},LU=["placeholder"],DU={class:"sort-container"},xU={value:"group"},kU={value:"name"},IU={value:"enabled"},EU={class:"tool-summary"},NU={class:"summary-text"},TU={key:0,class:"tool-groups"},MU=["onClick"],AU={class:"group-title-area"},RU={class:"group-name"},PU={class:"group-count"},OU={class:"group-enable-all"},FU=["checked","onChange","data-group"],BU={class:"enable-label"},WU={class:"tool-info"},VU={class:"tool-selection-name"},HU={key:0,class:"tool-selection-desc"},zU={class:"tool-actions"},$U=["checked","onChange"],UU={key:1,class:"empty-state"},jU=Ss({__name:"index",props:{modelValue:{type:Boolean},tools:{},selectedToolIds:{}},emits:["update:modelValue","confirm"],setup(o,{emit:e}){const t=o,i=e,n=Xn({get:()=>t.modelValue,set:x=>i("update:modelValue",x)}),s=Ye(""),r=Ye("group"),a=Ye(new Set),l=Ye([]),d=(x,y)=>{const I=document.querySelector(`input[data-group="${x}"]`);I&&(I.indeterminate=_(y))};cr(()=>t.selectedToolIds,x=>{l.value=[...x]},{immediate:!0});const c=Xn(()=>{let x=t.tools.filter(y=>y.key);if(s.value){const y=s.value.toLowerCase();x=x.filter(I=>{var E;return I.name.toLowerCase().includes(y)||I.description.toLowerCase().includes(y)||(((E=I.serviceGroup)==null?void 0:E.toLowerCase().includes(y))??!1)})}switch(r.value){case"name":x=[...x].sort((y,I)=>y.name.localeCompare(I.name));break;case"enabled":x=[...x].sort((y,I)=>{const E=l.value.includes(y.key),R=l.value.includes(I.key);return E&&!R?-1:!E&&R?1:y.name.localeCompare(I.name)});break;case"group":default:x=[...x].sort((y,I)=>{const E=y.serviceGroup??"Ungrouped",R=I.serviceGroup??"Ungrouped";return E!==R?E.localeCompare(R):y.name.localeCompare(I.name)});break}return x}),u=Xn(()=>{const x=new Map;return c.value.forEach(y=>{const I=y.serviceGroup??"Ungrouped";x.has(I)||x.set(I,[]),x.get(I).push(y)}),new Map([...x.entries()].sort())}),h=Xn(()=>c.value.length);cr([l,u],()=>{I9(()=>{for(const[x,y]of u.value)d(x,y)})},{flush:"post",deep:!1});const g=x=>l.value.includes(x),f=(x,y)=>{y.stopPropagation();const E=y.target.checked;if(!x){console.error("toolKey is undefined, cannot proceed");return}E?l.value.includes(x)||(l.value=[...l.value,x]):l.value=l.value.filter(R=>R!==x)},m=x=>x.filter(y=>l.value.includes(y.key)),v=x=>x.length>0&&x.every(y=>l.value.includes(y.key)),_=x=>{const y=m(x).length;return y>0&&y{y.stopPropagation();const E=y.target.checked,R=x.map(j=>j.key);if(E){const j=[...l.value];R.forEach(O=>{j.includes(O)||j.push(O)}),l.value=j}else l.value=l.value.filter(j=>!R.includes(j))},C=x=>{a.value.has(x)?a.value.delete(x):a.value.add(x)},w=()=>{i("confirm",[...l.value]),i("update:modelValue",!1)},S=()=>{l.value=[...t.selectedToolIds],i("update:modelValue",!1)};return cr(n,x=>{if(x){a.value.clear();const y=Array.from(u.value.keys());y.length>1&&y.slice(1).forEach(I=>{a.value.add(I)})}}),(x,y)=>(ne(),In(Wo,{modelValue:n.value,"onUpdate:modelValue":[y[4]||(y[4]=I=>n.value=I),S],title:x.$t("toolSelection.title"),onConfirm:w},{default:Zt(()=>[L("div",wU,[L("div",SU,[L("div",yU,[Vt(L("input",{"onUpdate:modelValue":y[0]||(y[0]=I=>s.value=I),type:"text",class:"search-input",placeholder:x.$t("toolSelection.searchPlaceholder")},null,8,LU),[[ti,s.value]])]),L("div",DU,[Vt(L("select",{"onUpdate:modelValue":y[1]||(y[1]=I=>r.value=I),class:"sort-select"},[L("option",xU,B(x.$t("toolSelection.sortByGroup")),1),L("option",kU,B(x.$t("toolSelection.sortByName")),1),L("option",IU,B(x.$t("toolSelection.sortByStatus")),1)],512),[[X1,r.value]])])]),L("div",EU,[L("span",NU,B(x.$t("toolSelection.summary",{groups:u.value.size,tools:h.value,selected:l.value.length})),1)]),u.value.size>0?(ne(),ue("div",TU,[(ne(!0),ue(Ji,null,ln(u.value,([I,E])=>(ne(),ue("div",{key:I,class:"tool-group"},[L("div",{class:Nn(["tool-group-header",{collapsed:a.value.has(I)}]),onClick:R=>C(I)},[L("div",AU,[xe(P(Re),{icon:a.value.has(I)?"carbon:chevron-right":"carbon:chevron-down",class:"collapse-icon"},null,8,["icon"]),xe(P(Re),{icon:"carbon:folder",class:"group-icon"}),L("span",RU,B(I),1),L("span",PU," ("+B(m(E).length)+"/"+B(E.length)+") ",1)]),L("div",{class:"group-actions",onClick:y[2]||(y[2]=Zh(()=>{},["stop"]))},[L("label",OU,[L("input",{type:"checkbox",class:"group-enable-checkbox",checked:v(E),onChange:R=>b(E,R),"data-group":I},null,40,FU),L("span",BU,B(x.$t("toolSelection.enableAll")),1)])])],10,MU),L("div",{class:Nn(["tool-group-content",{collapsed:a.value.has(I)}])},[(ne(!0),ue(Ji,null,ln(E.filter(R=>R&&R.key),R=>(ne(),ue("div",{key:R.key,class:"tool-selection-item"},[L("div",WU,[L("div",VU,B(R.name),1),R.description?(ne(),ue("div",HU,B(R.description),1)):at("",!0)]),L("div",zU,[L("label",{class:"tool-enable-switch",onClick:y[3]||(y[3]=Zh(()=>{},["stop"]))},[L("input",{type:"checkbox",class:"tool-enable-checkbox",checked:g(R.key),onChange:j=>f(R.key,j)},null,40,$U),y[5]||(y[5]=L("span",{class:"tool-enable-slider"},null,-1))])])]))),128))],2)]))),128))])):(ne(),ue("div",UU,[xe(P(Re),{icon:"carbon:tools",class:"empty-icon"}),L("p",null,B(x.$t("toolSelection.noToolsFound")),1)]))])]),_:1},8,["modelValue","title"]))}}),KU=us(jU,[["__scopeId","data-v-0237b039"]]);class ac{static async handleResponse(e){if(!e.ok)try{const t=await e.json();throw new Error(t.message||`API request failed: ${e.status}`)}catch{throw new Error(`API request failed: ${e.status} ${e.statusText}`)}return e}static async getAllAgents(e){try{if(e){const t=await fetch(`${this.BASE_URL}/namespace/${e}`);return await(await this.handleResponse(t)).json()}else{const t=await fetch(`${this.BASE_URL}`);return await(await this.handleResponse(t)).json()}}catch(t){throw console.error("Failed to get Agent list:",t),t}}static async getAgentById(e){try{const t=await fetch(`${this.BASE_URL}/${e}`);return await(await this.handleResponse(t)).json()}catch(t){throw console.error(`Failed to get Agent[${e}] details:`,t),t}}static async createAgent(e){try{const t=await fetch(this.BASE_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await(await this.handleResponse(t)).json()}catch(t){throw console.error("Failed to create Agent:",t),t}}static async updateAgent(e,t){try{const i=await fetch(`${this.BASE_URL}/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await(await this.handleResponse(i)).json()}catch(i){throw console.error(`Failed to update Agent[${e}]:`,i),i}}static async deleteAgent(e){try{const t=await fetch(`${this.BASE_URL}/${e}`,{method:"DELETE"});if(t.status===400)throw new Error("Cannot delete default Agent");await this.handleResponse(t)}catch(t){throw console.error(`Failed to delete Agent[${e}]:`,t),t}}static async getAvailableTools(){try{const e=await fetch(`${this.BASE_URL}/tools`);return await(await this.handleResponse(e)).json()}catch(e){throw console.error("Failed to get available tools list:",e),e}}}ri(ac,"BASE_URL","/api/agents");class ko{static async handleResponse(e){if(!e.ok)try{const t=await e.json();throw new Error(t.message||`API request failed: ${e.status}`)}catch{throw new Error(`API request failed: ${e.status} ${e.statusText}`)}return e}static async getAllModels(){try{const e=await fetch(this.BASE_URL);return await(await this.handleResponse(e)).json()}catch(e){throw console.error("Failed to get Model list:",e),e}}static async getAllTypes(){try{const e=await fetch(`${this.BASE_URL}/types`);return await(await this.handleResponse(e)).json()}catch(e){throw console.error("Failed to get Model list:",e),e}}static async getModelById(e){try{const t=await fetch(`${this.BASE_URL}/${e}`);return await(await this.handleResponse(t)).json()}catch(t){throw console.error(`Failed to get Model[${e}] details:`,t),t}}static async createModel(e){try{const t=JSON.stringify(e,(s,r)=>(s==="temperature"||s==="topP")&&r===void 0?null:r),i=await fetch(this.BASE_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:t});return await(await this.handleResponse(i)).json()}catch(t){throw console.error("Failed to create Model:",t),t}}static async updateModel(e,t){try{const i=JSON.stringify(t,(r,a)=>(r==="temperature"||r==="topP")&&a===void 0?null:a),n=await fetch(`${this.BASE_URL}/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:i});if(n.status===499)throw new Error("Request rejected, please modify the model configuration in the configuration file");return await(await this.handleResponse(n)).json()}catch(i){throw console.error(`Failed to update Model[${e}]:`,i),i}}static async deleteModel(e){try{const t=await fetch(`${this.BASE_URL}/${e}`,{method:"DELETE"});if(t.status===400)throw new Error("Cannot delete default Model");if(t.status===499)throw new Error("Request rejected, please modify the model configuration in the configuration file");await this.handleResponse(t)}catch(t){throw console.error(`Failed to delete Model[${e}]:`,t),t}}static async validateConfig(e){try{const t=await fetch(`${this.BASE_URL}/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await(await this.handleResponse(t)).json()}catch(t){throw console.error("Failed to validate model configuration:",t),t}}static async setDefaultModel(e){try{const t=await fetch(`${this.BASE_URL}/${e}/set-default`,{method:"POST",headers:{"Content-Type":"application/json"}});return await(await this.handleResponse(t)).json()}catch(t){throw console.error(`Failed to set model[${e}] as default:`,t),t}}}ri(ko,"BASE_URL","/api/models");const sy=Ez("namespace",()=>{const o=Ye("default");function e(n){o.value=n}const t=Ye([]);function i(n){t.value=n}return{namespace:o,namespaces:t,setCurrentNs:e,setNamespaces:i}}),q2=async o=>{if(!o.ok){const e=await o.json().catch(()=>({message:"Network error"}));throw new Error(e.message||`HTTP error! status: ${o.status}`)}return o.json()},qU=async()=>{const o=await fetch("/api/agent-management/languages");return q2(o)},GU=async o=>{const e=await fetch("/api/agent-management/reset",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});return q2(e)},ZU=async()=>{const o=await fetch("/api/agent-management/stats");return q2(o)},YU=["disabled"],XU={class:"agent-layout"},QU={class:"agent-list"},JU={class:"list-header"},ej={class:"agent-count"},tj={key:0,class:"agents-container"},ij=["onClick"],nj={class:"agent-card-header"},sj={class:"agent-name"},oj={class:"agent-desc"},rj={key:0,class:"agent-model"},aj={class:"model-tag"},lj={class:"model-tag"},dj={key:1,class:"agent-tools"},cj={key:0,class:"tool-more"},uj={key:1,class:"loading-state"},hj={key:2,class:"empty-state"},gj={key:0,class:"agent-detail"},fj={class:"detail-header"},pj={class:"detail-actions"},mj={class:"form-item"},_j=["placeholder"],vj={class:"form-item"},bj=["placeholder"],Cj={class:"form-item"},wj=["value","placeholder"],Sj={class:"model-section"},yj={class:"form-item"},Lj={class:"model-chooser"},Dj=["title"],xj={key:0,class:"current-model"},kj={class:"model-type"},Ij={class:"model-name"},Ej={key:1,class:"current-model"},Nj={class:"current-model"},Tj={class:"dropdown-header"},Mj={class:"model-options"},Aj=["onClick"],Rj={class:"model-type"},Pj={class:"model-name"},Oj={class:"tools-section"},Fj={class:"assigned-tools"},Bj={class:"section-header"},Wj={class:"tools-grid"},Vj={class:"tool-info"},Hj={class:"tool-name"},zj={class:"tool-desc"},$j={key:0,class:"no-tools"},Uj={key:1,class:"no-selection"},jj={class:"modal-form"},Kj={class:"form-item"},qj=["placeholder"],Gj={class:"form-item"},Zj=["placeholder"],Yj={class:"form-item"},Xj=["value","placeholder"],Qj={class:"delete-confirm"},Jj={class:"warning-text"},eK={class:"multi-language-content"},tK={class:"stats-section"},iK={class:"stat-item"},nK={class:"stat-label"},sK={class:"stat-value"},oK={class:"stat-item"},rK={class:"stat-label"},aK={class:"stat-value"},lK={class:"language-selection"},dK={class:"selection-label"},cK={value:""},uK=["value"],hK={class:"warning-section"},gK={class:"warning-box"},fK={class:"warning-text"},pK=Ss({__name:"agentConfig",setup(o){const{t:e}=Pa(),t=sy(),{namespace:i}=K2(t),n=Ye(!1),s=Ye(""),r=Ye(""),a=ar([]),l=Ye(null),d=ar([]),c=Ye(!1),u=Ye(!1),h=Ye(!1),g=Ye(!1),f=Ye(null),m=ar([]),v=Ye(!1),_=Ye([]),b=Ye(""),C=Ye(!1),w=Ye({total:0,namespace:"",supportedLanguages:[]}),S=()=>{g.value=!g.value},x=Ce=>{f.value=Ce,g.value=!1},y=ar({name:"",description:"",nextStepPrompt:""}),I=Ce=>{const re=d.find(ke=>ke.key===Ce);return re?re.name:Ce},E=Ce=>{const re=d.find(ke=>ke.key===Ce);return re?re.description:""},R=(Ce,re)=>{re==="success"?(r.value=Ce,setTimeout(()=>{r.value=""},3e3)):(s.value=Ce,setTimeout(()=>{s.value=""},5e3))},j=async()=>{n.value=!0;try{const[Ce,re,ke]=await Promise.all([ac.getAllAgents(i.value),ac.getAvailableTools(),ko.getAllModels()]),ce=Ce.map(Ie=>({...Ie,availableTools:Ie.availableTools,...ke}));a.splice(0,a.length,...ce),d.splice(0,d.length,...re),m.splice(0,m.length,...ke),ce.length>0&&await O(ce[0])}catch(Ce){console.error("Failed to load data:",Ce),R(e("config.agentConfig.loadDataFailed")+": "+Ce.message,"error");const re=[{key:"search-web",name:"Web Search",description:"Search for information on the internet",enabled:!0,serviceGroup:"Search Services"},{key:"search-local",name:"Local Search",description:"Search content in local files",enabled:!0,serviceGroup:"Search Services"},{key:"file-read",name:"Read File",description:"Read local or remote file content",enabled:!0,serviceGroup:"File Services"},{key:"file-write",name:"Write File",description:"Create or modify file content",enabled:!0,serviceGroup:"File Services"},{key:"file-delete",name:"Delete File",description:"Delete specified file",enabled:!1,serviceGroup:"File Services"},{key:"calculator",name:"Calculator",description:"Perform mathematical calculations",enabled:!0,serviceGroup:"Computing Services"},{key:"code-execute",name:"Code Execution",description:"Execute Python or JavaScript code",enabled:!0,serviceGroup:"Computing Services"},{key:"weather",name:"Weather Query",description:"Get weather information for specified regions",enabled:!0,serviceGroup:"Information Services"},{key:"currency",name:"Exchange Rate Query",description:"Query currency exchange rate information",enabled:!0,serviceGroup:"Information Services"},{key:"email",name:"Send Email",description:"Send electronic mail",enabled:!1,serviceGroup:"Communication Services"},{key:"sms",name:"Send SMS",description:"Send SMS messages",enabled:!1,serviceGroup:"Communication Services"}],ke=[{id:"demo-1",name:"General Assistant",description:"An intelligent assistant capable of handling various tasks",nextStepPrompt:"You are a helpful assistant that can answer questions and help with various tasks. What would you like me to help you with next?",availableTools:["search-web","calculator","weather"]},{id:"demo-2",name:"Data Analyst",description:"Agent specialized in data analysis and visualization",nextStepPrompt:"You are a data analyst assistant specialized in analyzing data and creating visualizations. Please provide the data you would like me to analyze.",availableTools:["file-read","file-write","calculator","code-execute"]}];d.splice(0,d.length,...re),a.splice(0,a.length,...ke),ke.length>0&&(l.value=ke[0])}finally{n.value=!1}},O=async Ce=>{try{const re=await ac.getAgentById(Ce.id);l.value={...re,availableTools:re.availableTools},f.value=re.model??null}catch(re){console.error("Failed to load Agent details:",re),R(e("config.agentConfig.loadDetailsFailed")+": "+re.message,"error"),l.value={...Ce,availableTools:Ce.availableTools}}},$=()=>{y.name="",y.description="",y.nextStepPrompt="",c.value=!0},K=async()=>{var Ce;if(!y.name.trim()||!y.description.trim()){R(e("config.agentConfig.requiredFields"),"error");return}try{const re={name:y.name.trim(),description:y.description.trim(),nextStepPrompt:((Ce=y.nextStepPrompt)==null?void 0:Ce.trim())??"",availableTools:[],namespace:i.value},ke=await ac.createAgent(re);a.push(ke),l.value=ke,c.value=!1,R(e("config.agentConfig.createSuccess"),"success")}catch(re){R(e("config.agentConfig.createFailed")+": "+re.message,"error")}},oe=()=>{h.value=!0},Le=Ce=>{l.value&&(l.value.availableTools=[...Ce])},he=async()=>{if(l.value){if(!l.value.name.trim()||!l.value.description.trim()){R(e("config.agentConfig.requiredFields"),"error");return}try{l.value.model=f.value;const Ce=await ac.updateAgent(l.value.id,l.value),re=a.findIndex(ke=>ke.id===Ce.id);re!==-1&&(a[re]=Ce),l.value=Ce,l.value.model=f.value,R(e("config.agentConfig.saveSuccess"),"success")}catch(Ce){R(e("config.agentConfig.saveFailed")+": "+Ce.message,"error")}}},se=()=>{u.value=!0},V=async()=>{if(l.value)try{await ac.deleteAgent(l.value.id);const Ce=a.findIndex(re=>re.id===l.value.id);Ce!==-1&&a.splice(Ce,1),l.value=a.length>0?a[0]:null,u.value=!1,R(e("config.agentConfig.deleteSuccess"),"success")}catch(Ce){R(e("config.agentConfig.deleteFailed")+": "+Ce.message,"error")}},Q=()=>{const Ce=document.createElement("input");Ce.type="file",Ce.accept=".json",Ce.onchange=re=>{var ce;const ke=(ce=re.target.files)==null?void 0:ce[0];if(ke){const Ie=new FileReader;Ie.onload=async mt=>{var Ct;try{const Mt=JSON.parse((Ct=mt.target)==null?void 0:Ct.result);if(!Mt.name||!Mt.description)throw new Error(e("config.agentConfig.invalidFormat"));const{id:ci,...yn}=Mt,Qs=await ac.createAgent(yn);a.push(Qs),l.value=Qs,R(e("config.agentConfig.importSuccess"),"success")}catch(Mt){R(e("config.agentConfig.importFailed")+": "+Mt.message,"error")}},Ie.readAsText(ke)}},Ce.click()},H=()=>{if(l.value)try{const Ce=JSON.stringify(l.value,null,2),re=new Blob([Ce],{type:"application/json"}),ke=URL.createObjectURL(re),ce=document.createElement("a");ce.href=ke,ce.download=`agent-${l.value.name}-${new Date().toISOString().split("T")[0]}.json`,ce.click(),URL.revokeObjectURL(ke),R(e("config.agentConfig.exportSuccess"),"success")}catch(Ce){R(e("config.agentConfig.exportFailed")+": "+Ce.message,"error")}},G=Ce=>({zh:e("language.zh"),en:"English"})[Ce]||Ce,Z=async()=>{try{const Ce=await qU();_.value=Ce.languages,!b.value&&Ce.default&&(b.value=Ce.default)}catch(Ce){console.error("Failed to load supported languages:",Ce),R(e("common.loadFailed"),"error")}},$e=async()=>{try{const Ce=await ZU();w.value=Ce}catch(Ce){console.error("Failed to load agent stats:",Ce)}},ft=async()=>{await Promise.all([Z(),$e()]),v.value=!0},Bt=async()=>{if(!b.value){R(e("agent.multiLanguage.selectLanguage"),"error");return}C.value=!0;try{await GU({language:b.value}),R(e("agent.multiLanguage.resetSuccess"),"success"),v.value=!1,await Promise.all([j(),$e()])}catch(Ce){console.error("Failed to reset agents:",Ce),R(Ce.message||e("agent.multiLanguage.resetFailed"),"error")}finally{C.value=!1}};return Kd(()=>{j()}),cr(()=>i.value,(Ce,re)=>{Ce!==re&&(a.splice(0),l.value=null,j())}),(Ce,re)=>(ne(),In(Gb,null,{title:Zt(()=>[L("h2",null,B(P(e)("config.agentConfig.title")),1)]),actions:Zt(()=>[L("button",{class:"action-btn",onClick:ft},[xe(P(Re),{icon:"carbon:language"}),Pe(" "+B(P(e)("agent.multiLanguage.title")),1)]),L("button",{class:"action-btn",onClick:Q},[xe(P(Re),{icon:"carbon:upload"}),Pe(" "+B(P(e)("config.agentConfig.import")),1)]),L("button",{class:"action-btn",onClick:H,disabled:!l.value},[xe(P(Re),{icon:"carbon:download"}),Pe(" "+B(P(e)("config.agentConfig.export")),1)],8,YU)]),default:Zt(()=>{var ke;return[L("div",XU,[L("div",QU,[L("div",JU,[L("h3",null,B(P(e)("config.agentConfig.configuredAgents")),1),L("span",ej,"("+B(a.length)+B(P(e)("config.agentConfig.agentCount"))+")",1)]),n.value?at("",!0):(ne(),ue("div",tj,[(ne(!0),ue(Ji,null,ln(a,ce=>{var Ie,mt;return ne(),ue("div",{key:ce.id,class:Nn(["agent-card",{active:((Ie=l.value)==null?void 0:Ie.id)===ce.id}]),onClick:Ct=>O(ce)},[L("div",nj,[L("span",sj,B(ce.name),1),xe(P(Re),{icon:"carbon:chevron-right"})]),L("p",oj,B(ce.description),1),ce.model?(ne(),ue("div",rj,[L("span",aj,B(ce.model.type),1),L("span",lj,B(ce.model.modelName),1)])):at("",!0),((mt=ce.availableTools)==null?void 0:mt.length)>0?(ne(),ue("div",dj,[(ne(!0),ue(Ji,null,ln(ce.availableTools.slice(0,3),Ct=>(ne(),ue("span",{key:Ct,class:"tool-tag"},B(I(Ct)),1))),128)),ce.availableTools.length>3?(ne(),ue("span",cj," +"+B(ce.availableTools.length-3),1)):at("",!0)])):at("",!0)],10,ij)}),128))])),n.value?(ne(),ue("div",uj,[xe(P(Re),{icon:"carbon:loading",class:"loading-icon"}),Pe(" "+B(P(e)("common.loading")),1)])):at("",!0),!n.value&&a.length===0?(ne(),ue("div",hj,[xe(P(Re),{icon:"carbon:bot",class:"empty-icon"}),L("p",null,B(P(e)("config.agentConfig.noAgent")),1)])):at("",!0),L("button",{class:"add-btn",onClick:$},[xe(P(Re),{icon:"carbon:add"}),Pe(" "+B(P(e)("config.agentConfig.createNew")),1)])]),l.value?(ne(),ue("div",gj,[L("div",fj,[L("h3",null,B(l.value.name),1),L("div",pj,[L("button",{class:"action-btn primary",onClick:he},[xe(P(Re),{icon:"carbon:save"}),Pe(" "+B(P(e)("common.save")),1)]),L("button",{class:"action-btn danger",onClick:se},[xe(P(Re),{icon:"carbon:trash-can"}),Pe(" "+B(P(e)("common.delete")),1)])])]),L("div",mj,[L("label",null,[Pe(B(P(e)("config.agentConfig.agentName"))+" ",1),re[17]||(re[17]=L("span",{class:"required"},"*",-1))]),Vt(L("input",{type:"text","onUpdate:modelValue":re[0]||(re[0]=ce=>l.value.name=ce),placeholder:P(e)("config.agentConfig.agentNamePlaceholder"),required:""},null,8,_j),[[ti,l.value.name]])]),L("div",vj,[L("label",null,[Pe(B(P(e)("config.agentConfig.description"))+" ",1),re[18]||(re[18]=L("span",{class:"required"},"*",-1))]),Vt(L("textarea",{"onUpdate:modelValue":re[1]||(re[1]=ce=>l.value.description=ce),rows:"3",placeholder:P(e)("config.agentConfig.descriptionPlaceholder"),required:""},null,8,bj),[[ti,l.value.description]])]),L("div",Cj,[L("label",null,B(P(e)("config.agentConfig.nextStepPrompt")),1),L("textarea",{value:l.value.nextStepPrompt||"",onInput:re[2]||(re[2]=ce=>l.value.nextStepPrompt=ce.target.value),rows:"8",placeholder:P(e)("config.agentConfig.nextStepPromptPlaceholder")},null,40,wj)]),L("div",Sj,[L("h4",null,B(P(e)("config.agentConfig.modelConfiguration")),1),L("div",yj,[L("div",Lj,[L("button",{class:"model-btn",onClick:S,title:Ce.$t("model.switch")},[xe(P(Re),{icon:"carbon:build-run",width:"18"}),f.value?(ne(),ue("span",xj,[L("span",kj,B(f.value.type),1),re[19]||(re[19]=L("span",{class:"spacer"},null,-1)),L("span",Ij,B(f.value.modelName),1)])):(ne(),ue("span",Ej,[L("span",Nj,B(P(e)("config.agentConfig.modelConfigurationLabel")),1)])),xe(P(Re),{icon:g.value?"carbon:chevron-up":"carbon:chevron-down",width:"14",class:"chevron"},null,8,["icon"])],8,Dj),g.value?(ne(),ue("div",{key:0,class:"model-dropdown",onClick:re[4]||(re[4]=Zh(()=>{},["stop"]))},[L("div",Tj,[L("span",null,B(P(e)("config.agentConfig.modelConfigurationLabel")),1),L("button",{class:"close-btn",onClick:re[3]||(re[3]=ce=>g.value=!1)},[xe(P(Re),{icon:"carbon:close",width:"16"})])]),L("div",Mj,[(ne(!0),ue(Ji,null,ln(m,ce=>{var Ie,mt;return ne(),ue("button",{key:ce.id,class:Nn(["model-option",{active:((Ie=f.value)==null?void 0:Ie.id)===ce.id}]),onClick:Ct=>x(ce)},[L("span",Rj,B(ce.type),1),L("span",Pj,B(ce.modelName),1),((mt=f.value)==null?void 0:mt.id)===ce.id?(ne(),In(P(Re),{key:0,icon:"carbon:checkmark",width:"16",class:"check-icon"})):at("",!0)],10,Aj)}),128))])])):at("",!0),g.value?(ne(),ue("div",{key:1,class:"backdrop",onClick:re[5]||(re[5]=ce=>g.value=!1)})):at("",!0)])])]),L("div",Oj,[L("h4",null,B(P(e)("config.agentConfig.toolConfiguration")),1),L("div",Fj,[L("div",Bj,[L("span",null,B(P(e)("config.agentConfig.assignedTools"))+" ("+B((l.value.availableTools||[]).length)+")",1),d.length>0?(ne(),ue("button",{key:0,class:"action-btn small",onClick:oe},[xe(P(Re),{icon:"carbon:add"}),Pe(" "+B(P(e)("config.agentConfig.addRemoveTools")),1)])):at("",!0)]),L("div",Wj,[(ne(!0),ue(Ji,null,ln(l.value.availableTools||[],ce=>(ne(),ue("div",{key:ce,class:"tool-item assigned"},[L("div",Vj,[L("span",Hj,B(I(ce)),1),L("span",zj,B(E(ce)),1)])]))),128)),l.value.availableTools.length===0?(ne(),ue("div",$j,[xe(P(Re),{icon:"carbon:tool-box"}),L("span",null,B(P(e)("config.agentConfig.noAssignedTools")),1)])):at("",!0)])])])])):(ne(),ue("div",Uj,[xe(P(Re),{icon:"carbon:bot",class:"placeholder-icon"}),L("p",null,B(P(e)("config.agentConfig.selectAgentHint")),1)]))]),xe(Wo,{modelValue:c.value,"onUpdate:modelValue":re[9]||(re[9]=ce=>c.value=ce),title:P(e)("config.agentConfig.newAgent"),onConfirm:K},{default:Zt(()=>[L("div",jj,[L("div",Kj,[L("label",null,[Pe(B(P(e)("config.agentConfig.agentName"))+" ",1),re[20]||(re[20]=L("span",{class:"required"},"*",-1))]),Vt(L("input",{type:"text","onUpdate:modelValue":re[6]||(re[6]=ce=>y.name=ce),placeholder:P(e)("config.agentConfig.agentNamePlaceholder"),required:""},null,8,qj),[[ti,y.name]])]),L("div",Gj,[L("label",null,[Pe(B(P(e)("config.agentConfig.description"))+" ",1),re[21]||(re[21]=L("span",{class:"required"},"*",-1))]),Vt(L("textarea",{"onUpdate:modelValue":re[7]||(re[7]=ce=>y.description=ce),rows:"3",placeholder:P(e)("config.agentConfig.descriptionPlaceholder"),required:""},null,8,Zj),[[ti,y.description]])]),L("div",Yj,[L("label",null,B(P(e)("config.agentConfig.nextStepPrompt")),1),L("textarea",{value:y.nextStepPrompt||"",onInput:re[8]||(re[8]=ce=>y.nextStepPrompt=ce.target.value),rows:"8",placeholder:P(e)("config.agentConfig.nextStepPromptPlaceholder")},null,40,Xj)])])]),_:1},8,["modelValue","title"]),xe(KU,{modelValue:h.value,"onUpdate:modelValue":re[10]||(re[10]=ce=>h.value=ce),tools:d,"selected-tool-ids":((ke=l.value)==null?void 0:ke.availableTools)||[],onConfirm:Le},null,8,["modelValue","tools","selected-tool-ids"]),xe(Wo,{modelValue:u.value,"onUpdate:modelValue":re[12]||(re[12]=ce=>u.value=ce),title:P(e)("config.agentConfig.deleteConfirm")},{footer:Zt(()=>[L("button",{class:"cancel-btn",onClick:re[11]||(re[11]=ce=>u.value=!1)},B(P(e)("common.cancel")),1),L("button",{class:"confirm-btn danger",onClick:V},B(P(e)("common.delete")),1)]),default:Zt(()=>{var ce;return[L("div",Qj,[xe(P(Re),{icon:"carbon:warning",class:"warning-icon"}),L("p",null,[Pe(B(P(e)("config.agentConfig.deleteConfirmText"))+" ",1),L("strong",null,B((ce=l.value)==null?void 0:ce.name),1),Pe(" "+B(P(e)("common.confirm"))+"? ",1)]),L("p",Jj,B(P(e)("config.agentConfig.deleteWarning")),1)])]}),_:1},8,["modelValue","title"]),s.value?(ne(),ue("div",{key:0,class:"error-toast",onClick:re[13]||(re[13]=ce=>s.value="")},[xe(P(Re),{icon:"carbon:error"}),Pe(" "+B(s.value),1)])):at("",!0),r.value?(ne(),ue("div",{key:1,class:"success-toast",onClick:re[14]||(re[14]=ce=>r.value="")},[xe(P(Re),{icon:"carbon:checkmark"}),Pe(" "+B(r.value),1)])):at("",!0),xe(Wo,{modelValue:v.value,"onUpdate:modelValue":re[16]||(re[16]=ce=>v.value=ce),title:P(e)("agent.multiLanguage.title"),onConfirm:Bt},{title:Zt(()=>[Pe(B(P(e)("agent.multiLanguage.title")),1)]),default:Zt(()=>[L("div",eK,[L("div",tK,[L("div",iK,[L("span",nK,B(P(e)("agent.multiLanguage.currentLanguage"))+":",1),L("span",sK,B(G(Ce.$i18n.locale)),1)]),L("div",oK,[L("span",rK,B(P(e)("common.total"))+":",1),L("span",aK,B(w.value.total),1)])]),L("div",lK,[L("label",dK,B(P(e)("agent.multiLanguage.selectLanguage"))+":",1),Vt(L("select",{"onUpdate:modelValue":re[15]||(re[15]=ce=>b.value=ce),class:"language-select"},[L("option",cK,B(P(e)("agent.multiLanguage.selectLanguage")),1),(ne(!0),ue(Ji,null,ln(_.value,ce=>(ne(),ue("option",{key:ce,value:ce},B(G(ce)),9,uK))),128))],512),[[X1,b.value]])]),L("div",hK,[L("div",gK,[xe(P(Re),{icon:"carbon:warning",class:"warning-icon"}),L("div",fK,[L("p",null,B(P(e)("agent.multiLanguage.resetAllWarning")),1)])])])])]),_:1},8,["modelValue","title"])]}),_:1}))}}),mK=us(pK,[["__scopeId","data-v-c305016e"]]),_K={class:"custom-select"},vK=["title"],bK={key:0,class:"current-option"},CK={class:"option-name"},wK={key:1,class:"current-option"},SK={class:"dropdown-header"},yK={class:"select-options"},LK=["onClick"],DK={class:"option-name"},xK=Ss({__name:"index",props:{modelValue:{},options:{},placeholder:{},dropdownTitle:{},icon:{},direction:{},dropStyles:{},onChange:{type:Function}},emits:["update:modelValue"],setup(o,{emit:e}){const t=o,i=e,n=Ye(!1),s=Ye("bottom"),r=Xn(()=>t.options.find(u=>u.id===t.modelValue)),a=u=>u.id===t.modelValue,l=()=>{n.value||d(),n.value=!n.value},d=()=>{const u=document.querySelector(".custom-select");if(!u)return;const h=u.getBoundingClientRect(),g=window.innerHeight;h.bottom+200>g?s.value="top":s.value="bottom"},c=u=>{t.onChange?t.onChange(u.id,u):i("update:modelValue",u.id),n.value=!1};return(u,h)=>(ne(),ue("div",_K,[L("button",{class:"select-btn",onClick:l,title:u.placeholder},[xe(P(Re),{icon:t.icon||"carbon:select-01",width:"18"},null,8,["icon"]),r.value?(ne(),ue("span",bK,[r.value.icon?(ne(),In(P(Re),{key:0,icon:r.value.icon,width:"16",class:"option-icon"},null,8,["icon"])):at("",!0),L("span",CK,B(r.value.name),1)])):(ne(),ue("span",wK,B(u.placeholder),1)),xe(P(Re),{icon:n.value?"carbon:chevron-up":"carbon:chevron-down",width:"14",class:"chevron"},null,8,["icon"])],8,vK),xe(qb,{name:"slideDown"},{default:Zt(()=>[Vt(L("div",{class:Nn(["select-dropdown",{"dropdown-top":s.value==="top"}]),style:Nz({...u.dropStyles,...t.direction==="right"?{right:0}:{left:0}}),onClick:h[1]||(h[1]=Zh(()=>{},["stop"]))},[L("div",SK,[L("span",null,B(u.dropdownTitle),1),L("button",{class:"close-btn",onClick:h[0]||(h[0]=g=>n.value=!1)},[xe(P(Re),{icon:"carbon:close",width:"16"})])]),L("div",yK,[(ne(!0),ue(Ji,null,ln(u.options,g=>(ne(),ue("button",{key:g.id,class:Nn(["select-option",{active:a(g)}]),onClick:f=>c(g)},[g.icon?(ne(),In(P(Re),{key:0,icon:g.icon,width:"16",class:"option-icon"},null,8,["icon"])):at("",!0),L("span",DK,B(g.name),1),a(g)?(ne(),In(P(Re),{key:1,icon:"carbon:checkmark",width:"16",class:"check-icon"})):at("",!0)],10,LK))),128))])],6),[[ny,n.value]])]),_:1}),n.value?(ne(),ue("div",{key:0,class:"backdrop",onClick:h[2]||(h[2]=g=>n.value=!1)})):at("",!0)]))}}),Q1=us(xK,[["__scopeId","data-v-579d8359"]]),kK={class:"grouped-select"},IK=["title"],EK={key:0,class:"selected-text"},NK={class:"model-category"},TK={key:1,class:"placeholder-text"},MK={key:1,class:"dropdown-content"},AK={class:"dropdown-header"},RK={class:"search-container"},PK=["placeholder"],OK={class:"groups-container"},FK={class:"group-header"},BK={class:"group-title"},WK={class:"group-count"},VK={class:"models-grid"},HK=["onClick","title"],zK={class:"model-info"},$K={class:"model-name"},UK={class:"model-description"},jK={class:"model-category-tag"},KK=Ss({__name:"GroupedSelect",props:{modelValue:{},options:{},placeholder:{default:"Please select a model"},dropdownTitle:{default:"Available Models"}},emits:["update:modelValue"],setup(o,{emit:e}){const t=o,i=e,{t:n}=Pa(),s=Ye(!1),r=Ye(""),a=Xn(()=>{const f={};return t.options.forEach(v=>{f[v.category]||(f[v.category]=[]),f[v.category].push(v)}),["Turbo","Plus","Max","Coder","Math","Vision","TTS","Standard"].filter(v=>f[v]).map(v=>({category:v,models:f[v].sort((_,b)=>_.name.localeCompare(b.name))}))}),l=Xn(()=>r.value?a.value.map(f=>({...f,models:f.models.filter(m=>m.name.toLowerCase().includes(r.value.toLowerCase())||m.description.toLowerCase().includes(r.value.toLowerCase())||m.category.toLowerCase().includes(r.value.toLowerCase()))})).filter(f=>f.models.length>0):a.value),d=Xn(()=>t.options.find(f=>f.id===t.modelValue)),c=()=>{s.value=!s.value,s.value&&(r.value="")},u=()=>{s.value=!1,r.value=""},h=f=>{i("update:modelValue",f.id),u()},g=f=>{f.target.closest(".grouped-select")||u()};return Kd(()=>{document.addEventListener("click",g)}),E9(()=>{document.removeEventListener("click",g)}),(f,m)=>(ne(),ue("div",kK,[L("button",{class:"select-btn",onClick:c,title:f.placeholder||""},[d.value?(ne(),ue("span",EK,[Pe(B(d.value.name)+" ",1),L("span",NK,"["+B(d.value.category)+"]",1)])):(ne(),ue("span",TK,B(f.placeholder),1)),xe(P(Re),{icon:"carbon:chevron-down",class:Nn(["chevron",{rotated:s.value}])},null,8,["class"])],8,IK),s.value?(ne(),ue("div",{key:0,class:"dropdown-overlay",onClick:u})):at("",!0),s.value?(ne(),ue("div",MK,[L("div",AK,[L("h3",null,B(f.dropdownTitle),1),L("button",{class:"close-btn",onClick:u},[xe(P(Re),{icon:"carbon:close"})])]),L("div",RK,[Vt(L("input",{"onUpdate:modelValue":m[0]||(m[0]=v=>r.value=v),type:"text",placeholder:P(n)("config.modelConfig.searchModels"),class:"search-input"},null,8,PK),[[ti,r.value]]),xe(P(Re),{icon:"carbon:search",class:"search-icon"})]),L("div",OK,[(ne(!0),ue(Ji,null,ln(l.value,v=>(ne(),ue("div",{key:v.category,class:"model-group"},[L("div",FK,[L("span",BK,B(v.category),1),L("span",WK,"("+B(v.models.length)+")",1)]),L("div",VK,[(ne(!0),ue(Ji,null,ln(v.models,_=>(ne(),ue("button",{key:_.id,class:Nn(["model-option",{selected:_.id===f.modelValue}]),onClick:b=>h(_),title:_.description},[L("div",zK,[L("div",$K,B(_.name),1),L("div",UK,B(_.description),1)]),L("div",jK,"["+B(_.category)+"]",1)],10,HK))),128))])]))),128))])])):at("",!0)]))}}),kP=us(KK,[["__scopeId","data-v-08a99d28"]]),qK=["disabled"],GK={class:"model-layout"},ZK={class:"model-list"},YK={class:"list-header"},XK={class:"model-count"},QK={key:0,class:"models-container"},JK=["onClick"],eq={class:"model-card-header"},tq={class:"model-name"},iq={class:"model-status"},nq={key:0,class:"default-badge"},sq={class:"model-desc"},oq={key:0,class:"model-type"},rq={class:"model-tag"},aq={key:1,class:"loading-state"},lq={key:2,class:"empty-state"},dq={key:0,class:"model-detail"},cq={class:"detail-header"},uq={class:"detail-actions"},hq=["disabled"],gq={key:1,class:"current-default"},fq={class:"form-item"},pq={class:"form-item"},mq=["placeholder"],_q={class:"form-item"},vq=["placeholder"],bq={class:"form-item"},Cq={class:"api-key-container"},wq=["placeholder"],Sq=["disabled","title"],yq={class:"form-item"},Lq={key:1,class:"readonly-field"},Dq={class:"form-item"},xq=["placeholder"],kq={class:"form-item"},Iq=["placeholder"],Eq={class:"form-item"},Nq=["placeholder"],Tq={key:1,class:"no-selection"},Mq={class:"modal-form"},Aq={class:"form-item"},Rq={class:"form-item"},Pq=["placeholder"],Oq={class:"form-item"},Fq=["placeholder"],Bq={class:"form-item"},Wq={class:"api-key-container"},Vq=["placeholder"],Hq=["disabled","title"],zq={class:"form-item"},$q={key:1,class:"readonly-field"},Uq={class:"form-item"},jq=["placeholder"],Kq={class:"form-item"},qq=["placeholder"],Gq={class:"form-item"},Zq=["placeholder"],Yq={class:"delete-confirm"},Xq={class:"warning-text"},Qq=Ss({__name:"modelConfig",setup(o){const{t:e}=Pa(),t=Ye(!1),i=Ye(""),n=Ye(""),s=ar([]),r=ar([]),a=Ye(null),l=Ye(!1),d=Ye(!1),c=Ye(!1),u=Ye(!1),h=Ye(new Map),g=Ye(!1),f=Ye([]),m=Xn({get(){var Q;return(Q=a.value)!=null&&Q.headers?JSON.stringify(a.value.headers,null,2):""},set(Q){a.value&&(a.value.headers=Q.trim()?JSON.parse(Q):null)}}),v=Xn({get(){return _.headers?JSON.stringify(_.headers,null,2):""},set(Q){_.headers=Q.trim()?JSON.parse(Q):null}}),_=ar({baseUrl:"",headers:null,apiKey:"",modelName:"",modelDescription:"",type:""}),b=(Q,H)=>{H==="success"?(n.value=Q,setTimeout(()=>{n.value=""},3e3)):H==="error"?(i.value=Q,setTimeout(()=>{i.value=""},5e3)):H==="info"&&(n.value=Q,setTimeout(()=>{n.value=""},2e3))},C=async()=>{t.value=!0;try{const[Q,H]=await Promise.all([ko.getAllModels(),ko.getAllTypes()]),G=Q.map(Z=>({...Z}));s.splice(0,s.length,...G),r.splice(0,r.length,...H),G.length>0&&await w(G[0])}catch(Q){console.error("Failed to load data:",Q),b(e("config.modelConfig.loadDataFailed")+": "+Q.message,"error")}finally{t.value=!1}},w=async Q=>{try{const H=await ko.getModelById(Q.id);a.value={...H},c.value=!1}catch(H){console.error("Failed to load Model details:",H),b(e("config.modelConfig.loadDetailsFailed")+": "+H.message,"error"),a.value={...Q}}},S=()=>{_.baseUrl="",_.headers=null,_.apiKey="",_.modelName="",_.modelDescription="",_.type="",delete _.temperature,delete _.topP,g.value=!1,f.value=[],l.value=!0},x=async()=>{var Q,H,G,Z;if(!((Q=a.value)!=null&&Q.baseUrl)||!((H=a.value)!=null&&H.apiKey)){b(e("config.modelConfig.pleaseEnterBaseUrlAndApiKey"),"error");return}c.value=!0;try{const $e=await ko.validateConfig({baseUrl:a.value.baseUrl,apiKey:a.value.apiKey});$e.valid?(b(e("config.modelConfig.validationSuccess")+` - ${e("config.modelConfig.getModelsCount",{count:((G=$e.availableModels)==null?void 0:G.length)||0})}`,"success"),(Z=a.value)!=null&&Z.id&&h.value.set(a.value.id,$e.availableModels||[]),$e.availableModels&&$e.availableModels.length>0&&(a.value.modelName=$e.availableModels[0].modelName,a.value.modelDescription=I($e.availableModels[0].modelName))):b(e("config.modelConfig.validationFailed")+": "+$e.message,"error")}catch($e){b(e("config.modelConfig.validationFailed")+": "+$e.message,"error")}finally{c.value=!1}},y=Q=>{const H=Q.toLowerCase();return H.includes("turbo")?"Turbo":H.includes("plus")?"Plus":H.includes("max")?"Max":H.includes("coder")||H.includes("code")?"Coder":H.includes("math")?"Math":H.includes("vision")||H.includes("vl")?"Vision":H.includes("tts")?"TTS":"Standard"},I=Q=>{const H=Q.toLowerCase();return H.includes("turbo")?"Turbo model, fast response":H.includes("plus")?"Plus model, balanced performance":H.includes("max")?"Max model, strongest performance":H.includes("coder")||H.includes("code")?"Coder model, specialized for code generation":H.includes("math")?"Math model, specialized for mathematical calculations":H.includes("vision")||H.includes("vl")?"Vision model, specialized for visual understanding":H.includes("tts")?"TTS model, specialized for text-to-speech":"Standard model"},E=()=>{var Q;return(Q=a.value)!=null&&Q.id?h.value.get(a.value.id)||[]:[]},R=Q=>{a.value&&Q&&E().find(Z=>Z.modelName===Q)&&(a.value.modelDescription=I(Q))},j=async()=>{var Q;if(!_.baseUrl||!_.apiKey){b(e("config.modelConfig.pleaseEnterBaseUrlAndApiKey"),"error");return}g.value=!0;try{const H=await ko.validateConfig({baseUrl:_.baseUrl,apiKey:_.apiKey});H.valid?(b(e("config.modelConfig.validationSuccess")+` - ${e("config.modelConfig.getModelsCount",{count:((Q=H.availableModels)==null?void 0:Q.length)||0})}`,"success"),f.value=H.availableModels||[],H.availableModels&&H.availableModels.length>0&&(_.modelName=H.availableModels[0].modelName,_.modelDescription=I(H.availableModels[0].modelName))):b(e("config.modelConfig.validationFailed")+": "+H.message,"error")}catch(H){b(e("config.modelConfig.validationFailed")+": "+H.message,"error")}finally{g.value=!1}},O=Q=>{Q&&f.value.find(G=>G.modelName===Q)&&(_.modelDescription=I(Q))},$=async()=>{if(!_.modelName.trim()||!_.modelDescription.trim()){b(e("config.modelConfig.requiredFields"),"error");return}if(!_.baseUrl.trim()||!_.apiKey.trim()){b(e("config.modelConfig.pleaseEnterBaseUrlAndApiKey"),"error");return}b(e("config.modelConfig.validatingBeforeSave"),"info");try{const Q=await ko.validateConfig({baseUrl:_.baseUrl.trim(),apiKey:_.apiKey.trim()});if(!Q.valid){b(e("config.modelConfig.validationFailedCannotSave")+": "+Q.message,"error");return}}catch(Q){b(e("config.modelConfig.validationFailedCannotSave")+": "+Q.message,"error");return}try{const Q={baseUrl:_.baseUrl.trim(),headers:_.headers,apiKey:_.apiKey.trim(),modelName:_.modelName.trim(),modelDescription:_.modelDescription.trim(),type:_.type.trim(),temperature:isNaN(_.temperature)?null:_.temperature,topP:isNaN(_.topP)?null:_.topP},H=await ko.createModel(Q);s.push(H),a.value=H,l.value=!1,b(e("config.modelConfig.createSuccess"),"success")}catch(Q){b(e("config.modelConfig.createFailed")+": "+Q.message,"error")}},K=async()=>{if(!a.value)return;if(!a.value.modelName.trim()||!a.value.modelDescription.trim()){b(e("config.modelConfig.requiredFields"),"error");return}if(!a.value.baseUrl||!a.value.apiKey){b(e("config.modelConfig.pleaseEnterBaseUrlAndApiKey"),"error");return}if(!a.value.apiKey.includes("*")||!h.value.has(a.value.id)){b(e("config.modelConfig.validatingBeforeSave"),"info");try{const H=await ko.validateConfig({baseUrl:a.value.baseUrl,apiKey:a.value.apiKey});if(!H.valid){b(e("config.modelConfig.validationFailedCannotSave")+": "+H.message,"error");return}h.value.set(a.value.id,H.availableModels||[])}catch(H){b(e("config.modelConfig.validationFailedCannotSave")+": "+H.message,"error");return}}try{const H={...a.value,temperature:isNaN(a.value.temperature)?null:a.value.temperature,topP:isNaN(a.value.topP)?null:a.value.topP},G=await ko.updateModel(a.value.id,H),Z=s.findIndex($e=>$e.id===G.id);Z!==-1&&(s[Z]=G),a.value=G,b(e("config.modelConfig.saveSuccess"),"success")}catch(H){b(e("config.modelConfig.saveFailed")+": "+H.message,"error")}},oe=()=>{d.value=!0},Le=async()=>{if(a.value){u.value=!0;try{await ko.setDefaultModel(a.value.id),s.forEach(Q=>{Q.isDefault=Q.id===a.value.id}),a.value.isDefault=!0,b(e("config.modelConfig.setDefaultSuccess"),"success")}catch(Q){b(e("config.modelConfig.setDefaultFailed")+": "+Q.message,"error")}finally{u.value=!1}}},he=async()=>{if(a.value)try{await ko.deleteModel(a.value.id);const Q=s.findIndex(H=>H.id===a.value.id);Q!==-1&&s.splice(Q,1),a.value=s.length>0?s[0]:null,d.value=!1,b(e("config.modelConfig.deleteSuccess"),"success")}catch(Q){b(e("config.modelConfig.deleteFailed")+": "+Q.message,"error")}},se=()=>{const Q=document.createElement("input");Q.type="file",Q.accept=".json",Q.onchange=H=>{var Z;const G=(Z=H.target.files)==null?void 0:Z[0];if(G){const $e=new FileReader;$e.onload=async ft=>{var Bt;try{const Ce=JSON.parse((Bt=ft.target)==null?void 0:Bt.result);if(!Ce.modelName||!Ce.modelDescription)throw new Error(e("config.modelConfig.invalidFormat"));const{id:re,...ke}=Ce,ce=await ko.createModel(ke);s.push(ce),a.value=ce,b(e("config.modelConfig.importSuccess"),"success")}catch(Ce){b(e("config.modelConfig.importFailed")+": "+Ce.message,"error")}},$e.readAsText(G)}},Q.click()},V=()=>{if(a.value)try{const Q=JSON.stringify(a.value,null,2),H=new Blob([Q],{type:"application/json"}),G=URL.createObjectURL(H),Z=document.createElement("a");Z.href=G,Z.download=`model-${a.value.modelName}-${new Date().toISOString().split("T")[0]}.json`,Z.click(),URL.revokeObjectURL(G),b(e("config.modelConfig.exportSuccess"),"success")}catch(Q){b(e("config.modelConfig.exportFailed")+": "+Q.message,"error")}};return Kd(()=>{C()}),(Q,H)=>(ne(),In(Gb,null,{title:Zt(()=>[L("h2",null,B(P(e)("config.modelConfig.title")),1)]),actions:Zt(()=>[L("button",{class:"action-btn",onClick:se},[xe(P(Re),{icon:"carbon:upload"}),Pe(" "+B(P(e)("config.modelConfig.import")),1)]),L("button",{class:"action-btn",onClick:V,disabled:!a.value},[xe(P(Re),{icon:"carbon:download"}),Pe(" "+B(P(e)("config.modelConfig.export")),1)],8,qK)]),default:Zt(()=>[L("div",GK,[L("div",ZK,[L("div",YK,[L("h3",null,B(P(e)("config.modelConfig.configuredModels")),1),L("span",XK,"("+B(s.length)+")",1)]),t.value?at("",!0):(ne(),ue("div",QK,[(ne(!0),ue(Ji,null,ln(s,G=>{var Z;return ne(),ue("div",{key:G.id,class:Nn(["model-card",{active:((Z=a.value)==null?void 0:Z.id)===G.id}]),onClick:$e=>w(G)},[L("div",eq,[L("span",tq,B(G.modelName),1),L("div",iq,[G.isDefault?(ne(),ue("span",nq,[xe(P(Re),{icon:"carbon:star-filled"}),Pe(" "+B(P(e)("config.modelConfig.default")),1)])):at("",!0),xe(P(Re),{icon:"carbon:chevron-right"})])]),L("p",sq,B(G.modelDescription),1),G.type?(ne(),ue("div",oq,[L("span",rq,B(G.type),1)])):at("",!0)],10,JK)}),128))])),t.value?(ne(),ue("div",aq,[xe(P(Re),{icon:"carbon:loading",class:"loading-icon"}),Pe(" "+B(P(e)("common.loading")),1)])):at("",!0),!t.value&&s.length===0?(ne(),ue("div",lq,[xe(P(Re),{icon:"carbon:bot",class:"empty-icon"}),L("p",null,B(P(e)("config.modelConfig.noModel")),1)])):at("",!0),L("button",{class:"add-btn",onClick:S},[xe(P(Re),{icon:"carbon:add"}),Pe(" "+B(P(e)("config.modelConfig.createNew")),1)])]),a.value?(ne(),ue("div",dq,[L("div",cq,[L("h3",null,B(a.value.modelName),1),L("div",uq,[a.value.isDefault?(ne(),ue("span",gq,[xe(P(Re),{icon:"carbon:star-filled"}),Pe(" "+B(P(e)("config.modelConfig.currentDefault")),1)])):(ne(),ue("button",{key:0,class:"action-btn default",onClick:Le,disabled:u.value},[xe(P(Re),{icon:"carbon:star"}),Pe(" "+B(P(e)("config.modelConfig.setAsDefault")),1)],8,hq)),L("button",{class:"action-btn primary",onClick:K},[xe(P(Re),{icon:"carbon:save"}),Pe(" "+B(P(e)("common.save")),1)]),L("button",{class:"action-btn danger",onClick:oe},[xe(P(Re),{icon:"carbon:trash-can"}),Pe(" "+B(P(e)("common.delete")),1)])])]),L("div",fq,[L("label",null,[Pe(B(P(e)("config.modelConfig.type"))+" ",1),H[21]||(H[21]=L("span",{class:"required"},"*",-1))]),xe(Q1,{modelValue:a.value.type,"onUpdate:modelValue":H[0]||(H[0]=G=>a.value.type=G),options:r.map(G=>({id:G,name:G})),placeholder:P(e)("config.modelConfig.typePlaceholder"),"dropdown-title":P(e)("config.modelConfig.typePlaceholder"),icon:"carbon:types"},null,8,["modelValue","options","placeholder","dropdown-title"])]),L("div",pq,[L("label",null,[Pe(B(P(e)("config.modelConfig.baseUrl"))+" ",1),H[22]||(H[22]=L("span",{class:"required"},"*",-1))]),Vt(L("input",{type:"text","onUpdate:modelValue":H[1]||(H[1]=G=>a.value.baseUrl=G),placeholder:P(e)("config.modelConfig.baseUrlPlaceholder"),required:""},null,8,mq),[[ti,a.value.baseUrl]])]),L("div",_q,[L("label",null,B(P(e)("config.modelConfig.headers")),1),Vt(L("input",{type:"text","onUpdate:modelValue":H[2]||(H[2]=G=>m.value=G),placeholder:P(e)("config.modelConfig.headersPlaceholder")},null,8,vq),[[ti,m.value]])]),L("div",bq,[L("label",null,[Pe(B(P(e)("config.modelConfig.apiKey"))+" ",1),H[23]||(H[23]=L("span",{class:"required"},"*",-1))]),L("div",Cq,[Vt(L("input",{type:"text","onUpdate:modelValue":H[3]||(H[3]=G=>a.value.apiKey=G),placeholder:P(e)("config.modelConfig.apiKeyPlaceholder"),required:""},null,8,wq),[[ti,a.value.apiKey]]),L("button",{class:"check-btn",onClick:x,disabled:c.value||!a.value.baseUrl||!a.value.apiKey,title:P(e)("config.modelConfig.validateConfig")},[c.value?(ne(),In(P(Re),{key:1,icon:"carbon:loading",class:"loading-icon"})):(ne(),In(P(Re),{key:0,icon:"carbon:checkmark"}))],8,Sq)])]),L("div",yq,[L("label",null,[Pe(B(P(e)("config.modelConfig.modelName"))+" ",1),H[24]||(H[24]=L("span",{class:"required"},"*",-1))]),E().length>0?(ne(),In(kP,{key:0,modelValue:a.value.modelName,"onUpdate:modelValue":[H[4]||(H[4]=G=>a.value.modelName=G),R],options:E().map(G=>({id:G.modelName,name:G.modelName,description:I(G.modelName),category:y(G.modelName)})),placeholder:P(e)("config.modelConfig.selectModel"),"dropdown-title":P(e)("config.modelConfig.availableModels")},null,8,["modelValue","options","placeholder","dropdown-title"])):(ne(),ue("div",Lq,B(a.value.modelName||P(e)("config.modelConfig.modelNamePlaceholder")),1))]),L("div",Dq,[L("label",null,[Pe(B(P(e)("config.modelConfig.description"))+" ",1),H[25]||(H[25]=L("span",{class:"required"},"*",-1))]),Vt(L("textarea",{"onUpdate:modelValue":H[5]||(H[5]=G=>a.value.modelDescription=G),placeholder:P(e)("config.modelConfig.descriptionPlaceholder"),class:"description-field",rows:"3"},null,8,xq),[[ti,a.value.modelDescription]])]),L("div",kq,[L("label",null,B(P(e)("config.modelConfig.temperature")),1),Vt(L("input",{type:"number","onUpdate:modelValue":H[6]||(H[6]=G=>a.value.temperature=G),placeholder:P(e)("config.modelConfig.temperaturePlaceholder"),step:"0.1",min:"0",max:"2"},null,8,Iq),[[ti,a.value.temperature,void 0,{number:!0}]])]),L("div",Eq,[L("label",null,B(P(e)("config.modelConfig.topP")),1),Vt(L("input",{type:"number","onUpdate:modelValue":H[7]||(H[7]=G=>a.value.topP=G),placeholder:P(e)("config.modelConfig.topPPlaceholder"),step:"0.1",min:"0",max:"1"},null,8,Nq),[[ti,a.value.topP,void 0,{number:!0}]])])])):(ne(),ue("div",Tq,[xe(P(Re),{icon:"carbon:bot",class:"placeholder-icon"}),L("p",null,B(P(e)("config.modelConfig.selectModelHint")),1)]))]),xe(Wo,{modelValue:l.value,"onUpdate:modelValue":H[16]||(H[16]=G=>l.value=G),title:P(e)("config.modelConfig.newModel"),onConfirm:$},{default:Zt(()=>[L("div",Mq,[L("div",Aq,[L("label",null,[Pe(B(P(e)("config.modelConfig.type"))+" ",1),H[26]||(H[26]=L("span",{class:"required"},"*",-1))]),xe(Q1,{modelValue:_.type,"onUpdate:modelValue":H[8]||(H[8]=G=>_.type=G),options:r.map(G=>({id:G,name:G})),placeholder:P(e)("config.modelConfig.typePlaceholder"),"dropdown-title":P(e)("config.modelConfig.typePlaceholder"),icon:"carbon:types"},null,8,["modelValue","options","placeholder","dropdown-title"])]),L("div",Rq,[L("label",null,[Pe(B(P(e)("config.modelConfig.baseUrl"))+" ",1),H[27]||(H[27]=L("span",{class:"required"},"*",-1))]),Vt(L("input",{type:"text","onUpdate:modelValue":H[9]||(H[9]=G=>_.baseUrl=G),placeholder:P(e)("config.modelConfig.baseUrlPlaceholder"),required:""},null,8,Pq),[[ti,_.baseUrl]])]),L("div",Oq,[L("label",null,B(P(e)("config.modelConfig.headers")),1),Vt(L("input",{type:"text","onUpdate:modelValue":H[10]||(H[10]=G=>v.value=G),placeholder:P(e)("config.modelConfig.headersPlaceholder")},null,8,Fq),[[ti,v.value]])]),L("div",Bq,[L("label",null,[Pe(B(P(e)("config.modelConfig.apiKey"))+" ",1),H[28]||(H[28]=L("span",{class:"required"},"*",-1))]),L("div",Wq,[Vt(L("input",{type:"text","onUpdate:modelValue":H[11]||(H[11]=G=>_.apiKey=G),placeholder:P(e)("config.modelConfig.apiKeyPlaceholder"),required:""},null,8,Vq),[[ti,_.apiKey]]),L("button",{class:"check-btn",onClick:j,disabled:g.value||!_.baseUrl||!_.apiKey,title:P(e)("config.modelConfig.validateConfig")},[g.value?(ne(),In(P(Re),{key:1,icon:"carbon:loading",class:"loading-icon"})):(ne(),In(P(Re),{key:0,icon:"carbon:checkmark"}))],8,Hq)])]),L("div",zq,[L("label",null,[Pe(B(P(e)("config.modelConfig.modelName"))+" ",1),H[29]||(H[29]=L("span",{class:"required"},"*",-1))]),f.value.length>0?(ne(),In(kP,{key:0,modelValue:_.modelName,"onUpdate:modelValue":[H[12]||(H[12]=G=>_.modelName=G),O],options:f.value.map(G=>({id:G.modelName,name:G.modelName,description:I(G.modelName),category:y(G.modelName)})),placeholder:P(e)("config.modelConfig.selectModel"),"dropdown-title":P(e)("config.modelConfig.availableModels")},null,8,["modelValue","options","placeholder","dropdown-title"])):(ne(),ue("div",$q,B(_.modelName||P(e)("config.modelConfig.modelNamePlaceholder")),1))]),L("div",Uq,[L("label",null,[Pe(B(P(e)("config.modelConfig.description"))+" ",1),H[30]||(H[30]=L("span",{class:"required"},"*",-1))]),Vt(L("textarea",{"onUpdate:modelValue":H[13]||(H[13]=G=>_.modelDescription=G),placeholder:P(e)("config.modelConfig.descriptionPlaceholder"),class:"description-field",rows:"3"},null,8,jq),[[ti,_.modelDescription]])]),L("div",Kq,[L("label",null,B(P(e)("config.modelConfig.temperature")),1),Vt(L("input",{type:"number","onUpdate:modelValue":H[14]||(H[14]=G=>_.temperature=G),placeholder:P(e)("config.modelConfig.temperaturePlaceholder"),step:"0.1",min:"0",max:"2"},null,8,qq),[[ti,_.temperature,void 0,{number:!0}]])]),L("div",Gq,[L("label",null,B(P(e)("config.modelConfig.topP")),1),Vt(L("input",{type:"number","onUpdate:modelValue":H[15]||(H[15]=G=>_.topP=G),placeholder:P(e)("config.modelConfig.topPPlaceholder"),step:"0.1",min:"0",max:"1"},null,8,Zq),[[ti,_.topP,void 0,{number:!0}]])])])]),_:1},8,["modelValue","title"]),xe(Wo,{modelValue:d.value,"onUpdate:modelValue":H[18]||(H[18]=G=>d.value=G),title:"Delete confirmation"},{footer:Zt(()=>[L("button",{class:"cancel-btn",onClick:H[17]||(H[17]=G=>d.value=!1)},B(P(e)("common.cancel")),1),L("button",{class:"confirm-btn danger",onClick:he},B(P(e)("common.delete")),1)]),default:Zt(()=>{var G;return[L("div",Yq,[xe(P(Re),{icon:"carbon:warning",class:"warning-icon"}),L("p",null,[Pe(B(P(e)("config.modelConfig.deleteConfirmText"))+" ",1),L("strong",null,B((G=a.value)==null?void 0:G.modelName),1),Pe(" "+B(P(e)("common.confirm"))+"? ",1)]),L("p",Xq,B(P(e)("config.modelConfig.deleteWarning")),1)])]}),_:1},8,["modelValue"]),i.value?(ne(),ue("div",{key:0,class:"error-toast",onClick:H[19]||(H[19]=G=>i.value="")},[xe(P(Re),{icon:"carbon:error"}),Pe(" "+B(i.value),1)])):at("",!0),n.value?(ne(),ue("div",{key:1,class:"success-toast",onClick:H[20]||(H[20]=G=>n.value="")},[xe(P(Re),{icon:"carbon:checkmark"}),Pe(" "+B(n.value),1)])):at("",!0)]),_:1}))}}),Jq=us(Qq,[["__scopeId","data-v-be6fda70"]]);class od{static async getAllMcpServers(){const e=await fetch(`${this.BASE_URL}/list`);if(!e.ok)throw new Error(`Failed to get MCP server list: ${e.status}`);return await e.json()}static async addMcpServer(e){try{const t=await fetch(`${this.BASE_URL}/add`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const i=await t.text();throw new Error(`Failed to add MCP server: ${t.status} - ${i}`)}return{success:!0,message:"Successfully added MCP server"}}catch(t){return console.error("Failed to add MCP server:",t),{success:!1,message:t instanceof Error?t.message:"Failed to add, please retry"}}}static async importMcpServers(e){try{const t=await fetch(`${this.BASE_URL}/batch-import`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configJson:JSON.stringify(e),overwrite:!1})});if(!t.ok){const i=await t.text();throw new Error(`Failed to import MCP servers: ${t.status} - ${i}`)}return{success:!0,message:"Successfully imported MCP servers"}}catch(t){return console.error("Failed to import MCP servers:",t),{success:!1,message:t instanceof Error?t.message:"Failed to import, please retry"}}}static async saveMcpServer(e){try{const t=await fetch(`${this.BASE_URL}/server`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.text(),s=e.id!==void 0?"update":"add";throw new Error(`Failed to ${s} MCP server: ${t.status} - ${n}`)}return{success:!0,message:`Successfully ${e.id!==void 0?"updated":"added"} MCP server`}}catch(t){return console.error("Failed to save MCP server:",t),{success:!1,message:t instanceof Error?t.message:"Failed to save, please retry"}}}static async updateMcpServer(e,t){return this.saveMcpServer({...t,id:e})}static async removeMcpServer(e){try{const t=await fetch(`${this.BASE_URL}/remove?id=${e}`);if(!t.ok)throw new Error(`Failed to delete MCP server: ${t.status}`);return{success:!0,message:"Successfully deleted MCP server"}}catch(t){return console.error(`Failed to delete MCP server[${e}]:`,t),{success:!1,message:t instanceof Error?t.message:"Failed to delete, please retry"}}}static async enableMcpServer(e){try{const t=await fetch(`${this.BASE_URL}/enable/${e}`,{method:"POST"});if(!t.ok){const i=await t.text();throw new Error(`Failed to enable MCP server: ${t.status} - ${i}`)}return{success:!0,message:"Successfully enabled MCP server"}}catch(t){return console.error(`Failed to enable MCP server[${e}]:`,t),{success:!1,message:t instanceof Error?t.message:"Failed to enable, please retry"}}}static async disableMcpServer(e){try{const t=await fetch(`${this.BASE_URL}/disable/${e}`,{method:"POST"});if(!t.ok){const i=await t.text();throw new Error(`Failed to disable MCP server: ${t.status} - ${i}`)}return{success:!0,message:"Successfully disabled MCP server"}}catch(t){return console.error(`Failed to disable MCP server[${e}]:`,t),{success:!1,message:t instanceof Error?t.message:"Failed to disable, please retry"}}}}ri(od,"BASE_URL","/api/mcp");function er(o,e=0){return o[o.length-(1+e)]}function eG(o){if(o.length===0)throw new Error("Invalid tail call");return[o.slice(0,o.length-1),o[o.length-1]]}function Bi(o,e,t=(i,n)=>i===n){if(o===e)return!0;if(!o||!e||o.length!==e.length)return!1;for(let i=0,n=o.length;it(o[i],e))}function iG(o,e){let t=0,i=o-1;for(;t<=i;){const n=(t+i)/2|0,s=e(n);if(s<0)t=n+1;else if(s>0)i=n-1;else return n}return-(t+1)}function Mk(o,e,t){if(o=o|0,o>=e.length)throw new TypeError("invalid index");const i=e[Math.floor(e.length*Math.random())],n=[],s=[],r=[];for(const a of e){const l=t(a,i);l<0?n.push(a):l>0?s.push(a):r.push(a)}return o!!e)}function EP(o){let e=0;for(let t=0;t0}function iu(o,e=t=>t){const t=new Set;return o.filter(i=>{const n=e(i);return t.has(n)?!1:(t.add(n),!0)})}function G2(o,e){return o.length>0?o[0]:e}function Ls(o,e){let t=typeof e=="number"?o:0;typeof e=="number"?t=o:(t=0,e=o);const i=[];if(t<=e)for(let n=t;ne;n--)i.push(n);return i}function oy(o,e,t){const i=o.slice(0,e),n=o.slice(e);return i.concat(t,n)}function DD(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.unshift(e))}function $0(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.push(e))}function Ak(o,e){for(const t of e)o.push(t)}function Z2(o){return Array.isArray(o)?o:[o]}function sG(o,e,t){const i=O9(o,e),n=o.length,s=t.length;o.length=n+s;for(let r=n-1;r>=i;r--)o[r+s]=o[r];for(let r=0;r0}o.isGreaterThan=i;function n(s){return s===0}o.isNeitherLessOrGreaterThan=n,o.greaterThan=1,o.lessThan=-1,o.neitherLessOrGreaterThan=0})(pv||(pv={}));function ur(o,e){return(t,i)=>e(o(t),o(i))}function oG(...o){return(e,t)=>{for(const i of o){const n=i(e,t);if(!pv.isNeitherLessOrGreaterThan(n))return n}return pv.neitherLessOrGreaterThan}}const Md=(o,e)=>o-e,rG=(o,e)=>Md(o?1:0,e?1:0);function F9(o){return(e,t)=>-o(e,t)}class Hd{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class Dl{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new Dl(t=>this.iterate(i=>e(i)?t(i):!0))}map(e){return new Dl(t=>this.iterate(i=>t(e(i))))}findLast(e){let t;return this.iterate(i=>(e(i)&&(t=i),!0)),t}findLastMaxBy(e){let t,i=!0;return this.iterate(n=>((i||pv.isGreaterThan(e(n,t)))&&(i=!1,t=n),!0)),t}}Dl.empty=new Dl(o=>{});function As(o){return typeof o=="string"}function Es(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function aG(o){const e=Object.getPrototypeOf(Uint8Array);return typeof o=="object"&&o instanceof e}function nu(o){return typeof o=="number"&&!isNaN(o)}function TP(o){return!!o&&typeof o[Symbol.iterator]=="function"}function B9(o){return o===!0||o===!1}function ro(o){return typeof o>"u"}function mv(o){return!Ro(o)}function Ro(o){return ro(o)||o===null}function qt(o,e){if(!o)throw new Error("Unexpected type")}function Lc(o){if(Ro(o))throw new Error("Assertion Failed: argument is undefined or null");return o}function _v(o){return typeof o=="function"}function lG(o,e){const t=Math.min(o.length,e.length);for(let i=0;i{e[t]=i&&typeof i=="object"?gd(i):i}),e}function cG(o){if(!o||typeof o!="object")return o;const e=[o];for(;e.length>0;){const t=e.shift();Object.freeze(t);for(const i in t)if(W9.call(t,i)){const n=t[i];typeof n=="object"&&!Object.isFrozen(n)&&!aG(n)&&e.push(n)}}return o}const W9=Object.prototype.hasOwnProperty;function V9(o,e){return Rk(o,e,new Set)}function Rk(o,e,t){if(Ro(o))return o;const i=e(o);if(typeof i<"u")return i;if(Array.isArray(o)){const n=[];for(const s of o)n.push(Rk(s,e,t));return n}if(Es(o)){if(t.has(o))throw new Error("Cannot clone recursive data-structure");t.add(o);const n={};for(const s in o)W9.call(o,s)&&(n[s]=Rk(o[s],e,t));return t.delete(o),n}return o}function ry(o,e,t=!0){return Es(o)?(Es(e)&&Object.keys(e).forEach(i=>{i in o?t&&(Es(o[i])&&Es(e[i])?ry(o[i],e[i],t):o[i]=e[i]):o[i]=e[i]}),o):e}function Uo(o,e){if(o===e)return!0;if(o==null||e===null||e===void 0||typeof o!=typeof e||typeof o!="object"||Array.isArray(o)!==Array.isArray(e))return!1;let t,i;if(Array.isArray(o)){if(o.length!==e.length)return!1;for(t=0;tfunction(){const s=Array.prototype.slice.call(arguments,0);return e(n,s)},i={};for(const n of o)i[n]=t(n);return i}let gG=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function H9(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(i,n)=>{const s=n[0],r=e[s];let a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),gG&&(t="["+t.replace(/[aouei]/g,"$&$&")+"]"),t}function p(o,e,...t){return H9(e,t)}function fG(o,e,...t){const i=H9(e,t);return{value:i,original:i}}var xD;const wf="en";let J1=!1,ew=!1,h1=!1,z9=!1,X2=!1,Q2=!1,$9=!1,U0,g1=wf,MP=wf,pG,ia;const Ad=globalThis;let Ds;typeof Ad.vscode<"u"&&typeof Ad.vscode.process<"u"?Ds=Ad.vscode.process:typeof process<"u"&&(Ds=process);const mG=typeof((xD=Ds==null?void 0:Ds.versions)===null||xD===void 0?void 0:xD.electron)=="string",_G=mG&&(Ds==null?void 0:Ds.type)==="renderer";if(typeof navigator=="object"&&!_G)ia=navigator.userAgent,J1=ia.indexOf("Windows")>=0,ew=ia.indexOf("Macintosh")>=0,Q2=(ia.indexOf("Macintosh")>=0||ia.indexOf("iPad")>=0||ia.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,h1=ia.indexOf("Linux")>=0,$9=(ia==null?void 0:ia.indexOf("Mobi"))>=0,X2=!0,p({},"_"),U0=wf,g1=U0,MP=navigator.language;else if(typeof Ds=="object"){J1=Ds.platform==="win32",ew=Ds.platform==="darwin",h1=Ds.platform==="linux",h1&&Ds.env.SNAP&&Ds.env.SNAP_REVISION,Ds.env.CI||Ds.env.BUILD_ARTIFACTSTAGINGDIRECTORY,U0=wf,g1=wf;const o=Ds.env.VSCODE_NLS_CONFIG;if(o)try{const e=JSON.parse(o),t=e.availableLanguages["*"];U0=e.locale,MP=e.osLocale,g1=t||wf,pG=e._translationsConfigFile}catch{}z9=!0}else console.error("Unable to resolve platform.");const is=J1,It=ew,ws=h1,Ml=z9,Tu=X2,vG=X2&&typeof Ad.importScripts=="function",bG=vG?Ad.origin:void 0,Ea=Q2,CG=$9,Al=ia,wG=g1,SG=typeof Ad.postMessage=="function"&&!Ad.importScripts,U9=(()=>{if(SG){const o=[];Ad.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=o.length;i{const i=++e;o.push({id:i,callback:t}),Ad.postMessage({vscodeScheduleAsyncWork:i},"*")}}return o=>setTimeout(o)})(),Vo=ew||Q2?2:J1?1:3;let AP=!0,RP=!1;function j9(){if(!RP){RP=!0;const o=new Uint8Array(2);o[0]=1,o[1]=2,AP=new Uint16Array(o.buffer)[0]===513}return AP}const K9=!!(Al&&Al.indexOf("Chrome")>=0),yG=!!(Al&&Al.indexOf("Firefox")>=0),LG=!!(!K9&&Al&&Al.indexOf("Safari")>=0),DG=!!(Al&&Al.indexOf("Edg/")>=0);Al&&Al.indexOf("Android")>=0;const rs={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}};var wt;(function(o){function e(b){return b&&typeof b=="object"&&typeof b[Symbol.iterator]=="function"}o.is=e;const t=Object.freeze([]);function i(){return t}o.empty=i;function*n(b){yield b}o.single=n;function s(b){return e(b)?b:n(b)}o.wrap=s;function r(b){return b||t}o.from=r;function*a(b){for(let C=b.length-1;C>=0;C--)yield b[C]}o.reverse=a;function l(b){return!b||b[Symbol.iterator]().next().done===!0}o.isEmpty=l;function d(b){return b[Symbol.iterator]().next().value}o.first=d;function c(b,C){for(const w of b)if(C(w))return!0;return!1}o.some=c;function u(b,C){for(const w of b)if(C(w))return w}o.find=u;function*h(b,C){for(const w of b)C(w)&&(yield w)}o.filter=h;function*g(b,C){let w=0;for(const S of b)yield C(S,w++)}o.map=g;function*f(...b){for(const C of b)yield*C}o.concat=f;function m(b,C,w){let S=w;for(const x of b)S=C(S,x);return S}o.reduce=m;function*v(b,C,w=b.length){for(C<0&&(C+=b.length),w<0?w+=b.length:w>b.length&&(w=b.length);C{n||(n=!0,this._remove(i))}}shift(){if(this._first!==cn.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==cn.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==cn.Undefined&&e.next!==cn.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===cn.Undefined&&e.next===cn.Undefined?(this._first=cn.Undefined,this._last=cn.Undefined):e.next===cn.Undefined?(this._last=this._last.prev,this._last.next=cn.Undefined):e.prev===cn.Undefined&&(this._first=this._first.next,this._first.prev=cn.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==cn.Undefined;)yield e.element,e=e.next}}const q9="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function xG(o=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of q9)o.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const J2=xG();function eM(o){let e=J2;if(o&&o instanceof RegExp)if(o.global)e=o;else{let t="g";o.ignoreCase&&(t+="i"),o.multiline&&(t+="m"),o.unicode&&(t+="u"),e=new RegExp(o.source,t)}return e.lastIndex=0,e}const G9=new Ns;G9.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function vv(o,e,t,i,n){if(e=eM(e),n||(n=wt.first(G9)),t.length>n.maxLen){let d=o-n.maxLen/2;return d<0?d=0:i+=d,t=t.substring(d,o+n.maxLen/2),vv(o,e,t,i,n)}const s=Date.now(),r=o-1-i;let a=-1,l=null;for(let d=1;!(Date.now()-s>=n.timeBudget);d++){const c=r-n.windowSize*d;e.lastIndex=Math.max(0,c);const u=kG(e,t,r,a);if(!u&&l||(l=u,c<=0))break;a=c}if(l){const d={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,d}return null}function kG(o,e,t,i){let n;for(;n=o.exec(e);){const s=n.index||0;if(s<=t&&o.lastIndex>=t)return n;if(i>0&&s>i)return null}return null}const lc=8;class Z9{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class Y9{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class Di{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return ay(e,t)}compute(e,t,i){return i}}class P_{constructor(e,t){this.newValue=e,this.didChange=t}}function ay(o,e){if(typeof o!="object"||typeof e!="object"||!o||!e)return new P_(e,o!==e);if(Array.isArray(o)||Array.isArray(e)){const i=Array.isArray(o)&&Array.isArray(e)&&Bi(o,e);return new P_(e,!i)}let t=!1;for(const i in e)if(e.hasOwnProperty(i)){const n=ay(o[i],e[i]);n.didChange&&(o[i]=n.newValue,t=!0)}return new P_(o,t)}class Zb{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return ay(e,t)}validate(e){return this.defaultValue}}class um{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return ay(e,t)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,i){return i}}function Be(o,e){return typeof o>"u"?e:o==="false"?!1:!!o}class Nt extends um{constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return Be(e,this.defaultValue)}}function ah(o,e,t,i){if(typeof o>"u")return e;let n=parseInt(o,10);return isNaN(n)?e:(n=Math.max(t,n),n=Math.min(i,n),n|0)}class Jt extends um{static clampedInt(e,t,i,n){return ah(e,t,i,n)}constructor(e,t,i,n,s,r=void 0){typeof r<"u"&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=s),super(e,t,i,r),this.minimum=n,this.maximum=s}validate(e){return Jt.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function IG(o,e,t,i){if(typeof o>"u")return e;const n=Rr.float(o,e);return Rr.clamp(n,t,i)}class Rr extends um{static clamp(e,t,i){return ei?i:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;const i=parseFloat(e);return isNaN(i)?t:i}constructor(e,t,i,n,s){typeof s<"u"&&(s.type="number",s.default=i),super(e,t,i,s),this.validationFn=n}validate(e){return this.validationFn(Rr.float(e,this.defaultValue))}}class no extends um{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return no.string(e,this.defaultValue)}}function Ki(o,e,t,i){return typeof o!="string"?e:i&&o in i?i[o]:t.indexOf(o)===-1?e:o}class ki extends um{constructor(e,t,i,n,s=void 0){typeof s<"u"&&(s.type="string",s.enum=n,s.default=i),super(e,t,i,s),this._allowedValues=n}validate(e){return Ki(e,this.defaultValue,this._allowedValues)}}class j0 extends Di{constructor(e,t,i,n,s,r,a=void 0){typeof a<"u"&&(a.type="string",a.enum=s,a.default=n),super(e,t,i,a),this._allowedValues=s,this._convert=r}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function EG(o){switch(o){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class NG extends Di{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[p("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),p("accessibilitySupport.on","Optimize for usage with a Screen Reader."),p("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:p("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return i===0?e.accessibilitySupport:i}}class TG extends Di{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:p("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:p("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:Be(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:Be(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function MG(o){switch(o){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var Vn;(function(o){o[o.Line=1]="Line",o[o.Block=2]="Block",o[o.Underline=3]="Underline",o[o.LineThin=4]="LineThin",o[o.BlockOutline=5]="BlockOutline",o[o.UnderlineThin=6]="UnderlineThin"})(Vn||(Vn={}));function AG(o){switch(o){case"line":return Vn.Line;case"block":return Vn.Block;case"underline":return Vn.Underline;case"line-thin":return Vn.LineThin;case"block-outline":return Vn.BlockOutline;case"underline-thin":return Vn.UnderlineThin}}class RG extends Zb{constructor(){super(140)}compute(e,t,i){const n=["monaco-editor"];return t.get(39)&&n.push(t.get(39)),e.extraEditorClassName&&n.push(e.extraEditorClassName),t.get(73)==="default"?n.push("mouse-default"):t.get(73)==="copy"&&n.push("mouse-copy"),t.get(110)&&n.push("showUnused"),t.get(138)&&n.push("showDeprecated"),n.join(" ")}}class PG extends Nt{constructor(){super(37,"emptySelectionClipboard",!0,{description:p("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class OG extends Di{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:p("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[p("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),p("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),p("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:p("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[p("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),p("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),p("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:p("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:p("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:It},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:p("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:p("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:Be(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Ki(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Ki(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:Be(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:Be(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:Be(t.loop,this.defaultValue.loop)}}}class Po extends Di{constructor(){super(51,"fontLigatures",Po.OFF,{anyOf:[{type:"boolean",description:p("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:p("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:p("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?Po.OFF:e==="true"?Po.ON:e:e?Po.ON:Po.OFF}}Po.OFF='"liga" off, "calt" off';Po.ON='"liga" on, "calt" on';class _a extends Di{constructor(){super(54,"fontVariations",_a.OFF,{anyOf:[{type:"boolean",description:p("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:p("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:p("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?_a.OFF:e==="true"?_a.TRANSLATE:e:e?_a.TRANSLATE:_a.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}}_a.OFF="normal";_a.TRANSLATE="translate";class FG extends Zb{constructor(){super(50)}compute(e,t,i){return e.fontInfo}}class BG extends um{constructor(){super(52,"fontSize",co.fontSize,{type:"number",minimum:6,maximum:100,default:co.fontSize,description:p("fontSize","Controls the font size in pixels.")})}validate(e){const t=Rr.float(e,this.defaultValue);return t===0?co.fontSize:Rr.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class ol extends Di{constructor(){super(53,"fontWeight",co.fontWeight,{anyOf:[{type:"number",minimum:ol.MINIMUM_VALUE,maximum:ol.MAXIMUM_VALUE,errorMessage:p("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:ol.SUGGESTION_VALUES}],default:co.fontWeight,description:p("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(Jt.clampedInt(e,co.fontWeight,ol.MINIMUM_VALUE,ol.MAXIMUM_VALUE))}}ol.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];ol.MINIMUM_VALUE=1;ol.MAXIMUM_VALUE=1e3;class WG extends Di{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[p("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),p("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),p("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:p("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:p("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:p("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:p("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:p("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:p("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:p("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:p("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:p("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:p("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:p("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,s,r;if(!e||typeof e!="object")return this.defaultValue;const a=e;return{multiple:Ki(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:Ki(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(i=a.multipleTypeDefinitions)!==null&&i!==void 0?i:Ki(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(n=a.multipleDeclarations)!==null&&n!==void 0?n:Ki(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(s=a.multipleImplementations)!==null&&s!==void 0?s:Ki(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(r=a.multipleReferences)!==null&&r!==void 0?r:Ki(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:no.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:no.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:no.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:no.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:no.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class VG extends Di{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:p("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:p("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:p("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:p("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:p("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Be(t.enabled,this.defaultValue.enabled),delay:Jt.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:Be(t.sticky,this.defaultValue.sticky),hidingDelay:Jt.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:Be(t.above,this.defaultValue.above)}}}class Zf extends Zb{constructor(){super(143)}compute(e,t,i){return Zf.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight);let n=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(n=Math.max(n,t-1));const s=(i+e.viewLineCount+n)/(e.pixelRatio*e.height),r=Math.floor(e.viewLineCount/s);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:s,minimapLineCount:r}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,s=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(s*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const r=t.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.paddingTop===r.paddingTop&&e.paddingBottom===r.paddingBottom&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,d=e.typicalHalfwidthCharacterWidth,c=e.scrollBeyondLastLine,u=e.minimap.renderCharacters;let h=s>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const g=e.minimap.maxColumn,f=e.minimap.size,m=e.minimap.side,v=e.verticalScrollbarWidth,_=e.viewLineCount,b=e.remainingWidth,C=e.isViewportWrapping,w=u?2:3;let S=Math.floor(s*n);const x=S/s;let y=!1,I=!1,E=w*h,R=h/s,j=1;if(f==="fill"||f==="fit"){const{typicalViewportLineCount:se,extraLinesBeforeFirstLine:V,extraLinesBeyondLastLine:Q,desiredRatio:H,minimapLineCount:G}=Zf.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:c,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:l,pixelRatio:s});if(_/G>1)y=!0,I=!0,h=1,E=1,R=h/s;else{let $e=!1,ft=h+1;if(f==="fit"){const Bt=Math.ceil((V+_+Q)*E);C&&a&&b<=t.stableFitRemainingWidth?($e=!0,ft=t.stableFitMaxMinimapScale):$e=Bt>S}if(f==="fill"||$e){y=!0;const Bt=h;E=Math.min(l*s,Math.max(1,Math.floor(1/H))),C&&a&&b<=t.stableFitRemainingWidth&&(ft=t.stableFitMaxMinimapScale),h=Math.min(ft,Math.max(1,Math.floor(E/w))),h>Bt&&(j=Math.min(2,h/Bt)),R=h/s/j,S=Math.ceil(Math.max(se,V+_+Q)*E),C?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const O=Math.floor(g*R),$=Math.min(O,Math.max(0,Math.floor((b-v-2)*R/(d+R)))+lc);let K=Math.floor(s*$);const oe=K/s;K=Math.floor(K*j);const Le=u?1:2,he=m==="left"?0:i-$-v;return{renderMinimap:Le,minimapLeft:he,minimapWidth:$,minimapHeightIsEditorHeight:y,minimapIsSampling:I,minimapScale:h,minimapLineHeight:E,minimapCanvasInnerWidth:K,minimapCanvasInnerHeight:S,minimapCanvasOuterWidth:oe,minimapCanvasOuterHeight:x}}static computeLayout(e,t){const i=t.outerWidth|0,n=t.outerHeight|0,s=t.lineHeight|0,r=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,d=t.pixelRatio,c=t.viewLineCount,u=e.get(135),h=u==="inherit"?e.get(134):u,g=h==="inherit"?e.get(130):h,f=e.get(133),m=t.isDominatedByLongLines,v=e.get(57),_=e.get(67).renderType!==0,b=e.get(68),C=e.get(104),w=e.get(83),S=e.get(72),x=e.get(102),y=x.verticalScrollbarSize,I=x.verticalHasArrows,E=x.arrowSize,R=x.horizontalScrollbarSize,j=e.get(43),O=e.get(109)!=="never";let $=e.get(65);j&&O&&($+=16);let K=0;if(_){const re=Math.max(r,b);K=Math.round(re*l)}let oe=0;v&&(oe=s*t.glyphMarginDecorationLaneCount);let Le=0,he=Le+oe,se=he+K,V=se+$;const Q=i-oe-K-$;let H=!1,G=!1,Z=-1;h==="inherit"&&m?(H=!0,G=!0):g==="on"||g==="bounded"?G=!0:g==="wordWrapColumn"&&(Z=f);const $e=Zf._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:a,pixelRatio:d,scrollBeyondLastLine:C,paddingTop:w.top,paddingBottom:w.bottom,minimap:S,verticalScrollbarWidth:y,viewLineCount:c,remainingWidth:Q,isViewportWrapping:G},t.memory||new Y9);$e.renderMinimap!==0&&$e.minimapLeft===0&&(Le+=$e.minimapWidth,he+=$e.minimapWidth,se+=$e.minimapWidth,V+=$e.minimapWidth);const ft=Q-$e.minimapWidth,Bt=Math.max(1,Math.floor((ft-y-2)/a)),Ce=I?E:0;return G&&(Z=Math.max(1,Bt),g==="bounded"&&(Z=Math.min(Z,f))),{width:i,height:n,glyphMarginLeft:Le,glyphMarginWidth:oe,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:he,lineNumbersWidth:K,decorationsLeft:se,decorationsWidth:$,contentLeft:V,contentWidth:ft,minimap:$e,viewportColumn:Bt,isWordWrapMinified:H,isViewportWrapping:G,wrappingColumn:Z,verticalScrollbarWidth:y,horizontalScrollbarHeight:R,overviewRuler:{top:Ce,width:y,height:n-2*Ce,right:0}}}}class HG extends Di{constructor(){super(137,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[p("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),p("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:p("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return Ki(e,"simple",["simple","advanced"])}compute(e,t,i){return t.get(2)===2?"advanced":i}}var so;(function(o){o.Off="off",o.OnCode="onCode",o.On="on"})(so||(so={}));class zG extends Di{constructor(){const e={enabled:!0,experimental:{showAiIcon:so.Off}};super(64,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:p("codeActions","Enables the Code Action lightbulb in the editor.")},"editor.lightbulb.experimental.showAiIcon":{type:"string",enum:[so.Off,so.OnCode,so.On],default:e.experimental.showAiIcon,enumDescriptions:[p("editor.lightbulb.showAiIcon.off","Don not show the AI icon."),p("editor.lightbulb.showAiIcon.onCode","Show an AI icon when the code action menu contains an AI action, but only on code."),p("editor.lightbulb.showAiIcon.on","Show an AI icon when the code action menu contains an AI action, on code and empty lines.")],description:p("showAiIcons","Show an AI icon along with the lightbulb when the code action menu contains an AI action.")}})}validate(e){var t,i;if(!e||typeof e!="object")return this.defaultValue;const n=e;return{enabled:Be(n.enabled,this.defaultValue.enabled),experimental:{showAiIcon:Ki((t=n.experimental)===null||t===void 0?void 0:t.showAiIcon,(i=this.defaultValue.experimental)===null||i===void 0?void 0:i.showAiIcon,[so.Off,so.OnCode,so.On])}}}}class $G extends Di{constructor(){const e={enabled:!1,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(114,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:p("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor.")},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:10,description:p("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:p("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:p("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Be(t.enabled,this.defaultValue.enabled),maxLineCount:Jt.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:Ki(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:Be(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class UG extends Di{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(139,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:p("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[p("editor.inlayHints.on","Inlay hints are enabled"),p("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",It?"Ctrl+Option":"Ctrl+Alt"),p("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",It?"Ctrl+Option":"Ctrl+Alt"),p("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:p("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:p("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:p("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:Ki(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Jt.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:no.string(t.fontFamily,this.defaultValue.fontFamily),padding:Be(t.padding,this.defaultValue.padding)}}}class jG extends Di{constructor(){super(65,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):Jt.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?Jt.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}class KG extends Rr{constructor(){super(66,"lineHeight",co.lineHeight,e=>Rr.clamp(e,0,150),{markdownDescription:p("lineHeight",`Controls the line height. - Use 0 to automatically compute the line height from the font size. - Values between 0 and 8 will be used as a multiplier with the font size. - - Values greater than or equal to 8 will be used as effective values.`)})}compute(e,t,i){return e.fontInfo.lineHeight}}class $G extends Di{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(72,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:p("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:p("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[p("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),p("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),p("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:p("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:p("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:p("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:p("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:p("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:p("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Be(t.enabled,this.defaultValue.enabled),autohide:Be(t.autohide,this.defaultValue.autohide),size:Ki(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:Ki(t.side,this.defaultValue.side,["right","left"]),showSlider:Ki(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:Be(t.renderCharacters,this.defaultValue.renderCharacters),scale:Jt.clampedInt(t.scale,1,1,3),maxColumn:Jt.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function UG(o){return o==="ctrlCmd"?It?"metaKey":"ctrlKey":"altKey"}class jG extends Di{constructor(){super(83,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:p("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:p("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{top:Jt.clampedInt(t.top,0,0,1e3),bottom:Jt.clampedInt(t.bottom,0,0,1e3)}}}class KG extends Di{constructor(){const e={enabled:!0,cycle:!0};super(85,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:p("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:p("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Be(t.enabled,this.defaultValue.enabled),cycle:Be(t.cycle,this.defaultValue.cycle)}}}class qG extends Zb{constructor(){super(141)}compute(e,t,i){return e.pixelRatio}}class GG extends Di{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[p("on","Quick suggestions show inside the suggest widget"),p("inline","Quick suggestions show as ghost text"),p("off","Quick suggestions are disabled")]}];super(88,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:p("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:p("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:p("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:p("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.","#editor.suggestOnTriggerCharacters#")}),this.defaultValue=e}validate(e){if(typeof e=="boolean"){const d=e?"on":"off";return{comments:d,strings:d,other:d}}if(!e||typeof e!="object")return this.defaultValue;const{other:t,comments:i,strings:n}=e,s=["on","inline","off"];let r,a,l;return typeof t=="boolean"?r=t?"on":"off":r=Ki(t,this.defaultValue.other,s),typeof i=="boolean"?a=i?"on":"off":a=Ki(i,this.defaultValue.comments,s),typeof n=="boolean"?l=n?"on":"off":l=Ki(n,this.defaultValue.strings,s),{other:r,comments:a,strings:l}}}class ZG extends Di{constructor(){super(67,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[p("lineNumbers.off","Line numbers are not rendered."),p("lineNumbers.on","Line numbers are rendered as absolute number."),p("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),p("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:p("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(t=4,i=e):e==="interval"?t=3:e==="relative"?t=2:e==="on"?t=1:t=0),{renderType:t,renderFn:i}}}function tw(o){const e=o.get(97);return e==="editable"?o.get(90):e!=="on"}class YG extends Di{constructor(){const e=[],t={type:"number",description:p("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(101,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:p("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:p("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const t=[];for(const i of e)if(typeof i=="number")t.push({column:Jt.clampedInt(i,0,0,1e4),color:null});else if(i&&typeof i=="object"){const n=i;t.push({column:Jt.clampedInt(n.column,0,0,1e4),color:n.color})}return t.sort((i,n)=>i.column-n.column),t}return this.defaultValue}}class XG extends Di{constructor(){super(91,"readOnlyMessage",void 0)}validate(e){return!e||typeof e!="object"?this.defaultValue:e}}function PP(o,e){if(typeof o!="string")return e;switch(o){case"hidden":return 2;case"visible":return 3;default:return 1}}let QG=class extends Di{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(102,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[p("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),p("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),p("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:p("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[p("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),p("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),p("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:p("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:p("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:p("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:p("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:e.ignoreHorizontalScrollbarInContentHeight,description:p("scrollbar.ignoreHorizontalScrollbarInContentHeight","When set, the horizontal scrollbar will not increase the size of the editor's content.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e,i=Jt.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=Jt.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Jt.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:PP(t.vertical,this.defaultValue.vertical),horizontal:PP(t.horizontal,this.defaultValue.horizontal),useShadows:Be(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:Be(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:Be(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:Be(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:Be(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:Jt.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:Jt.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:Be(t.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:Be(t.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}};const Io="inUntrustedWorkspace",Us={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class JG extends Di{constructor(){const e={nonBasicASCII:Io,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:Io,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(124,"unicodeHighlight",e,{[Us.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Io],default:e.nonBasicASCII,description:p("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[Us.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:p("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[Us.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:p("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[Us.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Io],default:e.includeComments,description:p("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[Us.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Io],default:e.includeStrings,description:p("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[Us.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:p("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[Us.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:p("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&(Uo(e.allowedCharacters,t.allowedCharacters)||(e={...e,allowedCharacters:t.allowedCharacters},i=!0)),t.allowedLocales&&e&&(Uo(e.allowedLocales,t.allowedLocales)||(e={...e,allowedLocales:t.allowedLocales},i=!0));const n=super.applyUpdate(e,t);return i?new P_(n.newValue,!0):n}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{nonBasicASCII:Yf(t.nonBasicASCII,Io,[!0,!1,Io]),invisibleCharacters:Be(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:Be(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:Yf(t.includeComments,Io,[!0,!1,Io]),includeStrings:Yf(t.includeStrings,Io,[!0,!1,Io]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if(typeof e!="object"||!e)return t;const i={};for(const[n,s]of Object.entries(e))s===!0&&(i[n]=!0);return i}}class eZ extends Di{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:p("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[p("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),p("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),p("inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:p("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:p("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Be(t.enabled,this.defaultValue.enabled),mode:Ki(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:Ki(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:Be(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:Be(t.keepOnBlur,this.defaultValue.keepOnBlur)}}}class tZ extends Di{constructor(){const e={enabled:rs.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:rs.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:p("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:p("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Be(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:Be(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class iZ extends Di{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[p("editor.guides.bracketPairs.true","Enables bracket pair guides."),p("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),p("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:p("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[p("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),p("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),p("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:p("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:p("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:p("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[p("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),p("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),p("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:p("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{bracketPairs:Yf(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:Yf(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:Be(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:Be(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:Yf(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function Yf(o,e,t){const i=t.indexOf(o);return i===-1?e:t[i]}class nZ extends Di{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(117,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[p("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),p("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:p("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:p("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:p("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:p("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[p("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),p("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),p("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),p("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:p("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:p("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:p("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:p("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:p("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:p("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:p("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:p("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertMode:Ki(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:Be(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:Be(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:Be(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:Be(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:Ki(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:Be(t.showIcons,this.defaultValue.showIcons),showStatusBar:Be(t.showStatusBar,this.defaultValue.showStatusBar),preview:Be(t.preview,this.defaultValue.preview),previewMode:Ki(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:Be(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:Be(t.showMethods,this.defaultValue.showMethods),showFunctions:Be(t.showFunctions,this.defaultValue.showFunctions),showConstructors:Be(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:Be(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:Be(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:Be(t.showFields,this.defaultValue.showFields),showVariables:Be(t.showVariables,this.defaultValue.showVariables),showClasses:Be(t.showClasses,this.defaultValue.showClasses),showStructs:Be(t.showStructs,this.defaultValue.showStructs),showInterfaces:Be(t.showInterfaces,this.defaultValue.showInterfaces),showModules:Be(t.showModules,this.defaultValue.showModules),showProperties:Be(t.showProperties,this.defaultValue.showProperties),showEvents:Be(t.showEvents,this.defaultValue.showEvents),showOperators:Be(t.showOperators,this.defaultValue.showOperators),showUnits:Be(t.showUnits,this.defaultValue.showUnits),showValues:Be(t.showValues,this.defaultValue.showValues),showConstants:Be(t.showConstants,this.defaultValue.showConstants),showEnums:Be(t.showEnums,this.defaultValue.showEnums),showEnumMembers:Be(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:Be(t.showKeywords,this.defaultValue.showKeywords),showWords:Be(t.showWords,this.defaultValue.showWords),showColors:Be(t.showColors,this.defaultValue.showColors),showFiles:Be(t.showFiles,this.defaultValue.showFiles),showReferences:Be(t.showReferences,this.defaultValue.showReferences),showFolders:Be(t.showFolders,this.defaultValue.showFolders),showTypeParameters:Be(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:Be(t.showSnippets,this.defaultValue.showSnippets),showUsers:Be(t.showUsers,this.defaultValue.showUsers),showIssues:Be(t.showIssues,this.defaultValue.showIssues)}}}class sZ extends Di{constructor(){super(112,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:p("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:p("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:Be(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:Be(e.selectSubwords,this.defaultValue.selectSubwords)}}}class oZ extends Di{constructor(){super(136,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[p("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),p("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),p("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),p("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:p("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,i){return t.get(2)===2?0:i}}class rZ extends Zb{constructor(){super(144)}compute(e,t,i){const n=t.get(143);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}class aZ extends Di{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:p("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down `Shift`-key (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:p("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[p("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),p("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Be(t.enabled,this.defaultValue.enabled),showDropSelector:Ki(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}class lZ extends Di{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(84,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:p("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:p("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[p("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),p("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Be(t.enabled,this.defaultValue.enabled),showPasteSelector:Ki(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}const dZ="Consolas, 'Courier New', monospace",cZ="Menlo, Monaco, 'Courier New', monospace",uZ="'Droid Sans Mono', 'monospace', monospace",co={fontFamily:It?cZ:ws?uZ:dZ,fontWeight:"normal",fontSize:It?12:14,lineHeight:0,letterSpacing:0},Sf=[];function me(o){return Sf[o.id]=o,o}const Oa={acceptSuggestionOnCommitCharacter:me(new Nt(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:p("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:me(new ki(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",p("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:p("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:me(new xG),accessibilityPageSize:me(new Jt(3,"accessibilityPageSize",10,1,1073741824,{description:p("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:me(new no(4,"ariaLabel",p("editorViewAccessibleLabel","Editor content"))),ariaRequired:me(new Nt(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:me(new Nt(8,"screenReaderAnnounceInlineSuggestion",!0,{description:p("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:me(new ki(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),p("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:p("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:me(new ki(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),p("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:p("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:me(new ki(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",p("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:p("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:me(new ki(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",p("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:p("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:me(new ki(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),p("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:p("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:me(new j0(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],DG,{enumDescriptions:[p("editor.autoIndent.none","The editor will not insert indentation automatically."),p("editor.autoIndent.keep","The editor will keep the current line's indentation."),p("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),p("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),p("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:p("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:me(new Nt(13,"automaticLayout",!1)),autoSurround:me(new ki(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[p("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),p("editor.autoSurround.quotes","Surround with quotes but not brackets."),p("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:p("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:me(new tZ),bracketPairGuides:me(new iZ),stickyTabStops:me(new Nt(115,"stickyTabStops",!1,{description:p("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:me(new Nt(17,"codeLens",!0,{description:p("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:me(new no(18,"codeLensFontFamily","",{description:p("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:me(new Jt(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:p("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:me(new Nt(20,"colorDecorators",!0,{description:p("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:me(new ki(146,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[p("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),p("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),p("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:p("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:me(new Jt(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:p("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:me(new Nt(22,"columnSelection",!1,{description:p("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:me(new kG),contextmenu:me(new Nt(24,"contextmenu",!0)),copyWithSyntaxHighlighting:me(new Nt(25,"copyWithSyntaxHighlighting",!0,{description:p("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:me(new j0(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],IG,{description:p("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:me(new ki(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[p("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),p("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),p("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:p("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:me(new j0(28,"cursorStyle",Vn.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],EG,{description:p("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:me(new Jt(29,"cursorSurroundingLines",0,0,1073741824,{description:p("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:me(new ki(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[p("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),p("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:p("cursorSurroundingLinesStyle","Controls when `#cursorSurroundingLines#` should be enforced.")})),cursorWidth:me(new Jt(31,"cursorWidth",0,0,1073741824,{markdownDescription:p("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:me(new Nt(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:me(new Nt(33,"disableMonospaceOptimizations",!1)),domReadOnly:me(new Nt(34,"domReadOnly",!1)),dragAndDrop:me(new Nt(35,"dragAndDrop",!0,{description:p("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:me(new TG),dropIntoEditor:me(new aZ),stickyScroll:me(new WG),experimentalWhitespaceRendering:me(new ki(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[p("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),p("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),p("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:p("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:me(new no(39,"extraEditorClassName","")),fastScrollSensitivity:me(new Rr(40,"fastScrollSensitivity",5,o=>o<=0?5:o,{markdownDescription:p("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:me(new MG),fixedOverflowWidgets:me(new Nt(42,"fixedOverflowWidgets",!1)),folding:me(new Nt(43,"folding",!0,{description:p("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:me(new ki(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[p("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),p("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:p("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:me(new Nt(45,"foldingHighlight",!0,{description:p("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:me(new Nt(46,"foldingImportsByDefault",!1,{description:p("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:me(new Jt(47,"foldingMaximumRegions",5e3,10,65e3,{description:p("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:me(new Nt(48,"unfoldOnClickAfterEndOfLine",!1,{description:p("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:me(new no(49,"fontFamily",co.fontFamily,{description:p("fontFamily","Controls the font family.")})),fontInfo:me(new AG),fontLigatures2:me(new Po),fontSize:me(new RG),fontWeight:me(new ol),fontVariations:me(new _a),formatOnPaste:me(new Nt(55,"formatOnPaste",!1,{description:p("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:me(new Nt(56,"formatOnType",!1,{description:p("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:me(new Nt(57,"glyphMargin",!0,{description:p("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:me(new PG),hideCursorInOverviewRuler:me(new Nt(59,"hideCursorInOverviewRuler",!1,{description:p("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:me(new OG),inDiffEditor:me(new Nt(61,"inDiffEditor",!1)),letterSpacing:me(new Rr(63,"letterSpacing",co.letterSpacing,o=>Rr.clamp(o,-5,20),{description:p("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:me(new BG),lineDecorationsWidth:me(new HG),lineHeight:me(new zG),lineNumbers:me(new ZG),lineNumbersMinChars:me(new Jt(68,"lineNumbersMinChars",5,1,300)),linkedEditing:me(new Nt(69,"linkedEditing",!1,{description:p("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:me(new Nt(70,"links",!0,{description:p("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:me(new ki(71,"matchBrackets","always",["always","near","never"],{description:p("matchBrackets","Highlight matching brackets.")})),minimap:me(new $G),mouseStyle:me(new ki(73,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:me(new Rr(74,"mouseWheelScrollSensitivity",1,o=>o===0?1:o,{markdownDescription:p("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:me(new Nt(75,"mouseWheelZoom",!1,{markdownDescription:p("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:me(new Nt(76,"multiCursorMergeOverlapping",!0,{description:p("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:me(new j0(77,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],UG,{markdownEnumDescriptions:[p("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),p("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:p({},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:me(new ki(78,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[p("multiCursorPaste.spread","Each cursor pastes a single line of the text."),p("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:p("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:me(new Jt(79,"multiCursorLimit",1e4,1,1e5,{markdownDescription:p("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:me(new ki(80,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[p("occurrencesHighlight.off","Does not highlight occurrences."),p("occurrencesHighlight.singleFile","Highlights occurrences only in the current file."),p("occurrencesHighlight.multiFile","Experimental: Highlights occurrences across all valid open files.")],markdownDescription:p("occurrencesHighlight","Controls whether occurrences should be highlighted across open files.")})),overviewRulerBorder:me(new Nt(81,"overviewRulerBorder",!0,{description:p("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:me(new Jt(82,"overviewRulerLanes",3,0,3)),padding:me(new jG),pasteAs:me(new lZ),parameterHints:me(new KG),peekWidgetDefaultFocus:me(new ki(86,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[p("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),p("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:p("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:me(new Nt(87,"definitionLinkOpensInPeek",!1,{description:p("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:me(new GG),quickSuggestionsDelay:me(new Jt(89,"quickSuggestionsDelay",10,0,1073741824,{description:p("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:me(new Nt(90,"readOnly",!1)),readOnlyMessage:me(new XG),renameOnType:me(new Nt(92,"renameOnType",!1,{description:p("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:p("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:me(new Nt(93,"renderControlCharacters",!0,{description:p("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:me(new ki(94,"renderFinalNewline",ws?"dimmed":"on",["off","on","dimmed"],{description:p("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:me(new ki(95,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",p("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:p("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:me(new Nt(96,"renderLineHighlightOnlyWhenFocus",!1,{description:p("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:me(new ki(97,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:me(new ki(98,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",p("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),p("renderWhitespace.selection","Render whitespace characters only on selected text."),p("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:p("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:me(new Jt(99,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:me(new Nt(100,"roundedSelection",!0,{description:p("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:me(new YG),scrollbar:me(new QG),scrollBeyondLastColumn:me(new Jt(103,"scrollBeyondLastColumn",4,0,1073741824,{description:p("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:me(new Nt(104,"scrollBeyondLastLine",!0,{description:p("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:me(new Nt(105,"scrollPredominantAxis",!0,{description:p("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:me(new Nt(106,"selectionClipboard",!0,{description:p("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:ws})),selectionHighlight:me(new Nt(107,"selectionHighlight",!0,{description:p("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:me(new Nt(108,"selectOnLineNumbers",!0)),showFoldingControls:me(new ki(109,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[p("showFoldingControls.always","Always show the folding controls."),p("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),p("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:p("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:me(new Nt(110,"showUnused",!0,{description:p("showUnused","Controls fading out of unused code.")})),showDeprecated:me(new Nt(138,"showDeprecated",!0,{description:p("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:me(new VG),snippetSuggestions:me(new ki(111,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[p("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),p("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),p("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),p("snippetSuggestions.none","Do not show snippet suggestions.")],description:p("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:me(new sZ),smoothScrolling:me(new Nt(113,"smoothScrolling",!1,{description:p("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:me(new Jt(116,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:me(new nZ),inlineSuggest:me(new eZ),inlineCompletionsAccessibilityVerbose:me(new Nt(147,"inlineCompletionsAccessibilityVerbose",!1,{description:p("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:me(new Jt(118,"suggestFontSize",0,0,1e3,{markdownDescription:p("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:me(new Jt(119,"suggestLineHeight",0,0,1e3,{markdownDescription:p("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:me(new Nt(120,"suggestOnTriggerCharacters",!0,{description:p("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:me(new ki(121,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[p("suggestSelection.first","Always select the first suggestion."),p("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),p("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:p("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:me(new ki(122,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[p("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),p("tabCompletion.off","Disable tab completions."),p("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:p("tabCompletion","Enables tab completions.")})),tabIndex:me(new Jt(123,"tabIndex",0,-1,1073741824)),unicodeHighlight:me(new JG),unusualLineTerminators:me(new ki(125,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[p("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),p("unusualLineTerminators.off","Unusual line terminators are ignored."),p("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:p("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:me(new Nt(126,"useShadowDOM",!0)),useTabStops:me(new Nt(127,"useTabStops",!0,{description:p("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordBreak:me(new ki(128,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[p("wordBreak.normal","Use the default line break rule."),p("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:p("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSeparators:me(new no(129,"wordSeparators",q9,{description:p("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:me(new ki(130,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[p("wordWrap.off","Lines will never wrap."),p("wordWrap.on","Lines will wrap at the viewport width."),p({},"Lines will wrap at `#editor.wordWrapColumn#`."),p({},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:p({},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:me(new no(131,"wordWrapBreakAfterCharacters"," })]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:me(new no(132,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:me(new Jt(133,"wordWrapColumn",80,1,1073741824,{markdownDescription:p({},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:me(new ki(134,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:me(new ki(135,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:me(new NG),defaultColorDecorators:me(new Nt(145,"defaultColorDecorators",!1,{markdownDescription:p("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:me(new qG),tabFocusMode:me(new Nt(142,"tabFocusMode",!1,{markdownDescription:p("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:me(new Zf),wrappingInfo:me(new rZ),wrappingIndent:me(new oZ),wrappingStrategy:me(new FG)};class hZ{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Sp.isErrorNoTelemetry(e)?new Sp(e.message+` + - Values greater than or equal to 8 will be used as effective values.`)})}compute(e,t,i){return e.fontInfo.lineHeight}}class qG extends Di{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(72,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:p("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:p("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[p("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),p("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),p("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:p("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:p("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:p("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:p("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:p("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:p("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Be(t.enabled,this.defaultValue.enabled),autohide:Be(t.autohide,this.defaultValue.autohide),size:Ki(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:Ki(t.side,this.defaultValue.side,["right","left"]),showSlider:Ki(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:Be(t.renderCharacters,this.defaultValue.renderCharacters),scale:Jt.clampedInt(t.scale,1,1,3),maxColumn:Jt.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function GG(o){return o==="ctrlCmd"?It?"metaKey":"ctrlKey":"altKey"}class ZG extends Di{constructor(){super(83,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:p("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:p("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{top:Jt.clampedInt(t.top,0,0,1e3),bottom:Jt.clampedInt(t.bottom,0,0,1e3)}}}class YG extends Di{constructor(){const e={enabled:!0,cycle:!0};super(85,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:p("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:p("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Be(t.enabled,this.defaultValue.enabled),cycle:Be(t.cycle,this.defaultValue.cycle)}}}class XG extends Zb{constructor(){super(141)}compute(e,t,i){return e.pixelRatio}}class QG extends Di{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[p("on","Quick suggestions show inside the suggest widget"),p("inline","Quick suggestions show as ghost text"),p("off","Quick suggestions are disabled")]}];super(88,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:p("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:p("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:p("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:p("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.","#editor.suggestOnTriggerCharacters#")}),this.defaultValue=e}validate(e){if(typeof e=="boolean"){const d=e?"on":"off";return{comments:d,strings:d,other:d}}if(!e||typeof e!="object")return this.defaultValue;const{other:t,comments:i,strings:n}=e,s=["on","inline","off"];let r,a,l;return typeof t=="boolean"?r=t?"on":"off":r=Ki(t,this.defaultValue.other,s),typeof i=="boolean"?a=i?"on":"off":a=Ki(i,this.defaultValue.comments,s),typeof n=="boolean"?l=n?"on":"off":l=Ki(n,this.defaultValue.strings,s),{other:r,comments:a,strings:l}}}class JG extends Di{constructor(){super(67,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[p("lineNumbers.off","Line numbers are not rendered."),p("lineNumbers.on","Line numbers are rendered as absolute number."),p("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),p("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:p("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(t=4,i=e):e==="interval"?t=3:e==="relative"?t=2:e==="on"?t=1:t=0),{renderType:t,renderFn:i}}}function tw(o){const e=o.get(97);return e==="editable"?o.get(90):e!=="on"}class eZ extends Di{constructor(){const e=[],t={type:"number",description:p("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(101,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:p("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:p("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const t=[];for(const i of e)if(typeof i=="number")t.push({column:Jt.clampedInt(i,0,0,1e4),color:null});else if(i&&typeof i=="object"){const n=i;t.push({column:Jt.clampedInt(n.column,0,0,1e4),color:n.color})}return t.sort((i,n)=>i.column-n.column),t}return this.defaultValue}}class tZ extends Di{constructor(){super(91,"readOnlyMessage",void 0)}validate(e){return!e||typeof e!="object"?this.defaultValue:e}}function PP(o,e){if(typeof o!="string")return e;switch(o){case"hidden":return 2;case"visible":return 3;default:return 1}}let iZ=class extends Di{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(102,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[p("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),p("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),p("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:p("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[p("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),p("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),p("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:p("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:p("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:p("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:p("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:e.ignoreHorizontalScrollbarInContentHeight,description:p("scrollbar.ignoreHorizontalScrollbarInContentHeight","When set, the horizontal scrollbar will not increase the size of the editor's content.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e,i=Jt.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=Jt.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Jt.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:PP(t.vertical,this.defaultValue.vertical),horizontal:PP(t.horizontal,this.defaultValue.horizontal),useShadows:Be(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:Be(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:Be(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:Be(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:Be(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:Jt.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:Jt.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:Be(t.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:Be(t.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}};const Io="inUntrustedWorkspace",Us={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class nZ extends Di{constructor(){const e={nonBasicASCII:Io,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:Io,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(124,"unicodeHighlight",e,{[Us.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Io],default:e.nonBasicASCII,description:p("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[Us.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:p("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[Us.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:p("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[Us.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Io],default:e.includeComments,description:p("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[Us.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Io],default:e.includeStrings,description:p("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[Us.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:p("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[Us.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:p("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&(Uo(e.allowedCharacters,t.allowedCharacters)||(e={...e,allowedCharacters:t.allowedCharacters},i=!0)),t.allowedLocales&&e&&(Uo(e.allowedLocales,t.allowedLocales)||(e={...e,allowedLocales:t.allowedLocales},i=!0));const n=super.applyUpdate(e,t);return i?new P_(n.newValue,!0):n}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{nonBasicASCII:Yf(t.nonBasicASCII,Io,[!0,!1,Io]),invisibleCharacters:Be(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:Be(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:Yf(t.includeComments,Io,[!0,!1,Io]),includeStrings:Yf(t.includeStrings,Io,[!0,!1,Io]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if(typeof e!="object"||!e)return t;const i={};for(const[n,s]of Object.entries(e))s===!0&&(i[n]=!0);return i}}class sZ extends Di{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:p("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[p("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),p("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),p("inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:p("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:p("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Be(t.enabled,this.defaultValue.enabled),mode:Ki(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:Ki(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:Be(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:Be(t.keepOnBlur,this.defaultValue.keepOnBlur)}}}class oZ extends Di{constructor(){const e={enabled:rs.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:rs.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:p("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:p("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Be(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:Be(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class rZ extends Di{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[p("editor.guides.bracketPairs.true","Enables bracket pair guides."),p("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),p("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:p("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[p("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),p("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),p("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:p("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:p("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:p("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[p("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),p("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),p("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:p("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{bracketPairs:Yf(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:Yf(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:Be(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:Be(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:Yf(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function Yf(o,e,t){const i=t.indexOf(o);return i===-1?e:t[i]}class aZ extends Di{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(117,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[p("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),p("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:p("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:p("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:p("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:p("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[p("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),p("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),p("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),p("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:p("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:p("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:p("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:p("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:p("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:p("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:p("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:p("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertMode:Ki(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:Be(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:Be(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:Be(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:Be(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:Ki(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:Be(t.showIcons,this.defaultValue.showIcons),showStatusBar:Be(t.showStatusBar,this.defaultValue.showStatusBar),preview:Be(t.preview,this.defaultValue.preview),previewMode:Ki(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:Be(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:Be(t.showMethods,this.defaultValue.showMethods),showFunctions:Be(t.showFunctions,this.defaultValue.showFunctions),showConstructors:Be(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:Be(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:Be(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:Be(t.showFields,this.defaultValue.showFields),showVariables:Be(t.showVariables,this.defaultValue.showVariables),showClasses:Be(t.showClasses,this.defaultValue.showClasses),showStructs:Be(t.showStructs,this.defaultValue.showStructs),showInterfaces:Be(t.showInterfaces,this.defaultValue.showInterfaces),showModules:Be(t.showModules,this.defaultValue.showModules),showProperties:Be(t.showProperties,this.defaultValue.showProperties),showEvents:Be(t.showEvents,this.defaultValue.showEvents),showOperators:Be(t.showOperators,this.defaultValue.showOperators),showUnits:Be(t.showUnits,this.defaultValue.showUnits),showValues:Be(t.showValues,this.defaultValue.showValues),showConstants:Be(t.showConstants,this.defaultValue.showConstants),showEnums:Be(t.showEnums,this.defaultValue.showEnums),showEnumMembers:Be(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:Be(t.showKeywords,this.defaultValue.showKeywords),showWords:Be(t.showWords,this.defaultValue.showWords),showColors:Be(t.showColors,this.defaultValue.showColors),showFiles:Be(t.showFiles,this.defaultValue.showFiles),showReferences:Be(t.showReferences,this.defaultValue.showReferences),showFolders:Be(t.showFolders,this.defaultValue.showFolders),showTypeParameters:Be(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:Be(t.showSnippets,this.defaultValue.showSnippets),showUsers:Be(t.showUsers,this.defaultValue.showUsers),showIssues:Be(t.showIssues,this.defaultValue.showIssues)}}}class lZ extends Di{constructor(){super(112,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:p("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:p("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:Be(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:Be(e.selectSubwords,this.defaultValue.selectSubwords)}}}class dZ extends Di{constructor(){super(136,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[p("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),p("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),p("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),p("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:p("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,i){return t.get(2)===2?0:i}}class cZ extends Zb{constructor(){super(144)}compute(e,t,i){const n=t.get(143);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}class uZ extends Di{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:p("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down `Shift`-key (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:p("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[p("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),p("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Be(t.enabled,this.defaultValue.enabled),showDropSelector:Ki(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}class hZ extends Di{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(84,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:p("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:p("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[p("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),p("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Be(t.enabled,this.defaultValue.enabled),showPasteSelector:Ki(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}const gZ="Consolas, 'Courier New', monospace",fZ="Menlo, Monaco, 'Courier New', monospace",pZ="'Droid Sans Mono', 'monospace', monospace",co={fontFamily:It?fZ:ws?pZ:gZ,fontWeight:"normal",fontSize:It?12:14,lineHeight:0,letterSpacing:0},Sf=[];function me(o){return Sf[o.id]=o,o}const Oa={acceptSuggestionOnCommitCharacter:me(new Nt(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:p("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:me(new ki(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",p("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:p("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:me(new NG),accessibilityPageSize:me(new Jt(3,"accessibilityPageSize",10,1,1073741824,{description:p("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:me(new no(4,"ariaLabel",p("editorViewAccessibleLabel","Editor content"))),ariaRequired:me(new Nt(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:me(new Nt(8,"screenReaderAnnounceInlineSuggestion",!0,{description:p("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:me(new ki(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),p("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:p("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:me(new ki(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),p("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:p("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:me(new ki(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",p("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:p("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:me(new ki(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",p("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:p("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:me(new ki(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),p("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:p("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:me(new j0(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],EG,{enumDescriptions:[p("editor.autoIndent.none","The editor will not insert indentation automatically."),p("editor.autoIndent.keep","The editor will keep the current line's indentation."),p("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),p("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),p("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:p("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:me(new Nt(13,"automaticLayout",!1)),autoSurround:me(new ki(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[p("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),p("editor.autoSurround.quotes","Surround with quotes but not brackets."),p("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:p("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:me(new oZ),bracketPairGuides:me(new rZ),stickyTabStops:me(new Nt(115,"stickyTabStops",!1,{description:p("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:me(new Nt(17,"codeLens",!0,{description:p("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:me(new no(18,"codeLensFontFamily","",{description:p("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:me(new Jt(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:p("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:me(new Nt(20,"colorDecorators",!0,{description:p("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:me(new ki(146,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[p("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),p("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),p("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:p("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:me(new Jt(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:p("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:me(new Nt(22,"columnSelection",!1,{description:p("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:me(new TG),contextmenu:me(new Nt(24,"contextmenu",!0)),copyWithSyntaxHighlighting:me(new Nt(25,"copyWithSyntaxHighlighting",!0,{description:p("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:me(new j0(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],MG,{description:p("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:me(new ki(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[p("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),p("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),p("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:p("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:me(new j0(28,"cursorStyle",Vn.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],AG,{description:p("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:me(new Jt(29,"cursorSurroundingLines",0,0,1073741824,{description:p("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:me(new ki(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[p("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),p("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:p("cursorSurroundingLinesStyle","Controls when `#cursorSurroundingLines#` should be enforced.")})),cursorWidth:me(new Jt(31,"cursorWidth",0,0,1073741824,{markdownDescription:p("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:me(new Nt(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:me(new Nt(33,"disableMonospaceOptimizations",!1)),domReadOnly:me(new Nt(34,"domReadOnly",!1)),dragAndDrop:me(new Nt(35,"dragAndDrop",!0,{description:p("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:me(new PG),dropIntoEditor:me(new uZ),stickyScroll:me(new $G),experimentalWhitespaceRendering:me(new ki(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[p("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),p("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),p("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:p("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:me(new no(39,"extraEditorClassName","")),fastScrollSensitivity:me(new Rr(40,"fastScrollSensitivity",5,o=>o<=0?5:o,{markdownDescription:p("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:me(new OG),fixedOverflowWidgets:me(new Nt(42,"fixedOverflowWidgets",!1)),folding:me(new Nt(43,"folding",!0,{description:p("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:me(new ki(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[p("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),p("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:p("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:me(new Nt(45,"foldingHighlight",!0,{description:p("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:me(new Nt(46,"foldingImportsByDefault",!1,{description:p("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:me(new Jt(47,"foldingMaximumRegions",5e3,10,65e3,{description:p("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:me(new Nt(48,"unfoldOnClickAfterEndOfLine",!1,{description:p("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:me(new no(49,"fontFamily",co.fontFamily,{description:p("fontFamily","Controls the font family.")})),fontInfo:me(new FG),fontLigatures2:me(new Po),fontSize:me(new BG),fontWeight:me(new ol),fontVariations:me(new _a),formatOnPaste:me(new Nt(55,"formatOnPaste",!1,{description:p("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:me(new Nt(56,"formatOnType",!1,{description:p("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:me(new Nt(57,"glyphMargin",!0,{description:p("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:me(new WG),hideCursorInOverviewRuler:me(new Nt(59,"hideCursorInOverviewRuler",!1,{description:p("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:me(new VG),inDiffEditor:me(new Nt(61,"inDiffEditor",!1)),letterSpacing:me(new Rr(63,"letterSpacing",co.letterSpacing,o=>Rr.clamp(o,-5,20),{description:p("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:me(new zG),lineDecorationsWidth:me(new jG),lineHeight:me(new KG),lineNumbers:me(new JG),lineNumbersMinChars:me(new Jt(68,"lineNumbersMinChars",5,1,300)),linkedEditing:me(new Nt(69,"linkedEditing",!1,{description:p("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:me(new Nt(70,"links",!0,{description:p("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:me(new ki(71,"matchBrackets","always",["always","near","never"],{description:p("matchBrackets","Highlight matching brackets.")})),minimap:me(new qG),mouseStyle:me(new ki(73,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:me(new Rr(74,"mouseWheelScrollSensitivity",1,o=>o===0?1:o,{markdownDescription:p("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:me(new Nt(75,"mouseWheelZoom",!1,{markdownDescription:p("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:me(new Nt(76,"multiCursorMergeOverlapping",!0,{description:p("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:me(new j0(77,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],GG,{markdownEnumDescriptions:[p("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),p("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:p({},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:me(new ki(78,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[p("multiCursorPaste.spread","Each cursor pastes a single line of the text."),p("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:p("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:me(new Jt(79,"multiCursorLimit",1e4,1,1e5,{markdownDescription:p("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:me(new ki(80,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[p("occurrencesHighlight.off","Does not highlight occurrences."),p("occurrencesHighlight.singleFile","Highlights occurrences only in the current file."),p("occurrencesHighlight.multiFile","Experimental: Highlights occurrences across all valid open files.")],markdownDescription:p("occurrencesHighlight","Controls whether occurrences should be highlighted across open files.")})),overviewRulerBorder:me(new Nt(81,"overviewRulerBorder",!0,{description:p("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:me(new Jt(82,"overviewRulerLanes",3,0,3)),padding:me(new ZG),pasteAs:me(new hZ),parameterHints:me(new YG),peekWidgetDefaultFocus:me(new ki(86,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[p("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),p("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:p("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:me(new Nt(87,"definitionLinkOpensInPeek",!1,{description:p("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:me(new QG),quickSuggestionsDelay:me(new Jt(89,"quickSuggestionsDelay",10,0,1073741824,{description:p("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:me(new Nt(90,"readOnly",!1)),readOnlyMessage:me(new tZ),renameOnType:me(new Nt(92,"renameOnType",!1,{description:p("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:p("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:me(new Nt(93,"renderControlCharacters",!0,{description:p("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:me(new ki(94,"renderFinalNewline",ws?"dimmed":"on",["off","on","dimmed"],{description:p("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:me(new ki(95,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",p("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:p("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:me(new Nt(96,"renderLineHighlightOnlyWhenFocus",!1,{description:p("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:me(new ki(97,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:me(new ki(98,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",p("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),p("renderWhitespace.selection","Render whitespace characters only on selected text."),p("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:p("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:me(new Jt(99,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:me(new Nt(100,"roundedSelection",!0,{description:p("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:me(new eZ),scrollbar:me(new iZ),scrollBeyondLastColumn:me(new Jt(103,"scrollBeyondLastColumn",4,0,1073741824,{description:p("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:me(new Nt(104,"scrollBeyondLastLine",!0,{description:p("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:me(new Nt(105,"scrollPredominantAxis",!0,{description:p("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:me(new Nt(106,"selectionClipboard",!0,{description:p("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:ws})),selectionHighlight:me(new Nt(107,"selectionHighlight",!0,{description:p("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:me(new Nt(108,"selectOnLineNumbers",!0)),showFoldingControls:me(new ki(109,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[p("showFoldingControls.always","Always show the folding controls."),p("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),p("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:p("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:me(new Nt(110,"showUnused",!0,{description:p("showUnused","Controls fading out of unused code.")})),showDeprecated:me(new Nt(138,"showDeprecated",!0,{description:p("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:me(new UG),snippetSuggestions:me(new ki(111,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[p("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),p("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),p("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),p("snippetSuggestions.none","Do not show snippet suggestions.")],description:p("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:me(new lZ),smoothScrolling:me(new Nt(113,"smoothScrolling",!1,{description:p("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:me(new Jt(116,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:me(new aZ),inlineSuggest:me(new sZ),inlineCompletionsAccessibilityVerbose:me(new Nt(147,"inlineCompletionsAccessibilityVerbose",!1,{description:p("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:me(new Jt(118,"suggestFontSize",0,0,1e3,{markdownDescription:p("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:me(new Jt(119,"suggestLineHeight",0,0,1e3,{markdownDescription:p("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:me(new Nt(120,"suggestOnTriggerCharacters",!0,{description:p("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:me(new ki(121,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[p("suggestSelection.first","Always select the first suggestion."),p("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),p("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:p("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:me(new ki(122,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[p("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),p("tabCompletion.off","Disable tab completions."),p("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:p("tabCompletion","Enables tab completions.")})),tabIndex:me(new Jt(123,"tabIndex",0,-1,1073741824)),unicodeHighlight:me(new nZ),unusualLineTerminators:me(new ki(125,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[p("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),p("unusualLineTerminators.off","Unusual line terminators are ignored."),p("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:p("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:me(new Nt(126,"useShadowDOM",!0)),useTabStops:me(new Nt(127,"useTabStops",!0,{description:p("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordBreak:me(new ki(128,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[p("wordBreak.normal","Use the default line break rule."),p("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:p("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSeparators:me(new no(129,"wordSeparators",q9,{description:p("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:me(new ki(130,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[p("wordWrap.off","Lines will never wrap."),p("wordWrap.on","Lines will wrap at the viewport width."),p({},"Lines will wrap at `#editor.wordWrapColumn#`."),p({},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:p({},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:me(new no(131,"wordWrapBreakAfterCharacters"," })]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:me(new no(132,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:me(new Jt(133,"wordWrapColumn",80,1,1073741824,{markdownDescription:p({},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:me(new ki(134,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:me(new ki(135,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:me(new RG),defaultColorDecorators:me(new Nt(145,"defaultColorDecorators",!1,{markdownDescription:p("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:me(new XG),tabFocusMode:me(new Nt(142,"tabFocusMode",!1,{markdownDescription:p("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:me(new Zf),wrappingInfo:me(new cZ),wrappingIndent:me(new dZ),wrappingStrategy:me(new HG)};class mZ{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Sp.isErrorNoTelemetry(e)?new Sp(e.message+` `+e.stack):new Error(e.message+` -`+e.stack):e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const X9=new hZ;function nt(o){Fa(o)||X9.onUnexpectedError(o)}function en(o){Fa(o)||X9.onUnexpectedExternalError(o)}function OP(o){if(o instanceof Error){const{name:e,message:t}=o,i=o.stacktrace||o.stack;return{$isError:!0,name:e,message:t,stack:i,noTelemetry:Sp.isErrorNoTelemetry(o)}}return o}const iw="Canceled";function Fa(o){return o instanceof Mu?!0:o instanceof Error&&o.name===iw&&o.message===iw}class Mu extends Error{constructor(){super(iw),this.name=this.message}}function gZ(){const o=new Error(iw);return o.name=o.message,o}function hr(o){return o?new Error(`Illegal argument: ${o}`):new Error("Illegal argument")}function tM(o){return o?new Error(`Illegal state: ${o}`):new Error("Illegal state")}class fZ extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class Sp extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof Sp)return e;const t=new Sp;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class Ci extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,Ci.prototype)}}function su(o,e){const t=this;let i=!1,n;return function(){return i||(i=!0,n=o.apply(t,arguments)),n}}function iM(o){return typeof o.dispose=="function"&&o.dispose.length===0}function jt(o){if(wt.is(o)){const e=[];for(const t of o)if(t)try{t.dispose()}catch(i){e.push(i)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(o)?[]:o}else if(o)return o.dispose(),o}function Hr(...o){return je(()=>jt(o))}function je(o){return{dispose:su(()=>{o()})}}class de{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{jt(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?de.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&this._toDispose.delete(e)}}de.DISABLE_DISPOSED_WARNING=!1;class q{constructor(){this._store=new de,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}q.None=Object.freeze({dispose(){}});class An{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)===null||t===void 0||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)===null||e===void 0||e.dispose(),this._value=void 0}}class pZ{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}class mZ{constructor(e){this.object=e}dispose(){}}class nM{constructor(){this._store=new Map,this._isDisposed=!1}dispose(){this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{jt(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,i=!1){var n;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),i||(n=this._store.get(e))===null||n===void 0||n.dispose(),this._store.set(e,t)}deleteAndDispose(e){var t;(t=this._store.get(e))===null||t===void 0||t.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}const _Z=globalThis.performance&&typeof globalThis.performance.now=="function";class ds{static create(e){return new ds(e)}constructor(e){this._now=_Z&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}var ye;(function(o){o.None=()=>q.None;function e(O,$){return u(O,()=>{},0,void 0,!0,void 0,$)}o.defer=e;function t(O){return($,K=null,oe)=>{let Le=!1,he;return he=O(se=>{if(!Le)return he?he.dispose():Le=!0,$.call(K,se)},null,oe),Le&&he.dispose(),he}}o.once=t;function i(O,$,K){return d((oe,Le=null,he)=>O(se=>oe.call(Le,$(se)),null,he),K)}o.map=i;function n(O,$,K){return d((oe,Le=null,he)=>O(se=>{$(se),oe.call(Le,se)},null,he),K)}o.forEach=n;function s(O,$,K){return d((oe,Le=null,he)=>O(se=>$(se)&&oe.call(Le,se),null,he),K)}o.filter=s;function r(O){return O}o.signal=r;function a(...O){return($,K=null,oe)=>{const Le=Hr(...O.map(he=>he(se=>$.call(K,se))));return c(Le,oe)}}o.any=a;function l(O,$,K,oe){let Le=K;return i(O,he=>(Le=$(Le,he),Le),oe)}o.reduce=l;function d(O,$){let K;const oe={onWillAddFirstListener(){K=O(Le.fire,Le)},onDidRemoveLastListener(){K==null||K.dispose()}},Le=new W(oe);return $==null||$.add(Le),Le.event}function c(O,$){return $ instanceof Array?$.push(O):$&&$.add(O),O}function u(O,$,K=100,oe=!1,Le=!1,he,se){let V,Q,H,G=0,Z;const $e={leakWarningThreshold:he,onWillAddFirstListener(){V=O(Bt=>{G++,Q=$(Q,Bt),oe&&!H&&(ft.fire(Q),Q=void 0),Z=()=>{const Ce=Q;Q=void 0,H=void 0,(!oe||G>1)&&ft.fire(Ce),G=0},typeof K=="number"?(clearTimeout(H),H=setTimeout(Z,K)):H===void 0&&(H=0,queueMicrotask(Z))})},onWillRemoveListener(){Le&&G>0&&(Z==null||Z())},onDidRemoveLastListener(){Z=void 0,V.dispose()}},ft=new W($e);return se==null||se.add(ft),ft.event}o.debounce=u;function h(O,$=0,K){return o.debounce(O,(oe,Le)=>oe?(oe.push(Le),oe):[Le],$,void 0,!0,void 0,K)}o.accumulate=h;function g(O,$=(oe,Le)=>oe===Le,K){let oe=!0,Le;return s(O,he=>{const se=oe||!$(he,Le);return oe=!1,Le=he,se},K)}o.latch=g;function f(O,$,K){return[o.filter(O,$,K),o.filter(O,oe=>!$(oe),K)]}o.split=f;function m(O,$=!1,K=[],oe){let Le=K.slice(),he=O(Q=>{Le?Le.push(Q):V.fire(Q)});oe&&oe.add(he);const se=()=>{Le==null||Le.forEach(Q=>V.fire(Q)),Le=null},V=new W({onWillAddFirstListener(){he||(he=O(Q=>V.fire(Q)),oe&&oe.add(he))},onDidAddFirstListener(){Le&&($?setTimeout(se):se())},onDidRemoveLastListener(){he&&he.dispose(),he=null}});return oe&&oe.add(V),V.event}o.buffer=m;function v(O,$){return(oe,Le,he)=>{const se=$(new b);return O(function(V){const Q=se.evaluate(V);Q!==_&&oe.call(Le,Q)},void 0,he)}}o.chain=v;const _=Symbol("HaltChainable");class b{constructor(){this.steps=[]}map($){return this.steps.push($),this}forEach($){return this.steps.push(K=>($(K),K)),this}filter($){return this.steps.push(K=>$(K)?K:_),this}reduce($,K){let oe=K;return this.steps.push(Le=>(oe=$(oe,Le),oe)),this}latch($=(K,oe)=>K===oe){let K=!0,oe;return this.steps.push(Le=>{const he=K||!$(Le,oe);return K=!1,oe=Le,he?Le:_}),this}evaluate($){for(const K of this.steps)if($=K($),$===_)break;return $}}function C(O,$,K=oe=>oe){const oe=(...V)=>se.fire(K(...V)),Le=()=>O.on($,oe),he=()=>O.removeListener($,oe),se=new W({onWillAddFirstListener:Le,onDidRemoveLastListener:he});return se.event}o.fromNodeEventEmitter=C;function w(O,$,K=oe=>oe){const oe=(...V)=>se.fire(K(...V)),Le=()=>O.addEventListener($,oe),he=()=>O.removeEventListener($,oe),se=new W({onWillAddFirstListener:Le,onDidRemoveLastListener:he});return se.event}o.fromDOMEventEmitter=w;function S(O){return new Promise($=>t(O)($))}o.toPromise=S;function x(O){const $=new W;return O.then(K=>{$.fire(K)},()=>{$.fire(void 0)}).finally(()=>{$.dispose()}),$.event}o.fromPromise=x;function y(O,$,K){return $(K),O(oe=>$(oe))}o.runAndSubscribe=y;function I(O,$){let K=null;function oe(he){K==null||K.dispose(),K=new de,$(he,K)}oe(void 0);const Le=O(he=>oe(he));return je(()=>{Le.dispose(),K==null||K.dispose()})}o.runAndSubscribeWithStore=I;class E{constructor($,K){this._observable=$,this._counter=0,this._hasChanged=!1;const oe={onWillAddFirstListener:()=>{$.addObserver(this)},onDidRemoveLastListener:()=>{$.removeObserver(this)}};this.emitter=new W(oe),K&&K.add(this.emitter)}beginUpdate($){this._counter++}handlePossibleChange($){}handleChange($,K){this._hasChanged=!0}endUpdate($){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function R(O,$){return new E(O,$).emitter.event}o.fromObservable=R;function j(O){return($,K,oe)=>{let Le=0,he=!1;const se={beginUpdate(){Le++},endUpdate(){Le--,Le===0&&(O.reportChanges(),he&&(he=!1,$.call(K)))},handlePossibleChange(){},handleChange(){he=!0}};O.addObserver(se),O.reportChanges();const V={dispose(){O.removeObserver(se)}};return oe instanceof de?oe.add(V):Array.isArray(oe)&&oe.push(V),V}}o.fromObservableLight=j})(ye||(ye={}));class yp{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${yp._idPool++}`,yp.all.add(this)}start(e){this._stopWatch=new ds,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}yp.all=new Set;yp._idPool=0;let vZ=-1;class bZ{constructor(e,t=Math.random().toString(18).slice(2,5)){this.threshold=e,this.name=t,this._warnCountdown=0}dispose(){var e;(e=this._stacks)===null||e===void 0||e.clear()}check(e,t){const i=this.threshold;if(i<=0||t{const s=this._stacks.get(e.value)||0;this._stacks.set(e.value,s-1)}}}class sM{static create(){var e;return new sM((e=new Error().stack)!==null&&e!==void 0?e:"")}constructor(e){this.value=e}print(){console.warn(this.value.split(` +`+e.stack):e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const X9=new mZ;function nt(o){Fa(o)||X9.onUnexpectedError(o)}function en(o){Fa(o)||X9.onUnexpectedExternalError(o)}function OP(o){if(o instanceof Error){const{name:e,message:t}=o,i=o.stacktrace||o.stack;return{$isError:!0,name:e,message:t,stack:i,noTelemetry:Sp.isErrorNoTelemetry(o)}}return o}const iw="Canceled";function Fa(o){return o instanceof Mu?!0:o instanceof Error&&o.name===iw&&o.message===iw}class Mu extends Error{constructor(){super(iw),this.name=this.message}}function _Z(){const o=new Error(iw);return o.name=o.message,o}function hr(o){return o?new Error(`Illegal argument: ${o}`):new Error("Illegal argument")}function tM(o){return o?new Error(`Illegal state: ${o}`):new Error("Illegal state")}class vZ extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class Sp extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof Sp)return e;const t=new Sp;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class Ci extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,Ci.prototype)}}function su(o,e){const t=this;let i=!1,n;return function(){return i||(i=!0,n=o.apply(t,arguments)),n}}function iM(o){return typeof o.dispose=="function"&&o.dispose.length===0}function jt(o){if(wt.is(o)){const e=[];for(const t of o)if(t)try{t.dispose()}catch(i){e.push(i)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(o)?[]:o}else if(o)return o.dispose(),o}function Hr(...o){return je(()=>jt(o))}function je(o){return{dispose:su(()=>{o()})}}class de{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{jt(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?de.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&this._toDispose.delete(e)}}de.DISABLE_DISPOSED_WARNING=!1;class q{constructor(){this._store=new de,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}q.None=Object.freeze({dispose(){}});class An{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)===null||t===void 0||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)===null||e===void 0||e.dispose(),this._value=void 0}}class bZ{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}class CZ{constructor(e){this.object=e}dispose(){}}class nM{constructor(){this._store=new Map,this._isDisposed=!1}dispose(){this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{jt(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,i=!1){var n;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),i||(n=this._store.get(e))===null||n===void 0||n.dispose(),this._store.set(e,t)}deleteAndDispose(e){var t;(t=this._store.get(e))===null||t===void 0||t.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}const wZ=globalThis.performance&&typeof globalThis.performance.now=="function";class ds{static create(e){return new ds(e)}constructor(e){this._now=wZ&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}var ye;(function(o){o.None=()=>q.None;function e(O,$){return u(O,()=>{},0,void 0,!0,void 0,$)}o.defer=e;function t(O){return($,K=null,oe)=>{let Le=!1,he;return he=O(se=>{if(!Le)return he?he.dispose():Le=!0,$.call(K,se)},null,oe),Le&&he.dispose(),he}}o.once=t;function i(O,$,K){return d((oe,Le=null,he)=>O(se=>oe.call(Le,$(se)),null,he),K)}o.map=i;function n(O,$,K){return d((oe,Le=null,he)=>O(se=>{$(se),oe.call(Le,se)},null,he),K)}o.forEach=n;function s(O,$,K){return d((oe,Le=null,he)=>O(se=>$(se)&&oe.call(Le,se),null,he),K)}o.filter=s;function r(O){return O}o.signal=r;function a(...O){return($,K=null,oe)=>{const Le=Hr(...O.map(he=>he(se=>$.call(K,se))));return c(Le,oe)}}o.any=a;function l(O,$,K,oe){let Le=K;return i(O,he=>(Le=$(Le,he),Le),oe)}o.reduce=l;function d(O,$){let K;const oe={onWillAddFirstListener(){K=O(Le.fire,Le)},onDidRemoveLastListener(){K==null||K.dispose()}},Le=new W(oe);return $==null||$.add(Le),Le.event}function c(O,$){return $ instanceof Array?$.push(O):$&&$.add(O),O}function u(O,$,K=100,oe=!1,Le=!1,he,se){let V,Q,H,G=0,Z;const $e={leakWarningThreshold:he,onWillAddFirstListener(){V=O(Bt=>{G++,Q=$(Q,Bt),oe&&!H&&(ft.fire(Q),Q=void 0),Z=()=>{const Ce=Q;Q=void 0,H=void 0,(!oe||G>1)&&ft.fire(Ce),G=0},typeof K=="number"?(clearTimeout(H),H=setTimeout(Z,K)):H===void 0&&(H=0,queueMicrotask(Z))})},onWillRemoveListener(){Le&&G>0&&(Z==null||Z())},onDidRemoveLastListener(){Z=void 0,V.dispose()}},ft=new W($e);return se==null||se.add(ft),ft.event}o.debounce=u;function h(O,$=0,K){return o.debounce(O,(oe,Le)=>oe?(oe.push(Le),oe):[Le],$,void 0,!0,void 0,K)}o.accumulate=h;function g(O,$=(oe,Le)=>oe===Le,K){let oe=!0,Le;return s(O,he=>{const se=oe||!$(he,Le);return oe=!1,Le=he,se},K)}o.latch=g;function f(O,$,K){return[o.filter(O,$,K),o.filter(O,oe=>!$(oe),K)]}o.split=f;function m(O,$=!1,K=[],oe){let Le=K.slice(),he=O(Q=>{Le?Le.push(Q):V.fire(Q)});oe&&oe.add(he);const se=()=>{Le==null||Le.forEach(Q=>V.fire(Q)),Le=null},V=new W({onWillAddFirstListener(){he||(he=O(Q=>V.fire(Q)),oe&&oe.add(he))},onDidAddFirstListener(){Le&&($?setTimeout(se):se())},onDidRemoveLastListener(){he&&he.dispose(),he=null}});return oe&&oe.add(V),V.event}o.buffer=m;function v(O,$){return(oe,Le,he)=>{const se=$(new b);return O(function(V){const Q=se.evaluate(V);Q!==_&&oe.call(Le,Q)},void 0,he)}}o.chain=v;const _=Symbol("HaltChainable");class b{constructor(){this.steps=[]}map($){return this.steps.push($),this}forEach($){return this.steps.push(K=>($(K),K)),this}filter($){return this.steps.push(K=>$(K)?K:_),this}reduce($,K){let oe=K;return this.steps.push(Le=>(oe=$(oe,Le),oe)),this}latch($=(K,oe)=>K===oe){let K=!0,oe;return this.steps.push(Le=>{const he=K||!$(Le,oe);return K=!1,oe=Le,he?Le:_}),this}evaluate($){for(const K of this.steps)if($=K($),$===_)break;return $}}function C(O,$,K=oe=>oe){const oe=(...V)=>se.fire(K(...V)),Le=()=>O.on($,oe),he=()=>O.removeListener($,oe),se=new W({onWillAddFirstListener:Le,onDidRemoveLastListener:he});return se.event}o.fromNodeEventEmitter=C;function w(O,$,K=oe=>oe){const oe=(...V)=>se.fire(K(...V)),Le=()=>O.addEventListener($,oe),he=()=>O.removeEventListener($,oe),se=new W({onWillAddFirstListener:Le,onDidRemoveLastListener:he});return se.event}o.fromDOMEventEmitter=w;function S(O){return new Promise($=>t(O)($))}o.toPromise=S;function x(O){const $=new W;return O.then(K=>{$.fire(K)},()=>{$.fire(void 0)}).finally(()=>{$.dispose()}),$.event}o.fromPromise=x;function y(O,$,K){return $(K),O(oe=>$(oe))}o.runAndSubscribe=y;function I(O,$){let K=null;function oe(he){K==null||K.dispose(),K=new de,$(he,K)}oe(void 0);const Le=O(he=>oe(he));return je(()=>{Le.dispose(),K==null||K.dispose()})}o.runAndSubscribeWithStore=I;class E{constructor($,K){this._observable=$,this._counter=0,this._hasChanged=!1;const oe={onWillAddFirstListener:()=>{$.addObserver(this)},onDidRemoveLastListener:()=>{$.removeObserver(this)}};this.emitter=new W(oe),K&&K.add(this.emitter)}beginUpdate($){this._counter++}handlePossibleChange($){}handleChange($,K){this._hasChanged=!0}endUpdate($){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function R(O,$){return new E(O,$).emitter.event}o.fromObservable=R;function j(O){return($,K,oe)=>{let Le=0,he=!1;const se={beginUpdate(){Le++},endUpdate(){Le--,Le===0&&(O.reportChanges(),he&&(he=!1,$.call(K)))},handlePossibleChange(){},handleChange(){he=!0}};O.addObserver(se),O.reportChanges();const V={dispose(){O.removeObserver(se)}};return oe instanceof de?oe.add(V):Array.isArray(oe)&&oe.push(V),V}}o.fromObservableLight=j})(ye||(ye={}));class yp{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${yp._idPool++}`,yp.all.add(this)}start(e){this._stopWatch=new ds,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}yp.all=new Set;yp._idPool=0;let SZ=-1;class yZ{constructor(e,t=Math.random().toString(18).slice(2,5)){this.threshold=e,this.name=t,this._warnCountdown=0}dispose(){var e;(e=this._stacks)===null||e===void 0||e.clear()}check(e,t){const i=this.threshold;if(i<=0||t{const s=this._stacks.get(e.value)||0;this._stacks.set(e.value,s-1)}}}class sM{static create(){var e;return new sM((e=new Error().stack)!==null&&e!==void 0?e:"")}constructor(e){this.value=e}print(){console.warn(this.value.split(` `).slice(2).join(` -`))}}class kD{constructor(e){this.value=e}}const CZ=2;let W=class{constructor(e){var t,i,n,s,r;this._size=0,this._options=e,this._leakageMon=!((t=this._options)===null||t===void 0)&&t.leakWarningThreshold?new bZ((n=(i=this._options)===null||i===void 0?void 0:i.leakWarningThreshold)!==null&&n!==void 0?n:vZ):void 0,this._perfMon=!((s=this._options)===null||s===void 0)&&s._profName?new yp(this._options._profName):void 0,this._deliveryQueue=(r=this._options)===null||r===void 0?void 0:r.deliveryQueue}dispose(){var e,t,i,n;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)===null||e===void 0?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(i=(t=this._options)===null||t===void 0?void 0:t.onDidRemoveLastListener)===null||i===void 0||i.call(t),(n=this._leakageMon)===null||n===void 0||n.dispose())}get event(){var e;return(e=this._event)!==null&&e!==void 0||(this._event=(t,i,n)=>{var s,r,a,l,d;if(this._leakageMon&&this._size>this._leakageMon.threshold*3)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),q.None;if(this._disposed)return q.None;i&&(t=t.bind(i));const c=new kD(t);let u;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(c.stack=sM.create(),u=this._leakageMon.check(c.stack,this._size+1)),this._listeners?this._listeners instanceof kD?((d=this._deliveryQueue)!==null&&d!==void 0||(this._deliveryQueue=new Q9),this._listeners=[this._listeners,c]):this._listeners.push(c):((r=(s=this._options)===null||s===void 0?void 0:s.onWillAddFirstListener)===null||r===void 0||r.call(s,this),this._listeners=c,(l=(a=this._options)===null||a===void 0?void 0:a.onDidAddFirstListener)===null||l===void 0||l.call(a,this)),this._size++;const h=je(()=>{u==null||u(),this._removeListener(c)});return n instanceof de?n.add(h):Array.isArray(n)&&n.push(h),h}),this._event}_removeListener(e){var t,i,n,s;if((i=(t=this._options)===null||t===void 0?void 0:t.onWillRemoveListener)===null||i===void 0||i.call(t,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(s=(n=this._options)===null||n===void 0?void 0:n.onDidRemoveLastListener)===null||s===void 0||s.call(n,this),this._size=0;return}const r=this._listeners,a=r.indexOf(e);if(a===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,r[a]=void 0;const l=this._deliveryQueue.current===this;if(this._size*CZ<=r.length){let d=0;for(let c=0;c0}};const wZ=()=>new Q9;class Q9{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class Yh extends W{constructor(e){super(e),this._isPaused=0,this._eventQueue=new Ns,this._mergeFn=e==null?void 0:e.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}}class J9 extends Yh{constructor(e){var t;super(e),this._delay=(t=e.delay)!==null&&t!==void 0?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}}class SZ extends W{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e==null?void 0:e.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(t=>super.fire(t)),this._queuedEvents=[]}))}}class yZ{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new W({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),je(su(()=>{this.hasListeners&&this.unhook(t);const n=this.events.indexOf(t);this.events.splice(n,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(t=>this.emitter.fire(t))}unhook(e){e.listener&&e.listener.dispose(),e.listener=null}dispose(){this.emitter.dispose()}}class oM{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e(s=>{const r=this.buffers[this.buffers.length-1];r?r.push(()=>t.call(i,s)):t.call(i,s)},void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach(n=>n()),i}}class FP{constructor(){this.listening=!1,this.inputEvent=ye.None,this.inputEventListener=q.None,this.emitter=new W({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}const e7=Object.freeze(function(o,e){const t=setTimeout(o.bind(e),0);return{dispose(){clearTimeout(t)}}});var vt;(function(o){function e(t){return t===o.None||t===o.Cancelled||t instanceof f1?!0:!t||typeof t!="object"?!1:typeof t.isCancellationRequested=="boolean"&&typeof t.onCancellationRequested=="function"}o.isCancellationToken=e,o.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ye.None}),o.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:e7})})(vt||(vt={}));class f1{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?e7:(this._emitter||(this._emitter=new W),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}let tn=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new f1),this._token}cancel(){this._token?this._token instanceof f1&&this._token.cancel():this._token=vt.Cancelled}dispose(e=!1){var t;e&&this.cancel(),(t=this._parentListener)===null||t===void 0||t.dispose(),this._token?this._token instanceof f1&&this._token.dispose():this._token=vt.None}};class rM{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const p1=new rM,Ok=new rM,Fk=new rM,t7=new Array(230),LZ=Object.create(null),DZ=Object.create(null),aM=[];for(let o=0;o<=193;o++)aM[o]=-1;(function(){const o="",e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",o,o],[1,1,"Hyper",0,o,0,o,o,o],[1,2,"Super",0,o,0,o,o,o],[1,3,"Fn",0,o,0,o,o,o],[1,4,"FnLock",0,o,0,o,o,o],[1,5,"Suspend",0,o,0,o,o,o],[1,6,"Resume",0,o,0,o,o,o],[1,7,"Turbo",0,o,0,o,o,o],[1,8,"Sleep",0,o,0,"VK_SLEEP",o,o],[1,9,"WakeUp",0,o,0,o,o,o],[0,10,"KeyA",31,"A",65,"VK_A",o,o],[0,11,"KeyB",32,"B",66,"VK_B",o,o],[0,12,"KeyC",33,"C",67,"VK_C",o,o],[0,13,"KeyD",34,"D",68,"VK_D",o,o],[0,14,"KeyE",35,"E",69,"VK_E",o,o],[0,15,"KeyF",36,"F",70,"VK_F",o,o],[0,16,"KeyG",37,"G",71,"VK_G",o,o],[0,17,"KeyH",38,"H",72,"VK_H",o,o],[0,18,"KeyI",39,"I",73,"VK_I",o,o],[0,19,"KeyJ",40,"J",74,"VK_J",o,o],[0,20,"KeyK",41,"K",75,"VK_K",o,o],[0,21,"KeyL",42,"L",76,"VK_L",o,o],[0,22,"KeyM",43,"M",77,"VK_M",o,o],[0,23,"KeyN",44,"N",78,"VK_N",o,o],[0,24,"KeyO",45,"O",79,"VK_O",o,o],[0,25,"KeyP",46,"P",80,"VK_P",o,o],[0,26,"KeyQ",47,"Q",81,"VK_Q",o,o],[0,27,"KeyR",48,"R",82,"VK_R",o,o],[0,28,"KeyS",49,"S",83,"VK_S",o,o],[0,29,"KeyT",50,"T",84,"VK_T",o,o],[0,30,"KeyU",51,"U",85,"VK_U",o,o],[0,31,"KeyV",52,"V",86,"VK_V",o,o],[0,32,"KeyW",53,"W",87,"VK_W",o,o],[0,33,"KeyX",54,"X",88,"VK_X",o,o],[0,34,"KeyY",55,"Y",89,"VK_Y",o,o],[0,35,"KeyZ",56,"Z",90,"VK_Z",o,o],[0,36,"Digit1",22,"1",49,"VK_1",o,o],[0,37,"Digit2",23,"2",50,"VK_2",o,o],[0,38,"Digit3",24,"3",51,"VK_3",o,o],[0,39,"Digit4",25,"4",52,"VK_4",o,o],[0,40,"Digit5",26,"5",53,"VK_5",o,o],[0,41,"Digit6",27,"6",54,"VK_6",o,o],[0,42,"Digit7",28,"7",55,"VK_7",o,o],[0,43,"Digit8",29,"8",56,"VK_8",o,o],[0,44,"Digit9",30,"9",57,"VK_9",o,o],[0,45,"Digit0",21,"0",48,"VK_0",o,o],[1,46,"Enter",3,"Enter",13,"VK_RETURN",o,o],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",o,o],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",o,o],[1,49,"Tab",2,"Tab",9,"VK_TAB",o,o],[1,50,"Space",10,"Space",32,"VK_SPACE",o,o],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,o,0,o,o,o],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",o,o],[1,64,"F1",59,"F1",112,"VK_F1",o,o],[1,65,"F2",60,"F2",113,"VK_F2",o,o],[1,66,"F3",61,"F3",114,"VK_F3",o,o],[1,67,"F4",62,"F4",115,"VK_F4",o,o],[1,68,"F5",63,"F5",116,"VK_F5",o,o],[1,69,"F6",64,"F6",117,"VK_F6",o,o],[1,70,"F7",65,"F7",118,"VK_F7",o,o],[1,71,"F8",66,"F8",119,"VK_F8",o,o],[1,72,"F9",67,"F9",120,"VK_F9",o,o],[1,73,"F10",68,"F10",121,"VK_F10",o,o],[1,74,"F11",69,"F11",122,"VK_F11",o,o],[1,75,"F12",70,"F12",123,"VK_F12",o,o],[1,76,"PrintScreen",0,o,0,o,o,o],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",o,o],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",o,o],[1,79,"Insert",19,"Insert",45,"VK_INSERT",o,o],[1,80,"Home",14,"Home",36,"VK_HOME",o,o],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",o,o],[1,82,"Delete",20,"Delete",46,"VK_DELETE",o,o],[1,83,"End",13,"End",35,"VK_END",o,o],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",o,o],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",o],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",o],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",o],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",o],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",o,o],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",o,o],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",o,o],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",o,o],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",o,o],[1,94,"NumpadEnter",3,o,0,o,o,o],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",o,o],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",o,o],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",o,o],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",o,o],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",o,o],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",o,o],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",o,o],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",o,o],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",o,o],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",o,o],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",o,o],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",o,o],[1,107,"ContextMenu",58,"ContextMenu",93,o,o,o],[1,108,"Power",0,o,0,o,o,o],[1,109,"NumpadEqual",0,o,0,o,o,o],[1,110,"F13",71,"F13",124,"VK_F13",o,o],[1,111,"F14",72,"F14",125,"VK_F14",o,o],[1,112,"F15",73,"F15",126,"VK_F15",o,o],[1,113,"F16",74,"F16",127,"VK_F16",o,o],[1,114,"F17",75,"F17",128,"VK_F17",o,o],[1,115,"F18",76,"F18",129,"VK_F18",o,o],[1,116,"F19",77,"F19",130,"VK_F19",o,o],[1,117,"F20",78,"F20",131,"VK_F20",o,o],[1,118,"F21",79,"F21",132,"VK_F21",o,o],[1,119,"F22",80,"F22",133,"VK_F22",o,o],[1,120,"F23",81,"F23",134,"VK_F23",o,o],[1,121,"F24",82,"F24",135,"VK_F24",o,o],[1,122,"Open",0,o,0,o,o,o],[1,123,"Help",0,o,0,o,o,o],[1,124,"Select",0,o,0,o,o,o],[1,125,"Again",0,o,0,o,o,o],[1,126,"Undo",0,o,0,o,o,o],[1,127,"Cut",0,o,0,o,o,o],[1,128,"Copy",0,o,0,o,o,o],[1,129,"Paste",0,o,0,o,o,o],[1,130,"Find",0,o,0,o,o,o],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",o,o],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",o,o],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",o,o],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",o,o],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",o,o],[1,136,"KanaMode",0,o,0,o,o,o],[0,137,"IntlYen",0,o,0,o,o,o],[1,138,"Convert",0,o,0,o,o,o],[1,139,"NonConvert",0,o,0,o,o,o],[1,140,"Lang1",0,o,0,o,o,o],[1,141,"Lang2",0,o,0,o,o,o],[1,142,"Lang3",0,o,0,o,o,o],[1,143,"Lang4",0,o,0,o,o,o],[1,144,"Lang5",0,o,0,o,o,o],[1,145,"Abort",0,o,0,o,o,o],[1,146,"Props",0,o,0,o,o,o],[1,147,"NumpadParenLeft",0,o,0,o,o,o],[1,148,"NumpadParenRight",0,o,0,o,o,o],[1,149,"NumpadBackspace",0,o,0,o,o,o],[1,150,"NumpadMemoryStore",0,o,0,o,o,o],[1,151,"NumpadMemoryRecall",0,o,0,o,o,o],[1,152,"NumpadMemoryClear",0,o,0,o,o,o],[1,153,"NumpadMemoryAdd",0,o,0,o,o,o],[1,154,"NumpadMemorySubtract",0,o,0,o,o,o],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",o,o],[1,156,"NumpadClearEntry",0,o,0,o,o,o],[1,0,o,5,"Ctrl",17,"VK_CONTROL",o,o],[1,0,o,4,"Shift",16,"VK_SHIFT",o,o],[1,0,o,6,"Alt",18,"VK_MENU",o,o],[1,0,o,57,"Meta",91,"VK_COMMAND",o,o],[1,157,"ControlLeft",5,o,0,"VK_LCONTROL",o,o],[1,158,"ShiftLeft",4,o,0,"VK_LSHIFT",o,o],[1,159,"AltLeft",6,o,0,"VK_LMENU",o,o],[1,160,"MetaLeft",57,o,0,"VK_LWIN",o,o],[1,161,"ControlRight",5,o,0,"VK_RCONTROL",o,o],[1,162,"ShiftRight",4,o,0,"VK_RSHIFT",o,o],[1,163,"AltRight",6,o,0,"VK_RMENU",o,o],[1,164,"MetaRight",57,o,0,"VK_RWIN",o,o],[1,165,"BrightnessUp",0,o,0,o,o,o],[1,166,"BrightnessDown",0,o,0,o,o,o],[1,167,"MediaPlay",0,o,0,o,o,o],[1,168,"MediaRecord",0,o,0,o,o,o],[1,169,"MediaFastForward",0,o,0,o,o,o],[1,170,"MediaRewind",0,o,0,o,o,o],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",o,o],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",o,o],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",o,o],[1,174,"Eject",0,o,0,o,o,o],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",o,o],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",o,o],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",o,o],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",o,o],[1,179,"LaunchApp1",0,o,0,"VK_MEDIA_LAUNCH_APP1",o,o],[1,180,"SelectTask",0,o,0,o,o,o],[1,181,"LaunchScreenSaver",0,o,0,o,o,o],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",o,o],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",o,o],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",o,o],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",o,o],[1,186,"BrowserStop",0,o,0,"VK_BROWSER_STOP",o,o],[1,187,"BrowserRefresh",0,o,0,"VK_BROWSER_REFRESH",o,o],[1,188,"BrowserFavorites",0,o,0,"VK_BROWSER_FAVORITES",o,o],[1,189,"ZoomToggle",0,o,0,o,o,o],[1,190,"MailReply",0,o,0,o,o,o],[1,191,"MailForward",0,o,0,o,o,o],[1,192,"MailSend",0,o,0,o,o,o],[1,0,o,114,"KeyInComposition",229,o,o,o],[1,0,o,116,"ABNT_C2",194,"VK_ABNT_C2",o,o],[1,0,o,96,"OEM_8",223,"VK_OEM_8",o,o],[1,0,o,0,o,0,"VK_KANA",o,o],[1,0,o,0,o,0,"VK_HANGUL",o,o],[1,0,o,0,o,0,"VK_JUNJA",o,o],[1,0,o,0,o,0,"VK_FINAL",o,o],[1,0,o,0,o,0,"VK_HANJA",o,o],[1,0,o,0,o,0,"VK_KANJI",o,o],[1,0,o,0,o,0,"VK_CONVERT",o,o],[1,0,o,0,o,0,"VK_NONCONVERT",o,o],[1,0,o,0,o,0,"VK_ACCEPT",o,o],[1,0,o,0,o,0,"VK_MODECHANGE",o,o],[1,0,o,0,o,0,"VK_SELECT",o,o],[1,0,o,0,o,0,"VK_PRINT",o,o],[1,0,o,0,o,0,"VK_EXECUTE",o,o],[1,0,o,0,o,0,"VK_SNAPSHOT",o,o],[1,0,o,0,o,0,"VK_HELP",o,o],[1,0,o,0,o,0,"VK_APPS",o,o],[1,0,o,0,o,0,"VK_PROCESSKEY",o,o],[1,0,o,0,o,0,"VK_PACKET",o,o],[1,0,o,0,o,0,"VK_DBE_SBCSCHAR",o,o],[1,0,o,0,o,0,"VK_DBE_DBCSCHAR",o,o],[1,0,o,0,o,0,"VK_ATTN",o,o],[1,0,o,0,o,0,"VK_CRSEL",o,o],[1,0,o,0,o,0,"VK_EXSEL",o,o],[1,0,o,0,o,0,"VK_EREOF",o,o],[1,0,o,0,o,0,"VK_PLAY",o,o],[1,0,o,0,o,0,"VK_ZOOM",o,o],[1,0,o,0,o,0,"VK_NONAME",o,o],[1,0,o,0,o,0,"VK_PA1",o,o],[1,0,o,0,o,0,"VK_OEM_CLEAR",o,o]],t=[],i=[];for(const n of e){const[s,r,a,l,d,c,u,h,g]=n;if(i[r]||(i[r]=!0,LZ[a]=r,DZ[a.toLowerCase()]=r,s&&(aM[r]=l)),!t[l]){if(t[l]=!0,!d)throw new Error(`String representation missing for key code ${l} around scan code ${a}`);p1.define(l,d),Ok.define(l,h||d),Fk.define(l,g||h||d)}c&&(t7[c]=l)}})();var vd;(function(o){function e(a){return p1.keyCodeToStr(a)}o.toString=e;function t(a){return p1.strToKeyCode(a)}o.fromString=t;function i(a){return Ok.keyCodeToStr(a)}o.toUserSettingsUS=i;function n(a){return Fk.keyCodeToStr(a)}o.toUserSettingsGeneral=n;function s(a){return Ok.strToKeyCode(a)||Fk.strToKeyCode(a)}o.fromUserSettings=s;function r(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return p1.keyCodeToStr(a)}o.toElectronAccelerator=r})(vd||(vd={}));function fn(o,e){const t=(e&65535)<<16>>>0;return(o|t)>>>0}var BP={};let Xf;const ID=globalThis.vscode;if(typeof ID<"u"&&typeof ID.process<"u"){const o=ID.process;Xf={get platform(){return o.platform},get arch(){return o.arch},get env(){return o.env},cwd(){return o.cwd()}}}else typeof process<"u"?Xf={get platform(){return process.platform},get arch(){return process.arch},get env(){return BP},cwd(){return BP.VSCODE_CWD||process.cwd()}}:Xf={get platform(){return is?"win32":It?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const nw=Xf.cwd,sw=Xf.env,xZ=Xf.platform,kZ=65,IZ=97,EZ=90,NZ=122,Wc=46,ms=47,Do=92,tc=58,TZ=63;class i7 extends Error{constructor(e,t,i){let n;typeof t=="string"&&t.indexOf("not ")===0?(n="must not be",t=t.replace(/^not /,"")):n="must be";const s=e.indexOf(".")!==-1?"property":"argument";let r=`The "${e}" ${s} ${n} of type ${t}`;r+=`. Received type ${typeof i}`,super(r),this.code="ERR_INVALID_ARG_TYPE"}}function MZ(o,e){if(o===null||typeof o!="object")throw new i7(e,"Object",o)}function xn(o,e){if(typeof o!="string")throw new i7(e,"string",o)}const Au=xZ==="win32";function Kt(o){return o===ms||o===Do}function Bk(o){return o===ms}function ic(o){return o>=kZ&&o<=EZ||o>=IZ&&o<=NZ}function ow(o,e,t,i){let n="",s=0,r=-1,a=0,l=0;for(let d=0;d<=o.length;++d){if(d2){const c=n.lastIndexOf(t);c===-1?(n="",s=0):(n=n.slice(0,c),s=n.length-1-n.lastIndexOf(t)),r=d,a=0;continue}else if(n.length!==0){n="",s=0,r=d,a=0;continue}}e&&(n+=n.length>0?`${t}..`:"..",s=2)}else n.length>0?n+=`${t}${o.slice(r+1,d)}`:n=o.slice(r+1,d),s=d-r-1;r=d,a=0}else l===Wc&&a!==-1?++a:a=-1}return n}function n7(o,e){MZ(e,"pathObject");const t=e.dir||e.root,i=e.base||`${e.name||""}${e.ext||""}`;return t?t===e.root?`${t}${i}`:`${t}${o}${i}`:i}const ao={resolve(...o){let e="",t="",i=!1;for(let n=o.length-1;n>=-1;n--){let s;if(n>=0){if(s=o[n],xn(s,"path"),s.length===0)continue}else e.length===0?s=nw():(s=sw[`=${e}`]||nw(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===Do)&&(s=`${e}\\`));const r=s.length;let a=0,l="",d=!1;const c=s.charCodeAt(0);if(r===1)Kt(c)&&(a=1,d=!0);else if(Kt(c))if(d=!0,Kt(s.charCodeAt(1))){let u=2,h=u;for(;u2&&Kt(s.charCodeAt(2))&&(d=!0,a=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(i){if(e.length>0)break}else if(t=`${s.slice(a)}\\${t}`,i=d,d&&e.length>0)break}return t=ow(t,!i,"\\",Kt),i?`${e}\\${t}`:`${e}${t}`||"."},normalize(o){xn(o,"path");const e=o.length;if(e===0)return".";let t=0,i,n=!1;const s=o.charCodeAt(0);if(e===1)return Bk(s)?"\\":o;if(Kt(s))if(n=!0,Kt(o.charCodeAt(1))){let a=2,l=a;for(;a2&&Kt(o.charCodeAt(2))&&(n=!0,t=3));let r=t0&&Kt(o.charCodeAt(e-1))&&(r+="\\"),i===void 0?n?`\\${r}`:r:n?`${i}\\${r}`:`${i}${r}`},isAbsolute(o){xn(o,"path");const e=o.length;if(e===0)return!1;const t=o.charCodeAt(0);return Kt(t)||e>2&&ic(t)&&o.charCodeAt(1)===tc&&Kt(o.charCodeAt(2))},join(...o){if(o.length===0)return".";let e,t;for(let s=0;s0&&(e===void 0?e=t=r:e+=`\\${r}`)}if(e===void 0)return".";let i=!0,n=0;if(typeof t=="string"&&Kt(t.charCodeAt(0))){++n;const s=t.length;s>1&&Kt(t.charCodeAt(1))&&(++n,s>2&&(Kt(t.charCodeAt(2))?++n:i=!1))}if(i){for(;n=2&&(e=`\\${e.slice(n)}`)}return ao.normalize(e)},relative(o,e){if(xn(o,"from"),xn(e,"to"),o===e)return"";const t=ao.resolve(o),i=ao.resolve(e);if(t===i||(o=t.toLowerCase(),e=i.toLowerCase(),o===e))return"";let n=0;for(;nn&&o.charCodeAt(s-1)===Do;)s--;const r=s-n;let a=0;for(;aa&&e.charCodeAt(l-1)===Do;)l--;const d=l-a,c=rc){if(e.charCodeAt(a+h)===Do)return i.slice(a+h+1);if(h===2)return i.slice(a+h)}r>c&&(o.charCodeAt(n+h)===Do?u=h:h===2&&(u=3)),u===-1&&(u=0)}let g="";for(h=n+u+1;h<=s;++h)(h===s||o.charCodeAt(h)===Do)&&(g+=g.length===0?"..":"\\..");return a+=u,g.length>0?`${g}${i.slice(a,l)}`:(i.charCodeAt(a)===Do&&++a,i.slice(a,l))},toNamespacedPath(o){if(typeof o!="string"||o.length===0)return o;const e=ao.resolve(o);if(e.length<=2)return o;if(e.charCodeAt(0)===Do){if(e.charCodeAt(1)===Do){const t=e.charCodeAt(2);if(t!==TZ&&t!==Wc)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(ic(e.charCodeAt(0))&&e.charCodeAt(1)===tc&&e.charCodeAt(2)===Do)return`\\\\?\\${e}`;return o},dirname(o){xn(o,"path");const e=o.length;if(e===0)return".";let t=-1,i=0;const n=o.charCodeAt(0);if(e===1)return Kt(n)?o:".";if(Kt(n)){if(t=i=1,Kt(o.charCodeAt(1))){let a=2,l=a;for(;a2&&Kt(o.charCodeAt(2))?3:2,i=t);let s=-1,r=!0;for(let a=e-1;a>=i;--a)if(Kt(o.charCodeAt(a))){if(!r){s=a;break}}else r=!1;if(s===-1){if(t===-1)return".";s=t}return o.slice(0,s)},basename(o,e){e!==void 0&&xn(e,"ext"),xn(o,"path");let t=0,i=-1,n=!0,s;if(o.length>=2&&ic(o.charCodeAt(0))&&o.charCodeAt(1)===tc&&(t=2),e!==void 0&&e.length>0&&e.length<=o.length){if(e===o)return"";let r=e.length-1,a=-1;for(s=o.length-1;s>=t;--s){const l=o.charCodeAt(s);if(Kt(l)){if(!n){t=s+1;break}}else a===-1&&(n=!1,a=s+1),r>=0&&(l===e.charCodeAt(r)?--r===-1&&(i=s):(r=-1,i=a))}return t===i?i=a:i===-1&&(i=o.length),o.slice(t,i)}for(s=o.length-1;s>=t;--s)if(Kt(o.charCodeAt(s))){if(!n){t=s+1;break}}else i===-1&&(n=!1,i=s+1);return i===-1?"":o.slice(t,i)},extname(o){xn(o,"path");let e=0,t=-1,i=0,n=-1,s=!0,r=0;o.length>=2&&o.charCodeAt(1)===tc&&ic(o.charCodeAt(0))&&(e=i=2);for(let a=o.length-1;a>=e;--a){const l=o.charCodeAt(a);if(Kt(l)){if(!s){i=a+1;break}continue}n===-1&&(s=!1,n=a+1),l===Wc?t===-1?t=a:r!==1&&(r=1):t!==-1&&(r=-1)}return t===-1||n===-1||r===0||r===1&&t===n-1&&t===i+1?"":o.slice(t,n)},format:n7.bind(null,"\\"),parse(o){xn(o,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return e;const t=o.length;let i=0,n=o.charCodeAt(0);if(t===1)return Kt(n)?(e.root=e.dir=o,e):(e.base=e.name=o,e);if(Kt(n)){if(i=1,Kt(o.charCodeAt(1))){let u=2,h=u;for(;u0&&(e.root=o.slice(0,i));let s=-1,r=i,a=-1,l=!0,d=o.length-1,c=0;for(;d>=i;--d){if(n=o.charCodeAt(d),Kt(n)){if(!l){r=d+1;break}continue}a===-1&&(l=!1,a=d+1),n===Wc?s===-1?s=d:c!==1&&(c=1):s!==-1&&(c=-1)}return a!==-1&&(s===-1||c===0||c===1&&s===a-1&&s===r+1?e.base=e.name=o.slice(r,a):(e.name=o.slice(r,s),e.base=o.slice(r,a),e.ext=o.slice(s,a))),r>0&&r!==i?e.dir=o.slice(0,r-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},AZ=(()=>{if(Au){const o=/\\/g;return()=>{const e=nw().replace(o,"/");return e.slice(e.indexOf("/"))}}return()=>nw()})(),hn={resolve(...o){let e="",t=!1;for(let i=o.length-1;i>=-1&&!t;i--){const n=i>=0?o[i]:AZ();xn(n,"path"),n.length!==0&&(e=`${n}/${e}`,t=n.charCodeAt(0)===ms)}return e=ow(e,!t,"/",Bk),t?`/${e}`:e.length>0?e:"."},normalize(o){if(xn(o,"path"),o.length===0)return".";const e=o.charCodeAt(0)===ms,t=o.charCodeAt(o.length-1)===ms;return o=ow(o,!e,"/",Bk),o.length===0?e?"/":t?"./":".":(t&&(o+="/"),e?`/${o}`:o)},isAbsolute(o){return xn(o,"path"),o.length>0&&o.charCodeAt(0)===ms},join(...o){if(o.length===0)return".";let e;for(let t=0;t0&&(e===void 0?e=i:e+=`/${i}`)}return e===void 0?".":hn.normalize(e)},relative(o,e){if(xn(o,"from"),xn(e,"to"),o===e||(o=hn.resolve(o),e=hn.resolve(e),o===e))return"";const t=1,i=o.length,n=i-t,s=1,r=e.length-s,a=na){if(e.charCodeAt(s+d)===ms)return e.slice(s+d+1);if(d===0)return e.slice(s+d)}else n>a&&(o.charCodeAt(t+d)===ms?l=d:d===0&&(l=0));let c="";for(d=t+l+1;d<=i;++d)(d===i||o.charCodeAt(d)===ms)&&(c+=c.length===0?"..":"/..");return`${c}${e.slice(s+l)}`},toNamespacedPath(o){return o},dirname(o){if(xn(o,"path"),o.length===0)return".";const e=o.charCodeAt(0)===ms;let t=-1,i=!0;for(let n=o.length-1;n>=1;--n)if(o.charCodeAt(n)===ms){if(!i){t=n;break}}else i=!1;return t===-1?e?"/":".":e&&t===1?"//":o.slice(0,t)},basename(o,e){e!==void 0&&xn(e,"ext"),xn(o,"path");let t=0,i=-1,n=!0,s;if(e!==void 0&&e.length>0&&e.length<=o.length){if(e===o)return"";let r=e.length-1,a=-1;for(s=o.length-1;s>=0;--s){const l=o.charCodeAt(s);if(l===ms){if(!n){t=s+1;break}}else a===-1&&(n=!1,a=s+1),r>=0&&(l===e.charCodeAt(r)?--r===-1&&(i=s):(r=-1,i=a))}return t===i?i=a:i===-1&&(i=o.length),o.slice(t,i)}for(s=o.length-1;s>=0;--s)if(o.charCodeAt(s)===ms){if(!n){t=s+1;break}}else i===-1&&(n=!1,i=s+1);return i===-1?"":o.slice(t,i)},extname(o){xn(o,"path");let e=-1,t=0,i=-1,n=!0,s=0;for(let r=o.length-1;r>=0;--r){const a=o.charCodeAt(r);if(a===ms){if(!n){t=r+1;break}continue}i===-1&&(n=!1,i=r+1),a===Wc?e===-1?e=r:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||i===-1||s===0||s===1&&e===i-1&&e===t+1?"":o.slice(e,i)},format:n7.bind(null,"/"),parse(o){xn(o,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return e;const t=o.charCodeAt(0)===ms;let i;t?(e.root="/",i=1):i=0;let n=-1,s=0,r=-1,a=!0,l=o.length-1,d=0;for(;l>=i;--l){const c=o.charCodeAt(l);if(c===ms){if(!a){s=l+1;break}continue}r===-1&&(a=!1,r=l+1),c===Wc?n===-1?n=l:d!==1&&(d=1):n!==-1&&(d=-1)}if(r!==-1){const c=s===0&&t?1:s;n===-1||d===0||d===1&&n===r-1&&n===s+1?e.base=e.name=o.slice(c,r):(e.name=o.slice(c,n),e.base=o.slice(c,r),e.ext=o.slice(n,r))}return s>0?e.dir=o.slice(0,s-1):t&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};hn.win32=ao.win32=ao;hn.posix=ao.posix=hn;const s7=Au?ao.normalize:hn.normalize,RZ=Au?ao.resolve:hn.resolve,PZ=Au?ao.relative:hn.relative,o7=Au?ao.dirname:hn.dirname,Vc=Au?ao.basename:hn.basename,OZ=Au?ao.extname:hn.extname,La=Au?ao.sep:hn.sep,FZ=/^\w[\w\d+.-]*$/,BZ=/^\//,WZ=/^\/\//;function VZ(o,e){if(!o.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${o.authority}", path: "${o.path}", query: "${o.query}", fragment: "${o.fragment}"}`);if(o.scheme&&!FZ.test(o.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(o.path){if(o.authority){if(!BZ.test(o.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(WZ.test(o.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function HZ(o,e){return!o&&!e?"file":o}function zZ(o,e){switch(o){case"https":case"http":case"file":e?e[0]!==ga&&(e=ga+e):e=ga;break}return e}const Yi="",ga="/",$Z=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class ze{static isUri(e){return e instanceof ze?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}constructor(e,t,i,n,s,r=!1){typeof e=="object"?(this.scheme=e.scheme||Yi,this.authority=e.authority||Yi,this.path=e.path||Yi,this.query=e.query||Yi,this.fragment=e.fragment||Yi):(this.scheme=HZ(e,r),this.authority=t||Yi,this.path=zZ(this.scheme,i||Yi),this.query=n||Yi,this.fragment=s||Yi,VZ(this,r))}get fsPath(){return rw(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:s,fragment:r}=e;return t===void 0?t=this.scheme:t===null&&(t=Yi),i===void 0?i=this.authority:i===null&&(i=Yi),n===void 0?n=this.path:n===null&&(n=Yi),s===void 0?s=this.query:s===null&&(s=Yi),r===void 0?r=this.fragment:r===null&&(r=Yi),t===this.scheme&&i===this.authority&&n===this.path&&s===this.query&&r===this.fragment?this:new Gg(t,i,n,s,r)}static parse(e,t=!1){const i=$Z.exec(e);return i?new Gg(i[2]||Yi,K0(i[4]||Yi),K0(i[5]||Yi),K0(i[7]||Yi),K0(i[9]||Yi),t):new Gg(Yi,Yi,Yi,Yi,Yi)}static file(e){let t=Yi;if(is&&(e=e.replace(/\\/g,ga)),e[0]===ga&&e[1]===ga){const i=e.indexOf(ga,2);i===-1?(t=e.substring(2),e=ga):(t=e.substring(2,i),e=e.substring(i)||ga)}return new Gg("file",t,e,Yi,Yi)}static from(e,t){return new Gg(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return is&&e.scheme==="file"?i=ze.file(ao.join(rw(e,!0),...t)).path:i=hn.join(e.path,...t),e.with({path:i})}toString(e=!1){return Wk(this,e)}toJSON(){return this}static revive(e){var t,i;if(e){if(e instanceof ze)return e;{const n=new Gg(e);return n._formatted=(t=e.external)!==null&&t!==void 0?t:null,n._fsPath=e._sep===r7&&(i=e.fsPath)!==null&&i!==void 0?i:null,n}}else return e}}const r7=is?1:void 0;let Gg=class extends ze{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=rw(this,!1)),this._fsPath}toString(e=!1){return e?Wk(this,!0):(this._formatted||(this._formatted=Wk(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=r7),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}};const a7={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function WP(o,e,t){let i,n=-1;for(let s=0;s=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||r===45||r===46||r===95||r===126||e&&r===47||t&&r===91||t&&r===93||t&&r===58)n!==-1&&(i+=encodeURIComponent(o.substring(n,s)),n=-1),i!==void 0&&(i+=o.charAt(s));else{i===void 0&&(i=o.substr(0,s));const a=a7[r];a!==void 0?(n!==-1&&(i+=encodeURIComponent(o.substring(n,s)),n=-1),i+=a):n===-1&&(n=s)}}return n!==-1&&(i+=encodeURIComponent(o.substring(n))),i!==void 0?i:o}function UZ(o){let e;for(let t=0;t1&&o.scheme==="file"?t=`//${o.authority}${o.path}`:o.path.charCodeAt(0)===47&&(o.path.charCodeAt(1)>=65&&o.path.charCodeAt(1)<=90||o.path.charCodeAt(1)>=97&&o.path.charCodeAt(1)<=122)&&o.path.charCodeAt(2)===58?e?t=o.path.substr(1):t=o.path[1].toLowerCase()+o.path.substr(2):t=o.path,is&&(t=t.replace(/\//g,"\\")),t}function Wk(o,e){const t=e?UZ:WP;let i="",{scheme:n,authority:s,path:r,query:a,fragment:l}=o;if(n&&(i+=n,i+=":"),(s||n==="file")&&(i+=ga,i+=ga),s){let d=s.indexOf("@");if(d!==-1){const c=s.substr(0,d);s=s.substr(d+1),d=c.lastIndexOf(":"),d===-1?i+=t(c,!1,!1):(i+=t(c.substr(0,d),!1,!1),i+=":",i+=t(c.substr(d+1),!1,!0)),i+="@"}s=s.toLowerCase(),d=s.lastIndexOf(":"),d===-1?i+=t(s,!1,!0):(i+=t(s.substr(0,d),!1,!0),i+=s.substr(d))}if(r){if(r.length>=3&&r.charCodeAt(0)===47&&r.charCodeAt(2)===58){const d=r.charCodeAt(1);d>=65&&d<=90&&(r=`/${String.fromCharCode(d+32)}:${r.substr(3)}`)}else if(r.length>=2&&r.charCodeAt(1)===58){const d=r.charCodeAt(0);d>=65&&d<=90&&(r=`${String.fromCharCode(d+32)}:${r.substr(2)}`)}i+=t(r,!0,!1)}return a&&(i+="?",i+=t(a,!1,!1)),l&&(i+="#",i+=e?l:WP(l,!1,!1)),i}function l7(o){try{return decodeURIComponent(o)}catch{return o.length>3?o.substr(0,3)+l7(o.substr(3)):o}}const VP=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function K0(o){return o.match(VP)?o.replace(VP,e=>l7(e)):o}let z=class lh{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new lh(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return lh.equals(this,e)}static equals(e,t){return!e&&!t?!0:!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return lh.isBefore(this,e)}static isBefore(e,t){return e.lineNumberi||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return Pn.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return Pn.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return Pn.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return Pn.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return Pn.plusRange(this,e)}static plusRange(e,t){let i,n,s,r;return t.startLineNumbere.endLineNumber?(s=t.endLineNumber,r=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,r=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,r=e.endColumn),new Pn(i,n,s,r)}intersectRanges(e){return Pn.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn;const a=t.startLineNumber,l=t.startColumn,d=t.endLineNumber,c=t.endColumn;return id?(s=d,r=c):s===d&&(r=Math.min(r,c)),i>s||i===s&&n>r?null:new Pn(i,n,s,r)}equalsRange(e){return Pn.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t?!0:!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return Pn.getEndPosition(this)}static getEndPosition(e){return new z(e.endLineNumber,e.endColumn)}getStartPosition(){return Pn.getStartPosition(this)}static getStartPosition(e){return new z(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new Pn(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new Pn(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return Pn.collapseToStart(this)}static collapseToStart(e){return new Pn(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return Pn.collapseToEnd(this)}static collapseToEnd(e){return new Pn(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new Pn(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new Pn(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new Pn(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}},Re=class Er extends k{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return Er.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return this.getDirection()===0?new Er(this.startLineNumber,this.startColumn,e,t):new Er(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new z(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new z(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return this.getDirection()===0?new Er(e,t,this.endLineNumber,this.endColumn):new Er(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new Er(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return t===0?new Er(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new Er(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new Er(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){var i;(i=this._factories.get(e))===null||i===void 0||i.dispose();const n=new KZ(this,e,t);return this._factories.set(e,n),je(()=>{const s=this._factories.get(e);!s||s!==n||(this._factories.delete(e),s.dispose())})}async getOrCreate(e){const t=this.get(e);if(t)return t;const i=this._factories.get(e);return!i||i.isResolved?null:(await i.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const i=this._factories.get(e);return!!(!i||i.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}};class KZ extends q{get isResolved(){return this._isResolved}constructor(e,t,i){super(),this._registry=e,this._languageId=t,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}let bv=class{constructor(e,t,i){this.offset=e,this.type=t,this.language=i,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}};class lM{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}}class ly{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}var Cv;(function(o){const e=new Map;e.set(0,ve.symbolMethod),e.set(1,ve.symbolFunction),e.set(2,ve.symbolConstructor),e.set(3,ve.symbolField),e.set(4,ve.symbolVariable),e.set(5,ve.symbolClass),e.set(6,ve.symbolStruct),e.set(7,ve.symbolInterface),e.set(8,ve.symbolModule),e.set(9,ve.symbolProperty),e.set(10,ve.symbolEvent),e.set(11,ve.symbolOperator),e.set(12,ve.symbolUnit),e.set(13,ve.symbolValue),e.set(15,ve.symbolEnum),e.set(14,ve.symbolConstant),e.set(15,ve.symbolEnum),e.set(16,ve.symbolEnumMember),e.set(17,ve.symbolKeyword),e.set(27,ve.symbolSnippet),e.set(18,ve.symbolText),e.set(19,ve.symbolColor),e.set(20,ve.symbolFile),e.set(21,ve.symbolReference),e.set(22,ve.symbolCustomColor),e.set(23,ve.symbolFolder),e.set(24,ve.symbolTypeParameter),e.set(25,ve.account),e.set(26,ve.issues);function t(s){let r=e.get(s);return r||(console.info("No codicon found for CompletionItemKind "+s),r=ve.symbolProperty),r}o.toIcon=t;const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",27),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26);function n(s,r){let a=i.get(s);return typeof a>"u"&&!r&&(a=9),a}o.fromString=n})(Cv||(Cv={}));var Rd;(function(o){o[o.Automatic=0]="Automatic",o[o.Explicit=1]="Explicit"})(Rd||(Rd={}));class c7{constructor(e,t,i,n){this.range=e,this.text=t,this.completionKind=i,this.isSnippetText=n}equals(e){return k.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}var xl;(function(o){o[o.Invoke=1]="Invoke",o[o.TriggerCharacter=2]="TriggerCharacter",o[o.ContentChange=3]="ContentChange"})(xl||(xl={}));var wv;(function(o){o[o.Text=0]="Text",o[o.Read=1]="Read",o[o.Write=2]="Write"})(wv||(wv={}));function qZ(o){return o&&ze.isUri(o.uri)&&k.isIRange(o.range)&&(k.isIRange(o.originSelectionRange)||k.isIRange(o.targetSelectionRange))}const GZ={17:p("Array","array"),16:p("Boolean","boolean"),4:p("Class","class"),13:p("Constant","constant"),8:p("Constructor","constructor"),9:p("Enum","enumeration"),21:p("EnumMember","enumeration member"),23:p("Event","event"),7:p("Field","field"),0:p("File","file"),11:p("Function","function"),10:p("Interface","interface"),19:p("Key","key"),5:p("Method","method"),1:p("Module","module"),2:p("Namespace","namespace"),20:p("Null","null"),15:p("Number","number"),18:p("Object","object"),24:p("Operator","operator"),3:p("Package","package"),6:p("Property","property"),14:p("String","string"),22:p("Struct","struct"),25:p("TypeParameter","type parameter"),12:p("Variable","variable")};function ZZ(o,e){return p("symbolAriaLabel","{0} ({1})",o,GZ[e])}var aw;(function(o){const e=new Map;e.set(0,ve.symbolFile),e.set(1,ve.symbolModule),e.set(2,ve.symbolNamespace),e.set(3,ve.symbolPackage),e.set(4,ve.symbolClass),e.set(5,ve.symbolMethod),e.set(6,ve.symbolProperty),e.set(7,ve.symbolField),e.set(8,ve.symbolConstructor),e.set(9,ve.symbolEnum),e.set(10,ve.symbolInterface),e.set(11,ve.symbolFunction),e.set(12,ve.symbolVariable),e.set(13,ve.symbolConstant),e.set(14,ve.symbolString),e.set(15,ve.symbolNumber),e.set(16,ve.symbolBoolean),e.set(17,ve.symbolArray),e.set(18,ve.symbolObject),e.set(19,ve.symbolKey),e.set(20,ve.symbolNull),e.set(21,ve.symbolEnumMember),e.set(22,ve.symbolStruct),e.set(23,ve.symbolEvent),e.set(24,ve.symbolOperator),e.set(25,ve.symbolTypeParameter);function t(i){let n=e.get(i);return n||(console.info("No codicon found for SymbolKind "+i),n=ve.symbolProperty),n}o.toIcon=t})(aw||(aw={}));class Ts{static fromValue(e){switch(e){case"comment":return Ts.Comment;case"imports":return Ts.Imports;case"region":return Ts.Region}return new Ts(e)}constructor(e){this.value=e}}Ts.Comment=new Ts("comment");Ts.Imports=new Ts("imports");Ts.Region=new Ts("region");var Hk;(function(o){function e(t){return!t||typeof t!="object"?!1:typeof t.id=="string"&&typeof t.title=="string"}o.is=e})(Hk||(Hk={}));var lw;(function(o){o[o.Type=1]="Type",o[o.Parameter=2]="Parameter"})(lw||(lw={}));class YZ{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(e=>{e&&e.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const Ei=new jZ;var zk;(function(o){o[o.Unknown=0]="Unknown",o[o.Disabled=1]="Disabled",o[o.Enabled=2]="Enabled"})(zk||(zk={}));var $k;(function(o){o[o.Invoke=1]="Invoke",o[o.Auto=2]="Auto"})($k||($k={}));var Uk;(function(o){o[o.None=0]="None",o[o.KeepWhitespace=1]="KeepWhitespace",o[o.InsertAsSnippet=4]="InsertAsSnippet"})(Uk||(Uk={}));var jk;(function(o){o[o.Method=0]="Method",o[o.Function=1]="Function",o[o.Constructor=2]="Constructor",o[o.Field=3]="Field",o[o.Variable=4]="Variable",o[o.Class=5]="Class",o[o.Struct=6]="Struct",o[o.Interface=7]="Interface",o[o.Module=8]="Module",o[o.Property=9]="Property",o[o.Event=10]="Event",o[o.Operator=11]="Operator",o[o.Unit=12]="Unit",o[o.Value=13]="Value",o[o.Constant=14]="Constant",o[o.Enum=15]="Enum",o[o.EnumMember=16]="EnumMember",o[o.Keyword=17]="Keyword",o[o.Text=18]="Text",o[o.Color=19]="Color",o[o.File=20]="File",o[o.Reference=21]="Reference",o[o.Customcolor=22]="Customcolor",o[o.Folder=23]="Folder",o[o.TypeParameter=24]="TypeParameter",o[o.User=25]="User",o[o.Issue=26]="Issue",o[o.Snippet=27]="Snippet"})(jk||(jk={}));var Kk;(function(o){o[o.Deprecated=1]="Deprecated"})(Kk||(Kk={}));var qk;(function(o){o[o.Invoke=0]="Invoke",o[o.TriggerCharacter=1]="TriggerCharacter",o[o.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(qk||(qk={}));var Gk;(function(o){o[o.EXACT=0]="EXACT",o[o.ABOVE=1]="ABOVE",o[o.BELOW=2]="BELOW"})(Gk||(Gk={}));var Zk;(function(o){o[o.NotSet=0]="NotSet",o[o.ContentFlush=1]="ContentFlush",o[o.RecoverFromMarkers=2]="RecoverFromMarkers",o[o.Explicit=3]="Explicit",o[o.Paste=4]="Paste",o[o.Undo=5]="Undo",o[o.Redo=6]="Redo"})(Zk||(Zk={}));var Yk;(function(o){o[o.LF=1]="LF",o[o.CRLF=2]="CRLF"})(Yk||(Yk={}));var Xk;(function(o){o[o.Text=0]="Text",o[o.Read=1]="Read",o[o.Write=2]="Write"})(Xk||(Xk={}));var Qk;(function(o){o[o.None=0]="None",o[o.Keep=1]="Keep",o[o.Brackets=2]="Brackets",o[o.Advanced=3]="Advanced",o[o.Full=4]="Full"})(Qk||(Qk={}));var Jk;(function(o){o[o.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",o[o.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",o[o.accessibilitySupport=2]="accessibilitySupport",o[o.accessibilityPageSize=3]="accessibilityPageSize",o[o.ariaLabel=4]="ariaLabel",o[o.ariaRequired=5]="ariaRequired",o[o.autoClosingBrackets=6]="autoClosingBrackets",o[o.autoClosingComments=7]="autoClosingComments",o[o.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",o[o.autoClosingDelete=9]="autoClosingDelete",o[o.autoClosingOvertype=10]="autoClosingOvertype",o[o.autoClosingQuotes=11]="autoClosingQuotes",o[o.autoIndent=12]="autoIndent",o[o.automaticLayout=13]="automaticLayout",o[o.autoSurround=14]="autoSurround",o[o.bracketPairColorization=15]="bracketPairColorization",o[o.guides=16]="guides",o[o.codeLens=17]="codeLens",o[o.codeLensFontFamily=18]="codeLensFontFamily",o[o.codeLensFontSize=19]="codeLensFontSize",o[o.colorDecorators=20]="colorDecorators",o[o.colorDecoratorsLimit=21]="colorDecoratorsLimit",o[o.columnSelection=22]="columnSelection",o[o.comments=23]="comments",o[o.contextmenu=24]="contextmenu",o[o.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",o[o.cursorBlinking=26]="cursorBlinking",o[o.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",o[o.cursorStyle=28]="cursorStyle",o[o.cursorSurroundingLines=29]="cursorSurroundingLines",o[o.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",o[o.cursorWidth=31]="cursorWidth",o[o.disableLayerHinting=32]="disableLayerHinting",o[o.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",o[o.domReadOnly=34]="domReadOnly",o[o.dragAndDrop=35]="dragAndDrop",o[o.dropIntoEditor=36]="dropIntoEditor",o[o.emptySelectionClipboard=37]="emptySelectionClipboard",o[o.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",o[o.extraEditorClassName=39]="extraEditorClassName",o[o.fastScrollSensitivity=40]="fastScrollSensitivity",o[o.find=41]="find",o[o.fixedOverflowWidgets=42]="fixedOverflowWidgets",o[o.folding=43]="folding",o[o.foldingStrategy=44]="foldingStrategy",o[o.foldingHighlight=45]="foldingHighlight",o[o.foldingImportsByDefault=46]="foldingImportsByDefault",o[o.foldingMaximumRegions=47]="foldingMaximumRegions",o[o.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",o[o.fontFamily=49]="fontFamily",o[o.fontInfo=50]="fontInfo",o[o.fontLigatures=51]="fontLigatures",o[o.fontSize=52]="fontSize",o[o.fontWeight=53]="fontWeight",o[o.fontVariations=54]="fontVariations",o[o.formatOnPaste=55]="formatOnPaste",o[o.formatOnType=56]="formatOnType",o[o.glyphMargin=57]="glyphMargin",o[o.gotoLocation=58]="gotoLocation",o[o.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",o[o.hover=60]="hover",o[o.inDiffEditor=61]="inDiffEditor",o[o.inlineSuggest=62]="inlineSuggest",o[o.letterSpacing=63]="letterSpacing",o[o.lightbulb=64]="lightbulb",o[o.lineDecorationsWidth=65]="lineDecorationsWidth",o[o.lineHeight=66]="lineHeight",o[o.lineNumbers=67]="lineNumbers",o[o.lineNumbersMinChars=68]="lineNumbersMinChars",o[o.linkedEditing=69]="linkedEditing",o[o.links=70]="links",o[o.matchBrackets=71]="matchBrackets",o[o.minimap=72]="minimap",o[o.mouseStyle=73]="mouseStyle",o[o.mouseWheelScrollSensitivity=74]="mouseWheelScrollSensitivity",o[o.mouseWheelZoom=75]="mouseWheelZoom",o[o.multiCursorMergeOverlapping=76]="multiCursorMergeOverlapping",o[o.multiCursorModifier=77]="multiCursorModifier",o[o.multiCursorPaste=78]="multiCursorPaste",o[o.multiCursorLimit=79]="multiCursorLimit",o[o.occurrencesHighlight=80]="occurrencesHighlight",o[o.overviewRulerBorder=81]="overviewRulerBorder",o[o.overviewRulerLanes=82]="overviewRulerLanes",o[o.padding=83]="padding",o[o.pasteAs=84]="pasteAs",o[o.parameterHints=85]="parameterHints",o[o.peekWidgetDefaultFocus=86]="peekWidgetDefaultFocus",o[o.definitionLinkOpensInPeek=87]="definitionLinkOpensInPeek",o[o.quickSuggestions=88]="quickSuggestions",o[o.quickSuggestionsDelay=89]="quickSuggestionsDelay",o[o.readOnly=90]="readOnly",o[o.readOnlyMessage=91]="readOnlyMessage",o[o.renameOnType=92]="renameOnType",o[o.renderControlCharacters=93]="renderControlCharacters",o[o.renderFinalNewline=94]="renderFinalNewline",o[o.renderLineHighlight=95]="renderLineHighlight",o[o.renderLineHighlightOnlyWhenFocus=96]="renderLineHighlightOnlyWhenFocus",o[o.renderValidationDecorations=97]="renderValidationDecorations",o[o.renderWhitespace=98]="renderWhitespace",o[o.revealHorizontalRightPadding=99]="revealHorizontalRightPadding",o[o.roundedSelection=100]="roundedSelection",o[o.rulers=101]="rulers",o[o.scrollbar=102]="scrollbar",o[o.scrollBeyondLastColumn=103]="scrollBeyondLastColumn",o[o.scrollBeyondLastLine=104]="scrollBeyondLastLine",o[o.scrollPredominantAxis=105]="scrollPredominantAxis",o[o.selectionClipboard=106]="selectionClipboard",o[o.selectionHighlight=107]="selectionHighlight",o[o.selectOnLineNumbers=108]="selectOnLineNumbers",o[o.showFoldingControls=109]="showFoldingControls",o[o.showUnused=110]="showUnused",o[o.snippetSuggestions=111]="snippetSuggestions",o[o.smartSelect=112]="smartSelect",o[o.smoothScrolling=113]="smoothScrolling",o[o.stickyScroll=114]="stickyScroll",o[o.stickyTabStops=115]="stickyTabStops",o[o.stopRenderingLineAfter=116]="stopRenderingLineAfter",o[o.suggest=117]="suggest",o[o.suggestFontSize=118]="suggestFontSize",o[o.suggestLineHeight=119]="suggestLineHeight",o[o.suggestOnTriggerCharacters=120]="suggestOnTriggerCharacters",o[o.suggestSelection=121]="suggestSelection",o[o.tabCompletion=122]="tabCompletion",o[o.tabIndex=123]="tabIndex",o[o.unicodeHighlighting=124]="unicodeHighlighting",o[o.unusualLineTerminators=125]="unusualLineTerminators",o[o.useShadowDOM=126]="useShadowDOM",o[o.useTabStops=127]="useTabStops",o[o.wordBreak=128]="wordBreak",o[o.wordSeparators=129]="wordSeparators",o[o.wordWrap=130]="wordWrap",o[o.wordWrapBreakAfterCharacters=131]="wordWrapBreakAfterCharacters",o[o.wordWrapBreakBeforeCharacters=132]="wordWrapBreakBeforeCharacters",o[o.wordWrapColumn=133]="wordWrapColumn",o[o.wordWrapOverride1=134]="wordWrapOverride1",o[o.wordWrapOverride2=135]="wordWrapOverride2",o[o.wrappingIndent=136]="wrappingIndent",o[o.wrappingStrategy=137]="wrappingStrategy",o[o.showDeprecated=138]="showDeprecated",o[o.inlayHints=139]="inlayHints",o[o.editorClassName=140]="editorClassName",o[o.pixelRatio=141]="pixelRatio",o[o.tabFocusMode=142]="tabFocusMode",o[o.layoutInfo=143]="layoutInfo",o[o.wrappingInfo=144]="wrappingInfo",o[o.defaultColorDecorators=145]="defaultColorDecorators",o[o.colorDecoratorsActivatedOn=146]="colorDecoratorsActivatedOn",o[o.inlineCompletionsAccessibilityVerbose=147]="inlineCompletionsAccessibilityVerbose"})(Jk||(Jk={}));var eI;(function(o){o[o.TextDefined=0]="TextDefined",o[o.LF=1]="LF",o[o.CRLF=2]="CRLF"})(eI||(eI={}));var tI;(function(o){o[o.LF=0]="LF",o[o.CRLF=1]="CRLF"})(tI||(tI={}));var iI;(function(o){o[o.Left=1]="Left",o[o.Right=2]="Right"})(iI||(iI={}));var nI;(function(o){o[o.None=0]="None",o[o.Indent=1]="Indent",o[o.IndentOutdent=2]="IndentOutdent",o[o.Outdent=3]="Outdent"})(nI||(nI={}));var sI;(function(o){o[o.Both=0]="Both",o[o.Right=1]="Right",o[o.Left=2]="Left",o[o.None=3]="None"})(sI||(sI={}));var oI;(function(o){o[o.Type=1]="Type",o[o.Parameter=2]="Parameter"})(oI||(oI={}));var rI;(function(o){o[o.Automatic=0]="Automatic",o[o.Explicit=1]="Explicit"})(rI||(rI={}));var aI;(function(o){o[o.DependsOnKbLayout=-1]="DependsOnKbLayout",o[o.Unknown=0]="Unknown",o[o.Backspace=1]="Backspace",o[o.Tab=2]="Tab",o[o.Enter=3]="Enter",o[o.Shift=4]="Shift",o[o.Ctrl=5]="Ctrl",o[o.Alt=6]="Alt",o[o.PauseBreak=7]="PauseBreak",o[o.CapsLock=8]="CapsLock",o[o.Escape=9]="Escape",o[o.Space=10]="Space",o[o.PageUp=11]="PageUp",o[o.PageDown=12]="PageDown",o[o.End=13]="End",o[o.Home=14]="Home",o[o.LeftArrow=15]="LeftArrow",o[o.UpArrow=16]="UpArrow",o[o.RightArrow=17]="RightArrow",o[o.DownArrow=18]="DownArrow",o[o.Insert=19]="Insert",o[o.Delete=20]="Delete",o[o.Digit0=21]="Digit0",o[o.Digit1=22]="Digit1",o[o.Digit2=23]="Digit2",o[o.Digit3=24]="Digit3",o[o.Digit4=25]="Digit4",o[o.Digit5=26]="Digit5",o[o.Digit6=27]="Digit6",o[o.Digit7=28]="Digit7",o[o.Digit8=29]="Digit8",o[o.Digit9=30]="Digit9",o[o.KeyA=31]="KeyA",o[o.KeyB=32]="KeyB",o[o.KeyC=33]="KeyC",o[o.KeyD=34]="KeyD",o[o.KeyE=35]="KeyE",o[o.KeyF=36]="KeyF",o[o.KeyG=37]="KeyG",o[o.KeyH=38]="KeyH",o[o.KeyI=39]="KeyI",o[o.KeyJ=40]="KeyJ",o[o.KeyK=41]="KeyK",o[o.KeyL=42]="KeyL",o[o.KeyM=43]="KeyM",o[o.KeyN=44]="KeyN",o[o.KeyO=45]="KeyO",o[o.KeyP=46]="KeyP",o[o.KeyQ=47]="KeyQ",o[o.KeyR=48]="KeyR",o[o.KeyS=49]="KeyS",o[o.KeyT=50]="KeyT",o[o.KeyU=51]="KeyU",o[o.KeyV=52]="KeyV",o[o.KeyW=53]="KeyW",o[o.KeyX=54]="KeyX",o[o.KeyY=55]="KeyY",o[o.KeyZ=56]="KeyZ",o[o.Meta=57]="Meta",o[o.ContextMenu=58]="ContextMenu",o[o.F1=59]="F1",o[o.F2=60]="F2",o[o.F3=61]="F3",o[o.F4=62]="F4",o[o.F5=63]="F5",o[o.F6=64]="F6",o[o.F7=65]="F7",o[o.F8=66]="F8",o[o.F9=67]="F9",o[o.F10=68]="F10",o[o.F11=69]="F11",o[o.F12=70]="F12",o[o.F13=71]="F13",o[o.F14=72]="F14",o[o.F15=73]="F15",o[o.F16=74]="F16",o[o.F17=75]="F17",o[o.F18=76]="F18",o[o.F19=77]="F19",o[o.F20=78]="F20",o[o.F21=79]="F21",o[o.F22=80]="F22",o[o.F23=81]="F23",o[o.F24=82]="F24",o[o.NumLock=83]="NumLock",o[o.ScrollLock=84]="ScrollLock",o[o.Semicolon=85]="Semicolon",o[o.Equal=86]="Equal",o[o.Comma=87]="Comma",o[o.Minus=88]="Minus",o[o.Period=89]="Period",o[o.Slash=90]="Slash",o[o.Backquote=91]="Backquote",o[o.BracketLeft=92]="BracketLeft",o[o.Backslash=93]="Backslash",o[o.BracketRight=94]="BracketRight",o[o.Quote=95]="Quote",o[o.OEM_8=96]="OEM_8",o[o.IntlBackslash=97]="IntlBackslash",o[o.Numpad0=98]="Numpad0",o[o.Numpad1=99]="Numpad1",o[o.Numpad2=100]="Numpad2",o[o.Numpad3=101]="Numpad3",o[o.Numpad4=102]="Numpad4",o[o.Numpad5=103]="Numpad5",o[o.Numpad6=104]="Numpad6",o[o.Numpad7=105]="Numpad7",o[o.Numpad8=106]="Numpad8",o[o.Numpad9=107]="Numpad9",o[o.NumpadMultiply=108]="NumpadMultiply",o[o.NumpadAdd=109]="NumpadAdd",o[o.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",o[o.NumpadSubtract=111]="NumpadSubtract",o[o.NumpadDecimal=112]="NumpadDecimal",o[o.NumpadDivide=113]="NumpadDivide",o[o.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",o[o.ABNT_C1=115]="ABNT_C1",o[o.ABNT_C2=116]="ABNT_C2",o[o.AudioVolumeMute=117]="AudioVolumeMute",o[o.AudioVolumeUp=118]="AudioVolumeUp",o[o.AudioVolumeDown=119]="AudioVolumeDown",o[o.BrowserSearch=120]="BrowserSearch",o[o.BrowserHome=121]="BrowserHome",o[o.BrowserBack=122]="BrowserBack",o[o.BrowserForward=123]="BrowserForward",o[o.MediaTrackNext=124]="MediaTrackNext",o[o.MediaTrackPrevious=125]="MediaTrackPrevious",o[o.MediaStop=126]="MediaStop",o[o.MediaPlayPause=127]="MediaPlayPause",o[o.LaunchMediaPlayer=128]="LaunchMediaPlayer",o[o.LaunchMail=129]="LaunchMail",o[o.LaunchApp2=130]="LaunchApp2",o[o.Clear=131]="Clear",o[o.MAX_VALUE=132]="MAX_VALUE"})(aI||(aI={}));var lI;(function(o){o[o.Hint=1]="Hint",o[o.Info=2]="Info",o[o.Warning=4]="Warning",o[o.Error=8]="Error"})(lI||(lI={}));var dI;(function(o){o[o.Unnecessary=1]="Unnecessary",o[o.Deprecated=2]="Deprecated"})(dI||(dI={}));var cI;(function(o){o[o.Inline=1]="Inline",o[o.Gutter=2]="Gutter"})(cI||(cI={}));var uI;(function(o){o[o.UNKNOWN=0]="UNKNOWN",o[o.TEXTAREA=1]="TEXTAREA",o[o.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",o[o.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",o[o.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",o[o.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",o[o.CONTENT_TEXT=6]="CONTENT_TEXT",o[o.CONTENT_EMPTY=7]="CONTENT_EMPTY",o[o.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",o[o.CONTENT_WIDGET=9]="CONTENT_WIDGET",o[o.OVERVIEW_RULER=10]="OVERVIEW_RULER",o[o.SCROLLBAR=11]="SCROLLBAR",o[o.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",o[o.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(uI||(uI={}));var hI;(function(o){o[o.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",o[o.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",o[o.TOP_CENTER=2]="TOP_CENTER"})(hI||(hI={}));var gI;(function(o){o[o.Left=1]="Left",o[o.Center=2]="Center",o[o.Right=4]="Right",o[o.Full=7]="Full"})(gI||(gI={}));var fI;(function(o){o[o.Left=0]="Left",o[o.Right=1]="Right",o[o.None=2]="None",o[o.LeftOfInjectedText=3]="LeftOfInjectedText",o[o.RightOfInjectedText=4]="RightOfInjectedText"})(fI||(fI={}));var pI;(function(o){o[o.Off=0]="Off",o[o.On=1]="On",o[o.Relative=2]="Relative",o[o.Interval=3]="Interval",o[o.Custom=4]="Custom"})(pI||(pI={}));var mI;(function(o){o[o.None=0]="None",o[o.Text=1]="Text",o[o.Blocks=2]="Blocks"})(mI||(mI={}));var _I;(function(o){o[o.Smooth=0]="Smooth",o[o.Immediate=1]="Immediate"})(_I||(_I={}));var vI;(function(o){o[o.Auto=1]="Auto",o[o.Hidden=2]="Hidden",o[o.Visible=3]="Visible"})(vI||(vI={}));var bI;(function(o){o[o.LTR=0]="LTR",o[o.RTL=1]="RTL"})(bI||(bI={}));var CI;(function(o){o.Off="off",o.OnCode="onCode",o.On="on"})(CI||(CI={}));var wI;(function(o){o[o.Invoke=1]="Invoke",o[o.TriggerCharacter=2]="TriggerCharacter",o[o.ContentChange=3]="ContentChange"})(wI||(wI={}));var SI;(function(o){o[o.File=0]="File",o[o.Module=1]="Module",o[o.Namespace=2]="Namespace",o[o.Package=3]="Package",o[o.Class=4]="Class",o[o.Method=5]="Method",o[o.Property=6]="Property",o[o.Field=7]="Field",o[o.Constructor=8]="Constructor",o[o.Enum=9]="Enum",o[o.Interface=10]="Interface",o[o.Function=11]="Function",o[o.Variable=12]="Variable",o[o.Constant=13]="Constant",o[o.String=14]="String",o[o.Number=15]="Number",o[o.Boolean=16]="Boolean",o[o.Array=17]="Array",o[o.Object=18]="Object",o[o.Key=19]="Key",o[o.Null=20]="Null",o[o.EnumMember=21]="EnumMember",o[o.Struct=22]="Struct",o[o.Event=23]="Event",o[o.Operator=24]="Operator",o[o.TypeParameter=25]="TypeParameter"})(SI||(SI={}));var yI;(function(o){o[o.Deprecated=1]="Deprecated"})(yI||(yI={}));var LI;(function(o){o[o.Hidden=0]="Hidden",o[o.Blink=1]="Blink",o[o.Smooth=2]="Smooth",o[o.Phase=3]="Phase",o[o.Expand=4]="Expand",o[o.Solid=5]="Solid"})(LI||(LI={}));var DI;(function(o){o[o.Line=1]="Line",o[o.Block=2]="Block",o[o.Underline=3]="Underline",o[o.LineThin=4]="LineThin",o[o.BlockOutline=5]="BlockOutline",o[o.UnderlineThin=6]="UnderlineThin"})(DI||(DI={}));var xI;(function(o){o[o.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",o[o.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",o[o.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",o[o.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(xI||(xI={}));var kI;(function(o){o[o.None=0]="None",o[o.Same=1]="Same",o[o.Indent=2]="Indent",o[o.DeepIndent=3]="DeepIndent"})(kI||(kI={}));let Yb=class{static chord(e,t){return fn(e,t)}};Yb.CtrlCmd=2048;Yb.Shift=1024;Yb.Alt=512;Yb.WinCtrl=256;function u7(){return{editor:void 0,languages:void 0,CancellationTokenSource:tn,Emitter:W,KeyCode:aI,KeyMod:Yb,Position:z,Range:k,Selection:Re,SelectionDirection:bI,MarkerSeverity:lI,MarkerTag:dI,Uri:ze,Token:bv}}function XZ(o,e){const t=o;typeof t.vscodeWindowId!="number"&&Object.defineProperty(t,"vscodeWindowId",{get:()=>e})}const Ai=window,kl=Ai;class QZ{constructor(e){this.fn=e,this.lastCache=void 0,this.lastArgKey=void 0}get(e){const t=JSON.stringify(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this.fn(e)),this.lastCache}}class HP{get cachedValues(){return this._map}constructor(e){this.fn=e,this._map=new Map}get(e){if(this._map.has(e))return this._map.get(e);const t=this.fn(e);return this._map.set(e,t),t}}class Ru{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}var Lp;function h7(o){return!o||typeof o!="string"?!0:o.trim().length===0}const JZ=/{(\d+)}/g;function Xh(o,...e){return e.length===0?o:o.replace(JZ,function(t,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=e.length?t:e[n]})}function dw(o){return o.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function qo(o){return o.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function eY(o,e=" "){const t=Xb(o,e);return g7(t,e)}function Xb(o,e){if(!o||!e)return o;const t=e.length;if(t===0||o.length===0)return o;let i=0;for(;o.indexOf(e,i)===i;)i=i+t;return o.substring(i)}function g7(o,e){if(!o||!e)return o;const t=e.length,i=o.length;if(t===0||i===0)return o;let n=i,s=-1;for(;s=o.lastIndexOf(e,n-1),!(s===-1||s+t!==n);){if(s===0)return"";n=s}return o.substring(0,n)}function tY(o){return o.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function iY(o){return o.replace(/\*/g,"")}function f7(o,e,t={}){if(!o)throw new Error("Cannot create regex from empty string");e||(o=qo(o)),t.wholeWord&&(/\B/.test(o.charAt(0))||(o="\\b"+o),/\B/.test(o.charAt(o.length-1))||(o=o+"\\b"));let i="";return t.global&&(i+="g"),t.matchCase||(i+="i"),t.multiline&&(i+="m"),t.unicode&&(i+="u"),new RegExp(o,i)}function nY(o){return o.source==="^"||o.source==="^$"||o.source==="$"||o.source==="^\\s*$"?!1:!!(o.exec("")&&o.lastIndex===0)}function Rl(o){return o.split(/\r\n|\r|\n/)}function Cs(o){for(let e=0,t=o.length;e=0;t--){const i=o.charCodeAt(t);if(i!==32&&i!==9)return t}return-1}function Sv(o,e){return oe?1:0}function dM(o,e,t=0,i=o.length,n=0,s=e.length){for(;td)return 1}const r=i-t,a=s-n;return ra?1:0}function II(o,e){return Qb(o,e,0,o.length,0,e.length)}function Qb(o,e,t=0,i=o.length,n=0,s=e.length){for(;t=128||d>=128)return dM(o.toLowerCase(),e.toLowerCase(),t,i,n,s);Dc(l)&&(l-=32),Dc(d)&&(d-=32);const c=l-d;if(c!==0)return c}const r=i-t,a=s-n;return ra?1:0}function q0(o){return o>=48&&o<=57}function Dc(o){return o>=97&&o<=122}function el(o){return o>=65&&o<=90}function yf(o,e){return o.length===e.length&&Qb(o,e)===0}function cM(o,e){const t=e.length;return e.length>o.length?!1:Qb(o,e,0,t)===0}function Qh(o,e){const t=Math.min(o.length,e.length);let i;for(i=0;i1){const i=o.charCodeAt(e-2);if(bn(i))return uM(i,t)}return t}class hM{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){const e=sY(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=uw(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class hw{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new hM(e,t)}nextGraphemeLength(){const e=xc.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const s=t.offset,r=e.getGraphemeBreakType(t.nextCodePoint());if(zP(n,r)){t.setOffset(s);break}n=r}return t.offset-i}prevGraphemeLength(){const e=xc.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const s=t.offset,r=e.getGraphemeBreakType(t.prevCodePoint());if(zP(r,n)){t.setOffset(s);break}n=r}return i-t.offset}eol(){return this._iterator.eol()}}function gM(o,e){return new hw(o,e).nextGraphemeLength()}function p7(o,e){return new hw(o,e).prevGraphemeLength()}function oY(o,e){e>0&&Jh(o.charCodeAt(e))&&e--;const t=e+gM(o,e);return[t-p7(o,t),t]}let ED;function rY(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function Dp(o){return ED||(ED=rY()),ED.test(o)}const aY=/^[\t\n\r\x20-\x7E]*$/;function Jb(o){return aY.test(o)}const m7=/[\u2028\u2029]/;function _7(o){return m7.test(o)}function ou(o){return o>=11904&&o<=55215||o>=63744&&o<=64255||o>=65281&&o<=65374}function fM(o){return o>=127462&&o<=127487||o===8986||o===8987||o===9200||o===9203||o>=9728&&o<=10175||o===11088||o===11093||o>=127744&&o<=128591||o>=128640&&o<=128764||o>=128992&&o<=129008||o>=129280&&o<=129535||o>=129648&&o<=129782}const lY="\uFEFF";function pM(o){return!!(o&&o.length>0&&o.charCodeAt(0)===65279)}function dY(o,e=!1){return o?(e&&(o=o.replace(/\\./g,"")),o.toLowerCase()!==o):!1}function v7(o){return o=o%(2*26),o<26?String.fromCharCode(97+o):String.fromCharCode(65+o-26)}function zP(o,e){return o===0?e!==5&&e!==7:o===2&&e===3?!1:o===4||o===2||o===3||e===4||e===2||e===3?!0:!(o===8&&(e===8||e===9||e===11||e===12)||(o===11||o===9)&&(e===9||e===10)||(o===12||o===10)&&e===10||e===5||e===13||e===7||o===1||o===13&&e===14||o===6&&e===6)}class xc{static getInstance(){return xc._INSTANCE||(xc._INSTANCE=new xc),xc._INSTANCE}constructor(){this._data=cY()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(et[3*n+1])n=2*n+1;else return t[3*n+2];return 0}}xc._INSTANCE=null;function cY(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function uY(o,e){if(o===0)return 0;const t=hY(o,e);if(t!==void 0)return t;const i=new hM(e,o);return i.prevCodePoint(),i.offset}function hY(o,e){const t=new hM(e,o);let i=t.prevCodePoint();for(;gY(i)||i===65039||i===8419;){if(t.offset===0)return;i=t.prevCodePoint()}if(!fM(i))return;let n=t.offset;return n>0&&t.prevCodePoint()===8205&&(n=t.offset),n}function gY(o){return 127995<=o&&o<=127999}const b7=" ";class eg{static getInstance(e){return Lp.cache.get(Array.from(e))}static getLocales(){return Lp._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}Lp=eg;eg.ambiguousCharacterData=new Ru(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'));eg.cache=new QZ(o=>{function e(d){const c=new Map;for(let u=0;u!d.startsWith("_")&&d in n);s.length===0&&(s=["_default"]);let r;for(const d of s){const c=e(n[d]);r=i(r,c)}const a=e(n._common),l=t(a,r);return new Lp(l)});eg._locales=new Ru(()=>Object.keys(Lp.ambiguousCharacterData.value).filter(o=>!o.startsWith("_")));class Il{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(Il.getRawData())),this._data}static isInvisibleCharacter(e){return Il.getData().has(e)}static get codePoints(){return Il.getData()}}Il._data=void 0;class EI{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}EI.INSTANCE=new EI;class fY extends q{constructor(){super(),this._onDidChange=this._register(new W),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(e){var t;(t=this._mediaQueryList)===null||t===void 0||t.removeEventListener("change",this._listener),this._mediaQueryList=kl.matchMedia(`(resolution: ${kl.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),e&&this._onDidChange.fire()}}class pY extends q{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new W),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const e=this._register(new fY);this._register(e.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}_getPixelRatio(){const e=document.createElement("canvas").getContext("2d"),t=kl.devicePixelRatio||1,i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}}class mY{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=new pY),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}}function C7(o,e){typeof o=="string"&&(o=kl.matchMedia(o)),o.addEventListener("change",e)}const yv=new mY;function _Y(){return EI.INSTANCE.getZoomFactor()}const hm=navigator.userAgent,pr=hm.indexOf("Firefox")>=0,dy=hm.indexOf("AppleWebKit")>=0,mM=hm.indexOf("Chrome")>=0,ru=!mM&&hm.indexOf("Safari")>=0,w7=!mM&&!ru&&dy;hm.indexOf("Electron/")>=0;const $P=hm.indexOf("Android")>=0;let ND=!1;if(kl.matchMedia){const o=kl.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=kl.matchMedia("(display-mode: fullscreen)");ND=o.matches,C7(o,({matches:t})=>{ND&&e.matches||(ND=t)})}class S7{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const t=ea(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const t=ea(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){const t=ea(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){const t=ea(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){const t=ea(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){const t=ea(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){const t=ea(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){const t=ea(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const t=ea(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const t=ea(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const t=ea(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function ea(o){return typeof o=="number"?`${o}px`:o}function Ht(o){return new S7(o)}function Jn(o,e){o instanceof S7?(o.setFontFamily(e.getMassagedFontFamily()),o.setFontWeight(e.fontWeight),o.setFontSize(e.fontSize),o.setFontFeatureSettings(e.fontFeatureSettings),o.setFontVariationSettings(e.fontVariationSettings),o.setLineHeight(e.lineHeight),o.setLetterSpacing(e.letterSpacing)):(o.style.fontFamily=e.getMassagedFontFamily(),o.style.fontWeight=e.fontWeight,o.style.fontSize=e.fontSize+"px",o.style.fontFeatureSettings=e.fontFeatureSettings,o.style.fontVariationSettings=e.fontVariationSettings,o.style.lineHeight=e.lineHeight+"px",o.style.letterSpacing=e.letterSpacing+"px")}class vY{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class _M{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),kl.document.body.appendChild(this._container),this._readFromDomElements(),kl.document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");Jn(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");Jn(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");Jn(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);const s=[];for(const r of this._requests){let a;r.type===0&&(a=t),r.type===2&&(a=i),r.type===1&&(a=n),a.appendChild(document.createElement("br"));const l=document.createElement("span");_M._render(l,r),a.appendChild(l),s.push(l)}this._container=e,this._testElements=s}static _render(e,t){if(t.chr===" "){let i=" ";for(let n=0;n<8;n++)i+=i;e.innerText=i}else{let i=t.chr;for(let n=0;n<8;n++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const i of e)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readFontInfo(e){if(!this._cache.has(e)){let t=this._actualReadFontInfo(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new NI({pixelRatio:yv.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}_createRequest(e,t,i,n){const s=new vY(e,t);return i.push(s),n==null||n.push(s),s}_actualReadFontInfo(e){const t=[],i=[],n=this._createRequest("n",0,t,i),s=this._createRequest("m",0,t,null),r=this._createRequest(" ",0,t,i),a=this._createRequest("0",0,t,i),l=this._createRequest("1",0,t,i),d=this._createRequest("2",0,t,i),c=this._createRequest("3",0,t,i),u=this._createRequest("4",0,t,i),h=this._createRequest("5",0,t,i),g=this._createRequest("6",0,t,i),f=this._createRequest("7",0,t,i),m=this._createRequest("8",0,t,i),v=this._createRequest("9",0,t,i),_=this._createRequest("→",0,t,i),b=this._createRequest("→",0,t,null),C=this._createRequest("·",0,t,i),w=this._createRequest("⸱",0,t,null),S="|/-_ilm%";for(let R=0,j=S.length;R.001){y=!1;break}}let E=!0;return y&&b.width!==I&&(E=!1),b.width>_.width&&(E=!1),new NI({pixelRatio:yv.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,fontVariationSettings:e.fontVariationSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:y,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:E,spaceWidth:r.width,middotWidth:C.width,wsmiddotWidth:w.width,maxDigitWidth:x},!0)}}class UP{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}const TI=new SY;var wa;(function(o){o.serviceIds=new Map,o.DI_TARGET="$di$target",o.DI_DEPENDENCIES="$di$dependencies";function e(t){return t[o.DI_DEPENDENCIES]||[]}o.getServiceDependencies=e})(wa||(wa={}));const qe=bt("instantiationService");function yY(o,e,t){e[wa.DI_TARGET]===e?e[wa.DI_DEPENDENCIES].push({id:o,index:t}):(e[wa.DI_DEPENDENCIES]=[{id:o,index:t}],e[wa.DI_TARGET]=e)}function bt(o){if(wa.serviceIds.has(o))return wa.serviceIds.get(o);const e=function(t,i,n){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");yY(e,t,n)};return e.toString=()=>o,wa.serviceIds.set(o,e),e}const Ot=bt("codeEditorService"),Si=bt("modelService"),Xs=bt("textModelService");class Rs extends q{constructor(e,t="",i="",n=!0,s){super(),this._onDidChange=this._register(new W),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=i,this._enabled=n,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}async run(e,t){this._actionCallback&&await this._actionCallback(e)}}class tg extends q{constructor(){super(...arguments),this._onWillRun=this._register(new W),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new W),this.onDidRun=this._onDidRun.event}async run(e,t){if(!e.enabled)return;this._onWillRun.fire({action:e});let i;try{await this.runAction(e,t)}catch(n){i=n}this._onDidRun.fire({action:e,error:i})}async runAction(e,t){await e.run(t)}}class Mn{constructor(){this.id=Mn.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let t=[];for(const i of e)i.length&&(t.length?t=[...t,new Mn,...i]:t=i);return t}async run(){}}Mn.ID="vs.actions.separator";class xp{get actions(){return this._actions}constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=n,this._actions=i}async run(){}}class cy extends Rs{constructor(){super(cy.ID,p("submenu.empty","(empty)"),void 0,!1)}}cy.ID="vs.actions.empty";function Qf(o){var e,t;return{id:o.id,label:o.label,class:o.class,enabled:(e=o.enabled)!==null&&e!==void 0?e:!0,checked:(t=o.checked)!==null&&t!==void 0?t:!1,run:async(...i)=>o.run(...i),tooltip:o.label}}var MI;(function(o){function e(t){return t&&typeof t=="object"&&typeof t.id=="string"}o.isThemeColor=e})(MI||(MI={}));var Ue;(function(o){o.iconNameSegment="[A-Za-z0-9]+",o.iconNameExpression="[A-Za-z0-9-]+",o.iconModifierExpression="~[A-Za-z]+",o.iconNameCharacter="[A-Za-z0-9~-]";const e=new RegExp(`^(${o.iconNameExpression})(${o.iconModifierExpression})?$`);function t(h){const g=e.exec(h.id);if(!g)return t(ve.error);const[,f,m]=g,v=["codicon","codicon-"+f];return m&&v.push("codicon-modifier-"+m.substring(1)),v}o.asClassNameArray=t;function i(h){return t(h).join(" ")}o.asClassName=i;function n(h){return"."+t(h).join(".")}o.asCSSSelector=n;function s(h){return h&&typeof h=="object"&&typeof h.id=="string"&&(typeof h.color>"u"||MI.isThemeColor(h.color))}o.isThemeIcon=s;const r=new RegExp(`^\\$\\((${o.iconNameExpression}(?:${o.iconModifierExpression})?)\\)$`);function a(h){const g=r.exec(h);if(!g)return;const[,f]=g;return{id:f}}o.fromString=a;function l(h){return{id:h}}o.fromId=l;function d(h,g){let f=h.id;const m=f.lastIndexOf("~");return m!==-1&&(f=f.substring(0,m)),g&&(f=`${f}~${g}`),{id:f}}o.modify=d;function c(h){const g=h.id.lastIndexOf("~");if(g!==-1)return h.id.substring(g+1)}o.getModifier=c;function u(h,g){var f,m;return h.id===g.id&&((f=h.color)===null||f===void 0?void 0:f.id)===((m=g.color)===null||m===void 0?void 0:m.id)}o.isEqual=u})(Ue||(Ue={}));const Ri=bt("commandService"),Et=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new W,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(o,e){if(!o)throw new Error("invalid command");if(typeof o=="string"){if(!e)throw new Error("invalid command");return this.registerCommand({id:o,handler:e})}if(o.metadata&&Array.isArray(o.metadata.args)){const r=[];for(const l of o.metadata.args)r.push(l.constraint);const a=o.handler;o.handler=function(l,...d){return sG(d,r),a(l,...d)}}const{id:t}=o;let i=this._commands.get(t);i||(i=new Ns,this._commands.set(t,i));const n=i.unshift(o),s=je(()=>{n();const r=this._commands.get(t);r!=null&&r.isEmpty()&&this._commands.delete(t)});return this._onDidRegisterCommand.fire(t),s}registerCommandAlias(o,e){return Et.registerCommand(o,(t,...i)=>t.get(Ri).executeCommand(e,...i))}getCommand(o){const e=this._commands.get(o);if(!(!e||e.isEmpty()))return wt.first(e)}getCommands(){const o=new Map;for(const e of this._commands.keys()){const t=this.getCommand(e);t&&o.set(e,t)}return o}};Et.registerCommand("noop",()=>{});function MD(...o){switch(o.length){case 1:return p("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",o[0]);case 2:return p("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",o[0],o[1]);case 3:return p("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",o[0],o[1],o[2]);default:return}}const LY=p("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),DY=p("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");let mh=class AI{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw tM(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const t=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:t})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const t=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:t})}else this._match(126)?this._addToken(9):this._error(MD("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(MD("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(MD("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return this._isAtEnd()||this._input.charCodeAt(this._current)!==e?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,i=this._input.substring(this._start,this._current),n={type:19,offset:this._start,lexeme:i};this._errors.push({offset:t,lexeme:i,additionalInfo:e}),this._tokens.push(n)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),i=AI._keywords.get(t);i?this._addToken(i):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(LY);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let e=this._current,t=!1,i=!1;for(;;){if(e>=this._input.length){this._current=e,this._error(DY);return}const s=this._input.charCodeAt(e);if(t)t=!1;else if(s===47&&!i){e++;break}else s===91?i=!0:s===92?t=!0:s===93&&(i=!1);e++}for(;e=this._input.length}};mh._regexFlags=new Set(["i","g","s","m","y","u"].map(o=>o.charCodeAt(0)));mh._keywords=new Map([["not",14],["in",13],["false",12],["true",11]]);const cs=new Map;cs.set("false",!1);cs.set("true",!0);cs.set("isMac",It);cs.set("isLinux",ws);cs.set("isWindows",is);cs.set("isWeb",Tu);cs.set("isMacNative",It&&!Tu);cs.set("isEdge",wG);cs.set("isFirefox",bG);cs.set("isChrome",K9);cs.set("isSafari",CG);const xY=Object.prototype.hasOwnProperty,kY={regexParsingWithErrorRecovery:!0},IY=p("contextkey.parser.error.emptyString","Empty context key expression"),EY=p("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),NY=p("contextkey.parser.error.noInAfterNot","'in' after 'not'."),jP=p("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),TY=p("contextkey.parser.error.unexpectedToken","Unexpected token"),MY=p("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),AY=p("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),RY=p("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");let y7=class h_{constructor(e=kY){this._config=e,this._scanner=new mh,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(e===""){this._parsingErrors.push({message:IY,offset:0,lexeme:"",additionalInfo:EY});return}this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const t=this._expr();if(!this._isAtEnd()){const i=this._peek(),n=i.type===17?MY:void 0;throw this._parsingErrors.push({message:TY,offset:i.offset,lexeme:mh.getLexeme(i),additionalInfo:n}),h_._parseError}return t}catch(t){if(t!==h_._parseError)throw t;return}}_expr(){return this._or()}_or(){const e=[this._and()];for(;this._matchOne(16);){const t=this._and();e.push(t)}return e.length===1?e[0]:ae.or(...e)}_and(){const e=[this._term()];for(;this._matchOne(15);){const t=this._term();e.push(t)}return e.length===1?e[0]:ae.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),Ps.INSTANCE;case 12:return this._advance(),qs.INSTANCE;case 0:{this._advance();const t=this._expr();return this._consume(1,jP),t==null?void 0:t.negate()}case 17:return this._advance(),Tg.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),ae.true();case 12:return this._advance(),ae.false();case 0:{this._advance();const t=this._expr();return this._consume(1,jP),t}case 17:{const t=e.lexeme;if(this._advance(),this._matchOne(9)){const n=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),n.type!==10)throw this._errExpectedButGot("REGEX",n);const s=n.lexeme,r=s.lastIndexOf("/"),a=r===s.length-1?void 0:this._removeFlagsGY(s.substring(r+1));let l;try{l=new RegExp(s.substring(1,r),a)}catch{throw this._errExpectedButGot("REGEX",n)}return Lv.create(t,l)}switch(n.type){case 10:case 19:{const s=[n.lexeme];this._advance();let r=this._peek(),a=0;for(let h=0;h=0){const d=s.slice(a+1,l),c=s[l+1]==="i"?"i":"";try{r=new RegExp(d,c)}catch{throw this._errExpectedButGot("REGEX",n)}}}if(r===null)throw this._errExpectedButGot("REGEX",n);return Lv.create(t,r)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,NY);const n=this._value();return ae.notIn(t,n)}switch(this._peek().type){case 3:{this._advance();const n=this._value();if(this._previous().type===18)return ae.equals(t,n);switch(n){case"true":return ae.has(t);case"false":return ae.not(t);default:return ae.equals(t,n)}}case 4:{this._advance();const n=this._value();if(this._previous().type===18)return ae.notEquals(t,n);switch(n){case"true":return ae.not(t);case"false":return ae.has(t);default:return ae.notEquals(t,n)}}case 5:return this._advance(),_y.create(t,this._value());case 6:return this._advance(),vy.create(t,this._value());case 7:return this._advance(),py.create(t,this._value());case 8:return this._advance(),my.create(t,this._value());case 13:return this._advance(),ae.in(t,this._value());default:return ae.has(t)}}case 20:throw this._parsingErrors.push({message:AY,offset:e.offset,lexeme:"",additionalInfo:RY}),h_._parseError;default:throw this._errExpectedButGot(`true | false | KEY +`))}}class kD{constructor(e){this.value=e}}const LZ=2;let W=class{constructor(e){var t,i,n,s,r;this._size=0,this._options=e,this._leakageMon=!((t=this._options)===null||t===void 0)&&t.leakWarningThreshold?new yZ((n=(i=this._options)===null||i===void 0?void 0:i.leakWarningThreshold)!==null&&n!==void 0?n:SZ):void 0,this._perfMon=!((s=this._options)===null||s===void 0)&&s._profName?new yp(this._options._profName):void 0,this._deliveryQueue=(r=this._options)===null||r===void 0?void 0:r.deliveryQueue}dispose(){var e,t,i,n;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)===null||e===void 0?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(i=(t=this._options)===null||t===void 0?void 0:t.onDidRemoveLastListener)===null||i===void 0||i.call(t),(n=this._leakageMon)===null||n===void 0||n.dispose())}get event(){var e;return(e=this._event)!==null&&e!==void 0||(this._event=(t,i,n)=>{var s,r,a,l,d;if(this._leakageMon&&this._size>this._leakageMon.threshold*3)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),q.None;if(this._disposed)return q.None;i&&(t=t.bind(i));const c=new kD(t);let u;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(c.stack=sM.create(),u=this._leakageMon.check(c.stack,this._size+1)),this._listeners?this._listeners instanceof kD?((d=this._deliveryQueue)!==null&&d!==void 0||(this._deliveryQueue=new Q9),this._listeners=[this._listeners,c]):this._listeners.push(c):((r=(s=this._options)===null||s===void 0?void 0:s.onWillAddFirstListener)===null||r===void 0||r.call(s,this),this._listeners=c,(l=(a=this._options)===null||a===void 0?void 0:a.onDidAddFirstListener)===null||l===void 0||l.call(a,this)),this._size++;const h=je(()=>{u==null||u(),this._removeListener(c)});return n instanceof de?n.add(h):Array.isArray(n)&&n.push(h),h}),this._event}_removeListener(e){var t,i,n,s;if((i=(t=this._options)===null||t===void 0?void 0:t.onWillRemoveListener)===null||i===void 0||i.call(t,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(s=(n=this._options)===null||n===void 0?void 0:n.onDidRemoveLastListener)===null||s===void 0||s.call(n,this),this._size=0;return}const r=this._listeners,a=r.indexOf(e);if(a===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,r[a]=void 0;const l=this._deliveryQueue.current===this;if(this._size*LZ<=r.length){let d=0;for(let c=0;c0}};const DZ=()=>new Q9;class Q9{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class Yh extends W{constructor(e){super(e),this._isPaused=0,this._eventQueue=new Ns,this._mergeFn=e==null?void 0:e.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}}class J9 extends Yh{constructor(e){var t;super(e),this._delay=(t=e.delay)!==null&&t!==void 0?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}}class xZ extends W{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e==null?void 0:e.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(t=>super.fire(t)),this._queuedEvents=[]}))}}class kZ{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new W({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),je(su(()=>{this.hasListeners&&this.unhook(t);const n=this.events.indexOf(t);this.events.splice(n,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(t=>this.emitter.fire(t))}unhook(e){e.listener&&e.listener.dispose(),e.listener=null}dispose(){this.emitter.dispose()}}class oM{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e(s=>{const r=this.buffers[this.buffers.length-1];r?r.push(()=>t.call(i,s)):t.call(i,s)},void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach(n=>n()),i}}class FP{constructor(){this.listening=!1,this.inputEvent=ye.None,this.inputEventListener=q.None,this.emitter=new W({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}const e8=Object.freeze(function(o,e){const t=setTimeout(o.bind(e),0);return{dispose(){clearTimeout(t)}}});var vt;(function(o){function e(t){return t===o.None||t===o.Cancelled||t instanceof f1?!0:!t||typeof t!="object"?!1:typeof t.isCancellationRequested=="boolean"&&typeof t.onCancellationRequested=="function"}o.isCancellationToken=e,o.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ye.None}),o.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:e8})})(vt||(vt={}));class f1{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?e8:(this._emitter||(this._emitter=new W),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}let tn=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new f1),this._token}cancel(){this._token?this._token instanceof f1&&this._token.cancel():this._token=vt.Cancelled}dispose(e=!1){var t;e&&this.cancel(),(t=this._parentListener)===null||t===void 0||t.dispose(),this._token?this._token instanceof f1&&this._token.dispose():this._token=vt.None}};class rM{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const p1=new rM,Ok=new rM,Fk=new rM,t8=new Array(230),IZ=Object.create(null),EZ=Object.create(null),aM=[];for(let o=0;o<=193;o++)aM[o]=-1;(function(){const o="",e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",o,o],[1,1,"Hyper",0,o,0,o,o,o],[1,2,"Super",0,o,0,o,o,o],[1,3,"Fn",0,o,0,o,o,o],[1,4,"FnLock",0,o,0,o,o,o],[1,5,"Suspend",0,o,0,o,o,o],[1,6,"Resume",0,o,0,o,o,o],[1,7,"Turbo",0,o,0,o,o,o],[1,8,"Sleep",0,o,0,"VK_SLEEP",o,o],[1,9,"WakeUp",0,o,0,o,o,o],[0,10,"KeyA",31,"A",65,"VK_A",o,o],[0,11,"KeyB",32,"B",66,"VK_B",o,o],[0,12,"KeyC",33,"C",67,"VK_C",o,o],[0,13,"KeyD",34,"D",68,"VK_D",o,o],[0,14,"KeyE",35,"E",69,"VK_E",o,o],[0,15,"KeyF",36,"F",70,"VK_F",o,o],[0,16,"KeyG",37,"G",71,"VK_G",o,o],[0,17,"KeyH",38,"H",72,"VK_H",o,o],[0,18,"KeyI",39,"I",73,"VK_I",o,o],[0,19,"KeyJ",40,"J",74,"VK_J",o,o],[0,20,"KeyK",41,"K",75,"VK_K",o,o],[0,21,"KeyL",42,"L",76,"VK_L",o,o],[0,22,"KeyM",43,"M",77,"VK_M",o,o],[0,23,"KeyN",44,"N",78,"VK_N",o,o],[0,24,"KeyO",45,"O",79,"VK_O",o,o],[0,25,"KeyP",46,"P",80,"VK_P",o,o],[0,26,"KeyQ",47,"Q",81,"VK_Q",o,o],[0,27,"KeyR",48,"R",82,"VK_R",o,o],[0,28,"KeyS",49,"S",83,"VK_S",o,o],[0,29,"KeyT",50,"T",84,"VK_T",o,o],[0,30,"KeyU",51,"U",85,"VK_U",o,o],[0,31,"KeyV",52,"V",86,"VK_V",o,o],[0,32,"KeyW",53,"W",87,"VK_W",o,o],[0,33,"KeyX",54,"X",88,"VK_X",o,o],[0,34,"KeyY",55,"Y",89,"VK_Y",o,o],[0,35,"KeyZ",56,"Z",90,"VK_Z",o,o],[0,36,"Digit1",22,"1",49,"VK_1",o,o],[0,37,"Digit2",23,"2",50,"VK_2",o,o],[0,38,"Digit3",24,"3",51,"VK_3",o,o],[0,39,"Digit4",25,"4",52,"VK_4",o,o],[0,40,"Digit5",26,"5",53,"VK_5",o,o],[0,41,"Digit6",27,"6",54,"VK_6",o,o],[0,42,"Digit7",28,"7",55,"VK_7",o,o],[0,43,"Digit8",29,"8",56,"VK_8",o,o],[0,44,"Digit9",30,"9",57,"VK_9",o,o],[0,45,"Digit0",21,"0",48,"VK_0",o,o],[1,46,"Enter",3,"Enter",13,"VK_RETURN",o,o],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",o,o],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",o,o],[1,49,"Tab",2,"Tab",9,"VK_TAB",o,o],[1,50,"Space",10,"Space",32,"VK_SPACE",o,o],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,o,0,o,o,o],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",o,o],[1,64,"F1",59,"F1",112,"VK_F1",o,o],[1,65,"F2",60,"F2",113,"VK_F2",o,o],[1,66,"F3",61,"F3",114,"VK_F3",o,o],[1,67,"F4",62,"F4",115,"VK_F4",o,o],[1,68,"F5",63,"F5",116,"VK_F5",o,o],[1,69,"F6",64,"F6",117,"VK_F6",o,o],[1,70,"F7",65,"F7",118,"VK_F7",o,o],[1,71,"F8",66,"F8",119,"VK_F8",o,o],[1,72,"F9",67,"F9",120,"VK_F9",o,o],[1,73,"F10",68,"F10",121,"VK_F10",o,o],[1,74,"F11",69,"F11",122,"VK_F11",o,o],[1,75,"F12",70,"F12",123,"VK_F12",o,o],[1,76,"PrintScreen",0,o,0,o,o,o],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",o,o],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",o,o],[1,79,"Insert",19,"Insert",45,"VK_INSERT",o,o],[1,80,"Home",14,"Home",36,"VK_HOME",o,o],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",o,o],[1,82,"Delete",20,"Delete",46,"VK_DELETE",o,o],[1,83,"End",13,"End",35,"VK_END",o,o],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",o,o],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",o],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",o],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",o],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",o],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",o,o],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",o,o],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",o,o],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",o,o],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",o,o],[1,94,"NumpadEnter",3,o,0,o,o,o],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",o,o],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",o,o],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",o,o],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",o,o],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",o,o],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",o,o],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",o,o],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",o,o],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",o,o],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",o,o],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",o,o],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",o,o],[1,107,"ContextMenu",58,"ContextMenu",93,o,o,o],[1,108,"Power",0,o,0,o,o,o],[1,109,"NumpadEqual",0,o,0,o,o,o],[1,110,"F13",71,"F13",124,"VK_F13",o,o],[1,111,"F14",72,"F14",125,"VK_F14",o,o],[1,112,"F15",73,"F15",126,"VK_F15",o,o],[1,113,"F16",74,"F16",127,"VK_F16",o,o],[1,114,"F17",75,"F17",128,"VK_F17",o,o],[1,115,"F18",76,"F18",129,"VK_F18",o,o],[1,116,"F19",77,"F19",130,"VK_F19",o,o],[1,117,"F20",78,"F20",131,"VK_F20",o,o],[1,118,"F21",79,"F21",132,"VK_F21",o,o],[1,119,"F22",80,"F22",133,"VK_F22",o,o],[1,120,"F23",81,"F23",134,"VK_F23",o,o],[1,121,"F24",82,"F24",135,"VK_F24",o,o],[1,122,"Open",0,o,0,o,o,o],[1,123,"Help",0,o,0,o,o,o],[1,124,"Select",0,o,0,o,o,o],[1,125,"Again",0,o,0,o,o,o],[1,126,"Undo",0,o,0,o,o,o],[1,127,"Cut",0,o,0,o,o,o],[1,128,"Copy",0,o,0,o,o,o],[1,129,"Paste",0,o,0,o,o,o],[1,130,"Find",0,o,0,o,o,o],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",o,o],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",o,o],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",o,o],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",o,o],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",o,o],[1,136,"KanaMode",0,o,0,o,o,o],[0,137,"IntlYen",0,o,0,o,o,o],[1,138,"Convert",0,o,0,o,o,o],[1,139,"NonConvert",0,o,0,o,o,o],[1,140,"Lang1",0,o,0,o,o,o],[1,141,"Lang2",0,o,0,o,o,o],[1,142,"Lang3",0,o,0,o,o,o],[1,143,"Lang4",0,o,0,o,o,o],[1,144,"Lang5",0,o,0,o,o,o],[1,145,"Abort",0,o,0,o,o,o],[1,146,"Props",0,o,0,o,o,o],[1,147,"NumpadParenLeft",0,o,0,o,o,o],[1,148,"NumpadParenRight",0,o,0,o,o,o],[1,149,"NumpadBackspace",0,o,0,o,o,o],[1,150,"NumpadMemoryStore",0,o,0,o,o,o],[1,151,"NumpadMemoryRecall",0,o,0,o,o,o],[1,152,"NumpadMemoryClear",0,o,0,o,o,o],[1,153,"NumpadMemoryAdd",0,o,0,o,o,o],[1,154,"NumpadMemorySubtract",0,o,0,o,o,o],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",o,o],[1,156,"NumpadClearEntry",0,o,0,o,o,o],[1,0,o,5,"Ctrl",17,"VK_CONTROL",o,o],[1,0,o,4,"Shift",16,"VK_SHIFT",o,o],[1,0,o,6,"Alt",18,"VK_MENU",o,o],[1,0,o,57,"Meta",91,"VK_COMMAND",o,o],[1,157,"ControlLeft",5,o,0,"VK_LCONTROL",o,o],[1,158,"ShiftLeft",4,o,0,"VK_LSHIFT",o,o],[1,159,"AltLeft",6,o,0,"VK_LMENU",o,o],[1,160,"MetaLeft",57,o,0,"VK_LWIN",o,o],[1,161,"ControlRight",5,o,0,"VK_RCONTROL",o,o],[1,162,"ShiftRight",4,o,0,"VK_RSHIFT",o,o],[1,163,"AltRight",6,o,0,"VK_RMENU",o,o],[1,164,"MetaRight",57,o,0,"VK_RWIN",o,o],[1,165,"BrightnessUp",0,o,0,o,o,o],[1,166,"BrightnessDown",0,o,0,o,o,o],[1,167,"MediaPlay",0,o,0,o,o,o],[1,168,"MediaRecord",0,o,0,o,o,o],[1,169,"MediaFastForward",0,o,0,o,o,o],[1,170,"MediaRewind",0,o,0,o,o,o],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",o,o],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",o,o],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",o,o],[1,174,"Eject",0,o,0,o,o,o],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",o,o],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",o,o],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",o,o],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",o,o],[1,179,"LaunchApp1",0,o,0,"VK_MEDIA_LAUNCH_APP1",o,o],[1,180,"SelectTask",0,o,0,o,o,o],[1,181,"LaunchScreenSaver",0,o,0,o,o,o],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",o,o],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",o,o],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",o,o],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",o,o],[1,186,"BrowserStop",0,o,0,"VK_BROWSER_STOP",o,o],[1,187,"BrowserRefresh",0,o,0,"VK_BROWSER_REFRESH",o,o],[1,188,"BrowserFavorites",0,o,0,"VK_BROWSER_FAVORITES",o,o],[1,189,"ZoomToggle",0,o,0,o,o,o],[1,190,"MailReply",0,o,0,o,o,o],[1,191,"MailForward",0,o,0,o,o,o],[1,192,"MailSend",0,o,0,o,o,o],[1,0,o,114,"KeyInComposition",229,o,o,o],[1,0,o,116,"ABNT_C2",194,"VK_ABNT_C2",o,o],[1,0,o,96,"OEM_8",223,"VK_OEM_8",o,o],[1,0,o,0,o,0,"VK_KANA",o,o],[1,0,o,0,o,0,"VK_HANGUL",o,o],[1,0,o,0,o,0,"VK_JUNJA",o,o],[1,0,o,0,o,0,"VK_FINAL",o,o],[1,0,o,0,o,0,"VK_HANJA",o,o],[1,0,o,0,o,0,"VK_KANJI",o,o],[1,0,o,0,o,0,"VK_CONVERT",o,o],[1,0,o,0,o,0,"VK_NONCONVERT",o,o],[1,0,o,0,o,0,"VK_ACCEPT",o,o],[1,0,o,0,o,0,"VK_MODECHANGE",o,o],[1,0,o,0,o,0,"VK_SELECT",o,o],[1,0,o,0,o,0,"VK_PRINT",o,o],[1,0,o,0,o,0,"VK_EXECUTE",o,o],[1,0,o,0,o,0,"VK_SNAPSHOT",o,o],[1,0,o,0,o,0,"VK_HELP",o,o],[1,0,o,0,o,0,"VK_APPS",o,o],[1,0,o,0,o,0,"VK_PROCESSKEY",o,o],[1,0,o,0,o,0,"VK_PACKET",o,o],[1,0,o,0,o,0,"VK_DBE_SBCSCHAR",o,o],[1,0,o,0,o,0,"VK_DBE_DBCSCHAR",o,o],[1,0,o,0,o,0,"VK_ATTN",o,o],[1,0,o,0,o,0,"VK_CRSEL",o,o],[1,0,o,0,o,0,"VK_EXSEL",o,o],[1,0,o,0,o,0,"VK_EREOF",o,o],[1,0,o,0,o,0,"VK_PLAY",o,o],[1,0,o,0,o,0,"VK_ZOOM",o,o],[1,0,o,0,o,0,"VK_NONAME",o,o],[1,0,o,0,o,0,"VK_PA1",o,o],[1,0,o,0,o,0,"VK_OEM_CLEAR",o,o]],t=[],i=[];for(const n of e){const[s,r,a,l,d,c,u,h,g]=n;if(i[r]||(i[r]=!0,IZ[a]=r,EZ[a.toLowerCase()]=r,s&&(aM[r]=l)),!t[l]){if(t[l]=!0,!d)throw new Error(`String representation missing for key code ${l} around scan code ${a}`);p1.define(l,d),Ok.define(l,h||d),Fk.define(l,g||h||d)}c&&(t8[c]=l)}})();var vd;(function(o){function e(a){return p1.keyCodeToStr(a)}o.toString=e;function t(a){return p1.strToKeyCode(a)}o.fromString=t;function i(a){return Ok.keyCodeToStr(a)}o.toUserSettingsUS=i;function n(a){return Fk.keyCodeToStr(a)}o.toUserSettingsGeneral=n;function s(a){return Ok.strToKeyCode(a)||Fk.strToKeyCode(a)}o.fromUserSettings=s;function r(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return p1.keyCodeToStr(a)}o.toElectronAccelerator=r})(vd||(vd={}));function fn(o,e){const t=(e&65535)<<16>>>0;return(o|t)>>>0}var BP={};let Xf;const ID=globalThis.vscode;if(typeof ID<"u"&&typeof ID.process<"u"){const o=ID.process;Xf={get platform(){return o.platform},get arch(){return o.arch},get env(){return o.env},cwd(){return o.cwd()}}}else typeof process<"u"?Xf={get platform(){return process.platform},get arch(){return process.arch},get env(){return BP},cwd(){return BP.VSCODE_CWD||process.cwd()}}:Xf={get platform(){return is?"win32":It?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const nw=Xf.cwd,sw=Xf.env,NZ=Xf.platform,TZ=65,MZ=97,AZ=90,RZ=122,Wc=46,ms=47,Do=92,tc=58,PZ=63;class i8 extends Error{constructor(e,t,i){let n;typeof t=="string"&&t.indexOf("not ")===0?(n="must not be",t=t.replace(/^not /,"")):n="must be";const s=e.indexOf(".")!==-1?"property":"argument";let r=`The "${e}" ${s} ${n} of type ${t}`;r+=`. Received type ${typeof i}`,super(r),this.code="ERR_INVALID_ARG_TYPE"}}function OZ(o,e){if(o===null||typeof o!="object")throw new i8(e,"Object",o)}function xn(o,e){if(typeof o!="string")throw new i8(e,"string",o)}const Au=NZ==="win32";function Kt(o){return o===ms||o===Do}function Bk(o){return o===ms}function ic(o){return o>=TZ&&o<=AZ||o>=MZ&&o<=RZ}function ow(o,e,t,i){let n="",s=0,r=-1,a=0,l=0;for(let d=0;d<=o.length;++d){if(d2){const c=n.lastIndexOf(t);c===-1?(n="",s=0):(n=n.slice(0,c),s=n.length-1-n.lastIndexOf(t)),r=d,a=0;continue}else if(n.length!==0){n="",s=0,r=d,a=0;continue}}e&&(n+=n.length>0?`${t}..`:"..",s=2)}else n.length>0?n+=`${t}${o.slice(r+1,d)}`:n=o.slice(r+1,d),s=d-r-1;r=d,a=0}else l===Wc&&a!==-1?++a:a=-1}return n}function n8(o,e){OZ(e,"pathObject");const t=e.dir||e.root,i=e.base||`${e.name||""}${e.ext||""}`;return t?t===e.root?`${t}${i}`:`${t}${o}${i}`:i}const ao={resolve(...o){let e="",t="",i=!1;for(let n=o.length-1;n>=-1;n--){let s;if(n>=0){if(s=o[n],xn(s,"path"),s.length===0)continue}else e.length===0?s=nw():(s=sw[`=${e}`]||nw(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===Do)&&(s=`${e}\\`));const r=s.length;let a=0,l="",d=!1;const c=s.charCodeAt(0);if(r===1)Kt(c)&&(a=1,d=!0);else if(Kt(c))if(d=!0,Kt(s.charCodeAt(1))){let u=2,h=u;for(;u2&&Kt(s.charCodeAt(2))&&(d=!0,a=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(i){if(e.length>0)break}else if(t=`${s.slice(a)}\\${t}`,i=d,d&&e.length>0)break}return t=ow(t,!i,"\\",Kt),i?`${e}\\${t}`:`${e}${t}`||"."},normalize(o){xn(o,"path");const e=o.length;if(e===0)return".";let t=0,i,n=!1;const s=o.charCodeAt(0);if(e===1)return Bk(s)?"\\":o;if(Kt(s))if(n=!0,Kt(o.charCodeAt(1))){let a=2,l=a;for(;a2&&Kt(o.charCodeAt(2))&&(n=!0,t=3));let r=t0&&Kt(o.charCodeAt(e-1))&&(r+="\\"),i===void 0?n?`\\${r}`:r:n?`${i}\\${r}`:`${i}${r}`},isAbsolute(o){xn(o,"path");const e=o.length;if(e===0)return!1;const t=o.charCodeAt(0);return Kt(t)||e>2&&ic(t)&&o.charCodeAt(1)===tc&&Kt(o.charCodeAt(2))},join(...o){if(o.length===0)return".";let e,t;for(let s=0;s0&&(e===void 0?e=t=r:e+=`\\${r}`)}if(e===void 0)return".";let i=!0,n=0;if(typeof t=="string"&&Kt(t.charCodeAt(0))){++n;const s=t.length;s>1&&Kt(t.charCodeAt(1))&&(++n,s>2&&(Kt(t.charCodeAt(2))?++n:i=!1))}if(i){for(;n=2&&(e=`\\${e.slice(n)}`)}return ao.normalize(e)},relative(o,e){if(xn(o,"from"),xn(e,"to"),o===e)return"";const t=ao.resolve(o),i=ao.resolve(e);if(t===i||(o=t.toLowerCase(),e=i.toLowerCase(),o===e))return"";let n=0;for(;nn&&o.charCodeAt(s-1)===Do;)s--;const r=s-n;let a=0;for(;aa&&e.charCodeAt(l-1)===Do;)l--;const d=l-a,c=rc){if(e.charCodeAt(a+h)===Do)return i.slice(a+h+1);if(h===2)return i.slice(a+h)}r>c&&(o.charCodeAt(n+h)===Do?u=h:h===2&&(u=3)),u===-1&&(u=0)}let g="";for(h=n+u+1;h<=s;++h)(h===s||o.charCodeAt(h)===Do)&&(g+=g.length===0?"..":"\\..");return a+=u,g.length>0?`${g}${i.slice(a,l)}`:(i.charCodeAt(a)===Do&&++a,i.slice(a,l))},toNamespacedPath(o){if(typeof o!="string"||o.length===0)return o;const e=ao.resolve(o);if(e.length<=2)return o;if(e.charCodeAt(0)===Do){if(e.charCodeAt(1)===Do){const t=e.charCodeAt(2);if(t!==PZ&&t!==Wc)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(ic(e.charCodeAt(0))&&e.charCodeAt(1)===tc&&e.charCodeAt(2)===Do)return`\\\\?\\${e}`;return o},dirname(o){xn(o,"path");const e=o.length;if(e===0)return".";let t=-1,i=0;const n=o.charCodeAt(0);if(e===1)return Kt(n)?o:".";if(Kt(n)){if(t=i=1,Kt(o.charCodeAt(1))){let a=2,l=a;for(;a2&&Kt(o.charCodeAt(2))?3:2,i=t);let s=-1,r=!0;for(let a=e-1;a>=i;--a)if(Kt(o.charCodeAt(a))){if(!r){s=a;break}}else r=!1;if(s===-1){if(t===-1)return".";s=t}return o.slice(0,s)},basename(o,e){e!==void 0&&xn(e,"ext"),xn(o,"path");let t=0,i=-1,n=!0,s;if(o.length>=2&&ic(o.charCodeAt(0))&&o.charCodeAt(1)===tc&&(t=2),e!==void 0&&e.length>0&&e.length<=o.length){if(e===o)return"";let r=e.length-1,a=-1;for(s=o.length-1;s>=t;--s){const l=o.charCodeAt(s);if(Kt(l)){if(!n){t=s+1;break}}else a===-1&&(n=!1,a=s+1),r>=0&&(l===e.charCodeAt(r)?--r===-1&&(i=s):(r=-1,i=a))}return t===i?i=a:i===-1&&(i=o.length),o.slice(t,i)}for(s=o.length-1;s>=t;--s)if(Kt(o.charCodeAt(s))){if(!n){t=s+1;break}}else i===-1&&(n=!1,i=s+1);return i===-1?"":o.slice(t,i)},extname(o){xn(o,"path");let e=0,t=-1,i=0,n=-1,s=!0,r=0;o.length>=2&&o.charCodeAt(1)===tc&&ic(o.charCodeAt(0))&&(e=i=2);for(let a=o.length-1;a>=e;--a){const l=o.charCodeAt(a);if(Kt(l)){if(!s){i=a+1;break}continue}n===-1&&(s=!1,n=a+1),l===Wc?t===-1?t=a:r!==1&&(r=1):t!==-1&&(r=-1)}return t===-1||n===-1||r===0||r===1&&t===n-1&&t===i+1?"":o.slice(t,n)},format:n8.bind(null,"\\"),parse(o){xn(o,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return e;const t=o.length;let i=0,n=o.charCodeAt(0);if(t===1)return Kt(n)?(e.root=e.dir=o,e):(e.base=e.name=o,e);if(Kt(n)){if(i=1,Kt(o.charCodeAt(1))){let u=2,h=u;for(;u0&&(e.root=o.slice(0,i));let s=-1,r=i,a=-1,l=!0,d=o.length-1,c=0;for(;d>=i;--d){if(n=o.charCodeAt(d),Kt(n)){if(!l){r=d+1;break}continue}a===-1&&(l=!1,a=d+1),n===Wc?s===-1?s=d:c!==1&&(c=1):s!==-1&&(c=-1)}return a!==-1&&(s===-1||c===0||c===1&&s===a-1&&s===r+1?e.base=e.name=o.slice(r,a):(e.name=o.slice(r,s),e.base=o.slice(r,a),e.ext=o.slice(s,a))),r>0&&r!==i?e.dir=o.slice(0,r-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},FZ=(()=>{if(Au){const o=/\\/g;return()=>{const e=nw().replace(o,"/");return e.slice(e.indexOf("/"))}}return()=>nw()})(),hn={resolve(...o){let e="",t=!1;for(let i=o.length-1;i>=-1&&!t;i--){const n=i>=0?o[i]:FZ();xn(n,"path"),n.length!==0&&(e=`${n}/${e}`,t=n.charCodeAt(0)===ms)}return e=ow(e,!t,"/",Bk),t?`/${e}`:e.length>0?e:"."},normalize(o){if(xn(o,"path"),o.length===0)return".";const e=o.charCodeAt(0)===ms,t=o.charCodeAt(o.length-1)===ms;return o=ow(o,!e,"/",Bk),o.length===0?e?"/":t?"./":".":(t&&(o+="/"),e?`/${o}`:o)},isAbsolute(o){return xn(o,"path"),o.length>0&&o.charCodeAt(0)===ms},join(...o){if(o.length===0)return".";let e;for(let t=0;t0&&(e===void 0?e=i:e+=`/${i}`)}return e===void 0?".":hn.normalize(e)},relative(o,e){if(xn(o,"from"),xn(e,"to"),o===e||(o=hn.resolve(o),e=hn.resolve(e),o===e))return"";const t=1,i=o.length,n=i-t,s=1,r=e.length-s,a=na){if(e.charCodeAt(s+d)===ms)return e.slice(s+d+1);if(d===0)return e.slice(s+d)}else n>a&&(o.charCodeAt(t+d)===ms?l=d:d===0&&(l=0));let c="";for(d=t+l+1;d<=i;++d)(d===i||o.charCodeAt(d)===ms)&&(c+=c.length===0?"..":"/..");return`${c}${e.slice(s+l)}`},toNamespacedPath(o){return o},dirname(o){if(xn(o,"path"),o.length===0)return".";const e=o.charCodeAt(0)===ms;let t=-1,i=!0;for(let n=o.length-1;n>=1;--n)if(o.charCodeAt(n)===ms){if(!i){t=n;break}}else i=!1;return t===-1?e?"/":".":e&&t===1?"//":o.slice(0,t)},basename(o,e){e!==void 0&&xn(e,"ext"),xn(o,"path");let t=0,i=-1,n=!0,s;if(e!==void 0&&e.length>0&&e.length<=o.length){if(e===o)return"";let r=e.length-1,a=-1;for(s=o.length-1;s>=0;--s){const l=o.charCodeAt(s);if(l===ms){if(!n){t=s+1;break}}else a===-1&&(n=!1,a=s+1),r>=0&&(l===e.charCodeAt(r)?--r===-1&&(i=s):(r=-1,i=a))}return t===i?i=a:i===-1&&(i=o.length),o.slice(t,i)}for(s=o.length-1;s>=0;--s)if(o.charCodeAt(s)===ms){if(!n){t=s+1;break}}else i===-1&&(n=!1,i=s+1);return i===-1?"":o.slice(t,i)},extname(o){xn(o,"path");let e=-1,t=0,i=-1,n=!0,s=0;for(let r=o.length-1;r>=0;--r){const a=o.charCodeAt(r);if(a===ms){if(!n){t=r+1;break}continue}i===-1&&(n=!1,i=r+1),a===Wc?e===-1?e=r:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||i===-1||s===0||s===1&&e===i-1&&e===t+1?"":o.slice(e,i)},format:n8.bind(null,"/"),parse(o){xn(o,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return e;const t=o.charCodeAt(0)===ms;let i;t?(e.root="/",i=1):i=0;let n=-1,s=0,r=-1,a=!0,l=o.length-1,d=0;for(;l>=i;--l){const c=o.charCodeAt(l);if(c===ms){if(!a){s=l+1;break}continue}r===-1&&(a=!1,r=l+1),c===Wc?n===-1?n=l:d!==1&&(d=1):n!==-1&&(d=-1)}if(r!==-1){const c=s===0&&t?1:s;n===-1||d===0||d===1&&n===r-1&&n===s+1?e.base=e.name=o.slice(c,r):(e.name=o.slice(c,n),e.base=o.slice(c,r),e.ext=o.slice(n,r))}return s>0?e.dir=o.slice(0,s-1):t&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};hn.win32=ao.win32=ao;hn.posix=ao.posix=hn;const s8=Au?ao.normalize:hn.normalize,BZ=Au?ao.resolve:hn.resolve,WZ=Au?ao.relative:hn.relative,o8=Au?ao.dirname:hn.dirname,Vc=Au?ao.basename:hn.basename,VZ=Au?ao.extname:hn.extname,La=Au?ao.sep:hn.sep,HZ=/^\w[\w\d+.-]*$/,zZ=/^\//,$Z=/^\/\//;function UZ(o,e){if(!o.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${o.authority}", path: "${o.path}", query: "${o.query}", fragment: "${o.fragment}"}`);if(o.scheme&&!HZ.test(o.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(o.path){if(o.authority){if(!zZ.test(o.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if($Z.test(o.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function jZ(o,e){return!o&&!e?"file":o}function KZ(o,e){switch(o){case"https":case"http":case"file":e?e[0]!==ga&&(e=ga+e):e=ga;break}return e}const Yi="",ga="/",qZ=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class ze{static isUri(e){return e instanceof ze?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}constructor(e,t,i,n,s,r=!1){typeof e=="object"?(this.scheme=e.scheme||Yi,this.authority=e.authority||Yi,this.path=e.path||Yi,this.query=e.query||Yi,this.fragment=e.fragment||Yi):(this.scheme=jZ(e,r),this.authority=t||Yi,this.path=KZ(this.scheme,i||Yi),this.query=n||Yi,this.fragment=s||Yi,UZ(this,r))}get fsPath(){return rw(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:s,fragment:r}=e;return t===void 0?t=this.scheme:t===null&&(t=Yi),i===void 0?i=this.authority:i===null&&(i=Yi),n===void 0?n=this.path:n===null&&(n=Yi),s===void 0?s=this.query:s===null&&(s=Yi),r===void 0?r=this.fragment:r===null&&(r=Yi),t===this.scheme&&i===this.authority&&n===this.path&&s===this.query&&r===this.fragment?this:new Gg(t,i,n,s,r)}static parse(e,t=!1){const i=qZ.exec(e);return i?new Gg(i[2]||Yi,K0(i[4]||Yi),K0(i[5]||Yi),K0(i[7]||Yi),K0(i[9]||Yi),t):new Gg(Yi,Yi,Yi,Yi,Yi)}static file(e){let t=Yi;if(is&&(e=e.replace(/\\/g,ga)),e[0]===ga&&e[1]===ga){const i=e.indexOf(ga,2);i===-1?(t=e.substring(2),e=ga):(t=e.substring(2,i),e=e.substring(i)||ga)}return new Gg("file",t,e,Yi,Yi)}static from(e,t){return new Gg(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return is&&e.scheme==="file"?i=ze.file(ao.join(rw(e,!0),...t)).path:i=hn.join(e.path,...t),e.with({path:i})}toString(e=!1){return Wk(this,e)}toJSON(){return this}static revive(e){var t,i;if(e){if(e instanceof ze)return e;{const n=new Gg(e);return n._formatted=(t=e.external)!==null&&t!==void 0?t:null,n._fsPath=e._sep===r8&&(i=e.fsPath)!==null&&i!==void 0?i:null,n}}else return e}}const r8=is?1:void 0;let Gg=class extends ze{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=rw(this,!1)),this._fsPath}toString(e=!1){return e?Wk(this,!0):(this._formatted||(this._formatted=Wk(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=r8),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}};const a8={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function WP(o,e,t){let i,n=-1;for(let s=0;s=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||r===45||r===46||r===95||r===126||e&&r===47||t&&r===91||t&&r===93||t&&r===58)n!==-1&&(i+=encodeURIComponent(o.substring(n,s)),n=-1),i!==void 0&&(i+=o.charAt(s));else{i===void 0&&(i=o.substr(0,s));const a=a8[r];a!==void 0?(n!==-1&&(i+=encodeURIComponent(o.substring(n,s)),n=-1),i+=a):n===-1&&(n=s)}}return n!==-1&&(i+=encodeURIComponent(o.substring(n))),i!==void 0?i:o}function GZ(o){let e;for(let t=0;t1&&o.scheme==="file"?t=`//${o.authority}${o.path}`:o.path.charCodeAt(0)===47&&(o.path.charCodeAt(1)>=65&&o.path.charCodeAt(1)<=90||o.path.charCodeAt(1)>=97&&o.path.charCodeAt(1)<=122)&&o.path.charCodeAt(2)===58?e?t=o.path.substr(1):t=o.path[1].toLowerCase()+o.path.substr(2):t=o.path,is&&(t=t.replace(/\//g,"\\")),t}function Wk(o,e){const t=e?GZ:WP;let i="",{scheme:n,authority:s,path:r,query:a,fragment:l}=o;if(n&&(i+=n,i+=":"),(s||n==="file")&&(i+=ga,i+=ga),s){let d=s.indexOf("@");if(d!==-1){const c=s.substr(0,d);s=s.substr(d+1),d=c.lastIndexOf(":"),d===-1?i+=t(c,!1,!1):(i+=t(c.substr(0,d),!1,!1),i+=":",i+=t(c.substr(d+1),!1,!0)),i+="@"}s=s.toLowerCase(),d=s.lastIndexOf(":"),d===-1?i+=t(s,!1,!0):(i+=t(s.substr(0,d),!1,!0),i+=s.substr(d))}if(r){if(r.length>=3&&r.charCodeAt(0)===47&&r.charCodeAt(2)===58){const d=r.charCodeAt(1);d>=65&&d<=90&&(r=`/${String.fromCharCode(d+32)}:${r.substr(3)}`)}else if(r.length>=2&&r.charCodeAt(1)===58){const d=r.charCodeAt(0);d>=65&&d<=90&&(r=`${String.fromCharCode(d+32)}:${r.substr(2)}`)}i+=t(r,!0,!1)}return a&&(i+="?",i+=t(a,!1,!1)),l&&(i+="#",i+=e?l:WP(l,!1,!1)),i}function l8(o){try{return decodeURIComponent(o)}catch{return o.length>3?o.substr(0,3)+l8(o.substr(3)):o}}const VP=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function K0(o){return o.match(VP)?o.replace(VP,e=>l8(e)):o}let z=class lh{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new lh(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return lh.equals(this,e)}static equals(e,t){return!e&&!t?!0:!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return lh.isBefore(this,e)}static isBefore(e,t){return e.lineNumberi||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return Pn.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return Pn.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return Pn.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return Pn.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return Pn.plusRange(this,e)}static plusRange(e,t){let i,n,s,r;return t.startLineNumbere.endLineNumber?(s=t.endLineNumber,r=t.endColumn):t.endLineNumber===e.endLineNumber?(s=t.endLineNumber,r=Math.max(t.endColumn,e.endColumn)):(s=e.endLineNumber,r=e.endColumn),new Pn(i,n,s,r)}intersectRanges(e){return Pn.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn;const a=t.startLineNumber,l=t.startColumn,d=t.endLineNumber,c=t.endColumn;return id?(s=d,r=c):s===d&&(r=Math.min(r,c)),i>s||i===s&&n>r?null:new Pn(i,n,s,r)}equalsRange(e){return Pn.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t?!0:!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return Pn.getEndPosition(this)}static getEndPosition(e){return new z(e.endLineNumber,e.endColumn)}getStartPosition(){return Pn.getStartPosition(this)}static getStartPosition(e){return new z(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new Pn(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new Pn(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return Pn.collapseToStart(this)}static collapseToStart(e){return new Pn(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return Pn.collapseToEnd(this)}static collapseToEnd(e){return new Pn(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new Pn(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new Pn(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new Pn(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}},Ae=class Er extends k{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return Er.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return this.getDirection()===0?new Er(this.startLineNumber,this.startColumn,e,t):new Er(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new z(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new z(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return this.getDirection()===0?new Er(e,t,this.endLineNumber,this.endColumn):new Er(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new Er(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return t===0?new Er(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new Er(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new Er(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){var i;(i=this._factories.get(e))===null||i===void 0||i.dispose();const n=new YZ(this,e,t);return this._factories.set(e,n),je(()=>{const s=this._factories.get(e);!s||s!==n||(this._factories.delete(e),s.dispose())})}async getOrCreate(e){const t=this.get(e);if(t)return t;const i=this._factories.get(e);return!i||i.isResolved?null:(await i.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const i=this._factories.get(e);return!!(!i||i.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}};class YZ extends q{get isResolved(){return this._isResolved}constructor(e,t,i){super(),this._registry=e,this._languageId=t,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}let bv=class{constructor(e,t,i){this.offset=e,this.type=t,this.language=i,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}};class lM{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}}class ly{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}var Cv;(function(o){const e=new Map;e.set(0,ve.symbolMethod),e.set(1,ve.symbolFunction),e.set(2,ve.symbolConstructor),e.set(3,ve.symbolField),e.set(4,ve.symbolVariable),e.set(5,ve.symbolClass),e.set(6,ve.symbolStruct),e.set(7,ve.symbolInterface),e.set(8,ve.symbolModule),e.set(9,ve.symbolProperty),e.set(10,ve.symbolEvent),e.set(11,ve.symbolOperator),e.set(12,ve.symbolUnit),e.set(13,ve.symbolValue),e.set(15,ve.symbolEnum),e.set(14,ve.symbolConstant),e.set(15,ve.symbolEnum),e.set(16,ve.symbolEnumMember),e.set(17,ve.symbolKeyword),e.set(27,ve.symbolSnippet),e.set(18,ve.symbolText),e.set(19,ve.symbolColor),e.set(20,ve.symbolFile),e.set(21,ve.symbolReference),e.set(22,ve.symbolCustomColor),e.set(23,ve.symbolFolder),e.set(24,ve.symbolTypeParameter),e.set(25,ve.account),e.set(26,ve.issues);function t(s){let r=e.get(s);return r||(console.info("No codicon found for CompletionItemKind "+s),r=ve.symbolProperty),r}o.toIcon=t;const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",27),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26);function n(s,r){let a=i.get(s);return typeof a>"u"&&!r&&(a=9),a}o.fromString=n})(Cv||(Cv={}));var Rd;(function(o){o[o.Automatic=0]="Automatic",o[o.Explicit=1]="Explicit"})(Rd||(Rd={}));class c8{constructor(e,t,i,n){this.range=e,this.text=t,this.completionKind=i,this.isSnippetText=n}equals(e){return k.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}var xl;(function(o){o[o.Invoke=1]="Invoke",o[o.TriggerCharacter=2]="TriggerCharacter",o[o.ContentChange=3]="ContentChange"})(xl||(xl={}));var wv;(function(o){o[o.Text=0]="Text",o[o.Read=1]="Read",o[o.Write=2]="Write"})(wv||(wv={}));function XZ(o){return o&&ze.isUri(o.uri)&&k.isIRange(o.range)&&(k.isIRange(o.originSelectionRange)||k.isIRange(o.targetSelectionRange))}const QZ={17:p("Array","array"),16:p("Boolean","boolean"),4:p("Class","class"),13:p("Constant","constant"),8:p("Constructor","constructor"),9:p("Enum","enumeration"),21:p("EnumMember","enumeration member"),23:p("Event","event"),7:p("Field","field"),0:p("File","file"),11:p("Function","function"),10:p("Interface","interface"),19:p("Key","key"),5:p("Method","method"),1:p("Module","module"),2:p("Namespace","namespace"),20:p("Null","null"),15:p("Number","number"),18:p("Object","object"),24:p("Operator","operator"),3:p("Package","package"),6:p("Property","property"),14:p("String","string"),22:p("Struct","struct"),25:p("TypeParameter","type parameter"),12:p("Variable","variable")};function JZ(o,e){return p("symbolAriaLabel","{0} ({1})",o,QZ[e])}var aw;(function(o){const e=new Map;e.set(0,ve.symbolFile),e.set(1,ve.symbolModule),e.set(2,ve.symbolNamespace),e.set(3,ve.symbolPackage),e.set(4,ve.symbolClass),e.set(5,ve.symbolMethod),e.set(6,ve.symbolProperty),e.set(7,ve.symbolField),e.set(8,ve.symbolConstructor),e.set(9,ve.symbolEnum),e.set(10,ve.symbolInterface),e.set(11,ve.symbolFunction),e.set(12,ve.symbolVariable),e.set(13,ve.symbolConstant),e.set(14,ve.symbolString),e.set(15,ve.symbolNumber),e.set(16,ve.symbolBoolean),e.set(17,ve.symbolArray),e.set(18,ve.symbolObject),e.set(19,ve.symbolKey),e.set(20,ve.symbolNull),e.set(21,ve.symbolEnumMember),e.set(22,ve.symbolStruct),e.set(23,ve.symbolEvent),e.set(24,ve.symbolOperator),e.set(25,ve.symbolTypeParameter);function t(i){let n=e.get(i);return n||(console.info("No codicon found for SymbolKind "+i),n=ve.symbolProperty),n}o.toIcon=t})(aw||(aw={}));class Ts{static fromValue(e){switch(e){case"comment":return Ts.Comment;case"imports":return Ts.Imports;case"region":return Ts.Region}return new Ts(e)}constructor(e){this.value=e}}Ts.Comment=new Ts("comment");Ts.Imports=new Ts("imports");Ts.Region=new Ts("region");var Hk;(function(o){function e(t){return!t||typeof t!="object"?!1:typeof t.id=="string"&&typeof t.title=="string"}o.is=e})(Hk||(Hk={}));var lw;(function(o){o[o.Type=1]="Type",o[o.Parameter=2]="Parameter"})(lw||(lw={}));class eY{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(e=>{e&&e.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const Ei=new ZZ;var zk;(function(o){o[o.Unknown=0]="Unknown",o[o.Disabled=1]="Disabled",o[o.Enabled=2]="Enabled"})(zk||(zk={}));var $k;(function(o){o[o.Invoke=1]="Invoke",o[o.Auto=2]="Auto"})($k||($k={}));var Uk;(function(o){o[o.None=0]="None",o[o.KeepWhitespace=1]="KeepWhitespace",o[o.InsertAsSnippet=4]="InsertAsSnippet"})(Uk||(Uk={}));var jk;(function(o){o[o.Method=0]="Method",o[o.Function=1]="Function",o[o.Constructor=2]="Constructor",o[o.Field=3]="Field",o[o.Variable=4]="Variable",o[o.Class=5]="Class",o[o.Struct=6]="Struct",o[o.Interface=7]="Interface",o[o.Module=8]="Module",o[o.Property=9]="Property",o[o.Event=10]="Event",o[o.Operator=11]="Operator",o[o.Unit=12]="Unit",o[o.Value=13]="Value",o[o.Constant=14]="Constant",o[o.Enum=15]="Enum",o[o.EnumMember=16]="EnumMember",o[o.Keyword=17]="Keyword",o[o.Text=18]="Text",o[o.Color=19]="Color",o[o.File=20]="File",o[o.Reference=21]="Reference",o[o.Customcolor=22]="Customcolor",o[o.Folder=23]="Folder",o[o.TypeParameter=24]="TypeParameter",o[o.User=25]="User",o[o.Issue=26]="Issue",o[o.Snippet=27]="Snippet"})(jk||(jk={}));var Kk;(function(o){o[o.Deprecated=1]="Deprecated"})(Kk||(Kk={}));var qk;(function(o){o[o.Invoke=0]="Invoke",o[o.TriggerCharacter=1]="TriggerCharacter",o[o.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(qk||(qk={}));var Gk;(function(o){o[o.EXACT=0]="EXACT",o[o.ABOVE=1]="ABOVE",o[o.BELOW=2]="BELOW"})(Gk||(Gk={}));var Zk;(function(o){o[o.NotSet=0]="NotSet",o[o.ContentFlush=1]="ContentFlush",o[o.RecoverFromMarkers=2]="RecoverFromMarkers",o[o.Explicit=3]="Explicit",o[o.Paste=4]="Paste",o[o.Undo=5]="Undo",o[o.Redo=6]="Redo"})(Zk||(Zk={}));var Yk;(function(o){o[o.LF=1]="LF",o[o.CRLF=2]="CRLF"})(Yk||(Yk={}));var Xk;(function(o){o[o.Text=0]="Text",o[o.Read=1]="Read",o[o.Write=2]="Write"})(Xk||(Xk={}));var Qk;(function(o){o[o.None=0]="None",o[o.Keep=1]="Keep",o[o.Brackets=2]="Brackets",o[o.Advanced=3]="Advanced",o[o.Full=4]="Full"})(Qk||(Qk={}));var Jk;(function(o){o[o.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",o[o.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",o[o.accessibilitySupport=2]="accessibilitySupport",o[o.accessibilityPageSize=3]="accessibilityPageSize",o[o.ariaLabel=4]="ariaLabel",o[o.ariaRequired=5]="ariaRequired",o[o.autoClosingBrackets=6]="autoClosingBrackets",o[o.autoClosingComments=7]="autoClosingComments",o[o.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",o[o.autoClosingDelete=9]="autoClosingDelete",o[o.autoClosingOvertype=10]="autoClosingOvertype",o[o.autoClosingQuotes=11]="autoClosingQuotes",o[o.autoIndent=12]="autoIndent",o[o.automaticLayout=13]="automaticLayout",o[o.autoSurround=14]="autoSurround",o[o.bracketPairColorization=15]="bracketPairColorization",o[o.guides=16]="guides",o[o.codeLens=17]="codeLens",o[o.codeLensFontFamily=18]="codeLensFontFamily",o[o.codeLensFontSize=19]="codeLensFontSize",o[o.colorDecorators=20]="colorDecorators",o[o.colorDecoratorsLimit=21]="colorDecoratorsLimit",o[o.columnSelection=22]="columnSelection",o[o.comments=23]="comments",o[o.contextmenu=24]="contextmenu",o[o.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",o[o.cursorBlinking=26]="cursorBlinking",o[o.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",o[o.cursorStyle=28]="cursorStyle",o[o.cursorSurroundingLines=29]="cursorSurroundingLines",o[o.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",o[o.cursorWidth=31]="cursorWidth",o[o.disableLayerHinting=32]="disableLayerHinting",o[o.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",o[o.domReadOnly=34]="domReadOnly",o[o.dragAndDrop=35]="dragAndDrop",o[o.dropIntoEditor=36]="dropIntoEditor",o[o.emptySelectionClipboard=37]="emptySelectionClipboard",o[o.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",o[o.extraEditorClassName=39]="extraEditorClassName",o[o.fastScrollSensitivity=40]="fastScrollSensitivity",o[o.find=41]="find",o[o.fixedOverflowWidgets=42]="fixedOverflowWidgets",o[o.folding=43]="folding",o[o.foldingStrategy=44]="foldingStrategy",o[o.foldingHighlight=45]="foldingHighlight",o[o.foldingImportsByDefault=46]="foldingImportsByDefault",o[o.foldingMaximumRegions=47]="foldingMaximumRegions",o[o.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",o[o.fontFamily=49]="fontFamily",o[o.fontInfo=50]="fontInfo",o[o.fontLigatures=51]="fontLigatures",o[o.fontSize=52]="fontSize",o[o.fontWeight=53]="fontWeight",o[o.fontVariations=54]="fontVariations",o[o.formatOnPaste=55]="formatOnPaste",o[o.formatOnType=56]="formatOnType",o[o.glyphMargin=57]="glyphMargin",o[o.gotoLocation=58]="gotoLocation",o[o.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",o[o.hover=60]="hover",o[o.inDiffEditor=61]="inDiffEditor",o[o.inlineSuggest=62]="inlineSuggest",o[o.letterSpacing=63]="letterSpacing",o[o.lightbulb=64]="lightbulb",o[o.lineDecorationsWidth=65]="lineDecorationsWidth",o[o.lineHeight=66]="lineHeight",o[o.lineNumbers=67]="lineNumbers",o[o.lineNumbersMinChars=68]="lineNumbersMinChars",o[o.linkedEditing=69]="linkedEditing",o[o.links=70]="links",o[o.matchBrackets=71]="matchBrackets",o[o.minimap=72]="minimap",o[o.mouseStyle=73]="mouseStyle",o[o.mouseWheelScrollSensitivity=74]="mouseWheelScrollSensitivity",o[o.mouseWheelZoom=75]="mouseWheelZoom",o[o.multiCursorMergeOverlapping=76]="multiCursorMergeOverlapping",o[o.multiCursorModifier=77]="multiCursorModifier",o[o.multiCursorPaste=78]="multiCursorPaste",o[o.multiCursorLimit=79]="multiCursorLimit",o[o.occurrencesHighlight=80]="occurrencesHighlight",o[o.overviewRulerBorder=81]="overviewRulerBorder",o[o.overviewRulerLanes=82]="overviewRulerLanes",o[o.padding=83]="padding",o[o.pasteAs=84]="pasteAs",o[o.parameterHints=85]="parameterHints",o[o.peekWidgetDefaultFocus=86]="peekWidgetDefaultFocus",o[o.definitionLinkOpensInPeek=87]="definitionLinkOpensInPeek",o[o.quickSuggestions=88]="quickSuggestions",o[o.quickSuggestionsDelay=89]="quickSuggestionsDelay",o[o.readOnly=90]="readOnly",o[o.readOnlyMessage=91]="readOnlyMessage",o[o.renameOnType=92]="renameOnType",o[o.renderControlCharacters=93]="renderControlCharacters",o[o.renderFinalNewline=94]="renderFinalNewline",o[o.renderLineHighlight=95]="renderLineHighlight",o[o.renderLineHighlightOnlyWhenFocus=96]="renderLineHighlightOnlyWhenFocus",o[o.renderValidationDecorations=97]="renderValidationDecorations",o[o.renderWhitespace=98]="renderWhitespace",o[o.revealHorizontalRightPadding=99]="revealHorizontalRightPadding",o[o.roundedSelection=100]="roundedSelection",o[o.rulers=101]="rulers",o[o.scrollbar=102]="scrollbar",o[o.scrollBeyondLastColumn=103]="scrollBeyondLastColumn",o[o.scrollBeyondLastLine=104]="scrollBeyondLastLine",o[o.scrollPredominantAxis=105]="scrollPredominantAxis",o[o.selectionClipboard=106]="selectionClipboard",o[o.selectionHighlight=107]="selectionHighlight",o[o.selectOnLineNumbers=108]="selectOnLineNumbers",o[o.showFoldingControls=109]="showFoldingControls",o[o.showUnused=110]="showUnused",o[o.snippetSuggestions=111]="snippetSuggestions",o[o.smartSelect=112]="smartSelect",o[o.smoothScrolling=113]="smoothScrolling",o[o.stickyScroll=114]="stickyScroll",o[o.stickyTabStops=115]="stickyTabStops",o[o.stopRenderingLineAfter=116]="stopRenderingLineAfter",o[o.suggest=117]="suggest",o[o.suggestFontSize=118]="suggestFontSize",o[o.suggestLineHeight=119]="suggestLineHeight",o[o.suggestOnTriggerCharacters=120]="suggestOnTriggerCharacters",o[o.suggestSelection=121]="suggestSelection",o[o.tabCompletion=122]="tabCompletion",o[o.tabIndex=123]="tabIndex",o[o.unicodeHighlighting=124]="unicodeHighlighting",o[o.unusualLineTerminators=125]="unusualLineTerminators",o[o.useShadowDOM=126]="useShadowDOM",o[o.useTabStops=127]="useTabStops",o[o.wordBreak=128]="wordBreak",o[o.wordSeparators=129]="wordSeparators",o[o.wordWrap=130]="wordWrap",o[o.wordWrapBreakAfterCharacters=131]="wordWrapBreakAfterCharacters",o[o.wordWrapBreakBeforeCharacters=132]="wordWrapBreakBeforeCharacters",o[o.wordWrapColumn=133]="wordWrapColumn",o[o.wordWrapOverride1=134]="wordWrapOverride1",o[o.wordWrapOverride2=135]="wordWrapOverride2",o[o.wrappingIndent=136]="wrappingIndent",o[o.wrappingStrategy=137]="wrappingStrategy",o[o.showDeprecated=138]="showDeprecated",o[o.inlayHints=139]="inlayHints",o[o.editorClassName=140]="editorClassName",o[o.pixelRatio=141]="pixelRatio",o[o.tabFocusMode=142]="tabFocusMode",o[o.layoutInfo=143]="layoutInfo",o[o.wrappingInfo=144]="wrappingInfo",o[o.defaultColorDecorators=145]="defaultColorDecorators",o[o.colorDecoratorsActivatedOn=146]="colorDecoratorsActivatedOn",o[o.inlineCompletionsAccessibilityVerbose=147]="inlineCompletionsAccessibilityVerbose"})(Jk||(Jk={}));var eI;(function(o){o[o.TextDefined=0]="TextDefined",o[o.LF=1]="LF",o[o.CRLF=2]="CRLF"})(eI||(eI={}));var tI;(function(o){o[o.LF=0]="LF",o[o.CRLF=1]="CRLF"})(tI||(tI={}));var iI;(function(o){o[o.Left=1]="Left",o[o.Right=2]="Right"})(iI||(iI={}));var nI;(function(o){o[o.None=0]="None",o[o.Indent=1]="Indent",o[o.IndentOutdent=2]="IndentOutdent",o[o.Outdent=3]="Outdent"})(nI||(nI={}));var sI;(function(o){o[o.Both=0]="Both",o[o.Right=1]="Right",o[o.Left=2]="Left",o[o.None=3]="None"})(sI||(sI={}));var oI;(function(o){o[o.Type=1]="Type",o[o.Parameter=2]="Parameter"})(oI||(oI={}));var rI;(function(o){o[o.Automatic=0]="Automatic",o[o.Explicit=1]="Explicit"})(rI||(rI={}));var aI;(function(o){o[o.DependsOnKbLayout=-1]="DependsOnKbLayout",o[o.Unknown=0]="Unknown",o[o.Backspace=1]="Backspace",o[o.Tab=2]="Tab",o[o.Enter=3]="Enter",o[o.Shift=4]="Shift",o[o.Ctrl=5]="Ctrl",o[o.Alt=6]="Alt",o[o.PauseBreak=7]="PauseBreak",o[o.CapsLock=8]="CapsLock",o[o.Escape=9]="Escape",o[o.Space=10]="Space",o[o.PageUp=11]="PageUp",o[o.PageDown=12]="PageDown",o[o.End=13]="End",o[o.Home=14]="Home",o[o.LeftArrow=15]="LeftArrow",o[o.UpArrow=16]="UpArrow",o[o.RightArrow=17]="RightArrow",o[o.DownArrow=18]="DownArrow",o[o.Insert=19]="Insert",o[o.Delete=20]="Delete",o[o.Digit0=21]="Digit0",o[o.Digit1=22]="Digit1",o[o.Digit2=23]="Digit2",o[o.Digit3=24]="Digit3",o[o.Digit4=25]="Digit4",o[o.Digit5=26]="Digit5",o[o.Digit6=27]="Digit6",o[o.Digit7=28]="Digit7",o[o.Digit8=29]="Digit8",o[o.Digit9=30]="Digit9",o[o.KeyA=31]="KeyA",o[o.KeyB=32]="KeyB",o[o.KeyC=33]="KeyC",o[o.KeyD=34]="KeyD",o[o.KeyE=35]="KeyE",o[o.KeyF=36]="KeyF",o[o.KeyG=37]="KeyG",o[o.KeyH=38]="KeyH",o[o.KeyI=39]="KeyI",o[o.KeyJ=40]="KeyJ",o[o.KeyK=41]="KeyK",o[o.KeyL=42]="KeyL",o[o.KeyM=43]="KeyM",o[o.KeyN=44]="KeyN",o[o.KeyO=45]="KeyO",o[o.KeyP=46]="KeyP",o[o.KeyQ=47]="KeyQ",o[o.KeyR=48]="KeyR",o[o.KeyS=49]="KeyS",o[o.KeyT=50]="KeyT",o[o.KeyU=51]="KeyU",o[o.KeyV=52]="KeyV",o[o.KeyW=53]="KeyW",o[o.KeyX=54]="KeyX",o[o.KeyY=55]="KeyY",o[o.KeyZ=56]="KeyZ",o[o.Meta=57]="Meta",o[o.ContextMenu=58]="ContextMenu",o[o.F1=59]="F1",o[o.F2=60]="F2",o[o.F3=61]="F3",o[o.F4=62]="F4",o[o.F5=63]="F5",o[o.F6=64]="F6",o[o.F7=65]="F7",o[o.F8=66]="F8",o[o.F9=67]="F9",o[o.F10=68]="F10",o[o.F11=69]="F11",o[o.F12=70]="F12",o[o.F13=71]="F13",o[o.F14=72]="F14",o[o.F15=73]="F15",o[o.F16=74]="F16",o[o.F17=75]="F17",o[o.F18=76]="F18",o[o.F19=77]="F19",o[o.F20=78]="F20",o[o.F21=79]="F21",o[o.F22=80]="F22",o[o.F23=81]="F23",o[o.F24=82]="F24",o[o.NumLock=83]="NumLock",o[o.ScrollLock=84]="ScrollLock",o[o.Semicolon=85]="Semicolon",o[o.Equal=86]="Equal",o[o.Comma=87]="Comma",o[o.Minus=88]="Minus",o[o.Period=89]="Period",o[o.Slash=90]="Slash",o[o.Backquote=91]="Backquote",o[o.BracketLeft=92]="BracketLeft",o[o.Backslash=93]="Backslash",o[o.BracketRight=94]="BracketRight",o[o.Quote=95]="Quote",o[o.OEM_8=96]="OEM_8",o[o.IntlBackslash=97]="IntlBackslash",o[o.Numpad0=98]="Numpad0",o[o.Numpad1=99]="Numpad1",o[o.Numpad2=100]="Numpad2",o[o.Numpad3=101]="Numpad3",o[o.Numpad4=102]="Numpad4",o[o.Numpad5=103]="Numpad5",o[o.Numpad6=104]="Numpad6",o[o.Numpad7=105]="Numpad7",o[o.Numpad8=106]="Numpad8",o[o.Numpad9=107]="Numpad9",o[o.NumpadMultiply=108]="NumpadMultiply",o[o.NumpadAdd=109]="NumpadAdd",o[o.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",o[o.NumpadSubtract=111]="NumpadSubtract",o[o.NumpadDecimal=112]="NumpadDecimal",o[o.NumpadDivide=113]="NumpadDivide",o[o.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",o[o.ABNT_C1=115]="ABNT_C1",o[o.ABNT_C2=116]="ABNT_C2",o[o.AudioVolumeMute=117]="AudioVolumeMute",o[o.AudioVolumeUp=118]="AudioVolumeUp",o[o.AudioVolumeDown=119]="AudioVolumeDown",o[o.BrowserSearch=120]="BrowserSearch",o[o.BrowserHome=121]="BrowserHome",o[o.BrowserBack=122]="BrowserBack",o[o.BrowserForward=123]="BrowserForward",o[o.MediaTrackNext=124]="MediaTrackNext",o[o.MediaTrackPrevious=125]="MediaTrackPrevious",o[o.MediaStop=126]="MediaStop",o[o.MediaPlayPause=127]="MediaPlayPause",o[o.LaunchMediaPlayer=128]="LaunchMediaPlayer",o[o.LaunchMail=129]="LaunchMail",o[o.LaunchApp2=130]="LaunchApp2",o[o.Clear=131]="Clear",o[o.MAX_VALUE=132]="MAX_VALUE"})(aI||(aI={}));var lI;(function(o){o[o.Hint=1]="Hint",o[o.Info=2]="Info",o[o.Warning=4]="Warning",o[o.Error=8]="Error"})(lI||(lI={}));var dI;(function(o){o[o.Unnecessary=1]="Unnecessary",o[o.Deprecated=2]="Deprecated"})(dI||(dI={}));var cI;(function(o){o[o.Inline=1]="Inline",o[o.Gutter=2]="Gutter"})(cI||(cI={}));var uI;(function(o){o[o.UNKNOWN=0]="UNKNOWN",o[o.TEXTAREA=1]="TEXTAREA",o[o.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",o[o.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",o[o.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",o[o.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",o[o.CONTENT_TEXT=6]="CONTENT_TEXT",o[o.CONTENT_EMPTY=7]="CONTENT_EMPTY",o[o.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",o[o.CONTENT_WIDGET=9]="CONTENT_WIDGET",o[o.OVERVIEW_RULER=10]="OVERVIEW_RULER",o[o.SCROLLBAR=11]="SCROLLBAR",o[o.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",o[o.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(uI||(uI={}));var hI;(function(o){o[o.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",o[o.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",o[o.TOP_CENTER=2]="TOP_CENTER"})(hI||(hI={}));var gI;(function(o){o[o.Left=1]="Left",o[o.Center=2]="Center",o[o.Right=4]="Right",o[o.Full=7]="Full"})(gI||(gI={}));var fI;(function(o){o[o.Left=0]="Left",o[o.Right=1]="Right",o[o.None=2]="None",o[o.LeftOfInjectedText=3]="LeftOfInjectedText",o[o.RightOfInjectedText=4]="RightOfInjectedText"})(fI||(fI={}));var pI;(function(o){o[o.Off=0]="Off",o[o.On=1]="On",o[o.Relative=2]="Relative",o[o.Interval=3]="Interval",o[o.Custom=4]="Custom"})(pI||(pI={}));var mI;(function(o){o[o.None=0]="None",o[o.Text=1]="Text",o[o.Blocks=2]="Blocks"})(mI||(mI={}));var _I;(function(o){o[o.Smooth=0]="Smooth",o[o.Immediate=1]="Immediate"})(_I||(_I={}));var vI;(function(o){o[o.Auto=1]="Auto",o[o.Hidden=2]="Hidden",o[o.Visible=3]="Visible"})(vI||(vI={}));var bI;(function(o){o[o.LTR=0]="LTR",o[o.RTL=1]="RTL"})(bI||(bI={}));var CI;(function(o){o.Off="off",o.OnCode="onCode",o.On="on"})(CI||(CI={}));var wI;(function(o){o[o.Invoke=1]="Invoke",o[o.TriggerCharacter=2]="TriggerCharacter",o[o.ContentChange=3]="ContentChange"})(wI||(wI={}));var SI;(function(o){o[o.File=0]="File",o[o.Module=1]="Module",o[o.Namespace=2]="Namespace",o[o.Package=3]="Package",o[o.Class=4]="Class",o[o.Method=5]="Method",o[o.Property=6]="Property",o[o.Field=7]="Field",o[o.Constructor=8]="Constructor",o[o.Enum=9]="Enum",o[o.Interface=10]="Interface",o[o.Function=11]="Function",o[o.Variable=12]="Variable",o[o.Constant=13]="Constant",o[o.String=14]="String",o[o.Number=15]="Number",o[o.Boolean=16]="Boolean",o[o.Array=17]="Array",o[o.Object=18]="Object",o[o.Key=19]="Key",o[o.Null=20]="Null",o[o.EnumMember=21]="EnumMember",o[o.Struct=22]="Struct",o[o.Event=23]="Event",o[o.Operator=24]="Operator",o[o.TypeParameter=25]="TypeParameter"})(SI||(SI={}));var yI;(function(o){o[o.Deprecated=1]="Deprecated"})(yI||(yI={}));var LI;(function(o){o[o.Hidden=0]="Hidden",o[o.Blink=1]="Blink",o[o.Smooth=2]="Smooth",o[o.Phase=3]="Phase",o[o.Expand=4]="Expand",o[o.Solid=5]="Solid"})(LI||(LI={}));var DI;(function(o){o[o.Line=1]="Line",o[o.Block=2]="Block",o[o.Underline=3]="Underline",o[o.LineThin=4]="LineThin",o[o.BlockOutline=5]="BlockOutline",o[o.UnderlineThin=6]="UnderlineThin"})(DI||(DI={}));var xI;(function(o){o[o.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",o[o.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",o[o.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",o[o.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(xI||(xI={}));var kI;(function(o){o[o.None=0]="None",o[o.Same=1]="Same",o[o.Indent=2]="Indent",o[o.DeepIndent=3]="DeepIndent"})(kI||(kI={}));let Yb=class{static chord(e,t){return fn(e,t)}};Yb.CtrlCmd=2048;Yb.Shift=1024;Yb.Alt=512;Yb.WinCtrl=256;function u8(){return{editor:void 0,languages:void 0,CancellationTokenSource:tn,Emitter:W,KeyCode:aI,KeyMod:Yb,Position:z,Range:k,Selection:Ae,SelectionDirection:bI,MarkerSeverity:lI,MarkerTag:dI,Uri:ze,Token:bv}}function tY(o,e){const t=o;typeof t.vscodeWindowId!="number"&&Object.defineProperty(t,"vscodeWindowId",{get:()=>e})}const Ai=window,kl=Ai;class iY{constructor(e){this.fn=e,this.lastCache=void 0,this.lastArgKey=void 0}get(e){const t=JSON.stringify(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this.fn(e)),this.lastCache}}class HP{get cachedValues(){return this._map}constructor(e){this.fn=e,this._map=new Map}get(e){if(this._map.has(e))return this._map.get(e);const t=this.fn(e);return this._map.set(e,t),t}}class Ru{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}var Lp;function h8(o){return!o||typeof o!="string"?!0:o.trim().length===0}const nY=/{(\d+)}/g;function Xh(o,...e){return e.length===0?o:o.replace(nY,function(t,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=e.length?t:e[n]})}function dw(o){return o.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function qo(o){return o.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function sY(o,e=" "){const t=Xb(o,e);return g8(t,e)}function Xb(o,e){if(!o||!e)return o;const t=e.length;if(t===0||o.length===0)return o;let i=0;for(;o.indexOf(e,i)===i;)i=i+t;return o.substring(i)}function g8(o,e){if(!o||!e)return o;const t=e.length,i=o.length;if(t===0||i===0)return o;let n=i,s=-1;for(;s=o.lastIndexOf(e,n-1),!(s===-1||s+t!==n);){if(s===0)return"";n=s}return o.substring(0,n)}function oY(o){return o.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function rY(o){return o.replace(/\*/g,"")}function f8(o,e,t={}){if(!o)throw new Error("Cannot create regex from empty string");e||(o=qo(o)),t.wholeWord&&(/\B/.test(o.charAt(0))||(o="\\b"+o),/\B/.test(o.charAt(o.length-1))||(o=o+"\\b"));let i="";return t.global&&(i+="g"),t.matchCase||(i+="i"),t.multiline&&(i+="m"),t.unicode&&(i+="u"),new RegExp(o,i)}function aY(o){return o.source==="^"||o.source==="^$"||o.source==="$"||o.source==="^\\s*$"?!1:!!(o.exec("")&&o.lastIndex===0)}function Rl(o){return o.split(/\r\n|\r|\n/)}function Cs(o){for(let e=0,t=o.length;e=0;t--){const i=o.charCodeAt(t);if(i!==32&&i!==9)return t}return-1}function Sv(o,e){return oe?1:0}function dM(o,e,t=0,i=o.length,n=0,s=e.length){for(;td)return 1}const r=i-t,a=s-n;return ra?1:0}function II(o,e){return Qb(o,e,0,o.length,0,e.length)}function Qb(o,e,t=0,i=o.length,n=0,s=e.length){for(;t=128||d>=128)return dM(o.toLowerCase(),e.toLowerCase(),t,i,n,s);Dc(l)&&(l-=32),Dc(d)&&(d-=32);const c=l-d;if(c!==0)return c}const r=i-t,a=s-n;return ra?1:0}function q0(o){return o>=48&&o<=57}function Dc(o){return o>=97&&o<=122}function el(o){return o>=65&&o<=90}function yf(o,e){return o.length===e.length&&Qb(o,e)===0}function cM(o,e){const t=e.length;return e.length>o.length?!1:Qb(o,e,0,t)===0}function Qh(o,e){const t=Math.min(o.length,e.length);let i;for(i=0;i1){const i=o.charCodeAt(e-2);if(bn(i))return uM(i,t)}return t}class hM{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){const e=lY(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=uw(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class hw{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new hM(e,t)}nextGraphemeLength(){const e=xc.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const s=t.offset,r=e.getGraphemeBreakType(t.nextCodePoint());if(zP(n,r)){t.setOffset(s);break}n=r}return t.offset-i}prevGraphemeLength(){const e=xc.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const s=t.offset,r=e.getGraphemeBreakType(t.prevCodePoint());if(zP(r,n)){t.setOffset(s);break}n=r}return i-t.offset}eol(){return this._iterator.eol()}}function gM(o,e){return new hw(o,e).nextGraphemeLength()}function p8(o,e){return new hw(o,e).prevGraphemeLength()}function dY(o,e){e>0&&Jh(o.charCodeAt(e))&&e--;const t=e+gM(o,e);return[t-p8(o,t),t]}let ED;function cY(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function Dp(o){return ED||(ED=cY()),ED.test(o)}const uY=/^[\t\n\r\x20-\x7E]*$/;function Jb(o){return uY.test(o)}const m8=/[\u2028\u2029]/;function _8(o){return m8.test(o)}function ou(o){return o>=11904&&o<=55215||o>=63744&&o<=64255||o>=65281&&o<=65374}function fM(o){return o>=127462&&o<=127487||o===8986||o===8987||o===9200||o===9203||o>=9728&&o<=10175||o===11088||o===11093||o>=127744&&o<=128591||o>=128640&&o<=128764||o>=128992&&o<=129008||o>=129280&&o<=129535||o>=129648&&o<=129782}const hY="\uFEFF";function pM(o){return!!(o&&o.length>0&&o.charCodeAt(0)===65279)}function gY(o,e=!1){return o?(e&&(o=o.replace(/\\./g,"")),o.toLowerCase()!==o):!1}function v8(o){return o=o%(2*26),o<26?String.fromCharCode(97+o):String.fromCharCode(65+o-26)}function zP(o,e){return o===0?e!==5&&e!==7:o===2&&e===3?!1:o===4||o===2||o===3||e===4||e===2||e===3?!0:!(o===8&&(e===8||e===9||e===11||e===12)||(o===11||o===9)&&(e===9||e===10)||(o===12||o===10)&&e===10||e===5||e===13||e===7||o===1||o===13&&e===14||o===6&&e===6)}class xc{static getInstance(){return xc._INSTANCE||(xc._INSTANCE=new xc),xc._INSTANCE}constructor(){this._data=fY()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(et[3*n+1])n=2*n+1;else return t[3*n+2];return 0}}xc._INSTANCE=null;function fY(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function pY(o,e){if(o===0)return 0;const t=mY(o,e);if(t!==void 0)return t;const i=new hM(e,o);return i.prevCodePoint(),i.offset}function mY(o,e){const t=new hM(e,o);let i=t.prevCodePoint();for(;_Y(i)||i===65039||i===8419;){if(t.offset===0)return;i=t.prevCodePoint()}if(!fM(i))return;let n=t.offset;return n>0&&t.prevCodePoint()===8205&&(n=t.offset),n}function _Y(o){return 127995<=o&&o<=127999}const b8=" ";class eg{static getInstance(e){return Lp.cache.get(Array.from(e))}static getLocales(){return Lp._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}Lp=eg;eg.ambiguousCharacterData=new Ru(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'));eg.cache=new iY(o=>{function e(d){const c=new Map;for(let u=0;u!d.startsWith("_")&&d in n);s.length===0&&(s=["_default"]);let r;for(const d of s){const c=e(n[d]);r=i(r,c)}const a=e(n._common),l=t(a,r);return new Lp(l)});eg._locales=new Ru(()=>Object.keys(Lp.ambiguousCharacterData.value).filter(o=>!o.startsWith("_")));class Il{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(Il.getRawData())),this._data}static isInvisibleCharacter(e){return Il.getData().has(e)}static get codePoints(){return Il.getData()}}Il._data=void 0;class EI{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}EI.INSTANCE=new EI;class vY extends q{constructor(){super(),this._onDidChange=this._register(new W),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(e){var t;(t=this._mediaQueryList)===null||t===void 0||t.removeEventListener("change",this._listener),this._mediaQueryList=kl.matchMedia(`(resolution: ${kl.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),e&&this._onDidChange.fire()}}class bY extends q{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new W),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const e=this._register(new vY);this._register(e.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}_getPixelRatio(){const e=document.createElement("canvas").getContext("2d"),t=kl.devicePixelRatio||1,i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}}class CY{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=new bY),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}}function C8(o,e){typeof o=="string"&&(o=kl.matchMedia(o)),o.addEventListener("change",e)}const yv=new CY;function wY(){return EI.INSTANCE.getZoomFactor()}const hm=navigator.userAgent,pr=hm.indexOf("Firefox")>=0,dy=hm.indexOf("AppleWebKit")>=0,mM=hm.indexOf("Chrome")>=0,ru=!mM&&hm.indexOf("Safari")>=0,w8=!mM&&!ru&&dy;hm.indexOf("Electron/")>=0;const $P=hm.indexOf("Android")>=0;let ND=!1;if(kl.matchMedia){const o=kl.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=kl.matchMedia("(display-mode: fullscreen)");ND=o.matches,C8(o,({matches:t})=>{ND&&e.matches||(ND=t)})}class S8{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const t=ea(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const t=ea(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){const t=ea(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){const t=ea(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){const t=ea(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){const t=ea(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){const t=ea(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){const t=ea(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const t=ea(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const t=ea(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const t=ea(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function ea(o){return typeof o=="number"?`${o}px`:o}function Ht(o){return new S8(o)}function Jn(o,e){o instanceof S8?(o.setFontFamily(e.getMassagedFontFamily()),o.setFontWeight(e.fontWeight),o.setFontSize(e.fontSize),o.setFontFeatureSettings(e.fontFeatureSettings),o.setFontVariationSettings(e.fontVariationSettings),o.setLineHeight(e.lineHeight),o.setLetterSpacing(e.letterSpacing)):(o.style.fontFamily=e.getMassagedFontFamily(),o.style.fontWeight=e.fontWeight,o.style.fontSize=e.fontSize+"px",o.style.fontFeatureSettings=e.fontFeatureSettings,o.style.fontVariationSettings=e.fontVariationSettings,o.style.lineHeight=e.lineHeight+"px",o.style.letterSpacing=e.letterSpacing+"px")}class SY{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class _M{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),kl.document.body.appendChild(this._container),this._readFromDomElements(),kl.document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");Jn(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");Jn(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");Jn(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);const s=[];for(const r of this._requests){let a;r.type===0&&(a=t),r.type===2&&(a=i),r.type===1&&(a=n),a.appendChild(document.createElement("br"));const l=document.createElement("span");_M._render(l,r),a.appendChild(l),s.push(l)}this._container=e,this._testElements=s}static _render(e,t){if(t.chr===" "){let i=" ";for(let n=0;n<8;n++)i+=i;e.innerText=i}else{let i=t.chr;for(let n=0;n<8;n++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const i of e)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readFontInfo(e){if(!this._cache.has(e)){let t=this._actualReadFontInfo(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new NI({pixelRatio:yv.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}_createRequest(e,t,i,n){const s=new SY(e,t);return i.push(s),n==null||n.push(s),s}_actualReadFontInfo(e){const t=[],i=[],n=this._createRequest("n",0,t,i),s=this._createRequest("m",0,t,null),r=this._createRequest(" ",0,t,i),a=this._createRequest("0",0,t,i),l=this._createRequest("1",0,t,i),d=this._createRequest("2",0,t,i),c=this._createRequest("3",0,t,i),u=this._createRequest("4",0,t,i),h=this._createRequest("5",0,t,i),g=this._createRequest("6",0,t,i),f=this._createRequest("7",0,t,i),m=this._createRequest("8",0,t,i),v=this._createRequest("9",0,t,i),_=this._createRequest("→",0,t,i),b=this._createRequest("→",0,t,null),C=this._createRequest("·",0,t,i),w=this._createRequest("⸱",0,t,null),S="|/-_ilm%";for(let R=0,j=S.length;R.001){y=!1;break}}let E=!0;return y&&b.width!==I&&(E=!1),b.width>_.width&&(E=!1),new NI({pixelRatio:yv.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,fontVariationSettings:e.fontVariationSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:y,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:E,spaceWidth:r.width,middotWidth:C.width,wsmiddotWidth:w.width,maxDigitWidth:x},!0)}}class UP{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}const TI=new xY;var wa;(function(o){o.serviceIds=new Map,o.DI_TARGET="$di$target",o.DI_DEPENDENCIES="$di$dependencies";function e(t){return t[o.DI_DEPENDENCIES]||[]}o.getServiceDependencies=e})(wa||(wa={}));const qe=bt("instantiationService");function kY(o,e,t){e[wa.DI_TARGET]===e?e[wa.DI_DEPENDENCIES].push({id:o,index:t}):(e[wa.DI_DEPENDENCIES]=[{id:o,index:t}],e[wa.DI_TARGET]=e)}function bt(o){if(wa.serviceIds.has(o))return wa.serviceIds.get(o);const e=function(t,i,n){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");kY(e,t,n)};return e.toString=()=>o,wa.serviceIds.set(o,e),e}const Ot=bt("codeEditorService"),Si=bt("modelService"),Xs=bt("textModelService");class Rs extends q{constructor(e,t="",i="",n=!0,s){super(),this._onDidChange=this._register(new W),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=i,this._enabled=n,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}async run(e,t){this._actionCallback&&await this._actionCallback(e)}}class tg extends q{constructor(){super(...arguments),this._onWillRun=this._register(new W),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new W),this.onDidRun=this._onDidRun.event}async run(e,t){if(!e.enabled)return;this._onWillRun.fire({action:e});let i;try{await this.runAction(e,t)}catch(n){i=n}this._onDidRun.fire({action:e,error:i})}async runAction(e,t){await e.run(t)}}class Mn{constructor(){this.id=Mn.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let t=[];for(const i of e)i.length&&(t.length?t=[...t,new Mn,...i]:t=i);return t}async run(){}}Mn.ID="vs.actions.separator";class xp{get actions(){return this._actions}constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=n,this._actions=i}async run(){}}class cy extends Rs{constructor(){super(cy.ID,p("submenu.empty","(empty)"),void 0,!1)}}cy.ID="vs.actions.empty";function Qf(o){var e,t;return{id:o.id,label:o.label,class:o.class,enabled:(e=o.enabled)!==null&&e!==void 0?e:!0,checked:(t=o.checked)!==null&&t!==void 0?t:!1,run:async(...i)=>o.run(...i),tooltip:o.label}}var MI;(function(o){function e(t){return t&&typeof t=="object"&&typeof t.id=="string"}o.isThemeColor=e})(MI||(MI={}));var Ue;(function(o){o.iconNameSegment="[A-Za-z0-9]+",o.iconNameExpression="[A-Za-z0-9-]+",o.iconModifierExpression="~[A-Za-z]+",o.iconNameCharacter="[A-Za-z0-9~-]";const e=new RegExp(`^(${o.iconNameExpression})(${o.iconModifierExpression})?$`);function t(h){const g=e.exec(h.id);if(!g)return t(ve.error);const[,f,m]=g,v=["codicon","codicon-"+f];return m&&v.push("codicon-modifier-"+m.substring(1)),v}o.asClassNameArray=t;function i(h){return t(h).join(" ")}o.asClassName=i;function n(h){return"."+t(h).join(".")}o.asCSSSelector=n;function s(h){return h&&typeof h=="object"&&typeof h.id=="string"&&(typeof h.color>"u"||MI.isThemeColor(h.color))}o.isThemeIcon=s;const r=new RegExp(`^\\$\\((${o.iconNameExpression}(?:${o.iconModifierExpression})?)\\)$`);function a(h){const g=r.exec(h);if(!g)return;const[,f]=g;return{id:f}}o.fromString=a;function l(h){return{id:h}}o.fromId=l;function d(h,g){let f=h.id;const m=f.lastIndexOf("~");return m!==-1&&(f=f.substring(0,m)),g&&(f=`${f}~${g}`),{id:f}}o.modify=d;function c(h){const g=h.id.lastIndexOf("~");if(g!==-1)return h.id.substring(g+1)}o.getModifier=c;function u(h,g){var f,m;return h.id===g.id&&((f=h.color)===null||f===void 0?void 0:f.id)===((m=g.color)===null||m===void 0?void 0:m.id)}o.isEqual=u})(Ue||(Ue={}));const Ri=bt("commandService"),Et=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new W,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(o,e){if(!o)throw new Error("invalid command");if(typeof o=="string"){if(!e)throw new Error("invalid command");return this.registerCommand({id:o,handler:e})}if(o.metadata&&Array.isArray(o.metadata.args)){const r=[];for(const l of o.metadata.args)r.push(l.constraint);const a=o.handler;o.handler=function(l,...d){return lG(d,r),a(l,...d)}}const{id:t}=o;let i=this._commands.get(t);i||(i=new Ns,this._commands.set(t,i));const n=i.unshift(o),s=je(()=>{n();const r=this._commands.get(t);r!=null&&r.isEmpty()&&this._commands.delete(t)});return this._onDidRegisterCommand.fire(t),s}registerCommandAlias(o,e){return Et.registerCommand(o,(t,...i)=>t.get(Ri).executeCommand(e,...i))}getCommand(o){const e=this._commands.get(o);if(!(!e||e.isEmpty()))return wt.first(e)}getCommands(){const o=new Map;for(const e of this._commands.keys()){const t=this.getCommand(e);t&&o.set(e,t)}return o}};Et.registerCommand("noop",()=>{});function MD(...o){switch(o.length){case 1:return p("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",o[0]);case 2:return p("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",o[0],o[1]);case 3:return p("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",o[0],o[1],o[2]);default:return}}const IY=p("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),EY=p("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");let mh=class AI{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw tM(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const t=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:t})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const t=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:t})}else this._match(126)?this._addToken(9):this._error(MD("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(MD("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(MD("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return this._isAtEnd()||this._input.charCodeAt(this._current)!==e?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,i=this._input.substring(this._start,this._current),n={type:19,offset:this._start,lexeme:i};this._errors.push({offset:t,lexeme:i,additionalInfo:e}),this._tokens.push(n)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),i=AI._keywords.get(t);i?this._addToken(i):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(IY);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let e=this._current,t=!1,i=!1;for(;;){if(e>=this._input.length){this._current=e,this._error(EY);return}const s=this._input.charCodeAt(e);if(t)t=!1;else if(s===47&&!i){e++;break}else s===91?i=!0:s===92?t=!0:s===93&&(i=!1);e++}for(;e=this._input.length}};mh._regexFlags=new Set(["i","g","s","m","y","u"].map(o=>o.charCodeAt(0)));mh._keywords=new Map([["not",14],["in",13],["false",12],["true",11]]);const cs=new Map;cs.set("false",!1);cs.set("true",!0);cs.set("isMac",It);cs.set("isLinux",ws);cs.set("isWindows",is);cs.set("isWeb",Tu);cs.set("isMacNative",It&&!Tu);cs.set("isEdge",DG);cs.set("isFirefox",yG);cs.set("isChrome",K9);cs.set("isSafari",LG);const NY=Object.prototype.hasOwnProperty,TY={regexParsingWithErrorRecovery:!0},MY=p("contextkey.parser.error.emptyString","Empty context key expression"),AY=p("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),RY=p("contextkey.parser.error.noInAfterNot","'in' after 'not'."),jP=p("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),PY=p("contextkey.parser.error.unexpectedToken","Unexpected token"),OY=p("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),FY=p("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),BY=p("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");let y8=class h_{constructor(e=TY){this._config=e,this._scanner=new mh,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(e===""){this._parsingErrors.push({message:MY,offset:0,lexeme:"",additionalInfo:AY});return}this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const t=this._expr();if(!this._isAtEnd()){const i=this._peek(),n=i.type===17?OY:void 0;throw this._parsingErrors.push({message:PY,offset:i.offset,lexeme:mh.getLexeme(i),additionalInfo:n}),h_._parseError}return t}catch(t){if(t!==h_._parseError)throw t;return}}_expr(){return this._or()}_or(){const e=[this._and()];for(;this._matchOne(16);){const t=this._and();e.push(t)}return e.length===1?e[0]:ae.or(...e)}_and(){const e=[this._term()];for(;this._matchOne(15);){const t=this._term();e.push(t)}return e.length===1?e[0]:ae.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),Ps.INSTANCE;case 12:return this._advance(),qs.INSTANCE;case 0:{this._advance();const t=this._expr();return this._consume(1,jP),t==null?void 0:t.negate()}case 17:return this._advance(),Tg.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),ae.true();case 12:return this._advance(),ae.false();case 0:{this._advance();const t=this._expr();return this._consume(1,jP),t}case 17:{const t=e.lexeme;if(this._advance(),this._matchOne(9)){const n=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),n.type!==10)throw this._errExpectedButGot("REGEX",n);const s=n.lexeme,r=s.lastIndexOf("/"),a=r===s.length-1?void 0:this._removeFlagsGY(s.substring(r+1));let l;try{l=new RegExp(s.substring(1,r),a)}catch{throw this._errExpectedButGot("REGEX",n)}return Lv.create(t,l)}switch(n.type){case 10:case 19:{const s=[n.lexeme];this._advance();let r=this._peek(),a=0;for(let h=0;h=0){const d=s.slice(a+1,l),c=s[l+1]==="i"?"i":"";try{r=new RegExp(d,c)}catch{throw this._errExpectedButGot("REGEX",n)}}}if(r===null)throw this._errExpectedButGot("REGEX",n);return Lv.create(t,r)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,RY);const n=this._value();return ae.notIn(t,n)}switch(this._peek().type){case 3:{this._advance();const n=this._value();if(this._previous().type===18)return ae.equals(t,n);switch(n){case"true":return ae.has(t);case"false":return ae.not(t);default:return ae.equals(t,n)}}case 4:{this._advance();const n=this._value();if(this._previous().type===18)return ae.notEquals(t,n);switch(n){case"true":return ae.not(t);case"false":return ae.has(t);default:return ae.notEquals(t,n)}}case 5:return this._advance(),_y.create(t,this._value());case 6:return this._advance(),vy.create(t,this._value());case 7:return this._advance(),py.create(t,this._value());case 8:return this._advance(),my.create(t,this._value());case 13:return this._advance(),ae.in(t,this._value());default:return ae.has(t)}}case 20:throw this._parsingErrors.push({message:FY,offset:e.offset,lexeme:"",additionalInfo:BY}),h_._parseError;default:throw this._errExpectedButGot(`true | false | KEY | KEY '=~' REGEX | KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return this._check(e)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,i){const n=p("contextkey.parser.error.expectedButGot",`Expected: {0} -Received: '{1}'.`,e,mh.getLexeme(t)),s=t.offset,r=mh.getLexeme(t);return this._parsingErrors.push({message:n,offset:s,lexeme:r,additionalInfo:i}),h_._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}};y7._parseError=new Error;class ae{static false(){return Ps.INSTANCE}static true(){return qs.INSTANCE}static has(e){return Ng.create(e)}static equals(e,t){return gm.create(e,t)}static notEquals(e,t){return gy.create(e,t)}static regex(e,t){return Lv.create(e,t)}static in(e,t){return uy.create(e,t)}static notIn(e,t){return hy.create(e,t)}static not(e){return Tg.create(e)}static and(...e){return xh.create(e,null,!0)}static or(...e){return bd.create(e,null,!0)}static deserialize(e){return e==null?void 0:this._parser.parse(e)}}ae._parser=new y7({regexParsingWithErrorRecovery:!1});function PY(o,e){const t=o?o.substituteConstants():void 0,i=e?e.substituteConstants():void 0;return!t&&!i?!0:!t||!i?!1:t.equals(i)}function O_(o,e){return o.cmp(e)}class Ps{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return qs.INSTANCE}}Ps.INSTANCE=new Ps;class qs{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return Ps.INSTANCE}}qs.INSTANCE=new qs;class Ng{static create(e,t=null){const i=cs.get(e);return typeof i=="boolean"?i?qs.INSTANCE:Ps.INSTANCE:new Ng(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:D7(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=cs.get(this.key);return typeof e=="boolean"?e?qs.INSTANCE:Ps.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=Tg.create(this.key,this)),this.negated}}class gm{static create(e,t,i=null){if(typeof t=="boolean")return t?Ng.create(e,i):Tg.create(e,i);const n=cs.get(e);return typeof n=="boolean"?t===(n?"true":"false")?qs.INSTANCE:Ps.INSTANCE:new gm(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:Mg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=cs.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?qs.INSTANCE:Ps.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=gy.create(this.key,this.value,this)),this.negated}}class uy{static create(e,t){return new uy(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:Mg(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type?this.key===e.key&&this.valueKey===e.valueKey:!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.includes(i):typeof i=="string"&&typeof t=="object"&&t!==null?xY.call(t,i):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=hy.create(this.key,this.valueKey)),this.negated}}class hy{static create(e,t){return new hy(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=uy.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type?this._negated.equals(e._negated):!1}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class gy{static create(e,t,i=null){if(typeof t=="boolean")return t?Tg.create(e,i):Ng.create(e,i);const n=cs.get(e);return typeof n=="boolean"?t===(n?"true":"false")?Ps.INSTANCE:qs.INSTANCE:new gy(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:Mg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=cs.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?Ps.INSTANCE:qs.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=gm.create(this.key,this.value,this)),this.negated}}class Tg{static create(e,t=null){const i=cs.get(e);return typeof i=="boolean"?i?Ps.INSTANCE:qs.INSTANCE:new Tg(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:D7(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=cs.get(this.key);return typeof e=="boolean"?e?Ps.INSTANCE:qs.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Ng.create(this.key,this)),this.negated}}function fy(o,e){if(typeof o=="string"){const t=parseFloat(o);isNaN(t)||(o=t)}return typeof o=="string"||typeof o=="number"?e(o):Ps.INSTANCE}class py{static create(e,t,i=null){return fy(t,n=>new py(e,n,i))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:Mg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=vy.create(this.key,this.value,this)),this.negated}}class my{static create(e,t,i=null){return fy(t,n=>new my(e,n,i))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:Mg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_y.create(this.key,this.value,this)),this.negated}}class _y{static create(e,t,i=null){return fy(t,n=>new _y(e,n,i))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:Mg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))new vy(e,n,i))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:Mg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=py.create(this.key,this.value,this)),this.negated}}class Lv{static create(e,t){return new Lv(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return ti?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return this.regexp?this.regexp.test(t):!1}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=vM.create(this)),this.negated}}class vM{static create(e){return new vM(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type?this._actual.equals(e._actual):!1}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function L7(o){let e=null;for(let t=0,i=o.length;te.expr.length)return 1;for(let t=0,i=this.expr.length;t1;){const r=n[n.length-1];if(r.type!==9)break;n.pop();const a=n.pop(),l=n.length===0,d=bd.create(r.expr.map(c=>xh.create([c,a],null,i)),null,l);d&&(n.push(d),n.sort(O_))}if(n.length===1)return n[0];if(i){for(let r=0;re.serialize()).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=bd.create(e,this,!0)}return this.negated}}class bd{static create(e,t,i){return bd._normalizeArr(e,t,i)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;te.serialize()).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),i=e.shift(),n=[];for(const s of qP(t))for(const r of qP(i))n.push(xh.create([s,r],null,!1));e.unshift(bd.create(n,null,!1))}this.negated=bd.create(e,this,!0)}return this.negated}}class De extends Ng{static all(){return De._info.values()}constructor(e,t,i){super(e,null),this._defaultValue=t,typeof i=="object"?De._info.push({...i,key:e}):i!==!0&&De._info.push({key:e,description:i,type:t!=null?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return gm.create(this.key,e)}}De._info=[];const Xe=bt("contextKeyService");function D7(o,e){return oe?1:0}function Mg(o,e,t,i){return ot?1:ei?1:0}function RI(o,e){if(o.type===0||e.type===1)return!0;if(o.type===9)return e.type===9?KP(o.expr,e.expr):!1;if(e.type===9){for(const t of e.expr)if(RI(o,t))return!0;return!1}if(o.type===6){if(e.type===6)return KP(e.expr,o.expr);for(const t of o.expr)if(RI(t,e))return!0;return!1}return o.equals(e)}function KP(o,e){let t=0,i=0;for(;t>>0,i=(o&4294901760)>>>16;return i!==0?new AD([G0(t,e),G0(i,e)]):new AD([G0(t,e)])}else{const t=[];for(let i=0;i{a(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(VY)),this._cachedMergedKeybindings.slice(0)}}const Gs=new bM,WY={EditorModes:"platform.keybindingsRegistry"};xi.add(WY.EditorModes,Gs);function VY(o,e){if(o.weight1!==e.weight1)return o.weight1-e.weight1;if(o.command&&e.command){if(o.commande.command)return 1}return o.weight2-e.weight2}var HY=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},GP=function(o,e){return function(t,i){e(t,i,o)}},m1;function Lf(o){return o.command!==void 0}function zY(o){return o.submenu!==void 0}class N{constructor(e){if(N._instances.has(e))throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);N._instances.set(e,this),this.id=e}}N._instances=new Map;N.CommandPalette=new N("CommandPalette");N.DebugBreakpointsContext=new N("DebugBreakpointsContext");N.DebugCallStackContext=new N("DebugCallStackContext");N.DebugConsoleContext=new N("DebugConsoleContext");N.DebugVariablesContext=new N("DebugVariablesContext");N.DebugWatchContext=new N("DebugWatchContext");N.DebugToolBar=new N("DebugToolBar");N.DebugToolBarStop=new N("DebugToolBarStop");N.EditorContext=new N("EditorContext");N.SimpleEditorContext=new N("SimpleEditorContext");N.EditorContent=new N("EditorContent");N.EditorLineNumberContext=new N("EditorLineNumberContext");N.EditorContextCopy=new N("EditorContextCopy");N.EditorContextPeek=new N("EditorContextPeek");N.EditorContextShare=new N("EditorContextShare");N.EditorTitle=new N("EditorTitle");N.EditorTitleRun=new N("EditorTitleRun");N.EditorTitleContext=new N("EditorTitleContext");N.EditorTitleContextShare=new N("EditorTitleContextShare");N.EmptyEditorGroup=new N("EmptyEditorGroup");N.EmptyEditorGroupContext=new N("EmptyEditorGroupContext");N.EditorTabsBarContext=new N("EditorTabsBarContext");N.EditorTabsBarShowTabsSubmenu=new N("EditorTabsBarShowTabsSubmenu");N.EditorActionsPositionSubmenu=new N("EditorActionsPositionSubmenu");N.ExplorerContext=new N("ExplorerContext");N.ExplorerContextShare=new N("ExplorerContextShare");N.ExtensionContext=new N("ExtensionContext");N.GlobalActivity=new N("GlobalActivity");N.CommandCenter=new N("CommandCenter");N.CommandCenterCenter=new N("CommandCenterCenter");N.LayoutControlMenuSubmenu=new N("LayoutControlMenuSubmenu");N.LayoutControlMenu=new N("LayoutControlMenu");N.MenubarMainMenu=new N("MenubarMainMenu");N.MenubarAppearanceMenu=new N("MenubarAppearanceMenu");N.MenubarDebugMenu=new N("MenubarDebugMenu");N.MenubarEditMenu=new N("MenubarEditMenu");N.MenubarCopy=new N("MenubarCopy");N.MenubarFileMenu=new N("MenubarFileMenu");N.MenubarGoMenu=new N("MenubarGoMenu");N.MenubarHelpMenu=new N("MenubarHelpMenu");N.MenubarLayoutMenu=new N("MenubarLayoutMenu");N.MenubarNewBreakpointMenu=new N("MenubarNewBreakpointMenu");N.PanelAlignmentMenu=new N("PanelAlignmentMenu");N.PanelPositionMenu=new N("PanelPositionMenu");N.ActivityBarPositionMenu=new N("ActivityBarPositionMenu");N.MenubarPreferencesMenu=new N("MenubarPreferencesMenu");N.MenubarRecentMenu=new N("MenubarRecentMenu");N.MenubarSelectionMenu=new N("MenubarSelectionMenu");N.MenubarShare=new N("MenubarShare");N.MenubarSwitchEditorMenu=new N("MenubarSwitchEditorMenu");N.MenubarSwitchGroupMenu=new N("MenubarSwitchGroupMenu");N.MenubarTerminalMenu=new N("MenubarTerminalMenu");N.MenubarViewMenu=new N("MenubarViewMenu");N.MenubarHomeMenu=new N("MenubarHomeMenu");N.OpenEditorsContext=new N("OpenEditorsContext");N.OpenEditorsContextShare=new N("OpenEditorsContextShare");N.ProblemsPanelContext=new N("ProblemsPanelContext");N.SCMInputBox=new N("SCMInputBox");N.SCMHistoryItem=new N("SCMHistoryItem");N.SCMChangeContext=new N("SCMChangeContext");N.SCMResourceContext=new N("SCMResourceContext");N.SCMResourceContextShare=new N("SCMResourceContextShare");N.SCMResourceFolderContext=new N("SCMResourceFolderContext");N.SCMResourceGroupContext=new N("SCMResourceGroupContext");N.SCMSourceControl=new N("SCMSourceControl");N.SCMTitle=new N("SCMTitle");N.SearchContext=new N("SearchContext");N.SearchActionMenu=new N("SearchActionContext");N.StatusBarWindowIndicatorMenu=new N("StatusBarWindowIndicatorMenu");N.StatusBarRemoteIndicatorMenu=new N("StatusBarRemoteIndicatorMenu");N.StickyScrollContext=new N("StickyScrollContext");N.TestItem=new N("TestItem");N.TestItemGutter=new N("TestItemGutter");N.TestMessageContext=new N("TestMessageContext");N.TestMessageContent=new N("TestMessageContent");N.TestPeekElement=new N("TestPeekElement");N.TestPeekTitle=new N("TestPeekTitle");N.TouchBarContext=new N("TouchBarContext");N.TitleBarContext=new N("TitleBarContext");N.TitleBarTitleContext=new N("TitleBarTitleContext");N.TunnelContext=new N("TunnelContext");N.TunnelPrivacy=new N("TunnelPrivacy");N.TunnelProtocol=new N("TunnelProtocol");N.TunnelPortInline=new N("TunnelInline");N.TunnelTitle=new N("TunnelTitle");N.TunnelLocalAddressInline=new N("TunnelLocalAddressInline");N.TunnelOriginInline=new N("TunnelOriginInline");N.ViewItemContext=new N("ViewItemContext");N.ViewContainerTitle=new N("ViewContainerTitle");N.ViewContainerTitleContext=new N("ViewContainerTitleContext");N.ViewTitle=new N("ViewTitle");N.ViewTitleContext=new N("ViewTitleContext");N.CommentEditorActions=new N("CommentEditorActions");N.CommentThreadTitle=new N("CommentThreadTitle");N.CommentThreadActions=new N("CommentThreadActions");N.CommentThreadAdditionalActions=new N("CommentThreadAdditionalActions");N.CommentThreadTitleContext=new N("CommentThreadTitleContext");N.CommentThreadCommentContext=new N("CommentThreadCommentContext");N.CommentTitle=new N("CommentTitle");N.CommentActions=new N("CommentActions");N.InteractiveToolbar=new N("InteractiveToolbar");N.InteractiveCellTitle=new N("InteractiveCellTitle");N.InteractiveCellDelete=new N("InteractiveCellDelete");N.InteractiveCellExecute=new N("InteractiveCellExecute");N.InteractiveInputExecute=new N("InteractiveInputExecute");N.NotebookToolbar=new N("NotebookToolbar");N.NotebookStickyScrollContext=new N("NotebookStickyScrollContext");N.NotebookCellTitle=new N("NotebookCellTitle");N.NotebookCellDelete=new N("NotebookCellDelete");N.NotebookCellInsert=new N("NotebookCellInsert");N.NotebookCellBetween=new N("NotebookCellBetween");N.NotebookCellListTop=new N("NotebookCellTop");N.NotebookCellExecute=new N("NotebookCellExecute");N.NotebookCellExecutePrimary=new N("NotebookCellExecutePrimary");N.NotebookDiffCellInputTitle=new N("NotebookDiffCellInputTitle");N.NotebookDiffCellMetadataTitle=new N("NotebookDiffCellMetadataTitle");N.NotebookDiffCellOutputsTitle=new N("NotebookDiffCellOutputsTitle");N.NotebookOutputToolbar=new N("NotebookOutputToolbar");N.NotebookEditorLayoutConfigure=new N("NotebookEditorLayoutConfigure");N.NotebookKernelSource=new N("NotebookKernelSource");N.BulkEditTitle=new N("BulkEditTitle");N.BulkEditContext=new N("BulkEditContext");N.TimelineItemContext=new N("TimelineItemContext");N.TimelineTitle=new N("TimelineTitle");N.TimelineTitleContext=new N("TimelineTitleContext");N.TimelineFilterSubMenu=new N("TimelineFilterSubMenu");N.AccountsContext=new N("AccountsContext");N.SidebarTitle=new N("SidebarTitle");N.PanelTitle=new N("PanelTitle");N.AuxiliaryBarTitle=new N("AuxiliaryBarTitle");N.TerminalInstanceContext=new N("TerminalInstanceContext");N.TerminalEditorInstanceContext=new N("TerminalEditorInstanceContext");N.TerminalNewDropdownContext=new N("TerminalNewDropdownContext");N.TerminalTabContext=new N("TerminalTabContext");N.TerminalTabEmptyAreaContext=new N("TerminalTabEmptyAreaContext");N.TerminalStickyScrollContext=new N("TerminalStickyScrollContext");N.WebviewContext=new N("WebviewContext");N.InlineCompletionsActions=new N("InlineCompletionsActions");N.NewFile=new N("NewFile");N.MergeInput1Toolbar=new N("MergeToolbar1Toolbar");N.MergeInput2Toolbar=new N("MergeToolbar2Toolbar");N.MergeBaseToolbar=new N("MergeBaseToolbar");N.MergeInputResultToolbar=new N("MergeToolbarResultToolbar");N.InlineSuggestionToolbar=new N("InlineSuggestionToolbar");N.ChatContext=new N("ChatContext");N.ChatCodeBlock=new N("ChatCodeblock");N.ChatMessageTitle=new N("ChatMessageTitle");N.ChatExecute=new N("ChatExecute");N.ChatInputSide=new N("ChatInputSide");N.AccessibleView=new N("AccessibleView");N.MultiDiffEditorFileToolbar=new N("MultiDiffEditorFileToolbar");const Ba=bt("menuService");class Cd{static for(e){let t=this._all.get(e);return t||(t=new Cd(e),this._all.set(e,t)),t}static merge(e){const t=new Set;for(const i of e)i instanceof Cd&&t.add(i.id);return t}constructor(e){this.id=e,this.has=t=>t===e}}Cd._all=new Map;const zn=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new SZ({merge:Cd.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(o){return this._commands.set(o.id,o),this._onDidChangeMenu.fire(Cd.for(N.CommandPalette)),je(()=>{this._commands.delete(o.id)&&this._onDidChangeMenu.fire(Cd.for(N.CommandPalette))})}getCommand(o){return this._commands.get(o)}getCommands(){const o=new Map;return this._commands.forEach((e,t)=>o.set(t,e)),o}appendMenuItem(o,e){let t=this._menuItems.get(o);t||(t=new Ns,this._menuItems.set(o,t));const i=t.push(e);return this._onDidChangeMenu.fire(Cd.for(o)),je(()=>{i(),this._onDidChangeMenu.fire(Cd.for(o))})}appendMenuItems(o){const e=new de;for(const{id:t,item:i}of o)e.add(this.appendMenuItem(t,i));return e}getMenuItems(o){let e;return this._menuItems.has(o)?e=[...this._menuItems.get(o)]:e=[],o===N.CommandPalette&&this._appendImplicitItems(e),e}_appendImplicitItems(o){const e=new Set;for(const t of o)Lf(t)&&(e.add(t.command.id),t.alt&&e.add(t.alt.id));this._commands.forEach((t,i)=>{e.has(i)||o.push({command:t})})}};class xv extends xp{constructor(e,t,i){super(`submenuitem.${e.submenu.id}`,typeof e.title=="string"?e.title:e.title.value,i,"submenu"),this.item=e,this.hideActions=t}}let Ur=m1=class{static label(e,t){return t!=null&&t.renderShortTitle&&e.shortTitle?typeof e.shortTitle=="string"?e.shortTitle:e.shortTitle.value:typeof e.title=="string"?e.title:e.title.value}constructor(e,t,i,n,s,r){var a,l;this.hideActions=n,this._commandService=r,this.id=e.id,this.label=m1.label(e,i),this.tooltip=(l=typeof e.tooltip=="string"?e.tooltip:(a=e.tooltip)===null||a===void 0?void 0:a.value)!==null&&l!==void 0?l:"",this.enabled=!e.precondition||s.contextMatchesRules(e.precondition),this.checked=void 0;let d;if(e.toggled){const c=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=s.contextMatchesRules(c.condition),this.checked&&c.tooltip&&(this.tooltip=typeof c.tooltip=="string"?c.tooltip:c.tooltip.value),this.checked&&Ue.isThemeIcon(c.icon)&&(d=c.icon),this.checked&&c.title&&(this.label=typeof c.title=="string"?c.title:c.title.value)}d||(d=Ue.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new m1(t,void 0,i,n,s,r):void 0,this._options=i,this.class=d&&Ue.asClassName(d)}run(...e){var t,i;let n=[];return!((t=this._options)===null||t===void 0)&&t.arg&&(n=[...n,this._options.arg]),!((i=this._options)===null||i===void 0)&&i.shouldForwardArgs&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};Ur=m1=HY([GP(4,Xe),GP(5,Ri)],Ur);class Qo{constructor(e){this.desc=e}}function mi(o){const e=new de,t=new o,{f1:i,menu:n,keybinding:s,...r}=t.desc;if(e.add(Et.registerCommand({id:r.id,handler:(a,...l)=>t.run(a,...l),metadata:r.metadata})),Array.isArray(n))for(const a of n)e.add(zn.appendMenuItem(a.id,{command:{...r,precondition:a.precondition===null?void 0:r.precondition},...a}));else n&&e.add(zn.appendMenuItem(n.id,{command:{...r,precondition:n.precondition===null?void 0:r.precondition},...n}));if(i&&(e.add(zn.appendMenuItem(N.CommandPalette,{command:r,when:r.precondition})),e.add(zn.addCommand(r))),Array.isArray(s))for(const a of s)e.add(Gs.registerKeybindingRule({...a,id:r.id,when:r.precondition?ae.and(r.precondition,a.when):a.when}));else s&&e.add(Gs.registerKeybindingRule({...s,id:r.id,when:r.precondition?ae.and(r.precondition,s.when):s.when}));return e}const vo=bt("telemetryService"),bo=bt("logService");var Zn;(function(o){o[o.Off=0]="Off",o[o.Trace=1]="Trace",o[o.Debug=2]="Debug",o[o.Info=3]="Info",o[o.Warning=4]="Warning",o[o.Error=5]="Error"})(Zn||(Zn={}));const k7=Zn.Info;class I7 extends q{constructor(){super(...arguments),this.level=k7,this._onDidChangeLogLevel=this._register(new W),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==Zn.Off&&this.level<=e}}class $Y extends I7{constructor(e=k7,t=!0){super(),this.useColors=t,this.setLevel(e)}trace(e,...t){this.checkLogLevel(Zn.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...t):console.log(e,...t))}debug(e,...t){this.checkLogLevel(Zn.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...t):console.log(e,...t))}info(e,...t){this.checkLogLevel(Zn.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...t):console.log(e,...t))}warn(e,...t){this.checkLogLevel(Zn.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...t):console.log(e,...t))}error(e,...t){this.checkLogLevel(Zn.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...t):console.error(e,...t))}dispose(){}}class UY extends I7{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const i of this.loggers)i.trace(e,...t)}debug(e,...t){for(const i of this.loggers)i.debug(e,...t)}info(e,...t){for(const i of this.loggers)i.info(e,...t)}warn(e,...t){for(const i of this.loggers)i.warn(e,...t)}error(e,...t){for(const i of this.loggers)i.error(e,...t)}dispose(){for(const e of this.loggers)e.dispose()}}function jY(o){switch(o){case Zn.Trace:return"trace";case Zn.Debug:return"debug";case Zn.Info:return"info";case Zn.Warning:return"warn";case Zn.Error:return"error";case Zn.Off:return"off"}}new De("logLevel",jY(Zn.Info));const CM={clipboard:{writeText:Ml||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:Ml||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},pointerEvents:Ai.PointerEvent&&("ontouchstart"in Ai||navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)};function KY(o){if(o.charCode){const t=String.fromCharCode(o.charCode).toUpperCase();return vd.fromString(t)}const e=o.keyCode;if(e===3)return 7;if(pr)switch(e){case 59:return 85;case 60:if(ws)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(It)return 57;break}else if(dy){if(It&&e===93)return 57;if(!It&&e===92)return 57}return t7[e]||0}const qY=It?256:2048,GY=512,ZY=1024,YY=It?2048:256;class gi{constructor(e){this._standardKeyboardEventBrand=!0;const t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState("AltGraph"),this.keyCode=KY(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=qY),this.altKey&&(t|=GY),this.shiftKey&&(t|=ZY),this.metaKey&&(t|=YY),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new zd(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}const ZP=new WeakMap;function XY(o){if(!o.parent||o.parent===o)return null;try{const e=o.location,t=o.parent.location;if(e.origin!=="null"&&t.origin!=="null"&&e.origin!==t.origin)return null}catch{return null}return o.parent}class QY{static getSameOriginWindowChain(e){let t=ZP.get(e);if(!t){t=[],ZP.set(e,t);let i=e,n;do n=XY(i),n?t.push({window:new WeakRef(i),iframeElement:i.frameElement||null}):t.push({window:new WeakRef(i),iframeElement:null}),i=n;while(i)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){var i,n;if(!t||e===t)return{top:0,left:0};let s=0,r=0;const a=this.getSameOriginWindowChain(e);for(const l of a){const d=l.window.deref();if(s+=(i=d==null?void 0:d.scrollY)!==null&&i!==void 0?i:0,r+=(n=d==null?void 0:d.scrollX)!==null&&n!==void 0?n:0,d===t||!l.iframeElement)break;const c=l.iframeElement.getBoundingClientRect();s+=c.top,r+=c.left}return{top:s,left:r}}}class Pr{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);const i=QY.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=i.left,this.posy-=i.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class ig{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){const n=e,s=e;if(typeof n.wheelDeltaY<"u")this.deltaY=n.wheelDeltaY/120;else if(typeof s.VERTICAL_AXIS<"u"&&s.axis===s.VERTICAL_AXIS)this.deltaY=-s.detail/3;else if(e.type==="wheel"){const r=e;r.deltaMode===r.DOM_DELTA_LINE?pr&&!It?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof n.wheelDeltaX<"u")ru&&is?this.deltaX=-(n.wheelDeltaX/120):this.deltaX=n.wheelDeltaX/120;else if(typeof s.HORIZONTAL_AXIS<"u"&&s.axis===s.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){const r=e;r.deltaMode===r.DOM_DELTA_LINE?pr&&!It?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;(e=this.browserEvent)===null||e===void 0||e.preventDefault()}stopPropagation(){var e;(e=this.browserEvent)===null||e===void 0||e.stopPropagation()}}const E7=Symbol("MicrotaskDelay");function OI(o){return!!o&&typeof o.then=="function"}function _n(o){const e=new tn,t=o(e.token),i=new Promise((n,s)=>{const r=e.token.onCancellationRequested(()=>{r.dispose(),e.dispose(),s(new Mu)});Promise.resolve(t).then(a=>{r.dispose(),e.dispose(),n(a)},a=>{r.dispose(),e.dispose(),s(a)})});return new class{cancel(){e.cancel()}then(n,s){return i.then(n,s)}catch(n){return this.then(void 0,n)}finally(n){return i.finally(n)}}}function Cy(o,e,t){return new Promise((i,n)=>{const s=e.onCancellationRequested(()=>{s.dispose(),i(t)});o.then(i,n).finally(()=>s.dispose())})}class JY{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const t=()=>{if(this.queuedPromise=null,this.isDisposed)return;const i=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,i};this.queuedPromise=new Promise(i=>{this.activePromise.then(t,t).then(i)})}return new Promise((t,i)=>{this.queuedPromise.then(t,i)})}return this.activePromise=e(),new Promise((t,i)=>{this.activePromise.then(n=>{this.activePromise=null,t(n)},n=>{this.activePromise=null,i(n)})})}dispose(){this.isDisposed=!0}}const eX=(o,e)=>{let t=!0;const i=setTimeout(()=>{t=!1,e()},o);return{isTriggered:()=>t,dispose:()=>{clearTimeout(i),t=!1}}},tX=o=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,o())}),{isTriggered:()=>e,dispose:()=>{e=!1}}};class jr{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((n,s)=>{this.doResolve=n,this.doReject=s}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const n=this.task;return this.task=null,n()}}));const i=()=>{var n;this.deferred=null,(n=this.doResolve)===null||n===void 0||n.call(this,null)};return this.deferred=t===E7?tX(i):eX(t,i),this.completionPromise}isTriggered(){var e;return!!(!((e=this.deferred)===null||e===void 0)&&e.isTriggered())}cancel(){var e;this.cancelTimeout(),this.completionPromise&&((e=this.doReject)===null||e===void 0||e.call(this,new Mu),this.completionPromise=null)}cancelTimeout(){var e;(e=this.deferred)===null||e===void 0||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class N7{constructor(e){this.delayer=new jr(e),this.throttler=new JY}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function au(o,e){return e?new Promise((t,i)=>{const n=setTimeout(()=>{s.dispose(),t()},o),s=e.onCancellationRequested(()=>{clearTimeout(n),s.dispose(),i(new Mu)})}):_n(t=>au(o,t))}function lu(o,e=0,t){const i=setTimeout(()=>{o(),t&&n.dispose()},e),n=je(()=>{clearTimeout(i),t==null||t.deleteAndLeak(n)});return t==null||t.add(n),n}function wM(o,e=i=>!!i,t=null){let i=0;const n=o.length,s=()=>{if(i>=n)return Promise.resolve(t);const r=o[i++];return Promise.resolve(r()).then(l=>e(l)?Promise.resolve(l):s())};return s()}class qr{constructor(e,t){this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}}class SM{constructor(){this.disposable=void 0}cancel(){var e;(e=this.disposable)===null||e===void 0||e.dispose(),this.disposable=void 0}cancelAndSet(e,t,i=globalThis){this.cancel();const n=i.setInterval(()=>{e()},t);this.disposable=je(()=>{i.clearInterval(n),this.disposable=void 0})}dispose(){this.cancel()}}class Yt{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var e;(e=this.runner)===null||e===void 0||e.call(this)}}let T7,F_;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?F_=(o,e)=>{U9(()=>{if(t)return;const i=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,i-Date.now())}}))});let t=!1;return{dispose(){t||(t=!0)}}}:F_=(o,e,t)=>{const i=o.requestIdleCallback(e,typeof t=="number"?{timeout:t}:void 0);let n=!1;return{dispose(){n||(n=!0,o.cancelIdleCallback(i))}}},T7=o=>F_(globalThis,o)})();class M7{constructor(e,t){this._didRun=!1,this._executor=()=>{try{this._value=t()}catch(i){this._error=i}finally{this._didRun=!0}},this._handle=F_(e,()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class iX extends M7{constructor(e){super(globalThis,e)}}class wy{get isRejected(){var e;return((e=this.outcome)===null||e===void 0?void 0:e.outcome)===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,t)=>{this.completeCallback=e,this.errorCallback=t})}complete(e){return new Promise(t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()})}error(e){return new Promise(t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()})}cancel(){return this.error(new Mu)}}var FI;(function(o){async function e(i){let n;const s=await Promise.all(i.map(r=>r.then(a=>a,a=>{n||(n=a)})));if(typeof n<"u")throw n;return s}o.settled=e;function t(i){return new Promise(async(n,s)=>{try{await i(n,s)}catch(r){s(r)}})}o.withAsyncBody=t})(FI||(FI={}));class rn{static fromArray(e){return new rn(t=>{t.emitMany(e)})}static fromPromise(e){return new rn(async t=>{t.emitMany(await e)})}static fromPromises(e){return new rn(async t=>{await Promise.all(e.map(async i=>t.emitOne(await i)))})}static merge(e){return new rn(async t=>{await Promise.all(e.map(async i=>{for await(const n of i)t.emitOne(n)}))})}constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new W,queueMicrotask(async()=>{const t={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{await Promise.resolve(e(t)),this.resolve()}catch(i){this.reject(i)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e{for await(const n of e)i.emitOne(t(n))})}map(e){return rn.map(this,e)}static filter(e,t){return new rn(async i=>{for await(const n of e)t(n)&&i.emitOne(n)})}filter(e){return rn.filter(this,e)}static coalesce(e){return rn.filter(e,t=>!!t)}coalesce(){return rn.coalesce(this)}static async toPromise(e){const t=[];for await(const i of e)t.push(i);return t}toPromise(){return rn.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}}rn.EMPTY=rn.fromArray([]);class nX extends rn{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}function sX(o){const e=new tn,t=o(e.token);return new nX(e,async i=>{const n=e.token.onCancellationRequested(()=>{n.dispose(),e.dispose(),i.reject(new Mu)});try{for await(const s of t){if(e.token.isCancellationRequested)return;i.emitOne(s)}n.dispose(),e.dispose()}catch(s){n.dispose(),e.dispose(),i.reject(s)}})}/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries:A7,setPrototypeOf:YP,isFrozen:oX,getPrototypeOf:rX,getOwnPropertyDescriptor:aX}=Object;let{freeze:fo,seal:Na,create:lX}=Object,{apply:BI,construct:WI}=typeof Reflect<"u"&&Reflect;BI||(BI=function(e,t,i){return e.apply(t,i)});fo||(fo=function(e){return e});Na||(Na=function(e){return e});WI||(WI=function(e,t){return new e(...t)});const dX=Kr(Array.prototype.forEach),XP=Kr(Array.prototype.pop),Bm=Kr(Array.prototype.push),_1=Kr(String.prototype.toLowerCase),PD=Kr(String.prototype.toString),cX=Kr(String.prototype.match),ta=Kr(String.prototype.replace),uX=Kr(String.prototype.indexOf),hX=Kr(String.prototype.trim),tr=Kr(RegExp.prototype.test),Wm=gX(TypeError);function Kr(o){return function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n/gm),vX=Na(/\${[\w\W]*}/gm),bX=Na(/^data-[\-\w.\u00B7-\uFFFF]/),CX=Na(/^aria-[\-\w]+$/),R7=Na(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),wX=Na(/^(?:\w+script|data):/i),SX=Na(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),P7=Na(/^html$/i);var iO=Object.freeze({__proto__:null,MUSTACHE_EXPR:mX,ERB_EXPR:_X,TMPLIT_EXPR:vX,DATA_ATTR:bX,ARIA_ATTR:CX,IS_ALLOWED_URI:R7,IS_SCRIPT_OR_DATA:wX,ATTR_WHITESPACE:SX,DOCTYPE_NAME:P7});const yX=()=>typeof window>"u"?null:window,LX=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(i=t.getAttribute(n));const s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML(r){return r},createScriptURL(r){return r}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function O7(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yX();const e=_t=>O7(_t);if(e.version="3.0.5",e.removed=[],!o||!o.document||o.document.nodeType!==9)return e.isSupported=!1,e;const t=o.document,i=t.currentScript;let{document:n}=o;const{DocumentFragment:s,HTMLTemplateElement:r,Node:a,Element:l,NodeFilter:d,NamedNodeMap:c=o.NamedNodeMap||o.MozNamedAttrMap,HTMLFormElement:u,DOMParser:h,trustedTypes:g}=o,f=l.prototype,m=Z0(f,"cloneNode"),v=Z0(f,"nextSibling"),_=Z0(f,"childNodes"),b=Z0(f,"parentNode");if(typeof r=="function"){const _t=n.createElement("template");_t.content&&_t.content.ownerDocument&&(n=_t.content.ownerDocument)}let C,w="";const{implementation:S,createNodeIterator:x,createDocumentFragment:y,getElementsByTagName:I}=n,{importNode:E}=t;let R={};e.isSupported=typeof A7=="function"&&typeof b=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:j,ERB_EXPR:O,TMPLIT_EXPR:$,DATA_ATTR:K,ARIA_ATTR:oe,IS_SCRIPT_OR_DATA:Le,ATTR_WHITESPACE:he}=iO;let{IS_ALLOWED_URI:se}=iO,V=null;const Q=Gt({},[...QP,...OD,...FD,...BD,...JP]);let H=null;const G=Gt({},[...eO,...WD,...tO,...Y0]);let Z=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$e=null,ft=null,Bt=!0,Ce=!0,re=!1,ke=!0,ce=!1,Ie=!1,mt=!1,Ct=!1,Mt=!1,ci=!1,yn=!1,Qs=!0,Dr=!1;const ju="user-content-";let ge=!0,te=!1,ee={},A=null;const F=Gt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let X=null;const U=Gt({},["audio","video","img","source","image","track"]);let fe=null;const Ne=Gt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),He="http://www.w3.org/1998/Math/MathML",Ke="http://www.w3.org/2000/svg",ht="http://www.w3.org/1999/xhtml";let lt=ht,oi=!1,Qt=null;const et=Gt({},[He,Ke,ht],PD);let Vi;const Hi=["application/xhtml+xml","text/html"],xr="text/html";let Ut,pn=null;const Ku=n.createElement("form"),qu=function(ie){return ie instanceof RegExp||ie instanceof Function},Jr=function(ie){if(!(pn&&pn===ie)){if((!ie||typeof ie!="object")&&(ie={}),ie=Zg(ie),Vi=Hi.indexOf(ie.PARSER_MEDIA_TYPE)===-1?Vi=xr:Vi=ie.PARSER_MEDIA_TYPE,Ut=Vi==="application/xhtml+xml"?PD:_1,V="ALLOWED_TAGS"in ie?Gt({},ie.ALLOWED_TAGS,Ut):Q,H="ALLOWED_ATTR"in ie?Gt({},ie.ALLOWED_ATTR,Ut):G,Qt="ALLOWED_NAMESPACES"in ie?Gt({},ie.ALLOWED_NAMESPACES,PD):et,fe="ADD_URI_SAFE_ATTR"in ie?Gt(Zg(Ne),ie.ADD_URI_SAFE_ATTR,Ut):Ne,X="ADD_DATA_URI_TAGS"in ie?Gt(Zg(U),ie.ADD_DATA_URI_TAGS,Ut):U,A="FORBID_CONTENTS"in ie?Gt({},ie.FORBID_CONTENTS,Ut):F,$e="FORBID_TAGS"in ie?Gt({},ie.FORBID_TAGS,Ut):{},ft="FORBID_ATTR"in ie?Gt({},ie.FORBID_ATTR,Ut):{},ee="USE_PROFILES"in ie?ie.USE_PROFILES:!1,Bt=ie.ALLOW_ARIA_ATTR!==!1,Ce=ie.ALLOW_DATA_ATTR!==!1,re=ie.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=ie.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ce=ie.SAFE_FOR_TEMPLATES||!1,Ie=ie.WHOLE_DOCUMENT||!1,Mt=ie.RETURN_DOM||!1,ci=ie.RETURN_DOM_FRAGMENT||!1,yn=ie.RETURN_TRUSTED_TYPE||!1,Ct=ie.FORCE_BODY||!1,Qs=ie.SANITIZE_DOM!==!1,Dr=ie.SANITIZE_NAMED_PROPS||!1,ge=ie.KEEP_CONTENT!==!1,te=ie.IN_PLACE||!1,se=ie.ALLOWED_URI_REGEXP||R7,lt=ie.NAMESPACE||ht,Z=ie.CUSTOM_ELEMENT_HANDLING||{},ie.CUSTOM_ELEMENT_HANDLING&&qu(ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Z.tagNameCheck=ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ie.CUSTOM_ELEMENT_HANDLING&&qu(ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Z.attributeNameCheck=ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ie.CUSTOM_ELEMENT_HANDLING&&typeof ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Z.allowCustomizedBuiltInElements=ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ce&&(Ce=!1),ci&&(Mt=!0),ee&&(V=Gt({},[...JP]),H=[],ee.html===!0&&(Gt(V,QP),Gt(H,eO)),ee.svg===!0&&(Gt(V,OD),Gt(H,WD),Gt(H,Y0)),ee.svgFilters===!0&&(Gt(V,FD),Gt(H,WD),Gt(H,Y0)),ee.mathMl===!0&&(Gt(V,BD),Gt(H,tO),Gt(H,Y0))),ie.ADD_TAGS&&(V===Q&&(V=Zg(V)),Gt(V,ie.ADD_TAGS,Ut)),ie.ADD_ATTR&&(H===G&&(H=Zg(H)),Gt(H,ie.ADD_ATTR,Ut)),ie.ADD_URI_SAFE_ATTR&&Gt(fe,ie.ADD_URI_SAFE_ATTR,Ut),ie.FORBID_CONTENTS&&(A===F&&(A=Zg(A)),Gt(A,ie.FORBID_CONTENTS,Ut)),ge&&(V["#text"]=!0),Ie&&Gt(V,["html","head","body"]),V.table&&(Gt(V,["tbody"]),delete $e.tbody),ie.TRUSTED_TYPES_POLICY){if(typeof ie.TRUSTED_TYPES_POLICY.createHTML!="function")throw Wm('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ie.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Wm('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=ie.TRUSTED_TYPES_POLICY,w=C.createHTML("")}else C===void 0&&(C=LX(g,i)),C!==null&&typeof w=="string"&&(w=C.createHTML(""));fo&&fo(ie),pn=ie}},ec=Gt({},["mi","mo","mn","ms","mtext"]),Gu=Gt({},["foreignobject","desc","title","annotation-xml"]),Zu=Gt({},["title","style","font","a","script"]),qg=Gt({},OD);Gt(qg,FD),Gt(qg,fX);const Yu=Gt({},BD);Gt(Yu,pX);const yD=function(ie){let Fe=b(ie);(!Fe||!Fe.tagName)&&(Fe={namespaceURI:lt,tagName:"template"});const Qe=_1(ie.tagName),zi=_1(Fe.tagName);return Qt[ie.namespaceURI]?ie.namespaceURI===Ke?Fe.namespaceURI===ht?Qe==="svg":Fe.namespaceURI===He?Qe==="svg"&&(zi==="annotation-xml"||ec[zi]):!!qg[Qe]:ie.namespaceURI===He?Fe.namespaceURI===ht?Qe==="math":Fe.namespaceURI===Ke?Qe==="math"&&Gu[zi]:!!Yu[Qe]:ie.namespaceURI===ht?Fe.namespaceURI===Ke&&!Gu[zi]||Fe.namespaceURI===He&&!ec[zi]?!1:!Yu[Qe]&&(Zu[Qe]||!qg[Qe]):!!(Vi==="application/xhtml+xml"&&Qt[ie.namespaceURI]):!1},$a=function(ie){Bm(e.removed,{element:ie});try{ie.parentNode.removeChild(ie)}catch{ie.remove()}},Om=function(ie,Fe){try{Bm(e.removed,{attribute:Fe.getAttributeNode(ie),from:Fe})}catch{Bm(e.removed,{attribute:null,from:Fe})}if(Fe.removeAttribute(ie),ie==="is"&&!H[ie])if(Mt||ci)try{$a(Fe)}catch{}else try{Fe.setAttribute(ie,"")}catch{}},Fm=function(ie){let Fe,Qe;if(Ct)ie=""+ie;else{const kr=cX(ie,/^[\r\n\t ]+/);Qe=kr&&kr[0]}Vi==="application/xhtml+xml"&<===ht&&(ie=''+ie+"");const zi=C?C.createHTML(ie):ie;if(lt===ht)try{Fe=new h().parseFromString(zi,Vi)}catch{}if(!Fe||!Fe.documentElement){Fe=S.createDocument(lt,"template",null);try{Fe.documentElement.innerHTML=oi?w:zi}catch{}}const gs=Fe.body||Fe.documentElement;return ie&&Qe&&gs.insertBefore(n.createTextNode(Qe),gs.childNodes[0]||null),lt===ht?I.call(Fe,Ie?"html":"body")[0]:Ie?Fe.documentElement:gs},H0=function(ie){return x.call(ie.ownerDocument||ie,ie,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT,null,!1)},Lz=function(ie){return ie instanceof u&&(typeof ie.nodeName!="string"||typeof ie.textContent!="string"||typeof ie.removeChild!="function"||!(ie.attributes instanceof c)||typeof ie.removeAttribute!="function"||typeof ie.setAttribute!="function"||typeof ie.namespaceURI!="string"||typeof ie.insertBefore!="function"||typeof ie.hasChildNodes!="function")},z0=function(ie){return typeof a=="object"?ie instanceof a:ie&&typeof ie=="object"&&typeof ie.nodeType=="number"&&typeof ie.nodeName=="string"},Xl=function(ie,Fe,Qe){R[ie]&&dX(R[ie],zi=>{zi.call(e,Fe,Qe,pn)})},wP=function(ie){let Fe;if(Xl("beforeSanitizeElements",ie,null),Lz(ie))return $a(ie),!0;const Qe=Ut(ie.nodeName);if(Xl("uponSanitizeElement",ie,{tagName:Qe,allowedTags:V}),ie.hasChildNodes()&&!z0(ie.firstElementChild)&&(!z0(ie.content)||!z0(ie.content.firstElementChild))&&tr(/<[/\w]/g,ie.innerHTML)&&tr(/<[/\w]/g,ie.textContent))return $a(ie),!0;if(!V[Qe]||$e[Qe]){if(!$e[Qe]&&yP(Qe)&&(Z.tagNameCheck instanceof RegExp&&tr(Z.tagNameCheck,Qe)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(Qe)))return!1;if(ge&&!A[Qe]){const zi=b(ie)||ie.parentNode,gs=_(ie)||ie.childNodes;if(gs&&zi){const kr=gs.length;for(let vn=kr-1;vn>=0;--vn)zi.insertBefore(m(gs[vn],!0),v(ie))}}return $a(ie),!0}return ie instanceof l&&!yD(ie)||(Qe==="noscript"||Qe==="noembed"||Qe==="noframes")&&tr(/<\/no(script|embed|frames)/i,ie.innerHTML)?($a(ie),!0):(ce&&ie.nodeType===3&&(Fe=ie.textContent,Fe=ta(Fe,j," "),Fe=ta(Fe,O," "),Fe=ta(Fe,$," "),ie.textContent!==Fe&&(Bm(e.removed,{element:ie.cloneNode()}),ie.textContent=Fe)),Xl("afterSanitizeElements",ie,null),!1)},SP=function(ie,Fe,Qe){if(Qs&&(Fe==="id"||Fe==="name")&&(Qe in n||Qe in Ku))return!1;if(!(Ce&&!ft[Fe]&&tr(K,Fe))){if(!(Bt&&tr(oe,Fe))){if(!H[Fe]||ft[Fe]){if(!(yP(ie)&&(Z.tagNameCheck instanceof RegExp&&tr(Z.tagNameCheck,ie)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(ie))&&(Z.attributeNameCheck instanceof RegExp&&tr(Z.attributeNameCheck,Fe)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(Fe))||Fe==="is"&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&tr(Z.tagNameCheck,Qe)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(Qe))))return!1}else if(!fe[Fe]){if(!tr(se,ta(Qe,he,""))){if(!((Fe==="src"||Fe==="xlink:href"||Fe==="href")&&ie!=="script"&&uX(Qe,"data:")===0&&X[ie])){if(!(re&&!tr(Le,ta(Qe,he,"")))){if(Qe)return!1}}}}}}return!0},yP=function(ie){return ie.indexOf("-")>0},LP=function(ie){let Fe,Qe,zi,gs;Xl("beforeSanitizeAttributes",ie,null);const{attributes:kr}=ie;if(!kr)return;const vn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(gs=kr.length;gs--;){Fe=kr[gs];const{name:Ua,namespaceURI:LD}=Fe;if(Qe=Ua==="value"?Fe.value:hX(Fe.value),zi=Ut(Ua),vn.attrName=zi,vn.attrValue=Qe,vn.keepAttr=!0,vn.forceKeepAttr=void 0,Xl("uponSanitizeAttribute",ie,vn),Qe=vn.attrValue,vn.forceKeepAttr||(Om(Ua,ie),!vn.keepAttr))continue;if(!ke&&tr(/\/>/i,Qe)){Om(Ua,ie);continue}ce&&(Qe=ta(Qe,j," "),Qe=ta(Qe,O," "),Qe=ta(Qe,$," "));const DP=Ut(ie.nodeName);if(SP(DP,zi,Qe)){if(Dr&&(zi==="id"||zi==="name")&&(Om(Ua,ie),Qe=ju+Qe),C&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!LD)switch(g.getAttributeType(DP,zi)){case"TrustedHTML":{Qe=C.createHTML(Qe);break}case"TrustedScriptURL":{Qe=C.createScriptURL(Qe);break}}try{LD?ie.setAttributeNS(LD,Ua,Qe):ie.setAttribute(Ua,Qe),XP(e.removed)}catch{}}}Xl("afterSanitizeAttributes",ie,null)},Dz=function _t(ie){let Fe;const Qe=H0(ie);for(Xl("beforeSanitizeShadowDOM",ie,null);Fe=Qe.nextNode();)Xl("uponSanitizeShadowNode",Fe,null),!wP(Fe)&&(Fe.content instanceof s&&_t(Fe.content),LP(Fe));Xl("afterSanitizeShadowDOM",ie,null)};return e.sanitize=function(_t){let ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Fe,Qe,zi,gs;if(oi=!_t,oi&&(_t=""),typeof _t!="string"&&!z0(_t))if(typeof _t.toString=="function"){if(_t=_t.toString(),typeof _t!="string")throw Wm("dirty is not a string, aborting")}else throw Wm("toString is not a function");if(!e.isSupported)return _t;if(mt||Jr(ie),e.removed=[],typeof _t=="string"&&(te=!1),te){if(_t.nodeName){const Ua=Ut(_t.nodeName);if(!V[Ua]||$e[Ua])throw Wm("root node is forbidden and cannot be sanitized in-place")}}else if(_t instanceof a)Fe=Fm(""),Qe=Fe.ownerDocument.importNode(_t,!0),Qe.nodeType===1&&Qe.nodeName==="BODY"||Qe.nodeName==="HTML"?Fe=Qe:Fe.appendChild(Qe);else{if(!Mt&&!ce&&!Ie&&_t.indexOf("<")===-1)return C&&yn?C.createHTML(_t):_t;if(Fe=Fm(_t),!Fe)return Mt?null:yn?w:""}Fe&&Ct&&$a(Fe.firstChild);const kr=H0(te?_t:Fe);for(;zi=kr.nextNode();)wP(zi)||(zi.content instanceof s&&Dz(zi.content),LP(zi));if(te)return _t;if(Mt){if(ci)for(gs=y.call(Fe.ownerDocument);Fe.firstChild;)gs.appendChild(Fe.firstChild);else gs=Fe;return(H.shadowroot||H.shadowrootmode)&&(gs=E.call(t,gs,!0)),gs}let vn=Ie?Fe.outerHTML:Fe.innerHTML;return Ie&&V["!doctype"]&&Fe.ownerDocument&&Fe.ownerDocument.doctype&&Fe.ownerDocument.doctype.name&&tr(P7,Fe.ownerDocument.doctype.name)&&(vn=" -`+vn),ce&&(vn=ta(vn,j," "),vn=ta(vn,O," "),vn=ta(vn,$," ")),C&&yn?C.createHTML(vn):vn},e.setConfig=function(_t){Jr(_t),mt=!0},e.clearConfig=function(){pn=null,mt=!1},e.isValidAttribute=function(_t,ie,Fe){pn||Jr({});const Qe=Ut(_t),zi=Ut(ie);return SP(Qe,zi,Fe)},e.addHook=function(_t,ie){typeof ie=="function"&&(R[_t]=R[_t]||[],Bm(R[_t],ie))},e.removeHook=function(_t){if(R[_t])return XP(R[_t])},e.removeHooks=function(_t){R[_t]&&(R[_t]=[])},e.removeAllHooks=function(){R={}},e}var Kl=O7();Kl.version;Kl.isSupported;const F7=Kl.sanitize;Kl.setConfig;Kl.clearConfig;Kl.isValidAttribute;const B7=Kl.addHook,W7=Kl.removeHook;Kl.removeHooks;Kl.removeAllHooks;var ot;(function(o){o.inMemory="inmemory",o.vscode="vscode",o.internal="private",o.walkThrough="walkThrough",o.walkThroughSnippet="walkThroughSnippet",o.http="http",o.https="https",o.file="file",o.mailto="mailto",o.untitled="untitled",o.data="data",o.command="command",o.vscodeRemote="vscode-remote",o.vscodeRemoteResource="vscode-remote-resource",o.vscodeManagedRemoteResource="vscode-managed-remote-resource",o.vscodeUserData="vscode-userdata",o.vscodeCustomEditor="vscode-custom-editor",o.vscodeNotebookCell="vscode-notebook-cell",o.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",o.vscodeNotebookCellOutput="vscode-notebook-cell-output",o.vscodeInteractiveInput="vscode-interactive-input",o.vscodeSettings="vscode-settings",o.vscodeWorkspaceTrust="vscode-workspace-trust",o.vscodeTerminal="vscode-terminal",o.vscodeChatSesssion="vscode-chat-editor",o.webviewPanel="webview-panel",o.vscodeWebview="vscode-webview",o.extension="extension",o.vscodeFileResource="vscode-file",o.tmp="tmp",o.vsls="vsls",o.vscodeSourceControl="vscode-scm"})(ot||(ot={}));function yM(o,e){return ze.isUri(o)?yf(o.scheme,e):cM(o,e+":")}function nO(o,...e){return e.some(t=>yM(o,t))}const DX="tkn";class xX{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${ot.vscodeRemoteResource}`}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(a){return nt(a),e}const t=e.authority;let i=this._hosts[t];i&&i.indexOf(":")!==-1&&i.indexOf("[")===-1&&(i=`[${i}]`);const n=this._ports[t],s=this._connectionTokens[t];let r=`path=${encodeURIComponent(e.path)}`;return typeof s=="string"&&(r+=`&${DX}=${encodeURIComponent(s)}`),ze.from({scheme:Tu?this._preferredWebSchema:ot.vscodeRemoteResource,authority:`${i}:${n}`,path:this._remoteResourcesPath,query:r})}}const V7=new xX,kX="vscode-app";class kv{uriToBrowserUri(e){return e.scheme===ot.vscodeRemote?V7.rewrite(e):e.scheme===ot.file&&(Ml||pG===`${ot.vscodeFileResource}://${kv.FALLBACK_AUTHORITY}`)?e.with({scheme:ot.vscodeFileResource,authority:e.authority||kv.FALLBACK_AUTHORITY,query:null,fragment:null}):e}}kv.FALLBACK_AUTHORITY=kX;const H7=new kv;var sO;(function(o){const e=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);o.CoopAndCoep=Object.freeze(e.get("3"));const t="vscode-coi";function i(s){let r;typeof s=="string"?r=new URL(s).searchParams:s instanceof URL?r=s.searchParams:ze.isUri(s)&&(r=new URL(s.toString(!0)).searchParams);const a=r==null?void 0:r.get(t);if(a)return e.get(a)}o.getHeadersFromQuery=i;function n(s,r,a){if(!globalThis.crossOriginIsolated)return;const l=r&&a?"3":a?"2":"1";s instanceof URLSearchParams?s.set(t,l):s[t]=l}o.addSearchParam=n})(sO||(sO={}));function LM(o){return Sy(o,0)}function Sy(o,e){switch(typeof o){case"object":return o===null?Ld(349,e):Array.isArray(o)?EX(o,e):NX(o,e);case"string":return DM(o,e);case"boolean":return IX(o,e);case"number":return Ld(o,e);case"undefined":return Ld(937,e);default:return Ld(617,e)}}function Ld(o,e){return(e<<5)-e+o|0}function IX(o,e){return Ld(o?433:863,e)}function DM(o,e){e=Ld(149417,e);for(let t=0,i=o.length;tSy(i,t),e)}function NX(o,e){return e=Ld(181387,e),Object.keys(o).sort().reduce((t,i)=>(t=DM(i,t),Sy(o[i],t)),e)}function VD(o,e,t=32){const i=t-e,n=~((1<>>i)>>>0}function oO(o,e=0,t=o.byteLength,i=0){for(let n=0;nt.toString(16).padStart(2,"0")).join(""):TX((o>>>0).toString(16),e/4)}class yy{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(t===0)return;const i=this._buff;let n=this._buffLen,s=this._leftoverHighSurrogate,r,a;for(s!==0?(r=s,a=-1,s=0):(r=e.charCodeAt(0),a=0);;){let l=r;if(bn(r))if(a+1>>6,e[t++]=128|(i&63)>>>0):i<65536?(e[t++]=224|(i&61440)>>>12,e[t++]=128|(i&4032)>>>6,e[t++]=128|(i&63)>>>0):(e[t++]=240|(i&1835008)>>>18,e[t++]=128|(i&258048)>>>12,e[t++]=128|(i&4032)>>>6,e[t++]=128|(i&63)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Vm(this._h0)+Vm(this._h1)+Vm(this._h2)+Vm(this._h3)+Vm(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,oO(this._buff,this._buffLen),this._buffLen>56&&(this._step(),oO(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=yy._bigBlock32,t=this._buffDV;for(let u=0;u<64;u+=4)e.setUint32(u,t.getUint32(u,!1),!1);for(let u=64;u<320;u+=4)e.setUint32(u,VD(e.getUint32(u-12,!1)^e.getUint32(u-32,!1)^e.getUint32(u-56,!1)^e.getUint32(u-64,!1),1),!1);let i=this._h0,n=this._h1,s=this._h2,r=this._h3,a=this._h4,l,d,c;for(let u=0;u<80;u++)u<20?(l=n&s|~n&r,d=1518500249):u<40?(l=n^s^r,d=1859775393):u<60?(l=n&s|n&r|s&r,d=2400959708):(l=n^s^r,d=3395469782),c=VD(i,5)+l+a+d+e.getUint32(u*4,!1)&4294967295,a=r,r=s,s=VD(n,30),n=i,i=c;this._h0=this._h0+i&4294967295,this._h1=this._h1+n&4294967295,this._h2=this._h2+s&4294967295,this._h3=this._h3+r&4294967295,this._h4=this._h4+a&4294967295}}yy._bigBlock32=new DataView(new ArrayBuffer(320));const{getWindow:Je,getWindows:z7,getWindowsCount:MX,getWindowId:rO,onDidRegisterWindow:xM,onWillUnregisterWindow:AX}=function(){const o=new Map;XZ(Ai,1),o.set(Ai.vscodeWindowId,{window:Ai,disposables:new de});const e=new W,t=new W,i=new W;return{onDidRegisterWindow:e.event,onWillUnregisterWindow:i.event,onDidUnregisterWindow:t.event,registerWindow(n){if(o.has(n.vscodeWindowId))return q.None;const s=new de,r={window:n,disposables:s.add(new de)};return o.set(n.vscodeWindowId,r),s.add(je(()=>{o.delete(n.vscodeWindowId),t.fire(n)})),s.add(J(n,Se.BEFORE_UNLOAD,()=>{i.fire(n)})),e.fire(r),s},getWindows(){return o.values()},getWindowsCount(){return o.size},getWindowId(n){return n.vscodeWindowId},hasWindow(n){return o.has(n)},getWindowById(n){return o.get(n)},getWindow(n){var s;const r=n;if(!((s=r==null?void 0:r.ownerDocument)===null||s===void 0)&&s.defaultView)return r.ownerDocument.defaultView.window;const a=n;return a!=null&&a.view?a.view.window:Ai},getDocument(n){return Je(n).document}}}();function $n(o){for(;o.firstChild;)o.firstChild.remove()}class RX{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function J(o,e,t,i){return new RX(o,e,t,i)}function $7(o,e){return function(t){return e(new Pr(o,t))}}function PX(o){return function(e){return o(new gi(e))}}const Wi=function(e,t,i,n){let s=i;return t==="click"||t==="mousedown"?s=$7(Je(e),i):(t==="keydown"||t==="keypress"||t==="keyup")&&(s=PX(i)),J(e,t,s,n)},OX=function(e,t,i){const n=$7(Je(e),t);return FX(e,n,i)};function FX(o,e,t){return J(o,Ea&&CM.pointerEvents?Se.POINTER_DOWN:Se.MOUSE_DOWN,e,t)}function g_(o,e,t){return F_(o,e,t)}class HD extends M7{constructor(e,t){super(e,t)}}let gw,po;class kM extends SM{cancelAndSet(e,t,i){return super.cancelAndSet(e,t,i)}}class zD{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){nt(e)}}static sort(e,t){return t.priority-e.priority}}(function(){const o=new Map,e=new Map,t=new Map,i=new Map,n=s=>{var r;t.set(s,!1);const a=(r=o.get(s))!==null&&r!==void 0?r:[];for(e.set(s,a),o.set(s,[]),i.set(s,!0);a.length>0;)a.sort(zD.sort),a.shift().execute();i.set(s,!1)};po=(s,r,a=0)=>{const l=rO(s),d=new zD(r,a);let c=o.get(l);return c||(c=[],o.set(l,c)),c.push(d),t.get(l)||(t.set(l,!0),s.requestAnimationFrame(()=>n(l))),d},gw=(s,r,a)=>{const l=rO(s);if(i.get(l)){const d=new zD(r,a);let c=e.get(l);return c||(c=[],e.set(l,c)),c.push(d),d}else return po(s,r,a)}})();function Ly(o){return Je(o).getComputedStyle(o,null)}function ng(o,e){const t=Je(o),i=t.document;if(o!==i.body)return new Rt(o.clientWidth,o.clientHeight);if(Ea&&(t!=null&&t.visualViewport))return new Rt(t.visualViewport.width,t.visualViewport.height);if(t!=null&&t.innerWidth&&t.innerHeight)return new Rt(t.innerWidth,t.innerHeight);if(i.body&&i.body.clientWidth&&i.body.clientHeight)return new Rt(i.body.clientWidth,i.body.clientHeight);if(i.documentElement&&i.documentElement.clientWidth&&i.documentElement.clientHeight)return new Rt(i.documentElement.clientWidth,i.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class Ui{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){const n=Ly(e),s=n?n.getPropertyValue(t):"0";return Ui.convertToPixels(e,s)}static getBorderLeftWidth(e){return Ui.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return Ui.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return Ui.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return Ui.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return Ui.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return Ui.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return Ui.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return Ui.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return Ui.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return Ui.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return Ui.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return Ui.getDimension(e,"margin-bottom","marginBottom")}}class Rt{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new Rt(e,t):this}static is(e){return typeof e=="object"&&typeof e.height=="number"&&typeof e.width=="number"}static lift(e){return e instanceof Rt?e:new Rt(e.width,e.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}}Rt.None=new Rt(0,0);function U7(o){let e=o.offsetParent,t=o.offsetTop,i=o.offsetLeft;for(;(o=o.parentNode)!==null&&o!==o.ownerDocument.body&&o!==o.ownerDocument.documentElement;){t-=o.scrollTop;const n=j7(o)?null:Ly(o);n&&(i-=n.direction!=="rtl"?o.scrollLeft:-o.scrollLeft),o===e&&(i+=Ui.getBorderLeftWidth(o),t+=Ui.getBorderTopWidth(o),t+=o.offsetTop,i+=o.offsetLeft,e=o.offsetParent)}return{left:i,top:t}}function BX(o,e,t){typeof e=="number"&&(o.style.width=`${e}px`),typeof t=="number"&&(o.style.height=`${t}px`)}function gn(o){const e=o.getBoundingClientRect(),t=Je(o);return{left:e.left+t.scrollX,top:e.top+t.scrollY,width:e.width,height:e.height}}function WX(o){let e=o,t=1;do{const i=Ly(e).zoom;i!=null&&i!=="1"&&(t*=i),e=e.parentElement}while(e!==null&&e!==e.ownerDocument.documentElement);return t}function zs(o){const e=Ui.getMarginLeft(o)+Ui.getMarginRight(o);return o.offsetWidth+e}function $D(o){const e=Ui.getBorderLeftWidth(o)+Ui.getBorderRightWidth(o),t=Ui.getPaddingLeft(o)+Ui.getPaddingRight(o);return o.offsetWidth-e-t}function VX(o){const e=Ui.getBorderTopWidth(o)+Ui.getBorderBottomWidth(o),t=Ui.getPaddingTop(o)+Ui.getPaddingBottom(o);return o.offsetHeight-e-t}function kh(o){const e=Ui.getMarginTop(o)+Ui.getMarginBottom(o);return o.offsetHeight+e}function Qn(o,e){return!!(e!=null&&e.contains(o))}function HX(o,e,t){for(;o&&o.nodeType===o.ELEMENT_NODE;){if(o.classList.contains(e))return o;if(t){if(typeof t=="string"){if(o.classList.contains(t))return null}else if(o===t)return null}o=o.parentNode}return null}function UD(o,e,t){return!!HX(o,e,t)}function j7(o){return o&&!!o.host&&!!o.mode}function fw(o){return!!sg(o)}function sg(o){for(var e;o.parentNode;){if(o===((e=o.ownerDocument)===null||e===void 0?void 0:e.body))return null;o=o.parentNode}return j7(o)?o:null}function jo(){let o=fm().activeElement;for(;o!=null&&o.shadowRoot;)o=o.shadowRoot.activeElement;return o}function Dy(o){return o.ownerDocument.activeElement===o}function zX(o){return Qn(o.ownerDocument.activeElement,o)}function fm(){var o;return MX()<=1?document:(o=Array.from(z7()).map(({window:t})=>t.document).find(t=>t.hasFocus()))!==null&&o!==void 0?o:document}function $X(){var o,e;return(e=(o=fm().defaultView)===null||o===void 0?void 0:o.window)!==null&&e!==void 0?e:Ai}const IM=new Map;function mr(o=Ai.document.head,e,t){const i=document.createElement("style");if(i.type="text/css",i.media="screen",e==null||e(i),o.appendChild(i),t&&t.add(je(()=>o.removeChild(i))),o===Ai.document.head){const n=new Set;IM.set(i,n);for(const{window:s,disposables:r}of z7()){if(s===Ai)continue;const a=r.add(UX(i,n,s));t==null||t.add(a)}}return i}function UX(o,e,t){var i,n;const s=new de,r=o.cloneNode(!0);t.document.head.appendChild(r),s.add(je(()=>t.document.head.removeChild(r)));for(const a of q7(o))(i=r.sheet)===null||i===void 0||i.insertRule(a.cssText,(n=r.sheet)===null||n===void 0?void 0:n.cssRules.length);return s.add(jX.observe(o,s,{childList:!0})(()=>{r.textContent=o.textContent})),e.add(r),s.add(je(()=>e.delete(r))),s}const jX=new class{constructor(){this.mutationObservers=new Map}observe(o,e,t){let i=this.mutationObservers.get(o);i||(i=new Map,this.mutationObservers.set(o,i));const n=LM(t);let s=i.get(n);if(s)s.users+=1;else{const r=new W,a=new MutationObserver(d=>r.fire(d));a.observe(o,t);const l=s={users:1,observer:a,onDidMutate:r.event};e.add(je(()=>{l.users-=1,l.users===0&&(r.dispose(),a.disconnect(),i==null||i.delete(n),(i==null?void 0:i.size)===0&&this.mutationObservers.delete(o))})),i.set(n,s)}return s.onDidMutate}};let jD=null;function K7(){return jD||(jD=mr()),jD}function q7(o){var e,t;return!((e=o==null?void 0:o.sheet)===null||e===void 0)&&e.rules?o.sheet.rules:!((t=o==null?void 0:o.sheet)===null||t===void 0)&&t.cssRules?o.sheet.cssRules:[]}function pw(o,e,t=K7()){var i,n;if(!(!t||!e)){(i=t.sheet)===null||i===void 0||i.insertRule(`${o} {${e}}`,0);for(const s of(n=IM.get(t))!==null&&n!==void 0?n:[])pw(o,e,s)}}function VI(o,e=K7()){var t,i;if(!e)return;const n=q7(e),s=[];for(let r=0;r=0;r--)(t=e.sheet)===null||t===void 0||t.deleteRule(s[r]);for(const r of(i=IM.get(e))!==null&&i!==void 0?i:[])VI(o,r)}function KX(o){return typeof o.selectorText=="string"}function EM(o){return o instanceof MouseEvent||o instanceof Je(o).MouseEvent}function G7(o){return o instanceof KeyboardEvent||o instanceof Je(o).KeyboardEvent}const Se={CLICK:"click",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",KEY_DOWN:"keydown",KEY_UP:"keyup",BEFORE_UNLOAD:"beforeunload",CHANGE:"change",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend"};function qX(o){const e=o;return!!(e&&typeof e.preventDefault=="function"&&typeof e.stopPropagation=="function")}const ct={stop:(o,e)=>(o.preventDefault(),e&&o.stopPropagation(),o)};function GX(o){const e=[];for(let t=0;o&&o.nodeType===o.ELEMENT_NODE;t++)e[t]=o.scrollTop,o=o.parentNode;return e}function ZX(o,e){for(let t=0;o&&o.nodeType===o.ELEMENT_NODE;t++)o.scrollTop!==e[t]&&(o.scrollTop=e[t]),o=o.parentNode}class mw extends q{static hasFocusWithin(e){if(e instanceof HTMLElement){const t=sg(e),i=t?t.activeElement:e.ownerDocument.activeElement;return Qn(i,e)}else{const t=e;return Qn(t.document.activeElement,t.document)}}constructor(e){super(),this._onDidFocus=this._register(new W),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new W),this.onDidBlur=this._onDidBlur.event;let t=mw.hasFocusWithin(e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},s=()=>{t&&(i=!0,(e instanceof HTMLElement?Je(e):e).setTimeout(()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{mw.hasFocusWithin(e)!==t&&(t?s():n())},this._register(J(e,Se.FOCUS,n,!0)),this._register(J(e,Se.BLUR,s,!0)),e instanceof HTMLElement&&(this._register(J(e,Se.FOCUS_IN,()=>this._refreshStateHandler())),this._register(J(e,Se.FOCUS_OUT,()=>this._refreshStateHandler())))}}function Pl(o){return new mw(o)}function YX(o,e){return o.after(e),e}function le(o,...e){if(o.append(...e),e.length===1&&typeof e[0]!="string")return e[0]}function Z7(o,e){return o.insertBefore(e,o.firstChild),e}function es(o,...e){o.innerText="",le(o,...e)}const XX=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Iv;(function(o){o.HTML="http://www.w3.org/1999/xhtml",o.SVG="http://www.w3.org/2000/svg"})(Iv||(Iv={}));function Y7(o,e,t,...i){const n=XX.exec(e);if(!n)throw new Error("Bad use of emmet");const s=n[1]||"div";let r;return o!==Iv.HTML?r=document.createElementNS(o,s):r=document.createElement(s),n[3]&&(r.id=n[3]),n[4]&&(r.className=n[4].replace(/\./g," ").trim()),t&&Object.entries(t).forEach(([a,l])=>{typeof l>"u"||(/^on\w+$/.test(a)?r[a]=l:a==="selected"?l&&r.setAttribute(a,"true"):r.setAttribute(a,l))}),r.append(...i),r}function pe(o,e,...t){return Y7(Iv.HTML,o,e,...t)}pe.SVG=function(o,e,...t){return Y7(Iv.SVG,o,e,...t)};function QX(o,...e){o?oo(...e):xs(...e)}function oo(...o){for(const e of o)e.style.display="",e.removeAttribute("aria-hidden")}function xs(...o){for(const e of o)e.style.display="none",e.setAttribute("aria-hidden","true")}function aO(o,e){const t=o.devicePixelRatio*e;return Math.max(1,Math.floor(t))/o.devicePixelRatio}function X7(o){Ai.open(o,"_blank","noopener")}function JX(o,e){const t=()=>{e(),i=po(o,t)};let i=po(o,t);return je(()=>i.dispose())}V7.setPreferredWebSchema(/^https:/.test(Ai.location.href)?"https":"http");function du(o){return o?`url('${H7.uriToBrowserUri(o).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function lO(o){return`'${o.replace(/'/g,"%27")}'`}function Bh(o,e){if(o!==void 0){const t=o.match(/^\s*var\((.+)\)$/);if(t){const i=t[1].split(",",2);return i.length===2&&(e=Bh(i[1].trim(),e)),`var(${i[0]}, ${e})`}return o}return e}function eQ(o,e=!1){const t=document.createElement("a");return B7("afterSanitizeAttributes",i=>{for(const n of["href","src"])if(i.hasAttribute(n)){const s=i.getAttribute(n);if(n==="href"&&s.startsWith("#"))continue;if(t.href=s,!o.includes(t.protocol.replace(/:$/,""))){if(e&&n==="src"&&t.href.startsWith("data:"))continue;i.removeAttribute(n)}}}),je(()=>{W7("afterSanitizeAttributes")})}const tQ=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);class Dd extends W{constructor(){super(),this._subscriptions=new de,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(ye.runAndSubscribe(xM,({window:e,disposables:t})=>this.registerListeners(e,t),{window:Ai,disposables:this._subscriptions}))}registerListeners(e,t){t.add(J(e,"keydown",i=>{if(i.defaultPrevented)return;const n=new gi(i);if(!(n.keyCode===6&&i.repeat)){if(i.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(i.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(i.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(i.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(n.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=i.altKey,this._keyStatus.ctrlKey=i.ctrlKey,this._keyStatus.metaKey=i.metaKey,this._keyStatus.shiftKey=i.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=i,this.fire(this._keyStatus))}},!0)),t.add(J(e,"keyup",i=>{i.defaultPrevented||(!i.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!i.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!i.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!i.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=i.altKey,this._keyStatus.ctrlKey=i.ctrlKey,this._keyStatus.metaKey=i.metaKey,this._keyStatus.shiftKey=i.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=i,this.fire(this._keyStatus)))},!0)),t.add(J(e.document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),t.add(J(e.document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),t.add(J(e.document.body,"mousemove",i=>{i.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),t.add(J(e,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Dd.instance||(Dd.instance=new Dd),Dd.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class iQ extends q{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this.callbacks.onDragStart&&this._register(J(this.element,Se.DRAG_START,e=>{var t,i;(i=(t=this.callbacks).onDragStart)===null||i===void 0||i.call(t,e)})),this.callbacks.onDrag&&this._register(J(this.element,Se.DRAG,e=>{var t,i;(i=(t=this.callbacks).onDrag)===null||i===void 0||i.call(t,e)})),this._register(J(this.element,Se.DRAG_ENTER,e=>{var t,i;this.counter++,this.dragStartTime=e.timeStamp,(i=(t=this.callbacks).onDragEnter)===null||i===void 0||i.call(t,e)})),this._register(J(this.element,Se.DRAG_OVER,e=>{var t,i;e.preventDefault(),(i=(t=this.callbacks).onDragOver)===null||i===void 0||i.call(t,e,e.timeStamp-this.dragStartTime)})),this._register(J(this.element,Se.DRAG_LEAVE,e=>{var t,i;this.counter--,this.counter===0&&(this.dragStartTime=0,(i=(t=this.callbacks).onDragLeave)===null||i===void 0||i.call(t,e))})),this._register(J(this.element,Se.DRAG_END,e=>{var t,i;this.counter=0,this.dragStartTime=0,(i=(t=this.callbacks).onDragEnd)===null||i===void 0||i.call(t,e)})),this._register(J(this.element,Se.DROP,e=>{var t,i;this.counter=0,this.dragStartTime=0,(i=(t=this.callbacks).onDrop)===null||i===void 0||i.call(t,e)}))}}const nQ=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/;function vi(o,...e){let t,i;Array.isArray(e[0])?(t={},i=e[0]):(t=e[0]||{},i=e[1]);const n=nQ.exec(o);if(!n||!n.groups)throw new Error("Bad use of h");const s=n.groups.tag||"div",r=document.createElement(s);n.groups.id&&(r.id=n.groups.id);const a=[];if(n.groups.class)for(const d of n.groups.class.split("."))d!==""&&a.push(d);if(t.className!==void 0)for(const d of t.className.split("."))d!==""&&a.push(d);a.length>0&&(r.className=a.join(" "));const l={};if(n.groups.name&&(l[n.groups.name]=r),i)for(const d of i)d instanceof HTMLElement?r.appendChild(d):typeof d=="string"?r.append(d):"root"in d&&(Object.assign(l,d),r.appendChild(d.root));for(const[d,c]of Object.entries(t))if(d!=="className")if(d==="style")for(const[u,h]of Object.entries(c))r.style.setProperty(dO(u),typeof h=="number"?h+"px":""+h);else d==="tabIndex"?r.tabIndex=c:r.setAttribute(dO(d),c.toString());return l.root=r,l}function dO(o){return o.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}class xy{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this.metadata=e.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let i=t.kbExpr;this.precondition&&(i?i=ae.and(i,this.precondition):i=this.precondition);const n={id:this.id,weight:t.weight,args:t.args,when:i,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};Gs.registerKeybindingRule(n)}}Et.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),metadata:this.metadata})}_registerMenuItem(e){zn.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class pm extends xy{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i,n){return this._implementations.push({priority:e,name:t,implementation:i,when:n}),this._implementations.sort((s,r)=>r.priority-s.priority),{dispose:()=>{for(let s=0;s{if(a.get(Xe).contextMatchesRules(i??void 0))return n(a,r,t)})}runCommand(e,t){return Rn.runEditorCommand(e,t,this.precondition,(i,n,s)=>this.runEditorCommand(i,n,s))}}class Te extends Rn{static convertOptions(e){let t;Array.isArray(e.menuOpts)?t=e.menuOpts:e.menuOpts?t=[e.menuOpts]:t=[];function i(n){return n.menuId||(n.menuId=N.EditorContext),n.title||(n.title=e.label),n.when=ae.and(e.precondition,n.when),n}return Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super(Te.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(vo).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class J7 extends Te{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort((i,n)=>n[0]-i[0]),{dispose:()=>{for(let i=0;i{var r,a;const l=s.get(Xe),d=s.get(bo);if(!l.contextMatchesRules((r=this.desc.precondition)!==null&&r!==void 0?r:void 0)){d.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,(a=this.desc.precondition)===null||a===void 0?void 0:a.serialize());return}return this.runEditorCommand(s,n,...t)})}}function ql(o,e){Et.registerCommand(o,function(t,...i){const n=t.get(qe),[s,r]=i;qt(ze.isUri(s)),qt(z.isIPosition(r));const a=t.get(Si).getModel(s);if(a){const l=z.lift(r);return n.invokeFunction(e,a,l,...i.slice(2))}return t.get(Xs).createModelReference(s).then(l=>new Promise((d,c)=>{try{const u=n.invokeFunction(e,l.object.textEditorModel,z.lift(r),i.slice(2));d(u)}catch(u){c(u)}}).finally(()=>{l.dispose()}))})}function we(o){return or.INSTANCE.registerEditorCommand(o),o}function _e(o){const e=new o;return or.INSTANCE.registerEditorAction(e),e}function e8(o){return or.INSTANCE.registerEditorAction(o),o}function sQ(o){or.INSTANCE.registerEditorAction(o)}function At(o,e,t){or.INSTANCE.registerEditorContribution(o,e,t)}var Jf;(function(o){function e(r){return or.INSTANCE.getEditorCommand(r)}o.getEditorCommand=e;function t(){return or.INSTANCE.getEditorActions()}o.getEditorActions=t;function i(){return or.INSTANCE.getEditorContributions()}o.getEditorContributions=i;function n(r){return or.INSTANCE.getEditorContributions().filter(a=>r.indexOf(a.id)>=0)}o.getSomeEditorContributions=n;function s(){return or.INSTANCE.getDiffEditorContributions()}o.getDiffEditorContributions=s})(Jf||(Jf={}));const oQ={EditorCommonContributions:"editor.contributions"};class or{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,i){this.editorContributions.push({id:e,ctor:t,instantiation:i})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}or.INSTANCE=new or;xi.add(oQ.EditorCommonContributions,or.INSTANCE);function e0(o){return o.register(),o}const t8=e0(new pm({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:N.MenubarEditMenu,group:"1_do",title:p({},"&&Undo"),order:1},{menuId:N.CommandPalette,group:"",title:p("undo","Undo"),order:1}]}));e0(new Q7(t8,{id:"default:undo",precondition:void 0}));const i8=e0(new pm({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:N.MenubarEditMenu,group:"1_do",title:p({},"&&Redo"),order:2},{menuId:N.CommandPalette,group:"",title:p("redo","Redo"),order:1}]}));e0(new Q7(i8,{id:"default:redo",precondition:void 0}));const rQ=e0(new pm({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:N.MenubarSelectionMenu,group:"1_basic",title:p({},"&&Select All"),order:1},{menuId:N.CommandPalette,group:"",title:p("selectAll","Select All"),order:1}]})),aQ="$initialize";let cO=!1;function HI(o){Tu&&(cO||(cO=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(o.message))}class lQ{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.method=i,this.args=n,this.type=0}}class uO{constructor(e,t,i,n){this.vsWorker=e,this.seq=t,this.res=i,this.err=n,this.type=1}}class dQ{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.eventName=i,this.arg=n,this.type=2}}class cQ{constructor(e,t,i){this.vsWorker=e,this.req=t,this.event=i,this.type=3}}class uQ{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class hQ{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t){const i=String(++this._lastSentReq);return new Promise((n,s)=>{this._pendingReplies[i]={resolve:n,reject:s},this._send(new lQ(this._workerId,i,e,t))})}listen(e,t){let i=null;const n=new W({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,n),this._send(new dQ(this._workerId,i,e,t))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new uQ(this._workerId,i)),i=null}});return n.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;e.err.$isError&&(i=new Error,i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack),t.reject(i);return}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.method,e.args).then(n=>{this._send(new uO(this._workerId,t,n,void 0))},n=>{n.detail instanceof Error&&(n.detail=OP(n.detail)),this._send(new uO(this._workerId,t,void 0,OP(n)))})}_handleSubscribeEventMessage(e){const t=e.req,i=this._handler.handleEvent(e.eventName,e.arg)(n=>{this._send(new cQ(this._workerId,t,n))});this._pendingEvents.set(t,i)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){const t=[];if(e.type===0)for(let i=0;i{this._protocol.handleMessage(c)},c=>{n==null||n(c)})),this._protocol=new hQ({sendMessage:(c,u)=>{this._worker.postMessage(c,u)},handleMessage:(c,u)=>{if(typeof i[c]!="function")return Promise.reject(new Error("Missing method "+c+" on main thread host."));try{return Promise.resolve(i[c].apply(i,u))}catch(h){return Promise.reject(h)}},handleEvent:(c,u)=>{if(s8(c)){const h=i[c].call(i,u);if(typeof h!="function")throw new Error(`Missing dynamic event ${c} on main thread host.`);return h}if(n8(c)){const h=i[c];if(typeof h!="function")throw new Error(`Missing event ${c} on main thread host.`);return h}throw new Error(`Malformed event name ${c}`)}}),this._protocol.setWorkerId(this._worker.getId());let s=null;const r=globalThis.require;typeof r<"u"&&typeof r.getConfig=="function"?s=r.getConfig():typeof globalThis.requirejs<"u"&&(s=globalThis.requirejs.s.contexts._.config);const a=Y2(i);this._onModuleLoaded=this._protocol.sendMessage(aQ,[this._worker.getId(),JSON.parse(JSON.stringify(s)),t,a]);const l=(c,u)=>this._request(c,u),d=(c,u)=>this._protocol.listen(c,u);this._lazyProxy=new Promise((c,u)=>{n=u,this._onModuleLoaded.then(h=>{c(fQ(h,l,d))},h=>{u(h),this._onError("Worker failed to load "+t,h)})})}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise((i,n)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(e,t).then(i,n)},n)})}_onError(e,t){console.error(e),console.info(t)}}function n8(o){return o[0]==="o"&&o[1]==="n"&&el(o.charCodeAt(2))}function s8(o){return/^onDynamic/.test(o)&&el(o.charCodeAt(9))}function fQ(o,e,t){const i=r=>function(){const a=Array.prototype.slice.call(arguments,0);return e(r,a)},n=r=>function(a){return t(r,a)},s={};for(const r of o){if(s8(r)){s[r]=n(r);continue}if(n8(r)){s[r]=t(r,void 0);continue}s[r]=i(r)}return s}function qd(o,e){var t;const i=globalThis.MonacoEnvironment;if(i!=null&&i.createTrustedTypesPolicy)try{return i.createTrustedTypesPolicy(o,e)}catch(n){nt(n);return}try{return(t=Ai.trustedTypes)===null||t===void 0?void 0:t.createPolicy(o,e)}catch(n){nt(n);return}}const hO=qd("defaultWorkerFactory",{createScriptURL:o=>o});function pQ(o){const e=globalThis.MonacoEnvironment;if(e){if(typeof e.getWorker=="function")return e.getWorker("workerMain.js",o);if(typeof e.getWorkerUrl=="function"){const t=e.getWorkerUrl("workerMain.js",o);return new Worker(hO?hO.createScriptURL(t):t,{name:o})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function mQ(o){return typeof o.then=="function"}class _Q{constructor(e,t,i,n,s){this.id=t,this.label=i;const r=pQ(i);mQ(r)?this.worker=r:this.worker=Promise.resolve(r),this.postMessage(e,[]),this.worker.then(a=>{a.onmessage=function(l){n(l.data)},a.onmessageerror=s,typeof a.addEventListener=="function"&&a.addEventListener("error",s)})}getId(){return this.id}postMessage(e,t){var i;(i=this.worker)===null||i===void 0||i.then(n=>{try{n.postMessage(e,t)}catch(s){nt(s),nt(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:s}))}})}dispose(){var e;(e=this.worker)===null||e===void 0||e.then(t=>t.terminate()),this.worker=null}}class ky{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){const n=++ky.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new _Q(e,n,this._label||"anonymous"+n,t,s=>{HI(s),this._webWorkerFailedBeforeError=s,i(s)})}}ky.LAST_WORKER_ID=0;var an;(function(o){o[o.None=0]="None",o[o.Indent=1]="Indent",o[o.IndentOutdent=2]="IndentOutdent",o[o.Outdent=3]="Outdent"})(an||(an={}));class KD{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t0&&o.getLanguageId(r-1)===n;)r--;return new bQ(o,n,r,s+1,o.getStartOffset(r),o.getEndOffset(s))}class bQ{constructor(e,t,i,n,s,r){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=s,this._lastCharOffset=r}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function Za(o){return(o&3)!==0}class kp{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(t=>new KD(t)):e.brackets?this._autoClosingPairs=e.brackets.map(t=>new KD({open:t[0],close:t[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new KD({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:kp.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:kp.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}kp.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])> +Received: '{1}'.`,e,mh.getLexeme(t)),s=t.offset,r=mh.getLexeme(t);return this._parsingErrors.push({message:n,offset:s,lexeme:r,additionalInfo:i}),h_._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}};y8._parseError=new Error;class ae{static false(){return Ps.INSTANCE}static true(){return qs.INSTANCE}static has(e){return Ng.create(e)}static equals(e,t){return gm.create(e,t)}static notEquals(e,t){return gy.create(e,t)}static regex(e,t){return Lv.create(e,t)}static in(e,t){return uy.create(e,t)}static notIn(e,t){return hy.create(e,t)}static not(e){return Tg.create(e)}static and(...e){return xh.create(e,null,!0)}static or(...e){return bd.create(e,null,!0)}static deserialize(e){return e==null?void 0:this._parser.parse(e)}}ae._parser=new y8({regexParsingWithErrorRecovery:!1});function WY(o,e){const t=o?o.substituteConstants():void 0,i=e?e.substituteConstants():void 0;return!t&&!i?!0:!t||!i?!1:t.equals(i)}function O_(o,e){return o.cmp(e)}class Ps{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return qs.INSTANCE}}Ps.INSTANCE=new Ps;class qs{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return Ps.INSTANCE}}qs.INSTANCE=new qs;class Ng{static create(e,t=null){const i=cs.get(e);return typeof i=="boolean"?i?qs.INSTANCE:Ps.INSTANCE:new Ng(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:D8(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=cs.get(this.key);return typeof e=="boolean"?e?qs.INSTANCE:Ps.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=Tg.create(this.key,this)),this.negated}}class gm{static create(e,t,i=null){if(typeof t=="boolean")return t?Ng.create(e,i):Tg.create(e,i);const n=cs.get(e);return typeof n=="boolean"?t===(n?"true":"false")?qs.INSTANCE:Ps.INSTANCE:new gm(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:Mg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=cs.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?qs.INSTANCE:Ps.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=gy.create(this.key,this.value,this)),this.negated}}class uy{static create(e,t){return new uy(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:Mg(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type?this.key===e.key&&this.valueKey===e.valueKey:!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.includes(i):typeof i=="string"&&typeof t=="object"&&t!==null?NY.call(t,i):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=hy.create(this.key,this.valueKey)),this.negated}}class hy{static create(e,t){return new hy(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=uy.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type?this._negated.equals(e._negated):!1}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class gy{static create(e,t,i=null){if(typeof t=="boolean")return t?Tg.create(e,i):Ng.create(e,i);const n=cs.get(e);return typeof n=="boolean"?t===(n?"true":"false")?Ps.INSTANCE:qs.INSTANCE:new gy(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:Mg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=cs.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?Ps.INSTANCE:qs.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=gm.create(this.key,this.value,this)),this.negated}}class Tg{static create(e,t=null){const i=cs.get(e);return typeof i=="boolean"?i?Ps.INSTANCE:qs.INSTANCE:new Tg(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:D8(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=cs.get(this.key);return typeof e=="boolean"?e?Ps.INSTANCE:qs.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Ng.create(this.key,this)),this.negated}}function fy(o,e){if(typeof o=="string"){const t=parseFloat(o);isNaN(t)||(o=t)}return typeof o=="string"||typeof o=="number"?e(o):Ps.INSTANCE}class py{static create(e,t,i=null){return fy(t,n=>new py(e,n,i))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:Mg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=vy.create(this.key,this.value,this)),this.negated}}class my{static create(e,t,i=null){return fy(t,n=>new my(e,n,i))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:Mg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_y.create(this.key,this.value,this)),this.negated}}class _y{static create(e,t,i=null){return fy(t,n=>new _y(e,n,i))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:Mg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))new vy(e,n,i))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:Mg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=py.create(this.key,this.value,this)),this.negated}}class Lv{static create(e,t){return new Lv(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return ti?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return this.regexp?this.regexp.test(t):!1}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=vM.create(this)),this.negated}}class vM{static create(e){return new vM(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type?this._actual.equals(e._actual):!1}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function L8(o){let e=null;for(let t=0,i=o.length;te.expr.length)return 1;for(let t=0,i=this.expr.length;t1;){const r=n[n.length-1];if(r.type!==9)break;n.pop();const a=n.pop(),l=n.length===0,d=bd.create(r.expr.map(c=>xh.create([c,a],null,i)),null,l);d&&(n.push(d),n.sort(O_))}if(n.length===1)return n[0];if(i){for(let r=0;re.serialize()).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=bd.create(e,this,!0)}return this.negated}}class bd{static create(e,t,i){return bd._normalizeArr(e,t,i)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;te.serialize()).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),i=e.shift(),n=[];for(const s of qP(t))for(const r of qP(i))n.push(xh.create([s,r],null,!1));e.unshift(bd.create(n,null,!1))}this.negated=bd.create(e,this,!0)}return this.negated}}class De extends Ng{static all(){return De._info.values()}constructor(e,t,i){super(e,null),this._defaultValue=t,typeof i=="object"?De._info.push({...i,key:e}):i!==!0&&De._info.push({key:e,description:i,type:t!=null?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return gm.create(this.key,e)}}De._info=[];const Xe=bt("contextKeyService");function D8(o,e){return oe?1:0}function Mg(o,e,t,i){return ot?1:ei?1:0}function RI(o,e){if(o.type===0||e.type===1)return!0;if(o.type===9)return e.type===9?KP(o.expr,e.expr):!1;if(e.type===9){for(const t of e.expr)if(RI(o,t))return!0;return!1}if(o.type===6){if(e.type===6)return KP(e.expr,o.expr);for(const t of o.expr)if(RI(t,e))return!0;return!1}return o.equals(e)}function KP(o,e){let t=0,i=0;for(;t>>0,i=(o&4294901760)>>>16;return i!==0?new AD([G0(t,e),G0(i,e)]):new AD([G0(t,e)])}else{const t=[];for(let i=0;i{a(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(UY)),this._cachedMergedKeybindings.slice(0)}}const Gs=new bM,$Y={EditorModes:"platform.keybindingsRegistry"};xi.add($Y.EditorModes,Gs);function UY(o,e){if(o.weight1!==e.weight1)return o.weight1-e.weight1;if(o.command&&e.command){if(o.commande.command)return 1}return o.weight2-e.weight2}var jY=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},GP=function(o,e){return function(t,i){e(t,i,o)}},m1;function Lf(o){return o.command!==void 0}function KY(o){return o.submenu!==void 0}class N{constructor(e){if(N._instances.has(e))throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);N._instances.set(e,this),this.id=e}}N._instances=new Map;N.CommandPalette=new N("CommandPalette");N.DebugBreakpointsContext=new N("DebugBreakpointsContext");N.DebugCallStackContext=new N("DebugCallStackContext");N.DebugConsoleContext=new N("DebugConsoleContext");N.DebugVariablesContext=new N("DebugVariablesContext");N.DebugWatchContext=new N("DebugWatchContext");N.DebugToolBar=new N("DebugToolBar");N.DebugToolBarStop=new N("DebugToolBarStop");N.EditorContext=new N("EditorContext");N.SimpleEditorContext=new N("SimpleEditorContext");N.EditorContent=new N("EditorContent");N.EditorLineNumberContext=new N("EditorLineNumberContext");N.EditorContextCopy=new N("EditorContextCopy");N.EditorContextPeek=new N("EditorContextPeek");N.EditorContextShare=new N("EditorContextShare");N.EditorTitle=new N("EditorTitle");N.EditorTitleRun=new N("EditorTitleRun");N.EditorTitleContext=new N("EditorTitleContext");N.EditorTitleContextShare=new N("EditorTitleContextShare");N.EmptyEditorGroup=new N("EmptyEditorGroup");N.EmptyEditorGroupContext=new N("EmptyEditorGroupContext");N.EditorTabsBarContext=new N("EditorTabsBarContext");N.EditorTabsBarShowTabsSubmenu=new N("EditorTabsBarShowTabsSubmenu");N.EditorActionsPositionSubmenu=new N("EditorActionsPositionSubmenu");N.ExplorerContext=new N("ExplorerContext");N.ExplorerContextShare=new N("ExplorerContextShare");N.ExtensionContext=new N("ExtensionContext");N.GlobalActivity=new N("GlobalActivity");N.CommandCenter=new N("CommandCenter");N.CommandCenterCenter=new N("CommandCenterCenter");N.LayoutControlMenuSubmenu=new N("LayoutControlMenuSubmenu");N.LayoutControlMenu=new N("LayoutControlMenu");N.MenubarMainMenu=new N("MenubarMainMenu");N.MenubarAppearanceMenu=new N("MenubarAppearanceMenu");N.MenubarDebugMenu=new N("MenubarDebugMenu");N.MenubarEditMenu=new N("MenubarEditMenu");N.MenubarCopy=new N("MenubarCopy");N.MenubarFileMenu=new N("MenubarFileMenu");N.MenubarGoMenu=new N("MenubarGoMenu");N.MenubarHelpMenu=new N("MenubarHelpMenu");N.MenubarLayoutMenu=new N("MenubarLayoutMenu");N.MenubarNewBreakpointMenu=new N("MenubarNewBreakpointMenu");N.PanelAlignmentMenu=new N("PanelAlignmentMenu");N.PanelPositionMenu=new N("PanelPositionMenu");N.ActivityBarPositionMenu=new N("ActivityBarPositionMenu");N.MenubarPreferencesMenu=new N("MenubarPreferencesMenu");N.MenubarRecentMenu=new N("MenubarRecentMenu");N.MenubarSelectionMenu=new N("MenubarSelectionMenu");N.MenubarShare=new N("MenubarShare");N.MenubarSwitchEditorMenu=new N("MenubarSwitchEditorMenu");N.MenubarSwitchGroupMenu=new N("MenubarSwitchGroupMenu");N.MenubarTerminalMenu=new N("MenubarTerminalMenu");N.MenubarViewMenu=new N("MenubarViewMenu");N.MenubarHomeMenu=new N("MenubarHomeMenu");N.OpenEditorsContext=new N("OpenEditorsContext");N.OpenEditorsContextShare=new N("OpenEditorsContextShare");N.ProblemsPanelContext=new N("ProblemsPanelContext");N.SCMInputBox=new N("SCMInputBox");N.SCMHistoryItem=new N("SCMHistoryItem");N.SCMChangeContext=new N("SCMChangeContext");N.SCMResourceContext=new N("SCMResourceContext");N.SCMResourceContextShare=new N("SCMResourceContextShare");N.SCMResourceFolderContext=new N("SCMResourceFolderContext");N.SCMResourceGroupContext=new N("SCMResourceGroupContext");N.SCMSourceControl=new N("SCMSourceControl");N.SCMTitle=new N("SCMTitle");N.SearchContext=new N("SearchContext");N.SearchActionMenu=new N("SearchActionContext");N.StatusBarWindowIndicatorMenu=new N("StatusBarWindowIndicatorMenu");N.StatusBarRemoteIndicatorMenu=new N("StatusBarRemoteIndicatorMenu");N.StickyScrollContext=new N("StickyScrollContext");N.TestItem=new N("TestItem");N.TestItemGutter=new N("TestItemGutter");N.TestMessageContext=new N("TestMessageContext");N.TestMessageContent=new N("TestMessageContent");N.TestPeekElement=new N("TestPeekElement");N.TestPeekTitle=new N("TestPeekTitle");N.TouchBarContext=new N("TouchBarContext");N.TitleBarContext=new N("TitleBarContext");N.TitleBarTitleContext=new N("TitleBarTitleContext");N.TunnelContext=new N("TunnelContext");N.TunnelPrivacy=new N("TunnelPrivacy");N.TunnelProtocol=new N("TunnelProtocol");N.TunnelPortInline=new N("TunnelInline");N.TunnelTitle=new N("TunnelTitle");N.TunnelLocalAddressInline=new N("TunnelLocalAddressInline");N.TunnelOriginInline=new N("TunnelOriginInline");N.ViewItemContext=new N("ViewItemContext");N.ViewContainerTitle=new N("ViewContainerTitle");N.ViewContainerTitleContext=new N("ViewContainerTitleContext");N.ViewTitle=new N("ViewTitle");N.ViewTitleContext=new N("ViewTitleContext");N.CommentEditorActions=new N("CommentEditorActions");N.CommentThreadTitle=new N("CommentThreadTitle");N.CommentThreadActions=new N("CommentThreadActions");N.CommentThreadAdditionalActions=new N("CommentThreadAdditionalActions");N.CommentThreadTitleContext=new N("CommentThreadTitleContext");N.CommentThreadCommentContext=new N("CommentThreadCommentContext");N.CommentTitle=new N("CommentTitle");N.CommentActions=new N("CommentActions");N.InteractiveToolbar=new N("InteractiveToolbar");N.InteractiveCellTitle=new N("InteractiveCellTitle");N.InteractiveCellDelete=new N("InteractiveCellDelete");N.InteractiveCellExecute=new N("InteractiveCellExecute");N.InteractiveInputExecute=new N("InteractiveInputExecute");N.NotebookToolbar=new N("NotebookToolbar");N.NotebookStickyScrollContext=new N("NotebookStickyScrollContext");N.NotebookCellTitle=new N("NotebookCellTitle");N.NotebookCellDelete=new N("NotebookCellDelete");N.NotebookCellInsert=new N("NotebookCellInsert");N.NotebookCellBetween=new N("NotebookCellBetween");N.NotebookCellListTop=new N("NotebookCellTop");N.NotebookCellExecute=new N("NotebookCellExecute");N.NotebookCellExecutePrimary=new N("NotebookCellExecutePrimary");N.NotebookDiffCellInputTitle=new N("NotebookDiffCellInputTitle");N.NotebookDiffCellMetadataTitle=new N("NotebookDiffCellMetadataTitle");N.NotebookDiffCellOutputsTitle=new N("NotebookDiffCellOutputsTitle");N.NotebookOutputToolbar=new N("NotebookOutputToolbar");N.NotebookEditorLayoutConfigure=new N("NotebookEditorLayoutConfigure");N.NotebookKernelSource=new N("NotebookKernelSource");N.BulkEditTitle=new N("BulkEditTitle");N.BulkEditContext=new N("BulkEditContext");N.TimelineItemContext=new N("TimelineItemContext");N.TimelineTitle=new N("TimelineTitle");N.TimelineTitleContext=new N("TimelineTitleContext");N.TimelineFilterSubMenu=new N("TimelineFilterSubMenu");N.AccountsContext=new N("AccountsContext");N.SidebarTitle=new N("SidebarTitle");N.PanelTitle=new N("PanelTitle");N.AuxiliaryBarTitle=new N("AuxiliaryBarTitle");N.TerminalInstanceContext=new N("TerminalInstanceContext");N.TerminalEditorInstanceContext=new N("TerminalEditorInstanceContext");N.TerminalNewDropdownContext=new N("TerminalNewDropdownContext");N.TerminalTabContext=new N("TerminalTabContext");N.TerminalTabEmptyAreaContext=new N("TerminalTabEmptyAreaContext");N.TerminalStickyScrollContext=new N("TerminalStickyScrollContext");N.WebviewContext=new N("WebviewContext");N.InlineCompletionsActions=new N("InlineCompletionsActions");N.NewFile=new N("NewFile");N.MergeInput1Toolbar=new N("MergeToolbar1Toolbar");N.MergeInput2Toolbar=new N("MergeToolbar2Toolbar");N.MergeBaseToolbar=new N("MergeBaseToolbar");N.MergeInputResultToolbar=new N("MergeToolbarResultToolbar");N.InlineSuggestionToolbar=new N("InlineSuggestionToolbar");N.ChatContext=new N("ChatContext");N.ChatCodeBlock=new N("ChatCodeblock");N.ChatMessageTitle=new N("ChatMessageTitle");N.ChatExecute=new N("ChatExecute");N.ChatInputSide=new N("ChatInputSide");N.AccessibleView=new N("AccessibleView");N.MultiDiffEditorFileToolbar=new N("MultiDiffEditorFileToolbar");const Ba=bt("menuService");class Cd{static for(e){let t=this._all.get(e);return t||(t=new Cd(e),this._all.set(e,t)),t}static merge(e){const t=new Set;for(const i of e)i instanceof Cd&&t.add(i.id);return t}constructor(e){this.id=e,this.has=t=>t===e}}Cd._all=new Map;const zn=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new xZ({merge:Cd.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(o){return this._commands.set(o.id,o),this._onDidChangeMenu.fire(Cd.for(N.CommandPalette)),je(()=>{this._commands.delete(o.id)&&this._onDidChangeMenu.fire(Cd.for(N.CommandPalette))})}getCommand(o){return this._commands.get(o)}getCommands(){const o=new Map;return this._commands.forEach((e,t)=>o.set(t,e)),o}appendMenuItem(o,e){let t=this._menuItems.get(o);t||(t=new Ns,this._menuItems.set(o,t));const i=t.push(e);return this._onDidChangeMenu.fire(Cd.for(o)),je(()=>{i(),this._onDidChangeMenu.fire(Cd.for(o))})}appendMenuItems(o){const e=new de;for(const{id:t,item:i}of o)e.add(this.appendMenuItem(t,i));return e}getMenuItems(o){let e;return this._menuItems.has(o)?e=[...this._menuItems.get(o)]:e=[],o===N.CommandPalette&&this._appendImplicitItems(e),e}_appendImplicitItems(o){const e=new Set;for(const t of o)Lf(t)&&(e.add(t.command.id),t.alt&&e.add(t.alt.id));this._commands.forEach((t,i)=>{e.has(i)||o.push({command:t})})}};class xv extends xp{constructor(e,t,i){super(`submenuitem.${e.submenu.id}`,typeof e.title=="string"?e.title:e.title.value,i,"submenu"),this.item=e,this.hideActions=t}}let Ur=m1=class{static label(e,t){return t!=null&&t.renderShortTitle&&e.shortTitle?typeof e.shortTitle=="string"?e.shortTitle:e.shortTitle.value:typeof e.title=="string"?e.title:e.title.value}constructor(e,t,i,n,s,r){var a,l;this.hideActions=n,this._commandService=r,this.id=e.id,this.label=m1.label(e,i),this.tooltip=(l=typeof e.tooltip=="string"?e.tooltip:(a=e.tooltip)===null||a===void 0?void 0:a.value)!==null&&l!==void 0?l:"",this.enabled=!e.precondition||s.contextMatchesRules(e.precondition),this.checked=void 0;let d;if(e.toggled){const c=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=s.contextMatchesRules(c.condition),this.checked&&c.tooltip&&(this.tooltip=typeof c.tooltip=="string"?c.tooltip:c.tooltip.value),this.checked&&Ue.isThemeIcon(c.icon)&&(d=c.icon),this.checked&&c.title&&(this.label=typeof c.title=="string"?c.title:c.title.value)}d||(d=Ue.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new m1(t,void 0,i,n,s,r):void 0,this._options=i,this.class=d&&Ue.asClassName(d)}run(...e){var t,i;let n=[];return!((t=this._options)===null||t===void 0)&&t.arg&&(n=[...n,this._options.arg]),!((i=this._options)===null||i===void 0)&&i.shouldForwardArgs&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};Ur=m1=jY([GP(4,Xe),GP(5,Ri)],Ur);class Qo{constructor(e){this.desc=e}}function mi(o){const e=new de,t=new o,{f1:i,menu:n,keybinding:s,...r}=t.desc;if(e.add(Et.registerCommand({id:r.id,handler:(a,...l)=>t.run(a,...l),metadata:r.metadata})),Array.isArray(n))for(const a of n)e.add(zn.appendMenuItem(a.id,{command:{...r,precondition:a.precondition===null?void 0:r.precondition},...a}));else n&&e.add(zn.appendMenuItem(n.id,{command:{...r,precondition:n.precondition===null?void 0:r.precondition},...n}));if(i&&(e.add(zn.appendMenuItem(N.CommandPalette,{command:r,when:r.precondition})),e.add(zn.addCommand(r))),Array.isArray(s))for(const a of s)e.add(Gs.registerKeybindingRule({...a,id:r.id,when:r.precondition?ae.and(r.precondition,a.when):a.when}));else s&&e.add(Gs.registerKeybindingRule({...s,id:r.id,when:r.precondition?ae.and(r.precondition,s.when):s.when}));return e}const vo=bt("telemetryService"),bo=bt("logService");var Zn;(function(o){o[o.Off=0]="Off",o[o.Trace=1]="Trace",o[o.Debug=2]="Debug",o[o.Info=3]="Info",o[o.Warning=4]="Warning",o[o.Error=5]="Error"})(Zn||(Zn={}));const k8=Zn.Info;class I8 extends q{constructor(){super(...arguments),this.level=k8,this._onDidChangeLogLevel=this._register(new W),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==Zn.Off&&this.level<=e}}class qY extends I8{constructor(e=k8,t=!0){super(),this.useColors=t,this.setLevel(e)}trace(e,...t){this.checkLogLevel(Zn.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...t):console.log(e,...t))}debug(e,...t){this.checkLogLevel(Zn.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...t):console.log(e,...t))}info(e,...t){this.checkLogLevel(Zn.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...t):console.log(e,...t))}warn(e,...t){this.checkLogLevel(Zn.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...t):console.log(e,...t))}error(e,...t){this.checkLogLevel(Zn.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...t):console.error(e,...t))}dispose(){}}class GY extends I8{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const i of this.loggers)i.trace(e,...t)}debug(e,...t){for(const i of this.loggers)i.debug(e,...t)}info(e,...t){for(const i of this.loggers)i.info(e,...t)}warn(e,...t){for(const i of this.loggers)i.warn(e,...t)}error(e,...t){for(const i of this.loggers)i.error(e,...t)}dispose(){for(const e of this.loggers)e.dispose()}}function ZY(o){switch(o){case Zn.Trace:return"trace";case Zn.Debug:return"debug";case Zn.Info:return"info";case Zn.Warning:return"warn";case Zn.Error:return"error";case Zn.Off:return"off"}}new De("logLevel",ZY(Zn.Info));const CM={clipboard:{writeText:Ml||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:Ml||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},pointerEvents:Ai.PointerEvent&&("ontouchstart"in Ai||navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)};function YY(o){if(o.charCode){const t=String.fromCharCode(o.charCode).toUpperCase();return vd.fromString(t)}const e=o.keyCode;if(e===3)return 7;if(pr)switch(e){case 59:return 85;case 60:if(ws)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(It)return 57;break}else if(dy){if(It&&e===93)return 57;if(!It&&e===92)return 57}return t8[e]||0}const XY=It?256:2048,QY=512,JY=1024,eX=It?2048:256;class gi{constructor(e){this._standardKeyboardEventBrand=!0;const t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState("AltGraph"),this.keyCode=YY(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=XY),this.altKey&&(t|=QY),this.shiftKey&&(t|=JY),this.metaKey&&(t|=eX),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new zd(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}const ZP=new WeakMap;function tX(o){if(!o.parent||o.parent===o)return null;try{const e=o.location,t=o.parent.location;if(e.origin!=="null"&&t.origin!=="null"&&e.origin!==t.origin)return null}catch{return null}return o.parent}class iX{static getSameOriginWindowChain(e){let t=ZP.get(e);if(!t){t=[],ZP.set(e,t);let i=e,n;do n=tX(i),n?t.push({window:new WeakRef(i),iframeElement:i.frameElement||null}):t.push({window:new WeakRef(i),iframeElement:null}),i=n;while(i)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){var i,n;if(!t||e===t)return{top:0,left:0};let s=0,r=0;const a=this.getSameOriginWindowChain(e);for(const l of a){const d=l.window.deref();if(s+=(i=d==null?void 0:d.scrollY)!==null&&i!==void 0?i:0,r+=(n=d==null?void 0:d.scrollX)!==null&&n!==void 0?n:0,d===t||!l.iframeElement)break;const c=l.iframeElement.getBoundingClientRect();s+=c.top,r+=c.left}return{top:s,left:r}}}class Pr{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);const i=iX.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=i.left,this.posy-=i.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class ig{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){const n=e,s=e;if(typeof n.wheelDeltaY<"u")this.deltaY=n.wheelDeltaY/120;else if(typeof s.VERTICAL_AXIS<"u"&&s.axis===s.VERTICAL_AXIS)this.deltaY=-s.detail/3;else if(e.type==="wheel"){const r=e;r.deltaMode===r.DOM_DELTA_LINE?pr&&!It?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof n.wheelDeltaX<"u")ru&&is?this.deltaX=-(n.wheelDeltaX/120):this.deltaX=n.wheelDeltaX/120;else if(typeof s.HORIZONTAL_AXIS<"u"&&s.axis===s.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){const r=e;r.deltaMode===r.DOM_DELTA_LINE?pr&&!It?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;(e=this.browserEvent)===null||e===void 0||e.preventDefault()}stopPropagation(){var e;(e=this.browserEvent)===null||e===void 0||e.stopPropagation()}}const E8=Symbol("MicrotaskDelay");function OI(o){return!!o&&typeof o.then=="function"}function _n(o){const e=new tn,t=o(e.token),i=new Promise((n,s)=>{const r=e.token.onCancellationRequested(()=>{r.dispose(),e.dispose(),s(new Mu)});Promise.resolve(t).then(a=>{r.dispose(),e.dispose(),n(a)},a=>{r.dispose(),e.dispose(),s(a)})});return new class{cancel(){e.cancel()}then(n,s){return i.then(n,s)}catch(n){return this.then(void 0,n)}finally(n){return i.finally(n)}}}function Cy(o,e,t){return new Promise((i,n)=>{const s=e.onCancellationRequested(()=>{s.dispose(),i(t)});o.then(i,n).finally(()=>s.dispose())})}class nX{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const t=()=>{if(this.queuedPromise=null,this.isDisposed)return;const i=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,i};this.queuedPromise=new Promise(i=>{this.activePromise.then(t,t).then(i)})}return new Promise((t,i)=>{this.queuedPromise.then(t,i)})}return this.activePromise=e(),new Promise((t,i)=>{this.activePromise.then(n=>{this.activePromise=null,t(n)},n=>{this.activePromise=null,i(n)})})}dispose(){this.isDisposed=!0}}const sX=(o,e)=>{let t=!0;const i=setTimeout(()=>{t=!1,e()},o);return{isTriggered:()=>t,dispose:()=>{clearTimeout(i),t=!1}}},oX=o=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,o())}),{isTriggered:()=>e,dispose:()=>{e=!1}}};class jr{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((n,s)=>{this.doResolve=n,this.doReject=s}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const n=this.task;return this.task=null,n()}}));const i=()=>{var n;this.deferred=null,(n=this.doResolve)===null||n===void 0||n.call(this,null)};return this.deferred=t===E8?oX(i):sX(t,i),this.completionPromise}isTriggered(){var e;return!!(!((e=this.deferred)===null||e===void 0)&&e.isTriggered())}cancel(){var e;this.cancelTimeout(),this.completionPromise&&((e=this.doReject)===null||e===void 0||e.call(this,new Mu),this.completionPromise=null)}cancelTimeout(){var e;(e=this.deferred)===null||e===void 0||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class N8{constructor(e){this.delayer=new jr(e),this.throttler=new nX}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function au(o,e){return e?new Promise((t,i)=>{const n=setTimeout(()=>{s.dispose(),t()},o),s=e.onCancellationRequested(()=>{clearTimeout(n),s.dispose(),i(new Mu)})}):_n(t=>au(o,t))}function lu(o,e=0,t){const i=setTimeout(()=>{o(),t&&n.dispose()},e),n=je(()=>{clearTimeout(i),t==null||t.deleteAndLeak(n)});return t==null||t.add(n),n}function wM(o,e=i=>!!i,t=null){let i=0;const n=o.length,s=()=>{if(i>=n)return Promise.resolve(t);const r=o[i++];return Promise.resolve(r()).then(l=>e(l)?Promise.resolve(l):s())};return s()}class qr{constructor(e,t){this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}}class SM{constructor(){this.disposable=void 0}cancel(){var e;(e=this.disposable)===null||e===void 0||e.dispose(),this.disposable=void 0}cancelAndSet(e,t,i=globalThis){this.cancel();const n=i.setInterval(()=>{e()},t);this.disposable=je(()=>{i.clearInterval(n),this.disposable=void 0})}dispose(){this.cancel()}}class Yt{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var e;(e=this.runner)===null||e===void 0||e.call(this)}}let T8,F_;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?F_=(o,e)=>{U9(()=>{if(t)return;const i=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,i-Date.now())}}))});let t=!1;return{dispose(){t||(t=!0)}}}:F_=(o,e,t)=>{const i=o.requestIdleCallback(e,typeof t=="number"?{timeout:t}:void 0);let n=!1;return{dispose(){n||(n=!0,o.cancelIdleCallback(i))}}},T8=o=>F_(globalThis,o)})();class M8{constructor(e,t){this._didRun=!1,this._executor=()=>{try{this._value=t()}catch(i){this._error=i}finally{this._didRun=!0}},this._handle=F_(e,()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class rX extends M8{constructor(e){super(globalThis,e)}}class wy{get isRejected(){var e;return((e=this.outcome)===null||e===void 0?void 0:e.outcome)===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,t)=>{this.completeCallback=e,this.errorCallback=t})}complete(e){return new Promise(t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()})}error(e){return new Promise(t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()})}cancel(){return this.error(new Mu)}}var FI;(function(o){async function e(i){let n;const s=await Promise.all(i.map(r=>r.then(a=>a,a=>{n||(n=a)})));if(typeof n<"u")throw n;return s}o.settled=e;function t(i){return new Promise(async(n,s)=>{try{await i(n,s)}catch(r){s(r)}})}o.withAsyncBody=t})(FI||(FI={}));class rn{static fromArray(e){return new rn(t=>{t.emitMany(e)})}static fromPromise(e){return new rn(async t=>{t.emitMany(await e)})}static fromPromises(e){return new rn(async t=>{await Promise.all(e.map(async i=>t.emitOne(await i)))})}static merge(e){return new rn(async t=>{await Promise.all(e.map(async i=>{for await(const n of i)t.emitOne(n)}))})}constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new W,queueMicrotask(async()=>{const t={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{await Promise.resolve(e(t)),this.resolve()}catch(i){this.reject(i)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e{for await(const n of e)i.emitOne(t(n))})}map(e){return rn.map(this,e)}static filter(e,t){return new rn(async i=>{for await(const n of e)t(n)&&i.emitOne(n)})}filter(e){return rn.filter(this,e)}static coalesce(e){return rn.filter(e,t=>!!t)}coalesce(){return rn.coalesce(this)}static async toPromise(e){const t=[];for await(const i of e)t.push(i);return t}toPromise(){return rn.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}}rn.EMPTY=rn.fromArray([]);class aX extends rn{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}function lX(o){const e=new tn,t=o(e.token);return new aX(e,async i=>{const n=e.token.onCancellationRequested(()=>{n.dispose(),e.dispose(),i.reject(new Mu)});try{for await(const s of t){if(e.token.isCancellationRequested)return;i.emitOne(s)}n.dispose(),e.dispose()}catch(s){n.dispose(),e.dispose(),i.reject(s)}})}/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries:A8,setPrototypeOf:YP,isFrozen:dX,getPrototypeOf:cX,getOwnPropertyDescriptor:uX}=Object;let{freeze:fo,seal:Na,create:hX}=Object,{apply:BI,construct:WI}=typeof Reflect<"u"&&Reflect;BI||(BI=function(e,t,i){return e.apply(t,i)});fo||(fo=function(e){return e});Na||(Na=function(e){return e});WI||(WI=function(e,t){return new e(...t)});const gX=Kr(Array.prototype.forEach),XP=Kr(Array.prototype.pop),Bm=Kr(Array.prototype.push),_1=Kr(String.prototype.toLowerCase),PD=Kr(String.prototype.toString),fX=Kr(String.prototype.match),ta=Kr(String.prototype.replace),pX=Kr(String.prototype.indexOf),mX=Kr(String.prototype.trim),tr=Kr(RegExp.prototype.test),Wm=_X(TypeError);function Kr(o){return function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n/gm),SX=Na(/\${[\w\W]*}/gm),yX=Na(/^data-[\-\w.\u00B7-\uFFFF]/),LX=Na(/^aria-[\-\w]+$/),R8=Na(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),DX=Na(/^(?:\w+script|data):/i),xX=Na(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),P8=Na(/^html$/i);var iO=Object.freeze({__proto__:null,MUSTACHE_EXPR:CX,ERB_EXPR:wX,TMPLIT_EXPR:SX,DATA_ATTR:yX,ARIA_ATTR:LX,IS_ALLOWED_URI:R8,IS_SCRIPT_OR_DATA:DX,ATTR_WHITESPACE:xX,DOCTYPE_NAME:P8});const kX=()=>typeof window>"u"?null:window,IX=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(i=t.getAttribute(n));const s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML(r){return r},createScriptURL(r){return r}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function O8(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:kX();const e=_t=>O8(_t);if(e.version="3.0.5",e.removed=[],!o||!o.document||o.document.nodeType!==9)return e.isSupported=!1,e;const t=o.document,i=t.currentScript;let{document:n}=o;const{DocumentFragment:s,HTMLTemplateElement:r,Node:a,Element:l,NodeFilter:d,NamedNodeMap:c=o.NamedNodeMap||o.MozNamedAttrMap,HTMLFormElement:u,DOMParser:h,trustedTypes:g}=o,f=l.prototype,m=Z0(f,"cloneNode"),v=Z0(f,"nextSibling"),_=Z0(f,"childNodes"),b=Z0(f,"parentNode");if(typeof r=="function"){const _t=n.createElement("template");_t.content&&_t.content.ownerDocument&&(n=_t.content.ownerDocument)}let C,w="";const{implementation:S,createNodeIterator:x,createDocumentFragment:y,getElementsByTagName:I}=n,{importNode:E}=t;let R={};e.isSupported=typeof A8=="function"&&typeof b=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:j,ERB_EXPR:O,TMPLIT_EXPR:$,DATA_ATTR:K,ARIA_ATTR:oe,IS_SCRIPT_OR_DATA:Le,ATTR_WHITESPACE:he}=iO;let{IS_ALLOWED_URI:se}=iO,V=null;const Q=Gt({},[...QP,...OD,...FD,...BD,...JP]);let H=null;const G=Gt({},[...eO,...WD,...tO,...Y0]);let Z=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$e=null,ft=null,Bt=!0,Ce=!0,re=!1,ke=!0,ce=!1,Ie=!1,mt=!1,Ct=!1,Mt=!1,ci=!1,yn=!1,Qs=!0,Dr=!1;const ju="user-content-";let ge=!0,te=!1,ee={},A=null;const F=Gt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let X=null;const U=Gt({},["audio","video","img","source","image","track"]);let fe=null;const Ne=Gt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),He="http://www.w3.org/1998/Math/MathML",Ke="http://www.w3.org/2000/svg",ht="http://www.w3.org/1999/xhtml";let lt=ht,oi=!1,Qt=null;const et=Gt({},[He,Ke,ht],PD);let Vi;const Hi=["application/xhtml+xml","text/html"],xr="text/html";let Ut,pn=null;const Ku=n.createElement("form"),qu=function(ie){return ie instanceof RegExp||ie instanceof Function},Jr=function(ie){if(!(pn&&pn===ie)){if((!ie||typeof ie!="object")&&(ie={}),ie=Zg(ie),Vi=Hi.indexOf(ie.PARSER_MEDIA_TYPE)===-1?Vi=xr:Vi=ie.PARSER_MEDIA_TYPE,Ut=Vi==="application/xhtml+xml"?PD:_1,V="ALLOWED_TAGS"in ie?Gt({},ie.ALLOWED_TAGS,Ut):Q,H="ALLOWED_ATTR"in ie?Gt({},ie.ALLOWED_ATTR,Ut):G,Qt="ALLOWED_NAMESPACES"in ie?Gt({},ie.ALLOWED_NAMESPACES,PD):et,fe="ADD_URI_SAFE_ATTR"in ie?Gt(Zg(Ne),ie.ADD_URI_SAFE_ATTR,Ut):Ne,X="ADD_DATA_URI_TAGS"in ie?Gt(Zg(U),ie.ADD_DATA_URI_TAGS,Ut):U,A="FORBID_CONTENTS"in ie?Gt({},ie.FORBID_CONTENTS,Ut):F,$e="FORBID_TAGS"in ie?Gt({},ie.FORBID_TAGS,Ut):{},ft="FORBID_ATTR"in ie?Gt({},ie.FORBID_ATTR,Ut):{},ee="USE_PROFILES"in ie?ie.USE_PROFILES:!1,Bt=ie.ALLOW_ARIA_ATTR!==!1,Ce=ie.ALLOW_DATA_ATTR!==!1,re=ie.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=ie.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ce=ie.SAFE_FOR_TEMPLATES||!1,Ie=ie.WHOLE_DOCUMENT||!1,Mt=ie.RETURN_DOM||!1,ci=ie.RETURN_DOM_FRAGMENT||!1,yn=ie.RETURN_TRUSTED_TYPE||!1,Ct=ie.FORCE_BODY||!1,Qs=ie.SANITIZE_DOM!==!1,Dr=ie.SANITIZE_NAMED_PROPS||!1,ge=ie.KEEP_CONTENT!==!1,te=ie.IN_PLACE||!1,se=ie.ALLOWED_URI_REGEXP||R8,lt=ie.NAMESPACE||ht,Z=ie.CUSTOM_ELEMENT_HANDLING||{},ie.CUSTOM_ELEMENT_HANDLING&&qu(ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Z.tagNameCheck=ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ie.CUSTOM_ELEMENT_HANDLING&&qu(ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Z.attributeNameCheck=ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ie.CUSTOM_ELEMENT_HANDLING&&typeof ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Z.allowCustomizedBuiltInElements=ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ce&&(Ce=!1),ci&&(Mt=!0),ee&&(V=Gt({},[...JP]),H=[],ee.html===!0&&(Gt(V,QP),Gt(H,eO)),ee.svg===!0&&(Gt(V,OD),Gt(H,WD),Gt(H,Y0)),ee.svgFilters===!0&&(Gt(V,FD),Gt(H,WD),Gt(H,Y0)),ee.mathMl===!0&&(Gt(V,BD),Gt(H,tO),Gt(H,Y0))),ie.ADD_TAGS&&(V===Q&&(V=Zg(V)),Gt(V,ie.ADD_TAGS,Ut)),ie.ADD_ATTR&&(H===G&&(H=Zg(H)),Gt(H,ie.ADD_ATTR,Ut)),ie.ADD_URI_SAFE_ATTR&&Gt(fe,ie.ADD_URI_SAFE_ATTR,Ut),ie.FORBID_CONTENTS&&(A===F&&(A=Zg(A)),Gt(A,ie.FORBID_CONTENTS,Ut)),ge&&(V["#text"]=!0),Ie&&Gt(V,["html","head","body"]),V.table&&(Gt(V,["tbody"]),delete $e.tbody),ie.TRUSTED_TYPES_POLICY){if(typeof ie.TRUSTED_TYPES_POLICY.createHTML!="function")throw Wm('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ie.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Wm('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=ie.TRUSTED_TYPES_POLICY,w=C.createHTML("")}else C===void 0&&(C=IX(g,i)),C!==null&&typeof w=="string"&&(w=C.createHTML(""));fo&&fo(ie),pn=ie}},ec=Gt({},["mi","mo","mn","ms","mtext"]),Gu=Gt({},["foreignobject","desc","title","annotation-xml"]),Zu=Gt({},["title","style","font","a","script"]),qg=Gt({},OD);Gt(qg,FD),Gt(qg,vX);const Yu=Gt({},BD);Gt(Yu,bX);const yD=function(ie){let Fe=b(ie);(!Fe||!Fe.tagName)&&(Fe={namespaceURI:lt,tagName:"template"});const Qe=_1(ie.tagName),zi=_1(Fe.tagName);return Qt[ie.namespaceURI]?ie.namespaceURI===Ke?Fe.namespaceURI===ht?Qe==="svg":Fe.namespaceURI===He?Qe==="svg"&&(zi==="annotation-xml"||ec[zi]):!!qg[Qe]:ie.namespaceURI===He?Fe.namespaceURI===ht?Qe==="math":Fe.namespaceURI===Ke?Qe==="math"&&Gu[zi]:!!Yu[Qe]:ie.namespaceURI===ht?Fe.namespaceURI===Ke&&!Gu[zi]||Fe.namespaceURI===He&&!ec[zi]?!1:!Yu[Qe]&&(Zu[Qe]||!qg[Qe]):!!(Vi==="application/xhtml+xml"&&Qt[ie.namespaceURI]):!1},$a=function(ie){Bm(e.removed,{element:ie});try{ie.parentNode.removeChild(ie)}catch{ie.remove()}},Om=function(ie,Fe){try{Bm(e.removed,{attribute:Fe.getAttributeNode(ie),from:Fe})}catch{Bm(e.removed,{attribute:null,from:Fe})}if(Fe.removeAttribute(ie),ie==="is"&&!H[ie])if(Mt||ci)try{$a(Fe)}catch{}else try{Fe.setAttribute(ie,"")}catch{}},Fm=function(ie){let Fe,Qe;if(Ct)ie=""+ie;else{const kr=fX(ie,/^[\r\n\t ]+/);Qe=kr&&kr[0]}Vi==="application/xhtml+xml"&<===ht&&(ie=''+ie+"");const zi=C?C.createHTML(ie):ie;if(lt===ht)try{Fe=new h().parseFromString(zi,Vi)}catch{}if(!Fe||!Fe.documentElement){Fe=S.createDocument(lt,"template",null);try{Fe.documentElement.innerHTML=oi?w:zi}catch{}}const gs=Fe.body||Fe.documentElement;return ie&&Qe&&gs.insertBefore(n.createTextNode(Qe),gs.childNodes[0]||null),lt===ht?I.call(Fe,Ie?"html":"body")[0]:Ie?Fe.documentElement:gs},H0=function(ie){return x.call(ie.ownerDocument||ie,ie,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT,null,!1)},Lz=function(ie){return ie instanceof u&&(typeof ie.nodeName!="string"||typeof ie.textContent!="string"||typeof ie.removeChild!="function"||!(ie.attributes instanceof c)||typeof ie.removeAttribute!="function"||typeof ie.setAttribute!="function"||typeof ie.namespaceURI!="string"||typeof ie.insertBefore!="function"||typeof ie.hasChildNodes!="function")},z0=function(ie){return typeof a=="object"?ie instanceof a:ie&&typeof ie=="object"&&typeof ie.nodeType=="number"&&typeof ie.nodeName=="string"},Xl=function(ie,Fe,Qe){R[ie]&&gX(R[ie],zi=>{zi.call(e,Fe,Qe,pn)})},wP=function(ie){let Fe;if(Xl("beforeSanitizeElements",ie,null),Lz(ie))return $a(ie),!0;const Qe=Ut(ie.nodeName);if(Xl("uponSanitizeElement",ie,{tagName:Qe,allowedTags:V}),ie.hasChildNodes()&&!z0(ie.firstElementChild)&&(!z0(ie.content)||!z0(ie.content.firstElementChild))&&tr(/<[/\w]/g,ie.innerHTML)&&tr(/<[/\w]/g,ie.textContent))return $a(ie),!0;if(!V[Qe]||$e[Qe]){if(!$e[Qe]&&yP(Qe)&&(Z.tagNameCheck instanceof RegExp&&tr(Z.tagNameCheck,Qe)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(Qe)))return!1;if(ge&&!A[Qe]){const zi=b(ie)||ie.parentNode,gs=_(ie)||ie.childNodes;if(gs&&zi){const kr=gs.length;for(let vn=kr-1;vn>=0;--vn)zi.insertBefore(m(gs[vn],!0),v(ie))}}return $a(ie),!0}return ie instanceof l&&!yD(ie)||(Qe==="noscript"||Qe==="noembed"||Qe==="noframes")&&tr(/<\/no(script|embed|frames)/i,ie.innerHTML)?($a(ie),!0):(ce&&ie.nodeType===3&&(Fe=ie.textContent,Fe=ta(Fe,j," "),Fe=ta(Fe,O," "),Fe=ta(Fe,$," "),ie.textContent!==Fe&&(Bm(e.removed,{element:ie.cloneNode()}),ie.textContent=Fe)),Xl("afterSanitizeElements",ie,null),!1)},SP=function(ie,Fe,Qe){if(Qs&&(Fe==="id"||Fe==="name")&&(Qe in n||Qe in Ku))return!1;if(!(Ce&&!ft[Fe]&&tr(K,Fe))){if(!(Bt&&tr(oe,Fe))){if(!H[Fe]||ft[Fe]){if(!(yP(ie)&&(Z.tagNameCheck instanceof RegExp&&tr(Z.tagNameCheck,ie)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(ie))&&(Z.attributeNameCheck instanceof RegExp&&tr(Z.attributeNameCheck,Fe)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(Fe))||Fe==="is"&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&tr(Z.tagNameCheck,Qe)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(Qe))))return!1}else if(!fe[Fe]){if(!tr(se,ta(Qe,he,""))){if(!((Fe==="src"||Fe==="xlink:href"||Fe==="href")&&ie!=="script"&&pX(Qe,"data:")===0&&X[ie])){if(!(re&&!tr(Le,ta(Qe,he,"")))){if(Qe)return!1}}}}}}return!0},yP=function(ie){return ie.indexOf("-")>0},LP=function(ie){let Fe,Qe,zi,gs;Xl("beforeSanitizeAttributes",ie,null);const{attributes:kr}=ie;if(!kr)return;const vn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(gs=kr.length;gs--;){Fe=kr[gs];const{name:Ua,namespaceURI:LD}=Fe;if(Qe=Ua==="value"?Fe.value:mX(Fe.value),zi=Ut(Ua),vn.attrName=zi,vn.attrValue=Qe,vn.keepAttr=!0,vn.forceKeepAttr=void 0,Xl("uponSanitizeAttribute",ie,vn),Qe=vn.attrValue,vn.forceKeepAttr||(Om(Ua,ie),!vn.keepAttr))continue;if(!ke&&tr(/\/>/i,Qe)){Om(Ua,ie);continue}ce&&(Qe=ta(Qe,j," "),Qe=ta(Qe,O," "),Qe=ta(Qe,$," "));const DP=Ut(ie.nodeName);if(SP(DP,zi,Qe)){if(Dr&&(zi==="id"||zi==="name")&&(Om(Ua,ie),Qe=ju+Qe),C&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!LD)switch(g.getAttributeType(DP,zi)){case"TrustedHTML":{Qe=C.createHTML(Qe);break}case"TrustedScriptURL":{Qe=C.createScriptURL(Qe);break}}try{LD?ie.setAttributeNS(LD,Ua,Qe):ie.setAttribute(Ua,Qe),XP(e.removed)}catch{}}}Xl("afterSanitizeAttributes",ie,null)},Dz=function _t(ie){let Fe;const Qe=H0(ie);for(Xl("beforeSanitizeShadowDOM",ie,null);Fe=Qe.nextNode();)Xl("uponSanitizeShadowNode",Fe,null),!wP(Fe)&&(Fe.content instanceof s&&_t(Fe.content),LP(Fe));Xl("afterSanitizeShadowDOM",ie,null)};return e.sanitize=function(_t){let ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Fe,Qe,zi,gs;if(oi=!_t,oi&&(_t=""),typeof _t!="string"&&!z0(_t))if(typeof _t.toString=="function"){if(_t=_t.toString(),typeof _t!="string")throw Wm("dirty is not a string, aborting")}else throw Wm("toString is not a function");if(!e.isSupported)return _t;if(mt||Jr(ie),e.removed=[],typeof _t=="string"&&(te=!1),te){if(_t.nodeName){const Ua=Ut(_t.nodeName);if(!V[Ua]||$e[Ua])throw Wm("root node is forbidden and cannot be sanitized in-place")}}else if(_t instanceof a)Fe=Fm(""),Qe=Fe.ownerDocument.importNode(_t,!0),Qe.nodeType===1&&Qe.nodeName==="BODY"||Qe.nodeName==="HTML"?Fe=Qe:Fe.appendChild(Qe);else{if(!Mt&&!ce&&!Ie&&_t.indexOf("<")===-1)return C&&yn?C.createHTML(_t):_t;if(Fe=Fm(_t),!Fe)return Mt?null:yn?w:""}Fe&&Ct&&$a(Fe.firstChild);const kr=H0(te?_t:Fe);for(;zi=kr.nextNode();)wP(zi)||(zi.content instanceof s&&Dz(zi.content),LP(zi));if(te)return _t;if(Mt){if(ci)for(gs=y.call(Fe.ownerDocument);Fe.firstChild;)gs.appendChild(Fe.firstChild);else gs=Fe;return(H.shadowroot||H.shadowrootmode)&&(gs=E.call(t,gs,!0)),gs}let vn=Ie?Fe.outerHTML:Fe.innerHTML;return Ie&&V["!doctype"]&&Fe.ownerDocument&&Fe.ownerDocument.doctype&&Fe.ownerDocument.doctype.name&&tr(P8,Fe.ownerDocument.doctype.name)&&(vn=" +`+vn),ce&&(vn=ta(vn,j," "),vn=ta(vn,O," "),vn=ta(vn,$," ")),C&&yn?C.createHTML(vn):vn},e.setConfig=function(_t){Jr(_t),mt=!0},e.clearConfig=function(){pn=null,mt=!1},e.isValidAttribute=function(_t,ie,Fe){pn||Jr({});const Qe=Ut(_t),zi=Ut(ie);return SP(Qe,zi,Fe)},e.addHook=function(_t,ie){typeof ie=="function"&&(R[_t]=R[_t]||[],Bm(R[_t],ie))},e.removeHook=function(_t){if(R[_t])return XP(R[_t])},e.removeHooks=function(_t){R[_t]&&(R[_t]=[])},e.removeAllHooks=function(){R={}},e}var Kl=O8();Kl.version;Kl.isSupported;const F8=Kl.sanitize;Kl.setConfig;Kl.clearConfig;Kl.isValidAttribute;const B8=Kl.addHook,W8=Kl.removeHook;Kl.removeHooks;Kl.removeAllHooks;var ot;(function(o){o.inMemory="inmemory",o.vscode="vscode",o.internal="private",o.walkThrough="walkThrough",o.walkThroughSnippet="walkThroughSnippet",o.http="http",o.https="https",o.file="file",o.mailto="mailto",o.untitled="untitled",o.data="data",o.command="command",o.vscodeRemote="vscode-remote",o.vscodeRemoteResource="vscode-remote-resource",o.vscodeManagedRemoteResource="vscode-managed-remote-resource",o.vscodeUserData="vscode-userdata",o.vscodeCustomEditor="vscode-custom-editor",o.vscodeNotebookCell="vscode-notebook-cell",o.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",o.vscodeNotebookCellOutput="vscode-notebook-cell-output",o.vscodeInteractiveInput="vscode-interactive-input",o.vscodeSettings="vscode-settings",o.vscodeWorkspaceTrust="vscode-workspace-trust",o.vscodeTerminal="vscode-terminal",o.vscodeChatSesssion="vscode-chat-editor",o.webviewPanel="webview-panel",o.vscodeWebview="vscode-webview",o.extension="extension",o.vscodeFileResource="vscode-file",o.tmp="tmp",o.vsls="vsls",o.vscodeSourceControl="vscode-scm"})(ot||(ot={}));function yM(o,e){return ze.isUri(o)?yf(o.scheme,e):cM(o,e+":")}function nO(o,...e){return e.some(t=>yM(o,t))}const EX="tkn";class NX{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${ot.vscodeRemoteResource}`}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(a){return nt(a),e}const t=e.authority;let i=this._hosts[t];i&&i.indexOf(":")!==-1&&i.indexOf("[")===-1&&(i=`[${i}]`);const n=this._ports[t],s=this._connectionTokens[t];let r=`path=${encodeURIComponent(e.path)}`;return typeof s=="string"&&(r+=`&${EX}=${encodeURIComponent(s)}`),ze.from({scheme:Tu?this._preferredWebSchema:ot.vscodeRemoteResource,authority:`${i}:${n}`,path:this._remoteResourcesPath,query:r})}}const V8=new NX,TX="vscode-app";class kv{uriToBrowserUri(e){return e.scheme===ot.vscodeRemote?V8.rewrite(e):e.scheme===ot.file&&(Ml||bG===`${ot.vscodeFileResource}://${kv.FALLBACK_AUTHORITY}`)?e.with({scheme:ot.vscodeFileResource,authority:e.authority||kv.FALLBACK_AUTHORITY,query:null,fragment:null}):e}}kv.FALLBACK_AUTHORITY=TX;const H8=new kv;var sO;(function(o){const e=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);o.CoopAndCoep=Object.freeze(e.get("3"));const t="vscode-coi";function i(s){let r;typeof s=="string"?r=new URL(s).searchParams:s instanceof URL?r=s.searchParams:ze.isUri(s)&&(r=new URL(s.toString(!0)).searchParams);const a=r==null?void 0:r.get(t);if(a)return e.get(a)}o.getHeadersFromQuery=i;function n(s,r,a){if(!globalThis.crossOriginIsolated)return;const l=r&&a?"3":a?"2":"1";s instanceof URLSearchParams?s.set(t,l):s[t]=l}o.addSearchParam=n})(sO||(sO={}));function LM(o){return Sy(o,0)}function Sy(o,e){switch(typeof o){case"object":return o===null?Ld(349,e):Array.isArray(o)?AX(o,e):RX(o,e);case"string":return DM(o,e);case"boolean":return MX(o,e);case"number":return Ld(o,e);case"undefined":return Ld(937,e);default:return Ld(617,e)}}function Ld(o,e){return(e<<5)-e+o|0}function MX(o,e){return Ld(o?433:863,e)}function DM(o,e){e=Ld(149417,e);for(let t=0,i=o.length;tSy(i,t),e)}function RX(o,e){return e=Ld(181387,e),Object.keys(o).sort().reduce((t,i)=>(t=DM(i,t),Sy(o[i],t)),e)}function VD(o,e,t=32){const i=t-e,n=~((1<>>i)>>>0}function oO(o,e=0,t=o.byteLength,i=0){for(let n=0;nt.toString(16).padStart(2,"0")).join(""):PX((o>>>0).toString(16),e/4)}class yy{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(t===0)return;const i=this._buff;let n=this._buffLen,s=this._leftoverHighSurrogate,r,a;for(s!==0?(r=s,a=-1,s=0):(r=e.charCodeAt(0),a=0);;){let l=r;if(bn(r))if(a+1>>6,e[t++]=128|(i&63)>>>0):i<65536?(e[t++]=224|(i&61440)>>>12,e[t++]=128|(i&4032)>>>6,e[t++]=128|(i&63)>>>0):(e[t++]=240|(i&1835008)>>>18,e[t++]=128|(i&258048)>>>12,e[t++]=128|(i&4032)>>>6,e[t++]=128|(i&63)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Vm(this._h0)+Vm(this._h1)+Vm(this._h2)+Vm(this._h3)+Vm(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,oO(this._buff,this._buffLen),this._buffLen>56&&(this._step(),oO(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=yy._bigBlock32,t=this._buffDV;for(let u=0;u<64;u+=4)e.setUint32(u,t.getUint32(u,!1),!1);for(let u=64;u<320;u+=4)e.setUint32(u,VD(e.getUint32(u-12,!1)^e.getUint32(u-32,!1)^e.getUint32(u-56,!1)^e.getUint32(u-64,!1),1),!1);let i=this._h0,n=this._h1,s=this._h2,r=this._h3,a=this._h4,l,d,c;for(let u=0;u<80;u++)u<20?(l=n&s|~n&r,d=1518500249):u<40?(l=n^s^r,d=1859775393):u<60?(l=n&s|n&r|s&r,d=2400959708):(l=n^s^r,d=3395469782),c=VD(i,5)+l+a+d+e.getUint32(u*4,!1)&4294967295,a=r,r=s,s=VD(n,30),n=i,i=c;this._h0=this._h0+i&4294967295,this._h1=this._h1+n&4294967295,this._h2=this._h2+s&4294967295,this._h3=this._h3+r&4294967295,this._h4=this._h4+a&4294967295}}yy._bigBlock32=new DataView(new ArrayBuffer(320));const{getWindow:Je,getWindows:z8,getWindowsCount:OX,getWindowId:rO,onDidRegisterWindow:xM,onWillUnregisterWindow:FX}=function(){const o=new Map;tY(Ai,1),o.set(Ai.vscodeWindowId,{window:Ai,disposables:new de});const e=new W,t=new W,i=new W;return{onDidRegisterWindow:e.event,onWillUnregisterWindow:i.event,onDidUnregisterWindow:t.event,registerWindow(n){if(o.has(n.vscodeWindowId))return q.None;const s=new de,r={window:n,disposables:s.add(new de)};return o.set(n.vscodeWindowId,r),s.add(je(()=>{o.delete(n.vscodeWindowId),t.fire(n)})),s.add(J(n,Se.BEFORE_UNLOAD,()=>{i.fire(n)})),e.fire(r),s},getWindows(){return o.values()},getWindowsCount(){return o.size},getWindowId(n){return n.vscodeWindowId},hasWindow(n){return o.has(n)},getWindowById(n){return o.get(n)},getWindow(n){var s;const r=n;if(!((s=r==null?void 0:r.ownerDocument)===null||s===void 0)&&s.defaultView)return r.ownerDocument.defaultView.window;const a=n;return a!=null&&a.view?a.view.window:Ai},getDocument(n){return Je(n).document}}}();function $n(o){for(;o.firstChild;)o.firstChild.remove()}class BX{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function J(o,e,t,i){return new BX(o,e,t,i)}function $8(o,e){return function(t){return e(new Pr(o,t))}}function WX(o){return function(e){return o(new gi(e))}}const Wi=function(e,t,i,n){let s=i;return t==="click"||t==="mousedown"?s=$8(Je(e),i):(t==="keydown"||t==="keypress"||t==="keyup")&&(s=WX(i)),J(e,t,s,n)},VX=function(e,t,i){const n=$8(Je(e),t);return HX(e,n,i)};function HX(o,e,t){return J(o,Ea&&CM.pointerEvents?Se.POINTER_DOWN:Se.MOUSE_DOWN,e,t)}function g_(o,e,t){return F_(o,e,t)}class HD extends M8{constructor(e,t){super(e,t)}}let gw,po;class kM extends SM{cancelAndSet(e,t,i){return super.cancelAndSet(e,t,i)}}class zD{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){nt(e)}}static sort(e,t){return t.priority-e.priority}}(function(){const o=new Map,e=new Map,t=new Map,i=new Map,n=s=>{var r;t.set(s,!1);const a=(r=o.get(s))!==null&&r!==void 0?r:[];for(e.set(s,a),o.set(s,[]),i.set(s,!0);a.length>0;)a.sort(zD.sort),a.shift().execute();i.set(s,!1)};po=(s,r,a=0)=>{const l=rO(s),d=new zD(r,a);let c=o.get(l);return c||(c=[],o.set(l,c)),c.push(d),t.get(l)||(t.set(l,!0),s.requestAnimationFrame(()=>n(l))),d},gw=(s,r,a)=>{const l=rO(s);if(i.get(l)){const d=new zD(r,a);let c=e.get(l);return c||(c=[],e.set(l,c)),c.push(d),d}else return po(s,r,a)}})();function Ly(o){return Je(o).getComputedStyle(o,null)}function ng(o,e){const t=Je(o),i=t.document;if(o!==i.body)return new Rt(o.clientWidth,o.clientHeight);if(Ea&&(t!=null&&t.visualViewport))return new Rt(t.visualViewport.width,t.visualViewport.height);if(t!=null&&t.innerWidth&&t.innerHeight)return new Rt(t.innerWidth,t.innerHeight);if(i.body&&i.body.clientWidth&&i.body.clientHeight)return new Rt(i.body.clientWidth,i.body.clientHeight);if(i.documentElement&&i.documentElement.clientWidth&&i.documentElement.clientHeight)return new Rt(i.documentElement.clientWidth,i.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class Ui{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){const n=Ly(e),s=n?n.getPropertyValue(t):"0";return Ui.convertToPixels(e,s)}static getBorderLeftWidth(e){return Ui.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return Ui.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return Ui.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return Ui.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return Ui.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return Ui.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return Ui.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return Ui.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return Ui.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return Ui.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return Ui.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return Ui.getDimension(e,"margin-bottom","marginBottom")}}class Rt{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new Rt(e,t):this}static is(e){return typeof e=="object"&&typeof e.height=="number"&&typeof e.width=="number"}static lift(e){return e instanceof Rt?e:new Rt(e.width,e.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}}Rt.None=new Rt(0,0);function U8(o){let e=o.offsetParent,t=o.offsetTop,i=o.offsetLeft;for(;(o=o.parentNode)!==null&&o!==o.ownerDocument.body&&o!==o.ownerDocument.documentElement;){t-=o.scrollTop;const n=j8(o)?null:Ly(o);n&&(i-=n.direction!=="rtl"?o.scrollLeft:-o.scrollLeft),o===e&&(i+=Ui.getBorderLeftWidth(o),t+=Ui.getBorderTopWidth(o),t+=o.offsetTop,i+=o.offsetLeft,e=o.offsetParent)}return{left:i,top:t}}function zX(o,e,t){typeof e=="number"&&(o.style.width=`${e}px`),typeof t=="number"&&(o.style.height=`${t}px`)}function gn(o){const e=o.getBoundingClientRect(),t=Je(o);return{left:e.left+t.scrollX,top:e.top+t.scrollY,width:e.width,height:e.height}}function $X(o){let e=o,t=1;do{const i=Ly(e).zoom;i!=null&&i!=="1"&&(t*=i),e=e.parentElement}while(e!==null&&e!==e.ownerDocument.documentElement);return t}function zs(o){const e=Ui.getMarginLeft(o)+Ui.getMarginRight(o);return o.offsetWidth+e}function $D(o){const e=Ui.getBorderLeftWidth(o)+Ui.getBorderRightWidth(o),t=Ui.getPaddingLeft(o)+Ui.getPaddingRight(o);return o.offsetWidth-e-t}function UX(o){const e=Ui.getBorderTopWidth(o)+Ui.getBorderBottomWidth(o),t=Ui.getPaddingTop(o)+Ui.getPaddingBottom(o);return o.offsetHeight-e-t}function kh(o){const e=Ui.getMarginTop(o)+Ui.getMarginBottom(o);return o.offsetHeight+e}function Qn(o,e){return!!(e!=null&&e.contains(o))}function jX(o,e,t){for(;o&&o.nodeType===o.ELEMENT_NODE;){if(o.classList.contains(e))return o;if(t){if(typeof t=="string"){if(o.classList.contains(t))return null}else if(o===t)return null}o=o.parentNode}return null}function UD(o,e,t){return!!jX(o,e,t)}function j8(o){return o&&!!o.host&&!!o.mode}function fw(o){return!!sg(o)}function sg(o){for(var e;o.parentNode;){if(o===((e=o.ownerDocument)===null||e===void 0?void 0:e.body))return null;o=o.parentNode}return j8(o)?o:null}function jo(){let o=fm().activeElement;for(;o!=null&&o.shadowRoot;)o=o.shadowRoot.activeElement;return o}function Dy(o){return o.ownerDocument.activeElement===o}function KX(o){return Qn(o.ownerDocument.activeElement,o)}function fm(){var o;return OX()<=1?document:(o=Array.from(z8()).map(({window:t})=>t.document).find(t=>t.hasFocus()))!==null&&o!==void 0?o:document}function qX(){var o,e;return(e=(o=fm().defaultView)===null||o===void 0?void 0:o.window)!==null&&e!==void 0?e:Ai}const IM=new Map;function mr(o=Ai.document.head,e,t){const i=document.createElement("style");if(i.type="text/css",i.media="screen",e==null||e(i),o.appendChild(i),t&&t.add(je(()=>o.removeChild(i))),o===Ai.document.head){const n=new Set;IM.set(i,n);for(const{window:s,disposables:r}of z8()){if(s===Ai)continue;const a=r.add(GX(i,n,s));t==null||t.add(a)}}return i}function GX(o,e,t){var i,n;const s=new de,r=o.cloneNode(!0);t.document.head.appendChild(r),s.add(je(()=>t.document.head.removeChild(r)));for(const a of q8(o))(i=r.sheet)===null||i===void 0||i.insertRule(a.cssText,(n=r.sheet)===null||n===void 0?void 0:n.cssRules.length);return s.add(ZX.observe(o,s,{childList:!0})(()=>{r.textContent=o.textContent})),e.add(r),s.add(je(()=>e.delete(r))),s}const ZX=new class{constructor(){this.mutationObservers=new Map}observe(o,e,t){let i=this.mutationObservers.get(o);i||(i=new Map,this.mutationObservers.set(o,i));const n=LM(t);let s=i.get(n);if(s)s.users+=1;else{const r=new W,a=new MutationObserver(d=>r.fire(d));a.observe(o,t);const l=s={users:1,observer:a,onDidMutate:r.event};e.add(je(()=>{l.users-=1,l.users===0&&(r.dispose(),a.disconnect(),i==null||i.delete(n),(i==null?void 0:i.size)===0&&this.mutationObservers.delete(o))})),i.set(n,s)}return s.onDidMutate}};let jD=null;function K8(){return jD||(jD=mr()),jD}function q8(o){var e,t;return!((e=o==null?void 0:o.sheet)===null||e===void 0)&&e.rules?o.sheet.rules:!((t=o==null?void 0:o.sheet)===null||t===void 0)&&t.cssRules?o.sheet.cssRules:[]}function pw(o,e,t=K8()){var i,n;if(!(!t||!e)){(i=t.sheet)===null||i===void 0||i.insertRule(`${o} {${e}}`,0);for(const s of(n=IM.get(t))!==null&&n!==void 0?n:[])pw(o,e,s)}}function VI(o,e=K8()){var t,i;if(!e)return;const n=q8(e),s=[];for(let r=0;r=0;r--)(t=e.sheet)===null||t===void 0||t.deleteRule(s[r]);for(const r of(i=IM.get(e))!==null&&i!==void 0?i:[])VI(o,r)}function YX(o){return typeof o.selectorText=="string"}function EM(o){return o instanceof MouseEvent||o instanceof Je(o).MouseEvent}function G8(o){return o instanceof KeyboardEvent||o instanceof Je(o).KeyboardEvent}const Se={CLICK:"click",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",KEY_DOWN:"keydown",KEY_UP:"keyup",BEFORE_UNLOAD:"beforeunload",CHANGE:"change",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend"};function XX(o){const e=o;return!!(e&&typeof e.preventDefault=="function"&&typeof e.stopPropagation=="function")}const ct={stop:(o,e)=>(o.preventDefault(),e&&o.stopPropagation(),o)};function QX(o){const e=[];for(let t=0;o&&o.nodeType===o.ELEMENT_NODE;t++)e[t]=o.scrollTop,o=o.parentNode;return e}function JX(o,e){for(let t=0;o&&o.nodeType===o.ELEMENT_NODE;t++)o.scrollTop!==e[t]&&(o.scrollTop=e[t]),o=o.parentNode}class mw extends q{static hasFocusWithin(e){if(e instanceof HTMLElement){const t=sg(e),i=t?t.activeElement:e.ownerDocument.activeElement;return Qn(i,e)}else{const t=e;return Qn(t.document.activeElement,t.document)}}constructor(e){super(),this._onDidFocus=this._register(new W),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new W),this.onDidBlur=this._onDidBlur.event;let t=mw.hasFocusWithin(e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},s=()=>{t&&(i=!0,(e instanceof HTMLElement?Je(e):e).setTimeout(()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{mw.hasFocusWithin(e)!==t&&(t?s():n())},this._register(J(e,Se.FOCUS,n,!0)),this._register(J(e,Se.BLUR,s,!0)),e instanceof HTMLElement&&(this._register(J(e,Se.FOCUS_IN,()=>this._refreshStateHandler())),this._register(J(e,Se.FOCUS_OUT,()=>this._refreshStateHandler())))}}function Pl(o){return new mw(o)}function eQ(o,e){return o.after(e),e}function le(o,...e){if(o.append(...e),e.length===1&&typeof e[0]!="string")return e[0]}function Z8(o,e){return o.insertBefore(e,o.firstChild),e}function es(o,...e){o.innerText="",le(o,...e)}const tQ=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Iv;(function(o){o.HTML="http://www.w3.org/1999/xhtml",o.SVG="http://www.w3.org/2000/svg"})(Iv||(Iv={}));function Y8(o,e,t,...i){const n=tQ.exec(e);if(!n)throw new Error("Bad use of emmet");const s=n[1]||"div";let r;return o!==Iv.HTML?r=document.createElementNS(o,s):r=document.createElement(s),n[3]&&(r.id=n[3]),n[4]&&(r.className=n[4].replace(/\./g," ").trim()),t&&Object.entries(t).forEach(([a,l])=>{typeof l>"u"||(/^on\w+$/.test(a)?r[a]=l:a==="selected"?l&&r.setAttribute(a,"true"):r.setAttribute(a,l))}),r.append(...i),r}function pe(o,e,...t){return Y8(Iv.HTML,o,e,...t)}pe.SVG=function(o,e,...t){return Y8(Iv.SVG,o,e,...t)};function iQ(o,...e){o?oo(...e):xs(...e)}function oo(...o){for(const e of o)e.style.display="",e.removeAttribute("aria-hidden")}function xs(...o){for(const e of o)e.style.display="none",e.setAttribute("aria-hidden","true")}function aO(o,e){const t=o.devicePixelRatio*e;return Math.max(1,Math.floor(t))/o.devicePixelRatio}function X8(o){Ai.open(o,"_blank","noopener")}function nQ(o,e){const t=()=>{e(),i=po(o,t)};let i=po(o,t);return je(()=>i.dispose())}V8.setPreferredWebSchema(/^https:/.test(Ai.location.href)?"https":"http");function du(o){return o?`url('${H8.uriToBrowserUri(o).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function lO(o){return`'${o.replace(/'/g,"%27")}'`}function Bh(o,e){if(o!==void 0){const t=o.match(/^\s*var\((.+)\)$/);if(t){const i=t[1].split(",",2);return i.length===2&&(e=Bh(i[1].trim(),e)),`var(${i[0]}, ${e})`}return o}return e}function sQ(o,e=!1){const t=document.createElement("a");return B8("afterSanitizeAttributes",i=>{for(const n of["href","src"])if(i.hasAttribute(n)){const s=i.getAttribute(n);if(n==="href"&&s.startsWith("#"))continue;if(t.href=s,!o.includes(t.protocol.replace(/:$/,""))){if(e&&n==="src"&&t.href.startsWith("data:"))continue;i.removeAttribute(n)}}}),je(()=>{W8("afterSanitizeAttributes")})}const oQ=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);class Dd extends W{constructor(){super(),this._subscriptions=new de,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(ye.runAndSubscribe(xM,({window:e,disposables:t})=>this.registerListeners(e,t),{window:Ai,disposables:this._subscriptions}))}registerListeners(e,t){t.add(J(e,"keydown",i=>{if(i.defaultPrevented)return;const n=new gi(i);if(!(n.keyCode===6&&i.repeat)){if(i.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(i.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(i.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(i.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(n.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=i.altKey,this._keyStatus.ctrlKey=i.ctrlKey,this._keyStatus.metaKey=i.metaKey,this._keyStatus.shiftKey=i.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=i,this.fire(this._keyStatus))}},!0)),t.add(J(e,"keyup",i=>{i.defaultPrevented||(!i.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!i.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!i.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!i.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=i.altKey,this._keyStatus.ctrlKey=i.ctrlKey,this._keyStatus.metaKey=i.metaKey,this._keyStatus.shiftKey=i.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=i,this.fire(this._keyStatus)))},!0)),t.add(J(e.document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),t.add(J(e.document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),t.add(J(e.document.body,"mousemove",i=>{i.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),t.add(J(e,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Dd.instance||(Dd.instance=new Dd),Dd.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class rQ extends q{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this.callbacks.onDragStart&&this._register(J(this.element,Se.DRAG_START,e=>{var t,i;(i=(t=this.callbacks).onDragStart)===null||i===void 0||i.call(t,e)})),this.callbacks.onDrag&&this._register(J(this.element,Se.DRAG,e=>{var t,i;(i=(t=this.callbacks).onDrag)===null||i===void 0||i.call(t,e)})),this._register(J(this.element,Se.DRAG_ENTER,e=>{var t,i;this.counter++,this.dragStartTime=e.timeStamp,(i=(t=this.callbacks).onDragEnter)===null||i===void 0||i.call(t,e)})),this._register(J(this.element,Se.DRAG_OVER,e=>{var t,i;e.preventDefault(),(i=(t=this.callbacks).onDragOver)===null||i===void 0||i.call(t,e,e.timeStamp-this.dragStartTime)})),this._register(J(this.element,Se.DRAG_LEAVE,e=>{var t,i;this.counter--,this.counter===0&&(this.dragStartTime=0,(i=(t=this.callbacks).onDragLeave)===null||i===void 0||i.call(t,e))})),this._register(J(this.element,Se.DRAG_END,e=>{var t,i;this.counter=0,this.dragStartTime=0,(i=(t=this.callbacks).onDragEnd)===null||i===void 0||i.call(t,e)})),this._register(J(this.element,Se.DROP,e=>{var t,i;this.counter=0,this.dragStartTime=0,(i=(t=this.callbacks).onDrop)===null||i===void 0||i.call(t,e)}))}}const aQ=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/;function vi(o,...e){let t,i;Array.isArray(e[0])?(t={},i=e[0]):(t=e[0]||{},i=e[1]);const n=aQ.exec(o);if(!n||!n.groups)throw new Error("Bad use of h");const s=n.groups.tag||"div",r=document.createElement(s);n.groups.id&&(r.id=n.groups.id);const a=[];if(n.groups.class)for(const d of n.groups.class.split("."))d!==""&&a.push(d);if(t.className!==void 0)for(const d of t.className.split("."))d!==""&&a.push(d);a.length>0&&(r.className=a.join(" "));const l={};if(n.groups.name&&(l[n.groups.name]=r),i)for(const d of i)d instanceof HTMLElement?r.appendChild(d):typeof d=="string"?r.append(d):"root"in d&&(Object.assign(l,d),r.appendChild(d.root));for(const[d,c]of Object.entries(t))if(d!=="className")if(d==="style")for(const[u,h]of Object.entries(c))r.style.setProperty(dO(u),typeof h=="number"?h+"px":""+h);else d==="tabIndex"?r.tabIndex=c:r.setAttribute(dO(d),c.toString());return l.root=r,l}function dO(o){return o.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}class xy{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this.metadata=e.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let i=t.kbExpr;this.precondition&&(i?i=ae.and(i,this.precondition):i=this.precondition);const n={id:this.id,weight:t.weight,args:t.args,when:i,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};Gs.registerKeybindingRule(n)}}Et.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),metadata:this.metadata})}_registerMenuItem(e){zn.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class pm extends xy{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i,n){return this._implementations.push({priority:e,name:t,implementation:i,when:n}),this._implementations.sort((s,r)=>r.priority-s.priority),{dispose:()=>{for(let s=0;s{if(a.get(Xe).contextMatchesRules(i??void 0))return n(a,r,t)})}runCommand(e,t){return Rn.runEditorCommand(e,t,this.precondition,(i,n,s)=>this.runEditorCommand(i,n,s))}}class Te extends Rn{static convertOptions(e){let t;Array.isArray(e.menuOpts)?t=e.menuOpts:e.menuOpts?t=[e.menuOpts]:t=[];function i(n){return n.menuId||(n.menuId=N.EditorContext),n.title||(n.title=e.label),n.when=ae.and(e.precondition,n.when),n}return Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super(Te.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(vo).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class J8 extends Te{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort((i,n)=>n[0]-i[0]),{dispose:()=>{for(let i=0;i{var r,a;const l=s.get(Xe),d=s.get(bo);if(!l.contextMatchesRules((r=this.desc.precondition)!==null&&r!==void 0?r:void 0)){d.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,(a=this.desc.precondition)===null||a===void 0?void 0:a.serialize());return}return this.runEditorCommand(s,n,...t)})}}function ql(o,e){Et.registerCommand(o,function(t,...i){const n=t.get(qe),[s,r]=i;qt(ze.isUri(s)),qt(z.isIPosition(r));const a=t.get(Si).getModel(s);if(a){const l=z.lift(r);return n.invokeFunction(e,a,l,...i.slice(2))}return t.get(Xs).createModelReference(s).then(l=>new Promise((d,c)=>{try{const u=n.invokeFunction(e,l.object.textEditorModel,z.lift(r),i.slice(2));d(u)}catch(u){c(u)}}).finally(()=>{l.dispose()}))})}function we(o){return or.INSTANCE.registerEditorCommand(o),o}function _e(o){const e=new o;return or.INSTANCE.registerEditorAction(e),e}function e7(o){return or.INSTANCE.registerEditorAction(o),o}function lQ(o){or.INSTANCE.registerEditorAction(o)}function At(o,e,t){or.INSTANCE.registerEditorContribution(o,e,t)}var Jf;(function(o){function e(r){return or.INSTANCE.getEditorCommand(r)}o.getEditorCommand=e;function t(){return or.INSTANCE.getEditorActions()}o.getEditorActions=t;function i(){return or.INSTANCE.getEditorContributions()}o.getEditorContributions=i;function n(r){return or.INSTANCE.getEditorContributions().filter(a=>r.indexOf(a.id)>=0)}o.getSomeEditorContributions=n;function s(){return or.INSTANCE.getDiffEditorContributions()}o.getDiffEditorContributions=s})(Jf||(Jf={}));const dQ={EditorCommonContributions:"editor.contributions"};class or{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,i){this.editorContributions.push({id:e,ctor:t,instantiation:i})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}or.INSTANCE=new or;xi.add(dQ.EditorCommonContributions,or.INSTANCE);function e0(o){return o.register(),o}const t7=e0(new pm({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:N.MenubarEditMenu,group:"1_do",title:p({},"&&Undo"),order:1},{menuId:N.CommandPalette,group:"",title:p("undo","Undo"),order:1}]}));e0(new Q8(t7,{id:"default:undo",precondition:void 0}));const i7=e0(new pm({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:N.MenubarEditMenu,group:"1_do",title:p({},"&&Redo"),order:2},{menuId:N.CommandPalette,group:"",title:p("redo","Redo"),order:1}]}));e0(new Q8(i7,{id:"default:redo",precondition:void 0}));const cQ=e0(new pm({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:N.MenubarSelectionMenu,group:"1_basic",title:p({},"&&Select All"),order:1},{menuId:N.CommandPalette,group:"",title:p("selectAll","Select All"),order:1}]})),uQ="$initialize";let cO=!1;function HI(o){Tu&&(cO||(cO=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(o.message))}class hQ{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.method=i,this.args=n,this.type=0}}class uO{constructor(e,t,i,n){this.vsWorker=e,this.seq=t,this.res=i,this.err=n,this.type=1}}class gQ{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.eventName=i,this.arg=n,this.type=2}}class fQ{constructor(e,t,i){this.vsWorker=e,this.req=t,this.event=i,this.type=3}}class pQ{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class mQ{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t){const i=String(++this._lastSentReq);return new Promise((n,s)=>{this._pendingReplies[i]={resolve:n,reject:s},this._send(new hQ(this._workerId,i,e,t))})}listen(e,t){let i=null;const n=new W({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,n),this._send(new gQ(this._workerId,i,e,t))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new pQ(this._workerId,i)),i=null}});return n.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;e.err.$isError&&(i=new Error,i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack),t.reject(i);return}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.method,e.args).then(n=>{this._send(new uO(this._workerId,t,n,void 0))},n=>{n.detail instanceof Error&&(n.detail=OP(n.detail)),this._send(new uO(this._workerId,t,void 0,OP(n)))})}_handleSubscribeEventMessage(e){const t=e.req,i=this._handler.handleEvent(e.eventName,e.arg)(n=>{this._send(new fQ(this._workerId,t,n))});this._pendingEvents.set(t,i)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){const t=[];if(e.type===0)for(let i=0;i{this._protocol.handleMessage(c)},c=>{n==null||n(c)})),this._protocol=new mQ({sendMessage:(c,u)=>{this._worker.postMessage(c,u)},handleMessage:(c,u)=>{if(typeof i[c]!="function")return Promise.reject(new Error("Missing method "+c+" on main thread host."));try{return Promise.resolve(i[c].apply(i,u))}catch(h){return Promise.reject(h)}},handleEvent:(c,u)=>{if(s7(c)){const h=i[c].call(i,u);if(typeof h!="function")throw new Error(`Missing dynamic event ${c} on main thread host.`);return h}if(n7(c)){const h=i[c];if(typeof h!="function")throw new Error(`Missing event ${c} on main thread host.`);return h}throw new Error(`Malformed event name ${c}`)}}),this._protocol.setWorkerId(this._worker.getId());let s=null;const r=globalThis.require;typeof r<"u"&&typeof r.getConfig=="function"?s=r.getConfig():typeof globalThis.requirejs<"u"&&(s=globalThis.requirejs.s.contexts._.config);const a=Y2(i);this._onModuleLoaded=this._protocol.sendMessage(uQ,[this._worker.getId(),JSON.parse(JSON.stringify(s)),t,a]);const l=(c,u)=>this._request(c,u),d=(c,u)=>this._protocol.listen(c,u);this._lazyProxy=new Promise((c,u)=>{n=u,this._onModuleLoaded.then(h=>{c(vQ(h,l,d))},h=>{u(h),this._onError("Worker failed to load "+t,h)})})}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise((i,n)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(e,t).then(i,n)},n)})}_onError(e,t){console.error(e),console.info(t)}}function n7(o){return o[0]==="o"&&o[1]==="n"&&el(o.charCodeAt(2))}function s7(o){return/^onDynamic/.test(o)&&el(o.charCodeAt(9))}function vQ(o,e,t){const i=r=>function(){const a=Array.prototype.slice.call(arguments,0);return e(r,a)},n=r=>function(a){return t(r,a)},s={};for(const r of o){if(s7(r)){s[r]=n(r);continue}if(n7(r)){s[r]=t(r,void 0);continue}s[r]=i(r)}return s}function qd(o,e){var t;const i=globalThis.MonacoEnvironment;if(i!=null&&i.createTrustedTypesPolicy)try{return i.createTrustedTypesPolicy(o,e)}catch(n){nt(n);return}try{return(t=Ai.trustedTypes)===null||t===void 0?void 0:t.createPolicy(o,e)}catch(n){nt(n);return}}const hO=qd("defaultWorkerFactory",{createScriptURL:o=>o});function bQ(o){const e=globalThis.MonacoEnvironment;if(e){if(typeof e.getWorker=="function")return e.getWorker("workerMain.js",o);if(typeof e.getWorkerUrl=="function"){const t=e.getWorkerUrl("workerMain.js",o);return new Worker(hO?hO.createScriptURL(t):t,{name:o})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function CQ(o){return typeof o.then=="function"}class wQ{constructor(e,t,i,n,s){this.id=t,this.label=i;const r=bQ(i);CQ(r)?this.worker=r:this.worker=Promise.resolve(r),this.postMessage(e,[]),this.worker.then(a=>{a.onmessage=function(l){n(l.data)},a.onmessageerror=s,typeof a.addEventListener=="function"&&a.addEventListener("error",s)})}getId(){return this.id}postMessage(e,t){var i;(i=this.worker)===null||i===void 0||i.then(n=>{try{n.postMessage(e,t)}catch(s){nt(s),nt(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:s}))}})}dispose(){var e;(e=this.worker)===null||e===void 0||e.then(t=>t.terminate()),this.worker=null}}class ky{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){const n=++ky.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new wQ(e,n,this._label||"anonymous"+n,t,s=>{HI(s),this._webWorkerFailedBeforeError=s,i(s)})}}ky.LAST_WORKER_ID=0;var an;(function(o){o[o.None=0]="None",o[o.Indent=1]="Indent",o[o.IndentOutdent=2]="IndentOutdent",o[o.Outdent=3]="Outdent"})(an||(an={}));class KD{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t0&&o.getLanguageId(r-1)===n;)r--;return new yQ(o,n,r,s+1,o.getStartOffset(r),o.getEndOffset(s))}class yQ{constructor(e,t,i,n,s,r){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=s,this._lastCharOffset=r}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function Za(o){return(o&3)!==0}class kp{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(t=>new KD(t)):e.brackets?this._autoClosingPairs=e.brackets.map(t=>new KD({open:t[0],close:t[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new KD({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:kp.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:kp.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}kp.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])> `;kp.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS=`'"\`;:.,=}])> - `;const gO=typeof Buffer<"u";let qD;class Ey{static wrap(e){return gO&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new Ey(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return gO?this.buffer.toString():(qD||(qD=new TextDecoder),qD.decode(this.buffer))}}function CQ(o,e){return o[e+0]<<0>>>0|o[e+1]<<8>>>0}function wQ(o,e,t){o[t+0]=e&255,e=e>>>8,o[t+1]=e&255}function aa(o,e){return o[e]*2**24+o[e+1]*2**16+o[e+2]*2**8+o[e+3]}function la(o,e,t){o[t+3]=e,e=e>>>8,o[t+2]=e,e=e>>>8,o[t+1]=e,e=e>>>8,o[t]=e}function fO(o,e){return o[e]}function pO(o,e,t){o[t]=e}let GD;function o8(){return GD||(GD=new TextDecoder("UTF-16LE")),GD}let ZD;function SQ(){return ZD||(ZD=new TextDecoder("UTF-16BE")),ZD}let YD;function r8(){return YD||(YD=j9()?o8():SQ()),YD}function yQ(o,e,t){const i=new Uint16Array(o.buffer,e,t);return t>0&&(i[0]===65279||i[0]===65534)?LQ(o,e,t):o8().decode(i)}function LQ(o,e,t){const i=[];let n=0;for(let s=0;s=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let i=0;i[r[0].toLowerCase(),r[1].toLowerCase()]);const t=[];for(let r=0;r{const[l,d]=r,[c,u]=a;return l===c||l===u||d===c||d===u},n=(r,a)=>{const l=Math.min(r,a),d=Math.max(r,a);for(let c=0;c0&&s.push({open:a,close:l})}return s}class xQ{constructor(e,t){this._richEditBracketsBrand=void 0;const i=DQ(t);this.brackets=i.map((n,s)=>new _w(e,s,n.open,n.close,kQ(n.open,n.close,i,s),IQ(n.open,n.close,i,s))),this.forwardRegex=EQ(this.brackets),this.reversedRegex=NQ(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const n of this.brackets){for(const s of n.open)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,s.length);for(const s of n.close)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,s.length)}}}function a8(o,e,t,i){for(let n=0,s=e.length;n=0&&i.push(a);for(const a of r.close)a.indexOf(o)>=0&&i.push(a)}}function l8(o,e){return o.length-e.length}function Ny(o){if(o.length<=1)return o;const e=[],t=new Set;for(const i of o)t.has(i)||(e.push(i),t.add(i));return e}function kQ(o,e,t,i){let n=[];n=n.concat(o),n=n.concat(e);for(let s=0,r=n.length;s=0;r--)n[s++]=i.charCodeAt(r);return r8().decode(n)}let e=null,t=null;return function(n){return e!==n&&(e=n,t=o(e)),t}}();class Nr{static _findPrevBracketInText(e,t,i,n){const s=i.match(e);if(!s)return null;const r=i.length-(s.index||0),a=s[0].length,l=n+r;return new k(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,s){const a=NM(i).substring(i.length-s,i.length-n);return this._findPrevBracketInText(e,t,a,n)}static findNextBracketInText(e,t,i,n){const s=i.match(e);if(!s)return null;const r=s.index||0,a=s[0].length;if(a===0)return null;const l=n+r;return new k(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,s){const r=i.substring(n,s);return this.findNextBracketInText(e,t,r,n)}}class MQ{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const n=i.charAt(i.length-1);e.push(n)}return iu(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const n=t.findTokenIndexAtOffset(i-1);if(Za(t.getStandardTokenType(n)))return null;const s=this._richEditBrackets.reversedRegex,r=t.getLineContent().substring(0,i-1)+e,a=Nr.findPrevBracketInRange(s,1,r,0,r.length);if(!a)return null;const l=r.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[l])return null;const c=t.getActualLineContentBefore(a.startColumn-1);return/^\s*$/.test(c)?{matchOpenBracket:l}:null}}function X0(o){return o.global&&(o.lastIndex=0),!0}class AQ{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&X0(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&X0(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&X0(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&X0(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}class Df{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(t=>{const i=Df._createOpenBracketRegExp(t[0]),n=Df._createCloseBracketRegExp(t[1]);i&&n&&this._brackets.push({open:t[0],openRegExp:i,close:t[1],closeRegExp:n})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let s=0,r=this._regExpRules.length;sd.reg?(d.reg.lastIndex=0,d.reg.test(d.text)):!0))return a.action}if(e>=2&&i.length>0&&n.length>0)for(let s=0,r=this._brackets.length;s=2&&i.length>0){for(let s=0,r=this._brackets.length;s"u"?t:s}function PQ(o){return o.replace(/[\[\]]/g,"")}const bi=bt("languageService");class tl{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}const u8=[];function xt(o,e,t){e instanceof tl||(e=new tl(e,[],!!t)),u8.push([o,e])}function _O(){return u8}const qi=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"}),My={JSONContribution:"base.contributions.json"};function OQ(o){return o.length>0&&o.charAt(o.length-1)==="#"?o.substring(0,o.length-1):o}class FQ{constructor(){this._onDidChangeSchema=new W,this.schemasById={}}registerSchema(e,t){this.schemasById[OQ(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const BQ=new FQ;xi.add(My.JSONContribution,BQ);const Va={Configuration:"base.contributions.configuration"},Q0="vscode://schemas/settings/resourceLanguage",vO=xi.as(My.JSONContribution);class WQ{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new W,this._onDidUpdateConfiguration=new W,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:p("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},vO.registerSchema(Q0,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=new Set;this.doRegisterConfigurations(e,t,i),vO.registerSchema(Q0,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){var i;const n=[];for(const{overrides:s,source:r}of e)for(const a in s)if(t.add(a),cu.test(a)){const l=this.configurationDefaultsOverrides.get(a),d=(i=l==null?void 0:l.valuesSources)!==null&&i!==void 0?i:new Map;if(r)for(const g of Object.keys(s[a]))d.set(g,r);const c={...(l==null?void 0:l.value)||{},...s[a]};this.configurationDefaultsOverrides.set(a,{source:r,value:c,valuesSources:d});const u=PQ(a),h={type:"object",default:c,description:p("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",u),$ref:Q0,defaultDefaultValue:c,source:As(r)?void 0:r,defaultValueSource:r};n.push(...vw(a)),this.configurationProperties[a]=h,this.defaultLanguageConfigurationOverridesNode.properties[a]=h}else{this.configurationDefaultsOverrides.set(a,{value:s[a],source:r});const l=this.configurationProperties[a];l&&(this.updatePropertyDefaultValue(a,l),this.updateSchema(a,l))}this.doRegisterOverrideIdentifiers(n)}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,i){e.forEach(n=>{this.validateAndRegisterProperties(n,t,n.extensionInfo,n.restrictedProperties,void 0,i),this.configurationContributors.push(n),this.registerJSONConfiguration(n)})}validateAndRegisterProperties(e,t=!0,i,n,s=3,r){var a;s=Ro(e.scope)?s:e.scope;const l=e.properties;if(l)for(const c in l){const u=l[c];if(t&&zQ(c,u)){delete l[c];continue}if(u.source=i,u.defaultDefaultValue=l[c].default,this.updatePropertyDefaultValue(c,u),cu.test(c)?u.scope=void 0:(u.scope=Ro(u.scope)?s:u.scope,u.restricted=Ro(u.restricted)?!!(n!=null&&n.includes(c)):u.restricted),l[c].hasOwnProperty("included")&&!l[c].included){this.excludedConfigurationProperties[c]=l[c],delete l[c];continue}else this.configurationProperties[c]=l[c],!((a=l[c].policy)===null||a===void 0)&&a.name&&this.policyConfigurations.set(l[c].policy.name,c);!l[c].deprecationMessage&&l[c].markdownDeprecationMessage&&(l[c].deprecationMessage=l[c].markdownDeprecationMessage),r.add(c)}const d=e.allOf;if(d)for(const c of d)this.validateAndRegisterProperties(c,t,i,n,s,r)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=i=>{const n=i.properties;if(n)for(const r in n)this.updateSchema(r,n[r]);const s=i.allOf;s==null||s.forEach(t)};t(e)}updateSchema(e,t){switch(t.scope){case 1:break;case 2:break;case 6:break;case 3:break;case 4:break;case 5:this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:p("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:p("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:Q0};this.updatePropertyDefaultValue(t,i)}}registerOverridePropertyPatternKey(){p("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),p("overrideSettings.errorMessage","This setting does not support per-language configuration."),this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const i=this.configurationDefaultsOverrides.get(e);let n=i==null?void 0:i.value,s=i==null?void 0:i.source;ro(n)&&(n=t.defaultDefaultValue,s=void 0),ro(n)&&(n=HQ(t.type)),t.default=n,t.defaultValueSource=s}}const h8="\\[([^\\]]+)\\]",bO=new RegExp(h8,"g"),VQ=`^(${h8})+$`,cu=new RegExp(VQ);function vw(o){const e=[];if(cu.test(o)){let t=bO.exec(o);for(;t!=null&&t.length;){const i=t[1].trim();i&&e.push(i),t=bO.exec(o)}}return iu(e)}function HQ(o){switch(Array.isArray(o)?o[0]:o){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const v1=new WQ;xi.add(Va.Configuration,v1);function zQ(o,e){var t,i,n,s;return o.trim()?cu.test(o)?p("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",o):v1.getConfigurationProperties()[o]!==void 0?p("config.property.duplicate","Cannot register '{0}'. This property is already registered.",o):!((t=e.policy)===null||t===void 0)&&t.name&&v1.getPolicyConfigurations().get((i=e.policy)===null||i===void 0?void 0:i.name)!==void 0?p("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",o,(n=e.policy)===null||n===void 0?void 0:n.name,v1.getPolicyConfigurations().get((s=e.policy)===null||s===void 0?void 0:s.name)):null:p("config.property.empty","Cannot register an empty property")}const $Q={ModesRegistry:"editor.modesRegistry"};class UQ{constructor(){this._onDidChangeLanguages=new W,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t{const l=new Set;return{info:new qQ(this,a,l),closing:l}}),s=new HP(a=>{const l=new Set,d=new Set;return{info:new GQ(this,a,l,d),opening:l,openingColorized:d}});for(const[a,l]of i){const d=n.get(a),c=s.get(l);d.closing.add(c.info),c.opening.add(d.info)}const r=t.colorizedBracketPairs?CO(t.colorizedBracketPairs):i.filter(a=>!(a[0]==="<"&&a[1]===">"));for(const[a,l]of r){const d=n.get(a),c=s.get(l);d.closing.add(c.info),c.openingColorized.add(d.info),c.opening.add(d.info)}this._openingBrackets=new Map([...n.cachedValues].map(([a,l])=>[a,l.info])),this._closingBrackets=new Map([...s.cachedValues].map(([a,l])=>[a,l.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}}function CO(o){return o.filter(([e,t])=>e!==""&&t!=="")}class g8{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class qQ extends g8{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class GQ extends g8{constructor(e,t,i,n){super(e,t),this.openingBrackets=i,this.openingColorizedBrackets=n,this.isOpeningBracket=!1}closes(e){return e.config!==this.config?!1:this.openingBrackets.has(e)}closesColorized(e){return e.config!==this.config?!1:this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var ZQ=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wO=function(o,e){return function(t,i){e(t,i,o)}};class XD{constructor(e){this.languageId=e}affects(e){return this.languageId?this.languageId===e:!0}}const si=bt("languageConfigurationService");let $I=class extends q{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new JQ),this.onDidChangeEmitter=this._register(new W),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(UI));this._register(this.configurationService.onDidChangeConfiguration(n=>{const s=n.change.keys.some(a=>i.has(a)),r=n.change.overrides.filter(([a,l])=>l.some(d=>i.has(d))).map(([a])=>a);if(s)this.configurations.clear(),this.onDidChangeEmitter.fire(new XD(void 0));else for(const a of r)this.languageService.isRegisteredLanguageId(a)&&(this.configurations.delete(a),this.onDidChangeEmitter.fire(new XD(a)))})),this._register(this._registry.onDidChange(n=>{this.configurations.delete(n.languageId),this.onDidChangeEmitter.fire(new XD(n.languageId))}))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=YQ(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};$I=ZQ([wO(0,Dt),wO(1,bi)],$I);function YQ(o,e,t,i){let n=e.getLanguageConfiguration(o);if(!n){if(!i.isRegisteredLanguageId(o))return new tp(o,{});n=new tp(o,{})}const s=XQ(n.languageId,t),r=p8([n.underlyingConfig,s]);return new tp(n.languageId,r)}const UI={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function XQ(o,e){const t=e.getValue(UI.brackets,{overrideIdentifier:o}),i=e.getValue(UI.colorizedBracketPairs,{overrideIdentifier:o});return{brackets:SO(t),colorizedBracketPairs:SO(i)}}function SO(o){if(Array.isArray(o))return o.map(e=>{if(!(!Array.isArray(e)||e.length!==2))return[e[0],e[1]]}).filter(e=>!!e)}function f8(o,e,t){const i=o.getLineContent(e);let n=ii(i);return n.length>t-1&&(n=n.substring(0,t-1)),n}function ep(o,e,t){o.tokenization.forceTokenization(e);const i=o.tokenization.getLineTokens(e),n=typeof t>"u"?o.getLineMaxColumn(e)-1:t-1;return Iy(i,n)}class QQ{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new yO(e,t,++this._order);return this._entries.push(i),this._resolved=null,je(()=>{for(let n=0;ne.configuration)))}}function p8(o){let e={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const t of o)e={comments:t.comments||e.comments,brackets:t.brackets||e.brackets,wordPattern:t.wordPattern||e.wordPattern,indentationRules:t.indentationRules||e.indentationRules,onEnterRules:t.onEnterRules||e.onEnterRules,autoClosingPairs:t.autoClosingPairs||e.autoClosingPairs,surroundingPairs:t.surroundingPairs||e.surroundingPairs,autoCloseBefore:t.autoCloseBefore||e.autoCloseBefore,folding:t.folding||e.folding,colorizedBracketPairs:t.colorizedBracketPairs||e.colorizedBracketPairs,__electricCharacterSupport:t.__electricCharacterSupport||e.__electricCharacterSupport};return e}class yO{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class LO{constructor(e){this.languageId=e}}class JQ extends q{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new W),this.onDidChange=this._onDidChange.event,this._register(this.register(Ko,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new QQ(e),this._entries.set(e,n));const s=n.register(t,i);return this._onDidChange.fire(new LO(e)),je(()=>{s.dispose(),this._onDidChange.fire(new LO(e))})}getLanguageConfiguration(e){const t=this._entries.get(e);return(t==null?void 0:t.getResolvedConfiguration())||null}}class tp{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new Df(this.underlyingConfig):null,this.comments=tp._handleComments(this.underlyingConfig),this.characterPair=new kp(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||J2,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new AQ(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new KQ(e,this.underlyingConfig)}getWordDefinition(){return eM(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new xQ(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new MQ(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new vQ(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){const[n,s]=t.blockComment;i.blockCommentStartToken=n,i.blockCommentEndToken=s}return i}}xt(si,$I,1);class dc{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}class DO{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i0||this.m_modifiedCount>0)&&this.m_changes.push(new dc(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class rl{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,s,r]=rl._getElements(e),[a,l,d]=rl._getElements(t);this._hasStrings=r&&d,this._originalStringElements=n,this._originalElementsOrHash=s,this._modifiedStringElements=a,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const t=e.getElements();if(rl._isStringArray(t)){const i=new Int32Array(t.length);for(let n=0,s=t.length;n=e&&n>=i&&this.ElementsAreEqual(t,n);)t--,n--;if(e>t||i>n){let u;return i<=n?(Yg.Assert(e===t+1,"originalStart should only be one more than originalEnd"),u=[new dc(e,0,i,n-i+1)]):e<=t?(Yg.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),u=[new dc(e,t-e+1,i,0)]):(Yg.Assert(e===t+1,"originalStart should only be one more than originalEnd"),Yg.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u}const r=[0],a=[0],l=this.ComputeRecursionPoint(e,t,i,n,r,a,s),d=r[0],c=a[0];if(l!==null)return l;if(!s[0]){const u=this.ComputeDiffRecursive(e,d,i,c,s);let h=[];return s[0]?h=[new dc(d+1,t-(d+1)+1,c+1,n-(c+1)+1)]:h=this.ComputeDiffRecursive(d+1,t,c+1,n,s),this.ConcatenateChanges(u,h)}return[new dc(e,t-e+1,i,n-i+1)]}WALKTRACE(e,t,i,n,s,r,a,l,d,c,u,h,g,f,m,v,_,b){let C=null,w=null,S=new xO,x=t,y=i,I=g[0]-v[0]-n,E=-1073741824,R=this.m_forwardHistory.length-1;do{const j=I+e;j===x||j=0&&(d=this.m_forwardHistory[R],e=d[0],x=1,y=d.length-1)}while(--R>=-1);if(C=S.getReverseChanges(),b[0]){let j=g[0]+1,O=v[0]+1;if(C!==null&&C.length>0){const $=C[C.length-1];j=Math.max(j,$.getOriginalEnd()),O=Math.max(O,$.getModifiedEnd())}w=[new dc(j,h-j+1,O,m-O+1)]}else{S=new xO,x=r,y=a,I=g[0]-v[0]-l,E=1073741824,R=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const j=I+s;j===x||j=c[j+1]?(u=c[j+1]-1,f=u-I-l,u>E&&S.MarkNextChange(),E=u+1,S.AddOriginalElement(u+1,f+1),I=j+1-s):(u=c[j-1],f=u-I-l,u>E&&S.MarkNextChange(),E=u,S.AddModifiedElement(u+1,f+1),I=j-1-s),R>=0&&(c=this.m_reverseHistory[R],s=c[0],x=1,y=c.length-1)}while(--R>=-1);w=S.getChanges()}return this.ConcatenateChanges(C,w)}ComputeRecursionPoint(e,t,i,n,s,r,a){let l=0,d=0,c=0,u=0,h=0,g=0;e--,i--,s[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const f=t-e+(n-i),m=f+1,v=new Int32Array(m),_=new Int32Array(m),b=n-i,C=t-e,w=e-i,S=t-n,y=(C-b)%2===0;v[b]=e,_[C]=t,a[0]=!1;for(let I=1;I<=f/2+1;I++){let E=0,R=0;c=this.ClipDiagonalBound(b-I,I,b,m),u=this.ClipDiagonalBound(b+I,I,b,m);for(let O=c;O<=u;O+=2){O===c||OE+R&&(E=l,R=d),!y&&Math.abs(O-C)<=I-1&&l>=_[O])return s[0]=l,r[0]=d,$<=_[O]&&I<=1448?this.WALKTRACE(b,c,u,w,C,h,g,S,v,_,l,t,s,d,n,r,y,a):null}const j=(E-e+(R-i)-I)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(E,j))return a[0]=!0,s[0]=E,r[0]=R,j>0&&I<=1448?this.WALKTRACE(b,c,u,w,C,h,g,S,v,_,l,t,s,d,n,r,y,a):(e++,i++,[new dc(e,t-e+1,i,n-i+1)]);h=this.ClipDiagonalBound(C-I,I,C,m),g=this.ClipDiagonalBound(C+I,I,C,m);for(let O=h;O<=g;O+=2){O===h||O=_[O+1]?l=_[O+1]-1:l=_[O-1],d=l-(O-C)-S;const $=l;for(;l>e&&d>i&&this.ElementsAreEqual(l,d);)l--,d--;if(_[O]=l,y&&Math.abs(O-b)<=I&&l<=v[O])return s[0]=l,r[0]=d,$>=v[O]&&I<=1448?this.WALKTRACE(b,c,u,w,C,h,g,S,v,_,l,t,s,d,n,r,y,a):null}if(I<=1447){let O=new Int32Array(u-c+2);O[0]=b-c+1,Xg.Copy2(v,c,O,1,u-c+1),this.m_forwardHistory.push(O),O=new Int32Array(g-h+2),O[0]=C-h+1,Xg.Copy2(_,h,O,1,g-h+1),this.m_reverseHistory.push(O)}}return this.WALKTRACE(b,c,u,w,C,h,g,S,v,_,l,t,s,d,n,r,y,a)}PrettifyChanges(e){for(let t=0;t0,a=i.modifiedLength>0;for(;i.originalStart+i.originalLength=0;t--){const i=e[t];let n=0,s=0;if(t>0){const u=e[t-1];n=u.originalStart+u.originalLength,s=u.modifiedStart+u.modifiedLength}const r=i.originalLength>0,a=i.modifiedLength>0;let l=0,d=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let u=1;;u++){const h=i.originalStart-u,g=i.modifiedStart-u;if(hd&&(d=m,l=u)}i.originalStart-=l,i.modifiedStart-=l;const c=[null];if(t>0&&this.ChangesOverlap(e[t-1],e[t],c)){e[t-1]=c[0],e.splice(t,1),t++;continue}}if(this._hasStrings)for(let t=1,i=e.length;t0&&g>l&&(l=g,d=u,c=h)}return l>0?[d,c]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){const s=this._OriginalRegionIsBoundary(e,t)?1:0,r=this._ModifiedRegionIsBoundary(i,n)?1:0;return s+r}ConcatenateChanges(e,t){const i=[];if(e.length===0||t.length===0)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return Xg.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],Xg.Copy(t,1,n,e.length,t.length-1),n}else{const n=new Array(e.length+t.length);return Xg.Copy(e,0,n,0,e.length),Xg.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,i){if(Yg.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),Yg.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const n=e.originalStart;let s=e.originalLength;const r=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new dc(n,s,r,a),!0}else return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e255?255:o|0}function Qg(o){return o<0?0:o>4294967295?4294967295:o|0}class tJ{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=Qg(e);const i=this.values,n=this.prefixSum,s=t.length;return s===0?!1:(this.values=new Uint32Array(i.length+s),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+s),this.values.set(t,e),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=Qg(e),t=Qg(t),this.values[e]===t?!1:(this.values[e]=t,e-1=i.length)return!1;const s=i.length-e;return t>=s&&(t=s),t===0?!1:(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Qg(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,i=this.values.length-1,n=0,s=0,r=0;for(;t<=i;)if(n=t+(i-t)/2|0,s=this.prefixSum[n],r=s-this.values[n],e=s)t=n+1;else break;return new m8(n,e-r)}}class iJ{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),e===0?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],i=t>0?this._prefixSum[t-1]:0;return new m8(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=oy(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=n+i;for(let s=0;s=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class Cw{constructor(){this._actual=new _m(0)}add(e){this._actual.set(e,1)}has(e){return this._actual.get(e)===1}clear(){return this._actual.clear()}}class sJ{constructor(e,t,i){const n=new Uint8Array(e*t);for(let s=0,r=e*t;st&&(t=l),a>i&&(i=a),d>i&&(i=d)}t++,i++;const n=new sJ(i,t,0);for(let s=0,r=e.length;s=this._maxCharCode?0:this._states.get(e,t)}}let QD=null;function rJ(){return QD===null&&(QD=new oJ([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),QD}let zm=null;function aJ(){if(zm===null){zm=new _m(0);const o=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let t=0;tn);if(n>0){const a=t.charCodeAt(n-1),l=t.charCodeAt(r);(a===40&&l===41||a===91&&l===93||a===123&&l===125)&&r--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:r+2},url:t.substring(n,r+1)}}static computeLinks(e,t=rJ()){const i=aJ(),n=[];for(let s=1,r=e.getLineCount();s<=r;s++){const a=e.getLineContent(s),l=a.length;let d=0,c=0,u=0,h=1,g=!1,f=!1,m=!1,v=!1;for(;d=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}jI.INSTANCE=new jI;class dJ extends _m{constructor(e){super(0);for(let t=0,i=e.length;t(e.hasOwnProperty(t)||(e[t]=o(t)),e[t])}const _r=cJ(o=>new dJ(o));var Go;(function(o){o[o.Left=1]="Left",o[o.Center=2]="Center",o[o.Right=4]="Right",o[o.Full=7]="Full"})(Go||(Go={}));var Wh;(function(o){o[o.Left=1]="Left",o[o.Right=2]="Right"})(Wh||(Wh={}));var uo;(function(o){o[o.Inline=1]="Inline",o[o.Gutter=2]="Gutter"})(uo||(uo={}));var Sa;(function(o){o[o.Both=0]="Both",o[o.Right=1]="Right",o[o.Left=2]="Left",o[o.None=3]="None"})(Sa||(Sa={}));class b1{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,e.tabSize|0),e.indentSize==="tabSize"?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,e.indentSize|0),this._indentSizeIsTabSize=!1),this.insertSpaces=!!e.insertSpaces,this.defaultEOL=e.defaultEOL|0,this.trimAutoWhitespace=!!e.trimAutoWhitespace,this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&Uo(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class Ev{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function uJ(o){return o&&typeof o.read=="function"}class JD{constructor(e,t,i,n,s,r){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=s,this._isTracked=r}}class hJ{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}class gJ{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}function fJ(o){return!o.isTooLargeForSyncing()&&!o.isForSimpleWidget}const pJ=999;class dh{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(this.searchString==="")return null;let e;this.isRegex?e=mJ(this.searchString):e=this.searchString.indexOf(` -`)>=0;let t=null;try{t=f7(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new hJ(t,this.wordSeparators?_r(this.wordSeparators):null,i?this.searchString:null)}}function mJ(o){if(!o||o.length===0)return!1;for(let e=0,t=o.length;e=t)break;const n=o.charCodeAt(e);if(n===110||n===114||n===87)return!0}}return!1}function _h(o,e,t){if(!t)return new Ev(o,null);const i=[];for(let n=0,s=e.length;n>0);t[s]>=e?n=s-1:t[s+1]>=e?(i=s,n=s):i=s+1}return i+1}}class J0{static findMatches(e,t,i,n,s){const r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,i,new xf(r.wordSeparators,r.regex),n,s):this._doFindMatchesLineByLine(e,i,r,n,s):[]}static _getMultilineMatchRange(e,t,i,n,s,r){let a,l=0;n?(l=n.findLineFeedCountBeforeOffset(s),a=t+s+l):a=t+s;let d;if(n){const g=n.findLineFeedCountBeforeOffset(s+r.length)-l;d=a+r.length+g}else d=a+r.length;const c=e.getPositionAt(a),u=e.getPositionAt(d);return new k(c.lineNumber,c.column,u.lineNumber,u.column)}static _doFindMatchesMultiline(e,t,i,n,s){const r=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l=e.getEOL()===`\r + `;const gO=typeof Buffer<"u";let qD;class Ey{static wrap(e){return gO&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new Ey(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return gO?this.buffer.toString():(qD||(qD=new TextDecoder),qD.decode(this.buffer))}}function LQ(o,e){return o[e+0]<<0>>>0|o[e+1]<<8>>>0}function DQ(o,e,t){o[t+0]=e&255,e=e>>>8,o[t+1]=e&255}function aa(o,e){return o[e]*2**24+o[e+1]*2**16+o[e+2]*2**8+o[e+3]}function la(o,e,t){o[t+3]=e,e=e>>>8,o[t+2]=e,e=e>>>8,o[t+1]=e,e=e>>>8,o[t]=e}function fO(o,e){return o[e]}function pO(o,e,t){o[t]=e}let GD;function o7(){return GD||(GD=new TextDecoder("UTF-16LE")),GD}let ZD;function xQ(){return ZD||(ZD=new TextDecoder("UTF-16BE")),ZD}let YD;function r7(){return YD||(YD=j9()?o7():xQ()),YD}function kQ(o,e,t){const i=new Uint16Array(o.buffer,e,t);return t>0&&(i[0]===65279||i[0]===65534)?IQ(o,e,t):o7().decode(i)}function IQ(o,e,t){const i=[];let n=0;for(let s=0;s=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let i=0;i[r[0].toLowerCase(),r[1].toLowerCase()]);const t=[];for(let r=0;r{const[l,d]=r,[c,u]=a;return l===c||l===u||d===c||d===u},n=(r,a)=>{const l=Math.min(r,a),d=Math.max(r,a);for(let c=0;c0&&s.push({open:a,close:l})}return s}class NQ{constructor(e,t){this._richEditBracketsBrand=void 0;const i=EQ(t);this.brackets=i.map((n,s)=>new _w(e,s,n.open,n.close,TQ(n.open,n.close,i,s),MQ(n.open,n.close,i,s))),this.forwardRegex=AQ(this.brackets),this.reversedRegex=RQ(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const n of this.brackets){for(const s of n.open)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,s.length);for(const s of n.close)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,s.length)}}}function a7(o,e,t,i){for(let n=0,s=e.length;n=0&&i.push(a);for(const a of r.close)a.indexOf(o)>=0&&i.push(a)}}function l7(o,e){return o.length-e.length}function Ny(o){if(o.length<=1)return o;const e=[],t=new Set;for(const i of o)t.has(i)||(e.push(i),t.add(i));return e}function TQ(o,e,t,i){let n=[];n=n.concat(o),n=n.concat(e);for(let s=0,r=n.length;s=0;r--)n[s++]=i.charCodeAt(r);return r7().decode(n)}let e=null,t=null;return function(n){return e!==n&&(e=n,t=o(e)),t}}();class Nr{static _findPrevBracketInText(e,t,i,n){const s=i.match(e);if(!s)return null;const r=i.length-(s.index||0),a=s[0].length,l=n+r;return new k(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,s){const a=NM(i).substring(i.length-s,i.length-n);return this._findPrevBracketInText(e,t,a,n)}static findNextBracketInText(e,t,i,n){const s=i.match(e);if(!s)return null;const r=s.index||0,a=s[0].length;if(a===0)return null;const l=n+r;return new k(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,s){const r=i.substring(n,s);return this.findNextBracketInText(e,t,r,n)}}class OQ{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const n=i.charAt(i.length-1);e.push(n)}return iu(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const n=t.findTokenIndexAtOffset(i-1);if(Za(t.getStandardTokenType(n)))return null;const s=this._richEditBrackets.reversedRegex,r=t.getLineContent().substring(0,i-1)+e,a=Nr.findPrevBracketInRange(s,1,r,0,r.length);if(!a)return null;const l=r.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[l])return null;const c=t.getActualLineContentBefore(a.startColumn-1);return/^\s*$/.test(c)?{matchOpenBracket:l}:null}}function X0(o){return o.global&&(o.lastIndex=0),!0}class FQ{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&X0(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&X0(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&X0(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&X0(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}class Df{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(t=>{const i=Df._createOpenBracketRegExp(t[0]),n=Df._createCloseBracketRegExp(t[1]);i&&n&&this._brackets.push({open:t[0],openRegExp:i,close:t[1],closeRegExp:n})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let s=0,r=this._regExpRules.length;sd.reg?(d.reg.lastIndex=0,d.reg.test(d.text)):!0))return a.action}if(e>=2&&i.length>0&&n.length>0)for(let s=0,r=this._brackets.length;s=2&&i.length>0){for(let s=0,r=this._brackets.length;s"u"?t:s}function WQ(o){return o.replace(/[\[\]]/g,"")}const bi=bt("languageService");class tl{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}const u7=[];function xt(o,e,t){e instanceof tl||(e=new tl(e,[],!!t)),u7.push([o,e])}function _O(){return u7}const qi=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"}),My={JSONContribution:"base.contributions.json"};function VQ(o){return o.length>0&&o.charAt(o.length-1)==="#"?o.substring(0,o.length-1):o}class HQ{constructor(){this._onDidChangeSchema=new W,this.schemasById={}}registerSchema(e,t){this.schemasById[VQ(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const zQ=new HQ;xi.add(My.JSONContribution,zQ);const Va={Configuration:"base.contributions.configuration"},Q0="vscode://schemas/settings/resourceLanguage",vO=xi.as(My.JSONContribution);class $Q{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new W,this._onDidUpdateConfiguration=new W,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:p("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},vO.registerSchema(Q0,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=new Set;this.doRegisterConfigurations(e,t,i),vO.registerSchema(Q0,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){var i;const n=[];for(const{overrides:s,source:r}of e)for(const a in s)if(t.add(a),cu.test(a)){const l=this.configurationDefaultsOverrides.get(a),d=(i=l==null?void 0:l.valuesSources)!==null&&i!==void 0?i:new Map;if(r)for(const g of Object.keys(s[a]))d.set(g,r);const c={...(l==null?void 0:l.value)||{},...s[a]};this.configurationDefaultsOverrides.set(a,{source:r,value:c,valuesSources:d});const u=WQ(a),h={type:"object",default:c,description:p("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",u),$ref:Q0,defaultDefaultValue:c,source:As(r)?void 0:r,defaultValueSource:r};n.push(...vw(a)),this.configurationProperties[a]=h,this.defaultLanguageConfigurationOverridesNode.properties[a]=h}else{this.configurationDefaultsOverrides.set(a,{value:s[a],source:r});const l=this.configurationProperties[a];l&&(this.updatePropertyDefaultValue(a,l),this.updateSchema(a,l))}this.doRegisterOverrideIdentifiers(n)}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,i){e.forEach(n=>{this.validateAndRegisterProperties(n,t,n.extensionInfo,n.restrictedProperties,void 0,i),this.configurationContributors.push(n),this.registerJSONConfiguration(n)})}validateAndRegisterProperties(e,t=!0,i,n,s=3,r){var a;s=Ro(e.scope)?s:e.scope;const l=e.properties;if(l)for(const c in l){const u=l[c];if(t&&KQ(c,u)){delete l[c];continue}if(u.source=i,u.defaultDefaultValue=l[c].default,this.updatePropertyDefaultValue(c,u),cu.test(c)?u.scope=void 0:(u.scope=Ro(u.scope)?s:u.scope,u.restricted=Ro(u.restricted)?!!(n!=null&&n.includes(c)):u.restricted),l[c].hasOwnProperty("included")&&!l[c].included){this.excludedConfigurationProperties[c]=l[c],delete l[c];continue}else this.configurationProperties[c]=l[c],!((a=l[c].policy)===null||a===void 0)&&a.name&&this.policyConfigurations.set(l[c].policy.name,c);!l[c].deprecationMessage&&l[c].markdownDeprecationMessage&&(l[c].deprecationMessage=l[c].markdownDeprecationMessage),r.add(c)}const d=e.allOf;if(d)for(const c of d)this.validateAndRegisterProperties(c,t,i,n,s,r)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=i=>{const n=i.properties;if(n)for(const r in n)this.updateSchema(r,n[r]);const s=i.allOf;s==null||s.forEach(t)};t(e)}updateSchema(e,t){switch(t.scope){case 1:break;case 2:break;case 6:break;case 3:break;case 4:break;case 5:this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:p("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:p("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:Q0};this.updatePropertyDefaultValue(t,i)}}registerOverridePropertyPatternKey(){p("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),p("overrideSettings.errorMessage","This setting does not support per-language configuration."),this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const i=this.configurationDefaultsOverrides.get(e);let n=i==null?void 0:i.value,s=i==null?void 0:i.source;ro(n)&&(n=t.defaultDefaultValue,s=void 0),ro(n)&&(n=jQ(t.type)),t.default=n,t.defaultValueSource=s}}const h7="\\[([^\\]]+)\\]",bO=new RegExp(h7,"g"),UQ=`^(${h7})+$`,cu=new RegExp(UQ);function vw(o){const e=[];if(cu.test(o)){let t=bO.exec(o);for(;t!=null&&t.length;){const i=t[1].trim();i&&e.push(i),t=bO.exec(o)}}return iu(e)}function jQ(o){switch(Array.isArray(o)?o[0]:o){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const v1=new $Q;xi.add(Va.Configuration,v1);function KQ(o,e){var t,i,n,s;return o.trim()?cu.test(o)?p("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",o):v1.getConfigurationProperties()[o]!==void 0?p("config.property.duplicate","Cannot register '{0}'. This property is already registered.",o):!((t=e.policy)===null||t===void 0)&&t.name&&v1.getPolicyConfigurations().get((i=e.policy)===null||i===void 0?void 0:i.name)!==void 0?p("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",o,(n=e.policy)===null||n===void 0?void 0:n.name,v1.getPolicyConfigurations().get((s=e.policy)===null||s===void 0?void 0:s.name)):null:p("config.property.empty","Cannot register an empty property")}const qQ={ModesRegistry:"editor.modesRegistry"};class GQ{constructor(){this._onDidChangeLanguages=new W,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t{const l=new Set;return{info:new XQ(this,a,l),closing:l}}),s=new HP(a=>{const l=new Set,d=new Set;return{info:new QQ(this,a,l,d),opening:l,openingColorized:d}});for(const[a,l]of i){const d=n.get(a),c=s.get(l);d.closing.add(c.info),c.opening.add(d.info)}const r=t.colorizedBracketPairs?CO(t.colorizedBracketPairs):i.filter(a=>!(a[0]==="<"&&a[1]===">"));for(const[a,l]of r){const d=n.get(a),c=s.get(l);d.closing.add(c.info),c.openingColorized.add(d.info),c.opening.add(d.info)}this._openingBrackets=new Map([...n.cachedValues].map(([a,l])=>[a,l.info])),this._closingBrackets=new Map([...s.cachedValues].map(([a,l])=>[a,l.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}}function CO(o){return o.filter(([e,t])=>e!==""&&t!=="")}class g7{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class XQ extends g7{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class QQ extends g7{constructor(e,t,i,n){super(e,t),this.openingBrackets=i,this.openingColorizedBrackets=n,this.isOpeningBracket=!1}closes(e){return e.config!==this.config?!1:this.openingBrackets.has(e)}closesColorized(e){return e.config!==this.config?!1:this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var JQ=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wO=function(o,e){return function(t,i){e(t,i,o)}};class XD{constructor(e){this.languageId=e}affects(e){return this.languageId?this.languageId===e:!0}}const si=bt("languageConfigurationService");let $I=class extends q{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new nJ),this.onDidChangeEmitter=this._register(new W),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(UI));this._register(this.configurationService.onDidChangeConfiguration(n=>{const s=n.change.keys.some(a=>i.has(a)),r=n.change.overrides.filter(([a,l])=>l.some(d=>i.has(d))).map(([a])=>a);if(s)this.configurations.clear(),this.onDidChangeEmitter.fire(new XD(void 0));else for(const a of r)this.languageService.isRegisteredLanguageId(a)&&(this.configurations.delete(a),this.onDidChangeEmitter.fire(new XD(a)))})),this._register(this._registry.onDidChange(n=>{this.configurations.delete(n.languageId),this.onDidChangeEmitter.fire(new XD(n.languageId))}))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=eJ(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};$I=JQ([wO(0,Dt),wO(1,bi)],$I);function eJ(o,e,t,i){let n=e.getLanguageConfiguration(o);if(!n){if(!i.isRegisteredLanguageId(o))return new tp(o,{});n=new tp(o,{})}const s=tJ(n.languageId,t),r=p7([n.underlyingConfig,s]);return new tp(n.languageId,r)}const UI={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function tJ(o,e){const t=e.getValue(UI.brackets,{overrideIdentifier:o}),i=e.getValue(UI.colorizedBracketPairs,{overrideIdentifier:o});return{brackets:SO(t),colorizedBracketPairs:SO(i)}}function SO(o){if(Array.isArray(o))return o.map(e=>{if(!(!Array.isArray(e)||e.length!==2))return[e[0],e[1]]}).filter(e=>!!e)}function f7(o,e,t){const i=o.getLineContent(e);let n=ii(i);return n.length>t-1&&(n=n.substring(0,t-1)),n}function ep(o,e,t){o.tokenization.forceTokenization(e);const i=o.tokenization.getLineTokens(e),n=typeof t>"u"?o.getLineMaxColumn(e)-1:t-1;return Iy(i,n)}class iJ{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new yO(e,t,++this._order);return this._entries.push(i),this._resolved=null,je(()=>{for(let n=0;ne.configuration)))}}function p7(o){let e={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const t of o)e={comments:t.comments||e.comments,brackets:t.brackets||e.brackets,wordPattern:t.wordPattern||e.wordPattern,indentationRules:t.indentationRules||e.indentationRules,onEnterRules:t.onEnterRules||e.onEnterRules,autoClosingPairs:t.autoClosingPairs||e.autoClosingPairs,surroundingPairs:t.surroundingPairs||e.surroundingPairs,autoCloseBefore:t.autoCloseBefore||e.autoCloseBefore,folding:t.folding||e.folding,colorizedBracketPairs:t.colorizedBracketPairs||e.colorizedBracketPairs,__electricCharacterSupport:t.__electricCharacterSupport||e.__electricCharacterSupport};return e}class yO{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class LO{constructor(e){this.languageId=e}}class nJ extends q{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new W),this.onDidChange=this._onDidChange.event,this._register(this.register(Ko,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new iJ(e),this._entries.set(e,n));const s=n.register(t,i);return this._onDidChange.fire(new LO(e)),je(()=>{s.dispose(),this._onDidChange.fire(new LO(e))})}getLanguageConfiguration(e){const t=this._entries.get(e);return(t==null?void 0:t.getResolvedConfiguration())||null}}class tp{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new Df(this.underlyingConfig):null,this.comments=tp._handleComments(this.underlyingConfig),this.characterPair=new kp(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||J2,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new FQ(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new YQ(e,this.underlyingConfig)}getWordDefinition(){return eM(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new NQ(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new OQ(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new SQ(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){const[n,s]=t.blockComment;i.blockCommentStartToken=n,i.blockCommentEndToken=s}return i}}xt(si,$I,1);class dc{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}class DO{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i0||this.m_modifiedCount>0)&&this.m_changes.push(new dc(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class rl{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,s,r]=rl._getElements(e),[a,l,d]=rl._getElements(t);this._hasStrings=r&&d,this._originalStringElements=n,this._originalElementsOrHash=s,this._modifiedStringElements=a,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const t=e.getElements();if(rl._isStringArray(t)){const i=new Int32Array(t.length);for(let n=0,s=t.length;n=e&&n>=i&&this.ElementsAreEqual(t,n);)t--,n--;if(e>t||i>n){let u;return i<=n?(Yg.Assert(e===t+1,"originalStart should only be one more than originalEnd"),u=[new dc(e,0,i,n-i+1)]):e<=t?(Yg.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),u=[new dc(e,t-e+1,i,0)]):(Yg.Assert(e===t+1,"originalStart should only be one more than originalEnd"),Yg.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u}const r=[0],a=[0],l=this.ComputeRecursionPoint(e,t,i,n,r,a,s),d=r[0],c=a[0];if(l!==null)return l;if(!s[0]){const u=this.ComputeDiffRecursive(e,d,i,c,s);let h=[];return s[0]?h=[new dc(d+1,t-(d+1)+1,c+1,n-(c+1)+1)]:h=this.ComputeDiffRecursive(d+1,t,c+1,n,s),this.ConcatenateChanges(u,h)}return[new dc(e,t-e+1,i,n-i+1)]}WALKTRACE(e,t,i,n,s,r,a,l,d,c,u,h,g,f,m,v,_,b){let C=null,w=null,S=new xO,x=t,y=i,I=g[0]-v[0]-n,E=-1073741824,R=this.m_forwardHistory.length-1;do{const j=I+e;j===x||j=0&&(d=this.m_forwardHistory[R],e=d[0],x=1,y=d.length-1)}while(--R>=-1);if(C=S.getReverseChanges(),b[0]){let j=g[0]+1,O=v[0]+1;if(C!==null&&C.length>0){const $=C[C.length-1];j=Math.max(j,$.getOriginalEnd()),O=Math.max(O,$.getModifiedEnd())}w=[new dc(j,h-j+1,O,m-O+1)]}else{S=new xO,x=r,y=a,I=g[0]-v[0]-l,E=1073741824,R=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const j=I+s;j===x||j=c[j+1]?(u=c[j+1]-1,f=u-I-l,u>E&&S.MarkNextChange(),E=u+1,S.AddOriginalElement(u+1,f+1),I=j+1-s):(u=c[j-1],f=u-I-l,u>E&&S.MarkNextChange(),E=u,S.AddModifiedElement(u+1,f+1),I=j-1-s),R>=0&&(c=this.m_reverseHistory[R],s=c[0],x=1,y=c.length-1)}while(--R>=-1);w=S.getChanges()}return this.ConcatenateChanges(C,w)}ComputeRecursionPoint(e,t,i,n,s,r,a){let l=0,d=0,c=0,u=0,h=0,g=0;e--,i--,s[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const f=t-e+(n-i),m=f+1,v=new Int32Array(m),_=new Int32Array(m),b=n-i,C=t-e,w=e-i,S=t-n,y=(C-b)%2===0;v[b]=e,_[C]=t,a[0]=!1;for(let I=1;I<=f/2+1;I++){let E=0,R=0;c=this.ClipDiagonalBound(b-I,I,b,m),u=this.ClipDiagonalBound(b+I,I,b,m);for(let O=c;O<=u;O+=2){O===c||OE+R&&(E=l,R=d),!y&&Math.abs(O-C)<=I-1&&l>=_[O])return s[0]=l,r[0]=d,$<=_[O]&&I<=1448?this.WALKTRACE(b,c,u,w,C,h,g,S,v,_,l,t,s,d,n,r,y,a):null}const j=(E-e+(R-i)-I)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(E,j))return a[0]=!0,s[0]=E,r[0]=R,j>0&&I<=1448?this.WALKTRACE(b,c,u,w,C,h,g,S,v,_,l,t,s,d,n,r,y,a):(e++,i++,[new dc(e,t-e+1,i,n-i+1)]);h=this.ClipDiagonalBound(C-I,I,C,m),g=this.ClipDiagonalBound(C+I,I,C,m);for(let O=h;O<=g;O+=2){O===h||O=_[O+1]?l=_[O+1]-1:l=_[O-1],d=l-(O-C)-S;const $=l;for(;l>e&&d>i&&this.ElementsAreEqual(l,d);)l--,d--;if(_[O]=l,y&&Math.abs(O-b)<=I&&l<=v[O])return s[0]=l,r[0]=d,$>=v[O]&&I<=1448?this.WALKTRACE(b,c,u,w,C,h,g,S,v,_,l,t,s,d,n,r,y,a):null}if(I<=1447){let O=new Int32Array(u-c+2);O[0]=b-c+1,Xg.Copy2(v,c,O,1,u-c+1),this.m_forwardHistory.push(O),O=new Int32Array(g-h+2),O[0]=C-h+1,Xg.Copy2(_,h,O,1,g-h+1),this.m_reverseHistory.push(O)}}return this.WALKTRACE(b,c,u,w,C,h,g,S,v,_,l,t,s,d,n,r,y,a)}PrettifyChanges(e){for(let t=0;t0,a=i.modifiedLength>0;for(;i.originalStart+i.originalLength=0;t--){const i=e[t];let n=0,s=0;if(t>0){const u=e[t-1];n=u.originalStart+u.originalLength,s=u.modifiedStart+u.modifiedLength}const r=i.originalLength>0,a=i.modifiedLength>0;let l=0,d=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let u=1;;u++){const h=i.originalStart-u,g=i.modifiedStart-u;if(hd&&(d=m,l=u)}i.originalStart-=l,i.modifiedStart-=l;const c=[null];if(t>0&&this.ChangesOverlap(e[t-1],e[t],c)){e[t-1]=c[0],e.splice(t,1),t++;continue}}if(this._hasStrings)for(let t=1,i=e.length;t0&&g>l&&(l=g,d=u,c=h)}return l>0?[d,c]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){const s=this._OriginalRegionIsBoundary(e,t)?1:0,r=this._ModifiedRegionIsBoundary(i,n)?1:0;return s+r}ConcatenateChanges(e,t){const i=[];if(e.length===0||t.length===0)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return Xg.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],Xg.Copy(t,1,n,e.length,t.length-1),n}else{const n=new Array(e.length+t.length);return Xg.Copy(e,0,n,0,e.length),Xg.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,i){if(Yg.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),Yg.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const n=e.originalStart;let s=e.originalLength;const r=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new dc(n,s,r,a),!0}else return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e255?255:o|0}function Qg(o){return o<0?0:o>4294967295?4294967295:o|0}class oJ{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=Qg(e);const i=this.values,n=this.prefixSum,s=t.length;return s===0?!1:(this.values=new Uint32Array(i.length+s),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+s),this.values.set(t,e),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=Qg(e),t=Qg(t),this.values[e]===t?!1:(this.values[e]=t,e-1=i.length)return!1;const s=i.length-e;return t>=s&&(t=s),t===0?!1:(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Qg(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,i=this.values.length-1,n=0,s=0,r=0;for(;t<=i;)if(n=t+(i-t)/2|0,s=this.prefixSum[n],r=s-this.values[n],e=s)t=n+1;else break;return new m7(n,e-r)}}class rJ{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),e===0?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],i=t>0?this._prefixSum[t-1]:0;return new m7(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=oy(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=n+i;for(let s=0;s=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class Cw{constructor(){this._actual=new _m(0)}add(e){this._actual.set(e,1)}has(e){return this._actual.get(e)===1}clear(){return this._actual.clear()}}class lJ{constructor(e,t,i){const n=new Uint8Array(e*t);for(let s=0,r=e*t;st&&(t=l),a>i&&(i=a),d>i&&(i=d)}t++,i++;const n=new lJ(i,t,0);for(let s=0,r=e.length;s=this._maxCharCode?0:this._states.get(e,t)}}let QD=null;function cJ(){return QD===null&&(QD=new dJ([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),QD}let zm=null;function uJ(){if(zm===null){zm=new _m(0);const o=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let t=0;tn);if(n>0){const a=t.charCodeAt(n-1),l=t.charCodeAt(r);(a===40&&l===41||a===91&&l===93||a===123&&l===125)&&r--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:r+2},url:t.substring(n,r+1)}}static computeLinks(e,t=cJ()){const i=uJ(),n=[];for(let s=1,r=e.getLineCount();s<=r;s++){const a=e.getLineContent(s),l=a.length;let d=0,c=0,u=0,h=1,g=!1,f=!1,m=!1,v=!1;for(;d=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}jI.INSTANCE=new jI;class gJ extends _m{constructor(e){super(0);for(let t=0,i=e.length;t(e.hasOwnProperty(t)||(e[t]=o(t)),e[t])}const _r=fJ(o=>new gJ(o));var Go;(function(o){o[o.Left=1]="Left",o[o.Center=2]="Center",o[o.Right=4]="Right",o[o.Full=7]="Full"})(Go||(Go={}));var Wh;(function(o){o[o.Left=1]="Left",o[o.Right=2]="Right"})(Wh||(Wh={}));var uo;(function(o){o[o.Inline=1]="Inline",o[o.Gutter=2]="Gutter"})(uo||(uo={}));var Sa;(function(o){o[o.Both=0]="Both",o[o.Right=1]="Right",o[o.Left=2]="Left",o[o.None=3]="None"})(Sa||(Sa={}));class b1{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,e.tabSize|0),e.indentSize==="tabSize"?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,e.indentSize|0),this._indentSizeIsTabSize=!1),this.insertSpaces=!!e.insertSpaces,this.defaultEOL=e.defaultEOL|0,this.trimAutoWhitespace=!!e.trimAutoWhitespace,this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&Uo(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class Ev{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function pJ(o){return o&&typeof o.read=="function"}class JD{constructor(e,t,i,n,s,r){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=s,this._isTracked=r}}class mJ{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}class _J{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}function vJ(o){return!o.isTooLargeForSyncing()&&!o.isForSimpleWidget}const bJ=999;class dh{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(this.searchString==="")return null;let e;this.isRegex?e=CJ(this.searchString):e=this.searchString.indexOf(` +`)>=0;let t=null;try{t=f8(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new mJ(t,this.wordSeparators?_r(this.wordSeparators):null,i?this.searchString:null)}}function CJ(o){if(!o||o.length===0)return!1;for(let e=0,t=o.length;e=t)break;const n=o.charCodeAt(e);if(n===110||n===114||n===87)return!0}}return!1}function _h(o,e,t){if(!t)return new Ev(o,null);const i=[];for(let n=0,s=e.length;n>0);t[s]>=e?n=s-1:t[s+1]>=e?(i=s,n=s):i=s+1}return i+1}}class J0{static findMatches(e,t,i,n,s){const r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,i,new xf(r.wordSeparators,r.regex),n,s):this._doFindMatchesLineByLine(e,i,r,n,s):[]}static _getMultilineMatchRange(e,t,i,n,s,r){let a,l=0;n?(l=n.findLineFeedCountBeforeOffset(s),a=t+s+l):a=t+s;let d;if(n){const g=n.findLineFeedCountBeforeOffset(s+r.length)-l;d=a+r.length+g}else d=a+r.length;const c=e.getPositionAt(a),u=e.getPositionAt(d);return new k(c.lineNumber,c.column,u.lineNumber,u.column)}static _doFindMatchesMultiline(e,t,i,n,s){const r=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l=e.getEOL()===`\r `?new kO(a):null,d=[];let c=0,u;for(i.reset(0);u=i.next(a);)if(d[c++]=_h(this._getMultilineMatchRange(e,r,a,l,u.index,u[0]),u,n),c>=s)return d;return d}static _doFindMatchesLineByLine(e,t,i,n,s){const r=[];let a=0;if(t.startLineNumber===t.endLineNumber){const d=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return a=this._findMatchesInLine(i,d,t.startLineNumber,t.startColumn-1,a,r,n,s),r}const l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);a=this._findMatchesInLine(i,l,t.startLineNumber,t.startColumn-1,a,r,n,s);for(let d=t.startLineNumber+1;d=l))return s;return s}const c=new xf(e.wordSeparators,e.regex);let u;c.reset(0);do if(u=c.next(t),u&&(r[s++]=_h(new k(i,u.index+1+n,i,u.index+1+u[0].length+n),u,a),s>=l))return s;while(u);return s}static findNextMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const r=new xf(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindNextMatchMultiline(e,i,r,n):this._doFindNextMatchLineByLine(e,i,r,n)}static _doFindNextMatchMultiline(e,t,i,n){const s=new z(t.lineNumber,1),r=e.getOffsetAt(s),a=e.getLineCount(),l=e.getValueInRange(new k(s.lineNumber,s.column,a,e.getLineMaxColumn(a)),1),d=e.getEOL()===`\r -`?new kO(l):null;i.reset(t.column-1);const c=i.next(l);return c?_h(this._getMultilineMatchRange(e,r,l,d,c.index,c[0]),c,n):t.lineNumber!==1||t.column!==1?this._doFindNextMatchMultiline(e,new z(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const s=e.getLineCount(),r=t.lineNumber,a=e.getLineContent(r),l=this._findFirstMatchInLine(i,a,r,t.column,n);if(l)return l;for(let d=1;d<=s;d++){const c=(r+d-1)%s,u=e.getLineContent(c+1),h=this._findFirstMatchInLine(i,u,c+1,1,n);if(h)return h}return null}static _findFirstMatchInLine(e,t,i,n,s){e.reset(n-1);const r=e.next(t);return r?_h(new k(i,r.index+1,i,r.index+1+r[0].length),r,s):null}static findPreviousMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const r=new xf(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindPreviousMatchMultiline(e,i,r,n):this._doFindPreviousMatchLineByLine(e,i,r,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const s=this._doFindMatchesMultiline(e,new k(1,1,t.lineNumber,t.column),i,n,10*pJ);if(s.length>0)return s[s.length-1];const r=e.getLineCount();return t.lineNumber!==r||t.column!==e.getLineMaxColumn(r)?this._doFindPreviousMatchMultiline(e,new z(r,e.getLineMaxColumn(r)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const s=e.getLineCount(),r=t.lineNumber,a=e.getLineContent(r).substring(0,t.column-1),l=this._findLastMatchInLine(i,a,r,n);if(l)return l;for(let d=1;d<=s;d++){const c=(s+r-d-1)%s,u=e.getLineContent(c+1),h=this._findLastMatchInLine(i,u,c+1,n);if(h)return h}return null}static _findLastMatchInLine(e,t,i,n){let s=null,r;for(e.reset(0);r=e.next(t);)s=_h(new k(i,r.index+1,i,r.index+1+r[0].length),r,n);return s}}function _J(o,e,t,i,n){if(i===0)return!0;const s=e.charCodeAt(i-1);if(o.get(s)!==0||s===13||s===10)return!0;if(n>0){const r=e.charCodeAt(i);if(o.get(r)!==0)return!0}return!1}function vJ(o,e,t,i,n){if(i+n===t)return!0;const s=e.charCodeAt(i+n);if(o.get(s)!==0||s===13||s===10)return!0;if(n>0){const r=e.charCodeAt(i+n-1);if(o.get(r)!==0)return!0}return!1}function TM(o,e,t,i,n){return _J(o,e,t,i,n)&&vJ(o,e,t,i,n)}class xf{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t||(i=this._searchRegex.exec(e),!i))return null;const n=i.index,s=i[0].length;if(n===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){uw(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=n,this._prevMatchLength=s,!this._wordSeparators||TM(this._wordSeparators,e,t,n,s))return i}while(i);return null}}class MM{static computeUnicodeHighlights(e,t,i){const n=i?i.startLineNumber:1,s=i?i.endLineNumber:e.getLineCount(),r=new IO(t),a=r.getCandidateCodePoints();let l;a==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${bJ(Array.from(a))}`,"g");const d=new xf(null,l),c=[];let u=!1,h,g=0,f=0,m=0;e:for(let v=n,_=s;v<=_;v++){const b=e.getLineContent(v),C=b.length;d.reset(0);do if(h=d.next(b),h){let w=h.index,S=h.index+h[0].length;if(w>0){const E=b.charCodeAt(w-1);bn(E)&&w--}if(S+1=1e3){u=!0;break e}c.push(new k(v,w+1,v,S+1))}}while(h)}return{ranges:c,hasMore:u,ambiguousCharacterCount:g,invisibleCharacterCount:f,nonBasicAsciiCharacterCount:m}}static computeUnicodeHighlightReason(e,t){const i=new IO(t);switch(i.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const s=e.codePointAt(0),r=i.ambiguousCharacters.getPrimaryConfusable(s),a=eg.getLocales().filter(l=>!eg.getInstance(new Set([...t.allowedLocales,l])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(r),notAmbiguousInLocales:a}}case 1:return{kind:2}}}}function bJ(o,e){return`[${qo(o.map(i=>String.fromCodePoint(i)).join(""))}]`}class IO{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=eg.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of Il.codePoints)EO(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,s=!1;if(t)for(const r of t){const a=r.codePointAt(0),l=Jb(r);n=n||l,!l&&!this.ambiguousCharacters.isAmbiguous(a)&&!Il.isInvisibleCharacter(a)&&(s=!0)}return!n&&s?0:this.options.invisibleCharacters&&!EO(e)&&Il.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function EO(o){return o===" "||o===` -`||o===" "}class C1{constructor(e,t,i){this.changes=e,this.moves=t,this.hitTimeout=i}}class _8{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}class ut{static addRange(e,t){let i=0;for(;it))return new ut(e,t)}static ofLength(e){return new ut(0,e)}static ofStartAndLength(e,t){return new ut(e,e+t)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new Ci(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new ut(this.start+e,this.endExclusive+e)}deltaStart(e){return new ut(this.start+e,this.endExclusive)}deltaEnd(e){return new ut(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new Ci(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new Ci(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;te.toString()).join(", ")}intersectsStrict(e){let t=0;for(;te+t.length,0)}}function Nv(o,e,t){const i=CJ(o,e);if(i!==-1)return o[i]}function CJ(o,e,t=o.length-1){for(let i=t;i>=0;i--){const n=o[i];if(e(n))return i}return-1}function Ep(o,e){const t=Tv(o,e);return t===-1?void 0:o[t]}function Tv(o,e,t=0,i=o.length){let n=t,s=i;for(;n0&&(t=n)}return t}function SJ(o,e){if(o.length===0)return;let t=o[0];for(let i=1;i=0&&(t=n)}return t}function yJ(o,e){return RM(o,(t,i)=>-e(t,i))}function LJ(o,e){if(o.length===0)return-1;let t=0;for(let i=1;i0&&(t=i)}return t}function DJ(o,e){for(const t of o){const i=e(t);if(i!==void 0)return i}}let yt=class rd{static fromRange(e){return new rd(e.startLineNumber,e.endLineNumber)}static fromRangeInclusive(e){return new rd(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(e.length===0)return[];let t=new va(e[0].slice());for(let i=1;it)throw new Ci(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&en.endLineNumberExclusive>=e.startLineNumber),i=Tv(this._normalizedRanges,n=>n.startLineNumber<=e.endLineNumberExclusive)+1;if(t===i)this._normalizedRanges.splice(t,0,e);else if(t===i-1){const n=this._normalizedRanges[t];this._normalizedRanges[t]=n.join(e)}else{const n=this._normalizedRanges[t].join(this._normalizedRanges[i-1]).join(e);this._normalizedRanges.splice(t,i-t,n)}}contains(e){const t=Ep(this._normalizedRanges,i=>i.startLineNumber<=e);return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=Ep(this._normalizedRanges,i=>i.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;const t=[];let i=0,n=0,s=null;for(;i=r.startLineNumber?s=new yt(s.startLineNumber,Math.max(s.endLineNumberExclusive,r.endLineNumberExclusive)):(t.push(s),s=r)}return s!==null&&t.push(s),new va(t)}subtractFrom(e){const t=Mv(this._normalizedRanges,r=>r.endLineNumberExclusive>=e.startLineNumber),i=Tv(this._normalizedRanges,r=>r.startLineNumber<=e.endLineNumberExclusive)+1;if(t===i)return new va([e]);const n=[];let s=e.startLineNumber;for(let r=t;rs&&n.push(new yt(s,a.startLineNumber)),s=a.endLineNumberExclusive}return se.toString()).join(", ")}getIntersection(e){const t=[];let i=0,n=0;for(;it.delta(e)))}}class Ol{static inverse(e,t,i){const n=[];let s=1,r=1;for(const l of e){const d=new vr(new yt(s,l.original.startLineNumber),new yt(r,l.modified.startLineNumber),void 0);d.modified.isEmpty||n.push(d),s=l.original.endLineNumberExclusive,r=l.modified.endLineNumberExclusive}const a=new vr(new yt(s,t+1),new yt(r,i+1),void 0);return a.modified.isEmpty||n.push(a),n}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new Ol(this.modified,this.original)}join(e){return new Ol(this.original.join(e.original),this.modified.join(e.modified))}}class vr extends Ol{constructor(e,t,i){super(e,t),this.innerChanges=i}flip(){var e;return new vr(this.modified,this.original,(e=this.innerChanges)===null||e===void 0?void 0:e.map(t=>t.flip()))}}class uu{constructor(e,t){this.originalRange=e,this.modifiedRange=t}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new uu(this.modifiedRange,this.originalRange)}}const xJ=3;class kJ{computeDiff(e,t,i){var n;const r=new NJ(e,t,{maxComputationTime:i.maxComputationTimeMs,shouldIgnoreTrimWhitespace:i.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),a=[];let l=null;for(const d of r.changes){let c;d.originalEndLineNumber===0?c=new yt(d.originalStartLineNumber+1,d.originalStartLineNumber+1):c=new yt(d.originalStartLineNumber,d.originalEndLineNumber+1);let u;d.modifiedEndLineNumber===0?u=new yt(d.modifiedStartLineNumber+1,d.modifiedStartLineNumber+1):u=new yt(d.modifiedStartLineNumber,d.modifiedEndLineNumber+1);let h=new vr(c,u,(n=d.charChanges)===null||n===void 0?void 0:n.map(g=>new uu(new k(g.originalStartLineNumber,g.originalStartColumn,g.originalEndLineNumber,g.originalEndColumn),new k(g.modifiedStartLineNumber,g.modifiedStartColumn,g.modifiedEndLineNumber,g.modifiedEndColumn))));l&&(l.modified.endLineNumberExclusive===h.modified.startLineNumber||l.original.endLineNumberExclusive===h.original.startLineNumber)&&(h=new vr(l.original.join(h.original),l.modified.join(h.modified),l.innerChanges&&h.innerChanges?l.innerChanges.concat(h.innerChanges):void 0),a.pop()),a.push(h),l=h}return Dv(()=>x7(a,(d,c)=>c.original.startLineNumber-d.original.endLineNumberExclusive===c.modified.startLineNumber-d.modified.endLineNumberExclusive&&d.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}}class ip{constructor(e,t,i,n,s,r,a,l){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=s,this.modifiedStartColumn=r,this.modifiedEndLineNumber=a,this.modifiedEndColumn=l}static createFromDiffChange(e,t,i){const n=t.getStartLineNumber(e.originalStart),s=t.getStartColumn(e.originalStart),r=t.getEndLineNumber(e.originalStart+e.originalLength-1),a=t.getEndColumn(e.originalStart+e.originalLength-1),l=i.getStartLineNumber(e.modifiedStart),d=i.getStartColumn(e.modifiedStart),c=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),u=i.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new ip(n,s,r,a,l,d,c,u)}}function EJ(o){if(o.length<=1)return o;const e=[o[0]];let t=e[0];for(let i=1,n=o.length;i0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&s()){const g=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),f=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(g.getElements().length>0&&f.getElements().length>0){let m=v8(g,f,s,!0).changes;a&&(m=EJ(m)),h=[];for(let v=0,_=m.length;v<_;v++)h.push(ip.createFromDiffChange(m[v],g,f))}}return new B_(l,d,c,u,h)}}class NJ{constructor(e,t,i){this.shouldComputeCharChanges=i.shouldComputeCharChanges,this.shouldPostProcessCharChanges=i.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=i.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=i.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new NO(e),this.modified=new NO(t),this.continueLineDiff=TO(i.maxComputationTime),this.continueCharDiff=TO(i.maxComputationTime===0?0:Math.min(i.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:void 0}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:void 0}]};const e=v8(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,i=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const a=[];for(let l=0,d=t.length;l1&&m>1;){const v=h.charCodeAt(f-2),_=g.charCodeAt(m-2);if(v!==_)break;f--,m--}(f>1||m>1)&&this._pushTrimWhitespaceCharChange(n,s+1,1,f,r+1,1,m)}{let f=qI(h,1),m=qI(g,1);const v=h.length+1,_=g.length+1;for(;f!0;const e=Date.now();return()=>Date.now()-e{i.push(Bn.fromOffsetPairs(n?n.getEndExclusives():fl.zero,s?s.getStarts():new fl(t,(n?n.seq2Range.endExclusive-n.seq1Range.endExclusive:0)+t)))}),i}static fromOffsetPairs(e,t){return new Bn(new ut(e.offset1,t.offset1),new ut(e.offset2,t.offset2))}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new Bn(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new Bn(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new Bn(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new Bn(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new Bn(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),i=this.seq2Range.intersect(e.seq2Range);if(!(!t||!i))return new Bn(t,i)}getStarts(){return new fl(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new fl(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class fl{constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}}fl.zero=new fl(0,0);fl.max=new fl(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);class Av{isValid(){return!0}}Av.instance=new Av;class TJ{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new Ci("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime0&&m>0&&r.get(f-1,m-1)===3&&(b+=a.get(f-1,m-1)),b+=n?n(f,m):1):b=-1;const C=Math.max(v,_,b);if(C===b){const w=f>0&&m>0?a.get(f-1,m-1):0;a.set(f,m,w+1),r.set(f,m,3)}else C===v?(a.set(f,m,0),r.set(f,m,1)):C===_&&(a.set(f,m,0),r.set(f,m,2));s.set(f,m,C)}const l=[];let d=e.length,c=t.length;function u(f,m){(f+1!==d||m+1!==c)&&l.push(new Bn(new ut(f+1,d),new ut(m+1,c))),d=f,c=m}let h=e.length-1,g=t.length-1;for(;h>=0&&g>=0;)r.get(h,g)===3?(u(h,g),h--,g--):r.get(h,g)===1?h--:g--;return u(-1,-1),l.reverse(),new Pd(l,!1)}}class b8{compute(e,t,i=Av.instance){if(e.length===0||t.length===0)return Pd.trivial(e,t);const n=e,s=t;function r(m,v){for(;mn.length||w>s.length)continue;const S=r(C,w);l.set(c,S);const x=C===_?d.get(c+1):d.get(c-1);if(d.set(c,S!==C?new MO(x,C,w,S-C):x),l.get(c)===n.length&&l.get(c)-c===s.length)break e}}let u=d.get(c);const h=[];let g=n.length,f=s.length;for(;;){const m=u?u.x+u.length:0,v=u?u.y+u.length:0;if((m!==g||v!==f)&&h.push(new Bn(new ut(m,g),new ut(v,f))),!u)break;g=u.x,f=u.y,u=u.prev}return h.reverse(),new Pd(h,!1)}}class MO{constructor(e,t,i,n){this.prev=e,this.x=t,this.y=i,this.length=n}}class AJ{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const i=this.negativeArr;this.negativeArr=new Int32Array(i.length*2),this.negativeArr.set(i)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const i=this.positiveArr;this.positiveArr=new Int32Array(i.length*2),this.positiveArr.set(i)}this.positiveArr[e]=t}}}class RJ{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}var AO,RO;class PJ{constructor(e,t){this.uri=e,this.value=t}}function OJ(o){return Array.isArray(o)}class Gi{constructor(e,t){if(this[AO]="ResourceMap",e instanceof Gi)this.map=new Map(e.map),this.toKey=t??Gi.defaultToKey;else if(OJ(e)){this.map=new Map,this.toKey=t??Gi.defaultToKey;for(const[i,n]of e)this.set(i,n)}else this.map=new Map,this.toKey=e??Gi.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new PJ(e,t)),this}get(e){var t;return(t=this.map.get(this.toKey(e)))===null||t===void 0?void 0:t.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){typeof t<"u"&&(e=e.bind(t));for(const[i,n]of this.map)e(n.value,n.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(AO=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}Gi.defaultToKey=o=>o.toString();class FJ{constructor(){this[RO]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return(e=this._head)===null||e===void 0?void 0:e.value}get last(){var e;return(e=this._tail)===null||e===void 0?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return t!==0&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,i!==0&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:this.addItemLast(n);break;case 1:this.addItemFirst(n);break;case 2:this.addItemLast(n);break;default:this.addItemLast(n);break}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:i.key,done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:i.value,done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:[i.key,i.value],done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}[(RO=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==1&&t!==2)){if(t===1){if(e===this._head)return;const i=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(i.previous=n,n.next=i),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===2){if(e===this._tail)return;const i=e.next,n=e.previous;e===this._head?(i.previous=void 0,this._head=i):(i.previous=n,n.next=i),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){const e=[];return this.forEach((t,i)=>{e.push([i,t])}),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class Pu extends FJ{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}class BJ{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,i]of e)this.set(t,i)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const t=this._m1.get(e);return t===void 0?!1:(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class PM{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),i.size===0&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}get(e){const t=this.map.get(e);return t||new Set}}class Sw{constructor(e,t,i){this.lines=e,this.considerWhitespaceChanges=i,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let n=!1;t.start>0&&t.endExclusive>=e.length&&(t=new ut(t.start-1,t.endExclusive),n=!0),this.lineRange=t,this.firstCharOffsetByLine[0]=0;for(let s=this.lineRange.start;sString.fromCharCode(t)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=OO(e>0?this.elements[e-1]:-1),i=OO(ei<=e);return new z(this.lineRange.start+t+1,e-this.firstCharOffsetByLine[t]+this.additionalOffsetByLine[t]+1)}translateRange(e){return k.fromPositions(this.translateOffset(e.start),this.translateOffset(e.endExclusive))}findWordContaining(e){if(e<0||e>=this.elements.length||!tx(this.elements[e]))return;let t=e;for(;t>0&&tx(this.elements[t-1]);)t--;let i=e;for(;ir<=e.start))!==null&&t!==void 0?t:0,s=(i=wJ(this.firstCharOffsetByLine,r=>e.endExclusive<=r))!==null&&i!==void 0?i:this.elements.length;return new ut(n,s)}}function tx(o){return o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57}const WJ={0:0,1:0,2:0,3:10,4:2,5:3,6:3,7:10,8:10};function PO(o){return WJ[o]}function OO(o){return o===10?8:o===13?7:GI(o)?6:o>=97&&o<=122?0:o>=65&&o<=90?1:o>=48&&o<=57?2:o===-1?3:o===44||o===59?5:4}function VJ(o,e,t,i,n,s){let{moves:r,excludedChanges:a}=zJ(o,e,t,s);if(!s.isValid())return[];const l=o.filter(c=>!a.has(c)),d=$J(l,i,n,e,t,s);return Ak(r,d),r=UJ(r),r=r.filter(c=>{const u=c.original.toOffsetRange().slice(e).map(g=>g.trim());return u.join(` -`).length>=15&&HJ(u,g=>g.length>=2)>=2}),r=jJ(o,r),r}function HJ(o,e){let t=0;for(const i of o)e(i)&&t++;return t}function zJ(o,e,t,i){const n=[],s=o.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new Np(l.original,e,l)),r=new Set(o.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new Np(l.modified,t,l))),a=new Set;for(const l of s){let d=-1,c;for(const u of r){const h=l.computeSimilarity(u);h>d&&(d=h,c=u)}if(d>.9&&c&&(r.delete(c),n.push(new Ol(l.range,c.range)),a.add(l.source),a.add(c.source)),!i.isValid())return{moves:n,excludedChanges:a}}return{moves:n,excludedChanges:a}}function $J(o,e,t,i,n,s){const r=[],a=new PM;for(const h of o)for(let g=h.original.startLineNumber;gh.modified.startLineNumber,Md));for(const h of o){let g=[];for(let f=h.modified.startLineNumber;f{for(const w of g)if(w.originalLineRange.endLineNumberExclusive+1===b.endLineNumberExclusive&&w.modifiedLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive){w.originalLineRange=new yt(w.originalLineRange.startLineNumber,b.endLineNumberExclusive),w.modifiedLineRange=new yt(w.modifiedLineRange.startLineNumber,v.endLineNumberExclusive),_.push(w);return}const C={modifiedLineRange:v,originalLineRange:b};l.push(C),_.push(C)}),g=_}if(!s.isValid())return[]}l.sort(F9(ur(h=>h.modifiedLineRange.length,Md)));const d=new va,c=new va;for(const h of l){const g=h.modifiedLineRange.startLineNumber-h.originalLineRange.startLineNumber,f=d.subtractFrom(h.modifiedLineRange),m=c.subtractFrom(h.originalLineRange).getWithDelta(g),v=f.getIntersection(m);for(const _ of v.ranges){if(_.length<3)continue;const b=_,C=_.delta(-g);r.push(new Ol(C,b)),d.addRange(b),c.addRange(C)}}r.sort(ur(h=>h.original.startLineNumber,Md));const u=new t0(o);for(let h=0;hx.original.startLineNumber<=g.original.startLineNumber),m=Ep(o,x=>x.modified.startLineNumber<=g.modified.startLineNumber),v=Math.max(g.original.startLineNumber-f.original.startLineNumber,g.modified.startLineNumber-m.modified.startLineNumber),_=u.findLastMonotonous(x=>x.original.startLineNumberx.modified.startLineNumberi.length||y>n.length||d.contains(y)||c.contains(x)||!FO(i[x-1],n[y-1],s))break}w>0&&(c.addRange(new yt(g.original.startLineNumber-w,g.original.startLineNumber)),d.addRange(new yt(g.modified.startLineNumber-w,g.modified.startLineNumber)));let S;for(S=0;Si.length||y>n.length||d.contains(y)||c.contains(x)||!FO(i[x-1],n[y-1],s))break}S>0&&(c.addRange(new yt(g.original.endLineNumberExclusive,g.original.endLineNumberExclusive+S)),d.addRange(new yt(g.modified.endLineNumberExclusive,g.modified.endLineNumberExclusive+S))),(w>0||S>0)&&(r[h]=new Ol(new yt(g.original.startLineNumber-w,g.original.endLineNumberExclusive+S),new yt(g.modified.startLineNumber-w,g.modified.endLineNumberExclusive+S)))}return r}function FO(o,e,t){if(o.trim()===e.trim())return!0;if(o.length>300&&e.length>300)return!1;const n=new b8().compute(new Sw([o],new ut(0,1),!1),new Sw([e],new ut(0,1),!1),t);let s=0;const r=Bn.invert(n.diffs,o.length);for(const c of r)c.seq1Range.forEach(u=>{GI(o.charCodeAt(u))||s++});function a(c){let u=0;for(let h=0;he.length?o:e);return s/l>.6&&l>10}function UJ(o){if(o.length===0)return o;o.sort(ur(t=>t.original.startLineNumber,Md));const e=[o[0]];for(let t=1;t=0&&r>=0&&s+r<=2){e[e.length-1]=i.join(n);continue}e.push(n)}return e}function jJ(o,e){const t=new t0(o);return e=e.filter(i=>{const n=t.findLastMonotonous(a=>a.original.startLineNumbera.modified.startLineNumber0&&(a=a.delta(d))}n.push(a)}return i.length>0&&n.push(i[i.length-1]),n}function KJ(o,e,t){if(!o.getBoundaryScore||!e.getBoundaryScore)return t;for(let i=0;i0?t[i-1]:void 0,s=t[i],r=i+1=i.start&&o.seq2Range.start-r>=n.start&&t.isStronglyEqual(o.seq2Range.start-r,o.seq2Range.endExclusive-r)&&r<100;)r++;r--;let a=0;for(;o.seq1Range.start+ad&&(d=f,l=c)}return o.delta(l)}function qJ(o,e,t){const i=[];for(const n of t){const s=i[i.length-1];if(!s){i.push(n);continue}n.seq1Range.start-s.seq1Range.endExclusive<=2||n.seq2Range.start-s.seq2Range.endExclusive<=2?i[i.length-1]=new Bn(s.seq1Range.join(n.seq1Range),s.seq2Range.join(n.seq2Range)):i.push(n)}return i}function GJ(o,e,t){const i=[];let n;function s(){if(!n)return;const a=n.s1Range.length-n.deleted;n.s2Range.length-n.added,Math.max(n.deleted,n.added)+(n.count-1)>a&&i.push(new Bn(n.s1Range,n.s2Range)),n=void 0}for(const a of t){let l=function(g,f){var m,v,_,b;if(!n||!n.s1Range.containsRange(g)||!n.s2Range.containsRange(f))if(n&&!(n.s1Range.endExclusive0||e.length>0;){const i=o[0],n=e[0];let s;i&&(!n||i.seq1Range.start0&&t[t.length-1].seq1Range.endExclusive>=s.seq1Range.start?t[t.length-1]=t[t.length-1].join(s):t.push(s)}return t}function YJ(o,e,t){let i=t;if(i.length===0)return i;let n=0,s;do{s=!1;const r=[i[0]];for(let a=1;a5||g.seq1Range.length+g.seq2Range.length>5)};const l=i[a],d=r[r.length-1];c(d,l)?(s=!0,r[r.length-1]=r[r.length-1].join(l)):r.push(l)}i=r}while(n++<10&&s);return i}function XJ(o,e,t){let i=t;if(i.length===0)return i;let n=0,s;do{s=!1;const a=[i[0]];for(let l=1;l5||m.length>500)return!1;const _=o.getText(m).trim();if(_.length>20||_.split(/\r\n|\r|\n/).length>1)return!1;const b=o.countLinesIn(g.seq1Range),C=g.seq1Range.length,w=e.countLinesIn(g.seq2Range),S=g.seq2Range.length,x=o.countLinesIn(f.seq1Range),y=f.seq1Range.length,I=e.countLinesIn(f.seq2Range),E=f.seq2Range.length,R=2*40+50;function j(O){return Math.min(O,R)}return Math.pow(Math.pow(j(b*40+C),1.5)+Math.pow(j(w*40+S),1.5),1.5)+Math.pow(Math.pow(j(x*40+y),1.5)+Math.pow(j(I*40+E),1.5),1.5)>(R**1.5)**1.5*1.3};const d=i[l],c=a[a.length-1];u(c,d)?(s=!0,a[a.length-1]=a[a.length-1].join(d)):a.push(d)}i=a}while(n++<10&&s);const r=[];return Jq(i,(a,l,d)=>{let c=l;function u(_){return _.length>0&&_.trim().length<=3&&l.seq1Range.length+l.seq2Range.length>100}const h=o.extendToFullLines(l.seq1Range),g=o.getText(new ut(h.start,l.seq1Range.start));u(g)&&(c=c.deltaStart(-g.length));const f=o.getText(new ut(l.seq1Range.endExclusive,h.endExclusive));u(f)&&(c=c.deltaEnd(f.length));const m=Bn.fromOffsetPairs(a?a.getEndExclusives():fl.zero,d?d.getStarts():fl.max),v=c.intersect(m);r.push(v)}),r}class VO{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const t=e===0?0:HO(this.lines[e-1]),i=e===this.lines.length?0:HO(this.lines[e]);return 1e3-(t+i)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` -`)}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function HO(o){let e=0;for(;eS===x))return new C1([],[],!1);if(e.length===1&&e[0].length===0||t.length===1&&t[0].length===0)return new C1([new vr(new yt(1,e.length+1),new yt(1,t.length+1),[new uu(new k(1,1,e.length,e[0].length+1),new k(1,1,t.length,t[0].length+1))])],[],!1);const n=i.maxComputationTimeMs===0?Av.instance:new TJ(i.maxComputationTimeMs),s=!i.ignoreTrimWhitespace,r=new Map;function a(S){let x=r.get(S);return x===void 0&&(x=r.size,r.set(S,x)),x}const l=e.map(S=>a(S.trim())),d=t.map(S=>a(S.trim())),c=new VO(l,e),u=new VO(d,t),h=c.length+u.length<1700?this.dynamicProgrammingDiffing.compute(c,u,n,(S,x)=>e[S]===t[x]?t[x].length===0?.1:1+Math.log(1+t[x].length):.99):this.myersDiffingAlgorithm.compute(c,u);let g=h.diffs,f=h.hitTimeout;g=ZI(c,u,g),g=YJ(c,u,g);const m=[],v=S=>{if(s)for(let x=0;xS.seq1Range.start-_===S.seq2Range.start-b);const x=S.seq1Range.start-_;v(x),_=S.seq1Range.endExclusive,b=S.seq2Range.endExclusive;const y=this.refineDiff(e,t,S,n,s);y.hitTimeout&&(f=!0);for(const I of y.mappings)m.push(I)}v(e.length-_);const C=zO(m,e,t);let w=[];return i.computeMoves&&(w=this.computeMoves(C,e,t,l,d,n,s)),Dv(()=>{function S(y,I){if(y.lineNumber<1||y.lineNumber>I.length)return!1;const E=I[y.lineNumber-1];return!(y.column<1||y.column>E.length+1)}function x(y,I){return!(y.startLineNumber<1||y.startLineNumber>I.length+1||y.endLineNumberExclusive<1||y.endLineNumberExclusive>I.length+1)}for(const y of C){if(!y.innerChanges)return!1;for(const I of y.innerChanges)if(!(S(I.modifiedRange.getStartPosition(),t)&&S(I.modifiedRange.getEndPosition(),t)&&S(I.originalRange.getStartPosition(),e)&&S(I.originalRange.getEndPosition(),e)))return!1;if(!x(y.modified,t)||!x(y.original,e))return!1}return!0}),new C1(C,w,f)}computeMoves(e,t,i,n,s,r,a){return VJ(e,t,i,n,s,r).map(c=>{const u=this.refineDiff(t,i,new Bn(c.original.toOffsetRange(),c.modified.toOffsetRange()),r,a),h=zO(u.mappings,t,i,!0);return new _8(c,h)})}refineDiff(e,t,i,n,s){const r=new Sw(e,i.seq1Range,s),a=new Sw(t,i.seq2Range,s),l=r.length+a.length<500?this.dynamicProgrammingDiffing.compute(r,a,n):this.myersDiffingAlgorithm.compute(r,a,n);let d=l.diffs;return d=ZI(r,a,d),d=GJ(r,a,d),d=qJ(r,a,d),d=XJ(r,a,d),{mappings:d.map(u=>new uu(r.translateRange(u.seq1Range),a.translateRange(u.seq2Range))),hitTimeout:l.hitTimeout}}}function zO(o,e,t,i=!1){const n=[];for(const s of A9(o.map(r=>QJ(r,e,t)),(r,a)=>r.original.overlapOrTouch(a.original)||r.modified.overlapOrTouch(a.modified))){const r=s[0],a=s[s.length-1];n.push(new vr(r.original.join(a.original),r.modified.join(a.modified),s.map(l=>l.innerChanges[0])))}return Dv(()=>!i&&n.length>0&&n[0].original.startLineNumber!==n[0].modified.startLineNumber?!1:x7(n,(s,r)=>r.original.startLineNumber-s.original.endLineNumberExclusive===r.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=t[o.modifiedRange.startLineNumber-1].length&&o.originalRange.startColumn-1>=e[o.originalRange.startLineNumber-1].length&&o.originalRange.startLineNumber<=o.originalRange.endLineNumber+n&&o.modifiedRange.startLineNumber<=o.modifiedRange.endLineNumber+n&&(i=1);const s=new yt(o.originalRange.startLineNumber+i,o.originalRange.endLineNumber+1+n),r=new yt(o.modifiedRange.startLineNumber+i,o.modifiedRange.endLineNumber+1+n);return new vr(s,r,[o])}const $O={getLegacy:()=>new kJ,getDefault:()=>new C8};function Hc(o,e){const t=Math.pow(10,e);return Math.round(o*t)/t}class kt{constructor(e,t,i,n=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,t))|0,this.b=Math.min(255,Math.max(0,i))|0,this.a=Hc(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class Ar{constructor(e,t,i,n){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=Hc(Math.max(Math.min(1,t),0),3),this.l=Hc(Math.max(Math.min(1,i),0),3),this.a=Hc(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,s=e.a,r=Math.max(t,i,n),a=Math.min(t,i,n);let l=0,d=0;const c=(a+r)/2,u=r-a;if(u>0){switch(d=Math.min(c<=.5?u/(2*c):u/(2-2*c),1),r){case t:l=(i-n)/u+(i1&&(i-=1),i<1/6?e+(t-e)*6*i:i<1/2?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:s}=e;let r,a,l;if(i===0)r=a=l=n;else{const d=n<.5?n*(1+i):n+i-n*i,c=2*n-d;r=Ar._hue2rgb(c,d,t+1/3),a=Ar._hue2rgb(c,d,t),l=Ar._hue2rgb(c,d,t-1/3)}return new kt(Math.round(r*255),Math.round(a*255),Math.round(l*255),s)}}class pl{constructor(e,t,i,n){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=Hc(Math.max(Math.min(1,t),0),3),this.v=Hc(Math.max(Math.min(1,i),0),3),this.a=Hc(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,s=Math.max(t,i,n),r=Math.min(t,i,n),a=s-r,l=s===0?0:a/s;let d;return a===0?d=0:s===t?d=((i-n)/a%6+6)%6:s===i?d=(n-t)/a+2:d=(t-i)/a+4,new pl(Math.round(d*60),l,s,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:s}=e,r=n*i,a=r*(1-Math.abs(t/60%2-1)),l=n-r;let[d,c,u]=[0,0,0];return t<60?(d=r,c=a):t<120?(d=a,c=r):t<180?(c=r,u=a):t<240?(c=a,u=r):t<300?(d=a,u=r):t<=360&&(d=r,u=a),d=Math.round((d+l)*255),c=Math.round((c+l)*255),u=Math.round((u+l)*255),new kt(d,c,u,s)}}class Y{static fromHex(e){return Y.Format.CSS.parseHex(e)||Y.red}static equals(e,t){return!e&&!t?!0:!e||!t?!1:e.equals(t)}get hsla(){return this._hsla?this._hsla:Ar.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:pl.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof kt)this.rgba=e;else if(e instanceof Ar)this._hsla=e,this.rgba=Ar.toRGBA(e);else if(e instanceof pl)this._hsva=e,this.rgba=pl.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&kt.equals(this.rgba,e.rgba)&&Ar.equals(this.hsla,e.hsla)&&pl.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=Y._relativeLuminanceForComponent(this.rgba.r),t=Y._relativeLuminanceForComponent(this.rgba.g),i=Y._relativeLuminanceForComponent(this.rgba.b),n=.2126*e+.7152*t+.0722*i;return Hc(n,4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t>i}isDarkerThan(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t0)for(const n of i){const s=n.filter(d=>d!==void 0),r=s[1],a=s[2];if(!a)continue;let l;if(r==="rgb"){const d=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;l=UO($m(o,n),Um(a,d),!1)}else if(r==="rgba"){const d=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=UO($m(o,n),Um(a,d),!0)}else if(r==="hsl"){const d=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;l=jO($m(o,n),Um(a,d),!1)}else if(r==="hsla"){const d=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=jO($m(o,n),Um(a,d),!0)}else r==="#"&&(l=JJ($m(o,n),r+a));l&&e.push(l)}return e}function tee(o){return!o||typeof o.getValue!="function"||typeof o.positionAt!="function"?[]:eee(o)}class iee extends nJ{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let i=0;ithis._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{const s=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>s&&(i=s,n=!0)}return n?{lineNumber:t,column:i}:e}}class zc{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}acceptNewModel(e){this._models[e.url]=new iee(ze.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}async computeUnicodeHighlights(e,t,i){const n=this._getModel(e);return n?MM.computeUnicodeHighlights(n,t,i):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async computeDiff(e,t,i,n){const s=this._getModel(e),r=this._getModel(t);return!s||!r?null:zc.computeDiff(s,r,i,n)}static computeDiff(e,t,i,n){const s=n==="advanced"?$O.getDefault():$O.getLegacy(),r=e.getLinesContent(),a=t.getLinesContent(),l=s.computeDiff(r,a,i),d=l.changes.length>0?!1:this._modelsAreIdentical(e,t);function c(u){return u.map(h=>{var g;return[h.original.startLineNumber,h.original.endLineNumberExclusive,h.modified.startLineNumber,h.modified.endLineNumberExclusive,(g=h.innerChanges)===null||g===void 0?void 0:g.map(f=>[f.originalRange.startLineNumber,f.originalRange.startColumn,f.originalRange.endLineNumber,f.originalRange.endColumn,f.modifiedRange.startLineNumber,f.modifiedRange.startColumn,f.modifiedRange.endLineNumber,f.modifiedRange.endColumn])]})}return{identical:d,quitEarly:l.hitTimeout,changes:c(l.changes),moves:l.moves.map(u=>[u.lineRangeMapping.original.startLineNumber,u.lineRangeMapping.original.endLineNumberExclusive,u.lineRangeMapping.modified.startLineNumber,u.lineRangeMapping.modified.endLineNumberExclusive,c(u.changes)])}}static _modelsAreIdentical(e,t){const i=e.getLineCount(),n=t.getLineCount();if(i!==n)return!1;for(let s=1;s<=i;s++){const r=e.getLineContent(s),a=t.getLineContent(s);if(r!==a)return!1}return!0}async computeMoreMinimalEdits(e,t,i){const n=this._getModel(e);if(!n)return t;const s=[];let r;t=t.slice(0).sort((l,d)=>{if(l.range&&d.range)return k.compareRangesUsingStarts(l.range,d.range);const c=l.range?0:1,u=d.range?0:1;return c-u});let a=0;for(let l=1;lzc._diffLimit){s.push({range:l,text:d});continue}const h=eJ(u,d,i),g=n.offsetAt(k.lift(l).getStartPosition());for(const f of h){const m=n.positionAt(g+f.originalStart),v=n.positionAt(g+f.originalStart+f.originalLength),_={text:d.substr(f.modifiedStart,f.modifiedLength),range:{startLineNumber:m.lineNumber,startColumn:m.column,endLineNumber:v.lineNumber,endColumn:v.column}};n.getValueInRange(_.range)!==_.text&&s.push(_)}}return typeof r=="number"&&s.push({eol:r,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}async computeLinks(e){const t=this._getModel(e);return t?lJ(t):null}async computeDefaultDocumentColors(e){const t=this._getModel(e);return t?tee(t):null}async textualSuggest(e,t,i,n){const s=new ds,r=new RegExp(i,n),a=new Set;e:for(const l of e){const d=this._getModel(l);if(d){for(const c of d.words(r))if(!(c===t||!isNaN(Number(c)))&&(a.add(c),a.size>zc._suggestionsLimit))break e}}return{words:Array.from(a),duration:s.elapsed()}}async computeWordRanges(e,t,i,n){const s=this._getModel(e);if(!s)return Object.create(null);const r=new RegExp(i,n),a=Object.create(null);for(let l=t.startLineNumber;lthis._host.fhr(a,l)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(r,t),Promise.resolve(Y2(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(i){return Promise.reject(i)}}}zc._diffLimit=1e5;zc._suggestionsLimit=1e4;typeof importScripts=="function"&&(globalThis.monaco=u7());const FM=bt("textResourceConfigurationService"),S8=bt("textResourcePropertiesService"),Me=bt("ILanguageFeaturesService");var nee=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},jm=function(o,e){return function(t,i){e(t,i,o)}};const KO=60*1e3,qO=5*60*1e3;function vh(o,e){const t=o.getModel(e);return!(!t||t.isTooLargeForSyncing())}let YI=class extends q{constructor(e,t,i,n,s){super(),this._modelService=e,this._workerManager=this._register(new oee(this._modelService,n)),this._logService=i,this._register(s.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(r,a)=>vh(this._modelService,r.uri)?this._workerManager.withWorker().then(l=>l.computeLinks(r.uri)).then(l=>l&&{links:l}):Promise.resolve({links:[]})})),this._register(s.completionProvider.register("*",new see(this._workerManager,t,this._modelService,n)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return vh(this._modelService,e)}computedUnicodeHighlights(e,t,i){return this._workerManager.withWorker().then(n=>n.computedUnicodeHighlights(e,t,i))}async computeDiff(e,t,i,n){const s=await this._workerManager.withWorker().then(l=>l.computeDiff(e,t,i,n));if(!s)return null;return{identical:s.identical,quitEarly:s.quitEarly,changes:a(s.changes),moves:s.moves.map(l=>new _8(new Ol(new yt(l[0],l[1]),new yt(l[2],l[3])),a(l[4])))};function a(l){return l.map(d=>{var c;return new vr(new yt(d[0],d[1]),new yt(d[2],d[3]),(c=d[4])===null||c===void 0?void 0:c.map(u=>new uu(new k(u[0],u[1],u[2],u[3]),new k(u[4],u[5],u[6],u[7]))))})}}computeMoreMinimalEdits(e,t,i=!1){if(ls(t)){if(!vh(this._modelService,e))return Promise.resolve(t);const n=ds.create(),s=this._workerManager.withWorker().then(r=>r.computeMoreMinimalEdits(e,t,i));return s.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),n.elapsed())),Promise.race([s,au(1e3).then(()=>t)])}else return Promise.resolve(void 0)}canNavigateValueSet(e){return vh(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then(n=>n.navigateValueSet(e,t,i))}canComputeWordRanges(e){return vh(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then(i=>i.computeWordRanges(e,t))}};YI=nee([jm(0,Si),jm(1,FM),jm(2,bo),jm(3,si),jm(4,Me)],YI);class see{constructor(e,t,i,n){this.languageConfigurationService=n,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}async provideCompletionItems(e,t){const i=this._configurationService.getValue(e.uri,t,"editor");if(i.wordBasedSuggestions==="off")return;const n=[];if(i.wordBasedSuggestions==="currentDocument")vh(this._modelService,e.uri)&&n.push(e.uri);else for(const u of this._modelService.getModels())vh(this._modelService,u.uri)&&(u===e?n.unshift(u.uri):(i.wordBasedSuggestions==="allDocuments"||u.getLanguageId()===e.getLanguageId())&&n.push(u.uri));if(n.length===0)return;const s=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),r=e.getWordAtPosition(t),a=r?new k(t.lineNumber,r.startColumn,t.lineNumber,r.endColumn):k.fromPositions(t),l=a.setEndPosition(t.lineNumber,t.column),c=await(await this._workerManager.withWorker()).textualSuggest(n,r==null?void 0:r.word,s);if(c)return{duration:c.duration,suggestions:c.words.map(u=>({kind:18,label:u,insertText:u,range:{insert:l,replace:a}}))}}}class oee extends q{constructor(e,t){super(),this.languageConfigurationService=t,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new kM).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(qO/2),kl),this._register(this._modelService.onModelRemoved(n=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>qO&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new BM(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class ree extends q{constructor(e,t,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){const n=new SM;n.cancelAndSet(()=>this._checkStopModelSync(),Math.round(KO/2)),this._register(n)}}dispose(){for(const e in this._syncedModels)jt(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(const i of e){const n=i.toString();this._syncedModels[n]||this._beginModelSync(i,t),this._syncedModels[n]&&(this._syncedModelsLastUsedTime[n]=new Date().getTime())}}_checkStopModelSync(){const e=new Date().getTime(),t=[];for(const i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>KO&&t.push(i);for(const i of t)this._stopModelSync(i)}_beginModelSync(e,t){const i=this._modelService.getModel(e);if(!i||!t&&i.isTooLargeForSyncing())return;const n=e.toString();this._proxy.acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const s=new de;s.add(i.onDidChangeContent(r=>{this._proxy.acceptModelChanged(n.toString(),r)})),s.add(i.onWillDispose(()=>{this._stopModelSync(n)})),s.add(je(()=>{this._proxy.acceptRemovedModel(n)})),this._syncedModels[n]=s}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],jt(t)}}class GO{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class ix{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class BM extends q{constructor(e,t,i,n){super(),this.languageConfigurationService=n,this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new ky(i),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new gQ(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new ix(this)))}catch(e){HI(e),this._worker=new GO(new zc(new ix(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>(HI(e),this._worker=new GO(new zc(new ix(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new ree(e,this._modelService,this._keepIdleModels))),this._modelManager}async _withSyncedResources(e,t=!1){return this._disposed?Promise.reject(gZ()):this._getProxy().then(i=>(this._getOrCreateModelManager(i).ensureSyncedResources(e,t),i))}computedUnicodeHighlights(e,t,i){return this._withSyncedResources([e]).then(n=>n.computeUnicodeHighlights(e.toString(),t,i))}computeDiff(e,t,i,n){return this._withSyncedResources([e,t],!0).then(s=>s.computeDiff(e.toString(),t.toString(),i,n))}computeMoreMinimalEdits(e,t,i){return this._withSyncedResources([e]).then(n=>n.computeMoreMinimalEdits(e.toString(),t,i))}computeLinks(e){return this._withSyncedResources([e]).then(t=>t.computeLinks(e.toString()))}computeDefaultDocumentColors(e){return this._withSyncedResources([e]).then(t=>t.computeDefaultDocumentColors(e.toString()))}async textualSuggest(e,t,i){const n=await this._withSyncedResources(e),s=i.source,r=i.flags;return n.textualSuggest(e.map(a=>a.toString()),t,s,r)}computeWordRanges(e,t){return this._withSyncedResources([e]).then(i=>{const n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);const s=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),r=s.source,a=s.flags;return i.computeWordRanges(e.toString(),t,r,a)})}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then(n=>{const s=this._modelService.getModel(e);if(!s)return null;const r=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId()).getWordDefinition(),a=r.source,l=r.flags;return n.navigateValueSet(e.toString(),t,i,a,l)})}dispose(){super.dispose(),this._disposed=!0}}function aee(o,e,t){return new lee(o,e,t)}class lee extends BM{constructor(e,t,i){super(e,i.keepIdleModels||!1,i.label,t),this._foreignModuleId=i.moduleId,this._foreignModuleCreateData=i.createData||null,this._foreignModuleHost=i.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||typeof this._foreignModuleHost[e]!="function")return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(i){return Promise.reject(i)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{const t=this._foreignModuleHost?Y2(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then(i=>{this._foreignModuleCreateData=null;const n=(a,l)=>e.fmr(a,l),s=(a,l)=>function(){const d=Array.prototype.slice.call(arguments,0);return l(a,d)},r={};for(const a of i)r[a]=s(a,n);return r})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(t=>this.getProxy())}}const i0={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"},Tp=new class{clone(){return this}equals(o){return this===o}};function WM(o,e){return new lM([new bv(0,"",o)],e)}function Ay(o,e){const t=new Uint32Array(2);return t[0]=0,t[1]=(o<<0|0|0|32768|2<<24)>>>0,new ly(t,e===null?Tp:e)}class Yn{static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static getClassNameFromMetadata(e){let i="mtk"+this.getForeground(e);const n=this.getFontStyle(e);return n&1&&(i+=" mtki"),n&2&&(i+=" mtkb"),n&4&&(i+=" mtku"),n&8&&(i+=" mtks"),i}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let s=`color: ${t[i]};`;n&1&&(s+="font-style: italic;"),n&2&&(s+="font-weight: bold;");let r="";return n&4&&(r+=" underline"),n&8&&(r+=" line-through"),r&&(s+=`text-decoration:${r};`),s}static getPresentationFromMetadata(e){const t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:!!(i&1),bold:!!(i&2),underline:!!(i&4),strikethrough:!!(i&8)}}}class Cn{static createEmpty(e,t){const i=Cn.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new Cn(n,e,t)}constructor(e,t,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=i}equals(e){return e instanceof Cn?this.slicedEquals(e,0,this._tokensCount):!1}slicedEquals(e,t,i){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;const n=t<<1,s=n+(i<<1);for(let r=n;r0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){const t=this._tokens[(e<<1)+1],i=Yn.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[(e<<1)+1];return Yn.getTokenType(t)}getForeground(e){const t=this._tokens[(e<<1)+1];return Yn.getForeground(t)}getClassName(e){const t=this._tokens[(e<<1)+1];return Yn.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[(e<<1)+1];return Yn.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[(e<<1)+1];return Yn.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return Cn.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new VM(this,e,t,i)}static convertToEndOffset(e,t){const n=(e.length>>>1)-1;for(let s=0;s>>1)-1;for(;it&&(n=s)}return i}withInserted(e){if(e.length===0)return this;let t=0,i=0,n="";const s=new Array;let r=0;for(;;){const a=tr){n+=this._text.substring(r,l.offset);const d=this._tokens[(t<<1)+1];s.push(n.length,d),r=l.offset}n+=l.text,s.push(n.length,l.tokenMetadata),i++}else break}return new Cn(new Uint32Array(s),n,this._languageIdCodec)}}Cn.defaultTokenMetadata=(32768|2<<24)>>>0;class VM{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let s=this._firstTokenIndex,r=e.getCount();s=i);s++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof VM?this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}class lo{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length,n=t.length;if(i!==n)return!1;for(let s=0;s=s||(a[l++]=new lo(Math.max(1,d.startColumn-n+1),Math.min(r+1,d.endColumn-n+1),d.className,d.type));return a}static filter(e,t,i,n){if(e.length===0)return[];const s=[];let r=0;for(let a=0,l=e.length;at||c.isEmpty()&&(d.type===0||d.type===3))continue;const u=c.startLineNumber===t?c.startColumn:i,h=c.endLineNumber===t?c.endColumn:n;s[r++]=new lo(u,h,d.inlineClassName,d.type)}return s}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const i=lo._typeCompare(e.type,t.type);return i!==0?i:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class dee{static normalize(e,t){if(t.length===0)return[];const i=[],n=new yw;let s=0;for(let r=0,a=t.length;r1){const m=e.charCodeAt(d-2);bn(m)&&d--}if(c>1){const m=e.charCodeAt(c-2);bn(m)&&c--}const g=d-1,f=c-2;s=n.consumeLowerThan(g,s,i),n.count===0&&(s=g),n.insert(f,u,h)}return n.consumeLowerThan(1073741824,s,i),i}}class En{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}class y8{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class Ou{constructor(e,t,i,n,s,r,a,l,d,c,u,h,g,f,m,v,_,b,C){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=s,this.containsRTL=r,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=d.sort(lo.compare),this.tabSize=c,this.startVisibleColumn=u,this.spaceWidth=h,this.stopRenderingLineAfter=m,this.renderWhitespace=v==="all"?4:v==="boundary"?1:v==="selection"?2:v==="trailing"?3:0,this.renderControlCharacters=_,this.fontLigatures=b,this.selectionsOnLine=C&&C.sort((x,y)=>x.startOffset>>16}static getCharIndex(e){return(e&65535)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,i,n){const s=(t<<16|i<<0)>>>0;this._data[e-1]=s,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return this._horizontalOffset.length===0?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return this.length===0?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),i=il.getPartIndex(t),n=il.getCharIndex(t);return new L8(i,n)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){if(this.length===0)return 0;const n=(e<<16|i<<0)>>>0;let s=0,r=this.length-1;for(;s+1>>1,v=this._data[m];if(v===n)return m;v>n?r=m:s=m}if(s===r)return s;const a=this._data[s],l=this._data[r];if(a===n)return s;if(l===n)return r;const d=il.getPartIndex(a),c=il.getCharIndex(a),u=il.getPartIndex(l);let h;d!==u?h=t:h=il.getCharIndex(l);const g=i-c,f=h-i;return g<=f?s:r}}class XI{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function n0(o,e){if(o.lineContent.length===0){if(o.lineDecorations.length>0){e.appendString("");let t=0,i=0,n=0;for(const r of o.lineDecorations)(r.type===1||r.type===2)&&(e.appendString(''),r.type===1&&(n|=1,t++),r.type===2&&(n|=2,i++));e.appendString("");const s=new il(1,t+i);return s.setColumnInfo(1,t,0,0),new XI(s,!1,n)}return e.appendString(""),new XI(new il(0,0),!1,0)}return vee(hee(o),e)}class cee{constructor(e,t,i,n){this.characterMapping=e,this.html=t,this.containsRTL=i,this.containsForeignElements=n}}function Ry(o){const e=new mm(1e4),t=n0(o,e);return new cee(t.characterMapping,e.build(),t.containsRTL,t.containsForeignElements)}class uee{constructor(e,t,i,n,s,r,a,l,d,c,u,h,g,f,m,v){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=s,this.overflowingCharCount=r,this.parts=a,this.containsForeignElements=l,this.fauxIndentLength=d,this.tabSize=c,this.startVisibleColumn=u,this.containsRTL=h,this.spaceWidth=g,this.renderSpaceCharCode=f,this.renderWhitespace=m,this.renderControlCharacters=v}}function hee(o){const e=o.lineContent;let t,i,n;o.stopRenderingLineAfter!==-1&&o.stopRenderingLineAfter0){for(let a=0,l=o.lineDecorations.length;a0&&(s[r++]=new En(i,"",0,!1));let a=i;for(let l=0,d=t.getCount();l=n){const g=e?Dp(o.substring(a,n)):!1;s[r++]=new En(n,u,0,g);break}const h=e?Dp(o.substring(a,c)):!1;s[r++]=new En(c,u,0,h),a=c}return s}function fee(o,e,t){let i=0;const n=[];let s=0;if(t)for(let r=0,a=e.length;r=50&&(n[s++]=new En(g+1,c,u,h),f=g+1,g=-1);f!==d&&(n[s++]=new En(d,c,u,h))}else n[s++]=l;i=d}else for(let r=0,a=e.length;r50){const u=l.type,h=l.metadata,g=l.containsRTL,f=Math.ceil(c/50);for(let m=1;m=8234&&o<=8238||o>=8294&&o<=8297||o>=8206&&o<=8207||o===1564}function pee(o,e){const t=[];let i=new En(0,"",0,!1),n=0;for(const s of e){const r=s.endIndex;for(;ni.endIndex&&(i=new En(n,s.type,s.metadata,s.containsRTL),t.push(i)),i=new En(n+1,"mtkcontrol",s.metadata,!1),t.push(i))}n>i.endIndex&&(i=new En(r,s.type,s.metadata,s.containsRTL),t.push(i))}return t}function mee(o,e,t,i){const n=o.continuesWithWrappedLine,s=o.fauxIndentLength,r=o.tabSize,a=o.startVisibleColumn,l=o.useMonospaceOptimizations,d=o.selectionsOnLine,c=o.renderWhitespace===1,u=o.renderWhitespace===3,h=o.renderSpaceWidth!==o.spaceWidth,g=[];let f=0,m=0,v=i[m].type,_=i[m].containsRTL,b=i[m].endIndex;const C=i.length;let w=!1,S=Cs(e),x;S===-1?(w=!0,S=t,x=t):x=Da(e);let y=!1,I=0,E=d&&d[I],R=a%r;for(let O=s;O=E.endOffset&&(I++,E=d&&d[I]);let K;if(Ox)K=!0;else if($===9)K=!0;else if($===32)if(c)if(y)K=!0;else{const oe=O+1O),K&&u&&(K=w||O>x),K&&_&&O>=S&&O<=x&&(K=!1),y){if(!K||!l&&R>=r){if(h){const oe=f>0?g[f-1].endIndex:s;for(let Le=oe+1;Le<=O;Le++)g[f++]=new En(Le,"mtkw",1,!1)}else g[f++]=new En(O,"mtkw",1,!1);R=R%r}}else(O===b||K&&O>s)&&(g[f++]=new En(O,v,0,_),R=R%r);for($===9?R=r:ou($)?R+=2:R++,y=K;O===b&&(m++,m0?e.charCodeAt(t-1):0,$=t>1?e.charCodeAt(t-2):0;O===32&&$!==32&&$!==9||(j=!0)}else j=!0;if(j)if(h){const O=f>0?g[f-1].endIndex:s;for(let $=O+1;$<=t;$++)g[f++]=new En($,"mtkw",1,!1)}else g[f++]=new En(t,"mtkw",1,!1);else g[f++]=new En(t,v,0,_);return g}function _ee(o,e,t,i){i.sort(lo.compare);const n=dee.normalize(o,i),s=n.length;let r=0;const a=[];let l=0,d=0;for(let u=0,h=t.length;ud&&(d=b.startOffset,a[l++]=new En(d,m,v,_)),b.endOffset+1<=f)d=b.endOffset+1,a[l++]=new En(d,m+" "+b.className,v|b.metadata,_),r++;else{d=f,a[l++]=new En(d,m+" "+b.className,v|b.metadata,_);break}}f>d&&(d=f,a[l++]=new En(d,m,v,_))}const c=t[t.length-1].endIndex;if(r'):e.appendString("");for(let E=0,R=d.length;E=c&&(Q+=G)}}for(Le&&(e.appendString(' style="width:'),e.appendString(String(f*se)),e.appendString('px"')),e.appendASCIICharCode(62);w1?e.appendCharCode(8594):e.appendCharCode(65515);for(let G=2;G<=H;G++)e.appendCharCode(160)}else Q=2,H=1,e.appendCharCode(m),e.appendCharCode(8204);x+=Q,y+=H,w>=c&&(S+=H)}}else for(e.appendASCIICharCode(62);w=c&&(S+=Q)}he?I++:I=0,w>=r&&!C&&j.isPseudoAfter()&&(C=!0,b.setColumnInfo(w+1,E,x,y)),e.appendString("")}return C||b.setColumnInfo(r+1,d.length-1,x,y),a&&(e.appendString(''),e.appendString(p("showMore","Show more ({0})",Cee(l))),e.appendString("")),e.appendString(""),new XI(b,g,n)}function bee(o){return o.toString(16).toUpperCase().padStart(4,"0")}function Cee(o){return o<1024?p("overflow.chars","{0} chars",o):o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/1024/1024).toFixed(1)} MB`}class YO{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=e|0,this.left=t|0,this.width=i|0,this.height=n|0}}class wee{constructor(e,t){this.tabSize=e,this.data=t}}class HM{constructor(e,t,i,n,s,r,a){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=s,this.tokens=r,this.inlineDecorations=a}}class Zo{constructor(e,t,i,n,s,r,a,l,d,c){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=Zo.isBasicASCII(i,r),this.containsRTL=Zo.containsRTL(i,this.isBasicASCII,s),this.tokens=a,this.inlineDecorations=l,this.tabSize=d,this.startVisibleColumn=c}static isBasicASCII(e,t){return t?Jb(e):!0}static containsRTL(e,t,i){return!t&&i?Dp(e):!1}}class W_{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class See{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new W_(new k(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class x8{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class Rv{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static compareByRenderingProps(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&Bi(e.data,t.data)}static equalsArr(e,t){return Bi(e,t,Rv.equals)}}function yee(o){return Array.isArray(o)}function Lee(o){return!yee(o)}function k8(o){return typeof o=="string"}function XO(o){return!k8(o)}function pf(o){return!o}function $c(o,e){return o.ignoreCase&&e?e.toLowerCase():e}function QO(o){return o.replace(/[&<>'"_]/g,"-")}function Dee(o,e){console.log(`${o.languageId}: ${e}`)}function hi(o,e){return new Error(`${o.languageId}: ${e}`)}function vc(o,e,t,i,n){const s=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let r=null;return e.replace(s,function(a,l,d,c,u,h,g,f,m){return pf(d)?pf(c)?!pf(u)&&u0;){const i=o.tokenizer[t];if(i)return i;const n=t.lastIndexOf(".");n<0?t=null:t=t.substr(0,n)}return null}function xee(o,e){let t=e;for(;t&&t.length>0;){if(o.stateNames[t])return!0;const n=t.lastIndexOf(".");n<0?t=null:t=t.substr(0,n)}return!1}var kee=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Iee=function(o,e){return function(t,i){e(t,i,o)}},QI;const I8=5;class Pv{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(e!==null&&e.depth>=this._maxCacheDepth)return new np(e,t);let i=np.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new np(e,t),this._entries[i]=n,n)}}Pv._INSTANCE=new Pv(I8);class np{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;e!==null;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;e!==null&&t!==null;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return e===null&&t===null}equals(e){return np._equals(this,e)}push(e){return Pv.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return Pv.create(this.parent,e)}}class kf{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new kf(this.languageId,this.state)}}class bc{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(t!==null)return new V_(e,t);if(e!==null&&e.depth>=this._maxCacheDepth)return new V_(e,t);const i=np.getStackElementId(e);let n=this._entries[i];return n||(n=new V_(e,null),this._entries[i]=n,n)}}bc._INSTANCE=new bc(I8);class V_{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:bc.create(this.stack,this.embeddedLanguageData)}equals(e){return!(e instanceof V_)||!this.stack.equals(e.stack)?!1:this.embeddedLanguageData===null&&e.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||e.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(e.embeddedLanguageData)}}class Eee{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new bv(e,t,this._languageId)))}nestedLanguageTokenize(e,t,i,n){const s=i.languageId,r=i.state,a=Ei.get(s);if(!a)return this.enterLanguage(s),this.emit(n,""),r;const l=a.tokenize(e,t,r);if(n!==0)for(const d of l.tokens)this._tokens.push(new bv(d.offset+n,d.type,d.language));else this._tokens=this._tokens.concat(l.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,l.endState}finalize(e){return new lM(this._tokens,e)}}class Lw{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){const i=this._theme.match(this._currentLanguageId,t)|1024;this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){const n=e!==null?e.length:0,s=t.length,r=i!==null?i.length:0;if(n===0&&s===0&&r===0)return new Uint32Array(0);if(n===0&&s===0)return i;if(s===0&&r===0)return e;const a=new Uint32Array(n+s+r);e!==null&&a.set(e);for(let l=0;l{if(r)return;let l=!1;for(let d=0,c=a.changedLanguages.length;d{a.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))}))}getLoadStatus(){const e=[];for(const t in this._embeddedLanguages){const i=Ei.get(t);if(i){if(i instanceof QI){const n=i.getLoadStatus();n.loaded===!1&&e.push(n.promise)}continue}Ei.isResolved(t)||e.push(Ei.getOrCreate(t))}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(t=>{})}}getInitialState(){const e=Pv.create(null,this._lexer.start);return bc.create(e,null)}tokenize(e,t,i){if(e.length>=this._maxTokenizationLineLength)return WM(this._languageId,i);const n=new Eee,s=this._tokenize(e,t,i,n);return n.finalize(s)}tokenizeEncoded(e,t,i){if(e.length>=this._maxTokenizationLineLength)return Ay(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),i);const n=new Lw(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),s=this._tokenize(e,t,i,n);return n.finalize(s)}_tokenize(e,t,i,n){return i.embeddedLanguageData?this._nestedTokenize(e,t,i,0,n):this._myTokenize(e,t,i,0,n)}_findLeavingNestedLanguageOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=eC(this._lexer,t.stack.state),!i))throw hi(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,s=!1;for(const r of i){if(!XO(r.action)||r.action.nextEmbedded!=="@pop")continue;s=!0;let a=r.regex;const l=r.regex.source;if(l.substr(0,4)==="^(?:"&&l.substr(l.length-1,1)===")"){const c=(a.ignoreCase?"i":"")+(a.unicode?"u":"");a=new RegExp(l.substr(4,l.length-5),c)}const d=e.search(a);d===-1||d!==0&&r.matchOnlyAtLineStart||(n===-1||d0&&s.nestedLanguageTokenize(a,!1,i.embeddedLanguageData,n);const l=e.substring(r);return this._myTokenize(l,t,i,n+r,s)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,s){s.enterLanguage(this._languageId);const r=e.length,a=t&&this._lexer.includeLF?e+` -`:e,l=a.length;let d=i.embeddedLanguageData,c=i.stack,u=0,h=null,g=!0;for(;g||u=l)break;g=!1;let E=this._lexer.tokenizer[_];if(!E&&(E=eC(this._lexer,_),!E))throw hi(this._lexer,"tokenizer state is not defined: "+_);const R=a.substr(u);for(const j of E)if((u===0||!j.matchOnlyAtLineStart)&&(b=R.match(j.regex),b)){C=b[0],w=j.action;break}}if(b||(b=[""],C=""),w||(u=this._lexer.maxStack)throw hi(this._lexer,"maximum tokenizer stack size reached: ["+c.state+","+c.parent.state+",...]");c=c.push(_)}else if(w.next==="@pop"){if(c.depth<=1)throw hi(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(S));c=c.pop()}else if(w.next==="@popall")c=c.popall();else{let E=vc(this._lexer,w.next,C,b,_);if(E[0]==="@"&&(E=E.substr(1)),eC(this._lexer,E))c=c.push(E);else throw hi(this._lexer,"trying to set a next state '"+E+"' that is undefined in rule: "+this._safeRuleName(S))}}w.log&&typeof w.log=="string"&&Dee(this._lexer,this._lexer.languageId+": "+vc(this._lexer,w.log,C,b,_))}if(y===null)throw hi(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(S));const I=E=>{const R=this._languageService.getLanguageIdByLanguageName(E)||this._languageService.getLanguageIdByMimeType(E)||E,j=this._getNestedEmbeddedLanguageData(R);if(u0)throw hi(this._lexer,"groups cannot be nested: "+this._safeRuleName(S));if(b.length!==y.length+1)throw hi(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(S));let E=0;for(let R=1;Ro});class zM{static colorizeElement(e,t,i,n){n=n||{};const s=n.theme||"vs",r=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!r)return console.error("Mode not detected"),Promise.resolve();const a=t.getLanguageIdByMimeType(r)||r;e.setTheme(s);const l=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+s;const d=c=>{var u;const h=(u=nx==null?void 0:nx.createHTML(c))!==null&&u!==void 0?u:c;i.innerHTML=h};return this.colorize(t,l||"",a,n).then(d,c=>console.error(c))}static async colorize(e,t,i,n){const s=e.languageIdCodec;let r=4;n&&typeof n.tabSize=="number"&&(r=n.tabSize),pM(t)&&(t=t.substr(1));const a=Rl(t);if(!e.isRegisteredLanguageId(i))return JO(a,r,s);const l=await Ei.getOrCreate(i);return l?Tee(a,r,l,s):JO(a,r,s)}static colorizeLine(e,t,i,n,s=4){const r=Zo.isBasicASCII(e,t),a=Zo.containsRTL(e,r,i);return Ry(new Ou(!1,!0,e,!1,r,a,0,n,[],s,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){const n=e.getLineContent(t);e.tokenization.forceTokenization(t);const r=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),r,i)}}function Tee(o,e,t,i){return new Promise((n,s)=>{const r=()=>{const a=Mee(o,e,t,i);if(t instanceof Ov){const l=t.getLoadStatus();if(l.loaded===!1){l.promise.then(r,s);return}}n(a)};r()})}function JO(o,e,t){let i=[];const s=new Uint32Array(2);s[0]=0,s[1]=33587200;for(let r=0,a=o.length;r")}return i.join("")}function Mee(o,e,t,i){let n=[],s=t.getInitialState();for(let r=0,a=o.length;r"),s=d.endState}return n.join("")}const e4=2e4;let bh,w1,JI,S1,eE;function Aee(o){bh=document.createElement("div"),bh.className="monaco-aria-container";const e=()=>{const i=document.createElement("div");return i.className="monaco-alert",i.setAttribute("role","alert"),i.setAttribute("aria-atomic","true"),bh.appendChild(i),i};w1=e(),JI=e();const t=()=>{const i=document.createElement("div");return i.className="monaco-status",i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true"),bh.appendChild(i),i};S1=t(),eE=t(),o.appendChild(bh)}function mo(o){bh&&(w1.textContent!==o?($n(JI),Dw(w1,o)):($n(w1),Dw(JI,o)))}function hu(o){bh&&(S1.textContent!==o?($n(eE),Dw(S1,o)):($n(S1),Dw(eE,o)))}function Dw(o,e){$n(o),e.length>e4&&(e=e.substr(0,e4)),o.textContent=e,o.style.visibility="hidden",o.style.visibility="visible"}const $M=bt("markerDecorationsService");var Ree=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Pee=function(o,e){return function(t,i){e(t,i,o)}};let Fv=class{constructor(e,t){}dispose(){}};Fv.ID="editor.contrib.markerDecorations";Fv=Ree([Pee(1,$M)],Fv);At(Fv.ID,Fv,0);class E8 extends q{constructor(e,t){super(),this._onDidChange=this._register(new W),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null;const t=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()};let i=!1,n=!1;const s=()=>{if(i&&!n)try{i=!1,n=!0,t()}finally{po(Je(this._referenceDomElement),()=>{n=!1,s()})}};this._resizeObserver=new ResizeObserver(r=>{e=r&&r[0]&&r[0].contentRect?r[0].contentRect:null,i=!0,s()}),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this._referenceDomElement&&(i=this._referenceDomElement.clientWidth,n=this._referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),(this._width!==i||this._height!==n)&&(this._width=i,this._height=n,e&&this._onDidChange.fire())}}class Uc{constructor(e,t){this.key=e,this.migrate=t}apply(e){const t=Uc._read(e,this.key),i=s=>Uc._read(e,s),n=(s,r)=>Uc._write(e,s,r);this.migrate(t,i,n)}static _read(e,t){if(typeof e>"u")return;const i=t.indexOf(".");if(i>=0){const n=t.substring(0,i);return this._read(e[n],t.substring(i+1))}return e[t]}static _write(e,t,i){const n=t.indexOf(".");if(n>=0){const s=t.substring(0,n);e[s]=e[s]||{},this._write(e[s],t.substring(n+1),i);return}e[t]=i}}Uc.items=[];function Gl(o,e){Uc.items.push(new Uc(o,e))}function Co(o,e){Gl(o,(t,i,n)=>{if(typeof t<"u"){for(const[s,r]of e)if(t===s){n(o,r);return}}})}function Oee(o){Uc.items.forEach(e=>e.apply(o))}Co("wordWrap",[[!0,"on"],[!1,"off"]]);Co("lineNumbers",[[!0,"on"],[!1,"off"]]);Co("cursorBlinking",[["visible","solid"]]);Co("renderWhitespace",[[!0,"boundary"],[!1,"none"]]);Co("renderLineHighlight",[[!0,"line"],[!1,"none"]]);Co("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]);Co("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]);Co("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);Co("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);Co("autoIndent",[[!1,"advanced"],[!0,"full"]]);Co("matchBrackets",[[!0,"always"],[!1,"never"]]);Co("renderFinalNewline",[[!0,"on"],[!1,"off"]]);Co("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]);Co("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]);Co("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]);Gl("autoClosingBrackets",(o,e,t)=>{o===!1&&(t("autoClosingBrackets","never"),typeof e("autoClosingQuotes")>"u"&&t("autoClosingQuotes","never"),typeof e("autoSurround")>"u"&&t("autoSurround","never"))});Gl("renderIndentGuides",(o,e,t)=>{typeof o<"u"&&(t("renderIndentGuides",void 0),typeof e("guides.indentation")>"u"&&t("guides.indentation",!!o))});Gl("highlightActiveIndentGuide",(o,e,t)=>{typeof o<"u"&&(t("highlightActiveIndentGuide",void 0),typeof e("guides.highlightActiveIndentation")>"u"&&t("guides.highlightActiveIndentation",!!o))});const Fee={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};Gl("suggest.filteredTypes",(o,e,t)=>{if(o&&typeof o=="object"){for(const i of Object.entries(Fee))o[i[0]]===!1&&typeof e(`suggest.${i[1]}`)>"u"&&t(`suggest.${i[1]}`,!1);t("suggest.filteredTypes",void 0)}});Gl("quickSuggestions",(o,e,t)=>{if(typeof o=="boolean"){const i=o?"on":"off";t("quickSuggestions",{comments:i,strings:i,other:i})}});Gl("experimental.stickyScroll.enabled",(o,e,t)=>{typeof o=="boolean"&&(t("experimental.stickyScroll.enabled",void 0),typeof e("stickyScroll.enabled")>"u"&&t("stickyScroll.enabled",o))});Gl("experimental.stickyScroll.maxLineCount",(o,e,t)=>{typeof o=="number"&&(t("experimental.stickyScroll.maxLineCount",void 0),typeof e("stickyScroll.maxLineCount")>"u"&&t("stickyScroll.maxLineCount",o))});Gl("codeActionsOnSave",(o,e,t)=>{if(o&&typeof o=="object"){let i=!1;const n={};for(const s of Object.entries(o))typeof s[1]=="boolean"?(i=!0,n[s[0]]=s[1]?"explicit":"never"):n[s[0]]=s[1];i&&t("codeActionsOnSave",n)}});Gl("codeActionWidget.includeNearbyQuickfixes",(o,e,t)=>{typeof o=="boolean"&&(t("codeActionWidget.includeNearbyQuickfixes",void 0),typeof e("codeActionWidget.includeNearbyQuickFixes")>"u"&&t("codeActionWidget.includeNearbyQuickFixes",o))});class Bee{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new W,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}}const Mp=new Bee,Zl=bt("accessibilityService"),s0=new De("accessibilityModeEnabled",!1),Py=bt("accessibleNotificationService");var Wee=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Vee=function(o,e){return function(t,i){e(t,i,o)}};let tE=class extends q{constructor(e,t,i,n){super(),this._accessibilityService=n,this._onDidChange=this._register(new W),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new W),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new Y9,this.isSimpleWidget=e,this._containerObserver=this._register(new E8(i,t.dimension)),this._rawOptions=t4(t),this._validatedOptions=Cc.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(sr.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(Mp.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(TI.onDidChange(()=>this._recomputeOptions())),this._register(yv.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const e=this._computeOptions(),t=Cc.checkEquals(this.options,e);t!==null&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=Fh.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(t),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:Mp.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return Cc.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:zee(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:dy||pr,pixelRatio:yv.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return TI.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=t4(e);Cc.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=Cc.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const t=Hee(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};tE=Wee([Vee(3,Zl)],tE);function Hee(o){let e=0;for(;o;)o=Math.floor(o/10),e++;return e||1}function zee(){let o="";return!ru&&!w7&&(o+="no-user-select "),ru&&(o+="no-minimap-shadow ",o+="enable-user-select "),It&&(o+="mac "),o}class $ee{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class Uee{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class Cc{static validateOptions(e){const t=new $ee;for(const i of Sf){const n=i.name==="_never_"?void 0:e[i.name];t._write(i.id,i.validate(n))}return t}static computeOptions(e,t){const i=new Uee;for(const n of Sf)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if(typeof e!="object"||typeof t!="object"||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)?Bi(e,t):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!Cc._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const s of Sf){const r=!Cc._deepEquals(e._read(s.id),t._read(s.id));i[s.id]=r,r&&(n=!0)}return n?new Z9(i):null}static applyUpdate(e,t){let i=!1;for(const n of Sf)if(t.hasOwnProperty(n.name)){const s=n.applyUpdate(e[n.name],t[n.name]);e[n.name]=s.newValue,i=i||s.didChange}return i}}function t4(o){const e=gd(o);return Oee(e),e}function nn(o,e,t){let i=null,n=null;if(typeof t.value=="function"?(i="value",n=t.value,n.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof t.get=="function"&&(i="get",n=t.get),!n)throw new Error("not supported");const s=`$memoize$${e}`;t[i]=function(...r){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:n.apply(this,r)}),this[s]}}var jee=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ni;(function(o){o.Tap="-monaco-gesturetap",o.Change="-monaco-gesturechange",o.Start="-monaco-gesturestart",o.End="-monaco-gesturesend",o.Contextmenu="-monaco-gesturecontextmenu"})(ni||(ni={}));class ei extends q{constructor(){super(),this.dispatched=!1,this.targets=new Ns,this.ignoreTargets=new Ns,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(ye.runAndSubscribe(xM,({window:e,disposables:t})=>{t.add(J(e.document,"touchstart",i=>this.onTouchStart(i),{passive:!1})),t.add(J(e.document,"touchend",i=>this.onTouchEnd(e,i))),t.add(J(e.document,"touchmove",i=>this.onTouchMove(i),{passive:!1}))},{window:Ai,disposables:this._store}))}static addTarget(e){if(!ei.isTouchDevice())return q.None;ei.INSTANCE||(ei.INSTANCE=new ei);const t=ei.INSTANCE.targets.push(e);return je(t)}static ignoreTarget(e){if(!ei.isTouchDevice())return q.None;ei.INSTANCE||(ei.INSTANCE=new ei);const t=ei.INSTANCE.ignoreTargets.push(e);return je(t)}static isTouchDevice(){return"ontouchstart"in Ai||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,n=e.targetTouches.length;i=ei.HOLD_DELAY&&Math.abs(l.initialPageX-er(l.rollingPageX))<30&&Math.abs(l.initialPageY-er(l.rollingPageY))<30){const c=this.newGestureEvent(ni.Contextmenu,l.initialTarget);c.pageX=er(l.rollingPageX),c.pageY=er(l.rollingPageY),this.dispatchEvent(c)}else if(n===1){const c=er(l.rollingPageX),u=er(l.rollingPageY),h=er(l.rollingTimestamps)-l.rollingTimestamps[0],g=c-l.rollingPageX[0],f=u-l.rollingPageY[0],m=[...this.targets].filter(v=>l.initialTarget instanceof Node&&v.contains(l.initialTarget));this.inertia(e,m,i,Math.abs(g)/h,g>0?1:-1,c,Math.abs(f)/h,f>0?1:-1,u)}this.dispatchEvent(this.newGestureEvent(ni.End,l.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){const i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===ni.Tap){const t=new Date().getTime();let i=0;t-this._lastSetTapCountTime>ei.CLEAR_TAP_COUNT_TIME?i=1:i=2,this._lastSetTapCountTime=t,e.tapCount=i}else(e.type===ni.Change||e.type===ni.Contextmenu)&&(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(const t of this.ignoreTargets)if(t.contains(e.initialTarget))return;for(const t of this.targets)t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}}inertia(e,t,i,n,s,r,a,l,d){this.handle=po(e,()=>{const c=Date.now(),u=c-i;let h=0,g=0,f=!0;n+=ei.SCROLL_FRICTION*u,a+=ei.SCROLL_FRICTION*u,n>0&&(f=!1,h=s*n*u),a>0&&(f=!1,g=l*a*u);const m=this.newGestureEvent(ni.Change);m.translationX=h,m.translationY=g,t.forEach(v=>v.dispatchEvent(m)),f||this.inertia(e,t,c,n,s,r+h,a,l,d+g)})}onTouchMove(e){const t=Date.now();for(let i=0,n=e.changedTouches.length;i3&&(r.rollingPageX.shift(),r.rollingPageY.shift(),r.rollingTimestamps.shift()),r.rollingPageX.push(s.pageX),r.rollingPageY.push(s.pageY),r.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}ei.SCROLL_FRICTION=-.005;ei.HOLD_DELAY=700;ei.CLEAR_TAP_COUNT_TIME=400;jee([nn],ei,"isTouchDevice",null);class vm{constructor(){this._hooks=new de,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,n,s){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=n,this._onStopCallback=s;let r=e;try{e.setPointerCapture(t),this._hooks.add(je(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{r=Je(e)}this._hooks.add(J(r,Se.POINTER_MOVE,a=>{if(a.buttons!==i){this.stopMonitoring(!0);return}a.preventDefault(),this._pointerMoveCallback(a)})),this._hooks.add(J(r,Se.POINTER_UP,a=>this.stopMonitoring(!0)))}}function UM(o){return`--vscode-${o.replace(/\./g,"-")}`}function Ee(o){return`var(${UM(o)})`}function Kee(o,e){return`var(${UM(o)}, ${e})`}const N8={ColorContribution:"base.contributions.colors"};class qee{constructor(){this._onDidChangeSchema=new W,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,s){const r={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:s};this.colorsById[e]=r;const a={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return s&&(a.deprecationMessage=s),this.colorSchema.properties[e]=a,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map(e=>this.colorsById[e])}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i&&i.defaults){const n=i.defaults[t.type];return na(n,t)}}getColorSchema(){return this.colorSchema}toString(){const e=(t,i)=>{const n=t.indexOf(".")===-1?0:1,s=i.indexOf(".")===-1?0:1;return n!==s?n-s:t.localeCompare(i)};return Object.keys(this.colorsById).sort(e).map(t=>`- \`${t}\`: ${this.colorsById[t].description}`).join(` -`)}}const Oy=new qee;xi.add(N8.ColorContribution,Oy);function M(o,e,t,i,n){return Oy.registerColor(o,e,t,i,n)}const be=M("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},p("foreground","Overall foreground color. This color is only used if not overridden by a component."));M("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},p("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component."));const Gee=M("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},p("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component."));M("descriptionForeground",{light:"#717171",dark:We(be,.7),hcDark:We(be,.7),hcLight:We(be,.7)},p("descriptionForeground","Foreground color for description text providing additional information, for example for a label."));const Or=M("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},p("iconForeground","The default color for icons in the workbench.")),Ho=M("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},p("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),Lt=M("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},p("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),fi=M("contrastActiveBorder",{light:null,dark:null,hcDark:Ho,hcLight:Ho},p("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast."));M("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},p("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));M("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:Y.black,hcLight:"#292929"},p("textSeparatorForeground","Color for text separators."));const Zee=M("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},p("textLinkForeground","Foreground color for links in text."));M("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},p("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover."));M("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},p("textPreformatForeground","Foreground color for preformatted text segments."));M("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},p("textPreformatBackground","Background color for preformatted text segments."));M("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},p("textBlockQuoteBackground","Background color for block quotes in text."));M("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:Y.white,hcLight:"#292929"},p("textBlockQuoteBorder","Border color for block quotes in text."));M("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:Y.black,hcLight:"#F2F2F2"},p("textCodeBlockBackground","Background color for code blocks in text."));const ml=M("widget.shadow",{dark:We(Y.black,.36),light:We(Y.black,.16),hcDark:null,hcLight:null},p("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),jM=M("widget.border",{dark:null,light:null,hcDark:Lt,hcLight:Lt},p("widgetBorder","Border color of widgets such as find/replace inside the editor.")),T8=M("input.background",{dark:"#3C3C3C",light:Y.white,hcDark:Y.black,hcLight:Y.white},p("inputBoxBackground","Input box background.")),M8=M("input.foreground",{dark:be,light:be,hcDark:be,hcLight:be},p("inputBoxForeground","Input box foreground.")),A8=M("input.border",{dark:null,light:null,hcDark:Lt,hcLight:Lt},p("inputBoxBorder","Input box border.")),KM=M("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:Lt,hcLight:Lt},p("inputBoxActiveOptionBorder","Border color of activated options in input fields."));M("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},p("inputOption.hoverBackground","Background color of activated options in input fields."));const Ih=M("inputOption.activeBackground",{dark:We(Ho,.4),light:We(Ho,.2),hcDark:Y.transparent,hcLight:Y.transparent},p("inputOption.activeBackground","Background hover color of options in input fields.")),qM=M("inputOption.activeForeground",{dark:Y.white,light:Y.black,hcDark:be,hcLight:be},p("inputOption.activeForeground","Foreground color of activated options in input fields."));M("input.placeholderForeground",{light:We(be,.5),dark:We(be,.5),hcDark:We(be,.7),hcLight:We(be,.7)},p("inputPlaceholderForeground","Input box foreground color for placeholder text."));const Yee=M("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:Y.black,hcLight:Y.white},p("inputValidationInfoBackground","Input validation background color for information severity.")),Xee=M("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:be},p("inputValidationInfoForeground","Input validation foreground color for information severity.")),Qee=M("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:Lt,hcLight:Lt},p("inputValidationInfoBorder","Input validation border color for information severity.")),Jee=M("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:Y.black,hcLight:Y.white},p("inputValidationWarningBackground","Input validation background color for warning severity.")),ete=M("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:be},p("inputValidationWarningForeground","Input validation foreground color for warning severity.")),tte=M("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:Lt,hcLight:Lt},p("inputValidationWarningBorder","Input validation border color for warning severity.")),ite=M("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:Y.black,hcLight:Y.white},p("inputValidationErrorBackground","Input validation background color for error severity.")),nte=M("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:be},p("inputValidationErrorForeground","Input validation foreground color for error severity.")),ste=M("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:Lt,hcLight:Lt},p("inputValidationErrorBorder","Input validation border color for error severity.")),_l=M("dropdown.background",{dark:"#3C3C3C",light:Y.white,hcDark:Y.black,hcLight:Y.white},p("dropdownBackground","Dropdown background.")),ote=M("dropdown.listBackground",{dark:null,light:null,hcDark:Y.black,hcLight:Y.white},p("dropdownListBackground","Dropdown list background.")),xd=M("dropdown.foreground",{dark:"#F0F0F0",light:be,hcDark:Y.white,hcLight:be},p("dropdownForeground","Dropdown foreground.")),If=M("dropdown.border",{dark:_l,light:"#CECECE",hcDark:Lt,hcLight:Lt},p("dropdownBorder","Dropdown border.")),f_=M("button.foreground",{dark:Y.white,light:Y.white,hcDark:Y.white,hcLight:Y.white},p("buttonForeground","Button foreground color.")),rte=M("button.separator",{dark:We(f_,.4),light:We(f_,.4),hcDark:We(f_,.4),hcLight:We(f_,.4)},p("buttonSeparator","Button separator color.")),p_=M("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},p("buttonBackground","Button background color.")),ate=M("button.hoverBackground",{dark:zr(p_,.2),light:Fu(p_,.2),hcDark:p_,hcLight:p_},p("buttonHoverBackground","Button background color when hovering.")),lte=M("button.border",{dark:Lt,light:Lt,hcDark:Lt,hcLight:Lt},p("buttonBorder","Button border color.")),dte=M("button.secondaryForeground",{dark:Y.white,light:Y.white,hcDark:Y.white,hcLight:be},p("buttonSecondaryForeground","Secondary button foreground color.")),iE=M("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:Y.white},p("buttonSecondaryBackground","Secondary button background color.")),cte=M("button.secondaryHoverBackground",{dark:zr(iE,.2),light:Fu(iE,.2),hcDark:null,hcLight:null},p("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),y1=M("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:Y.black,hcLight:"#0F4A85"},p("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),ute=M("badge.foreground",{dark:Y.white,light:"#333",hcDark:Y.white,hcLight:Y.white},p("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),hte=M("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},p("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),m_=M("scrollbarSlider.background",{dark:Y.fromHex("#797979").transparent(.4),light:Y.fromHex("#646464").transparent(.4),hcDark:We(Lt,.6),hcLight:We(Lt,.4)},p("scrollbarSliderBackground","Scrollbar slider background color.")),__=M("scrollbarSlider.hoverBackground",{dark:Y.fromHex("#646464").transparent(.7),light:Y.fromHex("#646464").transparent(.7),hcDark:We(Lt,.8),hcLight:We(Lt,.8)},p("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),v_=M("scrollbarSlider.activeBackground",{dark:Y.fromHex("#BFBFBF").transparent(.4),light:Y.fromHex("#000000").transparent(.6),hcDark:Lt,hcLight:Lt},p("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),gte=M("progressBar.background",{dark:Y.fromHex("#0E70C0"),light:Y.fromHex("#0E70C0"),hcDark:Lt,hcLight:Lt},p("progressBarBackground","Background color of the progress bar that can show for long running operations."));M("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},p("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const vl=M("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},p("editorError.foreground","Foreground color of error squigglies in the editor.")),fte=M("editorError.border",{dark:null,light:null,hcDark:Y.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},p("errorBorder","If set, color of double underlines for errors in the editor."));M("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},p("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const zo=M("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},p("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),Bv=M("editorWarning.border",{dark:null,light:null,hcDark:Y.fromHex("#FFCC00").transparent(.8),hcLight:Y.fromHex("#FFCC00").transparent(.8)},p("warningBorder","If set, color of double underlines for warnings in the editor."));M("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},p("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const Ks=M("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},p("editorInfo.foreground","Foreground color of info squigglies in the editor.")),Wv=M("editorInfo.border",{dark:null,light:null,hcDark:Y.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},p("infoBorder","If set, color of double underlines for infos in the editor.")),pte=M("editorHint.foreground",{dark:Y.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},p("editorHint.foreground","Foreground color of hint squigglies in the editor."));M("editorHint.border",{dark:null,light:null,hcDark:Y.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},p("hintBorder","If set, color of double underlines for hints in the editor."));M("sash.hoverBorder",{dark:Ho,light:Ho,hcDark:Ho,hcLight:Ho},p("sashActiveBorder","Border color of active sashes."));const wn=M("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:Y.black,hcLight:Y.white},p("editorBackground","Editor background color.")),Fr=M("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:Y.white,hcLight:be},p("editorForeground","Editor default foreground color."));M("editorStickyScroll.background",{light:wn,dark:wn,hcDark:wn,hcLight:wn},p("editorStickyScrollBackground","Sticky scroll background color for the editor"));M("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:Y.fromHex("#0F4A85").transparent(.1)},p("editorStickyScrollHoverBackground","Sticky scroll on hover background color for the editor"));const Fi=M("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:Y.white},p("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),bl=M("editorWidget.foreground",{dark:be,light:be,hcDark:be,hcLight:be},p("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),Cl=M("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:Lt,hcLight:Lt},p("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),mte=M("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},p("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),i4=M("quickInput.background",{dark:Fi,light:Fi,hcDark:Fi,hcLight:Fi},p("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),_te=M("quickInput.foreground",{dark:bl,light:bl,hcDark:bl,hcLight:bl},p("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),vte=M("quickInputTitle.background",{dark:new Y(new kt(255,255,255,.105)),light:new Y(new kt(0,0,0,.06)),hcDark:"#000000",hcLight:Y.white},p("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),R8=M("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:Y.white,hcLight:"#0F4A85"},p("pickerGroupForeground","Quick picker color for grouping labels.")),bte=M("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:Y.white,hcLight:"#0F4A85"},p("pickerGroupBorder","Quick picker color for grouping borders.")),Cte=M("keybindingLabel.background",{dark:new Y(new kt(128,128,128,.17)),light:new Y(new kt(221,221,221,.4)),hcDark:Y.transparent,hcLight:Y.transparent},p("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),wte=M("keybindingLabel.foreground",{dark:Y.fromHex("#CCCCCC"),light:Y.fromHex("#555555"),hcDark:Y.white,hcLight:be},p("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),Ste=M("keybindingLabel.border",{dark:new Y(new kt(51,51,51,.6)),light:new Y(new kt(204,204,204,.4)),hcDark:new Y(new kt(111,195,223)),hcLight:Lt},p("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),yte=M("keybindingLabel.bottomBorder",{dark:new Y(new kt(68,68,68,.6)),light:new Y(new kt(187,187,187,.4)),hcDark:new Y(new kt(111,195,223)),hcLight:be},p("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),kc=M("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},p("editorSelectionBackground","Color of the editor selection.")),Lte=M("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:Y.white},p("editorSelectionForeground","Color of the selected text for high contrast.")),P8=M("editor.inactiveSelectionBackground",{light:We(kc,.5),dark:We(kc,.5),hcDark:We(kc,.7),hcLight:We(kc,.5)},p("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),GM=M("editor.selectionHighlightBackground",{light:d4(kc,wn,.3,.6),dark:d4(kc,wn,.3,.6),hcDark:null,hcLight:null},p("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0);M("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:fi,hcLight:fi},p("editorSelectionHighlightBorder","Border color for regions with the same content as the selection."));const Dte=M("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},p("editorFindMatch","Color of the current search match.")),wl=M("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},p("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),xte=M("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},p("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),kte=M("editor.findMatchBorder",{light:null,dark:null,hcDark:fi,hcLight:fi},p("editorFindMatchBorder","Border color of the current search match.")),Ic=M("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:fi,hcLight:fi},p("findMatchHighlightBorder","Border color of the other search matches.")),Ite=M("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:We(fi,.4),hcLight:We(fi,.4)},p("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0);M("searchEditor.findMatchBackground",{light:We(wl,.66),dark:We(wl,.66),hcDark:wl,hcLight:wl},p("searchEditor.queryMatch","Color of the Search Editor query matches."));M("searchEditor.findMatchBorder",{light:We(Ic,.66),dark:We(Ic,.66),hcDark:Ic,hcLight:Ic},p("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."));M("search.resultsInfoForeground",{light:be,dark:We(be,.65),hcDark:be,hcLight:be},p("search.resultsInfoForeground","Color of the text in the search viewlet's completion message."));M("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},p("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0);const xw=M("editorHoverWidget.background",{light:Fi,dark:Fi,hcDark:Fi,hcLight:Fi},p("hoverBackground","Background color of the editor hover."));M("editorHoverWidget.foreground",{light:bl,dark:bl,hcDark:bl,hcLight:bl},p("hoverForeground","Foreground color of the editor hover."));const Ete=M("editorHoverWidget.border",{light:Cl,dark:Cl,hcDark:Cl,hcLight:Cl},p("hoverBorder","Border color of the editor hover."));M("editorHoverWidget.statusBarBackground",{dark:zr(xw,.2),light:Fu(xw,.05),hcDark:Fi,hcLight:Fi},p("statusBarBackground","Background color of the editor hover status bar."));const Nte=M("editorLink.activeForeground",{dark:"#4E94CE",light:Y.blue,hcDark:Y.cyan,hcLight:"#292929"},p("activeLinkForeground","Color of active links.")),kd=M("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:Y.white,hcLight:Y.black},p("editorInlayHintForeground","Foreground color of inline hints")),Id=M("editorInlayHint.background",{dark:We(y1,.1),light:We(y1,.1),hcDark:We(Y.white,.1),hcLight:We(y1,.1)},p("editorInlayHintBackground","Background color of inline hints")),Tte=M("editorInlayHint.typeForeground",{dark:kd,light:kd,hcDark:kd,hcLight:kd},p("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),Mte=M("editorInlayHint.typeBackground",{dark:Id,light:Id,hcDark:Id,hcLight:Id},p("editorInlayHintBackgroundTypes","Background color of inline hints for types")),Ate=M("editorInlayHint.parameterForeground",{dark:kd,light:kd,hcDark:kd,hcLight:kd},p("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),Rte=M("editorInlayHint.parameterBackground",{dark:Id,light:Id,hcDark:Id,hcLight:Id},p("editorInlayHintBackgroundParameter","Background color of inline hints for parameters"));M("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},p("editorLightBulbForeground","The color used for the lightbulb actions icon."));M("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},p("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon."));M("editorLightBulbAi.foreground",{dark:Fu(Or,.4),light:zr(Or,1.7),hcDark:Or,hcLight:Or},p("editorLightBulbAiForeground","The color used for the lightbulb AI icon."));const nE=new Y(new kt(155,185,85,.2)),sE=new Y(new kt(255,0,0,.2)),Pte=M("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},p("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),Ote=M("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},p("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0);M("diffEditor.insertedLineBackground",{dark:nE,light:nE,hcDark:null,hcLight:null},p("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0);M("diffEditor.removedLineBackground",{dark:sE,light:sE,hcDark:null,hcLight:null},p("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0);M("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},p("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted."));M("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},p("diffEditorRemovedLineGutter","Background color for the margin where lines got removed."));const Fte=M("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},p("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),Bte=M("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},p("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content."));M("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},p("diffEditorInsertedOutline","Outline color for the text that got inserted."));M("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},p("diffEditorRemovedOutline","Outline color for text that got removed."));M("diffEditor.border",{dark:null,light:null,hcDark:Lt,hcLight:Lt},p("diffEditorBorder","Border color between the two text editors."));M("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},p("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views."));M("diffEditor.unchangedRegionBackground",{dark:"sideBar.background",light:"sideBar.background",hcDark:"sideBar.background",hcLight:"sideBar.background"},p("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor."));M("diffEditor.unchangedRegionForeground",{dark:"foreground",light:"foreground",hcDark:"foreground",hcLight:"foreground"},p("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor."));M("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},p("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor."));const Wte=M("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},p("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Vte=M("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},p("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Hte=M("list.focusOutline",{dark:Ho,light:Ho,hcDark:fi,hcLight:fi},p("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),zte=M("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},p("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),Ed=M("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:Y.fromHex("#0F4A85").transparent(.1)},p("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Sl=M("list.activeSelectionForeground",{dark:Y.white,light:Y.white,hcDark:null,hcLight:null},p("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),b_=M("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},p("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),$te=M("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:Y.fromHex("#0F4A85").transparent(.1)},p("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Ute=M("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},p("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),jte=M("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},p("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Kte=M("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},p("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),qte=M("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},p("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),O8=M("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:Y.white.transparent(.1),hcLight:Y.fromHex("#0F4A85").transparent(.1)},p("listHoverBackground","List/Tree background when hovering over items using the mouse.")),F8=M("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},p("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),Gte=M("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},p("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),Br=M("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:Ho,hcLight:Ho},p("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),tC=M("list.focusHighlightForeground",{dark:Br,light:Lie(Ed,Br,"#BBE7FF"),hcDark:Br,hcLight:Br},p("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));M("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},p("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer."));M("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},p("listErrorForeground","Foreground color of list items containing errors."));M("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},p("listWarningForeground","Foreground color of list items containing warnings."));const Zte=M("listFilterWidget.background",{light:Fu(Fi,0),dark:zr(Fi,0),hcDark:Fi,hcLight:Fi},p("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),Yte=M("listFilterWidget.outline",{dark:Y.transparent,light:Y.transparent,hcDark:"#f38518",hcLight:"#007ACC"},p("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),Xte=M("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:Lt,hcLight:Lt},p("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),Qte=M("listFilterWidget.shadow",{dark:ml,light:ml,hcDark:ml,hcLight:ml},p("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees."));M("list.filterMatchBackground",{dark:wl,light:wl,hcDark:null,hcLight:null},p("listFilterMatchHighlight","Background color of the filtered match."));M("list.filterMatchBorder",{dark:Ic,light:Ic,hcDark:Lt,hcLight:fi},p("listFilterMatchHighlightBorder","Border color of the filtered match."));const C_=M("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},p("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),Jte=M("tree.inactiveIndentGuidesStroke",{dark:We(C_,.4),light:We(C_,.4),hcDark:We(C_,.4),hcLight:We(C_,.4)},p("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),eie=M("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},p("tableColumnsBorder","Table border color between columns.")),tie=M("tree.tableOddRowsBackground",{dark:We(be,.04),light:We(be,.04),hcDark:null,hcLight:null},p("tableOddRowsBackgroundColor","Background color for odd table rows."));M("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},p("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized. "));const iie=M("checkbox.background",{dark:_l,light:_l,hcDark:_l,hcLight:_l},p("checkbox.background","Background color of checkbox widget."));M("checkbox.selectBackground",{dark:Fi,light:Fi,hcDark:Fi,hcLight:Fi},p("checkbox.select.background","Background color of checkbox widget when the element it's in is selected."));const nie=M("checkbox.foreground",{dark:xd,light:xd,hcDark:xd,hcLight:xd},p("checkbox.foreground","Foreground color of checkbox widget.")),sie=M("checkbox.border",{dark:If,light:If,hcDark:If,hcLight:If},p("checkbox.border","Border color of checkbox widget."));M("checkbox.selectBorder",{dark:Or,light:Or,hcDark:Or,hcLight:Or},p("checkbox.select.border","Border color of checkbox widget when the element it's in is selected."));const n4=M("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,p("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),Eh=M("quickInputList.focusForeground",{dark:Sl,light:Sl,hcDark:Sl,hcLight:Sl},p("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),Ef=M("quickInputList.focusIconForeground",{dark:b_,light:b_,hcDark:b_,hcLight:b_},p("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),Nh=M("quickInputList.focusBackground",{dark:Vv(n4,Ed),light:Vv(n4,Ed),hcDark:null,hcLight:null},p("quickInput.listFocusBackground","Quick picker background color for the focused item.")),oie=M("menu.border",{dark:null,light:null,hcDark:Lt,hcLight:Lt},p("menuBorder","Border color of menus.")),rie=M("menu.foreground",{dark:xd,light:xd,hcDark:xd,hcLight:xd},p("menuForeground","Foreground color of menu items.")),aie=M("menu.background",{dark:_l,light:_l,hcDark:_l,hcLight:_l},p("menuBackground","Background color of menu items.")),lie=M("menu.selectionForeground",{dark:Sl,light:Sl,hcDark:Sl,hcLight:Sl},p("menuSelectionForeground","Foreground color of the selected menu item in menus.")),die=M("menu.selectionBackground",{dark:Ed,light:Ed,hcDark:Ed,hcLight:Ed},p("menuSelectionBackground","Background color of the selected menu item in menus.")),cie=M("menu.selectionBorder",{dark:null,light:null,hcDark:fi,hcLight:fi},p("menuSelectionBorder","Border color of the selected menu item in menus.")),uie=M("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:Lt,hcLight:Lt},p("menuSeparatorBackground","Color of a separator menu item in menus.")),oE=M("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},p("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse"));M("toolbar.hoverOutline",{dark:null,light:null,hcDark:fi,hcLight:fi},p("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse"));M("toolbar.activeBackground",{dark:zr(oE,.1),light:Fu(oE,.1),hcDark:null,hcLight:null},p("toolbarActiveBackground","Toolbar background when holding the mouse over actions"));M("editor.snippetTabstopHighlightBackground",{dark:new Y(new kt(124,124,124,.3)),light:new Y(new kt(10,50,100,.2)),hcDark:new Y(new kt(124,124,124,.3)),hcLight:new Y(new kt(10,50,100,.2))},p("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop."));M("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},p("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop."));M("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},p("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet."));M("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new Y(new kt(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},p("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet."));const hie=M("breadcrumb.foreground",{light:We(be,.8),dark:We(be,.8),hcDark:We(be,.8),hcLight:We(be,.8)},p("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),gie=M("breadcrumb.background",{light:wn,dark:wn,hcDark:wn,hcLight:wn},p("breadcrumbsBackground","Background color of breadcrumb items.")),s4=M("breadcrumb.focusForeground",{light:Fu(be,.2),dark:zr(be,.1),hcDark:zr(be,.1),hcLight:zr(be,.1)},p("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),fie=M("breadcrumb.activeSelectionForeground",{light:Fu(be,.2),dark:zr(be,.1),hcDark:zr(be,.1),hcLight:zr(be,.1)},p("breadcrumbsSelectedForeground","Color of selected breadcrumb items."));M("breadcrumbPicker.background",{light:Fi,dark:Fi,hcDark:Fi,hcLight:Fi},p("breadcrumbsSelectedBackground","Background color of breadcrumb item picker."));const B8=.5,o4=Y.fromHex("#40C8AE").transparent(B8),r4=Y.fromHex("#40A6FF").transparent(B8),a4=Y.fromHex("#606060").transparent(.4),Wr=.4,Ap=1,Nf=M("merge.currentHeaderBackground",{dark:o4,light:o4,hcDark:null,hcLight:null},p("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);M("merge.currentContentBackground",{dark:We(Nf,Wr),light:We(Nf,Wr),hcDark:We(Nf,Wr),hcLight:We(Nf,Wr)},p("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const Tf=M("merge.incomingHeaderBackground",{dark:r4,light:r4,hcDark:null,hcLight:null},p("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);M("merge.incomingContentBackground",{dark:We(Tf,Wr),light:We(Tf,Wr),hcDark:We(Tf,Wr),hcLight:We(Tf,Wr)},p("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const Mf=M("merge.commonHeaderBackground",{dark:a4,light:a4,hcDark:null,hcLight:null},p("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);M("merge.commonContentBackground",{dark:We(Mf,Wr),light:We(Mf,Wr),hcDark:We(Mf,Wr),hcLight:We(Mf,Wr)},p("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const Rp=M("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},p("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."));M("editorOverviewRuler.currentContentForeground",{dark:We(Nf,Ap),light:We(Nf,Ap),hcDark:Rp,hcLight:Rp},p("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts."));M("editorOverviewRuler.incomingContentForeground",{dark:We(Tf,Ap),light:We(Tf,Ap),hcDark:Rp,hcLight:Rp},p("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts."));M("editorOverviewRuler.commonContentForeground",{dark:We(Mf,Ap),light:We(Mf,Ap),hcDark:Rp,hcLight:Rp},p("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts."));const ZM=M("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},p("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),w_=M("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},p("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Af=M("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},p("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),Fy=M("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},p("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),l4=M("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},p("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),pie=M("minimap.infoHighlight",{dark:Ks,light:Ks,hcDark:Wv,hcLight:Wv},p("minimapInfo","Minimap marker color for infos.")),mie=M("minimap.warningHighlight",{dark:zo,light:zo,hcDark:Bv,hcLight:Bv},p("overviewRuleWarning","Minimap marker color for warnings.")),_ie=M("minimap.errorHighlight",{dark:new Y(new kt(255,18,18,.7)),light:new Y(new kt(255,18,18,.7)),hcDark:new Y(new kt(255,50,50,1)),hcLight:"#B5200D"},p("minimapError","Minimap marker color for errors.")),vie=M("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},p("minimapBackground","Minimap background color.")),bie=M("minimap.foregroundOpacity",{dark:Y.fromHex("#000f"),light:Y.fromHex("#000f"),hcDark:Y.fromHex("#000f"),hcLight:Y.fromHex("#000f")},p("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.'));M("minimapSlider.background",{light:We(m_,.5),dark:We(m_,.5),hcDark:We(m_,.5),hcLight:We(m_,.5)},p("minimapSliderBackground","Minimap slider background color."));M("minimapSlider.hoverBackground",{light:We(__,.5),dark:We(__,.5),hcDark:We(__,.5),hcLight:We(__,.5)},p("minimapSliderHoverBackground","Minimap slider background color when hovering."));M("minimapSlider.activeBackground",{light:We(v_,.5),dark:We(v_,.5),hcDark:We(v_,.5),hcLight:We(v_,.5)},p("minimapSliderActiveBackground","Minimap slider background color when clicked on."));const Cie=M("problemsErrorIcon.foreground",{dark:vl,light:vl,hcDark:vl,hcLight:vl},p("problemsErrorIconForeground","The color used for the problems error icon.")),wie=M("problemsWarningIcon.foreground",{dark:zo,light:zo,hcDark:zo,hcLight:zo},p("problemsWarningIconForeground","The color used for the problems warning icon.")),Sie=M("problemsInfoIcon.foreground",{dark:Ks,light:Ks,hcDark:Ks,hcLight:Ks},p("problemsInfoIconForeground","The color used for the problems info icon."));M("charts.foreground",{dark:be,light:be,hcDark:be,hcLight:be},p("chartsForeground","The foreground color used in charts."));M("charts.lines",{dark:We(be,.5),light:We(be,.5),hcDark:We(be,.5),hcLight:We(be,.5)},p("chartsLines","The color used for horizontal lines in charts."));M("charts.red",{dark:vl,light:vl,hcDark:vl,hcLight:vl},p("chartsRed","The red color used in chart visualizations."));M("charts.blue",{dark:Ks,light:Ks,hcDark:Ks,hcLight:Ks},p("chartsBlue","The blue color used in chart visualizations."));M("charts.yellow",{dark:zo,light:zo,hcDark:zo,hcLight:zo},p("chartsYellow","The yellow color used in chart visualizations."));M("charts.orange",{dark:Af,light:Af,hcDark:Af,hcLight:Af},p("chartsOrange","The orange color used in chart visualizations."));M("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},p("chartsGreen","The green color used in chart visualizations."));M("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},p("chartsPurple","The purple color used in chart visualizations."));function yie(o,e){var t,i,n,s;switch(o.op){case 0:return(t=na(o.value,e))===null||t===void 0?void 0:t.darken(o.factor);case 1:return(i=na(o.value,e))===null||i===void 0?void 0:i.lighten(o.factor);case 2:return(n=na(o.value,e))===null||n===void 0?void 0:n.transparent(o.factor);case 3:{const r=na(o.background,e);return r?(s=na(o.value,e))===null||s===void 0?void 0:s.makeOpaque(r):na(o.value,e)}case 4:for(const r of o.values){const a=na(r,e);if(a)return a}return;case 6:return na(e.defines(o.if)?o.then:o.else,e);case 5:{const r=na(o.value,e);if(!r)return;const a=na(o.background,e);return a?r.isDarkerThan(a)?Y.getLighterColor(r,a,o.factor).transparent(o.transparency):Y.getDarkerColor(r,a,o.factor).transparent(o.transparency):r.transparent(o.factor*o.transparency)}default:throw by()}}function Fu(o,e){return{op:0,value:o,factor:e}}function zr(o,e){return{op:1,value:o,factor:e}}function We(o,e){return{op:2,value:o,factor:e}}function Vv(...o){return{op:4,values:o}}function Lie(o,e,t){return{op:6,if:o,then:e,else:t}}function d4(o,e,t,i){return{op:5,value:o,background:e,factor:t,transparency:i}}function na(o,e){if(o!==null){if(typeof o=="string")return o[0]==="#"?Y.fromHex(o):e.getColor(o);if(o instanceof Y)return o;if(typeof o=="object")return yie(o,e)}}const W8="vscode://schemas/workbench-colors",V8=xi.as(My.JSONContribution);V8.registerSchema(W8,Oy.getColorSchema());const c4=new Yt(()=>V8.notifySchemaChanged(W8),200);Oy.onDidChangeSchema(()=>{c4.isScheduled()||c4.schedule()});class By{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(e){return new H8(this.x-e.scrollX,this.y-e.scrollY)}}class H8{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(e){return new By(this.clientX+e.scrollX,this.clientY+e.scrollY)}}class Die{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class xie{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function YM(o){const e=gn(o);return new Die(e.left,e.top,e.width,e.height)}function XM(o,e,t){const i=e.width/o.offsetWidth,n=e.height/o.offsetHeight,s=(t.x-e.x)/i,r=(t.y-e.y)/n;return new xie(s,r)}class gu extends Pr{constructor(e,t,i){super(Je(i),e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new By(this.posx,this.posy),this.editorPos=YM(i),this.relativePos=XM(i,this.editorPos,this.pos)}}class kie{constructor(e){this._editorViewDomNode=e}_create(e){return new gu(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return J(e,"contextmenu",i=>{t(this._create(i))})}onMouseUp(e,t){return J(e,"mouseup",i=>{t(this._create(i))})}onMouseDown(e,t){return J(e,Se.MOUSE_DOWN,i=>{t(this._create(i))})}onPointerDown(e,t){return J(e,Se.POINTER_DOWN,i=>{t(this._create(i),i.pointerId)})}onMouseLeave(e,t){return J(e,Se.MOUSE_LEAVE,i=>{t(this._create(i))})}onMouseMove(e,t){return J(e,"mousemove",i=>t(this._create(i)))}}class Iie{constructor(e){this._editorViewDomNode=e}_create(e){return new gu(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return J(e,"pointerup",i=>{t(this._create(i))})}onPointerDown(e,t){return J(e,Se.POINTER_DOWN,i=>{t(this._create(i),i.pointerId)})}onPointerLeave(e,t){return J(e,Se.POINTER_LEAVE,i=>{t(this._create(i))})}onPointerMove(e,t){return J(e,"pointermove",i=>t(this._create(i)))}}class Eie extends q{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new vm),this._keydownListener=null}startMonitoring(e,t,i,n,s){this._keydownListener=Wi(e.ownerDocument,"keydown",r=>{r.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,r.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(e,t,i,r=>{n(new gu(r,!0,this._editorViewDomNode))},r=>{this._keydownListener.dispose(),s(r)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class o0{constructor(e){this._editor=e,this._instanceId=++o0._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new Yt(()=>this.garbageCollect(),1e3)}createClassNameRef(e){const t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const t=this.computeUniqueKey(e);let i=this._rules.get(t);if(!i){const n=this._counter++;i=new Nie(t,`dyn-rule-${this._instanceId}-${n}`,fw(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,i)}return i}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}}o0._idPool=0;class Nie{constructor(e,t,i,n){this.key=e,this.className=t,this.properties=n,this._referenceCount=0,this._styleElementDisposables=new de,this._styleElement=mr(i,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let i=`.${e} {`;for(const n in t){const s=t[n];let r;typeof s=="object"?r=Ee(s.id):r=s;const a=Tie(n);i+=` +`?new kO(l):null;i.reset(t.column-1);const c=i.next(l);return c?_h(this._getMultilineMatchRange(e,r,l,d,c.index,c[0]),c,n):t.lineNumber!==1||t.column!==1?this._doFindNextMatchMultiline(e,new z(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const s=e.getLineCount(),r=t.lineNumber,a=e.getLineContent(r),l=this._findFirstMatchInLine(i,a,r,t.column,n);if(l)return l;for(let d=1;d<=s;d++){const c=(r+d-1)%s,u=e.getLineContent(c+1),h=this._findFirstMatchInLine(i,u,c+1,1,n);if(h)return h}return null}static _findFirstMatchInLine(e,t,i,n,s){e.reset(n-1);const r=e.next(t);return r?_h(new k(i,r.index+1,i,r.index+1+r[0].length),r,s):null}static findPreviousMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const r=new xf(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindPreviousMatchMultiline(e,i,r,n):this._doFindPreviousMatchLineByLine(e,i,r,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const s=this._doFindMatchesMultiline(e,new k(1,1,t.lineNumber,t.column),i,n,10*bJ);if(s.length>0)return s[s.length-1];const r=e.getLineCount();return t.lineNumber!==r||t.column!==e.getLineMaxColumn(r)?this._doFindPreviousMatchMultiline(e,new z(r,e.getLineMaxColumn(r)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const s=e.getLineCount(),r=t.lineNumber,a=e.getLineContent(r).substring(0,t.column-1),l=this._findLastMatchInLine(i,a,r,n);if(l)return l;for(let d=1;d<=s;d++){const c=(s+r-d-1)%s,u=e.getLineContent(c+1),h=this._findLastMatchInLine(i,u,c+1,n);if(h)return h}return null}static _findLastMatchInLine(e,t,i,n){let s=null,r;for(e.reset(0);r=e.next(t);)s=_h(new k(i,r.index+1,i,r.index+1+r[0].length),r,n);return s}}function wJ(o,e,t,i,n){if(i===0)return!0;const s=e.charCodeAt(i-1);if(o.get(s)!==0||s===13||s===10)return!0;if(n>0){const r=e.charCodeAt(i);if(o.get(r)!==0)return!0}return!1}function SJ(o,e,t,i,n){if(i+n===t)return!0;const s=e.charCodeAt(i+n);if(o.get(s)!==0||s===13||s===10)return!0;if(n>0){const r=e.charCodeAt(i+n-1);if(o.get(r)!==0)return!0}return!1}function TM(o,e,t,i,n){return wJ(o,e,t,i,n)&&SJ(o,e,t,i,n)}class xf{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t||(i=this._searchRegex.exec(e),!i))return null;const n=i.index,s=i[0].length;if(n===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){uw(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=n,this._prevMatchLength=s,!this._wordSeparators||TM(this._wordSeparators,e,t,n,s))return i}while(i);return null}}class MM{static computeUnicodeHighlights(e,t,i){const n=i?i.startLineNumber:1,s=i?i.endLineNumber:e.getLineCount(),r=new IO(t),a=r.getCandidateCodePoints();let l;a==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${yJ(Array.from(a))}`,"g");const d=new xf(null,l),c=[];let u=!1,h,g=0,f=0,m=0;e:for(let v=n,_=s;v<=_;v++){const b=e.getLineContent(v),C=b.length;d.reset(0);do if(h=d.next(b),h){let w=h.index,S=h.index+h[0].length;if(w>0){const E=b.charCodeAt(w-1);bn(E)&&w--}if(S+1=1e3){u=!0;break e}c.push(new k(v,w+1,v,S+1))}}while(h)}return{ranges:c,hasMore:u,ambiguousCharacterCount:g,invisibleCharacterCount:f,nonBasicAsciiCharacterCount:m}}static computeUnicodeHighlightReason(e,t){const i=new IO(t);switch(i.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const s=e.codePointAt(0),r=i.ambiguousCharacters.getPrimaryConfusable(s),a=eg.getLocales().filter(l=>!eg.getInstance(new Set([...t.allowedLocales,l])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(r),notAmbiguousInLocales:a}}case 1:return{kind:2}}}}function yJ(o,e){return`[${qo(o.map(i=>String.fromCodePoint(i)).join(""))}]`}class IO{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=eg.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of Il.codePoints)EO(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,s=!1;if(t)for(const r of t){const a=r.codePointAt(0),l=Jb(r);n=n||l,!l&&!this.ambiguousCharacters.isAmbiguous(a)&&!Il.isInvisibleCharacter(a)&&(s=!0)}return!n&&s?0:this.options.invisibleCharacters&&!EO(e)&&Il.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function EO(o){return o===" "||o===` +`||o===" "}class C1{constructor(e,t,i){this.changes=e,this.moves=t,this.hitTimeout=i}}class _7{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}class ut{static addRange(e,t){let i=0;for(;it))return new ut(e,t)}static ofLength(e){return new ut(0,e)}static ofStartAndLength(e,t){return new ut(e,e+t)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new Ci(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new ut(this.start+e,this.endExclusive+e)}deltaStart(e){return new ut(this.start+e,this.endExclusive)}deltaEnd(e){return new ut(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new Ci(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new Ci(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;te.toString()).join(", ")}intersectsStrict(e){let t=0;for(;te+t.length,0)}}function Nv(o,e,t){const i=LJ(o,e);if(i!==-1)return o[i]}function LJ(o,e,t=o.length-1){for(let i=t;i>=0;i--){const n=o[i];if(e(n))return i}return-1}function Ep(o,e){const t=Tv(o,e);return t===-1?void 0:o[t]}function Tv(o,e,t=0,i=o.length){let n=t,s=i;for(;n0&&(t=n)}return t}function xJ(o,e){if(o.length===0)return;let t=o[0];for(let i=1;i=0&&(t=n)}return t}function kJ(o,e){return RM(o,(t,i)=>-e(t,i))}function IJ(o,e){if(o.length===0)return-1;let t=0;for(let i=1;i0&&(t=i)}return t}function EJ(o,e){for(const t of o){const i=e(t);if(i!==void 0)return i}}let yt=class rd{static fromRange(e){return new rd(e.startLineNumber,e.endLineNumber)}static fromRangeInclusive(e){return new rd(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(e.length===0)return[];let t=new va(e[0].slice());for(let i=1;it)throw new Ci(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&en.endLineNumberExclusive>=e.startLineNumber),i=Tv(this._normalizedRanges,n=>n.startLineNumber<=e.endLineNumberExclusive)+1;if(t===i)this._normalizedRanges.splice(t,0,e);else if(t===i-1){const n=this._normalizedRanges[t];this._normalizedRanges[t]=n.join(e)}else{const n=this._normalizedRanges[t].join(this._normalizedRanges[i-1]).join(e);this._normalizedRanges.splice(t,i-t,n)}}contains(e){const t=Ep(this._normalizedRanges,i=>i.startLineNumber<=e);return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=Ep(this._normalizedRanges,i=>i.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;const t=[];let i=0,n=0,s=null;for(;i=r.startLineNumber?s=new yt(s.startLineNumber,Math.max(s.endLineNumberExclusive,r.endLineNumberExclusive)):(t.push(s),s=r)}return s!==null&&t.push(s),new va(t)}subtractFrom(e){const t=Mv(this._normalizedRanges,r=>r.endLineNumberExclusive>=e.startLineNumber),i=Tv(this._normalizedRanges,r=>r.startLineNumber<=e.endLineNumberExclusive)+1;if(t===i)return new va([e]);const n=[];let s=e.startLineNumber;for(let r=t;rs&&n.push(new yt(s,a.startLineNumber)),s=a.endLineNumberExclusive}return se.toString()).join(", ")}getIntersection(e){const t=[];let i=0,n=0;for(;it.delta(e)))}}class Ol{static inverse(e,t,i){const n=[];let s=1,r=1;for(const l of e){const d=new vr(new yt(s,l.original.startLineNumber),new yt(r,l.modified.startLineNumber),void 0);d.modified.isEmpty||n.push(d),s=l.original.endLineNumberExclusive,r=l.modified.endLineNumberExclusive}const a=new vr(new yt(s,t+1),new yt(r,i+1),void 0);return a.modified.isEmpty||n.push(a),n}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new Ol(this.modified,this.original)}join(e){return new Ol(this.original.join(e.original),this.modified.join(e.modified))}}class vr extends Ol{constructor(e,t,i){super(e,t),this.innerChanges=i}flip(){var e;return new vr(this.modified,this.original,(e=this.innerChanges)===null||e===void 0?void 0:e.map(t=>t.flip()))}}class uu{constructor(e,t){this.originalRange=e,this.modifiedRange=t}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new uu(this.modifiedRange,this.originalRange)}}const NJ=3;class TJ{computeDiff(e,t,i){var n;const r=new RJ(e,t,{maxComputationTime:i.maxComputationTimeMs,shouldIgnoreTrimWhitespace:i.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),a=[];let l=null;for(const d of r.changes){let c;d.originalEndLineNumber===0?c=new yt(d.originalStartLineNumber+1,d.originalStartLineNumber+1):c=new yt(d.originalStartLineNumber,d.originalEndLineNumber+1);let u;d.modifiedEndLineNumber===0?u=new yt(d.modifiedStartLineNumber+1,d.modifiedStartLineNumber+1):u=new yt(d.modifiedStartLineNumber,d.modifiedEndLineNumber+1);let h=new vr(c,u,(n=d.charChanges)===null||n===void 0?void 0:n.map(g=>new uu(new k(g.originalStartLineNumber,g.originalStartColumn,g.originalEndLineNumber,g.originalEndColumn),new k(g.modifiedStartLineNumber,g.modifiedStartColumn,g.modifiedEndLineNumber,g.modifiedEndColumn))));l&&(l.modified.endLineNumberExclusive===h.modified.startLineNumber||l.original.endLineNumberExclusive===h.original.startLineNumber)&&(h=new vr(l.original.join(h.original),l.modified.join(h.modified),l.innerChanges&&h.innerChanges?l.innerChanges.concat(h.innerChanges):void 0),a.pop()),a.push(h),l=h}return Dv(()=>x8(a,(d,c)=>c.original.startLineNumber-d.original.endLineNumberExclusive===c.modified.startLineNumber-d.modified.endLineNumberExclusive&&d.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}}class ip{constructor(e,t,i,n,s,r,a,l){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=s,this.modifiedStartColumn=r,this.modifiedEndLineNumber=a,this.modifiedEndColumn=l}static createFromDiffChange(e,t,i){const n=t.getStartLineNumber(e.originalStart),s=t.getStartColumn(e.originalStart),r=t.getEndLineNumber(e.originalStart+e.originalLength-1),a=t.getEndColumn(e.originalStart+e.originalLength-1),l=i.getStartLineNumber(e.modifiedStart),d=i.getStartColumn(e.modifiedStart),c=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),u=i.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new ip(n,s,r,a,l,d,c,u)}}function AJ(o){if(o.length<=1)return o;const e=[o[0]];let t=e[0];for(let i=1,n=o.length;i0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&s()){const g=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),f=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(g.getElements().length>0&&f.getElements().length>0){let m=v7(g,f,s,!0).changes;a&&(m=AJ(m)),h=[];for(let v=0,_=m.length;v<_;v++)h.push(ip.createFromDiffChange(m[v],g,f))}}return new B_(l,d,c,u,h)}}class RJ{constructor(e,t,i){this.shouldComputeCharChanges=i.shouldComputeCharChanges,this.shouldPostProcessCharChanges=i.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=i.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=i.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new NO(e),this.modified=new NO(t),this.continueLineDiff=TO(i.maxComputationTime),this.continueCharDiff=TO(i.maxComputationTime===0?0:Math.min(i.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:void 0}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:void 0}]};const e=v7(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,i=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const a=[];for(let l=0,d=t.length;l1&&m>1;){const v=h.charCodeAt(f-2),_=g.charCodeAt(m-2);if(v!==_)break;f--,m--}(f>1||m>1)&&this._pushTrimWhitespaceCharChange(n,s+1,1,f,r+1,1,m)}{let f=qI(h,1),m=qI(g,1);const v=h.length+1,_=g.length+1;for(;f!0;const e=Date.now();return()=>Date.now()-e{i.push(Bn.fromOffsetPairs(n?n.getEndExclusives():fl.zero,s?s.getStarts():new fl(t,(n?n.seq2Range.endExclusive-n.seq1Range.endExclusive:0)+t)))}),i}static fromOffsetPairs(e,t){return new Bn(new ut(e.offset1,t.offset1),new ut(e.offset2,t.offset2))}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new Bn(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new Bn(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new Bn(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new Bn(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new Bn(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),i=this.seq2Range.intersect(e.seq2Range);if(!(!t||!i))return new Bn(t,i)}getStarts(){return new fl(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new fl(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class fl{constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}}fl.zero=new fl(0,0);fl.max=new fl(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);class Av{isValid(){return!0}}Av.instance=new Av;class PJ{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new Ci("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime0&&m>0&&r.get(f-1,m-1)===3&&(b+=a.get(f-1,m-1)),b+=n?n(f,m):1):b=-1;const C=Math.max(v,_,b);if(C===b){const w=f>0&&m>0?a.get(f-1,m-1):0;a.set(f,m,w+1),r.set(f,m,3)}else C===v?(a.set(f,m,0),r.set(f,m,1)):C===_&&(a.set(f,m,0),r.set(f,m,2));s.set(f,m,C)}const l=[];let d=e.length,c=t.length;function u(f,m){(f+1!==d||m+1!==c)&&l.push(new Bn(new ut(f+1,d),new ut(m+1,c))),d=f,c=m}let h=e.length-1,g=t.length-1;for(;h>=0&&g>=0;)r.get(h,g)===3?(u(h,g),h--,g--):r.get(h,g)===1?h--:g--;return u(-1,-1),l.reverse(),new Pd(l,!1)}}class b7{compute(e,t,i=Av.instance){if(e.length===0||t.length===0)return Pd.trivial(e,t);const n=e,s=t;function r(m,v){for(;mn.length||w>s.length)continue;const S=r(C,w);l.set(c,S);const x=C===_?d.get(c+1):d.get(c-1);if(d.set(c,S!==C?new MO(x,C,w,S-C):x),l.get(c)===n.length&&l.get(c)-c===s.length)break e}}let u=d.get(c);const h=[];let g=n.length,f=s.length;for(;;){const m=u?u.x+u.length:0,v=u?u.y+u.length:0;if((m!==g||v!==f)&&h.push(new Bn(new ut(m,g),new ut(v,f))),!u)break;g=u.x,f=u.y,u=u.prev}return h.reverse(),new Pd(h,!1)}}class MO{constructor(e,t,i,n){this.prev=e,this.x=t,this.y=i,this.length=n}}class FJ{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const i=this.negativeArr;this.negativeArr=new Int32Array(i.length*2),this.negativeArr.set(i)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const i=this.positiveArr;this.positiveArr=new Int32Array(i.length*2),this.positiveArr.set(i)}this.positiveArr[e]=t}}}class BJ{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}var AO,RO;class WJ{constructor(e,t){this.uri=e,this.value=t}}function VJ(o){return Array.isArray(o)}class Gi{constructor(e,t){if(this[AO]="ResourceMap",e instanceof Gi)this.map=new Map(e.map),this.toKey=t??Gi.defaultToKey;else if(VJ(e)){this.map=new Map,this.toKey=t??Gi.defaultToKey;for(const[i,n]of e)this.set(i,n)}else this.map=new Map,this.toKey=e??Gi.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new WJ(e,t)),this}get(e){var t;return(t=this.map.get(this.toKey(e)))===null||t===void 0?void 0:t.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){typeof t<"u"&&(e=e.bind(t));for(const[i,n]of this.map)e(n.value,n.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(AO=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}Gi.defaultToKey=o=>o.toString();class HJ{constructor(){this[RO]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return(e=this._head)===null||e===void 0?void 0:e.value}get last(){var e;return(e=this._tail)===null||e===void 0?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return t!==0&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,i!==0&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:this.addItemLast(n);break;case 1:this.addItemFirst(n);break;case 2:this.addItemLast(n);break;default:this.addItemLast(n);break}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:i.key,done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:i.value,done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:[i.key,i.value],done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}[(RO=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==1&&t!==2)){if(t===1){if(e===this._head)return;const i=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(i.previous=n,n.next=i),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===2){if(e===this._tail)return;const i=e.next,n=e.previous;e===this._head?(i.previous=void 0,this._head=i):(i.previous=n,n.next=i),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){const e=[];return this.forEach((t,i)=>{e.push([i,t])}),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class Pu extends HJ{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}class zJ{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,i]of e)this.set(t,i)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const t=this._m1.get(e);return t===void 0?!1:(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class PM{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),i.size===0&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}get(e){const t=this.map.get(e);return t||new Set}}class Sw{constructor(e,t,i){this.lines=e,this.considerWhitespaceChanges=i,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let n=!1;t.start>0&&t.endExclusive>=e.length&&(t=new ut(t.start-1,t.endExclusive),n=!0),this.lineRange=t,this.firstCharOffsetByLine[0]=0;for(let s=this.lineRange.start;sString.fromCharCode(t)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=OO(e>0?this.elements[e-1]:-1),i=OO(ei<=e);return new z(this.lineRange.start+t+1,e-this.firstCharOffsetByLine[t]+this.additionalOffsetByLine[t]+1)}translateRange(e){return k.fromPositions(this.translateOffset(e.start),this.translateOffset(e.endExclusive))}findWordContaining(e){if(e<0||e>=this.elements.length||!tx(this.elements[e]))return;let t=e;for(;t>0&&tx(this.elements[t-1]);)t--;let i=e;for(;ir<=e.start))!==null&&t!==void 0?t:0,s=(i=DJ(this.firstCharOffsetByLine,r=>e.endExclusive<=r))!==null&&i!==void 0?i:this.elements.length;return new ut(n,s)}}function tx(o){return o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57}const $J={0:0,1:0,2:0,3:10,4:2,5:3,6:3,7:10,8:10};function PO(o){return $J[o]}function OO(o){return o===10?8:o===13?7:GI(o)?6:o>=97&&o<=122?0:o>=65&&o<=90?1:o>=48&&o<=57?2:o===-1?3:o===44||o===59?5:4}function UJ(o,e,t,i,n,s){let{moves:r,excludedChanges:a}=KJ(o,e,t,s);if(!s.isValid())return[];const l=o.filter(c=>!a.has(c)),d=qJ(l,i,n,e,t,s);return Ak(r,d),r=GJ(r),r=r.filter(c=>{const u=c.original.toOffsetRange().slice(e).map(g=>g.trim());return u.join(` +`).length>=15&&jJ(u,g=>g.length>=2)>=2}),r=ZJ(o,r),r}function jJ(o,e){let t=0;for(const i of o)e(i)&&t++;return t}function KJ(o,e,t,i){const n=[],s=o.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new Np(l.original,e,l)),r=new Set(o.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new Np(l.modified,t,l))),a=new Set;for(const l of s){let d=-1,c;for(const u of r){const h=l.computeSimilarity(u);h>d&&(d=h,c=u)}if(d>.9&&c&&(r.delete(c),n.push(new Ol(l.range,c.range)),a.add(l.source),a.add(c.source)),!i.isValid())return{moves:n,excludedChanges:a}}return{moves:n,excludedChanges:a}}function qJ(o,e,t,i,n,s){const r=[],a=new PM;for(const h of o)for(let g=h.original.startLineNumber;gh.modified.startLineNumber,Md));for(const h of o){let g=[];for(let f=h.modified.startLineNumber;f{for(const w of g)if(w.originalLineRange.endLineNumberExclusive+1===b.endLineNumberExclusive&&w.modifiedLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive){w.originalLineRange=new yt(w.originalLineRange.startLineNumber,b.endLineNumberExclusive),w.modifiedLineRange=new yt(w.modifiedLineRange.startLineNumber,v.endLineNumberExclusive),_.push(w);return}const C={modifiedLineRange:v,originalLineRange:b};l.push(C),_.push(C)}),g=_}if(!s.isValid())return[]}l.sort(F9(ur(h=>h.modifiedLineRange.length,Md)));const d=new va,c=new va;for(const h of l){const g=h.modifiedLineRange.startLineNumber-h.originalLineRange.startLineNumber,f=d.subtractFrom(h.modifiedLineRange),m=c.subtractFrom(h.originalLineRange).getWithDelta(g),v=f.getIntersection(m);for(const _ of v.ranges){if(_.length<3)continue;const b=_,C=_.delta(-g);r.push(new Ol(C,b)),d.addRange(b),c.addRange(C)}}r.sort(ur(h=>h.original.startLineNumber,Md));const u=new t0(o);for(let h=0;hx.original.startLineNumber<=g.original.startLineNumber),m=Ep(o,x=>x.modified.startLineNumber<=g.modified.startLineNumber),v=Math.max(g.original.startLineNumber-f.original.startLineNumber,g.modified.startLineNumber-m.modified.startLineNumber),_=u.findLastMonotonous(x=>x.original.startLineNumberx.modified.startLineNumberi.length||y>n.length||d.contains(y)||c.contains(x)||!FO(i[x-1],n[y-1],s))break}w>0&&(c.addRange(new yt(g.original.startLineNumber-w,g.original.startLineNumber)),d.addRange(new yt(g.modified.startLineNumber-w,g.modified.startLineNumber)));let S;for(S=0;Si.length||y>n.length||d.contains(y)||c.contains(x)||!FO(i[x-1],n[y-1],s))break}S>0&&(c.addRange(new yt(g.original.endLineNumberExclusive,g.original.endLineNumberExclusive+S)),d.addRange(new yt(g.modified.endLineNumberExclusive,g.modified.endLineNumberExclusive+S))),(w>0||S>0)&&(r[h]=new Ol(new yt(g.original.startLineNumber-w,g.original.endLineNumberExclusive+S),new yt(g.modified.startLineNumber-w,g.modified.endLineNumberExclusive+S)))}return r}function FO(o,e,t){if(o.trim()===e.trim())return!0;if(o.length>300&&e.length>300)return!1;const n=new b7().compute(new Sw([o],new ut(0,1),!1),new Sw([e],new ut(0,1),!1),t);let s=0;const r=Bn.invert(n.diffs,o.length);for(const c of r)c.seq1Range.forEach(u=>{GI(o.charCodeAt(u))||s++});function a(c){let u=0;for(let h=0;he.length?o:e);return s/l>.6&&l>10}function GJ(o){if(o.length===0)return o;o.sort(ur(t=>t.original.startLineNumber,Md));const e=[o[0]];for(let t=1;t=0&&r>=0&&s+r<=2){e[e.length-1]=i.join(n);continue}e.push(n)}return e}function ZJ(o,e){const t=new t0(o);return e=e.filter(i=>{const n=t.findLastMonotonous(a=>a.original.startLineNumbera.modified.startLineNumber0&&(a=a.delta(d))}n.push(a)}return i.length>0&&n.push(i[i.length-1]),n}function YJ(o,e,t){if(!o.getBoundaryScore||!e.getBoundaryScore)return t;for(let i=0;i0?t[i-1]:void 0,s=t[i],r=i+1=i.start&&o.seq2Range.start-r>=n.start&&t.isStronglyEqual(o.seq2Range.start-r,o.seq2Range.endExclusive-r)&&r<100;)r++;r--;let a=0;for(;o.seq1Range.start+ad&&(d=f,l=c)}return o.delta(l)}function XJ(o,e,t){const i=[];for(const n of t){const s=i[i.length-1];if(!s){i.push(n);continue}n.seq1Range.start-s.seq1Range.endExclusive<=2||n.seq2Range.start-s.seq2Range.endExclusive<=2?i[i.length-1]=new Bn(s.seq1Range.join(n.seq1Range),s.seq2Range.join(n.seq2Range)):i.push(n)}return i}function QJ(o,e,t){const i=[];let n;function s(){if(!n)return;const a=n.s1Range.length-n.deleted;n.s2Range.length-n.added,Math.max(n.deleted,n.added)+(n.count-1)>a&&i.push(new Bn(n.s1Range,n.s2Range)),n=void 0}for(const a of t){let l=function(g,f){var m,v,_,b;if(!n||!n.s1Range.containsRange(g)||!n.s2Range.containsRange(f))if(n&&!(n.s1Range.endExclusive0||e.length>0;){const i=o[0],n=e[0];let s;i&&(!n||i.seq1Range.start0&&t[t.length-1].seq1Range.endExclusive>=s.seq1Range.start?t[t.length-1]=t[t.length-1].join(s):t.push(s)}return t}function eee(o,e,t){let i=t;if(i.length===0)return i;let n=0,s;do{s=!1;const r=[i[0]];for(let a=1;a5||g.seq1Range.length+g.seq2Range.length>5)};const l=i[a],d=r[r.length-1];c(d,l)?(s=!0,r[r.length-1]=r[r.length-1].join(l)):r.push(l)}i=r}while(n++<10&&s);return i}function tee(o,e,t){let i=t;if(i.length===0)return i;let n=0,s;do{s=!1;const a=[i[0]];for(let l=1;l5||m.length>500)return!1;const _=o.getText(m).trim();if(_.length>20||_.split(/\r\n|\r|\n/).length>1)return!1;const b=o.countLinesIn(g.seq1Range),C=g.seq1Range.length,w=e.countLinesIn(g.seq2Range),S=g.seq2Range.length,x=o.countLinesIn(f.seq1Range),y=f.seq1Range.length,I=e.countLinesIn(f.seq2Range),E=f.seq2Range.length,R=2*40+50;function j(O){return Math.min(O,R)}return Math.pow(Math.pow(j(b*40+C),1.5)+Math.pow(j(w*40+S),1.5),1.5)+Math.pow(Math.pow(j(x*40+y),1.5)+Math.pow(j(I*40+E),1.5),1.5)>(R**1.5)**1.5*1.3};const d=i[l],c=a[a.length-1];u(c,d)?(s=!0,a[a.length-1]=a[a.length-1].join(d)):a.push(d)}i=a}while(n++<10&&s);const r=[];return nG(i,(a,l,d)=>{let c=l;function u(_){return _.length>0&&_.trim().length<=3&&l.seq1Range.length+l.seq2Range.length>100}const h=o.extendToFullLines(l.seq1Range),g=o.getText(new ut(h.start,l.seq1Range.start));u(g)&&(c=c.deltaStart(-g.length));const f=o.getText(new ut(l.seq1Range.endExclusive,h.endExclusive));u(f)&&(c=c.deltaEnd(f.length));const m=Bn.fromOffsetPairs(a?a.getEndExclusives():fl.zero,d?d.getStarts():fl.max),v=c.intersect(m);r.push(v)}),r}class VO{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const t=e===0?0:HO(this.lines[e-1]),i=e===this.lines.length?0:HO(this.lines[e]);return 1e3-(t+i)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` +`)}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function HO(o){let e=0;for(;eS===x))return new C1([],[],!1);if(e.length===1&&e[0].length===0||t.length===1&&t[0].length===0)return new C1([new vr(new yt(1,e.length+1),new yt(1,t.length+1),[new uu(new k(1,1,e.length,e[0].length+1),new k(1,1,t.length,t[0].length+1))])],[],!1);const n=i.maxComputationTimeMs===0?Av.instance:new PJ(i.maxComputationTimeMs),s=!i.ignoreTrimWhitespace,r=new Map;function a(S){let x=r.get(S);return x===void 0&&(x=r.size,r.set(S,x)),x}const l=e.map(S=>a(S.trim())),d=t.map(S=>a(S.trim())),c=new VO(l,e),u=new VO(d,t),h=c.length+u.length<1700?this.dynamicProgrammingDiffing.compute(c,u,n,(S,x)=>e[S]===t[x]?t[x].length===0?.1:1+Math.log(1+t[x].length):.99):this.myersDiffingAlgorithm.compute(c,u);let g=h.diffs,f=h.hitTimeout;g=ZI(c,u,g),g=eee(c,u,g);const m=[],v=S=>{if(s)for(let x=0;xS.seq1Range.start-_===S.seq2Range.start-b);const x=S.seq1Range.start-_;v(x),_=S.seq1Range.endExclusive,b=S.seq2Range.endExclusive;const y=this.refineDiff(e,t,S,n,s);y.hitTimeout&&(f=!0);for(const I of y.mappings)m.push(I)}v(e.length-_);const C=zO(m,e,t);let w=[];return i.computeMoves&&(w=this.computeMoves(C,e,t,l,d,n,s)),Dv(()=>{function S(y,I){if(y.lineNumber<1||y.lineNumber>I.length)return!1;const E=I[y.lineNumber-1];return!(y.column<1||y.column>E.length+1)}function x(y,I){return!(y.startLineNumber<1||y.startLineNumber>I.length+1||y.endLineNumberExclusive<1||y.endLineNumberExclusive>I.length+1)}for(const y of C){if(!y.innerChanges)return!1;for(const I of y.innerChanges)if(!(S(I.modifiedRange.getStartPosition(),t)&&S(I.modifiedRange.getEndPosition(),t)&&S(I.originalRange.getStartPosition(),e)&&S(I.originalRange.getEndPosition(),e)))return!1;if(!x(y.modified,t)||!x(y.original,e))return!1}return!0}),new C1(C,w,f)}computeMoves(e,t,i,n,s,r,a){return UJ(e,t,i,n,s,r).map(c=>{const u=this.refineDiff(t,i,new Bn(c.original.toOffsetRange(),c.modified.toOffsetRange()),r,a),h=zO(u.mappings,t,i,!0);return new _7(c,h)})}refineDiff(e,t,i,n,s){const r=new Sw(e,i.seq1Range,s),a=new Sw(t,i.seq2Range,s),l=r.length+a.length<500?this.dynamicProgrammingDiffing.compute(r,a,n):this.myersDiffingAlgorithm.compute(r,a,n);let d=l.diffs;return d=ZI(r,a,d),d=QJ(r,a,d),d=XJ(r,a,d),d=tee(r,a,d),{mappings:d.map(u=>new uu(r.translateRange(u.seq1Range),a.translateRange(u.seq2Range))),hitTimeout:l.hitTimeout}}}function zO(o,e,t,i=!1){const n=[];for(const s of A9(o.map(r=>iee(r,e,t)),(r,a)=>r.original.overlapOrTouch(a.original)||r.modified.overlapOrTouch(a.modified))){const r=s[0],a=s[s.length-1];n.push(new vr(r.original.join(a.original),r.modified.join(a.modified),s.map(l=>l.innerChanges[0])))}return Dv(()=>!i&&n.length>0&&n[0].original.startLineNumber!==n[0].modified.startLineNumber?!1:x8(n,(s,r)=>r.original.startLineNumber-s.original.endLineNumberExclusive===r.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=t[o.modifiedRange.startLineNumber-1].length&&o.originalRange.startColumn-1>=e[o.originalRange.startLineNumber-1].length&&o.originalRange.startLineNumber<=o.originalRange.endLineNumber+n&&o.modifiedRange.startLineNumber<=o.modifiedRange.endLineNumber+n&&(i=1);const s=new yt(o.originalRange.startLineNumber+i,o.originalRange.endLineNumber+1+n),r=new yt(o.modifiedRange.startLineNumber+i,o.modifiedRange.endLineNumber+1+n);return new vr(s,r,[o])}const $O={getLegacy:()=>new TJ,getDefault:()=>new C7};function Hc(o,e){const t=Math.pow(10,e);return Math.round(o*t)/t}class kt{constructor(e,t,i,n=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,t))|0,this.b=Math.min(255,Math.max(0,i))|0,this.a=Hc(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class Ar{constructor(e,t,i,n){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=Hc(Math.max(Math.min(1,t),0),3),this.l=Hc(Math.max(Math.min(1,i),0),3),this.a=Hc(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,s=e.a,r=Math.max(t,i,n),a=Math.min(t,i,n);let l=0,d=0;const c=(a+r)/2,u=r-a;if(u>0){switch(d=Math.min(c<=.5?u/(2*c):u/(2-2*c),1),r){case t:l=(i-n)/u+(i1&&(i-=1),i<1/6?e+(t-e)*6*i:i<1/2?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:s}=e;let r,a,l;if(i===0)r=a=l=n;else{const d=n<.5?n*(1+i):n+i-n*i,c=2*n-d;r=Ar._hue2rgb(c,d,t+1/3),a=Ar._hue2rgb(c,d,t),l=Ar._hue2rgb(c,d,t-1/3)}return new kt(Math.round(r*255),Math.round(a*255),Math.round(l*255),s)}}class pl{constructor(e,t,i,n){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=Hc(Math.max(Math.min(1,t),0),3),this.v=Hc(Math.max(Math.min(1,i),0),3),this.a=Hc(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,s=Math.max(t,i,n),r=Math.min(t,i,n),a=s-r,l=s===0?0:a/s;let d;return a===0?d=0:s===t?d=((i-n)/a%6+6)%6:s===i?d=(n-t)/a+2:d=(t-i)/a+4,new pl(Math.round(d*60),l,s,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:s}=e,r=n*i,a=r*(1-Math.abs(t/60%2-1)),l=n-r;let[d,c,u]=[0,0,0];return t<60?(d=r,c=a):t<120?(d=a,c=r):t<180?(c=r,u=a):t<240?(c=a,u=r):t<300?(d=a,u=r):t<=360&&(d=r,u=a),d=Math.round((d+l)*255),c=Math.round((c+l)*255),u=Math.round((u+l)*255),new kt(d,c,u,s)}}class Y{static fromHex(e){return Y.Format.CSS.parseHex(e)||Y.red}static equals(e,t){return!e&&!t?!0:!e||!t?!1:e.equals(t)}get hsla(){return this._hsla?this._hsla:Ar.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:pl.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof kt)this.rgba=e;else if(e instanceof Ar)this._hsla=e,this.rgba=Ar.toRGBA(e);else if(e instanceof pl)this._hsva=e,this.rgba=pl.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&kt.equals(this.rgba,e.rgba)&&Ar.equals(this.hsla,e.hsla)&&pl.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=Y._relativeLuminanceForComponent(this.rgba.r),t=Y._relativeLuminanceForComponent(this.rgba.g),i=Y._relativeLuminanceForComponent(this.rgba.b),n=.2126*e+.7152*t+.0722*i;return Hc(n,4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t>i}isDarkerThan(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t0)for(const n of i){const s=n.filter(d=>d!==void 0),r=s[1],a=s[2];if(!a)continue;let l;if(r==="rgb"){const d=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;l=UO($m(o,n),Um(a,d),!1)}else if(r==="rgba"){const d=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=UO($m(o,n),Um(a,d),!0)}else if(r==="hsl"){const d=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;l=jO($m(o,n),Um(a,d),!1)}else if(r==="hsla"){const d=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=jO($m(o,n),Um(a,d),!0)}else r==="#"&&(l=nee($m(o,n),r+a));l&&e.push(l)}return e}function oee(o){return!o||typeof o.getValue!="function"||typeof o.positionAt!="function"?[]:see(o)}class ree extends aJ{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let i=0;ithis._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{const s=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>s&&(i=s,n=!0)}return n?{lineNumber:t,column:i}:e}}class zc{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}acceptNewModel(e){this._models[e.url]=new ree(ze.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}async computeUnicodeHighlights(e,t,i){const n=this._getModel(e);return n?MM.computeUnicodeHighlights(n,t,i):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async computeDiff(e,t,i,n){const s=this._getModel(e),r=this._getModel(t);return!s||!r?null:zc.computeDiff(s,r,i,n)}static computeDiff(e,t,i,n){const s=n==="advanced"?$O.getDefault():$O.getLegacy(),r=e.getLinesContent(),a=t.getLinesContent(),l=s.computeDiff(r,a,i),d=l.changes.length>0?!1:this._modelsAreIdentical(e,t);function c(u){return u.map(h=>{var g;return[h.original.startLineNumber,h.original.endLineNumberExclusive,h.modified.startLineNumber,h.modified.endLineNumberExclusive,(g=h.innerChanges)===null||g===void 0?void 0:g.map(f=>[f.originalRange.startLineNumber,f.originalRange.startColumn,f.originalRange.endLineNumber,f.originalRange.endColumn,f.modifiedRange.startLineNumber,f.modifiedRange.startColumn,f.modifiedRange.endLineNumber,f.modifiedRange.endColumn])]})}return{identical:d,quitEarly:l.hitTimeout,changes:c(l.changes),moves:l.moves.map(u=>[u.lineRangeMapping.original.startLineNumber,u.lineRangeMapping.original.endLineNumberExclusive,u.lineRangeMapping.modified.startLineNumber,u.lineRangeMapping.modified.endLineNumberExclusive,c(u.changes)])}}static _modelsAreIdentical(e,t){const i=e.getLineCount(),n=t.getLineCount();if(i!==n)return!1;for(let s=1;s<=i;s++){const r=e.getLineContent(s),a=t.getLineContent(s);if(r!==a)return!1}return!0}async computeMoreMinimalEdits(e,t,i){const n=this._getModel(e);if(!n)return t;const s=[];let r;t=t.slice(0).sort((l,d)=>{if(l.range&&d.range)return k.compareRangesUsingStarts(l.range,d.range);const c=l.range?0:1,u=d.range?0:1;return c-u});let a=0;for(let l=1;lzc._diffLimit){s.push({range:l,text:d});continue}const h=sJ(u,d,i),g=n.offsetAt(k.lift(l).getStartPosition());for(const f of h){const m=n.positionAt(g+f.originalStart),v=n.positionAt(g+f.originalStart+f.originalLength),_={text:d.substr(f.modifiedStart,f.modifiedLength),range:{startLineNumber:m.lineNumber,startColumn:m.column,endLineNumber:v.lineNumber,endColumn:v.column}};n.getValueInRange(_.range)!==_.text&&s.push(_)}}return typeof r=="number"&&s.push({eol:r,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}async computeLinks(e){const t=this._getModel(e);return t?hJ(t):null}async computeDefaultDocumentColors(e){const t=this._getModel(e);return t?oee(t):null}async textualSuggest(e,t,i,n){const s=new ds,r=new RegExp(i,n),a=new Set;e:for(const l of e){const d=this._getModel(l);if(d){for(const c of d.words(r))if(!(c===t||!isNaN(Number(c)))&&(a.add(c),a.size>zc._suggestionsLimit))break e}}return{words:Array.from(a),duration:s.elapsed()}}async computeWordRanges(e,t,i,n){const s=this._getModel(e);if(!s)return Object.create(null);const r=new RegExp(i,n),a=Object.create(null);for(let l=t.startLineNumber;lthis._host.fhr(a,l)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(r,t),Promise.resolve(Y2(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(i){return Promise.reject(i)}}}zc._diffLimit=1e5;zc._suggestionsLimit=1e4;typeof importScripts=="function"&&(globalThis.monaco=u8());const FM=bt("textResourceConfigurationService"),S7=bt("textResourcePropertiesService"),Me=bt("ILanguageFeaturesService");var aee=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},jm=function(o,e){return function(t,i){e(t,i,o)}};const KO=60*1e3,qO=5*60*1e3;function vh(o,e){const t=o.getModel(e);return!(!t||t.isTooLargeForSyncing())}let YI=class extends q{constructor(e,t,i,n,s){super(),this._modelService=e,this._workerManager=this._register(new dee(this._modelService,n)),this._logService=i,this._register(s.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(r,a)=>vh(this._modelService,r.uri)?this._workerManager.withWorker().then(l=>l.computeLinks(r.uri)).then(l=>l&&{links:l}):Promise.resolve({links:[]})})),this._register(s.completionProvider.register("*",new lee(this._workerManager,t,this._modelService,n)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return vh(this._modelService,e)}computedUnicodeHighlights(e,t,i){return this._workerManager.withWorker().then(n=>n.computedUnicodeHighlights(e,t,i))}async computeDiff(e,t,i,n){const s=await this._workerManager.withWorker().then(l=>l.computeDiff(e,t,i,n));if(!s)return null;return{identical:s.identical,quitEarly:s.quitEarly,changes:a(s.changes),moves:s.moves.map(l=>new _7(new Ol(new yt(l[0],l[1]),new yt(l[2],l[3])),a(l[4])))};function a(l){return l.map(d=>{var c;return new vr(new yt(d[0],d[1]),new yt(d[2],d[3]),(c=d[4])===null||c===void 0?void 0:c.map(u=>new uu(new k(u[0],u[1],u[2],u[3]),new k(u[4],u[5],u[6],u[7]))))})}}computeMoreMinimalEdits(e,t,i=!1){if(ls(t)){if(!vh(this._modelService,e))return Promise.resolve(t);const n=ds.create(),s=this._workerManager.withWorker().then(r=>r.computeMoreMinimalEdits(e,t,i));return s.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),n.elapsed())),Promise.race([s,au(1e3).then(()=>t)])}else return Promise.resolve(void 0)}canNavigateValueSet(e){return vh(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then(n=>n.navigateValueSet(e,t,i))}canComputeWordRanges(e){return vh(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then(i=>i.computeWordRanges(e,t))}};YI=aee([jm(0,Si),jm(1,FM),jm(2,bo),jm(3,si),jm(4,Me)],YI);class lee{constructor(e,t,i,n){this.languageConfigurationService=n,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}async provideCompletionItems(e,t){const i=this._configurationService.getValue(e.uri,t,"editor");if(i.wordBasedSuggestions==="off")return;const n=[];if(i.wordBasedSuggestions==="currentDocument")vh(this._modelService,e.uri)&&n.push(e.uri);else for(const u of this._modelService.getModels())vh(this._modelService,u.uri)&&(u===e?n.unshift(u.uri):(i.wordBasedSuggestions==="allDocuments"||u.getLanguageId()===e.getLanguageId())&&n.push(u.uri));if(n.length===0)return;const s=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),r=e.getWordAtPosition(t),a=r?new k(t.lineNumber,r.startColumn,t.lineNumber,r.endColumn):k.fromPositions(t),l=a.setEndPosition(t.lineNumber,t.column),c=await(await this._workerManager.withWorker()).textualSuggest(n,r==null?void 0:r.word,s);if(c)return{duration:c.duration,suggestions:c.words.map(u=>({kind:18,label:u,insertText:u,range:{insert:l,replace:a}}))}}}class dee extends q{constructor(e,t){super(),this.languageConfigurationService=t,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new kM).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(qO/2),kl),this._register(this._modelService.onModelRemoved(n=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>qO&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new BM(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class cee extends q{constructor(e,t,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){const n=new SM;n.cancelAndSet(()=>this._checkStopModelSync(),Math.round(KO/2)),this._register(n)}}dispose(){for(const e in this._syncedModels)jt(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(const i of e){const n=i.toString();this._syncedModels[n]||this._beginModelSync(i,t),this._syncedModels[n]&&(this._syncedModelsLastUsedTime[n]=new Date().getTime())}}_checkStopModelSync(){const e=new Date().getTime(),t=[];for(const i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>KO&&t.push(i);for(const i of t)this._stopModelSync(i)}_beginModelSync(e,t){const i=this._modelService.getModel(e);if(!i||!t&&i.isTooLargeForSyncing())return;const n=e.toString();this._proxy.acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const s=new de;s.add(i.onDidChangeContent(r=>{this._proxy.acceptModelChanged(n.toString(),r)})),s.add(i.onWillDispose(()=>{this._stopModelSync(n)})),s.add(je(()=>{this._proxy.acceptRemovedModel(n)})),this._syncedModels[n]=s}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],jt(t)}}class GO{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class ix{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class BM extends q{constructor(e,t,i,n){super(),this.languageConfigurationService=n,this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new ky(i),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new _Q(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new ix(this)))}catch(e){HI(e),this._worker=new GO(new zc(new ix(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>(HI(e),this._worker=new GO(new zc(new ix(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new cee(e,this._modelService,this._keepIdleModels))),this._modelManager}async _withSyncedResources(e,t=!1){return this._disposed?Promise.reject(_Z()):this._getProxy().then(i=>(this._getOrCreateModelManager(i).ensureSyncedResources(e,t),i))}computedUnicodeHighlights(e,t,i){return this._withSyncedResources([e]).then(n=>n.computeUnicodeHighlights(e.toString(),t,i))}computeDiff(e,t,i,n){return this._withSyncedResources([e,t],!0).then(s=>s.computeDiff(e.toString(),t.toString(),i,n))}computeMoreMinimalEdits(e,t,i){return this._withSyncedResources([e]).then(n=>n.computeMoreMinimalEdits(e.toString(),t,i))}computeLinks(e){return this._withSyncedResources([e]).then(t=>t.computeLinks(e.toString()))}computeDefaultDocumentColors(e){return this._withSyncedResources([e]).then(t=>t.computeDefaultDocumentColors(e.toString()))}async textualSuggest(e,t,i){const n=await this._withSyncedResources(e),s=i.source,r=i.flags;return n.textualSuggest(e.map(a=>a.toString()),t,s,r)}computeWordRanges(e,t){return this._withSyncedResources([e]).then(i=>{const n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);const s=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),r=s.source,a=s.flags;return i.computeWordRanges(e.toString(),t,r,a)})}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then(n=>{const s=this._modelService.getModel(e);if(!s)return null;const r=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId()).getWordDefinition(),a=r.source,l=r.flags;return n.navigateValueSet(e.toString(),t,i,a,l)})}dispose(){super.dispose(),this._disposed=!0}}function uee(o,e,t){return new hee(o,e,t)}class hee extends BM{constructor(e,t,i){super(e,i.keepIdleModels||!1,i.label,t),this._foreignModuleId=i.moduleId,this._foreignModuleCreateData=i.createData||null,this._foreignModuleHost=i.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||typeof this._foreignModuleHost[e]!="function")return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(i){return Promise.reject(i)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{const t=this._foreignModuleHost?Y2(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then(i=>{this._foreignModuleCreateData=null;const n=(a,l)=>e.fmr(a,l),s=(a,l)=>function(){const d=Array.prototype.slice.call(arguments,0);return l(a,d)},r={};for(const a of i)r[a]=s(a,n);return r})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(t=>this.getProxy())}}const i0={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"},Tp=new class{clone(){return this}equals(o){return this===o}};function WM(o,e){return new lM([new bv(0,"",o)],e)}function Ay(o,e){const t=new Uint32Array(2);return t[0]=0,t[1]=(o<<0|0|0|32768|2<<24)>>>0,new ly(t,e===null?Tp:e)}class Yn{static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static getClassNameFromMetadata(e){let i="mtk"+this.getForeground(e);const n=this.getFontStyle(e);return n&1&&(i+=" mtki"),n&2&&(i+=" mtkb"),n&4&&(i+=" mtku"),n&8&&(i+=" mtks"),i}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let s=`color: ${t[i]};`;n&1&&(s+="font-style: italic;"),n&2&&(s+="font-weight: bold;");let r="";return n&4&&(r+=" underline"),n&8&&(r+=" line-through"),r&&(s+=`text-decoration:${r};`),s}static getPresentationFromMetadata(e){const t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:!!(i&1),bold:!!(i&2),underline:!!(i&4),strikethrough:!!(i&8)}}}class Cn{static createEmpty(e,t){const i=Cn.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new Cn(n,e,t)}constructor(e,t,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=i}equals(e){return e instanceof Cn?this.slicedEquals(e,0,this._tokensCount):!1}slicedEquals(e,t,i){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;const n=t<<1,s=n+(i<<1);for(let r=n;r0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){const t=this._tokens[(e<<1)+1],i=Yn.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[(e<<1)+1];return Yn.getTokenType(t)}getForeground(e){const t=this._tokens[(e<<1)+1];return Yn.getForeground(t)}getClassName(e){const t=this._tokens[(e<<1)+1];return Yn.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[(e<<1)+1];return Yn.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[(e<<1)+1];return Yn.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return Cn.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new VM(this,e,t,i)}static convertToEndOffset(e,t){const n=(e.length>>>1)-1;for(let s=0;s>>1)-1;for(;it&&(n=s)}return i}withInserted(e){if(e.length===0)return this;let t=0,i=0,n="";const s=new Array;let r=0;for(;;){const a=tr){n+=this._text.substring(r,l.offset);const d=this._tokens[(t<<1)+1];s.push(n.length,d),r=l.offset}n+=l.text,s.push(n.length,l.tokenMetadata),i++}else break}return new Cn(new Uint32Array(s),n,this._languageIdCodec)}}Cn.defaultTokenMetadata=(32768|2<<24)>>>0;class VM{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let s=this._firstTokenIndex,r=e.getCount();s=i);s++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof VM?this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}class lo{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length,n=t.length;if(i!==n)return!1;for(let s=0;s=s||(a[l++]=new lo(Math.max(1,d.startColumn-n+1),Math.min(r+1,d.endColumn-n+1),d.className,d.type));return a}static filter(e,t,i,n){if(e.length===0)return[];const s=[];let r=0;for(let a=0,l=e.length;at||c.isEmpty()&&(d.type===0||d.type===3))continue;const u=c.startLineNumber===t?c.startColumn:i,h=c.endLineNumber===t?c.endColumn:n;s[r++]=new lo(u,h,d.inlineClassName,d.type)}return s}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const i=lo._typeCompare(e.type,t.type);return i!==0?i:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class gee{static normalize(e,t){if(t.length===0)return[];const i=[],n=new yw;let s=0;for(let r=0,a=t.length;r1){const m=e.charCodeAt(d-2);bn(m)&&d--}if(c>1){const m=e.charCodeAt(c-2);bn(m)&&c--}const g=d-1,f=c-2;s=n.consumeLowerThan(g,s,i),n.count===0&&(s=g),n.insert(f,u,h)}return n.consumeLowerThan(1073741824,s,i),i}}class En{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}class y7{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class Ou{constructor(e,t,i,n,s,r,a,l,d,c,u,h,g,f,m,v,_,b,C){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=s,this.containsRTL=r,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=d.sort(lo.compare),this.tabSize=c,this.startVisibleColumn=u,this.spaceWidth=h,this.stopRenderingLineAfter=m,this.renderWhitespace=v==="all"?4:v==="boundary"?1:v==="selection"?2:v==="trailing"?3:0,this.renderControlCharacters=_,this.fontLigatures=b,this.selectionsOnLine=C&&C.sort((x,y)=>x.startOffset>>16}static getCharIndex(e){return(e&65535)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,i,n){const s=(t<<16|i<<0)>>>0;this._data[e-1]=s,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return this._horizontalOffset.length===0?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return this.length===0?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),i=il.getPartIndex(t),n=il.getCharIndex(t);return new L7(i,n)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){if(this.length===0)return 0;const n=(e<<16|i<<0)>>>0;let s=0,r=this.length-1;for(;s+1>>1,v=this._data[m];if(v===n)return m;v>n?r=m:s=m}if(s===r)return s;const a=this._data[s],l=this._data[r];if(a===n)return s;if(l===n)return r;const d=il.getPartIndex(a),c=il.getCharIndex(a),u=il.getPartIndex(l);let h;d!==u?h=t:h=il.getCharIndex(l);const g=i-c,f=h-i;return g<=f?s:r}}class XI{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function n0(o,e){if(o.lineContent.length===0){if(o.lineDecorations.length>0){e.appendString("");let t=0,i=0,n=0;for(const r of o.lineDecorations)(r.type===1||r.type===2)&&(e.appendString(''),r.type===1&&(n|=1,t++),r.type===2&&(n|=2,i++));e.appendString("");const s=new il(1,t+i);return s.setColumnInfo(1,t,0,0),new XI(s,!1,n)}return e.appendString(""),new XI(new il(0,0),!1,0)}return See(mee(o),e)}class fee{constructor(e,t,i,n){this.characterMapping=e,this.html=t,this.containsRTL=i,this.containsForeignElements=n}}function Ry(o){const e=new mm(1e4),t=n0(o,e);return new fee(t.characterMapping,e.build(),t.containsRTL,t.containsForeignElements)}class pee{constructor(e,t,i,n,s,r,a,l,d,c,u,h,g,f,m,v){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=s,this.overflowingCharCount=r,this.parts=a,this.containsForeignElements=l,this.fauxIndentLength=d,this.tabSize=c,this.startVisibleColumn=u,this.containsRTL=h,this.spaceWidth=g,this.renderSpaceCharCode=f,this.renderWhitespace=m,this.renderControlCharacters=v}}function mee(o){const e=o.lineContent;let t,i,n;o.stopRenderingLineAfter!==-1&&o.stopRenderingLineAfter0){for(let a=0,l=o.lineDecorations.length;a0&&(s[r++]=new En(i,"",0,!1));let a=i;for(let l=0,d=t.getCount();l=n){const g=e?Dp(o.substring(a,n)):!1;s[r++]=new En(n,u,0,g);break}const h=e?Dp(o.substring(a,c)):!1;s[r++]=new En(c,u,0,h),a=c}return s}function vee(o,e,t){let i=0;const n=[];let s=0;if(t)for(let r=0,a=e.length;r=50&&(n[s++]=new En(g+1,c,u,h),f=g+1,g=-1);f!==d&&(n[s++]=new En(d,c,u,h))}else n[s++]=l;i=d}else for(let r=0,a=e.length;r50){const u=l.type,h=l.metadata,g=l.containsRTL,f=Math.ceil(c/50);for(let m=1;m=8234&&o<=8238||o>=8294&&o<=8297||o>=8206&&o<=8207||o===1564}function bee(o,e){const t=[];let i=new En(0,"",0,!1),n=0;for(const s of e){const r=s.endIndex;for(;ni.endIndex&&(i=new En(n,s.type,s.metadata,s.containsRTL),t.push(i)),i=new En(n+1,"mtkcontrol",s.metadata,!1),t.push(i))}n>i.endIndex&&(i=new En(r,s.type,s.metadata,s.containsRTL),t.push(i))}return t}function Cee(o,e,t,i){const n=o.continuesWithWrappedLine,s=o.fauxIndentLength,r=o.tabSize,a=o.startVisibleColumn,l=o.useMonospaceOptimizations,d=o.selectionsOnLine,c=o.renderWhitespace===1,u=o.renderWhitespace===3,h=o.renderSpaceWidth!==o.spaceWidth,g=[];let f=0,m=0,v=i[m].type,_=i[m].containsRTL,b=i[m].endIndex;const C=i.length;let w=!1,S=Cs(e),x;S===-1?(w=!0,S=t,x=t):x=Da(e);let y=!1,I=0,E=d&&d[I],R=a%r;for(let O=s;O=E.endOffset&&(I++,E=d&&d[I]);let K;if(Ox)K=!0;else if($===9)K=!0;else if($===32)if(c)if(y)K=!0;else{const oe=O+1O),K&&u&&(K=w||O>x),K&&_&&O>=S&&O<=x&&(K=!1),y){if(!K||!l&&R>=r){if(h){const oe=f>0?g[f-1].endIndex:s;for(let Le=oe+1;Le<=O;Le++)g[f++]=new En(Le,"mtkw",1,!1)}else g[f++]=new En(O,"mtkw",1,!1);R=R%r}}else(O===b||K&&O>s)&&(g[f++]=new En(O,v,0,_),R=R%r);for($===9?R=r:ou($)?R+=2:R++,y=K;O===b&&(m++,m0?e.charCodeAt(t-1):0,$=t>1?e.charCodeAt(t-2):0;O===32&&$!==32&&$!==9||(j=!0)}else j=!0;if(j)if(h){const O=f>0?g[f-1].endIndex:s;for(let $=O+1;$<=t;$++)g[f++]=new En($,"mtkw",1,!1)}else g[f++]=new En(t,"mtkw",1,!1);else g[f++]=new En(t,v,0,_);return g}function wee(o,e,t,i){i.sort(lo.compare);const n=gee.normalize(o,i),s=n.length;let r=0;const a=[];let l=0,d=0;for(let u=0,h=t.length;ud&&(d=b.startOffset,a[l++]=new En(d,m,v,_)),b.endOffset+1<=f)d=b.endOffset+1,a[l++]=new En(d,m+" "+b.className,v|b.metadata,_),r++;else{d=f,a[l++]=new En(d,m+" "+b.className,v|b.metadata,_);break}}f>d&&(d=f,a[l++]=new En(d,m,v,_))}const c=t[t.length-1].endIndex;if(r'):e.appendString("");for(let E=0,R=d.length;E=c&&(Q+=G)}}for(Le&&(e.appendString(' style="width:'),e.appendString(String(f*se)),e.appendString('px"')),e.appendASCIICharCode(62);w1?e.appendCharCode(8594):e.appendCharCode(65515);for(let G=2;G<=H;G++)e.appendCharCode(160)}else Q=2,H=1,e.appendCharCode(m),e.appendCharCode(8204);x+=Q,y+=H,w>=c&&(S+=H)}}else for(e.appendASCIICharCode(62);w=c&&(S+=Q)}he?I++:I=0,w>=r&&!C&&j.isPseudoAfter()&&(C=!0,b.setColumnInfo(w+1,E,x,y)),e.appendString("")}return C||b.setColumnInfo(r+1,d.length-1,x,y),a&&(e.appendString(''),e.appendString(p("showMore","Show more ({0})",Lee(l))),e.appendString("")),e.appendString(""),new XI(b,g,n)}function yee(o){return o.toString(16).toUpperCase().padStart(4,"0")}function Lee(o){return o<1024?p("overflow.chars","{0} chars",o):o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/1024/1024).toFixed(1)} MB`}class YO{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=e|0,this.left=t|0,this.width=i|0,this.height=n|0}}class Dee{constructor(e,t){this.tabSize=e,this.data=t}}class HM{constructor(e,t,i,n,s,r,a){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=s,this.tokens=r,this.inlineDecorations=a}}class Zo{constructor(e,t,i,n,s,r,a,l,d,c){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=Zo.isBasicASCII(i,r),this.containsRTL=Zo.containsRTL(i,this.isBasicASCII,s),this.tokens=a,this.inlineDecorations=l,this.tabSize=d,this.startVisibleColumn=c}static isBasicASCII(e,t){return t?Jb(e):!0}static containsRTL(e,t,i){return!t&&i?Dp(e):!1}}class W_{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class xee{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new W_(new k(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class x7{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class Rv{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static compareByRenderingProps(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&Bi(e.data,t.data)}static equalsArr(e,t){return Bi(e,t,Rv.equals)}}function kee(o){return Array.isArray(o)}function Iee(o){return!kee(o)}function k7(o){return typeof o=="string"}function XO(o){return!k7(o)}function pf(o){return!o}function $c(o,e){return o.ignoreCase&&e?e.toLowerCase():e}function QO(o){return o.replace(/[&<>'"_]/g,"-")}function Eee(o,e){console.log(`${o.languageId}: ${e}`)}function hi(o,e){return new Error(`${o.languageId}: ${e}`)}function vc(o,e,t,i,n){const s=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let r=null;return e.replace(s,function(a,l,d,c,u,h,g,f,m){return pf(d)?pf(c)?!pf(u)&&u0;){const i=o.tokenizer[t];if(i)return i;const n=t.lastIndexOf(".");n<0?t=null:t=t.substr(0,n)}return null}function Nee(o,e){let t=e;for(;t&&t.length>0;){if(o.stateNames[t])return!0;const n=t.lastIndexOf(".");n<0?t=null:t=t.substr(0,n)}return!1}var Tee=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Mee=function(o,e){return function(t,i){e(t,i,o)}},QI;const I7=5;class Pv{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(e!==null&&e.depth>=this._maxCacheDepth)return new np(e,t);let i=np.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new np(e,t),this._entries[i]=n,n)}}Pv._INSTANCE=new Pv(I7);class np{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;e!==null;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;e!==null&&t!==null;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return e===null&&t===null}equals(e){return np._equals(this,e)}push(e){return Pv.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return Pv.create(this.parent,e)}}class kf{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new kf(this.languageId,this.state)}}class bc{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(t!==null)return new V_(e,t);if(e!==null&&e.depth>=this._maxCacheDepth)return new V_(e,t);const i=np.getStackElementId(e);let n=this._entries[i];return n||(n=new V_(e,null),this._entries[i]=n,n)}}bc._INSTANCE=new bc(I7);class V_{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:bc.create(this.stack,this.embeddedLanguageData)}equals(e){return!(e instanceof V_)||!this.stack.equals(e.stack)?!1:this.embeddedLanguageData===null&&e.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||e.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(e.embeddedLanguageData)}}class Aee{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new bv(e,t,this._languageId)))}nestedLanguageTokenize(e,t,i,n){const s=i.languageId,r=i.state,a=Ei.get(s);if(!a)return this.enterLanguage(s),this.emit(n,""),r;const l=a.tokenize(e,t,r);if(n!==0)for(const d of l.tokens)this._tokens.push(new bv(d.offset+n,d.type,d.language));else this._tokens=this._tokens.concat(l.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,l.endState}finalize(e){return new lM(this._tokens,e)}}class Lw{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){const i=this._theme.match(this._currentLanguageId,t)|1024;this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){const n=e!==null?e.length:0,s=t.length,r=i!==null?i.length:0;if(n===0&&s===0&&r===0)return new Uint32Array(0);if(n===0&&s===0)return i;if(s===0&&r===0)return e;const a=new Uint32Array(n+s+r);e!==null&&a.set(e);for(let l=0;l{if(r)return;let l=!1;for(let d=0,c=a.changedLanguages.length;d{a.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))}))}getLoadStatus(){const e=[];for(const t in this._embeddedLanguages){const i=Ei.get(t);if(i){if(i instanceof QI){const n=i.getLoadStatus();n.loaded===!1&&e.push(n.promise)}continue}Ei.isResolved(t)||e.push(Ei.getOrCreate(t))}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(t=>{})}}getInitialState(){const e=Pv.create(null,this._lexer.start);return bc.create(e,null)}tokenize(e,t,i){if(e.length>=this._maxTokenizationLineLength)return WM(this._languageId,i);const n=new Aee,s=this._tokenize(e,t,i,n);return n.finalize(s)}tokenizeEncoded(e,t,i){if(e.length>=this._maxTokenizationLineLength)return Ay(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),i);const n=new Lw(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),s=this._tokenize(e,t,i,n);return n.finalize(s)}_tokenize(e,t,i,n){return i.embeddedLanguageData?this._nestedTokenize(e,t,i,0,n):this._myTokenize(e,t,i,0,n)}_findLeavingNestedLanguageOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=eC(this._lexer,t.stack.state),!i))throw hi(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,s=!1;for(const r of i){if(!XO(r.action)||r.action.nextEmbedded!=="@pop")continue;s=!0;let a=r.regex;const l=r.regex.source;if(l.substr(0,4)==="^(?:"&&l.substr(l.length-1,1)===")"){const c=(a.ignoreCase?"i":"")+(a.unicode?"u":"");a=new RegExp(l.substr(4,l.length-5),c)}const d=e.search(a);d===-1||d!==0&&r.matchOnlyAtLineStart||(n===-1||d0&&s.nestedLanguageTokenize(a,!1,i.embeddedLanguageData,n);const l=e.substring(r);return this._myTokenize(l,t,i,n+r,s)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,s){s.enterLanguage(this._languageId);const r=e.length,a=t&&this._lexer.includeLF?e+` +`:e,l=a.length;let d=i.embeddedLanguageData,c=i.stack,u=0,h=null,g=!0;for(;g||u=l)break;g=!1;let E=this._lexer.tokenizer[_];if(!E&&(E=eC(this._lexer,_),!E))throw hi(this._lexer,"tokenizer state is not defined: "+_);const R=a.substr(u);for(const j of E)if((u===0||!j.matchOnlyAtLineStart)&&(b=R.match(j.regex),b)){C=b[0],w=j.action;break}}if(b||(b=[""],C=""),w||(u=this._lexer.maxStack)throw hi(this._lexer,"maximum tokenizer stack size reached: ["+c.state+","+c.parent.state+",...]");c=c.push(_)}else if(w.next==="@pop"){if(c.depth<=1)throw hi(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(S));c=c.pop()}else if(w.next==="@popall")c=c.popall();else{let E=vc(this._lexer,w.next,C,b,_);if(E[0]==="@"&&(E=E.substr(1)),eC(this._lexer,E))c=c.push(E);else throw hi(this._lexer,"trying to set a next state '"+E+"' that is undefined in rule: "+this._safeRuleName(S))}}w.log&&typeof w.log=="string"&&Eee(this._lexer,this._lexer.languageId+": "+vc(this._lexer,w.log,C,b,_))}if(y===null)throw hi(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(S));const I=E=>{const R=this._languageService.getLanguageIdByLanguageName(E)||this._languageService.getLanguageIdByMimeType(E)||E,j=this._getNestedEmbeddedLanguageData(R);if(u0)throw hi(this._lexer,"groups cannot be nested: "+this._safeRuleName(S));if(b.length!==y.length+1)throw hi(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(S));let E=0;for(let R=1;Ro});class zM{static colorizeElement(e,t,i,n){n=n||{};const s=n.theme||"vs",r=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!r)return console.error("Mode not detected"),Promise.resolve();const a=t.getLanguageIdByMimeType(r)||r;e.setTheme(s);const l=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+s;const d=c=>{var u;const h=(u=nx==null?void 0:nx.createHTML(c))!==null&&u!==void 0?u:c;i.innerHTML=h};return this.colorize(t,l||"",a,n).then(d,c=>console.error(c))}static async colorize(e,t,i,n){const s=e.languageIdCodec;let r=4;n&&typeof n.tabSize=="number"&&(r=n.tabSize),pM(t)&&(t=t.substr(1));const a=Rl(t);if(!e.isRegisteredLanguageId(i))return JO(a,r,s);const l=await Ei.getOrCreate(i);return l?Pee(a,r,l,s):JO(a,r,s)}static colorizeLine(e,t,i,n,s=4){const r=Zo.isBasicASCII(e,t),a=Zo.containsRTL(e,r,i);return Ry(new Ou(!1,!0,e,!1,r,a,0,n,[],s,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){const n=e.getLineContent(t);e.tokenization.forceTokenization(t);const r=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),r,i)}}function Pee(o,e,t,i){return new Promise((n,s)=>{const r=()=>{const a=Oee(o,e,t,i);if(t instanceof Ov){const l=t.getLoadStatus();if(l.loaded===!1){l.promise.then(r,s);return}}n(a)};r()})}function JO(o,e,t){let i=[];const s=new Uint32Array(2);s[0]=0,s[1]=33587200;for(let r=0,a=o.length;r")}return i.join("")}function Oee(o,e,t,i){let n=[],s=t.getInitialState();for(let r=0,a=o.length;r"),s=d.endState}return n.join("")}const e4=2e4;let bh,w1,JI,S1,eE;function Fee(o){bh=document.createElement("div"),bh.className="monaco-aria-container";const e=()=>{const i=document.createElement("div");return i.className="monaco-alert",i.setAttribute("role","alert"),i.setAttribute("aria-atomic","true"),bh.appendChild(i),i};w1=e(),JI=e();const t=()=>{const i=document.createElement("div");return i.className="monaco-status",i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true"),bh.appendChild(i),i};S1=t(),eE=t(),o.appendChild(bh)}function mo(o){bh&&(w1.textContent!==o?($n(JI),Dw(w1,o)):($n(w1),Dw(JI,o)))}function hu(o){bh&&(S1.textContent!==o?($n(eE),Dw(S1,o)):($n(S1),Dw(eE,o)))}function Dw(o,e){$n(o),e.length>e4&&(e=e.substr(0,e4)),o.textContent=e,o.style.visibility="hidden",o.style.visibility="visible"}const $M=bt("markerDecorationsService");var Bee=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Wee=function(o,e){return function(t,i){e(t,i,o)}};let Fv=class{constructor(e,t){}dispose(){}};Fv.ID="editor.contrib.markerDecorations";Fv=Bee([Wee(1,$M)],Fv);At(Fv.ID,Fv,0);class E7 extends q{constructor(e,t){super(),this._onDidChange=this._register(new W),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null;const t=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()};let i=!1,n=!1;const s=()=>{if(i&&!n)try{i=!1,n=!0,t()}finally{po(Je(this._referenceDomElement),()=>{n=!1,s()})}};this._resizeObserver=new ResizeObserver(r=>{e=r&&r[0]&&r[0].contentRect?r[0].contentRect:null,i=!0,s()}),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this._referenceDomElement&&(i=this._referenceDomElement.clientWidth,n=this._referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),(this._width!==i||this._height!==n)&&(this._width=i,this._height=n,e&&this._onDidChange.fire())}}class Uc{constructor(e,t){this.key=e,this.migrate=t}apply(e){const t=Uc._read(e,this.key),i=s=>Uc._read(e,s),n=(s,r)=>Uc._write(e,s,r);this.migrate(t,i,n)}static _read(e,t){if(typeof e>"u")return;const i=t.indexOf(".");if(i>=0){const n=t.substring(0,i);return this._read(e[n],t.substring(i+1))}return e[t]}static _write(e,t,i){const n=t.indexOf(".");if(n>=0){const s=t.substring(0,n);e[s]=e[s]||{},this._write(e[s],t.substring(n+1),i);return}e[t]=i}}Uc.items=[];function Gl(o,e){Uc.items.push(new Uc(o,e))}function Co(o,e){Gl(o,(t,i,n)=>{if(typeof t<"u"){for(const[s,r]of e)if(t===s){n(o,r);return}}})}function Vee(o){Uc.items.forEach(e=>e.apply(o))}Co("wordWrap",[[!0,"on"],[!1,"off"]]);Co("lineNumbers",[[!0,"on"],[!1,"off"]]);Co("cursorBlinking",[["visible","solid"]]);Co("renderWhitespace",[[!0,"boundary"],[!1,"none"]]);Co("renderLineHighlight",[[!0,"line"],[!1,"none"]]);Co("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]);Co("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]);Co("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);Co("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);Co("autoIndent",[[!1,"advanced"],[!0,"full"]]);Co("matchBrackets",[[!0,"always"],[!1,"never"]]);Co("renderFinalNewline",[[!0,"on"],[!1,"off"]]);Co("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]);Co("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]);Co("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]);Gl("autoClosingBrackets",(o,e,t)=>{o===!1&&(t("autoClosingBrackets","never"),typeof e("autoClosingQuotes")>"u"&&t("autoClosingQuotes","never"),typeof e("autoSurround")>"u"&&t("autoSurround","never"))});Gl("renderIndentGuides",(o,e,t)=>{typeof o<"u"&&(t("renderIndentGuides",void 0),typeof e("guides.indentation")>"u"&&t("guides.indentation",!!o))});Gl("highlightActiveIndentGuide",(o,e,t)=>{typeof o<"u"&&(t("highlightActiveIndentGuide",void 0),typeof e("guides.highlightActiveIndentation")>"u"&&t("guides.highlightActiveIndentation",!!o))});const Hee={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};Gl("suggest.filteredTypes",(o,e,t)=>{if(o&&typeof o=="object"){for(const i of Object.entries(Hee))o[i[0]]===!1&&typeof e(`suggest.${i[1]}`)>"u"&&t(`suggest.${i[1]}`,!1);t("suggest.filteredTypes",void 0)}});Gl("quickSuggestions",(o,e,t)=>{if(typeof o=="boolean"){const i=o?"on":"off";t("quickSuggestions",{comments:i,strings:i,other:i})}});Gl("experimental.stickyScroll.enabled",(o,e,t)=>{typeof o=="boolean"&&(t("experimental.stickyScroll.enabled",void 0),typeof e("stickyScroll.enabled")>"u"&&t("stickyScroll.enabled",o))});Gl("experimental.stickyScroll.maxLineCount",(o,e,t)=>{typeof o=="number"&&(t("experimental.stickyScroll.maxLineCount",void 0),typeof e("stickyScroll.maxLineCount")>"u"&&t("stickyScroll.maxLineCount",o))});Gl("codeActionsOnSave",(o,e,t)=>{if(o&&typeof o=="object"){let i=!1;const n={};for(const s of Object.entries(o))typeof s[1]=="boolean"?(i=!0,n[s[0]]=s[1]?"explicit":"never"):n[s[0]]=s[1];i&&t("codeActionsOnSave",n)}});Gl("codeActionWidget.includeNearbyQuickfixes",(o,e,t)=>{typeof o=="boolean"&&(t("codeActionWidget.includeNearbyQuickfixes",void 0),typeof e("codeActionWidget.includeNearbyQuickFixes")>"u"&&t("codeActionWidget.includeNearbyQuickFixes",o))});class zee{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new W,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}}const Mp=new zee,Zl=bt("accessibilityService"),s0=new De("accessibilityModeEnabled",!1),Py=bt("accessibleNotificationService");var $ee=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Uee=function(o,e){return function(t,i){e(t,i,o)}};let tE=class extends q{constructor(e,t,i,n){super(),this._accessibilityService=n,this._onDidChange=this._register(new W),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new W),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new Y9,this.isSimpleWidget=e,this._containerObserver=this._register(new E7(i,t.dimension)),this._rawOptions=t4(t),this._validatedOptions=Cc.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(sr.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(Mp.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(TI.onDidChange(()=>this._recomputeOptions())),this._register(yv.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const e=this._computeOptions(),t=Cc.checkEquals(this.options,e);t!==null&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=Fh.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(t),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:Mp.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return Cc.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:Kee(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:dy||pr,pixelRatio:yv.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return TI.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=t4(e);Cc.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=Cc.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const t=jee(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};tE=$ee([Uee(3,Zl)],tE);function jee(o){let e=0;for(;o;)o=Math.floor(o/10),e++;return e||1}function Kee(){let o="";return!ru&&!w8&&(o+="no-user-select "),ru&&(o+="no-minimap-shadow ",o+="enable-user-select "),It&&(o+="mac "),o}class qee{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class Gee{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class Cc{static validateOptions(e){const t=new qee;for(const i of Sf){const n=i.name==="_never_"?void 0:e[i.name];t._write(i.id,i.validate(n))}return t}static computeOptions(e,t){const i=new Gee;for(const n of Sf)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if(typeof e!="object"||typeof t!="object"||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)?Bi(e,t):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!Cc._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const s of Sf){const r=!Cc._deepEquals(e._read(s.id),t._read(s.id));i[s.id]=r,r&&(n=!0)}return n?new Z9(i):null}static applyUpdate(e,t){let i=!1;for(const n of Sf)if(t.hasOwnProperty(n.name)){const s=n.applyUpdate(e[n.name],t[n.name]);e[n.name]=s.newValue,i=i||s.didChange}return i}}function t4(o){const e=gd(o);return Vee(e),e}function nn(o,e,t){let i=null,n=null;if(typeof t.value=="function"?(i="value",n=t.value,n.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof t.get=="function"&&(i="get",n=t.get),!n)throw new Error("not supported");const s=`$memoize$${e}`;t[i]=function(...r){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:n.apply(this,r)}),this[s]}}var Zee=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ni;(function(o){o.Tap="-monaco-gesturetap",o.Change="-monaco-gesturechange",o.Start="-monaco-gesturestart",o.End="-monaco-gesturesend",o.Contextmenu="-monaco-gesturecontextmenu"})(ni||(ni={}));class ei extends q{constructor(){super(),this.dispatched=!1,this.targets=new Ns,this.ignoreTargets=new Ns,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(ye.runAndSubscribe(xM,({window:e,disposables:t})=>{t.add(J(e.document,"touchstart",i=>this.onTouchStart(i),{passive:!1})),t.add(J(e.document,"touchend",i=>this.onTouchEnd(e,i))),t.add(J(e.document,"touchmove",i=>this.onTouchMove(i),{passive:!1}))},{window:Ai,disposables:this._store}))}static addTarget(e){if(!ei.isTouchDevice())return q.None;ei.INSTANCE||(ei.INSTANCE=new ei);const t=ei.INSTANCE.targets.push(e);return je(t)}static ignoreTarget(e){if(!ei.isTouchDevice())return q.None;ei.INSTANCE||(ei.INSTANCE=new ei);const t=ei.INSTANCE.ignoreTargets.push(e);return je(t)}static isTouchDevice(){return"ontouchstart"in Ai||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,n=e.targetTouches.length;i=ei.HOLD_DELAY&&Math.abs(l.initialPageX-er(l.rollingPageX))<30&&Math.abs(l.initialPageY-er(l.rollingPageY))<30){const c=this.newGestureEvent(ni.Contextmenu,l.initialTarget);c.pageX=er(l.rollingPageX),c.pageY=er(l.rollingPageY),this.dispatchEvent(c)}else if(n===1){const c=er(l.rollingPageX),u=er(l.rollingPageY),h=er(l.rollingTimestamps)-l.rollingTimestamps[0],g=c-l.rollingPageX[0],f=u-l.rollingPageY[0],m=[...this.targets].filter(v=>l.initialTarget instanceof Node&&v.contains(l.initialTarget));this.inertia(e,m,i,Math.abs(g)/h,g>0?1:-1,c,Math.abs(f)/h,f>0?1:-1,u)}this.dispatchEvent(this.newGestureEvent(ni.End,l.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){const i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===ni.Tap){const t=new Date().getTime();let i=0;t-this._lastSetTapCountTime>ei.CLEAR_TAP_COUNT_TIME?i=1:i=2,this._lastSetTapCountTime=t,e.tapCount=i}else(e.type===ni.Change||e.type===ni.Contextmenu)&&(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(const t of this.ignoreTargets)if(t.contains(e.initialTarget))return;for(const t of this.targets)t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}}inertia(e,t,i,n,s,r,a,l,d){this.handle=po(e,()=>{const c=Date.now(),u=c-i;let h=0,g=0,f=!0;n+=ei.SCROLL_FRICTION*u,a+=ei.SCROLL_FRICTION*u,n>0&&(f=!1,h=s*n*u),a>0&&(f=!1,g=l*a*u);const m=this.newGestureEvent(ni.Change);m.translationX=h,m.translationY=g,t.forEach(v=>v.dispatchEvent(m)),f||this.inertia(e,t,c,n,s,r+h,a,l,d+g)})}onTouchMove(e){const t=Date.now();for(let i=0,n=e.changedTouches.length;i3&&(r.rollingPageX.shift(),r.rollingPageY.shift(),r.rollingTimestamps.shift()),r.rollingPageX.push(s.pageX),r.rollingPageY.push(s.pageY),r.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}ei.SCROLL_FRICTION=-.005;ei.HOLD_DELAY=700;ei.CLEAR_TAP_COUNT_TIME=400;Zee([nn],ei,"isTouchDevice",null);class vm{constructor(){this._hooks=new de,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,n,s){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=n,this._onStopCallback=s;let r=e;try{e.setPointerCapture(t),this._hooks.add(je(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{r=Je(e)}this._hooks.add(J(r,Se.POINTER_MOVE,a=>{if(a.buttons!==i){this.stopMonitoring(!0);return}a.preventDefault(),this._pointerMoveCallback(a)})),this._hooks.add(J(r,Se.POINTER_UP,a=>this.stopMonitoring(!0)))}}function UM(o){return`--vscode-${o.replace(/\./g,"-")}`}function Ee(o){return`var(${UM(o)})`}function Yee(o,e){return`var(${UM(o)}, ${e})`}const N7={ColorContribution:"base.contributions.colors"};class Xee{constructor(){this._onDidChangeSchema=new W,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,s){const r={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:s};this.colorsById[e]=r;const a={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return s&&(a.deprecationMessage=s),this.colorSchema.properties[e]=a,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map(e=>this.colorsById[e])}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i&&i.defaults){const n=i.defaults[t.type];return na(n,t)}}getColorSchema(){return this.colorSchema}toString(){const e=(t,i)=>{const n=t.indexOf(".")===-1?0:1,s=i.indexOf(".")===-1?0:1;return n!==s?n-s:t.localeCompare(i)};return Object.keys(this.colorsById).sort(e).map(t=>`- \`${t}\`: ${this.colorsById[t].description}`).join(` +`)}}const Oy=new Xee;xi.add(N7.ColorContribution,Oy);function M(o,e,t,i,n){return Oy.registerColor(o,e,t,i,n)}const be=M("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},p("foreground","Overall foreground color. This color is only used if not overridden by a component."));M("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},p("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component."));const Qee=M("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},p("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component."));M("descriptionForeground",{light:"#717171",dark:We(be,.7),hcDark:We(be,.7),hcLight:We(be,.7)},p("descriptionForeground","Foreground color for description text providing additional information, for example for a label."));const Or=M("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},p("iconForeground","The default color for icons in the workbench.")),Ho=M("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},p("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),Lt=M("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},p("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),fi=M("contrastActiveBorder",{light:null,dark:null,hcDark:Ho,hcLight:Ho},p("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast."));M("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},p("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));M("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:Y.black,hcLight:"#292929"},p("textSeparatorForeground","Color for text separators."));const Jee=M("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},p("textLinkForeground","Foreground color for links in text."));M("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},p("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover."));M("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},p("textPreformatForeground","Foreground color for preformatted text segments."));M("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},p("textPreformatBackground","Background color for preformatted text segments."));M("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},p("textBlockQuoteBackground","Background color for block quotes in text."));M("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:Y.white,hcLight:"#292929"},p("textBlockQuoteBorder","Border color for block quotes in text."));M("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:Y.black,hcLight:"#F2F2F2"},p("textCodeBlockBackground","Background color for code blocks in text."));const ml=M("widget.shadow",{dark:We(Y.black,.36),light:We(Y.black,.16),hcDark:null,hcLight:null},p("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),jM=M("widget.border",{dark:null,light:null,hcDark:Lt,hcLight:Lt},p("widgetBorder","Border color of widgets such as find/replace inside the editor.")),T7=M("input.background",{dark:"#3C3C3C",light:Y.white,hcDark:Y.black,hcLight:Y.white},p("inputBoxBackground","Input box background.")),M7=M("input.foreground",{dark:be,light:be,hcDark:be,hcLight:be},p("inputBoxForeground","Input box foreground.")),A7=M("input.border",{dark:null,light:null,hcDark:Lt,hcLight:Lt},p("inputBoxBorder","Input box border.")),KM=M("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:Lt,hcLight:Lt},p("inputBoxActiveOptionBorder","Border color of activated options in input fields."));M("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},p("inputOption.hoverBackground","Background color of activated options in input fields."));const Ih=M("inputOption.activeBackground",{dark:We(Ho,.4),light:We(Ho,.2),hcDark:Y.transparent,hcLight:Y.transparent},p("inputOption.activeBackground","Background hover color of options in input fields.")),qM=M("inputOption.activeForeground",{dark:Y.white,light:Y.black,hcDark:be,hcLight:be},p("inputOption.activeForeground","Foreground color of activated options in input fields."));M("input.placeholderForeground",{light:We(be,.5),dark:We(be,.5),hcDark:We(be,.7),hcLight:We(be,.7)},p("inputPlaceholderForeground","Input box foreground color for placeholder text."));const ete=M("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:Y.black,hcLight:Y.white},p("inputValidationInfoBackground","Input validation background color for information severity.")),tte=M("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:be},p("inputValidationInfoForeground","Input validation foreground color for information severity.")),ite=M("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:Lt,hcLight:Lt},p("inputValidationInfoBorder","Input validation border color for information severity.")),nte=M("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:Y.black,hcLight:Y.white},p("inputValidationWarningBackground","Input validation background color for warning severity.")),ste=M("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:be},p("inputValidationWarningForeground","Input validation foreground color for warning severity.")),ote=M("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:Lt,hcLight:Lt},p("inputValidationWarningBorder","Input validation border color for warning severity.")),rte=M("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:Y.black,hcLight:Y.white},p("inputValidationErrorBackground","Input validation background color for error severity.")),ate=M("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:be},p("inputValidationErrorForeground","Input validation foreground color for error severity.")),lte=M("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:Lt,hcLight:Lt},p("inputValidationErrorBorder","Input validation border color for error severity.")),_l=M("dropdown.background",{dark:"#3C3C3C",light:Y.white,hcDark:Y.black,hcLight:Y.white},p("dropdownBackground","Dropdown background.")),dte=M("dropdown.listBackground",{dark:null,light:null,hcDark:Y.black,hcLight:Y.white},p("dropdownListBackground","Dropdown list background.")),xd=M("dropdown.foreground",{dark:"#F0F0F0",light:be,hcDark:Y.white,hcLight:be},p("dropdownForeground","Dropdown foreground.")),If=M("dropdown.border",{dark:_l,light:"#CECECE",hcDark:Lt,hcLight:Lt},p("dropdownBorder","Dropdown border.")),f_=M("button.foreground",{dark:Y.white,light:Y.white,hcDark:Y.white,hcLight:Y.white},p("buttonForeground","Button foreground color.")),cte=M("button.separator",{dark:We(f_,.4),light:We(f_,.4),hcDark:We(f_,.4),hcLight:We(f_,.4)},p("buttonSeparator","Button separator color.")),p_=M("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},p("buttonBackground","Button background color.")),ute=M("button.hoverBackground",{dark:zr(p_,.2),light:Fu(p_,.2),hcDark:p_,hcLight:p_},p("buttonHoverBackground","Button background color when hovering.")),hte=M("button.border",{dark:Lt,light:Lt,hcDark:Lt,hcLight:Lt},p("buttonBorder","Button border color.")),gte=M("button.secondaryForeground",{dark:Y.white,light:Y.white,hcDark:Y.white,hcLight:be},p("buttonSecondaryForeground","Secondary button foreground color.")),iE=M("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:Y.white},p("buttonSecondaryBackground","Secondary button background color.")),fte=M("button.secondaryHoverBackground",{dark:zr(iE,.2),light:Fu(iE,.2),hcDark:null,hcLight:null},p("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),y1=M("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:Y.black,hcLight:"#0F4A85"},p("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),pte=M("badge.foreground",{dark:Y.white,light:"#333",hcDark:Y.white,hcLight:Y.white},p("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),mte=M("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},p("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),m_=M("scrollbarSlider.background",{dark:Y.fromHex("#797979").transparent(.4),light:Y.fromHex("#646464").transparent(.4),hcDark:We(Lt,.6),hcLight:We(Lt,.4)},p("scrollbarSliderBackground","Scrollbar slider background color.")),__=M("scrollbarSlider.hoverBackground",{dark:Y.fromHex("#646464").transparent(.7),light:Y.fromHex("#646464").transparent(.7),hcDark:We(Lt,.8),hcLight:We(Lt,.8)},p("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),v_=M("scrollbarSlider.activeBackground",{dark:Y.fromHex("#BFBFBF").transparent(.4),light:Y.fromHex("#000000").transparent(.6),hcDark:Lt,hcLight:Lt},p("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),_te=M("progressBar.background",{dark:Y.fromHex("#0E70C0"),light:Y.fromHex("#0E70C0"),hcDark:Lt,hcLight:Lt},p("progressBarBackground","Background color of the progress bar that can show for long running operations."));M("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},p("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const vl=M("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},p("editorError.foreground","Foreground color of error squigglies in the editor.")),vte=M("editorError.border",{dark:null,light:null,hcDark:Y.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},p("errorBorder","If set, color of double underlines for errors in the editor."));M("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},p("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const zo=M("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},p("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),Bv=M("editorWarning.border",{dark:null,light:null,hcDark:Y.fromHex("#FFCC00").transparent(.8),hcLight:Y.fromHex("#FFCC00").transparent(.8)},p("warningBorder","If set, color of double underlines for warnings in the editor."));M("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},p("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const Ks=M("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},p("editorInfo.foreground","Foreground color of info squigglies in the editor.")),Wv=M("editorInfo.border",{dark:null,light:null,hcDark:Y.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},p("infoBorder","If set, color of double underlines for infos in the editor.")),bte=M("editorHint.foreground",{dark:Y.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},p("editorHint.foreground","Foreground color of hint squigglies in the editor."));M("editorHint.border",{dark:null,light:null,hcDark:Y.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},p("hintBorder","If set, color of double underlines for hints in the editor."));M("sash.hoverBorder",{dark:Ho,light:Ho,hcDark:Ho,hcLight:Ho},p("sashActiveBorder","Border color of active sashes."));const wn=M("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:Y.black,hcLight:Y.white},p("editorBackground","Editor background color.")),Fr=M("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:Y.white,hcLight:be},p("editorForeground","Editor default foreground color."));M("editorStickyScroll.background",{light:wn,dark:wn,hcDark:wn,hcLight:wn},p("editorStickyScrollBackground","Sticky scroll background color for the editor"));M("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:Y.fromHex("#0F4A85").transparent(.1)},p("editorStickyScrollHoverBackground","Sticky scroll on hover background color for the editor"));const Fi=M("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:Y.white},p("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),bl=M("editorWidget.foreground",{dark:be,light:be,hcDark:be,hcLight:be},p("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),Cl=M("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:Lt,hcLight:Lt},p("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),Cte=M("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},p("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),i4=M("quickInput.background",{dark:Fi,light:Fi,hcDark:Fi,hcLight:Fi},p("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),wte=M("quickInput.foreground",{dark:bl,light:bl,hcDark:bl,hcLight:bl},p("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),Ste=M("quickInputTitle.background",{dark:new Y(new kt(255,255,255,.105)),light:new Y(new kt(0,0,0,.06)),hcDark:"#000000",hcLight:Y.white},p("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),R7=M("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:Y.white,hcLight:"#0F4A85"},p("pickerGroupForeground","Quick picker color for grouping labels.")),yte=M("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:Y.white,hcLight:"#0F4A85"},p("pickerGroupBorder","Quick picker color for grouping borders.")),Lte=M("keybindingLabel.background",{dark:new Y(new kt(128,128,128,.17)),light:new Y(new kt(221,221,221,.4)),hcDark:Y.transparent,hcLight:Y.transparent},p("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),Dte=M("keybindingLabel.foreground",{dark:Y.fromHex("#CCCCCC"),light:Y.fromHex("#555555"),hcDark:Y.white,hcLight:be},p("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),xte=M("keybindingLabel.border",{dark:new Y(new kt(51,51,51,.6)),light:new Y(new kt(204,204,204,.4)),hcDark:new Y(new kt(111,195,223)),hcLight:Lt},p("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),kte=M("keybindingLabel.bottomBorder",{dark:new Y(new kt(68,68,68,.6)),light:new Y(new kt(187,187,187,.4)),hcDark:new Y(new kt(111,195,223)),hcLight:be},p("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),kc=M("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},p("editorSelectionBackground","Color of the editor selection.")),Ite=M("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:Y.white},p("editorSelectionForeground","Color of the selected text for high contrast.")),P7=M("editor.inactiveSelectionBackground",{light:We(kc,.5),dark:We(kc,.5),hcDark:We(kc,.7),hcLight:We(kc,.5)},p("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),GM=M("editor.selectionHighlightBackground",{light:d4(kc,wn,.3,.6),dark:d4(kc,wn,.3,.6),hcDark:null,hcLight:null},p("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0);M("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:fi,hcLight:fi},p("editorSelectionHighlightBorder","Border color for regions with the same content as the selection."));const Ete=M("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},p("editorFindMatch","Color of the current search match.")),wl=M("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},p("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),Nte=M("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},p("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Tte=M("editor.findMatchBorder",{light:null,dark:null,hcDark:fi,hcLight:fi},p("editorFindMatchBorder","Border color of the current search match.")),Ic=M("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:fi,hcLight:fi},p("findMatchHighlightBorder","Border color of the other search matches.")),Mte=M("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:We(fi,.4),hcLight:We(fi,.4)},p("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0);M("searchEditor.findMatchBackground",{light:We(wl,.66),dark:We(wl,.66),hcDark:wl,hcLight:wl},p("searchEditor.queryMatch","Color of the Search Editor query matches."));M("searchEditor.findMatchBorder",{light:We(Ic,.66),dark:We(Ic,.66),hcDark:Ic,hcLight:Ic},p("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."));M("search.resultsInfoForeground",{light:be,dark:We(be,.65),hcDark:be,hcLight:be},p("search.resultsInfoForeground","Color of the text in the search viewlet's completion message."));M("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},p("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0);const xw=M("editorHoverWidget.background",{light:Fi,dark:Fi,hcDark:Fi,hcLight:Fi},p("hoverBackground","Background color of the editor hover."));M("editorHoverWidget.foreground",{light:bl,dark:bl,hcDark:bl,hcLight:bl},p("hoverForeground","Foreground color of the editor hover."));const Ate=M("editorHoverWidget.border",{light:Cl,dark:Cl,hcDark:Cl,hcLight:Cl},p("hoverBorder","Border color of the editor hover."));M("editorHoverWidget.statusBarBackground",{dark:zr(xw,.2),light:Fu(xw,.05),hcDark:Fi,hcLight:Fi},p("statusBarBackground","Background color of the editor hover status bar."));const Rte=M("editorLink.activeForeground",{dark:"#4E94CE",light:Y.blue,hcDark:Y.cyan,hcLight:"#292929"},p("activeLinkForeground","Color of active links.")),kd=M("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:Y.white,hcLight:Y.black},p("editorInlayHintForeground","Foreground color of inline hints")),Id=M("editorInlayHint.background",{dark:We(y1,.1),light:We(y1,.1),hcDark:We(Y.white,.1),hcLight:We(y1,.1)},p("editorInlayHintBackground","Background color of inline hints")),Pte=M("editorInlayHint.typeForeground",{dark:kd,light:kd,hcDark:kd,hcLight:kd},p("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),Ote=M("editorInlayHint.typeBackground",{dark:Id,light:Id,hcDark:Id,hcLight:Id},p("editorInlayHintBackgroundTypes","Background color of inline hints for types")),Fte=M("editorInlayHint.parameterForeground",{dark:kd,light:kd,hcDark:kd,hcLight:kd},p("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),Bte=M("editorInlayHint.parameterBackground",{dark:Id,light:Id,hcDark:Id,hcLight:Id},p("editorInlayHintBackgroundParameter","Background color of inline hints for parameters"));M("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},p("editorLightBulbForeground","The color used for the lightbulb actions icon."));M("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},p("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon."));M("editorLightBulbAi.foreground",{dark:Fu(Or,.4),light:zr(Or,1.7),hcDark:Or,hcLight:Or},p("editorLightBulbAiForeground","The color used for the lightbulb AI icon."));const nE=new Y(new kt(155,185,85,.2)),sE=new Y(new kt(255,0,0,.2)),Wte=M("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},p("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),Vte=M("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},p("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0);M("diffEditor.insertedLineBackground",{dark:nE,light:nE,hcDark:null,hcLight:null},p("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0);M("diffEditor.removedLineBackground",{dark:sE,light:sE,hcDark:null,hcLight:null},p("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0);M("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},p("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted."));M("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},p("diffEditorRemovedLineGutter","Background color for the margin where lines got removed."));const Hte=M("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},p("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),zte=M("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},p("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content."));M("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},p("diffEditorInsertedOutline","Outline color for the text that got inserted."));M("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},p("diffEditorRemovedOutline","Outline color for text that got removed."));M("diffEditor.border",{dark:null,light:null,hcDark:Lt,hcLight:Lt},p("diffEditorBorder","Border color between the two text editors."));M("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},p("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views."));M("diffEditor.unchangedRegionBackground",{dark:"sideBar.background",light:"sideBar.background",hcDark:"sideBar.background",hcLight:"sideBar.background"},p("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor."));M("diffEditor.unchangedRegionForeground",{dark:"foreground",light:"foreground",hcDark:"foreground",hcLight:"foreground"},p("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor."));M("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},p("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor."));const $te=M("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},p("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Ute=M("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},p("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),jte=M("list.focusOutline",{dark:Ho,light:Ho,hcDark:fi,hcLight:fi},p("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Kte=M("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},p("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),Ed=M("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:Y.fromHex("#0F4A85").transparent(.1)},p("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Sl=M("list.activeSelectionForeground",{dark:Y.white,light:Y.white,hcDark:null,hcLight:null},p("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),b_=M("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},p("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),qte=M("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:Y.fromHex("#0F4A85").transparent(.1)},p("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Gte=M("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},p("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Zte=M("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},p("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Yte=M("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},p("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Xte=M("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},p("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),O7=M("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:Y.white.transparent(.1),hcLight:Y.fromHex("#0F4A85").transparent(.1)},p("listHoverBackground","List/Tree background when hovering over items using the mouse.")),F7=M("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},p("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),Qte=M("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},p("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),Br=M("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:Ho,hcLight:Ho},p("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),tC=M("list.focusHighlightForeground",{dark:Br,light:Iie(Ed,Br,"#BBE7FF"),hcDark:Br,hcLight:Br},p("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));M("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},p("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer."));M("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},p("listErrorForeground","Foreground color of list items containing errors."));M("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},p("listWarningForeground","Foreground color of list items containing warnings."));const Jte=M("listFilterWidget.background",{light:Fu(Fi,0),dark:zr(Fi,0),hcDark:Fi,hcLight:Fi},p("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),eie=M("listFilterWidget.outline",{dark:Y.transparent,light:Y.transparent,hcDark:"#f38518",hcLight:"#007ACC"},p("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),tie=M("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:Lt,hcLight:Lt},p("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),iie=M("listFilterWidget.shadow",{dark:ml,light:ml,hcDark:ml,hcLight:ml},p("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees."));M("list.filterMatchBackground",{dark:wl,light:wl,hcDark:null,hcLight:null},p("listFilterMatchHighlight","Background color of the filtered match."));M("list.filterMatchBorder",{dark:Ic,light:Ic,hcDark:Lt,hcLight:fi},p("listFilterMatchHighlightBorder","Border color of the filtered match."));const C_=M("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},p("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),nie=M("tree.inactiveIndentGuidesStroke",{dark:We(C_,.4),light:We(C_,.4),hcDark:We(C_,.4),hcLight:We(C_,.4)},p("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),sie=M("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},p("tableColumnsBorder","Table border color between columns.")),oie=M("tree.tableOddRowsBackground",{dark:We(be,.04),light:We(be,.04),hcDark:null,hcLight:null},p("tableOddRowsBackgroundColor","Background color for odd table rows."));M("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},p("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized. "));const rie=M("checkbox.background",{dark:_l,light:_l,hcDark:_l,hcLight:_l},p("checkbox.background","Background color of checkbox widget."));M("checkbox.selectBackground",{dark:Fi,light:Fi,hcDark:Fi,hcLight:Fi},p("checkbox.select.background","Background color of checkbox widget when the element it's in is selected."));const aie=M("checkbox.foreground",{dark:xd,light:xd,hcDark:xd,hcLight:xd},p("checkbox.foreground","Foreground color of checkbox widget.")),lie=M("checkbox.border",{dark:If,light:If,hcDark:If,hcLight:If},p("checkbox.border","Border color of checkbox widget."));M("checkbox.selectBorder",{dark:Or,light:Or,hcDark:Or,hcLight:Or},p("checkbox.select.border","Border color of checkbox widget when the element it's in is selected."));const n4=M("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,p("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),Eh=M("quickInputList.focusForeground",{dark:Sl,light:Sl,hcDark:Sl,hcLight:Sl},p("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),Ef=M("quickInputList.focusIconForeground",{dark:b_,light:b_,hcDark:b_,hcLight:b_},p("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),Nh=M("quickInputList.focusBackground",{dark:Vv(n4,Ed),light:Vv(n4,Ed),hcDark:null,hcLight:null},p("quickInput.listFocusBackground","Quick picker background color for the focused item.")),die=M("menu.border",{dark:null,light:null,hcDark:Lt,hcLight:Lt},p("menuBorder","Border color of menus.")),cie=M("menu.foreground",{dark:xd,light:xd,hcDark:xd,hcLight:xd},p("menuForeground","Foreground color of menu items.")),uie=M("menu.background",{dark:_l,light:_l,hcDark:_l,hcLight:_l},p("menuBackground","Background color of menu items.")),hie=M("menu.selectionForeground",{dark:Sl,light:Sl,hcDark:Sl,hcLight:Sl},p("menuSelectionForeground","Foreground color of the selected menu item in menus.")),gie=M("menu.selectionBackground",{dark:Ed,light:Ed,hcDark:Ed,hcLight:Ed},p("menuSelectionBackground","Background color of the selected menu item in menus.")),fie=M("menu.selectionBorder",{dark:null,light:null,hcDark:fi,hcLight:fi},p("menuSelectionBorder","Border color of the selected menu item in menus.")),pie=M("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:Lt,hcLight:Lt},p("menuSeparatorBackground","Color of a separator menu item in menus.")),oE=M("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},p("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse"));M("toolbar.hoverOutline",{dark:null,light:null,hcDark:fi,hcLight:fi},p("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse"));M("toolbar.activeBackground",{dark:zr(oE,.1),light:Fu(oE,.1),hcDark:null,hcLight:null},p("toolbarActiveBackground","Toolbar background when holding the mouse over actions"));M("editor.snippetTabstopHighlightBackground",{dark:new Y(new kt(124,124,124,.3)),light:new Y(new kt(10,50,100,.2)),hcDark:new Y(new kt(124,124,124,.3)),hcLight:new Y(new kt(10,50,100,.2))},p("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop."));M("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},p("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop."));M("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},p("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet."));M("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new Y(new kt(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},p("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet."));const mie=M("breadcrumb.foreground",{light:We(be,.8),dark:We(be,.8),hcDark:We(be,.8),hcLight:We(be,.8)},p("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),_ie=M("breadcrumb.background",{light:wn,dark:wn,hcDark:wn,hcLight:wn},p("breadcrumbsBackground","Background color of breadcrumb items.")),s4=M("breadcrumb.focusForeground",{light:Fu(be,.2),dark:zr(be,.1),hcDark:zr(be,.1),hcLight:zr(be,.1)},p("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),vie=M("breadcrumb.activeSelectionForeground",{light:Fu(be,.2),dark:zr(be,.1),hcDark:zr(be,.1),hcLight:zr(be,.1)},p("breadcrumbsSelectedForeground","Color of selected breadcrumb items."));M("breadcrumbPicker.background",{light:Fi,dark:Fi,hcDark:Fi,hcLight:Fi},p("breadcrumbsSelectedBackground","Background color of breadcrumb item picker."));const B7=.5,o4=Y.fromHex("#40C8AE").transparent(B7),r4=Y.fromHex("#40A6FF").transparent(B7),a4=Y.fromHex("#606060").transparent(.4),Wr=.4,Ap=1,Nf=M("merge.currentHeaderBackground",{dark:o4,light:o4,hcDark:null,hcLight:null},p("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);M("merge.currentContentBackground",{dark:We(Nf,Wr),light:We(Nf,Wr),hcDark:We(Nf,Wr),hcLight:We(Nf,Wr)},p("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const Tf=M("merge.incomingHeaderBackground",{dark:r4,light:r4,hcDark:null,hcLight:null},p("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);M("merge.incomingContentBackground",{dark:We(Tf,Wr),light:We(Tf,Wr),hcDark:We(Tf,Wr),hcLight:We(Tf,Wr)},p("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const Mf=M("merge.commonHeaderBackground",{dark:a4,light:a4,hcDark:null,hcLight:null},p("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);M("merge.commonContentBackground",{dark:We(Mf,Wr),light:We(Mf,Wr),hcDark:We(Mf,Wr),hcLight:We(Mf,Wr)},p("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const Rp=M("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},p("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."));M("editorOverviewRuler.currentContentForeground",{dark:We(Nf,Ap),light:We(Nf,Ap),hcDark:Rp,hcLight:Rp},p("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts."));M("editorOverviewRuler.incomingContentForeground",{dark:We(Tf,Ap),light:We(Tf,Ap),hcDark:Rp,hcLight:Rp},p("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts."));M("editorOverviewRuler.commonContentForeground",{dark:We(Mf,Ap),light:We(Mf,Ap),hcDark:Rp,hcLight:Rp},p("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts."));const ZM=M("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},p("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),w_=M("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},p("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Af=M("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},p("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),Fy=M("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},p("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),l4=M("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},p("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),bie=M("minimap.infoHighlight",{dark:Ks,light:Ks,hcDark:Wv,hcLight:Wv},p("minimapInfo","Minimap marker color for infos.")),Cie=M("minimap.warningHighlight",{dark:zo,light:zo,hcDark:Bv,hcLight:Bv},p("overviewRuleWarning","Minimap marker color for warnings.")),wie=M("minimap.errorHighlight",{dark:new Y(new kt(255,18,18,.7)),light:new Y(new kt(255,18,18,.7)),hcDark:new Y(new kt(255,50,50,1)),hcLight:"#B5200D"},p("minimapError","Minimap marker color for errors.")),Sie=M("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},p("minimapBackground","Minimap background color.")),yie=M("minimap.foregroundOpacity",{dark:Y.fromHex("#000f"),light:Y.fromHex("#000f"),hcDark:Y.fromHex("#000f"),hcLight:Y.fromHex("#000f")},p("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.'));M("minimapSlider.background",{light:We(m_,.5),dark:We(m_,.5),hcDark:We(m_,.5),hcLight:We(m_,.5)},p("minimapSliderBackground","Minimap slider background color."));M("minimapSlider.hoverBackground",{light:We(__,.5),dark:We(__,.5),hcDark:We(__,.5),hcLight:We(__,.5)},p("minimapSliderHoverBackground","Minimap slider background color when hovering."));M("minimapSlider.activeBackground",{light:We(v_,.5),dark:We(v_,.5),hcDark:We(v_,.5),hcLight:We(v_,.5)},p("minimapSliderActiveBackground","Minimap slider background color when clicked on."));const Lie=M("problemsErrorIcon.foreground",{dark:vl,light:vl,hcDark:vl,hcLight:vl},p("problemsErrorIconForeground","The color used for the problems error icon.")),Die=M("problemsWarningIcon.foreground",{dark:zo,light:zo,hcDark:zo,hcLight:zo},p("problemsWarningIconForeground","The color used for the problems warning icon.")),xie=M("problemsInfoIcon.foreground",{dark:Ks,light:Ks,hcDark:Ks,hcLight:Ks},p("problemsInfoIconForeground","The color used for the problems info icon."));M("charts.foreground",{dark:be,light:be,hcDark:be,hcLight:be},p("chartsForeground","The foreground color used in charts."));M("charts.lines",{dark:We(be,.5),light:We(be,.5),hcDark:We(be,.5),hcLight:We(be,.5)},p("chartsLines","The color used for horizontal lines in charts."));M("charts.red",{dark:vl,light:vl,hcDark:vl,hcLight:vl},p("chartsRed","The red color used in chart visualizations."));M("charts.blue",{dark:Ks,light:Ks,hcDark:Ks,hcLight:Ks},p("chartsBlue","The blue color used in chart visualizations."));M("charts.yellow",{dark:zo,light:zo,hcDark:zo,hcLight:zo},p("chartsYellow","The yellow color used in chart visualizations."));M("charts.orange",{dark:Af,light:Af,hcDark:Af,hcLight:Af},p("chartsOrange","The orange color used in chart visualizations."));M("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},p("chartsGreen","The green color used in chart visualizations."));M("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},p("chartsPurple","The purple color used in chart visualizations."));function kie(o,e){var t,i,n,s;switch(o.op){case 0:return(t=na(o.value,e))===null||t===void 0?void 0:t.darken(o.factor);case 1:return(i=na(o.value,e))===null||i===void 0?void 0:i.lighten(o.factor);case 2:return(n=na(o.value,e))===null||n===void 0?void 0:n.transparent(o.factor);case 3:{const r=na(o.background,e);return r?(s=na(o.value,e))===null||s===void 0?void 0:s.makeOpaque(r):na(o.value,e)}case 4:for(const r of o.values){const a=na(r,e);if(a)return a}return;case 6:return na(e.defines(o.if)?o.then:o.else,e);case 5:{const r=na(o.value,e);if(!r)return;const a=na(o.background,e);return a?r.isDarkerThan(a)?Y.getLighterColor(r,a,o.factor).transparent(o.transparency):Y.getDarkerColor(r,a,o.factor).transparent(o.transparency):r.transparent(o.factor*o.transparency)}default:throw by()}}function Fu(o,e){return{op:0,value:o,factor:e}}function zr(o,e){return{op:1,value:o,factor:e}}function We(o,e){return{op:2,value:o,factor:e}}function Vv(...o){return{op:4,values:o}}function Iie(o,e,t){return{op:6,if:o,then:e,else:t}}function d4(o,e,t,i){return{op:5,value:o,background:e,factor:t,transparency:i}}function na(o,e){if(o!==null){if(typeof o=="string")return o[0]==="#"?Y.fromHex(o):e.getColor(o);if(o instanceof Y)return o;if(typeof o=="object")return kie(o,e)}}const W7="vscode://schemas/workbench-colors",V7=xi.as(My.JSONContribution);V7.registerSchema(W7,Oy.getColorSchema());const c4=new Yt(()=>V7.notifySchemaChanged(W7),200);Oy.onDidChangeSchema(()=>{c4.isScheduled()||c4.schedule()});class By{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(e){return new H7(this.x-e.scrollX,this.y-e.scrollY)}}class H7{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(e){return new By(this.clientX+e.scrollX,this.clientY+e.scrollY)}}class Eie{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class Nie{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function YM(o){const e=gn(o);return new Eie(e.left,e.top,e.width,e.height)}function XM(o,e,t){const i=e.width/o.offsetWidth,n=e.height/o.offsetHeight,s=(t.x-e.x)/i,r=(t.y-e.y)/n;return new Nie(s,r)}class gu extends Pr{constructor(e,t,i){super(Je(i),e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new By(this.posx,this.posy),this.editorPos=YM(i),this.relativePos=XM(i,this.editorPos,this.pos)}}class Tie{constructor(e){this._editorViewDomNode=e}_create(e){return new gu(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return J(e,"contextmenu",i=>{t(this._create(i))})}onMouseUp(e,t){return J(e,"mouseup",i=>{t(this._create(i))})}onMouseDown(e,t){return J(e,Se.MOUSE_DOWN,i=>{t(this._create(i))})}onPointerDown(e,t){return J(e,Se.POINTER_DOWN,i=>{t(this._create(i),i.pointerId)})}onMouseLeave(e,t){return J(e,Se.MOUSE_LEAVE,i=>{t(this._create(i))})}onMouseMove(e,t){return J(e,"mousemove",i=>t(this._create(i)))}}class Mie{constructor(e){this._editorViewDomNode=e}_create(e){return new gu(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return J(e,"pointerup",i=>{t(this._create(i))})}onPointerDown(e,t){return J(e,Se.POINTER_DOWN,i=>{t(this._create(i),i.pointerId)})}onPointerLeave(e,t){return J(e,Se.POINTER_LEAVE,i=>{t(this._create(i))})}onPointerMove(e,t){return J(e,"pointermove",i=>t(this._create(i)))}}class Aie extends q{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new vm),this._keydownListener=null}startMonitoring(e,t,i,n,s){this._keydownListener=Wi(e.ownerDocument,"keydown",r=>{r.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,r.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(e,t,i,r=>{n(new gu(r,!0,this._editorViewDomNode))},r=>{this._keydownListener.dispose(),s(r)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class o0{constructor(e){this._editor=e,this._instanceId=++o0._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new Yt(()=>this.garbageCollect(),1e3)}createClassNameRef(e){const t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const t=this.computeUniqueKey(e);let i=this._rules.get(t);if(!i){const n=this._counter++;i=new Rie(t,`dyn-rule-${this._instanceId}-${n}`,fw(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,i)}return i}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}}o0._idPool=0;class Rie{constructor(e,t,i,n){this.key=e,this.className=t,this.properties=n,this._referenceCount=0,this._styleElementDisposables=new de,this._styleElement=mr(i,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let i=`.${e} {`;for(const n in t){const s=t[n];let r;typeof s=="object"?r=Ee(s.id):r=s;const a=Pie(n);i+=` ${a}: ${r};`}return i+=` -}`,i}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function Tie(o){return o.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}class r0 extends q{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i=a.left?n.width=Math.max(n.width,a.left+a.width-n.left):(t[i++]=n,n=a)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t,i){if(!e||e.length===0)return null;const n=[];for(let s=0,r=e.length;sl)return null;if(t=Math.min(l,Math.max(0,t)),n=Math.min(l,Math.max(0,n)),t===n&&i===s&&i===0&&!e.children[t].firstChild){const h=e.children[t].getClientRects();return r.markDidDomLayout(),this._createHorizontalRangesFromClientRects(h,r.clientRectDeltaLeft,r.clientRectScale)}t!==n&&n>0&&s===0&&(n--,s=1073741824);let d=e.children[t].firstChild,c=e.children[n].firstChild;if((!d||!c)&&(!d&&i===0&&t>0&&(d=e.children[t-1].firstChild,i=1073741824),!c&&s===0&&n>0&&(c=e.children[n-1].firstChild,s=1073741824)),!d||!c)return null;i=Math.min(d.textContent.length,Math.max(0,i)),s=Math.min(c.textContent.length,Math.max(0,s));const u=this._readClientRects(d,i,c,s,r.endNode);return r.markDidDomLayout(),this._createHorizontalRangesFromClientRects(u,r.clientRectDeltaLeft,r.clientRectScale)}}var lr;(function(o){o.DARK="dark",o.LIGHT="light",o.HIGH_CONTRAST_DARK="hcDark",o.HIGH_CONTRAST_LIGHT="hcLight"})(lr||(lr={}));function xa(o){return o===lr.HIGH_CONTRAST_DARK||o===lr.HIGH_CONTRAST_LIGHT}function Pp(o){return o===lr.DARK||o===lr.HIGH_CONTRAST_DARK}const Oie=function(){return Ml?!0:!(ws||pr||ru)}();let sp=!0;class h4{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(50);i.get(38)==="off"?this.renderWhitespace=i.get(98):this.renderWhitespace="none",this.renderControlCharacters=i.get(93),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(33),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(66),this.stopRenderingLineAfter=i.get(116),this.fontLigatures=i.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class al{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(this._renderedViewLine)this._renderedViewLine.domNode=Ht(e);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return xa(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(e,t,i,n){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const s=i.getViewLineRenderingData(e),r=this._options,a=lo.filter(s.inlineDecorations,e,s.minColumn,s.maxColumn);let l=null;if(xa(r.themeType)||this._options.renderWhitespace==="selection"){const h=i.selections;for(const g of h){if(g.endLineNumbere)continue;const f=g.startLineNumber===e?g.startColumn:s.minColumn,m=g.endLineNumber===e?g.endColumn:s.maxColumn;f');const c=n0(d,n);n.appendString("");let u=null;return sp&&Oie&&s.isBasicASCII&&r.useMonospaceOptimizations&&c.containsForeignElements===0&&(u=new iC(this._renderedViewLine?this._renderedViewLine.domNode:null,d,c.characterMapping)),u||(u=$8(this._renderedViewLine?this._renderedViewLine.domNode:null,d,c.characterMapping,c.containsRTL,c.containsForeignElements)),this._renderedViewLine=u,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof iC:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof iC?this._renderedViewLine.monospaceAssumptionsAreValid():sp}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof iC&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i));const s=this._renderedViewLine.input.stopRenderingLineAfter;if(s!==-1&&t>s+1&&i>s+1)return new u4(!0,[new Vh(this.getWidth(n),0)]);s!==-1&&t>s+1&&(t=s+1),s!==-1&&i>s+1&&(i=s+1);const r=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return r&&r.length>0?new u4(!1,r):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}}al.CLASS_NAME="view-line";class iC{constructor(e,t,i){this._cachedWidth=-1,this.domNode=e,this.input=t;const n=Math.floor(t.lineContent.length/300);if(n>0){this._keyColumnPixelOffsetCache=new Float32Array(n);for(let s=0;s=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),sp=!1)}return sp}toSlowRenderedLine(){return $8(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const s=this._getColumnPixelOffset(e,t,n),r=this._getColumnPixelOffset(e,i,n);return[new Vh(s,r-s)]}_getColumnPixelOffset(e,t,i){if(t<=300){const d=this._characterMapping.getHorizontalOffset(t);return this._charWidth*d}const n=Math.floor((t-1)/300)-1,s=(n+1)*300+1;let r=-1;if(this._keyColumnPixelOffsetCache&&(r=this._keyColumnPixelOffsetCache[n],r===-1&&(r=this._actualReadPixelOffset(e,s,i),this._keyColumnPixelOffsetCache[n]=r)),r===-1){const d=this._characterMapping.getHorizontalOffset(t);return this._charWidth*d}const a=this._characterMapping.getHorizontalOffset(s),l=this._characterMapping.getHorizontalOffset(t);return r+this._charWidth*(l-a)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,i){if(!this.domNode)return-1;const n=this._characterMapping.getDomPosition(t),s=L1.readHorizontalRanges(this._getReadingTarget(this.domNode),n.partIndex,n.charIndex,n.partIndex,n.charIndex,i);return!s||s.length===0?-1:s[0].left}getColumnOfNodeOffset(e,t){return QM(this._characterMapping,e,t)}}class z8{constructor(e,t,i,n,s){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=s,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let r=0,a=this._characterMapping.length;r<=a;r++)this._pixelOffsetCache[r]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e==null||e.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(e,t,i,n){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const s=this._readPixelOffset(this.domNode,e,t,n);if(s===-1)return null;const r=this._readPixelOffset(this.domNode,e,i,n);return r===-1?null:[new Vh(s,r-s)]}return this._readVisibleRangesForRange(this.domNode,e,t,i,n)}_readVisibleRangesForRange(e,t,i,n,s){if(i===n){const r=this._readPixelOffset(e,t,i,s);return r===-1?null:[new Vh(r,0)]}else return this._readRawVisibleRangesForRange(e,i,n,s)}_readPixelOffset(e,t,i,n){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth(n);const s=this._getReadingTarget(e);return s.firstChild?(n.markDidDomLayout(),s.firstChild.offsetWidth):0}if(this._pixelOffsetCache!==null){const s=this._pixelOffsetCache[i];if(s!==-1)return s;const r=this._actualReadPixelOffset(e,t,i,n);return this._pixelOffsetCache[i]=r,r}return this._actualReadPixelOffset(e,t,i,n)}_actualReadPixelOffset(e,t,i,n){if(this._characterMapping.length===0){const l=L1.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n);return!l||l.length===0?-1:l[0].left}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth(n);const s=this._characterMapping.getDomPosition(i),r=L1.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,s.partIndex,s.charIndex,n);if(!r||r.length===0)return-1;const a=r[0].left;if(this.input.isBasicASCII){const l=this._characterMapping.getHorizontalOffset(i),d=Math.round(this.input.spaceWidth*l);if(Math.abs(d-a)<=1)return d}return a}_readRawVisibleRangesForRange(e,t,i,n){if(t===1&&i===this._characterMapping.length)return[new Vh(0,this.getWidth(n))];const s=this._characterMapping.getDomPosition(t),r=this._characterMapping.getDomPosition(i);return L1.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,r.partIndex,r.charIndex,n)}getColumnOfNodeOffset(e,t){return QM(this._characterMapping,e,t)}}class Fie extends z8{_readVisibleRangesForRange(e,t,i,n,s){const r=super._readVisibleRangesForRange(e,t,i,n,s);if(!r||r.length===0||i===n||i===1&&n===this._characterMapping.length)return r;if(!this.input.containsRTL){const a=this._readPixelOffset(e,t,n,s);if(a!==-1){const l=r[r.length-1];l.left=t){const u=t-r;return d-t=4&&e[0]===3&&e[3]===7}static isStrictChildOfViewLines(e){return e.length>4&&e[0]===3&&e[3]===7}static isChildOfScrollableElement(e){return e.length>=2&&e[0]===3&&e[1]===5}static isChildOfMinimap(e){return e.length>=2&&e[0]===3&&e[1]===8}static isChildOfContentWidgets(e){return e.length>=4&&e[0]===3&&e[3]===1}static isChildOfOverflowGuard(e){return e.length>=1&&e[0]===3}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&e[0]===2}static isChildOfOverlayWidgets(e){return e.length>=2&&e[0]===3&&e[1]===4}}class Op{constructor(e,t,i){this.viewModel=e.viewModel;const n=e.configuration.options;this.layoutInfo=n.get(143),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(66),this.stickyTabStops=n.get(115),this.typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return Op.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,s=e.viewModel.getLineCount();let r=null,a,l=null;return i.afterLineNumber!==s&&(l=new z(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new z(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),l===null?a=r:r===null?a=l:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Kn._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class JM extends Hie{constructor(e,t,i,n,s){super(e,t,i,n),this._ctx=e,s?(this.target=s,this.targetPath=Fl.collect(s,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset} - target: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(e=null){return e&&e.columnr.contentLeft+r.width)continue;const a=e.getVerticalOffsetForLineNumber(r.position.lineNumber);if(a<=s&&s<=a+r.height)return t.fulfillContentText(r.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const n=t.isInContentArea?8:5;return t.fulfillViewZone(n,i.position,i)}return null}static _hitTestTextArea(e,t){return yo.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let s=Math.abs(t.relativePos.x);const r={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:s};return s-=e.layoutInfo.glyphMarginLeft,s<=e.layoutInfo.glyphMarginWidth?t.fulfillMargin(2,n,i.range,r):(s-=e.layoutInfo.glyphMarginWidth,s<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,r):(s-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,r)))}return null}static _hitTestViewLines(e,t,i){if(!yo.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new z(1,1),g4);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const s=e.viewModel.getLineCount(),r=e.viewModel.getLineMaxColumn(s);return t.fulfillContentEmpty(new z(s,r),g4)}if(i){if(yo.isStrictChildOfViewLines(t.targetPath)){const s=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(e.viewModel.getLineLength(s)===0){const a=e.getLineWidth(s),l=sx(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(new z(s,1),l)}const r=e.getLineWidth(s);if(t.mouseContentHorizontalOffset>=r){const a=sx(t.mouseContentHorizontalOffset-r),l=new z(s,e.viewModel.getLineMaxColumn(s));return t.fulfillContentEmpty(l,a)}}return t.fulfillUnknown()}const n=Kn._doHitTest(e,t);return n.type===1?Kn.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(yo.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new z(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(yo.isChildOfScrollableElement(t.targetPath)&&t.target&&t.target.nodeType===1){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),s=e.viewModel.getLineMaxColumn(n);return t.fulfillScrollbar(new z(n,s))}}return null}static _hitTestScrollbar(e,t){if(yo.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new z(i,n))}return null}getMouseColumn(e){const t=this._context.configuration.options,i=t.get(143),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return Kn._getMouseColumn(n,t.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,s){const r=n.lineNumber,a=n.column,l=e.getLineWidth(r);if(t.mouseContentHorizontalOffset>l){const _=sx(t.mouseContentHorizontalOffset-l);return t.fulfillContentEmpty(n,_)}const d=e.visibleRangeForPosition(r,a);if(!d)return t.fulfillUnknown(n);const c=d.left;if(Math.abs(t.mouseContentHorizontalOffset-c)<1)return t.fulfillContentText(n,null,{mightBeForeignElement:!!s,injectedText:s});const u=[];if(u.push({offset:d.left,column:a}),a>1){const _=e.visibleRangeForPosition(r,a-1);_&&u.push({offset:_.left,column:a-1})}const h=e.viewModel.getLineMaxColumn(r);if(a_.offset-b.offset);const g=t.pos.toClientCoordinates(Je(e.viewDomNode)),f=i.getBoundingClientRect(),m=f.left<=g.clientX&&g.clientX<=f.right;let v=null;for(let _=1;_s)){const a=Math.floor((n+s)/2);let l=t.pos.y+(a-t.mouseVerticalOffset);l<=t.editorPos.y&&(l=t.editorPos.y+1),l>=t.editorPos.y+t.editorPos.height&&(l=t.editorPos.y+t.editorPos.height-1);const d=new By(t.pos.x,l),c=this._actualDoHitTestWithCaretRangeFromPoint(e,d.toClientCoordinates(Je(e.viewDomNode)));if(c.type===1)return c}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates(Je(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=sg(e.viewDomNode);let n;if(i?typeof i.caretRangeFromPoint>"u"?n=zie(i,t.clientX,t.clientY):n=i.caretRangeFromPoint(t.clientX,t.clientY):n=e.viewDomNode.ownerDocument.caretRangeFromPoint(t.clientX,t.clientY),!n||!n.startContainer)return new cc;const s=n.startContainer;if(s.nodeType===s.TEXT_NODE){const r=s.parentNode,a=r?r.parentNode:null,l=a?a.parentNode:null;return(l&&l.nodeType===l.ELEMENT_NODE?l.className:null)===al.CLASS_NAME?Ch.createFromDOMInfo(e,r,n.startOffset):new cc(s.parentNode)}else if(s.nodeType===s.ELEMENT_NODE){const r=s.parentNode,a=r?r.parentNode:null;return(a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===al.CLASS_NAME?Ch.createFromDOMInfo(e,s,s.textContent.length):new cc(s)}return new cc}static _doHitTestWithCaretPositionFromPoint(e,t){const i=e.viewDomNode.ownerDocument.caretPositionFromPoint(t.clientX,t.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){const n=i.offsetNode.parentNode,s=n?n.parentNode:null,r=s?s.parentNode:null;return(r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===al.CLASS_NAME?Ch.createFromDOMInfo(e,i.offsetNode.parentNode,i.offset):new cc(i.offsetNode.parentNode)}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){const n=i.offsetNode.parentNode,s=n&&n.nodeType===n.ELEMENT_NODE?n.className:null,r=n?n.parentNode:null,a=r&&r.nodeType===r.ELEMENT_NODE?r.className:null;if(s===al.CLASS_NAME){const l=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(l)return Ch.createFromDOMInfo(e,l,0)}else if(a===al.CLASS_NAME)return Ch.createFromDOMInfo(e,i.offsetNode,0)}return new cc(i.offsetNode)}static _snapToSoftTabBoundary(e,t){const i=t.getLineContent(e.lineNumber),{tabSize:n}=t.model.getOptions(),s=Hv.atomicPosition(i,e.column-1,n,2);return s!==-1?new z(e.lineNumber,s+1):e}static _doHitTest(e,t){let i=new cc;if(typeof e.viewDomNode.ownerDocument.caretRangeFromPoint=="function"?i=this._doHitTestWithCaretRangeFromPoint(e,t):e.viewDomNode.ownerDocument.caretPositionFromPoint&&(i=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates(Je(e.viewDomNode)))),i.type===1){const n=e.viewModel.getInjectedTextAt(i.position),s=e.viewModel.normalizePosition(i.position,2);(n||!s.equals(i.position))&&(i=new U8(s,i.spanNode,n))}return i}}function zie(o,e,t){const i=document.createRange();let n=o.elementFromPoint(e,t);if(n!==null){for(;n&&n.firstChild&&n.firstChild.nodeType!==n.firstChild.TEXT_NODE&&n.lastChild&&n.lastChild.firstChild;)n=n.lastChild;const s=n.getBoundingClientRect(),r=Je(n),a=r.getComputedStyle(n,null).getPropertyValue("font-style"),l=r.getComputedStyle(n,null).getPropertyValue("font-variant"),d=r.getComputedStyle(n,null).getPropertyValue("font-weight"),c=r.getComputedStyle(n,null).getPropertyValue("font-size"),u=r.getComputedStyle(n,null).getPropertyValue("line-height"),h=r.getComputedStyle(n,null).getPropertyValue("font-family"),g=`${a} ${l} ${d} ${c}/${u} ${h}`,f=n.innerText;let m=s.left,v=0,_;if(e>s.left+s.width)v=f.length;else{const b=Th.getInstance();for(let C=0;Ct(new Pr(Je(e),i))))}onmousedown(e,t){this._register(J(e,Se.MOUSE_DOWN,i=>t(new Pr(Je(e),i))))}onmouseover(e,t){this._register(J(e,Se.MOUSE_OVER,i=>t(new Pr(Je(e),i))))}onmouseleave(e,t){this._register(J(e,Se.MOUSE_LEAVE,i=>t(new Pr(Je(e),i))))}onkeydown(e,t){this._register(J(e,Se.KEY_DOWN,i=>t(new gi(i))))}onkeyup(e,t){this._register(J(e,Se.KEY_UP,i=>t(new gi(i))))}oninput(e,t){this._register(J(e,Se.INPUT,t))}onblur(e,t){this._register(J(e,Se.BLUR,t))}onfocus(e,t){this._register(J(e,Se.FOCUS,t))}ignoreGesture(e){return ei.ignoreTarget(e)}};const Fp=11;class $ie extends Gr{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...Ue.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width=Fp+"px",this.domNode.style.height=Fp+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new vm),this._register(Wi(this.bgDomNode,Se.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(Wi(this.domNode,Se.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new kM),this._pointerdownScheduleRepeatTimer=this._register(new qr)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Je(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}}class Uie extends q{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new qr)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)===null||e===void 0||e.setClassName(this._visibleClassName)},0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(t=this._domNode)===null||t===void 0||t.setClassName(this._invisibleClassName+(e?" fade":"")))}}const jie=140;class j8 extends Gr{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new Uie(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new vm),this._shouldRender=!0,this.domNode=Ht(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(J(this.domNode.domNode,Se.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){const t=this._register(new $ie(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=Ht(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof i=="number"&&this.slider.setWidth(i),typeof n=="number"&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(J(this.slider.domNode,Se.POINTER_DOWN,s=>{s.button===0&&(s.preventDefault(),this._sliderPointerDown(s))})),this.onclick(this.slider.domNode,s=>{s.leftButton&&s.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderPointerPosition(e);i<=s&&s<=n?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,i=e.offsetY;else{const s=gn(this.domNode.domNode);t=e.pageX-s.left,i=e.pageY-s.top}const n=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,s=>{const r=this._sliderOrthogonalPointerPosition(s),a=Math.abs(r-i);if(is&&a>jie){this._setDesiredScrollPositionNow(n.getScrollPosition());return}const d=this._sliderPointerPosition(s)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(d))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}const Kie=20;class Bp{constructor(e,t,i,n,s,r){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=s,this._scrollPosition=r,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new Bp(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t?(this._visibleSize=t,this._refreshComputedValues(),!0):!1}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t?(this._scrollSize=t,this._refreshComputedValues(),!0):!1}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t?(this._scrollPosition=t,this._refreshComputedValues(),!0):!1}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,n,s){const r=Math.max(0,i-e),a=Math.max(0,r-2*t),l=n>0&&n>i;if(!l)return{computedAvailableSize:Math.round(r),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};const d=Math.round(Math.max(Kie,Math.floor(i*a/n))),c=(a-d)/(n-i),u=s*c;return{computedAvailableSize:Math.round(r),computedIsNeeded:l,computedSliderSize:Math.round(d),computedSliderRatio:c,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){const e=Bp._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return tthis._host.onMouseWheel(new ig(null,1,0))}),this._createArrow({className:"scra",icon:ve.scrollbarButtonRight,top:a,left:void 0,bottom:void 0,right:r,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new ig(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class Gie extends j8{constructor(e,t,i){const n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new Bp(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,s.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const r=(t.arrowSize-Fp)/2,a=(t.verticalScrollbarSize-Fp)/2;this._createArrow({className:"scra",icon:ve.scrollbarButtonUp,top:r,left:a,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new ig(null,0,1))}),this._createArrow({className:"scra",icon:ve.scrollbarButtonDown,top:void 0,left:a,bottom:r,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new ig(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}class kw{constructor(e,t,i,n,s,r,a){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t=t|0,i=i|0,n=n|0,s=s|0,r=r|0,a=a|0),this.rawScrollLeft=n,this.rawScrollTop=a,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),s<0&&(s=0),a+s>r&&(a=r-s),a<0&&(a=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=s,this.scrollHeight=r,this.scrollTop=a}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new kw(this._forceIntegerValues,typeof e.width<"u"?e.width:this.width,typeof e.scrollWidth<"u"?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,typeof e.height<"u"?e.height:this.height,typeof e.scrollHeight<"u"?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new kw(this._forceIntegerValues,this.width,this.scrollWidth,typeof e.scrollLeft<"u"?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof e.scrollTop<"u"?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,s=this.scrollLeft!==e.scrollLeft,r=this.height!==e.height,a=this.scrollHeight!==e.scrollHeight,l=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:s,heightChanged:r,scrollHeightChanged:a,scrollTopChanged:l}}}class bm extends q{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new W),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new kw(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var i;const n=this._state.withScrollDimensions(e,t);this._setState(n,!!this._smoothScrolling),(i=this._smoothScrolling)===null||i===void 0||i.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;t?n=new zv(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):n=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const i=this._state.withScrollPosition(e);this._smoothScrolling=zv.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class f4{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function ox(o,e){const t=e-o;return function(i){return o+t*Xie(i)}}function Zie(o,e,t){return function(i){return i2.5*i){let s,r;return e0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return this._front===-1&&this._rear===-1||this._memory[this._rear],(!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}Iw.INSTANCE=new Iw;class eA extends Gr{get options(){return this._options}constructor(e,t,i){super(),this._onScroll=this._register(new W),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new W),e.style.overflow="hidden",this._options=ene(t),this._scrollable=i,this._register(this._scrollable.onScroll(s=>{this._onWillScroll.fire(s),this._onDidScroll(s),this._onScroll.fire(s)}));const n={onMouseWheel:s=>this._onMouseWheel(s),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new Gie(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new qie(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=Ht(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Ht(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Ht(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,s=>this._onMouseOver(s)),this.onmouseleave(this._listenOnDomNode,s=>this._onMouseLeave(s)),this._hideTimeout=this._register(new qr),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=jt(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,It&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new ig(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=jt(this._mouseWheelToDispose),e)){const i=n=>{this._onMouseWheel(new ig(n))};this._mouseWheelToDispose.push(J(this._listenOnDomNode,Se.MOUSE_WHEEL,i,{passive:!1}))}}_onMouseWheel(e){var t;if(!((t=e.browserEvent)===null||t===void 0)&&t.defaultPrevented)return;const i=Iw.INSTANCE;i.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let r=e.deltaY*this._options.mouseWheelScrollSensitivity,a=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&a+r===0?a=r=0:Math.abs(r)>=Math.abs(a)?a=0:r=0),this._options.flipAxes&&([r,a]=[a,r]);const l=!It&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||l)&&!a&&(a=r,r=0),e.browserEvent&&e.browserEvent.altKey&&(a=a*this._options.fastScrollSensitivity,r=r*this._options.fastScrollSensitivity);const d=this._scrollable.getFutureScrollPosition();let c={};if(r){const u=p4*r,h=d.scrollTop-(u<0?Math.floor(u):Math.ceil(u));this._verticalScrollbar.writeScrollPosition(c,h)}if(a){const u=p4*a,h=d.scrollLeft-(u<0?Math.floor(u):Math.ceil(u));this._horizontalScrollbar.writeScrollPosition(c,h)}c=this._scrollable.validateScrollPosition(c),(d.scrollLeft!==c.scrollLeft||d.scrollTop!==c.scrollTop)&&(this._options.mouseWheelSmoothScroll&&i.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(c):this._scrollable.setScrollPositionNow(c),n=!0)}let s=n;!s&&this._options.alwaysConsumeMouseWheel&&(s=!0),!s&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(s=!0),s&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",s=t?" top":"",r=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${s}`),this._topLeftShadowDomNode.setClassName(`shadow${r}${s}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),Qie)}}class K8 extends eA{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const i=new bm({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:n=>po(Je(e),n)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class Vy extends eA{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class a0 extends eA{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const i=new bm({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:n=>po(Je(e),n)});super(e,t,i),this._register(i),this._element=e,this._register(this.onScroll(n=>{n.scrollTopChanged&&(this._element.scrollTop=n.scrollTop),n.scrollLeftChanged&&(this._element.scrollLeft=n.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}function ene(o){const e={lazyRender:typeof o.lazyRender<"u"?o.lazyRender:!1,className:typeof o.className<"u"?o.className:"",useShadows:typeof o.useShadows<"u"?o.useShadows:!0,handleMouseWheel:typeof o.handleMouseWheel<"u"?o.handleMouseWheel:!0,flipAxes:typeof o.flipAxes<"u"?o.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof o.consumeMouseWheelIfScrollbarIsNeeded<"u"?o.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof o.alwaysConsumeMouseWheel<"u"?o.alwaysConsumeMouseWheel:!1,scrollYToX:typeof o.scrollYToX<"u"?o.scrollYToX:!1,mouseWheelScrollSensitivity:typeof o.mouseWheelScrollSensitivity<"u"?o.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof o.fastScrollSensitivity<"u"?o.fastScrollSensitivity:5,scrollPredominantAxis:typeof o.scrollPredominantAxis<"u"?o.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof o.mouseWheelSmoothScroll<"u"?o.mouseWheelSmoothScroll:!0,arrowSize:typeof o.arrowSize<"u"?o.arrowSize:11,listenOnDomNode:typeof o.listenOnDomNode<"u"?o.listenOnDomNode:null,horizontal:typeof o.horizontal<"u"?o.horizontal:1,horizontalScrollbarSize:typeof o.horizontalScrollbarSize<"u"?o.horizontalScrollbarSize:10,horizontalSliderSize:typeof o.horizontalSliderSize<"u"?o.horizontalSliderSize:0,horizontalHasArrows:typeof o.horizontalHasArrows<"u"?o.horizontalHasArrows:!1,vertical:typeof o.vertical<"u"?o.vertical:1,verticalScrollbarSize:typeof o.verticalScrollbarSize<"u"?o.verticalScrollbarSize:10,verticalHasArrows:typeof o.verticalHasArrows<"u"?o.verticalHasArrows:!1,verticalSliderSize:typeof o.verticalSliderSize<"u"?o.verticalSliderSize:0,scrollByPage:typeof o.scrollByPage<"u"?o.scrollByPage:!1};return e.horizontalSliderSize=typeof o.horizontalSliderSize<"u"?o.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof o.verticalSliderSize<"u"?o.verticalSliderSize:e.verticalScrollbarSize,It&&(e.className+=" mac"),e}class tA extends r0{constructor(e,t,i){super(),this._mouseLeaveMonitor=null,this._context=e,this.viewController=t,this.viewHelper=i,this.mouseTargetFactory=new Kn(this._context,i),this._mouseDownOperation=this._register(new tne(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(r,a)=>this._createMouseTarget(r,a),r=>this._getMouseColumn(r))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(143).height;const n=new kie(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,r=>this._onContextMenu(r,!0))),this._register(n.onMouseMove(this.viewHelper.viewDomNode,r=>{this._onMouseMove(r),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=J(this.viewHelper.viewDomNode.ownerDocument,"mousemove",a=>{this.viewHelper.viewDomNode.contains(a.target)||this._onMouseLeave(new gu(a,!1,this.viewHelper.viewDomNode))}))})),this._register(n.onMouseUp(this.viewHelper.viewDomNode,r=>this._onMouseUp(r))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,r=>this._onMouseLeave(r)));let s=0;this._register(n.onPointerDown(this.viewHelper.viewDomNode,(r,a)=>{s=a})),this._register(J(this.viewHelper.viewDomNode,Se.POINTER_UP,r=>{this._mouseDownOperation.onPointerUp()})),this._register(n.onMouseDown(this.viewHelper.viewDomNode,r=>this._onMouseDown(r,s))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const e=Iw.INSTANCE;let t=0,i=sr.getZoomLevel(),n=!1,s=0;const r=l=>{if(this.viewController.emitMouseWheel(l),!this._context.configuration.options.get(75))return;const d=new ig(l);if(e.acceptStandardWheelEvent(d),e.isPhysicalMouseWheel()){if(a(l)){const c=sr.getZoomLevel(),u=d.deltaY>0?1:-1;sr.setZoomLevel(c+u),d.preventDefault(),d.stopPropagation()}}else Date.now()-t>50&&(i=sr.getZoomLevel(),n=a(l),s=0),t=Date.now(),s+=d.deltaY,n&&(sr.setZoomLevel(i+s/5),d.preventDefault(),d.stopPropagation())};this._register(J(this.viewHelper.viewDomNode,Se.MOUSE_WHEEL,r,{capture:!0,passive:!1}));function a(l){return It?(l.metaKey||l.ctrlKey)&&!l.shiftKey&&!l.altKey:l.ctrlKey&&!l.metaKey&&!l.shiftKey&&!l.altKey}}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(143)){const t=this._context.configuration.options.get(143).height;this._height!==t&&(this._height=t,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){const n=new H8(e,t).toPageCoordinates(Je(this.viewHelper.viewDomNode)),s=YM(this.viewHelper.viewDomNode);if(n.ys.y+s.height||n.xs.x+s.width)return null;const r=XM(this.viewHelper.viewDomNode,s,n);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),s,n,r,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const n=sg(this.viewHelper.viewDomNode);n&&(i=n.elementsFromPoint(e.posx,e.posy).find(s=>this.viewHelper.viewDomNode.contains(s)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),!(this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(c&&(n||r&&a))u(),this._mouseDownOperation.start(i.type,e,t);else if(s)e.preventDefault();else if(l){const h=i.detail;c&&this.viewHelper.shouldSuppressMouseDownOnViewZone(h.viewZoneId)&&(u(),this._mouseDownOperation.start(i.type,e,t),e.preventDefault())}else d&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(u(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}}class tne extends q{constructor(e,t,i,n,s,r){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._mouseTargetFactory=n,this._createMouseTarget=s,this._getMouseColumn=r,this._mouseMoveMonitor=this._register(new Eie(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new ine(this._context,this._viewHelper,this._mouseTargetFactory,(a,l,d)=>this._dispatchMouse(a,l,d))),this._mouseState=new Hy,this._currentSelection=new Re(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):t.type===13&&(t.outsidePosition==="above"||t.outsidePosition==="below")?this._topBottomDragScrolling.start(t,e):(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)))}start(e,t,i){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(e===3),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;const s=this._context.configuration.options;if(!s.get(90)&&s.get(35)&&!s.get(22)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&n.type===6&&n.position&&this._currentSelection.containsPosition(n.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,r=>this._onMouseDownThenMove(r),r=>{const a=this._findMousePosition(this._lastMouseEvent,!1);G7(r)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:a?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,r=>this._onMouseDownThenMove(r),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.viewModel,n=this._context.viewLayout,s=this._getMouseColumn(e);if(e.posyt.y+t.height){const a=e.posy-t.y-t.height,l=n.getCurrentScrollTop()+e.relativePos.y,d=Op.getZoneAtCoord(this._context,l);if(d){const u=this._helpPositionJumpOverViewZone(d);if(u)return vs.createOutsideEditor(s,u,"below",a)}const c=n.getLineNumberAtVerticalOffset(l);return vs.createOutsideEditor(s,new z(c,i.getLineMaxColumn(c)),"below",a)}const r=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y);if(e.posxt.x+t.width){const a=e.posx-t.x-t.width;return vs.createOutsideEditor(s,new z(r,i.getLineMaxColumn(r)),"right",a)}return null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t);if(!n.position)return null;if(n.type===8||n.type===5){const r=this._helpPositionJumpOverViewZone(n.detail);if(r)return vs.createViewZone(n.type,n.element,n.mouseColumn,r,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new z(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t,i){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:i,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:e.type===6&&e.detail.injectedText!==null})}}class ine extends q{constructor(e,t,i,n){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new nne(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class nne extends q{constructor(e,t,i,n,s,r){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._position=s,this._mouseEvent=r,this._lastTime=Date.now(),this._animationFrameDisposable=po(Je(r.browserEvent),()=>this._execute())}dispose(){this._animationFrameDisposable.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){const e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){const e=this._context.configuration.options.get(66),t=this._context.configuration.options.get(143).height/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){const e=this._context.configuration.options.get(66),t=this._getScrollSpeed(),i=this._tick(),n=t*(i/1e3)*e,s=this._position.outsidePosition==="above"?-n:n;this._context.viewModel.viewLayout.deltaScrollNow(0,s),this._viewHelper.renderNow();const r=this._context.viewLayout.getLinesViewportData(),a=this._position.outsidePosition==="above"?r.startLineNumber:r.endLineNumber;let l;{const d=YM(this._viewHelper.viewDomNode),c=this._context.configuration.options.get(143).horizontalScrollbarHeight,u=new By(this._mouseEvent.pos.x,d.y+d.height-c-.1),h=XM(this._viewHelper.viewDomNode,d,u);l=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),d,u,h,null)}(!l.position||l.position.lineNumber!==a)&&(this._position.outsidePosition==="above"?l=vs.createOutsideEditor(this._position.mouseColumn,new z(a,1),"above",this._position.outsideDistance):l=vs.createOutsideEditor(this._position.mouseColumn,new z(a,this._context.viewModel.getLineMaxColumn(a)),"below",this._position.outsideDistance)),this._dispatchMouse(l,!0,2),this._animationFrameDisposable=po(Je(l.element),()=>this._execute())}}class Hy{get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=new Date().getTime();i-this._lastSetMouseDownCountTime>Hy.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}Hy.CLEAR_MOUSE_DOWN_COUNT_TIME=400;class St{get event(){return this.emitter.event}constructor(e,t,i){const n=s=>this.emitter.fire(s);this.emitter=new W({onWillAddFirstListener:()=>e.addEventListener(t,n,i),onDidRemoveLastListener:()=>e.removeEventListener(t,n,i)})}dispose(){this.emitter.dispose()}}var Ec;(function(o){const e={total:0,min:Number.MAX_VALUE,max:0},t={...e},i={...e},n={...e};let s=0;const r={keydown:0,input:0,render:0};function a(){_(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),r.keydown=1,queueMicrotask(l)}o.onKeyDown=a;function l(){r.keydown===1&&(performance.mark("keydown/end"),r.keydown=2)}function d(){performance.mark("input/start"),r.input=1,v()}o.onBeforeInput=d;function c(){r.input===0&&d(),queueMicrotask(u)}o.onInput=c;function u(){r.input===1&&(performance.mark("input/end"),r.input=2)}function h(){_()}o.onKeyUp=h;function g(){_()}o.onSelectionChange=g;function f(){r.keydown===2&&r.input===2&&r.render===0&&(performance.mark("render/start"),r.render=1,queueMicrotask(m),v())}o.onRenderStart=f;function m(){r.render===1&&(performance.mark("render/end"),r.render=2)}function v(){setTimeout(_)}function _(){r.keydown===2&&r.input===2&&r.render===2&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),b("keydown",e),b("input",t),b("render",i),b("inputlatency",n),s++,C())}function b(y,I){const E=performance.getEntriesByName(y)[0].duration;I.total+=E,I.min=Math.min(I.min,E),I.max=Math.max(I.max,E)}function C(){performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),r.keydown=0,r.input=0,r.render=0}function w(){if(s===0)return;const y={keydown:S(e),input:S(t),render:S(i),total:S(n),sampleCount:s};return x(e),x(t),x(i),x(n),s=0,y}o.getAndClearMeasurements=w;function S(y){return{average:y.total/s,max:y.max,min:y.min}}function x(y){y.total=0,y.min=Number.MAX_VALUE,y.max=0}})(Ec||(Ec={}));class Fn{constructor(e,t,i,n,s){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=s}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){const i=e.getValue(),n=e.getSelectionStart(),s=e.getSelectionEnd();let r;if(t){const a=i.substring(0,n),l=t.value.substring(0,t.selectionStart);a===l&&(r=t.newlineCountBeforeSelection)}return new Fn(i,n,s,null,r)}collapseSelection(){return this.selectionStart===this.value.length?this:new Fn(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){var t,i,n,s,r,a,l,d;if(e<=this.selectionStart){const h=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition((i=(t=this.selection)===null||t===void 0?void 0:t.getStartPosition())!==null&&i!==void 0?i:null,h,-1)}if(e>=this.selectionEnd){const h=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition((s=(n=this.selection)===null||n===void 0?void 0:n.getEndPosition())!==null&&s!==void 0?s:null,h,1)}const c=this.value.substring(this.selectionStart,e);if(c.indexOf("…")===-1)return this._finishDeduceEditorPosition((a=(r=this.selection)===null||r===void 0?void 0:r.getStartPosition())!==null&&a!==void 0?a:null,c,1);const u=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition((d=(l=this.selection)===null||l===void 0?void 0:l.getEndPosition())!==null&&d!==void 0?d:null,u,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,s=-1;for(;(s=t.indexOf(` -`,s+1))!==-1;)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const n=Math.min(Qh(e.value,t.value),e.selectionStart,t.selectionStart),s=Math.min(cw(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd);e.value.substring(n,e.value.length-s);const r=t.value.substring(n,t.value.length-s),a=e.selectionStart-n,l=e.selectionEnd-n,d=t.selectionStart-n,c=t.selectionEnd-n;if(d===c){const h=e.selectionStart-n;return{text:r,replacePrevCharCnt:h,replaceNextCharCnt:0,positionDelta:0}}const u=l-a;return{text:r,replacePrevCharCnt:u,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(Qh(e.value,t.value),e.selectionEnd),n=Math.min(cw(e.value,t.value),e.value.length-e.selectionEnd),s=e.value.substring(i,e.value.length-n),r=t.value.substring(i,t.value.length-n);e.selectionStart-i;const a=e.selectionEnd-i;t.selectionStart-i;const l=t.selectionEnd-i;return{text:r,replacePrevCharCnt:a,replaceNextCharCnt:s.length-a,positionDelta:l-r.length}}}Fn.EMPTY=new Fn("",0,0,null,void 0);class Rf{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,s=i+t;return new k(n,1,s+1,1)}static fromEditorSelection(e,t,i,n){const r=Rf._getPageOfLine(t.startLineNumber,i),a=Rf._getRangeForPage(r,i),l=Rf._getPageOfLine(t.endLineNumber,i),d=Rf._getRangeForPage(l,i);let c=a.intersectRanges(new k(1,1,t.startLineNumber,t.startColumn));if(n&&e.getValueLengthInRange(c,1)>500){const _=e.modifyPosition(c.getEndPosition(),-500);c=k.fromPositions(_,c.getEndPosition())}const u=e.getValueInRange(c,1),h=e.getLineCount(),g=e.getLineMaxColumn(h);let f=d.intersectRanges(new k(t.endLineNumber,t.endColumn,h,g));if(n&&e.getValueLengthInRange(f,1)>500){const _=e.modifyPosition(f.getStartPosition(),500);f=k.fromPositions(f.getStartPosition(),_)}const m=e.getValueInRange(f,1);let v;if(r===l||r+1===l)v=e.getValueInRange(t,1);else{const _=a.intersectRanges(t),b=d.intersectRanges(t);v=e.getValueInRange(_,1)+"…"+e.getValueInRange(b,1)}return n&&v.length>2*500&&(v=v.substring(0,500)+"…"+v.substring(v.length-500,v.length)),new Fn(u+v+m,u.length,u.length+v.length,t,c.endLineNumber-c.startLineNumber)}}var sne=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},m4=function(o,e){return function(t,i){e(t,i,o)}},Ew;(function(o){o.Tap="-monaco-textarea-synthetic-tap"})(Ew||(Ew={}));const rE={forceCopyWithSyntaxHighlighting:!1};class $v{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}$v.INSTANCE=new $v;class one{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){e=e||"";const t={text:e,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}let aE=class extends q{get textAreaState(){return this._textAreaState}constructor(e,t,i,n,s,r){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._accessibilityService=s,this._logService=r,this._onFocus=this._register(new W),this.onFocus=this._onFocus.event,this._onBlur=this._register(new W),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new W),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new W),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new W),this.onCut=this._onCut.event,this._onPaste=this._register(new W),this.onPaste=this._onPaste.event,this._onType=this._register(new W),this.onType=this._onType.event,this._onCompositionStart=this._register(new W),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new W),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new W),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new W),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new An),this._asyncTriggerCut=this._register(new Yt(()=>this._onCut.fire(),0)),this._textAreaState=Fn.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(ye.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new Yt(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let a=null;this._register(this._textArea.onKeyDown(l=>{const d=new gi(l);(d.keyCode===114||this._currentComposition&&d.keyCode===1)&&d.stopPropagation(),d.equals(9)&&d.preventDefault(),a=d,this._onKeyDown.fire(d)})),this._register(this._textArea.onKeyUp(l=>{const d=new gi(l);this._onKeyUp.fire(d)})),this._register(this._textArea.onCompositionStart(l=>{const d=new one;if(this._currentComposition){this._currentComposition=d;return}if(this._currentComposition=d,this._OS===2&&a&&a.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===l.data&&(a.code==="ArrowRight"||a.code==="ArrowLeft")){d.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:l.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:l.data});return}this._onCompositionStart.fire({data:l.data})})),this._register(this._textArea.onCompositionUpdate(l=>{const d=this._currentComposition;if(!d)return;if(this._browser.isAndroid){const u=Fn.readFromTextArea(this._textArea,this._textAreaState),h=Fn.deduceAndroidCompositionInput(this._textAreaState,u);this._textAreaState=u,this._onType.fire(h),this._onCompositionUpdate.fire(l);return}const c=d.handleCompositionUpdate(l.data);this._textAreaState=Fn.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(c),this._onCompositionUpdate.fire(l)})),this._register(this._textArea.onCompositionEnd(l=>{const d=this._currentComposition;if(!d)return;if(this._currentComposition=null,this._browser.isAndroid){const u=Fn.readFromTextArea(this._textArea,this._textAreaState),h=Fn.deduceAndroidCompositionInput(this._textAreaState,u);this._textAreaState=u,this._onType.fire(h),this._onCompositionEnd.fire();return}const c=d.handleCompositionUpdate(l.data);this._textAreaState=Fn.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(c),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(l=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const d=Fn.readFromTextArea(this._textArea,this._textAreaState),c=Fn.deduceInput(this._textAreaState,d,this._OS===2);c.replacePrevCharCnt===0&&c.text.length===1&&(bn(c.text.charCodeAt(0))||c.text.charCodeAt(0)===127)||(this._textAreaState=d,(c.text!==""||c.replacePrevCharCnt!==0||c.replaceNextCharCnt!==0||c.positionDelta!==0)&&this._onType.fire(c))})),this._register(this._textArea.onCut(l=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(l),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(l=>{this._ensureClipboardGetsEditorSelection(l)})),this._register(this._textArea.onPaste(l=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),l.preventDefault(),!l.clipboardData)return;let[d,c]=lE.getTextData(l.clipboardData);d&&(c=c||$v.INSTANCE.get(d),this._onPaste.fire({text:d,metadata:c}))})),this._register(this._textArea.onFocus(()=>{const l=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!l&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new Yt(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return J(this._textArea.ownerDocument,"selectionchange",t=>{if(Ec.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const s=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),s<100||!this._textAreaState.selection)return;const r=this._textArea.getValue();if(this._textAreaState.value!==r)return;const a=this._textArea.getSelectionStart(),l=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===a&&this._textAreaState.selectionEnd===l)return;const d=this._textAreaState.deduceEditorPosition(a),c=this._host.deduceModelPosition(d[0],d[1],d[2]),u=this._textAreaState.deduceEditorPosition(l),h=this._host.deduceModelPosition(u[0],u[1],u[2]),g=new Re(c.lineNumber,c.column,h.lineNumber,h.column);this._onSelectionChangeRequest.fire(g)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeNativeTextAreaContent(e){!this._accessibilityService.isScreenReaderOptimized()&&e==="render"||this._currentComposition||(this._logService.trace(`writeTextAreaState(reason: ${e})`),this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent()))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};$v.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,` -`):t.text,i),e.preventDefault(),e.clipboardData&&lE.setTextData(e.clipboardData,t.text,t.html,i)}};aE=sne([m4(4,Zl),m4(5,bo)],aE);const lE={getTextData(o){const e=o.getData(qi.text);let t=null;const i=o.getData("vscode-editor-data");if(typeof i=="string")try{t=JSON.parse(i),t.version!==1&&(t=null)}catch{}return e.length===0&&t===null&&o.files.length>0?[Array.prototype.slice.call(o.files,0).map(s=>s.name).join(` -`),null]:[e,t]},setTextData(o,e,t,i){o.setData(qi.text,e),typeof t=="string"&&o.setData("text/html",t),o.setData("vscode-editor-data",JSON.stringify(i))}};class rne extends q{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new St(this._actual,"keydown")).event,this.onKeyUp=this._register(new St(this._actual,"keyup")).event,this.onCompositionStart=this._register(new St(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new St(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new St(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new St(this._actual,"beforeinput")).event,this.onInput=this._register(new St(this._actual,"input")).event,this.onCut=this._register(new St(this._actual,"cut")).event,this.onCopy=this._register(new St(this._actual,"copy")).event,this.onPaste=this._register(new St(this._actual,"paste")).event,this.onFocus=this._register(new St(this._actual,"focus")).event,this.onBlur=this._register(new St(this._actual,"blur")).event,this._onSyntheticTap=this._register(new W),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown(()=>Ec.onKeyDown())),this._register(this.onBeforeInput(()=>Ec.onBeforeInput())),this._register(this.onInput(()=>Ec.onInput())),this._register(this.onKeyUp(()=>Ec.onKeyUp())),this._register(J(this._actual,Ew.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const e=sg(this._actual);return e?e.activeElement===this._actual:this._actual.isConnected?this._actual.ownerDocument.activeElement===this._actual:!1}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){const n=this._actual;let s=null;const r=sg(n);r?s=r.activeElement:s=n.ownerDocument.activeElement;const a=Je(s),l=s===n,d=n.selectionStart,c=n.selectionEnd;if(l&&d===t&&c===i){pr&&a.parent!==a&&n.focus();return}if(l){this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),pr&&a.parent!==a&&n.focus();return}try{const u=GX(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),ZX(n,u)}catch{}}}class ane extends tA{constructor(e,t,i){super(e,t,i),this._register(ei.addTarget(this.viewHelper.linesContentDomNode)),this._register(J(this.viewHelper.linesContentDomNode,ni.Tap,s=>this.onTap(s))),this._register(J(this.viewHelper.linesContentDomNode,ni.Change,s=>this.onChange(s))),this._register(J(this.viewHelper.linesContentDomNode,ni.Contextmenu,s=>this._onContextMenu(new gu(s,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(J(this.viewHelper.linesContentDomNode,"pointerdown",s=>{const r=s.pointerType;if(r==="mouse"){this._lastPointerType="mouse";return}else r==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const n=new Iie(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,s=>this._onMouseMove(s))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,s=>this._onMouseUp(s))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,s=>this._onMouseLeave(s))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,(s,r)=>this._onMouseDown(s,r)))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new gu(e,!1,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:t.type===6&&t.detail.injectedText!==null})}onChange(e){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e,t){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e,t)}}class lne extends tA{constructor(e,t,i){super(e,t,i),this._register(ei.addTarget(this.viewHelper.linesContentDomNode)),this._register(J(this.viewHelper.linesContentDomNode,ni.Tap,n=>this.onTap(n))),this._register(J(this.viewHelper.linesContentDomNode,ni.Change,n=>this.onChange(n))),this._register(J(this.viewHelper.linesContentDomNode,ni.Contextmenu,n=>this._onContextMenu(new gu(n,!1,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new gu(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){const i=document.createEvent("CustomEvent");i.initEvent(Ew.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(i),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class dne extends q{constructor(e,t,i){super(),Ea&&CM.pointerEvents?this.handler=this._register(new ane(e,t,i)):Ai.TouchEvent?this.handler=this._register(new lne(e,t,i)):this.handler=this._register(new tA(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}class Ag extends r0{}const Sn=bt("themeService");function Ni(o){return{id:o}}function dE(o){switch(o){case lr.DARK:return"vs-dark";case lr.HIGH_CONTRAST_DARK:return"hc-black";case lr.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const q8={ThemingContribution:"base.contributions.theming"};class cne{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new W}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),je(()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}}const G8=new cne;xi.add(q8.ThemingContribution,G8);function Zr(o){return G8.onColorThemeChange(o)}class une extends q{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(t=>this.onThemeChange(t)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}const Z8=M("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},p("lineHighlight","Background color for the highlight of line at the cursor position.")),_4=M("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:Lt},p("lineHighlightBorderBox","Background color for the border around the line at the cursor position."));M("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},p("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0);M("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:fi,hcLight:fi},p("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0);M("editor.symbolHighlightBackground",{dark:wl,light:wl,hcDark:null,hcLight:null},p("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0);M("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:fi,hcLight:fi},p("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0);const Y8=M("editorCursor.foreground",{dark:"#AEAFAD",light:Y.black,hcDark:Y.white,hcLight:"#0F4A85"},p("caret","Color of the editor cursor.")),hne=M("editorCursor.background",null,p("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),Nd=M("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},p("editorWhitespaces","Color of whitespace characters in the editor.")),gne=M("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:Y.white,hcLight:"#292929"},p("editorLineNumbers","Color of editor line numbers.")),nC=M("editorIndentGuide.background",{dark:Nd,light:Nd,hcDark:Nd,hcLight:Nd},p("editorIndentGuides","Color of the editor indentation guides."),!1,p("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),sC=M("editorIndentGuide.activeBackground",{dark:Nd,light:Nd,hcDark:Nd,hcLight:Nd},p("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,p("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),l0=M("editorIndentGuide.background1",{dark:nC,light:nC,hcDark:nC,hcLight:nC},p("editorIndentGuides1","Color of the editor indentation guides (1).")),fne=M("editorIndentGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorIndentGuides2","Color of the editor indentation guides (2).")),pne=M("editorIndentGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorIndentGuides3","Color of the editor indentation guides (3).")),mne=M("editorIndentGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorIndentGuides4","Color of the editor indentation guides (4).")),_ne=M("editorIndentGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorIndentGuides5","Color of the editor indentation guides (5).")),vne=M("editorIndentGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorIndentGuides6","Color of the editor indentation guides (6).")),d0=M("editorIndentGuide.activeBackground1",{dark:sC,light:sC,hcDark:sC,hcLight:sC},p("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),bne=M("editorIndentGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),Cne=M("editorIndentGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),wne=M("editorIndentGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),Sne=M("editorIndentGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),yne=M("editorIndentGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),oC=M("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:fi,hcLight:fi},p("editorActiveLineNumber","Color of editor active line number"),!1,p("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead."));M("editorLineNumber.activeForeground",{dark:oC,light:oC,hcDark:oC,hcLight:oC},p("editorActiveLineNumber","Color of editor active line number"));const Lne=M("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},p("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed."));M("editorRuler.foreground",{dark:"#5A5A5A",light:Y.lightgrey,hcDark:Y.white,hcLight:"#292929"},p("editorRuler","Color of the editor rulers."));M("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},p("editorCodeLensForeground","Foreground color of editor CodeLens"));M("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},p("editorBracketMatchBackground","Background color behind matching brackets"));M("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:Lt,hcLight:Lt},p("editorBracketMatchBorder","Color for matching brackets boxes"));const Dne=M("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},p("editorOverviewRulerBorder","Color of the overview ruler border.")),xne=M("editorOverviewRuler.background",null,p("editorOverviewRulerBackground","Background color of the editor overview ruler."));M("editorGutter.background",{dark:wn,light:wn,hcDark:wn,hcLight:wn},p("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers."));M("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:Y.fromHex("#fff").transparent(.8),hcLight:Lt},p("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor."));const kne=M("editorUnnecessaryCode.opacity",{dark:Y.fromHex("#000a"),light:Y.fromHex("#0007"),hcDark:null,hcLight:null},p("unnecessaryCodeOpacity",`Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.`));M("editorGhostText.border",{dark:null,light:null,hcDark:Y.fromHex("#fff").transparent(.8),hcLight:Y.fromHex("#292929").transparent(.8)},p("editorGhostTextBorder","Border color of ghost text in the editor."));M("editorGhostText.foreground",{dark:Y.fromHex("#ffffff56"),light:Y.fromHex("#0007"),hcDark:null,hcLight:null},p("editorGhostTextForeground","Foreground color of the ghost text in the editor."));M("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},p("editorGhostTextBackground","Background color of the ghost text in the editor."));const rC=new Y(new kt(0,122,204,.6)),X8=M("editorOverviewRuler.rangeHighlightForeground",{dark:rC,light:rC,hcDark:rC,hcLight:rC},p("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Ine=M("editorOverviewRuler.errorForeground",{dark:new Y(new kt(255,18,18,.7)),light:new Y(new kt(255,18,18,.7)),hcDark:new Y(new kt(255,50,50,1)),hcLight:"#B5200D"},p("overviewRuleError","Overview ruler marker color for errors.")),Ene=M("editorOverviewRuler.warningForeground",{dark:zo,light:zo,hcDark:Bv,hcLight:Bv},p("overviewRuleWarning","Overview ruler marker color for warnings.")),Nne=M("editorOverviewRuler.infoForeground",{dark:Ks,light:Ks,hcDark:Wv,hcLight:Wv},p("overviewRuleInfo","Overview ruler marker color for infos.")),Q8=M("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},p("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),J8=M("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},p("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),eB=M("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},p("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),tB=M("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),iB=M("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),nB=M("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),Tne=M("editorBracketHighlight.unexpectedBracket.foreground",{dark:new Y(new kt(255,18,18,.8)),light:new Y(new kt(255,18,18,.8)),hcDark:new Y(new kt(255,50,50,1)),hcLight:""},p("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),Mne=M("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),Ane=M("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),Rne=M("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),Pne=M("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),One=M("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),Fne=M("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),Bne=M("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),Wne=M("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),Vne=M("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),Hne=M("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),zne=M("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),$ne=M("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));M("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:"#CEA33D"},p("editorUnicodeHighlight.border","Border color used to highlight unicode characters."));M("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:"#cea33d14"},p("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));Zr((o,e)=>{const t=o.getColor(wn),i=o.getColor(Z8),n=i&&!i.isTransparent()?i:t;n&&e.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${n}; }`)});class c0 extends Ag{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new z(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(66);const t=e.get(67);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(94);const i=e.get(143);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new z(e,1));if(t.column!==1)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(this._renderLineNumbers===2){const n=Math.abs(this._lastCursorModelPosition.lineNumber-i);return n===0?''+i+"":String(n)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===i||i%10===0?String(i):"":String(i)}prepareRender(e){if(this._renderLineNumbers===0){this._renderResult=null;return}const t=ws?this._lineHeight%2===0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._context.viewModel.getLineCount(),r=[];for(let a=i;a<=n;a++){const l=a-i,d=this._getLineRenderLineNumber(a);if(!d){r[l]="";continue}let c="";if(a===s&&this._context.viewModel.getLineLength(a)===0){if(this._renderFinalNewline==="off"){r[l]="";continue}this._renderFinalNewline==="dimmed"&&(c=" dimmed-line-number")}a===this._activeLineNumber&&(c=" active-line-number"),r[l]=`
${d}
`}this._renderResult=r}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}c0.CLASS_NAME="line-numbers";Zr((o,e)=>{const t=o.getColor(gne),i=o.getColor(Lne);i?e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i}; }`):t&&e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${t.transparent(.4)}; }`)});class og extends wo{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(143);this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=Ht(document.createElement("div")),this._domNode.setClassName(og.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=Ht(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(og.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(143);return this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}og.CLASS_NAME="glyph-margin";og.OUTER_CLASS_NAME="margin";const op="monaco-mouse-cursor-text";class Une{constructor(){this._onDidChange=new W,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}}const H_=new Une,Xt=bt("keybindingService");var jne=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},v4=function(o,e){return function(t,i){e(t,i,o)}};class Kne{constructor(e,t,i,n,s){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=s,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new z(this.modelLineNumber,this.distanceToModelLineStart+1),i=new z(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(e?this._previousPresentation=e:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const rx=pr;let cE=class extends wo{constructor(e,t,i,n,s){super(e),this._keybindingService=n,this._instantiationService=s,this._primaryCursorPosition=new z(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=i,this._scrollLeft=0,this._scrollTop=0;const r=this._context.configuration.options,a=r.get(143);this._setAccessibilityOptions(r),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._contentHeight=a.height,this._fontInfo=r.get(50),this._lineHeight=r.get(66),this._emptySelectionClipboard=r.get(37),this._copyWithSyntaxHighlighting=r.get(25),this._visibleTextArea=null,this._selections=[new Re(1,1,1,1)],this._modelSelections=[new Re(1,1,1,1)],this._lastRenderPosition=null,this.textArea=Ht(document.createElement("textarea")),Fl.write(this.textArea,6),this.textArea.setClassName(`inputarea ${op}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:l}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${l*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(r)),this.textArea.setAttribute("aria-required",r.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(r.get(123))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",p("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",r.get(90)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=Ht(document.createElement("div")),this.textAreaCover.setPosition("absolute");const d={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:h=>this._context.viewModel.getLineMaxColumn(h),getValueInRange:(h,g)=>this._context.viewModel.getValueInRange(h,g),getValueLengthInRange:(h,g)=>this._context.viewModel.getValueLengthInRange(h,g),modifyPosition:(h,g)=>this._context.viewModel.modifyPosition(h,g)},c={getDataToCopy:()=>{const h=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,is),g=this._context.viewModel.model.getEOL(),f=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),m=Array.isArray(h)?h:null,v=Array.isArray(h)?h.join(g):h;let _,b=null;if(rE.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&v.length<65536){const C=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);C&&(_=C.html,b=C.mode)}return{isFromEmptySelection:f,multicursorText:m,text:v,html:_,mode:b}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const h=this._selections[0];if(It&&h.isEmpty()){const f=h.getStartPosition();let m=this._getWordBeforePosition(f);if(m.length===0&&(m=this._getCharacterBeforePosition(f)),m.length>0)return new Fn(m,m.length,m.length,k.fromPositions(f),0)}if(It&&!h.isEmpty()&&d.getValueLengthInRange(h,0)<500){const f=d.getValueInRange(h,0);return new Fn(f,0,f.length,h,0)}if(ru&&!h.isEmpty()){const f="vscode-placeholder";return new Fn(f,0,f.length,null,void 0)}return Fn.EMPTY}if($P){const h=this._selections[0];if(h.isEmpty()){const g=h.getStartPosition(),[f,m]=this._getAndroidWordAtPosition(g);if(f.length>0)return new Fn(f,m,m,k.fromPositions(g),0)}return Fn.EMPTY}return Rf.fromEditorSelection(d,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(h,g,f)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(h,g,f)},u=this._register(new rne(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(aE,c,u,Vo,{isAndroid:$P,isChrome:mM,isFirefox:pr,isSafari:ru})),this._register(this._textAreaInput.onKeyDown(h=>{this._viewController.emitKeyDown(h)})),this._register(this._textAreaInput.onKeyUp(h=>{this._viewController.emitKeyUp(h)})),this._register(this._textAreaInput.onPaste(h=>{let g=!1,f=null,m=null;h.metadata&&(g=this._emptySelectionClipboard&&!!h.metadata.isFromEmptySelection,f=typeof h.metadata.multicursorText<"u"?h.metadata.multicursorText:null,m=h.metadata.mode),this._viewController.paste(h.text,g,f,m)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(h=>{h.replacePrevCharCnt||h.replaceNextCharCnt||h.positionDelta?this._viewController.compositionType(h.text,h.replacePrevCharCnt,h.replaceNextCharCnt,h.positionDelta):this._viewController.type(h.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(h=>{this._viewController.setSelection(h)})),this._register(this._textAreaInput.onCompositionStart(h=>{const g=this.textArea.domNode,f=this._modelSelections[0],{distanceToModelLineStart:m,widthOfHiddenTextBefore:v}=(()=>{const b=g.value.substring(0,Math.min(g.selectionStart,g.selectionEnd)),C=b.lastIndexOf(` -`),w=b.substring(C+1),S=w.lastIndexOf(" "),x=w.length-S-1,y=f.getStartPosition(),I=Math.min(y.column-1,x),E=y.column-1-I,R=w.substring(0,w.length-I),{tabSize:j}=this._context.viewModel.model.getOptions(),O=qne(this.textArea.domNode.ownerDocument,R,this._fontInfo,j);return{distanceToModelLineStart:E,widthOfHiddenTextBefore:O}})(),{distanceToModelLineEnd:_}=(()=>{const b=g.value.substring(Math.max(g.selectionStart,g.selectionEnd)),C=b.indexOf(` -`),w=C===-1?b:b.substring(0,C),S=w.indexOf(" "),x=S===-1?w.length:w.length-S-1,y=f.getEndPosition(),I=Math.min(this._context.viewModel.model.getLineMaxColumn(y.lineNumber)-y.column,x);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(y.lineNumber)-y.column-I}})();this._context.viewModel.revealRange("keyboard",!0,k.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new Kne(this._context,f.startLineNumber,m,v,_),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${op} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(h=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${op}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(H_.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',i=this._context.viewModel.getLineContent(e.lineNumber),n=_r(t);let s=!0,r=e.column,a=!0,l=e.column,d=0;for(;d<50&&(s||a);){if(s&&r<=1&&(s=!1),s){const c=i.charCodeAt(r-2);n.get(c)!==0?s=!1:r--}if(a&&l>i.length&&(a=!1),a){const c=i.charCodeAt(l-1);n.get(c)!==0?a=!1:l++}d++}return[i.substring(r-1,l-1),e.column-r]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=_r(this._context.configuration.options.get(129));let n=e.column,s=0;for(;n>1;){const r=t.charCodeAt(n-2);if(i.get(r)!==0||s>50)return t.substring(n-1,e.column-1);s++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const i=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!bn(i.charCodeAt(0)))return i}return""}_getAriaLabel(e){var t,i,n;if(e.get(2)===1){const r=(t=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))===null||t===void 0?void 0:t.getAriaLabel(),a=(i=this._keybindingService.lookupKeybinding("workbench.action.showCommands"))===null||i===void 0?void 0:i.getAriaLabel(),l=(n=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings"))===null||n===void 0?void 0:n.getAriaLabel(),d=p("accessibilityModeOff","The editor is not accessible at this time.");return r?p("accessibilityOffAriaLabel","{0} To enable screen reader optimized mode, use {1}",d,r):a?p("accessibilityOffAriaLabelNoKb","{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",d,a):l?p("accessibilityOffAriaLabelNoKbs","{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",d,l):d}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);this._accessibilitySupport===2&&t===Oa.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const n=e.get(143).wrappingColumn;if(n!==-1&&this._accessibilitySupport!==1){const s=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(n*s.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=rx?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(143);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(50),this._lineHeight=t.get(66),this._emptySelectionClipboard=t.get(37),this._copyWithSyntaxHighlighting=t.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:n}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${n*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("aria-required",t.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(123))),(e.hasChanged(34)||e.hasChanged(90))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options;!H_.enabled||e.get(34)&&e.get(90)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){var t;this._primaryCursorPosition=new z(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),(t=this._visibleTextArea)===null||t===void 0||t.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){var e;if(this._visibleTextArea){const n=this._visibleTextArea.visibleTextareaStart,s=this._visibleTextArea.visibleTextareaEnd,r=this._visibleTextArea.startPosition,a=this._visibleTextArea.endPosition;if(r&&a&&n&&s&&s.left>=this._scrollLeft&&n.left<=this._scrollLeft+this._contentWidth){const l=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,d=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let c=this._visibleTextArea.widthOfHiddenLineTextBefore,u=this._contentLeft+n.left-this._scrollLeft,h=s.left-n.left+1;if(uthis._contentWidth&&(h=this._contentWidth);const g=this._context.viewModel.getViewLineData(r.lineNumber),f=g.tokens.findTokenIndexAtOffset(r.column-1),m=g.tokens.findTokenIndexAtOffset(a.column-1),v=f===m,_=this._visibleTextArea.definePresentation(v?g.tokens.getPresentation(f):null);this.textArea.domNode.scrollTop=d*this._lineHeight,this.textArea.domNode.scrollLeft=c,this._doRender({lastRenderPosition:null,top:l,left:u,width:h,height:this._lineHeight,useCover:!1,color:(Ei.getColorMap()||[])[_.foreground],italic:_.italic,bold:_.bold,underline:_.underline,strikethrough:_.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const t=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(tthis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const i=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(i<0||i>this._contentHeight){this._renderAtTopLeft();return}if(It||this._accessibilitySupport===2){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const n=(e=this._textAreaInput.textAreaState.newlineCountBeforeSelection)!==null&&e!==void 0?e:this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=n*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:rx?0:1,useCover:!1})}_newlinecount(e){let t=0,i=-1;do{if(i=e.indexOf(` -`,i+1),i===-1)break;t++}while(!0);return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:rx?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;Jn(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?Y.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);const n=this._context.configuration.options;n.get(57)?i.setClassName("monaco-editor-background textAreaCover "+og.OUTER_CLASS_NAME):n.get(67).renderType!==0?i.setClassName("monaco-editor-background textAreaCover "+c0.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}};cE=jne([v4(3,Xt),v4(4,qe)],cE);function qne(o,e,t,i){if(e.length===0)return 0;const n=o.createElement("div");n.style.position="absolute",n.style.top="-50000px",n.style.width="50000px";const s=o.createElement("span");Jn(s,t),s.style.whiteSpace="pre",s.style.tabSize=`${i*t.spaceWidth}px`,s.append(e),n.appendChild(s),o.body.appendChild(n);const r=s.offsetWidth;return o.body.removeChild(n),r}function Gne(o,e,t){let i=0;for(let s=0;s!0,Yne=()=>!1,Xne=o=>o===" "||o===" ";class Jg{static shouldRecreate(e){return e.hasChanged(143)||e.hasChanged(129)||e.hasChanged(37)||e.hasChanged(76)||e.hasChanged(78)||e.hasChanged(79)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(127)||e.hasChanged(50)||e.hasChanged(90)}constructor(e,t,i,n){var s;this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const r=i.options,a=r.get(143),l=r.get(50);this.readOnly=r.get(90),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=r.get(115),this.lineHeight=l.lineHeight,this.typicalHalfwidthCharacterWidth=l.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(a.height/this.lineHeight)-2),this.useTabStops=r.get(127),this.wordSeparators=r.get(129),this.emptySelectionClipboard=r.get(37),this.copyWithSyntaxHighlighting=r.get(25),this.multiCursorMergeOverlapping=r.get(76),this.multiCursorPaste=r.get(78),this.multiCursorLimit=r.get(79),this.autoClosingBrackets=r.get(6),this.autoClosingComments=r.get(7),this.autoClosingQuotes=r.get(11),this.autoClosingDelete=r.get(9),this.autoClosingOvertype=r.get(10),this.autoSurround=r.get(14),this.autoIndent=r.get(12),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const d=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(d)for(const u of d)this.surroundingPairs[u.open]=u.close;const c=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=(s=c==null?void 0:c.blockCommentStartToken)!==null&&s!==void 0?s:null}get electricChars(){var e;if(!this._electricChars){this._electricChars={};const t=(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||e===void 0?void 0:e.getElectricCharacters();if(t)for(const i of t)this._electricChars[i]=!0}return this._electricChars}onElectricCharacter(e,t,i){const n=Iy(t,i-1),s=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return s?s.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return iA(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,i){switch(t){case"beforeWhitespace":return Xne;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,i);case"always":return Zne;case"never":return Yne}}_getLanguageDefinedShouldAutoClose(e,t){const i=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return n=>i.indexOf(n)!==-1}visibleColumnFromColumn(e,t){return mn.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=mn.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),s=e.getLineMinColumn(t);if(nr?r:n}}let Tt=class sB{static fromModelState(e){return new Qne(e)}static fromViewState(e){return new Jne(e)}static fromModelSelection(e){const t=Re.liftSelection(e),i=new Wn(k.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return sB.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;is,d=n>r,c=nr||_n||v0&&n--,wh.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const s=Math.min(i.fromViewLineNumber,i.toViewLineNumber),r=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let l=s;l<=r;l++){const d=t.getLineMaxColumn(l),c=e.visibleColumnFromColumn(t,new z(l,d));n=Math.max(n,c)}let a=i.toViewVisualColumn;return ae.getLineMinColumn(t.lineNumber))return t.delta(void 0,-p7(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new z(i,e.getLineMaxColumn(i))}else return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),s=e.getLineContent(t.lineNumber),r=Hv.atomicPosition(s,t.column-1,i,0);if(r!==-1&&r+1>=n)return new z(t.lineNumber,r+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?$t.leftPositionAtomicSoftTabs(t,i,e.tabSize):$t.leftPosition(t,i);return new ax(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,s){let r,a;if(i.hasSelection()&&!n)r=i.selection.startLineNumber,a=i.selection.startColumn;else{const l=i.position.delta(void 0,-(s-1)),d=t.normalizePosition($t.clipPositionColumn(l,t),0),c=$t.left(e,t,d);r=c.lineNumber,a=c.column}return i.move(n,r,a,0)}static clipPositionColumn(e,t){return new z(e.lineNumber,$t.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return ei?i:e}static rightPosition(e,t,i){return ic?(i=c,a?n=t.getLineMaxColumn(i):n=Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,d),g?s=0:s=d-mn.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),l!==void 0){const f=new z(i,n),m=t.normalizePosition(f,l);s=s+(n-m.column),i=m.lineNumber,n=m.column}return new ax(i,n,s)}static down(e,t,i,n,s,r,a){return this.vertical(e,t,i,n,s,i+r,a,4)}static moveDown(e,t,i,n,s){let r,a;i.hasSelection()&&!n?(r=i.selection.endLineNumber,a=i.selection.endColumn):(r=i.position.lineNumber,a=i.position.column);let l=0,d;do if(d=$t.down(e,t,r+l,a,i.leftoverVisibleColumns,s,!0),t.normalizePosition(new z(d.lineNumber,d.column),2).lineNumber>r)break;while(l++<10&&r+l1&&this._isBlankLine(t,s);)s--;for(;s>1&&!this._isBlankLine(t,s);)s--;return i.move(n,s,t.getLineMinColumn(s),0)}static moveToNextBlankLine(e,t,i,n){const s=t.getLineCount();let r=i.position.lineNumber;for(;r=h.length+1)return!1;const g=h.charAt(u.column-2),f=n.get(g);if(!f)return!1;if(uc(g)){if(i==="never")return!1}else if(t==="never")return!1;const m=h.charAt(u.column-1);let v=!1;for(const _ of f)_.open===g&&_.close===m&&(v=!0);if(!v)return!1;if(e==="auto"){let _=!1;for(let b=0,C=a.length;b1){const s=t.getLineContent(n.lineNumber),r=Cs(s),a=r===-1?s.length+1:r+1;if(n.column<=a){const l=i.visibleColumnFromColumn(t,n),d=mn.prevIndentTabStop(l,i.indentSize),c=i.columnFromVisibleColumn(t,n.lineNumber,d);return new k(n.lineNumber,c,n.lineNumber,n.column)}}return k.fromPositions(rg.getPositionAfterDeleteLeft(n,t),n)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=uY(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}else if(e.lineNumber>1){const i=e.lineNumber-1;return new z(i,t.getLineMaxColumn(i))}else return e}static cut(e,t,i){const n=[];let s=null;i.sort((r,a)=>z.compare(r.getStartPosition(),a.getEndPosition()));for(let r=0,a=i.length;r1&&(s==null?void 0:s.endLineNumber)!==d.lineNumber?(c=d.lineNumber-1,u=t.getLineMaxColumn(d.lineNumber-1),h=d.lineNumber,g=t.getLineMaxColumn(d.lineNumber)):(c=d.lineNumber,u=1,h=d.lineNumber,g=t.getLineMaxColumn(d.lineNumber));const f=new k(c,u,h,g);s=f,f.isEmpty()?n[r]=null:n[r]=new qn(f,"")}else n[r]=null;else n[r]=new qn(l,"")}return new Vs(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class Wt{static _createWord(e,t,i,n,s){return{start:n,end:s,wordType:t,nextCharClass:i}}static _findPreviousWordOnLine(e,t,i){const n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0;for(let s=i.column-2;s>=0;s--){const r=e.charCodeAt(s),a=t.get(r);if(a===0){if(n===2)return this._createWord(e,n,a,s+1,this._findEndOfWord(e,t,n,s+1));n=1}else if(a===2){if(n===1)return this._createWord(e,n,a,s+1,this._findEndOfWord(e,t,n,s+1));n=2}else if(a===1&&n!==0)return this._createWord(e,n,a,s+1,this._findEndOfWord(e,t,n,s+1))}return n!==0?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){const s=e.length;for(let r=n;r=0;s--){const r=e.charCodeAt(s),a=t.get(r);if(a===1||i===1&&a===2||i===2&&a===0)return s+1}return 0}static moveWordLeft(e,t,i,n){let s=i.lineNumber,r=i.column;r===1&&s>1&&(s=s-1,r=t.getLineMaxColumn(s));let a=Wt._findPreviousWordOnLine(e,t,new z(s,r));if(n===0)return new z(s,a?a.start+1:1);if(n===1)return a&&a.wordType===2&&a.end-a.start===1&&a.nextCharClass===0&&(a=Wt._findPreviousWordOnLine(e,t,new z(s,a.start+1))),new z(s,a?a.start+1:1);if(n===3){for(;a&&a.wordType===2;)a=Wt._findPreviousWordOnLine(e,t,new z(s,a.start+1));return new z(s,a?a.start+1:1)}return a&&r<=a.end+1&&(a=Wt._findPreviousWordOnLine(e,t,new z(s,a.start+1))),new z(s,a?a.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===1)return i>1?new z(i-1,e.getLineMaxColumn(i-1)):t;const s=e.getLineContent(i);for(let r=t.column-1;r>1;r--){const a=s.charCodeAt(r-2),l=s.charCodeAt(r-1);if(a===95&&l!==95)return new z(i,r);if(a===45&&l!==45)return new z(i,r);if((Dc(a)||q0(a))&&el(l))return new z(i,r);if(el(a)&&el(l)&&r+1=l.start+1&&(l=Wt._findNextWordOnLine(e,t,new z(s,l.end+1))),l?r=l.start+1:r=t.getLineMaxColumn(s);return new z(s,r)}static _moveWordPartRight(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===n)return i1?d=1:(l--,d=n.getLineMaxColumn(l)):(c&&d<=c.end+1&&(c=Wt._findPreviousWordOnLine(i,n,new z(l,c.start+1))),c?d=c.end+1:d>1?d=1:(l--,d=n.getLineMaxColumn(l))),new k(l,d,a.lineNumber,a.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new z(i.positionLineNumber,i.positionColumn),s=this._deleteInsideWordWhitespace(t,n);return s||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return i===32||i===9}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(n===0)return null;let s=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,s))return null;let r=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,r))return null;for(;s>0&&this._charAtIsWhitespace(i,s-1);)s--;for(;r+11?new k(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumberu.start+1<=i.column&&i.column<=u.end+1,a=(u,h)=>(u=Math.min(u,i.column),h=Math.max(h,i.column),new k(i.lineNumber,u,i.lineNumber,h)),l=u=>{let h=u.start+1,g=u.end+1,f=!1;for(;g-11&&this._charAtIsWhitespace(n,h-2);)h--;return a(h,g)},d=Wt._findPreviousWordOnLine(e,t,i);if(d&&r(d))return l(d);const c=Wt._findNextWordOnLine(e,t,i);return c&&r(c)?l(c):d&&c?a(d.end+1,c.start+1):d?a(d.start+1,d.end+1):c?a(c.start+1,c.end+1):a(1,s+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=Wt._moveWordPartLeft(e,i);return new k(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){const i=e.length;for(let n=t;n=h.start+1&&(h=Wt._findNextWordOnLine(i,n,new z(l,h.end+1))),h?d=h.start+1:d!!e)}class On{static addCursorDown(e,t,i){const n=[];let s=0;for(let r=0,a=t.length;rd&&(c=d,u=e.model.getLineMaxColumn(c)),Tt.fromModelState(new Wn(new k(r.lineNumber,1,c,u),2,0,new z(c,u),0))}const l=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumberl){const d=e.getLineCount();let c=a.lineNumber+1,u=1;return c>d&&(c=d,u=e.getLineMaxColumn(c)),Tt.fromViewState(t.viewState.move(!0,c,u,0))}else{const d=t.modelState.selectionStart.getEndPosition();return Tt.fromModelState(t.modelState.move(!0,d.lineNumber,d.column,0))}}static word(e,t,i,n){const s=e.model.validatePosition(n);return Tt.fromModelState(Wt.word(e.cursorConfig,e.model,t.modelState,i,s))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new Tt(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return Tt.fromViewState(new Wn(new k(i,n,i,n),0,0,new z(i,n),0))}static moveTo(e,t,i,n,s){if(i){if(t.modelState.selectionStartKind===1)return this.word(e,t,i,n);if(t.modelState.selectionStartKind===2)return this.line(e,t,i,n,s)}const r=e.model.validatePosition(n),a=s?e.coordinatesConverter.validateViewPosition(new z(s.lineNumber,s.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);return Tt.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,s,r){switch(i){case 0:return r===4?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,s);case 1:return r===4?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,s);case 2:return r===2?this._moveUpByViewLines(e,t,n,s):this._moveUpByModelLines(e,t,n,s);case 3:return r===2?this._moveDownByViewLines(e,t,n,s):this._moveDownByModelLines(e,t,n,s);case 4:return r===2?t.map(a=>Tt.fromViewState($t.moveToPrevBlankLine(e.cursorConfig,e,a.viewState,n))):t.map(a=>Tt.fromModelState($t.moveToPrevBlankLine(e.cursorConfig,e.model,a.modelState,n)));case 5:return r===2?t.map(a=>Tt.fromViewState($t.moveToNextBlankLine(e.cursorConfig,e,a.viewState,n))):t.map(a=>Tt.fromModelState($t.moveToNextBlankLine(e.cursorConfig,e.model,a.modelState,n)));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,s){const r=e.getCompletelyVisibleViewRange(),a=e.coordinatesConverter.convertViewRangeToModelRange(r);switch(i){case 11:{const l=this._firstLineNumberInRange(e.model,a,s),d=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],n,l,d)]}case 13:{const l=this._lastLineNumberInRange(e.model,a,s),d=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],n,l,d)]}case 12:{const l=Math.round((a.startLineNumber+a.endLineNumber)/2),d=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],n,l,d)]}case 14:{const l=[];for(let d=0,c=t.length;di.endLineNumber-1?r=i.endLineNumber-1:sTt.fromViewState($t.moveLeft(e.cursorConfig,e,s.viewState,i,n)))}static _moveHalfLineLeft(e,t,i){const n=[];for(let s=0,r=t.length;sTt.fromViewState($t.moveRight(e.cursorConfig,e,s.viewState,i,n)))}static _moveHalfLineRight(e,t,i){const n=[];for(let s=0,r=t.length;s0}}function Pie(o){return o.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}class r0 extends q{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i=a.left?n.width=Math.max(n.width,a.left+a.width-n.left):(t[i++]=n,n=a)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t,i){if(!e||e.length===0)return null;const n=[];for(let s=0,r=e.length;sl)return null;if(t=Math.min(l,Math.max(0,t)),n=Math.min(l,Math.max(0,n)),t===n&&i===s&&i===0&&!e.children[t].firstChild){const h=e.children[t].getClientRects();return r.markDidDomLayout(),this._createHorizontalRangesFromClientRects(h,r.clientRectDeltaLeft,r.clientRectScale)}t!==n&&n>0&&s===0&&(n--,s=1073741824);let d=e.children[t].firstChild,c=e.children[n].firstChild;if((!d||!c)&&(!d&&i===0&&t>0&&(d=e.children[t-1].firstChild,i=1073741824),!c&&s===0&&n>0&&(c=e.children[n-1].firstChild,s=1073741824)),!d||!c)return null;i=Math.min(d.textContent.length,Math.max(0,i)),s=Math.min(c.textContent.length,Math.max(0,s));const u=this._readClientRects(d,i,c,s,r.endNode);return r.markDidDomLayout(),this._createHorizontalRangesFromClientRects(u,r.clientRectDeltaLeft,r.clientRectScale)}}var lr;(function(o){o.DARK="dark",o.LIGHT="light",o.HIGH_CONTRAST_DARK="hcDark",o.HIGH_CONTRAST_LIGHT="hcLight"})(lr||(lr={}));function xa(o){return o===lr.HIGH_CONTRAST_DARK||o===lr.HIGH_CONTRAST_LIGHT}function Pp(o){return o===lr.DARK||o===lr.HIGH_CONTRAST_DARK}const Vie=function(){return Ml?!0:!(ws||pr||ru)}();let sp=!0;class h4{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(50);i.get(38)==="off"?this.renderWhitespace=i.get(98):this.renderWhitespace="none",this.renderControlCharacters=i.get(93),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(33),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(66),this.stopRenderingLineAfter=i.get(116),this.fontLigatures=i.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class al{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(this._renderedViewLine)this._renderedViewLine.domNode=Ht(e);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return xa(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(e,t,i,n){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const s=i.getViewLineRenderingData(e),r=this._options,a=lo.filter(s.inlineDecorations,e,s.minColumn,s.maxColumn);let l=null;if(xa(r.themeType)||this._options.renderWhitespace==="selection"){const h=i.selections;for(const g of h){if(g.endLineNumbere)continue;const f=g.startLineNumber===e?g.startColumn:s.minColumn,m=g.endLineNumber===e?g.endColumn:s.maxColumn;f');const c=n0(d,n);n.appendString("");let u=null;return sp&&Vie&&s.isBasicASCII&&r.useMonospaceOptimizations&&c.containsForeignElements===0&&(u=new iC(this._renderedViewLine?this._renderedViewLine.domNode:null,d,c.characterMapping)),u||(u=$7(this._renderedViewLine?this._renderedViewLine.domNode:null,d,c.characterMapping,c.containsRTL,c.containsForeignElements)),this._renderedViewLine=u,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof iC:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof iC?this._renderedViewLine.monospaceAssumptionsAreValid():sp}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof iC&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i));const s=this._renderedViewLine.input.stopRenderingLineAfter;if(s!==-1&&t>s+1&&i>s+1)return new u4(!0,[new Vh(this.getWidth(n),0)]);s!==-1&&t>s+1&&(t=s+1),s!==-1&&i>s+1&&(i=s+1);const r=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return r&&r.length>0?new u4(!1,r):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}}al.CLASS_NAME="view-line";class iC{constructor(e,t,i){this._cachedWidth=-1,this.domNode=e,this.input=t;const n=Math.floor(t.lineContent.length/300);if(n>0){this._keyColumnPixelOffsetCache=new Float32Array(n);for(let s=0;s=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),sp=!1)}return sp}toSlowRenderedLine(){return $7(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const s=this._getColumnPixelOffset(e,t,n),r=this._getColumnPixelOffset(e,i,n);return[new Vh(s,r-s)]}_getColumnPixelOffset(e,t,i){if(t<=300){const d=this._characterMapping.getHorizontalOffset(t);return this._charWidth*d}const n=Math.floor((t-1)/300)-1,s=(n+1)*300+1;let r=-1;if(this._keyColumnPixelOffsetCache&&(r=this._keyColumnPixelOffsetCache[n],r===-1&&(r=this._actualReadPixelOffset(e,s,i),this._keyColumnPixelOffsetCache[n]=r)),r===-1){const d=this._characterMapping.getHorizontalOffset(t);return this._charWidth*d}const a=this._characterMapping.getHorizontalOffset(s),l=this._characterMapping.getHorizontalOffset(t);return r+this._charWidth*(l-a)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,i){if(!this.domNode)return-1;const n=this._characterMapping.getDomPosition(t),s=L1.readHorizontalRanges(this._getReadingTarget(this.domNode),n.partIndex,n.charIndex,n.partIndex,n.charIndex,i);return!s||s.length===0?-1:s[0].left}getColumnOfNodeOffset(e,t){return QM(this._characterMapping,e,t)}}class z7{constructor(e,t,i,n,s){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=s,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let r=0,a=this._characterMapping.length;r<=a;r++)this._pixelOffsetCache[r]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e==null||e.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(e,t,i,n){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const s=this._readPixelOffset(this.domNode,e,t,n);if(s===-1)return null;const r=this._readPixelOffset(this.domNode,e,i,n);return r===-1?null:[new Vh(s,r-s)]}return this._readVisibleRangesForRange(this.domNode,e,t,i,n)}_readVisibleRangesForRange(e,t,i,n,s){if(i===n){const r=this._readPixelOffset(e,t,i,s);return r===-1?null:[new Vh(r,0)]}else return this._readRawVisibleRangesForRange(e,i,n,s)}_readPixelOffset(e,t,i,n){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth(n);const s=this._getReadingTarget(e);return s.firstChild?(n.markDidDomLayout(),s.firstChild.offsetWidth):0}if(this._pixelOffsetCache!==null){const s=this._pixelOffsetCache[i];if(s!==-1)return s;const r=this._actualReadPixelOffset(e,t,i,n);return this._pixelOffsetCache[i]=r,r}return this._actualReadPixelOffset(e,t,i,n)}_actualReadPixelOffset(e,t,i,n){if(this._characterMapping.length===0){const l=L1.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n);return!l||l.length===0?-1:l[0].left}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth(n);const s=this._characterMapping.getDomPosition(i),r=L1.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,s.partIndex,s.charIndex,n);if(!r||r.length===0)return-1;const a=r[0].left;if(this.input.isBasicASCII){const l=this._characterMapping.getHorizontalOffset(i),d=Math.round(this.input.spaceWidth*l);if(Math.abs(d-a)<=1)return d}return a}_readRawVisibleRangesForRange(e,t,i,n){if(t===1&&i===this._characterMapping.length)return[new Vh(0,this.getWidth(n))];const s=this._characterMapping.getDomPosition(t),r=this._characterMapping.getDomPosition(i);return L1.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,r.partIndex,r.charIndex,n)}getColumnOfNodeOffset(e,t){return QM(this._characterMapping,e,t)}}class Hie extends z7{_readVisibleRangesForRange(e,t,i,n,s){const r=super._readVisibleRangesForRange(e,t,i,n,s);if(!r||r.length===0||i===n||i===1&&n===this._characterMapping.length)return r;if(!this.input.containsRTL){const a=this._readPixelOffset(e,t,n,s);if(a!==-1){const l=r[r.length-1];l.left=t){const u=t-r;return d-t=4&&e[0]===3&&e[3]===7}static isStrictChildOfViewLines(e){return e.length>4&&e[0]===3&&e[3]===7}static isChildOfScrollableElement(e){return e.length>=2&&e[0]===3&&e[1]===5}static isChildOfMinimap(e){return e.length>=2&&e[0]===3&&e[1]===8}static isChildOfContentWidgets(e){return e.length>=4&&e[0]===3&&e[3]===1}static isChildOfOverflowGuard(e){return e.length>=1&&e[0]===3}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&e[0]===2}static isChildOfOverlayWidgets(e){return e.length>=2&&e[0]===3&&e[1]===4}}class Op{constructor(e,t,i){this.viewModel=e.viewModel;const n=e.configuration.options;this.layoutInfo=n.get(143),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(66),this.stickyTabStops=n.get(115),this.typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return Op.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,s=e.viewModel.getLineCount();let r=null,a,l=null;return i.afterLineNumber!==s&&(l=new z(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new z(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),l===null?a=r:r===null?a=l:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Kn._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class JM extends jie{constructor(e,t,i,n,s){super(e,t,i,n),this._ctx=e,s?(this.target=s,this.targetPath=Fl.collect(s,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset} + target: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(e=null){return e&&e.columnr.contentLeft+r.width)continue;const a=e.getVerticalOffsetForLineNumber(r.position.lineNumber);if(a<=s&&s<=a+r.height)return t.fulfillContentText(r.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const n=t.isInContentArea?8:5;return t.fulfillViewZone(n,i.position,i)}return null}static _hitTestTextArea(e,t){return yo.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let s=Math.abs(t.relativePos.x);const r={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:s};return s-=e.layoutInfo.glyphMarginLeft,s<=e.layoutInfo.glyphMarginWidth?t.fulfillMargin(2,n,i.range,r):(s-=e.layoutInfo.glyphMarginWidth,s<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,r):(s-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,r)))}return null}static _hitTestViewLines(e,t,i){if(!yo.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new z(1,1),g4);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const s=e.viewModel.getLineCount(),r=e.viewModel.getLineMaxColumn(s);return t.fulfillContentEmpty(new z(s,r),g4)}if(i){if(yo.isStrictChildOfViewLines(t.targetPath)){const s=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(e.viewModel.getLineLength(s)===0){const a=e.getLineWidth(s),l=sx(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(new z(s,1),l)}const r=e.getLineWidth(s);if(t.mouseContentHorizontalOffset>=r){const a=sx(t.mouseContentHorizontalOffset-r),l=new z(s,e.viewModel.getLineMaxColumn(s));return t.fulfillContentEmpty(l,a)}}return t.fulfillUnknown()}const n=Kn._doHitTest(e,t);return n.type===1?Kn.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(yo.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new z(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(yo.isChildOfScrollableElement(t.targetPath)&&t.target&&t.target.nodeType===1){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),s=e.viewModel.getLineMaxColumn(n);return t.fulfillScrollbar(new z(n,s))}}return null}static _hitTestScrollbar(e,t){if(yo.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new z(i,n))}return null}getMouseColumn(e){const t=this._context.configuration.options,i=t.get(143),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return Kn._getMouseColumn(n,t.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,s){const r=n.lineNumber,a=n.column,l=e.getLineWidth(r);if(t.mouseContentHorizontalOffset>l){const _=sx(t.mouseContentHorizontalOffset-l);return t.fulfillContentEmpty(n,_)}const d=e.visibleRangeForPosition(r,a);if(!d)return t.fulfillUnknown(n);const c=d.left;if(Math.abs(t.mouseContentHorizontalOffset-c)<1)return t.fulfillContentText(n,null,{mightBeForeignElement:!!s,injectedText:s});const u=[];if(u.push({offset:d.left,column:a}),a>1){const _=e.visibleRangeForPosition(r,a-1);_&&u.push({offset:_.left,column:a-1})}const h=e.viewModel.getLineMaxColumn(r);if(a_.offset-b.offset);const g=t.pos.toClientCoordinates(Je(e.viewDomNode)),f=i.getBoundingClientRect(),m=f.left<=g.clientX&&g.clientX<=f.right;let v=null;for(let _=1;_s)){const a=Math.floor((n+s)/2);let l=t.pos.y+(a-t.mouseVerticalOffset);l<=t.editorPos.y&&(l=t.editorPos.y+1),l>=t.editorPos.y+t.editorPos.height&&(l=t.editorPos.y+t.editorPos.height-1);const d=new By(t.pos.x,l),c=this._actualDoHitTestWithCaretRangeFromPoint(e,d.toClientCoordinates(Je(e.viewDomNode)));if(c.type===1)return c}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates(Je(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=sg(e.viewDomNode);let n;if(i?typeof i.caretRangeFromPoint>"u"?n=Kie(i,t.clientX,t.clientY):n=i.caretRangeFromPoint(t.clientX,t.clientY):n=e.viewDomNode.ownerDocument.caretRangeFromPoint(t.clientX,t.clientY),!n||!n.startContainer)return new cc;const s=n.startContainer;if(s.nodeType===s.TEXT_NODE){const r=s.parentNode,a=r?r.parentNode:null,l=a?a.parentNode:null;return(l&&l.nodeType===l.ELEMENT_NODE?l.className:null)===al.CLASS_NAME?Ch.createFromDOMInfo(e,r,n.startOffset):new cc(s.parentNode)}else if(s.nodeType===s.ELEMENT_NODE){const r=s.parentNode,a=r?r.parentNode:null;return(a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===al.CLASS_NAME?Ch.createFromDOMInfo(e,s,s.textContent.length):new cc(s)}return new cc}static _doHitTestWithCaretPositionFromPoint(e,t){const i=e.viewDomNode.ownerDocument.caretPositionFromPoint(t.clientX,t.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){const n=i.offsetNode.parentNode,s=n?n.parentNode:null,r=s?s.parentNode:null;return(r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===al.CLASS_NAME?Ch.createFromDOMInfo(e,i.offsetNode.parentNode,i.offset):new cc(i.offsetNode.parentNode)}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){const n=i.offsetNode.parentNode,s=n&&n.nodeType===n.ELEMENT_NODE?n.className:null,r=n?n.parentNode:null,a=r&&r.nodeType===r.ELEMENT_NODE?r.className:null;if(s===al.CLASS_NAME){const l=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(l)return Ch.createFromDOMInfo(e,l,0)}else if(a===al.CLASS_NAME)return Ch.createFromDOMInfo(e,i.offsetNode,0)}return new cc(i.offsetNode)}static _snapToSoftTabBoundary(e,t){const i=t.getLineContent(e.lineNumber),{tabSize:n}=t.model.getOptions(),s=Hv.atomicPosition(i,e.column-1,n,2);return s!==-1?new z(e.lineNumber,s+1):e}static _doHitTest(e,t){let i=new cc;if(typeof e.viewDomNode.ownerDocument.caretRangeFromPoint=="function"?i=this._doHitTestWithCaretRangeFromPoint(e,t):e.viewDomNode.ownerDocument.caretPositionFromPoint&&(i=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates(Je(e.viewDomNode)))),i.type===1){const n=e.viewModel.getInjectedTextAt(i.position),s=e.viewModel.normalizePosition(i.position,2);(n||!s.equals(i.position))&&(i=new U7(s,i.spanNode,n))}return i}}function Kie(o,e,t){const i=document.createRange();let n=o.elementFromPoint(e,t);if(n!==null){for(;n&&n.firstChild&&n.firstChild.nodeType!==n.firstChild.TEXT_NODE&&n.lastChild&&n.lastChild.firstChild;)n=n.lastChild;const s=n.getBoundingClientRect(),r=Je(n),a=r.getComputedStyle(n,null).getPropertyValue("font-style"),l=r.getComputedStyle(n,null).getPropertyValue("font-variant"),d=r.getComputedStyle(n,null).getPropertyValue("font-weight"),c=r.getComputedStyle(n,null).getPropertyValue("font-size"),u=r.getComputedStyle(n,null).getPropertyValue("line-height"),h=r.getComputedStyle(n,null).getPropertyValue("font-family"),g=`${a} ${l} ${d} ${c}/${u} ${h}`,f=n.innerText;let m=s.left,v=0,_;if(e>s.left+s.width)v=f.length;else{const b=Th.getInstance();for(let C=0;Ct(new Pr(Je(e),i))))}onmousedown(e,t){this._register(J(e,Se.MOUSE_DOWN,i=>t(new Pr(Je(e),i))))}onmouseover(e,t){this._register(J(e,Se.MOUSE_OVER,i=>t(new Pr(Je(e),i))))}onmouseleave(e,t){this._register(J(e,Se.MOUSE_LEAVE,i=>t(new Pr(Je(e),i))))}onkeydown(e,t){this._register(J(e,Se.KEY_DOWN,i=>t(new gi(i))))}onkeyup(e,t){this._register(J(e,Se.KEY_UP,i=>t(new gi(i))))}oninput(e,t){this._register(J(e,Se.INPUT,t))}onblur(e,t){this._register(J(e,Se.BLUR,t))}onfocus(e,t){this._register(J(e,Se.FOCUS,t))}ignoreGesture(e){return ei.ignoreTarget(e)}};const Fp=11;class qie extends Gr{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...Ue.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width=Fp+"px",this.domNode.style.height=Fp+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new vm),this._register(Wi(this.bgDomNode,Se.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(Wi(this.domNode,Se.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new kM),this._pointerdownScheduleRepeatTimer=this._register(new qr)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Je(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}}class Gie extends q{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new qr)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)===null||e===void 0||e.setClassName(this._visibleClassName)},0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(t=this._domNode)===null||t===void 0||t.setClassName(this._invisibleClassName+(e?" fade":"")))}}const Zie=140;class j7 extends Gr{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new Gie(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new vm),this._shouldRender=!0,this.domNode=Ht(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(J(this.domNode.domNode,Se.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){const t=this._register(new qie(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=Ht(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof i=="number"&&this.slider.setWidth(i),typeof n=="number"&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(J(this.slider.domNode,Se.POINTER_DOWN,s=>{s.button===0&&(s.preventDefault(),this._sliderPointerDown(s))})),this.onclick(this.slider.domNode,s=>{s.leftButton&&s.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderPointerPosition(e);i<=s&&s<=n?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,i=e.offsetY;else{const s=gn(this.domNode.domNode);t=e.pageX-s.left,i=e.pageY-s.top}const n=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,s=>{const r=this._sliderOrthogonalPointerPosition(s),a=Math.abs(r-i);if(is&&a>Zie){this._setDesiredScrollPositionNow(n.getScrollPosition());return}const d=this._sliderPointerPosition(s)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(d))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}const Yie=20;class Bp{constructor(e,t,i,n,s,r){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=s,this._scrollPosition=r,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new Bp(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t?(this._visibleSize=t,this._refreshComputedValues(),!0):!1}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t?(this._scrollSize=t,this._refreshComputedValues(),!0):!1}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t?(this._scrollPosition=t,this._refreshComputedValues(),!0):!1}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,n,s){const r=Math.max(0,i-e),a=Math.max(0,r-2*t),l=n>0&&n>i;if(!l)return{computedAvailableSize:Math.round(r),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};const d=Math.round(Math.max(Yie,Math.floor(i*a/n))),c=(a-d)/(n-i),u=s*c;return{computedAvailableSize:Math.round(r),computedIsNeeded:l,computedSliderSize:Math.round(d),computedSliderRatio:c,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){const e=Bp._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return tthis._host.onMouseWheel(new ig(null,1,0))}),this._createArrow({className:"scra",icon:ve.scrollbarButtonRight,top:a,left:void 0,bottom:void 0,right:r,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new ig(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class Qie extends j7{constructor(e,t,i){const n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new Bp(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,s.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const r=(t.arrowSize-Fp)/2,a=(t.verticalScrollbarSize-Fp)/2;this._createArrow({className:"scra",icon:ve.scrollbarButtonUp,top:r,left:a,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new ig(null,0,1))}),this._createArrow({className:"scra",icon:ve.scrollbarButtonDown,top:void 0,left:a,bottom:r,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new ig(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}class kw{constructor(e,t,i,n,s,r,a){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t=t|0,i=i|0,n=n|0,s=s|0,r=r|0,a=a|0),this.rawScrollLeft=n,this.rawScrollTop=a,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),s<0&&(s=0),a+s>r&&(a=r-s),a<0&&(a=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=s,this.scrollHeight=r,this.scrollTop=a}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new kw(this._forceIntegerValues,typeof e.width<"u"?e.width:this.width,typeof e.scrollWidth<"u"?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,typeof e.height<"u"?e.height:this.height,typeof e.scrollHeight<"u"?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new kw(this._forceIntegerValues,this.width,this.scrollWidth,typeof e.scrollLeft<"u"?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof e.scrollTop<"u"?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,s=this.scrollLeft!==e.scrollLeft,r=this.height!==e.height,a=this.scrollHeight!==e.scrollHeight,l=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:s,heightChanged:r,scrollHeightChanged:a,scrollTopChanged:l}}}class bm extends q{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new W),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new kw(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var i;const n=this._state.withScrollDimensions(e,t);this._setState(n,!!this._smoothScrolling),(i=this._smoothScrolling)===null||i===void 0||i.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;t?n=new zv(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):n=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const i=this._state.withScrollPosition(e);this._smoothScrolling=zv.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class f4{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function ox(o,e){const t=e-o;return function(i){return o+t*tne(i)}}function Jie(o,e,t){return function(i){return i2.5*i){let s,r;return e0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return this._front===-1&&this._rear===-1||this._memory[this._rear],(!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}Iw.INSTANCE=new Iw;class eA extends Gr{get options(){return this._options}constructor(e,t,i){super(),this._onScroll=this._register(new W),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new W),e.style.overflow="hidden",this._options=sne(t),this._scrollable=i,this._register(this._scrollable.onScroll(s=>{this._onWillScroll.fire(s),this._onDidScroll(s),this._onScroll.fire(s)}));const n={onMouseWheel:s=>this._onMouseWheel(s),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new Qie(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new Xie(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=Ht(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Ht(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Ht(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,s=>this._onMouseOver(s)),this.onmouseleave(this._listenOnDomNode,s=>this._onMouseLeave(s)),this._hideTimeout=this._register(new qr),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=jt(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,It&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new ig(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=jt(this._mouseWheelToDispose),e)){const i=n=>{this._onMouseWheel(new ig(n))};this._mouseWheelToDispose.push(J(this._listenOnDomNode,Se.MOUSE_WHEEL,i,{passive:!1}))}}_onMouseWheel(e){var t;if(!((t=e.browserEvent)===null||t===void 0)&&t.defaultPrevented)return;const i=Iw.INSTANCE;i.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let r=e.deltaY*this._options.mouseWheelScrollSensitivity,a=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&a+r===0?a=r=0:Math.abs(r)>=Math.abs(a)?a=0:r=0),this._options.flipAxes&&([r,a]=[a,r]);const l=!It&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||l)&&!a&&(a=r,r=0),e.browserEvent&&e.browserEvent.altKey&&(a=a*this._options.fastScrollSensitivity,r=r*this._options.fastScrollSensitivity);const d=this._scrollable.getFutureScrollPosition();let c={};if(r){const u=p4*r,h=d.scrollTop-(u<0?Math.floor(u):Math.ceil(u));this._verticalScrollbar.writeScrollPosition(c,h)}if(a){const u=p4*a,h=d.scrollLeft-(u<0?Math.floor(u):Math.ceil(u));this._horizontalScrollbar.writeScrollPosition(c,h)}c=this._scrollable.validateScrollPosition(c),(d.scrollLeft!==c.scrollLeft||d.scrollTop!==c.scrollTop)&&(this._options.mouseWheelSmoothScroll&&i.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(c):this._scrollable.setScrollPositionNow(c),n=!0)}let s=n;!s&&this._options.alwaysConsumeMouseWheel&&(s=!0),!s&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(s=!0),s&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",s=t?" top":"",r=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${s}`),this._topLeftShadowDomNode.setClassName(`shadow${r}${s}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),ine)}}class K7 extends eA{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const i=new bm({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:n=>po(Je(e),n)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class Vy extends eA{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class a0 extends eA{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const i=new bm({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:n=>po(Je(e),n)});super(e,t,i),this._register(i),this._element=e,this._register(this.onScroll(n=>{n.scrollTopChanged&&(this._element.scrollTop=n.scrollTop),n.scrollLeftChanged&&(this._element.scrollLeft=n.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}function sne(o){const e={lazyRender:typeof o.lazyRender<"u"?o.lazyRender:!1,className:typeof o.className<"u"?o.className:"",useShadows:typeof o.useShadows<"u"?o.useShadows:!0,handleMouseWheel:typeof o.handleMouseWheel<"u"?o.handleMouseWheel:!0,flipAxes:typeof o.flipAxes<"u"?o.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof o.consumeMouseWheelIfScrollbarIsNeeded<"u"?o.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof o.alwaysConsumeMouseWheel<"u"?o.alwaysConsumeMouseWheel:!1,scrollYToX:typeof o.scrollYToX<"u"?o.scrollYToX:!1,mouseWheelScrollSensitivity:typeof o.mouseWheelScrollSensitivity<"u"?o.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof o.fastScrollSensitivity<"u"?o.fastScrollSensitivity:5,scrollPredominantAxis:typeof o.scrollPredominantAxis<"u"?o.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof o.mouseWheelSmoothScroll<"u"?o.mouseWheelSmoothScroll:!0,arrowSize:typeof o.arrowSize<"u"?o.arrowSize:11,listenOnDomNode:typeof o.listenOnDomNode<"u"?o.listenOnDomNode:null,horizontal:typeof o.horizontal<"u"?o.horizontal:1,horizontalScrollbarSize:typeof o.horizontalScrollbarSize<"u"?o.horizontalScrollbarSize:10,horizontalSliderSize:typeof o.horizontalSliderSize<"u"?o.horizontalSliderSize:0,horizontalHasArrows:typeof o.horizontalHasArrows<"u"?o.horizontalHasArrows:!1,vertical:typeof o.vertical<"u"?o.vertical:1,verticalScrollbarSize:typeof o.verticalScrollbarSize<"u"?o.verticalScrollbarSize:10,verticalHasArrows:typeof o.verticalHasArrows<"u"?o.verticalHasArrows:!1,verticalSliderSize:typeof o.verticalSliderSize<"u"?o.verticalSliderSize:0,scrollByPage:typeof o.scrollByPage<"u"?o.scrollByPage:!1};return e.horizontalSliderSize=typeof o.horizontalSliderSize<"u"?o.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof o.verticalSliderSize<"u"?o.verticalSliderSize:e.verticalScrollbarSize,It&&(e.className+=" mac"),e}class tA extends r0{constructor(e,t,i){super(),this._mouseLeaveMonitor=null,this._context=e,this.viewController=t,this.viewHelper=i,this.mouseTargetFactory=new Kn(this._context,i),this._mouseDownOperation=this._register(new one(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(r,a)=>this._createMouseTarget(r,a),r=>this._getMouseColumn(r))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(143).height;const n=new Tie(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,r=>this._onContextMenu(r,!0))),this._register(n.onMouseMove(this.viewHelper.viewDomNode,r=>{this._onMouseMove(r),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=J(this.viewHelper.viewDomNode.ownerDocument,"mousemove",a=>{this.viewHelper.viewDomNode.contains(a.target)||this._onMouseLeave(new gu(a,!1,this.viewHelper.viewDomNode))}))})),this._register(n.onMouseUp(this.viewHelper.viewDomNode,r=>this._onMouseUp(r))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,r=>this._onMouseLeave(r)));let s=0;this._register(n.onPointerDown(this.viewHelper.viewDomNode,(r,a)=>{s=a})),this._register(J(this.viewHelper.viewDomNode,Se.POINTER_UP,r=>{this._mouseDownOperation.onPointerUp()})),this._register(n.onMouseDown(this.viewHelper.viewDomNode,r=>this._onMouseDown(r,s))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const e=Iw.INSTANCE;let t=0,i=sr.getZoomLevel(),n=!1,s=0;const r=l=>{if(this.viewController.emitMouseWheel(l),!this._context.configuration.options.get(75))return;const d=new ig(l);if(e.acceptStandardWheelEvent(d),e.isPhysicalMouseWheel()){if(a(l)){const c=sr.getZoomLevel(),u=d.deltaY>0?1:-1;sr.setZoomLevel(c+u),d.preventDefault(),d.stopPropagation()}}else Date.now()-t>50&&(i=sr.getZoomLevel(),n=a(l),s=0),t=Date.now(),s+=d.deltaY,n&&(sr.setZoomLevel(i+s/5),d.preventDefault(),d.stopPropagation())};this._register(J(this.viewHelper.viewDomNode,Se.MOUSE_WHEEL,r,{capture:!0,passive:!1}));function a(l){return It?(l.metaKey||l.ctrlKey)&&!l.shiftKey&&!l.altKey:l.ctrlKey&&!l.metaKey&&!l.shiftKey&&!l.altKey}}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(143)){const t=this._context.configuration.options.get(143).height;this._height!==t&&(this._height=t,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){const n=new H7(e,t).toPageCoordinates(Je(this.viewHelper.viewDomNode)),s=YM(this.viewHelper.viewDomNode);if(n.ys.y+s.height||n.xs.x+s.width)return null;const r=XM(this.viewHelper.viewDomNode,s,n);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),s,n,r,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const n=sg(this.viewHelper.viewDomNode);n&&(i=n.elementsFromPoint(e.posx,e.posy).find(s=>this.viewHelper.viewDomNode.contains(s)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),!(this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(c&&(n||r&&a))u(),this._mouseDownOperation.start(i.type,e,t);else if(s)e.preventDefault();else if(l){const h=i.detail;c&&this.viewHelper.shouldSuppressMouseDownOnViewZone(h.viewZoneId)&&(u(),this._mouseDownOperation.start(i.type,e,t),e.preventDefault())}else d&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(u(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}}class one extends q{constructor(e,t,i,n,s,r){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._mouseTargetFactory=n,this._createMouseTarget=s,this._getMouseColumn=r,this._mouseMoveMonitor=this._register(new Aie(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new rne(this._context,this._viewHelper,this._mouseTargetFactory,(a,l,d)=>this._dispatchMouse(a,l,d))),this._mouseState=new Hy,this._currentSelection=new Ae(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):t.type===13&&(t.outsidePosition==="above"||t.outsidePosition==="below")?this._topBottomDragScrolling.start(t,e):(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)))}start(e,t,i){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(e===3),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;const s=this._context.configuration.options;if(!s.get(90)&&s.get(35)&&!s.get(22)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&n.type===6&&n.position&&this._currentSelection.containsPosition(n.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,r=>this._onMouseDownThenMove(r),r=>{const a=this._findMousePosition(this._lastMouseEvent,!1);G8(r)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:a?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,r=>this._onMouseDownThenMove(r),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.viewModel,n=this._context.viewLayout,s=this._getMouseColumn(e);if(e.posyt.y+t.height){const a=e.posy-t.y-t.height,l=n.getCurrentScrollTop()+e.relativePos.y,d=Op.getZoneAtCoord(this._context,l);if(d){const u=this._helpPositionJumpOverViewZone(d);if(u)return vs.createOutsideEditor(s,u,"below",a)}const c=n.getLineNumberAtVerticalOffset(l);return vs.createOutsideEditor(s,new z(c,i.getLineMaxColumn(c)),"below",a)}const r=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y);if(e.posxt.x+t.width){const a=e.posx-t.x-t.width;return vs.createOutsideEditor(s,new z(r,i.getLineMaxColumn(r)),"right",a)}return null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t);if(!n.position)return null;if(n.type===8||n.type===5){const r=this._helpPositionJumpOverViewZone(n.detail);if(r)return vs.createViewZone(n.type,n.element,n.mouseColumn,r,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new z(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t,i){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:i,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:e.type===6&&e.detail.injectedText!==null})}}class rne extends q{constructor(e,t,i,n){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new ane(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class ane extends q{constructor(e,t,i,n,s,r){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._position=s,this._mouseEvent=r,this._lastTime=Date.now(),this._animationFrameDisposable=po(Je(r.browserEvent),()=>this._execute())}dispose(){this._animationFrameDisposable.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){const e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){const e=this._context.configuration.options.get(66),t=this._context.configuration.options.get(143).height/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){const e=this._context.configuration.options.get(66),t=this._getScrollSpeed(),i=this._tick(),n=t*(i/1e3)*e,s=this._position.outsidePosition==="above"?-n:n;this._context.viewModel.viewLayout.deltaScrollNow(0,s),this._viewHelper.renderNow();const r=this._context.viewLayout.getLinesViewportData(),a=this._position.outsidePosition==="above"?r.startLineNumber:r.endLineNumber;let l;{const d=YM(this._viewHelper.viewDomNode),c=this._context.configuration.options.get(143).horizontalScrollbarHeight,u=new By(this._mouseEvent.pos.x,d.y+d.height-c-.1),h=XM(this._viewHelper.viewDomNode,d,u);l=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),d,u,h,null)}(!l.position||l.position.lineNumber!==a)&&(this._position.outsidePosition==="above"?l=vs.createOutsideEditor(this._position.mouseColumn,new z(a,1),"above",this._position.outsideDistance):l=vs.createOutsideEditor(this._position.mouseColumn,new z(a,this._context.viewModel.getLineMaxColumn(a)),"below",this._position.outsideDistance)),this._dispatchMouse(l,!0,2),this._animationFrameDisposable=po(Je(l.element),()=>this._execute())}}class Hy{get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=new Date().getTime();i-this._lastSetMouseDownCountTime>Hy.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}Hy.CLEAR_MOUSE_DOWN_COUNT_TIME=400;class St{get event(){return this.emitter.event}constructor(e,t,i){const n=s=>this.emitter.fire(s);this.emitter=new W({onWillAddFirstListener:()=>e.addEventListener(t,n,i),onDidRemoveLastListener:()=>e.removeEventListener(t,n,i)})}dispose(){this.emitter.dispose()}}var Ec;(function(o){const e={total:0,min:Number.MAX_VALUE,max:0},t={...e},i={...e},n={...e};let s=0;const r={keydown:0,input:0,render:0};function a(){_(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),r.keydown=1,queueMicrotask(l)}o.onKeyDown=a;function l(){r.keydown===1&&(performance.mark("keydown/end"),r.keydown=2)}function d(){performance.mark("input/start"),r.input=1,v()}o.onBeforeInput=d;function c(){r.input===0&&d(),queueMicrotask(u)}o.onInput=c;function u(){r.input===1&&(performance.mark("input/end"),r.input=2)}function h(){_()}o.onKeyUp=h;function g(){_()}o.onSelectionChange=g;function f(){r.keydown===2&&r.input===2&&r.render===0&&(performance.mark("render/start"),r.render=1,queueMicrotask(m),v())}o.onRenderStart=f;function m(){r.render===1&&(performance.mark("render/end"),r.render=2)}function v(){setTimeout(_)}function _(){r.keydown===2&&r.input===2&&r.render===2&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),b("keydown",e),b("input",t),b("render",i),b("inputlatency",n),s++,C())}function b(y,I){const E=performance.getEntriesByName(y)[0].duration;I.total+=E,I.min=Math.min(I.min,E),I.max=Math.max(I.max,E)}function C(){performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),r.keydown=0,r.input=0,r.render=0}function w(){if(s===0)return;const y={keydown:S(e),input:S(t),render:S(i),total:S(n),sampleCount:s};return x(e),x(t),x(i),x(n),s=0,y}o.getAndClearMeasurements=w;function S(y){return{average:y.total/s,max:y.max,min:y.min}}function x(y){y.total=0,y.min=Number.MAX_VALUE,y.max=0}})(Ec||(Ec={}));class Fn{constructor(e,t,i,n,s){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=s}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){const i=e.getValue(),n=e.getSelectionStart(),s=e.getSelectionEnd();let r;if(t){const a=i.substring(0,n),l=t.value.substring(0,t.selectionStart);a===l&&(r=t.newlineCountBeforeSelection)}return new Fn(i,n,s,null,r)}collapseSelection(){return this.selectionStart===this.value.length?this:new Fn(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){var t,i,n,s,r,a,l,d;if(e<=this.selectionStart){const h=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition((i=(t=this.selection)===null||t===void 0?void 0:t.getStartPosition())!==null&&i!==void 0?i:null,h,-1)}if(e>=this.selectionEnd){const h=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition((s=(n=this.selection)===null||n===void 0?void 0:n.getEndPosition())!==null&&s!==void 0?s:null,h,1)}const c=this.value.substring(this.selectionStart,e);if(c.indexOf("…")===-1)return this._finishDeduceEditorPosition((a=(r=this.selection)===null||r===void 0?void 0:r.getStartPosition())!==null&&a!==void 0?a:null,c,1);const u=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition((d=(l=this.selection)===null||l===void 0?void 0:l.getEndPosition())!==null&&d!==void 0?d:null,u,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,s=-1;for(;(s=t.indexOf(` +`,s+1))!==-1;)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const n=Math.min(Qh(e.value,t.value),e.selectionStart,t.selectionStart),s=Math.min(cw(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd);e.value.substring(n,e.value.length-s);const r=t.value.substring(n,t.value.length-s),a=e.selectionStart-n,l=e.selectionEnd-n,d=t.selectionStart-n,c=t.selectionEnd-n;if(d===c){const h=e.selectionStart-n;return{text:r,replacePrevCharCnt:h,replaceNextCharCnt:0,positionDelta:0}}const u=l-a;return{text:r,replacePrevCharCnt:u,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(Qh(e.value,t.value),e.selectionEnd),n=Math.min(cw(e.value,t.value),e.value.length-e.selectionEnd),s=e.value.substring(i,e.value.length-n),r=t.value.substring(i,t.value.length-n);e.selectionStart-i;const a=e.selectionEnd-i;t.selectionStart-i;const l=t.selectionEnd-i;return{text:r,replacePrevCharCnt:a,replaceNextCharCnt:s.length-a,positionDelta:l-r.length}}}Fn.EMPTY=new Fn("",0,0,null,void 0);class Rf{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,s=i+t;return new k(n,1,s+1,1)}static fromEditorSelection(e,t,i,n){const r=Rf._getPageOfLine(t.startLineNumber,i),a=Rf._getRangeForPage(r,i),l=Rf._getPageOfLine(t.endLineNumber,i),d=Rf._getRangeForPage(l,i);let c=a.intersectRanges(new k(1,1,t.startLineNumber,t.startColumn));if(n&&e.getValueLengthInRange(c,1)>500){const _=e.modifyPosition(c.getEndPosition(),-500);c=k.fromPositions(_,c.getEndPosition())}const u=e.getValueInRange(c,1),h=e.getLineCount(),g=e.getLineMaxColumn(h);let f=d.intersectRanges(new k(t.endLineNumber,t.endColumn,h,g));if(n&&e.getValueLengthInRange(f,1)>500){const _=e.modifyPosition(f.getStartPosition(),500);f=k.fromPositions(f.getStartPosition(),_)}const m=e.getValueInRange(f,1);let v;if(r===l||r+1===l)v=e.getValueInRange(t,1);else{const _=a.intersectRanges(t),b=d.intersectRanges(t);v=e.getValueInRange(_,1)+"…"+e.getValueInRange(b,1)}return n&&v.length>2*500&&(v=v.substring(0,500)+"…"+v.substring(v.length-500,v.length)),new Fn(u+v+m,u.length,u.length+v.length,t,c.endLineNumber-c.startLineNumber)}}var lne=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},m4=function(o,e){return function(t,i){e(t,i,o)}},Ew;(function(o){o.Tap="-monaco-textarea-synthetic-tap"})(Ew||(Ew={}));const rE={forceCopyWithSyntaxHighlighting:!1};class $v{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}$v.INSTANCE=new $v;class dne{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){e=e||"";const t={text:e,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}let aE=class extends q{get textAreaState(){return this._textAreaState}constructor(e,t,i,n,s,r){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._accessibilityService=s,this._logService=r,this._onFocus=this._register(new W),this.onFocus=this._onFocus.event,this._onBlur=this._register(new W),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new W),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new W),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new W),this.onCut=this._onCut.event,this._onPaste=this._register(new W),this.onPaste=this._onPaste.event,this._onType=this._register(new W),this.onType=this._onType.event,this._onCompositionStart=this._register(new W),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new W),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new W),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new W),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new An),this._asyncTriggerCut=this._register(new Yt(()=>this._onCut.fire(),0)),this._textAreaState=Fn.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(ye.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new Yt(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let a=null;this._register(this._textArea.onKeyDown(l=>{const d=new gi(l);(d.keyCode===114||this._currentComposition&&d.keyCode===1)&&d.stopPropagation(),d.equals(9)&&d.preventDefault(),a=d,this._onKeyDown.fire(d)})),this._register(this._textArea.onKeyUp(l=>{const d=new gi(l);this._onKeyUp.fire(d)})),this._register(this._textArea.onCompositionStart(l=>{const d=new dne;if(this._currentComposition){this._currentComposition=d;return}if(this._currentComposition=d,this._OS===2&&a&&a.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===l.data&&(a.code==="ArrowRight"||a.code==="ArrowLeft")){d.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:l.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:l.data});return}this._onCompositionStart.fire({data:l.data})})),this._register(this._textArea.onCompositionUpdate(l=>{const d=this._currentComposition;if(!d)return;if(this._browser.isAndroid){const u=Fn.readFromTextArea(this._textArea,this._textAreaState),h=Fn.deduceAndroidCompositionInput(this._textAreaState,u);this._textAreaState=u,this._onType.fire(h),this._onCompositionUpdate.fire(l);return}const c=d.handleCompositionUpdate(l.data);this._textAreaState=Fn.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(c),this._onCompositionUpdate.fire(l)})),this._register(this._textArea.onCompositionEnd(l=>{const d=this._currentComposition;if(!d)return;if(this._currentComposition=null,this._browser.isAndroid){const u=Fn.readFromTextArea(this._textArea,this._textAreaState),h=Fn.deduceAndroidCompositionInput(this._textAreaState,u);this._textAreaState=u,this._onType.fire(h),this._onCompositionEnd.fire();return}const c=d.handleCompositionUpdate(l.data);this._textAreaState=Fn.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(c),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(l=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const d=Fn.readFromTextArea(this._textArea,this._textAreaState),c=Fn.deduceInput(this._textAreaState,d,this._OS===2);c.replacePrevCharCnt===0&&c.text.length===1&&(bn(c.text.charCodeAt(0))||c.text.charCodeAt(0)===127)||(this._textAreaState=d,(c.text!==""||c.replacePrevCharCnt!==0||c.replaceNextCharCnt!==0||c.positionDelta!==0)&&this._onType.fire(c))})),this._register(this._textArea.onCut(l=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(l),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(l=>{this._ensureClipboardGetsEditorSelection(l)})),this._register(this._textArea.onPaste(l=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),l.preventDefault(),!l.clipboardData)return;let[d,c]=lE.getTextData(l.clipboardData);d&&(c=c||$v.INSTANCE.get(d),this._onPaste.fire({text:d,metadata:c}))})),this._register(this._textArea.onFocus(()=>{const l=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!l&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new Yt(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return J(this._textArea.ownerDocument,"selectionchange",t=>{if(Ec.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const s=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),s<100||!this._textAreaState.selection)return;const r=this._textArea.getValue();if(this._textAreaState.value!==r)return;const a=this._textArea.getSelectionStart(),l=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===a&&this._textAreaState.selectionEnd===l)return;const d=this._textAreaState.deduceEditorPosition(a),c=this._host.deduceModelPosition(d[0],d[1],d[2]),u=this._textAreaState.deduceEditorPosition(l),h=this._host.deduceModelPosition(u[0],u[1],u[2]),g=new Ae(c.lineNumber,c.column,h.lineNumber,h.column);this._onSelectionChangeRequest.fire(g)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeNativeTextAreaContent(e){!this._accessibilityService.isScreenReaderOptimized()&&e==="render"||this._currentComposition||(this._logService.trace(`writeTextAreaState(reason: ${e})`),this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent()))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};$v.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,` +`):t.text,i),e.preventDefault(),e.clipboardData&&lE.setTextData(e.clipboardData,t.text,t.html,i)}};aE=lne([m4(4,Zl),m4(5,bo)],aE);const lE={getTextData(o){const e=o.getData(qi.text);let t=null;const i=o.getData("vscode-editor-data");if(typeof i=="string")try{t=JSON.parse(i),t.version!==1&&(t=null)}catch{}return e.length===0&&t===null&&o.files.length>0?[Array.prototype.slice.call(o.files,0).map(s=>s.name).join(` +`),null]:[e,t]},setTextData(o,e,t,i){o.setData(qi.text,e),typeof t=="string"&&o.setData("text/html",t),o.setData("vscode-editor-data",JSON.stringify(i))}};class cne extends q{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new St(this._actual,"keydown")).event,this.onKeyUp=this._register(new St(this._actual,"keyup")).event,this.onCompositionStart=this._register(new St(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new St(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new St(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new St(this._actual,"beforeinput")).event,this.onInput=this._register(new St(this._actual,"input")).event,this.onCut=this._register(new St(this._actual,"cut")).event,this.onCopy=this._register(new St(this._actual,"copy")).event,this.onPaste=this._register(new St(this._actual,"paste")).event,this.onFocus=this._register(new St(this._actual,"focus")).event,this.onBlur=this._register(new St(this._actual,"blur")).event,this._onSyntheticTap=this._register(new W),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown(()=>Ec.onKeyDown())),this._register(this.onBeforeInput(()=>Ec.onBeforeInput())),this._register(this.onInput(()=>Ec.onInput())),this._register(this.onKeyUp(()=>Ec.onKeyUp())),this._register(J(this._actual,Ew.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const e=sg(this._actual);return e?e.activeElement===this._actual:this._actual.isConnected?this._actual.ownerDocument.activeElement===this._actual:!1}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){const n=this._actual;let s=null;const r=sg(n);r?s=r.activeElement:s=n.ownerDocument.activeElement;const a=Je(s),l=s===n,d=n.selectionStart,c=n.selectionEnd;if(l&&d===t&&c===i){pr&&a.parent!==a&&n.focus();return}if(l){this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),pr&&a.parent!==a&&n.focus();return}try{const u=QX(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),JX(n,u)}catch{}}}class une extends tA{constructor(e,t,i){super(e,t,i),this._register(ei.addTarget(this.viewHelper.linesContentDomNode)),this._register(J(this.viewHelper.linesContentDomNode,ni.Tap,s=>this.onTap(s))),this._register(J(this.viewHelper.linesContentDomNode,ni.Change,s=>this.onChange(s))),this._register(J(this.viewHelper.linesContentDomNode,ni.Contextmenu,s=>this._onContextMenu(new gu(s,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(J(this.viewHelper.linesContentDomNode,"pointerdown",s=>{const r=s.pointerType;if(r==="mouse"){this._lastPointerType="mouse";return}else r==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const n=new Mie(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,s=>this._onMouseMove(s))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,s=>this._onMouseUp(s))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,s=>this._onMouseLeave(s))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,(s,r)=>this._onMouseDown(s,r)))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new gu(e,!1,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:t.type===6&&t.detail.injectedText!==null})}onChange(e){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e,t){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e,t)}}class hne extends tA{constructor(e,t,i){super(e,t,i),this._register(ei.addTarget(this.viewHelper.linesContentDomNode)),this._register(J(this.viewHelper.linesContentDomNode,ni.Tap,n=>this.onTap(n))),this._register(J(this.viewHelper.linesContentDomNode,ni.Change,n=>this.onChange(n))),this._register(J(this.viewHelper.linesContentDomNode,ni.Contextmenu,n=>this._onContextMenu(new gu(n,!1,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new gu(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){const i=document.createEvent("CustomEvent");i.initEvent(Ew.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(i),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class gne extends q{constructor(e,t,i){super(),Ea&&CM.pointerEvents?this.handler=this._register(new une(e,t,i)):Ai.TouchEvent?this.handler=this._register(new hne(e,t,i)):this.handler=this._register(new tA(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}class Ag extends r0{}const Sn=bt("themeService");function Ni(o){return{id:o}}function dE(o){switch(o){case lr.DARK:return"vs-dark";case lr.HIGH_CONTRAST_DARK:return"hc-black";case lr.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const q7={ThemingContribution:"base.contributions.theming"};class fne{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new W}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),je(()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}}const G7=new fne;xi.add(q7.ThemingContribution,G7);function Zr(o){return G7.onColorThemeChange(o)}class pne extends q{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(t=>this.onThemeChange(t)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}const Z7=M("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},p("lineHighlight","Background color for the highlight of line at the cursor position.")),_4=M("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:Lt},p("lineHighlightBorderBox","Background color for the border around the line at the cursor position."));M("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},p("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0);M("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:fi,hcLight:fi},p("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0);M("editor.symbolHighlightBackground",{dark:wl,light:wl,hcDark:null,hcLight:null},p("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0);M("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:fi,hcLight:fi},p("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0);const Y7=M("editorCursor.foreground",{dark:"#AEAFAD",light:Y.black,hcDark:Y.white,hcLight:"#0F4A85"},p("caret","Color of the editor cursor.")),mne=M("editorCursor.background",null,p("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),Nd=M("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},p("editorWhitespaces","Color of whitespace characters in the editor.")),_ne=M("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:Y.white,hcLight:"#292929"},p("editorLineNumbers","Color of editor line numbers.")),nC=M("editorIndentGuide.background",{dark:Nd,light:Nd,hcDark:Nd,hcLight:Nd},p("editorIndentGuides","Color of the editor indentation guides."),!1,p("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),sC=M("editorIndentGuide.activeBackground",{dark:Nd,light:Nd,hcDark:Nd,hcLight:Nd},p("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,p("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),l0=M("editorIndentGuide.background1",{dark:nC,light:nC,hcDark:nC,hcLight:nC},p("editorIndentGuides1","Color of the editor indentation guides (1).")),vne=M("editorIndentGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorIndentGuides2","Color of the editor indentation guides (2).")),bne=M("editorIndentGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorIndentGuides3","Color of the editor indentation guides (3).")),Cne=M("editorIndentGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorIndentGuides4","Color of the editor indentation guides (4).")),wne=M("editorIndentGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorIndentGuides5","Color of the editor indentation guides (5).")),Sne=M("editorIndentGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorIndentGuides6","Color of the editor indentation guides (6).")),d0=M("editorIndentGuide.activeBackground1",{dark:sC,light:sC,hcDark:sC,hcLight:sC},p("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),yne=M("editorIndentGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),Lne=M("editorIndentGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),Dne=M("editorIndentGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),xne=M("editorIndentGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),kne=M("editorIndentGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),oC=M("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:fi,hcLight:fi},p("editorActiveLineNumber","Color of editor active line number"),!1,p("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead."));M("editorLineNumber.activeForeground",{dark:oC,light:oC,hcDark:oC,hcLight:oC},p("editorActiveLineNumber","Color of editor active line number"));const Ine=M("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},p("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed."));M("editorRuler.foreground",{dark:"#5A5A5A",light:Y.lightgrey,hcDark:Y.white,hcLight:"#292929"},p("editorRuler","Color of the editor rulers."));M("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},p("editorCodeLensForeground","Foreground color of editor CodeLens"));M("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},p("editorBracketMatchBackground","Background color behind matching brackets"));M("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:Lt,hcLight:Lt},p("editorBracketMatchBorder","Color for matching brackets boxes"));const Ene=M("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},p("editorOverviewRulerBorder","Color of the overview ruler border.")),Nne=M("editorOverviewRuler.background",null,p("editorOverviewRulerBackground","Background color of the editor overview ruler."));M("editorGutter.background",{dark:wn,light:wn,hcDark:wn,hcLight:wn},p("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers."));M("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:Y.fromHex("#fff").transparent(.8),hcLight:Lt},p("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor."));const Tne=M("editorUnnecessaryCode.opacity",{dark:Y.fromHex("#000a"),light:Y.fromHex("#0007"),hcDark:null,hcLight:null},p("unnecessaryCodeOpacity",`Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.`));M("editorGhostText.border",{dark:null,light:null,hcDark:Y.fromHex("#fff").transparent(.8),hcLight:Y.fromHex("#292929").transparent(.8)},p("editorGhostTextBorder","Border color of ghost text in the editor."));M("editorGhostText.foreground",{dark:Y.fromHex("#ffffff56"),light:Y.fromHex("#0007"),hcDark:null,hcLight:null},p("editorGhostTextForeground","Foreground color of the ghost text in the editor."));M("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},p("editorGhostTextBackground","Background color of the ghost text in the editor."));const rC=new Y(new kt(0,122,204,.6)),X7=M("editorOverviewRuler.rangeHighlightForeground",{dark:rC,light:rC,hcDark:rC,hcLight:rC},p("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Mne=M("editorOverviewRuler.errorForeground",{dark:new Y(new kt(255,18,18,.7)),light:new Y(new kt(255,18,18,.7)),hcDark:new Y(new kt(255,50,50,1)),hcLight:"#B5200D"},p("overviewRuleError","Overview ruler marker color for errors.")),Ane=M("editorOverviewRuler.warningForeground",{dark:zo,light:zo,hcDark:Bv,hcLight:Bv},p("overviewRuleWarning","Overview ruler marker color for warnings.")),Rne=M("editorOverviewRuler.infoForeground",{dark:Ks,light:Ks,hcDark:Wv,hcLight:Wv},p("overviewRuleInfo","Overview ruler marker color for infos.")),Q7=M("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},p("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),J7=M("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},p("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),eB=M("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},p("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),tB=M("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),iB=M("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),nB=M("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),Pne=M("editorBracketHighlight.unexpectedBracket.foreground",{dark:new Y(new kt(255,18,18,.8)),light:new Y(new kt(255,18,18,.8)),hcDark:new Y(new kt(255,50,50,1)),hcLight:""},p("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),One=M("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),Fne=M("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),Bne=M("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),Wne=M("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),Vne=M("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),Hne=M("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),zne=M("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),$ne=M("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),Une=M("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),jne=M("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),Kne=M("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),qne=M("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},p("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));M("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:"#CEA33D"},p("editorUnicodeHighlight.border","Border color used to highlight unicode characters."));M("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:"#cea33d14"},p("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));Zr((o,e)=>{const t=o.getColor(wn),i=o.getColor(Z7),n=i&&!i.isTransparent()?i:t;n&&e.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${n}; }`)});class c0 extends Ag{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new z(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(66);const t=e.get(67);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(94);const i=e.get(143);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new z(e,1));if(t.column!==1)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(this._renderLineNumbers===2){const n=Math.abs(this._lastCursorModelPosition.lineNumber-i);return n===0?''+i+"":String(n)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===i||i%10===0?String(i):"":String(i)}prepareRender(e){if(this._renderLineNumbers===0){this._renderResult=null;return}const t=ws?this._lineHeight%2===0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._context.viewModel.getLineCount(),r=[];for(let a=i;a<=n;a++){const l=a-i,d=this._getLineRenderLineNumber(a);if(!d){r[l]="";continue}let c="";if(a===s&&this._context.viewModel.getLineLength(a)===0){if(this._renderFinalNewline==="off"){r[l]="";continue}this._renderFinalNewline==="dimmed"&&(c=" dimmed-line-number")}a===this._activeLineNumber&&(c=" active-line-number"),r[l]=`
${d}
`}this._renderResult=r}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}c0.CLASS_NAME="line-numbers";Zr((o,e)=>{const t=o.getColor(_ne),i=o.getColor(Ine);i?e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i}; }`):t&&e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${t.transparent(.4)}; }`)});class og extends wo{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(143);this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=Ht(document.createElement("div")),this._domNode.setClassName(og.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=Ht(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(og.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(143);return this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}og.CLASS_NAME="glyph-margin";og.OUTER_CLASS_NAME="margin";const op="monaco-mouse-cursor-text";class Gne{constructor(){this._onDidChange=new W,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}}const H_=new Gne,Xt=bt("keybindingService");var Zne=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},v4=function(o,e){return function(t,i){e(t,i,o)}};class Yne{constructor(e,t,i,n,s){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=s,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new z(this.modelLineNumber,this.distanceToModelLineStart+1),i=new z(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(e?this._previousPresentation=e:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const rx=pr;let cE=class extends wo{constructor(e,t,i,n,s){super(e),this._keybindingService=n,this._instantiationService=s,this._primaryCursorPosition=new z(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=i,this._scrollLeft=0,this._scrollTop=0;const r=this._context.configuration.options,a=r.get(143);this._setAccessibilityOptions(r),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._contentHeight=a.height,this._fontInfo=r.get(50),this._lineHeight=r.get(66),this._emptySelectionClipboard=r.get(37),this._copyWithSyntaxHighlighting=r.get(25),this._visibleTextArea=null,this._selections=[new Ae(1,1,1,1)],this._modelSelections=[new Ae(1,1,1,1)],this._lastRenderPosition=null,this.textArea=Ht(document.createElement("textarea")),Fl.write(this.textArea,6),this.textArea.setClassName(`inputarea ${op}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:l}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${l*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(r)),this.textArea.setAttribute("aria-required",r.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(r.get(123))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",p("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",r.get(90)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=Ht(document.createElement("div")),this.textAreaCover.setPosition("absolute");const d={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:h=>this._context.viewModel.getLineMaxColumn(h),getValueInRange:(h,g)=>this._context.viewModel.getValueInRange(h,g),getValueLengthInRange:(h,g)=>this._context.viewModel.getValueLengthInRange(h,g),modifyPosition:(h,g)=>this._context.viewModel.modifyPosition(h,g)},c={getDataToCopy:()=>{const h=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,is),g=this._context.viewModel.model.getEOL(),f=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),m=Array.isArray(h)?h:null,v=Array.isArray(h)?h.join(g):h;let _,b=null;if(rE.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&v.length<65536){const C=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);C&&(_=C.html,b=C.mode)}return{isFromEmptySelection:f,multicursorText:m,text:v,html:_,mode:b}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const h=this._selections[0];if(It&&h.isEmpty()){const f=h.getStartPosition();let m=this._getWordBeforePosition(f);if(m.length===0&&(m=this._getCharacterBeforePosition(f)),m.length>0)return new Fn(m,m.length,m.length,k.fromPositions(f),0)}if(It&&!h.isEmpty()&&d.getValueLengthInRange(h,0)<500){const f=d.getValueInRange(h,0);return new Fn(f,0,f.length,h,0)}if(ru&&!h.isEmpty()){const f="vscode-placeholder";return new Fn(f,0,f.length,null,void 0)}return Fn.EMPTY}if($P){const h=this._selections[0];if(h.isEmpty()){const g=h.getStartPosition(),[f,m]=this._getAndroidWordAtPosition(g);if(f.length>0)return new Fn(f,m,m,k.fromPositions(g),0)}return Fn.EMPTY}return Rf.fromEditorSelection(d,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(h,g,f)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(h,g,f)},u=this._register(new cne(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(aE,c,u,Vo,{isAndroid:$P,isChrome:mM,isFirefox:pr,isSafari:ru})),this._register(this._textAreaInput.onKeyDown(h=>{this._viewController.emitKeyDown(h)})),this._register(this._textAreaInput.onKeyUp(h=>{this._viewController.emitKeyUp(h)})),this._register(this._textAreaInput.onPaste(h=>{let g=!1,f=null,m=null;h.metadata&&(g=this._emptySelectionClipboard&&!!h.metadata.isFromEmptySelection,f=typeof h.metadata.multicursorText<"u"?h.metadata.multicursorText:null,m=h.metadata.mode),this._viewController.paste(h.text,g,f,m)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(h=>{h.replacePrevCharCnt||h.replaceNextCharCnt||h.positionDelta?this._viewController.compositionType(h.text,h.replacePrevCharCnt,h.replaceNextCharCnt,h.positionDelta):this._viewController.type(h.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(h=>{this._viewController.setSelection(h)})),this._register(this._textAreaInput.onCompositionStart(h=>{const g=this.textArea.domNode,f=this._modelSelections[0],{distanceToModelLineStart:m,widthOfHiddenTextBefore:v}=(()=>{const b=g.value.substring(0,Math.min(g.selectionStart,g.selectionEnd)),C=b.lastIndexOf(` +`),w=b.substring(C+1),S=w.lastIndexOf(" "),x=w.length-S-1,y=f.getStartPosition(),I=Math.min(y.column-1,x),E=y.column-1-I,R=w.substring(0,w.length-I),{tabSize:j}=this._context.viewModel.model.getOptions(),O=Xne(this.textArea.domNode.ownerDocument,R,this._fontInfo,j);return{distanceToModelLineStart:E,widthOfHiddenTextBefore:O}})(),{distanceToModelLineEnd:_}=(()=>{const b=g.value.substring(Math.max(g.selectionStart,g.selectionEnd)),C=b.indexOf(` +`),w=C===-1?b:b.substring(0,C),S=w.indexOf(" "),x=S===-1?w.length:w.length-S-1,y=f.getEndPosition(),I=Math.min(this._context.viewModel.model.getLineMaxColumn(y.lineNumber)-y.column,x);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(y.lineNumber)-y.column-I}})();this._context.viewModel.revealRange("keyboard",!0,k.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new Yne(this._context,f.startLineNumber,m,v,_),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${op} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(h=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${op}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(H_.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',i=this._context.viewModel.getLineContent(e.lineNumber),n=_r(t);let s=!0,r=e.column,a=!0,l=e.column,d=0;for(;d<50&&(s||a);){if(s&&r<=1&&(s=!1),s){const c=i.charCodeAt(r-2);n.get(c)!==0?s=!1:r--}if(a&&l>i.length&&(a=!1),a){const c=i.charCodeAt(l-1);n.get(c)!==0?a=!1:l++}d++}return[i.substring(r-1,l-1),e.column-r]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=_r(this._context.configuration.options.get(129));let n=e.column,s=0;for(;n>1;){const r=t.charCodeAt(n-2);if(i.get(r)!==0||s>50)return t.substring(n-1,e.column-1);s++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const i=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!bn(i.charCodeAt(0)))return i}return""}_getAriaLabel(e){var t,i,n;if(e.get(2)===1){const r=(t=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))===null||t===void 0?void 0:t.getAriaLabel(),a=(i=this._keybindingService.lookupKeybinding("workbench.action.showCommands"))===null||i===void 0?void 0:i.getAriaLabel(),l=(n=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings"))===null||n===void 0?void 0:n.getAriaLabel(),d=p("accessibilityModeOff","The editor is not accessible at this time.");return r?p("accessibilityOffAriaLabel","{0} To enable screen reader optimized mode, use {1}",d,r):a?p("accessibilityOffAriaLabelNoKb","{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",d,a):l?p("accessibilityOffAriaLabelNoKbs","{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",d,l):d}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);this._accessibilitySupport===2&&t===Oa.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const n=e.get(143).wrappingColumn;if(n!==-1&&this._accessibilitySupport!==1){const s=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(n*s.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=rx?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(143);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(50),this._lineHeight=t.get(66),this._emptySelectionClipboard=t.get(37),this._copyWithSyntaxHighlighting=t.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:n}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${n*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("aria-required",t.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(123))),(e.hasChanged(34)||e.hasChanged(90))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options;!H_.enabled||e.get(34)&&e.get(90)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){var t;this._primaryCursorPosition=new z(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),(t=this._visibleTextArea)===null||t===void 0||t.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){var e;if(this._visibleTextArea){const n=this._visibleTextArea.visibleTextareaStart,s=this._visibleTextArea.visibleTextareaEnd,r=this._visibleTextArea.startPosition,a=this._visibleTextArea.endPosition;if(r&&a&&n&&s&&s.left>=this._scrollLeft&&n.left<=this._scrollLeft+this._contentWidth){const l=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,d=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let c=this._visibleTextArea.widthOfHiddenLineTextBefore,u=this._contentLeft+n.left-this._scrollLeft,h=s.left-n.left+1;if(uthis._contentWidth&&(h=this._contentWidth);const g=this._context.viewModel.getViewLineData(r.lineNumber),f=g.tokens.findTokenIndexAtOffset(r.column-1),m=g.tokens.findTokenIndexAtOffset(a.column-1),v=f===m,_=this._visibleTextArea.definePresentation(v?g.tokens.getPresentation(f):null);this.textArea.domNode.scrollTop=d*this._lineHeight,this.textArea.domNode.scrollLeft=c,this._doRender({lastRenderPosition:null,top:l,left:u,width:h,height:this._lineHeight,useCover:!1,color:(Ei.getColorMap()||[])[_.foreground],italic:_.italic,bold:_.bold,underline:_.underline,strikethrough:_.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const t=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(tthis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const i=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(i<0||i>this._contentHeight){this._renderAtTopLeft();return}if(It||this._accessibilitySupport===2){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const n=(e=this._textAreaInput.textAreaState.newlineCountBeforeSelection)!==null&&e!==void 0?e:this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=n*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:rx?0:1,useCover:!1})}_newlinecount(e){let t=0,i=-1;do{if(i=e.indexOf(` +`,i+1),i===-1)break;t++}while(!0);return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:rx?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;Jn(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?Y.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);const n=this._context.configuration.options;n.get(57)?i.setClassName("monaco-editor-background textAreaCover "+og.OUTER_CLASS_NAME):n.get(67).renderType!==0?i.setClassName("monaco-editor-background textAreaCover "+c0.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}};cE=Zne([v4(3,Xt),v4(4,qe)],cE);function Xne(o,e,t,i){if(e.length===0)return 0;const n=o.createElement("div");n.style.position="absolute",n.style.top="-50000px",n.style.width="50000px";const s=o.createElement("span");Jn(s,t),s.style.whiteSpace="pre",s.style.tabSize=`${i*t.spaceWidth}px`,s.append(e),n.appendChild(s),o.body.appendChild(n);const r=s.offsetWidth;return o.body.removeChild(n),r}function Qne(o,e,t){let i=0;for(let s=0;s!0,ese=()=>!1,tse=o=>o===" "||o===" ";class Jg{static shouldRecreate(e){return e.hasChanged(143)||e.hasChanged(129)||e.hasChanged(37)||e.hasChanged(76)||e.hasChanged(78)||e.hasChanged(79)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(127)||e.hasChanged(50)||e.hasChanged(90)}constructor(e,t,i,n){var s;this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const r=i.options,a=r.get(143),l=r.get(50);this.readOnly=r.get(90),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=r.get(115),this.lineHeight=l.lineHeight,this.typicalHalfwidthCharacterWidth=l.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(a.height/this.lineHeight)-2),this.useTabStops=r.get(127),this.wordSeparators=r.get(129),this.emptySelectionClipboard=r.get(37),this.copyWithSyntaxHighlighting=r.get(25),this.multiCursorMergeOverlapping=r.get(76),this.multiCursorPaste=r.get(78),this.multiCursorLimit=r.get(79),this.autoClosingBrackets=r.get(6),this.autoClosingComments=r.get(7),this.autoClosingQuotes=r.get(11),this.autoClosingDelete=r.get(9),this.autoClosingOvertype=r.get(10),this.autoSurround=r.get(14),this.autoIndent=r.get(12),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const d=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(d)for(const u of d)this.surroundingPairs[u.open]=u.close;const c=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=(s=c==null?void 0:c.blockCommentStartToken)!==null&&s!==void 0?s:null}get electricChars(){var e;if(!this._electricChars){this._electricChars={};const t=(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||e===void 0?void 0:e.getElectricCharacters();if(t)for(const i of t)this._electricChars[i]=!0}return this._electricChars}onElectricCharacter(e,t,i){const n=Iy(t,i-1),s=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return s?s.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return iA(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,i){switch(t){case"beforeWhitespace":return tse;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,i);case"always":return Jne;case"never":return ese}}_getLanguageDefinedShouldAutoClose(e,t){const i=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return n=>i.indexOf(n)!==-1}visibleColumnFromColumn(e,t){return mn.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=mn.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),s=e.getLineMinColumn(t);if(nr?r:n}}let Tt=class sB{static fromModelState(e){return new ise(e)}static fromViewState(e){return new nse(e)}static fromModelSelection(e){const t=Ae.liftSelection(e),i=new Wn(k.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return sB.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;is,d=n>r,c=nr||_n||v0&&n--,wh.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const s=Math.min(i.fromViewLineNumber,i.toViewLineNumber),r=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let l=s;l<=r;l++){const d=t.getLineMaxColumn(l),c=e.visibleColumnFromColumn(t,new z(l,d));n=Math.max(n,c)}let a=i.toViewVisualColumn;return ae.getLineMinColumn(t.lineNumber))return t.delta(void 0,-p8(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new z(i,e.getLineMaxColumn(i))}else return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),s=e.getLineContent(t.lineNumber),r=Hv.atomicPosition(s,t.column-1,i,0);if(r!==-1&&r+1>=n)return new z(t.lineNumber,r+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?$t.leftPositionAtomicSoftTabs(t,i,e.tabSize):$t.leftPosition(t,i);return new ax(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,s){let r,a;if(i.hasSelection()&&!n)r=i.selection.startLineNumber,a=i.selection.startColumn;else{const l=i.position.delta(void 0,-(s-1)),d=t.normalizePosition($t.clipPositionColumn(l,t),0),c=$t.left(e,t,d);r=c.lineNumber,a=c.column}return i.move(n,r,a,0)}static clipPositionColumn(e,t){return new z(e.lineNumber,$t.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return ei?i:e}static rightPosition(e,t,i){return ic?(i=c,a?n=t.getLineMaxColumn(i):n=Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,d),g?s=0:s=d-mn.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),l!==void 0){const f=new z(i,n),m=t.normalizePosition(f,l);s=s+(n-m.column),i=m.lineNumber,n=m.column}return new ax(i,n,s)}static down(e,t,i,n,s,r,a){return this.vertical(e,t,i,n,s,i+r,a,4)}static moveDown(e,t,i,n,s){let r,a;i.hasSelection()&&!n?(r=i.selection.endLineNumber,a=i.selection.endColumn):(r=i.position.lineNumber,a=i.position.column);let l=0,d;do if(d=$t.down(e,t,r+l,a,i.leftoverVisibleColumns,s,!0),t.normalizePosition(new z(d.lineNumber,d.column),2).lineNumber>r)break;while(l++<10&&r+l1&&this._isBlankLine(t,s);)s--;for(;s>1&&!this._isBlankLine(t,s);)s--;return i.move(n,s,t.getLineMinColumn(s),0)}static moveToNextBlankLine(e,t,i,n){const s=t.getLineCount();let r=i.position.lineNumber;for(;r=h.length+1)return!1;const g=h.charAt(u.column-2),f=n.get(g);if(!f)return!1;if(uc(g)){if(i==="never")return!1}else if(t==="never")return!1;const m=h.charAt(u.column-1);let v=!1;for(const _ of f)_.open===g&&_.close===m&&(v=!0);if(!v)return!1;if(e==="auto"){let _=!1;for(let b=0,C=a.length;b1){const s=t.getLineContent(n.lineNumber),r=Cs(s),a=r===-1?s.length+1:r+1;if(n.column<=a){const l=i.visibleColumnFromColumn(t,n),d=mn.prevIndentTabStop(l,i.indentSize),c=i.columnFromVisibleColumn(t,n.lineNumber,d);return new k(n.lineNumber,c,n.lineNumber,n.column)}}return k.fromPositions(rg.getPositionAfterDeleteLeft(n,t),n)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=pY(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}else if(e.lineNumber>1){const i=e.lineNumber-1;return new z(i,t.getLineMaxColumn(i))}else return e}static cut(e,t,i){const n=[];let s=null;i.sort((r,a)=>z.compare(r.getStartPosition(),a.getEndPosition()));for(let r=0,a=i.length;r1&&(s==null?void 0:s.endLineNumber)!==d.lineNumber?(c=d.lineNumber-1,u=t.getLineMaxColumn(d.lineNumber-1),h=d.lineNumber,g=t.getLineMaxColumn(d.lineNumber)):(c=d.lineNumber,u=1,h=d.lineNumber,g=t.getLineMaxColumn(d.lineNumber));const f=new k(c,u,h,g);s=f,f.isEmpty()?n[r]=null:n[r]=new qn(f,"")}else n[r]=null;else n[r]=new qn(l,"")}return new Vs(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class Wt{static _createWord(e,t,i,n,s){return{start:n,end:s,wordType:t,nextCharClass:i}}static _findPreviousWordOnLine(e,t,i){const n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0;for(let s=i.column-2;s>=0;s--){const r=e.charCodeAt(s),a=t.get(r);if(a===0){if(n===2)return this._createWord(e,n,a,s+1,this._findEndOfWord(e,t,n,s+1));n=1}else if(a===2){if(n===1)return this._createWord(e,n,a,s+1,this._findEndOfWord(e,t,n,s+1));n=2}else if(a===1&&n!==0)return this._createWord(e,n,a,s+1,this._findEndOfWord(e,t,n,s+1))}return n!==0?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){const s=e.length;for(let r=n;r=0;s--){const r=e.charCodeAt(s),a=t.get(r);if(a===1||i===1&&a===2||i===2&&a===0)return s+1}return 0}static moveWordLeft(e,t,i,n){let s=i.lineNumber,r=i.column;r===1&&s>1&&(s=s-1,r=t.getLineMaxColumn(s));let a=Wt._findPreviousWordOnLine(e,t,new z(s,r));if(n===0)return new z(s,a?a.start+1:1);if(n===1)return a&&a.wordType===2&&a.end-a.start===1&&a.nextCharClass===0&&(a=Wt._findPreviousWordOnLine(e,t,new z(s,a.start+1))),new z(s,a?a.start+1:1);if(n===3){for(;a&&a.wordType===2;)a=Wt._findPreviousWordOnLine(e,t,new z(s,a.start+1));return new z(s,a?a.start+1:1)}return a&&r<=a.end+1&&(a=Wt._findPreviousWordOnLine(e,t,new z(s,a.start+1))),new z(s,a?a.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===1)return i>1?new z(i-1,e.getLineMaxColumn(i-1)):t;const s=e.getLineContent(i);for(let r=t.column-1;r>1;r--){const a=s.charCodeAt(r-2),l=s.charCodeAt(r-1);if(a===95&&l!==95)return new z(i,r);if(a===45&&l!==45)return new z(i,r);if((Dc(a)||q0(a))&&el(l))return new z(i,r);if(el(a)&&el(l)&&r+1=l.start+1&&(l=Wt._findNextWordOnLine(e,t,new z(s,l.end+1))),l?r=l.start+1:r=t.getLineMaxColumn(s);return new z(s,r)}static _moveWordPartRight(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===n)return i1?d=1:(l--,d=n.getLineMaxColumn(l)):(c&&d<=c.end+1&&(c=Wt._findPreviousWordOnLine(i,n,new z(l,c.start+1))),c?d=c.end+1:d>1?d=1:(l--,d=n.getLineMaxColumn(l))),new k(l,d,a.lineNumber,a.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new z(i.positionLineNumber,i.positionColumn),s=this._deleteInsideWordWhitespace(t,n);return s||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return i===32||i===9}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(n===0)return null;let s=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,s))return null;let r=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,r))return null;for(;s>0&&this._charAtIsWhitespace(i,s-1);)s--;for(;r+11?new k(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumberu.start+1<=i.column&&i.column<=u.end+1,a=(u,h)=>(u=Math.min(u,i.column),h=Math.max(h,i.column),new k(i.lineNumber,u,i.lineNumber,h)),l=u=>{let h=u.start+1,g=u.end+1,f=!1;for(;g-11&&this._charAtIsWhitespace(n,h-2);)h--;return a(h,g)},d=Wt._findPreviousWordOnLine(e,t,i);if(d&&r(d))return l(d);const c=Wt._findNextWordOnLine(e,t,i);return c&&r(c)?l(c):d&&c?a(d.end+1,c.start+1):d?a(d.start+1,d.end+1):c?a(c.start+1,c.end+1):a(1,s+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=Wt._moveWordPartLeft(e,i);return new k(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){const i=e.length;for(let n=t;n=h.start+1&&(h=Wt._findNextWordOnLine(i,n,new z(l,h.end+1))),h?d=h.start+1:d!!e)}class On{static addCursorDown(e,t,i){const n=[];let s=0;for(let r=0,a=t.length;rd&&(c=d,u=e.model.getLineMaxColumn(c)),Tt.fromModelState(new Wn(new k(r.lineNumber,1,c,u),2,0,new z(c,u),0))}const l=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumberl){const d=e.getLineCount();let c=a.lineNumber+1,u=1;return c>d&&(c=d,u=e.getLineMaxColumn(c)),Tt.fromViewState(t.viewState.move(!0,c,u,0))}else{const d=t.modelState.selectionStart.getEndPosition();return Tt.fromModelState(t.modelState.move(!0,d.lineNumber,d.column,0))}}static word(e,t,i,n){const s=e.model.validatePosition(n);return Tt.fromModelState(Wt.word(e.cursorConfig,e.model,t.modelState,i,s))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new Tt(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return Tt.fromViewState(new Wn(new k(i,n,i,n),0,0,new z(i,n),0))}static moveTo(e,t,i,n,s){if(i){if(t.modelState.selectionStartKind===1)return this.word(e,t,i,n);if(t.modelState.selectionStartKind===2)return this.line(e,t,i,n,s)}const r=e.model.validatePosition(n),a=s?e.coordinatesConverter.validateViewPosition(new z(s.lineNumber,s.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);return Tt.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,s,r){switch(i){case 0:return r===4?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,s);case 1:return r===4?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,s);case 2:return r===2?this._moveUpByViewLines(e,t,n,s):this._moveUpByModelLines(e,t,n,s);case 3:return r===2?this._moveDownByViewLines(e,t,n,s):this._moveDownByModelLines(e,t,n,s);case 4:return r===2?t.map(a=>Tt.fromViewState($t.moveToPrevBlankLine(e.cursorConfig,e,a.viewState,n))):t.map(a=>Tt.fromModelState($t.moveToPrevBlankLine(e.cursorConfig,e.model,a.modelState,n)));case 5:return r===2?t.map(a=>Tt.fromViewState($t.moveToNextBlankLine(e.cursorConfig,e,a.viewState,n))):t.map(a=>Tt.fromModelState($t.moveToNextBlankLine(e.cursorConfig,e.model,a.modelState,n)));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,s){const r=e.getCompletelyVisibleViewRange(),a=e.coordinatesConverter.convertViewRangeToModelRange(r);switch(i){case 11:{const l=this._firstLineNumberInRange(e.model,a,s),d=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],n,l,d)]}case 13:{const l=this._lastLineNumberInRange(e.model,a,s),d=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],n,l,d)]}case 12:{const l=Math.round((a.startLineNumber+a.endLineNumber)/2),d=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],n,l,d)]}case 14:{const l=[];for(let d=0,c=t.length;di.endLineNumber-1?r=i.endLineNumber-1:sTt.fromViewState($t.moveLeft(e.cursorConfig,e,s.viewState,i,n)))}static _moveHalfLineLeft(e,t,i){const n=[];for(let s=0,r=t.length;sTt.fromViewState($t.moveRight(e.cursorConfig,e,s.viewState,i,n)))}static _moveHalfLineRight(e,t,i){const n=[];for(let s=0,r=t.length;s1&&n.firstCharOffset===0){const m=ep(e,t.startLineNumber-1);m.languageId===n.languageId&&(d=m.getLineContent())}const c=s.onEnter(o,d,a,l);if(!c)return null;const u=c.indentAction;let h=c.appendText;const g=c.removeText||0;h?u===an.Indent&&(h=" "+h):u===an.Indent||u===an.IndentOutdent?h=" ":h="";let f=f8(e,t.startLineNumber,t.startColumn);return g&&(f=f.substring(0,f.length-g)),{indentAction:u,appendText:h,removeText:g,indentation:f}}var tse=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ise=function(o,e){return function(t,i){e(t,i,o)}},x1;const lx=Object.create(null);function Xu(o,e){if(e<=0)return"";lx[o]||(lx[o]=["",o]);const t=lx[o];for(let i=t.length;i<=e;i++)t[i]=t[i-1]+o;return t[e]}let rr=x1=class{static unshiftIndent(e,t,i,n,s){const r=mn.visibleColumnFromColumn(e,t,i);if(s){const a=Xu(" ",n),d=mn.prevIndentTabStop(r,n)/n;return Xu(a,d)}else{const a=" ",d=mn.prevRenderTabStop(r,i)/i;return Xu(a,d)}}static shiftIndent(e,t,i,n,s){const r=mn.visibleColumnFromColumn(e,t,i);if(s){const a=Xu(" ",n),d=mn.nextIndentTabStop(r,n)/n;return Xu(a,d)}else{const a=" ",d=mn.nextRenderTabStop(r,i)/i;return Xu(a,d)}}constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let n=this._selection.endLineNumber;this._selection.endColumn===1&&i!==n&&(n=n-1);const{tabSize:s,indentSize:r,insertSpaces:a}=this._opts,l=i===n;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let d=0,c=0;for(let u=i;u<=n;u++,d=c){c=0;const h=e.getLineContent(u);let g=Cs(h);if(this._opts.isUnshift&&(h.length===0||g===0)||!l&&!this._opts.isUnshift&&h.length===0)continue;if(g===-1&&(g=h.length),u>1&&mn.visibleColumnFromColumn(h,g+1,s)%r!==0&&e.tokenization.isCheapToTokenize(u-1)){const v=rp(this._opts.autoIndent,e,new k(u-1,e.getLineMaxColumn(u-1),u-1,e.getLineMaxColumn(u-1)),this._languageConfigurationService);if(v){if(c=d,v.appendText)for(let _=0,b=v.appendText.length;_1){let n,s=-1;for(n=e-1;n>=1;n--){if(o.tokenization.getLanguageIdAtPosition(n,0)!==i)return s;const r=o.getLineContent(n);if(t.shouldIgnore(r)||/^\s+$/.test(r)||r===""){s=n;continue}return n}}return-1}function $y(o,e,t,i=!0,n){if(o<4)return null;const s=n.getLanguageConfiguration(e.tokenization.getLanguageId()).indentRulesSupport;if(!s)return null;if(t<=1)return{indentation:"",action:null};for(let l=t-1;l>0&&e.getLineContent(l)==="";l--)if(l===1)return{indentation:"",action:null};const r=ose(e,t,s);if(r<0)return null;if(r<1)return{indentation:"",action:null};const a=e.getLineContent(r);if(s.shouldIncrease(a)||s.shouldIndentNextLine(a))return{indentation:ii(a),action:an.Indent,line:r};if(s.shouldDecrease(a))return{indentation:ii(a),action:null,line:r};{if(r===1)return{indentation:ii(e.getLineContent(r)),action:null,line:r};const l=r-1,d=s.getIndentMetadata(e.getLineContent(l));if(!(d&3)&&d&4){let c=0;for(let u=l-1;u>0;u--)if(!s.shouldIndentNextLine(e.getLineContent(u))){c=u;break}return{indentation:ii(e.getLineContent(c+1)),action:null,line:c+1}}if(i)return{indentation:ii(e.getLineContent(r)),action:null,line:r};for(let c=r;c>0;c--){const u=e.getLineContent(c);if(s.shouldIncrease(u))return{indentation:ii(u),action:an.Indent,line:c};if(s.shouldIndentNextLine(u)){let h=0;for(let g=c-1;g>0;g--)if(!s.shouldIndentNextLine(e.getLineContent(c))){h=g;break}return{indentation:ii(e.getLineContent(h+1)),action:null,line:h+1}}else if(s.shouldDecrease(u))return{indentation:ii(u),action:null,line:c}}return{indentation:ii(e.getLineContent(1)),action:null,line:1}}}function z_(o,e,t,i,n,s){if(o<4)return null;const r=s.getLanguageConfiguration(t);if(!r)return null;const a=s.getLanguageConfiguration(t).indentRulesSupport;if(!a)return null;const l=$y(o,e,i,void 0,s),d=e.getLineContent(i);if(l){const c=l.line;if(c!==void 0){let u=!0;for(let h=c;h0&&s.getLanguageId(0)!==r.languageId?(l=!0,d=a.substr(0,t.startColumn-1-r.firstCharOffset)):d=s.getLineContent().substring(0,t.startColumn-1);let c;t.isEmpty()?c=a.substr(t.startColumn-1-r.firstCharOffset):c=ep(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-r.firstCharOffset);const u=n.getLanguageConfiguration(r.languageId).indentRulesSupport;if(!u)return null;const h=d,g=ii(d),f={tokenization:{getLineTokens:b=>e.tokenization.getLineTokens(b),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(b,C)=>e.getLanguageIdAtPosition(b,C)},getLineContent:b=>b===t.startLineNumber?h:e.getLineContent(b)},m=ii(s.getLineContent()),v=$y(o,f,t.startLineNumber+1,void 0,n);if(!v){const b=l?m:g;return{beforeEnter:b,afterEnter:b}}let _=l?m:v.indentation;return v.action===an.Indent&&(_=i.shiftIndent(_)),u.shouldDecrease(c)&&(_=i.unshiftIndent(_)),{beforeEnter:l?m:g,afterEnter:_}}function ase(o,e,t,i,n,s){if(o<4)return null;const r=ep(e,t.startLineNumber,t.startColumn);if(r.firstCharOffset)return null;const a=s.getLanguageConfiguration(r.languageId).indentRulesSupport;if(!a)return null;const l=r.getLineContent(),d=l.substr(0,t.startColumn-1-r.firstCharOffset);let c;if(t.isEmpty()?c=l.substr(t.startColumn-1-r.firstCharOffset):c=ep(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-r.firstCharOffset),!a.shouldDecrease(d+c)&&a.shouldDecrease(d+i+c)){const u=$y(o,e,t.startLineNumber,!1,s);if(!u)return null;let h=u.indentation;return u.action!==an.Indent&&(h=n.unshiftIndent(h)),h}return null}function oB(o,e,t){const i=t.getLanguageConfiguration(o.getLanguageId()).indentRulesSupport;return!i||e<1||e>o.getLineCount()?null:i.getIndentMetadata(o.getLineContent(e))}class yi{static indent(e,t,i){if(t===null||i===null)return[];const n=[];for(let s=0,r=i.length;s1&&n.firstCharOffset===0){const m=ep(e,t.startLineNumber-1);m.languageId===n.languageId&&(d=m.getLineContent())}const c=s.onEnter(o,d,a,l);if(!c)return null;const u=c.indentAction;let h=c.appendText;const g=c.removeText||0;h?u===an.Indent&&(h=" "+h):u===an.Indent||u===an.IndentOutdent?h=" ":h="";let f=f7(e,t.startLineNumber,t.startColumn);return g&&(f=f.substring(0,f.length-g)),{indentAction:u,appendText:h,removeText:g,indentation:f}}var ose=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rse=function(o,e){return function(t,i){e(t,i,o)}},x1;const lx=Object.create(null);function Xu(o,e){if(e<=0)return"";lx[o]||(lx[o]=["",o]);const t=lx[o];for(let i=t.length;i<=e;i++)t[i]=t[i-1]+o;return t[e]}let rr=x1=class{static unshiftIndent(e,t,i,n,s){const r=mn.visibleColumnFromColumn(e,t,i);if(s){const a=Xu(" ",n),d=mn.prevIndentTabStop(r,n)/n;return Xu(a,d)}else{const a=" ",d=mn.prevRenderTabStop(r,i)/i;return Xu(a,d)}}static shiftIndent(e,t,i,n,s){const r=mn.visibleColumnFromColumn(e,t,i);if(s){const a=Xu(" ",n),d=mn.nextIndentTabStop(r,n)/n;return Xu(a,d)}else{const a=" ",d=mn.nextRenderTabStop(r,i)/i;return Xu(a,d)}}constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let n=this._selection.endLineNumber;this._selection.endColumn===1&&i!==n&&(n=n-1);const{tabSize:s,indentSize:r,insertSpaces:a}=this._opts,l=i===n;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let d=0,c=0;for(let u=i;u<=n;u++,d=c){c=0;const h=e.getLineContent(u);let g=Cs(h);if(this._opts.isUnshift&&(h.length===0||g===0)||!l&&!this._opts.isUnshift&&h.length===0)continue;if(g===-1&&(g=h.length),u>1&&mn.visibleColumnFromColumn(h,g+1,s)%r!==0&&e.tokenization.isCheapToTokenize(u-1)){const v=rp(this._opts.autoIndent,e,new k(u-1,e.getLineMaxColumn(u-1),u-1,e.getLineMaxColumn(u-1)),this._languageConfigurationService);if(v){if(c=d,v.appendText)for(let _=0,b=v.appendText.length;_1){let n,s=-1;for(n=e-1;n>=1;n--){if(o.tokenization.getLanguageIdAtPosition(n,0)!==i)return s;const r=o.getLineContent(n);if(t.shouldIgnore(r)||/^\s+$/.test(r)||r===""){s=n;continue}return n}}return-1}function $y(o,e,t,i=!0,n){if(o<4)return null;const s=n.getLanguageConfiguration(e.tokenization.getLanguageId()).indentRulesSupport;if(!s)return null;if(t<=1)return{indentation:"",action:null};for(let l=t-1;l>0&&e.getLineContent(l)==="";l--)if(l===1)return{indentation:"",action:null};const r=dse(e,t,s);if(r<0)return null;if(r<1)return{indentation:"",action:null};const a=e.getLineContent(r);if(s.shouldIncrease(a)||s.shouldIndentNextLine(a))return{indentation:ii(a),action:an.Indent,line:r};if(s.shouldDecrease(a))return{indentation:ii(a),action:null,line:r};{if(r===1)return{indentation:ii(e.getLineContent(r)),action:null,line:r};const l=r-1,d=s.getIndentMetadata(e.getLineContent(l));if(!(d&3)&&d&4){let c=0;for(let u=l-1;u>0;u--)if(!s.shouldIndentNextLine(e.getLineContent(u))){c=u;break}return{indentation:ii(e.getLineContent(c+1)),action:null,line:c+1}}if(i)return{indentation:ii(e.getLineContent(r)),action:null,line:r};for(let c=r;c>0;c--){const u=e.getLineContent(c);if(s.shouldIncrease(u))return{indentation:ii(u),action:an.Indent,line:c};if(s.shouldIndentNextLine(u)){let h=0;for(let g=c-1;g>0;g--)if(!s.shouldIndentNextLine(e.getLineContent(c))){h=g;break}return{indentation:ii(e.getLineContent(h+1)),action:null,line:h+1}}else if(s.shouldDecrease(u))return{indentation:ii(u),action:null,line:c}}return{indentation:ii(e.getLineContent(1)),action:null,line:1}}}function z_(o,e,t,i,n,s){if(o<4)return null;const r=s.getLanguageConfiguration(t);if(!r)return null;const a=s.getLanguageConfiguration(t).indentRulesSupport;if(!a)return null;const l=$y(o,e,i,void 0,s),d=e.getLineContent(i);if(l){const c=l.line;if(c!==void 0){let u=!0;for(let h=c;h0&&s.getLanguageId(0)!==r.languageId?(l=!0,d=a.substr(0,t.startColumn-1-r.firstCharOffset)):d=s.getLineContent().substring(0,t.startColumn-1);let c;t.isEmpty()?c=a.substr(t.startColumn-1-r.firstCharOffset):c=ep(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-r.firstCharOffset);const u=n.getLanguageConfiguration(r.languageId).indentRulesSupport;if(!u)return null;const h=d,g=ii(d),f={tokenization:{getLineTokens:b=>e.tokenization.getLineTokens(b),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(b,C)=>e.getLanguageIdAtPosition(b,C)},getLineContent:b=>b===t.startLineNumber?h:e.getLineContent(b)},m=ii(s.getLineContent()),v=$y(o,f,t.startLineNumber+1,void 0,n);if(!v){const b=l?m:g;return{beforeEnter:b,afterEnter:b}}let _=l?m:v.indentation;return v.action===an.Indent&&(_=i.shiftIndent(_)),u.shouldDecrease(c)&&(_=i.unshiftIndent(_)),{beforeEnter:l?m:g,afterEnter:_}}function use(o,e,t,i,n,s){if(o<4)return null;const r=ep(e,t.startLineNumber,t.startColumn);if(r.firstCharOffset)return null;const a=s.getLanguageConfiguration(r.languageId).indentRulesSupport;if(!a)return null;const l=r.getLineContent(),d=l.substr(0,t.startColumn-1-r.firstCharOffset);let c;if(t.isEmpty()?c=l.substr(t.startColumn-1-r.firstCharOffset):c=ep(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-r.firstCharOffset),!a.shouldDecrease(d+c)&&a.shouldDecrease(d+i+c)){const u=$y(o,e,t.startLineNumber,!1,s);if(!u)return null;let h=u.indentation;return u.action!==an.Indent&&(h=n.unshiftIndent(h)),h}return null}function oB(o,e,t){const i=t.getLanguageConfiguration(o.getLanguageId()).indentRulesSupport;return!i||e<1||e>o.getLineCount()?null:i.getIndentMetadata(o.getLineContent(e))}class yi{static indent(e,t,i){if(t===null||i===null)return[];const n=[];for(let s=0,r=i.length;s1){let a;for(a=i-1;a>=1;a--){const c=t.getLineContent(a);if(Da(c)>=0)break}if(a<1)return null;const l=t.getLineMaxColumn(a),d=rp(e.autoIndent,t,new k(a,l,a,l),e.languageConfigurationService);d&&(s=d.indentation+d.appendText)}return n&&(n===an.Indent&&(s=yi.shiftIndent(e,s)),n===an.Outdent&&(s=yi.unshiftIndent(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let s="";const r=i.getStartPosition();if(e.insertSpaces){const a=e.visibleColumnFromColumn(t,r),l=e.indentSize,d=l-a%l;for(let c=0;cthis._compositionType(i,c,s,r,a,l));return new Vs(4,d,{shouldPushStackElementBefore:dC(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,s,r){if(!t.isEmpty())return null;const a=t.getPosition(),l=Math.max(1,a.column-n),d=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+s),c=new k(a.lineNumber,l,a.lineNumber,d);return e.getValueInRange(c)===i&&r===0?null:new D1(c,i,0,r)}static _typeCommand(e,t,i){return i?new aC(e,t,!0):new qn(e,t,!0)}static _enter(e,t,i,n){if(e.autoIndent===0)return yi._typeCommand(n,` `,i);if(!t.tokenization.isCheapToTokenize(n.getStartPosition().lineNumber)||e.autoIndent===1){const l=t.getLineContent(n.startLineNumber),d=ii(l).substring(0,n.startColumn-1);return yi._typeCommand(n,` `+e.normalizeIndentation(d),i)}const s=rp(e.autoIndent,t,n,e.languageConfigurationService);if(s){if(s.indentAction===an.None)return yi._typeCommand(n,` @@ -54,48 +54,48 @@ Received: '{1}'.`,e,mh.getLexeme(t)),s=t.offset,r=mh.getLexeme(t);return this._p `+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===an.IndentOutdent){const l=e.normalizeIndentation(s.indentation),d=e.normalizeIndentation(s.indentation+s.appendText),c=` `+d+` `+l;return i?new aC(n,c,!0):new D1(n,c,-1,d.length-l.length,!0)}else if(s.indentAction===an.Outdent){const l=yi.unshiftIndent(e,s.indentation);return yi._typeCommand(n,` -`+e.normalizeIndentation(l+s.appendText),i)}}const r=t.getLineContent(n.startLineNumber),a=ii(r).substring(0,n.startColumn-1);if(e.autoIndent>=4){const l=rse(e.autoIndent,t,n,{unshiftIndent:d=>yi.unshiftIndent(e,d),shiftIndent:d=>yi.shiftIndent(e,d),normalizeIndentation:d=>e.normalizeIndentation(d)},e.languageConfigurationService);if(l){let d=e.visibleColumnFromColumn(t,n.getEndPosition());const c=n.endColumn,u=t.getLineContent(n.endLineNumber),h=Cs(u);if(h>=0?n=n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,h+1)):n=n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new aC(n,` +`+e.normalizeIndentation(l+s.appendText),i)}}const r=t.getLineContent(n.startLineNumber),a=ii(r).substring(0,n.startColumn-1);if(e.autoIndent>=4){const l=cse(e.autoIndent,t,n,{unshiftIndent:d=>yi.unshiftIndent(e,d),shiftIndent:d=>yi.shiftIndent(e,d),normalizeIndentation:d=>e.normalizeIndentation(d)},e.languageConfigurationService);if(l){let d=e.visibleColumnFromColumn(t,n.getEndPosition());const c=n.endColumn,u=t.getLineContent(n.endLineNumber),h=Cs(u);if(h>=0?n=n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,h+1)):n=n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new aC(n,` `+e.normalizeIndentation(l.afterEnter),!0);{let g=0;return c<=h+1&&(e.insertSpaces||(d=Math.ceil(d/e.indentSize)),g=Math.min(d+1-e.normalizeIndentation(l.afterEnter).length-1,0)),new D1(n,` `+e.normalizeIndentation(l.afterEnter),0,g,!0)}}}return yi._typeCommand(n,` -`+e.normalizeIndentation(a),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let n=0,s=i.length;nyi.shiftIndent(e,a),unshiftIndent:a=>yi.unshiftIndent(e,a)},e.languageConfigurationService);if(r===null)return null;if(r!==e.normalizeIndentation(s)){const a=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return a===0?yi._typeCommand(new k(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+n,!1):yi._typeCommand(new k(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+t.getLineContent(i.startLineNumber).substring(a-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,s){if(e.autoClosingOvertype==="never"||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(s))return!1;for(let r=0,a=i.length;r2?c.charCodeAt(d.column-2):0)===92&&h)return!1;if(e.autoClosingOvertype==="auto"){let f=!1;for(let m=0,v=n.length;mt.startsWith(l.open)),a=s.some(l=>t.startsWith(l.close));return!r&&a}static _findAutoClosingPairOpen(e,t,i,n){const s=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!s)return null;let r=null;for(const a of s)if(r===null||a.open.length>r.open.length){let l=!0;for(const d of i)if(t.getValueInRange(new k(d.lineNumber,d.column-a.open.length+1,d.lineNumber,d.column))+n!==a.open){l=!1;break}l&&(r=a)}return r}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let s=null;for(const r of n)r.open!==t.open&&t.open.includes(r.open)&&t.close.endsWith(r.close)&&(!s||r.open.length>s.open.length)&&(s=r);return s}static _getAutoClosingPairClose(e,t,i,n,s){for(const f of i)if(!f.isEmpty())return null;const r=i.map(f=>{const m=f.getPosition();return s?{lineNumber:m.lineNumber,beforeColumn:m.column-n.length,afterColumn:m.column}:{lineNumber:m.lineNumber,beforeColumn:m.column,afterColumn:m.column}}),a=this._findAutoClosingPairOpen(e,t,r.map(f=>new z(f.lineNumber,f.beforeColumn)),n);if(!a)return null;let l,d;if(uc(n)?(l=e.autoClosingQuotes,d=e.shouldAutoCloseBefore.quote):(e.blockCommentStartToken?a.open.includes(e.blockCommentStartToken):!1)?(l=e.autoClosingComments,d=e.shouldAutoCloseBefore.comment):(l=e.autoClosingBrackets,d=e.shouldAutoCloseBefore.bracket),l==="never")return null;const u=this._findContainedAutoClosingPair(e,a),h=u?u.close:"";let g=!0;for(const f of r){const{lineNumber:m,beforeColumn:v,afterColumn:_}=f,b=t.getLineContent(m),C=b.substring(0,v-1),w=b.substring(_-1);if(w.startsWith(h)||(g=!1),w.length>0){const I=w.charAt(0);if(!yi._isBeforeClosingBrace(e,w)&&!d(I))return null}if(a.open.length===1&&(n==="'"||n==='"')&&l!=="always"){const I=_r(e.wordSeparators);if(C.length>0){const E=C.charCodeAt(C.length-1);if(I.get(E)===0)return null}}if(!t.tokenization.isCheapToTokenize(m))return null;t.tokenization.forceTokenization(m);const S=t.tokenization.getLineTokens(m),x=Iy(S,v-1);if(!a.shouldAutoClose(x,v-x.firstCharOffset))return null;const y=a.findNeutralCharacter();if(y){const I=t.tokenization.getTokenTypeIfInsertingCharacter(m,v,y);if(!a.isOK(I))return null}}return g?a.close.substring(0,a.close.length-h.length):a.close}static _runAutoClosingOpenCharType(e,t,i,n,s,r,a){const l=[];for(let d=0,c=n.length;dnew qn(new k(h.positionLineNumber,h.positionColumn,h.positionLineNumber,h.positionColumn+1),"",!1));return new Vs(4,u,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const c=this._getAutoClosingPairClose(t,i,s,l,!0);return c!==null?this._runAutoClosingOpenCharType(e,t,i,s,l,!0,c):null}static typeWithInterceptors(e,t,i,n,s,r,a){if(!e&&a===` +`+e.normalizeIndentation(a),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let n=0,s=i.length;nyi.shiftIndent(e,a),unshiftIndent:a=>yi.unshiftIndent(e,a)},e.languageConfigurationService);if(r===null)return null;if(r!==e.normalizeIndentation(s)){const a=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return a===0?yi._typeCommand(new k(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+n,!1):yi._typeCommand(new k(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+t.getLineContent(i.startLineNumber).substring(a-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,s){if(e.autoClosingOvertype==="never"||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(s))return!1;for(let r=0,a=i.length;r2?c.charCodeAt(d.column-2):0)===92&&h)return!1;if(e.autoClosingOvertype==="auto"){let f=!1;for(let m=0,v=n.length;mt.startsWith(l.open)),a=s.some(l=>t.startsWith(l.close));return!r&&a}static _findAutoClosingPairOpen(e,t,i,n){const s=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!s)return null;let r=null;for(const a of s)if(r===null||a.open.length>r.open.length){let l=!0;for(const d of i)if(t.getValueInRange(new k(d.lineNumber,d.column-a.open.length+1,d.lineNumber,d.column))+n!==a.open){l=!1;break}l&&(r=a)}return r}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let s=null;for(const r of n)r.open!==t.open&&t.open.includes(r.open)&&t.close.endsWith(r.close)&&(!s||r.open.length>s.open.length)&&(s=r);return s}static _getAutoClosingPairClose(e,t,i,n,s){for(const f of i)if(!f.isEmpty())return null;const r=i.map(f=>{const m=f.getPosition();return s?{lineNumber:m.lineNumber,beforeColumn:m.column-n.length,afterColumn:m.column}:{lineNumber:m.lineNumber,beforeColumn:m.column,afterColumn:m.column}}),a=this._findAutoClosingPairOpen(e,t,r.map(f=>new z(f.lineNumber,f.beforeColumn)),n);if(!a)return null;let l,d;if(uc(n)?(l=e.autoClosingQuotes,d=e.shouldAutoCloseBefore.quote):(e.blockCommentStartToken?a.open.includes(e.blockCommentStartToken):!1)?(l=e.autoClosingComments,d=e.shouldAutoCloseBefore.comment):(l=e.autoClosingBrackets,d=e.shouldAutoCloseBefore.bracket),l==="never")return null;const u=this._findContainedAutoClosingPair(e,a),h=u?u.close:"";let g=!0;for(const f of r){const{lineNumber:m,beforeColumn:v,afterColumn:_}=f,b=t.getLineContent(m),C=b.substring(0,v-1),w=b.substring(_-1);if(w.startsWith(h)||(g=!1),w.length>0){const I=w.charAt(0);if(!yi._isBeforeClosingBrace(e,w)&&!d(I))return null}if(a.open.length===1&&(n==="'"||n==='"')&&l!=="always"){const I=_r(e.wordSeparators);if(C.length>0){const E=C.charCodeAt(C.length-1);if(I.get(E)===0)return null}}if(!t.tokenization.isCheapToTokenize(m))return null;t.tokenization.forceTokenization(m);const S=t.tokenization.getLineTokens(m),x=Iy(S,v-1);if(!a.shouldAutoClose(x,v-x.firstCharOffset))return null;const y=a.findNeutralCharacter();if(y){const I=t.tokenization.getTokenTypeIfInsertingCharacter(m,v,y);if(!a.isOK(I))return null}}return g?a.close.substring(0,a.close.length-h.length):a.close}static _runAutoClosingOpenCharType(e,t,i,n,s,r,a){const l=[];for(let d=0,c=n.length;dnew qn(new k(h.positionLineNumber,h.positionColumn,h.positionLineNumber,h.positionColumn+1),"",!1));return new Vs(4,u,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const c=this._getAutoClosingPairClose(t,i,s,l,!0);return c!==null?this._runAutoClosingOpenCharType(e,t,i,s,l,!0,c):null}static typeWithInterceptors(e,t,i,n,s,r,a){if(!e&&a===` `){const c=[];for(let u=0,h=s.length;u{const n=t.get(Ot).getFocusedCodeEditor();return n&&n.hasTextFocus()?this._runEditorCommand(t,n,i):!1}),e.addImplementation(1e3,"generic-dom-input-textarea",(t,i)=>{const n=jo();return n&&["input","textarea"].indexOf(n.tagName.toLowerCase())>=0?(this.runDOMCommand(n),!0):!1}),e.addImplementation(0,"generic-dom",(t,i)=>{const n=t.get(Ot).getActiveCodeEditor();return n?(n.focus(),this._runEditorCommand(t,n,i)):!1})}_runEditorCommand(e,t,i){const n=this.runEditorCommand(e,t,i);return n||!0}}var Ln;(function(o){class e extends Pi{constructor(b){super(b),this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){if(!C.position)return;b.model.pushStackElement(),b.setCursorStates(C.source,3,[On.moveTo(b,b.getPrimaryCursorState(),this._inSelectionMode,C.position,C.viewPosition)])&&C.revealType!==2&&b.revealPrimaryCursor(C.source,!0,!0)}}o.MoveTo=we(new e({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),o.MoveToSelect=we(new e({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class t extends Pi{runCoreEditorCommand(b,C){b.model.pushStackElement();const w=this._getColumnSelectResult(b,b.getPrimaryCursorState(),b.getCursorColumnSelectData(),C);w!==null&&(b.setCursorStates(C.source,3,w.viewStates.map(S=>Tt.fromViewState(S))),b.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:w.fromLineNumber,fromViewVisualColumn:w.fromVisualColumn,toViewLineNumber:w.toLineNumber,toViewVisualColumn:w.toVisualColumn}),w.reversed?b.revealTopMostCursor(C.source):b.revealBottomMostCursor(C.source))}}o.ColumnSelect=we(new class extends t{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(_,b,C,w){if(typeof w.position>"u"||typeof w.viewPosition>"u"||typeof w.mouseColumn>"u")return null;const S=_.model.validatePosition(w.position),x=_.coordinatesConverter.validateViewPosition(new z(w.viewPosition.lineNumber,w.viewPosition.column),S),y=w.doColumnSelect?C.fromViewLineNumber:x.lineNumber,I=w.doColumnSelect?C.fromViewVisualColumn:w.mouseColumn-1;return wh.columnSelect(_.cursorConfig,_,y,I,x.lineNumber,w.mouseColumn-1)}}),o.CursorColumnSelectLeft=we(new class extends t{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(_,b,C,w){return wh.columnSelectLeft(_.cursorConfig,_,C)}}),o.CursorColumnSelectRight=we(new class extends t{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(_,b,C,w){return wh.columnSelectRight(_.cursorConfig,_,C)}});class i extends t{constructor(b){super(b),this._isPaged=b.isPaged}_getColumnSelectResult(b,C,w,S){return wh.columnSelectUp(b.cursorConfig,b,w,this._isPaged)}}o.CursorColumnSelectUp=we(new i({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:3600,linux:{primary:0}}})),o.CursorColumnSelectPageUp=we(new i({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:3595,linux:{primary:0}}}));class n extends t{constructor(b){super(b),this._isPaged=b.isPaged}_getColumnSelectResult(b,C,w,S){return wh.columnSelectDown(b.cursorConfig,b,w,this._isPaged)}}o.CursorColumnSelectDown=we(new n({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:3602,linux:{primary:0}}})),o.CursorColumnSelectPageDown=we(new n({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:3596,linux:{primary:0}}}));class s extends Pi{constructor(){super({id:"cursorMove",precondition:void 0,metadata:Nw.metadata})}runCoreEditorCommand(b,C){const w=Nw.parse(C);w&&this._runCursorMove(b,C.source,w)}_runCursorMove(b,C,w){b.model.pushStackElement(),b.setCursorStates(C,3,s._move(b,b.getCursorStates(),w)),b.revealPrimaryCursor(C,!0)}static _move(b,C,w){const S=w.select,x=w.value;switch(w.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return On.simpleMove(b,C,w.direction,S,x,w.unit);case 11:case 13:case 12:case 14:return On.viewportMove(b,C,w.direction,S,x);default:return null}}}o.CursorMoveImpl=s,o.CursorMove=we(new s);class r extends Pi{constructor(b){super(b),this._staticArgs=b.args}runCoreEditorCommand(b,C){let w=this._staticArgs;this._staticArgs.value===-1&&(w={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:C.pageSize||b.cursorConfig.pageSize}),b.model.pushStackElement(),b.setCursorStates(C.source,3,On.simpleMove(b,b.getCursorStates(),w.direction,w.select,w.value,w.unit)),b.revealPrimaryCursor(C.source,!0)}}o.CursorLeft=we(new r({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),o.CursorLeftSelect=we(new r({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:1039}})),o.CursorRight=we(new r({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),o.CursorRightSelect=we(new r({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:1041}})),o.CursorUp=we(new r({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),o.CursorUpSelect=we(new r({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),o.CursorPageUp=we(new r({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:11}})),o.CursorPageUpSelect=we(new r({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:1035}})),o.CursorDown=we(new r({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),o.CursorDownSelect=we(new r({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),o.CursorPageDown=we(new r({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:12}})),o.CursorPageDownSelect=we(new r({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:1036}})),o.CreateCursor=we(new class extends Pi{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(_,b){if(!b.position)return;let C;b.wholeLine?C=On.line(_,_.getPrimaryCursorState(),!1,b.position,b.viewPosition):C=On.moveTo(_,_.getPrimaryCursorState(),!1,b.position,b.viewPosition);const w=_.getCursorStates();if(w.length>1){const S=C.modelState?C.modelState.position:null,x=C.viewState?C.viewState.position:null;for(let y=0,I=w.length;yx&&(S=x);const y=new k(S,1,S,_.model.getLineMaxColumn(S));let I=0;if(C.at)switch(C.at){case Pf.RawAtArgument.Top:I=3;break;case Pf.RawAtArgument.Center:I=1;break;case Pf.RawAtArgument.Bottom:I=4;break}const E=_.coordinatesConverter.convertModelRangeToViewRange(y);_.revealRange(b.source,!1,E,I,0)}}),o.SelectAll=new class extends uE{constructor(){super(rQ)}runDOMCommand(_){pr&&(_.focus(),_.select()),_.ownerDocument.execCommand("selectAll")}runEditorCommand(_,b,C){const w=b._getViewModel();w&&this.runCoreEditorCommand(w,C)}runCoreEditorCommand(_,b){_.model.pushStackElement(),_.setCursorStates("keyboard",3,[On.selectAll(_,_.getPrimaryCursorState())])}},o.SetSelection=we(new class extends Pi{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(_,b){b.selection&&(_.model.pushStackElement(),_.setCursorStates(b.source,3,[Tt.fromModelSelection(b.selection)]))}})})(Ln||(Ln={}));const dse=ae.and(T.textInputFocus,T.columnSelection);function Cm(o,e){Gs.registerKeybindingRule({id:o,primary:e,when:dse,weight:Ft+1})}Cm(Ln.CursorColumnSelectLeft.id,1039);Cm(Ln.CursorColumnSelectRight.id,1041);Cm(Ln.CursorColumnSelectUp.id,1040);Cm(Ln.CursorColumnSelectPageUp.id,1035);Cm(Ln.CursorColumnSelectDown.id,1042);Cm(Ln.CursorColumnSelectPageDown.id,1036);function w4(o){return o.register(),o}var ap;(function(o){class e extends Rn{runEditorCommand(i,n,s){const r=n._getViewModel();r&&this.runCoreEditingCommand(n,r,s||{})}}o.CoreEditingCommand=e,o.LineBreakInsert=we(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:T.writable,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,yi.lineBreakInsert(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection)))}}),o.Outdent=we(new class extends e{constructor(){super({id:"outdent",precondition:T.writable,kbOpts:{weight:Ft,kbExpr:ae.and(T.editorTextFocus,T.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,yi.outdent(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection))),t.pushUndoStop()}}),o.Tab=we(new class extends e{constructor(){super({id:"tab",precondition:T.writable,kbOpts:{weight:Ft,kbExpr:ae.and(T.editorTextFocus,T.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,yi.tab(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection))),t.pushUndoStop()}}),o.DeleteLeft=we(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(t,i,n){const[s,r]=rg.deleteLeft(i.getPrevEditOperationType(),i.cursorConfig,i.model,i.getCursorStates().map(a=>a.modelState.selection),i.getCursorAutoClosedCharacters());s&&t.pushUndoStop(),t.executeCommands(this.id,r),i.setPrevEditOperationType(2)}}),o.DeleteRight=we(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(t,i,n){const[s,r]=rg.deleteRight(i.getPrevEditOperationType(),i.cursorConfig,i.model,i.getCursorStates().map(a=>a.modelState.selection));s&&t.pushUndoStop(),t.executeCommands(this.id,r),i.setPrevEditOperationType(3)}}),o.Undo=new class extends uE{constructor(){super(t8)}runDOMCommand(t){t.ownerDocument.execCommand("undo")}runEditorCommand(t,i,n){if(!(!i.hasModel()||i.getOption(90)===!0))return i.getModel().undo()}},o.Redo=new class extends uE{constructor(){super(i8)}runDOMCommand(t){t.ownerDocument.execCommand("redo")}runEditorCommand(t,i,n){if(!(!i.hasModel()||i.getOption(90)===!0))return i.getModel().redo()}}})(ap||(ap={}));class S4 extends xy{constructor(e,t,i){super({id:e,precondition:void 0,metadata:i}),this._handlerId=t}runCommand(e,t){const i=e.get(Ot).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function Rg(o,e){w4(new S4("default:"+o,o)),w4(new S4(o,o,e))}Rg("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});Rg("replacePreviousChar");Rg("compositionType");Rg("compositionStart");Rg("compositionEnd");Rg("paste");Rg("cut");class cse{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Ln.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():e.mouseDownCount===3?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount===2?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){Ln.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){Ln.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Ln.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Ln.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){Ln.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){Ln.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){Ln.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){Ln.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){Ln.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){Ln.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){Ln.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){Ln.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){Ln.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class Uy{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){var t;(t=this.onKeyDown)===null||t===void 0||t.call(this,e)}emitKeyUp(e){var t;(t=this.onKeyUp)===null||t===void 0||t.call(this,e)}emitContextMenu(e){var t;(t=this.onContextMenu)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var t;(t=this.onMouseMove)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var t;(t=this.onMouseLeave)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var t;(t=this.onMouseDown)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var t;(t=this.onMouseUp)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var t;(t=this.onMouseDrag)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var t;(t=this.onMouseDrop)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var e;(e=this.onMouseDropCanceled)===null||e===void 0||e.call(this)}emitMouseWheel(e){var t;(t=this.onMouseWheel)===null||t===void 0||t.call(this,e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return Uy.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i={...e};return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),(i.type===5||i.type===8)&&(i.detail=this.convertViewToModelViewZoneData(i.detail,t)),i}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new z(e.afterLineNumber,1)).lineNumber}}}class aB{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Ci("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(this.getCount()===0)return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let s=0,r=0;for(let l=i;l<=n;l++){const d=l-this._rendLineNumberStart;e<=l&&l<=t&&(r===0?(s=d,r=1):r++)}if(e=n&&a<=s&&(this._lines[a-this._rendLineNumberStart].onContentChanged(),r=!0);return r}onLinesInserted(e,t){if(this.getCount()===0)return null;const i=t-e+1,n=this.getStartLineNumber(),s=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>s)return null;if(i+e>s)return this._lines.splice(e-this._rendLineNumberStart,s-e+1);const r=[];for(let u=0;ui)continue;const l=Math.max(t,a.fromLineNumber),d=Math.min(i,a.toLineNumber);for(let c=l;c<=d;c++){const u=c-this._rendLineNumberStart;this._lines[u].onTokensChanged(),n=!0}}return n}}class lB{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new aB(()=>this._host.createVisibleLine())}_createDomNode(){const e=Ht(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(143)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let i=0,n=t.length;it){const r=t,a=Math.min(i,s.rendLineNumberStart-1);r<=a&&(this._insertLinesBefore(s,r,a,n,t),s.linesLength+=a-r+1)}else if(s.rendLineNumberStart0&&(this._removeLinesBefore(s,r),s.linesLength-=r)}if(s.rendLineNumberStart=t,s.rendLineNumberStart+s.linesLength-1i){const r=Math.max(0,i-s.rendLineNumberStart+1),l=s.linesLength-1-r+1;l>0&&(this._removeLinesAfter(s,l),s.linesLength-=l)}return this._finishRendering(s,!1,n),s}_renderUntouchedLines(e,t,i,n,s){const r=e.rendLineNumberStart,a=e.lines;for(let l=t;l<=i;l++){const d=r+l;a[l].layoutLine(d,n[d-s])}}_insertLinesBefore(e,t,i,n,s){const r=[];let a=0;for(let l=t;l<=i;l++)r[a++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;a--){const l=e.lines[a];n[a]&&(l.setDomNode(r),r=r.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");wd._ttPolicy&&(t=wd._ttPolicy.createHTML(t)),n.innerHTML=t;for(let s=0;so});wd._sb=new mm(1e5);class dB extends wo{constructor(e){super(e),this._visibleLines=new lB(this),this.domNode=this._visibleLines.domNode;const i=this._context.configuration.options.get(50);Jn(this.domNode,i),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ei.shouldRender());for(let i=0,n=t.length;i'),n.appendString(s),n.appendString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class hse extends dB{constructor(e){super(e);const i=this._context.configuration.options.get(143);this._contentWidth=i.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const i=this._context.configuration.options.get(143);return this._contentWidth=i.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class gse extends dB{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(143);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),Jn(this.domNode,t.get(50))}onConfigurationChanged(e){const t=this._context.configuration.options;Jn(this.domNode,t.get(50));const i=t.get(143);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class fse extends wo{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=Ht(document.createElement("div")),Fl.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=Ht(document.createElement("div")),Fl.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){const e=Object.keys(this._widgets);for(const t of e)this._widgets[t].updateAnchorViewPosition()}addWidget(e){const t=new pse(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i,n,s){this._widgets[e.getId()].setPosition(t,i,n,s),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const i=this._widgets[t];delete this._widgets[t];const n=i.domNode.domNode;n.parentNode.removeChild(n),n.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return this._widgets.hasOwnProperty(e)?this._widgets[e].suppressMouseDown:!1}onBeforeRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(e)}}class pse{constructor(e,t,i){this._primaryAnchor=new Km(null,null),this._secondaryAnchor=new Km(null,null),this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=Ht(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,s=n.get(143);this._fixedOverflowWidgets=n.get(42),this._contentWidth=s.contentWidth,this._contentLeft=s.contentLeft,this._lineHeight=n.get(66),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(66),e.hasChanged(143)){const i=t.get(143);this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,t,i){this._affinity=e,this._primaryAnchor=n(t,this._context.viewModel,this._affinity),this._secondaryAnchor=n(i,this._context.viewModel,this._affinity);function n(s,r,a){if(!s)return new Km(null,null);const l=r.model.validatePosition(s);if(r.coordinatesConverter.modelPositionIsVisible(l)){const d=r.coordinatesConverter.convertModelPositionToViewPosition(l,a??void 0);return new Km(s,d)}return new Km(s,null)}}_getMaxWidth(){const e=this.domNode.domNode.ownerDocument,t=e.defaultView;return this.allowEditorOverflow?(t==null?void 0:t.innerWidth)||e.documentElement.offsetWidth||e.body.offsetWidth:this._contentWidth}setPosition(e,t,i,n){this._setPosition(n,e,t),this._preference=i,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n){const s=e.top,r=s,a=e.top+e.height,l=n.viewportHeight-a,d=s-i,c=r>=i,u=a,h=l>=i;let g=e.left;return g+t>n.scrollLeft+n.viewportWidth&&(g=n.scrollLeft+n.viewportWidth-t),gd){const g=h-(d-n);h-=g,i-=g}if(h=_,w=g+i<=f.height-b;return this._fixedOverflowWidgets?{fitsAbove:C,aboveTop:Math.max(h,_),fitsBelow:w,belowTop:g,left:v}:{fitsAbove:C,aboveTop:a,fitsBelow:w,belowTop:l,left:m}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new qm(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){var t,i;const n=a(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),s=((t=this._secondaryAnchor.viewPosition)===null||t===void 0?void 0:t.lineNumber)===((i=this._primaryAnchor.viewPosition)===null||i===void 0?void 0:i.lineNumber)?this._secondaryAnchor.viewPosition:null,r=a(s,this._affinity,this._lineHeight);return{primary:n,secondary:r};function a(l,d,c){if(!l)return null;const u=e.visibleRangeForPosition(l);if(!u)return null;const h=l.column===1&&d===3?0:u.left,g=e.getVerticalOffsetForLineNumber(l.lineNumber)-e.scrollTop;return new y4(g,h,c)}}_reduceAnchorCoordinates(e,t,i){if(!t)return e;const n=this._context.configuration.options.get(50);let s=t.left;return se.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&cx(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&cx(this._actual.afterRender,this._actual,this._renderData.position)}}class Km{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class qm{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class y4{constructor(e,t,i){this.top=e,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function cx(o,e,...t){try{return o.call(e,...t)}catch{return null}}class cB extends Ag{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(143);this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new Re(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=this._selections.map(n=>n.positionLineNumber);t.sort((n,s)=>n-s),Bi(this._cursorLineNumbers,t)||(this._cursorLineNumbers=t,e=!0);const i=this._selections.every(n=>n.isEmpty());return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(143);return this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return this._renderLineHighlightOnlyWhenFocus?(this._focused=e.isFocused,!0):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._cursorLineNumbers.length;let r=0;const a=[];for(let l=i;l<=n;l++){const d=l-i;for(;r=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class mse extends cB{_renderOne(e){return`
`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class _se extends cB{_renderOne(e){return`
`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}Zr((o,e)=>{const t=o.getColor(Z8);if(t&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${t}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)),!t||t.isTransparent()||o.defines(_4)){const i=o.getColor(_4);i&&(e.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),xa(o.type)&&(e.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});class vse extends Ag{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let l=0,d=t.length;l{if(l.options.zIndexd.options.zIndex)return 1;const c=l.options.className,u=d.options.className;return cu?1:k.compareRangesUsingStarts(l.range,d.range)});const s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,a=[];for(let l=s;l<=r;l++){const d=l-s;a[d]=""}this._renderWholeLineDecorations(e,i,a),this._renderNormalDecorations(e,i,a),this._renderResult=a}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber;for(let a=0,l=t.length;a',u=Math.max(d.range.startLineNumber,s),h=Math.min(d.range.endLineNumber,r);for(let g=u;g<=h;g++){const f=g-s;i[f]+=c}}}_renderNormalDecorations(e,t,i){var n;const s=String(this._lineHeight),r=e.visibleRange.startLineNumber;let a=null,l=!1,d=null,c=!1;for(let u=0,h=t.length;u';l[g]+=b}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class bse extends wo{constructor(e,t,i,n){super(e);const s=this._context.configuration.options,r=s.get(102),a=s.get(74),l=s.get(40),d=s.get(105),c={listenOnDomNode:i.domNode,className:"editor-scrollable "+dE(e.theme.type),useShadows:!1,lazyRender:!0,vertical:r.vertical,horizontal:r.horizontal,verticalHasArrows:r.verticalHasArrows,horizontalHasArrows:r.horizontalHasArrows,verticalScrollbarSize:r.verticalScrollbarSize,verticalSliderSize:r.verticalSliderSize,horizontalScrollbarSize:r.horizontalScrollbarSize,horizontalSliderSize:r.horizontalSliderSize,handleMouseWheel:r.handleMouseWheel,alwaysConsumeMouseWheel:r.alwaysConsumeMouseWheel,arrowSize:r.arrowSize,mouseWheelScrollSensitivity:a,fastScrollSensitivity:l,scrollPredominantAxis:d,scrollByPage:r.scrollByPage};this.scrollbar=this._register(new Vy(t.domNode,c,this._context.viewLayout.getScrollable())),Fl.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=Ht(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const u=(h,g,f)=>{const m={};{const v=h.scrollTop;v&&(m.scrollTop=this._context.viewLayout.getCurrentScrollTop()+v,h.scrollTop=0)}if(f){const v=h.scrollLeft;v&&(m.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+v,h.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(m,1)};this._register(J(i.domNode,"scroll",h=>u(i.domNode,!0,!0))),this._register(J(t.domNode,"scroll",h=>u(t.domNode,!0,!1))),this._register(J(n.domNode,"scroll",h=>u(n.domNode,!0,!1))),this._register(J(this.scrollbarDomNode.domNode,"scroll",h=>u(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(143);this.scrollbarDomNode.setLeft(t.contentLeft),e.get(72).side==="right"?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(102)||e.hasChanged(74)||e.hasChanged(40)){const t=this._context.configuration.options,i=t.get(102),n=t.get(74),s=t.get(40),r=t.get(105),a={vertical:i.vertical,horizontal:i.horizontal,verticalScrollbarSize:i.verticalScrollbarSize,horizontalScrollbarSize:i.horizontalScrollbarSize,scrollByPage:i.scrollByPage,handleMouseWheel:i.handleMouseWheel,mouseWheelScrollSensitivity:n,fastScrollSensitivity:s,scrollPredominantAxis:r};this.scrollbar.updateOptions(a)}return e.hasChanged(143)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+dE(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}class uB extends q{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function jy(o,e){let t=0,i=0;const n=o.length;for(;in)throw new Ci("Illegal value for lineNumber");const s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=!!(s&&s.offSide);let a=-2,l=-1,d=-2,c=-1;const u=y=>{if(a!==-1&&(a===-2||a>y-1)){a=-1,l=-1;for(let I=y-2;I>=0;I--){const E=this._computeIndentLevel(I);if(E>=0){a=I,l=E;break}}}if(d===-2){d=-1,c=-1;for(let I=y;I=0){d=I,c=E;break}}}};let h=-2,g=-1,f=-2,m=-1;const v=y=>{if(h===-2){h=-1,g=-1;for(let I=y-2;I>=0;I--){const E=this._computeIndentLevel(I);if(E>=0){h=I,g=E;break}}}if(f!==-1&&(f===-2||f=0){f=I,m=E;break}}}};let _=0,b=!0,C=0,w=!0,S=0,x=0;for(let y=0;b||w;y++){const I=e-y,E=e+y;y>1&&(I<1||I1&&(E>n||E>i)&&(w=!1),y>5e4&&(b=!1,w=!1);let R=-1;if(b&&I>=1){const O=this._computeIndentLevel(I-1);O>=0?(d=I-1,c=O,R=Math.ceil(O/this.textModel.getOptions().indentSize)):(u(I),R=this._getIndentLevelForWhitespaceLine(r,l,c))}let j=-1;if(w&&E<=n){const O=this._computeIndentLevel(E-1);O>=0?(h=E-1,g=O,j=Math.ceil(O/this.textModel.getOptions().indentSize)):(v(E),j=this._getIndentLevelForWhitespaceLine(r,g,m))}if(y===0){x=R;continue}if(y===1){if(E<=n&&j>=0&&x+1===j){b=!1,_=E,C=E,S=j;continue}if(I>=1&&R>=0&&R-1===x){w=!1,_=I,C=I,S=R;continue}if(_=e,C=e,S=x,S===0)return{startLineNumber:_,endLineNumber:C,indent:S}}b&&(R>=S?_=I:b=!1),w&&(j>=S?C=E:w=!1)}return{startLineNumber:_,endLineNumber:C,indent:S}}getLinesBracketGuides(e,t,i,n){var s;const r=[];for(let h=e;h<=t;h++)r.push([]);const a=!0,l=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new k(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let d;if(i&&l.length>0){const h=(e<=i.lineNumber&&i.lineNumber<=t?l:this.textModel.bracketPairs.getBracketPairsInRange(k.fromPositions(i)).toArray()).filter(g=>k.strictContainsPosition(g.range,i));d=(s=Nv(h,g=>a))===null||s===void 0?void 0:s.range}const c=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,u=new hB;for(const h of l){if(!h.closingBracketRange)continue;const g=d&&h.range.equalsRange(d);if(!g&&!n.includeInactive)continue;const f=u.getInlineClassName(h.nestingLevel,h.nestingLevelOfEqualBracketType,c)+(n.highlightActive&&g?" "+u.activeClassName:""),m=h.openingBracketRange.getStartPosition(),v=h.closingBracketRange.getStartPosition(),_=n.horizontalGuides===Hh.Enabled||n.horizontalGuides===Hh.EnabledForActive&&g;if(h.range.startLineNumber===h.range.endLineNumber){_&&r[h.range.startLineNumber-e].push(new Mh(-1,h.openingBracketRange.getEndPosition().column,f,new $_(!1,v.column),-1,-1));continue}const b=this.getVisibleColumnFromPosition(v),C=this.getVisibleColumnFromPosition(h.openingBracketRange.getStartPosition()),w=Math.min(C,b,h.minVisibleColumnIndentation+1);let S=!1;Cs(this.textModel.getLineContent(h.closingBracketRange.startLineNumber))=e&&C>w&&r[m.lineNumber-e].push(new Mh(w,-1,f,new $_(!1,m.column),-1,-1)),v.lineNumber<=t&&b>w&&r[v.lineNumber-e].push(new Mh(w,-1,f,new $_(!S,v.column),-1,-1)))}for(const h of r)h.sort((g,f)=>g.visibleColumn-f.visibleColumn);return r}getVisibleColumnFromPosition(e){return mn.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=this.textModel.getOptions(),s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=!!(s&&s.offSide),a=new Array(t-e+1);let l=-2,d=-1,c=-2,u=-1;for(let h=e;h<=t;h++){const g=h-e,f=this._computeIndentLevel(h-1);if(f>=0){l=h-1,d=f,a[g]=Math.ceil(f/n.indentSize);continue}if(l===-2){l=-1,d=-1;for(let m=h-2;m>=0;m--){const v=this._computeIndentLevel(m);if(v>=0){l=m,d=v;break}}}if(c!==-1&&(c===-2||c=0){c=m,u=v;break}}}a[g]=this._getIndentLevelForWhitespaceLine(r,d,u)}return a}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return t===-1||i===-1?0:tl||this._maxIndentLeft>0&&C>this._maxIndentLeft)break;const w=b.horizontalLine?b.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",S=b.horizontalLine?((s=(n=e.visibleRangeForPosition(new z(g,b.horizontalLine.endColumn)))===null||n===void 0?void 0:n.left)!==null&&s!==void 0?s:C+this._spaceWidth)-C:this._spaceWidth;v+=`
`}h[f]=v}this._renderResult=h}getGuidesByLine(e,t,i){const n=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?Hh.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?Hh.EnabledForActive:Hh.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,s=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let r=0,a=0,l=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&i){const u=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);r=u.startLineNumber,a=u.endLineNumber,l=u.indent}const{indentSize:d}=this._context.viewModel.model.getOptions(),c=[];for(let u=e;u<=t;u++){const h=new Array;c.push(h);const g=n?n[u-e]:[],f=new Hd(g),m=s?s[u-e]:0;for(let v=1;v<=m;v++){const _=(v-1)*d+1,b=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||g.length===0)&&r<=u&&u<=a&&v===l;h.push(...f.takeWhile(w=>w.visibleColumn<_)||[]);const C=f.peek();(!C||C.visibleColumn!==_||C.horizontalLine)&&h.push(new Mh(_,-1,`core-guide-indent lvl-${(v-1)%30}`+(b?" indent-active":""),null,-1,-1))}h.push(...f.takeWhile(v=>!0)||[])}return c}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function ef(o){if(!(o&&o.isTransparent()))return o}Zr((o,e)=>{const t=[{bracketColor:Q8,guideColor:Mne,guideColorActive:Bne},{bracketColor:J8,guideColor:Ane,guideColorActive:Wne},{bracketColor:eB,guideColor:Rne,guideColorActive:Vne},{bracketColor:tB,guideColor:Pne,guideColorActive:Hne},{bracketColor:iB,guideColor:One,guideColorActive:zne},{bracketColor:nB,guideColor:Fne,guideColorActive:$ne}],i=new hB,n=[{indentColor:l0,indentColorActive:d0},{indentColor:fne,indentColorActive:bne},{indentColor:pne,indentColorActive:Cne},{indentColor:mne,indentColorActive:wne},{indentColor:_ne,indentColorActive:Sne},{indentColor:vne,indentColorActive:yne}],s=t.map(a=>{var l,d;const c=o.getColor(a.bracketColor),u=o.getColor(a.guideColor),h=o.getColor(a.guideColorActive),g=ef((l=ef(u))!==null&&l!==void 0?l:c==null?void 0:c.transparent(.3)),f=ef((d=ef(h))!==null&&d!==void 0?d:c);if(!(!g||!f))return{guideColor:g,guideColorActive:f}}).filter(mv),r=n.map(a=>{const l=o.getColor(a.indentColor),d=o.getColor(a.indentColorActive),c=ef(l),u=ef(d);if(!(!c||!u))return{indentColor:c,indentColorActive:u}}).filter(mv);if(s.length>0){for(let a=0;a<30;a++){const l=s[a%s.length];e.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(a).replace(/ /g,".")} { --guide-color: ${l.guideColor}; --guide-color-active: ${l.guideColorActive}; }`)}e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),e.addRule(`.monaco-editor .vertical.${i.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${i.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${i.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(r.length>0){for(let a=0;a<30;a++){const l=r[a%r.length];e.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${a} { --indent-color: ${l.indentColor}; --indent-color-active: ${l.indentColorActive}; }`)}e.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),e.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}});class ux{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class Sse{constructor(){this._currentVisibleRange=new k(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class yse{constructor(e,t,i,n,s,r,a){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=s,this.stopScrollTop=r,this.scrollType=a,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class Lse{constructor(e,t,i,n,s){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=s,this.type="selections";let r=t[0].startLineNumber,a=t[0].endLineNumber;for(let l=1,d=t.length;l{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new Yt(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new Sse,this._horizontalRevealRequest=null,this._stickyScrollEnabled=n.get(114).enabled,this._maxNumberStickyLines=n.get(114).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new al(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(144)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(50),n=t.get(144);return this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(99),this._cursorSurroundingLines=t.get(29),this._cursorSurroundingLinesStyle=t.get(30),this._canUseLayerHinting=!t.get(32),this._stickyScrollEnabled=t.get(114).enabled,this._maxNumberStickyLines=t.get(114).maxLineCount,Jn(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(143)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new h4(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)this._visibleLines.getVisibleLine(s).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let s=t;s<=i;s++)n=this._visibleLines.getVisibleLine(s).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)this._visibleLines.getVisibleLine(n).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(t===-1)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new yse(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new Lse(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const s=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,s),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(i===null)return null;const n=this._getLineNumberFor(i);if(n===-1||n<1||n>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(n)===1)return new z(n,1);const s=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(nr)return null;let a=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e,t);const l=this._context.viewModel.getLineMinColumn(n);return ai)return-1;const n=new ux(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getWidth(n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=k.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;const s=[];let r=0;const a=new ux(this.domNode.domNode,this._textRangeRestingSpot);let l=0;t&&(l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new z(n.startLineNumber,1)).lineNumber);const d=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let u=n.startLineNumber;u<=n.endLineNumber;u++){if(uc)continue;const h=u===n.startLineNumber?n.startColumn:1,g=u!==n.endLineNumber,f=g?this._context.viewModel.getLineMaxColumn(u):n.endColumn,m=this._visibleLines.getVisibleLine(u).getVisibleRangesForRange(u,h,f,a);if(m){if(t&&uthis._visibleLines.getEndLineNumber())return null;const n=new ux(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new Pie(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,s=!0;for(let r=t;r<=i;r++){const a=this._visibleLines.getVisibleLine(r);if(e&&!a.getWidthIsFast()){s=!1;continue}n=Math.max(n,a.getWidth(null))}return s&&t===1&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),s}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++){const r=this._visibleLines.getVisibleLine(s);if(r.needsMonospaceFontCheck()){const a=r.getWidth(null);a>t&&(t=a,e=s)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let s=i;s<=n;s++)this._visibleLines.getVisibleLine(s).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const i=this._horizontalRevealRequest;if(e.startLineNumber<=i.minLineNumber&&i.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const n=this._computeScrollLeftToReveal(i);n&&(this._isViewportWrapping||this._ensureMaxLineWidth(n.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:n.scrollLeft},i.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),ws&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)if(this._visibleLines.getVisibleLine(s).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let _=s[0].startLineNumber,b=s[0].endLineNumber;for(let C=1,w=s.length;Cl){if(!c)return-1;v=u}else if(r===5||r===6)if(r===6&&a<=u&&h<=d)v=a;else{const _=Math.max(5*this._lineHeight,l*.2),b=u-_,C=h-l;v=Math.max(C,b)}else if(r===1||r===2)if(r===2&&a<=u&&h<=d)v=a;else{const _=(u+h)/2;v=Math.max(0,_-l/2)}else v=this._computeMinimumScrolling(a,d,u,h,r===3,r===4);return v}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(143),n=t.left,s=n+t.width-i.verticalScrollbarWidth;let r=1073741824,a=0;if(e.type==="range"){const d=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!d)return null;for(const c of d.ranges)r=Math.min(r,Math.round(c.left)),a=Math.max(a,Math.round(c.left+c.width))}else for(const d of e.selections){if(d.startLineNumber!==d.endLineNumber)return null;const c=this._visibleRangesForLineRange(d.startLineNumber,d.startColumn,d.endColumn);if(!c)return null;for(const u of c.ranges)r=Math.min(r,Math.round(u.left)),a=Math.max(a,Math.round(u.left+u.width))}return e.minimalReveal||(r=Math.max(0,r-Ky.HORIZONTAL_EXTRA_PX),a+=this._revealHorizontalRightPadding),e.type==="selections"&&a-r>t.width?null:{scrollLeft:this._computeMinimumScrolling(n,s,r,a),maxHorizontalOffset:a}}_computeMinimumScrolling(e,t,i,n,s,r){e=e|0,t=t|0,i=i|0,n=n|0,s=!!s,r=!!r;const a=t-e;if(n-it)return Math.max(0,n-a)}else return i;return e}}Ky.HORIZONTAL_EXTRA_PX=30;class hE{constructor(e,t,i,n){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i),this.zIndex=n??0}}class Dse{constructor(e,t){this.className=e,this.zIndex=t}}class xse{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class gB extends Ag{_render(e,t,i){const n=[];for(let a=e;a<=t;a++){const l=a-e;n[l]=new xse}if(i.length===0)return n;i.sort((a,l)=>a.className===l.className?a.startLineNumber===l.startLineNumber?a.endLineNumber-l.endLineNumber:a.startLineNumber-l.startLineNumber:a.classNamen)continue;const d=Math.max(a,i),c=Math.min(s.preference.lane,this._glyphMarginDecorationLaneCount);t.push(new Ese(d,c,s.preference.zIndex,s))}}_collectSortedGlyphRenderRequests(e){const t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort((i,n)=>i.lineNumber===n.lineNumber?i.lane===n.lane?i.zIndex===n.zIndex?n.type===i.type?i.type===0&&n.type===0?i.className0;){const n=t.peek();if(!n)break;const s=t.takeWhile(a=>a.lineNumber===n.lineNumber&&a.lane===n.lane);if(!s||s.length===0)break;const r=s[0];if(r.type===0){const a=[];for(const l of s){if(l.zIndex!==r.zIndex||l.type!==r.type)break;(a.length===0||a[a.length-1]!==l.className)&&a.push(l.className)}i.push(r.accept(a.join(" ")))}else r.widget.renderInfo={lineNumber:r.lineNumber,lane:r.lane}}this._decorationGlyphsToRender=i}render(e){if(!this._glyphMargin){for(const i of Object.values(this._widgets))i.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const i=this._managedDomNodes.pop();i==null||i.domNode.remove()}return}const t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const i of Object.values(this._widgets))if(!i.renderInfo)i.domNode.setDisplay("none");else{const n=e.viewportData.relativeVerticalOffset[i.renderInfo.lineNumber-e.viewportData.startLineNumber],s=this._glyphMarginLeft+(i.renderInfo.lane-1)*this._lineHeight;i.domNode.setDisplay("block"),i.domNode.setTop(n),i.domNode.setLeft(s),i.domNode.setWidth(t),i.domNode.setHeight(this._lineHeight)}for(let i=0;ithis._decorationGlyphsToRender.length;){const i=this._managedDomNodes.pop();i==null||i.domNode.remove()}}}class Ise{constructor(e,t,i,n){this.lineNumber=e,this.lane=t,this.zIndex=i,this.className=n,this.type=0}accept(e){return new Nse(this.lineNumber,this.lane,e)}}class Ese{constructor(e,t,i,n){this.lineNumber=e,this.lane=t,this.zIndex=i,this.widget=n,this.type=1}}class Nse{constructor(e,t,i){this.lineNumber=e,this.lane=t,this.combinedClassName=i}}class Tse extends gB{constructor(e){super(),this._context=e;const i=this._context.configuration.options.get(143);this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options.get(143);return this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let s=0,r=t.length;s',l=[];for(let d=t;d<=i;d++){const c=d-t,u=n[c].getDecorations();let h="";for(const g of u)h+='
';s[a]=d}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}class dr{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=dr._clamp(e),this.g=dr._clamp(t),this.b=dr._clamp(i),this.a=dr._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:e|0}}dr.Empty=new dr(0,0,0,0);class u0 extends q{static getInstance(){return this._INSTANCE||(this._INSTANCE=new u0),this._INSTANCE}constructor(){super(),this._onDidChange=new W,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Ei.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){const e=Ei.getColorMap();if(!e){this._colors=[dr.Empty],this._backgroundIsLight=!0;return}this._colors=[dr.Empty];for(let i=1;i=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}u0._INSTANCE=null;const Ase=(()=>{const o=[];for(let e=32;e<=126;e++)o.push(e);return o.push(65533),o})(),Rse=(o,e)=>(o-=32,o<0||o>96?e<=2?(o+96)%96:95:o);class Uv{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=Uv.soften(e,12/15),this.charDataLight=Uv.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,s=e.length;ne.width||i+f>e.height){console.warn("bad render request outside image data");return}const m=c?this.charDataLight:this.charDataNormal,v=Rse(n,d),_=e.width*4,b=a.r,C=a.g,w=a.b,S=s.r-b,x=s.g-C,y=s.b-w,I=Math.max(r,l),E=e.data;let R=v*h*g,j=i*_+t*4;for(let O=0;Oe.width||i+u>e.height){console.warn("bad render request outside image data");return}const h=e.width*4,g=.5*(s/255),f=r.r,m=r.g,v=r.b,_=n.r-f,b=n.g-m,C=n.b-v,w=f+_*g,S=m+b*g,x=v+C*g,y=Math.max(s,a),I=e.data;let E=i*h+t*4;for(let R=0;R{const e=new Uint8ClampedArray(o.length/2);for(let t=0;t>1]=L4[o[t]]<<4|L4[o[t+1]]&15;return e},x4={1:su(()=>D4("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:su(()=>D4("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class U_{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return x4[e]?i=new Uv(x4[e](),e):i=U_.createFromSampleData(U_.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=96*10,t.style.width=96*10+"px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const s of Ase)i.fillText(String.fromCharCode(s),n,16/2),n+=10;return i.getImageData(0,0,96*10,16)}static createFromSampleData(e,t){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const n=U_._downsample(e,t);return new Uv(n,t)}static _downsampleChar(e,t,i,n,s){const r=1*s,a=2*s;let l=n,d=0;for(let c=0;c0){const d=255/l;for(let c=0;cU_.create(this.fontScale,l.fontFamily)),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=jv._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=jv._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(vie);return i?new dr(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(bie);return t?dr._clamp(Math.round(255*t.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class j_{constructor(e,t,i,n,s,r,a,l,d){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=s,this.sliderHeight=r,this.topPaddingLineCount=a,this.startLineNumber=l,this.endLineNumber=d}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const t=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumber,e.endLineNumber);return t>i?null:[t,i]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,i,n,s,r,a,l,d,c,u){const h=e.pixelRatio,g=e.minimapLineHeight,f=Math.floor(e.canvasInnerHeight/g),m=e.lineHeight;if(e.minimapHeightIsEditorHeight){let x=l*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(x+=Math.max(0,s-e.lineHeight-e.paddingBottom));const y=Math.max(1,Math.floor(s*s/x)),I=Math.max(0,e.minimapHeight-y),E=I/(c-s),R=d*E,j=I>0,O=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),$=Math.floor(e.paddingTop/e.lineHeight);return new j_(d,c,j,E,R,y,$,1,Math.min(a,O))}let v;if(r&&i!==a){const x=i-t+1;v=Math.floor(x*g/h)}else{const x=s/m;v=Math.floor(x*g/h)}const _=Math.floor(e.paddingTop/m);let b=Math.floor(e.paddingBottom/m);if(e.scrollBeyondLastLine){const x=s/m;b=Math.max(b,x-1)}let C;if(b>0){const x=s/m;C=(_+a+b-x-1)*g/h}else C=Math.max(0,(_+a)*g/h-v);C=Math.min(e.minimapHeight-v,C);const w=C/(c-s),S=d*w;if(f>=_+a+b){const x=C>0;return new j_(d,c,x,w,S,v,_,1,a)}else{let x;t>1?x=t+_:x=Math.max(1,d/m);let y,I=Math.max(1,Math.floor(x-S*h/g));I<_?(y=_-I+1,I=1):(y=0,I=Math.max(1,I-_)),u&&u.scrollHeight===c&&(u.scrollTop>d&&(I=Math.min(I,u.startLineNumber),y=Math.max(y,u.topPaddingLineCount)),u.scrollTop=e.paddingTop?j=(t-I+y+R)*g/h:j=d/e.paddingTop*(y+R)*g/h,new j_(d,c,!0,w,j,v,y,I,E)}}}class Tw{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}Tw.INVALID=new Tw(-1);class k4{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new aB(()=>Tw.INVALID),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const i=this._renderedLines._get().lines;for(let n=0,s=i.length;n1){for(let _=0,b=n-1;_0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let s=this.minimapLines.length-1;s>=0&&!(this.minimapLines[s]=0&&!(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=!!this._samplingState,[t,i]=Kv.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const n of i)switch(n.type){case"deleted":this._actual.onLinesDeleted(n.deleteFromLineNumber,n.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(n.insertFromLineNumber,n.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){const n=[];for(let s=0,r=t-e+1;s{if(i.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(i.button===0&&this._lastRenderData){const d=gn(this._slider.domNode),c=d.top+d.height/2;this._startSliderDragging(i,c,this._lastRenderData.renderedLayout)}return}const s=this._model.options.minimapLineHeight,r=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*i.offsetY;let l=Math.floor(r/s)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;l=Math.min(l,this._model.getLineCount()),this._model.revealLineNumber(l)}),this._sliderPointerMoveMonitor=new vm,this._sliderPointerDownListener=Wi(this._slider.domNode,Se.POINTER_DOWN,i=>{i.preventDefault(),i.stopPropagation(),i.button===0&&this._lastRenderData&&this._startSliderDragging(i,i.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=ei.addTarget(this._domNode.domNode),this._sliderTouchStartListener=J(this._domNode.domNode,ni.Start,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(i))},{passive:!1}),this._sliderTouchMoveListener=J(this._domNode.domNode,ni.Change,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(i)},{passive:!1}),this._sliderTouchEndListener=Wi(this._domNode.domNode,ni.End,i=>{i.preventDefault(),i.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,i){if(!e.target||!(e.target instanceof Element))return;const n=e.pageX;this._slider.toggleClassName("active",!0);const s=(r,a)=>{const l=gn(this._domNode.domNode),d=Math.min(Math.abs(a-n),Math.abs(a-l.left),Math.abs(a-l.left-l.width));if(is&&d>Pse){this._model.setScrollTop(i.scrollTop);return}const c=r-t;this._model.setScrollTop(i.getDesiredScrollTopFromDelta(c))};e.pageY!==t&&s(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>s(r.pageY,r.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return this._model.options.showSlider==="always"?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new sA(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return this._lastRenderData?this._lastRenderData.onLinesChanged(e,t):!1}onLinesDeleted(e,t){var i;return(i=this._lastRenderData)===null||i===void 0||i.onLinesDeleted(e,t),!0}onLinesInserted(e,t){var i;return(i=this._lastRenderData)===null||i===void 0||i.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(l4),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const i=j_.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(i.sliderNeeded?"block":"none"),this._slider.setTop(i.sliderTop),this._slider.setHeight(i.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(i.sliderHeight),this.renderDecorations(i),this._lastRenderData=this.renderLines(i)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(k.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort((h,g)=>(h.options.zIndex||0)-(g.options.zIndex||0));const{canvasInnerWidth:n,canvasInnerHeight:s}=this._model.options,r=this._model.options.minimapLineHeight,a=this._model.options.minimapCharWidth,l=this._model.getOptions().tabSize,d=this._decorationsCanvas.domNode.getContext("2d");d.clearRect(0,0,n,s);const c=new I4(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(d,t,c,e,r),this._renderDecorationsLineHighlights(d,i,c,e,r);const u=new I4(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(d,t,u,e,r,l,a,n),this._renderDecorationsHighlights(d,i,u,e,r,l,a,n)}}_renderSelectionLineHighlights(e,t,i,n,s){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let r=0,a=0;for(const l of t){const d=n.intersectWithViewport(l);if(!d)continue;const[c,u]=d;for(let f=c;f<=u;f++)i.set(f,!0);const h=n.getYForLineNumber(c,s),g=n.getYForLineNumber(u,s);a>=h||(a>r&&e.fillRect(lc,r,e.canvas.width,a-r),r=h),a=g}a>r&&e.fillRect(lc,r,e.canvas.width,a-r)}_renderDecorationsLineHighlights(e,t,i,n,s){const r=new Map;for(let a=t.length-1;a>=0;a--){const l=t[a],d=l.options.minimap;if(!d||d.position!==uo.Inline)continue;const c=n.intersectWithViewport(l.range);if(!c)continue;const[u,h]=c,g=d.getColor(this._theme.value);if(!g||g.isTransparent())continue;let f=r.get(g.toString());f||(f=g.transparent(.5).toString(),r.set(g.toString(),f)),e.fillStyle=f;for(let m=u;m<=h;m++){if(i.has(m))continue;i.set(m,!0);const v=n.getYForLineNumber(u,s);e.fillRect(lc,v,e.canvas.width,s)}}}_renderSelectionsHighlights(e,t,i,n,s,r,a,l){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const d of t){const c=n.intersectWithViewport(d);if(!c)continue;const[u,h]=c;for(let g=u;g<=h;g++)this.renderDecorationOnLine(e,i,d,this._selectionColor,n,g,s,s,r,a,l)}}_renderDecorationsHighlights(e,t,i,n,s,r,a,l){for(const d of t){const c=d.options.minimap;if(!c)continue;const u=n.intersectWithViewport(d.range);if(!u)continue;const[h,g]=u,f=c.getColor(this._theme.value);if(!(!f||f.isTransparent()))for(let m=h;m<=g;m++)switch(c.position){case uo.Inline:this.renderDecorationOnLine(e,i,d.range,f,n,m,s,s,r,a,l);continue;case uo.Gutter:{const v=n.getYForLineNumber(m,s);this.renderDecoration(e,f,2,v,Ose,s);continue}}}}renderDecorationOnLine(e,t,i,n,s,r,a,l,d,c,u){const h=s.getYForLineNumber(r,l);if(h+a<0||h>this._model.options.canvasInnerHeight)return;const{startLineNumber:g,endLineNumber:f}=i,m=g===r?i.startColumn:1,v=f===r?i.endColumn:this._model.getLineMaxColumn(r),_=this.getXOffsetForPosition(t,r,m,d,c,u),b=this.getXOffsetForPosition(t,r,v,d,c,u);this.renderDecoration(e,n,_,h,b-_,a)}getXOffsetForPosition(e,t,i,n,s,r){if(i===1)return lc;if((i-1)*s>=r)return r;let l=e.get(t);if(!l){const d=this._model.getLineContent(t);l=[lc];let c=lc;for(let u=1;u=r){l[u]=r;break}l[u]=f,c=f}e.set(t,l)}return i-1S?Math.floor((n-S)/2):0,y=h.a/255,I=new dr(Math.round((h.r-u.r)*y+u.r),Math.round((h.g-u.g)*y+u.g),Math.round((h.b-u.b)*y+u.b),255);let E=e.topPaddingLineCount*n;const R=[];for(let oe=0,Le=i-t+1;oe=0&&jb)return;const O=v.charCodeAt(S);if(O===9){const $=h-(S+x)%h;x+=$-1,w+=$*r}else if(O===32)w+=r;else{const $=ou(O)?2:1;for(let K=0;K<$;K++)if(s===2?d.blockRenderChar(e,w,c+u,j,l,t,i,C):d.renderChar(e,w,c+u,O,j,l,t,i,f,n,C),w+=r,w>b)return}}}}}class I4{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let n=0,s=this._endLineNumber-this._startLineNumber+1;nthis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}class Bse extends wo{constructor(e){super(e);const i=this._context.configuration.options.get(143);this._widgets={},this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,this._domNode=Ht(document.createElement("div")),Fl.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const i=this._context.configuration.options.get(143);return this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,!0}addWidget(e){const t=Ht(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference===t?(this._updateMaxMinWidth(),!1):(i.preference=t,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const n=this._widgets[t].domNode.domNode;delete this._widgets[t],n.parentNode.removeChild(n),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var e,t;let i=0;const n=Object.keys(this._widgets);for(let s=0,r=n.length;s=3){const s=Math.floor(n/3),r=Math.floor(n/3),a=n-s-r,l=e,d=l+s,c=l+s+a;return[[0,l,d,l,c,l,d,l],[0,s,a,s+a,r,s+a+r,a+r,s+a+r]]}else if(i===2){const s=Math.floor(n/2),r=n-s,a=e,l=a+s;return[[0,a,a,a,l,a,a,a],[0,s,s,s,r,s+r,s+r,s+r]]}else{const s=e,r=n;return[[0,s,s,s,s,s,s,s],[0,r,r,r,r,r,r,r]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&Y.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class Vse extends wo{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=Ht(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Ei.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new Wse(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(t)?!1:(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;tf.lineNumber===m.lineNumber)&&(this._actualShouldRender=2),this._actualShouldRender===1)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const i=this._settings.canvasWidth,n=this._settings.canvasHeight,s=this._settings.lineHeight,r=this._context.viewLayout,a=this._context.viewLayout.getScrollHeight(),l=n/a,d=6*this._settings.pixelRatio|0,c=d/2|0,u=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(u.fillStyle=Y.Format.CSS.formatHexA(e),u.fillRect(0,0,i,n)):(u.clearRect(0,0,i,n),u.fillStyle=Y.Format.CSS.formatHexA(e),u.fillRect(0,0,i,n)):u.clearRect(0,0,i,n);const h=this._settings.x,g=this._settings.w;for(const f of t){const m=f.color,v=f.data;u.fillStyle=m;let _=0,b=0,C=0;for(let w=0,S=v.length/3;wn&&(O=n-c),E=O-c,R=O+c}E>C+1||x!==_?(w!==0&&u.fillRect(h[_],b,g[_],C-b),_=x,b=E,C=R):R>C&&(C=R)}u.fillRect(h[_],b,g[_],C-b)}if(!this._settings.hideCursor&&this._settings.cursorColor){const f=2*this._settings.pixelRatio|0,m=f/2|0,v=this._settings.x[7],_=this._settings.w[7];u.fillStyle=this._settings.cursorColor;let b=-100,C=-100;for(let w=0,S=this._cursorPositions.length;wn&&(y=n-m);const I=y-m,E=I+f;I>C+1?(w!==0&&u.fillRect(v,b,_,C-b),b=I,C=E):E>C&&(C=E)}u.fillRect(v,b,_,C-b)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(u.beginPath(),u.lineWidth=1,u.strokeStyle=this._settings.borderColor,u.moveTo(0,0),u.lineTo(0,n),u.stroke(),u.moveTo(0,0),u.lineTo(i,0),u.stroke())}}class E4{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=e|0,this.to=t|0,this.colorId=i|0}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class fB{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colori&&(m=i-v);const _=c.color;let b=this._color2Id[_];b||(b=++this._lastAssignedId,this._color2Id[_]=b,this._id2Color[b]=_);const C=new E4(m-v,m+v,b);c.setColorZone(C),a.push(C)}return this._colorZonesInvalid=!1,a.sort(E4.compare),a}}class zse extends r0{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=Ht(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new Hse(n=>this._context.viewLayout.getVerticalOffsetForLineNumber(n)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(66)),this._zoneManager.setPixelRatio(i.get(141)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(66)&&(this._zoneManager.setLineHeight(t.get(66)),this._render()),e.hasChanged(141)&&(this._zoneManager.setPixelRatio(t.get(141)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(s,i,n,e),!0}_renderOneLane(e,t,i,n){let s=0,r=0,a=0;for(const l of t){const d=l.colorId,c=l.from,u=l.to;d!==s?(e.fillRect(0,r,n,a-r),s=d,e.fillStyle=i[s],r=c,a=u):a>=c?a=Math.max(a,u):(e.fillRect(0,r,n,a-r),r=c,a=u)}e.fillRect(0,r,n,a-r)}}class $se extends wo{constructor(e){super(e),this.domNode=Ht(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const a=Ht(document.createElement("div"));a.setClassName("view-ruler"),a.setWidth(s),this.domNode.appendChild(a),this._renderedRulers.push(a),r--}return}let i=e-t;for(;i>0;){const n=this._renderedRulers.pop();this.domNode.removeChild(n),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const t=this._context.configuration.options.get(143);t.minimap.renderMinimap===0||t.minimap.minimapWidth>0&&t.minimap.minimapLeft===0?this._width=t.width:this._width=t.width-t.verticalScrollbarWidth}onConfigurationChanged(e){const i=this._context.configuration.options.get(102);return this._useShadows=i.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}class jse{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class Kse{constructor(e,t){this.lineNumber=e,this.ranges=t}}function qse(o){return new jse(o)}function Gse(o){return new Kse(o.lineNumber,o.ranges.map(qse))}class $i extends Ag{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(66),this._roundedSelection=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(66),this._roundedSelection=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let s=null,r=null;if(i&&i.length>0&&t.length>0){const a=t[0].lineNumber;if(a===e.startLineNumber)for(let d=0;!s&&d=0;d--)i[d].lineNumber===l&&(r=i[d].ranges[0]);s&&!s.startStyle&&(s=null),r&&!r.startStyle&&(r=null)}for(let a=0,l=t.length;a0){const f=t[a-1].ranges[0].left,m=t[a-1].ranges[0].left+t[a-1].ranges[0].width;cC(c-f)f&&(h.top=1),cC(u-m)'}_actualRenderOneSelection(e,t,i,n){if(n.length===0)return;const s=!!n[0].ranges[0].startStyle,r=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),l=n[0].lineNumber,d=n[n.length-1].lineNumber;for(let c=0,u=n.length;c1,d)}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map(([r,a])=>r+a)}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}$i.SELECTION_CLASS_NAME="selected-text";$i.SELECTION_TOP_LEFT="top-left-radius";$i.SELECTION_BOTTOM_LEFT="bottom-left-radius";$i.SELECTION_TOP_RIGHT="top-right-radius";$i.SELECTION_BOTTOM_RIGHT="bottom-right-radius";$i.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background";$i.ROUNDED_PIECE_WIDTH=10;Zr((o,e)=>{const t=o.getColor(Lte);t&&!t.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${t}; }`)});function cC(o){return o<0?-o:o}class N4{constructor(e,t,i,n,s,r,a){this.top=e,this.left=t,this.paddingLeft=i,this.width=n,this.height=s,this.textContent=r,this.textContentClassName=a}}class T4{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(50);this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Ht(document.createElement("div")),this._domNode.setClassName(`cursor ${op}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),Jn(this._domNode,i),this._domNode.setDisplay("none"),this._position=new z(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),Jn(this._domNode,i),!0}onCursorPositionChanged(e,t){return t?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,s]=oY(i,t-1);return[new z(e,n+1),i.substring(n,s)]}_prepareRender(e){let t="",i="";const[n,s]=this._getGraphemeAwarePosition();if(this._cursorStyle===Vn.Line||this._cursorStyle===Vn.LineThin){const h=e.visibleRangeForPosition(n);if(!h||h.outsideRenderedLine)return null;const g=Je(this._domNode.domNode);let f;this._cursorStyle===Vn.Line?(f=aO(g,this._lineCursorWidth>0?this._lineCursorWidth:2),f>2&&(t=s,i=this._getTokenClassName(n))):f=aO(g,1);let m=h.left,v=0;f>=2&&m>=1&&(v=1,m-=v);const _=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta;return new N4(_,m,v,f,this._lineHeight,t,i)}const r=e.linesVisibleRangesForRange(new k(n.lineNumber,n.column,n.lineNumber,n.column+s.length),!1);if(!r||r.length===0)return null;const a=r[0];if(a.outsideRenderedLine||a.ranges.length===0)return null;const l=a.ranges[0],d=s===" "?this._typicalHalfwidthCharacterWidth:l.width<1?this._typicalHalfwidthCharacterWidth:l.width;this._cursorStyle===Vn.Block&&(t=s,i=this._getTokenClassName(n));let c=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,u=this._lineHeight;return(this._cursorStyle===Vn.Underline||this._cursorStyle===Vn.UnderlineThin)&&(c+=this._lineHeight-2,u=2),new N4(c,l.left,0,d,u,t,i)}_getTokenClassName(e){const t=this._context.viewModel.getViewLineData(e.lineNumber),i=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(i)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${op} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class qv extends wo{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new T4(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=Ht(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new qr,this._cursorFlatBlinkInterval=new kM,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let i=0,n=this._secondaryCursors.length;it.length){const s=this._secondaryCursors.length-t.length;for(let r=0;r{for(let n=0,s=e.ranges.length;n{this._isVisible?this._hide():this._show()},qv.BLINK_INTERVAL,Je(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},qv.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case Vn.Line:e+=" cursor-line-style";break;case Vn.Block:e+=" cursor-block-style";break;case Vn.Underline:e+=" cursor-underline-style";break;case Vn.LineThin:e+=" cursor-line-thin-style";break;case Vn.BlockOutline:e+=" cursor-block-outline-style";break;case Vn.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const t=o.getColor(Y8);if(t){let i=o.getColor(hne);i||(i=t.opposite()),e.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${t}; border-color: ${t}; color: ${i}; }`),xa(o.type)&&e.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${i}; border-right: 1px solid ${i}; }`)}});const hx=()=>{throw new Error("Invalid change accessor")};class Zse extends wo{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(143);this._lineHeight=t.get(66),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=Ht(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=Ht(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const n of e)t.set(n.id,n);let i=!1;return this._context.viewModel.changeWhitespace(n=>{const s=Object.keys(this._zones);for(let r=0,a=s.length;r{const n={addZone:s=>(t=!0,this._addZone(i,s)),removeZone:s=>{s&&(t=this._removeZone(i,s)||t)},layoutZone:s=>{s&&(t=this._layoutZone(i,s)||t)}};Yse(e,n),n.addZone=hx,n.removeZone=hx,n.layoutZone=hx}),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),s={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:Ht(t.domNode),marginDomNode:t.marginDomNode?Ht(t.marginDomNode):null};return this._safeCallOnComputedHeight(s.delegate,i.heightInPx),s.domNode.setPosition("absolute"),s.domNode.domNode.style.width="100%",s.domNode.setDisplay("none"),s.domNode.setAttribute("monaco-view-zone",s.whitespaceId),this.domNode.appendChild(s.domNode),s.marginDomNode&&(s.marginDomNode.setPosition("absolute"),s.marginDomNode.domNode.style.width="100%",s.marginDomNode.setDisplay("none"),s.marginDomNode.setAttribute("monaco-view-zone",s.whitespaceId),this.marginDomNode.appendChild(s.marginDomNode)),this._zones[s.whitespaceId]=s,this.setShouldRender(),s.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){return this._zones.hasOwnProperty(e)?!!this._zones[e].delegate.suppressMouseDown:!1}_heightInPixels(e){return typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(t)}catch(i){nt(i)}}_safeCallOnDomNodeTop(e,t){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(t)}catch(i){nt(i)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const r of t)this._zones[r.id].isInHiddenArea||(i[r.id]=r,n=!0);const s=Object.keys(this._zones);for(let r=0,a=s.length;ra)continue;const g=h.startLineNumber===a?h.startColumn:d.minColumn,f=h.endLineNumber===a?h.endColumn:d.maxColumn;g=R.endOffset&&(E++,R=i&&i[E]),$!==9&&$!==32||h&&!x&&O<=I)continue;if(u&&O>=y&&O<=I&&$===32){const oe=O-1>=0?a.charCodeAt(O-1):0,Le=O+1=0?a.charCodeAt(O-1):0;if($===32&&oe!==32&&oe!==9)continue}if(i&&(!R||R.startOffset>O||R.endOffset<=O))continue;const K=e.visibleRangeForPosition(new z(t,O+1));K&&(r?(j=Math.max(j,K.left),$===9?S+=this._renderArrow(g,v,K.left):S+=``):$===9?S+=`
${w?"→":"→"}
`:S+=`
${String.fromCharCode(C)}
`)}return r?(j=Math.round(j+v),``+S+""):S}_renderArrow(e,t,i){const n=t/7,s=t,r=e/2,a=i,l={x:0,y:n/2},d={x:100/125*s,y:l.y},c={x:d.x-.2*d.x,y:d.y+.2*d.x},u={x:c.x+.1*d.x,y:c.y+.1*d.x},h={x:u.x+.35*d.x,y:u.y-.35*d.x},g={x:h.x,y:-h.y},f={x:u.x,y:-u.y},m={x:c.x,y:-c.y},v={x:d.x,y:-d.y},_={x:l.x,y:-l.y};return``}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class M4{constructor(e){const t=e.options,i=t.get(50),n=t.get(38);n==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):n==="svg"?(this.renderWhitespace=t.get(98),this.renderWithSVG=!0):(this.renderWhitespace=t.get(98),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(66),this.stopRenderingLineAfter=t.get(116)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}var ioe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},noe=function(o,e){return function(t,i){e(t,i,o)}};let gE=class extends r0{constructor(e,t,i,n,s,r,a){super(),this._instantiationService=a,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new Re(1,1,1,1)],this._renderAnimationFrame=null;const l=new cse(t,n,s,e);this._context=new Qse(t,i,n),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(cE,this._context,l,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=Ht(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=Ht(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=Ht(document.createElement("div")),Fl.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new bse(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new Ky(this._context,this._linesContent),this._viewZones=new Zse(this._context),this._viewParts.push(this._viewZones);const d=new Vse(this._context);this._viewParts.push(d);const c=new Use(this._context);this._viewParts.push(c);const u=new hse(this._context);this._viewParts.push(u),u.addDynamicOverlay(new mse(this._context)),u.addDynamicOverlay(new $i(this._context)),u.addDynamicOverlay(new wse(this._context)),u.addDynamicOverlay(new vse(this._context)),u.addDynamicOverlay(new toe(this._context));const h=new gse(this._context);this._viewParts.push(h),h.addDynamicOverlay(new _se(this._context)),h.addDynamicOverlay(new Mse(this._context)),h.addDynamicOverlay(new Tse(this._context)),h.addDynamicOverlay(new c0(this._context)),this._glyphMarginWidgets=new kse(this._context),this._viewParts.push(this._glyphMarginWidgets);const g=new og(this._context);g.getDomNode().appendChild(this._viewZones.marginDomNode),g.getDomNode().appendChild(h.getDomNode()),g.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(g),this._contentWidgets=new fse(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new qv(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new Bse(this._context),this._viewParts.push(this._overlayWidgets);const f=new $se(this._context);this._viewParts.push(f);const m=new eoe(this._context);this._viewParts.push(m);const v=new Fse(this._context);if(this._viewParts.push(v),d){const _=this._scrollbar.getOverviewRulerLayoutInfo();_.parent.insertBefore(d.getDomNode(),_.insertBefore)}this._linesContent.appendChild(u.getDomNode()),this._linesContent.appendChild(f.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(g.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(c.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(v.getDomNode()),this._overflowGuardContainer.appendChild(m.domNode),this.domNode.appendChild(this._overflowGuardContainer),r?r.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new dne(this._context,l,this._createPointerHandlerHelper()))}_computeGlyphMarginLaneCount(){const e=this._context.viewModel.model;let t=[];t=t.concat(e.getAllMarginDecorations().map(s=>{var r,a;const l=(a=(r=s.options.glyphMargin)===null||r===void 0?void 0:r.position)!==null&&a!==void 0?a:Wh.Left;return{range:s.range,lane:l}})),t=t.concat(this._glyphMarginWidgets.getWidgets().map(s=>({range:e.validateRange(s.preference.range),lane:s.preference.lane}))),t.sort((s,r)=>k.compareRangesUsingStarts(s.range,r.range));let i=null,n=null;for(const s of t)if(s.lane===Wh.Left&&(!i||k.compareRangesUsingEnds(i,s.range)<0)&&(i=s.range),s.lane===Wh.Right&&(!n||k.compareRangesUsingEnds(n,s.range)<0)&&(n=s.range),i&&n){if(i.endLineNumber{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new Vie(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new z(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const t=this._context.configuration.options.get(143);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(140)+" "+dE(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new Ci;if(this._renderAnimationFrame===null){const e=this._createCoordinatedRendering();this._renderAnimationFrame=fE.INSTANCE.scheduleCoordinatedRendering({window:Je(this.domNode.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new Ci;try{return e.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new Ci;return e.renderText()},prepareRender:(t,i)=>{if(this._store.isDisposed)throw new Ci;return e.prepareRender(t,i)},render:(t,i)=>{if(this._store.isDisposed)throw new Ci;return e.render(t,i)}})}}_flushAccumulatedAndRenderNow(){const e=this._createCoordinatedRendering();Nc(()=>e.prepareRenderText());const t=Nc(()=>e.renderText());if(t){const[i,n]=t;Nc(()=>e.prepareRender(i,n)),Nc(()=>e.render(i,n))}}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{this._shouldRecomputeGlyphMarginLanes&&(this._shouldRecomputeGlyphMarginLanes=!1,this._context.configuration.setGlyphMarginDecorationLaneCount(this._computeGlyphMarginLaneCount())),Ec.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return null;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new Jse(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender()),[e,new Aie(this._context.viewLayout,i,this._viewLines)]},prepareRender:(e,t)=>{for(const i of e)i.prepareRender(t)},render:(e,t)=>{for(const i of e)i.render(t),i.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){const i=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const s=this._viewLines.visibleRangeForPosition(new z(n.lineNumber,n.column));return s?s.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?Uy.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new zse(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const i of this._viewParts)i.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var t,i,n,s,r,a,l,d;this._contentWidgets.setWidgetPosition(e.widget,(i=(t=e.position)===null||t===void 0?void 0:t.position)!==null&&i!==void 0?i:null,(s=(n=e.position)===null||n===void 0?void 0:n.secondaryPosition)!==null&&s!==void 0?s:null,(a=(r=e.position)===null||r===void 0?void 0:r.preference)!==null&&a!==void 0?a:null,(d=(l=e.position)===null||l===void 0?void 0:l.positionAffinity)!==null&&d!==void 0?d:null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){const t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};gE=ioe([noe(6,qe)],gE);function Nc(o){try{return o()}catch(e){return nt(e),null}}class fE{constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{const t=this._coordinatedRenderings.indexOf(e);if(t!==-1&&(this._coordinatedRenderings.splice(t,1),this._coordinatedRenderings.length===0)){for(const[i,n]of this._animationFrameRunners)n.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){const t=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,gw(e,t,100))}}_onRenderScheduled(){const e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(const i of e)Nc(()=>i.prepareRenderText());const t=[];for(let i=0,n=e.length;is.renderText())}for(let i=0,n=e.length;is.prepareRender(a,l))}for(let i=0,n=e.length;is.render(a,l))}}}fE.INSTANCE=new fE;class pB{constructor(e,t,i,n,s,r,a){this.id=e,this.label=t,this.alias=i,this.metadata=n,this._precondition=s,this._run=r,this._contextKeyService=a}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}function fu(o){let e=0,t=0,i=0,n=0;for(let s=0,r=o.length;s=$o&&(t=t-o%$o),t}function loe(o,e){return o.reduce((t,i)=>Ti(t,e(i)),Ms)}function mB(o,e){return o===e}function Zv(o,e){const t=o,i=e;if(i-t<=0)return Ms;const s=Math.floor(t/$o),r=Math.floor(i/$o),a=i-r*$o;if(s===r){const l=t-s*$o;return Qi(0,a-l)}else return Qi(r-s,a)}function lp(o,e){return o=e}function Of(o){return Qi(o.lineNumber-1,o.column-1)}function zh(o,e){const t=o,i=Math.floor(t/$o),n=t-i*$o,s=e,r=Math.floor(s/$o),a=s-r*$o;return new k(i+1,n+1,r+1,a+1)}function doe(o){const e=Rl(o);return Qi(e.length-1,e[e.length-1].length)}class Td{static fromModelContentChanges(e){return e.map(i=>{const n=k.lift(i.range);return new Td(Of(n.getStartPosition()),Of(n.getEndPosition()),doe(i.text))}).reverse()}constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}toString(){return`[${gr(this.startOffset)}...${gr(this.endOffset)}) -> ${gr(this.newLength)}`}}class coe{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(t=>oA.from(t))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):null;return i===null?null:Zv(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?Qi(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):Qi(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=gr(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?Qi(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):Qi(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx>5;if(n===0){const r=1<this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;;){const s=this.lineTokens,r=s.getCount();let a=null;if(this.lineTokenOffset1e3))break;if(i>1500)break}const n=roe(e,t,this.lineIdx,this.lineCharOffset);return new wc(n,0,-1,un.getEmpty(),new Sh(n))}}class moe{constructor(e,t){this.text=e,this._offset=Ms,this.idx=0;const i=t.getRegExpStr(),n=i?new RegExp(i+`| +`);else{a--;const l=t.getLineMaxColumn(a);n[s]=this._enter(e,t,!1,new k(a,l,a,l))}}return n}static lineInsertAfter(e,t,i){if(t===null||i===null)return[];const n=[];for(let s=0,r=i.length;s{const n=t.get(Ot).getFocusedCodeEditor();return n&&n.hasTextFocus()?this._runEditorCommand(t,n,i):!1}),e.addImplementation(1e3,"generic-dom-input-textarea",(t,i)=>{const n=jo();return n&&["input","textarea"].indexOf(n.tagName.toLowerCase())>=0?(this.runDOMCommand(n),!0):!1}),e.addImplementation(0,"generic-dom",(t,i)=>{const n=t.get(Ot).getActiveCodeEditor();return n?(n.focus(),this._runEditorCommand(t,n,i)):!1})}_runEditorCommand(e,t,i){const n=this.runEditorCommand(e,t,i);return n||!0}}var Ln;(function(o){class e extends Pi{constructor(b){super(b),this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){if(!C.position)return;b.model.pushStackElement(),b.setCursorStates(C.source,3,[On.moveTo(b,b.getPrimaryCursorState(),this._inSelectionMode,C.position,C.viewPosition)])&&C.revealType!==2&&b.revealPrimaryCursor(C.source,!0,!0)}}o.MoveTo=we(new e({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),o.MoveToSelect=we(new e({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class t extends Pi{runCoreEditorCommand(b,C){b.model.pushStackElement();const w=this._getColumnSelectResult(b,b.getPrimaryCursorState(),b.getCursorColumnSelectData(),C);w!==null&&(b.setCursorStates(C.source,3,w.viewStates.map(S=>Tt.fromViewState(S))),b.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:w.fromLineNumber,fromViewVisualColumn:w.fromVisualColumn,toViewLineNumber:w.toLineNumber,toViewVisualColumn:w.toVisualColumn}),w.reversed?b.revealTopMostCursor(C.source):b.revealBottomMostCursor(C.source))}}o.ColumnSelect=we(new class extends t{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(_,b,C,w){if(typeof w.position>"u"||typeof w.viewPosition>"u"||typeof w.mouseColumn>"u")return null;const S=_.model.validatePosition(w.position),x=_.coordinatesConverter.validateViewPosition(new z(w.viewPosition.lineNumber,w.viewPosition.column),S),y=w.doColumnSelect?C.fromViewLineNumber:x.lineNumber,I=w.doColumnSelect?C.fromViewVisualColumn:w.mouseColumn-1;return wh.columnSelect(_.cursorConfig,_,y,I,x.lineNumber,w.mouseColumn-1)}}),o.CursorColumnSelectLeft=we(new class extends t{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(_,b,C,w){return wh.columnSelectLeft(_.cursorConfig,_,C)}}),o.CursorColumnSelectRight=we(new class extends t{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(_,b,C,w){return wh.columnSelectRight(_.cursorConfig,_,C)}});class i extends t{constructor(b){super(b),this._isPaged=b.isPaged}_getColumnSelectResult(b,C,w,S){return wh.columnSelectUp(b.cursorConfig,b,w,this._isPaged)}}o.CursorColumnSelectUp=we(new i({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:3600,linux:{primary:0}}})),o.CursorColumnSelectPageUp=we(new i({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:3595,linux:{primary:0}}}));class n extends t{constructor(b){super(b),this._isPaged=b.isPaged}_getColumnSelectResult(b,C,w,S){return wh.columnSelectDown(b.cursorConfig,b,w,this._isPaged)}}o.CursorColumnSelectDown=we(new n({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:3602,linux:{primary:0}}})),o.CursorColumnSelectPageDown=we(new n({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:3596,linux:{primary:0}}}));class s extends Pi{constructor(){super({id:"cursorMove",precondition:void 0,metadata:Nw.metadata})}runCoreEditorCommand(b,C){const w=Nw.parse(C);w&&this._runCursorMove(b,C.source,w)}_runCursorMove(b,C,w){b.model.pushStackElement(),b.setCursorStates(C,3,s._move(b,b.getCursorStates(),w)),b.revealPrimaryCursor(C,!0)}static _move(b,C,w){const S=w.select,x=w.value;switch(w.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return On.simpleMove(b,C,w.direction,S,x,w.unit);case 11:case 13:case 12:case 14:return On.viewportMove(b,C,w.direction,S,x);default:return null}}}o.CursorMoveImpl=s,o.CursorMove=we(new s);class r extends Pi{constructor(b){super(b),this._staticArgs=b.args}runCoreEditorCommand(b,C){let w=this._staticArgs;this._staticArgs.value===-1&&(w={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:C.pageSize||b.cursorConfig.pageSize}),b.model.pushStackElement(),b.setCursorStates(C.source,3,On.simpleMove(b,b.getCursorStates(),w.direction,w.select,w.value,w.unit)),b.revealPrimaryCursor(C.source,!0)}}o.CursorLeft=we(new r({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),o.CursorLeftSelect=we(new r({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:1039}})),o.CursorRight=we(new r({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),o.CursorRightSelect=we(new r({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:1041}})),o.CursorUp=we(new r({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),o.CursorUpSelect=we(new r({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),o.CursorPageUp=we(new r({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:11}})),o.CursorPageUpSelect=we(new r({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:1035}})),o.CursorDown=we(new r({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),o.CursorDownSelect=we(new r({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),o.CursorPageDown=we(new r({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:12}})),o.CursorPageDownSelect=we(new r({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:1036}})),o.CreateCursor=we(new class extends Pi{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(_,b){if(!b.position)return;let C;b.wholeLine?C=On.line(_,_.getPrimaryCursorState(),!1,b.position,b.viewPosition):C=On.moveTo(_,_.getPrimaryCursorState(),!1,b.position,b.viewPosition);const w=_.getCursorStates();if(w.length>1){const S=C.modelState?C.modelState.position:null,x=C.viewState?C.viewState.position:null;for(let y=0,I=w.length;yx&&(S=x);const y=new k(S,1,S,_.model.getLineMaxColumn(S));let I=0;if(C.at)switch(C.at){case Pf.RawAtArgument.Top:I=3;break;case Pf.RawAtArgument.Center:I=1;break;case Pf.RawAtArgument.Bottom:I=4;break}const E=_.coordinatesConverter.convertModelRangeToViewRange(y);_.revealRange(b.source,!1,E,I,0)}}),o.SelectAll=new class extends uE{constructor(){super(cQ)}runDOMCommand(_){pr&&(_.focus(),_.select()),_.ownerDocument.execCommand("selectAll")}runEditorCommand(_,b,C){const w=b._getViewModel();w&&this.runCoreEditorCommand(w,C)}runCoreEditorCommand(_,b){_.model.pushStackElement(),_.setCursorStates("keyboard",3,[On.selectAll(_,_.getPrimaryCursorState())])}},o.SetSelection=we(new class extends Pi{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(_,b){b.selection&&(_.model.pushStackElement(),_.setCursorStates(b.source,3,[Tt.fromModelSelection(b.selection)]))}})})(Ln||(Ln={}));const gse=ae.and(T.textInputFocus,T.columnSelection);function Cm(o,e){Gs.registerKeybindingRule({id:o,primary:e,when:gse,weight:Ft+1})}Cm(Ln.CursorColumnSelectLeft.id,1039);Cm(Ln.CursorColumnSelectRight.id,1041);Cm(Ln.CursorColumnSelectUp.id,1040);Cm(Ln.CursorColumnSelectPageUp.id,1035);Cm(Ln.CursorColumnSelectDown.id,1042);Cm(Ln.CursorColumnSelectPageDown.id,1036);function w4(o){return o.register(),o}var ap;(function(o){class e extends Rn{runEditorCommand(i,n,s){const r=n._getViewModel();r&&this.runCoreEditingCommand(n,r,s||{})}}o.CoreEditingCommand=e,o.LineBreakInsert=we(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:T.writable,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,yi.lineBreakInsert(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection)))}}),o.Outdent=we(new class extends e{constructor(){super({id:"outdent",precondition:T.writable,kbOpts:{weight:Ft,kbExpr:ae.and(T.editorTextFocus,T.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,yi.outdent(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection))),t.pushUndoStop()}}),o.Tab=we(new class extends e{constructor(){super({id:"tab",precondition:T.writable,kbOpts:{weight:Ft,kbExpr:ae.and(T.editorTextFocus,T.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,yi.tab(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection))),t.pushUndoStop()}}),o.DeleteLeft=we(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(t,i,n){const[s,r]=rg.deleteLeft(i.getPrevEditOperationType(),i.cursorConfig,i.model,i.getCursorStates().map(a=>a.modelState.selection),i.getCursorAutoClosedCharacters());s&&t.pushUndoStop(),t.executeCommands(this.id,r),i.setPrevEditOperationType(2)}}),o.DeleteRight=we(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:Ft,kbExpr:T.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(t,i,n){const[s,r]=rg.deleteRight(i.getPrevEditOperationType(),i.cursorConfig,i.model,i.getCursorStates().map(a=>a.modelState.selection));s&&t.pushUndoStop(),t.executeCommands(this.id,r),i.setPrevEditOperationType(3)}}),o.Undo=new class extends uE{constructor(){super(t7)}runDOMCommand(t){t.ownerDocument.execCommand("undo")}runEditorCommand(t,i,n){if(!(!i.hasModel()||i.getOption(90)===!0))return i.getModel().undo()}},o.Redo=new class extends uE{constructor(){super(i7)}runDOMCommand(t){t.ownerDocument.execCommand("redo")}runEditorCommand(t,i,n){if(!(!i.hasModel()||i.getOption(90)===!0))return i.getModel().redo()}}})(ap||(ap={}));class S4 extends xy{constructor(e,t,i){super({id:e,precondition:void 0,metadata:i}),this._handlerId=t}runCommand(e,t){const i=e.get(Ot).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function Rg(o,e){w4(new S4("default:"+o,o)),w4(new S4(o,o,e))}Rg("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});Rg("replacePreviousChar");Rg("compositionType");Rg("compositionStart");Rg("compositionEnd");Rg("paste");Rg("cut");class fse{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Ln.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():e.mouseDownCount===3?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount===2?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){Ln.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){Ln.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Ln.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Ln.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){Ln.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){Ln.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){Ln.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){Ln.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){Ln.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){Ln.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){Ln.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){Ln.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){Ln.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class Uy{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){var t;(t=this.onKeyDown)===null||t===void 0||t.call(this,e)}emitKeyUp(e){var t;(t=this.onKeyUp)===null||t===void 0||t.call(this,e)}emitContextMenu(e){var t;(t=this.onContextMenu)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var t;(t=this.onMouseMove)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var t;(t=this.onMouseLeave)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var t;(t=this.onMouseDown)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var t;(t=this.onMouseUp)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var t;(t=this.onMouseDrag)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var t;(t=this.onMouseDrop)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var e;(e=this.onMouseDropCanceled)===null||e===void 0||e.call(this)}emitMouseWheel(e){var t;(t=this.onMouseWheel)===null||t===void 0||t.call(this,e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return Uy.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i={...e};return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),(i.type===5||i.type===8)&&(i.detail=this.convertViewToModelViewZoneData(i.detail,t)),i}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new z(e.afterLineNumber,1)).lineNumber}}}class aB{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Ci("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(this.getCount()===0)return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let s=0,r=0;for(let l=i;l<=n;l++){const d=l-this._rendLineNumberStart;e<=l&&l<=t&&(r===0?(s=d,r=1):r++)}if(e=n&&a<=s&&(this._lines[a-this._rendLineNumberStart].onContentChanged(),r=!0);return r}onLinesInserted(e,t){if(this.getCount()===0)return null;const i=t-e+1,n=this.getStartLineNumber(),s=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>s)return null;if(i+e>s)return this._lines.splice(e-this._rendLineNumberStart,s-e+1);const r=[];for(let u=0;ui)continue;const l=Math.max(t,a.fromLineNumber),d=Math.min(i,a.toLineNumber);for(let c=l;c<=d;c++){const u=c-this._rendLineNumberStart;this._lines[u].onTokensChanged(),n=!0}}return n}}class lB{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new aB(()=>this._host.createVisibleLine())}_createDomNode(){const e=Ht(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(143)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let i=0,n=t.length;it){const r=t,a=Math.min(i,s.rendLineNumberStart-1);r<=a&&(this._insertLinesBefore(s,r,a,n,t),s.linesLength+=a-r+1)}else if(s.rendLineNumberStart0&&(this._removeLinesBefore(s,r),s.linesLength-=r)}if(s.rendLineNumberStart=t,s.rendLineNumberStart+s.linesLength-1i){const r=Math.max(0,i-s.rendLineNumberStart+1),l=s.linesLength-1-r+1;l>0&&(this._removeLinesAfter(s,l),s.linesLength-=l)}return this._finishRendering(s,!1,n),s}_renderUntouchedLines(e,t,i,n,s){const r=e.rendLineNumberStart,a=e.lines;for(let l=t;l<=i;l++){const d=r+l;a[l].layoutLine(d,n[d-s])}}_insertLinesBefore(e,t,i,n,s){const r=[];let a=0;for(let l=t;l<=i;l++)r[a++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;a--){const l=e.lines[a];n[a]&&(l.setDomNode(r),r=r.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");wd._ttPolicy&&(t=wd._ttPolicy.createHTML(t)),n.innerHTML=t;for(let s=0;so});wd._sb=new mm(1e5);class dB extends wo{constructor(e){super(e),this._visibleLines=new lB(this),this.domNode=this._visibleLines.domNode;const i=this._context.configuration.options.get(50);Jn(this.domNode,i),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ei.shouldRender());for(let i=0,n=t.length;i'),n.appendString(s),n.appendString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class mse extends dB{constructor(e){super(e);const i=this._context.configuration.options.get(143);this._contentWidth=i.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const i=this._context.configuration.options.get(143);return this._contentWidth=i.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class _se extends dB{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(143);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),Jn(this.domNode,t.get(50))}onConfigurationChanged(e){const t=this._context.configuration.options;Jn(this.domNode,t.get(50));const i=t.get(143);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class vse extends wo{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=Ht(document.createElement("div")),Fl.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=Ht(document.createElement("div")),Fl.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){const e=Object.keys(this._widgets);for(const t of e)this._widgets[t].updateAnchorViewPosition()}addWidget(e){const t=new bse(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i,n,s){this._widgets[e.getId()].setPosition(t,i,n,s),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const i=this._widgets[t];delete this._widgets[t];const n=i.domNode.domNode;n.parentNode.removeChild(n),n.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return this._widgets.hasOwnProperty(e)?this._widgets[e].suppressMouseDown:!1}onBeforeRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(e)}}class bse{constructor(e,t,i){this._primaryAnchor=new Km(null,null),this._secondaryAnchor=new Km(null,null),this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=Ht(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,s=n.get(143);this._fixedOverflowWidgets=n.get(42),this._contentWidth=s.contentWidth,this._contentLeft=s.contentLeft,this._lineHeight=n.get(66),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(66),e.hasChanged(143)){const i=t.get(143);this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,t,i){this._affinity=e,this._primaryAnchor=n(t,this._context.viewModel,this._affinity),this._secondaryAnchor=n(i,this._context.viewModel,this._affinity);function n(s,r,a){if(!s)return new Km(null,null);const l=r.model.validatePosition(s);if(r.coordinatesConverter.modelPositionIsVisible(l)){const d=r.coordinatesConverter.convertModelPositionToViewPosition(l,a??void 0);return new Km(s,d)}return new Km(s,null)}}_getMaxWidth(){const e=this.domNode.domNode.ownerDocument,t=e.defaultView;return this.allowEditorOverflow?(t==null?void 0:t.innerWidth)||e.documentElement.offsetWidth||e.body.offsetWidth:this._contentWidth}setPosition(e,t,i,n){this._setPosition(n,e,t),this._preference=i,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n){const s=e.top,r=s,a=e.top+e.height,l=n.viewportHeight-a,d=s-i,c=r>=i,u=a,h=l>=i;let g=e.left;return g+t>n.scrollLeft+n.viewportWidth&&(g=n.scrollLeft+n.viewportWidth-t),gd){const g=h-(d-n);h-=g,i-=g}if(h=_,w=g+i<=f.height-b;return this._fixedOverflowWidgets?{fitsAbove:C,aboveTop:Math.max(h,_),fitsBelow:w,belowTop:g,left:v}:{fitsAbove:C,aboveTop:a,fitsBelow:w,belowTop:l,left:m}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new qm(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){var t,i;const n=a(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),s=((t=this._secondaryAnchor.viewPosition)===null||t===void 0?void 0:t.lineNumber)===((i=this._primaryAnchor.viewPosition)===null||i===void 0?void 0:i.lineNumber)?this._secondaryAnchor.viewPosition:null,r=a(s,this._affinity,this._lineHeight);return{primary:n,secondary:r};function a(l,d,c){if(!l)return null;const u=e.visibleRangeForPosition(l);if(!u)return null;const h=l.column===1&&d===3?0:u.left,g=e.getVerticalOffsetForLineNumber(l.lineNumber)-e.scrollTop;return new y4(g,h,c)}}_reduceAnchorCoordinates(e,t,i){if(!t)return e;const n=this._context.configuration.options.get(50);let s=t.left;return se.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&cx(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&cx(this._actual.afterRender,this._actual,this._renderData.position)}}class Km{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class qm{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class y4{constructor(e,t,i){this.top=e,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function cx(o,e,...t){try{return o.call(e,...t)}catch{return null}}class cB extends Ag{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(143);this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new Ae(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=this._selections.map(n=>n.positionLineNumber);t.sort((n,s)=>n-s),Bi(this._cursorLineNumbers,t)||(this._cursorLineNumbers=t,e=!0);const i=this._selections.every(n=>n.isEmpty());return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(143);return this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return this._renderLineHighlightOnlyWhenFocus?(this._focused=e.isFocused,!0):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._cursorLineNumbers.length;let r=0;const a=[];for(let l=i;l<=n;l++){const d=l-i;for(;r=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class Cse extends cB{_renderOne(e){return`
`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class wse extends cB{_renderOne(e){return`
`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}Zr((o,e)=>{const t=o.getColor(Z7);if(t&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${t}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)),!t||t.isTransparent()||o.defines(_4)){const i=o.getColor(_4);i&&(e.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),xa(o.type)&&(e.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});class Sse extends Ag{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let l=0,d=t.length;l{if(l.options.zIndexd.options.zIndex)return 1;const c=l.options.className,u=d.options.className;return cu?1:k.compareRangesUsingStarts(l.range,d.range)});const s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,a=[];for(let l=s;l<=r;l++){const d=l-s;a[d]=""}this._renderWholeLineDecorations(e,i,a),this._renderNormalDecorations(e,i,a),this._renderResult=a}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber;for(let a=0,l=t.length;a',u=Math.max(d.range.startLineNumber,s),h=Math.min(d.range.endLineNumber,r);for(let g=u;g<=h;g++){const f=g-s;i[f]+=c}}}_renderNormalDecorations(e,t,i){var n;const s=String(this._lineHeight),r=e.visibleRange.startLineNumber;let a=null,l=!1,d=null,c=!1;for(let u=0,h=t.length;u';l[g]+=b}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class yse extends wo{constructor(e,t,i,n){super(e);const s=this._context.configuration.options,r=s.get(102),a=s.get(74),l=s.get(40),d=s.get(105),c={listenOnDomNode:i.domNode,className:"editor-scrollable "+dE(e.theme.type),useShadows:!1,lazyRender:!0,vertical:r.vertical,horizontal:r.horizontal,verticalHasArrows:r.verticalHasArrows,horizontalHasArrows:r.horizontalHasArrows,verticalScrollbarSize:r.verticalScrollbarSize,verticalSliderSize:r.verticalSliderSize,horizontalScrollbarSize:r.horizontalScrollbarSize,horizontalSliderSize:r.horizontalSliderSize,handleMouseWheel:r.handleMouseWheel,alwaysConsumeMouseWheel:r.alwaysConsumeMouseWheel,arrowSize:r.arrowSize,mouseWheelScrollSensitivity:a,fastScrollSensitivity:l,scrollPredominantAxis:d,scrollByPage:r.scrollByPage};this.scrollbar=this._register(new Vy(t.domNode,c,this._context.viewLayout.getScrollable())),Fl.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=Ht(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const u=(h,g,f)=>{const m={};{const v=h.scrollTop;v&&(m.scrollTop=this._context.viewLayout.getCurrentScrollTop()+v,h.scrollTop=0)}if(f){const v=h.scrollLeft;v&&(m.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+v,h.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(m,1)};this._register(J(i.domNode,"scroll",h=>u(i.domNode,!0,!0))),this._register(J(t.domNode,"scroll",h=>u(t.domNode,!0,!1))),this._register(J(n.domNode,"scroll",h=>u(n.domNode,!0,!1))),this._register(J(this.scrollbarDomNode.domNode,"scroll",h=>u(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(143);this.scrollbarDomNode.setLeft(t.contentLeft),e.get(72).side==="right"?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(102)||e.hasChanged(74)||e.hasChanged(40)){const t=this._context.configuration.options,i=t.get(102),n=t.get(74),s=t.get(40),r=t.get(105),a={vertical:i.vertical,horizontal:i.horizontal,verticalScrollbarSize:i.verticalScrollbarSize,horizontalScrollbarSize:i.horizontalScrollbarSize,scrollByPage:i.scrollByPage,handleMouseWheel:i.handleMouseWheel,mouseWheelScrollSensitivity:n,fastScrollSensitivity:s,scrollPredominantAxis:r};this.scrollbar.updateOptions(a)}return e.hasChanged(143)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+dE(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}class uB extends q{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function jy(o,e){let t=0,i=0;const n=o.length;for(;in)throw new Ci("Illegal value for lineNumber");const s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=!!(s&&s.offSide);let a=-2,l=-1,d=-2,c=-1;const u=y=>{if(a!==-1&&(a===-2||a>y-1)){a=-1,l=-1;for(let I=y-2;I>=0;I--){const E=this._computeIndentLevel(I);if(E>=0){a=I,l=E;break}}}if(d===-2){d=-1,c=-1;for(let I=y;I=0){d=I,c=E;break}}}};let h=-2,g=-1,f=-2,m=-1;const v=y=>{if(h===-2){h=-1,g=-1;for(let I=y-2;I>=0;I--){const E=this._computeIndentLevel(I);if(E>=0){h=I,g=E;break}}}if(f!==-1&&(f===-2||f=0){f=I,m=E;break}}}};let _=0,b=!0,C=0,w=!0,S=0,x=0;for(let y=0;b||w;y++){const I=e-y,E=e+y;y>1&&(I<1||I1&&(E>n||E>i)&&(w=!1),y>5e4&&(b=!1,w=!1);let R=-1;if(b&&I>=1){const O=this._computeIndentLevel(I-1);O>=0?(d=I-1,c=O,R=Math.ceil(O/this.textModel.getOptions().indentSize)):(u(I),R=this._getIndentLevelForWhitespaceLine(r,l,c))}let j=-1;if(w&&E<=n){const O=this._computeIndentLevel(E-1);O>=0?(h=E-1,g=O,j=Math.ceil(O/this.textModel.getOptions().indentSize)):(v(E),j=this._getIndentLevelForWhitespaceLine(r,g,m))}if(y===0){x=R;continue}if(y===1){if(E<=n&&j>=0&&x+1===j){b=!1,_=E,C=E,S=j;continue}if(I>=1&&R>=0&&R-1===x){w=!1,_=I,C=I,S=R;continue}if(_=e,C=e,S=x,S===0)return{startLineNumber:_,endLineNumber:C,indent:S}}b&&(R>=S?_=I:b=!1),w&&(j>=S?C=E:w=!1)}return{startLineNumber:_,endLineNumber:C,indent:S}}getLinesBracketGuides(e,t,i,n){var s;const r=[];for(let h=e;h<=t;h++)r.push([]);const a=!0,l=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new k(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let d;if(i&&l.length>0){const h=(e<=i.lineNumber&&i.lineNumber<=t?l:this.textModel.bracketPairs.getBracketPairsInRange(k.fromPositions(i)).toArray()).filter(g=>k.strictContainsPosition(g.range,i));d=(s=Nv(h,g=>a))===null||s===void 0?void 0:s.range}const c=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,u=new hB;for(const h of l){if(!h.closingBracketRange)continue;const g=d&&h.range.equalsRange(d);if(!g&&!n.includeInactive)continue;const f=u.getInlineClassName(h.nestingLevel,h.nestingLevelOfEqualBracketType,c)+(n.highlightActive&&g?" "+u.activeClassName:""),m=h.openingBracketRange.getStartPosition(),v=h.closingBracketRange.getStartPosition(),_=n.horizontalGuides===Hh.Enabled||n.horizontalGuides===Hh.EnabledForActive&&g;if(h.range.startLineNumber===h.range.endLineNumber){_&&r[h.range.startLineNumber-e].push(new Mh(-1,h.openingBracketRange.getEndPosition().column,f,new $_(!1,v.column),-1,-1));continue}const b=this.getVisibleColumnFromPosition(v),C=this.getVisibleColumnFromPosition(h.openingBracketRange.getStartPosition()),w=Math.min(C,b,h.minVisibleColumnIndentation+1);let S=!1;Cs(this.textModel.getLineContent(h.closingBracketRange.startLineNumber))=e&&C>w&&r[m.lineNumber-e].push(new Mh(w,-1,f,new $_(!1,m.column),-1,-1)),v.lineNumber<=t&&b>w&&r[v.lineNumber-e].push(new Mh(w,-1,f,new $_(!S,v.column),-1,-1)))}for(const h of r)h.sort((g,f)=>g.visibleColumn-f.visibleColumn);return r}getVisibleColumnFromPosition(e){return mn.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=this.textModel.getOptions(),s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=!!(s&&s.offSide),a=new Array(t-e+1);let l=-2,d=-1,c=-2,u=-1;for(let h=e;h<=t;h++){const g=h-e,f=this._computeIndentLevel(h-1);if(f>=0){l=h-1,d=f,a[g]=Math.ceil(f/n.indentSize);continue}if(l===-2){l=-1,d=-1;for(let m=h-2;m>=0;m--){const v=this._computeIndentLevel(m);if(v>=0){l=m,d=v;break}}}if(c!==-1&&(c===-2||c=0){c=m,u=v;break}}}a[g]=this._getIndentLevelForWhitespaceLine(r,d,u)}return a}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return t===-1||i===-1?0:tl||this._maxIndentLeft>0&&C>this._maxIndentLeft)break;const w=b.horizontalLine?b.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",S=b.horizontalLine?((s=(n=e.visibleRangeForPosition(new z(g,b.horizontalLine.endColumn)))===null||n===void 0?void 0:n.left)!==null&&s!==void 0?s:C+this._spaceWidth)-C:this._spaceWidth;v+=`
`}h[f]=v}this._renderResult=h}getGuidesByLine(e,t,i){const n=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?Hh.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?Hh.EnabledForActive:Hh.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,s=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let r=0,a=0,l=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&i){const u=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);r=u.startLineNumber,a=u.endLineNumber,l=u.indent}const{indentSize:d}=this._context.viewModel.model.getOptions(),c=[];for(let u=e;u<=t;u++){const h=new Array;c.push(h);const g=n?n[u-e]:[],f=new Hd(g),m=s?s[u-e]:0;for(let v=1;v<=m;v++){const _=(v-1)*d+1,b=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||g.length===0)&&r<=u&&u<=a&&v===l;h.push(...f.takeWhile(w=>w.visibleColumn<_)||[]);const C=f.peek();(!C||C.visibleColumn!==_||C.horizontalLine)&&h.push(new Mh(_,-1,`core-guide-indent lvl-${(v-1)%30}`+(b?" indent-active":""),null,-1,-1))}h.push(...f.takeWhile(v=>!0)||[])}return c}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function ef(o){if(!(o&&o.isTransparent()))return o}Zr((o,e)=>{const t=[{bracketColor:Q7,guideColor:One,guideColorActive:zne},{bracketColor:J7,guideColor:Fne,guideColorActive:$ne},{bracketColor:eB,guideColor:Bne,guideColorActive:Une},{bracketColor:tB,guideColor:Wne,guideColorActive:jne},{bracketColor:iB,guideColor:Vne,guideColorActive:Kne},{bracketColor:nB,guideColor:Hne,guideColorActive:qne}],i=new hB,n=[{indentColor:l0,indentColorActive:d0},{indentColor:vne,indentColorActive:yne},{indentColor:bne,indentColorActive:Lne},{indentColor:Cne,indentColorActive:Dne},{indentColor:wne,indentColorActive:xne},{indentColor:Sne,indentColorActive:kne}],s=t.map(a=>{var l,d;const c=o.getColor(a.bracketColor),u=o.getColor(a.guideColor),h=o.getColor(a.guideColorActive),g=ef((l=ef(u))!==null&&l!==void 0?l:c==null?void 0:c.transparent(.3)),f=ef((d=ef(h))!==null&&d!==void 0?d:c);if(!(!g||!f))return{guideColor:g,guideColorActive:f}}).filter(mv),r=n.map(a=>{const l=o.getColor(a.indentColor),d=o.getColor(a.indentColorActive),c=ef(l),u=ef(d);if(!(!c||!u))return{indentColor:c,indentColorActive:u}}).filter(mv);if(s.length>0){for(let a=0;a<30;a++){const l=s[a%s.length];e.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(a).replace(/ /g,".")} { --guide-color: ${l.guideColor}; --guide-color-active: ${l.guideColorActive}; }`)}e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),e.addRule(`.monaco-editor .vertical.${i.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${i.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${i.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(r.length>0){for(let a=0;a<30;a++){const l=r[a%r.length];e.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${a} { --indent-color: ${l.indentColor}; --indent-color-active: ${l.indentColorActive}; }`)}e.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),e.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}});class ux{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class xse{constructor(){this._currentVisibleRange=new k(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class kse{constructor(e,t,i,n,s,r,a){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=s,this.stopScrollTop=r,this.scrollType=a,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class Ise{constructor(e,t,i,n,s){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=s,this.type="selections";let r=t[0].startLineNumber,a=t[0].endLineNumber;for(let l=1,d=t.length;l{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new Yt(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new xse,this._horizontalRevealRequest=null,this._stickyScrollEnabled=n.get(114).enabled,this._maxNumberStickyLines=n.get(114).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new al(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(144)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(50),n=t.get(144);return this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(99),this._cursorSurroundingLines=t.get(29),this._cursorSurroundingLinesStyle=t.get(30),this._canUseLayerHinting=!t.get(32),this._stickyScrollEnabled=t.get(114).enabled,this._maxNumberStickyLines=t.get(114).maxLineCount,Jn(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(143)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new h4(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)this._visibleLines.getVisibleLine(s).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let s=t;s<=i;s++)n=this._visibleLines.getVisibleLine(s).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)this._visibleLines.getVisibleLine(n).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(t===-1)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new kse(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new Ise(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const s=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,s),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(i===null)return null;const n=this._getLineNumberFor(i);if(n===-1||n<1||n>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(n)===1)return new z(n,1);const s=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(nr)return null;let a=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e,t);const l=this._context.viewModel.getLineMinColumn(n);return ai)return-1;const n=new ux(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getWidth(n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=k.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;const s=[];let r=0;const a=new ux(this.domNode.domNode,this._textRangeRestingSpot);let l=0;t&&(l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new z(n.startLineNumber,1)).lineNumber);const d=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let u=n.startLineNumber;u<=n.endLineNumber;u++){if(uc)continue;const h=u===n.startLineNumber?n.startColumn:1,g=u!==n.endLineNumber,f=g?this._context.viewModel.getLineMaxColumn(u):n.endColumn,m=this._visibleLines.getVisibleLine(u).getVisibleRangesForRange(u,h,f,a);if(m){if(t&&uthis._visibleLines.getEndLineNumber())return null;const n=new ux(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new Wie(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,s=!0;for(let r=t;r<=i;r++){const a=this._visibleLines.getVisibleLine(r);if(e&&!a.getWidthIsFast()){s=!1;continue}n=Math.max(n,a.getWidth(null))}return s&&t===1&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),s}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++){const r=this._visibleLines.getVisibleLine(s);if(r.needsMonospaceFontCheck()){const a=r.getWidth(null);a>t&&(t=a,e=s)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let s=i;s<=n;s++)this._visibleLines.getVisibleLine(s).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const i=this._horizontalRevealRequest;if(e.startLineNumber<=i.minLineNumber&&i.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const n=this._computeScrollLeftToReveal(i);n&&(this._isViewportWrapping||this._ensureMaxLineWidth(n.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:n.scrollLeft},i.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),ws&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)if(this._visibleLines.getVisibleLine(s).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let _=s[0].startLineNumber,b=s[0].endLineNumber;for(let C=1,w=s.length;Cl){if(!c)return-1;v=u}else if(r===5||r===6)if(r===6&&a<=u&&h<=d)v=a;else{const _=Math.max(5*this._lineHeight,l*.2),b=u-_,C=h-l;v=Math.max(C,b)}else if(r===1||r===2)if(r===2&&a<=u&&h<=d)v=a;else{const _=(u+h)/2;v=Math.max(0,_-l/2)}else v=this._computeMinimumScrolling(a,d,u,h,r===3,r===4);return v}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(143),n=t.left,s=n+t.width-i.verticalScrollbarWidth;let r=1073741824,a=0;if(e.type==="range"){const d=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!d)return null;for(const c of d.ranges)r=Math.min(r,Math.round(c.left)),a=Math.max(a,Math.round(c.left+c.width))}else for(const d of e.selections){if(d.startLineNumber!==d.endLineNumber)return null;const c=this._visibleRangesForLineRange(d.startLineNumber,d.startColumn,d.endColumn);if(!c)return null;for(const u of c.ranges)r=Math.min(r,Math.round(u.left)),a=Math.max(a,Math.round(u.left+u.width))}return e.minimalReveal||(r=Math.max(0,r-Ky.HORIZONTAL_EXTRA_PX),a+=this._revealHorizontalRightPadding),e.type==="selections"&&a-r>t.width?null:{scrollLeft:this._computeMinimumScrolling(n,s,r,a),maxHorizontalOffset:a}}_computeMinimumScrolling(e,t,i,n,s,r){e=e|0,t=t|0,i=i|0,n=n|0,s=!!s,r=!!r;const a=t-e;if(n-it)return Math.max(0,n-a)}else return i;return e}}Ky.HORIZONTAL_EXTRA_PX=30;class hE{constructor(e,t,i,n){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i),this.zIndex=n??0}}class Ese{constructor(e,t){this.className=e,this.zIndex=t}}class Nse{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class gB extends Ag{_render(e,t,i){const n=[];for(let a=e;a<=t;a++){const l=a-e;n[l]=new Nse}if(i.length===0)return n;i.sort((a,l)=>a.className===l.className?a.startLineNumber===l.startLineNumber?a.endLineNumber-l.endLineNumber:a.startLineNumber-l.startLineNumber:a.classNamen)continue;const d=Math.max(a,i),c=Math.min(s.preference.lane,this._glyphMarginDecorationLaneCount);t.push(new Ase(d,c,s.preference.zIndex,s))}}_collectSortedGlyphRenderRequests(e){const t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort((i,n)=>i.lineNumber===n.lineNumber?i.lane===n.lane?i.zIndex===n.zIndex?n.type===i.type?i.type===0&&n.type===0?i.className0;){const n=t.peek();if(!n)break;const s=t.takeWhile(a=>a.lineNumber===n.lineNumber&&a.lane===n.lane);if(!s||s.length===0)break;const r=s[0];if(r.type===0){const a=[];for(const l of s){if(l.zIndex!==r.zIndex||l.type!==r.type)break;(a.length===0||a[a.length-1]!==l.className)&&a.push(l.className)}i.push(r.accept(a.join(" ")))}else r.widget.renderInfo={lineNumber:r.lineNumber,lane:r.lane}}this._decorationGlyphsToRender=i}render(e){if(!this._glyphMargin){for(const i of Object.values(this._widgets))i.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const i=this._managedDomNodes.pop();i==null||i.domNode.remove()}return}const t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const i of Object.values(this._widgets))if(!i.renderInfo)i.domNode.setDisplay("none");else{const n=e.viewportData.relativeVerticalOffset[i.renderInfo.lineNumber-e.viewportData.startLineNumber],s=this._glyphMarginLeft+(i.renderInfo.lane-1)*this._lineHeight;i.domNode.setDisplay("block"),i.domNode.setTop(n),i.domNode.setLeft(s),i.domNode.setWidth(t),i.domNode.setHeight(this._lineHeight)}for(let i=0;ithis._decorationGlyphsToRender.length;){const i=this._managedDomNodes.pop();i==null||i.domNode.remove()}}}class Mse{constructor(e,t,i,n){this.lineNumber=e,this.lane=t,this.zIndex=i,this.className=n,this.type=0}accept(e){return new Rse(this.lineNumber,this.lane,e)}}class Ase{constructor(e,t,i,n){this.lineNumber=e,this.lane=t,this.zIndex=i,this.widget=n,this.type=1}}class Rse{constructor(e,t,i){this.lineNumber=e,this.lane=t,this.combinedClassName=i}}class Pse extends gB{constructor(e){super(),this._context=e;const i=this._context.configuration.options.get(143);this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options.get(143);return this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let s=0,r=t.length;s',l=[];for(let d=t;d<=i;d++){const c=d-t,u=n[c].getDecorations();let h="";for(const g of u)h+='
';s[a]=d}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}class dr{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=dr._clamp(e),this.g=dr._clamp(t),this.b=dr._clamp(i),this.a=dr._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:e|0}}dr.Empty=new dr(0,0,0,0);class u0 extends q{static getInstance(){return this._INSTANCE||(this._INSTANCE=new u0),this._INSTANCE}constructor(){super(),this._onDidChange=new W,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Ei.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){const e=Ei.getColorMap();if(!e){this._colors=[dr.Empty],this._backgroundIsLight=!0;return}this._colors=[dr.Empty];for(let i=1;i=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}u0._INSTANCE=null;const Fse=(()=>{const o=[];for(let e=32;e<=126;e++)o.push(e);return o.push(65533),o})(),Bse=(o,e)=>(o-=32,o<0||o>96?e<=2?(o+96)%96:95:o);class Uv{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=Uv.soften(e,12/15),this.charDataLight=Uv.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,s=e.length;ne.width||i+f>e.height){console.warn("bad render request outside image data");return}const m=c?this.charDataLight:this.charDataNormal,v=Bse(n,d),_=e.width*4,b=a.r,C=a.g,w=a.b,S=s.r-b,x=s.g-C,y=s.b-w,I=Math.max(r,l),E=e.data;let R=v*h*g,j=i*_+t*4;for(let O=0;Oe.width||i+u>e.height){console.warn("bad render request outside image data");return}const h=e.width*4,g=.5*(s/255),f=r.r,m=r.g,v=r.b,_=n.r-f,b=n.g-m,C=n.b-v,w=f+_*g,S=m+b*g,x=v+C*g,y=Math.max(s,a),I=e.data;let E=i*h+t*4;for(let R=0;R{const e=new Uint8ClampedArray(o.length/2);for(let t=0;t>1]=L4[o[t]]<<4|L4[o[t+1]]&15;return e},x4={1:su(()=>D4("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:su(()=>D4("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class U_{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return x4[e]?i=new Uv(x4[e](),e):i=U_.createFromSampleData(U_.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=96*10,t.style.width=96*10+"px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const s of Fse)i.fillText(String.fromCharCode(s),n,16/2),n+=10;return i.getImageData(0,0,96*10,16)}static createFromSampleData(e,t){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const n=U_._downsample(e,t);return new Uv(n,t)}static _downsampleChar(e,t,i,n,s){const r=1*s,a=2*s;let l=n,d=0;for(let c=0;c0){const d=255/l;for(let c=0;cU_.create(this.fontScale,l.fontFamily)),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=jv._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=jv._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(Sie);return i?new dr(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(yie);return t?dr._clamp(Math.round(255*t.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class j_{constructor(e,t,i,n,s,r,a,l,d){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=s,this.sliderHeight=r,this.topPaddingLineCount=a,this.startLineNumber=l,this.endLineNumber=d}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const t=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumber,e.endLineNumber);return t>i?null:[t,i]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,i,n,s,r,a,l,d,c,u){const h=e.pixelRatio,g=e.minimapLineHeight,f=Math.floor(e.canvasInnerHeight/g),m=e.lineHeight;if(e.minimapHeightIsEditorHeight){let x=l*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(x+=Math.max(0,s-e.lineHeight-e.paddingBottom));const y=Math.max(1,Math.floor(s*s/x)),I=Math.max(0,e.minimapHeight-y),E=I/(c-s),R=d*E,j=I>0,O=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),$=Math.floor(e.paddingTop/e.lineHeight);return new j_(d,c,j,E,R,y,$,1,Math.min(a,O))}let v;if(r&&i!==a){const x=i-t+1;v=Math.floor(x*g/h)}else{const x=s/m;v=Math.floor(x*g/h)}const _=Math.floor(e.paddingTop/m);let b=Math.floor(e.paddingBottom/m);if(e.scrollBeyondLastLine){const x=s/m;b=Math.max(b,x-1)}let C;if(b>0){const x=s/m;C=(_+a+b-x-1)*g/h}else C=Math.max(0,(_+a)*g/h-v);C=Math.min(e.minimapHeight-v,C);const w=C/(c-s),S=d*w;if(f>=_+a+b){const x=C>0;return new j_(d,c,x,w,S,v,_,1,a)}else{let x;t>1?x=t+_:x=Math.max(1,d/m);let y,I=Math.max(1,Math.floor(x-S*h/g));I<_?(y=_-I+1,I=1):(y=0,I=Math.max(1,I-_)),u&&u.scrollHeight===c&&(u.scrollTop>d&&(I=Math.min(I,u.startLineNumber),y=Math.max(y,u.topPaddingLineCount)),u.scrollTop=e.paddingTop?j=(t-I+y+R)*g/h:j=d/e.paddingTop*(y+R)*g/h,new j_(d,c,!0,w,j,v,y,I,E)}}}class Tw{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}Tw.INVALID=new Tw(-1);class k4{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new aB(()=>Tw.INVALID),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const i=this._renderedLines._get().lines;for(let n=0,s=i.length;n1){for(let _=0,b=n-1;_0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let s=this.minimapLines.length-1;s>=0&&!(this.minimapLines[s]=0&&!(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=!!this._samplingState,[t,i]=Kv.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const n of i)switch(n.type){case"deleted":this._actual.onLinesDeleted(n.deleteFromLineNumber,n.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(n.insertFromLineNumber,n.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){const n=[];for(let s=0,r=t-e+1;s{if(i.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(i.button===0&&this._lastRenderData){const d=gn(this._slider.domNode),c=d.top+d.height/2;this._startSliderDragging(i,c,this._lastRenderData.renderedLayout)}return}const s=this._model.options.minimapLineHeight,r=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*i.offsetY;let l=Math.floor(r/s)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;l=Math.min(l,this._model.getLineCount()),this._model.revealLineNumber(l)}),this._sliderPointerMoveMonitor=new vm,this._sliderPointerDownListener=Wi(this._slider.domNode,Se.POINTER_DOWN,i=>{i.preventDefault(),i.stopPropagation(),i.button===0&&this._lastRenderData&&this._startSliderDragging(i,i.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=ei.addTarget(this._domNode.domNode),this._sliderTouchStartListener=J(this._domNode.domNode,ni.Start,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(i))},{passive:!1}),this._sliderTouchMoveListener=J(this._domNode.domNode,ni.Change,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(i)},{passive:!1}),this._sliderTouchEndListener=Wi(this._domNode.domNode,ni.End,i=>{i.preventDefault(),i.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,i){if(!e.target||!(e.target instanceof Element))return;const n=e.pageX;this._slider.toggleClassName("active",!0);const s=(r,a)=>{const l=gn(this._domNode.domNode),d=Math.min(Math.abs(a-n),Math.abs(a-l.left),Math.abs(a-l.left-l.width));if(is&&d>Wse){this._model.setScrollTop(i.scrollTop);return}const c=r-t;this._model.setScrollTop(i.getDesiredScrollTopFromDelta(c))};e.pageY!==t&&s(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>s(r.pageY,r.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return this._model.options.showSlider==="always"?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new sA(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return this._lastRenderData?this._lastRenderData.onLinesChanged(e,t):!1}onLinesDeleted(e,t){var i;return(i=this._lastRenderData)===null||i===void 0||i.onLinesDeleted(e,t),!0}onLinesInserted(e,t){var i;return(i=this._lastRenderData)===null||i===void 0||i.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(l4),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const i=j_.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(i.sliderNeeded?"block":"none"),this._slider.setTop(i.sliderTop),this._slider.setHeight(i.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(i.sliderHeight),this.renderDecorations(i),this._lastRenderData=this.renderLines(i)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(k.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort((h,g)=>(h.options.zIndex||0)-(g.options.zIndex||0));const{canvasInnerWidth:n,canvasInnerHeight:s}=this._model.options,r=this._model.options.minimapLineHeight,a=this._model.options.minimapCharWidth,l=this._model.getOptions().tabSize,d=this._decorationsCanvas.domNode.getContext("2d");d.clearRect(0,0,n,s);const c=new I4(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(d,t,c,e,r),this._renderDecorationsLineHighlights(d,i,c,e,r);const u=new I4(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(d,t,u,e,r,l,a,n),this._renderDecorationsHighlights(d,i,u,e,r,l,a,n)}}_renderSelectionLineHighlights(e,t,i,n,s){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let r=0,a=0;for(const l of t){const d=n.intersectWithViewport(l);if(!d)continue;const[c,u]=d;for(let f=c;f<=u;f++)i.set(f,!0);const h=n.getYForLineNumber(c,s),g=n.getYForLineNumber(u,s);a>=h||(a>r&&e.fillRect(lc,r,e.canvas.width,a-r),r=h),a=g}a>r&&e.fillRect(lc,r,e.canvas.width,a-r)}_renderDecorationsLineHighlights(e,t,i,n,s){const r=new Map;for(let a=t.length-1;a>=0;a--){const l=t[a],d=l.options.minimap;if(!d||d.position!==uo.Inline)continue;const c=n.intersectWithViewport(l.range);if(!c)continue;const[u,h]=c,g=d.getColor(this._theme.value);if(!g||g.isTransparent())continue;let f=r.get(g.toString());f||(f=g.transparent(.5).toString(),r.set(g.toString(),f)),e.fillStyle=f;for(let m=u;m<=h;m++){if(i.has(m))continue;i.set(m,!0);const v=n.getYForLineNumber(u,s);e.fillRect(lc,v,e.canvas.width,s)}}}_renderSelectionsHighlights(e,t,i,n,s,r,a,l){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const d of t){const c=n.intersectWithViewport(d);if(!c)continue;const[u,h]=c;for(let g=u;g<=h;g++)this.renderDecorationOnLine(e,i,d,this._selectionColor,n,g,s,s,r,a,l)}}_renderDecorationsHighlights(e,t,i,n,s,r,a,l){for(const d of t){const c=d.options.minimap;if(!c)continue;const u=n.intersectWithViewport(d.range);if(!u)continue;const[h,g]=u,f=c.getColor(this._theme.value);if(!(!f||f.isTransparent()))for(let m=h;m<=g;m++)switch(c.position){case uo.Inline:this.renderDecorationOnLine(e,i,d.range,f,n,m,s,s,r,a,l);continue;case uo.Gutter:{const v=n.getYForLineNumber(m,s);this.renderDecoration(e,f,2,v,Vse,s);continue}}}}renderDecorationOnLine(e,t,i,n,s,r,a,l,d,c,u){const h=s.getYForLineNumber(r,l);if(h+a<0||h>this._model.options.canvasInnerHeight)return;const{startLineNumber:g,endLineNumber:f}=i,m=g===r?i.startColumn:1,v=f===r?i.endColumn:this._model.getLineMaxColumn(r),_=this.getXOffsetForPosition(t,r,m,d,c,u),b=this.getXOffsetForPosition(t,r,v,d,c,u);this.renderDecoration(e,n,_,h,b-_,a)}getXOffsetForPosition(e,t,i,n,s,r){if(i===1)return lc;if((i-1)*s>=r)return r;let l=e.get(t);if(!l){const d=this._model.getLineContent(t);l=[lc];let c=lc;for(let u=1;u=r){l[u]=r;break}l[u]=f,c=f}e.set(t,l)}return i-1S?Math.floor((n-S)/2):0,y=h.a/255,I=new dr(Math.round((h.r-u.r)*y+u.r),Math.round((h.g-u.g)*y+u.g),Math.round((h.b-u.b)*y+u.b),255);let E=e.topPaddingLineCount*n;const R=[];for(let oe=0,Le=i-t+1;oe=0&&jb)return;const O=v.charCodeAt(S);if(O===9){const $=h-(S+x)%h;x+=$-1,w+=$*r}else if(O===32)w+=r;else{const $=ou(O)?2:1;for(let K=0;K<$;K++)if(s===2?d.blockRenderChar(e,w,c+u,j,l,t,i,C):d.renderChar(e,w,c+u,O,j,l,t,i,f,n,C),w+=r,w>b)return}}}}}class I4{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let n=0,s=this._endLineNumber-this._startLineNumber+1;nthis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}class zse extends wo{constructor(e){super(e);const i=this._context.configuration.options.get(143);this._widgets={},this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,this._domNode=Ht(document.createElement("div")),Fl.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const i=this._context.configuration.options.get(143);return this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,!0}addWidget(e){const t=Ht(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference===t?(this._updateMaxMinWidth(),!1):(i.preference=t,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const n=this._widgets[t].domNode.domNode;delete this._widgets[t],n.parentNode.removeChild(n),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var e,t;let i=0;const n=Object.keys(this._widgets);for(let s=0,r=n.length;s=3){const s=Math.floor(n/3),r=Math.floor(n/3),a=n-s-r,l=e,d=l+s,c=l+s+a;return[[0,l,d,l,c,l,d,l],[0,s,a,s+a,r,s+a+r,a+r,s+a+r]]}else if(i===2){const s=Math.floor(n/2),r=n-s,a=e,l=a+s;return[[0,a,a,a,l,a,a,a],[0,s,s,s,r,s+r,s+r,s+r]]}else{const s=e,r=n;return[[0,s,s,s,s,s,s,s],[0,r,r,r,r,r,r,r]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&Y.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class Use extends wo{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=Ht(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Ei.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new $se(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(t)?!1:(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;tf.lineNumber===m.lineNumber)&&(this._actualShouldRender=2),this._actualShouldRender===1)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const i=this._settings.canvasWidth,n=this._settings.canvasHeight,s=this._settings.lineHeight,r=this._context.viewLayout,a=this._context.viewLayout.getScrollHeight(),l=n/a,d=6*this._settings.pixelRatio|0,c=d/2|0,u=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(u.fillStyle=Y.Format.CSS.formatHexA(e),u.fillRect(0,0,i,n)):(u.clearRect(0,0,i,n),u.fillStyle=Y.Format.CSS.formatHexA(e),u.fillRect(0,0,i,n)):u.clearRect(0,0,i,n);const h=this._settings.x,g=this._settings.w;for(const f of t){const m=f.color,v=f.data;u.fillStyle=m;let _=0,b=0,C=0;for(let w=0,S=v.length/3;wn&&(O=n-c),E=O-c,R=O+c}E>C+1||x!==_?(w!==0&&u.fillRect(h[_],b,g[_],C-b),_=x,b=E,C=R):R>C&&(C=R)}u.fillRect(h[_],b,g[_],C-b)}if(!this._settings.hideCursor&&this._settings.cursorColor){const f=2*this._settings.pixelRatio|0,m=f/2|0,v=this._settings.x[7],_=this._settings.w[7];u.fillStyle=this._settings.cursorColor;let b=-100,C=-100;for(let w=0,S=this._cursorPositions.length;wn&&(y=n-m);const I=y-m,E=I+f;I>C+1?(w!==0&&u.fillRect(v,b,_,C-b),b=I,C=E):E>C&&(C=E)}u.fillRect(v,b,_,C-b)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(u.beginPath(),u.lineWidth=1,u.strokeStyle=this._settings.borderColor,u.moveTo(0,0),u.lineTo(0,n),u.stroke(),u.moveTo(0,0),u.lineTo(i,0),u.stroke())}}class E4{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=e|0,this.to=t|0,this.colorId=i|0}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class fB{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colori&&(m=i-v);const _=c.color;let b=this._color2Id[_];b||(b=++this._lastAssignedId,this._color2Id[_]=b,this._id2Color[b]=_);const C=new E4(m-v,m+v,b);c.setColorZone(C),a.push(C)}return this._colorZonesInvalid=!1,a.sort(E4.compare),a}}class Kse extends r0{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=Ht(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new jse(n=>this._context.viewLayout.getVerticalOffsetForLineNumber(n)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(66)),this._zoneManager.setPixelRatio(i.get(141)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(66)&&(this._zoneManager.setLineHeight(t.get(66)),this._render()),e.hasChanged(141)&&(this._zoneManager.setPixelRatio(t.get(141)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(s,i,n,e),!0}_renderOneLane(e,t,i,n){let s=0,r=0,a=0;for(const l of t){const d=l.colorId,c=l.from,u=l.to;d!==s?(e.fillRect(0,r,n,a-r),s=d,e.fillStyle=i[s],r=c,a=u):a>=c?a=Math.max(a,u):(e.fillRect(0,r,n,a-r),r=c,a=u)}e.fillRect(0,r,n,a-r)}}class qse extends wo{constructor(e){super(e),this.domNode=Ht(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const a=Ht(document.createElement("div"));a.setClassName("view-ruler"),a.setWidth(s),this.domNode.appendChild(a),this._renderedRulers.push(a),r--}return}let i=e-t;for(;i>0;){const n=this._renderedRulers.pop();this.domNode.removeChild(n),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const t=this._context.configuration.options.get(143);t.minimap.renderMinimap===0||t.minimap.minimapWidth>0&&t.minimap.minimapLeft===0?this._width=t.width:this._width=t.width-t.verticalScrollbarWidth}onConfigurationChanged(e){const i=this._context.configuration.options.get(102);return this._useShadows=i.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}class Zse{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class Yse{constructor(e,t){this.lineNumber=e,this.ranges=t}}function Xse(o){return new Zse(o)}function Qse(o){return new Yse(o.lineNumber,o.ranges.map(Xse))}class $i extends Ag{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(66),this._roundedSelection=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(66),this._roundedSelection=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let s=null,r=null;if(i&&i.length>0&&t.length>0){const a=t[0].lineNumber;if(a===e.startLineNumber)for(let d=0;!s&&d=0;d--)i[d].lineNumber===l&&(r=i[d].ranges[0]);s&&!s.startStyle&&(s=null),r&&!r.startStyle&&(r=null)}for(let a=0,l=t.length;a0){const f=t[a-1].ranges[0].left,m=t[a-1].ranges[0].left+t[a-1].ranges[0].width;cC(c-f)f&&(h.top=1),cC(u-m)'}_actualRenderOneSelection(e,t,i,n){if(n.length===0)return;const s=!!n[0].ranges[0].startStyle,r=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),l=n[0].lineNumber,d=n[n.length-1].lineNumber;for(let c=0,u=n.length;c1,d)}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map(([r,a])=>r+a)}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}$i.SELECTION_CLASS_NAME="selected-text";$i.SELECTION_TOP_LEFT="top-left-radius";$i.SELECTION_BOTTOM_LEFT="bottom-left-radius";$i.SELECTION_TOP_RIGHT="top-right-radius";$i.SELECTION_BOTTOM_RIGHT="bottom-right-radius";$i.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background";$i.ROUNDED_PIECE_WIDTH=10;Zr((o,e)=>{const t=o.getColor(Ite);t&&!t.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${t}; }`)});function cC(o){return o<0?-o:o}class N4{constructor(e,t,i,n,s,r,a){this.top=e,this.left=t,this.paddingLeft=i,this.width=n,this.height=s,this.textContent=r,this.textContentClassName=a}}class T4{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(50);this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Ht(document.createElement("div")),this._domNode.setClassName(`cursor ${op}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),Jn(this._domNode,i),this._domNode.setDisplay("none"),this._position=new z(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),Jn(this._domNode,i),!0}onCursorPositionChanged(e,t){return t?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,s]=dY(i,t-1);return[new z(e,n+1),i.substring(n,s)]}_prepareRender(e){let t="",i="";const[n,s]=this._getGraphemeAwarePosition();if(this._cursorStyle===Vn.Line||this._cursorStyle===Vn.LineThin){const h=e.visibleRangeForPosition(n);if(!h||h.outsideRenderedLine)return null;const g=Je(this._domNode.domNode);let f;this._cursorStyle===Vn.Line?(f=aO(g,this._lineCursorWidth>0?this._lineCursorWidth:2),f>2&&(t=s,i=this._getTokenClassName(n))):f=aO(g,1);let m=h.left,v=0;f>=2&&m>=1&&(v=1,m-=v);const _=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta;return new N4(_,m,v,f,this._lineHeight,t,i)}const r=e.linesVisibleRangesForRange(new k(n.lineNumber,n.column,n.lineNumber,n.column+s.length),!1);if(!r||r.length===0)return null;const a=r[0];if(a.outsideRenderedLine||a.ranges.length===0)return null;const l=a.ranges[0],d=s===" "?this._typicalHalfwidthCharacterWidth:l.width<1?this._typicalHalfwidthCharacterWidth:l.width;this._cursorStyle===Vn.Block&&(t=s,i=this._getTokenClassName(n));let c=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,u=this._lineHeight;return(this._cursorStyle===Vn.Underline||this._cursorStyle===Vn.UnderlineThin)&&(c+=this._lineHeight-2,u=2),new N4(c,l.left,0,d,u,t,i)}_getTokenClassName(e){const t=this._context.viewModel.getViewLineData(e.lineNumber),i=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(i)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${op} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class qv extends wo{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new T4(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=Ht(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new qr,this._cursorFlatBlinkInterval=new kM,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let i=0,n=this._secondaryCursors.length;it.length){const s=this._secondaryCursors.length-t.length;for(let r=0;r{for(let n=0,s=e.ranges.length;n{this._isVisible?this._hide():this._show()},qv.BLINK_INTERVAL,Je(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},qv.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case Vn.Line:e+=" cursor-line-style";break;case Vn.Block:e+=" cursor-block-style";break;case Vn.Underline:e+=" cursor-underline-style";break;case Vn.LineThin:e+=" cursor-line-thin-style";break;case Vn.BlockOutline:e+=" cursor-block-outline-style";break;case Vn.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const t=o.getColor(Y7);if(t){let i=o.getColor(mne);i||(i=t.opposite()),e.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${t}; border-color: ${t}; color: ${i}; }`),xa(o.type)&&e.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${i}; border-right: 1px solid ${i}; }`)}});const hx=()=>{throw new Error("Invalid change accessor")};class Jse extends wo{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(143);this._lineHeight=t.get(66),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=Ht(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=Ht(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const n of e)t.set(n.id,n);let i=!1;return this._context.viewModel.changeWhitespace(n=>{const s=Object.keys(this._zones);for(let r=0,a=s.length;r{const n={addZone:s=>(t=!0,this._addZone(i,s)),removeZone:s=>{s&&(t=this._removeZone(i,s)||t)},layoutZone:s=>{s&&(t=this._layoutZone(i,s)||t)}};eoe(e,n),n.addZone=hx,n.removeZone=hx,n.layoutZone=hx}),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),s={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:Ht(t.domNode),marginDomNode:t.marginDomNode?Ht(t.marginDomNode):null};return this._safeCallOnComputedHeight(s.delegate,i.heightInPx),s.domNode.setPosition("absolute"),s.domNode.domNode.style.width="100%",s.domNode.setDisplay("none"),s.domNode.setAttribute("monaco-view-zone",s.whitespaceId),this.domNode.appendChild(s.domNode),s.marginDomNode&&(s.marginDomNode.setPosition("absolute"),s.marginDomNode.domNode.style.width="100%",s.marginDomNode.setDisplay("none"),s.marginDomNode.setAttribute("monaco-view-zone",s.whitespaceId),this.marginDomNode.appendChild(s.marginDomNode)),this._zones[s.whitespaceId]=s,this.setShouldRender(),s.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){return this._zones.hasOwnProperty(e)?!!this._zones[e].delegate.suppressMouseDown:!1}_heightInPixels(e){return typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(t)}catch(i){nt(i)}}_safeCallOnDomNodeTop(e,t){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(t)}catch(i){nt(i)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const r of t)this._zones[r.id].isInHiddenArea||(i[r.id]=r,n=!0);const s=Object.keys(this._zones);for(let r=0,a=s.length;ra)continue;const g=h.startLineNumber===a?h.startColumn:d.minColumn,f=h.endLineNumber===a?h.endColumn:d.maxColumn;g=R.endOffset&&(E++,R=i&&i[E]),$!==9&&$!==32||h&&!x&&O<=I)continue;if(u&&O>=y&&O<=I&&$===32){const oe=O-1>=0?a.charCodeAt(O-1):0,Le=O+1=0?a.charCodeAt(O-1):0;if($===32&&oe!==32&&oe!==9)continue}if(i&&(!R||R.startOffset>O||R.endOffset<=O))continue;const K=e.visibleRangeForPosition(new z(t,O+1));K&&(r?(j=Math.max(j,K.left),$===9?S+=this._renderArrow(g,v,K.left):S+=``):$===9?S+=`
${w?"→":"→"}
`:S+=`
${String.fromCharCode(C)}
`)}return r?(j=Math.round(j+v),``+S+""):S}_renderArrow(e,t,i){const n=t/7,s=t,r=e/2,a=i,l={x:0,y:n/2},d={x:100/125*s,y:l.y},c={x:d.x-.2*d.x,y:d.y+.2*d.x},u={x:c.x+.1*d.x,y:c.y+.1*d.x},h={x:u.x+.35*d.x,y:u.y-.35*d.x},g={x:h.x,y:-h.y},f={x:u.x,y:-u.y},m={x:c.x,y:-c.y},v={x:d.x,y:-d.y},_={x:l.x,y:-l.y};return``}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class M4{constructor(e){const t=e.options,i=t.get(50),n=t.get(38);n==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):n==="svg"?(this.renderWhitespace=t.get(98),this.renderWithSVG=!0):(this.renderWhitespace=t.get(98),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(66),this.stopRenderingLineAfter=t.get(116)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}var roe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},aoe=function(o,e){return function(t,i){e(t,i,o)}};let gE=class extends r0{constructor(e,t,i,n,s,r,a){super(),this._instantiationService=a,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new Ae(1,1,1,1)],this._renderAnimationFrame=null;const l=new fse(t,n,s,e);this._context=new ioe(t,i,n),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(cE,this._context,l,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=Ht(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=Ht(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=Ht(document.createElement("div")),Fl.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new yse(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new Ky(this._context,this._linesContent),this._viewZones=new Jse(this._context),this._viewParts.push(this._viewZones);const d=new Use(this._context);this._viewParts.push(d);const c=new Gse(this._context);this._viewParts.push(c);const u=new mse(this._context);this._viewParts.push(u),u.addDynamicOverlay(new Cse(this._context)),u.addDynamicOverlay(new $i(this._context)),u.addDynamicOverlay(new Dse(this._context)),u.addDynamicOverlay(new Sse(this._context)),u.addDynamicOverlay(new ooe(this._context));const h=new _se(this._context);this._viewParts.push(h),h.addDynamicOverlay(new wse(this._context)),h.addDynamicOverlay(new Ose(this._context)),h.addDynamicOverlay(new Pse(this._context)),h.addDynamicOverlay(new c0(this._context)),this._glyphMarginWidgets=new Tse(this._context),this._viewParts.push(this._glyphMarginWidgets);const g=new og(this._context);g.getDomNode().appendChild(this._viewZones.marginDomNode),g.getDomNode().appendChild(h.getDomNode()),g.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(g),this._contentWidgets=new vse(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new qv(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new zse(this._context),this._viewParts.push(this._overlayWidgets);const f=new qse(this._context);this._viewParts.push(f);const m=new soe(this._context);this._viewParts.push(m);const v=new Hse(this._context);if(this._viewParts.push(v),d){const _=this._scrollbar.getOverviewRulerLayoutInfo();_.parent.insertBefore(d.getDomNode(),_.insertBefore)}this._linesContent.appendChild(u.getDomNode()),this._linesContent.appendChild(f.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(g.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(c.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(v.getDomNode()),this._overflowGuardContainer.appendChild(m.domNode),this.domNode.appendChild(this._overflowGuardContainer),r?r.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new gne(this._context,l,this._createPointerHandlerHelper()))}_computeGlyphMarginLaneCount(){const e=this._context.viewModel.model;let t=[];t=t.concat(e.getAllMarginDecorations().map(s=>{var r,a;const l=(a=(r=s.options.glyphMargin)===null||r===void 0?void 0:r.position)!==null&&a!==void 0?a:Wh.Left;return{range:s.range,lane:l}})),t=t.concat(this._glyphMarginWidgets.getWidgets().map(s=>({range:e.validateRange(s.preference.range),lane:s.preference.lane}))),t.sort((s,r)=>k.compareRangesUsingStarts(s.range,r.range));let i=null,n=null;for(const s of t)if(s.lane===Wh.Left&&(!i||k.compareRangesUsingEnds(i,s.range)<0)&&(i=s.range),s.lane===Wh.Right&&(!n||k.compareRangesUsingEnds(n,s.range)<0)&&(n=s.range),i&&n){if(i.endLineNumber{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new Uie(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new z(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const t=this._context.configuration.options.get(143);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(140)+" "+dE(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new Ci;if(this._renderAnimationFrame===null){const e=this._createCoordinatedRendering();this._renderAnimationFrame=fE.INSTANCE.scheduleCoordinatedRendering({window:Je(this.domNode.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new Ci;try{return e.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new Ci;return e.renderText()},prepareRender:(t,i)=>{if(this._store.isDisposed)throw new Ci;return e.prepareRender(t,i)},render:(t,i)=>{if(this._store.isDisposed)throw new Ci;return e.render(t,i)}})}}_flushAccumulatedAndRenderNow(){const e=this._createCoordinatedRendering();Nc(()=>e.prepareRenderText());const t=Nc(()=>e.renderText());if(t){const[i,n]=t;Nc(()=>e.prepareRender(i,n)),Nc(()=>e.render(i,n))}}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{this._shouldRecomputeGlyphMarginLanes&&(this._shouldRecomputeGlyphMarginLanes=!1,this._context.configuration.setGlyphMarginDecorationLaneCount(this._computeGlyphMarginLaneCount())),Ec.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return null;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new noe(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender()),[e,new Fie(this._context.viewLayout,i,this._viewLines)]},prepareRender:(e,t)=>{for(const i of e)i.prepareRender(t)},render:(e,t)=>{for(const i of e)i.render(t),i.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){const i=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const s=this._viewLines.visibleRangeForPosition(new z(n.lineNumber,n.column));return s?s.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?Uy.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new Kse(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const i of this._viewParts)i.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var t,i,n,s,r,a,l,d;this._contentWidgets.setWidgetPosition(e.widget,(i=(t=e.position)===null||t===void 0?void 0:t.position)!==null&&i!==void 0?i:null,(s=(n=e.position)===null||n===void 0?void 0:n.secondaryPosition)!==null&&s!==void 0?s:null,(a=(r=e.position)===null||r===void 0?void 0:r.preference)!==null&&a!==void 0?a:null,(d=(l=e.position)===null||l===void 0?void 0:l.positionAffinity)!==null&&d!==void 0?d:null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){const t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};gE=roe([aoe(6,qe)],gE);function Nc(o){try{return o()}catch(e){return nt(e),null}}class fE{constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{const t=this._coordinatedRenderings.indexOf(e);if(t!==-1&&(this._coordinatedRenderings.splice(t,1),this._coordinatedRenderings.length===0)){for(const[i,n]of this._animationFrameRunners)n.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){const t=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,gw(e,t,100))}}_onRenderScheduled(){const e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(const i of e)Nc(()=>i.prepareRenderText());const t=[];for(let i=0,n=e.length;is.renderText())}for(let i=0,n=e.length;is.prepareRender(a,l))}for(let i=0,n=e.length;is.render(a,l))}}}fE.INSTANCE=new fE;class pB{constructor(e,t,i,n,s,r,a){this.id=e,this.label=t,this.alias=i,this.metadata=n,this._precondition=s,this._run=r,this._contextKeyService=a}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}function fu(o){let e=0,t=0,i=0,n=0;for(let s=0,r=o.length;s=$o&&(t=t-o%$o),t}function hoe(o,e){return o.reduce((t,i)=>Ti(t,e(i)),Ms)}function mB(o,e){return o===e}function Zv(o,e){const t=o,i=e;if(i-t<=0)return Ms;const s=Math.floor(t/$o),r=Math.floor(i/$o),a=i-r*$o;if(s===r){const l=t-s*$o;return Qi(0,a-l)}else return Qi(r-s,a)}function lp(o,e){return o=e}function Of(o){return Qi(o.lineNumber-1,o.column-1)}function zh(o,e){const t=o,i=Math.floor(t/$o),n=t-i*$o,s=e,r=Math.floor(s/$o),a=s-r*$o;return new k(i+1,n+1,r+1,a+1)}function goe(o){const e=Rl(o);return Qi(e.length-1,e[e.length-1].length)}class Td{static fromModelContentChanges(e){return e.map(i=>{const n=k.lift(i.range);return new Td(Of(n.getStartPosition()),Of(n.getEndPosition()),goe(i.text))}).reverse()}constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}toString(){return`[${gr(this.startOffset)}...${gr(this.endOffset)}) -> ${gr(this.newLength)}`}}class foe{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(t=>oA.from(t))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):null;return i===null?null:Zv(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?Qi(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):Qi(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=gr(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?Qi(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):Qi(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx>5;if(n===0){const r=1<this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;;){const s=this.lineTokens,r=s.getCount();let a=null;if(this.lineTokenOffset1e3))break;if(i>1500)break}const n=coe(e,t,this.lineIdx,this.lineCharOffset);return new wc(n,0,-1,un.getEmpty(),new Sh(n))}}class Coe{constructor(e,t){this.text=e,this._offset=Ms,this.idx=0;const i=t.getRegExpStr(),n=i?new RegExp(i+`| `,"gi"):null,s=[];let r,a=0,l=0,d=0,c=0;const u=[];for(let f=0;f<60;f++)u.push(new wc(Qi(0,f),0,-1,un.getEmpty(),new Sh(Qi(0,f))));const h=[];for(let f=0;f<60;f++)h.push(new wc(Qi(1,f),0,-1,un.getEmpty(),new Sh(Qi(1,f))));if(n)for(n.lastIndex=0;(r=n.exec(e))!==null;){const f=r.index,m=r[0];if(m===` -`)a++,l=f+1;else{if(d!==f){let v;if(c===a){const _=f-d;if(__oe(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(i.kind===2&&i.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}}function _oe(o){let e=qo(o);return/^[\w ]+/.test(o)&&(e=`\\b${e}`),/[\w ]+$/.test(o)&&(e=`${e}\\b`),e}class bB{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=lA.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function voe(o){if(o.length===0)return null;if(o.length===1)return o[0];let e=0;function t(){if(e>=o.length)return null;const r=e,a=o[r].listHeight;for(e++;e=2?CB(r===0&&e===o.length?o:o.slice(r,e),!1):o[r]}let i=t(),n=t();if(!n)return i;for(let r=t();r;r=t())P4(i,n)<=P4(n,r)?(i=gx(i,n),n=r):n=gx(n,r);return gx(i,n)}function CB(o,e=!1){if(o.length===0)return null;if(o.length===1)return o[0];let t=o.length;for(;t>3;){const i=t>>1;for(let n=0;n=3?o[2]:null,e)}function P4(o,e){return Math.abs(o.listHeight-e.listHeight)}function gx(o,e){return o.listHeight===e.listHeight?Bl.create23(o,e,null,!1):o.listHeight>e.listHeight?boe(o,e):Coe(e,o)}function boe(o,e){o=o.toMutable();let t=o;const i=[];let n;for(;;){if(e.listHeight===t.listHeight){n=e;break}if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeLastElementMutable()}for(let s=i.length-1;s>=0;s--){const r=i[s];n?r.childrenLength>=3?n=Bl.create23(r.unappendChild(),n,null,!1):(r.appendChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?Bl.create23(o,n,null,!1):o}function Coe(o,e){o=o.toMutable();let t=o;const i=[];for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeFirstElementMutable()}let n=e;for(let s=i.length-1;s>=0;s--){const r=i[s];n?r.childrenLength>=3?n=Bl.create23(n,r.unprependChild(),null,!1):(r.prependChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?Bl.create23(n,o,null,!1):o}class woe{constructor(e){this.lastOffset=Ms,this.nextNodes=[e],this.offsets=[Ms],this.idxs=[]}readLongestNodeAt(e,t){if(lp(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=Gm(this.nextNodes);if(!i)return;const n=Gm(this.offsets);if(lp(e,n))return;if(lp(n,e))if(Ti(n,i.length)<=e)this.nextNodeAfterCurrent();else{const s=fx(i);s!==-1?(this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const s=fx(i);if(s===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)}}}}nextNodeAfterCurrent(){for(;;){const e=Gm(this.offsets),t=Gm(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const i=Gm(this.nextNodes),n=fx(i,this.idxs[this.idxs.length-1]);if(n!==-1){this.nextNodes.push(i.getChild(n)),this.offsets.push(Ti(e,t.length)),this.idxs[this.idxs.length-1]=n;break}else this.idxs.pop()}}}function fx(o,e=-1){for(;;){if(e++,e>=o.childrenLength)return-1;if(o.getChild(e))return e}}function Gm(o){return o.length>0?o[o.length-1]:void 0}function pE(o,e,t,i){return new Soe(o,e,t,i).parseDocument()}class Soe{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new woe(i):void 0,this.positionMapper=new coe(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(un.getEmpty(),0);return e||(e=Bl.getEmpty()),e}parseList(e,t){const i=[];for(;;){let s=this.tryReadChildFromCache(e);if(!s){const r=this.tokenizer.peek();if(!r||r.kind===2&&r.bracketIds.intersects(e))break;s=this.parseChild(e,t+1)}s.kind===4&&s.childrenLength===0||i.push(s)}return this.oldNodeReader?voe(i):CB(i,this.createImmutableLists)}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(t===null||!Aw(t)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),n=>t!==null&&!lp(n.length,t)?!1:n.canBeReused(e));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(e,t){this._itemsConstructed++;const i=this.tokenizer.read();switch(i.kind){case 2:return new foe(i.bracketIds,i.length);case 0:return i.astNode;case 1:{if(t>300)return new Sh(i.length);const n=e.merge(i.bracketIds),s=this.parseList(n,t+1),r=this.tokenizer.peek();return r&&r.kind===2&&(r.bracketId===i.bracketId||r.bracketIds.intersects(i.bracketIds))?(this.tokenizer.read(),Yv.create(i.astNode,s,r.astNode)):Yv.create(i.astNode,s,null)}default:throw new Error("unexpected")}}}function Ow(o,e){if(o.length===0)return e;if(e.length===0)return o;const t=new Hd(O4(o)),i=O4(e);i.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let n=t.dequeue();function s(d){if(d===void 0){const u=t.takeWhile(h=>!0)||[];return n&&u.unshift(n),u}const c=[];for(;n&&!Aw(d);){const[u,h]=n.splitAt(d);c.push(u),d=Zv(u.lengthAfter,d),n=h??t.dequeue()}return Aw(d)||c.push(new Tc(!1,d,d)),c}const r=[];function a(d,c,u){if(r.length>0&&mB(r[r.length-1].endOffset,d)){const h=r[r.length-1];r[r.length-1]=new Td(h.startOffset,c,Ti(h.newLength,u))}else r.push({startOffset:d,endOffset:c,newLength:u})}let l=Ms;for(const d of i){const c=s(d.lengthBefore);if(d.modified){const u=loe(c,g=>g.lengthBefore),h=Ti(l,u);a(l,h,d.lengthAfter),l=h}else for(const u of c){const h=l;l=Ti(l,u.lengthBefore),u.modified&&a(h,l,u.lengthAfter)}}return r}class Tc{constructor(e,t,i){this.modified=e,this.lengthBefore=t,this.lengthAfter=i}splitAt(e){const t=Zv(e,this.lengthAfter);return mB(t,Ms)?[this,void 0]:this.modified?[new Tc(this.modified,this.lengthBefore,e),new Tc(this.modified,Ms,t)]:[new Tc(this.modified,e,e),new Tc(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${gr(this.lengthBefore)} -> ${gr(this.lengthAfter)}`}}function O4(o){const e=[];let t=Ms;for(const i of o){const n=Zv(t,i.startOffset);Aw(n)||e.push(new Tc(!1,n,n));const s=Zv(i.startOffset,i.endOffset);e.push(new Tc(!0,s,i.newLength)),t=i.endOffset}return e}class yoe extends q{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new W,this.denseKeyProvider=new _B,this.brackets=new bB(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)e.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const i=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),n=new moe(this.textModel.getValue(),i);this.initialAstWithoutTokens=pE(n,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const e=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map(i=>new Td(Qi(i.fromLineNumber-1,0),Qi(i.toLineNumber,0),Qi(i.toLineNumber-i.fromLineNumber+1,0)));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=Td.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const i=Ow(this.queuedTextEdits,e);this.queuedTextEdits=i,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=Ow(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,i){const n=t,s=new vB(this.textModel,this.brackets);return pE(s,e,n,i)}getBracketsInRange(e,t){this.flushQueue();const i=Qi(e.startLineNumber-1,e.startColumn-1),n=Qi(e.endLineNumber-1,e.endColumn-1);return new Dl(s=>{const r=this.initialAstWithoutTokens||this.astWithTokens;mE(r,Ms,r.length,i,n,s,0,0,new Map,t)})}getBracketPairsInRange(e,t){this.flushQueue();const i=Of(e.getStartPosition()),n=Of(e.getEndPosition());return new Dl(s=>{const r=this.initialAstWithoutTokens||this.astWithTokens,a=new Loe(s,t,this.textModel);_E(r,Ms,r.length,i,n,a,0,new Map)})}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return SB(t,Ms,t.length,Of(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return wB(t,Ms,t.length,Of(e))}}function wB(o,e,t,i){if(o.kind===4||o.kind===2){const n=[];for(const s of o.children)t=Ti(e,s.length),n.push({nodeOffsetStart:e,nodeOffsetEnd:t}),e=t;for(let s=n.length-1;s>=0;s--){const{nodeOffsetStart:r,nodeOffsetEnd:a}=n[s];if(lp(r,i)){const l=wB(o.children[s],r,a,i);if(l)return l}}return null}else{if(o.kind===3)return null;if(o.kind===1){const n=zh(e,t);return{bracketInfo:o.bracketInfo,range:n}}}return null}function SB(o,e,t,i){if(o.kind===4||o.kind===2){for(const n of o.children){if(t=Ti(e,n.length),lp(i,t)){const s=SB(n,e,t,i);if(s)return s}e=t}return null}else{if(o.kind===3)return null;if(o.kind===1){const n=zh(e,t);return{bracketInfo:o.bracketInfo,range:n}}}return null}function mE(o,e,t,i,n,s,r,a,l,d,c=!1){if(r>200)return!0;e:for(;;)switch(o.kind){case 4:{const u=o.childrenLength;for(let h=0;h200)return!0;let d=!0;if(o.kind===2){let c=0;if(a){let g=a.get(o.openingBracket.text);g===void 0&&(g=0),c=g,g++,a.set(o.openingBracket.text,g)}const u=Ti(e,o.openingBracket.length);let h=-1;if(s.includeMinIndentation&&(h=o.computeMinIndentation(e,s.textModel)),d=s.push(new ooe(zh(e,t),zh(e,u),o.closingBracket?zh(Ti(u,((l=o.child)===null||l===void 0?void 0:l.length)||Ms),t):void 0,r,c,o,h)),e=u,d&&o.child){const g=o.child;if(t=Ti(e,g.length),dp(e,n)&&S_(t,i)&&(d=_E(g,e,t,i,n,s,r+1,a),!d))return!1}a==null||a.set(o.openingBracket.text,c)}else{let c=e;for(const u of o.children){const h=c;if(c=Ti(c,u.length),dp(h,n)&&dp(i,c)&&(d=_E(u,h,c,i,n,s,r,a),!d))return!1}}return d}class Doe extends q{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new An),this.onDidChangeEmitter=new W,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(i=>{var n;(!i.languageId||!((n=this.bracketPairsTree.value)===null||n===void 0)&&n.object.didLanguageChange(i.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;(t=this.bracketPairsTree.value)===null||t===void 0||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;(e=this.bracketPairsTree.value)===null||e===void 0||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;(t=this.bracketPairsTree.value)===null||t===void 0||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const e=new de;this.bracketPairsTree.value=xoe(e.add(new yoe(this.textModel,t=>this.languageConfigurationService.getLanguageConfiguration(t))),e),e.add(this.bracketPairsTree.value.object.onDidChange(t=>this.onDidChangeEmitter.fire(t))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e,!1))||Dl.empty}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e,!0))||Dl.empty}getBracketsInRange(e,t=!1){var i;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((i=this.bracketPairsTree.value)===null||i===void 0?void 0:i.object.getBracketsInRange(e,t))||Dl.empty}findMatchingBracketUp(e,t,i){const n=this.textModel.validatePosition(t),s=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column);if(this.canBuildAST){const r=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew.getClosingBracketInfo(e);if(!r)return null;const a=this.getBracketPairsInRange(k.fromPositions(t,t)).findLast(l=>r.closes(l.openingBracketInfo));return a?a.openingBracketRange:null}else{const r=e.toLowerCase(),a=this.languageConfigurationService.getLanguageConfiguration(s).brackets;if(!a)return null;const l=a.textIsBracket[r];return l?uC(this._findMatchingBracketUp(l,n,px(i))):null}}matchBracket(e,t){if(this.canBuildAST){const i=this.getBracketPairsInRange(k.fromPositions(e,e)).filter(n=>n.closingBracketRange!==void 0&&(n.openingBracketRange.containsPosition(e)||n.closingBracketRange.containsPosition(e))).findLastMaxBy(ur(n=>n.openingBracketRange.containsPosition(e)?n.openingBracketRange:n.closingBracketRange,k.compareRangesUsingStarts));return i?[i.openingBracketRange,i.closingBracketRange]:null}else{const i=px(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){const s=t.getCount(),r=t.getLanguageId(n);let a=Math.max(0,e.column-1-i.maxBracketLength);for(let d=n-1;d>=0;d--){const c=t.getEndOffset(d);if(c<=a)break;if(Za(t.getStandardTokenType(d))||t.getLanguageId(d)!==r){a=c;break}}let l=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let d=n+1;d=l)break;if(Za(t.getStandardTokenType(d))||t.getLanguageId(d)!==r){l=c;break}}return{searchStartOffset:a,searchEndOffset:l}}_matchBracket(e,t){const i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),s=this.textModel.getLineContent(i),r=n.findTokenIndexAtOffset(e.column-1);if(r<0)return null;const a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!Za(n.getStandardTokenType(r))){let{searchStartOffset:l,searchEndOffset:d}=this._establishBracketSearchOffsets(e,n,a,r),c=null;for(;;){const u=Nr.findNextBracketInRange(a.forwardRegex,i,s,l,d);if(!u)break;if(u.startColumn<=e.column&&e.column<=u.endColumn){const h=s.substring(u.startColumn-1,u.endColumn-1).toLowerCase(),g=this._matchFoundBracket(u,a.textIsBracket[h],a.textIsOpenBracket[h],t);if(g){if(g instanceof fd)return null;c=g}}l=u.endColumn-1}if(c)return c}if(r>0&&n.getStartOffset(r)===e.column-1){const l=r-1,d=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(l)).brackets;if(d&&!Za(n.getStandardTokenType(l))){const{searchStartOffset:c,searchEndOffset:u}=this._establishBracketSearchOffsets(e,n,d,l),h=Nr.findPrevBracketInRange(d.reversedRegex,i,s,c,u);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){const g=s.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),f=this._matchFoundBracket(h,d.textIsBracket[g],d.textIsOpenBracket[g],t);if(f)return f instanceof fd?null:f}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const s=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return s?s instanceof fd?s:[e,s]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,s=e.reversedRegex;let r=-1,a=0;const l=(d,c,u,h)=>{for(;;){if(i&&++a%100===0&&!i())return fd.INSTANCE;const g=Nr.findPrevBracketInRange(s,d,c,u,h);if(!g)break;const f=c.substring(g.startColumn-1,g.endColumn-1).toLowerCase();if(e.isOpen(f)?r++:e.isClose(f)&&r--,r===0)return g;h=g.startColumn-1}return null};for(let d=t.lineNumber;d>=1;d--){const c=this.textModel.tokenization.getLineTokens(d),u=c.getCount(),h=this.textModel.getLineContent(d);let g=u-1,f=h.length,m=h.length;d===t.lineNumber&&(g=c.findTokenIndexAtOffset(t.column-1),f=t.column-1,m=t.column-1);let v=!0;for(;g>=0;g--){const _=c.getLanguageId(g)===n&&!Za(c.getStandardTokenType(g));if(_)v?f=c.getStartOffset(g):(f=c.getStartOffset(g),m=c.getEndOffset(g));else if(v&&f!==m){const b=l(d,h,f,m);if(b)return b}v=_}if(v&&f!==m){const _=l(d,h,f,m);if(_)return _}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,s=e.forwardRegex;let r=1,a=0;const l=(c,u,h,g)=>{for(;;){if(i&&++a%100===0&&!i())return fd.INSTANCE;const f=Nr.findNextBracketInRange(s,c,u,h,g);if(!f)break;const m=u.substring(f.startColumn-1,f.endColumn-1).toLowerCase();if(e.isOpen(m)?r++:e.isClose(m)&&r--,r===0)return f;h=f.endColumn-1}return null},d=this.textModel.getLineCount();for(let c=t.lineNumber;c<=d;c++){const u=this.textModel.tokenization.getLineTokens(c),h=u.getCount(),g=this.textModel.getLineContent(c);let f=0,m=0,v=0;c===t.lineNumber&&(f=u.findTokenIndexAtOffset(t.column-1),m=t.column-1,v=t.column-1);let _=!0;for(;f=1;a--){const l=this.textModel.tokenization.getLineTokens(a),d=l.getCount(),c=this.textModel.getLineContent(a);let u=d-1,h=c.length,g=c.length;if(a===i.lineNumber){u=l.findTokenIndexAtOffset(i.column-1),h=i.column-1,g=i.column-1;const m=l.getLanguageId(u);n!==m&&(n=m,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let f=!0;for(;u>=0;u--){const m=l.getLanguageId(u);if(n!==m){if(s&&r&&f&&h!==g){const _=Nr.findPrevBracketInRange(s.reversedRegex,a,c,h,g);if(_)return this._toFoundBracket(r,_);f=!1}n=m,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const v=!!s&&!Za(l.getStandardTokenType(u));if(v)f?h=l.getStartOffset(u):(h=l.getStartOffset(u),g=l.getEndOffset(u));else if(r&&s&&f&&h!==g){const _=Nr.findPrevBracketInRange(s.reversedRegex,a,c,h,g);if(_)return this._toFoundBracket(r,_)}f=v}if(r&&s&&f&&h!==g){const m=Nr.findPrevBracketInRange(s.reversedRegex,a,c,h,g);if(m)return this._toFoundBracket(r,m)}}return null}findNextBracket(e){var t;const i=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getFirstBracketAfter(i))||null;const n=this.textModel.getLineCount();let s=null,r=null,a=null;for(let l=i.lineNumber;l<=n;l++){const d=this.textModel.tokenization.getLineTokens(l),c=d.getCount(),u=this.textModel.getLineContent(l);let h=0,g=0,f=0;if(l===i.lineNumber){h=d.findTokenIndexAtOffset(i.column-1),g=i.column-1,f=i.column-1;const v=d.getLanguageId(h);s!==v&&(s=v,r=this.languageConfigurationService.getLanguageConfiguration(s).brackets,a=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew)}let m=!0;for(;hm.closingBracketRange!==void 0&&m.range.strictContainsRange(g));return f?[f.openingBracketRange,f.closingBracketRange]:null}const n=px(t),s=this.textModel.getLineCount(),r=new Map;let a=[];const l=(g,f)=>{if(!r.has(g)){const m=[];for(let v=0,_=f?f.brackets.length:0;v<_;v++)m[v]=0;r.set(g,m)}a=r.get(g)};let d=0;const c=(g,f,m,v,_)=>{for(;;){if(n&&++d%100===0&&!n())return fd.INSTANCE;const b=Nr.findNextBracketInRange(g.forwardRegex,f,m,v,_);if(!b)break;const C=m.substring(b.startColumn-1,b.endColumn-1).toLowerCase(),w=g.textIsBracket[C];if(w&&(w.isOpen(C)?a[w.index]++:w.isClose(C)&&a[w.index]--,a[w.index]===-1))return this._matchFoundBracket(b,w,!1,n);v=b.endColumn-1}return null};let u=null,h=null;for(let g=i.lineNumber;g<=s;g++){const f=this.textModel.tokenization.getLineTokens(g),m=f.getCount(),v=this.textModel.getLineContent(g);let _=0,b=0,C=0;if(g===i.lineNumber){_=f.findTokenIndexAtOffset(i.column-1),b=i.column-1,C=i.column-1;const S=f.getLanguageId(_);u!==S&&(u=S,h=this.languageConfigurationService.getLanguageConfiguration(u).brackets,l(u,h))}let w=!0;for(;_e==null?void 0:e.dispose()}}function px(o){if(typeof o>"u")return()=>!0;{const e=Date.now();return()=>Date.now()-e<=o}}class fd{constructor(){this._searchCanceledBrand=void 0}}fd.INSTANCE=new fd;function uC(o){return o instanceof fd?null:o}class koe extends q{constructor(e){super(),this.textModel=e,this.colorProvider=new yB,this.onDidChangeEmitter=new W,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(t=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i,n){return n?[]:t===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map(r=>({id:`bracket${r.range.toString()}-${r.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(r,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:r.range})).toArray():[]}getAllDecorations(e,t){return e===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new k(1,1,this.textModel.getLineCount(),1),e,t):[]}}class yB{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}}Zr((o,e)=>{const t=[Q8,J8,eB,tB,iB,nB],i=new yB;e.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${o.getColor(Tne)}; }`);const n=t.map(s=>o.getColor(s)).filter(s=>!!s).filter(s=>!s.isTransparent());for(let s=0;s<30;s++){const r=n[s%n.length];e.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(s)} { color: ${r}; }`)}});function hC(o){return o.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class Gn{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${hC(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${hC(this.oldText)}")`:`(replace@${this.oldPosition} "${hC(this.oldText)}" with "${hC(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const n=t.length;la(e,n,i),i+=4;for(let s=0;so.length)return!1;if(t){if(!cM(o,e))return!1;if(e.length===o.length)return!0;let s=e.length;return e.charAt(e.length-1)===i&&s--,o.charAt(s)===i}return e.charAt(e.length-1)!==i&&(e+=i),o.indexOf(e)===0}function DB(o){return o>=65&&o<=90||o>=97&&o<=122}function Noe(o,e=is){return e?DB(o.charCodeAt(0))&&o.charCodeAt(1)===58:!1}function Ya(o){return rw(o,!0)}class Toe{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:Sv(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t?!0:!e||!t?!1:this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,i=!1){if(e.scheme===t.scheme){if(e.scheme===ot.file)return vE(Ya(e),Ya(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(W4(e.authority,t.authority))return vE(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return ze.joinPath(e,...t)}basenameOrAuthority(e){return br(e)||e.authority}basename(e){return hn.basename(e.path)}extname(e){return hn.extname(e.path)}dirname(e){if(e.path.length===0)return e;let t;return e.scheme===ot.file?t=ze.file(o7(Ya(e))).path:(t=hn.dirname(e.path),e.authority&&t.length&&t.charCodeAt(0)!==47&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return e.scheme===ot.file?t=ze.file(s7(Ya(e))).path:t=hn.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!W4(e.authority,t.authority))return;if(e.scheme===ot.file){const s=PZ(Ya(e),Ya(t));return is?LB(s):s}let i=e.path||"/";const n=t.path||"/";if(this._ignorePathCasing(e)){let s=0;for(const r=Math.min(i.length,n.length);sF4(i).length&&i[i.length-1]===t}else{const i=e.path;return i.length>1&&i.charCodeAt(i.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=La){return V4(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=La){let i=!1;if(e.scheme===ot.file){const n=Ya(e);i=n!==void 0&&n.length===F4(n).length&&n[n.length-1]===t}else{t="/";const n=e.path;i=n.length===1&&n.charCodeAt(n.length-1)===47}return!i&&!V4(e,t)?e.with({path:e.path+"/"}):e}}const pi=new Toe(()=>!1),dA=pi.isEqual.bind(pi);pi.isEqualOrParent.bind(pi);pi.getComparisonKey.bind(pi);const Moe=pi.basenameOrAuthority.bind(pi),br=pi.basename.bind(pi),Aoe=pi.extname.bind(pi),qy=pi.dirname.bind(pi),Roe=pi.joinPath.bind(pi),Poe=pi.normalizePath.bind(pi),Ooe=pi.relativePath.bind(pi),B4=pi.resolvePath.bind(pi);pi.isAbsolutePath.bind(pi);const W4=pi.isEqualAuthority.bind(pi),V4=pi.hasTrailingPathSeparator.bind(pi);pi.removeTrailingPathSeparator.bind(pi);pi.addTrailingPathSeparator.bind(pi);var pu;(function(o){o.META_DATA_LABEL="label",o.META_DATA_DESCRIPTION="description",o.META_DATA_SIZE="size",o.META_DATA_MIME="mime";function e(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(r=>{const[a,l]=r.split(":");a&&l&&i.set(a,l)});const s=t.path.substring(0,t.path.indexOf(";"));return s&&i.set(o.META_DATA_MIME,s),i}o.parseMetaData=e})(pu||(pu={}));function tf(o){return o.toString()}class Dn{static create(e,t){const i=e.getAlternativeVersionId(),n=bE(e);return new Dn(i,i,n,n,t,t,[])}constructor(e,t,i,n,s,r,a){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=s,this.afterCursorState=r,this.changes=a}append(e,t,i,n,s){t.length>0&&(this.changes=Ioe(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=s}static _writeSelectionsSize(e){return 4+4*4*(e?e.length:0)}static _writeSelections(e,t,i){if(la(e,t?t.length:0,i),i+=4,t)for(const n of t)la(e,n.selectionStartLineNumber,i),i+=4,la(e,n.selectionStartColumn,i),i+=4,la(e,n.positionLineNumber,i),i+=4,la(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=aa(e,t);t+=4;for(let s=0;st.toString()).join(", ")}matchesResource(e){return(ze.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof Dn}append(e,t,i,n,s){this._data instanceof Dn&&this._data.append(e,t,i,n,s)}close(){this._data instanceof Dn&&(this._data=this._data.serialize())}open(){this._data instanceof Dn||(this._data=Dn.deserialize(this._data))}undo(){if(ze.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Dn&&(this._data=this._data.serialize());const e=Dn.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(ze.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Dn&&(this._data=this._data.serialize());const e=Dn.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof Dn&&(this._data=this._data.serialize()),this._data.byteLength+168}}class Foe{get resources(){return this._editStackElementsArr.map(e=>e.resource)}constructor(e,t,i){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map;for(const n of this._editStackElementsArr){const s=tf(n.resource);this._editStackElementsMap.set(s,n)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=tf(e);return this._editStackElementsMap.has(t)}setModel(e){const t=tf(ze.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=tf(e.uri);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).canAppend(e):!1}append(e,t,i,n,s){const r=tf(e.uri);this._editStackElementsMap.get(r).append(e,t,i,n,s)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=tf(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${br(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function bE(o){return o.getEOL()===` -`?0:1}function pd(o){return o?o instanceof xB||o instanceof Foe:!1}class cA{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);pd(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);pd(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const i=this._undoRedoService.getLastElement(this._model.uri);if(pd(i)&&i.canAppend(this._model))return i;const n=new xB(p("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(n,t),n}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],bE(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n){const s=this._getOrCreateEditStackElement(e,n),r=this._model.applyEdits(t,!0),a=cA._computeCursorState(i,r),l=r.map((d,c)=>({index:c,textChange:d.textChange}));return l.sort((d,c)=>d.textChange.oldPosition===c.textChange.oldPosition?d.index-c.index:d.textChange.oldPosition-c.textChange.oldPosition),s.append(this._model,l.map(d=>d.textChange),bE(this._model),this._model.getAlternativeVersionId(),a),a}static _computeCursorState(e,t){try{return e?e(t):null}catch(i){return nt(i),null}}}class Boe{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function Woe(o,e,t,i,n){n.spacesDiff=0,n.looksLikeAlignment=!1;let s;for(s=0;s0&&a>0||l>0&&d>0)return;const c=Math.abs(a-d),u=Math.abs(r-l);if(c===0){n.spacesDiff=u,u>0&&0<=l-1&&l-10?n++:w>1&&s++,Woe(r,a,v,C,u),u.looksLikeAlignment&&!(t&&e===u.spacesDiff)))continue;const x=u.spacesDiff;x<=d&&c[x]++,r=v,a=C}let h=t;n!==s&&(h=n{const v=c[m];v>f&&(f=v,g=m)}),g===4&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(g=2)}return{insertSpaces:h,tabSize:g}}function Hs(o){return(o.metadata&1)>>>0}function ui(o,e){o.metadata=o.metadata&254|e<<0}function ts(o){return(o.metadata&2)>>>1===1}function li(o,e){o.metadata=o.metadata&253|(e?1:0)<<1}function kB(o){return(o.metadata&4)>>>2===1}function z4(o,e){o.metadata=o.metadata&251|(e?1:0)<<2}function IB(o){return(o.metadata&64)>>>6===1}function $4(o,e){o.metadata=o.metadata&191|(e?1:0)<<6}function Voe(o){return(o.metadata&24)>>>3}function U4(o,e){o.metadata=o.metadata&231|e<<3}function Hoe(o){return(o.metadata&32)>>>5===1}function j4(o,e){o.metadata=o.metadata&223|(e?1:0)<<5}class EB{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,ui(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,z4(this,!1),$4(this,!1),U4(this,1),j4(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,li(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;z4(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),$4(this,this.options.glyphMarginClassName!==null),U4(this,this.options.stickiness),j4(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const pt=new EB(null,0,0);pt.parent=pt;pt.left=pt;pt.right=pt;ui(pt,0);class mx{constructor(){this.root=pt,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,s,r){return this.root===pt?[]:Zoe(this,e,t,i,n,s,r)}search(e,t,i,n){return this.root===pt?[]:Goe(this,e,t,i,n)}collectNodesFromOwner(e){return Koe(this,e)}collectNodesPostOrder(){return qoe(this)}insert(e){K4(this,e),this._normalizeDeltaIfNecessary()}delete(e){q4(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const s=i.start+n,r=i.end+n;i.setCachedOffsets(s,r,t)}acceptReplace(e,t,i,n){const s=Uoe(this,e,e+t);for(let r=0,a=s.length;rt||i===1?!1:i===2?!0:e}function $oe(o,e,t,i,n){const s=Voe(o),r=s===0||s===2,a=s===1||s===2,l=t-e,d=i,c=Math.min(l,d),u=o.start;let h=!1;const g=o.end;let f=!1;e<=u&&g<=t&&Hoe(o)&&(o.start=e,h=!0,o.end=e,f=!0);{const v=n?1:l>0?2:0;!h&&nf(u,r,e,v)&&(h=!0),!f&&nf(g,a,e,v)&&(f=!0)}if(c>0&&!n){const v=l>d?2:0;!h&&nf(u,r,e+c,v)&&(h=!0),!f&&nf(g,a,e+c,v)&&(f=!0)}{const v=n?1:0;!h&&nf(u,r,t,v)&&(o.start=e+d,h=!0),!f&&nf(g,a,t,v)&&(o.end=e+d,f=!0)}const m=d-l;h||(o.start=Math.max(0,u+m)),f||(o.end=Math.max(0,g+m)),o.start>o.end&&(o.end=o.start)}function Uoe(o,e,t){let i=o.root,n=0,s=0,r=0,a=0;const l=[];let d=0;for(;i!==pt;){if(ts(i)){li(i.left,!1),li(i.right,!1),i===i.parent.right&&(n-=i.parent.delta),i=i.parent;continue}if(!ts(i.left)){if(s=n+i.maxEnd,st){li(i,!0);continue}if(a=n+i.end,a>=e&&(i.setCachedOffsets(r,a,0),l[d++]=i),li(i,!0),i.right!==pt&&!ts(i.right)){n+=i.delta,i=i.right;continue}}return li(o.root,!1),l}function joe(o,e,t,i){let n=o.root,s=0,r=0,a=0;const l=i-(t-e);for(;n!==pt;){if(ts(n)){li(n.left,!1),li(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),mu(n),n=n.parent;continue}if(!ts(n.left)){if(r=s+n.maxEnd,rt){n.start+=l,n.end+=l,n.delta+=l,(n.delta<-1073741824||n.delta>1073741824)&&(o.requestNormalizeDelta=!0),li(n,!0);continue}if(li(n,!0),n.right!==pt&&!ts(n.right)){s+=n.delta,n=n.right;continue}}li(o.root,!1)}function Koe(o,e){let t=o.root;const i=[];let n=0;for(;t!==pt;){if(ts(t)){li(t.left,!1),li(t.right,!1),t=t.parent;continue}if(t.left!==pt&&!ts(t.left)){t=t.left;continue}if(t.ownerId===e&&(i[n++]=t),li(t,!0),t.right!==pt&&!ts(t.right)){t=t.right;continue}}return li(o.root,!1),i}function qoe(o){let e=o.root;const t=[];let i=0;for(;e!==pt;){if(ts(e)){li(e.left,!1),li(e.right,!1),e=e.parent;continue}if(e.left!==pt&&!ts(e.left)){e=e.left;continue}if(e.right!==pt&&!ts(e.right)){e=e.right;continue}t[i++]=e,li(e,!0)}return li(o.root,!1),t}function Goe(o,e,t,i,n){let s=o.root,r=0,a=0,l=0;const d=[];let c=0;for(;s!==pt;){if(ts(s)){li(s.left,!1),li(s.right,!1),s===s.parent.right&&(r-=s.parent.delta),s=s.parent;continue}if(s.left!==pt&&!ts(s.left)){s=s.left;continue}a=r+s.start,l=r+s.end,s.setCachedOffsets(a,l,i);let u=!0;if(e&&s.ownerId&&s.ownerId!==e&&(u=!1),t&&kB(s)&&(u=!1),n&&!IB(s)&&(u=!1),u&&(d[c++]=s),li(s,!0),s.right!==pt&&!ts(s.right)){r+=s.delta,s=s.right;continue}}return li(o.root,!1),d}function Zoe(o,e,t,i,n,s,r){let a=o.root,l=0,d=0,c=0,u=0;const h=[];let g=0;for(;a!==pt;){if(ts(a)){li(a.left,!1),li(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;continue}if(!ts(a.left)){if(d=l+a.maxEnd,dt){li(a,!0);continue}if(u=l+a.end,u>=e){a.setCachedOffsets(c,u,s);let f=!0;i&&a.ownerId&&a.ownerId!==i&&(f=!1),n&&kB(a)&&(f=!1),r&&!IB(a)&&(f=!1),f&&(h[g++]=a)}if(li(a,!0),a.right!==pt&&!ts(a.right)){l+=a.delta,a=a.right;continue}}return li(o.root,!1),h}function K4(o,e){if(o.root===pt)return e.parent=pt,e.left=pt,e.right=pt,ui(e,0),o.root=e,o.root;Yoe(o,e),hc(e.parent);let t=e;for(;t!==o.root&&Hs(t.parent)===1;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;Hs(i)===1?(ui(t.parent,0),ui(i,0),ui(t.parent.parent,1),t=t.parent.parent):(t===t.parent.right&&(t=t.parent,K_(o,t)),ui(t.parent,0),ui(t.parent.parent,1),q_(o,t.parent.parent))}else{const i=t.parent.parent.left;Hs(i)===1?(ui(t.parent,0),ui(i,0),ui(t.parent.parent,1),t=t.parent.parent):(t===t.parent.left&&(t=t.parent,q_(o,t)),ui(t.parent,0),ui(t.parent.parent,1),K_(o,t.parent.parent))}return ui(o.root,0),e}function Yoe(o,e){let t=0,i=o.root;const n=e.start,s=e.end;for(;;)if(Qoe(n,s,i.start+t,i.end+t)<0)if(i.left===pt){e.start-=t,e.end-=t,e.maxEnd-=t,i.left=e;break}else i=i.left;else if(i.right===pt){e.start-=t+i.delta,e.end-=t+i.delta,e.maxEnd-=t+i.delta,i.right=e;break}else t+=i.delta,i=i.right;e.parent=i,e.left=pt,e.right=pt,ui(e,1)}function q4(o,e){let t,i;if(e.left===pt?(t=e.right,i=e,t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta):e.right===pt?(t=e.left,i=e):(i=Xoe(e.right),t=i.right,t.start+=i.delta,t.end+=i.delta,t.delta+=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),i.start+=e.delta,i.end+=e.delta,i.delta=e.delta,(i.delta<-1073741824||i.delta>1073741824)&&(o.requestNormalizeDelta=!0)),i===o.root){o.root=t,ui(t,0),e.detach(),_x(),mu(t),o.root.parent=pt;return}const n=Hs(i)===1;if(i===i.parent.left?i.parent.left=t:i.parent.right=t,i===e?t.parent=i.parent:(i.parent===e?t.parent=i:t.parent=i.parent,i.left=e.left,i.right=e.right,i.parent=e.parent,ui(i,Hs(e)),e===o.root?o.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left!==pt&&(i.left.parent=i),i.right!==pt&&(i.right.parent=i)),e.detach(),n){hc(t.parent),i!==e&&(hc(i),hc(i.parent)),_x();return}hc(t),hc(t.parent),i!==e&&(hc(i),hc(i.parent));let s;for(;t!==o.root&&Hs(t)===0;)t===t.parent.left?(s=t.parent.right,Hs(s)===1&&(ui(s,0),ui(t.parent,1),K_(o,t.parent),s=t.parent.right),Hs(s.left)===0&&Hs(s.right)===0?(ui(s,1),t=t.parent):(Hs(s.right)===0&&(ui(s.left,0),ui(s,1),q_(o,s),s=t.parent.right),ui(s,Hs(t.parent)),ui(t.parent,0),ui(s.right,0),K_(o,t.parent),t=o.root)):(s=t.parent.left,Hs(s)===1&&(ui(s,0),ui(t.parent,1),q_(o,t.parent),s=t.parent.left),Hs(s.left)===0&&Hs(s.right)===0?(ui(s,1),t=t.parent):(Hs(s.left)===0&&(ui(s.right,0),ui(s,1),K_(o,s),s=t.parent.left),ui(s,Hs(t.parent)),ui(t.parent,0),ui(s.left,0),q_(o,t.parent),t=o.root));ui(t,0),_x()}function Xoe(o){for(;o.left!==pt;)o=o.left;return o}function _x(){pt.parent=pt,pt.delta=0,pt.start=0,pt.end=0}function K_(o,e){const t=e.right;t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta,e.right=t.left,t.left!==pt&&(t.left.parent=e),t.parent=e.parent,e.parent===pt?o.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,mu(e),mu(t)}function q_(o,e){const t=e.left;e.delta-=t.delta,(e.delta<-1073741824||e.delta>1073741824)&&(o.requestNormalizeDelta=!0),e.start-=t.delta,e.end-=t.delta,e.left=t.right,t.right!==pt&&(t.right.parent=e),t.parent=e.parent,e.parent===pt?o.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t,mu(e),mu(t)}function NB(o){let e=o.end;if(o.left!==pt){const t=o.left.maxEnd;t>e&&(e=t)}if(o.right!==pt){const t=o.right.maxEnd+o.delta;t>e&&(e=t)}return e}function mu(o){o.maxEnd=NB(o)}function hc(o){for(;o!==pt;){const e=NB(o);if(o.maxEnd===e)return;o.maxEnd=e,o=o.parent}}function Qoe(o,e,t,i){return o===t?e-i:o-t}class CE{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==it)return uA(this.right);let e=this;for(;e.parent!==it&&e.parent.left!==e;)e=e.parent;return e.parent===it?it:e.parent}prev(){if(this.left!==it)return TB(this.left);let e=this;for(;e.parent!==it&&e.parent.right!==e;)e=e.parent;return e.parent===it?it:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const it=new CE(null,0);it.parent=it;it.left=it;it.right=it;it.color=0;function uA(o){for(;o.left!==it;)o=o.left;return o}function TB(o){for(;o.right!==it;)o=o.right;return o}function hA(o){return o===it?0:o.size_left+o.piece.length+hA(o.right)}function gA(o){return o===it?0:o.lf_left+o.piece.lineFeedCnt+gA(o.right)}function vx(){it.parent=it}function G_(o,e){const t=e.right;t.size_left+=e.size_left+(e.piece?e.piece.length:0),t.lf_left+=e.lf_left+(e.piece?e.piece.lineFeedCnt:0),e.right=t.left,t.left!==it&&(t.left.parent=e),t.parent=e.parent,e.parent===it?o.root=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}function Z_(o,e){const t=e.left;e.left=t.right,t.right!==it&&(t.right.parent=e),t.parent=e.parent,e.size_left-=t.size_left+(t.piece?t.piece.length:0),e.lf_left-=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),e.parent===it?o.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}function gC(o,e){let t,i;if(e.left===it?(i=e,t=i.right):e.right===it?(i=e,t=i.left):(i=uA(e.right),t=i.right),i===o.root){o.root=t,t.color=0,e.detach(),vx(),o.root.parent=it;return}const n=i.color===1;if(i===i.parent.left?i.parent.left=t:i.parent.right=t,i===e?(t.parent=i.parent,y_(o,t)):(i.parent===e?t.parent=i:t.parent=i.parent,y_(o,t),i.left=e.left,i.right=e.right,i.parent=e.parent,i.color=e.color,e===o.root?o.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left!==it&&(i.left.parent=i),i.right!==it&&(i.right.parent=i),i.size_left=e.size_left,i.lf_left=e.lf_left,y_(o,i)),e.detach(),t.parent.left===t){const r=hA(t),a=gA(t);if(r!==t.parent.size_left||a!==t.parent.lf_left){const l=r-t.parent.size_left,d=a-t.parent.lf_left;t.parent.size_left=r,t.parent.lf_left=a,ad(o,t.parent,l,d)}}if(y_(o,t.parent),n){vx();return}let s;for(;t!==o.root&&t.color===0;)t===t.parent.left?(s=t.parent.right,s.color===1&&(s.color=0,t.parent.color=1,G_(o,t.parent),s=t.parent.right),s.left.color===0&&s.right.color===0?(s.color=1,t=t.parent):(s.right.color===0&&(s.left.color=0,s.color=1,Z_(o,s),s=t.parent.right),s.color=t.parent.color,t.parent.color=0,s.right.color=0,G_(o,t.parent),t=o.root)):(s=t.parent.left,s.color===1&&(s.color=0,t.parent.color=1,Z_(o,t.parent),s=t.parent.left),s.left.color===0&&s.right.color===0?(s.color=1,t=t.parent):(s.left.color===0&&(s.right.color=0,s.color=1,G_(o,s),s=t.parent.left),s.color=t.parent.color,t.parent.color=0,s.left.color=0,Z_(o,t.parent),t=o.root));t.color=0,vx()}function G4(o,e){for(y_(o,e);e!==o.root&&e.parent.color===1;)if(e.parent===e.parent.parent.left){const t=e.parent.parent.right;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.right&&(e=e.parent,G_(o,e)),e.parent.color=0,e.parent.parent.color=1,Z_(o,e.parent.parent))}else{const t=e.parent.parent.left;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.left&&(e=e.parent,Z_(o,e)),e.parent.color=0,e.parent.parent.color=1,G_(o,e.parent.parent))}o.root.color=0}function ad(o,e,t,i){for(;e!==o.root&&e!==it;)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=i),e=e.parent}function y_(o,e){let t=0,i=0;if(e!==o.root){for(;e!==o.root&&e===e.parent.right;)e=e.parent;if(e!==o.root)for(e=e.parent,t=hA(e.left)-e.size_left,i=gA(e.left)-e.lf_left,e.size_left+=t,e.lf_left+=i;e!==o.root&&(t!==0||i!==0);)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=i),e=e.parent}}const Ql=65535;function MB(o){let e;return o[o.length-1]<65536?e=new Uint16Array(o.length):e=new Uint32Array(o.length),e.set(o,0),e}class Joe{constructor(e,t,i,n,s){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=s}}function dd(o,e=!0){const t=[0];let i=1;for(let n=0,s=o.length;n126)&&(r=!1)}const a=new Joe(MB(o),i,n,s,r);return o.length=0,a}class Js{constructor(e,t,i,n,s){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=s}}class yh{constructor(e,t){this.buffer=e,this.lineStarts=t}}class tre{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==it&&e.iterate(e.root,i=>(i!==it&&this._pieces.push(i.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class ire{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n=e){i[n]=null,t=!0;continue}}if(t){const n=[];for(const s of i)s!==null&&n.push(s);this._cache=n}}}class nre{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new yh("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=it,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let s=0,r=e.length;s0){e[s].lineStarts||(e[s].lineStarts=dd(e[s].buffer));const a=new Js(s+1,{line:0,column:0},{line:e[s].lineStarts.length-1,column:e[s].buffer.length-e[s].lineStarts[e[s].lineStarts.length-1]},e[s].lineStarts.length-1,e[s].buffer.length);this._buffers.push(e[s]),n=this.rbInsertRight(n,a)}this._searchCache=new ire(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=Ql,i=t-Math.floor(t/3),n=i*2;let s="",r=0;const a=[];if(this.iterate(this.root,l=>{const d=this.getNodeContent(l),c=d.length;if(r<=i||r+c0){const l=s.replace(/\r\n|\r|\n/g,e);a.push(new yh(l,dd(l)))}this.create(a,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new tre(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==it;)if(n.left!==it&&n.lf_left+1>=e)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt+1>=e){i+=n.size_left;const s=this.getAccumulatedValue(n,e-n.lf_left-2);return i+=s+t-1}else e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right;return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0;const n=e;for(;t!==it;)if(t.size_left!==0&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){const s=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+s.index,s.index===0){const r=this.getOffsetAt(i+1,1),a=n-r;return new z(i+1,a+1)}return new z(i+1,s.remainder+1)}else if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===it){const s=this.getOffsetAt(i+1,1),r=n-e-s;return new z(i+1,r+1)}else t=t.right;return new z(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),s=this.getValueInRange2(i,n);return t?t!==this._EOL||!this._EOLNormalized?s.replace(/\r\n|\r|\n/g,t):t===this.getEOL()&&this._EOLNormalized?s:s.replace(/\r\n|\r|\n/g,t):s}getValueInRange2(e,t){if(e.node===t.node){const a=e.node,l=this._buffers[a.piece.bufferIndex].buffer,d=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return l.substring(d+e.remainder,d+t.remainder)}let i=e.node;const n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let r=n.substring(s+e.remainder,s+i.piece.length);for(i=i.next();i!==it;){const a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){r+=a.substring(l,l+t.remainder);break}else r+=a.substr(l,i.piece.length);i=i.next()}return r}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,s=>{if(s===it)return!0;const r=s.piece;let a=r.length;if(a===0)return!0;const l=this._buffers[r.bufferIndex].buffer,d=this._buffers[r.bufferIndex].lineStarts,c=r.start.line,u=r.end.line;let h=d[c]+r.start.column;if(n&&(l.charCodeAt(h)===10&&(h++,a--),e[t++]=i,i="",n=!1,a===0))return!0;if(c===u)return!this._EOLNormalized&&l.charCodeAt(h+a-1)===13?(n=!0,i+=l.substr(h,a-1)):i+=l.substr(h,a),!0;i+=this._EOLNormalized?l.substring(h,Math.max(h,d[c+1]-this._EOLLength)):l.substring(h,d[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let g=c+1;gw+f,t.reset(0)):(b=h.buffer,C=w=>w,t.reset(f));do if(v=t.next(b),v){if(C(v.index)>=m)return c;this.positionInBuffer(e,C(v.index)-g,_);const w=this.getLineFeedCnt(e.piece.bufferIndex,s,_),S=_.line===s.line?_.column-s.column+n:_.column+1,x=S+v[0].length;if(u[c++]=_h(new k(i+w,S,i+w,x),v,l),C(v.index)+v[0].length>=m||c>=d)return c}while(v);return c}findMatchesLineByLine(e,t,i,n){const s=[];let r=0;const a=new xf(t.wordSeparators,t.regex);let l=this.nodeAt2(e.startLineNumber,e.startColumn);if(l===null)return[];const d=this.nodeAt2(e.endLineNumber,e.endColumn);if(d===null)return[];let c=this.positionInBuffer(l.node,l.remainder);const u=this.positionInBuffer(d.node,d.remainder);if(l.node===d.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,c,u,t,i,n,r,s),s;let h=e.startLineNumber,g=l.node;for(;g!==d.node;){const m=this.getLineFeedCnt(g.piece.bufferIndex,c,g.piece.end);if(m>=1){const _=this._buffers[g.piece.bufferIndex].lineStarts,b=this.offsetInBuffer(g.piece.bufferIndex,g.piece.start),C=_[c.line+m],w=h===e.startLineNumber?e.startColumn:1;if(r=this.findMatchesInNode(g,a,h,w,c,this.positionInBuffer(g,C-b),t,i,n,r,s),r>=n)return s;h+=m}const v=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){const _=this.getLineContent(h).substring(v,e.endColumn-1);return r=this._findMatchesInLine(t,a,_,e.endLineNumber,v,r,s,i,n),s}if(r=this._findMatchesInLine(t,a,this.getLineContent(h).substr(v),h,v,r,s,i,n),r>=n)return s;h++,l=this.nodeAt2(h,1),g=l.node,c=this.positionInBuffer(l.node,l.remainder)}if(h===e.endLineNumber){const m=h===e.startLineNumber?e.startColumn-1:0,v=this.getLineContent(h).substring(m,e.endColumn-1);return r=this._findMatchesInLine(t,a,v,e.endLineNumber,m,r,s,i,n),s}const f=h===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(d.node,a,h,f,c,u,t,i,n,r,s),s}_findMatchesInLine(e,t,i,n,s,r,a,l,d){const c=e.wordSeparators;if(!l&&e.simpleSearch){const h=e.simpleSearch,g=h.length,f=i.length;let m=-g;for(;(m=i.indexOf(h,m+g))!==-1;)if((!c||TM(c,i,f,m,g))&&(a[r++]=new Ev(new k(n,m+1+s,n,m+1+g+s),null),r>=d))return r;return r}let u;t.reset(0);do if(u=t.next(i),u&&(a[r++]=_h(new k(n,u.index+1+s,n,u.index+1+u[0].length+s),u,l),r>=d))return r;while(u);return r}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==it){const{node:n,remainder:s,nodeStartOffset:r}=this.nodeAt(e),a=n.piece,l=a.bufferIndex,d=this.positionInBuffer(n,s);if(n.piece.bufferIndex===0&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&r+a.length===e&&t.lengthe){const c=[];let u=new Js(a.bufferIndex,d,a.end,this.getLineFeedCnt(a.bufferIndex,d,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,d));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.nodeCharCodeAt(n,s)===10){const m={line:u.start.line+1,column:0};u=new Js(u.bufferIndex,m,u.end,this.getLineFeedCnt(u.bufferIndex,m,u.end),u.length-1),t+=` +`)a++,l=f+1;else{if(d!==f){let v;if(c===a){const _=f-d;if(_woe(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(i.kind===2&&i.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}}function woe(o){let e=qo(o);return/^[\w ]+/.test(o)&&(e=`\\b${e}`),/[\w ]+$/.test(o)&&(e=`${e}\\b`),e}class bB{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=lA.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function Soe(o){if(o.length===0)return null;if(o.length===1)return o[0];let e=0;function t(){if(e>=o.length)return null;const r=e,a=o[r].listHeight;for(e++;e=2?CB(r===0&&e===o.length?o:o.slice(r,e),!1):o[r]}let i=t(),n=t();if(!n)return i;for(let r=t();r;r=t())P4(i,n)<=P4(n,r)?(i=gx(i,n),n=r):n=gx(n,r);return gx(i,n)}function CB(o,e=!1){if(o.length===0)return null;if(o.length===1)return o[0];let t=o.length;for(;t>3;){const i=t>>1;for(let n=0;n=3?o[2]:null,e)}function P4(o,e){return Math.abs(o.listHeight-e.listHeight)}function gx(o,e){return o.listHeight===e.listHeight?Bl.create23(o,e,null,!1):o.listHeight>e.listHeight?yoe(o,e):Loe(e,o)}function yoe(o,e){o=o.toMutable();let t=o;const i=[];let n;for(;;){if(e.listHeight===t.listHeight){n=e;break}if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeLastElementMutable()}for(let s=i.length-1;s>=0;s--){const r=i[s];n?r.childrenLength>=3?n=Bl.create23(r.unappendChild(),n,null,!1):(r.appendChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?Bl.create23(o,n,null,!1):o}function Loe(o,e){o=o.toMutable();let t=o;const i=[];for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeFirstElementMutable()}let n=e;for(let s=i.length-1;s>=0;s--){const r=i[s];n?r.childrenLength>=3?n=Bl.create23(n,r.unprependChild(),null,!1):(r.prependChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?Bl.create23(n,o,null,!1):o}class Doe{constructor(e){this.lastOffset=Ms,this.nextNodes=[e],this.offsets=[Ms],this.idxs=[]}readLongestNodeAt(e,t){if(lp(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=Gm(this.nextNodes);if(!i)return;const n=Gm(this.offsets);if(lp(e,n))return;if(lp(n,e))if(Ti(n,i.length)<=e)this.nextNodeAfterCurrent();else{const s=fx(i);s!==-1?(this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const s=fx(i);if(s===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)}}}}nextNodeAfterCurrent(){for(;;){const e=Gm(this.offsets),t=Gm(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const i=Gm(this.nextNodes),n=fx(i,this.idxs[this.idxs.length-1]);if(n!==-1){this.nextNodes.push(i.getChild(n)),this.offsets.push(Ti(e,t.length)),this.idxs[this.idxs.length-1]=n;break}else this.idxs.pop()}}}function fx(o,e=-1){for(;;){if(e++,e>=o.childrenLength)return-1;if(o.getChild(e))return e}}function Gm(o){return o.length>0?o[o.length-1]:void 0}function pE(o,e,t,i){return new xoe(o,e,t,i).parseDocument()}class xoe{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new Doe(i):void 0,this.positionMapper=new foe(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(un.getEmpty(),0);return e||(e=Bl.getEmpty()),e}parseList(e,t){const i=[];for(;;){let s=this.tryReadChildFromCache(e);if(!s){const r=this.tokenizer.peek();if(!r||r.kind===2&&r.bracketIds.intersects(e))break;s=this.parseChild(e,t+1)}s.kind===4&&s.childrenLength===0||i.push(s)}return this.oldNodeReader?Soe(i):CB(i,this.createImmutableLists)}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(t===null||!Aw(t)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),n=>t!==null&&!lp(n.length,t)?!1:n.canBeReused(e));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(e,t){this._itemsConstructed++;const i=this.tokenizer.read();switch(i.kind){case 2:return new voe(i.bracketIds,i.length);case 0:return i.astNode;case 1:{if(t>300)return new Sh(i.length);const n=e.merge(i.bracketIds),s=this.parseList(n,t+1),r=this.tokenizer.peek();return r&&r.kind===2&&(r.bracketId===i.bracketId||r.bracketIds.intersects(i.bracketIds))?(this.tokenizer.read(),Yv.create(i.astNode,s,r.astNode)):Yv.create(i.astNode,s,null)}default:throw new Error("unexpected")}}}function Ow(o,e){if(o.length===0)return e;if(e.length===0)return o;const t=new Hd(O4(o)),i=O4(e);i.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let n=t.dequeue();function s(d){if(d===void 0){const u=t.takeWhile(h=>!0)||[];return n&&u.unshift(n),u}const c=[];for(;n&&!Aw(d);){const[u,h]=n.splitAt(d);c.push(u),d=Zv(u.lengthAfter,d),n=h??t.dequeue()}return Aw(d)||c.push(new Tc(!1,d,d)),c}const r=[];function a(d,c,u){if(r.length>0&&mB(r[r.length-1].endOffset,d)){const h=r[r.length-1];r[r.length-1]=new Td(h.startOffset,c,Ti(h.newLength,u))}else r.push({startOffset:d,endOffset:c,newLength:u})}let l=Ms;for(const d of i){const c=s(d.lengthBefore);if(d.modified){const u=hoe(c,g=>g.lengthBefore),h=Ti(l,u);a(l,h,d.lengthAfter),l=h}else for(const u of c){const h=l;l=Ti(l,u.lengthBefore),u.modified&&a(h,l,u.lengthAfter)}}return r}class Tc{constructor(e,t,i){this.modified=e,this.lengthBefore=t,this.lengthAfter=i}splitAt(e){const t=Zv(e,this.lengthAfter);return mB(t,Ms)?[this,void 0]:this.modified?[new Tc(this.modified,this.lengthBefore,e),new Tc(this.modified,Ms,t)]:[new Tc(this.modified,e,e),new Tc(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${gr(this.lengthBefore)} -> ${gr(this.lengthAfter)}`}}function O4(o){const e=[];let t=Ms;for(const i of o){const n=Zv(t,i.startOffset);Aw(n)||e.push(new Tc(!1,n,n));const s=Zv(i.startOffset,i.endOffset);e.push(new Tc(!0,s,i.newLength)),t=i.endOffset}return e}class koe extends q{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new W,this.denseKeyProvider=new _B,this.brackets=new bB(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)e.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const i=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),n=new Coe(this.textModel.getValue(),i);this.initialAstWithoutTokens=pE(n,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const e=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map(i=>new Td(Qi(i.fromLineNumber-1,0),Qi(i.toLineNumber,0),Qi(i.toLineNumber-i.fromLineNumber+1,0)));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=Td.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const i=Ow(this.queuedTextEdits,e);this.queuedTextEdits=i,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=Ow(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,i){const n=t,s=new vB(this.textModel,this.brackets);return pE(s,e,n,i)}getBracketsInRange(e,t){this.flushQueue();const i=Qi(e.startLineNumber-1,e.startColumn-1),n=Qi(e.endLineNumber-1,e.endColumn-1);return new Dl(s=>{const r=this.initialAstWithoutTokens||this.astWithTokens;mE(r,Ms,r.length,i,n,s,0,0,new Map,t)})}getBracketPairsInRange(e,t){this.flushQueue();const i=Of(e.getStartPosition()),n=Of(e.getEndPosition());return new Dl(s=>{const r=this.initialAstWithoutTokens||this.astWithTokens,a=new Ioe(s,t,this.textModel);_E(r,Ms,r.length,i,n,a,0,new Map)})}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return SB(t,Ms,t.length,Of(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return wB(t,Ms,t.length,Of(e))}}function wB(o,e,t,i){if(o.kind===4||o.kind===2){const n=[];for(const s of o.children)t=Ti(e,s.length),n.push({nodeOffsetStart:e,nodeOffsetEnd:t}),e=t;for(let s=n.length-1;s>=0;s--){const{nodeOffsetStart:r,nodeOffsetEnd:a}=n[s];if(lp(r,i)){const l=wB(o.children[s],r,a,i);if(l)return l}}return null}else{if(o.kind===3)return null;if(o.kind===1){const n=zh(e,t);return{bracketInfo:o.bracketInfo,range:n}}}return null}function SB(o,e,t,i){if(o.kind===4||o.kind===2){for(const n of o.children){if(t=Ti(e,n.length),lp(i,t)){const s=SB(n,e,t,i);if(s)return s}e=t}return null}else{if(o.kind===3)return null;if(o.kind===1){const n=zh(e,t);return{bracketInfo:o.bracketInfo,range:n}}}return null}function mE(o,e,t,i,n,s,r,a,l,d,c=!1){if(r>200)return!0;e:for(;;)switch(o.kind){case 4:{const u=o.childrenLength;for(let h=0;h200)return!0;let d=!0;if(o.kind===2){let c=0;if(a){let g=a.get(o.openingBracket.text);g===void 0&&(g=0),c=g,g++,a.set(o.openingBracket.text,g)}const u=Ti(e,o.openingBracket.length);let h=-1;if(s.includeMinIndentation&&(h=o.computeMinIndentation(e,s.textModel)),d=s.push(new doe(zh(e,t),zh(e,u),o.closingBracket?zh(Ti(u,((l=o.child)===null||l===void 0?void 0:l.length)||Ms),t):void 0,r,c,o,h)),e=u,d&&o.child){const g=o.child;if(t=Ti(e,g.length),dp(e,n)&&S_(t,i)&&(d=_E(g,e,t,i,n,s,r+1,a),!d))return!1}a==null||a.set(o.openingBracket.text,c)}else{let c=e;for(const u of o.children){const h=c;if(c=Ti(c,u.length),dp(h,n)&&dp(i,c)&&(d=_E(u,h,c,i,n,s,r,a),!d))return!1}}return d}class Eoe extends q{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new An),this.onDidChangeEmitter=new W,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(i=>{var n;(!i.languageId||!((n=this.bracketPairsTree.value)===null||n===void 0)&&n.object.didLanguageChange(i.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;(t=this.bracketPairsTree.value)===null||t===void 0||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;(e=this.bracketPairsTree.value)===null||e===void 0||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;(t=this.bracketPairsTree.value)===null||t===void 0||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const e=new de;this.bracketPairsTree.value=Noe(e.add(new koe(this.textModel,t=>this.languageConfigurationService.getLanguageConfiguration(t))),e),e.add(this.bracketPairsTree.value.object.onDidChange(t=>this.onDidChangeEmitter.fire(t))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e,!1))||Dl.empty}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e,!0))||Dl.empty}getBracketsInRange(e,t=!1){var i;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((i=this.bracketPairsTree.value)===null||i===void 0?void 0:i.object.getBracketsInRange(e,t))||Dl.empty}findMatchingBracketUp(e,t,i){const n=this.textModel.validatePosition(t),s=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column);if(this.canBuildAST){const r=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew.getClosingBracketInfo(e);if(!r)return null;const a=this.getBracketPairsInRange(k.fromPositions(t,t)).findLast(l=>r.closes(l.openingBracketInfo));return a?a.openingBracketRange:null}else{const r=e.toLowerCase(),a=this.languageConfigurationService.getLanguageConfiguration(s).brackets;if(!a)return null;const l=a.textIsBracket[r];return l?uC(this._findMatchingBracketUp(l,n,px(i))):null}}matchBracket(e,t){if(this.canBuildAST){const i=this.getBracketPairsInRange(k.fromPositions(e,e)).filter(n=>n.closingBracketRange!==void 0&&(n.openingBracketRange.containsPosition(e)||n.closingBracketRange.containsPosition(e))).findLastMaxBy(ur(n=>n.openingBracketRange.containsPosition(e)?n.openingBracketRange:n.closingBracketRange,k.compareRangesUsingStarts));return i?[i.openingBracketRange,i.closingBracketRange]:null}else{const i=px(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){const s=t.getCount(),r=t.getLanguageId(n);let a=Math.max(0,e.column-1-i.maxBracketLength);for(let d=n-1;d>=0;d--){const c=t.getEndOffset(d);if(c<=a)break;if(Za(t.getStandardTokenType(d))||t.getLanguageId(d)!==r){a=c;break}}let l=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let d=n+1;d=l)break;if(Za(t.getStandardTokenType(d))||t.getLanguageId(d)!==r){l=c;break}}return{searchStartOffset:a,searchEndOffset:l}}_matchBracket(e,t){const i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),s=this.textModel.getLineContent(i),r=n.findTokenIndexAtOffset(e.column-1);if(r<0)return null;const a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!Za(n.getStandardTokenType(r))){let{searchStartOffset:l,searchEndOffset:d}=this._establishBracketSearchOffsets(e,n,a,r),c=null;for(;;){const u=Nr.findNextBracketInRange(a.forwardRegex,i,s,l,d);if(!u)break;if(u.startColumn<=e.column&&e.column<=u.endColumn){const h=s.substring(u.startColumn-1,u.endColumn-1).toLowerCase(),g=this._matchFoundBracket(u,a.textIsBracket[h],a.textIsOpenBracket[h],t);if(g){if(g instanceof fd)return null;c=g}}l=u.endColumn-1}if(c)return c}if(r>0&&n.getStartOffset(r)===e.column-1){const l=r-1,d=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(l)).brackets;if(d&&!Za(n.getStandardTokenType(l))){const{searchStartOffset:c,searchEndOffset:u}=this._establishBracketSearchOffsets(e,n,d,l),h=Nr.findPrevBracketInRange(d.reversedRegex,i,s,c,u);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){const g=s.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),f=this._matchFoundBracket(h,d.textIsBracket[g],d.textIsOpenBracket[g],t);if(f)return f instanceof fd?null:f}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const s=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return s?s instanceof fd?s:[e,s]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,s=e.reversedRegex;let r=-1,a=0;const l=(d,c,u,h)=>{for(;;){if(i&&++a%100===0&&!i())return fd.INSTANCE;const g=Nr.findPrevBracketInRange(s,d,c,u,h);if(!g)break;const f=c.substring(g.startColumn-1,g.endColumn-1).toLowerCase();if(e.isOpen(f)?r++:e.isClose(f)&&r--,r===0)return g;h=g.startColumn-1}return null};for(let d=t.lineNumber;d>=1;d--){const c=this.textModel.tokenization.getLineTokens(d),u=c.getCount(),h=this.textModel.getLineContent(d);let g=u-1,f=h.length,m=h.length;d===t.lineNumber&&(g=c.findTokenIndexAtOffset(t.column-1),f=t.column-1,m=t.column-1);let v=!0;for(;g>=0;g--){const _=c.getLanguageId(g)===n&&!Za(c.getStandardTokenType(g));if(_)v?f=c.getStartOffset(g):(f=c.getStartOffset(g),m=c.getEndOffset(g));else if(v&&f!==m){const b=l(d,h,f,m);if(b)return b}v=_}if(v&&f!==m){const _=l(d,h,f,m);if(_)return _}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,s=e.forwardRegex;let r=1,a=0;const l=(c,u,h,g)=>{for(;;){if(i&&++a%100===0&&!i())return fd.INSTANCE;const f=Nr.findNextBracketInRange(s,c,u,h,g);if(!f)break;const m=u.substring(f.startColumn-1,f.endColumn-1).toLowerCase();if(e.isOpen(m)?r++:e.isClose(m)&&r--,r===0)return f;h=f.endColumn-1}return null},d=this.textModel.getLineCount();for(let c=t.lineNumber;c<=d;c++){const u=this.textModel.tokenization.getLineTokens(c),h=u.getCount(),g=this.textModel.getLineContent(c);let f=0,m=0,v=0;c===t.lineNumber&&(f=u.findTokenIndexAtOffset(t.column-1),m=t.column-1,v=t.column-1);let _=!0;for(;f=1;a--){const l=this.textModel.tokenization.getLineTokens(a),d=l.getCount(),c=this.textModel.getLineContent(a);let u=d-1,h=c.length,g=c.length;if(a===i.lineNumber){u=l.findTokenIndexAtOffset(i.column-1),h=i.column-1,g=i.column-1;const m=l.getLanguageId(u);n!==m&&(n=m,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let f=!0;for(;u>=0;u--){const m=l.getLanguageId(u);if(n!==m){if(s&&r&&f&&h!==g){const _=Nr.findPrevBracketInRange(s.reversedRegex,a,c,h,g);if(_)return this._toFoundBracket(r,_);f=!1}n=m,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const v=!!s&&!Za(l.getStandardTokenType(u));if(v)f?h=l.getStartOffset(u):(h=l.getStartOffset(u),g=l.getEndOffset(u));else if(r&&s&&f&&h!==g){const _=Nr.findPrevBracketInRange(s.reversedRegex,a,c,h,g);if(_)return this._toFoundBracket(r,_)}f=v}if(r&&s&&f&&h!==g){const m=Nr.findPrevBracketInRange(s.reversedRegex,a,c,h,g);if(m)return this._toFoundBracket(r,m)}}return null}findNextBracket(e){var t;const i=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getFirstBracketAfter(i))||null;const n=this.textModel.getLineCount();let s=null,r=null,a=null;for(let l=i.lineNumber;l<=n;l++){const d=this.textModel.tokenization.getLineTokens(l),c=d.getCount(),u=this.textModel.getLineContent(l);let h=0,g=0,f=0;if(l===i.lineNumber){h=d.findTokenIndexAtOffset(i.column-1),g=i.column-1,f=i.column-1;const v=d.getLanguageId(h);s!==v&&(s=v,r=this.languageConfigurationService.getLanguageConfiguration(s).brackets,a=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew)}let m=!0;for(;hm.closingBracketRange!==void 0&&m.range.strictContainsRange(g));return f?[f.openingBracketRange,f.closingBracketRange]:null}const n=px(t),s=this.textModel.getLineCount(),r=new Map;let a=[];const l=(g,f)=>{if(!r.has(g)){const m=[];for(let v=0,_=f?f.brackets.length:0;v<_;v++)m[v]=0;r.set(g,m)}a=r.get(g)};let d=0;const c=(g,f,m,v,_)=>{for(;;){if(n&&++d%100===0&&!n())return fd.INSTANCE;const b=Nr.findNextBracketInRange(g.forwardRegex,f,m,v,_);if(!b)break;const C=m.substring(b.startColumn-1,b.endColumn-1).toLowerCase(),w=g.textIsBracket[C];if(w&&(w.isOpen(C)?a[w.index]++:w.isClose(C)&&a[w.index]--,a[w.index]===-1))return this._matchFoundBracket(b,w,!1,n);v=b.endColumn-1}return null};let u=null,h=null;for(let g=i.lineNumber;g<=s;g++){const f=this.textModel.tokenization.getLineTokens(g),m=f.getCount(),v=this.textModel.getLineContent(g);let _=0,b=0,C=0;if(g===i.lineNumber){_=f.findTokenIndexAtOffset(i.column-1),b=i.column-1,C=i.column-1;const S=f.getLanguageId(_);u!==S&&(u=S,h=this.languageConfigurationService.getLanguageConfiguration(u).brackets,l(u,h))}let w=!0;for(;_e==null?void 0:e.dispose()}}function px(o){if(typeof o>"u")return()=>!0;{const e=Date.now();return()=>Date.now()-e<=o}}class fd{constructor(){this._searchCanceledBrand=void 0}}fd.INSTANCE=new fd;function uC(o){return o instanceof fd?null:o}class Toe extends q{constructor(e){super(),this.textModel=e,this.colorProvider=new yB,this.onDidChangeEmitter=new W,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(t=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i,n){return n?[]:t===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map(r=>({id:`bracket${r.range.toString()}-${r.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(r,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:r.range})).toArray():[]}getAllDecorations(e,t){return e===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new k(1,1,this.textModel.getLineCount(),1),e,t):[]}}class yB{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}}Zr((o,e)=>{const t=[Q7,J7,eB,tB,iB,nB],i=new yB;e.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${o.getColor(Pne)}; }`);const n=t.map(s=>o.getColor(s)).filter(s=>!!s).filter(s=>!s.isTransparent());for(let s=0;s<30;s++){const r=n[s%n.length];e.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(s)} { color: ${r}; }`)}});function hC(o){return o.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class Gn{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${hC(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${hC(this.oldText)}")`:`(replace@${this.oldPosition} "${hC(this.oldText)}" with "${hC(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const n=t.length;la(e,n,i),i+=4;for(let s=0;so.length)return!1;if(t){if(!cM(o,e))return!1;if(e.length===o.length)return!0;let s=e.length;return e.charAt(e.length-1)===i&&s--,o.charAt(s)===i}return e.charAt(e.length-1)!==i&&(e+=i),o.indexOf(e)===0}function DB(o){return o>=65&&o<=90||o>=97&&o<=122}function Roe(o,e=is){return e?DB(o.charCodeAt(0))&&o.charCodeAt(1)===58:!1}function Ya(o){return rw(o,!0)}class Poe{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:Sv(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t?!0:!e||!t?!1:this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,i=!1){if(e.scheme===t.scheme){if(e.scheme===ot.file)return vE(Ya(e),Ya(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(W4(e.authority,t.authority))return vE(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return ze.joinPath(e,...t)}basenameOrAuthority(e){return br(e)||e.authority}basename(e){return hn.basename(e.path)}extname(e){return hn.extname(e.path)}dirname(e){if(e.path.length===0)return e;let t;return e.scheme===ot.file?t=ze.file(o8(Ya(e))).path:(t=hn.dirname(e.path),e.authority&&t.length&&t.charCodeAt(0)!==47&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return e.scheme===ot.file?t=ze.file(s8(Ya(e))).path:t=hn.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!W4(e.authority,t.authority))return;if(e.scheme===ot.file){const s=WZ(Ya(e),Ya(t));return is?LB(s):s}let i=e.path||"/";const n=t.path||"/";if(this._ignorePathCasing(e)){let s=0;for(const r=Math.min(i.length,n.length);sF4(i).length&&i[i.length-1]===t}else{const i=e.path;return i.length>1&&i.charCodeAt(i.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=La){return V4(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=La){let i=!1;if(e.scheme===ot.file){const n=Ya(e);i=n!==void 0&&n.length===F4(n).length&&n[n.length-1]===t}else{t="/";const n=e.path;i=n.length===1&&n.charCodeAt(n.length-1)===47}return!i&&!V4(e,t)?e.with({path:e.path+"/"}):e}}const pi=new Poe(()=>!1),dA=pi.isEqual.bind(pi);pi.isEqualOrParent.bind(pi);pi.getComparisonKey.bind(pi);const Ooe=pi.basenameOrAuthority.bind(pi),br=pi.basename.bind(pi),Foe=pi.extname.bind(pi),qy=pi.dirname.bind(pi),Boe=pi.joinPath.bind(pi),Woe=pi.normalizePath.bind(pi),Voe=pi.relativePath.bind(pi),B4=pi.resolvePath.bind(pi);pi.isAbsolutePath.bind(pi);const W4=pi.isEqualAuthority.bind(pi),V4=pi.hasTrailingPathSeparator.bind(pi);pi.removeTrailingPathSeparator.bind(pi);pi.addTrailingPathSeparator.bind(pi);var pu;(function(o){o.META_DATA_LABEL="label",o.META_DATA_DESCRIPTION="description",o.META_DATA_SIZE="size",o.META_DATA_MIME="mime";function e(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(r=>{const[a,l]=r.split(":");a&&l&&i.set(a,l)});const s=t.path.substring(0,t.path.indexOf(";"));return s&&i.set(o.META_DATA_MIME,s),i}o.parseMetaData=e})(pu||(pu={}));function tf(o){return o.toString()}class Dn{static create(e,t){const i=e.getAlternativeVersionId(),n=bE(e);return new Dn(i,i,n,n,t,t,[])}constructor(e,t,i,n,s,r,a){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=s,this.afterCursorState=r,this.changes=a}append(e,t,i,n,s){t.length>0&&(this.changes=Moe(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=s}static _writeSelectionsSize(e){return 4+4*4*(e?e.length:0)}static _writeSelections(e,t,i){if(la(e,t?t.length:0,i),i+=4,t)for(const n of t)la(e,n.selectionStartLineNumber,i),i+=4,la(e,n.selectionStartColumn,i),i+=4,la(e,n.positionLineNumber,i),i+=4,la(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=aa(e,t);t+=4;for(let s=0;st.toString()).join(", ")}matchesResource(e){return(ze.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof Dn}append(e,t,i,n,s){this._data instanceof Dn&&this._data.append(e,t,i,n,s)}close(){this._data instanceof Dn&&(this._data=this._data.serialize())}open(){this._data instanceof Dn||(this._data=Dn.deserialize(this._data))}undo(){if(ze.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Dn&&(this._data=this._data.serialize());const e=Dn.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(ze.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Dn&&(this._data=this._data.serialize());const e=Dn.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof Dn&&(this._data=this._data.serialize()),this._data.byteLength+168}}class Hoe{get resources(){return this._editStackElementsArr.map(e=>e.resource)}constructor(e,t,i){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map;for(const n of this._editStackElementsArr){const s=tf(n.resource);this._editStackElementsMap.set(s,n)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=tf(e);return this._editStackElementsMap.has(t)}setModel(e){const t=tf(ze.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=tf(e.uri);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).canAppend(e):!1}append(e,t,i,n,s){const r=tf(e.uri);this._editStackElementsMap.get(r).append(e,t,i,n,s)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=tf(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${br(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function bE(o){return o.getEOL()===` +`?0:1}function pd(o){return o?o instanceof xB||o instanceof Hoe:!1}class cA{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);pd(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);pd(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const i=this._undoRedoService.getLastElement(this._model.uri);if(pd(i)&&i.canAppend(this._model))return i;const n=new xB(p("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(n,t),n}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],bE(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n){const s=this._getOrCreateEditStackElement(e,n),r=this._model.applyEdits(t,!0),a=cA._computeCursorState(i,r),l=r.map((d,c)=>({index:c,textChange:d.textChange}));return l.sort((d,c)=>d.textChange.oldPosition===c.textChange.oldPosition?d.index-c.index:d.textChange.oldPosition-c.textChange.oldPosition),s.append(this._model,l.map(d=>d.textChange),bE(this._model),this._model.getAlternativeVersionId(),a),a}static _computeCursorState(e,t){try{return e?e(t):null}catch(i){return nt(i),null}}}class zoe{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function $oe(o,e,t,i,n){n.spacesDiff=0,n.looksLikeAlignment=!1;let s;for(s=0;s0&&a>0||l>0&&d>0)return;const c=Math.abs(a-d),u=Math.abs(r-l);if(c===0){n.spacesDiff=u,u>0&&0<=l-1&&l-10?n++:w>1&&s++,$oe(r,a,v,C,u),u.looksLikeAlignment&&!(t&&e===u.spacesDiff)))continue;const x=u.spacesDiff;x<=d&&c[x]++,r=v,a=C}let h=t;n!==s&&(h=n{const v=c[m];v>f&&(f=v,g=m)}),g===4&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(g=2)}return{insertSpaces:h,tabSize:g}}function Hs(o){return(o.metadata&1)>>>0}function ui(o,e){o.metadata=o.metadata&254|e<<0}function ts(o){return(o.metadata&2)>>>1===1}function li(o,e){o.metadata=o.metadata&253|(e?1:0)<<1}function kB(o){return(o.metadata&4)>>>2===1}function z4(o,e){o.metadata=o.metadata&251|(e?1:0)<<2}function IB(o){return(o.metadata&64)>>>6===1}function $4(o,e){o.metadata=o.metadata&191|(e?1:0)<<6}function Uoe(o){return(o.metadata&24)>>>3}function U4(o,e){o.metadata=o.metadata&231|e<<3}function joe(o){return(o.metadata&32)>>>5===1}function j4(o,e){o.metadata=o.metadata&223|(e?1:0)<<5}class EB{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,ui(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,z4(this,!1),$4(this,!1),U4(this,1),j4(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,li(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;z4(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),$4(this,this.options.glyphMarginClassName!==null),U4(this,this.options.stickiness),j4(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const pt=new EB(null,0,0);pt.parent=pt;pt.left=pt;pt.right=pt;ui(pt,0);class mx{constructor(){this.root=pt,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,s,r){return this.root===pt?[]:Joe(this,e,t,i,n,s,r)}search(e,t,i,n){return this.root===pt?[]:Qoe(this,e,t,i,n)}collectNodesFromOwner(e){return Yoe(this,e)}collectNodesPostOrder(){return Xoe(this)}insert(e){K4(this,e),this._normalizeDeltaIfNecessary()}delete(e){q4(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const s=i.start+n,r=i.end+n;i.setCachedOffsets(s,r,t)}acceptReplace(e,t,i,n){const s=Goe(this,e,e+t);for(let r=0,a=s.length;rt||i===1?!1:i===2?!0:e}function qoe(o,e,t,i,n){const s=Uoe(o),r=s===0||s===2,a=s===1||s===2,l=t-e,d=i,c=Math.min(l,d),u=o.start;let h=!1;const g=o.end;let f=!1;e<=u&&g<=t&&joe(o)&&(o.start=e,h=!0,o.end=e,f=!0);{const v=n?1:l>0?2:0;!h&&nf(u,r,e,v)&&(h=!0),!f&&nf(g,a,e,v)&&(f=!0)}if(c>0&&!n){const v=l>d?2:0;!h&&nf(u,r,e+c,v)&&(h=!0),!f&&nf(g,a,e+c,v)&&(f=!0)}{const v=n?1:0;!h&&nf(u,r,t,v)&&(o.start=e+d,h=!0),!f&&nf(g,a,t,v)&&(o.end=e+d,f=!0)}const m=d-l;h||(o.start=Math.max(0,u+m)),f||(o.end=Math.max(0,g+m)),o.start>o.end&&(o.end=o.start)}function Goe(o,e,t){let i=o.root,n=0,s=0,r=0,a=0;const l=[];let d=0;for(;i!==pt;){if(ts(i)){li(i.left,!1),li(i.right,!1),i===i.parent.right&&(n-=i.parent.delta),i=i.parent;continue}if(!ts(i.left)){if(s=n+i.maxEnd,st){li(i,!0);continue}if(a=n+i.end,a>=e&&(i.setCachedOffsets(r,a,0),l[d++]=i),li(i,!0),i.right!==pt&&!ts(i.right)){n+=i.delta,i=i.right;continue}}return li(o.root,!1),l}function Zoe(o,e,t,i){let n=o.root,s=0,r=0,a=0;const l=i-(t-e);for(;n!==pt;){if(ts(n)){li(n.left,!1),li(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),mu(n),n=n.parent;continue}if(!ts(n.left)){if(r=s+n.maxEnd,rt){n.start+=l,n.end+=l,n.delta+=l,(n.delta<-1073741824||n.delta>1073741824)&&(o.requestNormalizeDelta=!0),li(n,!0);continue}if(li(n,!0),n.right!==pt&&!ts(n.right)){s+=n.delta,n=n.right;continue}}li(o.root,!1)}function Yoe(o,e){let t=o.root;const i=[];let n=0;for(;t!==pt;){if(ts(t)){li(t.left,!1),li(t.right,!1),t=t.parent;continue}if(t.left!==pt&&!ts(t.left)){t=t.left;continue}if(t.ownerId===e&&(i[n++]=t),li(t,!0),t.right!==pt&&!ts(t.right)){t=t.right;continue}}return li(o.root,!1),i}function Xoe(o){let e=o.root;const t=[];let i=0;for(;e!==pt;){if(ts(e)){li(e.left,!1),li(e.right,!1),e=e.parent;continue}if(e.left!==pt&&!ts(e.left)){e=e.left;continue}if(e.right!==pt&&!ts(e.right)){e=e.right;continue}t[i++]=e,li(e,!0)}return li(o.root,!1),t}function Qoe(o,e,t,i,n){let s=o.root,r=0,a=0,l=0;const d=[];let c=0;for(;s!==pt;){if(ts(s)){li(s.left,!1),li(s.right,!1),s===s.parent.right&&(r-=s.parent.delta),s=s.parent;continue}if(s.left!==pt&&!ts(s.left)){s=s.left;continue}a=r+s.start,l=r+s.end,s.setCachedOffsets(a,l,i);let u=!0;if(e&&s.ownerId&&s.ownerId!==e&&(u=!1),t&&kB(s)&&(u=!1),n&&!IB(s)&&(u=!1),u&&(d[c++]=s),li(s,!0),s.right!==pt&&!ts(s.right)){r+=s.delta,s=s.right;continue}}return li(o.root,!1),d}function Joe(o,e,t,i,n,s,r){let a=o.root,l=0,d=0,c=0,u=0;const h=[];let g=0;for(;a!==pt;){if(ts(a)){li(a.left,!1),li(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;continue}if(!ts(a.left)){if(d=l+a.maxEnd,dt){li(a,!0);continue}if(u=l+a.end,u>=e){a.setCachedOffsets(c,u,s);let f=!0;i&&a.ownerId&&a.ownerId!==i&&(f=!1),n&&kB(a)&&(f=!1),r&&!IB(a)&&(f=!1),f&&(h[g++]=a)}if(li(a,!0),a.right!==pt&&!ts(a.right)){l+=a.delta,a=a.right;continue}}return li(o.root,!1),h}function K4(o,e){if(o.root===pt)return e.parent=pt,e.left=pt,e.right=pt,ui(e,0),o.root=e,o.root;ere(o,e),hc(e.parent);let t=e;for(;t!==o.root&&Hs(t.parent)===1;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;Hs(i)===1?(ui(t.parent,0),ui(i,0),ui(t.parent.parent,1),t=t.parent.parent):(t===t.parent.right&&(t=t.parent,K_(o,t)),ui(t.parent,0),ui(t.parent.parent,1),q_(o,t.parent.parent))}else{const i=t.parent.parent.left;Hs(i)===1?(ui(t.parent,0),ui(i,0),ui(t.parent.parent,1),t=t.parent.parent):(t===t.parent.left&&(t=t.parent,q_(o,t)),ui(t.parent,0),ui(t.parent.parent,1),K_(o,t.parent.parent))}return ui(o.root,0),e}function ere(o,e){let t=0,i=o.root;const n=e.start,s=e.end;for(;;)if(ire(n,s,i.start+t,i.end+t)<0)if(i.left===pt){e.start-=t,e.end-=t,e.maxEnd-=t,i.left=e;break}else i=i.left;else if(i.right===pt){e.start-=t+i.delta,e.end-=t+i.delta,e.maxEnd-=t+i.delta,i.right=e;break}else t+=i.delta,i=i.right;e.parent=i,e.left=pt,e.right=pt,ui(e,1)}function q4(o,e){let t,i;if(e.left===pt?(t=e.right,i=e,t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta):e.right===pt?(t=e.left,i=e):(i=tre(e.right),t=i.right,t.start+=i.delta,t.end+=i.delta,t.delta+=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),i.start+=e.delta,i.end+=e.delta,i.delta=e.delta,(i.delta<-1073741824||i.delta>1073741824)&&(o.requestNormalizeDelta=!0)),i===o.root){o.root=t,ui(t,0),e.detach(),_x(),mu(t),o.root.parent=pt;return}const n=Hs(i)===1;if(i===i.parent.left?i.parent.left=t:i.parent.right=t,i===e?t.parent=i.parent:(i.parent===e?t.parent=i:t.parent=i.parent,i.left=e.left,i.right=e.right,i.parent=e.parent,ui(i,Hs(e)),e===o.root?o.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left!==pt&&(i.left.parent=i),i.right!==pt&&(i.right.parent=i)),e.detach(),n){hc(t.parent),i!==e&&(hc(i),hc(i.parent)),_x();return}hc(t),hc(t.parent),i!==e&&(hc(i),hc(i.parent));let s;for(;t!==o.root&&Hs(t)===0;)t===t.parent.left?(s=t.parent.right,Hs(s)===1&&(ui(s,0),ui(t.parent,1),K_(o,t.parent),s=t.parent.right),Hs(s.left)===0&&Hs(s.right)===0?(ui(s,1),t=t.parent):(Hs(s.right)===0&&(ui(s.left,0),ui(s,1),q_(o,s),s=t.parent.right),ui(s,Hs(t.parent)),ui(t.parent,0),ui(s.right,0),K_(o,t.parent),t=o.root)):(s=t.parent.left,Hs(s)===1&&(ui(s,0),ui(t.parent,1),q_(o,t.parent),s=t.parent.left),Hs(s.left)===0&&Hs(s.right)===0?(ui(s,1),t=t.parent):(Hs(s.left)===0&&(ui(s.right,0),ui(s,1),K_(o,s),s=t.parent.left),ui(s,Hs(t.parent)),ui(t.parent,0),ui(s.left,0),q_(o,t.parent),t=o.root));ui(t,0),_x()}function tre(o){for(;o.left!==pt;)o=o.left;return o}function _x(){pt.parent=pt,pt.delta=0,pt.start=0,pt.end=0}function K_(o,e){const t=e.right;t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(o.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta,e.right=t.left,t.left!==pt&&(t.left.parent=e),t.parent=e.parent,e.parent===pt?o.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,mu(e),mu(t)}function q_(o,e){const t=e.left;e.delta-=t.delta,(e.delta<-1073741824||e.delta>1073741824)&&(o.requestNormalizeDelta=!0),e.start-=t.delta,e.end-=t.delta,e.left=t.right,t.right!==pt&&(t.right.parent=e),t.parent=e.parent,e.parent===pt?o.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t,mu(e),mu(t)}function NB(o){let e=o.end;if(o.left!==pt){const t=o.left.maxEnd;t>e&&(e=t)}if(o.right!==pt){const t=o.right.maxEnd+o.delta;t>e&&(e=t)}return e}function mu(o){o.maxEnd=NB(o)}function hc(o){for(;o!==pt;){const e=NB(o);if(o.maxEnd===e)return;o.maxEnd=e,o=o.parent}}function ire(o,e,t,i){return o===t?e-i:o-t}class CE{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==it)return uA(this.right);let e=this;for(;e.parent!==it&&e.parent.left!==e;)e=e.parent;return e.parent===it?it:e.parent}prev(){if(this.left!==it)return TB(this.left);let e=this;for(;e.parent!==it&&e.parent.right!==e;)e=e.parent;return e.parent===it?it:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const it=new CE(null,0);it.parent=it;it.left=it;it.right=it;it.color=0;function uA(o){for(;o.left!==it;)o=o.left;return o}function TB(o){for(;o.right!==it;)o=o.right;return o}function hA(o){return o===it?0:o.size_left+o.piece.length+hA(o.right)}function gA(o){return o===it?0:o.lf_left+o.piece.lineFeedCnt+gA(o.right)}function vx(){it.parent=it}function G_(o,e){const t=e.right;t.size_left+=e.size_left+(e.piece?e.piece.length:0),t.lf_left+=e.lf_left+(e.piece?e.piece.lineFeedCnt:0),e.right=t.left,t.left!==it&&(t.left.parent=e),t.parent=e.parent,e.parent===it?o.root=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}function Z_(o,e){const t=e.left;e.left=t.right,t.right!==it&&(t.right.parent=e),t.parent=e.parent,e.size_left-=t.size_left+(t.piece?t.piece.length:0),e.lf_left-=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),e.parent===it?o.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}function gC(o,e){let t,i;if(e.left===it?(i=e,t=i.right):e.right===it?(i=e,t=i.left):(i=uA(e.right),t=i.right),i===o.root){o.root=t,t.color=0,e.detach(),vx(),o.root.parent=it;return}const n=i.color===1;if(i===i.parent.left?i.parent.left=t:i.parent.right=t,i===e?(t.parent=i.parent,y_(o,t)):(i.parent===e?t.parent=i:t.parent=i.parent,y_(o,t),i.left=e.left,i.right=e.right,i.parent=e.parent,i.color=e.color,e===o.root?o.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left!==it&&(i.left.parent=i),i.right!==it&&(i.right.parent=i),i.size_left=e.size_left,i.lf_left=e.lf_left,y_(o,i)),e.detach(),t.parent.left===t){const r=hA(t),a=gA(t);if(r!==t.parent.size_left||a!==t.parent.lf_left){const l=r-t.parent.size_left,d=a-t.parent.lf_left;t.parent.size_left=r,t.parent.lf_left=a,ad(o,t.parent,l,d)}}if(y_(o,t.parent),n){vx();return}let s;for(;t!==o.root&&t.color===0;)t===t.parent.left?(s=t.parent.right,s.color===1&&(s.color=0,t.parent.color=1,G_(o,t.parent),s=t.parent.right),s.left.color===0&&s.right.color===0?(s.color=1,t=t.parent):(s.right.color===0&&(s.left.color=0,s.color=1,Z_(o,s),s=t.parent.right),s.color=t.parent.color,t.parent.color=0,s.right.color=0,G_(o,t.parent),t=o.root)):(s=t.parent.left,s.color===1&&(s.color=0,t.parent.color=1,Z_(o,t.parent),s=t.parent.left),s.left.color===0&&s.right.color===0?(s.color=1,t=t.parent):(s.left.color===0&&(s.right.color=0,s.color=1,G_(o,s),s=t.parent.left),s.color=t.parent.color,t.parent.color=0,s.left.color=0,Z_(o,t.parent),t=o.root));t.color=0,vx()}function G4(o,e){for(y_(o,e);e!==o.root&&e.parent.color===1;)if(e.parent===e.parent.parent.left){const t=e.parent.parent.right;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.right&&(e=e.parent,G_(o,e)),e.parent.color=0,e.parent.parent.color=1,Z_(o,e.parent.parent))}else{const t=e.parent.parent.left;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.left&&(e=e.parent,Z_(o,e)),e.parent.color=0,e.parent.parent.color=1,G_(o,e.parent.parent))}o.root.color=0}function ad(o,e,t,i){for(;e!==o.root&&e!==it;)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=i),e=e.parent}function y_(o,e){let t=0,i=0;if(e!==o.root){for(;e!==o.root&&e===e.parent.right;)e=e.parent;if(e!==o.root)for(e=e.parent,t=hA(e.left)-e.size_left,i=gA(e.left)-e.lf_left,e.size_left+=t,e.lf_left+=i;e!==o.root&&(t!==0||i!==0);)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=i),e=e.parent}}const Ql=65535;function MB(o){let e;return o[o.length-1]<65536?e=new Uint16Array(o.length):e=new Uint32Array(o.length),e.set(o,0),e}class nre{constructor(e,t,i,n,s){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=s}}function dd(o,e=!0){const t=[0];let i=1;for(let n=0,s=o.length;n126)&&(r=!1)}const a=new nre(MB(o),i,n,s,r);return o.length=0,a}class Js{constructor(e,t,i,n,s){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=s}}class yh{constructor(e,t){this.buffer=e,this.lineStarts=t}}class ore{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==it&&e.iterate(e.root,i=>(i!==it&&this._pieces.push(i.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class rre{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n=e){i[n]=null,t=!0;continue}}if(t){const n=[];for(const s of i)s!==null&&n.push(s);this._cache=n}}}class are{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new yh("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=it,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let s=0,r=e.length;s0){e[s].lineStarts||(e[s].lineStarts=dd(e[s].buffer));const a=new Js(s+1,{line:0,column:0},{line:e[s].lineStarts.length-1,column:e[s].buffer.length-e[s].lineStarts[e[s].lineStarts.length-1]},e[s].lineStarts.length-1,e[s].buffer.length);this._buffers.push(e[s]),n=this.rbInsertRight(n,a)}this._searchCache=new rre(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=Ql,i=t-Math.floor(t/3),n=i*2;let s="",r=0;const a=[];if(this.iterate(this.root,l=>{const d=this.getNodeContent(l),c=d.length;if(r<=i||r+c0){const l=s.replace(/\r\n|\r|\n/g,e);a.push(new yh(l,dd(l)))}this.create(a,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new ore(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==it;)if(n.left!==it&&n.lf_left+1>=e)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt+1>=e){i+=n.size_left;const s=this.getAccumulatedValue(n,e-n.lf_left-2);return i+=s+t-1}else e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right;return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0;const n=e;for(;t!==it;)if(t.size_left!==0&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){const s=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+s.index,s.index===0){const r=this.getOffsetAt(i+1,1),a=n-r;return new z(i+1,a+1)}return new z(i+1,s.remainder+1)}else if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===it){const s=this.getOffsetAt(i+1,1),r=n-e-s;return new z(i+1,r+1)}else t=t.right;return new z(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),s=this.getValueInRange2(i,n);return t?t!==this._EOL||!this._EOLNormalized?s.replace(/\r\n|\r|\n/g,t):t===this.getEOL()&&this._EOLNormalized?s:s.replace(/\r\n|\r|\n/g,t):s}getValueInRange2(e,t){if(e.node===t.node){const a=e.node,l=this._buffers[a.piece.bufferIndex].buffer,d=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return l.substring(d+e.remainder,d+t.remainder)}let i=e.node;const n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let r=n.substring(s+e.remainder,s+i.piece.length);for(i=i.next();i!==it;){const a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){r+=a.substring(l,l+t.remainder);break}else r+=a.substr(l,i.piece.length);i=i.next()}return r}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,s=>{if(s===it)return!0;const r=s.piece;let a=r.length;if(a===0)return!0;const l=this._buffers[r.bufferIndex].buffer,d=this._buffers[r.bufferIndex].lineStarts,c=r.start.line,u=r.end.line;let h=d[c]+r.start.column;if(n&&(l.charCodeAt(h)===10&&(h++,a--),e[t++]=i,i="",n=!1,a===0))return!0;if(c===u)return!this._EOLNormalized&&l.charCodeAt(h+a-1)===13?(n=!0,i+=l.substr(h,a-1)):i+=l.substr(h,a),!0;i+=this._EOLNormalized?l.substring(h,Math.max(h,d[c+1]-this._EOLLength)):l.substring(h,d[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let g=c+1;gw+f,t.reset(0)):(b=h.buffer,C=w=>w,t.reset(f));do if(v=t.next(b),v){if(C(v.index)>=m)return c;this.positionInBuffer(e,C(v.index)-g,_);const w=this.getLineFeedCnt(e.piece.bufferIndex,s,_),S=_.line===s.line?_.column-s.column+n:_.column+1,x=S+v[0].length;if(u[c++]=_h(new k(i+w,S,i+w,x),v,l),C(v.index)+v[0].length>=m||c>=d)return c}while(v);return c}findMatchesLineByLine(e,t,i,n){const s=[];let r=0;const a=new xf(t.wordSeparators,t.regex);let l=this.nodeAt2(e.startLineNumber,e.startColumn);if(l===null)return[];const d=this.nodeAt2(e.endLineNumber,e.endColumn);if(d===null)return[];let c=this.positionInBuffer(l.node,l.remainder);const u=this.positionInBuffer(d.node,d.remainder);if(l.node===d.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,c,u,t,i,n,r,s),s;let h=e.startLineNumber,g=l.node;for(;g!==d.node;){const m=this.getLineFeedCnt(g.piece.bufferIndex,c,g.piece.end);if(m>=1){const _=this._buffers[g.piece.bufferIndex].lineStarts,b=this.offsetInBuffer(g.piece.bufferIndex,g.piece.start),C=_[c.line+m],w=h===e.startLineNumber?e.startColumn:1;if(r=this.findMatchesInNode(g,a,h,w,c,this.positionInBuffer(g,C-b),t,i,n,r,s),r>=n)return s;h+=m}const v=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){const _=this.getLineContent(h).substring(v,e.endColumn-1);return r=this._findMatchesInLine(t,a,_,e.endLineNumber,v,r,s,i,n),s}if(r=this._findMatchesInLine(t,a,this.getLineContent(h).substr(v),h,v,r,s,i,n),r>=n)return s;h++,l=this.nodeAt2(h,1),g=l.node,c=this.positionInBuffer(l.node,l.remainder)}if(h===e.endLineNumber){const m=h===e.startLineNumber?e.startColumn-1:0,v=this.getLineContent(h).substring(m,e.endColumn-1);return r=this._findMatchesInLine(t,a,v,e.endLineNumber,m,r,s,i,n),s}const f=h===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(d.node,a,h,f,c,u,t,i,n,r,s),s}_findMatchesInLine(e,t,i,n,s,r,a,l,d){const c=e.wordSeparators;if(!l&&e.simpleSearch){const h=e.simpleSearch,g=h.length,f=i.length;let m=-g;for(;(m=i.indexOf(h,m+g))!==-1;)if((!c||TM(c,i,f,m,g))&&(a[r++]=new Ev(new k(n,m+1+s,n,m+1+g+s),null),r>=d))return r;return r}let u;t.reset(0);do if(u=t.next(i),u&&(a[r++]=_h(new k(n,u.index+1+s,n,u.index+1+u[0].length+s),u,l),r>=d))return r;while(u);return r}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==it){const{node:n,remainder:s,nodeStartOffset:r}=this.nodeAt(e),a=n.piece,l=a.bufferIndex,d=this.positionInBuffer(n,s);if(n.piece.bufferIndex===0&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&r+a.length===e&&t.lengthe){const c=[];let u=new Js(a.bufferIndex,d,a.end,this.getLineFeedCnt(a.bufferIndex,d,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,d));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.nodeCharCodeAt(n,s)===10){const m={line:u.start.line+1,column:0};u=new Js(u.bufferIndex,m,u.end,this.getLineFeedCnt(u.bufferIndex,m,u.end),u.length-1),t+=` `}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(n,s-1)===13){const m=this.positionInBuffer(n,s-1);this.deleteNodeTail(n,m),t="\r"+t,n.piece.length===0&&c.push(n)}else this.deleteNodeTail(n,d);else this.deleteNodeTail(n,d);const h=this.createNewPieces(t);u.length>0&&this.rbInsertRight(n,u);let g=n;for(let f=0;f=0;r--)s=this.rbInsertLeft(s,n[r]);this.validateCRLFWithPrevNode(s),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=` `);const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let s=n;for(let r=1;r=h)d=u+1;else break;return i?(i.line=u,i.column=l-g,null):{line:u,column:l-g}}getLineFeedCnt(e,t,i){if(i.column===0)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const s=n[i.line+1],r=n[i.line]+i.column;if(s>r+1)return i.line-t.line;const a=r-1;return this._buffers[e].buffer.charCodeAt(a)===13?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tQl){const c=[];for(;e.length>Ql;){const h=e.charCodeAt(Ql-1);let g;h===13||h>=55296&&h<=56319?(g=e.substring(0,Ql-1),e=e.substring(Ql-1)):(g=e.substring(0,Ql),e=e.substring(Ql));const f=dd(g);c.push(new Js(this._buffers.length,{line:0,column:0},{line:f.length-1,column:g.length-f[f.length-1]},f.length-1,g.length)),this._buffers.push(new yh(g,f))}const u=dd(e);return c.push(new Js(this._buffers.length,{line:0,column:0},{line:u.length-1,column:e.length-u[u.length-1]},u.length-1,e.length)),this._buffers.push(new yh(e,u)),c}let t=this._buffers[0].buffer.length;const i=dd(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&t!==0&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let c=0;c=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){const l=this.getAccumulatedValue(i,e-i.lf_left-2),d=this.getAccumulatedValue(i,e-i.lf_left-1),c=this._buffers[i.piece.bufferIndex].buffer,u=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return r+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:r,nodeStartLineNumber:a-(e-1-i.lf_left)}),c.substring(u+l,u+d-t)}else if(i.lf_left+i.piece.lineFeedCnt===e-1){const l=this.getAccumulatedValue(i,e-i.lf_left-2),d=this._buffers[i.piece.bufferIndex].buffer,c=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=d.substring(c+l,c+i.piece.length);break}else e-=i.lf_left+i.piece.lineFeedCnt,r+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==it;){const r=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const a=this.getAccumulatedValue(i,0),l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=r.substring(l,l+a-t),n}else{const a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=r.substr(a,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==it;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),s=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const r=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(r!==s)return{index:r,remainder:0}}return{index:s,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,s=i.start.line+t+1;return s>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[s]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.end),r=t,a=this.offsetInBuffer(i.bufferIndex,r),l=this.getLineFeedCnt(i.bufferIndex,i.start,r),d=l-n,c=a-s,u=i.length+c;e.piece=new Js(i.bufferIndex,i.start,r,l,u),ad(this,e,c,d)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.start),r=t,a=this.getLineFeedCnt(i.bufferIndex,r,i.end),l=this.offsetInBuffer(i.bufferIndex,r),d=a-n,c=s-l,u=i.length+c;e.piece=new Js(i.bufferIndex,r,i.end,a,u),ad(this,e,c,d)}shrinkNode(e,t,i){const n=e.piece,s=n.start,r=n.end,a=n.length,l=n.lineFeedCnt,d=t,c=this.getLineFeedCnt(n.bufferIndex,n.start,d),u=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,s);e.piece=new Js(n.bufferIndex,n.start,d,c,u),ad(this,e,u-a,c-l);const h=new Js(n.bufferIndex,i,r,this.getLineFeedCnt(n.bufferIndex,i,r),this.offsetInBuffer(n.bufferIndex,r)-this.offsetInBuffer(n.bufferIndex,i)),g=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(g)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+=` `);const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const s=dd(t,!1);for(let g=0;ge)t=t.left;else if(t.size_left+t.piece.length>=e){n+=t.size_left;const s={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(s),s}else e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right;return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==it;)if(i.left!==it&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(s+t-1,r),nodeStartOffset:n}}else if(i.lf_left+i.piece.lineFeedCnt===e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2);if(s+t-1<=i.piece.length)return{node:i,remainder:s+t-1,nodeStartOffset:n};t-=i.piece.length-s;break}else e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right;for(i=i.next();i!==it;){if(i.piece.lineFeedCnt>0){const s=this.getAccumulatedValue(i,0),r=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,s),nodeStartOffset:r}}else if(i.piece.length>=t-1){const s=this.offsetOfNode(i);return{node:i,remainder:t-1,nodeStartOffset:s}}else t-=i.piece.length;i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===` `)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===it||e.piece.lineFeedCnt===0)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,s=i[n]+t.start.column;return n===i.length-1||i[n+1]>s+1?!1:this._buffers[t.bufferIndex].buffer.charCodeAt(s)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===it||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let s;e.piece.end.column===0?s={line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:s={line:e.piece.end.line,column:e.piece.end.column-1};const r=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new Js(e.piece.bufferIndex,e.piece.start,s,a,r),ad(this,e,-1,-1),e.piece.length===0&&i.push(e);const l={line:t.piece.start.line+1,column:0},d=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new Js(t.piece.bufferIndex,l,t.piece.end,c,d),ad(this,t,-1,-1),t.piece.length===0&&i.push(t);const u=this.createNewPieces(`\r `);this.rbInsertRight(e,u[0]);for(let h=0;hv.sortIndex-_.sortIndex)}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=r;const g=this._doApplyEdits(l);let f=null;if(t&&u.length>0){u.sort((m,v)=>v.lineNumber-m.lineNumber),f=[];for(let m=0,v=u.length;m0&&u[m-1].lineNumber===_)continue;const b=u[m].oldContent,C=this.getLineContent(_);C.length===0||C===b||Cs(C)!==-1||f.push(_)}}return this._onDidChangeContent.fire(),new gJ(h,g,f)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,s=new k(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let r=i.startLineNumber,a=i.startColumn;const l=[];for(let g=0,f=e.length;g0&&l.push(m.text),r=v.endLineNumber,a=v.endColumn}const d=l.join(""),[c,u,h]=fu(d);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:d,eolCount:c,firstLineLength:u,lastLineLength:h,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(cp._sortOpsDescending);const t=[];for(let i=0;i0){const h=l.eolCount+1;h===1?u=new k(d,c,d,c+l.firstLineLength):u=new k(d,c,d+h-1,l.lastLineLength+1)}else u=new k(d,c,d,c);i=u.endLineNumber,n=u.endColumn,t.push(u),s=l}return t}static _sortOpsAscending(e,t){const i=k.compareRangesUsingEnds(e.range,t.range);return i===0?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=k.compareRangesUsingEnds(e.range,t.range);return i===0?t.sortIndex-e.sortIndex:-i}}class sre{constructor(e,t,i,n,s,r,a,l,d){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=s,this._containsRTL=r,this._containsUnusualLineTerminators=a,this._isBasicASCII=l,this._normalizeEOL=d}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return t===0?e===1?` +`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,t,i){let n=this._mightContainRTL,s=this._mightContainUnusualLineTerminators,r=this._mightContainNonBasicASCII,a=!0,l=[];for(let m=0;mv.sortIndex-_.sortIndex)}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=r;const g=this._doApplyEdits(l);let f=null;if(t&&u.length>0){u.sort((m,v)=>v.lineNumber-m.lineNumber),f=[];for(let m=0,v=u.length;m0&&u[m-1].lineNumber===_)continue;const b=u[m].oldContent,C=this.getLineContent(_);C.length===0||C===b||Cs(C)!==-1||f.push(_)}}return this._onDidChangeContent.fire(),new _J(h,g,f)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,s=new k(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let r=i.startLineNumber,a=i.startColumn;const l=[];for(let g=0,f=e.length;g0&&l.push(m.text),r=v.endLineNumber,a=v.endColumn}const d=l.join(""),[c,u,h]=fu(d);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:d,eolCount:c,firstLineLength:u,lastLineLength:h,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(cp._sortOpsDescending);const t=[];for(let i=0;i0){const h=l.eolCount+1;h===1?u=new k(d,c,d,c+l.firstLineLength):u=new k(d,c,d+h-1,l.lastLineLength+1)}else u=new k(d,c,d,c);i=u.endLineNumber,n=u.endColumn,t.push(u),s=l}return t}static _sortOpsAscending(e,t){const i=k.compareRangesUsingEnds(e.range,t.range);return i===0?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=k.compareRangesUsingEnds(e.range,t.range);return i===0?t.sortIndex-e.sortIndex:-i}}class lre{constructor(e,t,i,n,s,r,a,l,d){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=s,this._containsRTL=r,this._containsUnusualLineTerminators=a,this._isBasicASCII=l,this._normalizeEOL=d}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return t===0?e===1?` `:`\r `:i>t/2?`\r `:` `}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&(t===`\r `&&(this._cr>0||this._lf>0)||t===` -`&&(this._cr>0||this._crlf>0)))for(let s=0,r=i.length;s=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){!t&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=ere(this._tmpLineStarts,e);this.chunks.push(new yh(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=Dp(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=_7(e)))}finish(e=!0){return this._finish(),new sre(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=dd(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}class ore{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,i){if(e>=this._store.length)return;if(t===0){this.insert(e,i);return}else if(i===0){this.delete(e,t);return}const n=this._store.slice(0,e),s=this._store.slice(e+t),r=rre(i,this._default);this._store=n.concat(r,s)}delete(e,t){t===0||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(t===0||e>=this._store.length)return;const i=[];for(let n=0;n0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e){i.appendLineTokens(t);return}}this._tokens.push(new are(e,[t]))}finalize(){return this._tokens}}class lre{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new SE(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}class dre extends lre{constructor(e,t,i,n){super(e,t),this._textModel=i,this._languageIdCodec=n}updateTokensUntilLine(e,t){const i=this._textModel.getLanguageId();for(;;){const n=this.getFirstInvalidLine();if(!n||n.lineNumber>t)break;const s=this._textModel.getLineContent(n.lineNumber),r=Zm(this._languageIdCodec,i,this.tokenizationSupport,s,!0,n.startState);e.add(n.lineNumber,r.tokens),this.store.setEndState(n.lineNumber,r.endState)}}getTokenTypeIfInsertingCharacter(e,t){const i=this.getStartState(e.lineNumber);if(!i)return 0;const n=this._textModel.getLanguageId(),s=this._textModel.getLineContent(e.lineNumber),r=s.substring(0,e.column-1)+t+s.substring(e.column-1),a=Zm(this._languageIdCodec,n,this.tokenizationSupport,r,!0,i),l=new Cn(a.tokens,r,this._languageIdCodec);if(l.getCount()===0)return 0;const d=l.findTokenIndexAtOffset(e.column-1);return l.getStandardTokenType(d)}tokenizeLineWithEdit(e,t,i){const n=e.lineNumber,s=e.column,r=this.getStartState(n);if(!r)return null;const a=this._textModel.getLineContent(n),l=a.substring(0,s-1)+i+a.substring(s-1+t),d=this._textModel.getLanguageIdAtPosition(n,0),c=Zm(this._languageIdCodec,d,this.tokenizationSupport,l,!0,r);return new Cn(c.tokens,l,this._languageIdCodec)}isCheapToTokenize(e){const t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&a>=1;a--){const l=this._textModel.getLineFirstNonWhitespaceColumn(a);if(l!==0&&l0&&i>0&&(i--,t--),this._lineEndStates.replace(e.startLineNumber,i,t)}}class ure{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex(i=>i.contains(e));if(t!==-1){const i=this._ranges[t];i.start===e?i.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new ut(e+1,i.endExclusive):i.endExclusive===e+1?this._ranges[t]=new ut(i.start,e):this._ranges.splice(t,1,new ut(i.start,e),new ut(e+1,i.endExclusive))}}addRange(e){ut.addRange(e,this._ranges)}addRangeAndResize(e,t){let i=0;for(;!(i>=this._ranges.length||e.start<=this._ranges[i].endExclusive);)i++;let n=i;for(;!(n>=this._ranges.length||e.endExclusivee.toString()).join(" + ")}}function Zm(o,e,t,i,n,s){let r=null;if(t)try{r=t.tokenizeEncoded(i,n,s.clone())}catch(a){nt(a)}return r||(r=Ay(o.encodeLanguageId(e),s)),Cn.convertToEndOffset(r.tokens,i.length),r}class hre{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,T7(e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()1||this._tokenizeOneInvalidLine(t)>=e)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.allStatesValid():!1}_tokenizeOneInvalidLine(e){var t;const i=(t=this._tokenizerWithStateStore)===null||t===void 0?void 0:t.getFirstInvalidLine();return i?(this._tokenizerWithStateStore.updateTokensUntilLine(e,i.lineNumber),i.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new yt(e,t))}}const cd=new Uint32Array(0).buffer;class Ja{static deleteBeginning(e,t){return e===null||e===cd?e:Ja.delete(e,0,t)}static deleteEnding(e,t){if(e===null||e===cd)return e;const i=Sd(e),n=i[i.length-2];return Ja.delete(e,t,n)}static delete(e,t,i){if(e===null||e===cd||t===i)return e;const n=Sd(e),s=n.length>>>1;if(t===0&&n[n.length-2]===i)return cd;const r=Cn.findIndexInTokensArray(n,t),a=r>0?n[r-1<<1]:0,l=n[r<<1];if(ic&&(n[d++]=f,n[d++]=n[(g<<1)+1],c=f)}if(d===n.length)return e;const h=new Uint32Array(d);return h.set(n.subarray(0,d),0),h.buffer}static append(e,t){if(t===cd)return e;if(e===cd)return t;if(e===null)return e;if(t===null)return null;const i=Sd(e),n=Sd(t),s=n.length>>>1,r=new Uint32Array(i.length+n.length);r.set(i,0);let a=i.length;const l=i[i.length-2];for(let d=0;d>>1;let r=Cn.findIndexInTokensArray(n,t);r>0&&n[r-1<<1]===t&&r--;for(let a=r;a0}getTokens(e,t,i){let n=null;if(t1&&(s=Yn.getLanguageId(n[1])!==e),!s)return cd}if(!n||n.length===0){const s=new Uint32Array(2);return s[0]=t,s[1]=Z4(e),s.buffer}return n[n.length-2]=t,n.byteOffset===0&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){t!==0&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(t===0)return;const i=[];for(let n=0;n=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[t]=Ja.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1);return}this._lineTokens[t]=Ja.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len)){if(t===0){this._lineTokens[n]=Ja.insert(this._lineTokens[n],e.column-1,i);return}this._lineTokens[n]=Ja.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=Ja.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)}}setMultilineTokens(e,t){if(e.length===0)return{changes:[]};const i=[];for(let n=0,s=e.length;n>>0}class fA{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const s=t[0].getRange(),r=t[t.length-1].getRange();if(!s||!r)return e;i=e.plusRange(s).plusRange(r)}let n=null;for(let s=0,r=this._pieces.length;si.endLineNumber){n=n||{index:s};break}if(a.removeTokens(i),a.isEmpty()){this._pieces.splice(s,1),s--,r--;continue}if(a.endLineNumberi.endLineNumber){n=n||{index:s};continue}const[l,d]=a.split(i);if(l.isEmpty()){n=n||{index:s};continue}d.isEmpty()||(this._pieces.splice(s,1,l,d),s++,r++,n=n||{index:s})}return n=n||{index:this._pieces.length},t.length>0&&(this._pieces=oy(this._pieces,n.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(t.getLineContent().length===0)return t;const i=this._pieces;if(i.length===0)return t;const n=fA._findFirstPieceWithLine(i,e),s=i[n].getLineTokens(e);if(!s)return t;const r=t.getCount(),a=s.getCount();let l=0;const d=[];let c=0,u=0;const h=(g,f)=>{g!==u&&(u=g,d[c++]=g,d[c++]=f)};for(let g=0;g>>0,b=~_>>>0;for(;lt)n=s-1;else{for(;s>i&&e[s-1].startLineNumber<=t&&t<=e[s-1].endLineNumber;)s--;return s}}return i}acceptEdit(e,t,i,n,s){for(const r of this._pieces)r.acceptEdit(e,t,i,n,s)}}class Fw extends uB{constructor(e,t,i,n,s,r){super(),this._languageService=e,this._languageConfigurationService=t,this._textModel=i,this._bracketPairsTextModelPart=n,this._languageId=s,this._attachedViews=r,this._semanticTokens=new fA(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new W),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new W),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new W),this.onDidChangeTokens=this._onDidChangeTokens.event,this.grammarTokens=this._register(new gre(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews)),this._register(this._languageConfigurationService.onDidChange(a=>{a.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._register(this.grammarTokens.onDidChangeTokens(a=>{this._emitModelTokensChangedEvent(a)})),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState(a=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[i,n,s]=fu(t.text);this._semanticTokens.acceptEdit(t.range,i,n,s,t.text.length>0?t.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(e)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this.grammarTokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new Ci("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this.grammarTokens.forceTokenization(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this.grammarTokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this.grammarTokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,i){return this.grammarTokens.getTokenTypeIfInsertingCharacter(e,t,i)}tokenizeLineWithEdit(e,t,i){return this.grammarTokens.tokenizeLineWithEdit(e,t,i)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),i=this._textModel.getLineContent(t.lineNumber),n=this.getLineTokens(t.lineNumber),s=n.findTokenIndexAtOffset(t.column-1),[r,a]=Fw._findLanguageBoundaries(n,s),l=vv(t.column,this.getLanguageConfiguration(n.getLanguageId(s)).getWordDefinition(),i.substring(r,a),r);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(s>0&&r===t.column-1){const[d,c]=Fw._findLanguageBoundaries(n,s-1),u=vv(t.column,this.getLanguageConfiguration(n.getLanguageId(s-1)).getWordDefinition(),i.substring(d,c),d);if(u&&u.startColumn<=e.column&&e.column<=u.endColumn)return u}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let r=t;r>=0&&e.getLanguageId(r)===i;r--)n=e.getStartOffset(r);let s=e.getLineContent().length;for(let r=t,a=e.getCount();r{const r=this.getLanguageId();s.changedLanguages.indexOf(r)!==-1&&this.resetTokenization()})),this.resetTokenization(),this._register(n.onDidChangeVisibleRanges(({view:s,state:r})=>{if(r){let a=this._attachedViewStates.get(s);a||(a=new fre(()=>this.refreshRanges(a.lineRanges)),this._attachedViewStates.set(s,a)),a.handleStateChange(r)}else this._attachedViewStates.deleteAndDispose(s)}))}resetTokenization(e=!0){var t;this._tokens.flush(),(t=this._debugBackgroundTokens)===null||t===void 0||t.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new SE(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const i=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const r=Ei.get(this.getLanguageId());if(!r)return[null,null];let a;try{a=r.getInitialState()}catch(l){return nt(l),[null,null]}return[r,a]},[n,s]=i();if(n&&s?this._tokenizer=new dre(this._textModel.getLineCount(),n,this._textModel,this._languageIdCodec):this._tokenizer=null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const r={setTokens:a=>{this.setTokens(a)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;const a=2;this._backgroundTokenizationState=a,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(a,l)=>{var d;if(!this._tokenizer)return;const c=this._tokenizer.store.getFirstInvalidEndStateLineNumber();c!==null&&a>=c&&((d=this._tokenizer)===null||d===void 0||d.store.setEndState(a,l))}};n&&n.createBackgroundTokenizer&&!n.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,r)),this._backgroundTokenizer.value||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new hre(this._tokenizer,r),this._defaultBackgroundTokenizer.handleChanges()),n!=null&&n.backgroundTokenizerShouldOnlyVerifyTokens&&n.createBackgroundTokenizer?(this._debugBackgroundTokens=new Qv(this._languageIdCodec),this._debugBackgroundStates=new SE(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,{setTokens:a=>{var l;(l=this._debugBackgroundTokens)===null||l===void 0||l.setMultilineTokens(a,this._textModel)},backgroundTokenizationFinished(){},setEndState:(a,l)=>{var d;(d=this._debugBackgroundStates)===null||d===void 0||d.setEndState(a,l)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var e;(e=this._defaultBackgroundTokenizer)===null||e===void 0||e.handleChanges()}handleDidChangeContent(e){var t,i,n;if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const s of e.changes){const[r,a]=fu(s.text);this._tokens.acceptEdit(s.range,r,a),(t=this._debugBackgroundTokens)===null||t===void 0||t.acceptEdit(s.range,r,a)}(i=this._debugBackgroundStates)===null||i===void 0||i.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),(n=this._defaultBackgroundTokenizer)===null||n===void 0||n.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=yt.joinMany([...this._attachedViewStates].map(([t,i])=>i.lineRanges));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){var i,n;if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const s=new wE,{heuristicTokens:r}=this._tokenizer.tokenizeHeuristically(s,e,t),a=this.setTokens(s.finalize());if(r)for(const l of a.changes)(i=this._backgroundTokenizer.value)===null||i===void 0||i.requestTokens(l.fromLineNumber,l.toLineNumber+1);(n=this._defaultBackgroundTokenizer)===null||n===void 0||n.checkFinished()}forceTokenization(e){var t,i;const n=new wE;(t=this._tokenizer)===null||t===void 0||t.updateTokensUntilLine(n,e),this.setTokens(n.finalize()),(i=this._defaultBackgroundTokenizer)===null||i===void 0||i.checkFinished()}isCheapToTokenize(e){return this._tokenizer?this._tokenizer.isCheapToTokenize(e):!0}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){var t;const i=this._textModel.getLineContent(e),n=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,i);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const s=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,i);!n.equals(s)&&(!((t=this._debugBackgroundTokenizer.value)===null||t===void 0)&&t.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return n}getTokenTypeIfInsertingCharacter(e,t,i){if(!this._tokenizer)return 0;const n=this._textModel.validatePosition(new z(e,t));return this.forceTokenization(n.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){if(!this._tokenizer)return null;const n=this._textModel.validatePosition(e);return this.forceTokenization(n.lineNumber),this._tokenizer.tokenizeLineWithEdit(n,t,i)}get hasTokens(){return this._tokens.hasTokens}}class fre extends q{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new Yt(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){Bi(this._computedLineRanges,this._lineRanges,(e,t)=>e.equals(t))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class pre{constructor(){this.changeType=1}}class Ta{static applyInjectedText(e,t){if(!t||t.length===0)return e;let i="",n=0;for(const s of t)i+=e.substring(n,s.column-1),n=s.column-1,i+=s.options.content;return i+=e.substring(n),i}static fromDecorations(e){const t=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&t.push(new Ta(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new Ta(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort((i,n)=>i.lineNumber===n.lineNumber?i.column===n.column?i.order-n.order:i.column-n.column:i.lineNumber-n.lineNumber),t}constructor(e,t,i,n,s){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=s}}class Y4{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class mre{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class _re{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class vre{constructor(){this.changeType=5}}class up{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bx=function(o,e){return function(t,i){e(t,i,o)}},ch;function Cre(o){const e=new AB;return e.acceptChunk(o),e.finish()}function wre(o){const e=new AB;let t;for(;typeof(t=o.read())=="string";)e.acceptChunk(t);return e.finish()}function X4(o,e){let t;return typeof o=="string"?t=Cre(o):uJ(o)?t=wre(o):t=o,t.create(e)}let fC=0;const Sre=999,yre=1e4;class Lre{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,i=0;do{const n=this._source.read();if(n===null)return this._eos=!0,t===0?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=64*1024)return e.join("")}while(!0)}}const Ym=()=>{throw new Error("Invalid change accessor")};let Wl=ch=class extends q{static resolveOptions(e,t){if(t.detectIndentation){const i=H4(e,t.tabSize,t.insertSpaces);return new b1({tabSize:i.tabSize,indentSize:"tabSize",insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new b1(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return Hr(this._eventEmitter.fastEvent(t=>e(t)),this._onDidChangeInjectedText.event(t=>e(t)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,i,n=null,s,r,a){super(),this._undoRedoService=s,this._languageService=r,this._languageConfigurationService=a,this._onWillDispose=this._register(new W),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Ere(g=>this.handleBeforeFireDecorationsChangedEvent(g))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new W),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new W),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new W),this._eventEmitter=this._register(new Nre),this._languageSelectionListener=this._register(new An),this._deltaDecorationCallCnt=0,this._attachedViews=new Tre,fC++,this.id="$model"+fC,this.isForSimpleWidget=i.isForSimpleWidget,typeof n>"u"||n===null?this._associatedResource=ze.parse("inmemory://model/"+fC):this._associatedResource=n,this._attachedEditorCount=0;const{textBuffer:l,disposable:d}=X4(e,i.defaultEOL);this._buffer=l,this._bufferDisposable=d,this._options=ch.resolveOptions(this._buffer,i);const c=typeof t=="string"?t:t.languageId;typeof t!="string"&&(this._languageSelectionListener.value=t.onDidChange(()=>this._setLanguage(t.languageId))),this._bracketPairs=this._register(new Doe(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new Cse(this,this._languageConfigurationService)),this._decorationProvider=this._register(new koe(this)),this._tokenizationTextModelPart=new Fw(this._languageService,this._languageConfigurationService,this,this._bracketPairs,c,this._attachedViews);const u=this._buffer.getLineCount(),h=this._buffer.getValueLengthInRange(new k(1,1,u,this._buffer.getLineLength(u)+1),0);i.largeFileOptimizations?(this._isTooLargeForTokenization=h>ch.LARGE_FILE_SIZE_THRESHOLD||u>ch.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=h>ch.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=h>ch._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=v7(fC),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Q4,this._commandManager=new cA(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})),this._languageService.requestRichLanguageFeatures(c)}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new cp([],"",` -`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=q.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new $h(e,t)))}setValue(e){if(this._assertNotDisposed(),e==null)throw hr();const{textBuffer:t,disposable:i}=X4(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,s,r,a,l){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),isEolChange:l,versionId:this.getVersionId(),isUndoing:s,isRedoing:r,isFlush:a}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),r=this.getLineMaxColumn(s);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new Q4,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new up([new pre],this._versionId,!1,!1),this._createContentChanged2(new k(1,1,s,r),0,n,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=e===1?`\r +`&&(this._cr>0||this._crlf>0)))for(let s=0,r=i.length;s=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){!t&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=sre(this._tmpLineStarts,e);this.chunks.push(new yh(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=Dp(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=_8(e)))}finish(e=!0){return this._finish(),new lre(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=dd(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}class dre{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,i){if(e>=this._store.length)return;if(t===0){this.insert(e,i);return}else if(i===0){this.delete(e,t);return}const n=this._store.slice(0,e),s=this._store.slice(e+t),r=cre(i,this._default);this._store=n.concat(r,s)}delete(e,t){t===0||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(t===0||e>=this._store.length)return;const i=[];for(let n=0;n0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e){i.appendLineTokens(t);return}}this._tokens.push(new ure(e,[t]))}finalize(){return this._tokens}}class hre{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new SE(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}class gre extends hre{constructor(e,t,i,n){super(e,t),this._textModel=i,this._languageIdCodec=n}updateTokensUntilLine(e,t){const i=this._textModel.getLanguageId();for(;;){const n=this.getFirstInvalidLine();if(!n||n.lineNumber>t)break;const s=this._textModel.getLineContent(n.lineNumber),r=Zm(this._languageIdCodec,i,this.tokenizationSupport,s,!0,n.startState);e.add(n.lineNumber,r.tokens),this.store.setEndState(n.lineNumber,r.endState)}}getTokenTypeIfInsertingCharacter(e,t){const i=this.getStartState(e.lineNumber);if(!i)return 0;const n=this._textModel.getLanguageId(),s=this._textModel.getLineContent(e.lineNumber),r=s.substring(0,e.column-1)+t+s.substring(e.column-1),a=Zm(this._languageIdCodec,n,this.tokenizationSupport,r,!0,i),l=new Cn(a.tokens,r,this._languageIdCodec);if(l.getCount()===0)return 0;const d=l.findTokenIndexAtOffset(e.column-1);return l.getStandardTokenType(d)}tokenizeLineWithEdit(e,t,i){const n=e.lineNumber,s=e.column,r=this.getStartState(n);if(!r)return null;const a=this._textModel.getLineContent(n),l=a.substring(0,s-1)+i+a.substring(s-1+t),d=this._textModel.getLanguageIdAtPosition(n,0),c=Zm(this._languageIdCodec,d,this.tokenizationSupport,l,!0,r);return new Cn(c.tokens,l,this._languageIdCodec)}isCheapToTokenize(e){const t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&a>=1;a--){const l=this._textModel.getLineFirstNonWhitespaceColumn(a);if(l!==0&&l0&&i>0&&(i--,t--),this._lineEndStates.replace(e.startLineNumber,i,t)}}class pre{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex(i=>i.contains(e));if(t!==-1){const i=this._ranges[t];i.start===e?i.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new ut(e+1,i.endExclusive):i.endExclusive===e+1?this._ranges[t]=new ut(i.start,e):this._ranges.splice(t,1,new ut(i.start,e),new ut(e+1,i.endExclusive))}}addRange(e){ut.addRange(e,this._ranges)}addRangeAndResize(e,t){let i=0;for(;!(i>=this._ranges.length||e.start<=this._ranges[i].endExclusive);)i++;let n=i;for(;!(n>=this._ranges.length||e.endExclusivee.toString()).join(" + ")}}function Zm(o,e,t,i,n,s){let r=null;if(t)try{r=t.tokenizeEncoded(i,n,s.clone())}catch(a){nt(a)}return r||(r=Ay(o.encodeLanguageId(e),s)),Cn.convertToEndOffset(r.tokens,i.length),r}class mre{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,T8(e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()1||this._tokenizeOneInvalidLine(t)>=e)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.allStatesValid():!1}_tokenizeOneInvalidLine(e){var t;const i=(t=this._tokenizerWithStateStore)===null||t===void 0?void 0:t.getFirstInvalidLine();return i?(this._tokenizerWithStateStore.updateTokensUntilLine(e,i.lineNumber),i.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new yt(e,t))}}const cd=new Uint32Array(0).buffer;class Ja{static deleteBeginning(e,t){return e===null||e===cd?e:Ja.delete(e,0,t)}static deleteEnding(e,t){if(e===null||e===cd)return e;const i=Sd(e),n=i[i.length-2];return Ja.delete(e,t,n)}static delete(e,t,i){if(e===null||e===cd||t===i)return e;const n=Sd(e),s=n.length>>>1;if(t===0&&n[n.length-2]===i)return cd;const r=Cn.findIndexInTokensArray(n,t),a=r>0?n[r-1<<1]:0,l=n[r<<1];if(ic&&(n[d++]=f,n[d++]=n[(g<<1)+1],c=f)}if(d===n.length)return e;const h=new Uint32Array(d);return h.set(n.subarray(0,d),0),h.buffer}static append(e,t){if(t===cd)return e;if(e===cd)return t;if(e===null)return e;if(t===null)return null;const i=Sd(e),n=Sd(t),s=n.length>>>1,r=new Uint32Array(i.length+n.length);r.set(i,0);let a=i.length;const l=i[i.length-2];for(let d=0;d>>1;let r=Cn.findIndexInTokensArray(n,t);r>0&&n[r-1<<1]===t&&r--;for(let a=r;a0}getTokens(e,t,i){let n=null;if(t1&&(s=Yn.getLanguageId(n[1])!==e),!s)return cd}if(!n||n.length===0){const s=new Uint32Array(2);return s[0]=t,s[1]=Z4(e),s.buffer}return n[n.length-2]=t,n.byteOffset===0&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){t!==0&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(t===0)return;const i=[];for(let n=0;n=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[t]=Ja.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1);return}this._lineTokens[t]=Ja.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len)){if(t===0){this._lineTokens[n]=Ja.insert(this._lineTokens[n],e.column-1,i);return}this._lineTokens[n]=Ja.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=Ja.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)}}setMultilineTokens(e,t){if(e.length===0)return{changes:[]};const i=[];for(let n=0,s=e.length;n>>0}class fA{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const s=t[0].getRange(),r=t[t.length-1].getRange();if(!s||!r)return e;i=e.plusRange(s).plusRange(r)}let n=null;for(let s=0,r=this._pieces.length;si.endLineNumber){n=n||{index:s};break}if(a.removeTokens(i),a.isEmpty()){this._pieces.splice(s,1),s--,r--;continue}if(a.endLineNumberi.endLineNumber){n=n||{index:s};continue}const[l,d]=a.split(i);if(l.isEmpty()){n=n||{index:s};continue}d.isEmpty()||(this._pieces.splice(s,1,l,d),s++,r++,n=n||{index:s})}return n=n||{index:this._pieces.length},t.length>0&&(this._pieces=oy(this._pieces,n.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(t.getLineContent().length===0)return t;const i=this._pieces;if(i.length===0)return t;const n=fA._findFirstPieceWithLine(i,e),s=i[n].getLineTokens(e);if(!s)return t;const r=t.getCount(),a=s.getCount();let l=0;const d=[];let c=0,u=0;const h=(g,f)=>{g!==u&&(u=g,d[c++]=g,d[c++]=f)};for(let g=0;g>>0,b=~_>>>0;for(;lt)n=s-1;else{for(;s>i&&e[s-1].startLineNumber<=t&&t<=e[s-1].endLineNumber;)s--;return s}}return i}acceptEdit(e,t,i,n,s){for(const r of this._pieces)r.acceptEdit(e,t,i,n,s)}}class Fw extends uB{constructor(e,t,i,n,s,r){super(),this._languageService=e,this._languageConfigurationService=t,this._textModel=i,this._bracketPairsTextModelPart=n,this._languageId=s,this._attachedViews=r,this._semanticTokens=new fA(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new W),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new W),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new W),this.onDidChangeTokens=this._onDidChangeTokens.event,this.grammarTokens=this._register(new _re(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews)),this._register(this._languageConfigurationService.onDidChange(a=>{a.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._register(this.grammarTokens.onDidChangeTokens(a=>{this._emitModelTokensChangedEvent(a)})),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState(a=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[i,n,s]=fu(t.text);this._semanticTokens.acceptEdit(t.range,i,n,s,t.text.length>0?t.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(e)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this.grammarTokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new Ci("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this.grammarTokens.forceTokenization(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this.grammarTokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this.grammarTokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,i){return this.grammarTokens.getTokenTypeIfInsertingCharacter(e,t,i)}tokenizeLineWithEdit(e,t,i){return this.grammarTokens.tokenizeLineWithEdit(e,t,i)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),i=this._textModel.getLineContent(t.lineNumber),n=this.getLineTokens(t.lineNumber),s=n.findTokenIndexAtOffset(t.column-1),[r,a]=Fw._findLanguageBoundaries(n,s),l=vv(t.column,this.getLanguageConfiguration(n.getLanguageId(s)).getWordDefinition(),i.substring(r,a),r);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(s>0&&r===t.column-1){const[d,c]=Fw._findLanguageBoundaries(n,s-1),u=vv(t.column,this.getLanguageConfiguration(n.getLanguageId(s-1)).getWordDefinition(),i.substring(d,c),d);if(u&&u.startColumn<=e.column&&e.column<=u.endColumn)return u}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let r=t;r>=0&&e.getLanguageId(r)===i;r--)n=e.getStartOffset(r);let s=e.getLineContent().length;for(let r=t,a=e.getCount();r{const r=this.getLanguageId();s.changedLanguages.indexOf(r)!==-1&&this.resetTokenization()})),this.resetTokenization(),this._register(n.onDidChangeVisibleRanges(({view:s,state:r})=>{if(r){let a=this._attachedViewStates.get(s);a||(a=new vre(()=>this.refreshRanges(a.lineRanges)),this._attachedViewStates.set(s,a)),a.handleStateChange(r)}else this._attachedViewStates.deleteAndDispose(s)}))}resetTokenization(e=!0){var t;this._tokens.flush(),(t=this._debugBackgroundTokens)===null||t===void 0||t.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new SE(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const i=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const r=Ei.get(this.getLanguageId());if(!r)return[null,null];let a;try{a=r.getInitialState()}catch(l){return nt(l),[null,null]}return[r,a]},[n,s]=i();if(n&&s?this._tokenizer=new gre(this._textModel.getLineCount(),n,this._textModel,this._languageIdCodec):this._tokenizer=null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const r={setTokens:a=>{this.setTokens(a)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;const a=2;this._backgroundTokenizationState=a,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(a,l)=>{var d;if(!this._tokenizer)return;const c=this._tokenizer.store.getFirstInvalidEndStateLineNumber();c!==null&&a>=c&&((d=this._tokenizer)===null||d===void 0||d.store.setEndState(a,l))}};n&&n.createBackgroundTokenizer&&!n.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,r)),this._backgroundTokenizer.value||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new mre(this._tokenizer,r),this._defaultBackgroundTokenizer.handleChanges()),n!=null&&n.backgroundTokenizerShouldOnlyVerifyTokens&&n.createBackgroundTokenizer?(this._debugBackgroundTokens=new Qv(this._languageIdCodec),this._debugBackgroundStates=new SE(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,{setTokens:a=>{var l;(l=this._debugBackgroundTokens)===null||l===void 0||l.setMultilineTokens(a,this._textModel)},backgroundTokenizationFinished(){},setEndState:(a,l)=>{var d;(d=this._debugBackgroundStates)===null||d===void 0||d.setEndState(a,l)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var e;(e=this._defaultBackgroundTokenizer)===null||e===void 0||e.handleChanges()}handleDidChangeContent(e){var t,i,n;if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const s of e.changes){const[r,a]=fu(s.text);this._tokens.acceptEdit(s.range,r,a),(t=this._debugBackgroundTokens)===null||t===void 0||t.acceptEdit(s.range,r,a)}(i=this._debugBackgroundStates)===null||i===void 0||i.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),(n=this._defaultBackgroundTokenizer)===null||n===void 0||n.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=yt.joinMany([...this._attachedViewStates].map(([t,i])=>i.lineRanges));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){var i,n;if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const s=new wE,{heuristicTokens:r}=this._tokenizer.tokenizeHeuristically(s,e,t),a=this.setTokens(s.finalize());if(r)for(const l of a.changes)(i=this._backgroundTokenizer.value)===null||i===void 0||i.requestTokens(l.fromLineNumber,l.toLineNumber+1);(n=this._defaultBackgroundTokenizer)===null||n===void 0||n.checkFinished()}forceTokenization(e){var t,i;const n=new wE;(t=this._tokenizer)===null||t===void 0||t.updateTokensUntilLine(n,e),this.setTokens(n.finalize()),(i=this._defaultBackgroundTokenizer)===null||i===void 0||i.checkFinished()}isCheapToTokenize(e){return this._tokenizer?this._tokenizer.isCheapToTokenize(e):!0}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){var t;const i=this._textModel.getLineContent(e),n=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,i);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const s=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,i);!n.equals(s)&&(!((t=this._debugBackgroundTokenizer.value)===null||t===void 0)&&t.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return n}getTokenTypeIfInsertingCharacter(e,t,i){if(!this._tokenizer)return 0;const n=this._textModel.validatePosition(new z(e,t));return this.forceTokenization(n.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){if(!this._tokenizer)return null;const n=this._textModel.validatePosition(e);return this.forceTokenization(n.lineNumber),this._tokenizer.tokenizeLineWithEdit(n,t,i)}get hasTokens(){return this._tokens.hasTokens}}class vre extends q{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new Yt(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){Bi(this._computedLineRanges,this._lineRanges,(e,t)=>e.equals(t))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class bre{constructor(){this.changeType=1}}class Ta{static applyInjectedText(e,t){if(!t||t.length===0)return e;let i="",n=0;for(const s of t)i+=e.substring(n,s.column-1),n=s.column-1,i+=s.options.content;return i+=e.substring(n),i}static fromDecorations(e){const t=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&t.push(new Ta(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new Ta(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort((i,n)=>i.lineNumber===n.lineNumber?i.column===n.column?i.order-n.order:i.column-n.column:i.lineNumber-n.lineNumber),t}constructor(e,t,i,n,s){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=s}}class Y4{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class Cre{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class wre{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class Sre{constructor(){this.changeType=5}}class up{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bx=function(o,e){return function(t,i){e(t,i,o)}},ch;function Lre(o){const e=new AB;return e.acceptChunk(o),e.finish()}function Dre(o){const e=new AB;let t;for(;typeof(t=o.read())=="string";)e.acceptChunk(t);return e.finish()}function X4(o,e){let t;return typeof o=="string"?t=Lre(o):pJ(o)?t=Dre(o):t=o,t.create(e)}let fC=0;const xre=999,kre=1e4;class Ire{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,i=0;do{const n=this._source.read();if(n===null)return this._eos=!0,t===0?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=64*1024)return e.join("")}while(!0)}}const Ym=()=>{throw new Error("Invalid change accessor")};let Wl=ch=class extends q{static resolveOptions(e,t){if(t.detectIndentation){const i=H4(e,t.tabSize,t.insertSpaces);return new b1({tabSize:i.tabSize,indentSize:"tabSize",insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new b1(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return Hr(this._eventEmitter.fastEvent(t=>e(t)),this._onDidChangeInjectedText.event(t=>e(t)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,i,n=null,s,r,a){super(),this._undoRedoService=s,this._languageService=r,this._languageConfigurationService=a,this._onWillDispose=this._register(new W),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Are(g=>this.handleBeforeFireDecorationsChangedEvent(g))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new W),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new W),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new W),this._eventEmitter=this._register(new Rre),this._languageSelectionListener=this._register(new An),this._deltaDecorationCallCnt=0,this._attachedViews=new Pre,fC++,this.id="$model"+fC,this.isForSimpleWidget=i.isForSimpleWidget,typeof n>"u"||n===null?this._associatedResource=ze.parse("inmemory://model/"+fC):this._associatedResource=n,this._attachedEditorCount=0;const{textBuffer:l,disposable:d}=X4(e,i.defaultEOL);this._buffer=l,this._bufferDisposable=d,this._options=ch.resolveOptions(this._buffer,i);const c=typeof t=="string"?t:t.languageId;typeof t!="string"&&(this._languageSelectionListener.value=t.onDidChange(()=>this._setLanguage(t.languageId))),this._bracketPairs=this._register(new Eoe(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new Lse(this,this._languageConfigurationService)),this._decorationProvider=this._register(new Toe(this)),this._tokenizationTextModelPart=new Fw(this._languageService,this._languageConfigurationService,this,this._bracketPairs,c,this._attachedViews);const u=this._buffer.getLineCount(),h=this._buffer.getValueLengthInRange(new k(1,1,u,this._buffer.getLineLength(u)+1),0);i.largeFileOptimizations?(this._isTooLargeForTokenization=h>ch.LARGE_FILE_SIZE_THRESHOLD||u>ch.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=h>ch.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=h>ch._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=v8(fC),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Q4,this._commandManager=new cA(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})),this._languageService.requestRichLanguageFeatures(c)}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new cp([],"",` +`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=q.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new $h(e,t)))}setValue(e){if(this._assertNotDisposed(),e==null)throw hr();const{textBuffer:t,disposable:i}=X4(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,s,r,a,l){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),isEolChange:l,versionId:this.getVersionId(),isUndoing:s,isRedoing:r,isFlush:a}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),r=this.getLineMaxColumn(s);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new Q4,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new up([new bre],this._versionId,!1,!1),this._createContentChanged2(new k(1,1,s,r),0,n,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=e===1?`\r `:` -`;if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),r=this.getLineMaxColumn(s);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new up([new vre],this._versionId,!1,!1),this._createContentChanged2(new k(1,1,s,r),0,n,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const s=this._buffer.getLineLength(n);s>=yre?t+=s:e+=s}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,i=typeof e.indentSize<"u"?e.indentSize:this._options.originalIndentSize,n=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,s=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new b1({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:s,bracketPairColorizationOptions:r});if(this._options.equals(a))return;const l=this._options.createChangeEvent(a);this._options=a,this._bracketPairs.handleDidChangeOptions(l),this._decorationProvider.handleDidChangeOptions(l),this._onDidChangeOptions.fire(l)}detectIndentation(e,t){this._assertNotDisposed();const i=H4(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),iA(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(m7.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(i=>({range:i.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new Ci("Operation would exceed heap memory limits");const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new Lre(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Ci("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Ci("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new Ci("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` -`?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Ci("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Ci("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Ci("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let s=Math.floor(typeof i=="number"&&!isNaN(i)?i:1),r=Math.floor(typeof n=="number"&&!isNaN(n)?n:1);if(s<1)s=1,r=1;else if(s>t)s=t,r=this.getLineMaxColumn(s);else if(r<=1)r=1;else{const u=this.getLineMaxColumn(s);r>=u&&(r=u)}const a=e.endLineNumber,l=e.endColumn;let d=Math.floor(typeof a=="number"&&!isNaN(a)?a:1),c=Math.floor(typeof l=="number"&&!isNaN(l)?l:1);if(d<1)d=1,c=1;else if(d>t)d=t,c=this.getLineMaxColumn(d);else if(c<=1)c=1;else{const u=this.getLineMaxColumn(d);c>=u&&(c=u)}return i===s&&n===r&&a===d&&l===c&&e instanceof k&&!(e instanceof Re)?e:new k(s,r,d,c)}_isValidPosition(e,t,i){if(typeof e!="number"||typeof t!="number"||isNaN(e)||isNaN(t)||e<1||t<1||(e|0)!==e||(t|0)!==t)return!1;const n=this._buffer.getLineCount();if(e>n)return!1;if(t===1)return!0;const s=this.getLineMaxColumn(e);if(t>s)return!1;if(i===1){const r=this._buffer.getLineCharCode(e,t-2);if(bn(r))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),s=Math.floor(typeof t=="number"&&!isNaN(t)?t:1),r=this._buffer.getLineCount();if(n<1)return new z(1,1);if(n>r)return new z(r,this.getLineMaxColumn(r));if(s<=1)return new z(n,1);const a=this.getLineMaxColumn(n);if(s>=a)return new z(n,a);if(i===1){const l=this._buffer.getLineCharCode(n,s-2);if(bn(l))return new z(n,s-1)}return new z(n,s)}validatePosition(e){return this._assertNotDisposed(),e instanceof z&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(i,n,0)||!this._isValidPosition(s,r,0))return!1;if(t===1){const a=n>1?this._buffer.getLineCharCode(i,n-2):0,l=r>1&&r<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,r-2):0,d=bn(a),c=bn(l);return!d&&!c}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof k&&!(e instanceof Re)&&this._isValidRange(e,1))return e;const i=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),s=i.lineNumber,r=i.column,a=n.lineNumber,l=n.column;{const d=r>1?this._buffer.getLineCharCode(s,r-2):0,c=l>1&&l<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,l-2):0,u=bn(d),h=bn(c);return!u&&!h?new k(s,r,a,l):s===a&&r===l?new k(s,r-1,a,l-1):u&&h?new k(s,r-1,a,l+1):u?new k(s,r-1,a,l):new k(s,r,a,l+1)}}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new k(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,s,r,a=Sre){this._assertNotDisposed();let l=null;t!==null&&(Array.isArray(t)||(t=[t]),t.every(u=>k.isIRange(u))&&(l=t.map(u=>this.validateRange(u)))),l===null&&(l=[this.getFullModelRange()]),l=l.sort((u,h)=>u.startLineNumber-h.startLineNumber||u.startColumn-h.startColumn);const d=[];d.push(l.reduce((u,h)=>k.areIntersecting(u,h)?u.plusRange(h):(d.push(u),h)));let c;if(!i&&e.indexOf(` +`;if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),r=this.getLineMaxColumn(s);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new up([new Sre],this._versionId,!1,!1),this._createContentChanged2(new k(1,1,s,r),0,n,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const s=this._buffer.getLineLength(n);s>=kre?t+=s:e+=s}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,i=typeof e.indentSize<"u"?e.indentSize:this._options.originalIndentSize,n=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,s=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new b1({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:s,bracketPairColorizationOptions:r});if(this._options.equals(a))return;const l=this._options.createChangeEvent(a);this._options=a,this._bracketPairs.handleDidChangeOptions(l),this._decorationProvider.handleDidChangeOptions(l),this._onDidChangeOptions.fire(l)}detectIndentation(e,t){this._assertNotDisposed();const i=H4(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),iA(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(m8.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(i=>({range:i.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new Ci("Operation would exceed heap memory limits");const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new Ire(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Ci("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Ci("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new Ci("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` +`?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Ci("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Ci("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Ci("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let s=Math.floor(typeof i=="number"&&!isNaN(i)?i:1),r=Math.floor(typeof n=="number"&&!isNaN(n)?n:1);if(s<1)s=1,r=1;else if(s>t)s=t,r=this.getLineMaxColumn(s);else if(r<=1)r=1;else{const u=this.getLineMaxColumn(s);r>=u&&(r=u)}const a=e.endLineNumber,l=e.endColumn;let d=Math.floor(typeof a=="number"&&!isNaN(a)?a:1),c=Math.floor(typeof l=="number"&&!isNaN(l)?l:1);if(d<1)d=1,c=1;else if(d>t)d=t,c=this.getLineMaxColumn(d);else if(c<=1)c=1;else{const u=this.getLineMaxColumn(d);c>=u&&(c=u)}return i===s&&n===r&&a===d&&l===c&&e instanceof k&&!(e instanceof Ae)?e:new k(s,r,d,c)}_isValidPosition(e,t,i){if(typeof e!="number"||typeof t!="number"||isNaN(e)||isNaN(t)||e<1||t<1||(e|0)!==e||(t|0)!==t)return!1;const n=this._buffer.getLineCount();if(e>n)return!1;if(t===1)return!0;const s=this.getLineMaxColumn(e);if(t>s)return!1;if(i===1){const r=this._buffer.getLineCharCode(e,t-2);if(bn(r))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),s=Math.floor(typeof t=="number"&&!isNaN(t)?t:1),r=this._buffer.getLineCount();if(n<1)return new z(1,1);if(n>r)return new z(r,this.getLineMaxColumn(r));if(s<=1)return new z(n,1);const a=this.getLineMaxColumn(n);if(s>=a)return new z(n,a);if(i===1){const l=this._buffer.getLineCharCode(n,s-2);if(bn(l))return new z(n,s-1)}return new z(n,s)}validatePosition(e){return this._assertNotDisposed(),e instanceof z&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(i,n,0)||!this._isValidPosition(s,r,0))return!1;if(t===1){const a=n>1?this._buffer.getLineCharCode(i,n-2):0,l=r>1&&r<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,r-2):0,d=bn(a),c=bn(l);return!d&&!c}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof k&&!(e instanceof Ae)&&this._isValidRange(e,1))return e;const i=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),s=i.lineNumber,r=i.column,a=n.lineNumber,l=n.column;{const d=r>1?this._buffer.getLineCharCode(s,r-2):0,c=l>1&&l<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,l-2):0,u=bn(d),h=bn(c);return!u&&!h?new k(s,r,a,l):s===a&&r===l?new k(s,r-1,a,l-1):u&&h?new k(s,r-1,a,l+1):u?new k(s,r-1,a,l):new k(s,r,a,l+1)}}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new k(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,s,r,a=xre){this._assertNotDisposed();let l=null;t!==null&&(Array.isArray(t)||(t=[t]),t.every(u=>k.isIRange(u))&&(l=t.map(u=>this.validateRange(u)))),l===null&&(l=[this.getFullModelRange()]),l=l.sort((u,h)=>u.startLineNumber-h.startLineNumber||u.startColumn-h.startColumn);const d=[];d.push(l.reduce((u,h)=>k.areIntersecting(u,h)?u.plusRange(h):(d.push(u),h)));let c;if(!i&&e.indexOf(` `)<0){const h=new dh(e,i,n,s).parseSearchRequest();if(!h)return[];c=g=>this.findMatchesLineByLine(g,h,r,a)}else c=u=>J0.findMatches(this,new dh(e,i,n,s),u,r,a);return d.map(c).reduce((u,h)=>u.concat(h),[])}findNextMatch(e,t,i,n,s,r){this._assertNotDisposed();const a=this.validatePosition(t);if(!i&&e.indexOf(` `)<0){const d=new dh(e,i,n,s).parseSearchRequest();if(!d)return null;const c=this.getLineCount();let u=new k(a.lineNumber,a.column,c,this.getLineMaxColumn(c)),h=this.findMatchesLineByLine(u,d,r,1);return J0.findNextMatch(this,new dh(e,i,n,s),a,r),h.length>0||(u=new k(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),h=this.findMatchesLineByLine(u,d,r,1),h.length>0)?h[0]:null}return J0.findNextMatch(this,new dh(e,i,n,s),a,r)}findPreviousMatch(e,t,i,n,s,r){this._assertNotDisposed();const a=this.validatePosition(t);return J0.findPreviousMatch(this,new dh(e,i,n,s),a,r)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===` `?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof JD?e:new JD(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i({range:this.validateRange(a.range),text:a.text}));let r=!0;if(e)for(let a=0,l=e.length;ad.endLineNumber,m=d.startLineNumber>g.endLineNumber;if(!f&&!m){c=!0;break}}if(!c){r=!1;break}}if(r)for(let a=0,l=this._trimAutoWhitespaceLines.length;af.endLineNumber)&&!(d===f.startLineNumber&&f.startColumn===c&&f.isEmpty()&&m&&m.length>0&&m.charAt(0)===` `)&&!(d===f.startLineNumber&&f.startColumn===1&&f.isEmpty()&&m&&m.length>0&&m.charAt(m.length-1)===` -`)){u=!1;break}}if(u){const h=new k(d,1,d,c);t.push(new JD(null,h,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i,n)}_applyUndo(e,t,i,n){const s=e.map(r=>{const a=this.getPositionAt(r.newPosition),l=this.getPositionAt(r.newEnd);return{range:new k(a.lineNumber,a.column,l.lineNumber,l.column),text:r.oldText}});this._applyUndoRedoEdits(s,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const s=e.map(r=>{const a=this.getPositionAt(r.oldPosition),l=this.getPositionAt(r.oldEnd);return{range:new k(a.lineNumber,a.column,l.lineNumber,l.column),text:r.newText}});this._applyUndoRedoEdits(s,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,s,r){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(s)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(r),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),s=this._buffer.getLineCount(),r=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,r.length!==0){for(let d=0,c=r.length;d=0;E--){const R=g+E,j=C+E;I.takeFromEndWhile($=>$.lineNumber>j);const O=I.takeFromEndWhile($=>$.lineNumber===j);a.push(new Y4(R,this.getLineContent(j),O))}if(_he.lineNumberhe.lineNumber===Le)}a.push(new _re(R+1,g+v,K,$))}l+=b}this._emitContentChangedEvent(new up(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:r,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return n.reverseEdits===null?void 0:n.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(e===null||e.size===0)return;const i=Array.from(e).map(n=>new Y4(n,this.getLineContent(n),this._getInjectedTextInLine(n)));this._onDidChangeInjectedText.fire(new RB(i))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(s,r)=>this._deltaDecorationsImpl(e,[],[{range:s,options:r}])[0],changeDecoration:(s,r)=>{this._changeDecorationImpl(s,r)},changeDecorationOptions:(s,r)=>{this._changeDecorationOptionsImpl(s,eF(r))},removeDecoration:s=>{this._deltaDecorationsImpl(e,[s],[])},deltaDecorations:(s,r)=>s.length===0&&r.length===0?[]:this._deltaDecorationsImpl(e,s,r)};let n=null;try{n=t(i)}catch(s){nt(s)}return i.addDecoration=Ym,i.changeDecoration=Ym,i.changeDecorationOptions=Ym,i.removeDecoration=Ym,i.deltaDecorations=Ym,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),nt(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:J4[i]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const s=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),a=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,a,s),n.setOptions(J4[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let i=0,n=t.length;ithis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1,s=!1){const r=this.getLineCount(),a=Math.min(r,Math.max(1,e)),l=Math.min(r,Math.max(1,t)),d=this.getLineMaxColumn(l),c=new k(a,1,l,d),u=this._getDecorationsInRange(c,i,n,s);return Ak(u,this._decorationProvider.getDecorationsInRange(c,i,n)),u}getDecorationsInRange(e,t=0,i=!1,n=!1,s=!1){const r=this.validateRange(e),a=this._getDecorationsInRange(r,t,i,s);return Ak(a,this._decorationProvider.getDecorationsInRange(r,t,i,n)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return Ta.fromDecorations(n).filter(s=>s.lineNumber===e)}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,i,n){const s=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),r=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,s,r,t,i,n)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;if(i.options.after){const a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.endLineNumber)}if(i.options.before){const a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.startLineNumber)}const n=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),r=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),s,r,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!!(i.options.overviewRuler&&i.options.overviewRuler.color),s=!!(t.overviewRuler&&t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){const r=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.endLineNumber)}if(i.options.before||t.before){const r=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.startLineNumber)}n!==s?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i,n=!1){const s=this.getVersionId(),r=t.length;let a=0;const l=i.length;let d=0;this._onDidChangeDecorations.beginDeferredEmit();try{const c=new Array(l);for(;athis._setLanguage(e.languageId,t)),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return Dre(this.getLineContent(e))+1}};Wl._MODEL_SYNC_LIMIT=50*1024*1024;Wl.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024;Wl.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3;Wl.LARGE_FILE_HEAP_OPERATION_THRESHOLD=256*1024*1024;Wl.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:rs.tabSize,indentSize:rs.indentSize,insertSpaces:rs.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:rs.trimAutoWhitespace,largeFileOptimizations:rs.largeFileOptimizations,bracketPairColorizationOptions:rs.bracketPairColorizationOptions};Wl=ch=bre([bx(4,Gy),bx(5,bi),bx(6,si)],Wl);function Dre(o){let e=0;for(const t of o)if(t===" "||t===" ")e++;else break;return e}function Cx(o){return!!(o.options.overviewRuler&&o.options.overviewRuler.color)}function wx(o){return!!o.options.after||!!o.options.before}class Q4{constructor(){this._decorationsTree0=new mx,this._decorationsTree1=new mx,this._injectedTextDecorationsTree=new mx}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)i.range===null&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,s,r){const a=e.getVersionId(),l=this._intervalSearch(t,i,n,s,a,r);return this._ensureNodesHaveRanges(e,l)}_intervalSearch(e,t,i,n,s,r){const a=this._decorationsTree0.intervalSearch(e,t,i,n,s,r),l=this._decorationsTree1.intervalSearch(e,t,i,n,s,r),d=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,s,r);return a.concat(l).concat(d)}getInjectedTextInInterval(e,t,i,n){const s=e.getVersionId(),r=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,s,!1);return this._ensureNodesHaveRanges(e,r).filter(a=>a.options.showIfCollapsed||!a.range.isEmpty())}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i,!1);return this._ensureNodesHaveRanges(e,n).filter(s=>s.options.showIfCollapsed||!s.range.isEmpty())}getAll(e,t,i,n,s){const r=e.getVersionId(),a=this._search(t,i,n,r,s);return this._ensureNodesHaveRanges(e,a)}_search(e,t,i,n,s){if(i)return this._decorationsTree1.search(e,t,n,s);{const r=this._decorationsTree0.search(e,t,n,s),a=this._decorationsTree1.search(e,t,n,s),l=this._injectedTextDecorationsTree.search(e,t,n,s);return r.concat(a).concat(l)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){wx(e)?this._injectedTextDecorationsTree.insert(e):Cx(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){wx(e)?this._injectedTextDecorationsTree.delete(e):Cx(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),t.range===null&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){wx(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Cx(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function Jl(o){return o.replace(/[^a-z0-9\-_]/gi," ")}class OB{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class xre extends OB{constructor(e){super(e),this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:Go.Center}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if(typeof e=="string")return e;const i=e?t.getColor(e.id):null;return i?i.toString():""}}class kre{constructor(e){var t;this.position=(t=e==null?void 0:e.position)!==null&&t!==void 0?t:Wh.Left}}class Ire extends OB{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return typeof e=="string"?Y.fromHex(e):t.getColor(e.id)}}class _u{static from(e){return e instanceof _u?e:new _u(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class st{static register(e){return new st(e)}static createDynamic(e){return new st(e)}constructor(e){var t,i,n,s,r,a;this.description=e.description,this.blockClassName=e.blockClassName?Jl(e.blockClassName):null,this.blockDoesNotCollapse=(t=e.blockDoesNotCollapse)!==null&&t!==void 0?t:null,this.blockIsAfterEnd=(i=e.blockIsAfterEnd)!==null&&i!==void 0?i:null,this.blockPadding=(n=e.blockPadding)!==null&&n!==void 0?n:null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?Jl(e.className):null,this.shouldFillLineOnLineBreak=(s=e.shouldFillLineOnLineBreak)!==null&&s!==void 0?s:null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new xre(e.overviewRuler):null,this.minimap=e.minimap?new Ire(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new kre(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?Jl(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?Jl(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?Jl(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?Jl(e.marginClassName):null,this.inlineClassName=e.inlineClassName?Jl(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?Jl(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?Jl(e.afterContentClassName):null,this.after=e.after?_u.from(e.after):null,this.before=e.before?_u.from(e.before):null,this.hideInCommentTokens=(r=e.hideInCommentTokens)!==null&&r!==void 0?r:!1,this.hideInStringTokens=(a=e.hideInStringTokens)!==null&&a!==void 0?a:!1}}st.EMPTY=st.register({description:"empty"});const J4=[st.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),st.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),st.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),st.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function eF(o){return o instanceof st?o:st.createDynamic(o)}class Ere extends q{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new W),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),(e=this._affectedInjectedTextLines)===null||e===void 0||e.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!!(e.minimap&&e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(e.overviewRuler&&e.overviewRuler.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!e.glyphMarginClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class Nre extends q{constructor(){super(),this._fastEmitter=this._register(new W),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new W),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}}class Tre{constructor(){this._onDidChangeVisibleRanges=new W,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new Mre(t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})});return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class Mre{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const i=e.map(n=>new yt(n.startLineNumber,n.endLineNumber+1));this.handleStateChange({visibleLineRanges:i,stabilized:t})}}class Bw{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new Wn(new k(1,1,1,1),0,0,new z(1,1),0),new Wn(new k(1,1,1,1),0,0,new z(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new Tt(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?Re.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):Re.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){const i=t.position,n=t.selectionStart.getStartPosition(),s=t.selectionStart.getEndPosition(),r=e.normalizePosition(i,2),a=this._validatePositionWithCache(e,n,i,r),l=this._validatePositionWithCache(e,s,n,a);return i.equals(r)&&n.equals(a)&&s.equals(l)?t:new Wn(k.fromPositions(a,l),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+n.column-a.column,r,t.leftoverVisibleColumns+i.column-r.column)}_setState(e,t,i){if(i&&(i=Bw._validateViewState(e.viewModel,i)),t){const n=e.model.validateRange(t.selectionStart),s=t.selectionStart.equalsRange(n)?t.selectionStartLeftoverVisibleColumns:0,r=e.model.validatePosition(t.position),a=t.position.equals(r)?t.leftoverVisibleColumns:0;t=new Wn(n,t.selectionStartKind,s,r,a)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),s=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new Wn(n,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,s,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),s=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new Wn(n,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new z(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),s=e.coordinatesConverter.convertModelPositionToViewPosition(new z(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),r=new k(n.lineNumber,n.column,s.lineNumber,s.column),a=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new Wn(r,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,a,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class tF{constructor(e){this.context=e,this.cursors=[new Bw(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(e=>e.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(e=>e.asCursorState())}getViewPositions(){return this.cursors.map(e=>e.viewState.position)}getTopMostViewPosition(){return yJ(this.cursors,ur(e=>e.viewState.position,z.compare)).viewState.position}getBottomMostViewPosition(){return SJ(this.cursors,ur(e=>e.viewState.position,z.compare)).viewState.position}getSelections(){return this.cursors.map(e=>e.modelState.selection)}getViewSelections(){return this.cursors.map(e=>e.viewState.selection)}setSelections(e){this.setStates(Tt.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){e!==null&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,i=e.length;if(ti){const n=t-i;for(let s=0;s=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(this.cursors.length===1)return;const e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;ii.selection,k.compareRangesUsingStarts));for(let i=0;iu&&m.index--;e.splice(u,1),t.splice(c,1),this._removeSecondaryCursor(u-1),i--}}}}class iF{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}class Are{constructor(){this.type=0}}class Rre{constructor(){this.type=1}}class Pre{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class Ore{constructor(e,t,i){this.selections=e,this.modelSelections=t,this.reason=i,this.type=3}}class Qu{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0)}}class pC{constructor(){this.type=5}}class Fre{constructor(e){this.type=6,this.isFocused=e}}class Bre{constructor(){this.type=7}}class mC{constructor(){this.type=8}}class FB{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}}class yE{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class LE{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class I1{constructor(e,t,i,n,s,r,a){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=s,this.revealHorizontal=r,this.scrollType=a,this.type=12}}class Wre{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class Vre{constructor(e){this.theme=e,this.type=14}}class Hre{constructor(e){this.type=15,this.ranges=e}}class zre{constructor(){this.type=16}}let $re=class{constructor(){this.type=17}};class Ure extends q{constructor(){super(),this._onEvent=this._register(new W),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class jre{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class pA{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new pA(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class mA{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new mA(this.oldHasFocus,e.hasFocus)}}class _A{constructor(e,t,i,n,s,r,a,l){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=s,this.scrollLeft=r,this.scrollHeight=a,this.scrollTop=l,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new _A(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class Kre{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class qre{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class Ww{constructor(e,t,i,n,s,r,a){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=s,this.reason=r,this.reachedMaxCursorCount=a}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length,n=t.length;if(i!==n)return!1;for(let s=0;s0){const e=this._cursors.getSelections();for(let t=0;tr&&(n=n.slice(0,r),s=!0);const a=Y_.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,a,s)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n,s,r){const a=this._cursors.getViewPositions();let l=null,d=null;a.length>1?d=this._cursors.getViewSelections():l=k.fromPositions(a[0],a[0]),e.emitViewEvent(new I1(t,i,l,d,n,s,r))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const s=Tt.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,s)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{const s=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,Tt.fromModelSelections(s))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,Tt.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let a=0,l=e.length;a0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,s){const r=Y_.from(this._model,this);if(r.equals(n))return!1;const a=this._cursors.getSelections(),l=this._cursors.getViewSelections();if(e.emitViewEvent(new Ore(l,a,i)),!n||n.cursorState.length!==r.cursorState.length||r.cursorState.some((d,c)=>!d.modelState.equals(n.cursorState[c].modelState))){const d=n?n.cursorState.map(u=>u.modelState.selection):null,c=n?n.modelVersionId:0;e.emitOutgoingEvent(new Ww(d,a,c,r.modelVersionId,t||"keyboard",i,s))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i=0)return null;const r=s.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!r)return null;const a=r[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;const d=l[0].open,c=s.text.length-r[2].length-1,u=s.text.lastIndexOf(d,c-1);if(u===-1)return null;t.push([u,c])}return t}executeEdits(e,t,i,n){let s=null;t==="snippet"&&(s=this._findAutoClosingPairs(i)),s&&(i[0]._isTracked=!0);const r=[],a=[],l=this._model.pushEditOperations(this.getSelections(),i,d=>{if(s)for(let u=0,h=s.length;u0&&this._pushAutoClosedAction(r,a)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const s=Y_.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(r){nt(r)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this.revealPrimary(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return nF.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new X_(this._model,this.getSelections())}endComposition(e,t){const i=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{t==="keyboard"&&this._executeEditOperation(yi.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,i,this.getSelections(),this.getAutoClosedCharacters()))},e,t)}type(e,t,i){this._executeEdit(()=>{if(i==="keyboard"){const n=t.length;let s=0;for(;s{const d=l.getPosition();return new Re(d.lineNumber,d.column+s,d.lineNumber,d.column+s)});this.setSelections(e,r,a,0)}return}this._executeEdit(()=>{this._executeEditOperation(yi.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s))},e,r)}paste(e,t,i,n,s){this._executeEdit(()=>{this._executeEditOperation(yi.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))},e,s,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(rg.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,i){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new Vs(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}executeCommands(e,t,i){this._executeEdit(()=>{this._executeEditOperation(new Vs(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}}class Y_{static from(e,t){return new Y_(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t=t.length||!t[i].strictContainsRange(e[i]))return!1;return!0}}class iae{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},s=this._innerExecuteCommands(n,i);for(let r=0,a=n.trackedRanges.length;r0&&(r[0]._isTracked=!0);let a=e.model.pushEditOperations(e.selectionsBefore,r,d=>{const c=[];for(let g=0;gg.identifier.minor-f.identifier.minor,h=[];for(let g=0;g0?(c[g].sort(u),h[g]=t[g].computeCursorState(e.model,{getInverseEditOperations:()=>c[g],getTrackedSelection:f=>{const m=parseInt(f,10),v=e.model._getTrackedRange(e.trackedRanges[m]);return e.trackedRangesDirection[m]===0?new Re(v.startLineNumber,v.startColumn,v.endLineNumber,v.endColumn):new Re(v.endLineNumber,v.endColumn,v.startLineNumber,v.startColumn)}})):h[g]=e.selectionsBefore[g];return h});a||(a=e.selectionsBefore);const l=[];for(const d in s)s.hasOwnProperty(d)&&l.push(parseInt(d,10));l.sort((d,c)=>c-d);for(const d of l)a.splice(d,1);return a}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{k.isEmpty(u)&&h===""||n.push({identifier:{major:t,minor:s++},range:u,text:h,forceMoveMarkers:g,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let a=!1;const c={addEditOperation:r,addTrackedEditOperation:(u,h,g)=>{a=!0,r(u,h,g)},trackSelection:(u,h)=>{const g=Re.liftSelection(u);let f;if(g.isEmpty())if(typeof h=="boolean")h?f=2:f=3;else{const _=e.model.getLineMaxColumn(g.startLineNumber);g.startColumn===_?f=2:f=3}else f=1;const m=e.trackedRanges.length,v=e.model._setTrackedRange(null,g,f);return e.trackedRanges[m]=v,e.trackedRangesDirection[m]=g.getDirection(),m.toString()}};try{i.getEditOperations(e.model,c)}catch(u){return nt(u),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((i,n)=>-k.compareRangesUsingEnds(i.range,n.range));const t={};for(let i=1;is.identifier.major?r=n.identifier.major:r=s.identifier.major,t[r.toString()]=!0;for(let a=0;a0&&i--}}return t}}class nae{constructor(e,t,i){this.text=e,this.startSelection=t,this.endSelection=i}}class X_{static _capture(e,t){const i=[];for(const n of t){if(n.startLineNumber!==n.endLineNumber)return null;i.push(new nae(e.getLineContent(n.startLineNumber),n.startColumn-1,n.endColumn-1))}return i}constructor(e,t){this._original=X_._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;const i=X_._capture(e,t);if(!i||this._original.length!==i.length)return null;const n=[];for(let s=0,r=this._original.length;sTp,tokenizeEncoded:(o,e,t)=>Ay(0,t)};async function sae(o,e,t){if(!t)return oF(e,o.languageIdCodec,sF);const i=await Ei.getOrCreate(t);return oF(e,o.languageIdCodec,i||sF)}function oae(o,e,t,i,n,s,r){let a="
",l=i,d=0,c=!0;for(let u=0,h=e.getCount();u0;)r&&c?(f+=" ",c=!1):(f+=" ",c=!0),v--;break}case 60:f+="<",c=!1;break;case 62:f+=">",c=!1;break;case 38:f+="&",c=!1;break;case 0:f+="�",c=!1;break;case 65279:case 8232:case 8233:case 133:f+="�",c=!1;break;case 13:f+="​",c=!1;break;case 32:r&&c?(f+=" ",c=!1):(f+=" ",c=!0);break;default:f+=String.fromCharCode(m),c=!1}}if(a+=`${f}`,g>n||l>=n)break}return a+="
",a}function oF(o,e,t){let i='
';const n=Rl(o);let s=t.getInitialState();for(let r=0,a=n.length;r0&&(i+="
");const d=t.tokenizeEncoded(l,!0,s);Cn.convertToEndOffset(d.tokens,l.length);const u=new Cn(d.tokens,l,e).inflate();let h=0;for(let g=0,f=u.getCount();g${dw(l.substring(h,v))}`,h=v}s=d.endState}return i+="
",i}class rae{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class aae{constructor(e,t,i,n,s){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=s,this.prefixSum=0}}let BB=class DE{constructor(e,t,i,n){this._instanceId=v7(++DE.INSTANCE_COUNT),this._pendingChanges=new rae,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=i,this._paddingBottom=n}static findInsertionIndex(e,t,i){let n=0,s=e.length;for(;n>>1;t===e[r].afterLineNumber?i{t=!0,n=n|0,s=s|0,r=r|0,a=a|0;const l=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new aae(l,n,s,r,a)),l},changeOneWhitespace:(n,s,r)=>{t=!0,s=s|0,r=r|0,this._pendingChanges.change({id:n,newAfterLineNumber:s,newHeight:r})},removeWhitespace:n=>{t=!0,this._pendingChanges.remove({id:n})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const l of e)this._insertWhitespace(l);for(const l of t)this._changeOneWhitespace(l.id,l.newAfterLineNumber,l.newHeight);for(const l of i){const d=this._findWhitespaceIndex(l.id);d!==-1&&this._removeWhitespace(d)}return}const n=new Set;for(const l of i)n.add(l.id);const s=new Map;for(const l of t)s.set(l.id,l);const r=l=>{const d=[];for(const c of l)if(!n.has(c.id)){if(s.has(c.id)){const u=s.get(c.id);c.afterLineNumber=u.newAfterLineNumber,c.height=u.newHeight}d.push(c)}return d},a=r(this._arr).concat(r(e));a.sort((l,d)=>l.afterLineNumber===d.afterLineNumber?l.ordinal-d.ordinal:l.afterLineNumber-d.afterLineNumber),this._arr=a,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=DE.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e=e|0,t=t|0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[a+1].afterLineNumber>=e)return a;i=a+1|0}else n=a-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;const i=this._findLastWhitespaceBeforeLineNumber(e)+1;return i1?i=this._lineHeight*(e-1):i=0;const n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0));return i+n+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){this._checkPendingChanges(),e=e|0;const i=this._lineHeight*e,n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0));return i+n+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let e=0;for(let t=0,i=this._arr.length;tt}isInTopPadding(e){return this._paddingTop===0?!1:(this._checkPendingChanges(),e=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e=e|0,e<0)return 1;const t=this._lineCount|0,i=this._lineHeight;let n=1,s=t;for(;n=a+i)n=r+1;else{if(e>=a)return r;s=r}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const i=this._lineHeight,n=this.getLineNumberAtOrAfterVerticalOffset(e)|0,s=this.getVerticalOffsetForLineNumber(n)|0;let r=this._lineCount|0,a=this.getFirstWhitespaceIndexAfterLineNumber(n)|0;const l=this.getWhitespacesCount()|0;let d,c;a===-1?(a=l,c=r+1,d=0):(c=this.getAfterLineNumberForWhitespaceIndex(a)|0,d=this.getHeightForWhitespaceIndex(a)|0);let u=s,h=u;const g=5e5;let f=0;s>=g&&(f=Math.floor(s/g)*g,f=Math.floor(f/i)*i,h-=f);const m=[],v=e+(t-e)/2;let _=-1;for(let S=n;S<=r;S++){if(_===-1){const x=u,y=u+i;(x<=v&&vv)&&(_=S)}for(u+=i,m[S-n]=h,h+=i;c===S;)h+=d,u+=d,a++,a>=l?c=r+1:(c=this.getAfterLineNumberForWhitespaceIndex(a)|0,d=this.getHeightForWhitespaceIndex(a)|0);if(u>=t){r=S;break}}_===-1&&(_=r);const b=this.getVerticalOffsetForLineNumber(r)|0;let C=n,w=r;return Ct&&w--,{bigNumbersDelta:f,startLineNumber:n,endLineNumber:r,relativeVerticalOffset:m,centeredLineNumber:_,completelyVisibleStartLineNumber:C,completelyVisibleEndLineNumber:w}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e=e|0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i;t>=1?i=this._lineHeight*t:i=0;let n;return e>0?n=this.getWhitespacesAccumulatedHeight(e-1):n=0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e=e|0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;const n=this.getVerticalOffsetForWhitespaceIndex(i),s=this.getHeightForWhitespaceIndex(i);if(e>=n+s)return-1;for(;t=a+l)t=r+1;else{if(e>=a)return r;i=r}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e=e|0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0||t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t),s=this.getIdForWhitespaceIndex(t),r=this.getAfterLineNumberForWhitespaceIndex(t);return{id:s,afterLineNumber:r,verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];const s=[];for(let r=i;r<=n;r++){const a=this.getVerticalOffsetForWhitespaceIndex(r),l=this.getHeightForWhitespaceIndex(r);if(a>=t)break;s.push({id:this.getIdForWhitespaceIndex(r),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:a,height:l})}return s}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].height}};BB.INSTANCE_COUNT=0;const lae=125;class L_{constructor(e,t,i,n){e=e|0,t=t|0,i=i|0,n=n|0,e<0&&(e=0),t<0&&(t=0),i<0&&(i=0),n<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class dae extends q{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new W),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new L_(0,0,0,0),this._scrollable=this._register(new bm({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new pA(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class cae extends q{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,s=n.get(143),r=n.get(83);this._linesLayout=new BB(t,n.get(66),r.top,r.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new dae(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new L_(s.contentWidth,0,s.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(113)?lae:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(66)&&this._linesLayout.setLineHeight(t.get(66)),e.hasChanged(83)){const i=t.get(83);this._linesLayout.setPadding(i.top,i.bottom)}if(e.hasChanged(143)){const i=t.get(143),n=i.contentWidth,s=i.height,r=this._scrollable.getScrollDimensions(),a=r.contentWidth;this._scrollable.setScrollDimensions(new L_(n,r.contentWidth,s,this._getContentHeight(n,s,a)))}else this._updateHeight();e.hasChanged(113)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const n=this._configuration.options.get(102);return n.horizontal===2||e>=t?0:n.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let s=this._linesLayout.getLinesTotalHeight();return n.get(104)?s+=Math.max(0,t-n.get(66)-n.get(83).bottom):n.get(102).ignoreHorizontalScrollbarInContentHeight||(s+=this._getHorizontalScrollbarHeight(e,i)),s}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new L_(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new YO(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new YO(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,t=this._maxLineWidth,i=e.get(144),n=e.get(50),s=e.get(143);if(i.isViewportWrapping){const r=e.get(72);return t>s.contentWidth+n.typicalHalfwidthCharacterWidth&&r.enabled&&r.side==="right"?t+s.verticalScrollbarWidth:t}else{const r=e.get(103)*n.typicalHalfwidthCharacterWidth,a=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+r+s.verticalScrollbarWidth,a,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new L_(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),n=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i);return{scrollTop:t,scrollTopWithoutViewZones:t-n,scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){t===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}class uae{constructor(e,t,i,n,s){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=s,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const n=e.range,s=e.options;let r;if(s.isWholeLine){const a=this._coordinatesConverter.convertModelPositionToViewPosition(new z(n.startLineNumber,1),0,!1,!0),l=this._coordinatesConverter.convertModelPositionToViewPosition(new z(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)),1);r=new k(a.lineNumber,a.column,l.lineNumber,l.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(n,1);i=new x8(r,s),this._decorationsCache[t]=i}return i}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=this._cachedModelDecorationsResolver!==null;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1,i=!1){const n=new k(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(n,t,i).inlineDecorations[0]}_getDecorationsInRange(e,t,i){const n=this._linesCollection.getDecorationsInRange(e,this.editorId,tw(this.configuration.options),t,i),s=e.startLineNumber,r=e.endLineNumber,a=[];let l=0;const d=[];for(let c=s;c<=r;c++)d[c-s]=[];for(let c=0,u=n.length;ct===1)}function CA(o,e){return WB(o,e.range,t=>t===2)}function WB(o,e,t){for(let i=e.startLineNumber;i<=e.endLineNumber;i++){const n=o.tokenization.getLineTokens(i),s=i===e.startLineNumber,r=i===e.endLineNumber;let a=s?n.findTokenIndexAtOffset(e.startColumn-1):0;for(;ae.endColumn-1);){if(!t(n.getStandardTokenType(a)))return!1;a++}}return!0}function Sx(o,e){return o===null?e?Vw.INSTANCE:Hw.INSTANCE:new hae(o,e)}class hae{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){this._assertVisible();const n=i>0?this._projectionData.breakOffsets[i-1]:0,s=this._projectionData.breakOffsets[i];let r;if(this._projectionData.injectionOffsets!==null){const a=this._projectionData.injectionOffsets.map((d,c)=>new Ta(0,0,d+1,this._projectionData.injectionOptions[c],0));r=Ta.applyInjectedText(e.getLineContent(t),a).substring(n,s)}else r=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:s+1});return i>0&&(r=rF(this._projectionData.wrappedTextIndentLength)+r),r}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i){const n=new Array;return this.getViewLinesData(e,t,i,1,0,[!0],n),n[0]}getViewLinesData(e,t,i,n,s,r,a){this._assertVisible();const l=this._projectionData,d=l.injectionOffsets,c=l.injectionOptions;let u=null;if(d){u=[];let g=0,f=0;for(let m=0;m0?l.breakOffsets[m-1]:0,b=l.breakOffsets[m];for(;fb)break;if(_0?l.wrappedTextIndentLength:0,I=y+Math.max(w-_,0),E=y+Math.min(S-_,b-_);I!==E&&v.push(new See(I,E,x.inlineClassName,x.inlineClassNameAffectsLetterSpacing))}}if(S<=b)g+=C,f++;else break}}}let h;d?h=e.tokenization.getLineTokens(t).withInserted(d.map((g,f)=>({offset:g,text:c[f].content,tokenMetadata:Cn.defaultTokenMetadata}))):h=e.tokenization.getLineTokens(t);for(let g=i;g0?n.wrappedTextIndentLength:0,r=i>0?n.breakOffsets[i-1]:0,a=n.breakOffsets[i],l=e.sliceAndInflate(r,a,s);let d=l.getLineContent();i>0&&(d=rF(n.wrappedTextIndentLength)+d);const c=this._projectionData.getMinOutputOffset(i)+1,u=d.length+1,h=i+1=yx.length)for(let e=1;e<=o;e++)yx[e]=gae(e);return yx[o]}function gae(o){return new Array(o+1).join(" ")}class fae{constructor(e,t,i,n,s,r,a,l,d,c){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=s,this.tabSize=r,this.wrappingStrategy=a,this.wrappingColumn=l,this.wrappingIndent=d,this.wordBreak=c,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new mae(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),s=i.length,r=this.createLineBreaksComputer(),a=new Hd(Ta.fromDecorations(n));for(let m=0;m_.lineNumber===m+1);r.addRequest(i[m],v,t?t[m]:null)}const l=r.finalize(),d=[],c=this.hiddenAreasDecorationIds.map(m=>this.model.getDecorationRange(m)).sort(k.compareRangesUsingStarts);let u=1,h=0,g=-1,f=g+1=u&&v<=h,b=Sx(l[m],!_);d[m]=b.getViewLineCount(),this.modelLineProjections[m]=b}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new iJ(d)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){const t=e.map(h=>this.model.validateRange(h)),i=pae(t),n=this.hiddenAreasDecorationIds.map(h=>this.model.getDecorationRange(h)).sort(k.compareRangesUsingStarts);if(i.length===n.length){let h=!1;for(let g=0;g({range:h,options:st.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,s);const r=i;let a=1,l=0,d=-1,c=d+1=a&&g<=l?this.modelLineProjections[h].isVisible()&&(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!1),f=!0):(u=!0,this.modelLineProjections[h].isVisible()||(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!0),f=!0)),f){const m=this.modelLineProjections[h].getViewLineCount();this.projectedModelLineLineCounts.setValue(h,m)}}return u||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return e<1||e>this.modelLineProjections.length?!1:this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n,s){const r=this.fontInfo.equals(e),a=this.wrappingStrategy===t,l=this.wrappingColumn===i,d=this.wrappingIndent===n,c=this.wordBreak===s;if(r&&a&&l&&d&&c)return!1;const u=r&&a&&!l&&d&&c;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n,this.wordBreak=s;let h=null;if(u){h=[];for(let g=0,f=this.modelLineProjections.length;g2&&!this.modelLineProjections[t-2].isVisible(),r=t===1?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let a=0;const l=[],d=[];for(let c=0,u=n.length;cl?(c=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,u=c+l-1,f=u+1,m=f+(s-l)-1,d=!0):st?t:e|0}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),s=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),a=this.model.guides.getActiveIndentGuide(n.lineNumber,s.lineNumber,r.lineNumber),l=this.convertModelPositionToViewPosition(a.startLineNumber,1),d=this.convertModelPositionToViewPosition(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber));return{startLineNumber:l.lineNumber,endLineNumber:d.lineNumber,indent:a.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new aF(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new z(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new z(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),s=new Array;let r=this.getModelStartPositionOfViewLine(i),a=new Array;for(let l=i.modelLineNumber;l<=n.modelLineNumber;l++){const d=this.modelLineProjections[l-1];if(d.isVisible()){const c=l===i.modelLineNumber?i.modelLineWrappedLineIdx:0,u=l===n.modelLineNumber?n.modelLineWrappedLineIdx+1:d.getViewLineCount();for(let h=c;h{if(g.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[c.modelLineNumber-1].getViewPositionOfModelPosition(0,g.forWrappedLinesAfterColumn).lineNumber>=c.modelLineWrappedLineIdx||g.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[c.modelLineNumber-1].getViewPositionOfModelPosition(0,g.forWrappedLinesBeforeOrAtColumn).lineNumberc.modelLineWrappedLineIdx)return}const m=this.convertModelPositionToViewPosition(c.modelLineNumber,g.horizontalLine.endColumn),v=this.modelLineProjections[c.modelLineNumber-1].getViewPositionOfModelPosition(0,g.horizontalLine.endColumn);return v.lineNumber===c.modelLineWrappedLineIdx?new Mh(g.visibleColumn,f,g.className,new $_(g.horizontalLine.top,m.column),-1,-1):v.lineNumber!!g))}}return r}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let s=[];const r=[],a=[],l=i.lineNumber-1,d=n.lineNumber-1;let c=null;for(let f=l;f<=d;f++){const m=this.modelLineProjections[f];if(m.isVisible()){const v=m.getViewLineNumberOfModelPosition(0,f===l?i.column:1),_=m.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(f+1)),b=_-v+1;let C=0;b>1&&m.getViewLineMinColumn(this.model,f+1,_)===1&&(C=v===0?1:2),r.push(b),a.push(C),c===null&&(c=new z(f+1,0))}else c!==null&&(s=s.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,f)),c=null)}c!==null&&(s=s.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,n.lineNumber)),c=null);const u=t-e+1,h=new Array(u);let g=0;for(let f=0,m=s.length;ft&&(f=!0,g=t-s+1),u.getViewLinesData(this.model,d+1,h,g,s-e,i,l),s+=g,f)break}return l}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),s=n.index,r=n.remainder,a=this.modelLineProjections[s],l=a.getViewLineMinColumn(this.model,s+1,r),d=a.getViewLineMaxColumn(this.model,s+1,r);td&&(t=d);const c=a.getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new z(s+1,c)).equals(i)?new z(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new k(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){const i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new z(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new k(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2,n=!1,s=!1){const r=this.model.validatePosition(new z(e,t)),a=r.lineNumber,l=r.column;let d=a-1,c=!1;if(s)for(;d0&&!this.modelLineProjections[d].isVisible();)d--,c=!0;if(d===0&&!this.modelLineProjections[d].isVisible())return new z(n?0:1,1);const u=1+this.projectedModelLineLineCounts.getPrefixSum(d);let h;return c?s?h=this.modelLineProjections[d].getViewPositionOfModelPosition(u,1,i):h=this.modelLineProjections[d].getViewPositionOfModelPosition(u,this.model.getLineMaxColumn(d+1),i):h=this.modelLineProjections[a-1].getViewPositionOfModelPosition(u,l,i),h}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return k.fromPositions(i)}else{const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new k(i.lineNumber,i.column,n.lineNumber,n.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){const s=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(s,t)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(i===0&&!this.modelLineProjections[i].isVisible())return 1;const n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i,n,s){const r=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),a=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(a.lineNumber-r.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new k(r.lineNumber,1,a.lineNumber,a.column),t,i,n,s);let l=[];const d=r.lineNumber-1,c=a.lineNumber-1;let u=null;for(let m=d;m<=c;m++)if(this.modelLineProjections[m].isVisible())u===null&&(u=new z(m+1,m===d?r.column:1));else if(u!==null){const _=this.model.getLineMaxColumn(m);l=l.concat(this.model.getDecorationsInRange(new k(u.lineNumber,u.column,m,_),t,i,n)),u=null}u!==null&&(l=l.concat(this.model.getDecorationsInRange(new k(u.lineNumber,u.column,a.lineNumber,a.column),t,i,n)),u=null),l.sort((m,v)=>{const _=k.compareRangesUsingStarts(m.range,v.range);return _===0?m.idv.id?1:0:_});const h=[];let g=0,f=null;for(const m of l){const v=m.id;f!==v&&(f=v,h[g++]=m)}return h}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return t.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(t.modelLineNumber):0}}function pae(o){if(o.length===0)return[];const e=o.slice();e.sort(k.compareRangesUsingStarts);const t=[];let i=e[0].startLineNumber,n=e[0].endLineNumber;for(let s=1,r=e.length;sn+1?(t.push(new k(i,1,n,1)),i=a.startLineNumber,n=a.endLineNumber):a.endLineNumber>n&&(n=a.endLineNumber)}return t.push(new k(i,1,n,1)),t}class aF{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class lF{constructor(e,t){this.modelRange=e,this.viewLines=t}}class mae{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,i,n){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,i,n)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class _ae{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new vae(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new yE(t,i)}onModelLinesInserted(e,t,i,n){return new LE(t,i)}onModelLineChanged(e,t,i){return[!1,new FB(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const i=t-e+1,n=new Array(i);for(let s=0;st)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}let bae=class extends q{constructor(e,t,i,n,s,r,a,l,d){if(super(),this.languageConfigurationService=a,this._themeService=l,this._attachedView=d,this.hiddenAreasModel=new wae,this.previousHiddenAreas=[],this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new Ure,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new Jg(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new Yt(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=wA.create(this.model),this.model.isTooLargeForTokenization())this._lines=new _ae(this.model);else{const c=this._configuration.options,u=c.get(50),h=c.get(137),g=c.get(144),f=c.get(136),m=c.get(128);this._lines=new fae(this._editorId,this.model,n,s,u,this.model.getOptions().tabSize,h,g.wrappingColumn,f,m)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new tae(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new cae(this._configuration,this.getLineCount(),r)),this._register(this.viewLayout.onDidScroll(c=>{c.scrollTopChanged&&this._handleVisibleLinesChanged(),c.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new Wre(c)),this._eventDispatcher.emitOutgoingEvent(new _A(c.oldScrollWidth,c.oldScrollLeft,c.oldScrollHeight,c.oldScrollTop,c.scrollWidth,c.scrollLeft,c.scrollHeight,c.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(c=>{this._eventDispatcher.emitOutgoingEvent(c)})),this._decorations=new uae(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(c=>{try{const u=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(u,c)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(u0.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new zre)})),this._register(this._themeService.onDidColorThemeChange(c=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new Vre(c))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),t=new k(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new Fre(e)),this._eventDispatcher.emitOutgoingEvent(new mA(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new Are)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new Rre)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new z(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new cF(t,this._viewportStart.startLineDelta)}return new cF(null,0)}_onConfigurationChanged(e,t){const i=this._captureStableViewport(),n=this._configuration.options,s=n.get(50),r=n.get(137),a=n.get(144),l=n.get(136),d=n.get(128);this._lines.setWrappingSettings(s,r,a.wrappingColumn,l,d)&&(e.emitViewEvent(new pC),e.emitViewEvent(new mC),e.emitViewEvent(new Qu(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(90)&&(this._decorations.reset(),e.emitViewEvent(new Qu(null))),t.hasChanged(97)&&(this._decorations.reset(),e.emitViewEvent(new Qu(null))),e.emitViewEvent(new Pre(t)),this.viewLayout.onConfigurationChanged(t),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout),Jg.shouldRecreate(t)&&(this.cursorConfig=new Jg(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(e=>{try{const i=this._eventDispatcher.beginEmitViewEvents();let n=!1,s=!1;const r=e instanceof $h?e.rawContentChangedEvent.changes:e.changes,a=e instanceof $h?e.rawContentChangedEvent.versionId:null,l=this._lines.createLineBreaksComputer();for(const u of r)switch(u.changeType){case 4:{for(let h=0;h!m.ownerId||m.ownerId===this._editorId)),l.addRequest(g,f,null)}break}case 2:{let h=null;u.injectedText&&(h=u.injectedText.filter(g=>!g.ownerId||g.ownerId===this._editorId)),l.addRequest(u.detail,h,null);break}}const d=l.finalize(),c=new Hd(d);for(const u of r)switch(u.changeType){case 1:{this._lines.onModelFlushed(),i.emitViewEvent(new pC),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),n=!0;break}case 3:{const h=this._lines.onModelLinesDeleted(a,u.fromLineNumber,u.toLineNumber);h!==null&&(i.emitViewEvent(h),this.viewLayout.onLinesDeleted(h.fromLineNumber,h.toLineNumber)),n=!0;break}case 4:{const h=c.takeCount(u.detail.length),g=this._lines.onModelLinesInserted(a,u.fromLineNumber,u.toLineNumber,h);g!==null&&(i.emitViewEvent(g),this.viewLayout.onLinesInserted(g.fromLineNumber,g.toLineNumber)),n=!0;break}case 2:{const h=c.dequeue(),[g,f,m,v]=this._lines.onModelLineChanged(a,u.lineNumber,h);s=g,f&&i.emitViewEvent(f),m&&(i.emitViewEvent(m),this.viewLayout.onLinesInserted(m.fromLineNumber,m.toLineNumber)),v&&(i.emitViewEvent(v),this.viewLayout.onLinesDeleted(v.fromLineNumber,v.toLineNumber));break}case 5:break}a!==null&&this._lines.acceptVersionId(a),this.viewLayout.onHeightMaybeChanged(),!n&&s&&(i.emitViewEvent(new mC),i.emitViewEvent(new Qu(null)),this._cursor.onLineMappingChanged(i),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){const i=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(i){const n=this.coordinatesConverter.convertModelPositionToViewPosition(i.getStartPosition()),s=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber);this.viewLayout.setScrollPosition({scrollTop:s+this._viewportStart.startLineDelta},1)}}try{const i=this._eventDispatcher.beginEmitViewEvents();e instanceof $h&&i.emitOutgoingEvent(new Qre(e.contentChangedEvent)),this._cursor.onModelContentChanged(i,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(e=>{const t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new Bre),this.cursorConfig=new Jg(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new Xre(e))})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new Jg(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new Yre(e))})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const t=this._eventDispatcher.beginEmitViewEvents();t.emitViewEvent(new pC),t.emitViewEvent(new mC),t.emitViewEvent(new Qu(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new Jg(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new Jre(e))})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new Qu(e)),this._eventDispatcher.emitOutgoingEvent(new Zre(e))}))}setHiddenAreas(e,t){var i;this.hiddenAreasModel.setHiddenAreas(t,e);const n=this.hiddenAreasModel.getMergedRanges();if(n===this.previousHiddenAreas)return;this.previousHiddenAreas=n;const s=this._captureStableViewport();let r=!1;try{const a=this._eventDispatcher.beginEmitViewEvents();r=this._lines.setHiddenAreas(n),r&&(a.emitViewEvent(new pC),a.emitViewEvent(new mC),a.emitViewEvent(new Qu(null)),this._cursor.onLineMappingChanged(a),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());const l=(i=s.viewportStartModelPosition)===null||i===void 0?void 0:i.lineNumber;l&&n.some(c=>c.startLineNumber<=l&&l<=c.endLineNumber)||s.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),r&&this._eventDispatcher.emitOutgoingEvent(new qre)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(143),t=this._configuration.options.get(66),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),s=Math.max(1,n.completelyVisibleStartLineNumber-i),r=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new k(s,this.getLineMinColumn(s),r,this.getLineMaxColumn(r)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(i.length===0)return[t];const n=[];let s=0,r=t.startLineNumber,a=t.startColumn;const l=t.endLineNumber,d=t.endColumn;for(let c=0,u=i.length;cl||(r"u")return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),i=this.coordinatesConverter.convertModelPositionToViewPosition(t),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:n}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,i){this._viewportStart.update(this,e)}getActiveIndentGuide(e,t,i){return this._lines.getActiveIndentGuide(e,t,i)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,i,n){return this._lines.getViewLinesBracketGuides(e,t,i,n)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const t=Cs(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Da(this.getLineContent(e));return t===-1?0:t+2}getMinimapDecorationsInRange(e){return this._decorations.getMinimapDecorationsInRange(e)}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewportViewLineRenderingData(e,t){const n=this._decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return this._getViewLineRenderingData(t,n)}getViewLineRenderingData(e){const t=this._decorations.getInlineDecorationsOnLine(e);return this._getViewLineRenderingData(e,t)}_getViewLineRenderingData(e,t){const i=this.model.mightContainRTL(),n=this.model.mightContainNonBasicASCII(),s=this.getTabSize(),r=this._lines.getViewLineData(e);return r.inlineDecorations&&(t=[...t,...r.inlineDecorations.map(a=>a.toInlineDecoration(e))]),new Zo(r.minColumn,r.maxColumn,r.content,r.continuesWithWrappedLine,i,n,r.tokens,t,s,r.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new wee(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,tw(this._configuration.options)),i=new Cae;for(const n of t){const s=n.options,r=s.overviewRuler;if(!r)continue;const a=r.position;if(a===0)continue;const l=r.getColor(e.value),d=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),c=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(l,s.zIndex,d,c,a)}return i.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const i=t.options.overviewRuler;i==null||i.invalidateCachedColor();const n=t.options.minimap;n==null||n.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getValueLengthInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(i,t)}modifyPosition(e,t){const i=this.coordinatesConverter.convertViewPositionToModelPosition(e);return this.model.modifyPosition(i,t)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(t<0?t-=i:t+=i);const r=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(r)}getPlainTextToCopy(e,t,i){const n=i?`\r -`:this.model.getEOL();e=e.slice(0),e.sort(k.compareRangesUsingStarts);let s=!1,r=!1;for(const l of e)l.isEmpty()?s=!0:r=!0;if(!r){if(!t)return"";const l=e.map(c=>c.startLineNumber);let d="";for(let c=0;c0&&l[c-1]===l[c]||(d+=this.model.getLineContent(l[c])+n);return d}if(s&&t){const l=[];let d=0;for(const c of e){const u=c.startLineNumber;c.isEmpty()?u!==d&&l.push(this.model.getLineContent(u)):l.push(this.model.getValueInRange(c,i?2:0)),d=u}return l.length===1?l[0]:l}const a=[];for(const l of e)l.isEmpty()||a.push(this.model.getValueInRange(l,i?2:0));return a.length===1?a[0]:a}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===Ko||e.length!==1)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const c=n.startLineNumber;n=new k(c,this.model.getLineMinColumn(c),c,this.model.getLineMaxColumn(c))}const s=this._configuration.options.get(50),r=this._getColorMap(),l=/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===co.fontFamily;let d;return l?d=co.fontFamily:(d=s.fontFamily,d=d.replace(/"/g,"'"),/[,']/.test(d)||/[+ ]/.test(d)&&(d=`'${d}'`),d=`${d}, ${co.fontFamily}`),{mode:i,html:`
`+this._getHTMLToCopy(n,r)+"
"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn,a=this.getTabSize();let l="";for(let d=i;d<=s;d++){const c=this.model.tokenization.getLineTokens(d),u=c.getLineContent(),h=d===i?n-1:0,g=d===s?r-1:u.length;u===""?l+="
":l+=oae(u,c.inflate(),t,h,g,a,is)}return l}_getColorMap(){const e=Ei.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;ithis._cursor.setStates(n,e,t,i))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector(n=>this._cursor.setSelections(n,e,t,i))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new Gre);return}this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit(n=>this._cursor.executeEdits(n,e,t,i))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(i=>this._cursor.type(i,e,t))}compositionType(e,t,i,n,s){this._executeCursorEdit(r=>this._cursor.compositionType(r,e,t,i,n,s))}paste(e,t,i,n){this._executeCursorEdit(s=>this._cursor.paste(s,e,t,i,n))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(i=>this._cursor.executeCommand(i,e,t))}executeCommands(e,t){this._executeCursorEdit(i=>this._cursor.executeCommands(i,e,t))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector(n=>this._cursor.revealPrimary(n,e,i,0,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new k(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new I1(e,!1,i,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new k(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new I1(e,!1,i,null,0,!0,0)))}revealRange(e,t,i,n,s){this._withViewEventsCollector(r=>r.emitViewEvent(new I1(e,!1,i,null,n,t,s)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new $re),this._eventDispatcher.emitOutgoingEvent(new Kre))}_withViewEventsCollector(e){try{const t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}};class wA{static create(e){const t=e._setTrackedRange(null,new k(1,1,1,1),1);return new wA(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,i,n,s){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=s}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const i=e.coordinatesConverter.convertViewPositionToModelPosition(new z(t,e.getLineMinColumn(t))),n=e.model._setTrackedRange(this._modelTrackedRange,new k(i.lineNumber,i.column,i.lineNumber,i.column),1),s=e.viewLayout.getVerticalOffsetForLineNumber(t),r=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=n,this._startLineDelta=r-s}invalidate(){this._isValid=!1}}class Cae{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,s){const r=this._asMap[e];if(r){const a=r.data,l=a[a.length-3],d=a[a.length-1];if(l===s&&d+1>=i){n>d&&(a[a.length-1]=n);return}a.push(s,i,n)}else{const a=new Rv(e,t,[s,i,n]);this._asMap[e]=a,this.asArray.push(a)}}}class wae{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){const i=this.hiddenAreas.get(e);i&&dF(i,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce((t,i)=>Sae(t,i),[]);return dF(this.ranges,e)?this.ranges:(this.ranges=e,this.ranges)}}function Sae(o,e){const t=[];let i=0,n=0;for(;i0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let n=this.breakOffsets[e]-t;return e>0&&(n+=this.wrappedTextIndentLength),n}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let n=e===0?t:this.breakOffsets[e-1]+t;if(this.injectionOffsets!==null)for(let s=0;sthis.injectionOffsets[s];s++)n0?this.breakOffsets[s-1]:0,t===0)if(e<=r)n=s-1;else if(e>l)i=s+1;else break;else if(e=l)i=s+1;else break}let a=e-r;return s>0&&(a+=this.wrappedTextIndentLength),new _C(s,a)}normalizeOutputPosition(e,t,i){if(this.injectionOffsets!==null){const n=this.outputPositionToOffsetInInputWithInjections(e,t),s=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(s!==n)return this.offsetInInputWithInjectionsToOutputPosition(s,i)}if(i===0){if(e>0&&t===this.getMinOutputOffset(e))return new _C(e-1,this.getMaxOutputOffset(e-1))}else if(i===1){const n=this.getOutputLineCount()-1;if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(t===2){if(e===i.offsetInInputWithInjections+i.length&&uF(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let n=i.offsetInInputWithInjections;if(hF(this.injectionOptions[i.injectedTextIndex].cursorStops))return n;let s=i.injectedTextIndex-1;for(;s>=0&&this.injectionOffsets[s]===this.injectionOffsets[i.injectedTextIndex]&&!(uF(this.injectionOptions[s].cursorStops)||(n-=this.injectionOptions[s].content.length,hF(this.injectionOptions[s].cursorStops)));)s--;return n}}else if(t===1||t===4){let n=i.offsetInInputWithInjections+i.length,s=i.injectedTextIndex;for(;s+1=0&&this.injectionOffsets[s-1]===this.injectionOffsets[s];)n-=this.injectionOptions[s-1].content.length,s--;return n}by()}getInjectedText(e,t){const i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(t!==null){let n=0;for(let s=0;se)break;if(e<=l)return{injectedTextIndex:s,offsetInInputWithInjections:a,length:r};n+=r}}}}function uF(o){return o==null?!0:o===Sa.Right||o===Sa.Both}function hF(o){return o==null?!0:o===Sa.Left||o===Sa.Both}class _C{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new z(e+this.outputLineIndex,this.outputOffset+1)}}class SA{static create(e){return new SA(e.get(132),e.get(131))}constructor(e,t){this.classifier=new Lae(e,t)}createLineBreaksComputer(e,t,i,n,s){const r=[],a=[],l=[];return{addRequest:(d,c,u)=>{r.push(d),a.push(c),l.push(u)},finalize:()=>{const d=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,c=[];for(let u=0,h=r.length;u=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let xE=[],kE=[];function Dae(o,e,t,i,n,s,r,a){if(n===-1)return null;const l=t.length;if(l<=1)return null;const d=a==="keepAll",c=e.breakOffsets,u=e.breakOffsetsVisibleColumn,h=VB(t,i,n,s,r),g=n-h,f=xE,m=kE;let v=0,_=0,b=0,C=n;const w=c.length;let S=0;if(S>=0){let x=Math.abs(u[S]-C);for(;S+1=x)break;x=y,S++}}for(;Sx&&(x=_,y=b);let I=0,E=0,R=0,j=0;if(y<=C){let $=y,K=x===0?0:t.charCodeAt(x-1),oe=x===0?0:o.get(K),Le=!0;for(let he=x;he_&&IE(K,oe,V,Q,d)&&(I=se,E=$),$+=H,$>C){se>_?(R=se,j=$-H):(R=he+1,j=$),$-E>g&&(I=0),Le=!1;break}K=V,oe=Q}if(Le){v>0&&(f[v]=c[c.length-1],m[v]=u[c.length-1],v++);break}}if(I===0){let $=y,K=t.charCodeAt(x),oe=o.get(K),Le=!1;for(let he=x-1;he>=_;he--){const se=he+1,V=t.charCodeAt(he);if(V===9){Le=!0;break}let Q,H;if(Jh(V)?(he--,Q=0,H=2):(Q=o.get(V),H=ou(V)?s:1),$<=C){if(R===0&&(R=se,j=$),$<=C-g)break;if(IE(V,Q,K,oe,d)){I=se,E=$;break}}$-=H,K=V,oe=Q}if(I!==0){const he=g-(j-E);if(he<=i){const se=t.charCodeAt(R);let V;bn(se)?V=2:V=J_(se,j,i,s),he-V<0&&(I=0)}}if(Le){S--;continue}}if(I===0&&(I=R,E=j),I<=_){const $=t.charCodeAt(_);bn($)?(I=_+2,E=b+2):(I=_+1,E=b+J_($,b,i,s))}for(_=I,f[v]=I,b=E,m[v]=E,v++,C=E+g;S<0||S=O)break;O=$,S++}}return v===0?null:(f.length=v,m.length=v,xE=e.breakOffsets,kE=e.breakOffsetsVisibleColumn,e.breakOffsets=f,e.breakOffsetsVisibleColumn=m,e.wrappedTextIndentLength=h,e)}function xae(o,e,t,i,n,s,r,a){const l=Ta.applyInjectedText(e,t);let d,c;if(t&&t.length>0?(d=t.map(E=>E.options),c=t.map(E=>E.column-1)):(d=null,c=null),n===-1)return d?new Q_(c,d,[l.length],[],0):null;const u=l.length;if(u<=1)return d?new Q_(c,d,[l.length],[],0):null;const h=a==="keepAll",g=VB(l,i,n,s,r),f=n-g,m=[],v=[];let _=0,b=0,C=0,w=n,S=l.charCodeAt(0),x=o.get(S),y=J_(S,0,i,s),I=1;bn(S)&&(y+=1,S=l.charCodeAt(1),x=o.get(S),I++);for(let E=I;Ew&&((b===0||y-C>f)&&(b=R,C=y-$),m[_]=b,v[_]=C,_++,w=C+f,b=0),S=j,x=O}return _===0&&(!t||t.length===0)?null:(m[_]=u,v[_]=y,new Q_(c,d,m,v,g))}function J_(o,e,t,i){return o===9?t-e%t:ou(o)||o<32?i:1}function gF(o,e){return e-o%e}function IE(o,e,t,i,n){return t!==32&&(e===2&&i!==2||e!==1&&i===1||!n&&e===3&&i!==2||!n&&i===3&&e!==1)}function VB(o,e,t,i,n){let s=0;if(n!==0){const r=Cs(o);if(r!==-1){for(let l=0;lt&&(s=0)}}return s}const Lx=qd("domLineBreaksComputer",{createHTML:o=>o});class yA{static create(e){return new yA(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,t,i,n,s){const r=[],a=[];return{addRequest:(l,d,c)=>{r.push(l),a.push(d)},finalize:()=>kae(Lc(this.targetWindow.deref()),r,e,t,i,n,s,a)}}}function kae(o,e,t,i,n,s,r,a){var l;function d(R){const j=a[R];if(j){const O=Ta.applyInjectedText(e[R],j),$=j.map(oe=>oe.options),K=j.map(oe=>oe.column-1);return new Q_(K,$,[O.length],[],0)}else return null}if(n===-1){const R=[];for(let j=0,O=e.length;jc?(O=0,$=0):K=c-he}const oe=j.substr(O),Le=Iae(oe,$,i,K,m,g);v[R]=O,_[R]=$,b[R]=oe,C[R]=Le[0],w[R]=Le[1]}const S=m.build(),x=(l=Lx==null?void 0:Lx.createHTML(S))!==null&&l!==void 0?l:S;f.innerHTML=x,f.style.position="absolute",f.style.top="10000",r==="keepAll"?(f.style.wordBreak="keep-all",f.style.overflowWrap="anywhere"):(f.style.wordBreak="inherit",f.style.overflowWrap="break-word"),o.document.body.appendChild(f);const y=document.createRange(),I=Array.prototype.slice.call(f.children,0),E=[];for(let R=0;RQ.options),se=V.map(Q=>Q.column-1)):(he=null,se=null),E[R]=new Q_(se,he,O,Le,K)}return o.document.body.removeChild(f),E}function Iae(o,e,t,i,n,s){if(s!==0){const h=String(s);n.appendString('
');const r=o.length;let a=e,l=0;const d=[],c=[];let u=0");for(let h=0;h"),d[h]=l,c[h]=a;const g=u;u=h+1"),d[o.length]=l,c[o.length]=a,n.appendString("
"),[d,c]}function Eae(o,e,t,i){if(t.length<=1)return null;const n=Array.prototype.slice.call(e.children,0),s=[];try{EE(o,n,i,0,null,t.length-1,null,s)}catch(r){return console.log(r),null}return s.length===0?null:(s.push(t.length),s)}function EE(o,e,t,i,n,s,r,a){if(i===s||(n=n||Dx(o,e,t[i],t[i+1]),r=r||Dx(o,e,t[s],t[s+1]),Math.abs(n[0].top-r[0].top)<=.1))return;if(i+1===s){a.push(s);return}const l=i+(s-i)/2|0,d=Dx(o,e,t[l],t[l+1]);EE(o,e,t,i,n,l,d,a),EE(o,e,t,l,d,s,r,a)}function Dx(o,e,t,i){return o.setStart(e[t/16384|0].firstChild,t%16384),o.setEnd(e[i/16384|0].firstChild,i%16384),o.getClientRects()}class Nae extends q{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new nM),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,i){this._editor=e,this._instantiationService=i;for(const n of t){if(this._pending.has(n.id)){nt(new Error(`Cannot have two contributions with the same id ${n.id}`));continue}this._pending.set(n.id,n)}this._instantiateSome(0),this._register(g_(Je(this._editor.getDomNode()),()=>{this._instantiateSome(1)})),this._register(g_(Je(this._editor.getDomNode()),()=>{this._instantiateSome(2)})),this._register(g_(Je(this._editor.getDomNode()),()=>{this._instantiateSome(3)},5e3))}saveViewState(){const e={};for(const[t,i]of this._instances)typeof i.saveViewState=="function"&&(e[t]=i.saveViewState());return e}restoreViewState(e){for(const[t,i]of this._instances)typeof i.restoreViewState=="function"&&i.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){var e;this._register(g_(Je((e=this._editor)===null||e===void 0?void 0:e.getDomNode()),()=>{this._instantiateSome(1)},50))}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const t=this._findPendingContributionsByInstantiation(e);for(const i of t)this._instantiateById(i.id)}_findPendingContributionsByInstantiation(e){const t=[];for(const[,i]of this._pending)i.instantiation===e&&t.push(i);return t}_instantiateById(e){const t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const i=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,i),typeof i.restoreViewState=="function"&&t.instantiation!==0&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(i){nt(i)}}}}var Tae=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ed=function(o,e){return function(t,i){e(t,i,o)}},uh;let Mae=0,Aae=class{constructor(e,t,i,n,s,r){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=s,this.attachedView=r}dispose(){jt(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}},Vp=uh=class extends q{get isSimpleWidget(){return this._configuration.isSimpleWidget}constructor(e,t,i,n,s,r,a,l,d,c,u,h){var g;super(),this.languageConfigurationService=u,this._deliveryQueue=wZ(),this._contributions=this._register(new Nae),this._onDidDispose=this._register(new W),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new fF({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new fF({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new fs(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new fs(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new fs(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new fs(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),s.willCreateCodeEditor();const f={...t};this._domElement=e,this._overflowWidgetsDomNode=f.overflowWidgetsDomNode,delete f.overflowWidgetsDomNode,this._id=++Mae,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,f,c)),this._register(this._configuration.onDidChange(_=>{this._onDidChangeConfiguration.fire(_);const b=this._configuration.options;if(_.hasChanged(143)){const C=b.get(143);this._onDidLayoutChange.fire(C)}})),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=d,this._codeEditorService=s,this._commandService=r,this._themeService=l,this._register(new Rae(this,this._contextKeyService)),this._register(new Pae(this,this._contextKeyService,h)),this._instantiationService=n.createChild(new h0([Xe,this._contextKeyService])),this._modelData=null,this._focusTracker=new Oae(e),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let m;Array.isArray(i.contributions)?m=i.contributions:m=Jf.getEditorContributions(),this._contributions.initialize(this,m,this._instantiationService);for(const _ of Jf.getEditorActions()){if(this._actions.has(_.id)){nt(new Error(`Cannot have two actions with the same id ${_.id}`));continue}const b=new pB(_.id,_.label,_.alias,_.metadata,(g=_.precondition)!==null&&g!==void 0?g:void 0,()=>this._instantiationService.invokeFunction(C=>Promise.resolve(_.runEditorCommand(C,this,null))),this._contextKeyService);this._actions.set(b.id,b)}const v=()=>!this._configuration.options.get(90)&&this._configuration.options.get(36).enabled;this._register(new iQ(this._domElement,{onDragOver:_=>{if(!v())return;const b=this.getTargetAtClientPoint(_.clientX,_.clientY);b!=null&&b.position&&this.showDropIndicatorAt(b.position)},onDrop:async _=>{if(!v()||(this.removeDropIndicator(),!_.dataTransfer))return;const b=this.getTargetAtClientPoint(_.clientX,_.clientY);b!=null&&b.position&&this._onDropIntoEditor.fire({position:b.position,event:_})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){var t;(t=this._modelData)===null||t===void 0||t.view.writeScreenReaderContent(e)}_createConfiguration(e,t,i){return new tE(e,t,this._domElement,i)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return i0.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?Wt.getWordAtPosition(this._modelData.model,this._configuration.options.get(129),e):null}getValue(e=null){if(!this._modelData)return"";const t=!!(e&&e.preserveBOM);let i=0;return e&&e.lineEnding&&e.lineEnding===` +`)){u=!1;break}}if(u){const h=new k(d,1,d,c);t.push(new JD(null,h,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i,n)}_applyUndo(e,t,i,n){const s=e.map(r=>{const a=this.getPositionAt(r.newPosition),l=this.getPositionAt(r.newEnd);return{range:new k(a.lineNumber,a.column,l.lineNumber,l.column),text:r.oldText}});this._applyUndoRedoEdits(s,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const s=e.map(r=>{const a=this.getPositionAt(r.oldPosition),l=this.getPositionAt(r.oldEnd);return{range:new k(a.lineNumber,a.column,l.lineNumber,l.column),text:r.newText}});this._applyUndoRedoEdits(s,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,s,r){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(s)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(r),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),s=this._buffer.getLineCount(),r=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,r.length!==0){for(let d=0,c=r.length;d=0;E--){const R=g+E,j=C+E;I.takeFromEndWhile($=>$.lineNumber>j);const O=I.takeFromEndWhile($=>$.lineNumber===j);a.push(new Y4(R,this.getLineContent(j),O))}if(_he.lineNumberhe.lineNumber===Le)}a.push(new wre(R+1,g+v,K,$))}l+=b}this._emitContentChangedEvent(new up(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:r,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return n.reverseEdits===null?void 0:n.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(e===null||e.size===0)return;const i=Array.from(e).map(n=>new Y4(n,this.getLineContent(n),this._getInjectedTextInLine(n)));this._onDidChangeInjectedText.fire(new RB(i))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(s,r)=>this._deltaDecorationsImpl(e,[],[{range:s,options:r}])[0],changeDecoration:(s,r)=>{this._changeDecorationImpl(s,r)},changeDecorationOptions:(s,r)=>{this._changeDecorationOptionsImpl(s,eF(r))},removeDecoration:s=>{this._deltaDecorationsImpl(e,[s],[])},deltaDecorations:(s,r)=>s.length===0&&r.length===0?[]:this._deltaDecorationsImpl(e,s,r)};let n=null;try{n=t(i)}catch(s){nt(s)}return i.addDecoration=Ym,i.changeDecoration=Ym,i.changeDecorationOptions=Ym,i.removeDecoration=Ym,i.deltaDecorations=Ym,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),nt(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:J4[i]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const s=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),a=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,a,s),n.setOptions(J4[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let i=0,n=t.length;ithis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1,s=!1){const r=this.getLineCount(),a=Math.min(r,Math.max(1,e)),l=Math.min(r,Math.max(1,t)),d=this.getLineMaxColumn(l),c=new k(a,1,l,d),u=this._getDecorationsInRange(c,i,n,s);return Ak(u,this._decorationProvider.getDecorationsInRange(c,i,n)),u}getDecorationsInRange(e,t=0,i=!1,n=!1,s=!1){const r=this.validateRange(e),a=this._getDecorationsInRange(r,t,i,s);return Ak(a,this._decorationProvider.getDecorationsInRange(r,t,i,n)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return Ta.fromDecorations(n).filter(s=>s.lineNumber===e)}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,i,n){const s=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),r=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,s,r,t,i,n)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;if(i.options.after){const a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.endLineNumber)}if(i.options.before){const a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.startLineNumber)}const n=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),r=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),s,r,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!!(i.options.overviewRuler&&i.options.overviewRuler.color),s=!!(t.overviewRuler&&t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){const r=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.endLineNumber)}if(i.options.before||t.before){const r=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.startLineNumber)}n!==s?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i,n=!1){const s=this.getVersionId(),r=t.length;let a=0;const l=i.length;let d=0;this._onDidChangeDecorations.beginDeferredEmit();try{const c=new Array(l);for(;athis._setLanguage(e.languageId,t)),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return Ere(this.getLineContent(e))+1}};Wl._MODEL_SYNC_LIMIT=50*1024*1024;Wl.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024;Wl.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3;Wl.LARGE_FILE_HEAP_OPERATION_THRESHOLD=256*1024*1024;Wl.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:rs.tabSize,indentSize:rs.indentSize,insertSpaces:rs.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:rs.trimAutoWhitespace,largeFileOptimizations:rs.largeFileOptimizations,bracketPairColorizationOptions:rs.bracketPairColorizationOptions};Wl=ch=yre([bx(4,Gy),bx(5,bi),bx(6,si)],Wl);function Ere(o){let e=0;for(const t of o)if(t===" "||t===" ")e++;else break;return e}function Cx(o){return!!(o.options.overviewRuler&&o.options.overviewRuler.color)}function wx(o){return!!o.options.after||!!o.options.before}class Q4{constructor(){this._decorationsTree0=new mx,this._decorationsTree1=new mx,this._injectedTextDecorationsTree=new mx}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)i.range===null&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,s,r){const a=e.getVersionId(),l=this._intervalSearch(t,i,n,s,a,r);return this._ensureNodesHaveRanges(e,l)}_intervalSearch(e,t,i,n,s,r){const a=this._decorationsTree0.intervalSearch(e,t,i,n,s,r),l=this._decorationsTree1.intervalSearch(e,t,i,n,s,r),d=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,s,r);return a.concat(l).concat(d)}getInjectedTextInInterval(e,t,i,n){const s=e.getVersionId(),r=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,s,!1);return this._ensureNodesHaveRanges(e,r).filter(a=>a.options.showIfCollapsed||!a.range.isEmpty())}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i,!1);return this._ensureNodesHaveRanges(e,n).filter(s=>s.options.showIfCollapsed||!s.range.isEmpty())}getAll(e,t,i,n,s){const r=e.getVersionId(),a=this._search(t,i,n,r,s);return this._ensureNodesHaveRanges(e,a)}_search(e,t,i,n,s){if(i)return this._decorationsTree1.search(e,t,n,s);{const r=this._decorationsTree0.search(e,t,n,s),a=this._decorationsTree1.search(e,t,n,s),l=this._injectedTextDecorationsTree.search(e,t,n,s);return r.concat(a).concat(l)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){wx(e)?this._injectedTextDecorationsTree.insert(e):Cx(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){wx(e)?this._injectedTextDecorationsTree.delete(e):Cx(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),t.range===null&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){wx(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Cx(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function Jl(o){return o.replace(/[^a-z0-9\-_]/gi," ")}class OB{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class Nre extends OB{constructor(e){super(e),this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:Go.Center}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if(typeof e=="string")return e;const i=e?t.getColor(e.id):null;return i?i.toString():""}}class Tre{constructor(e){var t;this.position=(t=e==null?void 0:e.position)!==null&&t!==void 0?t:Wh.Left}}class Mre extends OB{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return typeof e=="string"?Y.fromHex(e):t.getColor(e.id)}}class _u{static from(e){return e instanceof _u?e:new _u(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class st{static register(e){return new st(e)}static createDynamic(e){return new st(e)}constructor(e){var t,i,n,s,r,a;this.description=e.description,this.blockClassName=e.blockClassName?Jl(e.blockClassName):null,this.blockDoesNotCollapse=(t=e.blockDoesNotCollapse)!==null&&t!==void 0?t:null,this.blockIsAfterEnd=(i=e.blockIsAfterEnd)!==null&&i!==void 0?i:null,this.blockPadding=(n=e.blockPadding)!==null&&n!==void 0?n:null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?Jl(e.className):null,this.shouldFillLineOnLineBreak=(s=e.shouldFillLineOnLineBreak)!==null&&s!==void 0?s:null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new Nre(e.overviewRuler):null,this.minimap=e.minimap?new Mre(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new Tre(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?Jl(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?Jl(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?Jl(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?Jl(e.marginClassName):null,this.inlineClassName=e.inlineClassName?Jl(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?Jl(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?Jl(e.afterContentClassName):null,this.after=e.after?_u.from(e.after):null,this.before=e.before?_u.from(e.before):null,this.hideInCommentTokens=(r=e.hideInCommentTokens)!==null&&r!==void 0?r:!1,this.hideInStringTokens=(a=e.hideInStringTokens)!==null&&a!==void 0?a:!1}}st.EMPTY=st.register({description:"empty"});const J4=[st.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),st.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),st.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),st.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function eF(o){return o instanceof st?o:st.createDynamic(o)}class Are extends q{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new W),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),(e=this._affectedInjectedTextLines)===null||e===void 0||e.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!!(e.minimap&&e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(e.overviewRuler&&e.overviewRuler.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!e.glyphMarginClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class Rre extends q{constructor(){super(),this._fastEmitter=this._register(new W),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new W),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}}class Pre{constructor(){this._onDidChangeVisibleRanges=new W,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new Ore(t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})});return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class Ore{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const i=e.map(n=>new yt(n.startLineNumber,n.endLineNumber+1));this.handleStateChange({visibleLineRanges:i,stabilized:t})}}class Bw{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new Wn(new k(1,1,1,1),0,0,new z(1,1),0),new Wn(new k(1,1,1,1),0,0,new z(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new Tt(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?Ae.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):Ae.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){const i=t.position,n=t.selectionStart.getStartPosition(),s=t.selectionStart.getEndPosition(),r=e.normalizePosition(i,2),a=this._validatePositionWithCache(e,n,i,r),l=this._validatePositionWithCache(e,s,n,a);return i.equals(r)&&n.equals(a)&&s.equals(l)?t:new Wn(k.fromPositions(a,l),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+n.column-a.column,r,t.leftoverVisibleColumns+i.column-r.column)}_setState(e,t,i){if(i&&(i=Bw._validateViewState(e.viewModel,i)),t){const n=e.model.validateRange(t.selectionStart),s=t.selectionStart.equalsRange(n)?t.selectionStartLeftoverVisibleColumns:0,r=e.model.validatePosition(t.position),a=t.position.equals(r)?t.leftoverVisibleColumns:0;t=new Wn(n,t.selectionStartKind,s,r,a)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),s=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new Wn(n,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,s,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),s=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new Wn(n,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new z(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),s=e.coordinatesConverter.convertModelPositionToViewPosition(new z(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),r=new k(n.lineNumber,n.column,s.lineNumber,s.column),a=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new Wn(r,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,a,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class tF{constructor(e){this.context=e,this.cursors=[new Bw(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(e=>e.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(e=>e.asCursorState())}getViewPositions(){return this.cursors.map(e=>e.viewState.position)}getTopMostViewPosition(){return kJ(this.cursors,ur(e=>e.viewState.position,z.compare)).viewState.position}getBottomMostViewPosition(){return xJ(this.cursors,ur(e=>e.viewState.position,z.compare)).viewState.position}getSelections(){return this.cursors.map(e=>e.modelState.selection)}getViewSelections(){return this.cursors.map(e=>e.viewState.selection)}setSelections(e){this.setStates(Tt.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){e!==null&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,i=e.length;if(ti){const n=t-i;for(let s=0;s=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(this.cursors.length===1)return;const e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;ii.selection,k.compareRangesUsingStarts));for(let i=0;iu&&m.index--;e.splice(u,1),t.splice(c,1),this._removeSecondaryCursor(u-1),i--}}}}class iF{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}class Fre{constructor(){this.type=0}}class Bre{constructor(){this.type=1}}class Wre{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class Vre{constructor(e,t,i){this.selections=e,this.modelSelections=t,this.reason=i,this.type=3}}class Qu{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0)}}class pC{constructor(){this.type=5}}class Hre{constructor(e){this.type=6,this.isFocused=e}}class zre{constructor(){this.type=7}}class mC{constructor(){this.type=8}}class FB{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}}class yE{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class LE{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class I1{constructor(e,t,i,n,s,r,a){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=s,this.revealHorizontal=r,this.scrollType=a,this.type=12}}class $re{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class Ure{constructor(e){this.theme=e,this.type=14}}class jre{constructor(e){this.type=15,this.ranges=e}}class Kre{constructor(){this.type=16}}let qre=class{constructor(){this.type=17}};class Gre extends q{constructor(){super(),this._onEvent=this._register(new W),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class Zre{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class pA{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new pA(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class mA{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new mA(this.oldHasFocus,e.hasFocus)}}class _A{constructor(e,t,i,n,s,r,a,l){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=s,this.scrollLeft=r,this.scrollHeight=a,this.scrollTop=l,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new _A(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class Yre{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class Xre{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class Ww{constructor(e,t,i,n,s,r,a){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=s,this.reason=r,this.reachedMaxCursorCount=a}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length,n=t.length;if(i!==n)return!1;for(let s=0;s0){const e=this._cursors.getSelections();for(let t=0;tr&&(n=n.slice(0,r),s=!0);const a=Y_.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,a,s)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n,s,r){const a=this._cursors.getViewPositions();let l=null,d=null;a.length>1?d=this._cursors.getViewSelections():l=k.fromPositions(a[0],a[0]),e.emitViewEvent(new I1(t,i,l,d,n,s,r))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const s=Tt.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,s)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{const s=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,Tt.fromModelSelections(s))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,Tt.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let a=0,l=e.length;a0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,s){const r=Y_.from(this._model,this);if(r.equals(n))return!1;const a=this._cursors.getSelections(),l=this._cursors.getViewSelections();if(e.emitViewEvent(new Vre(l,a,i)),!n||n.cursorState.length!==r.cursorState.length||r.cursorState.some((d,c)=>!d.modelState.equals(n.cursorState[c].modelState))){const d=n?n.cursorState.map(u=>u.modelState.selection):null,c=n?n.modelVersionId:0;e.emitOutgoingEvent(new Ww(d,a,c,r.modelVersionId,t||"keyboard",i,s))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i=0)return null;const r=s.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!r)return null;const a=r[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;const d=l[0].open,c=s.text.length-r[2].length-1,u=s.text.lastIndexOf(d,c-1);if(u===-1)return null;t.push([u,c])}return t}executeEdits(e,t,i,n){let s=null;t==="snippet"&&(s=this._findAutoClosingPairs(i)),s&&(i[0]._isTracked=!0);const r=[],a=[],l=this._model.pushEditOperations(this.getSelections(),i,d=>{if(s)for(let u=0,h=s.length;u0&&this._pushAutoClosedAction(r,a)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const s=Y_.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(r){nt(r)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this.revealPrimary(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return nF.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new X_(this._model,this.getSelections())}endComposition(e,t){const i=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{t==="keyboard"&&this._executeEditOperation(yi.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,i,this.getSelections(),this.getAutoClosedCharacters()))},e,t)}type(e,t,i){this._executeEdit(()=>{if(i==="keyboard"){const n=t.length;let s=0;for(;s{const d=l.getPosition();return new Ae(d.lineNumber,d.column+s,d.lineNumber,d.column+s)});this.setSelections(e,r,a,0)}return}this._executeEdit(()=>{this._executeEditOperation(yi.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s))},e,r)}paste(e,t,i,n,s){this._executeEdit(()=>{this._executeEditOperation(yi.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))},e,s,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(rg.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,i){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new Vs(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}executeCommands(e,t,i){this._executeEdit(()=>{this._executeEditOperation(new Vs(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}}class Y_{static from(e,t){return new Y_(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t=t.length||!t[i].strictContainsRange(e[i]))return!1;return!0}}class rae{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},s=this._innerExecuteCommands(n,i);for(let r=0,a=n.trackedRanges.length;r0&&(r[0]._isTracked=!0);let a=e.model.pushEditOperations(e.selectionsBefore,r,d=>{const c=[];for(let g=0;gg.identifier.minor-f.identifier.minor,h=[];for(let g=0;g0?(c[g].sort(u),h[g]=t[g].computeCursorState(e.model,{getInverseEditOperations:()=>c[g],getTrackedSelection:f=>{const m=parseInt(f,10),v=e.model._getTrackedRange(e.trackedRanges[m]);return e.trackedRangesDirection[m]===0?new Ae(v.startLineNumber,v.startColumn,v.endLineNumber,v.endColumn):new Ae(v.endLineNumber,v.endColumn,v.startLineNumber,v.startColumn)}})):h[g]=e.selectionsBefore[g];return h});a||(a=e.selectionsBefore);const l=[];for(const d in s)s.hasOwnProperty(d)&&l.push(parseInt(d,10));l.sort((d,c)=>c-d);for(const d of l)a.splice(d,1);return a}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{k.isEmpty(u)&&h===""||n.push({identifier:{major:t,minor:s++},range:u,text:h,forceMoveMarkers:g,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let a=!1;const c={addEditOperation:r,addTrackedEditOperation:(u,h,g)=>{a=!0,r(u,h,g)},trackSelection:(u,h)=>{const g=Ae.liftSelection(u);let f;if(g.isEmpty())if(typeof h=="boolean")h?f=2:f=3;else{const _=e.model.getLineMaxColumn(g.startLineNumber);g.startColumn===_?f=2:f=3}else f=1;const m=e.trackedRanges.length,v=e.model._setTrackedRange(null,g,f);return e.trackedRanges[m]=v,e.trackedRangesDirection[m]=g.getDirection(),m.toString()}};try{i.getEditOperations(e.model,c)}catch(u){return nt(u),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((i,n)=>-k.compareRangesUsingEnds(i.range,n.range));const t={};for(let i=1;is.identifier.major?r=n.identifier.major:r=s.identifier.major,t[r.toString()]=!0;for(let a=0;a0&&i--}}return t}}class aae{constructor(e,t,i){this.text=e,this.startSelection=t,this.endSelection=i}}class X_{static _capture(e,t){const i=[];for(const n of t){if(n.startLineNumber!==n.endLineNumber)return null;i.push(new aae(e.getLineContent(n.startLineNumber),n.startColumn-1,n.endColumn-1))}return i}constructor(e,t){this._original=X_._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;const i=X_._capture(e,t);if(!i||this._original.length!==i.length)return null;const n=[];for(let s=0,r=this._original.length;sTp,tokenizeEncoded:(o,e,t)=>Ay(0,t)};async function lae(o,e,t){if(!t)return oF(e,o.languageIdCodec,sF);const i=await Ei.getOrCreate(t);return oF(e,o.languageIdCodec,i||sF)}function dae(o,e,t,i,n,s,r){let a="
",l=i,d=0,c=!0;for(let u=0,h=e.getCount();u0;)r&&c?(f+=" ",c=!1):(f+=" ",c=!0),v--;break}case 60:f+="<",c=!1;break;case 62:f+=">",c=!1;break;case 38:f+="&",c=!1;break;case 0:f+="�",c=!1;break;case 65279:case 8232:case 8233:case 133:f+="�",c=!1;break;case 13:f+="​",c=!1;break;case 32:r&&c?(f+=" ",c=!1):(f+=" ",c=!0);break;default:f+=String.fromCharCode(m),c=!1}}if(a+=`${f}`,g>n||l>=n)break}return a+="
",a}function oF(o,e,t){let i='
';const n=Rl(o);let s=t.getInitialState();for(let r=0,a=n.length;r0&&(i+="
");const d=t.tokenizeEncoded(l,!0,s);Cn.convertToEndOffset(d.tokens,l.length);const u=new Cn(d.tokens,l,e).inflate();let h=0;for(let g=0,f=u.getCount();g${dw(l.substring(h,v))}`,h=v}s=d.endState}return i+="
",i}class cae{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class uae{constructor(e,t,i,n,s){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=s,this.prefixSum=0}}let BB=class DE{constructor(e,t,i,n){this._instanceId=v8(++DE.INSTANCE_COUNT),this._pendingChanges=new cae,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=i,this._paddingBottom=n}static findInsertionIndex(e,t,i){let n=0,s=e.length;for(;n>>1;t===e[r].afterLineNumber?i{t=!0,n=n|0,s=s|0,r=r|0,a=a|0;const l=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new uae(l,n,s,r,a)),l},changeOneWhitespace:(n,s,r)=>{t=!0,s=s|0,r=r|0,this._pendingChanges.change({id:n,newAfterLineNumber:s,newHeight:r})},removeWhitespace:n=>{t=!0,this._pendingChanges.remove({id:n})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const l of e)this._insertWhitespace(l);for(const l of t)this._changeOneWhitespace(l.id,l.newAfterLineNumber,l.newHeight);for(const l of i){const d=this._findWhitespaceIndex(l.id);d!==-1&&this._removeWhitespace(d)}return}const n=new Set;for(const l of i)n.add(l.id);const s=new Map;for(const l of t)s.set(l.id,l);const r=l=>{const d=[];for(const c of l)if(!n.has(c.id)){if(s.has(c.id)){const u=s.get(c.id);c.afterLineNumber=u.newAfterLineNumber,c.height=u.newHeight}d.push(c)}return d},a=r(this._arr).concat(r(e));a.sort((l,d)=>l.afterLineNumber===d.afterLineNumber?l.ordinal-d.ordinal:l.afterLineNumber-d.afterLineNumber),this._arr=a,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=DE.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e=e|0,t=t|0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[a+1].afterLineNumber>=e)return a;i=a+1|0}else n=a-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;const i=this._findLastWhitespaceBeforeLineNumber(e)+1;return i1?i=this._lineHeight*(e-1):i=0;const n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0));return i+n+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){this._checkPendingChanges(),e=e|0;const i=this._lineHeight*e,n=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0));return i+n+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let e=0;for(let t=0,i=this._arr.length;tt}isInTopPadding(e){return this._paddingTop===0?!1:(this._checkPendingChanges(),e=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e=e|0,e<0)return 1;const t=this._lineCount|0,i=this._lineHeight;let n=1,s=t;for(;n=a+i)n=r+1;else{if(e>=a)return r;s=r}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const i=this._lineHeight,n=this.getLineNumberAtOrAfterVerticalOffset(e)|0,s=this.getVerticalOffsetForLineNumber(n)|0;let r=this._lineCount|0,a=this.getFirstWhitespaceIndexAfterLineNumber(n)|0;const l=this.getWhitespacesCount()|0;let d,c;a===-1?(a=l,c=r+1,d=0):(c=this.getAfterLineNumberForWhitespaceIndex(a)|0,d=this.getHeightForWhitespaceIndex(a)|0);let u=s,h=u;const g=5e5;let f=0;s>=g&&(f=Math.floor(s/g)*g,f=Math.floor(f/i)*i,h-=f);const m=[],v=e+(t-e)/2;let _=-1;for(let S=n;S<=r;S++){if(_===-1){const x=u,y=u+i;(x<=v&&vv)&&(_=S)}for(u+=i,m[S-n]=h,h+=i;c===S;)h+=d,u+=d,a++,a>=l?c=r+1:(c=this.getAfterLineNumberForWhitespaceIndex(a)|0,d=this.getHeightForWhitespaceIndex(a)|0);if(u>=t){r=S;break}}_===-1&&(_=r);const b=this.getVerticalOffsetForLineNumber(r)|0;let C=n,w=r;return Ct&&w--,{bigNumbersDelta:f,startLineNumber:n,endLineNumber:r,relativeVerticalOffset:m,centeredLineNumber:_,completelyVisibleStartLineNumber:C,completelyVisibleEndLineNumber:w}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e=e|0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i;t>=1?i=this._lineHeight*t:i=0;let n;return e>0?n=this.getWhitespacesAccumulatedHeight(e-1):n=0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e=e|0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;const n=this.getVerticalOffsetForWhitespaceIndex(i),s=this.getHeightForWhitespaceIndex(i);if(e>=n+s)return-1;for(;t=a+l)t=r+1;else{if(e>=a)return r;i=r}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e=e|0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0||t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t),s=this.getIdForWhitespaceIndex(t),r=this.getAfterLineNumberForWhitespaceIndex(t);return{id:s,afterLineNumber:r,verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];const s=[];for(let r=i;r<=n;r++){const a=this.getVerticalOffsetForWhitespaceIndex(r),l=this.getHeightForWhitespaceIndex(r);if(a>=t)break;s.push({id:this.getIdForWhitespaceIndex(r),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:a,height:l})}return s}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].height}};BB.INSTANCE_COUNT=0;const hae=125;class L_{constructor(e,t,i,n){e=e|0,t=t|0,i=i|0,n=n|0,e<0&&(e=0),t<0&&(t=0),i<0&&(i=0),n<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class gae extends q{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new W),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new L_(0,0,0,0),this._scrollable=this._register(new bm({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new pA(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class fae extends q{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,s=n.get(143),r=n.get(83);this._linesLayout=new BB(t,n.get(66),r.top,r.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new gae(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new L_(s.contentWidth,0,s.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(113)?hae:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(66)&&this._linesLayout.setLineHeight(t.get(66)),e.hasChanged(83)){const i=t.get(83);this._linesLayout.setPadding(i.top,i.bottom)}if(e.hasChanged(143)){const i=t.get(143),n=i.contentWidth,s=i.height,r=this._scrollable.getScrollDimensions(),a=r.contentWidth;this._scrollable.setScrollDimensions(new L_(n,r.contentWidth,s,this._getContentHeight(n,s,a)))}else this._updateHeight();e.hasChanged(113)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const n=this._configuration.options.get(102);return n.horizontal===2||e>=t?0:n.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let s=this._linesLayout.getLinesTotalHeight();return n.get(104)?s+=Math.max(0,t-n.get(66)-n.get(83).bottom):n.get(102).ignoreHorizontalScrollbarInContentHeight||(s+=this._getHorizontalScrollbarHeight(e,i)),s}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new L_(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new YO(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new YO(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,t=this._maxLineWidth,i=e.get(144),n=e.get(50),s=e.get(143);if(i.isViewportWrapping){const r=e.get(72);return t>s.contentWidth+n.typicalHalfwidthCharacterWidth&&r.enabled&&r.side==="right"?t+s.verticalScrollbarWidth:t}else{const r=e.get(103)*n.typicalHalfwidthCharacterWidth,a=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+r+s.verticalScrollbarWidth,a,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new L_(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),n=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i);return{scrollTop:t,scrollTopWithoutViewZones:t-n,scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){t===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}class pae{constructor(e,t,i,n,s){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=s,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const n=e.range,s=e.options;let r;if(s.isWholeLine){const a=this._coordinatesConverter.convertModelPositionToViewPosition(new z(n.startLineNumber,1),0,!1,!0),l=this._coordinatesConverter.convertModelPositionToViewPosition(new z(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)),1);r=new k(a.lineNumber,a.column,l.lineNumber,l.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(n,1);i=new x7(r,s),this._decorationsCache[t]=i}return i}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=this._cachedModelDecorationsResolver!==null;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1,i=!1){const n=new k(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(n,t,i).inlineDecorations[0]}_getDecorationsInRange(e,t,i){const n=this._linesCollection.getDecorationsInRange(e,this.editorId,tw(this.configuration.options),t,i),s=e.startLineNumber,r=e.endLineNumber,a=[];let l=0;const d=[];for(let c=s;c<=r;c++)d[c-s]=[];for(let c=0,u=n.length;ct===1)}function CA(o,e){return WB(o,e.range,t=>t===2)}function WB(o,e,t){for(let i=e.startLineNumber;i<=e.endLineNumber;i++){const n=o.tokenization.getLineTokens(i),s=i===e.startLineNumber,r=i===e.endLineNumber;let a=s?n.findTokenIndexAtOffset(e.startColumn-1):0;for(;ae.endColumn-1);){if(!t(n.getStandardTokenType(a)))return!1;a++}}return!0}function Sx(o,e){return o===null?e?Vw.INSTANCE:Hw.INSTANCE:new mae(o,e)}class mae{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){this._assertVisible();const n=i>0?this._projectionData.breakOffsets[i-1]:0,s=this._projectionData.breakOffsets[i];let r;if(this._projectionData.injectionOffsets!==null){const a=this._projectionData.injectionOffsets.map((d,c)=>new Ta(0,0,d+1,this._projectionData.injectionOptions[c],0));r=Ta.applyInjectedText(e.getLineContent(t),a).substring(n,s)}else r=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:s+1});return i>0&&(r=rF(this._projectionData.wrappedTextIndentLength)+r),r}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i){const n=new Array;return this.getViewLinesData(e,t,i,1,0,[!0],n),n[0]}getViewLinesData(e,t,i,n,s,r,a){this._assertVisible();const l=this._projectionData,d=l.injectionOffsets,c=l.injectionOptions;let u=null;if(d){u=[];let g=0,f=0;for(let m=0;m0?l.breakOffsets[m-1]:0,b=l.breakOffsets[m];for(;fb)break;if(_0?l.wrappedTextIndentLength:0,I=y+Math.max(w-_,0),E=y+Math.min(S-_,b-_);I!==E&&v.push(new xee(I,E,x.inlineClassName,x.inlineClassNameAffectsLetterSpacing))}}if(S<=b)g+=C,f++;else break}}}let h;d?h=e.tokenization.getLineTokens(t).withInserted(d.map((g,f)=>({offset:g,text:c[f].content,tokenMetadata:Cn.defaultTokenMetadata}))):h=e.tokenization.getLineTokens(t);for(let g=i;g0?n.wrappedTextIndentLength:0,r=i>0?n.breakOffsets[i-1]:0,a=n.breakOffsets[i],l=e.sliceAndInflate(r,a,s);let d=l.getLineContent();i>0&&(d=rF(n.wrappedTextIndentLength)+d);const c=this._projectionData.getMinOutputOffset(i)+1,u=d.length+1,h=i+1=yx.length)for(let e=1;e<=o;e++)yx[e]=_ae(e);return yx[o]}function _ae(o){return new Array(o+1).join(" ")}class vae{constructor(e,t,i,n,s,r,a,l,d,c){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=s,this.tabSize=r,this.wrappingStrategy=a,this.wrappingColumn=l,this.wrappingIndent=d,this.wordBreak=c,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new Cae(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),s=i.length,r=this.createLineBreaksComputer(),a=new Hd(Ta.fromDecorations(n));for(let m=0;m_.lineNumber===m+1);r.addRequest(i[m],v,t?t[m]:null)}const l=r.finalize(),d=[],c=this.hiddenAreasDecorationIds.map(m=>this.model.getDecorationRange(m)).sort(k.compareRangesUsingStarts);let u=1,h=0,g=-1,f=g+1=u&&v<=h,b=Sx(l[m],!_);d[m]=b.getViewLineCount(),this.modelLineProjections[m]=b}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new rJ(d)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){const t=e.map(h=>this.model.validateRange(h)),i=bae(t),n=this.hiddenAreasDecorationIds.map(h=>this.model.getDecorationRange(h)).sort(k.compareRangesUsingStarts);if(i.length===n.length){let h=!1;for(let g=0;g({range:h,options:st.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,s);const r=i;let a=1,l=0,d=-1,c=d+1=a&&g<=l?this.modelLineProjections[h].isVisible()&&(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!1),f=!0):(u=!0,this.modelLineProjections[h].isVisible()||(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!0),f=!0)),f){const m=this.modelLineProjections[h].getViewLineCount();this.projectedModelLineLineCounts.setValue(h,m)}}return u||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return e<1||e>this.modelLineProjections.length?!1:this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n,s){const r=this.fontInfo.equals(e),a=this.wrappingStrategy===t,l=this.wrappingColumn===i,d=this.wrappingIndent===n,c=this.wordBreak===s;if(r&&a&&l&&d&&c)return!1;const u=r&&a&&!l&&d&&c;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n,this.wordBreak=s;let h=null;if(u){h=[];for(let g=0,f=this.modelLineProjections.length;g2&&!this.modelLineProjections[t-2].isVisible(),r=t===1?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let a=0;const l=[],d=[];for(let c=0,u=n.length;cl?(c=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,u=c+l-1,f=u+1,m=f+(s-l)-1,d=!0):st?t:e|0}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),s=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),a=this.model.guides.getActiveIndentGuide(n.lineNumber,s.lineNumber,r.lineNumber),l=this.convertModelPositionToViewPosition(a.startLineNumber,1),d=this.convertModelPositionToViewPosition(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber));return{startLineNumber:l.lineNumber,endLineNumber:d.lineNumber,indent:a.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new aF(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new z(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new z(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),s=new Array;let r=this.getModelStartPositionOfViewLine(i),a=new Array;for(let l=i.modelLineNumber;l<=n.modelLineNumber;l++){const d=this.modelLineProjections[l-1];if(d.isVisible()){const c=l===i.modelLineNumber?i.modelLineWrappedLineIdx:0,u=l===n.modelLineNumber?n.modelLineWrappedLineIdx+1:d.getViewLineCount();for(let h=c;h{if(g.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[c.modelLineNumber-1].getViewPositionOfModelPosition(0,g.forWrappedLinesAfterColumn).lineNumber>=c.modelLineWrappedLineIdx||g.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[c.modelLineNumber-1].getViewPositionOfModelPosition(0,g.forWrappedLinesBeforeOrAtColumn).lineNumberc.modelLineWrappedLineIdx)return}const m=this.convertModelPositionToViewPosition(c.modelLineNumber,g.horizontalLine.endColumn),v=this.modelLineProjections[c.modelLineNumber-1].getViewPositionOfModelPosition(0,g.horizontalLine.endColumn);return v.lineNumber===c.modelLineWrappedLineIdx?new Mh(g.visibleColumn,f,g.className,new $_(g.horizontalLine.top,m.column),-1,-1):v.lineNumber!!g))}}return r}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let s=[];const r=[],a=[],l=i.lineNumber-1,d=n.lineNumber-1;let c=null;for(let f=l;f<=d;f++){const m=this.modelLineProjections[f];if(m.isVisible()){const v=m.getViewLineNumberOfModelPosition(0,f===l?i.column:1),_=m.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(f+1)),b=_-v+1;let C=0;b>1&&m.getViewLineMinColumn(this.model,f+1,_)===1&&(C=v===0?1:2),r.push(b),a.push(C),c===null&&(c=new z(f+1,0))}else c!==null&&(s=s.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,f)),c=null)}c!==null&&(s=s.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,n.lineNumber)),c=null);const u=t-e+1,h=new Array(u);let g=0;for(let f=0,m=s.length;ft&&(f=!0,g=t-s+1),u.getViewLinesData(this.model,d+1,h,g,s-e,i,l),s+=g,f)break}return l}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),s=n.index,r=n.remainder,a=this.modelLineProjections[s],l=a.getViewLineMinColumn(this.model,s+1,r),d=a.getViewLineMaxColumn(this.model,s+1,r);td&&(t=d);const c=a.getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new z(s+1,c)).equals(i)?new z(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new k(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){const i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new z(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new k(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2,n=!1,s=!1){const r=this.model.validatePosition(new z(e,t)),a=r.lineNumber,l=r.column;let d=a-1,c=!1;if(s)for(;d0&&!this.modelLineProjections[d].isVisible();)d--,c=!0;if(d===0&&!this.modelLineProjections[d].isVisible())return new z(n?0:1,1);const u=1+this.projectedModelLineLineCounts.getPrefixSum(d);let h;return c?s?h=this.modelLineProjections[d].getViewPositionOfModelPosition(u,1,i):h=this.modelLineProjections[d].getViewPositionOfModelPosition(u,this.model.getLineMaxColumn(d+1),i):h=this.modelLineProjections[a-1].getViewPositionOfModelPosition(u,l,i),h}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return k.fromPositions(i)}else{const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new k(i.lineNumber,i.column,n.lineNumber,n.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){const s=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(s,t)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(i===0&&!this.modelLineProjections[i].isVisible())return 1;const n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i,n,s){const r=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),a=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(a.lineNumber-r.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new k(r.lineNumber,1,a.lineNumber,a.column),t,i,n,s);let l=[];const d=r.lineNumber-1,c=a.lineNumber-1;let u=null;for(let m=d;m<=c;m++)if(this.modelLineProjections[m].isVisible())u===null&&(u=new z(m+1,m===d?r.column:1));else if(u!==null){const _=this.model.getLineMaxColumn(m);l=l.concat(this.model.getDecorationsInRange(new k(u.lineNumber,u.column,m,_),t,i,n)),u=null}u!==null&&(l=l.concat(this.model.getDecorationsInRange(new k(u.lineNumber,u.column,a.lineNumber,a.column),t,i,n)),u=null),l.sort((m,v)=>{const _=k.compareRangesUsingStarts(m.range,v.range);return _===0?m.idv.id?1:0:_});const h=[];let g=0,f=null;for(const m of l){const v=m.id;f!==v&&(f=v,h[g++]=m)}return h}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return t.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(t.modelLineNumber):0}}function bae(o){if(o.length===0)return[];const e=o.slice();e.sort(k.compareRangesUsingStarts);const t=[];let i=e[0].startLineNumber,n=e[0].endLineNumber;for(let s=1,r=e.length;sn+1?(t.push(new k(i,1,n,1)),i=a.startLineNumber,n=a.endLineNumber):a.endLineNumber>n&&(n=a.endLineNumber)}return t.push(new k(i,1,n,1)),t}class aF{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class lF{constructor(e,t){this.modelRange=e,this.viewLines=t}}class Cae{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,i,n){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,i,n)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class wae{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new Sae(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new yE(t,i)}onModelLinesInserted(e,t,i,n){return new LE(t,i)}onModelLineChanged(e,t,i){return[!1,new FB(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const i=t-e+1,n=new Array(i);for(let s=0;st)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}let yae=class extends q{constructor(e,t,i,n,s,r,a,l,d){if(super(),this.languageConfigurationService=a,this._themeService=l,this._attachedView=d,this.hiddenAreasModel=new Dae,this.previousHiddenAreas=[],this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new Gre,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new Jg(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new Yt(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=wA.create(this.model),this.model.isTooLargeForTokenization())this._lines=new wae(this.model);else{const c=this._configuration.options,u=c.get(50),h=c.get(137),g=c.get(144),f=c.get(136),m=c.get(128);this._lines=new vae(this._editorId,this.model,n,s,u,this.model.getOptions().tabSize,h,g.wrappingColumn,f,m)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new oae(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new fae(this._configuration,this.getLineCount(),r)),this._register(this.viewLayout.onDidScroll(c=>{c.scrollTopChanged&&this._handleVisibleLinesChanged(),c.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new $re(c)),this._eventDispatcher.emitOutgoingEvent(new _A(c.oldScrollWidth,c.oldScrollLeft,c.oldScrollHeight,c.oldScrollTop,c.scrollWidth,c.scrollLeft,c.scrollHeight,c.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(c=>{this._eventDispatcher.emitOutgoingEvent(c)})),this._decorations=new pae(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(c=>{try{const u=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(u,c)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(u0.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new Kre)})),this._register(this._themeService.onDidColorThemeChange(c=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new Ure(c))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),t=new k(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new Hre(e)),this._eventDispatcher.emitOutgoingEvent(new mA(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new Fre)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new Bre)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new z(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new cF(t,this._viewportStart.startLineDelta)}return new cF(null,0)}_onConfigurationChanged(e,t){const i=this._captureStableViewport(),n=this._configuration.options,s=n.get(50),r=n.get(137),a=n.get(144),l=n.get(136),d=n.get(128);this._lines.setWrappingSettings(s,r,a.wrappingColumn,l,d)&&(e.emitViewEvent(new pC),e.emitViewEvent(new mC),e.emitViewEvent(new Qu(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(90)&&(this._decorations.reset(),e.emitViewEvent(new Qu(null))),t.hasChanged(97)&&(this._decorations.reset(),e.emitViewEvent(new Qu(null))),e.emitViewEvent(new Wre(t)),this.viewLayout.onConfigurationChanged(t),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout),Jg.shouldRecreate(t)&&(this.cursorConfig=new Jg(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(e=>{try{const i=this._eventDispatcher.beginEmitViewEvents();let n=!1,s=!1;const r=e instanceof $h?e.rawContentChangedEvent.changes:e.changes,a=e instanceof $h?e.rawContentChangedEvent.versionId:null,l=this._lines.createLineBreaksComputer();for(const u of r)switch(u.changeType){case 4:{for(let h=0;h!m.ownerId||m.ownerId===this._editorId)),l.addRequest(g,f,null)}break}case 2:{let h=null;u.injectedText&&(h=u.injectedText.filter(g=>!g.ownerId||g.ownerId===this._editorId)),l.addRequest(u.detail,h,null);break}}const d=l.finalize(),c=new Hd(d);for(const u of r)switch(u.changeType){case 1:{this._lines.onModelFlushed(),i.emitViewEvent(new pC),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),n=!0;break}case 3:{const h=this._lines.onModelLinesDeleted(a,u.fromLineNumber,u.toLineNumber);h!==null&&(i.emitViewEvent(h),this.viewLayout.onLinesDeleted(h.fromLineNumber,h.toLineNumber)),n=!0;break}case 4:{const h=c.takeCount(u.detail.length),g=this._lines.onModelLinesInserted(a,u.fromLineNumber,u.toLineNumber,h);g!==null&&(i.emitViewEvent(g),this.viewLayout.onLinesInserted(g.fromLineNumber,g.toLineNumber)),n=!0;break}case 2:{const h=c.dequeue(),[g,f,m,v]=this._lines.onModelLineChanged(a,u.lineNumber,h);s=g,f&&i.emitViewEvent(f),m&&(i.emitViewEvent(m),this.viewLayout.onLinesInserted(m.fromLineNumber,m.toLineNumber)),v&&(i.emitViewEvent(v),this.viewLayout.onLinesDeleted(v.fromLineNumber,v.toLineNumber));break}case 5:break}a!==null&&this._lines.acceptVersionId(a),this.viewLayout.onHeightMaybeChanged(),!n&&s&&(i.emitViewEvent(new mC),i.emitViewEvent(new Qu(null)),this._cursor.onLineMappingChanged(i),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){const i=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(i){const n=this.coordinatesConverter.convertModelPositionToViewPosition(i.getStartPosition()),s=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber);this.viewLayout.setScrollPosition({scrollTop:s+this._viewportStart.startLineDelta},1)}}try{const i=this._eventDispatcher.beginEmitViewEvents();e instanceof $h&&i.emitOutgoingEvent(new iae(e.contentChangedEvent)),this._cursor.onModelContentChanged(i,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(e=>{const t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new zre),this.cursorConfig=new Jg(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new tae(e))})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new Jg(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new eae(e))})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const t=this._eventDispatcher.beginEmitViewEvents();t.emitViewEvent(new pC),t.emitViewEvent(new mC),t.emitViewEvent(new Qu(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new Jg(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new nae(e))})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new Qu(e)),this._eventDispatcher.emitOutgoingEvent(new Jre(e))}))}setHiddenAreas(e,t){var i;this.hiddenAreasModel.setHiddenAreas(t,e);const n=this.hiddenAreasModel.getMergedRanges();if(n===this.previousHiddenAreas)return;this.previousHiddenAreas=n;const s=this._captureStableViewport();let r=!1;try{const a=this._eventDispatcher.beginEmitViewEvents();r=this._lines.setHiddenAreas(n),r&&(a.emitViewEvent(new pC),a.emitViewEvent(new mC),a.emitViewEvent(new Qu(null)),this._cursor.onLineMappingChanged(a),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());const l=(i=s.viewportStartModelPosition)===null||i===void 0?void 0:i.lineNumber;l&&n.some(c=>c.startLineNumber<=l&&l<=c.endLineNumber)||s.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),r&&this._eventDispatcher.emitOutgoingEvent(new Xre)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(143),t=this._configuration.options.get(66),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),s=Math.max(1,n.completelyVisibleStartLineNumber-i),r=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new k(s,this.getLineMinColumn(s),r,this.getLineMaxColumn(r)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(i.length===0)return[t];const n=[];let s=0,r=t.startLineNumber,a=t.startColumn;const l=t.endLineNumber,d=t.endColumn;for(let c=0,u=i.length;cl||(r"u")return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),i=this.coordinatesConverter.convertModelPositionToViewPosition(t),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:n}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,i){this._viewportStart.update(this,e)}getActiveIndentGuide(e,t,i){return this._lines.getActiveIndentGuide(e,t,i)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,i,n){return this._lines.getViewLinesBracketGuides(e,t,i,n)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const t=Cs(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Da(this.getLineContent(e));return t===-1?0:t+2}getMinimapDecorationsInRange(e){return this._decorations.getMinimapDecorationsInRange(e)}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewportViewLineRenderingData(e,t){const n=this._decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return this._getViewLineRenderingData(t,n)}getViewLineRenderingData(e){const t=this._decorations.getInlineDecorationsOnLine(e);return this._getViewLineRenderingData(e,t)}_getViewLineRenderingData(e,t){const i=this.model.mightContainRTL(),n=this.model.mightContainNonBasicASCII(),s=this.getTabSize(),r=this._lines.getViewLineData(e);return r.inlineDecorations&&(t=[...t,...r.inlineDecorations.map(a=>a.toInlineDecoration(e))]),new Zo(r.minColumn,r.maxColumn,r.content,r.continuesWithWrappedLine,i,n,r.tokens,t,s,r.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new Dee(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,tw(this._configuration.options)),i=new Lae;for(const n of t){const s=n.options,r=s.overviewRuler;if(!r)continue;const a=r.position;if(a===0)continue;const l=r.getColor(e.value),d=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),c=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(l,s.zIndex,d,c,a)}return i.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const i=t.options.overviewRuler;i==null||i.invalidateCachedColor();const n=t.options.minimap;n==null||n.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getValueLengthInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(i,t)}modifyPosition(e,t){const i=this.coordinatesConverter.convertViewPositionToModelPosition(e);return this.model.modifyPosition(i,t)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(t<0?t-=i:t+=i);const r=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(r)}getPlainTextToCopy(e,t,i){const n=i?`\r +`:this.model.getEOL();e=e.slice(0),e.sort(k.compareRangesUsingStarts);let s=!1,r=!1;for(const l of e)l.isEmpty()?s=!0:r=!0;if(!r){if(!t)return"";const l=e.map(c=>c.startLineNumber);let d="";for(let c=0;c0&&l[c-1]===l[c]||(d+=this.model.getLineContent(l[c])+n);return d}if(s&&t){const l=[];let d=0;for(const c of e){const u=c.startLineNumber;c.isEmpty()?u!==d&&l.push(this.model.getLineContent(u)):l.push(this.model.getValueInRange(c,i?2:0)),d=u}return l.length===1?l[0]:l}const a=[];for(const l of e)l.isEmpty()||a.push(this.model.getValueInRange(l,i?2:0));return a.length===1?a[0]:a}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===Ko||e.length!==1)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const c=n.startLineNumber;n=new k(c,this.model.getLineMinColumn(c),c,this.model.getLineMaxColumn(c))}const s=this._configuration.options.get(50),r=this._getColorMap(),l=/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===co.fontFamily;let d;return l?d=co.fontFamily:(d=s.fontFamily,d=d.replace(/"/g,"'"),/[,']/.test(d)||/[+ ]/.test(d)&&(d=`'${d}'`),d=`${d}, ${co.fontFamily}`),{mode:i,html:`
`+this._getHTMLToCopy(n,r)+"
"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn,a=this.getTabSize();let l="";for(let d=i;d<=s;d++){const c=this.model.tokenization.getLineTokens(d),u=c.getLineContent(),h=d===i?n-1:0,g=d===s?r-1:u.length;u===""?l+="
":l+=dae(u,c.inflate(),t,h,g,a,is)}return l}_getColorMap(){const e=Ei.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;ithis._cursor.setStates(n,e,t,i))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector(n=>this._cursor.setSelections(n,e,t,i))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new Qre);return}this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit(n=>this._cursor.executeEdits(n,e,t,i))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(i=>this._cursor.type(i,e,t))}compositionType(e,t,i,n,s){this._executeCursorEdit(r=>this._cursor.compositionType(r,e,t,i,n,s))}paste(e,t,i,n){this._executeCursorEdit(s=>this._cursor.paste(s,e,t,i,n))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(i=>this._cursor.executeCommand(i,e,t))}executeCommands(e,t){this._executeCursorEdit(i=>this._cursor.executeCommands(i,e,t))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector(n=>this._cursor.revealPrimary(n,e,i,0,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new k(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new I1(e,!1,i,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new k(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new I1(e,!1,i,null,0,!0,0)))}revealRange(e,t,i,n,s){this._withViewEventsCollector(r=>r.emitViewEvent(new I1(e,!1,i,null,n,t,s)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new qre),this._eventDispatcher.emitOutgoingEvent(new Yre))}_withViewEventsCollector(e){try{const t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}};class wA{static create(e){const t=e._setTrackedRange(null,new k(1,1,1,1),1);return new wA(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,i,n,s){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=s}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const i=e.coordinatesConverter.convertViewPositionToModelPosition(new z(t,e.getLineMinColumn(t))),n=e.model._setTrackedRange(this._modelTrackedRange,new k(i.lineNumber,i.column,i.lineNumber,i.column),1),s=e.viewLayout.getVerticalOffsetForLineNumber(t),r=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=n,this._startLineDelta=r-s}invalidate(){this._isValid=!1}}class Lae{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,s){const r=this._asMap[e];if(r){const a=r.data,l=a[a.length-3],d=a[a.length-1];if(l===s&&d+1>=i){n>d&&(a[a.length-1]=n);return}a.push(s,i,n)}else{const a=new Rv(e,t,[s,i,n]);this._asMap[e]=a,this.asArray.push(a)}}}class Dae{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){const i=this.hiddenAreas.get(e);i&&dF(i,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce((t,i)=>xae(t,i),[]);return dF(this.ranges,e)?this.ranges:(this.ranges=e,this.ranges)}}function xae(o,e){const t=[];let i=0,n=0;for(;i0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let n=this.breakOffsets[e]-t;return e>0&&(n+=this.wrappedTextIndentLength),n}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let n=e===0?t:this.breakOffsets[e-1]+t;if(this.injectionOffsets!==null)for(let s=0;sthis.injectionOffsets[s];s++)n0?this.breakOffsets[s-1]:0,t===0)if(e<=r)n=s-1;else if(e>l)i=s+1;else break;else if(e=l)i=s+1;else break}let a=e-r;return s>0&&(a+=this.wrappedTextIndentLength),new _C(s,a)}normalizeOutputPosition(e,t,i){if(this.injectionOffsets!==null){const n=this.outputPositionToOffsetInInputWithInjections(e,t),s=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(s!==n)return this.offsetInInputWithInjectionsToOutputPosition(s,i)}if(i===0){if(e>0&&t===this.getMinOutputOffset(e))return new _C(e-1,this.getMaxOutputOffset(e-1))}else if(i===1){const n=this.getOutputLineCount()-1;if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(t===2){if(e===i.offsetInInputWithInjections+i.length&&uF(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let n=i.offsetInInputWithInjections;if(hF(this.injectionOptions[i.injectedTextIndex].cursorStops))return n;let s=i.injectedTextIndex-1;for(;s>=0&&this.injectionOffsets[s]===this.injectionOffsets[i.injectedTextIndex]&&!(uF(this.injectionOptions[s].cursorStops)||(n-=this.injectionOptions[s].content.length,hF(this.injectionOptions[s].cursorStops)));)s--;return n}}else if(t===1||t===4){let n=i.offsetInInputWithInjections+i.length,s=i.injectedTextIndex;for(;s+1=0&&this.injectionOffsets[s-1]===this.injectionOffsets[s];)n-=this.injectionOptions[s-1].content.length,s--;return n}by()}getInjectedText(e,t){const i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(t!==null){let n=0;for(let s=0;se)break;if(e<=l)return{injectedTextIndex:s,offsetInInputWithInjections:a,length:r};n+=r}}}}function uF(o){return o==null?!0:o===Sa.Right||o===Sa.Both}function hF(o){return o==null?!0:o===Sa.Left||o===Sa.Both}class _C{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new z(e+this.outputLineIndex,this.outputOffset+1)}}class SA{static create(e){return new SA(e.get(132),e.get(131))}constructor(e,t){this.classifier=new Iae(e,t)}createLineBreaksComputer(e,t,i,n,s){const r=[],a=[],l=[];return{addRequest:(d,c,u)=>{r.push(d),a.push(c),l.push(u)},finalize:()=>{const d=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,c=[];for(let u=0,h=r.length;u=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let xE=[],kE=[];function Eae(o,e,t,i,n,s,r,a){if(n===-1)return null;const l=t.length;if(l<=1)return null;const d=a==="keepAll",c=e.breakOffsets,u=e.breakOffsetsVisibleColumn,h=VB(t,i,n,s,r),g=n-h,f=xE,m=kE;let v=0,_=0,b=0,C=n;const w=c.length;let S=0;if(S>=0){let x=Math.abs(u[S]-C);for(;S+1=x)break;x=y,S++}}for(;Sx&&(x=_,y=b);let I=0,E=0,R=0,j=0;if(y<=C){let $=y,K=x===0?0:t.charCodeAt(x-1),oe=x===0?0:o.get(K),Le=!0;for(let he=x;he_&&IE(K,oe,V,Q,d)&&(I=se,E=$),$+=H,$>C){se>_?(R=se,j=$-H):(R=he+1,j=$),$-E>g&&(I=0),Le=!1;break}K=V,oe=Q}if(Le){v>0&&(f[v]=c[c.length-1],m[v]=u[c.length-1],v++);break}}if(I===0){let $=y,K=t.charCodeAt(x),oe=o.get(K),Le=!1;for(let he=x-1;he>=_;he--){const se=he+1,V=t.charCodeAt(he);if(V===9){Le=!0;break}let Q,H;if(Jh(V)?(he--,Q=0,H=2):(Q=o.get(V),H=ou(V)?s:1),$<=C){if(R===0&&(R=se,j=$),$<=C-g)break;if(IE(V,Q,K,oe,d)){I=se,E=$;break}}$-=H,K=V,oe=Q}if(I!==0){const he=g-(j-E);if(he<=i){const se=t.charCodeAt(R);let V;bn(se)?V=2:V=J_(se,j,i,s),he-V<0&&(I=0)}}if(Le){S--;continue}}if(I===0&&(I=R,E=j),I<=_){const $=t.charCodeAt(_);bn($)?(I=_+2,E=b+2):(I=_+1,E=b+J_($,b,i,s))}for(_=I,f[v]=I,b=E,m[v]=E,v++,C=E+g;S<0||S=O)break;O=$,S++}}return v===0?null:(f.length=v,m.length=v,xE=e.breakOffsets,kE=e.breakOffsetsVisibleColumn,e.breakOffsets=f,e.breakOffsetsVisibleColumn=m,e.wrappedTextIndentLength=h,e)}function Nae(o,e,t,i,n,s,r,a){const l=Ta.applyInjectedText(e,t);let d,c;if(t&&t.length>0?(d=t.map(E=>E.options),c=t.map(E=>E.column-1)):(d=null,c=null),n===-1)return d?new Q_(c,d,[l.length],[],0):null;const u=l.length;if(u<=1)return d?new Q_(c,d,[l.length],[],0):null;const h=a==="keepAll",g=VB(l,i,n,s,r),f=n-g,m=[],v=[];let _=0,b=0,C=0,w=n,S=l.charCodeAt(0),x=o.get(S),y=J_(S,0,i,s),I=1;bn(S)&&(y+=1,S=l.charCodeAt(1),x=o.get(S),I++);for(let E=I;Ew&&((b===0||y-C>f)&&(b=R,C=y-$),m[_]=b,v[_]=C,_++,w=C+f,b=0),S=j,x=O}return _===0&&(!t||t.length===0)?null:(m[_]=u,v[_]=y,new Q_(c,d,m,v,g))}function J_(o,e,t,i){return o===9?t-e%t:ou(o)||o<32?i:1}function gF(o,e){return e-o%e}function IE(o,e,t,i,n){return t!==32&&(e===2&&i!==2||e!==1&&i===1||!n&&e===3&&i!==2||!n&&i===3&&e!==1)}function VB(o,e,t,i,n){let s=0;if(n!==0){const r=Cs(o);if(r!==-1){for(let l=0;lt&&(s=0)}}return s}const Lx=qd("domLineBreaksComputer",{createHTML:o=>o});class yA{static create(e){return new yA(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,t,i,n,s){const r=[],a=[];return{addRequest:(l,d,c)=>{r.push(l),a.push(d)},finalize:()=>Tae(Lc(this.targetWindow.deref()),r,e,t,i,n,s,a)}}}function Tae(o,e,t,i,n,s,r,a){var l;function d(R){const j=a[R];if(j){const O=Ta.applyInjectedText(e[R],j),$=j.map(oe=>oe.options),K=j.map(oe=>oe.column-1);return new Q_(K,$,[O.length],[],0)}else return null}if(n===-1){const R=[];for(let j=0,O=e.length;jc?(O=0,$=0):K=c-he}const oe=j.substr(O),Le=Mae(oe,$,i,K,m,g);v[R]=O,_[R]=$,b[R]=oe,C[R]=Le[0],w[R]=Le[1]}const S=m.build(),x=(l=Lx==null?void 0:Lx.createHTML(S))!==null&&l!==void 0?l:S;f.innerHTML=x,f.style.position="absolute",f.style.top="10000",r==="keepAll"?(f.style.wordBreak="keep-all",f.style.overflowWrap="anywhere"):(f.style.wordBreak="inherit",f.style.overflowWrap="break-word"),o.document.body.appendChild(f);const y=document.createRange(),I=Array.prototype.slice.call(f.children,0),E=[];for(let R=0;RQ.options),se=V.map(Q=>Q.column-1)):(he=null,se=null),E[R]=new Q_(se,he,O,Le,K)}return o.document.body.removeChild(f),E}function Mae(o,e,t,i,n,s){if(s!==0){const h=String(s);n.appendString('
');const r=o.length;let a=e,l=0;const d=[],c=[];let u=0");for(let h=0;h"),d[h]=l,c[h]=a;const g=u;u=h+1"),d[o.length]=l,c[o.length]=a,n.appendString("
"),[d,c]}function Aae(o,e,t,i){if(t.length<=1)return null;const n=Array.prototype.slice.call(e.children,0),s=[];try{EE(o,n,i,0,null,t.length-1,null,s)}catch(r){return console.log(r),null}return s.length===0?null:(s.push(t.length),s)}function EE(o,e,t,i,n,s,r,a){if(i===s||(n=n||Dx(o,e,t[i],t[i+1]),r=r||Dx(o,e,t[s],t[s+1]),Math.abs(n[0].top-r[0].top)<=.1))return;if(i+1===s){a.push(s);return}const l=i+(s-i)/2|0,d=Dx(o,e,t[l],t[l+1]);EE(o,e,t,i,n,l,d,a),EE(o,e,t,l,d,s,r,a)}function Dx(o,e,t,i){return o.setStart(e[t/16384|0].firstChild,t%16384),o.setEnd(e[i/16384|0].firstChild,i%16384),o.getClientRects()}class Rae extends q{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new nM),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,i){this._editor=e,this._instantiationService=i;for(const n of t){if(this._pending.has(n.id)){nt(new Error(`Cannot have two contributions with the same id ${n.id}`));continue}this._pending.set(n.id,n)}this._instantiateSome(0),this._register(g_(Je(this._editor.getDomNode()),()=>{this._instantiateSome(1)})),this._register(g_(Je(this._editor.getDomNode()),()=>{this._instantiateSome(2)})),this._register(g_(Je(this._editor.getDomNode()),()=>{this._instantiateSome(3)},5e3))}saveViewState(){const e={};for(const[t,i]of this._instances)typeof i.saveViewState=="function"&&(e[t]=i.saveViewState());return e}restoreViewState(e){for(const[t,i]of this._instances)typeof i.restoreViewState=="function"&&i.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){var e;this._register(g_(Je((e=this._editor)===null||e===void 0?void 0:e.getDomNode()),()=>{this._instantiateSome(1)},50))}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const t=this._findPendingContributionsByInstantiation(e);for(const i of t)this._instantiateById(i.id)}_findPendingContributionsByInstantiation(e){const t=[];for(const[,i]of this._pending)i.instantiation===e&&t.push(i);return t}_instantiateById(e){const t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const i=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,i),typeof i.restoreViewState=="function"&&t.instantiation!==0&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(i){nt(i)}}}}var Pae=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ed=function(o,e){return function(t,i){e(t,i,o)}},uh;let Oae=0,Fae=class{constructor(e,t,i,n,s,r){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=s,this.attachedView=r}dispose(){jt(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}},Vp=uh=class extends q{get isSimpleWidget(){return this._configuration.isSimpleWidget}constructor(e,t,i,n,s,r,a,l,d,c,u,h){var g;super(),this.languageConfigurationService=u,this._deliveryQueue=DZ(),this._contributions=this._register(new Rae),this._onDidDispose=this._register(new W),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new fF({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new fF({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new fs(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new fs(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new fs(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new fs(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new fs(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new fs(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new W({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),s.willCreateCodeEditor();const f={...t};this._domElement=e,this._overflowWidgetsDomNode=f.overflowWidgetsDomNode,delete f.overflowWidgetsDomNode,this._id=++Oae,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,f,c)),this._register(this._configuration.onDidChange(_=>{this._onDidChangeConfiguration.fire(_);const b=this._configuration.options;if(_.hasChanged(143)){const C=b.get(143);this._onDidLayoutChange.fire(C)}})),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=d,this._codeEditorService=s,this._commandService=r,this._themeService=l,this._register(new Bae(this,this._contextKeyService)),this._register(new Wae(this,this._contextKeyService,h)),this._instantiationService=n.createChild(new h0([Xe,this._contextKeyService])),this._modelData=null,this._focusTracker=new Vae(e),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let m;Array.isArray(i.contributions)?m=i.contributions:m=Jf.getEditorContributions(),this._contributions.initialize(this,m,this._instantiationService);for(const _ of Jf.getEditorActions()){if(this._actions.has(_.id)){nt(new Error(`Cannot have two actions with the same id ${_.id}`));continue}const b=new pB(_.id,_.label,_.alias,_.metadata,(g=_.precondition)!==null&&g!==void 0?g:void 0,()=>this._instantiationService.invokeFunction(C=>Promise.resolve(_.runEditorCommand(C,this,null))),this._contextKeyService);this._actions.set(b.id,b)}const v=()=>!this._configuration.options.get(90)&&this._configuration.options.get(36).enabled;this._register(new rQ(this._domElement,{onDragOver:_=>{if(!v())return;const b=this.getTargetAtClientPoint(_.clientX,_.clientY);b!=null&&b.position&&this.showDropIndicatorAt(b.position)},onDrop:async _=>{if(!v()||(this.removeDropIndicator(),!_.dataTransfer))return;const b=this.getTargetAtClientPoint(_.clientX,_.clientY);b!=null&&b.position&&this._onDropIntoEditor.fire({position:b.position,event:_})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){var t;(t=this._modelData)===null||t===void 0||t.view.writeScreenReaderContent(e)}_createConfiguration(e,t,i){return new tE(e,t,this._domElement,i)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return i0.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?Wt.getWordAtPosition(this._modelData.model,this._configuration.options.get(129),e):null}getValue(e=null){if(!this._modelData)return"";const t=!!(e&&e.preserveBOM);let i=0;return e&&e.lineEnding&&e.lineEnding===` `?i=1:e&&e.lineEnding&&e.lineEnding===`\r -`&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){this._modelData&&this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){const t=e;if(this._modelData===null&&t===null||this._modelData&&this._modelData.model===t)return;const i=this.hasTextFocus(),n=this._detachModel();this._attachModel(t),i&&this.hasModel()&&this.focus();const s={oldModelUrl:n?n.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(s),this._postDetachModelCleanup(n),this._contributions.onAfterModelAttached()}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){const s=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(r.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?uh._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?uh._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const s=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(r.lineNumber,n)}getBottomForLineNumber(e,t=!1){return this._modelData?uh._getVerticalOffsetAfterPosition(this._modelData,e,1,t):-1}setHiddenAreas(e,t){var i;(i=this._modelData)===null||i===void 0||i.viewModel.setHiddenAreas(e.map(n=>k.lift(n)),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return mn.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!z.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!k.isIRange(e))throw new Error("Invalid arguments");const s=this._modelData.model.validateRange(e),r=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(s);this._modelData.viewModel.revealRange("api",i,r,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new k(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!z.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new k(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=Re.isISelection(e),n=k.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const s={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(s,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new Re(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new k(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!k.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(k.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let n=0,s=e.length;n0&&this._modelData.viewModel.restoreCursorState(i):this._modelData.viewModel.restoreCursorState([i]),this._contributions.restoreViewState(t.contributionsState||{});const n=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(n)}}handleInitialized(){var e;(e=this._getViewModel())===null||e===void 0||e.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter(t=>t.isSupported()),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{const s=i;this._type(e,s.text||"");return}case"replacePreviousChar":{const s=i;this._compositionType(e,s.text||"",s.replaceCharCnt||0,0,0);return}case"compositionType":{const s=i;this._compositionType(e,s.text||"",s.replacePrevCharCnt||0,s.replaceNextCharCnt||0,s.positionDelta||0);return}case"paste":{const s=i;this._paste(e,s.text||"",s.pasteOnNewLine||!1,s.multicursorText||null,s.mode||null);return}case"cut":this._cut(e);return}const n=this.getAction(t);if(n){Promise.resolve(n.run(i)).then(void 0,nt);return}this._modelData&&(this._triggerEditorCommand(e,t,i)||this._triggerCommand(t,i))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){!this._modelData||t.length===0||(e==="keyboard"&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),e==="keyboard"&&this._onDidType.fire(t))}_compositionType(e,t,i,n,s){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,s,e)}_paste(e,t,i,n,s){if(!this._modelData||t.length===0)return;const r=this._modelData.viewModel,a=r.getSelection().getStartPosition();r.paste(t,i,n,e);const l=r.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({range:new k(a.lineNumber,a.column,l.lineNumber,l.column),languageId:s})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=Jf.getEditorCommand(t);return n?(i=i||{},i.source=e,this._instantiationService.invokeFunction(s=>{Promise.resolve(n.runEditorCommand(s,this,i)).then(void 0,nt)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(90)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(90)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,i){if(!this._modelData||this._configuration.options.get(90))return!1;let n;return i?Array.isArray(i)?n=()=>i:n=i:n=()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new Fae(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,tw(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,tw(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?e.length===0&&t.length===0?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){!this._modelData||e.length===0||this._modelData.model.changeDecorations(t=>{t.deltaDecorations(e,[])})}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(143)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,t=!1){this._configuration.observeContainer(e),t||this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(i)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(i)}}addGlyphMarginWidget(e){const t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const i=this._glyphMarginWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(i)}}removeGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const i=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(i)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,t)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),i=this._configuration.options,n=i.get(143),s=uh._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),r=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft();return{top:s,left:r,height:i.get(66)}}getOffsetForColumn(e,t){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,t)}render(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,e)}setAriaOptions(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(e)}applyFontInfo(e){Jn(e,this._configuration.options.get(50))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());const i=e.onBeforeAttached(),n=new bae(this._id,this._configuration,e,yA.create(Je(this._domElement)),SA.create(this._configuration.options),a=>po(Je(this._domElement),a),this.languageConfigurationService,this._themeService,i);t.push(e.onWillDispose(()=>this.setModel(null))),t.push(n.onEvent(a=>{switch(a.kind){case 0:this._onDidContentSizeChange.fire(a);break;case 1:this._editorTextFocus.setValue(a.hasFocus);break;case 2:this._onDidScrollChange.fire(a);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(a.reachedMaxCursorCount){const u=this.getOption(79),h=p("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",u);this._notificationService.prompt(Zy.Warning,h,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:p("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const l=[];for(let u=0,h=a.selections.length;u{this._paste("keyboard",s,r,a,l)},type:s=>{this._type("keyboard",s)},compositionType:(s,r,a,l)=>{this._compositionType("keyboard",s,r,a,l)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:t={paste:(s,r,a,l)=>{const d={text:s,pasteOnNewLine:r,multicursorText:a,mode:l};this._commandService.executeCommand("paste",d)},type:s=>{const r={text:s};this._commandService.executeCommand("type",r)},compositionType:(s,r,a,l)=>{if(a||l){const d={text:s,replacePrevCharCnt:r,replaceNextCharCnt:a,positionDelta:l};this._commandService.executeCommand("compositionType",d)}else{const d={text:s,replaceCharCnt:r};this._commandService.executeCommand("replacePreviousChar",d)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new Uy(e.coordinatesConverter);return i.onKeyDown=s=>this._onKeyDown.fire(s),i.onKeyUp=s=>this._onKeyUp.fire(s),i.onContextMenu=s=>this._onContextMenu.fire(s),i.onMouseMove=s=>this._onMouseMove.fire(s),i.onMouseLeave=s=>this._onMouseLeave.fire(s),i.onMouseDown=s=>this._onMouseDown.fire(s),i.onMouseUp=s=>this._onMouseUp.fire(s),i.onMouseDrag=s=>this._onMouseDrag.fire(s),i.onMouseDrop=s=>this._onMouseDrop.fire(s),i.onMouseDropCanceled=s=>this._onMouseDropCanceled.fire(s),i.onMouseWheel=s=>this._onMouseWheel.fire(s),[new gE(t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){e==null||e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}showDropIndicatorAt(e){const t=[{range:new k(e.lineNumber,e.column,e.lineNumber,e.column),options:uh.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,t){this._contextKeyService.createKey(e,t)}};Vp.dropIntoEditorDecorationOptions=st.register({description:"workbench-dnd-target",className:"dnd-target"});Vp=uh=Tae([ed(3,qe),ed(4,Ot),ed(5,Ri),ed(6,Xe),ed(7,Sn),ed(8,sn),ed(9,Zl),ed(10,si),ed(11,Me)],Vp);class fF extends q{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new W(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new W(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}class fs extends W{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class Rae extends q{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=T.editorSimpleInput.bindTo(t),this._editorFocus=T.focus.bindTo(t),this._textInputFocus=T.textInputFocus.bindTo(t),this._editorTextFocus=T.editorTextFocus.bindTo(t),this._tabMovesFocus=T.tabMovesFocus.bindTo(t),this._editorReadonly=T.readOnly.bindTo(t),this._inDiffEditor=T.inDiffEditor.bindTo(t),this._editorColumnSelection=T.columnSelection.bindTo(t),this._hasMultipleSelections=T.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=T.hasNonEmptySelection.bindTo(t),this._canUndo=T.canUndo.bindTo(t),this._canRedo=T.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(Mp.onDidChangeTabFocus(i=>this._tabMovesFocus.set(i))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._tabMovesFocus.set(Mp.getTabFocusMode()),this._editorReadonly.set(e.get(90)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(t=>!t.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(!!(e&&e.canUndo())),this._canRedo.set(!!(e&&e.canRedo()))}}class Pae extends q{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=T.languageId.bindTo(t),this._hasCompletionItemProvider=T.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=T.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=T.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=T.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=T.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=T.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=T.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=T.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=T.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=T.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=T.hasReferenceProvider.bindTo(t),this._hasRenameProvider=T.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=T.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=T.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=T.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=T.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=T.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=T.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=T.isInWalkThroughSnippet.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()})}_update(){const e=this._editor.getModel();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===ot.walkThroughSnippet)})}}class Oae extends q{constructor(e){super(),this._onChange=this._register(new W),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(Pl(e)),this._register(this._domFocusTracker.onDidFocus(()=>{this._hasFocus=!0,this._onChange.fire(void 0)})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasFocus=!1,this._onChange.fire(void 0)}))}hasFocus(){return this._hasFocus}}class Fae{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,i){return this._editor.onDidChangeModelDecorations(n=>{this._isChangingDecorations||e.call(t,n)},i)}getRange(e){return!this._editor.hasModel()||e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e])}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),t=[];for(const i of this._decorationIds){const n=e.getDecorationRange(i);n&&t.push(n)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations(t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)})}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let t=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations(i=>{t=i.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(t)})}finally{this._isChangingDecorations=!1}return t}}const Bae=encodeURIComponent("");function xx(o){return Bae+encodeURIComponent(o.toString())+Wae}const Vae=encodeURIComponent('');function zae(o){return Vae+encodeURIComponent(o.toString())+Hae}Zr((o,e)=>{const t=o.getColor(vl);t&&e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${xx(t)}") repeat-x bottom left; }`);const i=o.getColor(zo);i&&e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${xx(i)}") repeat-x bottom left; }`);const n=o.getColor(Ks);n&&e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${xx(n)}") repeat-x bottom left; }`);const s=o.getColor(pte);s&&e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${zae(s)}") no-repeat bottom left; }`);const r=o.getColor(kne);r&&e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${r.rgba.a}; }`)});var $ae=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Uae=function(o,e){return function(t,i){e(t,i,o)}};let NE=class extends q{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new W),this._onCodeEditorAdd=this._register(new W),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new W),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new W),this._onDiffEditorAdd=this._register(new W),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new W),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new Ns,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(i=>i.removeDecorationsByType(e))))}setModelProperty(e,t,i){const n=e.toString();let s;this._modelProperties.has(n)?s=this._modelProperties.get(n):(s=new Map,this._modelProperties.set(n,s)),s.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i))return this._modelProperties.get(i).get(t)}async openCodeEditor(e,t,i){for(const n of this._codeEditorOpenHandlers){const s=await n(e,t,i);if(s!==null)return s}return null}registerCodeEditorOpenHandler(e){const t=this._codeEditorOpenHandlers.unshift(e);return je(t)}};NE=$ae([Uae(0,Sn)],NE);var jae=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},pF=function(o,e){return function(t,i){e(t,i,o)}};let zw=class extends NE{constructor(e,t){super(t),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler(async(i,n,s)=>n?this.doOpenEditor(n,i):null))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const s=t.resource.scheme;if(s===ot.http||s===ot.https)return X7(t.resource.toString()),e}return null}const n=t.options?t.options.selection:null;if(n)if(typeof n.endLineNumber=="number"&&typeof n.endColumn=="number")e.setSelection(n),e.revealRangeInCenter(n,1);else{const s={lineNumber:n.startLineNumber,column:n.startColumn};e.setPosition(s),e.revealPositionInCenter(s,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};zw=jae([pF(0,Xe),pF(1,Sn)],zw);xt(Ot,zw,0);const wm=bt("layoutService");var HB=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zB=function(o,e){return function(t,i){e(t,i,o)}};let $w=class{get mainContainer(){var e,t;return(t=(e=G2(this._codeEditorService.listCodeEditors()))===null||e===void 0?void 0:e.getContainerDomNode())!==null&&t!==void 0?t:Ai.document.body}get activeContainer(){var e,t;const i=(e=this._codeEditorService.getFocusedCodeEditor())!==null&&e!==void 0?e:this._codeEditorService.getActiveCodeEditor();return(t=i==null?void 0:i.getContainerDomNode())!==null&&t!==void 0?t:this.mainContainer}get mainContainerDimension(){return ng(this.mainContainer)}get activeContainerDimension(){return ng(this.activeContainer)}get containers(){return Ia(this._codeEditorService.listCodeEditors().map(e=>e.getContainerDomNode()))}getContainer(){return this.activeContainer}focus(){var e;(e=this._codeEditorService.getFocusedCodeEditor())===null||e===void 0||e.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=ye.None,this.onDidLayoutActiveContainer=ye.None,this.onDidLayoutContainer=ye.None,this.onDidChangeActiveContainer=ye.None,this.onDidAddContainer=ye.None,this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};$w=HB([zB(0,Ot)],$w);let TE=class extends $w{get mainContainer(){return this._container}constructor(e,t){super(t),this._container=e}};TE=HB([zB(1,Ot)],TE);xt(wm,$w,1);const g0=bt("dialogService");var Kae=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},mF=function(o,e){return function(t,i){e(t,i,o)}};function vC(o){return o.scheme===ot.file?o.fsPath:o.path}let $B=0;class bC{constructor(e,t,i,n,s,r,a){this.id=++$B,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=s,this.sourceId=r,this.sourceOrder=a,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class _F{constructor(e,t){this.resourceLabel=e,this.reason=t}}class vF{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,n]of this.elements)(n.reason===0?e:t).push(n.resourceLabel);const i=[];return e.length>0&&i.push(p({},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(p({},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join(` -`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class qae{constructor(e,t,i,n,s,r,a){this.id=++$B,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=s,this.sourceId=r,this.sourceOrder=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,i){this.removedResources||(this.removedResources=new vF),this.removedResources.has(t)||this.removedResources.set(t,new _F(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new vF),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new _F(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class UB{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(` +`&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){this._modelData&&this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){const t=e;if(this._modelData===null&&t===null||this._modelData&&this._modelData.model===t)return;const i=this.hasTextFocus(),n=this._detachModel();this._attachModel(t),i&&this.hasModel()&&this.focus();const s={oldModelUrl:n?n.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(s),this._postDetachModelCleanup(n),this._contributions.onAfterModelAttached()}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){const s=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(r.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?uh._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?uh._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const s=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(r.lineNumber,n)}getBottomForLineNumber(e,t=!1){return this._modelData?uh._getVerticalOffsetAfterPosition(this._modelData,e,1,t):-1}setHiddenAreas(e,t){var i;(i=this._modelData)===null||i===void 0||i.viewModel.setHiddenAreas(e.map(n=>k.lift(n)),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return mn.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!z.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!k.isIRange(e))throw new Error("Invalid arguments");const s=this._modelData.model.validateRange(e),r=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(s);this._modelData.viewModel.revealRange("api",i,r,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new k(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!z.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new k(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=Ae.isISelection(e),n=k.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const s={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(s,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new Ae(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new k(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!k.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(k.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let n=0,s=e.length;n0&&this._modelData.viewModel.restoreCursorState(i):this._modelData.viewModel.restoreCursorState([i]),this._contributions.restoreViewState(t.contributionsState||{});const n=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(n)}}handleInitialized(){var e;(e=this._getViewModel())===null||e===void 0||e.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter(t=>t.isSupported()),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{const s=i;this._type(e,s.text||"");return}case"replacePreviousChar":{const s=i;this._compositionType(e,s.text||"",s.replaceCharCnt||0,0,0);return}case"compositionType":{const s=i;this._compositionType(e,s.text||"",s.replacePrevCharCnt||0,s.replaceNextCharCnt||0,s.positionDelta||0);return}case"paste":{const s=i;this._paste(e,s.text||"",s.pasteOnNewLine||!1,s.multicursorText||null,s.mode||null);return}case"cut":this._cut(e);return}const n=this.getAction(t);if(n){Promise.resolve(n.run(i)).then(void 0,nt);return}this._modelData&&(this._triggerEditorCommand(e,t,i)||this._triggerCommand(t,i))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){!this._modelData||t.length===0||(e==="keyboard"&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),e==="keyboard"&&this._onDidType.fire(t))}_compositionType(e,t,i,n,s){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,s,e)}_paste(e,t,i,n,s){if(!this._modelData||t.length===0)return;const r=this._modelData.viewModel,a=r.getSelection().getStartPosition();r.paste(t,i,n,e);const l=r.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({range:new k(a.lineNumber,a.column,l.lineNumber,l.column),languageId:s})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=Jf.getEditorCommand(t);return n?(i=i||{},i.source=e,this._instantiationService.invokeFunction(s=>{Promise.resolve(n.runEditorCommand(s,this,i)).then(void 0,nt)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(90)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(90)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,i){if(!this._modelData||this._configuration.options.get(90))return!1;let n;return i?Array.isArray(i)?n=()=>i:n=i:n=()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new Hae(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,tw(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,tw(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?e.length===0&&t.length===0?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){!this._modelData||e.length===0||this._modelData.model.changeDecorations(t=>{t.deltaDecorations(e,[])})}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(143)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,t=!1){this._configuration.observeContainer(e),t||this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(i)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(i)}}addGlyphMarginWidget(e){const t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const i=this._glyphMarginWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(i)}}removeGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const i=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(i)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,t)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),i=this._configuration.options,n=i.get(143),s=uh._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),r=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft();return{top:s,left:r,height:i.get(66)}}getOffsetForColumn(e,t){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,t)}render(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,e)}setAriaOptions(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(e)}applyFontInfo(e){Jn(e,this._configuration.options.get(50))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());const i=e.onBeforeAttached(),n=new yae(this._id,this._configuration,e,yA.create(Je(this._domElement)),SA.create(this._configuration.options),a=>po(Je(this._domElement),a),this.languageConfigurationService,this._themeService,i);t.push(e.onWillDispose(()=>this.setModel(null))),t.push(n.onEvent(a=>{switch(a.kind){case 0:this._onDidContentSizeChange.fire(a);break;case 1:this._editorTextFocus.setValue(a.hasFocus);break;case 2:this._onDidScrollChange.fire(a);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(a.reachedMaxCursorCount){const u=this.getOption(79),h=p("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",u);this._notificationService.prompt(Zy.Warning,h,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:p("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const l=[];for(let u=0,h=a.selections.length;u{this._paste("keyboard",s,r,a,l)},type:s=>{this._type("keyboard",s)},compositionType:(s,r,a,l)=>{this._compositionType("keyboard",s,r,a,l)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:t={paste:(s,r,a,l)=>{const d={text:s,pasteOnNewLine:r,multicursorText:a,mode:l};this._commandService.executeCommand("paste",d)},type:s=>{const r={text:s};this._commandService.executeCommand("type",r)},compositionType:(s,r,a,l)=>{if(a||l){const d={text:s,replacePrevCharCnt:r,replaceNextCharCnt:a,positionDelta:l};this._commandService.executeCommand("compositionType",d)}else{const d={text:s,replaceCharCnt:r};this._commandService.executeCommand("replacePreviousChar",d)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new Uy(e.coordinatesConverter);return i.onKeyDown=s=>this._onKeyDown.fire(s),i.onKeyUp=s=>this._onKeyUp.fire(s),i.onContextMenu=s=>this._onContextMenu.fire(s),i.onMouseMove=s=>this._onMouseMove.fire(s),i.onMouseLeave=s=>this._onMouseLeave.fire(s),i.onMouseDown=s=>this._onMouseDown.fire(s),i.onMouseUp=s=>this._onMouseUp.fire(s),i.onMouseDrag=s=>this._onMouseDrag.fire(s),i.onMouseDrop=s=>this._onMouseDrop.fire(s),i.onMouseDropCanceled=s=>this._onMouseDropCanceled.fire(s),i.onMouseWheel=s=>this._onMouseWheel.fire(s),[new gE(t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){e==null||e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}showDropIndicatorAt(e){const t=[{range:new k(e.lineNumber,e.column,e.lineNumber,e.column),options:uh.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,t){this._contextKeyService.createKey(e,t)}};Vp.dropIntoEditorDecorationOptions=st.register({description:"workbench-dnd-target",className:"dnd-target"});Vp=uh=Pae([ed(3,qe),ed(4,Ot),ed(5,Ri),ed(6,Xe),ed(7,Sn),ed(8,sn),ed(9,Zl),ed(10,si),ed(11,Me)],Vp);class fF extends q{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new W(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new W(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}class fs extends W{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class Bae extends q{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=T.editorSimpleInput.bindTo(t),this._editorFocus=T.focus.bindTo(t),this._textInputFocus=T.textInputFocus.bindTo(t),this._editorTextFocus=T.editorTextFocus.bindTo(t),this._tabMovesFocus=T.tabMovesFocus.bindTo(t),this._editorReadonly=T.readOnly.bindTo(t),this._inDiffEditor=T.inDiffEditor.bindTo(t),this._editorColumnSelection=T.columnSelection.bindTo(t),this._hasMultipleSelections=T.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=T.hasNonEmptySelection.bindTo(t),this._canUndo=T.canUndo.bindTo(t),this._canRedo=T.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(Mp.onDidChangeTabFocus(i=>this._tabMovesFocus.set(i))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._tabMovesFocus.set(Mp.getTabFocusMode()),this._editorReadonly.set(e.get(90)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(t=>!t.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(!!(e&&e.canUndo())),this._canRedo.set(!!(e&&e.canRedo()))}}class Wae extends q{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=T.languageId.bindTo(t),this._hasCompletionItemProvider=T.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=T.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=T.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=T.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=T.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=T.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=T.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=T.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=T.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=T.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=T.hasReferenceProvider.bindTo(t),this._hasRenameProvider=T.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=T.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=T.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=T.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=T.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=T.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=T.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=T.isInWalkThroughSnippet.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()})}_update(){const e=this._editor.getModel();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===ot.walkThroughSnippet)})}}class Vae extends q{constructor(e){super(),this._onChange=this._register(new W),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(Pl(e)),this._register(this._domFocusTracker.onDidFocus(()=>{this._hasFocus=!0,this._onChange.fire(void 0)})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasFocus=!1,this._onChange.fire(void 0)}))}hasFocus(){return this._hasFocus}}class Hae{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,i){return this._editor.onDidChangeModelDecorations(n=>{this._isChangingDecorations||e.call(t,n)},i)}getRange(e){return!this._editor.hasModel()||e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e])}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),t=[];for(const i of this._decorationIds){const n=e.getDecorationRange(i);n&&t.push(n)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations(t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)})}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let t=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations(i=>{t=i.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(t)})}finally{this._isChangingDecorations=!1}return t}}const zae=encodeURIComponent("");function xx(o){return zae+encodeURIComponent(o.toString())+$ae}const Uae=encodeURIComponent('');function Kae(o){return Uae+encodeURIComponent(o.toString())+jae}Zr((o,e)=>{const t=o.getColor(vl);t&&e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${xx(t)}") repeat-x bottom left; }`);const i=o.getColor(zo);i&&e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${xx(i)}") repeat-x bottom left; }`);const n=o.getColor(Ks);n&&e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${xx(n)}") repeat-x bottom left; }`);const s=o.getColor(bte);s&&e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${Kae(s)}") no-repeat bottom left; }`);const r=o.getColor(Tne);r&&e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${r.rgba.a}; }`)});var qae=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Gae=function(o,e){return function(t,i){e(t,i,o)}};let NE=class extends q{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new W),this._onCodeEditorAdd=this._register(new W),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new W),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new W),this._onDiffEditorAdd=this._register(new W),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new W),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new Ns,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(i=>i.removeDecorationsByType(e))))}setModelProperty(e,t,i){const n=e.toString();let s;this._modelProperties.has(n)?s=this._modelProperties.get(n):(s=new Map,this._modelProperties.set(n,s)),s.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i))return this._modelProperties.get(i).get(t)}async openCodeEditor(e,t,i){for(const n of this._codeEditorOpenHandlers){const s=await n(e,t,i);if(s!==null)return s}return null}registerCodeEditorOpenHandler(e){const t=this._codeEditorOpenHandlers.unshift(e);return je(t)}};NE=qae([Gae(0,Sn)],NE);var Zae=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},pF=function(o,e){return function(t,i){e(t,i,o)}};let zw=class extends NE{constructor(e,t){super(t),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler(async(i,n,s)=>n?this.doOpenEditor(n,i):null))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const s=t.resource.scheme;if(s===ot.http||s===ot.https)return X8(t.resource.toString()),e}return null}const n=t.options?t.options.selection:null;if(n)if(typeof n.endLineNumber=="number"&&typeof n.endColumn=="number")e.setSelection(n),e.revealRangeInCenter(n,1);else{const s={lineNumber:n.startLineNumber,column:n.startColumn};e.setPosition(s),e.revealPositionInCenter(s,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};zw=Zae([pF(0,Xe),pF(1,Sn)],zw);xt(Ot,zw,0);const wm=bt("layoutService");var HB=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zB=function(o,e){return function(t,i){e(t,i,o)}};let $w=class{get mainContainer(){var e,t;return(t=(e=G2(this._codeEditorService.listCodeEditors()))===null||e===void 0?void 0:e.getContainerDomNode())!==null&&t!==void 0?t:Ai.document.body}get activeContainer(){var e,t;const i=(e=this._codeEditorService.getFocusedCodeEditor())!==null&&e!==void 0?e:this._codeEditorService.getActiveCodeEditor();return(t=i==null?void 0:i.getContainerDomNode())!==null&&t!==void 0?t:this.mainContainer}get mainContainerDimension(){return ng(this.mainContainer)}get activeContainerDimension(){return ng(this.activeContainer)}get containers(){return Ia(this._codeEditorService.listCodeEditors().map(e=>e.getContainerDomNode()))}getContainer(){return this.activeContainer}focus(){var e;(e=this._codeEditorService.getFocusedCodeEditor())===null||e===void 0||e.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=ye.None,this.onDidLayoutActiveContainer=ye.None,this.onDidLayoutContainer=ye.None,this.onDidChangeActiveContainer=ye.None,this.onDidAddContainer=ye.None,this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};$w=HB([zB(0,Ot)],$w);let TE=class extends $w{get mainContainer(){return this._container}constructor(e,t){super(t),this._container=e}};TE=HB([zB(1,Ot)],TE);xt(wm,$w,1);const g0=bt("dialogService");var Yae=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},mF=function(o,e){return function(t,i){e(t,i,o)}};function vC(o){return o.scheme===ot.file?o.fsPath:o.path}let $B=0;class bC{constructor(e,t,i,n,s,r,a){this.id=++$B,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=s,this.sourceId=r,this.sourceOrder=a,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class _F{constructor(e,t){this.resourceLabel=e,this.reason=t}}class vF{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,n]of this.elements)(n.reason===0?e:t).push(n.resourceLabel);const i=[];return e.length>0&&i.push(p({},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(p({},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join(` +`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class Xae{constructor(e,t,i,n,s,r,a){this.id=++$B,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=s,this.sourceId=r,this.sourceOrder=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,i){this.removedResources||(this.removedResources=new vF),this.removedResources.has(t)||this.removedResources.set(t,new _F(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new vF),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new _F(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class UB{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(` `)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const t of this._future)t.type===1&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let i=0,n=this._past.length;i=0;i--)t.push(this._future[i].id);return new PB(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,s=-1;for(let a=0,l=this._past.length;a=t||d.id!==e.elements[n])&&(i=!1,s=0),!i&&d.type===1&&d.removeResource(this.resourceLabel,this.strResource,0)}let r=-1;for(let a=this._future.length-1;a>=0;a--,n++){const l=this._future[a];i&&(n>=t||l.id!==e.elements[n])&&(i=!1,r=a),!i&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}s!==-1&&(this._past=this._past.slice(0,s)),r!==-1&&(this._future=this._future.slice(r+1)),this.versionId++}getElements(){const e=[],t=[];for(const i of this._past)e.push(i.actual);for(const i of this._future)t.push(i.actual);return{past:e,future:t}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class kx{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,i=this.editStacks.length;tt.sourceOrder)&&(t=r,i=n)}return[t,i]}canUndo(e){if(e instanceof ll){const[,i]=this._findClosestUndoElementWithSource(e.id);return!!i}const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){nt(e);for(const i of t.strResources)this.removeElements(i);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,s){const r=this._acquireLocks(i);let a;try{a=t()}catch(l){return r(),n.dispose(),this._onError(l,e)}return a?a.then(()=>(r(),n.dispose(),s()),l=>(r(),n.dispose(),this._onError(l,e))):(r(),n.dispose(),s())}async _invokeWorkspacePrepare(e){if(typeof e.actual.prepareUndoRedo>"u")return q.None;const t=e.actual.prepareUndoRedo();return typeof t>"u"?q.None:t}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return t(q.None);const i=e.actual.prepareUndoRedo();return i?iM(i)?t(i):i.then(n=>t(n)):t(q.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||jB);return new kx(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new CC(this._undo(e,0,!0));for(const s of t.strResources)this.removeElements(s);return this._notificationService.warn(n),new CC}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,p({},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,p({},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const a of i.editStacks)a.getClosestPastElement()!==t&&s.push(a.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(e,t,null,p({},"Could not undo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const r=[];for(const a of i.editStacks)a.locked&&r.push(a.resourceLabel);return r.length>0?this._tryToSplitAndUndo(e,t,null,p({},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,p({},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),s=this._checkWorkspaceUndo(e,t,n,!1);return s?s.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const n=t.getSecondClosestPastElement();if(n&&n.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,t,i,n){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let a;(function(c){c[c.All=0]="All",c[c.This=1]="This",c[c.Cancel=2]="Cancel"})(a||(a={}));const{result:l}=await this._dialogService.prompt({type:ji.Info,message:p("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),buttons:[{label:p({},"&&Undo in {0} Files",i.editStacks.length),run:()=>a.All},{label:p({},"Undo this &&File"),run:()=>a.This}],cancelButton:{run:()=>a.Cancel}});if(l===a.Cancel)return;if(l===a.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const d=this._checkWorkspaceUndo(e,t,i,!1);if(d)return d.returnValue;n=!0}let s;try{s=await this._invokeWorkspacePrepare(t)}catch(a){return this._onError(a,t)}const r=this._checkWorkspaceUndo(e,t,i,!0);if(r)return s.dispose(),r.returnValue;for(const a of i.editStacks)a.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),i,s,()=>this._continueUndoInGroup(t.groupId,n))}_resourceUndo(e,t,i){if(!t.isValid){e.flushAllElements();return}if(e.locked){const n=p({},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(t,n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new kx([e]),n,()=>this._continueUndoInGroup(t.groupId,i))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestPastElement();r&&r.groupId===e&&(!t||r.groupOrder>t.groupOrder)&&(t=r,i=n)}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);if(i)return this._undo(i,0,t)}undo(e){if(e instanceof ll){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return typeof e=="string"?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),s=n.getClosestPastElement();if(!s)return;if(s.groupId){const[a,l]=this._findClosestUndoElementInGroup(s.groupId);if(s!==a&&l)return this._undo(l,t,i)}if((s.sourceId!==t||s.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,s);try{return s.type===1?this._workspaceUndo(e,s,i):this._resourceUndo(n,s,i)}finally{}}async _confirmAndContinueUndo(e,t,i){if((await this._dialogService.confirm({message:p("confirmDifferentSource","Would you like to undo '{0}'?",i.label),primaryButton:p({},"&&Yes"),cancelButton:p("confirmDifferentSource.no","No")})).confirmed)return this._undo(e,t,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestFutureElement();r&&r.sourceId===e&&(!t||r.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,p({},"Could not redo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const r=[];for(const a of i.editStacks)a.locked&&r.push(a.resourceLabel);return r.length>0?this._tryToSplitAndRedo(e,t,null,p({},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,p({},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}async _executeWorkspaceRedo(e,t,i){let n;try{n=await this._invokeWorkspacePrepare(t)}catch(r){return this._onError(r,t)}const s=this._checkWorkspaceRedo(e,t,i,!0);if(s)return n.dispose(),s.returnValue;for(const r of i.editStacks)r.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),i,n,()=>this._continueRedoInGroup(t.groupId))}_resourceRedo(e,t){if(!t.isValid){e.flushAllElements();return}if(e.locked){const i=p({},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(i);return}return this._invokeResourcePrepare(t,i=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new kx([e]),i,()=>this._continueRedoInGroup(t.groupId))))}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestFutureElement();r&&r.groupId===e&&(!t||r.groupOrder=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bF=function(o,e){return function(t,i){e(t,i,o)}};const wr=bt("ILanguageFeatureDebounceService");var Uw;(function(o){const e=new WeakMap;let t=0;function i(n){let s=e.get(n);return s===void 0&&(s=++t,e.set(n,s)),s}o.of=i})(Uw||(Uw={}));class Yae{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class Xae{constructor(e,t,i,n,s,r){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=s,this._max=r,this._cache=new Pu(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((t,i)=>Sy(Uw.of(i),t),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?io(i.value,this._min,this._max):this.default()}update(e,t){const i=this._key(e);let n=this._cache.get(i);n||(n=new Gae(6),this._cache.set(i,n));const s=io(n.update(t),this._min,this._max);return yM(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${s}ms`),s}_overall(){const e=new KB;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=this._overall()|0||this._default;return io(e,this._min,this._max)}}let AE=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,i){var n,s,r;const a=(n=i==null?void 0:i.min)!==null&&n!==void 0?n:50,l=(s=i==null?void 0:i.max)!==null&&s!==void 0?s:a**2,d=(r=i==null?void 0:i.key)!==null&&r!==void 0?r:void 0,c=`${Uw.of(e)},${a}${d?","+d:""}`;let u=this._data.get(c);return u||(this._isDev?u=new Xae(this._logService,t,e,this._overallAverage()|0||a*1.5,a,l):(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),u=new Yae(a*1.5)),this._data.set(c,u)),u}_overallAverage(){const e=new KB;for(const t of this._data.values())e.update(t.default());return e.value}};AE=Zae([bF(0,bo),bF(1,LA)],AE);xt(wr,AE,1);class ev{static create(e,t){return new ev(e,new jw(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e&&new k(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn)}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[n,s,r]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new ev(this._startLineNumber,n),new ev(this._startLineNumber+r,s)]}applyEdit(e,t){const[i,n,s]=fu(t);this.acceptEdit(e,i,n,s,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,s){this._acceptDeleteRange(e),this._acceptInsertText(new z(e.startLineNumber,e.startColumn),t,i,n,s),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){const s=i-t;this._startLineNumber-=s;return}const n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1){this._startLineNumber=0,this._tokens.clear();return}if(t<0){const s=-t;this._startLineNumber-=s,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,s){if(t===0&&i===0)return;const r=e.lineNumber-this._startLineNumber;if(r<0){this._startLineNumber+=t;return}const a=this._tokens.getMaxDeltaLine();r>=a+1||this._tokens.acceptInsertText(r,e.column-1,t,i,n,s)}}class jw{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;ie)i=n-1;else{let r=n;for(;r>t&&this._getDeltaLine(r-1)===e;)r--;let a=n;for(;ae||h===e&&f>=t)&&(he||f===e&&v>=t){if(fs?m-=s-i:m=i;else if(g===t&&f===i)if(g===n&&m>s)m-=s-i;else{c=!0;continue}else if(gs)g=t,f=i,m=f+(m-s);else{c=!0;continue}else if(g>n){if(l===0&&!c){d=a;break}g-=l}else if(g===n&&f>=s)e&&g===0&&(f+=e,m+=e),g-=l,f-=s-i,m-=s-i;else throw new Error("Not possible!");const _=4*d;r[_]=g,r[_+1]=f,r[_+2]=m,r[_+3]=v,d++}this._tokenCount=d}acceptInsertText(e,t,i,n,s,r){const a=i===0&&n===1&&(r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122),l=this._tokens,d=this._tokenCount;for(let c=0;c=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ix=function(o,e){return function(t,i){e(t,i,o)}};let RE=class{constructor(e,t,i,n){this._legend=e,this._themeService=t,this._languageService=i,this._logService=n,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new md}getMetadata(e,t,i){const n=this._languageService.languageIdCodec.encodeLanguageId(i),s=this._hashTable.get(e,t,n);let r;if(s)r=s.metadata,this._logService.getLevel()===Zn.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${Yn.getForeground(r)}, fontStyle ${Yn.getFontStyle(r).toString(2)}`);else{let a=this._legend.tokenTypes[e];const l=[];if(a){let d=t;for(let u=0;d>0&&u>1;d>0&&this._logService.getLevel()===Zn.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const c=this._themeService.getColorTheme().getTokenStyleMetadata(a,l,i);if(typeof c>"u")r=2147483647;else{if(r=0,typeof c.italic<"u"){const u=(c.italic?1:0)<<11;r|=u|1}if(typeof c.bold<"u"){const u=(c.bold?2:0)<<11;r|=u|2}if(typeof c.underline<"u"){const u=(c.underline?4:0)<<11;r|=u|4}if(typeof c.strikethrough<"u"){const u=(c.strikethrough?8:0)<<11;r|=u|8}if(c.foreground){const u=c.foreground<<15;r|=u|16}r===0&&(r=2147483647)}}else this._logService.getLevel()===Zn.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),r=2147483647,a="not-in-legend";this._hashTable.add(e,t,n,r),this._logService.getLevel()===Zn.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${a}) / ${t} (${l.join(" ")}): foreground ${Yn.getForeground(r)}, fontStyle ${Yn.getFontStyle(r).toString(2)}`)}return r}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,i,n,s){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${i}: The provided start offset ${n} is outside the previous data (length ${s}).`))}};RE=Qae([Ix(1,Sn),Ix(2,bi),Ix(3,bo)],RE);function qB(o,e,t){const i=o.data,n=o.data.length/5|0,s=Math.max(Math.ceil(n/1024),400),r=[];let a=0,l=1,d=0;for(;ac&&i[5*b]===0;)b--;if(b-1===c){let C=u;for(;C+1x)e.warnOverlappingSemanticTokens(S,x+1);else{const j=e.getMetadata(E,R,t);j!==2147483647&&(f===0&&(f=S),h[g]=S-f,h[g+1]=x,h[g+2]=I,h[g+3]=j,g+=4,m=S,v=I)}l=S,d=x,a++}g!==h.length&&(h=h.subarray(0,g));const _=ev.create(f,h);r.push(_)}return r}class Jae{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class md{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=md._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const s=this._elements;this._currentLengthIndex++,this._currentLength=md._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ex=function(o,e){return function(t,i){e(t,i,o)}};let PE=class extends q{constructor(e,t,i){super(),this._themeService=e,this._logService=t,this._languageService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new RE(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};PE=ele([Ex(0,Sn),Ex(1,bo),Ex(2,bi)],PE);xt(Yy,PE,1);const wC="**",wF="/",E1="[/\\\\]",N1="[^/\\\\]",tle=/\//g;function SF(o,e){switch(o){case 0:return"";case 1:return`${N1}*?`;default:return`(?:${E1}|${N1}+${E1}${e?`|${E1}${N1}+`:""})*?`}}function yF(o,e){if(!o)return[];const t=[];let i=!1,n=!1,s="";for(const r of o){switch(r){case e:if(!i&&!n){t.push(s),s="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":n=!0;break;case"]":n=!1;break}s+=r}return s&&t.push(s),t}function GB(o){if(!o)return"";let e="";const t=yF(o,wF);if(t.every(i=>i===wC))e=".*";else{let i=!1;t.forEach((n,s)=>{if(n===wC){if(i)return;e+=SF(2,s===t.length-1)}else{let r=!1,a="",l=!1,d="";for(const c of n){if(c!=="}"&&r){a+=c;continue}if(l&&(c!=="]"||!d)){let u;c==="-"?u=c:(c==="^"||c==="!")&&!d?u="^":c===wF?u="":u=qo(c),d+=u;continue}switch(c){case"{":r=!0;continue;case"[":l=!0;continue;case"}":{const h=`(?:${yF(a,",").map(g=>GB(g)).join("|")})`;e+=h,r=!1,a="";break}case"]":{e+="["+d+"]",l=!1,d="";break}case"?":e+=N1;continue;case"*":e+=SF(1);continue;default:e+=qo(c)}}sDA(a,e)).filter(a=>a!==El),o),i=t.length;if(!i)return El;if(i===1)return t[0];const n=function(a,l){for(let d=0,c=t.length;d!!a.allBasenames);s&&(n.allBasenames=s.allBasenames);const r=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return r.length&&(n.allPaths=r),n}function kF(o,e,t){const i=La===hn.sep,n=i?o:o.replace(tle,La),s=La+n,r=hn.sep+o;let a;return t?a=function(l,d){return typeof l=="string"&&(l===n||l.endsWith(s)||!i&&(l===o||l.endsWith(r)))?e:null}:a=function(l,d){return typeof l=="string"&&(l===n||!i&&l===o)?e:null},a.allPaths=[(t?"*/":"./")+o],a}function ule(o){try{const e=new RegExp(`^${GB(o)}$`);return function(t){return e.lastIndex=0,typeof t=="string"&&e.test(t)?o:null}}catch{return El}}function hle(o,e,t){return!o||typeof e!="string"?!1:ZB(o)(e,void 0,t)}function ZB(o,e={}){if(!o)return DF;if(typeof o=="string"||gle(o)){const t=DA(o,e);if(t===El)return DF;const i=function(n,s){return!!t(n,s)};return t.allBasenames&&(i.allBasenames=t.allBasenames),t.allPaths&&(i.allPaths=t.allPaths),i}return fle(o,e)}function gle(o){const e=o;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function fle(o,e){const t=YB(Object.getOwnPropertyNames(o).map(a=>ple(a,o[a],e)).filter(a=>a!==El)),i=t.length;if(!i)return El;if(!t.some(a=>!!a.requiresSiblings)){if(i===1)return t[0];const a=function(c,u){let h;for(let g=0,f=t.length;g{for(const g of h){const f=await g;if(typeof f=="string")return f}return null})():null},l=t.find(c=>!!c.allBasenames);l&&(a.allBasenames=l.allBasenames);const d=t.reduce((c,u)=>u.allPaths?c.concat(u.allPaths):c,[]);return d.length&&(a.allPaths=d),a}const n=function(a,l,d){let c,u;for(let h=0,g=t.length;h{for(const h of u){const g=await h;if(typeof g=="string")return g}return null})():null},s=t.find(a=>!!a.allBasenames);s&&(n.allBasenames=s.allBasenames);const r=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return r.length&&(n.allPaths=r),n}function ple(o,e,t){if(e===!1)return El;const i=DA(o,t);if(i===El)return El;if(typeof e=="boolean")return i;if(e){const n=e.when;if(typeof n=="string"){const s=(r,a,l,d)=>{if(!d||!i(r,a))return null;const c=n.replace("$(basename)",()=>l),u=d(c);return OI(u)?u.then(h=>h?o:null):u?o:null};return s.requiresSiblings=!0,s}}return i}function YB(o,e){const t=o.filter(a=>!!a.basenames);if(t.length<2)return o;const i=t.reduce((a,l)=>{const d=l.basenames;return d?a.concat(d):a},[]);let n;if(e){n=[];for(let a=0,l=i.length;a{const d=l.patterns;return d?a.concat(d):a},[]);const s=function(a,l){if(typeof a!="string")return null;if(!l){let c;for(c=a.length;c>0;c--){const u=a.charCodeAt(c-1);if(u===47||u===92)break}l=a.substr(c)}const d=i.indexOf(l);return d!==-1?n[d]:null};s.basenames=i,s.patterns=n,s.allBasenames=i;const r=o.filter(a=>!a.basenames);return r.push(s),r}function xA(o,e,t,i,n,s){if(Array.isArray(o)){let r=0;for(const a of o){const l=xA(a,e,t,i,n,s);if(l===10)return l;l>r&&(r=l)}return r}else{if(typeof o=="string")return i?o==="*"?5:o===t?10:0:0;if(o){const{language:r,pattern:a,scheme:l,hasAccessToAllModels:d,notebookType:c}=o;if(!i&&!d)return 0;c&&n&&(e=n);let u=0;if(l)if(l===e.scheme)u=10;else if(l==="*")u=5;else return 0;if(r)if(r===t)u=10;else if(r==="*")u=Math.max(u,5);else return 0;if(c)if(c===s)u=10;else if(c==="*"&&s!==void 0)u=Math.max(u,5);else return 0;if(a){let h;if(typeof a=="string"?h=a:h={...a,base:s7(a.base)},h===e.fsPath||hle(h,e.fsPath))u=10;else return 0}return u}else return 0}}function XB(o){return typeof o=="string"?!1:Array.isArray(o)?o.every(XB):!!o.exclusive}class IF{constructor(e,t,i,n){this.uri=e,this.languageId=t,this.notebookUri=i,this.notebookType=n}equals(e){var t,i;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&((t=this.notebookUri)===null||t===void 0?void 0:t.toString())===((i=e.notebookUri)===null||i===void 0?void 0:i.toString())}}class Ii{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new W,this.onDidChange=this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),je(()=>{if(i){const n=this._entries.indexOf(i);n>=0&&(this._entries.splice(n,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(const i of this._entries)i._score>0&&t.push(i.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,i=>t.push(i.provider)),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,s=>{i&&n===s._score?i.push(s.provider):(n=s._score,i=[s.provider],t.push(i))}),t}_orderedForEach(e,t){this._updateScores(e);for(const i of this._entries)i._score>0&&t(i)}_updateScores(e){var t,i;const n=(t=this._notebookInfoResolver)===null||t===void 0?void 0:t.call(this,e.uri),s=n?new IF(e.uri,e.getLanguageId(),n.uri,n.type):new IF(e.uri,e.getLanguageId(),void 0,void 0);if(!(!((i=this._lastCandidate)===null||i===void 0)&&i.equals(s))){this._lastCandidate=s;for(const r of this._entries)if(r._score=xA(r.selector,s.uri,s.languageId,fJ(e),s.notebookUri,s.notebookType),XB(r.selector)&&r._score>0){for(const a of this._entries)a._score=0;r._score=1e3;break}this._entries.sort(Ii._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:D_(e.selector)&&!D_(t.selector)?1:!D_(e.selector)&&D_(t.selector)?-1:e._timet._time?-1:0}}function D_(o){return typeof o=="string"?!1:Array.isArray(o)?o.some(D_):!!o.isBuiltin}class mle{constructor(){this.referenceProvider=new Ii(this._score.bind(this)),this.renameProvider=new Ii(this._score.bind(this)),this.codeActionProvider=new Ii(this._score.bind(this)),this.definitionProvider=new Ii(this._score.bind(this)),this.typeDefinitionProvider=new Ii(this._score.bind(this)),this.declarationProvider=new Ii(this._score.bind(this)),this.implementationProvider=new Ii(this._score.bind(this)),this.documentSymbolProvider=new Ii(this._score.bind(this)),this.inlayHintsProvider=new Ii(this._score.bind(this)),this.colorProvider=new Ii(this._score.bind(this)),this.codeLensProvider=new Ii(this._score.bind(this)),this.documentFormattingEditProvider=new Ii(this._score.bind(this)),this.documentRangeFormattingEditProvider=new Ii(this._score.bind(this)),this.onTypeFormattingEditProvider=new Ii(this._score.bind(this)),this.signatureHelpProvider=new Ii(this._score.bind(this)),this.hoverProvider=new Ii(this._score.bind(this)),this.documentHighlightProvider=new Ii(this._score.bind(this)),this.multiDocumentHighlightProvider=new Ii(this._score.bind(this)),this.selectionRangeProvider=new Ii(this._score.bind(this)),this.foldingRangeProvider=new Ii(this._score.bind(this)),this.linkProvider=new Ii(this._score.bind(this)),this.inlineCompletionsProvider=new Ii(this._score.bind(this)),this.completionProvider=new Ii(this._score.bind(this)),this.linkedEditingRangeProvider=new Ii(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new Ii(this._score.bind(this)),this.documentSemanticTokensProvider=new Ii(this._score.bind(this)),this.documentOnDropEditProvider=new Ii(this._score.bind(this)),this.documentPasteEditProvider=new Ii(this._score.bind(this))}_score(e){var t;return(t=this._notebookTypeResolver)===null||t===void 0?void 0:t.call(this,e)}}xt(Me,mle,1);const f0=bt("IWorkspaceEditService");class kA{constructor(e){this.metadata=e}static convert(e){return e.edits.map(t=>{if(Od.is(t))return Od.lift(t);if(hp.is(t))return hp.lift(t);throw new Error("Unsupported edit")})}}class Od extends kA{static is(e){return e instanceof Od?!0:Es(e)&&ze.isUri(e.resource)&&Es(e.textEdit)}static lift(e){return e instanceof Od?e:new Od(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,i=void 0,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class hp extends kA{static is(e){return e instanceof hp?!0:Es(e)&&(!!e.newResource||!!e.oldResource)}static lift(e){return e instanceof hp?e:new hp(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}const ps={enableSplitViewResizing:!0,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0},Xy=Object.freeze({id:"editor",order:5,type:"object",title:p("editorConfigurationTitle","Editor"),scope:5}),Kw={...Xy,properties:{"editor.tabSize":{type:"number",default:rs.tabSize,minimum:1,markdownDescription:p("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:p("indentSize",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:rs.insertSpaces,markdownDescription:p("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:rs.detectIndentation,markdownDescription:p("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:rs.trimAutoWhitespace,description:p("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:rs.largeFileOptimizations,description:p("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[p("wordBasedSuggestions.off","Turn off Word Based Suggestions."),p("wordBasedSuggestions.currentDocument","Only suggest words from the active document."),p("wordBasedSuggestions.matchingDocuments","Suggest words from all open documents of the same language."),p("wordBasedSuggestions.allDocuments","Suggest words from all open documents.")],description:p("wordBasedSuggestions","Controls whether completions should be computed based on words in the document and from which documents they are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[p("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),p("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),p("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:p("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:p("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:p("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:p("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:p("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:p("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:p("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:p("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:p("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:p("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:p("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:p("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:ps.maxComputationTime,description:p("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:ps.maxFileSize,description:p("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:ps.renderSideBySide,description:p("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:ps.renderSideBySideInlineBreakpoint,description:p("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:ps.useInlineViewWhenSpaceIsLimited,description:p("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:ps.renderMarginRevertIcon,description:p("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:ps.ignoreTrimWhitespace,description:p("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:ps.renderIndicators,description:p("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:ps.diffCodeLens,description:p("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:ps.diffWordWrap,markdownEnumDescriptions:[p("wordWrap.off","Lines will never wrap."),p("wordWrap.on","Lines will wrap at the viewport width."),p("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:ps.diffAlgorithm,markdownEnumDescriptions:[p("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),p("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:ps.hideUnchangedRegions.enabled,markdownDescription:p("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:ps.hideUnchangedRegions.revealLineCount,markdownDescription:p("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:ps.hideUnchangedRegions.minimumLineCount,markdownDescription:p("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:ps.hideUnchangedRegions.contextLineCount,markdownDescription:p("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:ps.experimental.showMoves,markdownDescription:p("showMoves","Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:ps.experimental.showEmptyDecorations,description:p("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")}}};function _le(o){return typeof o.type<"u"||typeof o.anyOf<"u"}for(const o of Sf){const e=o.schema;if(typeof e<"u")if(_le(e))Kw.properties[`editor.${o.name}`]=e;else for(const t in e)Object.hasOwnProperty.call(e,t)&&(Kw.properties[t]=e[t])}let SC=null;function QB(){return SC===null&&(SC=Object.create(null),Object.keys(Kw.properties).forEach(o=>{SC[o]=!0})),SC}function vle(o){return QB()[`editor.${o}`]||!1}function ble(o){return QB()[`diffEditor.${o}`]||!1}const Cle=xi.as(Va.Configuration);Cle.registerConfiguration(Kw);class Li{static insert(e,t){return{range:new k(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}function Tx(o){return Object.isFrozen(o)?o:rG(o)}class os{constructor(e={},t=[],i=[],n){this._contents=e,this._keys=t,this._overrides=i,this.raw=n,this.overrideConfigurations=new Map}get rawConfiguration(){var e;if(!this._rawConfiguration)if(!((e=this.raw)===null||e===void 0)&&e.length){const t=this.raw.map(i=>{if(i instanceof os)return i;const n=new wle("");return n.parseRaw(i),n.configurationModel});this._rawConfiguration=t.reduce((i,n)=>n===i?n:i.merge(n),t[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?mO(this.contents,e):this.contents}inspect(e,t){const i=this.rawConfiguration.getValue(e),n=t?this.rawConfiguration.getOverrideValue(e,t):void 0,s=t?this.rawConfiguration.override(t).getValue(e):i;return{value:i,override:n,merged:s}}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?mO(i,e):i:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){var t,i;const n=gd(this.contents),s=gd(this.overrides),r=[...this.keys],a=!((t=this.raw)===null||t===void 0)&&t.length?[...this.raw]:[this];for(const l of e)if(a.push(...!((i=l.raw)===null||i===void 0)&&i.length?l.raw:[l]),!l.isEmpty()){this.mergeContents(n,l.contents);for(const d of l.overrides){const[c]=s.filter(u=>Bi(u.identifiers,d.identifiers));c?(this.mergeContents(c.contents,d.contents),c.keys.push(...d.keys),c.keys=iu(c.keys)):s.push(gd(d))}for(const d of l.keys)r.indexOf(d)===-1&&r.push(d)}return new os(n,r,s,a.every(l=>l instanceof os)?void 0:a)}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||typeof t!="object"||!Object.keys(t).length)return this;const i={};for(const n of iu([...Object.keys(this.contents),...Object.keys(t)])){let s=this.contents[n];const r=t[n];r&&(typeof s=="object"&&typeof r=="object"?(s=gd(s),this.mergeContents(s,r)):s=r),i[n]=s}return new os(i,this.keys,this.overrides)}mergeContents(e,t){for(const i of Object.keys(t)){if(i in e&&Es(e[i])&&Es(t[i])){this.mergeContents(e[i],t[i]);continue}e[i]=gd(t[i])}}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=s=>{s&&(i?this.mergeContents(i,s):i=gd(s))};for(const s of this.overrides)s.identifiers.length===1&&s.identifiers[0]===e?t=s.contents:s.identifiers.includes(e)&&n(s.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(e,t){this.updateValue(e,t,!0)}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){const t=this.keys.indexOf(e);t!==-1&&(this.keys.splice(t,1),RQ(this.contents,e),cu.test(e)&&this.overrides.splice(this.overrides.findIndex(i=>Bi(i.identifiers,vw(e))),1))}updateValue(e,t,i){d8(this.contents,e,t,n=>console.error(n)),i=i||this.keys.indexOf(e)===-1,i&&this.keys.push(e),cu.test(e)&&this.overrides.push({identifiers:vw(e),keys:Object.keys(this.contents[e]),contents:zI(this.contents[e],n=>console.error(n))})}}class wle{constructor(e){this._name=e,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new os}parseRaw(e,t){this._raw=e;const{contents:i,keys:n,overrides:s,restricted:r,hasExcludedProperties:a}=this.doParseRaw(e,t);this._configurationModel=new os(i,n,s,a?[e]:void 0),this._restrictedConfigurations=r||[]}doParseRaw(e,t){const i=xi.as(Va.Configuration).getConfigurationProperties(),n=this.filter(e,i,!0,t);e=n.raw;const s=zI(e,l=>console.error(`Conflict in settings file ${this._name}: ${l}`)),r=Object.keys(e),a=this.toOverrides(e,l=>console.error(`Conflict in settings file ${this._name}: ${l}`));return{contents:s,keys:r,overrides:a,restricted:n.restricted,hasExcludedProperties:n.hasExcludedProperties}}filter(e,t,i,n){var s,r,a;let l=!1;if(!(n!=null&&n.scopes)&&!(n!=null&&n.skipRestricted)&&!(!((s=n==null?void 0:n.exclude)===null||s===void 0)&&s.length))return{raw:e,restricted:[],hasExcludedProperties:l};const d={},c=[];for(const u in e)if(cu.test(u)&&i){const h=this.filter(e[u],t,!1,n);d[u]=h.raw,l=l||h.hasExcludedProperties,c.push(...h.restricted)}else{const h=t[u],g=h?typeof h.scope<"u"?h.scope:3:void 0;h!=null&&h.restricted&&c.push(u),!(!((r=n.exclude)===null||r===void 0)&&r.includes(u))&&(!((a=n.include)===null||a===void 0)&&a.includes(u)||(g===void 0||n.scopes===void 0||n.scopes.includes(g))&&!(n.skipRestricted&&(h!=null&&h.restricted)))?d[u]=e[u]:l=!0}return{raw:d,restricted:c,hasExcludedProperties:l}}toOverrides(e,t){const i=[];for(const n of Object.keys(e))if(cu.test(n)){const s={};for(const r in e[n])s[r]=e[n][r];i.push({identifiers:vw(n),keys:Object.keys(s),contents:zI(s,t)})}return i}}class Sle{constructor(e,t,i,n,s,r,a,l,d,c,u,h,g){this.key=e,this.overrides=t,this._value=i,this.overrideIdentifiers=n,this.defaultConfiguration=s,this.policyConfiguration=r,this.applicationConfiguration=a,this.userConfiguration=l,this.localUserConfiguration=d,this.remoteUserConfiguration=c,this.workspaceConfiguration=u,this.folderConfigurationModel=h,this.memoryConfigurationModel=g}inspect(e,t,i){const n=e.inspect(t,i);return{get value(){return Tx(n.value)},get override(){return Tx(n.override)},get merged(){return Tx(n.merged)}}}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}}class Qy{constructor(e,t,i,n,s=new os,r=new os,a=new Gi,l=new os,d=new Gi){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=i,this._localUserConfiguration=n,this._remoteUserConfiguration=s,this._workspaceConfiguration=r,this._folderConfigurations=a,this._memoryConfiguration=l,this._memoryConfigurationByResource=d,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new Gi,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidatedConfigurationModel(e,t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=new os,this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,t===void 0?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,i){const n=this.getConsolidatedConfigurationModel(e,t,i),s=this.getFolderConfigurationModelForResource(t.resource,i),r=t.resource?this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration:this._memoryConfiguration,a=new Set;for(const l of n.overrides)for(const d of l.identifiers)n.getOverrideValue(e,d)!==void 0&&a.add(d);return new Sle(e,t,n.getValue(e),a.size?[...a]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,i?this._workspaceConfiguration:void 0,s||void 0,r)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,i){let n=this.getConsolidatedConfigurationModelForResource(t,i);return t.overrideIdentifier&&(n=n.override(t.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(e)!==void 0&&(n=n.merge(this._policyConfiguration)),n}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const s=this._memoryConfigurationByResource.get(e);s&&(i=i.merge(s))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,t)=>{const{contents:i,overrides:n,keys:s}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:s}]),e},[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),i=this.parseConfigurationModel(e.policy),n=this.parseConfigurationModel(e.application),s=this.parseConfigurationModel(e.user),r=this.parseConfigurationModel(e.workspace),a=e.folders.reduce((l,d)=>(l.set(ze.revive(d[0]),this.parseConfigurationModel(d[1])),l),new Gi);return new Qy(t,i,n,s,new os,r,a,new os,new Gi)}static parseConfigurationModel(e){return new os(e.contents,e.keys,e.overrides)}}class yle{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._marker=` -`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=46,this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const s of e.keys)this.affectedKeys.add(s);for(const[,s]of e.overrides)for(const r of s)this.affectedKeys.add(r);this._affectsConfigStr=this._marker;for(const s of this.affectedKeys)this._affectsConfigStr+=s+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=Qy.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;const n=this._marker+e,s=this._affectsConfigStr.indexOf(n);if(s<0)return!1;const r=s+n.length;if(r>=this._affectsConfigStr.length)return!1;const a=this._affectsConfigStr.charCodeAt(r);if(a!==this._markerCode1&&a!==this._markerCode2)return!1;if(t){const l=this.previousConfiguration?this.previousConfiguration.getValue(e,t,(i=this.previous)===null||i===void 0?void 0:i.workspace):void 0,d=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!Uo(l,d)}return!0}}const qw={kind:0},Lle={kind:1};function Dle(o,e,t){return{kind:2,commandId:o,commandArgs:e,isBubble:t}}class tv{constructor(e,t,i){var n;this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const s of e){const r=s.command;r&&r.charAt(0)!=="-"&&this._defaultBoundCommands.set(r,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=tv.handleRemovals([].concat(e).concat(t));for(let s=0,r=this._keybindings.length;s"u"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let n=i.length-1;n>=0;n--){const s=i[n];if(s.command===t.command)continue;let r=!0;for(let a=1;a"u"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;const t=this._lookupMap.get(e.command);if(!(typeof t>"u")){for(let i=0,n=t.length;i"u"||i.length===0)return null;if(i.length===1)return i[0];for(let n=i.length-1;n>=0;n--){const s=i[n];if(t.contextMatchesRules(s.when))return s}return i[i.length-1]}resolve(e,t,i){const n=[...t,i];this._log(`| Resolving ${n}`);const s=this._map.get(n[0]);if(s===void 0)return this._log("\\ No keybinding entries."),qw;let r=null;if(n.length<2)r=s;else{r=[];for(let l=0,d=s.length;lc.chords.length)continue;let u=!0;for(let h=1;h=0;i--){const n=t[i];if(tv._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return t?t.evaluate(e):!0}}function EF(o){return o?`${o.serialize()}`:"no when condition"}function NF(o){return o.extensionId?o.isBuiltinExtension?`built-in extension ${o.extensionId}`:`user extension ${o.extensionId}`:o.isDefault?"built-in":"user"}const xle=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class kle extends q{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:ye.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,i,n,s){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=s,this._onDidUpdateKeybindings=this._register(new W),this._currentChords=[],this._currentChordChecker=new SM,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=Ff.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new qr,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const i=this.resolveKeyboardEvent(e);if(i.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),qw;const[n]=i.getDispatchChords();if(n===null)return this._log("\\ Keyboard event cannot be dispatched"),qw;const s=this._contextKeyService.getContext(t),r=this._currentChords.map(({keypress:a})=>a);return this._getResolver().resolve(s,r,n)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-e>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw tM("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(p("first.chord","({0}) was pressed. Waiting for second key of chord...",t));break;default:{const i=this._currentChords.map(({label:n})=>n).join(", ");this._currentChordStatusMessage=this._notificationService.status(p("next.chord","({0}) was pressed. Waiting for next key of chord...",i))}}this._scheduleLeaveChordMode(),H_.enabled&&H_.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],H_.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchChords();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=Ff.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=Ff.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[s]=i.getChords();return this._ignoreSingleModifiers=new Ff(s),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){var n;let s=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let r=null,a=null;if(i){const[u]=e.getSingleModifierDispatchChords();r=u,a=u?[u]:[]}else[r]=e.getDispatchChords(),a=this._currentChords.map(({keypress:u})=>u);if(r===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),s;const l=this._contextKeyService.getContext(t),d=e.getLabel(),c=this._getResolver().resolve(l,a,r);switch(c.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",d,"[ No matching keybinding ]"),this.inChordMode){const u=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${u}, ${d}".`),this._notificationService.status(p("missing.chord","The key combination ({0}, {1}) is not a command.",u,d),{hideAfter:10*1e3}),this._leaveChordMode(),s=!0}return s}case 1:return this._logService.trace("KeybindingService#dispatch",d,"[ Several keybindings match - more chords needed ]"),s=!0,this._expectAnotherChord(r,d),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),s;case 2:{if(this._logService.trace("KeybindingService#dispatch",d,`[ Will dispatch command ${c.commandId} ]`),c.commandId===null||c.commandId===""){if(this.inChordMode){const u=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${u}, ${d}".`),this._notificationService.status(p("missing.chord","The key combination ({0}, {1}) is not a command.",u,d),{hideAfter:10*1e3}),this._leaveChordMode(),s=!0}}else this.inChordMode&&this._leaveChordMode(),c.isBubble||(s=!0),this._log(`+ Invoking command ${c.commandId}.`),typeof c.commandArgs>"u"?this._commandService.executeCommand(c.commandId).then(void 0,u=>this._notificationService.warn(u)):this._commandService.executeCommand(c.commandId,c.commandArgs).then(void 0,u=>this._notificationService.warn(u)),xle.test(c.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:c.commandId,from:"keybinding",detail:(n=e.getUserSettingsLabel())!==null&&n!==void 0?n:void 0});return s}}}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}}class Ff{constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}Ff.EMPTY=new Ff(null);class TF{constructor(e,t,i,n,s,r,a){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?OE(e.getDispatchChords()):[],e&&this.chords.length===0&&(this.chords=OE(e.getSingleModifierDispatchChords())),this.bubble=t?t.charCodeAt(0)===94:!1,this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=s,this.extensionId=r,this.isBuiltinExtension=a}}function OE(o){const e=[];for(let t=0,i=o.length;tthis._getLabel(e))}getAriaLabel(){return Ile.toLabel(this._os,this._chords,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:Ele.toLabel(this._os,this._chords,e=>this._getElectronAccelerator(e))}getUserSettingsLabel(){return Nle.toLabel(this._os,this._chords,e=>this._getUserSettingsLabel(e))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(e=>this._getChord(e))}_getChord(e){return new OY(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map(e=>this._getChordDispatch(e))}getSingleModifierDispatchChords(){return this._chords.map(e=>this._getSingleModifierChordDispatch(e))}}class eb extends Mle{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return vd.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":vd.toString(e.keyCode)}_getElectronAccelerator(e){return vd.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const t=vd.toUserSettingsUS(e.keyCode);return t&&t.toLowerCase()}_getChordDispatch(e){return eb.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=vd.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){const t=aM[e];if(t!==-1)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof zd)return e;const t=this._scanCodeToKeyCode(e.scanCode);return t===0?null:new zd(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){const i=OE(e.chords.map(n=>this._toKeyCodeChord(n)));return i.length>0?[new eb(i,t)]:[]}}const Hp=bt("labelService"),JB=bt("progressService");class Fd{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}Fd.None=Object.freeze({report(){}});const Bu=bt("editorProgressService");class Ale{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){const i=this._value.charCodeAt(t);if(!(i===47||this._splitOnBackslash&&i===92))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new gp(new Ole(e,t))}static forStrings(){return new gp(new Ale)}static forConfigKeys(){return new gp(new Rle)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new yC,this._root.segment=i.value());const s=[];for(n=this._root;;){const a=i.cmp(n.segment);if(a>0)n.left||(n.left=new yC,n.left.segment=i.value()),s.push([-1,n]),n=n.left;else if(a<0)n.right||(n.right=new yC,n.right.segment=i.value()),s.push([1,n]),n=n.right;else if(i.hasNext())i.next(),n.mid||(n.mid=new yC,n.mid.segment=i.value()),s.push([0,n]),n=n.mid;else break}const r=n.value;n.value=t,n.key=e;for(let a=s.length-1;a>=0;a--){const l=s[a][1];l.updateHeight();const d=l.balanceFactor();if(d<-1||d>1){const c=s[a][0],u=s[a+1][0];if(c===1&&u===1)s[a][1]=l.rotateLeft();else if(c===-1&&u===-1)s[a][1]=l.rotateRight();else if(c===1&&u===-1)l.right=s[a+1][1]=s[a+1][1].rotateRight(),s[a][1]=l.rotateLeft();else if(c===-1&&u===1)l.left=s[a+1][1]=s[a+1][1].rotateLeft(),s[a][1]=l.rotateRight();else throw new Error;if(a>0)switch(s[a-1][0]){case-1:s[a-1][1].left=s[a][1];break;case 1:s[a-1][1].right=s[a][1];break;case 0:s[a-1][1].mid=s[a][1];break}else this._root=s[0][1]}}return r}get(e){var t;return(t=this._getNode(e))===null||t===void 0?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const n=t.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else break}return i}has(e){const t=this._getNode(e);return!((t==null?void 0:t.value)===void 0&&(t==null?void 0:t.mid)===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var i;const n=this._iter.reset(e),s=[];let r=this._root;for(;r;){const a=n.cmp(r.segment);if(a>0)s.push([-1,r]),r=r.left;else if(a<0)s.push([1,r]),r=r.right;else if(n.hasNext())n.next(),s.push([0,r]),r=r.mid;else break}if(r){if(t?(r.left=void 0,r.mid=void 0,r.right=void 0,r.height=1):(r.key=void 0,r.value=void 0),!r.mid&&!r.value)if(r.left&&r.right){const a=this._min(r.right);if(a.key){const{key:l,value:d,segment:c}=a;this._delete(a.key,!1),r.key=l,r.value=d,r.segment=c}}else{const a=(i=r.left)!==null&&i!==void 0?i:r.right;if(s.length>0){const[l,d]=s[s.length-1];switch(l){case-1:d.left=a;break;case 0:d.mid=a;break;case 1:d.right=a;break}}else this._root=a}for(let a=s.length-1;a>=0;a--){const l=s[a][1];l.updateHeight();const d=l.balanceFactor();if(d>1?(l.right.balanceFactor()>=0||(l.right=l.right.rotateRight()),s[a][1]=l.rotateLeft()):d<-1&&(l.left.balanceFactor()<=0||(l.left=l.left.rotateLeft()),s[a][1]=l.rotateRight()),a>0)switch(s[a-1][0]){case-1:s[a-1][1].left=s[a][1];break;case 1:s[a-1][1].right=s[a][1];break;case 0:s[a-1][1].mid=s[a][1];break}else this._root=s[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i=this._root,n;for(;i;){const s=t.cmp(i.segment);if(s>0)i=i.left;else if(s<0)i=i.right;else if(t.hasNext())t.next(),n=i.value||n,i=i.mid;else break}return i&&i.value||n}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){const i=this._iter.reset(e);let n=this._root;for(;n;){const s=i.cmp(n.segment);if(s>0)n=n.left;else if(s<0)n=n.right;else if(i.hasNext())i.next(),n=n.mid;else return n.mid?this._entries(n.mid):t?n.value:void 0}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}const ag=bt("contextService");function FE(o){const e=o;return typeof(e==null?void 0:e.id)=="string"&&ze.isUri(e.uri)}function Fle(o){const e=o;return typeof(e==null?void 0:e.id)=="string"&&!FE(o)&&!Vle(o)}const Ble={id:"empty-window"};function Wle(o,e){if(typeof o=="string"||typeof o>"u")return typeof o=="string"?{id:Vc(o)}:Ble;const t=o;return t.configuration?{id:t.id,configPath:t.configuration}:t.folders.length===1?{id:t.id,uri:t.folders[0].uri}:{id:t.id}}function Vle(o){const e=o;return typeof(e==null?void 0:e.id)=="string"&&ze.isUri(e.configPath)}class Hle{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const BE="code-workspace";p("codeWorkspace","Code Workspace");const e6="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function zle(o){return o.id===e6}var WE;(function(o){o.inspectTokensAction=p("inspectTokens","Developer: Inspect Tokens")})(WE||(WE={}));var Gw;(function(o){o.gotoLineActionLabel=p("gotoLineActionLabel","Go to Line/Column...")})(Gw||(Gw={}));var VE;(function(o){o.helpQuickAccessActionLabel=p("helpQuickAccess","Show all Quick Access Providers")})(VE||(VE={}));var Zw;(function(o){o.quickCommandActionLabel=p("quickCommandActionLabel","Command Palette"),o.quickCommandHelp=p("quickCommandActionHelp","Show And Run Commands")})(Zw||(Zw={}));var tb;(function(o){o.quickOutlineActionLabel=p("quickOutlineActionLabel","Go to Symbol..."),o.quickOutlineByCategoryActionLabel=p("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(tb||(tb={}));var Yw;(function(o){o.editorViewAccessibleLabel=p("editorViewAccessibleLabel","Editor content"),o.accessibilityHelpMessage=p("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(Yw||(Yw={}));var HE;(function(o){o.toggleHighContrast=p("toggleHighContrast","Toggle High Contrast Theme")})(HE||(HE={}));var zE;(function(o){o.bulkEditServiceSummary=p("bulkEditServiceSummary","Made {0} edits in {1} files")})(zE||(zE={}));const t6=bt("workspaceTrustManagementService"),Gd=bt("contextViewService"),Sr=bt("contextMenuService");var ns;(function(o){function e(s,r){if(s.start>=r.end||r.start>=s.end)return{start:0,end:0};const a=Math.max(s.start,r.start),l=Math.min(s.end,r.end);return l-a<=0?{start:0,end:0}:{start:a,end:l}}o.intersect=e;function t(s){return s.end-s.start<=0}o.isEmpty=t;function i(s,r){return!t(e(s,r))}o.intersects=i;function n(s,r){const a=[],l={start:s.start,end:Math.min(r.start,s.end)},d={start:Math.max(r.end,s.start),end:s.end};return t(l)||a.push(l),t(d)||a.push(d),a}o.relativeComplement=n})(ns||(ns={}));function $le(o){const e=o;return!!e&&typeof e.x=="number"&&typeof e.y=="number"}var Mc;(function(o){o[o.AVOID=0]="AVOID",o[o.ALIGN=1]="ALIGN"})(Mc||(Mc={}));function Bf(o,e,t){const i=t.mode===Mc.ALIGN?t.offset:t.offset+t.size,n=t.mode===Mc.ALIGN?t.offset+t.size:t.offset;return t.position===0?e<=o-i?i:e<=n?n-e:Math.max(o-e,0):e<=n?n-e:e<=o-i?i:0}class zp extends q{constructor(e,t){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=q.None,this.toDisposeOnSetContainer=q.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=pe(".context-view"),xs(this.view),this.setContainer(e,t),this._register(je(()=>this.setContainer(null,1)))}setContainer(e,t){var i;this.useFixedPosition=t!==1;const n=this.useShadowDOM;if(this.useShadowDOM=t===3,!(e===this.container&&n!==this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(i=this.shadowRootHostElement)===null||i===void 0||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=pe(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const r=document.createElement("style");r.textContent=Ule,this.shadowRoot.appendChild(r),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(pe("slot"))}else this.container.appendChild(this.view);const s=new de;zp.BUBBLE_UP_EVENTS.forEach(r=>{s.add(Wi(this.container,r,a=>{this.onDOMEvent(a,!1)}))}),zp.BUBBLE_DOWN_EVENTS.forEach(r=>{s.add(Wi(this.container,r,a=>{this.onDOMEvent(a,!0)},!0))}),this.toDisposeOnSetContainer=s}}show(e){var t,i;this.isVisible()&&this.hide(),$n(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",oo(this.view),this.toDisposeOnClean=e.render(this.view)||q.None,this.delegate=e,this.doLayout(),(i=(t=this.delegate).focus)===null||i===void 0||i.call(t)}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(Ea&&CM.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let t;if(e instanceof HTMLElement){const h=gn(e),g=WX(e);t={top:h.top*g,left:h.left*g,width:h.width*g,height:h.height*g}}else $le(e)?t={top:e.y,left:e.x,width:e.width||1,height:e.height||2}:t={top:e.posy,left:e.posx,width:2,height:2};const i=zs(this.view),n=kh(this.view),s=this.delegate.anchorPosition||0,r=this.delegate.anchorAlignment||0,a=this.delegate.anchorAxisAlignment||0;let l,d;const c=$X();if(a===0){const h={offset:t.top-c.pageYOffset,size:t.height,position:s===0?0:1},g={offset:t.left,size:t.width,position:r===0?0:1,mode:Mc.ALIGN};l=Bf(c.innerHeight,n,h)+c.pageYOffset,ns.intersects({start:l,end:l+n},{start:h.offset,end:h.offset+h.size})&&(g.mode=Mc.AVOID),d=Bf(c.innerWidth,i,g)}else{const h={offset:t.left,size:t.width,position:r===0?0:1},g={offset:t.top,size:t.height,position:s===0?0:1,mode:Mc.ALIGN};d=Bf(c.innerWidth,i,h),ns.intersects({start:d,end:d+i},{start:h.offset,end:h.offset+h.size})&&(g.mode=Mc.AVOID),l=Bf(c.innerHeight,n,g)+c.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(s===0?"bottom":"top"),this.view.classList.add(r===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const u=gn(this.container);this.view.style.top=`${l-(this.useFixedPosition?gn(this.view).top:u.top)}px`,this.view.style.left=`${d-(this.useFixedPosition?gn(this.view).left:u.left)}px`,this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,t!=null&&t.onHide&&t.onHide(e),this.toDisposeOnClean.dispose(),xs(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,Je(e).document.activeElement):t&&!Qn(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}zp.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"];zp.BUBBLE_DOWN_EVENTS=["click"];const Ule=` +`))}pushElement(e,t=Wp.None,i=ll.None){if(e.type===0){const n=vC(e.resource),s=this.getUriComparisonKey(e.resource);this._pushElement(new bC(e,n,s,t.id,t.nextOrder(),i.id,i.nextOrder()))}else{const n=new Set,s=[],r=[];for(const a of e.resources){const l=vC(a),d=this.getUriComparisonKey(a);n.has(d)||(n.add(d),s.push(l),r.push(d))}s.length===1?this._pushElement(new bC(e,s[0],r[0],t.id,t.nextOrder(),i.id,i.nextOrder())):this._pushElement(new Xae(e,s,r,t.id,t.nextOrder(),i.id,i.nextOrder()))}}_pushElement(e){for(let t=0,i=e.strResources.length;tt.sourceOrder)&&(t=r,i=n)}return[t,i]}canUndo(e){if(e instanceof ll){const[,i]=this._findClosestUndoElementWithSource(e.id);return!!i}const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){nt(e);for(const i of t.strResources)this.removeElements(i);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,s){const r=this._acquireLocks(i);let a;try{a=t()}catch(l){return r(),n.dispose(),this._onError(l,e)}return a?a.then(()=>(r(),n.dispose(),s()),l=>(r(),n.dispose(),this._onError(l,e))):(r(),n.dispose(),s())}async _invokeWorkspacePrepare(e){if(typeof e.actual.prepareUndoRedo>"u")return q.None;const t=e.actual.prepareUndoRedo();return typeof t>"u"?q.None:t}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return t(q.None);const i=e.actual.prepareUndoRedo();return i?iM(i)?t(i):i.then(n=>t(n)):t(q.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||jB);return new kx(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new CC(this._undo(e,0,!0));for(const s of t.strResources)this.removeElements(s);return this._notificationService.warn(n),new CC}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,p({},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,p({},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const a of i.editStacks)a.getClosestPastElement()!==t&&s.push(a.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(e,t,null,p({},"Could not undo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const r=[];for(const a of i.editStacks)a.locked&&r.push(a.resourceLabel);return r.length>0?this._tryToSplitAndUndo(e,t,null,p({},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,p({},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),s=this._checkWorkspaceUndo(e,t,n,!1);return s?s.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const n=t.getSecondClosestPastElement();if(n&&n.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,t,i,n){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let a;(function(c){c[c.All=0]="All",c[c.This=1]="This",c[c.Cancel=2]="Cancel"})(a||(a={}));const{result:l}=await this._dialogService.prompt({type:ji.Info,message:p("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),buttons:[{label:p({},"&&Undo in {0} Files",i.editStacks.length),run:()=>a.All},{label:p({},"Undo this &&File"),run:()=>a.This}],cancelButton:{run:()=>a.Cancel}});if(l===a.Cancel)return;if(l===a.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const d=this._checkWorkspaceUndo(e,t,i,!1);if(d)return d.returnValue;n=!0}let s;try{s=await this._invokeWorkspacePrepare(t)}catch(a){return this._onError(a,t)}const r=this._checkWorkspaceUndo(e,t,i,!0);if(r)return s.dispose(),r.returnValue;for(const a of i.editStacks)a.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),i,s,()=>this._continueUndoInGroup(t.groupId,n))}_resourceUndo(e,t,i){if(!t.isValid){e.flushAllElements();return}if(e.locked){const n=p({},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(t,n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new kx([e]),n,()=>this._continueUndoInGroup(t.groupId,i))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestPastElement();r&&r.groupId===e&&(!t||r.groupOrder>t.groupOrder)&&(t=r,i=n)}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);if(i)return this._undo(i,0,t)}undo(e){if(e instanceof ll){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return typeof e=="string"?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),s=n.getClosestPastElement();if(!s)return;if(s.groupId){const[a,l]=this._findClosestUndoElementInGroup(s.groupId);if(s!==a&&l)return this._undo(l,t,i)}if((s.sourceId!==t||s.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,s);try{return s.type===1?this._workspaceUndo(e,s,i):this._resourceUndo(n,s,i)}finally{}}async _confirmAndContinueUndo(e,t,i){if((await this._dialogService.confirm({message:p("confirmDifferentSource","Would you like to undo '{0}'?",i.label),primaryButton:p({},"&&Yes"),cancelButton:p("confirmDifferentSource.no","No")})).confirmed)return this._undo(e,t,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestFutureElement();r&&r.sourceId===e&&(!t||r.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,p({},"Could not redo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const r=[];for(const a of i.editStacks)a.locked&&r.push(a.resourceLabel);return r.length>0?this._tryToSplitAndRedo(e,t,null,p({},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,p({},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}async _executeWorkspaceRedo(e,t,i){let n;try{n=await this._invokeWorkspacePrepare(t)}catch(r){return this._onError(r,t)}const s=this._checkWorkspaceRedo(e,t,i,!0);if(s)return n.dispose(),s.returnValue;for(const r of i.editStacks)r.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),i,n,()=>this._continueRedoInGroup(t.groupId))}_resourceRedo(e,t){if(!t.isValid){e.flushAllElements();return}if(e.locked){const i=p({},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(i);return}return this._invokeResourcePrepare(t,i=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new kx([e]),i,()=>this._continueRedoInGroup(t.groupId))))}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestFutureElement();r&&r.groupId===e&&(!t||r.groupOrder=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bF=function(o,e){return function(t,i){e(t,i,o)}};const wr=bt("ILanguageFeatureDebounceService");var Uw;(function(o){const e=new WeakMap;let t=0;function i(n){let s=e.get(n);return s===void 0&&(s=++t,e.set(n,s)),s}o.of=i})(Uw||(Uw={}));class ele{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class tle{constructor(e,t,i,n,s,r){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=s,this._max=r,this._cache=new Pu(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((t,i)=>Sy(Uw.of(i),t),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?io(i.value,this._min,this._max):this.default()}update(e,t){const i=this._key(e);let n=this._cache.get(i);n||(n=new Qae(6),this._cache.set(i,n));const s=io(n.update(t),this._min,this._max);return yM(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${s}ms`),s}_overall(){const e=new KB;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=this._overall()|0||this._default;return io(e,this._min,this._max)}}let AE=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,i){var n,s,r;const a=(n=i==null?void 0:i.min)!==null&&n!==void 0?n:50,l=(s=i==null?void 0:i.max)!==null&&s!==void 0?s:a**2,d=(r=i==null?void 0:i.key)!==null&&r!==void 0?r:void 0,c=`${Uw.of(e)},${a}${d?","+d:""}`;let u=this._data.get(c);return u||(this._isDev?u=new tle(this._logService,t,e,this._overallAverage()|0||a*1.5,a,l):(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),u=new ele(a*1.5)),this._data.set(c,u)),u}_overallAverage(){const e=new KB;for(const t of this._data.values())e.update(t.default());return e.value}};AE=Jae([bF(0,bo),bF(1,LA)],AE);xt(wr,AE,1);class ev{static create(e,t){return new ev(e,new jw(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e&&new k(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn)}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[n,s,r]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new ev(this._startLineNumber,n),new ev(this._startLineNumber+r,s)]}applyEdit(e,t){const[i,n,s]=fu(t);this.acceptEdit(e,i,n,s,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,s){this._acceptDeleteRange(e),this._acceptInsertText(new z(e.startLineNumber,e.startColumn),t,i,n,s),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){const s=i-t;this._startLineNumber-=s;return}const n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1){this._startLineNumber=0,this._tokens.clear();return}if(t<0){const s=-t;this._startLineNumber-=s,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,s){if(t===0&&i===0)return;const r=e.lineNumber-this._startLineNumber;if(r<0){this._startLineNumber+=t;return}const a=this._tokens.getMaxDeltaLine();r>=a+1||this._tokens.acceptInsertText(r,e.column-1,t,i,n,s)}}class jw{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;ie)i=n-1;else{let r=n;for(;r>t&&this._getDeltaLine(r-1)===e;)r--;let a=n;for(;ae||h===e&&f>=t)&&(he||f===e&&v>=t){if(fs?m-=s-i:m=i;else if(g===t&&f===i)if(g===n&&m>s)m-=s-i;else{c=!0;continue}else if(gs)g=t,f=i,m=f+(m-s);else{c=!0;continue}else if(g>n){if(l===0&&!c){d=a;break}g-=l}else if(g===n&&f>=s)e&&g===0&&(f+=e,m+=e),g-=l,f-=s-i,m-=s-i;else throw new Error("Not possible!");const _=4*d;r[_]=g,r[_+1]=f,r[_+2]=m,r[_+3]=v,d++}this._tokenCount=d}acceptInsertText(e,t,i,n,s,r){const a=i===0&&n===1&&(r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122),l=this._tokens,d=this._tokenCount;for(let c=0;c=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ix=function(o,e){return function(t,i){e(t,i,o)}};let RE=class{constructor(e,t,i,n){this._legend=e,this._themeService=t,this._languageService=i,this._logService=n,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new md}getMetadata(e,t,i){const n=this._languageService.languageIdCodec.encodeLanguageId(i),s=this._hashTable.get(e,t,n);let r;if(s)r=s.metadata,this._logService.getLevel()===Zn.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${Yn.getForeground(r)}, fontStyle ${Yn.getFontStyle(r).toString(2)}`);else{let a=this._legend.tokenTypes[e];const l=[];if(a){let d=t;for(let u=0;d>0&&u>1;d>0&&this._logService.getLevel()===Zn.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const c=this._themeService.getColorTheme().getTokenStyleMetadata(a,l,i);if(typeof c>"u")r=2147483647;else{if(r=0,typeof c.italic<"u"){const u=(c.italic?1:0)<<11;r|=u|1}if(typeof c.bold<"u"){const u=(c.bold?2:0)<<11;r|=u|2}if(typeof c.underline<"u"){const u=(c.underline?4:0)<<11;r|=u|4}if(typeof c.strikethrough<"u"){const u=(c.strikethrough?8:0)<<11;r|=u|8}if(c.foreground){const u=c.foreground<<15;r|=u|16}r===0&&(r=2147483647)}}else this._logService.getLevel()===Zn.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),r=2147483647,a="not-in-legend";this._hashTable.add(e,t,n,r),this._logService.getLevel()===Zn.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${a}) / ${t} (${l.join(" ")}): foreground ${Yn.getForeground(r)}, fontStyle ${Yn.getFontStyle(r).toString(2)}`)}return r}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,i,n,s){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${i}: The provided start offset ${n} is outside the previous data (length ${s}).`))}};RE=ile([Ix(1,Sn),Ix(2,bi),Ix(3,bo)],RE);function qB(o,e,t){const i=o.data,n=o.data.length/5|0,s=Math.max(Math.ceil(n/1024),400),r=[];let a=0,l=1,d=0;for(;ac&&i[5*b]===0;)b--;if(b-1===c){let C=u;for(;C+1x)e.warnOverlappingSemanticTokens(S,x+1);else{const j=e.getMetadata(E,R,t);j!==2147483647&&(f===0&&(f=S),h[g]=S-f,h[g+1]=x,h[g+2]=I,h[g+3]=j,g+=4,m=S,v=I)}l=S,d=x,a++}g!==h.length&&(h=h.subarray(0,g));const _=ev.create(f,h);r.push(_)}return r}class nle{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class md{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=md._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const s=this._elements;this._currentLengthIndex++,this._currentLength=md._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ex=function(o,e){return function(t,i){e(t,i,o)}};let PE=class extends q{constructor(e,t,i){super(),this._themeService=e,this._logService=t,this._languageService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new RE(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};PE=sle([Ex(0,Sn),Ex(1,bo),Ex(2,bi)],PE);xt(Yy,PE,1);const wC="**",wF="/",E1="[/\\\\]",N1="[^/\\\\]",ole=/\//g;function SF(o,e){switch(o){case 0:return"";case 1:return`${N1}*?`;default:return`(?:${E1}|${N1}+${E1}${e?`|${E1}${N1}+`:""})*?`}}function yF(o,e){if(!o)return[];const t=[];let i=!1,n=!1,s="";for(const r of o){switch(r){case e:if(!i&&!n){t.push(s),s="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":n=!0;break;case"]":n=!1;break}s+=r}return s&&t.push(s),t}function GB(o){if(!o)return"";let e="";const t=yF(o,wF);if(t.every(i=>i===wC))e=".*";else{let i=!1;t.forEach((n,s)=>{if(n===wC){if(i)return;e+=SF(2,s===t.length-1)}else{let r=!1,a="",l=!1,d="";for(const c of n){if(c!=="}"&&r){a+=c;continue}if(l&&(c!=="]"||!d)){let u;c==="-"?u=c:(c==="^"||c==="!")&&!d?u="^":c===wF?u="":u=qo(c),d+=u;continue}switch(c){case"{":r=!0;continue;case"[":l=!0;continue;case"}":{const h=`(?:${yF(a,",").map(g=>GB(g)).join("|")})`;e+=h,r=!1,a="";break}case"]":{e+="["+d+"]",l=!1,d="";break}case"?":e+=N1;continue;case"*":e+=SF(1);continue;default:e+=qo(c)}}sDA(a,e)).filter(a=>a!==El),o),i=t.length;if(!i)return El;if(i===1)return t[0];const n=function(a,l){for(let d=0,c=t.length;d!!a.allBasenames);s&&(n.allBasenames=s.allBasenames);const r=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return r.length&&(n.allPaths=r),n}function kF(o,e,t){const i=La===hn.sep,n=i?o:o.replace(ole,La),s=La+n,r=hn.sep+o;let a;return t?a=function(l,d){return typeof l=="string"&&(l===n||l.endsWith(s)||!i&&(l===o||l.endsWith(r)))?e:null}:a=function(l,d){return typeof l=="string"&&(l===n||!i&&l===o)?e:null},a.allPaths=[(t?"*/":"./")+o],a}function ple(o){try{const e=new RegExp(`^${GB(o)}$`);return function(t){return e.lastIndex=0,typeof t=="string"&&e.test(t)?o:null}}catch{return El}}function mle(o,e,t){return!o||typeof e!="string"?!1:ZB(o)(e,void 0,t)}function ZB(o,e={}){if(!o)return DF;if(typeof o=="string"||_le(o)){const t=DA(o,e);if(t===El)return DF;const i=function(n,s){return!!t(n,s)};return t.allBasenames&&(i.allBasenames=t.allBasenames),t.allPaths&&(i.allPaths=t.allPaths),i}return vle(o,e)}function _le(o){const e=o;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function vle(o,e){const t=YB(Object.getOwnPropertyNames(o).map(a=>ble(a,o[a],e)).filter(a=>a!==El)),i=t.length;if(!i)return El;if(!t.some(a=>!!a.requiresSiblings)){if(i===1)return t[0];const a=function(c,u){let h;for(let g=0,f=t.length;g{for(const g of h){const f=await g;if(typeof f=="string")return f}return null})():null},l=t.find(c=>!!c.allBasenames);l&&(a.allBasenames=l.allBasenames);const d=t.reduce((c,u)=>u.allPaths?c.concat(u.allPaths):c,[]);return d.length&&(a.allPaths=d),a}const n=function(a,l,d){let c,u;for(let h=0,g=t.length;h{for(const h of u){const g=await h;if(typeof g=="string")return g}return null})():null},s=t.find(a=>!!a.allBasenames);s&&(n.allBasenames=s.allBasenames);const r=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return r.length&&(n.allPaths=r),n}function ble(o,e,t){if(e===!1)return El;const i=DA(o,t);if(i===El)return El;if(typeof e=="boolean")return i;if(e){const n=e.when;if(typeof n=="string"){const s=(r,a,l,d)=>{if(!d||!i(r,a))return null;const c=n.replace("$(basename)",()=>l),u=d(c);return OI(u)?u.then(h=>h?o:null):u?o:null};return s.requiresSiblings=!0,s}}return i}function YB(o,e){const t=o.filter(a=>!!a.basenames);if(t.length<2)return o;const i=t.reduce((a,l)=>{const d=l.basenames;return d?a.concat(d):a},[]);let n;if(e){n=[];for(let a=0,l=i.length;a{const d=l.patterns;return d?a.concat(d):a},[]);const s=function(a,l){if(typeof a!="string")return null;if(!l){let c;for(c=a.length;c>0;c--){const u=a.charCodeAt(c-1);if(u===47||u===92)break}l=a.substr(c)}const d=i.indexOf(l);return d!==-1?n[d]:null};s.basenames=i,s.patterns=n,s.allBasenames=i;const r=o.filter(a=>!a.basenames);return r.push(s),r}function xA(o,e,t,i,n,s){if(Array.isArray(o)){let r=0;for(const a of o){const l=xA(a,e,t,i,n,s);if(l===10)return l;l>r&&(r=l)}return r}else{if(typeof o=="string")return i?o==="*"?5:o===t?10:0:0;if(o){const{language:r,pattern:a,scheme:l,hasAccessToAllModels:d,notebookType:c}=o;if(!i&&!d)return 0;c&&n&&(e=n);let u=0;if(l)if(l===e.scheme)u=10;else if(l==="*")u=5;else return 0;if(r)if(r===t)u=10;else if(r==="*")u=Math.max(u,5);else return 0;if(c)if(c===s)u=10;else if(c==="*"&&s!==void 0)u=Math.max(u,5);else return 0;if(a){let h;if(typeof a=="string"?h=a:h={...a,base:s8(a.base)},h===e.fsPath||mle(h,e.fsPath))u=10;else return 0}return u}else return 0}}function XB(o){return typeof o=="string"?!1:Array.isArray(o)?o.every(XB):!!o.exclusive}class IF{constructor(e,t,i,n){this.uri=e,this.languageId=t,this.notebookUri=i,this.notebookType=n}equals(e){var t,i;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&((t=this.notebookUri)===null||t===void 0?void 0:t.toString())===((i=e.notebookUri)===null||i===void 0?void 0:i.toString())}}class Ii{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new W,this.onDidChange=this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),je(()=>{if(i){const n=this._entries.indexOf(i);n>=0&&(this._entries.splice(n,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(const i of this._entries)i._score>0&&t.push(i.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,i=>t.push(i.provider)),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,s=>{i&&n===s._score?i.push(s.provider):(n=s._score,i=[s.provider],t.push(i))}),t}_orderedForEach(e,t){this._updateScores(e);for(const i of this._entries)i._score>0&&t(i)}_updateScores(e){var t,i;const n=(t=this._notebookInfoResolver)===null||t===void 0?void 0:t.call(this,e.uri),s=n?new IF(e.uri,e.getLanguageId(),n.uri,n.type):new IF(e.uri,e.getLanguageId(),void 0,void 0);if(!(!((i=this._lastCandidate)===null||i===void 0)&&i.equals(s))){this._lastCandidate=s;for(const r of this._entries)if(r._score=xA(r.selector,s.uri,s.languageId,vJ(e),s.notebookUri,s.notebookType),XB(r.selector)&&r._score>0){for(const a of this._entries)a._score=0;r._score=1e3;break}this._entries.sort(Ii._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:D_(e.selector)&&!D_(t.selector)?1:!D_(e.selector)&&D_(t.selector)?-1:e._timet._time?-1:0}}function D_(o){return typeof o=="string"?!1:Array.isArray(o)?o.some(D_):!!o.isBuiltin}class Cle{constructor(){this.referenceProvider=new Ii(this._score.bind(this)),this.renameProvider=new Ii(this._score.bind(this)),this.codeActionProvider=new Ii(this._score.bind(this)),this.definitionProvider=new Ii(this._score.bind(this)),this.typeDefinitionProvider=new Ii(this._score.bind(this)),this.declarationProvider=new Ii(this._score.bind(this)),this.implementationProvider=new Ii(this._score.bind(this)),this.documentSymbolProvider=new Ii(this._score.bind(this)),this.inlayHintsProvider=new Ii(this._score.bind(this)),this.colorProvider=new Ii(this._score.bind(this)),this.codeLensProvider=new Ii(this._score.bind(this)),this.documentFormattingEditProvider=new Ii(this._score.bind(this)),this.documentRangeFormattingEditProvider=new Ii(this._score.bind(this)),this.onTypeFormattingEditProvider=new Ii(this._score.bind(this)),this.signatureHelpProvider=new Ii(this._score.bind(this)),this.hoverProvider=new Ii(this._score.bind(this)),this.documentHighlightProvider=new Ii(this._score.bind(this)),this.multiDocumentHighlightProvider=new Ii(this._score.bind(this)),this.selectionRangeProvider=new Ii(this._score.bind(this)),this.foldingRangeProvider=new Ii(this._score.bind(this)),this.linkProvider=new Ii(this._score.bind(this)),this.inlineCompletionsProvider=new Ii(this._score.bind(this)),this.completionProvider=new Ii(this._score.bind(this)),this.linkedEditingRangeProvider=new Ii(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new Ii(this._score.bind(this)),this.documentSemanticTokensProvider=new Ii(this._score.bind(this)),this.documentOnDropEditProvider=new Ii(this._score.bind(this)),this.documentPasteEditProvider=new Ii(this._score.bind(this))}_score(e){var t;return(t=this._notebookTypeResolver)===null||t===void 0?void 0:t.call(this,e)}}xt(Me,Cle,1);const f0=bt("IWorkspaceEditService");class kA{constructor(e){this.metadata=e}static convert(e){return e.edits.map(t=>{if(Od.is(t))return Od.lift(t);if(hp.is(t))return hp.lift(t);throw new Error("Unsupported edit")})}}class Od extends kA{static is(e){return e instanceof Od?!0:Es(e)&&ze.isUri(e.resource)&&Es(e.textEdit)}static lift(e){return e instanceof Od?e:new Od(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,i=void 0,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class hp extends kA{static is(e){return e instanceof hp?!0:Es(e)&&(!!e.newResource||!!e.oldResource)}static lift(e){return e instanceof hp?e:new hp(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}const ps={enableSplitViewResizing:!0,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0},Xy=Object.freeze({id:"editor",order:5,type:"object",title:p("editorConfigurationTitle","Editor"),scope:5}),Kw={...Xy,properties:{"editor.tabSize":{type:"number",default:rs.tabSize,minimum:1,markdownDescription:p("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:p("indentSize",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:rs.insertSpaces,markdownDescription:p("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:rs.detectIndentation,markdownDescription:p("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:rs.trimAutoWhitespace,description:p("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:rs.largeFileOptimizations,description:p("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[p("wordBasedSuggestions.off","Turn off Word Based Suggestions."),p("wordBasedSuggestions.currentDocument","Only suggest words from the active document."),p("wordBasedSuggestions.matchingDocuments","Suggest words from all open documents of the same language."),p("wordBasedSuggestions.allDocuments","Suggest words from all open documents.")],description:p("wordBasedSuggestions","Controls whether completions should be computed based on words in the document and from which documents they are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[p("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),p("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),p("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:p("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:p("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:p("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:p("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:p("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:p("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:p("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:p("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:p("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:p("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:p("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:p("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:ps.maxComputationTime,description:p("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:ps.maxFileSize,description:p("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:ps.renderSideBySide,description:p("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:ps.renderSideBySideInlineBreakpoint,description:p("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:ps.useInlineViewWhenSpaceIsLimited,description:p("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:ps.renderMarginRevertIcon,description:p("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:ps.ignoreTrimWhitespace,description:p("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:ps.renderIndicators,description:p("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:ps.diffCodeLens,description:p("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:ps.diffWordWrap,markdownEnumDescriptions:[p("wordWrap.off","Lines will never wrap."),p("wordWrap.on","Lines will wrap at the viewport width."),p("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:ps.diffAlgorithm,markdownEnumDescriptions:[p("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),p("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:ps.hideUnchangedRegions.enabled,markdownDescription:p("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:ps.hideUnchangedRegions.revealLineCount,markdownDescription:p("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:ps.hideUnchangedRegions.minimumLineCount,markdownDescription:p("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:ps.hideUnchangedRegions.contextLineCount,markdownDescription:p("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:ps.experimental.showMoves,markdownDescription:p("showMoves","Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:ps.experimental.showEmptyDecorations,description:p("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")}}};function wle(o){return typeof o.type<"u"||typeof o.anyOf<"u"}for(const o of Sf){const e=o.schema;if(typeof e<"u")if(wle(e))Kw.properties[`editor.${o.name}`]=e;else for(const t in e)Object.hasOwnProperty.call(e,t)&&(Kw.properties[t]=e[t])}let SC=null;function QB(){return SC===null&&(SC=Object.create(null),Object.keys(Kw.properties).forEach(o=>{SC[o]=!0})),SC}function Sle(o){return QB()[`editor.${o}`]||!1}function yle(o){return QB()[`diffEditor.${o}`]||!1}const Lle=xi.as(Va.Configuration);Lle.registerConfiguration(Kw);class Li{static insert(e,t){return{range:new k(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}function Tx(o){return Object.isFrozen(o)?o:cG(o)}class os{constructor(e={},t=[],i=[],n){this._contents=e,this._keys=t,this._overrides=i,this.raw=n,this.overrideConfigurations=new Map}get rawConfiguration(){var e;if(!this._rawConfiguration)if(!((e=this.raw)===null||e===void 0)&&e.length){const t=this.raw.map(i=>{if(i instanceof os)return i;const n=new Dle("");return n.parseRaw(i),n.configurationModel});this._rawConfiguration=t.reduce((i,n)=>n===i?n:i.merge(n),t[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?mO(this.contents,e):this.contents}inspect(e,t){const i=this.rawConfiguration.getValue(e),n=t?this.rawConfiguration.getOverrideValue(e,t):void 0,s=t?this.rawConfiguration.override(t).getValue(e):i;return{value:i,override:n,merged:s}}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?mO(i,e):i:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){var t,i;const n=gd(this.contents),s=gd(this.overrides),r=[...this.keys],a=!((t=this.raw)===null||t===void 0)&&t.length?[...this.raw]:[this];for(const l of e)if(a.push(...!((i=l.raw)===null||i===void 0)&&i.length?l.raw:[l]),!l.isEmpty()){this.mergeContents(n,l.contents);for(const d of l.overrides){const[c]=s.filter(u=>Bi(u.identifiers,d.identifiers));c?(this.mergeContents(c.contents,d.contents),c.keys.push(...d.keys),c.keys=iu(c.keys)):s.push(gd(d))}for(const d of l.keys)r.indexOf(d)===-1&&r.push(d)}return new os(n,r,s,a.every(l=>l instanceof os)?void 0:a)}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||typeof t!="object"||!Object.keys(t).length)return this;const i={};for(const n of iu([...Object.keys(this.contents),...Object.keys(t)])){let s=this.contents[n];const r=t[n];r&&(typeof s=="object"&&typeof r=="object"?(s=gd(s),this.mergeContents(s,r)):s=r),i[n]=s}return new os(i,this.keys,this.overrides)}mergeContents(e,t){for(const i of Object.keys(t)){if(i in e&&Es(e[i])&&Es(t[i])){this.mergeContents(e[i],t[i]);continue}e[i]=gd(t[i])}}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=s=>{s&&(i?this.mergeContents(i,s):i=gd(s))};for(const s of this.overrides)s.identifiers.length===1&&s.identifiers[0]===e?t=s.contents:s.identifiers.includes(e)&&n(s.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(e,t){this.updateValue(e,t,!0)}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){const t=this.keys.indexOf(e);t!==-1&&(this.keys.splice(t,1),BQ(this.contents,e),cu.test(e)&&this.overrides.splice(this.overrides.findIndex(i=>Bi(i.identifiers,vw(e))),1))}updateValue(e,t,i){d7(this.contents,e,t,n=>console.error(n)),i=i||this.keys.indexOf(e)===-1,i&&this.keys.push(e),cu.test(e)&&this.overrides.push({identifiers:vw(e),keys:Object.keys(this.contents[e]),contents:zI(this.contents[e],n=>console.error(n))})}}class Dle{constructor(e){this._name=e,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new os}parseRaw(e,t){this._raw=e;const{contents:i,keys:n,overrides:s,restricted:r,hasExcludedProperties:a}=this.doParseRaw(e,t);this._configurationModel=new os(i,n,s,a?[e]:void 0),this._restrictedConfigurations=r||[]}doParseRaw(e,t){const i=xi.as(Va.Configuration).getConfigurationProperties(),n=this.filter(e,i,!0,t);e=n.raw;const s=zI(e,l=>console.error(`Conflict in settings file ${this._name}: ${l}`)),r=Object.keys(e),a=this.toOverrides(e,l=>console.error(`Conflict in settings file ${this._name}: ${l}`));return{contents:s,keys:r,overrides:a,restricted:n.restricted,hasExcludedProperties:n.hasExcludedProperties}}filter(e,t,i,n){var s,r,a;let l=!1;if(!(n!=null&&n.scopes)&&!(n!=null&&n.skipRestricted)&&!(!((s=n==null?void 0:n.exclude)===null||s===void 0)&&s.length))return{raw:e,restricted:[],hasExcludedProperties:l};const d={},c=[];for(const u in e)if(cu.test(u)&&i){const h=this.filter(e[u],t,!1,n);d[u]=h.raw,l=l||h.hasExcludedProperties,c.push(...h.restricted)}else{const h=t[u],g=h?typeof h.scope<"u"?h.scope:3:void 0;h!=null&&h.restricted&&c.push(u),!(!((r=n.exclude)===null||r===void 0)&&r.includes(u))&&(!((a=n.include)===null||a===void 0)&&a.includes(u)||(g===void 0||n.scopes===void 0||n.scopes.includes(g))&&!(n.skipRestricted&&(h!=null&&h.restricted)))?d[u]=e[u]:l=!0}return{raw:d,restricted:c,hasExcludedProperties:l}}toOverrides(e,t){const i=[];for(const n of Object.keys(e))if(cu.test(n)){const s={};for(const r in e[n])s[r]=e[n][r];i.push({identifiers:vw(n),keys:Object.keys(s),contents:zI(s,t)})}return i}}class xle{constructor(e,t,i,n,s,r,a,l,d,c,u,h,g){this.key=e,this.overrides=t,this._value=i,this.overrideIdentifiers=n,this.defaultConfiguration=s,this.policyConfiguration=r,this.applicationConfiguration=a,this.userConfiguration=l,this.localUserConfiguration=d,this.remoteUserConfiguration=c,this.workspaceConfiguration=u,this.folderConfigurationModel=h,this.memoryConfigurationModel=g}inspect(e,t,i){const n=e.inspect(t,i);return{get value(){return Tx(n.value)},get override(){return Tx(n.override)},get merged(){return Tx(n.merged)}}}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}}class Qy{constructor(e,t,i,n,s=new os,r=new os,a=new Gi,l=new os,d=new Gi){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=i,this._localUserConfiguration=n,this._remoteUserConfiguration=s,this._workspaceConfiguration=r,this._folderConfigurations=a,this._memoryConfiguration=l,this._memoryConfigurationByResource=d,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new Gi,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidatedConfigurationModel(e,t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=new os,this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,t===void 0?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,i){const n=this.getConsolidatedConfigurationModel(e,t,i),s=this.getFolderConfigurationModelForResource(t.resource,i),r=t.resource?this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration:this._memoryConfiguration,a=new Set;for(const l of n.overrides)for(const d of l.identifiers)n.getOverrideValue(e,d)!==void 0&&a.add(d);return new xle(e,t,n.getValue(e),a.size?[...a]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,i?this._workspaceConfiguration:void 0,s||void 0,r)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,i){let n=this.getConsolidatedConfigurationModelForResource(t,i);return t.overrideIdentifier&&(n=n.override(t.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(e)!==void 0&&(n=n.merge(this._policyConfiguration)),n}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const s=this._memoryConfigurationByResource.get(e);s&&(i=i.merge(s))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,t)=>{const{contents:i,overrides:n,keys:s}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:s}]),e},[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),i=this.parseConfigurationModel(e.policy),n=this.parseConfigurationModel(e.application),s=this.parseConfigurationModel(e.user),r=this.parseConfigurationModel(e.workspace),a=e.folders.reduce((l,d)=>(l.set(ze.revive(d[0]),this.parseConfigurationModel(d[1])),l),new Gi);return new Qy(t,i,n,s,new os,r,a,new os,new Gi)}static parseConfigurationModel(e){return new os(e.contents,e.keys,e.overrides)}}class kle{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._marker=` +`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=46,this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const s of e.keys)this.affectedKeys.add(s);for(const[,s]of e.overrides)for(const r of s)this.affectedKeys.add(r);this._affectsConfigStr=this._marker;for(const s of this.affectedKeys)this._affectsConfigStr+=s+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=Qy.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;const n=this._marker+e,s=this._affectsConfigStr.indexOf(n);if(s<0)return!1;const r=s+n.length;if(r>=this._affectsConfigStr.length)return!1;const a=this._affectsConfigStr.charCodeAt(r);if(a!==this._markerCode1&&a!==this._markerCode2)return!1;if(t){const l=this.previousConfiguration?this.previousConfiguration.getValue(e,t,(i=this.previous)===null||i===void 0?void 0:i.workspace):void 0,d=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!Uo(l,d)}return!0}}const qw={kind:0},Ile={kind:1};function Ele(o,e,t){return{kind:2,commandId:o,commandArgs:e,isBubble:t}}class tv{constructor(e,t,i){var n;this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const s of e){const r=s.command;r&&r.charAt(0)!=="-"&&this._defaultBoundCommands.set(r,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=tv.handleRemovals([].concat(e).concat(t));for(let s=0,r=this._keybindings.length;s"u"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let n=i.length-1;n>=0;n--){const s=i[n];if(s.command===t.command)continue;let r=!0;for(let a=1;a"u"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;const t=this._lookupMap.get(e.command);if(!(typeof t>"u")){for(let i=0,n=t.length;i"u"||i.length===0)return null;if(i.length===1)return i[0];for(let n=i.length-1;n>=0;n--){const s=i[n];if(t.contextMatchesRules(s.when))return s}return i[i.length-1]}resolve(e,t,i){const n=[...t,i];this._log(`| Resolving ${n}`);const s=this._map.get(n[0]);if(s===void 0)return this._log("\\ No keybinding entries."),qw;let r=null;if(n.length<2)r=s;else{r=[];for(let l=0,d=s.length;lc.chords.length)continue;let u=!0;for(let h=1;h=0;i--){const n=t[i];if(tv._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return t?t.evaluate(e):!0}}function EF(o){return o?`${o.serialize()}`:"no when condition"}function NF(o){return o.extensionId?o.isBuiltinExtension?`built-in extension ${o.extensionId}`:`user extension ${o.extensionId}`:o.isDefault?"built-in":"user"}const Nle=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class Tle extends q{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:ye.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,i,n,s){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=s,this._onDidUpdateKeybindings=this._register(new W),this._currentChords=[],this._currentChordChecker=new SM,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=Ff.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new qr,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const i=this.resolveKeyboardEvent(e);if(i.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),qw;const[n]=i.getDispatchChords();if(n===null)return this._log("\\ Keyboard event cannot be dispatched"),qw;const s=this._contextKeyService.getContext(t),r=this._currentChords.map(({keypress:a})=>a);return this._getResolver().resolve(s,r,n)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-e>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw tM("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(p("first.chord","({0}) was pressed. Waiting for second key of chord...",t));break;default:{const i=this._currentChords.map(({label:n})=>n).join(", ");this._currentChordStatusMessage=this._notificationService.status(p("next.chord","({0}) was pressed. Waiting for next key of chord...",i))}}this._scheduleLeaveChordMode(),H_.enabled&&H_.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],H_.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchChords();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=Ff.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=Ff.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[s]=i.getChords();return this._ignoreSingleModifiers=new Ff(s),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){var n;let s=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let r=null,a=null;if(i){const[u]=e.getSingleModifierDispatchChords();r=u,a=u?[u]:[]}else[r]=e.getDispatchChords(),a=this._currentChords.map(({keypress:u})=>u);if(r===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),s;const l=this._contextKeyService.getContext(t),d=e.getLabel(),c=this._getResolver().resolve(l,a,r);switch(c.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",d,"[ No matching keybinding ]"),this.inChordMode){const u=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${u}, ${d}".`),this._notificationService.status(p("missing.chord","The key combination ({0}, {1}) is not a command.",u,d),{hideAfter:10*1e3}),this._leaveChordMode(),s=!0}return s}case 1:return this._logService.trace("KeybindingService#dispatch",d,"[ Several keybindings match - more chords needed ]"),s=!0,this._expectAnotherChord(r,d),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),s;case 2:{if(this._logService.trace("KeybindingService#dispatch",d,`[ Will dispatch command ${c.commandId} ]`),c.commandId===null||c.commandId===""){if(this.inChordMode){const u=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${u}, ${d}".`),this._notificationService.status(p("missing.chord","The key combination ({0}, {1}) is not a command.",u,d),{hideAfter:10*1e3}),this._leaveChordMode(),s=!0}}else this.inChordMode&&this._leaveChordMode(),c.isBubble||(s=!0),this._log(`+ Invoking command ${c.commandId}.`),typeof c.commandArgs>"u"?this._commandService.executeCommand(c.commandId).then(void 0,u=>this._notificationService.warn(u)):this._commandService.executeCommand(c.commandId,c.commandArgs).then(void 0,u=>this._notificationService.warn(u)),Nle.test(c.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:c.commandId,from:"keybinding",detail:(n=e.getUserSettingsLabel())!==null&&n!==void 0?n:void 0});return s}}}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}}class Ff{constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}Ff.EMPTY=new Ff(null);class TF{constructor(e,t,i,n,s,r,a){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?OE(e.getDispatchChords()):[],e&&this.chords.length===0&&(this.chords=OE(e.getSingleModifierDispatchChords())),this.bubble=t?t.charCodeAt(0)===94:!1,this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=s,this.extensionId=r,this.isBuiltinExtension=a}}function OE(o){const e=[];for(let t=0,i=o.length;tthis._getLabel(e))}getAriaLabel(){return Mle.toLabel(this._os,this._chords,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:Ale.toLabel(this._os,this._chords,e=>this._getElectronAccelerator(e))}getUserSettingsLabel(){return Rle.toLabel(this._os,this._chords,e=>this._getUserSettingsLabel(e))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(e=>this._getChord(e))}_getChord(e){return new VY(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map(e=>this._getChordDispatch(e))}getSingleModifierDispatchChords(){return this._chords.map(e=>this._getSingleModifierChordDispatch(e))}}class eb extends Ole{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return vd.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":vd.toString(e.keyCode)}_getElectronAccelerator(e){return vd.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const t=vd.toUserSettingsUS(e.keyCode);return t&&t.toLowerCase()}_getChordDispatch(e){return eb.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=vd.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){const t=aM[e];if(t!==-1)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof zd)return e;const t=this._scanCodeToKeyCode(e.scanCode);return t===0?null:new zd(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){const i=OE(e.chords.map(n=>this._toKeyCodeChord(n)));return i.length>0?[new eb(i,t)]:[]}}const Hp=bt("labelService"),JB=bt("progressService");class Fd{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}Fd.None=Object.freeze({report(){}});const Bu=bt("editorProgressService");class Fle{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){const i=this._value.charCodeAt(t);if(!(i===47||this._splitOnBackslash&&i===92))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new gp(new Vle(e,t))}static forStrings(){return new gp(new Fle)}static forConfigKeys(){return new gp(new Ble)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new yC,this._root.segment=i.value());const s=[];for(n=this._root;;){const a=i.cmp(n.segment);if(a>0)n.left||(n.left=new yC,n.left.segment=i.value()),s.push([-1,n]),n=n.left;else if(a<0)n.right||(n.right=new yC,n.right.segment=i.value()),s.push([1,n]),n=n.right;else if(i.hasNext())i.next(),n.mid||(n.mid=new yC,n.mid.segment=i.value()),s.push([0,n]),n=n.mid;else break}const r=n.value;n.value=t,n.key=e;for(let a=s.length-1;a>=0;a--){const l=s[a][1];l.updateHeight();const d=l.balanceFactor();if(d<-1||d>1){const c=s[a][0],u=s[a+1][0];if(c===1&&u===1)s[a][1]=l.rotateLeft();else if(c===-1&&u===-1)s[a][1]=l.rotateRight();else if(c===1&&u===-1)l.right=s[a+1][1]=s[a+1][1].rotateRight(),s[a][1]=l.rotateLeft();else if(c===-1&&u===1)l.left=s[a+1][1]=s[a+1][1].rotateLeft(),s[a][1]=l.rotateRight();else throw new Error;if(a>0)switch(s[a-1][0]){case-1:s[a-1][1].left=s[a][1];break;case 1:s[a-1][1].right=s[a][1];break;case 0:s[a-1][1].mid=s[a][1];break}else this._root=s[0][1]}}return r}get(e){var t;return(t=this._getNode(e))===null||t===void 0?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const n=t.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else break}return i}has(e){const t=this._getNode(e);return!((t==null?void 0:t.value)===void 0&&(t==null?void 0:t.mid)===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var i;const n=this._iter.reset(e),s=[];let r=this._root;for(;r;){const a=n.cmp(r.segment);if(a>0)s.push([-1,r]),r=r.left;else if(a<0)s.push([1,r]),r=r.right;else if(n.hasNext())n.next(),s.push([0,r]),r=r.mid;else break}if(r){if(t?(r.left=void 0,r.mid=void 0,r.right=void 0,r.height=1):(r.key=void 0,r.value=void 0),!r.mid&&!r.value)if(r.left&&r.right){const a=this._min(r.right);if(a.key){const{key:l,value:d,segment:c}=a;this._delete(a.key,!1),r.key=l,r.value=d,r.segment=c}}else{const a=(i=r.left)!==null&&i!==void 0?i:r.right;if(s.length>0){const[l,d]=s[s.length-1];switch(l){case-1:d.left=a;break;case 0:d.mid=a;break;case 1:d.right=a;break}}else this._root=a}for(let a=s.length-1;a>=0;a--){const l=s[a][1];l.updateHeight();const d=l.balanceFactor();if(d>1?(l.right.balanceFactor()>=0||(l.right=l.right.rotateRight()),s[a][1]=l.rotateLeft()):d<-1&&(l.left.balanceFactor()<=0||(l.left=l.left.rotateLeft()),s[a][1]=l.rotateRight()),a>0)switch(s[a-1][0]){case-1:s[a-1][1].left=s[a][1];break;case 1:s[a-1][1].right=s[a][1];break;case 0:s[a-1][1].mid=s[a][1];break}else this._root=s[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i=this._root,n;for(;i;){const s=t.cmp(i.segment);if(s>0)i=i.left;else if(s<0)i=i.right;else if(t.hasNext())t.next(),n=i.value||n,i=i.mid;else break}return i&&i.value||n}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){const i=this._iter.reset(e);let n=this._root;for(;n;){const s=i.cmp(n.segment);if(s>0)n=n.left;else if(s<0)n=n.right;else if(i.hasNext())i.next(),n=n.mid;else return n.mid?this._entries(n.mid):t?n.value:void 0}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}const ag=bt("contextService");function FE(o){const e=o;return typeof(e==null?void 0:e.id)=="string"&&ze.isUri(e.uri)}function Hle(o){const e=o;return typeof(e==null?void 0:e.id)=="string"&&!FE(o)&&!Ule(o)}const zle={id:"empty-window"};function $le(o,e){if(typeof o=="string"||typeof o>"u")return typeof o=="string"?{id:Vc(o)}:zle;const t=o;return t.configuration?{id:t.id,configPath:t.configuration}:t.folders.length===1?{id:t.id,uri:t.folders[0].uri}:{id:t.id}}function Ule(o){const e=o;return typeof(e==null?void 0:e.id)=="string"&&ze.isUri(e.configPath)}class jle{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const BE="code-workspace";p("codeWorkspace","Code Workspace");const e6="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function Kle(o){return o.id===e6}var WE;(function(o){o.inspectTokensAction=p("inspectTokens","Developer: Inspect Tokens")})(WE||(WE={}));var Gw;(function(o){o.gotoLineActionLabel=p("gotoLineActionLabel","Go to Line/Column...")})(Gw||(Gw={}));var VE;(function(o){o.helpQuickAccessActionLabel=p("helpQuickAccess","Show all Quick Access Providers")})(VE||(VE={}));var Zw;(function(o){o.quickCommandActionLabel=p("quickCommandActionLabel","Command Palette"),o.quickCommandHelp=p("quickCommandActionHelp","Show And Run Commands")})(Zw||(Zw={}));var tb;(function(o){o.quickOutlineActionLabel=p("quickOutlineActionLabel","Go to Symbol..."),o.quickOutlineByCategoryActionLabel=p("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(tb||(tb={}));var Yw;(function(o){o.editorViewAccessibleLabel=p("editorViewAccessibleLabel","Editor content"),o.accessibilityHelpMessage=p("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(Yw||(Yw={}));var HE;(function(o){o.toggleHighContrast=p("toggleHighContrast","Toggle High Contrast Theme")})(HE||(HE={}));var zE;(function(o){o.bulkEditServiceSummary=p("bulkEditServiceSummary","Made {0} edits in {1} files")})(zE||(zE={}));const t6=bt("workspaceTrustManagementService"),Gd=bt("contextViewService"),Sr=bt("contextMenuService");var ns;(function(o){function e(s,r){if(s.start>=r.end||r.start>=s.end)return{start:0,end:0};const a=Math.max(s.start,r.start),l=Math.min(s.end,r.end);return l-a<=0?{start:0,end:0}:{start:a,end:l}}o.intersect=e;function t(s){return s.end-s.start<=0}o.isEmpty=t;function i(s,r){return!t(e(s,r))}o.intersects=i;function n(s,r){const a=[],l={start:s.start,end:Math.min(r.start,s.end)},d={start:Math.max(r.end,s.start),end:s.end};return t(l)||a.push(l),t(d)||a.push(d),a}o.relativeComplement=n})(ns||(ns={}));function qle(o){const e=o;return!!e&&typeof e.x=="number"&&typeof e.y=="number"}var Mc;(function(o){o[o.AVOID=0]="AVOID",o[o.ALIGN=1]="ALIGN"})(Mc||(Mc={}));function Bf(o,e,t){const i=t.mode===Mc.ALIGN?t.offset:t.offset+t.size,n=t.mode===Mc.ALIGN?t.offset+t.size:t.offset;return t.position===0?e<=o-i?i:e<=n?n-e:Math.max(o-e,0):e<=n?n-e:e<=o-i?i:0}class zp extends q{constructor(e,t){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=q.None,this.toDisposeOnSetContainer=q.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=pe(".context-view"),xs(this.view),this.setContainer(e,t),this._register(je(()=>this.setContainer(null,1)))}setContainer(e,t){var i;this.useFixedPosition=t!==1;const n=this.useShadowDOM;if(this.useShadowDOM=t===3,!(e===this.container&&n!==this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(i=this.shadowRootHostElement)===null||i===void 0||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=pe(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const r=document.createElement("style");r.textContent=Gle,this.shadowRoot.appendChild(r),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(pe("slot"))}else this.container.appendChild(this.view);const s=new de;zp.BUBBLE_UP_EVENTS.forEach(r=>{s.add(Wi(this.container,r,a=>{this.onDOMEvent(a,!1)}))}),zp.BUBBLE_DOWN_EVENTS.forEach(r=>{s.add(Wi(this.container,r,a=>{this.onDOMEvent(a,!0)},!0))}),this.toDisposeOnSetContainer=s}}show(e){var t,i;this.isVisible()&&this.hide(),$n(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",oo(this.view),this.toDisposeOnClean=e.render(this.view)||q.None,this.delegate=e,this.doLayout(),(i=(t=this.delegate).focus)===null||i===void 0||i.call(t)}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(Ea&&CM.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let t;if(e instanceof HTMLElement){const h=gn(e),g=$X(e);t={top:h.top*g,left:h.left*g,width:h.width*g,height:h.height*g}}else qle(e)?t={top:e.y,left:e.x,width:e.width||1,height:e.height||2}:t={top:e.posy,left:e.posx,width:2,height:2};const i=zs(this.view),n=kh(this.view),s=this.delegate.anchorPosition||0,r=this.delegate.anchorAlignment||0,a=this.delegate.anchorAxisAlignment||0;let l,d;const c=qX();if(a===0){const h={offset:t.top-c.pageYOffset,size:t.height,position:s===0?0:1},g={offset:t.left,size:t.width,position:r===0?0:1,mode:Mc.ALIGN};l=Bf(c.innerHeight,n,h)+c.pageYOffset,ns.intersects({start:l,end:l+n},{start:h.offset,end:h.offset+h.size})&&(g.mode=Mc.AVOID),d=Bf(c.innerWidth,i,g)}else{const h={offset:t.left,size:t.width,position:r===0?0:1},g={offset:t.top,size:t.height,position:s===0?0:1,mode:Mc.ALIGN};d=Bf(c.innerWidth,i,h),ns.intersects({start:d,end:d+i},{start:h.offset,end:h.offset+h.size})&&(g.mode=Mc.AVOID),l=Bf(c.innerHeight,n,g)+c.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(s===0?"bottom":"top"),this.view.classList.add(r===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const u=gn(this.container);this.view.style.top=`${l-(this.useFixedPosition?gn(this.view).top:u.top)}px`,this.view.style.left=`${d-(this.useFixedPosition?gn(this.view).left:u.left)}px`,this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,t!=null&&t.onHide&&t.onHide(e),this.toDisposeOnClean.dispose(),xs(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,Je(e).document.activeElement):t&&!Qn(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}zp.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"];zp.BUBBLE_DOWN_EVENTS=["click"];const Gle=` :host { all: initial; /* 1st rule so subsequent properties are reset. */ } @@ -134,12 +134,12 @@ Received: '{1}'.`,e,mh.getLexeme(t)),s=t.offset,r=mh.getLexeme(t);return this._p :host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; } :host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; } :host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; } -`;var jle=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Kle=function(o,e){return function(t,i){e(t,i,o)}};let $E=class extends q{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=q.None,this.contextView=this._register(new zp(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer(()=>this.layout()))}showContextView(e,t,i){let n;t?t===this.layoutService.getContainer(Je(t))?n=1:i?n=3:n=2:n=1,this.contextView.setContainer(t??this.layoutService.activeContainer,n),this.contextView.show(e);const s=je(()=>{this.currentViewDisposable===s&&this.hideContextView()});return this.currentViewDisposable=s,s}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}dispose(){super.dispose(),this.currentViewDisposable.dispose(),this.currentViewDisposable=q.None}};$E=jle([Kle(0,wm)],$E);let $p=[],EA=[],i6=[];function LC(o,e=!1){qle(o,!1,e)}function qle(o,e,t){const i=Gle(o,e);$p.push(i),i.userConfigured?i6.push(i):EA.push(i),t&&!i.userConfigured&&$p.forEach(n=>{n.mime===i.mime||n.userConfigured||(i.extension&&n.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&n.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&n.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&n.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))})}function Gle(o,e){return{id:o.id,mime:o.mime,filename:o.filename,extension:o.extension,filepattern:o.filepattern,firstline:o.firstline,userConfigured:e,filenameLowercase:o.filename?o.filename.toLowerCase():void 0,extensionLowercase:o.extension?o.extension.toLowerCase():void 0,filepatternLowercase:o.filepattern?ZB(o.filepattern.toLowerCase()):void 0,filepatternOnPath:o.filepattern?o.filepattern.indexOf(hn.sep)>=0:!1}}function Zle(){$p=$p.filter(o=>o.userConfigured),EA=[]}function Yle(o,e){return Xle(o,e).map(t=>t.id)}function Xle(o,e){let t;if(o)switch(o.scheme){case ot.file:t=o.fsPath;break;case ot.data:{t=pu.parseMetaData(o).get(pu.META_DATA_LABEL);break}case ot.vscodeNotebookCell:t=void 0;break;default:t=o.path}if(!t)return[{id:"unknown",mime:qi.unknown}];t=t.toLowerCase();const i=Vc(t),n=MF(t,i,i6);if(n)return[n,{id:Ko,mime:qi.text}];const s=MF(t,i,EA);if(s)return[s,{id:Ko,mime:qi.text}];if(e){const r=Qle(e);if(r)return[r,{id:Ko,mime:qi.text}]}return[{id:"unknown",mime:qi.unknown}]}function MF(o,e,t){var i;let n,s,r;for(let a=t.length-1;a>=0;a--){const l=t[a];if(e===l.filenameLowercase){n=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){const d=l.filepatternOnPath?o:e;!((i=l.filepatternLowercase)===null||i===void 0)&&i.call(l,d)&&(s=l)}l.extension&&(!r||l.extension.length>r.extension.length)&&e.endsWith(l.extensionLowercase)&&(r=l)}if(n)return n;if(s)return s;if(r)return r}function Qle(o){if(pM(o)&&(o=o.substr(1)),o.length>0)for(let e=$p.length-1;e>=0;e--){const t=$p[e];if(!t.firstline)continue;const i=o.match(t.firstline);if(i&&i.length>0)return t}}const DC=Object.prototype.hasOwnProperty,AF="vs.editor.nullLanguage";class Jle{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(AF,0),this._register(Ko,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||AF}}class ib extends q{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new W),this.onDidChange=this._onDidChange.event,ib.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new Jle,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(Ip.onDidChangeLanguages(i=>{this._initializeFromRegistry()})))}dispose(){ib.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Zle();const e=[].concat(Ip.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(t=>{const i=this._languages[t];i.name&&(this._nameMap[i.name]=i.identifier),i.aliases.forEach(n=>{this._lowercaseNameMap[n.toLowerCase()]=i.identifier}),i.mimetypes.forEach(n=>{this._mimeTypesMap[n]=i.identifier})}),xi.as(Va.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;DC.call(this._languages,t)?i=this._languages[t]:(this.languageIdCodec.register(t),i={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const a of t.extensions)LC({id:i,mime:n,extension:a},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const a of t.filenames)LC({id:i,mime:n,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(const a of t.filenamePatterns)LC({id:i,mime:n,filepattern:a},this._warnOnOverwrite);if(typeof t.firstLine=="string"&&t.firstLine.length>0){let a=t.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{const l=new RegExp(a);nY(l)||LC({id:i,mime:n,firstline:l},this._warnOnOverwrite)}catch(l){console.warn(`[${t.id}]: Invalid regular expression \`${a}\`: `,l)}}e.aliases.push(i);let s=null;if(typeof t.aliases<"u"&&Array.isArray(t.aliases)&&(t.aliases.length===0?s=[null]:s=t.aliases),s!==null)for(const a of s)!a||a.length===0||e.aliases.push(a);const r=s!==null&&s.length>0;if(!(r&&s[0]===null)){const a=(r?s[0]:null)||i;(r||!e.name)&&(e.name=a)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return e?DC.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return DC.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&DC.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return!e&&!t?[]:Yle(e,t)}}ib.instanceCount=0;class nb extends q{constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new W),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new W),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new W({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,nb.instanceCount++,this._registry=this._register(new ib(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){nb.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const i=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return G2(i,null)}createById(e){return new RF(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,t){return new RF(this.onDidChange,()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=Ko),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),Ei.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}nb.instanceCount=0;class RF{constructor(e,t){this._onDidChangeLanguages=e,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new W({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var e;const t=this._selector();t!==this.languageId&&(this.languageId=t,(e=this._emitter)===null||e===void 0||e.fire(this.languageId))}}const sb={RESOURCES:"ResourceURLs",TEXT:qi.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"};function ede(o){const e=tde(o);if(e&&e.length>0)return new Uint32Array(e)}let Eo=0;const Sc=new Uint32Array(10);function tde(o){if(Eo=0,ja(o,Mx,4352),Eo>0||(ja(o,Ax,4449),Eo>0)||(ja(o,Rx,4520),Eo>0)||(ja(o,Ju,12593),Eo))return Sc.subarray(0,Eo);if(o>=44032&&o<=55203){const e=o-44032,t=e%588,i=Math.floor(e/588),n=Math.floor(t/28),s=t%28-1;if(i=0&&(s0)return Sc.subarray(0,Eo)}}function ja(o,e,t){o>=t&&o>8&&(Sc[Eo++]=o>>8&255),o>>16&&(Sc[Eo++]=o>>16&255))}const Mx=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),Ax=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),Rx=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),Ju=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]);function NA(...o){return function(e,t){for(let i=0,n=o.length;i0?[{start:0,end:e.length}]:[]:null}function s6(o,e){const t=e.toLowerCase().indexOf(o.toLowerCase());return t===-1?null:[{start:t,end:t+o.length}]}function o6(o,e){return UE(o.toLowerCase(),e.toLowerCase(),0,0)}function UE(o,e,t,i){if(t===o.length)return[];if(i===e.length)return null;if(o[t]===e[i]){let n=null;return(n=UE(o,e,t+1,i+1))?AA({start:i,end:i+1},n):null}return UE(o,e,t,i+1)}function TA(o){return 97<=o&&o<=122}function eL(o){return 65<=o&&o<=90}function MA(o){return 48<=o&&o<=57}function r6(o){return o===32||o===9||o===10||o===13}const a6=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(o=>a6.add(o.charCodeAt(0)));function Xw(o){return r6(o)||a6.has(o)}function PF(o,e){return o===e||Xw(o)&&Xw(e)}const Px=new Map;function OF(o){if(Px.has(o))return Px.get(o);let e;const t=ede(o);return t&&(e=t),Px.set(o,e),e}function l6(o){return TA(o)||eL(o)||MA(o)}function AA(o,e){return e.length===0?e=[o]:o.end===e[0].start?e[0].start=o.start:e.unshift(o),e}function d6(o,e){for(let t=e;t0&&!l6(o.charCodeAt(t-1)))return t}return o.length}function jE(o,e,t,i){if(t===o.length)return[];if(i===e.length)return null;if(o[t]!==e[i].toLowerCase())return null;{let n=null,s=i+1;for(n=jE(o,e,t+1,i+1);!n&&(s=d6(e,s)).6}function ode(o){const{upperPercent:e,lowerPercent:t,alphaPercent:i,numericPercent:n}=o;return t>.2&&e<.8&&i>.6&&n<.2}function rde(o){let e=0,t=0,i=0,n=0;for(let s=0;s60)return null;const t=nde(e);if(!ode(t)){if(!sde(t))return null;e=e.toLowerCase()}let i=null,n=0;for(o=o.toLowerCase();n0&&Xw(o.charCodeAt(t-1)))return t;return o.length}const lde=NA(ob,c6,s6),dde=NA(ob,c6,o6),FF=new Pu(1e4);function BF(o,e,t=!1){if(typeof o!="string"||typeof e!="string")return null;let i=FF.get(o);i||(i=new RegExp(tY(o),"i"),FF.set(o,i));const n=i.exec(e);return n?[{start:n.index,end:n.index+n[0].length}]:t?dde(o,e):lde(o,e)}function cde(o,e){const t=lg(o,o.toLowerCase(),0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return t?p0(t):null}function ude(o,e,t,i,n,s){const r=Math.min(13,o.length);for(;t"u")return[];const e=[],t=o[1];for(let i=o.length-1;i>1;i--){const n=o[i]+t,s=e[e.length-1];s&&s.end===n?s.end=n+1:e.push({start:n,end:n+1})}return e}const Ac=128;function RA(){const o=[],e=[];for(let t=0;t<=Ac;t++)e[t]=0;for(let t=0;t<=Ac;t++)o.push(e.slice(0));return o}function h6(o){const e=[];for(let t=0;t<=o;t++)e[t]=0;return e}const g6=h6(2*Ac),qE=h6(2*Ac),td=RA(),eh=RA(),xC=RA();function kC(o,e){if(e<0||e>=o.length)return!1;const t=o.codePointAt(e);switch(t){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!fM(t)}}function WF(o,e){if(e<0||e>=o.length)return!1;switch(o.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function T1(o,e,t){return e[o]!==t[o]}function hde(o,e,t,i,n,s,r=!1){for(;eAc?Ac:o.length,l=i.length>Ac?Ac:i.length;if(t>=a||s>=l||a-t>l-s||!hde(e,t,a,n,s,l,!0))return;gde(a,l,t,s,e,n);let d=1,c=1,u=t,h=s;const g=[!1];for(d=1,u=t;ub,E=I?eh[d][c-1]+(td[d][c-1]>0?-5:0):0,R=h>b+1&&td[d][c-1]>0,j=R?eh[d][c-2]+(td[d][c-2]>0?-5:0):0;if(R&&(!I||j>=E)&&(!x||j>=y))eh[d][c]=j,xC[d][c]=3,td[d][c]=0;else if(I&&(!x||E>=y))eh[d][c]=E,xC[d][c]=2,td[d][c]=0;else if(x)eh[d][c]=y,xC[d][c]=1,td[d][c]=td[d-1][c-1]+1;else throw new Error("not possible")}}if(!g[0]&&!r.firstMatchCanBeWeak)return;d--,c--;const f=[eh[d][c],s];let m=0,v=0;for(;d>=1;){let b=c;do{const C=xC[d][b];if(C===3)b=b-2;else if(C===2)b=b-1;else break}while(b>=1);m>1&&e[t+d-1]===n[s+c-1]&&!T1(b+s-1,i,n)&&m+1>td[d][b]&&(b=c),b===c?m++:m=1,v||(v=b),d--,c=b-1,f.push(c)}l===a&&r.boostFullMatch&&(f[0]+=2);const _=v-a;return f[0]-=_,f}function gde(o,e,t,i,n,s){let r=o-1,a=e-1;for(;r>=t&&a>=i;)n[r]===s[a]&&(qE[r]=a,r--),a--}function fde(o,e,t,i,n,s,r,a,l,d,c){if(e[t]!==s[r])return Number.MIN_SAFE_INTEGER;let u=1,h=!1;return r===t-i?u=o[t]===n[r]?7:5:T1(r,n,s)&&(r===0||!T1(r-1,n,s))?(u=o[t]===n[r]?7:5,h=!0):kC(s,r)&&(r===0||!kC(s,r-1))?u=5:(kC(s,r-1)||WF(s,r-1))&&(u=5,h=!0),u>1&&t===i&&(c[0]=!0),h||(h=T1(r,n,s)||kC(s,r-1)||WF(s,r-1)),t===i?r>l&&(u-=h?3:5):d?u+=h?2:0:u+=h?0:1,r+1===a&&(u-=h?3:5),u}function pde(o,e,t,i,n,s,r){return mde(o,e,t,i,n,s,!0,r)}function mde(o,e,t,i,n,s,r,a){let l=lg(o,e,t,i,n,s,a);if(o.length>=3){const d=Math.min(7,o.length-1);for(let c=t+1;cl[0])&&(l=h))}}}return l}function _de(o,e){if(e+1>=o.length)return;const t=o[e],i=o[e+1];if(t!==i)return o.slice(0,e)+i+t+o.slice(e+2)}const vde="$(",PA=new RegExp(`\\$\\(${Ue.iconNameExpression}(?:${Ue.iconModifierExpression})?\\)`,"g"),bde=new RegExp(`(\\\\)?${PA.source}`,"g");function Cde(o){return o.replace(bde,(e,t)=>t?e:`\\${e}`)}const wde=new RegExp(`\\\\${PA.source}`,"g");function Sde(o){return o.replace(wde,e=>`\\${e}`)}const yde=new RegExp(`(\\s)?(\\\\)?${PA.source}(\\s)?`,"g");function OA(o){return o.indexOf(vde)===-1?o:o.replace(yde,(e,t,i,n)=>i?e:t||n||"")}function Lde(o){return o?o.replace(/\$\((.*?)\)/g,(e,t)=>` ${t} `).trim():""}const Ox=new RegExp(`\\$\\(${Ue.iconNameCharacter}+\\)`,"g");function x_(o){Ox.lastIndex=0;let e="";const t=[];let i=0;for(;;){const n=Ox.lastIndex,s=Ox.exec(o),r=o.substring(n,s==null?void 0:s.index);if(r.length>0){e+=r;for(let a=0;a" ".repeat(n.length)).replace(/\>/gm,"\\>").replace(/\n/g,t===1?`\\ +`;var Zle=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Yle=function(o,e){return function(t,i){e(t,i,o)}};let $E=class extends q{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=q.None,this.contextView=this._register(new zp(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer(()=>this.layout()))}showContextView(e,t,i){let n;t?t===this.layoutService.getContainer(Je(t))?n=1:i?n=3:n=2:n=1,this.contextView.setContainer(t??this.layoutService.activeContainer,n),this.contextView.show(e);const s=je(()=>{this.currentViewDisposable===s&&this.hideContextView()});return this.currentViewDisposable=s,s}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}dispose(){super.dispose(),this.currentViewDisposable.dispose(),this.currentViewDisposable=q.None}};$E=Zle([Yle(0,wm)],$E);let $p=[],EA=[],i6=[];function LC(o,e=!1){Xle(o,!1,e)}function Xle(o,e,t){const i=Qle(o,e);$p.push(i),i.userConfigured?i6.push(i):EA.push(i),t&&!i.userConfigured&&$p.forEach(n=>{n.mime===i.mime||n.userConfigured||(i.extension&&n.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&n.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&n.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&n.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))})}function Qle(o,e){return{id:o.id,mime:o.mime,filename:o.filename,extension:o.extension,filepattern:o.filepattern,firstline:o.firstline,userConfigured:e,filenameLowercase:o.filename?o.filename.toLowerCase():void 0,extensionLowercase:o.extension?o.extension.toLowerCase():void 0,filepatternLowercase:o.filepattern?ZB(o.filepattern.toLowerCase()):void 0,filepatternOnPath:o.filepattern?o.filepattern.indexOf(hn.sep)>=0:!1}}function Jle(){$p=$p.filter(o=>o.userConfigured),EA=[]}function ede(o,e){return tde(o,e).map(t=>t.id)}function tde(o,e){let t;if(o)switch(o.scheme){case ot.file:t=o.fsPath;break;case ot.data:{t=pu.parseMetaData(o).get(pu.META_DATA_LABEL);break}case ot.vscodeNotebookCell:t=void 0;break;default:t=o.path}if(!t)return[{id:"unknown",mime:qi.unknown}];t=t.toLowerCase();const i=Vc(t),n=MF(t,i,i6);if(n)return[n,{id:Ko,mime:qi.text}];const s=MF(t,i,EA);if(s)return[s,{id:Ko,mime:qi.text}];if(e){const r=ide(e);if(r)return[r,{id:Ko,mime:qi.text}]}return[{id:"unknown",mime:qi.unknown}]}function MF(o,e,t){var i;let n,s,r;for(let a=t.length-1;a>=0;a--){const l=t[a];if(e===l.filenameLowercase){n=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){const d=l.filepatternOnPath?o:e;!((i=l.filepatternLowercase)===null||i===void 0)&&i.call(l,d)&&(s=l)}l.extension&&(!r||l.extension.length>r.extension.length)&&e.endsWith(l.extensionLowercase)&&(r=l)}if(n)return n;if(s)return s;if(r)return r}function ide(o){if(pM(o)&&(o=o.substr(1)),o.length>0)for(let e=$p.length-1;e>=0;e--){const t=$p[e];if(!t.firstline)continue;const i=o.match(t.firstline);if(i&&i.length>0)return t}}const DC=Object.prototype.hasOwnProperty,AF="vs.editor.nullLanguage";class nde{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(AF,0),this._register(Ko,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||AF}}class ib extends q{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new W),this.onDidChange=this._onDidChange.event,ib.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new nde,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(Ip.onDidChangeLanguages(i=>{this._initializeFromRegistry()})))}dispose(){ib.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Jle();const e=[].concat(Ip.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(t=>{const i=this._languages[t];i.name&&(this._nameMap[i.name]=i.identifier),i.aliases.forEach(n=>{this._lowercaseNameMap[n.toLowerCase()]=i.identifier}),i.mimetypes.forEach(n=>{this._mimeTypesMap[n]=i.identifier})}),xi.as(Va.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;DC.call(this._languages,t)?i=this._languages[t]:(this.languageIdCodec.register(t),i={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const a of t.extensions)LC({id:i,mime:n,extension:a},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const a of t.filenames)LC({id:i,mime:n,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(const a of t.filenamePatterns)LC({id:i,mime:n,filepattern:a},this._warnOnOverwrite);if(typeof t.firstLine=="string"&&t.firstLine.length>0){let a=t.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{const l=new RegExp(a);aY(l)||LC({id:i,mime:n,firstline:l},this._warnOnOverwrite)}catch(l){console.warn(`[${t.id}]: Invalid regular expression \`${a}\`: `,l)}}e.aliases.push(i);let s=null;if(typeof t.aliases<"u"&&Array.isArray(t.aliases)&&(t.aliases.length===0?s=[null]:s=t.aliases),s!==null)for(const a of s)!a||a.length===0||e.aliases.push(a);const r=s!==null&&s.length>0;if(!(r&&s[0]===null)){const a=(r?s[0]:null)||i;(r||!e.name)&&(e.name=a)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return e?DC.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return DC.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&DC.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return!e&&!t?[]:ede(e,t)}}ib.instanceCount=0;class nb extends q{constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new W),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new W),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new W({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,nb.instanceCount++,this._registry=this._register(new ib(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){nb.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const i=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return G2(i,null)}createById(e){return new RF(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,t){return new RF(this.onDidChange,()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=Ko),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),Ei.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}nb.instanceCount=0;class RF{constructor(e,t){this._onDidChangeLanguages=e,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new W({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var e;const t=this._selector();t!==this.languageId&&(this.languageId=t,(e=this._emitter)===null||e===void 0||e.fire(this.languageId))}}const sb={RESOURCES:"ResourceURLs",TEXT:qi.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"};function sde(o){const e=ode(o);if(e&&e.length>0)return new Uint32Array(e)}let Eo=0;const Sc=new Uint32Array(10);function ode(o){if(Eo=0,ja(o,Mx,4352),Eo>0||(ja(o,Ax,4449),Eo>0)||(ja(o,Rx,4520),Eo>0)||(ja(o,Ju,12593),Eo))return Sc.subarray(0,Eo);if(o>=44032&&o<=55203){const e=o-44032,t=e%588,i=Math.floor(e/588),n=Math.floor(t/28),s=t%28-1;if(i=0&&(s0)return Sc.subarray(0,Eo)}}function ja(o,e,t){o>=t&&o>8&&(Sc[Eo++]=o>>8&255),o>>16&&(Sc[Eo++]=o>>16&255))}const Mx=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),Ax=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),Rx=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),Ju=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]);function NA(...o){return function(e,t){for(let i=0,n=o.length;i0?[{start:0,end:e.length}]:[]:null}function s6(o,e){const t=e.toLowerCase().indexOf(o.toLowerCase());return t===-1?null:[{start:t,end:t+o.length}]}function o6(o,e){return UE(o.toLowerCase(),e.toLowerCase(),0,0)}function UE(o,e,t,i){if(t===o.length)return[];if(i===e.length)return null;if(o[t]===e[i]){let n=null;return(n=UE(o,e,t+1,i+1))?AA({start:i,end:i+1},n):null}return UE(o,e,t,i+1)}function TA(o){return 97<=o&&o<=122}function eL(o){return 65<=o&&o<=90}function MA(o){return 48<=o&&o<=57}function r6(o){return o===32||o===9||o===10||o===13}const a6=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(o=>a6.add(o.charCodeAt(0)));function Xw(o){return r6(o)||a6.has(o)}function PF(o,e){return o===e||Xw(o)&&Xw(e)}const Px=new Map;function OF(o){if(Px.has(o))return Px.get(o);let e;const t=sde(o);return t&&(e=t),Px.set(o,e),e}function l6(o){return TA(o)||eL(o)||MA(o)}function AA(o,e){return e.length===0?e=[o]:o.end===e[0].start?e[0].start=o.start:e.unshift(o),e}function d6(o,e){for(let t=e;t0&&!l6(o.charCodeAt(t-1)))return t}return o.length}function jE(o,e,t,i){if(t===o.length)return[];if(i===e.length)return null;if(o[t]!==e[i].toLowerCase())return null;{let n=null,s=i+1;for(n=jE(o,e,t+1,i+1);!n&&(s=d6(e,s)).6}function dde(o){const{upperPercent:e,lowerPercent:t,alphaPercent:i,numericPercent:n}=o;return t>.2&&e<.8&&i>.6&&n<.2}function cde(o){let e=0,t=0,i=0,n=0;for(let s=0;s60)return null;const t=ade(e);if(!dde(t)){if(!lde(t))return null;e=e.toLowerCase()}let i=null,n=0;for(o=o.toLowerCase();n0&&Xw(o.charCodeAt(t-1)))return t;return o.length}const hde=NA(ob,c6,s6),gde=NA(ob,c6,o6),FF=new Pu(1e4);function BF(o,e,t=!1){if(typeof o!="string"||typeof e!="string")return null;let i=FF.get(o);i||(i=new RegExp(oY(o),"i"),FF.set(o,i));const n=i.exec(e);return n?[{start:n.index,end:n.index+n[0].length}]:t?gde(o,e):hde(o,e)}function fde(o,e){const t=lg(o,o.toLowerCase(),0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return t?p0(t):null}function pde(o,e,t,i,n,s){const r=Math.min(13,o.length);for(;t"u")return[];const e=[],t=o[1];for(let i=o.length-1;i>1;i--){const n=o[i]+t,s=e[e.length-1];s&&s.end===n?s.end=n+1:e.push({start:n,end:n+1})}return e}const Ac=128;function RA(){const o=[],e=[];for(let t=0;t<=Ac;t++)e[t]=0;for(let t=0;t<=Ac;t++)o.push(e.slice(0));return o}function h6(o){const e=[];for(let t=0;t<=o;t++)e[t]=0;return e}const g6=h6(2*Ac),qE=h6(2*Ac),td=RA(),eh=RA(),xC=RA();function kC(o,e){if(e<0||e>=o.length)return!1;const t=o.codePointAt(e);switch(t){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!fM(t)}}function WF(o,e){if(e<0||e>=o.length)return!1;switch(o.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function T1(o,e,t){return e[o]!==t[o]}function mde(o,e,t,i,n,s,r=!1){for(;eAc?Ac:o.length,l=i.length>Ac?Ac:i.length;if(t>=a||s>=l||a-t>l-s||!mde(e,t,a,n,s,l,!0))return;_de(a,l,t,s,e,n);let d=1,c=1,u=t,h=s;const g=[!1];for(d=1,u=t;ub,E=I?eh[d][c-1]+(td[d][c-1]>0?-5:0):0,R=h>b+1&&td[d][c-1]>0,j=R?eh[d][c-2]+(td[d][c-2]>0?-5:0):0;if(R&&(!I||j>=E)&&(!x||j>=y))eh[d][c]=j,xC[d][c]=3,td[d][c]=0;else if(I&&(!x||E>=y))eh[d][c]=E,xC[d][c]=2,td[d][c]=0;else if(x)eh[d][c]=y,xC[d][c]=1,td[d][c]=td[d-1][c-1]+1;else throw new Error("not possible")}}if(!g[0]&&!r.firstMatchCanBeWeak)return;d--,c--;const f=[eh[d][c],s];let m=0,v=0;for(;d>=1;){let b=c;do{const C=xC[d][b];if(C===3)b=b-2;else if(C===2)b=b-1;else break}while(b>=1);m>1&&e[t+d-1]===n[s+c-1]&&!T1(b+s-1,i,n)&&m+1>td[d][b]&&(b=c),b===c?m++:m=1,v||(v=b),d--,c=b-1,f.push(c)}l===a&&r.boostFullMatch&&(f[0]+=2);const _=v-a;return f[0]-=_,f}function _de(o,e,t,i,n,s){let r=o-1,a=e-1;for(;r>=t&&a>=i;)n[r]===s[a]&&(qE[r]=a,r--),a--}function vde(o,e,t,i,n,s,r,a,l,d,c){if(e[t]!==s[r])return Number.MIN_SAFE_INTEGER;let u=1,h=!1;return r===t-i?u=o[t]===n[r]?7:5:T1(r,n,s)&&(r===0||!T1(r-1,n,s))?(u=o[t]===n[r]?7:5,h=!0):kC(s,r)&&(r===0||!kC(s,r-1))?u=5:(kC(s,r-1)||WF(s,r-1))&&(u=5,h=!0),u>1&&t===i&&(c[0]=!0),h||(h=T1(r,n,s)||kC(s,r-1)||WF(s,r-1)),t===i?r>l&&(u-=h?3:5):d?u+=h?2:0:u+=h?0:1,r+1===a&&(u-=h?3:5),u}function bde(o,e,t,i,n,s,r){return Cde(o,e,t,i,n,s,!0,r)}function Cde(o,e,t,i,n,s,r,a){let l=lg(o,e,t,i,n,s,a);if(o.length>=3){const d=Math.min(7,o.length-1);for(let c=t+1;cl[0])&&(l=h))}}}return l}function wde(o,e){if(e+1>=o.length)return;const t=o[e],i=o[e+1];if(t!==i)return o.slice(0,e)+i+t+o.slice(e+2)}const Sde="$(",PA=new RegExp(`\\$\\(${Ue.iconNameExpression}(?:${Ue.iconModifierExpression})?\\)`,"g"),yde=new RegExp(`(\\\\)?${PA.source}`,"g");function Lde(o){return o.replace(yde,(e,t)=>t?e:`\\${e}`)}const Dde=new RegExp(`\\\\${PA.source}`,"g");function xde(o){return o.replace(Dde,e=>`\\${e}`)}const kde=new RegExp(`(\\s)?(\\\\)?${PA.source}(\\s)?`,"g");function OA(o){return o.indexOf(Sde)===-1?o:o.replace(kde,(e,t,i,n)=>i?e:t||n||"")}function Ide(o){return o?o.replace(/\$\((.*?)\)/g,(e,t)=>` ${t} `).trim():""}const Ox=new RegExp(`\\$\\(${Ue.iconNameCharacter}+\\)`,"g");function x_(o){Ox.lastIndex=0;let e="";const t=[];let i=0;for(;;){const n=Ox.lastIndex,s=Ox.exec(o),r=o.substring(n,s==null?void 0:s.index);if(r.length>0){e+=r;for(let a=0;a" ".repeat(n.length)).replace(/\>/gm,"\\>").replace(/\n/g,t===1?`\\ `:` `),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+=` -`,this.value+=t,this.value+="\n```\n",this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp(qo(t),"g");return e.replace(i,(n,s)=>e.charAt(s-1)!=="\\"?`\\${n}`:n)}}function Up(o){return jc(o)?!o.value:Array.isArray(o)?o.every(Up):!0}function jc(o){return o instanceof as?!0:o&&typeof o=="object"?typeof o.value=="string"&&(typeof o.isTrusted=="boolean"||typeof o.isTrusted=="object"||o.isTrusted===void 0)&&(typeof o.supportThemeIcons=="boolean"||o.supportThemeIcons===void 0):!1}function Dde(o,e){return o===e?!0:!o||!e?!1:o.value===e.value&&o.isTrusted===e.isTrusted&&o.supportThemeIcons===e.supportThemeIcons&&o.supportHtml===e.supportHtml&&(o.baseUri===e.baseUri||!!o.baseUri&&!!e.baseUri&&dA(ze.from(o.baseUri),ze.from(e.baseUri)))}function xde(o){return o.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}function IC(o){return o.replace(/"/g,""")}function Bx(o){return o&&o.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}function kde(o){const e=[],t=o.split("|").map(n=>n.trim());o=t[0];const i=t[1];if(i){const n=/height=(\d+)/.exec(i),s=/width=(\d+)/.exec(i),r=n?n[1]:"",a=s?s[1]:"",l=isFinite(parseInt(a)),d=isFinite(parseInt(r));l&&e.push(`width="${a}"`),d&&e.push(`height="${r}"`)}return{href:o,dimensions:e}}function Ide(o,e){As(e)?o.title=OA(e):e!=null&&e.markdownNotSupportedFallback?o.title=e.markdownNotSupportedFallback:o.removeAttribute("title")}class Ede{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}async update(e,t,i){var n;if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let s;if(e===void 0||As(e)||e instanceof HTMLElement)s=e;else if(!_v(e.markdown))s=(n=e.markdown)!==null&&n!==void 0?n:e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(p("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new tn;const r=this._cancellationTokenSource.token;if(s=await e.markdown(r),s===void 0&&(s=e.markdownNotSupportedFallback),this.isDisposed||r.isCancellationRequested)return}this.show(s,t,i)}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const s={content:e,target:this.target,appearance:{showPointer:this.hoverDelegate.placement==="element",skipFadeInAnimation:!this.fadeInAnimation||!!n},position:{hoverPosition:2},...i};this._hoverWidget=this.hoverDelegate.showHover(s,t)}n==null||n.dispose()}hasContent(e){return e?jc(e)?!!e.value:!0:!1}get isDisposed(){var e;return(e=this._hoverWidget)===null||e===void 0?void 0:e.isDisposed}dispose(){var e,t;(e=this._hoverWidget)===null||e===void 0||e.dispose(),(t=this._cancellationTokenSource)===null||t===void 0||t.dispose(!0),this._cancellationTokenSource=void 0}}function f6(o,e,t,i){let n,s;const r=(g,f)=>{var m;const v=s!==void 0;g&&(s==null||s.dispose(),s=void 0),f&&(n==null||n.dispose(),n=void 0),v&&((m=o.onDidHideHover)===null||m===void 0||m.call(o))},a=(g,f,m)=>new qr(async()=>{(!s||s.isDisposed)&&(s=new Ede(o,m||e,g>0),await s.update(t,f,i))},g),l=()=>{if(n)return;const g=new de,f=_=>r(!1,_.fromElement===e);g.add(J(e,Se.MOUSE_LEAVE,f,!0));const m=()=>r(!0,!0);g.add(J(e,Se.MOUSE_DOWN,m,!0));const v={targetElements:[e],dispose:()=>{}};if(o.placement===void 0||o.placement==="mouse"){const _=b=>{v.x=b.x+10,b.target instanceof HTMLElement&&b.target.classList.contains("action-label")&&r(!0,!0)};g.add(J(e,Se.MOUSE_MOVE,_,!0))}g.add(a(o.delay,!1,v)),n=g},d=J(e,Se.MOUSE_OVER,l,!0),c=()=>{if(n)return;const g={targetElements:[e],dispose:()=>{}},f=new de,m=()=>r(!0,!0);f.add(J(e,Se.BLUR,m,!0)),f.add(a(o.delay,!1,g)),n=f},u=J(e,Se.FOCUS,c,!0);return{show:g=>{r(!1,!0),a(0,g)},hide:()=>{r(!0,!0)},update:async(g,f)=>{t=g,await(s==null?void 0:s.update(t,void 0,f))},dispose:()=>{d.dispose(),u.dispose(),r(!0,!0)}}}function Nde(o,e={}){const t=FA(e);return t.textContent=o,t}function Tde(o,e={}){const t=FA(e);return p6(t,Ade(o,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),t}function FA(o){const e=o.inline?"span":"div",t=document.createElement(e);return o.className&&(t.className=o.className),t}class Mde{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function p6(o,e,t,i){let n;if(e.type===2)n=document.createTextNode(e.content||"");else if(e.type===3)n=document.createElement("b");else if(e.type===4)n=document.createElement("i");else if(e.type===7&&i)n=document.createElement("code");else if(e.type===5&&t){const s=document.createElement("a");t.disposables.add(Wi(s,"click",r=>{t.callback(String(e.index),r)})),n=s}else e.type===8?n=document.createElement("br"):e.type===1&&(n=o);n&&o!==n&&o.appendChild(n),n&&Array.isArray(e.children)&&e.children.forEach(s=>{p6(n,s,t,i)})}function Ade(o,e){const t={type:1,children:[]};let i=0,n=t;const s=[],r=new Mde(o);for(;!r.eos();){let a=r.next();const l=a==="\\"&&GE(r.peek(),e)!==0;if(l&&(a=r.next()),!l&&Rde(a,e)&&a===r.peek()){r.advance(),n.type===2&&(n=s.pop());const d=GE(a,e);if(n.type===d||n.type===5&&d===6)n=s.pop();else{const c={type:d,children:[]};d===5&&(c.index=i,i++),n.children.push(c),s.push(n),n=c}}else if(a===` -`)n.type===2&&(n=s.pop()),n.children.push({type:8});else if(n.type!==2){const d={type:2,content:a};n.children.push(d),s.push(n),n=d}else n.content+=a}return n.type===2&&(n=s.pop()),t}function Rde(o,e){return GE(o,e)!==0}function GE(o,e){switch(o){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}const Pde=new RegExp(`(\\\\)?\\$\\((${Ue.iconNameExpression}(?:${Ue.iconModifierExpression})?)\\)`,"g");function Kc(o){const e=new Array;let t,i=0,n=0;for(;(t=Pde.exec(o))!==null;){n=t.index||0,ige.length)&&(te=ge.length);for(var ee=0,A=new Array(te);ee=ge.length?{done:!0}:{done:!1,value:ge[A++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +`,this.value+=t,this.value+="\n```\n",this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp(qo(t),"g");return e.replace(i,(n,s)=>e.charAt(s-1)!=="\\"?`\\${n}`:n)}}function Up(o){return jc(o)?!o.value:Array.isArray(o)?o.every(Up):!0}function jc(o){return o instanceof as?!0:o&&typeof o=="object"?typeof o.value=="string"&&(typeof o.isTrusted=="boolean"||typeof o.isTrusted=="object"||o.isTrusted===void 0)&&(typeof o.supportThemeIcons=="boolean"||o.supportThemeIcons===void 0):!1}function Ede(o,e){return o===e?!0:!o||!e?!1:o.value===e.value&&o.isTrusted===e.isTrusted&&o.supportThemeIcons===e.supportThemeIcons&&o.supportHtml===e.supportHtml&&(o.baseUri===e.baseUri||!!o.baseUri&&!!e.baseUri&&dA(ze.from(o.baseUri),ze.from(e.baseUri)))}function Nde(o){return o.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}function IC(o){return o.replace(/"/g,""")}function Bx(o){return o&&o.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}function Tde(o){const e=[],t=o.split("|").map(n=>n.trim());o=t[0];const i=t[1];if(i){const n=/height=(\d+)/.exec(i),s=/width=(\d+)/.exec(i),r=n?n[1]:"",a=s?s[1]:"",l=isFinite(parseInt(a)),d=isFinite(parseInt(r));l&&e.push(`width="${a}"`),d&&e.push(`height="${r}"`)}return{href:o,dimensions:e}}function Mde(o,e){As(e)?o.title=OA(e):e!=null&&e.markdownNotSupportedFallback?o.title=e.markdownNotSupportedFallback:o.removeAttribute("title")}class Ade{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}async update(e,t,i){var n;if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let s;if(e===void 0||As(e)||e instanceof HTMLElement)s=e;else if(!_v(e.markdown))s=(n=e.markdown)!==null&&n!==void 0?n:e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(p("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new tn;const r=this._cancellationTokenSource.token;if(s=await e.markdown(r),s===void 0&&(s=e.markdownNotSupportedFallback),this.isDisposed||r.isCancellationRequested)return}this.show(s,t,i)}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const s={content:e,target:this.target,appearance:{showPointer:this.hoverDelegate.placement==="element",skipFadeInAnimation:!this.fadeInAnimation||!!n},position:{hoverPosition:2},...i};this._hoverWidget=this.hoverDelegate.showHover(s,t)}n==null||n.dispose()}hasContent(e){return e?jc(e)?!!e.value:!0:!1}get isDisposed(){var e;return(e=this._hoverWidget)===null||e===void 0?void 0:e.isDisposed}dispose(){var e,t;(e=this._hoverWidget)===null||e===void 0||e.dispose(),(t=this._cancellationTokenSource)===null||t===void 0||t.dispose(!0),this._cancellationTokenSource=void 0}}function f6(o,e,t,i){let n,s;const r=(g,f)=>{var m;const v=s!==void 0;g&&(s==null||s.dispose(),s=void 0),f&&(n==null||n.dispose(),n=void 0),v&&((m=o.onDidHideHover)===null||m===void 0||m.call(o))},a=(g,f,m)=>new qr(async()=>{(!s||s.isDisposed)&&(s=new Ade(o,m||e,g>0),await s.update(t,f,i))},g),l=()=>{if(n)return;const g=new de,f=_=>r(!1,_.fromElement===e);g.add(J(e,Se.MOUSE_LEAVE,f,!0));const m=()=>r(!0,!0);g.add(J(e,Se.MOUSE_DOWN,m,!0));const v={targetElements:[e],dispose:()=>{}};if(o.placement===void 0||o.placement==="mouse"){const _=b=>{v.x=b.x+10,b.target instanceof HTMLElement&&b.target.classList.contains("action-label")&&r(!0,!0)};g.add(J(e,Se.MOUSE_MOVE,_,!0))}g.add(a(o.delay,!1,v)),n=g},d=J(e,Se.MOUSE_OVER,l,!0),c=()=>{if(n)return;const g={targetElements:[e],dispose:()=>{}},f=new de,m=()=>r(!0,!0);f.add(J(e,Se.BLUR,m,!0)),f.add(a(o.delay,!1,g)),n=f},u=J(e,Se.FOCUS,c,!0);return{show:g=>{r(!1,!0),a(0,g)},hide:()=>{r(!0,!0)},update:async(g,f)=>{t=g,await(s==null?void 0:s.update(t,void 0,f))},dispose:()=>{d.dispose(),u.dispose(),r(!0,!0)}}}function Rde(o,e={}){const t=FA(e);return t.textContent=o,t}function Pde(o,e={}){const t=FA(e);return p6(t,Fde(o,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),t}function FA(o){const e=o.inline?"span":"div",t=document.createElement(e);return o.className&&(t.className=o.className),t}class Ode{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function p6(o,e,t,i){let n;if(e.type===2)n=document.createTextNode(e.content||"");else if(e.type===3)n=document.createElement("b");else if(e.type===4)n=document.createElement("i");else if(e.type===7&&i)n=document.createElement("code");else if(e.type===5&&t){const s=document.createElement("a");t.disposables.add(Wi(s,"click",r=>{t.callback(String(e.index),r)})),n=s}else e.type===8?n=document.createElement("br"):e.type===1&&(n=o);n&&o!==n&&o.appendChild(n),n&&Array.isArray(e.children)&&e.children.forEach(s=>{p6(n,s,t,i)})}function Fde(o,e){const t={type:1,children:[]};let i=0,n=t;const s=[],r=new Ode(o);for(;!r.eos();){let a=r.next();const l=a==="\\"&&GE(r.peek(),e)!==0;if(l&&(a=r.next()),!l&&Bde(a,e)&&a===r.peek()){r.advance(),n.type===2&&(n=s.pop());const d=GE(a,e);if(n.type===d||n.type===5&&d===6)n=s.pop();else{const c={type:d,children:[]};d===5&&(c.index=i,i++),n.children.push(c),s.push(n),n=c}}else if(a===` +`)n.type===2&&(n=s.pop()),n.children.push({type:8});else if(n.type!==2){const d={type:2,content:a};n.children.push(d),s.push(n),n=d}else n.content+=a}return n.type===2&&(n=s.pop()),t}function Bde(o,e){return GE(o,e)!==0}function GE(o,e){switch(o){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}const Wde=new RegExp(`(\\\\)?\\$\\((${Ue.iconNameExpression}(?:${Ue.iconModifierExpression})?)\\)`,"g");function Kc(o){const e=new Array;let t,i=0,n=0;for(;(t=Wde.exec(o))!==null;){n=t.index||0,ige.length)&&(te=ge.length);for(var ee=0,A=new Array(te);ee=ge.length?{done:!0}:{done:!1,value:ge[A++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.defaults=a();function l(ge){e.defaults=ge}var d=/[&<>"']/,c=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,h=/[<>"']|&(?!#?\w+;)/g,g={"&":"&","<":"<",">":">",'"':""","'":"'"},f=function(te){return g[te]};function m(ge,te){if(te){if(d.test(ge))return ge.replace(c,f)}else if(u.test(ge))return ge.replace(h,f);return ge}var v=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function _(ge){return ge.replace(v,function(te,ee){return ee=ee.toLowerCase(),ee==="colon"?":":ee.charAt(0)==="#"?ee.charAt(1)==="x"?String.fromCharCode(parseInt(ee.substring(2),16)):String.fromCharCode(+ee.substring(1)):""})}var b=/(^|[^\[])\^/g;function C(ge,te){ge=typeof ge=="string"?ge:ge.source,te=te||"";var ee={replace:function(F,X){return X=X.source||X,X=X.replace(b,"$1"),ge=ge.replace(F,X),ee},getRegex:function(){return new RegExp(ge,te)}};return ee}var w=/[^\w:]/g,S=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function x(ge,te,ee){if(ge){var A;try{A=decodeURIComponent(_(ee)).replace(w,"").toLowerCase()}catch{return null}if(A.indexOf("javascript:")===0||A.indexOf("vbscript:")===0||A.indexOf("data:")===0)return null}te&&!S.test(ee)&&(ee=j(te,ee));try{ee=encodeURI(ee).replace(/%25/g,"%")}catch{return null}return ee}var y={},I=/^[^:]+:\/*[^/]*$/,E=/^([^:]+:)[\s\S]*$/,R=/^([^:]+:\/*[^/]*)[\s\S]*$/;function j(ge,te){y[" "+ge]||(I.test(ge)?y[" "+ge]=ge+"/":y[" "+ge]=oe(ge,"/",!0)),ge=y[" "+ge];var ee=ge.indexOf(":")===-1;return te.substring(0,2)==="//"?ee?te:ge.replace(E,"$1")+te:te.charAt(0)==="/"?ee?te:ge.replace(R,"$1")+te:ge+te}var O={exec:function(){}};function $(ge){for(var te=1,ee,A;te=0&&fe[He]==="\\";)Ne=!Ne;return Ne?"|":" |"}),A=ee.split(/ \|/),F=0;if(A[0].trim()||A.shift(),A.length>0&&!A[A.length-1].trim()&&A.pop(),A.length>te)A.splice(te);else for(;A.length1;)te&1&&(ee+=ge),te>>=1,ge+=ge;return ee+ge}function V(ge,te,ee,A){var F=te.href,X=te.title?m(te.title):null,U=ge[1].replace(/\\([\[\]])/g,"$1");if(ge[0].charAt(0)!=="!"){A.state.inLink=!0;var fe={type:"link",raw:ee,href:F,title:X,text:U,tokens:A.inlineTokens(U)};return A.state.inLink=!1,fe}return{type:"image",raw:ee,href:F,title:X,text:m(U)}}function Q(ge,te){var ee=ge.match(/^(\s+)(?:```)/);if(ee===null)return te;var A=ee[1];return te.split(` `).map(function(F){var X=F.match(/^\s+/);if(X===null)return F;var U=X[0];return U.length>=A.length?F.slice(A.length):F}).join(` `)}var H=function(){function ge(ee){this.options=ee||e.defaults}var te=ge.prototype;return te.space=function(A){var F=this.rules.block.newline.exec(A);if(F&&F[0].length>0)return{type:"space",raw:F[0]}},te.code=function(A){var F=this.rules.block.code.exec(A);if(F){var X=F[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:F[0],codeBlockStyle:"indented",text:this.options.pedantic?X:oe(X,` @@ -187,16 +187,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `)},te.strong=function(A){return""+A+""},te.em=function(A){return""+A+""},te.codespan=function(A){return""+A+""},te.br=function(){return this.options.xhtml?"
":"
"},te.del=function(A){return""+A+""},te.link=function(A,F,X){if(A=x(this.options.sanitize,this.options.baseUrl,A),A===null)return X;var U='",U},te.image=function(A,F,X){if(A=x(this.options.sanitize,this.options.baseUrl,A),A===null)return X;var U=''+X+'":">",U},te.text=function(A){return A},ge}(),re=function(){function ge(){}var te=ge.prototype;return te.strong=function(A){return A},te.em=function(A){return A},te.codespan=function(A){return A},te.del=function(A){return A},te.html=function(A){return A},te.text=function(A){return A},te.link=function(A,F,X){return""+X},te.image=function(A,F,X){return""+X},te.br=function(){return""},ge}(),ke=function(){function ge(){this.seen={}}var te=ge.prototype;return te.serialize=function(A){return A.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},te.getNextSafeSlug=function(A,F){var X=A,U=0;if(this.seen.hasOwnProperty(X)){U=this.seen[A];do U++,X=A+"-"+U;while(this.seen.hasOwnProperty(X))}return F||(this.seen[A]=U,this.seen[X]=0),X},te.slug=function(A,F){F===void 0&&(F={});var X=this.serialize(A);return this.getNextSafeSlug(X,F.dryrun)},ge}(),ce=function(){function ge(ee){this.options=ee||e.defaults,this.options.renderer=this.options.renderer||new Ce,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new re,this.slugger=new ke}ge.parse=function(A,F){var X=new ge(F);return X.parse(A)},ge.parseInline=function(A,F){var X=new ge(F);return X.parseInline(A)};var te=ge.prototype;return te.parse=function(A,F){F===void 0&&(F=!0);var X="",U,fe,Ne,He,Ke,ht,lt,oi,Qt,et,Vi,Hi,xr,Ut,pn,Ku,qu,Jr,ec,Gu=A.length;for(U=0;U0&&pn.tokens[0].type==="paragraph"?(pn.tokens[0].text=Jr+" "+pn.tokens[0].text,pn.tokens[0].tokens&&pn.tokens[0].tokens.length>0&&pn.tokens[0].tokens[0].type==="text"&&(pn.tokens[0].tokens[0].text=Jr+" "+pn.tokens[0].tokens[0].text)):pn.tokens.unshift({type:"text",text:Jr}):Ut+=Jr),Ut+=this.parse(pn.tokens,xr),Qt+=this.renderer.listitem(Ut,qu,Ku);X+=this.renderer.list(Qt,Vi,Hi);continue}case"html":{X+=this.renderer.html(et.text);continue}case"paragraph":{X+=this.renderer.paragraph(this.parseInline(et.tokens));continue}case"text":{for(Qt=et.tokens?this.parseInline(et.tokens):et.text;U+1"u"||ge===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ge!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ge)+", string expected");if(typeof te=="function"&&(ee=te,te=null),te=$({},Ie.defaults,te||{}),he(te),ee){var A=te.highlight,F;try{F=Bt.lex(ge,te)}catch(He){return ee(He)}var X=function(Ke){var ht;if(!Ke)try{te.walkTokens&&Ie.walkTokens(F,te.walkTokens),ht=ce.parse(F,te)}catch(lt){Ke=lt}return te.highlight=A,Ke?ee(Ke):ee(null,ht)};if(!A||A.length<3||(delete te.highlight,!F.length))return X();var U=0;Ie.walkTokens(F,function(He){He.type==="code"&&(U++,setTimeout(function(){A(He.text,He.lang,function(Ke,ht){if(Ke)return X(Ke);ht!=null&&ht!==He.text&&(He.text=ht,He.escaped=!0),U--,U===0&&X()})},0))}),U===0&&X();return}function fe(He){if(He.message+=` Please report this to https://github.com/markedjs/marked.`,te.silent)return"

An error occurred:

"+m(He.message+"",!0)+"
";throw He}try{var Ne=Bt.lex(ge,te);if(te.walkTokens){if(te.async)return Promise.all(Ie.walkTokens(Ne,te.walkTokens)).then(function(){return ce.parse(Ne,te)}).catch(fe);Ie.walkTokens(Ne,te.walkTokens)}return ce.parse(Ne,te)}catch(He){fe(He)}}Ie.options=Ie.setOptions=function(ge){return $(Ie.defaults,ge),l(Ie.defaults),Ie},Ie.getDefaults=a,Ie.defaults=e.defaults,Ie.use=function(){for(var ge=arguments.length,te=new Array(ge),ee=0;ee"u"||ge===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof ge!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(ge)+", string expected");te=$({},Ie.defaults,te||{}),he(te);try{var ee=Bt.lexInline(ge,te);return te.walkTokens&&Ie.walkTokens(ee,te.walkTokens),ce.parseInline(ee,te)}catch(A){if(A.message+=` -Please report this to https://github.com/markedjs/marked.`,te.silent)return"

An error occurred:

"+m(A.message+"",!0)+"
";throw A}},Ie.Parser=ce,Ie.parser=ce.parse,Ie.Renderer=Ce,Ie.TextRenderer=re,Ie.Lexer=Bt,Ie.lexer=Bt.lex,Ie.Tokenizer=H,Ie.Slugger=ke,Ie.parse=Ie;var mt=Ie.options,Ct=Ie.setOptions,Mt=Ie.use,ci=Ie.walkTokens,yn=Ie.parseInline,Qs=Ie,Dr=ce.parse,ju=Bt.lex;e.Lexer=Bt,e.Parser=ce,e.Renderer=Ce,e.Slugger=ke,e.TextRenderer=re,e.Tokenizer=H,e.getDefaults=a,e.lexer=ju,e.marked=Ie,e.options=mt,e.parse=Qs,e.parseInline=yn,e.parser=Dr,e.setOptions=Ct,e.use=Mt,e.walkTokens=ci,Object.defineProperty(e,"__esModule",{value:!0})})})();Fs.Lexer||exports.Lexer;Fs.Parser||exports.Parser;Fs.Renderer||exports.Renderer;Fs.Slugger||exports.Slugger;Fs.TextRenderer||exports.TextRenderer;Fs.Tokenizer||exports.Tokenizer;Fs.getDefaults||exports.getDefaults;Fs.lexer||exports.lexer;var dl=Fs.marked||exports.marked;Fs.options||exports.options;Fs.parse||exports.parse;Fs.parseInline||exports.parseInline;Fs.parser||exports.parser;Fs.setOptions||exports.setOptions;Fs.use||exports.use;Fs.walkTokens||exports.walkTokens;function Ode(o){return JSON.stringify(o,Fde)}function YE(o){let e=JSON.parse(o);return e=XE(e),e}function Fde(o,e){return e instanceof RegExp?{$mid:2,source:e.source,flags:e.flags}:e}function XE(o,e=0){if(!o||e>200)return o;if(typeof o=="object"){switch(o.$mid){case 1:return ze.revive(o);case 2:return new RegExp(o.source,o.flags);case 17:return new Date(o.source)}if(o instanceof Ey||o instanceof Uint8Array)return o;if(Array.isArray(o))for(let t=0;t{let i=[],n=[];return o&&({href:o,dimensions:i}=kde(o),n.push(`src="${IC(o)}"`)),t&&n.push(`alt="${IC(t)}"`),e&&n.push(`title="${IC(e)}"`),i.length&&(n=n.concat(i)),""},paragraph:o=>`

${o}

`,link:(o,e,t)=>typeof o!="string"?"":(o===t&&(t=Bx(t)),e=typeof e=="string"?IC(Bx(e)):"",o=Bx(o),o=o.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`
${t}`)});function iL(o,e={},t={}){var i,n;const s=new de;let r=!1;const a=FA(e),l=function(_){let b;try{b=YE(decodeURIComponent(_))}catch{}return b?(b=V9(b,C=>{if(o.uris&&o.uris[C])return ze.revive(o.uris[C])}),encodeURIComponent(JSON.stringify(b))):_},d=function(_,b){const C=o.uris&&o.uris[_];let w=ze.revive(C);return b?_.startsWith(ot.data+":")?_:(w||(w=ze.parse(_)),H7.uriToBrowserUri(w).toString(!0)):!w||ze.parse(_).toString()===w.toString()?_:(w.query&&(w=w.with({query:l(w.query)})),w.toString())},c=new dl.Renderer;c.image=Wx.image,c.link=Wx.link,c.paragraph=Wx.paragraph;const u=[],h=[];if(e.codeBlockRendererSync?c.code=(_,b)=>{const C=ZE.nextId(),w=e.codeBlockRendererSync(VF(b),_);return h.push([C,w]),`
${dw(_)}
`}:e.codeBlockRenderer&&(c.code=(_,b)=>{const C=ZE.nextId(),w=e.codeBlockRenderer(VF(b),_);return u.push(w.then(S=>[C,S])),`
${dw(_)}
`}),e.actionHandler){const _=function(w){let S=w.target;if(!(S.tagName!=="A"&&(S=S.parentElement,!S||S.tagName!=="A")))try{let x=S.dataset.href;x&&(o.baseUri&&(x=Vx(ze.from(o.baseUri),x)),e.actionHandler.callback(x,w))}catch(x){nt(x)}finally{w.preventDefault()}},b=e.actionHandler.disposables.add(new St(a,"click")),C=e.actionHandler.disposables.add(new St(a,"auxclick"));e.actionHandler.disposables.add(ye.any(b.event,C.event)(w=>{const S=new Pr(Je(a),w);!S.leftButton&&!S.middleButton||_(S)})),e.actionHandler.disposables.add(J(a,"keydown",w=>{const S=new gi(w);!S.equals(10)&&!S.equals(3)||_(S)}))}o.supportHtml||(t.sanitizer=_=>(o.isTrusted?_.match(/^(]+>)|(<\/\s*span>)$/):void 0)?_:"",t.sanitize=!0,t.silent=!0),t.renderer=c;let g=(i=o.value)!==null&&i!==void 0?i:"";g.length>1e5&&(g=`${g.substr(0,1e5)}…`),o.supportThemeIcons&&(g=Sde(g));let f;if(e.fillInIncompleteTokens){const _={...dl.defaults,...t},b=dl.lexer(g,_),C=jde(b);f=dl.parser(C,_)}else f=dl.parse(g,t);o.supportThemeIcons&&(f=Kc(f).map(b=>typeof b=="string"?b:b.outerHTML).join(""));const v=new DOMParser().parseFromString(QE(o,f),"text/html");if(v.body.querySelectorAll("img").forEach(_=>{const b=_.getAttribute("src");if(b){let C=b;try{o.baseUri&&(C=Vx(ze.from(o.baseUri),C))}catch{}_.src=d(C,!0)}}),v.body.querySelectorAll("a").forEach(_=>{const b=_.getAttribute("href");if(_.setAttribute("href",""),!b||/^data:|javascript:/i.test(b)||/^command:/i.test(b)&&!o.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(b))_.replaceWith(..._.childNodes);else{let C=d(b,!1);o.baseUri&&(C=Vx(ze.from(o.baseUri),b)),_.dataset.href=C}}),a.innerHTML=QE(o,v.body.innerHTML),u.length>0)Promise.all(u).then(_=>{var b,C;if(r)return;const w=new Map(_),S=a.querySelectorAll("div[data-code]");for(const x of S){const y=w.get((b=x.dataset.code)!==null&&b!==void 0?b:"");y&&es(x,y)}(C=e.asyncRenderCallback)===null||C===void 0||C.call(e)});else if(h.length>0){const _=new Map(h),b=a.querySelectorAll("div[data-code]");for(const C of b){const w=_.get((n=C.dataset.code)!==null&&n!==void 0?n:"");w&&es(C,w)}}if(e.asyncRenderCallback)for(const _ of a.getElementsByTagName("img")){const b=s.add(J(_,"load",()=>{b.dispose(),e.asyncRenderCallback()}))}return{element:a,dispose:()=>{r=!0,s.dispose()}}}function VF(o){if(!o)return"";const e=o.split(/[\s+|:|,|\{|\?]/,1);return e.length?e[0]:o}function Vx(o,e){return/^\w[\w\d+.-]*:/.test(e)?e:o.path.endsWith("/")?B4(o,e).toString():B4(qy(o),e).toString()}function QE(o,e){const{config:t,allowedSchemes:i}=Wde(o);B7("uponSanitizeAttribute",(s,r)=>{if(r.attrName==="style"||r.attrName==="class"){if(s.tagName==="SPAN"){if(r.attrName==="style"){r.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(r.attrValue);return}else if(r.attrName==="class"){r.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(r.attrValue);return}}r.keepAttr=!1;return}});const n=eQ(i);try{return F7(e,{...t,RETURN_TRUSTED_TYPE:!0})}finally{W7("uponSanitizeAttribute"),n.dispose()}}const Bde=["align","autoplay","alt","class","controls","data-code","data-href","draggable","height","href","loop","muted","playsinline","poster","src","style","target","title","width","start"];function Wde(o){const e=[ot.http,ot.https,ot.mailto,ot.data,ot.file,ot.vscodeFileResource,ot.vscodeRemote,ot.vscodeRemoteResource];return o.isTrusted&&e.push(ot.command),{config:{ALLOWED_TAGS:[...tQ],ALLOWED_ATTR:Bde,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:e}}function Vde(o){return typeof o=="string"?o:Hde(o)}function Hde(o){var e;let t=(e=o.value)!==null&&e!==void 0?e:"";t.length>1e5&&(t=`${t.substr(0,1e5)}…`);const i=dl.parse(t,{renderer:$de.value}).replace(/&(#\d+|[a-zA-Z]+);/g,n=>{var s;return(s=zde.get(n))!==null&&s!==void 0?s:n});return QE({isTrusted:!1},i).toString()}const zde=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),$de=new Ru(()=>{const o=new dl.Renderer;return o.code=e=>e,o.blockquote=e=>e,o.html=e=>"",o.heading=(e,t,i)=>e+` +Please report this to https://github.com/markedjs/marked.`,te.silent)return"

An error occurred:

"+m(A.message+"",!0)+"
";throw A}},Ie.Parser=ce,Ie.parser=ce.parse,Ie.Renderer=Ce,Ie.TextRenderer=re,Ie.Lexer=Bt,Ie.lexer=Bt.lex,Ie.Tokenizer=H,Ie.Slugger=ke,Ie.parse=Ie;var mt=Ie.options,Ct=Ie.setOptions,Mt=Ie.use,ci=Ie.walkTokens,yn=Ie.parseInline,Qs=Ie,Dr=ce.parse,ju=Bt.lex;e.Lexer=Bt,e.Parser=ce,e.Renderer=Ce,e.Slugger=ke,e.TextRenderer=re,e.Tokenizer=H,e.getDefaults=a,e.lexer=ju,e.marked=Ie,e.options=mt,e.parse=Qs,e.parseInline=yn,e.parser=Dr,e.setOptions=Ct,e.use=Mt,e.walkTokens=ci,Object.defineProperty(e,"__esModule",{value:!0})})})();Fs.Lexer||exports.Lexer;Fs.Parser||exports.Parser;Fs.Renderer||exports.Renderer;Fs.Slugger||exports.Slugger;Fs.TextRenderer||exports.TextRenderer;Fs.Tokenizer||exports.Tokenizer;Fs.getDefaults||exports.getDefaults;Fs.lexer||exports.lexer;var dl=Fs.marked||exports.marked;Fs.options||exports.options;Fs.parse||exports.parse;Fs.parseInline||exports.parseInline;Fs.parser||exports.parser;Fs.setOptions||exports.setOptions;Fs.use||exports.use;Fs.walkTokens||exports.walkTokens;function Vde(o){return JSON.stringify(o,Hde)}function YE(o){let e=JSON.parse(o);return e=XE(e),e}function Hde(o,e){return e instanceof RegExp?{$mid:2,source:e.source,flags:e.flags}:e}function XE(o,e=0){if(!o||e>200)return o;if(typeof o=="object"){switch(o.$mid){case 1:return ze.revive(o);case 2:return new RegExp(o.source,o.flags);case 17:return new Date(o.source)}if(o instanceof Ey||o instanceof Uint8Array)return o;if(Array.isArray(o))for(let t=0;t{let i=[],n=[];return o&&({href:o,dimensions:i}=Tde(o),n.push(`src="${IC(o)}"`)),t&&n.push(`alt="${IC(t)}"`),e&&n.push(`title="${IC(e)}"`),i.length&&(n=n.concat(i)),""},paragraph:o=>`

${o}

`,link:(o,e,t)=>typeof o!="string"?"":(o===t&&(t=Bx(t)),e=typeof e=="string"?IC(Bx(e)):"",o=Bx(o),o=o.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`${t}`)});function iL(o,e={},t={}){var i,n;const s=new de;let r=!1;const a=FA(e),l=function(_){let b;try{b=YE(decodeURIComponent(_))}catch{}return b?(b=V9(b,C=>{if(o.uris&&o.uris[C])return ze.revive(o.uris[C])}),encodeURIComponent(JSON.stringify(b))):_},d=function(_,b){const C=o.uris&&o.uris[_];let w=ze.revive(C);return b?_.startsWith(ot.data+":")?_:(w||(w=ze.parse(_)),H8.uriToBrowserUri(w).toString(!0)):!w||ze.parse(_).toString()===w.toString()?_:(w.query&&(w=w.with({query:l(w.query)})),w.toString())},c=new dl.Renderer;c.image=Wx.image,c.link=Wx.link,c.paragraph=Wx.paragraph;const u=[],h=[];if(e.codeBlockRendererSync?c.code=(_,b)=>{const C=ZE.nextId(),w=e.codeBlockRendererSync(VF(b),_);return h.push([C,w]),`
${dw(_)}
`}:e.codeBlockRenderer&&(c.code=(_,b)=>{const C=ZE.nextId(),w=e.codeBlockRenderer(VF(b),_);return u.push(w.then(S=>[C,S])),`
${dw(_)}
`}),e.actionHandler){const _=function(w){let S=w.target;if(!(S.tagName!=="A"&&(S=S.parentElement,!S||S.tagName!=="A")))try{let x=S.dataset.href;x&&(o.baseUri&&(x=Vx(ze.from(o.baseUri),x)),e.actionHandler.callback(x,w))}catch(x){nt(x)}finally{w.preventDefault()}},b=e.actionHandler.disposables.add(new St(a,"click")),C=e.actionHandler.disposables.add(new St(a,"auxclick"));e.actionHandler.disposables.add(ye.any(b.event,C.event)(w=>{const S=new Pr(Je(a),w);!S.leftButton&&!S.middleButton||_(S)})),e.actionHandler.disposables.add(J(a,"keydown",w=>{const S=new gi(w);!S.equals(10)&&!S.equals(3)||_(S)}))}o.supportHtml||(t.sanitizer=_=>(o.isTrusted?_.match(/^(]+>)|(<\/\s*span>)$/):void 0)?_:"",t.sanitize=!0,t.silent=!0),t.renderer=c;let g=(i=o.value)!==null&&i!==void 0?i:"";g.length>1e5&&(g=`${g.substr(0,1e5)}…`),o.supportThemeIcons&&(g=xde(g));let f;if(e.fillInIncompleteTokens){const _={...dl.defaults,...t},b=dl.lexer(g,_),C=Zde(b);f=dl.parser(C,_)}else f=dl.parse(g,t);o.supportThemeIcons&&(f=Kc(f).map(b=>typeof b=="string"?b:b.outerHTML).join(""));const v=new DOMParser().parseFromString(QE(o,f),"text/html");if(v.body.querySelectorAll("img").forEach(_=>{const b=_.getAttribute("src");if(b){let C=b;try{o.baseUri&&(C=Vx(ze.from(o.baseUri),C))}catch{}_.src=d(C,!0)}}),v.body.querySelectorAll("a").forEach(_=>{const b=_.getAttribute("href");if(_.setAttribute("href",""),!b||/^data:|javascript:/i.test(b)||/^command:/i.test(b)&&!o.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(b))_.replaceWith(..._.childNodes);else{let C=d(b,!1);o.baseUri&&(C=Vx(ze.from(o.baseUri),b)),_.dataset.href=C}}),a.innerHTML=QE(o,v.body.innerHTML),u.length>0)Promise.all(u).then(_=>{var b,C;if(r)return;const w=new Map(_),S=a.querySelectorAll("div[data-code]");for(const x of S){const y=w.get((b=x.dataset.code)!==null&&b!==void 0?b:"");y&&es(x,y)}(C=e.asyncRenderCallback)===null||C===void 0||C.call(e)});else if(h.length>0){const _=new Map(h),b=a.querySelectorAll("div[data-code]");for(const C of b){const w=_.get((n=C.dataset.code)!==null&&n!==void 0?n:"");w&&es(C,w)}}if(e.asyncRenderCallback)for(const _ of a.getElementsByTagName("img")){const b=s.add(J(_,"load",()=>{b.dispose(),e.asyncRenderCallback()}))}return{element:a,dispose:()=>{r=!0,s.dispose()}}}function VF(o){if(!o)return"";const e=o.split(/[\s+|:|,|\{|\?]/,1);return e.length?e[0]:o}function Vx(o,e){return/^\w[\w\d+.-]*:/.test(e)?e:o.path.endsWith("/")?B4(o,e).toString():B4(qy(o),e).toString()}function QE(o,e){const{config:t,allowedSchemes:i}=$de(o);B8("uponSanitizeAttribute",(s,r)=>{if(r.attrName==="style"||r.attrName==="class"){if(s.tagName==="SPAN"){if(r.attrName==="style"){r.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(r.attrValue);return}else if(r.attrName==="class"){r.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(r.attrValue);return}}r.keepAttr=!1;return}});const n=sQ(i);try{return F8(e,{...t,RETURN_TRUSTED_TYPE:!0})}finally{W8("uponSanitizeAttribute"),n.dispose()}}const zde=["align","autoplay","alt","class","controls","data-code","data-href","draggable","height","href","loop","muted","playsinline","poster","src","style","target","title","width","start"];function $de(o){const e=[ot.http,ot.https,ot.mailto,ot.data,ot.file,ot.vscodeFileResource,ot.vscodeRemote,ot.vscodeRemoteResource];return o.isTrusted&&e.push(ot.command),{config:{ALLOWED_TAGS:[...oQ],ALLOWED_ATTR:zde,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:e}}function Ude(o){return typeof o=="string"?o:jde(o)}function jde(o){var e;let t=(e=o.value)!==null&&e!==void 0?e:"";t.length>1e5&&(t=`${t.substr(0,1e5)}…`);const i=dl.parse(t,{renderer:qde.value}).replace(/&(#\d+|[a-zA-Z]+);/g,n=>{var s;return(s=Kde.get(n))!==null&&s!==void 0?s:n});return QE({isTrusted:!1},i).toString()}const Kde=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),qde=new Ru(()=>{const o=new dl.Renderer;return o.code=e=>e,o.blockquote=e=>e,o.html=e=>"",o.heading=(e,t,i)=>e+` `,o.hr=()=>"",o.list=(e,t)=>e,o.listitem=e=>e+` `,o.paragraph=e=>e+` `,o.table=(e,t)=>e+t+` `,o.tablerow=e=>e,o.tablecell=(e,t)=>e+" ",o.strong=e=>e,o.em=e=>e,o.codespan=e=>e,o.br=()=>` -`,o.del=e=>e,o.image=(e,t,i)=>"",o.text=e=>e,o.link=(e,t,i)=>i,o});function WA(o){let e="";return o.forEach(t=>{e+=t.raw}),e}function Ude(o){for(const e of o.tokens)if(e.type==="text"){const t=e.raw.split(` -`),i=t[t.length-1];if(i.includes("`"))return qde(o);if(i.includes("**"))return Qde(o);if(i.match(/\*\w/))return Gde(o);if(i.match(/(^|\s)__\w/))return Jde(o);if(i.match(/(^|\s)_\w/))return Zde(o);if(i.match(/(^|\s)\[.*\]\(\w*/))return Yde(o);if(i.match(/(^|\s)\[\w/))return Xde(o)}}function jde(o){let e,t;for(e=0;ee,o.image=(e,t,i)=>"",o.text=e=>e,o.link=(e,t,i)=>i,o});function WA(o){let e="";return o.forEach(t=>{e+=t.raw}),e}function Gde(o){for(const e of o.tokens)if(e.type==="text"){const t=e.raw.split(` +`),i=t[t.length-1];if(i.includes("`"))return Xde(o);if(i.includes("**"))return ice(o);if(i.match(/\*\w/))return Qde(o);if(i.match(/(^|\s)__\w/))return nce(o);if(i.match(/(^|\s)_\w/))return Jde(o);if(i.match(/(^|\s)\[.*\]\(\w*/))return ece(o);if(i.match(/(^|\s)\[\w/))return tce(o)}}function Zde(o){let e,t;for(e=0;e"u"&&r.match(/^\s*\|/)){const a=r.match(/(\|[^\|]+)(?=\||$)/g);a&&(i=a.length)}else if(typeof i=="number")if(r.match(/^\s*\|/)){if(s!==t.length-1)return;n=!0}else return}if(typeof i=="number"&&i>0){const s=n?t.slice(0,-1).join(` `):e,r=!!s.match(/\|\s*$/),a=s+(r?"":"|")+` -|${" --- |".repeat(i)}`;return dl.lexer(a)}}class tce{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach(n=>n.splice(e,t,i))}}class th extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function HF(o,e){const t=[];for(const i of e){if(o.start>=i.range.end)continue;if(o.ende.concat(t),[]))}class zF{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,t,i=[]){const n=i.length-t,s=HF({start:0,end:e},this.groups),r=HF({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(l=>({range:JE(l.range,n),size:l.size})),a=i.map((l,d)=>({range:{start:e+d,end:e+d+1},size:l.size}));this.groups=nce(s,a,r),this._size=this._paddingTop+this.groups.reduce((l,d)=>l+d.size*(d.range.end-d.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var Zd=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};const ih={CurrentDragAndDropData:void 0},Ka={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(o){return[o]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class m0{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class rce{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class ace{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;tn,e!=null&&e.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(t,i)=>i+1,e!=null&&e.getRole?this.getRole=e.getRole.bind(e):this.getRole=t=>"listitem",e!=null&&e.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=t=>{}}}class yr{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const t of this.items)this.measureItemWidth(t);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:$D(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,i,n=Ka){var s,r,a,l,d,c,u,h,g,f,m,v,_;if(this.virtualDelegate=t,this.domId=`list_id_${++yr.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new jr(50),this.splicing=!1,this.dragOverAnimationStopDisposable=q.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=q.None,this.onDragLeaveTimeout=q.None,this.disposables=new de,this._onDidChangeContentHeight=new W,this._onDidChangeContentWidth=new W,this.onDidChangeContentHeight=ye.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new zF((s=n.paddingTop)!==null&&s!==void 0?s:0);for(const C of i)this.renderers.set(C.templateId,C);this.cache=this.disposables.add(new oce(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof n.mouseSupport=="boolean"?n.mouseSupport:!0),this._horizontalScrolling=(r=n.horizontalScrolling)!==null&&r!==void 0?r:Ka.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=typeof n.paddingBottom>"u"?0:n.paddingBottom,this.accessibilityProvider=new dce(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",((a=n.transformOptimization)!==null&&a!==void 0?a:Ka.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(ei.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new bm({forceIntegerValues:!0,smoothScrollDuration:(l=n.smoothScrolling)!==null&&l!==void 0&&l?125:0,scheduleAtNextAnimationFrame:C=>po(Je(this.domNode),C)})),this.scrollableElement=this.disposables.add(new Vy(this.rowsContainer,{alwaysConsumeMouseWheel:(d=n.alwaysConsumeMouseWheel)!==null&&d!==void 0?d:Ka.alwaysConsumeMouseWheel,horizontal:1,vertical:(c=n.verticalScrollMode)!==null&&c!==void 0?c:Ka.verticalScrollMode,useShadows:(u=n.useShadows)!==null&&u!==void 0?u:Ka.useShadows,mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity,scrollByPage:n.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(J(this.rowsContainer,ni.Change,C=>this.onTouchChange(C))),this.disposables.add(J(this.scrollableElement.getDomNode(),"scroll",C=>C.target.scrollTop=0)),this.disposables.add(J(this.domNode,"dragover",C=>this.onDragOver(this.toDragEvent(C)))),this.disposables.add(J(this.domNode,"drop",C=>this.onDrop(this.toDragEvent(C)))),this.disposables.add(J(this.domNode,"dragleave",C=>this.onDragLeave(this.toDragEvent(C)))),this.disposables.add(J(this.domNode,"dragend",C=>this.onDragEnd(C))),this.setRowLineHeight=(h=n.setRowLineHeight)!==null&&h!==void 0?h:Ka.setRowLineHeight,this.setRowHeight=(g=n.setRowHeight)!==null&&g!==void 0?g:Ka.setRowHeight,this.supportDynamicHeights=(f=n.supportDynamicHeights)!==null&&f!==void 0?f:Ka.supportDynamicHeights,this.dnd=(m=n.dnd)!==null&&m!==void 0?m:this.disposables.add(Ka.dnd),this.layout((v=n.initialSize)===null||v===void 0?void 0:v.height,(_=n.initialSize)===null||_===void 0?void 0:_.width)}updateOptions(e){e.paddingBottom!==void 0&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling);let t;if(e.scrollByPage!==void 0&&(t={...t??{},scrollByPage:e.scrollByPage}),e.mouseWheelScrollSensitivity!==void 0&&(t={...t??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&(t={...t??{},fastScrollSensitivity:e.fastScrollSensitivity}),t&&this.scrollableElement.updateOptions(t),e.paddingTop!==void 0&&e.paddingTop!==this.rangeMap.paddingTop){const i=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),n=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(i,Math.max(0,this.lastRenderTop+n),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),s={start:e,end:e+t},r=ns.intersect(n,s),a=new Map;for(let x=r.end-1;x>=r.start;x--){const y=this.items[x];if(y.dragStartDisposable.dispose(),y.checkedDisposable.dispose(),y.row){let I=a.get(y.templateId);I||(I=[],a.set(y.templateId,I));const E=this.renderers.get(y.templateId);E&&E.disposeElement&&E.disposeElement(y.element,x,y.row.templateData,y.size),I.push(y.row)}y.row=null}const l={start:e+t,end:this.items.length},d=ns.intersect(l,n),c=ns.relativeComplement(l,n),u=i.map(x=>({id:String(this.itemId++),element:x,templateId:this.virtualDelegate.getTemplateId(x),size:this.virtualDelegate.getHeight(x),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(x),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:q.None,checkedDisposable:q.None}));let h;e===0&&t>=this.items.length?(this.rangeMap=new zF(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,u),h=this.items,this.items=u):(this.rangeMap.splice(e,t,u),h=this.items.splice(e,t,...u));const g=i.length-t,f=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),m=JE(d,g),v=ns.intersect(f,m);for(let x=v.start;xJE(x,g)),w=[{start:e,end:e+i.length},...b].map(x=>ns.intersect(f,x)),S=this.getNextToLastElement(w);for(const x of w)for(let y=x.start;yx.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=po(Je(this.domNode),()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)typeof t.width<"u"&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getRenderRange(this.lastRenderTop,this.lastRenderHeight).start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex(t=>t.element===e)}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){const i={height:typeof e=="number"?e:VX(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),typeof t<"u"&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof t=="number"?t:$D(this.domNode)})}render(e,t,i,n,s,r=!1){const a=this.getRenderRange(t,i),l=ns.relativeComplement(a,e),d=ns.relativeComplement(e,a),c=this.getNextToLastElement(l);if(r){const u=ns.intersect(e,a);for(let h=u.start;h{for(const u of d)for(let h=u.start;hn.row.domNode.setAttribute("aria-checked",String(!!u));c(a.value),n.checkedDisposable=a.onDidChange(c)}(s||!n.row.domNode.parentElement)&&(t?this.rowsContainer.insertBefore(n.row.domNode,t):this.rowsContainer.appendChild(n.row.domNode)),this.updateItemInDOM(n,e);const l=this.renderers.get(n.templateId);if(!l)throw new Error(`No renderer found for template id ${n.templateId}`);l==null||l.renderElement(n.element,e,n.row.templateData,n.size);const d=this.dnd.getDragURI(n.element);n.dragStartDisposable.dispose(),n.row.domNode.draggable=!!d,d&&(n.dragStartDisposable=J(n.row.domNode,"dragstart",c=>this.onDragStart(n.element,d,c))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=$D(e.row.domNode);const t=Je(e.row.domNode).getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return ye.map(this.disposables.add(new St(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return ye.map(this.disposables.add(new St(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return ye.filter(ye.map(this.disposables.add(new St(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>e.browserEvent.button===1,this.disposables)}get onMouseDown(){return ye.map(this.disposables.add(new St(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return ye.map(this.disposables.add(new St(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOut(){return ye.map(this.disposables.add(new St(this.domNode,"mouseout")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return ye.any(ye.map(this.disposables.add(new St(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),ye.map(this.disposables.add(new St(this.domNode,ni.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return ye.map(this.disposables.add(new St(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return ye.map(this.disposables.add(new St(this.rowsContainer,ni.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){var n,s;if(!i.dataTransfer)return;const r=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(sb.TEXT,t),i.dataTransfer.setDragImage){let a;this.dnd.getDragLabel&&(a=this.dnd.getDragLabel(r,i)),typeof a>"u"&&(a=String(r.length));const l=pe(".monaco-drag-image");l.textContent=a;const c=(u=>{for(;u&&!u.classList.contains("monaco-workbench");)u=u.parentElement;return u||this.domNode.ownerDocument})(this.domNode);c.appendChild(l),i.dataTransfer.setDragImage(l,-10,-10),setTimeout(()=>c.removeChild(l),0)}this.domNode.classList.add("dragging"),this.currentDragData=new m0(r),ih.CurrentDragAndDropData=new rce(r),(s=(n=this.dnd).onDragStart)===null||s===void 0||s.call(n,this.currentDragData,i)}onDragOver(e){var t;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),ih.CurrentDragAndDropData&&ih.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(ih.CurrentDragAndDropData)this.currentDragData=ih.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new ace}const i=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop=typeof i=="boolean"?i:i.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof i!="boolean"&&i.effect===0?"copy":"move";let n;if(typeof i!="boolean"&&i.feedback?n=i.feedback:typeof e.index>"u"?n=[-1]:n=[e.index],n=iu(n).filter(s=>s>=-1&&ss-r),n=n[0]===-1?[-1]:n,lce(this.currentDragFeedback,n))return!0;if(this.currentDragFeedback=n,this.currentDragFeedbackDisposable.dispose(),n[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=je(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const s of n){const r=this.items[s];r.dropTarget=!0,(t=r.row)===null||t===void 0||t.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=je(()=>{var s;for(const r of n){const a=this.items[r];a.dropTarget=!1,(s=a.row)===null||s===void 0||s.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(e){var t,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=lu(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&((i=(t=this.dnd).onDragLeave)===null||i===void 0||i.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,ih.CurrentDragAndDropData=void 0,!(!t||!e.browserEvent.dataTransfer)&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){var t,i;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,ih.CurrentDragAndDropData=void 0,(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=q.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const t=U7(this.domNode).top;this.dragOverAnimationDisposable=JX(Je(this.domNode),this.animateDragAndDropScrollTop.bind(this,t))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=lu(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;i instanceof HTMLElement&&i!==this.rowsContainer&&t.contains(i);){const n=i.getAttribute("data-index");if(n){const s=Number(n);if(!isNaN(s))return s}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let s,r;e===this.elementTop(n.start)?(s=n.start,r=0):n.end-n.start>1&&(s=n.start+1,r=this.elementTop(s)-e);let a=0;for(;;){const l=this.getRenderRange(e,t);let d=!1;for(let c=l.start;c=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};class cce{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex(s=>s.templateData===i);if(n>=0){const s=this.renderedElements[n];this.trait.unrender(i),s.index=t}else{const s={index:t,templateData:i};this.renderedElements.push(s)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const s of this.renderedElements)s.index=e+t&&n.push({index:s.index+i-t,templateData:s.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex(i=>i.templateData===e);t<0||this.renderedElements.splice(t,1)}}let Jw=class{get name(){return this._trait}get renderer(){return new cce(this)}constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new W,this.onChange=this._onChange.event}splice(e,t,i){var n;t=Math.max(0,Math.min(t,this.length-e));const s=i.length-t,r=e+t,a=[];let l=0;for(;l=r;)a.push(this.sortedIndexes[l++]+s);const d=this.length+s;if(this.sortedIndexes.length>0&&a.length===0&&d>0){const c=(n=this.sortedIndexes.find(u=>u>=e))!==null&&n!==void 0?n:d-1;a.push(Math.min(c,d-1))}this.renderer.splice(e,t,i.length),this._set(a,a),this.length=d}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(UF),t)}_set(e,t,i){const n=this.indexes,s=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const r=eN(s,e);return this.renderer.renderIndexes(r),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return fv(this.sortedIndexes,e,UF)>=0}dispose(){jt(this._onChange)}};Og([nn],Jw.prototype,"renderer",null);class uce extends Jw{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class Hx{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,new Array(i.length).fill(!1));const n=this.trait.get().map(a=>this.identityProvider.getId(this.view.element(a)).toString());if(n.length===0)return this.trait.splice(e,t,new Array(i.length).fill(!1));const s=new Set(n),r=i.map(a=>s.has(this.identityProvider.getId(a).toString()));this.trait.splice(e,t,r)}}function qc(o){return o.tagName==="INPUT"||o.tagName==="TEXTAREA"}function _0(o,e){return o.classList.contains(e)?!0:o.classList.contains("monaco-list")||!o.parentElement?!1:_0(o.parentElement,e)}function k_(o){return _0(o,"monaco-editor")}function hce(o){return _0(o,"monaco-custom-toggle")}function gce(o){return _0(o,"action-item")}function fce(o){return _0(o,"monaco-tree-sticky-row")}function m6(o){return o.tagName==="A"&&o.classList.contains("monaco-button")||o.tagName==="DIV"&&o.classList.contains("monaco-button-dropdown")?!0:o.classList.contains("monaco-list")||!o.parentElement?!1:m6(o.parentElement)}class _6{get onKeyDown(){return ye.chain(this.disposables.add(new St(this.view.domNode,"keydown")).event,e=>e.filter(t=>!qc(t.target)).map(t=>new gi(t)))}constructor(e,t,i){this.list=e,this.view=t,this.disposables=new de,this.multipleSelectionDisposables=new de,this.multipleSelectionSupport=i.multipleSelectionSupport,this.disposables.add(this.onKeyDown(n=>{switch(n.keyCode){case 3:return this.onEnter(n);case 16:return this.onUpArrow(n);case 18:return this.onDownArrow(n);case 11:return this.onPageUpArrow(n);case 12:return this.onPageDownArrow(n);case 9:return this.onEscape(n);case 31:this.multipleSelectionSupport&&(It?n.metaKey:n.ctrlKey)&&this.onCtrlA(n)}}))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Ls(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}Og([nn],_6.prototype,"onKeyDown",null);var cl;(function(o){o[o.Automatic=0]="Automatic",o[o.Trigger=1]="Trigger"})(cl||(cl={}));var Wf;(function(o){o[o.Idle=0]="Idle",o[o.Typing=1]="Typing"})(Wf||(Wf={}));const pce=new class{mightProducePrintableCharacter(o){return o.ctrlKey||o.metaKey||o.altKey?!1:o.keyCode>=31&&o.keyCode<=56||o.keyCode>=21&&o.keyCode<=30||o.keyCode>=98&&o.keyCode<=107||o.keyCode>=85&&o.keyCode<=95}};class mce{constructor(e,t,i,n,s){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.keyboardNavigationEventFilter=n,this.delegate=s,this.enabled=!1,this.state=Wf.Idle,this.mode=cl.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new de,this.disposables=new de,this.updateOptions(e.options)}updateOptions(e){var t,i;!((t=e.typeNavigationEnabled)!==null&&t!==void 0)||t?this.enable():this.disable(),this.mode=(i=e.typeNavigationMode)!==null&&i!==void 0?i:cl.Automatic}enable(){if(this.enabled)return;let e=!1;const t=ye.chain(this.enabledDisposables.add(new St(this.view.domNode,"keydown")).event,s=>s.filter(r=>!qc(r.target)).filter(()=>this.mode===cl.Automatic||this.triggered).map(r=>new gi(r)).filter(r=>e||this.keyboardNavigationEventFilter(r)).filter(r=>this.delegate.mightProducePrintableCharacter(r)).forEach(r=>ct.stop(r,!0)).map(r=>r.browserEvent.key)),i=ye.debounce(t,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);ye.reduce(ye.any(t,i),(s,r)=>r===null?null:(s||"")+r,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),i(this.onClear,this,this.enabledDisposables),t(()=>e=!0,void 0,this.enabledDisposables),i(()=>e=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=(e=this.list.options.accessibilityProvider)===null||e===void 0?void 0:e.getAriaLabel(this.list.element(t[0]));i&&mo(i)}this.previouslyFocused=-1}onInput(e){if(!e){this.state=Wf.Idle,this.triggered=!1;return}const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===Wf.Idle?1:0;this.state=Wf.Typing;for(let s=0;s1&&d.length===1){this.previouslyFocused=i,this.list.setFocus([r]),this.list.reveal(r);return}}}else if(typeof l>"u"||ob(e,l)){this.previouslyFocused=i,this.list.setFocus([r]),this.list.reveal(r);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class _ce{constructor(e,t){this.list=e,this.view=t,this.disposables=new de;const i=ye.chain(this.disposables.add(new St(t.domNode,"keydown")).event,s=>s.filter(r=>!qc(r.target)).map(r=>new gi(r)));ye.chain(i,s=>s.filter(r=>r.keyCode===2&&!r.ctrlKey&&!r.metaKey&&!r.shiftKey&&!r.altKey))(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(t.length===0)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!n||!(n instanceof HTMLElement)||n.tabIndex===-1)return;const s=Je(n).getComputedStyle(n);s.visibility==="hidden"||s.display==="none"||(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function v6(o){return It?o.browserEvent.metaKey:o.browserEvent.ctrlKey}function b6(o){return o.browserEvent.shiftKey}function vce(o){return EM(o)&&o.button===2}const $F={isSelectionSingleChangeEvent:v6,isSelectionRangeChangeEvent:b6};class C6{constructor(e){this.list=e,this.disposables=new de,this._onPointer=new W,this.onPointer=this._onPointer.event,e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||$F),this.mouseSupport=typeof e.options.mouseSupport>"u"||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(ei.addTarget(e.getHTMLElement()))),ye.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||$F))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){k_(e.browserEvent.target)||jo()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(qc(e.browserEvent.target)||k_(e.browserEvent.target))return;const t=typeof e.index>"u"?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||qc(e.browserEvent.target)||k_(e.browserEvent.target)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=e.index;if(typeof t>"u"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),vce(e.browserEvent)||this.list.setSelection([t],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(qc(e.browserEvent.target)||k_(e.browserEvent.target)||this.isSelectionChangeEvent(e)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(typeof i>"u"){const c=this.list.getFocus()[0];i=c??t,this.list.setAnchor(i)}const n=Math.min(i,t),s=Math.max(i,t),r=Ls(n,s+1),a=this.list.getSelection(),l=wce(eN(a,[i]),i);if(l.length===0)return;const d=eN(r,Sce(a,l));this.list.setSelection(d,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const n=this.list.getSelection(),s=n.filter(r=>r!==t);this.list.setFocus([t]),this.list.setAnchor(t),n.length===s.length?this.list.setSelection([...s,t],e.browserEvent):this.list.setSelection(s,e.browserEvent)}}dispose(){this.disposables.dispose()}}class w6{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){var t,i;const n=this.selectorSuffix&&`.${this.selectorSuffix}`,s=[];e.listBackground&&s.push(`.monaco-list${n} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(s.push(`.monaco-list${n}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),s.push(`.monaco-list${n}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&s.push(`.monaco-list${n}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(s.push(`.monaco-list${n}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),s.push(`.monaco-list${n}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&s.push(`.monaco-list${n}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&s.push(`.monaco-list${n}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&s.push(` +|${" --- |".repeat(i)}`;return dl.lexer(a)}}class oce{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach(n=>n.splice(e,t,i))}}class th extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function HF(o,e){const t=[];for(const i of e){if(o.start>=i.range.end)continue;if(o.ende.concat(t),[]))}class zF{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,t,i=[]){const n=i.length-t,s=HF({start:0,end:e},this.groups),r=HF({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(l=>({range:JE(l.range,n),size:l.size})),a=i.map((l,d)=>({range:{start:e+d,end:e+d+1},size:l.size}));this.groups=ace(s,a,r),this._size=this._paddingTop+this.groups.reduce((l,d)=>l+d.size*(d.range.end-d.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var Zd=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};const ih={CurrentDragAndDropData:void 0},Ka={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(o){return[o]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class m0{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class cce{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class uce{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;tn,e!=null&&e.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(t,i)=>i+1,e!=null&&e.getRole?this.getRole=e.getRole.bind(e):this.getRole=t=>"listitem",e!=null&&e.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=t=>{}}}class yr{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const t of this.items)this.measureItemWidth(t);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:$D(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,i,n=Ka){var s,r,a,l,d,c,u,h,g,f,m,v,_;if(this.virtualDelegate=t,this.domId=`list_id_${++yr.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new jr(50),this.splicing=!1,this.dragOverAnimationStopDisposable=q.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=q.None,this.onDragLeaveTimeout=q.None,this.disposables=new de,this._onDidChangeContentHeight=new W,this._onDidChangeContentWidth=new W,this.onDidChangeContentHeight=ye.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new zF((s=n.paddingTop)!==null&&s!==void 0?s:0);for(const C of i)this.renderers.set(C.templateId,C);this.cache=this.disposables.add(new dce(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof n.mouseSupport=="boolean"?n.mouseSupport:!0),this._horizontalScrolling=(r=n.horizontalScrolling)!==null&&r!==void 0?r:Ka.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=typeof n.paddingBottom>"u"?0:n.paddingBottom,this.accessibilityProvider=new gce(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",((a=n.transformOptimization)!==null&&a!==void 0?a:Ka.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(ei.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new bm({forceIntegerValues:!0,smoothScrollDuration:(l=n.smoothScrolling)!==null&&l!==void 0&&l?125:0,scheduleAtNextAnimationFrame:C=>po(Je(this.domNode),C)})),this.scrollableElement=this.disposables.add(new Vy(this.rowsContainer,{alwaysConsumeMouseWheel:(d=n.alwaysConsumeMouseWheel)!==null&&d!==void 0?d:Ka.alwaysConsumeMouseWheel,horizontal:1,vertical:(c=n.verticalScrollMode)!==null&&c!==void 0?c:Ka.verticalScrollMode,useShadows:(u=n.useShadows)!==null&&u!==void 0?u:Ka.useShadows,mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity,scrollByPage:n.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(J(this.rowsContainer,ni.Change,C=>this.onTouchChange(C))),this.disposables.add(J(this.scrollableElement.getDomNode(),"scroll",C=>C.target.scrollTop=0)),this.disposables.add(J(this.domNode,"dragover",C=>this.onDragOver(this.toDragEvent(C)))),this.disposables.add(J(this.domNode,"drop",C=>this.onDrop(this.toDragEvent(C)))),this.disposables.add(J(this.domNode,"dragleave",C=>this.onDragLeave(this.toDragEvent(C)))),this.disposables.add(J(this.domNode,"dragend",C=>this.onDragEnd(C))),this.setRowLineHeight=(h=n.setRowLineHeight)!==null&&h!==void 0?h:Ka.setRowLineHeight,this.setRowHeight=(g=n.setRowHeight)!==null&&g!==void 0?g:Ka.setRowHeight,this.supportDynamicHeights=(f=n.supportDynamicHeights)!==null&&f!==void 0?f:Ka.supportDynamicHeights,this.dnd=(m=n.dnd)!==null&&m!==void 0?m:this.disposables.add(Ka.dnd),this.layout((v=n.initialSize)===null||v===void 0?void 0:v.height,(_=n.initialSize)===null||_===void 0?void 0:_.width)}updateOptions(e){e.paddingBottom!==void 0&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling);let t;if(e.scrollByPage!==void 0&&(t={...t??{},scrollByPage:e.scrollByPage}),e.mouseWheelScrollSensitivity!==void 0&&(t={...t??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&(t={...t??{},fastScrollSensitivity:e.fastScrollSensitivity}),t&&this.scrollableElement.updateOptions(t),e.paddingTop!==void 0&&e.paddingTop!==this.rangeMap.paddingTop){const i=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),n=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(i,Math.max(0,this.lastRenderTop+n),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),s={start:e,end:e+t},r=ns.intersect(n,s),a=new Map;for(let x=r.end-1;x>=r.start;x--){const y=this.items[x];if(y.dragStartDisposable.dispose(),y.checkedDisposable.dispose(),y.row){let I=a.get(y.templateId);I||(I=[],a.set(y.templateId,I));const E=this.renderers.get(y.templateId);E&&E.disposeElement&&E.disposeElement(y.element,x,y.row.templateData,y.size),I.push(y.row)}y.row=null}const l={start:e+t,end:this.items.length},d=ns.intersect(l,n),c=ns.relativeComplement(l,n),u=i.map(x=>({id:String(this.itemId++),element:x,templateId:this.virtualDelegate.getTemplateId(x),size:this.virtualDelegate.getHeight(x),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(x),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:q.None,checkedDisposable:q.None}));let h;e===0&&t>=this.items.length?(this.rangeMap=new zF(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,u),h=this.items,this.items=u):(this.rangeMap.splice(e,t,u),h=this.items.splice(e,t,...u));const g=i.length-t,f=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),m=JE(d,g),v=ns.intersect(f,m);for(let x=v.start;xJE(x,g)),w=[{start:e,end:e+i.length},...b].map(x=>ns.intersect(f,x)),S=this.getNextToLastElement(w);for(const x of w)for(let y=x.start;yx.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=po(Je(this.domNode),()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)typeof t.width<"u"&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getRenderRange(this.lastRenderTop,this.lastRenderHeight).start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex(t=>t.element===e)}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){const i={height:typeof e=="number"?e:UX(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),typeof t<"u"&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof t=="number"?t:$D(this.domNode)})}render(e,t,i,n,s,r=!1){const a=this.getRenderRange(t,i),l=ns.relativeComplement(a,e),d=ns.relativeComplement(e,a),c=this.getNextToLastElement(l);if(r){const u=ns.intersect(e,a);for(let h=u.start;h{for(const u of d)for(let h=u.start;hn.row.domNode.setAttribute("aria-checked",String(!!u));c(a.value),n.checkedDisposable=a.onDidChange(c)}(s||!n.row.domNode.parentElement)&&(t?this.rowsContainer.insertBefore(n.row.domNode,t):this.rowsContainer.appendChild(n.row.domNode)),this.updateItemInDOM(n,e);const l=this.renderers.get(n.templateId);if(!l)throw new Error(`No renderer found for template id ${n.templateId}`);l==null||l.renderElement(n.element,e,n.row.templateData,n.size);const d=this.dnd.getDragURI(n.element);n.dragStartDisposable.dispose(),n.row.domNode.draggable=!!d,d&&(n.dragStartDisposable=J(n.row.domNode,"dragstart",c=>this.onDragStart(n.element,d,c))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=$D(e.row.domNode);const t=Je(e.row.domNode).getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return ye.map(this.disposables.add(new St(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return ye.map(this.disposables.add(new St(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return ye.filter(ye.map(this.disposables.add(new St(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>e.browserEvent.button===1,this.disposables)}get onMouseDown(){return ye.map(this.disposables.add(new St(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return ye.map(this.disposables.add(new St(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOut(){return ye.map(this.disposables.add(new St(this.domNode,"mouseout")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return ye.any(ye.map(this.disposables.add(new St(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),ye.map(this.disposables.add(new St(this.domNode,ni.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return ye.map(this.disposables.add(new St(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return ye.map(this.disposables.add(new St(this.rowsContainer,ni.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t>"u"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){var n,s;if(!i.dataTransfer)return;const r=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(sb.TEXT,t),i.dataTransfer.setDragImage){let a;this.dnd.getDragLabel&&(a=this.dnd.getDragLabel(r,i)),typeof a>"u"&&(a=String(r.length));const l=pe(".monaco-drag-image");l.textContent=a;const c=(u=>{for(;u&&!u.classList.contains("monaco-workbench");)u=u.parentElement;return u||this.domNode.ownerDocument})(this.domNode);c.appendChild(l),i.dataTransfer.setDragImage(l,-10,-10),setTimeout(()=>c.removeChild(l),0)}this.domNode.classList.add("dragging"),this.currentDragData=new m0(r),ih.CurrentDragAndDropData=new cce(r),(s=(n=this.dnd).onDragStart)===null||s===void 0||s.call(n,this.currentDragData,i)}onDragOver(e){var t;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),ih.CurrentDragAndDropData&&ih.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(ih.CurrentDragAndDropData)this.currentDragData=ih.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new uce}const i=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop=typeof i=="boolean"?i:i.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof i!="boolean"&&i.effect===0?"copy":"move";let n;if(typeof i!="boolean"&&i.feedback?n=i.feedback:typeof e.index>"u"?n=[-1]:n=[e.index],n=iu(n).filter(s=>s>=-1&&ss-r),n=n[0]===-1?[-1]:n,hce(this.currentDragFeedback,n))return!0;if(this.currentDragFeedback=n,this.currentDragFeedbackDisposable.dispose(),n[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=je(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const s of n){const r=this.items[s];r.dropTarget=!0,(t=r.row)===null||t===void 0||t.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=je(()=>{var s;for(const r of n){const a=this.items[r];a.dropTarget=!1,(s=a.row)===null||s===void 0||s.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(e){var t,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=lu(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&((i=(t=this.dnd).onDragLeave)===null||i===void 0||i.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,ih.CurrentDragAndDropData=void 0,!(!t||!e.browserEvent.dataTransfer)&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){var t,i;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,ih.CurrentDragAndDropData=void 0,(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=q.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const t=U8(this.domNode).top;this.dragOverAnimationDisposable=nQ(Je(this.domNode),this.animateDragAndDropScrollTop.bind(this,t))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=lu(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;i instanceof HTMLElement&&i!==this.rowsContainer&&t.contains(i);){const n=i.getAttribute("data-index");if(n){const s=Number(n);if(!isNaN(s))return s}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let s,r;e===this.elementTop(n.start)?(s=n.start,r=0):n.end-n.start>1&&(s=n.start+1,r=this.elementTop(s)-e);let a=0;for(;;){const l=this.getRenderRange(e,t);let d=!1;for(let c=l.start;c=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};class fce{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex(s=>s.templateData===i);if(n>=0){const s=this.renderedElements[n];this.trait.unrender(i),s.index=t}else{const s={index:t,templateData:i};this.renderedElements.push(s)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const s of this.renderedElements)s.index=e+t&&n.push({index:s.index+i-t,templateData:s.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex(i=>i.templateData===e);t<0||this.renderedElements.splice(t,1)}}let Jw=class{get name(){return this._trait}get renderer(){return new fce(this)}constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new W,this.onChange=this._onChange.event}splice(e,t,i){var n;t=Math.max(0,Math.min(t,this.length-e));const s=i.length-t,r=e+t,a=[];let l=0;for(;l=r;)a.push(this.sortedIndexes[l++]+s);const d=this.length+s;if(this.sortedIndexes.length>0&&a.length===0&&d>0){const c=(n=this.sortedIndexes.find(u=>u>=e))!==null&&n!==void 0?n:d-1;a.push(Math.min(c,d-1))}this.renderer.splice(e,t,i.length),this._set(a,a),this.length=d}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(UF),t)}_set(e,t,i){const n=this.indexes,s=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const r=eN(s,e);return this.renderer.renderIndexes(r),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return fv(this.sortedIndexes,e,UF)>=0}dispose(){jt(this._onChange)}};Og([nn],Jw.prototype,"renderer",null);class pce extends Jw{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class Hx{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,new Array(i.length).fill(!1));const n=this.trait.get().map(a=>this.identityProvider.getId(this.view.element(a)).toString());if(n.length===0)return this.trait.splice(e,t,new Array(i.length).fill(!1));const s=new Set(n),r=i.map(a=>s.has(this.identityProvider.getId(a).toString()));this.trait.splice(e,t,r)}}function qc(o){return o.tagName==="INPUT"||o.tagName==="TEXTAREA"}function _0(o,e){return o.classList.contains(e)?!0:o.classList.contains("monaco-list")||!o.parentElement?!1:_0(o.parentElement,e)}function k_(o){return _0(o,"monaco-editor")}function mce(o){return _0(o,"monaco-custom-toggle")}function _ce(o){return _0(o,"action-item")}function vce(o){return _0(o,"monaco-tree-sticky-row")}function m6(o){return o.tagName==="A"&&o.classList.contains("monaco-button")||o.tagName==="DIV"&&o.classList.contains("monaco-button-dropdown")?!0:o.classList.contains("monaco-list")||!o.parentElement?!1:m6(o.parentElement)}class _6{get onKeyDown(){return ye.chain(this.disposables.add(new St(this.view.domNode,"keydown")).event,e=>e.filter(t=>!qc(t.target)).map(t=>new gi(t)))}constructor(e,t,i){this.list=e,this.view=t,this.disposables=new de,this.multipleSelectionDisposables=new de,this.multipleSelectionSupport=i.multipleSelectionSupport,this.disposables.add(this.onKeyDown(n=>{switch(n.keyCode){case 3:return this.onEnter(n);case 16:return this.onUpArrow(n);case 18:return this.onDownArrow(n);case 11:return this.onPageUpArrow(n);case 12:return this.onPageDownArrow(n);case 9:return this.onEscape(n);case 31:this.multipleSelectionSupport&&(It?n.metaKey:n.ctrlKey)&&this.onCtrlA(n)}}))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Ls(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}Og([nn],_6.prototype,"onKeyDown",null);var cl;(function(o){o[o.Automatic=0]="Automatic",o[o.Trigger=1]="Trigger"})(cl||(cl={}));var Wf;(function(o){o[o.Idle=0]="Idle",o[o.Typing=1]="Typing"})(Wf||(Wf={}));const bce=new class{mightProducePrintableCharacter(o){return o.ctrlKey||o.metaKey||o.altKey?!1:o.keyCode>=31&&o.keyCode<=56||o.keyCode>=21&&o.keyCode<=30||o.keyCode>=98&&o.keyCode<=107||o.keyCode>=85&&o.keyCode<=95}};class Cce{constructor(e,t,i,n,s){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.keyboardNavigationEventFilter=n,this.delegate=s,this.enabled=!1,this.state=Wf.Idle,this.mode=cl.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new de,this.disposables=new de,this.updateOptions(e.options)}updateOptions(e){var t,i;!((t=e.typeNavigationEnabled)!==null&&t!==void 0)||t?this.enable():this.disable(),this.mode=(i=e.typeNavigationMode)!==null&&i!==void 0?i:cl.Automatic}enable(){if(this.enabled)return;let e=!1;const t=ye.chain(this.enabledDisposables.add(new St(this.view.domNode,"keydown")).event,s=>s.filter(r=>!qc(r.target)).filter(()=>this.mode===cl.Automatic||this.triggered).map(r=>new gi(r)).filter(r=>e||this.keyboardNavigationEventFilter(r)).filter(r=>this.delegate.mightProducePrintableCharacter(r)).forEach(r=>ct.stop(r,!0)).map(r=>r.browserEvent.key)),i=ye.debounce(t,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);ye.reduce(ye.any(t,i),(s,r)=>r===null?null:(s||"")+r,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),i(this.onClear,this,this.enabledDisposables),t(()=>e=!0,void 0,this.enabledDisposables),i(()=>e=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=(e=this.list.options.accessibilityProvider)===null||e===void 0?void 0:e.getAriaLabel(this.list.element(t[0]));i&&mo(i)}this.previouslyFocused=-1}onInput(e){if(!e){this.state=Wf.Idle,this.triggered=!1;return}const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===Wf.Idle?1:0;this.state=Wf.Typing;for(let s=0;s1&&d.length===1){this.previouslyFocused=i,this.list.setFocus([r]),this.list.reveal(r);return}}}else if(typeof l>"u"||ob(e,l)){this.previouslyFocused=i,this.list.setFocus([r]),this.list.reveal(r);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class wce{constructor(e,t){this.list=e,this.view=t,this.disposables=new de;const i=ye.chain(this.disposables.add(new St(t.domNode,"keydown")).event,s=>s.filter(r=>!qc(r.target)).map(r=>new gi(r)));ye.chain(i,s=>s.filter(r=>r.keyCode===2&&!r.ctrlKey&&!r.metaKey&&!r.shiftKey&&!r.altKey))(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(t.length===0)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!n||!(n instanceof HTMLElement)||n.tabIndex===-1)return;const s=Je(n).getComputedStyle(n);s.visibility==="hidden"||s.display==="none"||(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function v6(o){return It?o.browserEvent.metaKey:o.browserEvent.ctrlKey}function b6(o){return o.browserEvent.shiftKey}function Sce(o){return EM(o)&&o.button===2}const $F={isSelectionSingleChangeEvent:v6,isSelectionRangeChangeEvent:b6};class C6{constructor(e){this.list=e,this.disposables=new de,this._onPointer=new W,this.onPointer=this._onPointer.event,e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||$F),this.mouseSupport=typeof e.options.mouseSupport>"u"||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(ei.addTarget(e.getHTMLElement()))),ye.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||$F))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){k_(e.browserEvent.target)||jo()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(qc(e.browserEvent.target)||k_(e.browserEvent.target))return;const t=typeof e.index>"u"?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||qc(e.browserEvent.target)||k_(e.browserEvent.target)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=e.index;if(typeof t>"u"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),Sce(e.browserEvent)||this.list.setSelection([t],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(qc(e.browserEvent.target)||k_(e.browserEvent.target)||this.isSelectionChangeEvent(e)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(typeof i>"u"){const c=this.list.getFocus()[0];i=c??t,this.list.setAnchor(i)}const n=Math.min(i,t),s=Math.max(i,t),r=Ls(n,s+1),a=this.list.getSelection(),l=Dce(eN(a,[i]),i);if(l.length===0)return;const d=eN(r,xce(a,l));this.list.setSelection(d,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const n=this.list.getSelection(),s=n.filter(r=>r!==t);this.list.setFocus([t]),this.list.setAnchor(t),n.length===s.length?this.list.setSelection([...s,t],e.browserEvent):this.list.setSelection(s,e.browserEvent)}}dispose(){this.disposables.dispose()}}class w6{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){var t,i;const n=this.selectorSuffix&&`.${this.selectorSuffix}`,s=[];e.listBackground&&s.push(`.monaco-list${n} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(s.push(`.monaco-list${n}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),s.push(`.monaco-list${n}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&s.push(`.monaco-list${n}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(s.push(`.monaco-list${n}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),s.push(`.monaco-list${n}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&s.push(`.monaco-list${n}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&s.push(`.monaco-list${n}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&s.push(` .monaco-drag-image, .monaco-list${n}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; } `),e.listFocusAndSelectionForeground&&s.push(` @@ -229,9 +229,9 @@ Please report this to https://github.com/markedjs/marked.`,te.silent)return"

A background-color: ${e.tableOddRowsBackgroundColor}; } `),this.styleElement.textContent=s.join(` -`)}}const bce={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropBackground:"#383B3D",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:Y.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:Y.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:Y.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0},Cce={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function wce(o,e){const t=o.indexOf(e);if(t===-1)return[];const i=[];let n=t-1;for(;n>=0&&o[n]===e-(t-n);)i.push(o[n--]);for(i.reverse(),n=t;n=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){t.push(o[i]),i++,n++;continue}else o[i]=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){i++,n++;continue}else o[i]o-e;class yce{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,i,n){let s=0;for(const r of this.renderers)r.renderElement(e,t,i[s++],n)}disposeElement(e,t,i,n){var s;let r=0;for(const a of this.renderers)(s=a.disposeElement)===null||s===void 0||s.call(a,e,t,i[r],n),r+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class Lce{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const s=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof s=="number"?i.setAttribute("aria-level",`${s}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class Dce{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){var i,n;(n=(i=this.dnd).onDragStart)===null||n===void 0||n.call(i,e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragLeave(e,t,i,n){var s,r;(r=(s=this.dnd).onDragLeave)===null||r===void 0||r.call(s,e,t,i,n)}onDragEnd(e){var t,i;(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}dispose(){this.dnd.dispose()}}class Yr{get onDidChangeFocus(){return ye.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return ye.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=ye.chain(this.disposables.add(new St(this.view.domNode,"keydown")).event,s=>s.map(r=>new gi(r)).filter(r=>e=r.keyCode===58||r.shiftKey&&r.keyCode===68).map(r=>ct.stop(r,!0)).filter(()=>!1)),i=ye.chain(this.disposables.add(new St(this.view.domNode,"keyup")).event,s=>s.forEach(()=>e=!1).map(r=>new gi(r)).filter(r=>r.keyCode===58||r.shiftKey&&r.keyCode===68).map(r=>ct.stop(r,!0)).map(({browserEvent:r})=>{const a=this.getFocus(),l=a.length?a[0]:void 0,d=typeof l<"u"?this.view.element(l):void 0,c=typeof l<"u"?this.view.domElement(l):this.view.domNode;return{index:l,element:d,anchor:c,browserEvent:r}})),n=ye.chain(this.view.onContextMenu,s=>s.filter(r=>!e).map(({element:r,index:a,browserEvent:l})=>({element:r,index:a,anchor:new Pr(Je(this.view.domNode),l),browserEvent:l})));return ye.any(t,i,n)}get onKeyDown(){return this.disposables.add(new St(this.view.domNode,"keydown")).event}get onDidFocus(){return ye.signal(this.disposables.add(new St(this.view.domNode,"focus",!0)).event)}constructor(e,t,i,n,s=Cce){var r,a,l,d;this.user=e,this._options=s,this.focus=new Jw("focused"),this.anchor=new Jw("anchor"),this.eventBufferer=new oM,this._ariaLabel="",this.disposables=new de,this._onDidDispose=new W,this.onDidDispose=this._onDidDispose.event;const c=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(r=this._options.accessibilityProvider)===null||r===void 0?void 0:r.getWidgetRole():"list";this.selection=new uce(c!=="listbox");const u=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(u.push(new Lce(this.accessibilityProvider)),(l=(a=this.accessibilityProvider).onDidChangeActiveDescendant)===null||l===void 0||l.call(a,this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map(g=>new yce(g.templateId,[...u,g]));const h={...s,dnd:s.dnd&&new Dce(this,s.dnd)};if(this.view=this.createListView(t,i,n,h),this.view.domNode.setAttribute("role",c),s.styleController)this.styleController=s.styleController(this.view.domId);else{const g=mr(this.view.domNode);this.styleController=new w6(g,this.view.domId)}if(this.spliceable=new tce([new Hx(this.focus,this.view,s.identityProvider),new Hx(this.selection,this.view,s.identityProvider),new Hx(this.anchor,this.view,s.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new _ce(this,this.view)),(typeof s.keyboardSupport!="boolean"||s.keyboardSupport)&&(this.keyboardController=new _6(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const g=s.keyboardNavigationDelegate||pce;this.typeNavigationController=new mce(this,this.view,s.keyboardNavigationLabelProvider,(d=s.keyboardNavigationEventFilter)!==null&&d!==void 0?d:()=>!0,g),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(s),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,i,n){return new yr(e,t,i,n)}createMouseController(e){return new C6(this)}updateOptions(e={}){var t,i;this._options={...this._options,...e},(t=this.typeNavigationController)===null||t===void 0||t.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),(i=this.keyboardController)===null||i===void 0||i.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new th(this.user,`Invalid start index: ${e}`);if(t<0)throw new th(this.user,`Invalid delete count: ${t}`);t===0&&i.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,i))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const i of e)if(i<0||i>=this.length)throw new th(this.user,`Invalid index ${i}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(typeof e>"u"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new th(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return G2(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return typeof e>"u"?void 0:this.element(e)}setFocus(e,t){for(const i of e)if(i<0||i>=this.length)throw new th(this.user,`Invalid index ${i}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(this.length===0)return;const s=this.focus.get(),r=this.findNextIndex(s.length>0?s[0]+e:0,t,n);r>-1&&this.setFocus([r],i)}focusPrevious(e=1,t=!1,i,n){if(this.length===0)return;const s=this.focus.get(),r=this.findPreviousIndex(s.length>0?s[0]-e:0,t,n);r>-1&&this.setFocus([r],i)}async focusNextPage(e,t){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=i===0?0:i-1;const n=this.getFocus()[0];if(n!==i&&(n===void 0||i>n)){const s=this.findPreviousIndex(i,!1,t);s>-1&&n!==s?this.setFocus([s],e):this.setFocus([i],e)}else{const s=this.view.getScrollTop();let r=s+this.view.renderHeight;i>n&&(r-=this.view.elementHeight(i)),this.view.setScrollTop(r),this.view.getScrollTop()!==s&&(this.setFocus([]),await au(0),await this.focusNextPage(e,t))}}async focusPreviousPage(e,t){let i;const n=this.view.getScrollTop();n===0?i=this.view.indexAt(n):i=this.view.indexAfter(n-1);const s=this.getFocus()[0];if(s!==i&&(s===void 0||s>=i)){const r=this.findNextIndex(i,!1,t);r>-1&&s!==r?this.setFocus([r],e):this.setFocus([i],e)}else{const r=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==r&&(this.setFocus([]),await au(0),await this.focusPreviousPage(e,t))}}focusLast(e,t){if(this.length===0)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(this.length===0)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e=e%this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e))}reveal(e,t,i=0){if(e<0||e>=this.length)throw new th(this.user,`Invalid index ${e}`);const n=this.view.getScrollTop(),s=this.view.elementTop(e),r=this.view.elementHeight(e);if(nu(t)){const a=r-this.view.renderHeight+i;this.view.setScrollTop(a*io(t,0,1)+s-i)}else{const a=s+r,l=n+this.view.renderHeight;s=l||(s=l&&r>=this.view.renderHeight?this.view.setScrollTop(s-i):a>=l&&this.view.setScrollTop(a-this.view.renderHeight))}}getRelativeTop(e,t=0){if(e<0||e>=this.length)throw new th(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),s=this.view.elementHeight(e);if(ni+this.view.renderHeight)return null;const r=s-this.view.renderHeight+t;return Math.abs((i+t-n)/r)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(i=>this.view.element(i)),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;!((e=this.accessibilityProvider)===null||e===void 0)&&e.getActiveDescendantId&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}Og([nn],Yr.prototype,"onDidChangeFocus",null);Og([nn],Yr.prototype,"onDidChangeSelection",null);Og([nn],Yr.prototype,"onContextMenu",null);Og([nn],Yr.prototype,"onKeyDown",null);Og([nn],Yr.prototype,"onDidFocus",null);const Ah=pe,S6="selectOption.entry.template";class xce{get templateId(){return S6}renderTemplate(e){const t=Object.create(null);return t.root=e,t.text=le(e,Ah(".option-text")),t.detail=le(e,Ah(".option-detail")),t.decoratorRight=le(e,Ah(".option-decorator-right")),t}renderElement(e,t,i){const n=i,s=e.text,r=e.detail,a=e.decoratorRight,l=e.isDisabled;n.text.textContent=s,n.detail.textContent=r||"",n.decoratorRight.innerText=a||"",l?n.root.classList.add("option-disabled"):n.root.classList.remove("option-disabled")}disposeTemplate(e){}}class ul extends q{constructor(e,t,i,n,s){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=n,this.selectBoxOptions=s||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=ul.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new W,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(i),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}getHeight(){return 22}getTemplateId(){return S6}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=pe(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=le(this.selectDropDownContainer,Ah(".select-box-details-pane"));const t=le(this.selectDropDownContainer,Ah(".select-box-dropdown-container-width-control")),i=le(t,Ah(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",le(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=mr(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(J(this.selectDropDownContainer,Se.DRAG_START,n=>{ct.stop(n,!0)}))}registerListeners(){this._register(Wi(this.selectElement,"change",t=>{this.selected=t.target.selectedIndex,this._onDidSelect.fire({index:t.target.selectedIndex,selected:t.target.value}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)})),this._register(J(this.selectElement,Se.CLICK,t=>{ct.stop(t),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(J(this.selectElement,Se.MOUSE_DOWN,t=>{ct.stop(t)}));let e;this._register(J(this.selectElement,"touchstart",t=>{e=this._isVisible})),this._register(J(this.selectElement,"touchend",t=>{ct.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(J(this.selectElement,Se.KEY_DOWN,t=>{const i=new gi(t);let n=!1;It?(i.keyCode===18||i.keyCode===16||i.keyCode===10||i.keyCode===3)&&(n=!0):(i.keyCode===18&&i.altKey||i.keyCode===16&&i.altKey||i.keyCode===10||i.keyCode===3)&&(n=!0),n&&(this.showSelectDropDown(),ct.stop(t,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){Bi(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((i,n)=>{this.selectElement.add(this.createOption(i.text,n,i.isDisabled)),typeof i.description=="string"&&(this._hasDetails=!0)})),t!==void 0&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){var e;(e=this.selectList)===null||e===void 0||e.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join(` -`)}styleSelectElement(){var e,t,i;const n=(e=this.styles.selectBackground)!==null&&e!==void 0?e:"",s=(t=this.styles.selectForeground)!==null&&t!==void 0?t:"",r=(i=this.styles.selectBorder)!==null&&i!==void 0?i:"";this.selectElement.style.backgroundColor=n,this.selectElement.style.color=s,this.selectElement.style.borderColor=r}styleList(){var e,t;const i=(e=this.styles.selectBackground)!==null&&e!==void 0?e:"",n=Bh(this.styles.selectListBackground,i);this.selectDropDownListContainer.style.backgroundColor=n,this.selectionDetailsPane.style.backgroundColor=n;const s=(t=this.styles.focusBorder)!==null&&t!==void 0?t:"";this.selectDropDownContainer.style.outlineColor=s,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,i){const n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{try{e.removeChild(this.selectDropDownContainer)}catch{}}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=Je(this.selectElement),i=gn(this.selectElement),n=Je(this.selectElement).getComputedStyle(this.selectElement),s=parseFloat(n.getPropertyValue("--dropdown-padding-top"))+parseFloat(n.getPropertyValue("--dropdown-padding-bottom")),r=t.innerHeight-i.top-i.height-(this.selectBoxOptions.minBottomMargin||0),a=i.top-ul.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,l=this.selectElement.offsetWidth,d=this.setWidthControlElement(this.widthControlElement),c=Math.max(d,Math.round(l)).toString()+"px";this.selectDropDownContainer.style.width=c,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let u=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const h=this._hasDetails?this._cachedMaxDetailsHeight:0,g=u+s+h,f=Math.floor((r-s-h)/this.getHeight()),m=Math.floor((a-s-h)/this.getHeight());if(e)return i.top+i.height>t.innerHeight-22||i.topf&&this.options.length>f?(this._dropDownPosition=1,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(i.top+i.height>t.innerHeight-22||i.topr&&(u=f*this.getHeight())}else g>a&&(u=m*this.getHeight());return this.selectList.layout(u),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=u+s+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=u+s+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=c,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach((s,r)=>{const a=s.detail?s.detail.length:0,l=s.decoratorRight?s.decoratorRight.length:0,d=s.text.length+a+l;d>n&&(i=r,n=d)}),e.textContent=this.options[i].text+(this.options[i].decoratorRight?this.options[i].decoratorRight+" ":""),t=zs(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=le(e,Ah(".select-box-dropdown-list-container")),this.listRenderer=new xce,this.selectList=new Yr("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:n=>{let s=n.text;return n.detail&&(s+=`. ${n.detail}`),n.decoratorRight&&(s+=`. ${n.decoratorRight}`),n.description&&(s+=`. ${n.description}`),s},getWidgetAriaLabel:()=>p({},"Select Box"),getRole:()=>It?"":"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const t=this._register(new St(this.selectDropDownListContainer,"keydown")),i=ye.chain(t.event,n=>n.filter(()=>this.selectList.length>0).map(s=>new gi(s)));this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===3))(this.onEnter,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===2))(this.onEnter,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===9))(this.onEscape,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===16))(this.onUpArrow,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===18))(this.onDownArrow,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===12))(this.onPageDown,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===11))(this.onPageUp,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===14))(this.onHome,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===13))(this.onEnd,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode>=21&&s.keyCode<=56||s.keyCode>=85&&s.keyCode<=113))(this.onCharacter,this)),this._register(J(this.selectList.getHTMLElement(),Se.POINTER_UP,n=>this.onPointerUp(n))),this._register(this.selectList.onMouseOver(n=>typeof n.index<"u"&&this.selectList.setFocus([n.index]))),this._register(this.selectList.onDidChangeFocus(n=>this.onListFocus(n))),this._register(J(this.selectDropDownContainer,Se.FOCUS_OUT,n=>{!this._isVisible||Qn(n.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;ct.stop(e);const t=e.target;if(!t||t.classList.contains("slider"))return;const i=t.closest(".monaco-list-row");if(!i)return;const n=Number(i.getAttribute("data-index")),s=i.classList.contains("option-disabled");n>=0&&n{for(let r=0;rthis.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(ct.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){ct.stop(e),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(e){ct.stop(e),!(this.options.length<2)&&(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){ct.stop(e),!(this.options.length<2)&&(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const t=vd.toString(e.keyCode);let i=-1;for(let n=0;n{this._register(J(this.selectElement,e,t=>{this.selectElement.focus()}))}),this._register(Wi(this.selectElement,"click",e=>{ct.stop(e,!0)})),this._register(Wi(this.selectElement,"change",e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),this._register(Wi(this.selectElement,"keydown",e=>{let t=!1;It?(e.keyCode===18||e.keyCode===16||e.keyCode===10)&&(t=!0):(e.keyCode===18&&e.altKey||e.keyCode===10||e.keyCode===3)&&(t=!0),t&&e.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){(!this.options||!Bi(this.options,e))&&(this.options=e,this.selectElement.options.length=0,this.options.forEach((i,n)=>{this.selectElement.add(this.createOption(i.text,n,i.isDisabled))})),t!==void 0&&this.select(t)}select(e){this.options.length===0?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{this.element&&this.handleActionChangeEvent(n)}))}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new tg)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(ei.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,pr&&this._register(J(e,Se.DRAG_START,n=>{var s;return(s=n.dataTransfer)===null||s===void 0?void 0:s.setData(sb.TEXT,this._action.label)}))),this._register(J(t,ni.Tap,n=>this.onClick(n,!0))),this._register(J(t,Se.MOUSE_DOWN,n=>{i||ct.stop(n,!0),this._action.enabled&&n.button===0&&t.classList.add("active")})),It&&this._register(J(t,Se.CONTEXT_MENU,n=>{n.button===0&&n.ctrlKey===!0&&this.onClick(n)})),this._register(J(t,Se.CLICK,n=>{ct.stop(n,!0),this.options&&this.options.isMenu||this.onClick(n)})),this._register(J(t,Se.DBLCLICK,n=>{ct.stop(n,!0)})),[Se.MOUSE_UP,Se.MOUSE_OUT].forEach(n=>{this._register(J(t,n,s=>{ct.stop(s),t.classList.remove("active")}))})}onClick(e,t=!1){var i;ct.stop(e,!0);const n=Ro(this._context)?!((i=this.options)===null||i===void 0)&&i.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}updateTooltip(){var e;if(!this.element)return;const t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.updateAriaLabel(),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(t):(this.customHover=f6(this.options.hoverDelegate,this.element,t),this._store.add(this.customHover))):this.element.title=t}updateAriaLabel(){var e;if(this.element){const t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.element.setAttribute("aria-label",t)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class jp extends fa{constructor(e,t,i){super(e,t,i),this.options=i,this.options.icon=i.icon!==void 0?i.icon:!1,this.options.label=i.label!==void 0?i.label:!0,this.cssClass=""}render(e){super.render(e),qt(this.element);const t=document.createElement("a");if(t.classList.add("action-label"),t.setAttribute("role",this.getDefaultAriaRole()),this.label=t,this.element.appendChild(t),this.options.label&&this.options.keybinding){const i=document.createElement("span");i.classList.add("keybinding"),i.textContent=this.options.keybinding,this.element.appendChild(i)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===Mn.ID?"presentation":this.options.isMenu?"menuitem":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=p({},"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):(e=this.label)===null||e===void 0||e.classList.remove("codicon")}updateEnabled(){var e,t;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),(e=this.element)===null||e===void 0||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),(t=this.element)===null||t===void 0||t.classList.add("disabled"))}updateAriaLabel(){var e;if(this.label){const t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.label.setAttribute("aria-label",t)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox")):(this.label.classList.remove("checked"),this.label.removeAttribute("aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class Ece extends fa{constructor(e,t,i,n,s,r,a){super(e,t),this.selectBox=new Ice(i,n,s,r,a),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect(e=>this.runAction(e.selected,e.index)))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){var e;(e=this.selectBox)===null||e===void 0||e.focus()}blur(){var e;(e=this.selectBox)===null||e===void 0||e.blur()}render(e){this.selectBox.render(e)}}class Nce extends tg{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new W),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=le(e,pe(".monaco-dropdown")),this._label=le(this._element,pe(".dropdown-label"));let i=t.labelRenderer;i||(i=s=>(s.textContent=t.label||"",null));for(const s of[Se.CLICK,Se.MOUSE_DOWN,ni.Tap])this._register(J(this.element,s,r=>ct.stop(r,!0)));for(const s of[Se.MOUSE_DOWN,ni.Tap])this._register(J(this._label,s,r=>{EM(r)&&(r.detail>1||r.button!==0)||(this.visible?this.hide():this.show())}));this._register(J(this._label,Se.KEY_UP,s=>{const r=new gi(s);(r.equals(3)||r.equals(10))&&(ct.stop(s,!0),this.visible?this.hide():this.show())}));const n=i(this._label);n&&this._register(n),this._register(ei.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class Tce extends Nce{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class eS extends fa{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new W),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=s=>{this.element=le(s,pe("a.action-label"));let r=[];return typeof this.options.classNames=="string"?r=this.options.classNames.split(/\s+/g).filter(a=>!!a):this.options.classNames&&(r=this.options.classNames),r.find(a=>a==="icon")||r.push("codicon"),this.element.classList.add(...r),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},i=Array.isArray(this.menuActionsOrProvider),n={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:i?this.menuActionsOrProvider:void 0,actionProvider:i?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new Tce(e,n)),this._register(this.dropdownMenu.onDidChangeVisibility(s=>{var r;(r=this.element)===null||r===void 0||r.setAttribute("aria-expanded",`${s}`),this._onDidChangeVisibility.fire(s)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const s=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return s.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){var e;(e=this.dropdownMenu)===null||e===void 0||e.show()}updateEnabled(){var e,t;const i=!this.action.enabled;(e=this.actionItem)===null||e===void 0||e.classList.toggle("disabled",i),(t=this.element)===null||t===void 0||t.classList.toggle("disabled",i)}}function Mce(o){return o?o.condition!==void 0:!1}var fp;(function(o){o[o.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",o[o.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(fp||(fp={}));var Vf;(function(o){o[o.None=0]="None",o[o.Initialized=1]="Initialized",o[o.Closed=2]="Closed"})(Vf||(Vf={}));class pp extends q{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new Yh),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=Vf.None,this.cache=new Map,this.flushDelayer=this._register(new N7(pp.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var t,i;this._onDidChangeStorage.pause();try{(t=e.changed)===null||t===void 0||t.forEach((n,s)=>this.acceptExternal(s,n)),(i=e.deleted)===null||i===void 0||i.forEach(n=>this.acceptExternal(n,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===Vf.Closed)return;let i=!1;Ro(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){const i=this.cache.get(e);return Ro(i)?t:i}getBoolean(e,t){const i=this.get(e);return Ro(i)?t:i==="true"}getNumber(e,t){const i=this.get(e);return Ro(i)?t:parseInt(i,10)}async set(e,t,i=!1){if(this.state===Vf.Closed)return;if(Ro(t))return this.delete(e,i);const n=Es(t)||Array.isArray(t)?Ode(t):String(t);if(this.cache.get(e)!==n)return this.cache.set(e,n),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:i}),this.doFlush()}async delete(e,t=!1){if(!(this.state===Vf.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{var t;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(t=this.whenFlushedCallbacks.pop())===null||t===void 0||t()})}async doFlush(e){return this.options.hint===fp.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),e)}}pp.DEFAULT_FLUSH_DELAY=100;class zx{constructor(){this.onDidChangeItemsExternal=ye.None,this.items=new Map}async updateItems(e){var t,i;(t=e.insert)===null||t===void 0||t.forEach((n,s)=>this.items.set(s,n)),(i=e.delete)===null||i===void 0||i.forEach(n=>this.items.delete(n))}}const M1="__$__targetStorageMarker",Xr=bt("storageService");var rb;(function(o){o[o.NONE=0]="NONE",o[o.SHUTDOWN=1]="SHUTDOWN"})(rb||(rb={}));function Ace(o){const e=o.get(M1);if(e)try{return JSON.parse(e)}catch{}return Object.create(null)}class nL extends q{constructor(e={flushInterval:nL.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new Yh),this._onDidChangeTarget=this._register(new Yh),this._onWillSaveState=this._register(new W),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,t,i){return ye.filter(this._onDidChangeValue.event,n=>n.scope===e&&(t===void 0||n.key===t),i)}emitDidChangeValue(e,t){const{key:i,external:n}=t;if(i===M1){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:i,target:this.getKeyTargets(e)[i],external:n})}get(e,t,i){var n;return(n=this.getStorage(t))===null||n===void 0?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return(n=this.getStorage(t))===null||n===void 0?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return(n=this.getStorage(t))===null||n===void 0?void 0:n.getNumber(e,i)}store(e,t,i,n,s=!1){if(Ro(t)){this.remove(e,i,s);return}this.withPausedEmitters(()=>{var r;this.updateKeyTarget(e,i,n),(r=this.getStorage(i))===null||r===void 0||r.set(e,t,s)})}remove(e,t,i=!1){this.withPausedEmitters(()=>{var n;this.updateKeyTarget(e,t,void 0),(n=this.getStorage(t))===null||n===void 0||n.delete(e,i)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i,n=!1){var s,r;const a=this.getKeyTargets(t);typeof i=="number"?a[e]!==i&&(a[e]=i,(s=this.getStorage(t))===null||s===void 0||s.set(M1,JSON.stringify(a),n)):typeof a[e]=="number"&&(delete a[e],(r=this.getStorage(t))===null||r===void 0||r.set(M1,JSON.stringify(a),n))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const t=this.getStorage(e);return t?Ace(t):Object.create(null)}}nL.DEFAULT_FLUSH_INTERVAL=60*1e3;class Rce extends nL{constructor(){super(),this.applicationStorage=this._register(new pp(new zx,{hint:fp.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new pp(new zx,{hint:fp.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new pp(new zx,{hint:fp.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e)))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}function Pce(o,e){const t={...e};for(const i in o){const n=o[i];t[i]=n!==void 0?Ee(n):void 0}return t}const Oce={keybindingLabelBackground:Ee(Cte),keybindingLabelForeground:Ee(wte),keybindingLabelBorder:Ee(Ste),keybindingLabelBottomBorder:Ee(yte),keybindingLabelShadow:Ee(ml)},Fce={buttonForeground:Ee(f_),buttonSeparator:Ee(rte),buttonBackground:Ee(p_),buttonHoverBackground:Ee(ate),buttonSecondaryForeground:Ee(dte),buttonSecondaryBackground:Ee(iE),buttonSecondaryHoverBackground:Ee(cte),buttonBorder:Ee(lte)},Bce={progressBarBackground:Ee(gte)},tS={inputActiveOptionBorder:Ee(KM),inputActiveOptionForeground:Ee(qM),inputActiveOptionBackground:Ee(Ih)};Ee(iie),Ee(sie),Ee(nie);Ee(Fi),Ee(bl),Ee(ml),Ee(Lt),Ee(Cie),Ee(wie),Ee(Sie),Ee(Zee);const iS={inputBackground:Ee(T8),inputForeground:Ee(M8),inputBorder:Ee(A8),inputValidationInfoBorder:Ee(Qee),inputValidationInfoBackground:Ee(Yee),inputValidationInfoForeground:Ee(Xee),inputValidationWarningBorder:Ee(tte),inputValidationWarningBackground:Ee(Jee),inputValidationWarningForeground:Ee(ete),inputValidationErrorBorder:Ee(ste),inputValidationErrorBackground:Ee(ite),inputValidationErrorForeground:Ee(nte)},Wce={listFilterWidgetBackground:Ee(Zte),listFilterWidgetOutline:Ee(Yte),listFilterWidgetNoMatchesOutline:Ee(Xte),listFilterWidgetShadow:Ee(Qte),inputBoxStyles:iS,toggleStyles:tS},y6={badgeBackground:Ee(y1),badgeForeground:Ee(ute),badgeBorder:Ee(Lt)};Ee(gie),Ee(hie),Ee(s4),Ee(s4),Ee(fie);const Fg={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:Ee(Wte),listFocusForeground:Ee(Vte),listFocusOutline:Ee(Hte),listActiveSelectionBackground:Ee(Ed),listActiveSelectionForeground:Ee(Sl),listActiveSelectionIconForeground:Ee(b_),listFocusAndSelectionOutline:Ee(zte),listFocusAndSelectionBackground:Ee(Ed),listFocusAndSelectionForeground:Ee(Sl),listInactiveSelectionBackground:Ee($te),listInactiveSelectionIconForeground:Ee(jte),listInactiveSelectionForeground:Ee(Ute),listInactiveFocusBackground:Ee(Kte),listInactiveFocusOutline:Ee(qte),listHoverBackground:Ee(O8),listHoverForeground:Ee(F8),listDropBackground:Ee(Gte),listSelectionOutline:Ee(fi),listHoverOutline:Ee(fi),treeIndentGuidesStroke:Ee(C_),treeInactiveIndentGuidesStroke:Ee(Jte),tableColumnsBorder:Ee(eie),tableOddRowsBackgroundColor:Ee(tie)};function Sm(o){return Pce(o,Fg)}const Vce={selectBackground:Ee(_l),selectListBackground:Ee(ote),selectForeground:Ee(xd),decoratorRightForeground:Ee(R8),selectBorder:Ee(If),focusBorder:Ee(Ho),listFocusBackground:Ee(Nh),listInactiveSelectionIconForeground:Ee(Ef),listFocusForeground:Ee(Eh),listFocusOutline:Kee(fi,Y.transparent.toString()),listHoverBackground:Ee(O8),listHoverForeground:Ee(F8),listHoverOutline:Ee(fi),selectListBorder:Ee(Cl),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0},Hce={shadowColor:Ee(ml),borderColor:Ee(oie),foregroundColor:Ee(rie),backgroundColor:Ee(aie),selectionForegroundColor:Ee(lie),selectionBackgroundColor:Ee(die),selectionBorderColor:Ee(cie),separatorColor:Ee(uie),scrollbarShadow:Ee(hte),scrollbarSliderBackground:Ee(m_),scrollbarSliderHoverBackground:Ee(__),scrollbarSliderActiveBackground:Ee(v_)};var sL=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},js=function(o,e){return function(t,i){e(t,i,o)}};function zce(o,e,t,i){const n=o.getActions(e),s=Dd.getInstance(),r=s.keyStatus.altKey||(is||ws)&&s.keyStatus.shiftKey;L6(n,t,r,a=>a==="navigation")}function VA(o,e,t,i,n,s){const r=o.getActions(e);L6(r,t,!1,typeof i=="string"?l=>l===i:i,n,s)}function L6(o,e,t,i=r=>r==="navigation",n=()=>!1,s=!1){let r,a;Array.isArray(e)?(r=e,a=e):(r=e.primary,a=e.secondary);const l=new Set;for(const[d,c]of o){let u;i(d)?(u=r,u.length>0&&s&&u.push(new Mn)):(u=a,u.length>0&&u.push(new Mn));for(let h of c){t&&(h=h instanceof Ur&&h.alt?h.alt:h);const g=u.push(h);h instanceof xp&&l.add({group:d,action:h,index:g-1})}}for(const{group:d,action:c,index:u}of l){const h=i(d)?r:a,g=c.actions;n(c,d,h.length)&&h.splice(u,1,...g)}}let dg=class extends jp{constructor(e,t,i,n,s,r,a,l){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:t==null?void 0:t.draggable,keybinding:t==null?void 0:t.keybinding,hoverDelegate:t==null?void 0:t.hoverDelegate}),this._keybindingService=i,this._notificationService=n,this._contextKeyService=s,this._themeService=r,this._contextMenuService=a,this._accessibilityService=l,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new An),this._altKey=Dd.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){e.preventDefault(),e.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(t){this._notificationService.error(t)}}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1;const i=()=>{var n;const s=!!(!((n=this._menuItemAction.alt)===null||n===void 0)&&n.enabled)&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);s!==this._wantsAltCommand&&(this._wantsAltCommand=s,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(i)),this._register(J(e,"mouseleave",n=>{t=!1,i()})),this._register(J(e,"mouseenter",n=>{t=!0,i()})),i()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var e;const t=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),i=t&&t.getLabel(),n=this._commandAction.tooltip||this._commandAction.label;let s=i?p("titleAndKb","{0} ({1})",n,i):n;if(!this._wantsAltCommand&&(!((e=this._menuItemAction.alt)===null||e===void 0)&&e.enabled)){const r=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,a=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),l=a&&a.getLabel(),d=l?p("titleAndKb","{0} ({1})",r,l):r;s=p("titleAndKbAndAlt",`{0} -[{1}] {2}`,s,IA.modifierLabels[Vo].altKey,d)}return s}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:i}=this;if(!t||!i)return;const n=this._commandAction.checked&&Mce(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(n)if(Ue.isThemeIcon(n)){const s=Ue.asClassNameArray(n);i.classList.add(...s),this._itemClassDispose.value=je(()=>{i.classList.remove(...s)})}else i.style.backgroundImage=Pp(this._themeService.getColorTheme().type)?du(n.dark):du(n.light),i.classList.add("icon"),this._itemClassDispose.value=Hr(je(()=>{i.style.backgroundImage="",i.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};dg=sL([js(2,Xt),js(3,sn),js(4,Xe),js(5,Sn),js(6,Sr),js(7,Zl)],dg);let tN=class extends eS{constructor(e,t,i,n,s){var r,a,l;const d={...t,menuAsChild:(r=t==null?void 0:t.menuAsChild)!==null&&r!==void 0?r:!1,classNames:(a=t==null?void 0:t.classNames)!==null&&a!==void 0?a:Ue.isThemeIcon(e.item.icon)?Ue.asClassName(e.item.icon):void 0,keybindingProvider:(l=t==null?void 0:t.keybindingProvider)!==null&&l!==void 0?l:c=>i.lookupKeybinding(c.id)};super(e,{getActions:()=>e.actions},n,d),this._keybindingService=i,this._contextMenuService=n,this._themeService=s}render(e){super.render(e),qt(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!Ue.isThemeIcon(i)){this.element.classList.add("icon");const n=()=>{this.element&&(this.element.style.backgroundImage=Pp(this._themeService.getColorTheme().type)?du(i.dark):du(i.light))};n(),this._register(this._themeService.onDidColorThemeChange(()=>{n()}))}}};tN=sL([js(2,Xt),js(3,Sr),js(4,Sn)],tN);let iN=class extends fa{constructor(e,t,i,n,s,r,a,l){var d,c,u;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=s,this._menuService=r,this._instaService=a,this._storageService=l,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let h;const g=t!=null&&t.persistLastActionId?l.get(this._storageKey,1):void 0;g&&(h=e.actions.find(m=>g===m.id)),h||(h=e.actions[0]),this._defaultAction=this._instaService.createInstance(dg,h,{keybinding:this._getDefaultActionKeybindingLabel(h)});const f={keybindingProvider:m=>this._keybindingService.lookupKeybinding(m.id),...t,menuAsChild:(d=t==null?void 0:t.menuAsChild)!==null&&d!==void 0?d:!0,classNames:(c=t==null?void 0:t.classNames)!==null&&c!==void 0?c:["codicon","codicon-chevron-down"],actionRunner:(u=t==null?void 0:t.actionRunner)!==null&&u!==void 0?u:new tg};this._dropdown=new eS(e,e.actions,this._contextMenuService,f),this._dropdown.actionRunner.onDidRun(m=>{m.action instanceof Ur&&this.update(m.action)})}update(e){var t;!((t=this._options)===null||t===void 0)&&t.persistLastActionId&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(dg,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends tg{async runAction(i,n){await i.run(void 0)}},this._container&&this._defaultAction.render(Z7(this._container,pe(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let i;if(!((t=this._options)===null||t===void 0)&&t.renderKeybindingWithDefaultActionLabel){const n=this._keybindingService.lookupKeybinding(e.id);n&&(i=`(${n.getLabel()})`)}return i}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=pe(".action-container");this._defaultAction.render(le(this._container,t)),this._register(J(t,Se.KEY_DOWN,n=>{const s=new gi(n);s.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),s.stopPropagation())}));const i=pe(".dropdown-action-container");this._dropdown.render(le(this._container,i)),this._register(J(i,Se.KEY_DOWN,n=>{var s;const r=new gi(n);r.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(s=this._defaultAction.element)===null||s===void 0||s.focus(),r.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};iN=sL([js(2,Xt),js(3,sn),js(4,Sr),js(5,Ba),js(6,qe),js(7,Xr)],iN);let nN=class extends Ece{constructor(e,t){super(null,e,e.actions.map(i=>({text:i.id===Mn.ID?"─────────":i.label,isDisabled:!i.enabled})),0,t,Vce,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex(i=>i.checked)))}render(e){super.render(e),e.style.borderColor=Ee(If)}runAction(e,t){const i=this.action.actions[t];i&&this.actionRunner.run(i)}};nN=sL([js(1,Gd)],nN);function $ce(o,e,t){return e instanceof Ur?o.createInstance(dg,e,t):e instanceof xv?e.item.isSelection?o.createInstance(nN,e):e.item.rememberDefaultAction?o.createInstance(iN,e,{...t,persistLastActionId:!0}):o.createInstance(tN,e,t):void 0}class Cr extends q{constructor(e,t={}){var i,n,s,r,a,l;super(),this._actionRunnerDisposables=this._register(new de),this.viewItemDisposables=this._register(new nM),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new W),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new W({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new W),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new W),this.onWillRun=this._onWillRun.event,this.options=t,this._context=(i=t.context)!==null&&i!==void 0?i:null,this._orientation=(n=this.options.orientation)!==null&&n!==void 0?n:0,this._triggerKeys={keyDown:(r=(s=this.options.triggerKeys)===null||s===void 0?void 0:s.keyDown)!==null&&r!==void 0?r:!1,keys:(l=(a=this.options.triggerKeys)===null||a===void 0?void 0:a.keys)!==null&&l!==void 0?l:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new tg,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(u=>this._onDidRun.fire(u))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(u=>this._onWillRun.fire(u))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",t.animated!==!1&&this.domNode.classList.add("animated");let d,c;switch(this._orientation){case 0:d=[15],c=[17];break;case 1:d=[16],c=[18],this.domNode.className+=" vertical";break}this._register(J(this.domNode,Se.KEY_DOWN,u=>{const h=new gi(u);let g=!0;const f=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;d&&(h.equals(d[0])||h.equals(d[1]))?g=this.focusPrevious():c&&(h.equals(c[0])||h.equals(c[1]))?g=this.focusNext():h.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():h.equals(14)?g=this.focusFirst():h.equals(13)?g=this.focusLast():h.equals(2)&&f instanceof fa&&f.trapsArrowNavigation?g=this.focusNext():this.isTriggerKeyEvent(h)?this._triggerKeys.keyDown?this.doTrigger(h):this.triggerKeyDown=!0:g=!1,g&&(h.preventDefault(),h.stopPropagation())})),this._register(J(this.domNode,Se.KEY_UP,u=>{const h=new gi(u);this.isTriggerKeyEvent(h)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(h)),h.preventDefault(),h.stopPropagation()):(h.equals(2)||h.equals(1026)||h.equals(16)||h.equals(18)||h.equals(15)||h.equals(17))&&this.updateFocusedItem()})),this.focusTracker=this._register(Pl(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(jo()===this.domNode||!Qn(jo(),this.domNode))&&(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const t=this.viewItems.find(i=>i instanceof fa&&i.isEnabled());t instanceof fa&&t.setFocusable(!0)}else this.viewItems.forEach(t=>{t instanceof fa&&t.setFocusable(!1)})}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(i=>{t=t||e.equals(i)}),t}updateFocusedItem(){var e,t;for(let i=0;it.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(t=>this._onDidRun.fire(t))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(t=>this._onWillRun.fire(t))),this.viewItems.forEach(t=>t.actionRunner=e)}getContainer(){return this.domNode}getAction(e){var t;if(typeof e=="number")return(t=this.viewItems[e])===null||t===void 0?void 0:t.action;if(e instanceof HTMLElement){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let i=0;i{const r=document.createElement("li");r.className="action-item",r.setAttribute("role","presentation");let a;const l={hoverDelegate:this.options.hoverDelegate,...t};this.options.actionViewItemProvider&&(a=this.options.actionViewItemProvider(s,l)),a||(a=new jp(this.context,s,l)),this.options.allowContextMenu||this.viewItemDisposables.set(a,J(r,Se.CONTEXT_MENU,d=>{ct.stop(d,!0)})),a.actionRunner=this._actionRunner,a.setActionContext(this.context),a.render(r),this.focusable&&a instanceof fa&&this.viewItems.length===0&&a.setFocusable(!0),n===null||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(r),this.viewItems.push(a)):(this.actionsList.insertBefore(r,this.actionsList.children[n]),this.viewItems.splice(n,0,a),n++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=jt(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),$n(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(e){let t=!1,i;if(e===void 0?t=!0:typeof e=="number"?i=e:typeof e=="boolean"&&(t=e),t&&typeof this.focusedItem>"u"){const n=this.viewItems.findIndex(s=>s.isEnabled());this.focusedItem=n===-1?void 0:n,this.updateFocus(void 0,void 0,!0)}else i!==void 0&&(this.focusedItem=i),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===Mn.ID));return this.updateFocus(),!0}focusPrevious(e){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===Mn.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){var n,s;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((n=this.viewItems[this.previouslyFocusedItem])===null||n===void 0||n.blur());const r=this.focusedItem!==void 0?this.viewItems[this.focusedItem]:void 0;if(r){let a=!0;_v(r.focus)||(a=!1),this.options.focusOnlyEnabledItems&&_v(r.isEnabled)&&!r.isEnabled()&&(a=!1),r.action.id===Mn.ID&&(a=!1),a&&((s=r.showHover)===null||s===void 0||s.call(r)),a?(i||this.previouslyFocusedItem!==this.focusedItem)&&(r.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0)}}doTrigger(e){if(typeof this.focusedItem>"u")return;const t=this.viewItems[this.focusedItem];if(t instanceof fa){const i=t._context===null||t._context===void 0?e:t._context;this.run(t._action,i)}}async run(e,t){await this._actionRunner.run(e,t)}dispose(){this._context=void 0,this.viewItems=jt(this.viewItems),this.getContainer().remove(),super.dispose()}}const sN=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,$x=/(&)?(&)([^\s&])/g;var nS;(function(o){o[o.Right=0]="Right",o[o.Left=1]="Left"})(nS||(nS={}));class mp extends Cr{constructor(e,t,i,n){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const s=document.createElement("div");s.classList.add("monaco-menu"),s.setAttribute("role","presentation"),super(s,{orientation:1,actionViewItemProvider:d=>this.doGetActionViewItem(d,i,r),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...It||ws?[10]:[]],keyDown:!0}}),this.menuStyles=n,this.menuElement=s,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,n),this._register(ei.addTarget(s)),this._register(J(s,Se.KEY_DOWN,d=>{new gi(d).equals(2)&&d.preventDefault()})),i.enableMnemonics&&this._register(J(s,Se.KEY_DOWN,d=>{const c=d.key.toLocaleLowerCase();if(this.mnemonics.has(c)){ct.stop(d,!0);const u=this.mnemonics.get(c);if(u.length===1&&(u[0]instanceof jF&&u[0].container&&this.focusItemByElement(u[0].container),u[0].onClick(d)),u.length>1){const h=u.shift();h&&h.container&&(this.focusItemByElement(h.container),u.push(h)),this.mnemonics.set(c,u)}}})),ws&&this._register(J(s,Se.KEY_DOWN,d=>{const c=new gi(d);c.equals(14)||c.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),ct.stop(d,!0)):(c.equals(13)||c.equals(12))&&(this.focusedItem=0,this.focusPrevious(),ct.stop(d,!0))})),this._register(J(this.domNode,Se.MOUSE_OUT,d=>{const c=d.relatedTarget;Qn(c,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),d.stopPropagation())})),this._register(J(this.actionsList,Se.MOUSE_OVER,d=>{let c=d.target;if(!(!c||!Qn(c,this.actionsList)||c===this.actionsList)){for(;c.parentElement!==this.actionsList&&c.parentElement!==null;)c=c.parentElement;if(c.classList.contains("action-item")){const u=this.focusedItem;this.setFocusedItem(c),u!==this.focusedItem&&this.updateFocus()}}})),this._register(ei.addTarget(this.actionsList)),this._register(J(this.actionsList,ni.Tap,d=>{let c=d.initialTarget;if(!(!c||!Qn(c,this.actionsList)||c===this.actionsList)){for(;c.parentElement!==this.actionsList&&c.parentElement!==null;)c=c.parentElement;if(c.classList.contains("action-item")){const u=this.focusedItem;this.setFocusedItem(c),u!==this.focusedItem&&this.updateFocus()}}}));const r={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new a0(s,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const a=this.scrollableElement.getDomNode();a.style.position="",this.styleScrollElement(a,n),this._register(J(s,ni.Change,d=>{ct.stop(d,!0);const c=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:c-d.translationY})})),this._register(J(a,Se.MOUSE_UP,d=>{d.preventDefault()}));const l=Je(e);s.style.maxHeight=`${Math.max(10,l.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter(d=>{var c;return!((c=i.submenuIds)===null||c===void 0)&&c.has(d.id)?(console.warn(`Found submenu cycle: ${d.id}`),!1):!0}),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(d=>!(d instanceof KF)).forEach((d,c,u)=>{d.updatePositionInSet(c+1,u.length)})}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(fw(e)?this.styleSheet=mr(e):(mp.globalStyleSheet||(mp.globalStyleSheet=mr()),this.styleSheet=mp.globalStyleSheet)),this.styleSheet.textContent=jce(t,fw(e))}styleScrollElement(e,t){var i,n;const s=(i=t.foregroundColor)!==null&&i!==void 0?i:"",r=(n=t.backgroundColor)!==null&&n!==void 0?n:"",a=t.borderColor?`1px solid ${t.borderColor}`:"",l="5px",d=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=a,e.style.borderRadius=l,e.style.color=s,e.style.backgroundColor=r,e.style.boxShadow=d}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register(J(this.element,Se.MOUSE_UP,s=>{if(ct.stop(s,!0),pr){if(new Pr(Je(this.element),s).rightButton)return;this.onClick(s)}else setTimeout(()=>{this.onClick(s)},0)})),this._register(J(this.element,Se.CONTEXT_MENU,s=>{ct.stop(s,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=le(this.element,pe("a.action-menu-item")),this._action.id===Mn.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=le(this.item,pe("span.menu-item-check"+Ue.asCSSSelector(ve.menuSelection))),this.check.setAttribute("role","none"),this.label=le(this.item,pe("span.action-label")),this.options.label&&this.options.keybinding&&(le(this.item,pe("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var e;super.focus(),(e=this.item)===null||e===void 0||e.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){var e;if(this.label&&this.options.label){$n(this.label);let t=OA(this.action.label);if(t){const i=Uce(t);this.options.enableMnemonics||(t=i),this.label.setAttribute("aria-label",i.replace(/&&/g,"&"));const n=sN.exec(t);if(n){t=dw(t),$x.lastIndex=0;let s=$x.exec(t);for(;s&&s[1];)s=$x.exec(t);const r=a=>a.replace(/&&/g,"&");s?this.label.append(Xb(r(t.substr(0,s.index))," "),pe("u",{"aria-hidden":"true"},s[3]),g7(r(t.substr(s.index+s[0].length))," ")):this.label.innerText=r(t).trim(),(e=this.item)===null||e===void 0||e.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else this.label.innerText=t.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),e!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",s=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=t??"",this.item.style.backgroundColor=i??"",this.item.style.outline=n,this.item.style.outlineOffset=s),this.check&&(this.check.style.color=t??"")}}class jF extends D6{constructor(e,t,i,n,s){super(e,e,n,s),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new de),this.mouseOver=!1,this.expandDirection=n&&n.expandDirection!==void 0?n.expandDirection:nS.Right,this.showScheduler=new Yt(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new Yt(()=>{this.element&&!Qn(jo(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=le(this.item,pe("span.submenu-indicator"+Ue.asCSSSelector(ve.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(J(this.element,Se.KEY_UP,t=>{const i=new gi(t);(i.equals(17)||i.equals(3))&&(ct.stop(t,!0),this.createSubmenu(!0))})),this._register(J(this.element,Se.KEY_DOWN,t=>{const i=new gi(t);jo()===this.item&&(i.equals(17)||i.equals(3))&&ct.stop(t,!0)})),this._register(J(this.element,Se.MOUSE_OVER,t=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(J(this.element,Se.MOUSE_LEAVE,t=>{this.mouseOver=!1})),this._register(J(this.element,Se.FOCUS_OUT,t=>{this.element&&!Qn(jo(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(e){ct.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const s={top:0,left:0};return s.left=Bf(e.width,t.width,{position:n===nS.Right?0:1,offset:i.left,size:i.width}),s.left>=i.left&&s.left{new gi(c).equals(15)&&(ct.stop(c,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(J(this.submenuContainer,Se.KEY_DOWN,c=>{new gi(c).equals(15)&&ct.stop(c,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&((t=this.item)===null||t===void 0||t.setAttribute("aria-expanded",e))}applyStyle(){super.applyStyle();const t=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class KF extends jp{constructor(e,t,i,n){super(e,t,i),this.menuStyles=n}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function Uce(o){const e=sN,t=e.exec(o);if(!t)return o;const i=!t[1];return o.replace(e,i?"$2$3":"").trim()}function qF(o){const e=d7()[o.id];return`.codicon-${o.id}:before { content: '\\${e.toString(16)}'; }`}function jce(o,e){let t=` +`)}}const yce={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropBackground:"#383B3D",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:Y.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:Y.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:Y.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0},Lce={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function Dce(o,e){const t=o.indexOf(e);if(t===-1)return[];const i=[];let n=t-1;for(;n>=0&&o[n]===e-(t-n);)i.push(o[n--]);for(i.reverse(),n=t;n=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){t.push(o[i]),i++,n++;continue}else o[i]=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){i++,n++;continue}else o[i]o-e;class kce{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,i,n){let s=0;for(const r of this.renderers)r.renderElement(e,t,i[s++],n)}disposeElement(e,t,i,n){var s;let r=0;for(const a of this.renderers)(s=a.disposeElement)===null||s===void 0||s.call(a,e,t,i[r],n),r+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class Ice{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const s=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof s=="number"?i.setAttribute("aria-level",`${s}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class Ece{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){var i,n;(n=(i=this.dnd).onDragStart)===null||n===void 0||n.call(i,e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragLeave(e,t,i,n){var s,r;(r=(s=this.dnd).onDragLeave)===null||r===void 0||r.call(s,e,t,i,n)}onDragEnd(e){var t,i;(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}dispose(){this.dnd.dispose()}}class Yr{get onDidChangeFocus(){return ye.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return ye.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=ye.chain(this.disposables.add(new St(this.view.domNode,"keydown")).event,s=>s.map(r=>new gi(r)).filter(r=>e=r.keyCode===58||r.shiftKey&&r.keyCode===68).map(r=>ct.stop(r,!0)).filter(()=>!1)),i=ye.chain(this.disposables.add(new St(this.view.domNode,"keyup")).event,s=>s.forEach(()=>e=!1).map(r=>new gi(r)).filter(r=>r.keyCode===58||r.shiftKey&&r.keyCode===68).map(r=>ct.stop(r,!0)).map(({browserEvent:r})=>{const a=this.getFocus(),l=a.length?a[0]:void 0,d=typeof l<"u"?this.view.element(l):void 0,c=typeof l<"u"?this.view.domElement(l):this.view.domNode;return{index:l,element:d,anchor:c,browserEvent:r}})),n=ye.chain(this.view.onContextMenu,s=>s.filter(r=>!e).map(({element:r,index:a,browserEvent:l})=>({element:r,index:a,anchor:new Pr(Je(this.view.domNode),l),browserEvent:l})));return ye.any(t,i,n)}get onKeyDown(){return this.disposables.add(new St(this.view.domNode,"keydown")).event}get onDidFocus(){return ye.signal(this.disposables.add(new St(this.view.domNode,"focus",!0)).event)}constructor(e,t,i,n,s=Lce){var r,a,l,d;this.user=e,this._options=s,this.focus=new Jw("focused"),this.anchor=new Jw("anchor"),this.eventBufferer=new oM,this._ariaLabel="",this.disposables=new de,this._onDidDispose=new W,this.onDidDispose=this._onDidDispose.event;const c=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(r=this._options.accessibilityProvider)===null||r===void 0?void 0:r.getWidgetRole():"list";this.selection=new pce(c!=="listbox");const u=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(u.push(new Ice(this.accessibilityProvider)),(l=(a=this.accessibilityProvider).onDidChangeActiveDescendant)===null||l===void 0||l.call(a,this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map(g=>new kce(g.templateId,[...u,g]));const h={...s,dnd:s.dnd&&new Ece(this,s.dnd)};if(this.view=this.createListView(t,i,n,h),this.view.domNode.setAttribute("role",c),s.styleController)this.styleController=s.styleController(this.view.domId);else{const g=mr(this.view.domNode);this.styleController=new w6(g,this.view.domId)}if(this.spliceable=new oce([new Hx(this.focus,this.view,s.identityProvider),new Hx(this.selection,this.view,s.identityProvider),new Hx(this.anchor,this.view,s.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new wce(this,this.view)),(typeof s.keyboardSupport!="boolean"||s.keyboardSupport)&&(this.keyboardController=new _6(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const g=s.keyboardNavigationDelegate||bce;this.typeNavigationController=new Cce(this,this.view,s.keyboardNavigationLabelProvider,(d=s.keyboardNavigationEventFilter)!==null&&d!==void 0?d:()=>!0,g),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(s),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,i,n){return new yr(e,t,i,n)}createMouseController(e){return new C6(this)}updateOptions(e={}){var t,i;this._options={...this._options,...e},(t=this.typeNavigationController)===null||t===void 0||t.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),(i=this.keyboardController)===null||i===void 0||i.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new th(this.user,`Invalid start index: ${e}`);if(t<0)throw new th(this.user,`Invalid delete count: ${t}`);t===0&&i.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,i))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const i of e)if(i<0||i>=this.length)throw new th(this.user,`Invalid index ${i}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(typeof e>"u"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new th(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return G2(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return typeof e>"u"?void 0:this.element(e)}setFocus(e,t){for(const i of e)if(i<0||i>=this.length)throw new th(this.user,`Invalid index ${i}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(this.length===0)return;const s=this.focus.get(),r=this.findNextIndex(s.length>0?s[0]+e:0,t,n);r>-1&&this.setFocus([r],i)}focusPrevious(e=1,t=!1,i,n){if(this.length===0)return;const s=this.focus.get(),r=this.findPreviousIndex(s.length>0?s[0]-e:0,t,n);r>-1&&this.setFocus([r],i)}async focusNextPage(e,t){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=i===0?0:i-1;const n=this.getFocus()[0];if(n!==i&&(n===void 0||i>n)){const s=this.findPreviousIndex(i,!1,t);s>-1&&n!==s?this.setFocus([s],e):this.setFocus([i],e)}else{const s=this.view.getScrollTop();let r=s+this.view.renderHeight;i>n&&(r-=this.view.elementHeight(i)),this.view.setScrollTop(r),this.view.getScrollTop()!==s&&(this.setFocus([]),await au(0),await this.focusNextPage(e,t))}}async focusPreviousPage(e,t){let i;const n=this.view.getScrollTop();n===0?i=this.view.indexAt(n):i=this.view.indexAfter(n-1);const s=this.getFocus()[0];if(s!==i&&(s===void 0||s>=i)){const r=this.findNextIndex(i,!1,t);r>-1&&s!==r?this.setFocus([r],e):this.setFocus([i],e)}else{const r=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==r&&(this.setFocus([]),await au(0),await this.focusPreviousPage(e,t))}}focusLast(e,t){if(this.length===0)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(this.length===0)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e=e%this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e))}reveal(e,t,i=0){if(e<0||e>=this.length)throw new th(this.user,`Invalid index ${e}`);const n=this.view.getScrollTop(),s=this.view.elementTop(e),r=this.view.elementHeight(e);if(nu(t)){const a=r-this.view.renderHeight+i;this.view.setScrollTop(a*io(t,0,1)+s-i)}else{const a=s+r,l=n+this.view.renderHeight;s=l||(s=l&&r>=this.view.renderHeight?this.view.setScrollTop(s-i):a>=l&&this.view.setScrollTop(a-this.view.renderHeight))}}getRelativeTop(e,t=0){if(e<0||e>=this.length)throw new th(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),s=this.view.elementHeight(e);if(ni+this.view.renderHeight)return null;const r=s-this.view.renderHeight+t;return Math.abs((i+t-n)/r)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(i=>this.view.element(i)),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;!((e=this.accessibilityProvider)===null||e===void 0)&&e.getActiveDescendantId&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}Og([nn],Yr.prototype,"onDidChangeFocus",null);Og([nn],Yr.prototype,"onDidChangeSelection",null);Og([nn],Yr.prototype,"onContextMenu",null);Og([nn],Yr.prototype,"onKeyDown",null);Og([nn],Yr.prototype,"onDidFocus",null);const Ah=pe,S6="selectOption.entry.template";class Nce{get templateId(){return S6}renderTemplate(e){const t=Object.create(null);return t.root=e,t.text=le(e,Ah(".option-text")),t.detail=le(e,Ah(".option-detail")),t.decoratorRight=le(e,Ah(".option-decorator-right")),t}renderElement(e,t,i){const n=i,s=e.text,r=e.detail,a=e.decoratorRight,l=e.isDisabled;n.text.textContent=s,n.detail.textContent=r||"",n.decoratorRight.innerText=a||"",l?n.root.classList.add("option-disabled"):n.root.classList.remove("option-disabled")}disposeTemplate(e){}}class ul extends q{constructor(e,t,i,n,s){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=n,this.selectBoxOptions=s||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=ul.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new W,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(i),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}getHeight(){return 22}getTemplateId(){return S6}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=pe(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=le(this.selectDropDownContainer,Ah(".select-box-details-pane"));const t=le(this.selectDropDownContainer,Ah(".select-box-dropdown-container-width-control")),i=le(t,Ah(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",le(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=mr(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(J(this.selectDropDownContainer,Se.DRAG_START,n=>{ct.stop(n,!0)}))}registerListeners(){this._register(Wi(this.selectElement,"change",t=>{this.selected=t.target.selectedIndex,this._onDidSelect.fire({index:t.target.selectedIndex,selected:t.target.value}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)})),this._register(J(this.selectElement,Se.CLICK,t=>{ct.stop(t),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(J(this.selectElement,Se.MOUSE_DOWN,t=>{ct.stop(t)}));let e;this._register(J(this.selectElement,"touchstart",t=>{e=this._isVisible})),this._register(J(this.selectElement,"touchend",t=>{ct.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(J(this.selectElement,Se.KEY_DOWN,t=>{const i=new gi(t);let n=!1;It?(i.keyCode===18||i.keyCode===16||i.keyCode===10||i.keyCode===3)&&(n=!0):(i.keyCode===18&&i.altKey||i.keyCode===16&&i.altKey||i.keyCode===10||i.keyCode===3)&&(n=!0),n&&(this.showSelectDropDown(),ct.stop(t,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){Bi(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((i,n)=>{this.selectElement.add(this.createOption(i.text,n,i.isDisabled)),typeof i.description=="string"&&(this._hasDetails=!0)})),t!==void 0&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){var e;(e=this.selectList)===null||e===void 0||e.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join(` +`)}styleSelectElement(){var e,t,i;const n=(e=this.styles.selectBackground)!==null&&e!==void 0?e:"",s=(t=this.styles.selectForeground)!==null&&t!==void 0?t:"",r=(i=this.styles.selectBorder)!==null&&i!==void 0?i:"";this.selectElement.style.backgroundColor=n,this.selectElement.style.color=s,this.selectElement.style.borderColor=r}styleList(){var e,t;const i=(e=this.styles.selectBackground)!==null&&e!==void 0?e:"",n=Bh(this.styles.selectListBackground,i);this.selectDropDownListContainer.style.backgroundColor=n,this.selectionDetailsPane.style.backgroundColor=n;const s=(t=this.styles.focusBorder)!==null&&t!==void 0?t:"";this.selectDropDownContainer.style.outlineColor=s,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,i){const n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{try{e.removeChild(this.selectDropDownContainer)}catch{}}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=Je(this.selectElement),i=gn(this.selectElement),n=Je(this.selectElement).getComputedStyle(this.selectElement),s=parseFloat(n.getPropertyValue("--dropdown-padding-top"))+parseFloat(n.getPropertyValue("--dropdown-padding-bottom")),r=t.innerHeight-i.top-i.height-(this.selectBoxOptions.minBottomMargin||0),a=i.top-ul.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,l=this.selectElement.offsetWidth,d=this.setWidthControlElement(this.widthControlElement),c=Math.max(d,Math.round(l)).toString()+"px";this.selectDropDownContainer.style.width=c,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let u=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const h=this._hasDetails?this._cachedMaxDetailsHeight:0,g=u+s+h,f=Math.floor((r-s-h)/this.getHeight()),m=Math.floor((a-s-h)/this.getHeight());if(e)return i.top+i.height>t.innerHeight-22||i.topf&&this.options.length>f?(this._dropDownPosition=1,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(i.top+i.height>t.innerHeight-22||i.topr&&(u=f*this.getHeight())}else g>a&&(u=m*this.getHeight());return this.selectList.layout(u),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=u+s+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=u+s+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=c,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach((s,r)=>{const a=s.detail?s.detail.length:0,l=s.decoratorRight?s.decoratorRight.length:0,d=s.text.length+a+l;d>n&&(i=r,n=d)}),e.textContent=this.options[i].text+(this.options[i].decoratorRight?this.options[i].decoratorRight+" ":""),t=zs(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=le(e,Ah(".select-box-dropdown-list-container")),this.listRenderer=new Nce,this.selectList=new Yr("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:n=>{let s=n.text;return n.detail&&(s+=`. ${n.detail}`),n.decoratorRight&&(s+=`. ${n.decoratorRight}`),n.description&&(s+=`. ${n.description}`),s},getWidgetAriaLabel:()=>p({},"Select Box"),getRole:()=>It?"":"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const t=this._register(new St(this.selectDropDownListContainer,"keydown")),i=ye.chain(t.event,n=>n.filter(()=>this.selectList.length>0).map(s=>new gi(s)));this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===3))(this.onEnter,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===2))(this.onEnter,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===9))(this.onEscape,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===16))(this.onUpArrow,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===18))(this.onDownArrow,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===12))(this.onPageDown,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===11))(this.onPageUp,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===14))(this.onHome,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode===13))(this.onEnd,this)),this._register(ye.chain(i,n=>n.filter(s=>s.keyCode>=21&&s.keyCode<=56||s.keyCode>=85&&s.keyCode<=113))(this.onCharacter,this)),this._register(J(this.selectList.getHTMLElement(),Se.POINTER_UP,n=>this.onPointerUp(n))),this._register(this.selectList.onMouseOver(n=>typeof n.index<"u"&&this.selectList.setFocus([n.index]))),this._register(this.selectList.onDidChangeFocus(n=>this.onListFocus(n))),this._register(J(this.selectDropDownContainer,Se.FOCUS_OUT,n=>{!this._isVisible||Qn(n.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;ct.stop(e);const t=e.target;if(!t||t.classList.contains("slider"))return;const i=t.closest(".monaco-list-row");if(!i)return;const n=Number(i.getAttribute("data-index")),s=i.classList.contains("option-disabled");n>=0&&n{for(let r=0;rthis.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(ct.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){ct.stop(e),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(e){ct.stop(e),!(this.options.length<2)&&(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){ct.stop(e),!(this.options.length<2)&&(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const t=vd.toString(e.keyCode);let i=-1;for(let n=0;n{this._register(J(this.selectElement,e,t=>{this.selectElement.focus()}))}),this._register(Wi(this.selectElement,"click",e=>{ct.stop(e,!0)})),this._register(Wi(this.selectElement,"change",e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),this._register(Wi(this.selectElement,"keydown",e=>{let t=!1;It?(e.keyCode===18||e.keyCode===16||e.keyCode===10)&&(t=!0):(e.keyCode===18&&e.altKey||e.keyCode===10||e.keyCode===3)&&(t=!0),t&&e.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){(!this.options||!Bi(this.options,e))&&(this.options=e,this.selectElement.options.length=0,this.options.forEach((i,n)=>{this.selectElement.add(this.createOption(i.text,n,i.isDisabled))})),t!==void 0&&this.select(t)}select(e){this.options.length===0?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{this.element&&this.handleActionChangeEvent(n)}))}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new tg)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(ei.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,pr&&this._register(J(e,Se.DRAG_START,n=>{var s;return(s=n.dataTransfer)===null||s===void 0?void 0:s.setData(sb.TEXT,this._action.label)}))),this._register(J(t,ni.Tap,n=>this.onClick(n,!0))),this._register(J(t,Se.MOUSE_DOWN,n=>{i||ct.stop(n,!0),this._action.enabled&&n.button===0&&t.classList.add("active")})),It&&this._register(J(t,Se.CONTEXT_MENU,n=>{n.button===0&&n.ctrlKey===!0&&this.onClick(n)})),this._register(J(t,Se.CLICK,n=>{ct.stop(n,!0),this.options&&this.options.isMenu||this.onClick(n)})),this._register(J(t,Se.DBLCLICK,n=>{ct.stop(n,!0)})),[Se.MOUSE_UP,Se.MOUSE_OUT].forEach(n=>{this._register(J(t,n,s=>{ct.stop(s),t.classList.remove("active")}))})}onClick(e,t=!1){var i;ct.stop(e,!0);const n=Ro(this._context)?!((i=this.options)===null||i===void 0)&&i.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}updateTooltip(){var e;if(!this.element)return;const t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.updateAriaLabel(),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(t):(this.customHover=f6(this.options.hoverDelegate,this.element,t),this._store.add(this.customHover))):this.element.title=t}updateAriaLabel(){var e;if(this.element){const t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.element.setAttribute("aria-label",t)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class jp extends fa{constructor(e,t,i){super(e,t,i),this.options=i,this.options.icon=i.icon!==void 0?i.icon:!1,this.options.label=i.label!==void 0?i.label:!0,this.cssClass=""}render(e){super.render(e),qt(this.element);const t=document.createElement("a");if(t.classList.add("action-label"),t.setAttribute("role",this.getDefaultAriaRole()),this.label=t,this.element.appendChild(t),this.options.label&&this.options.keybinding){const i=document.createElement("span");i.classList.add("keybinding"),i.textContent=this.options.keybinding,this.element.appendChild(i)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===Mn.ID?"presentation":this.options.isMenu?"menuitem":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=p({},"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):(e=this.label)===null||e===void 0||e.classList.remove("codicon")}updateEnabled(){var e,t;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),(e=this.element)===null||e===void 0||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),(t=this.element)===null||t===void 0||t.classList.add("disabled"))}updateAriaLabel(){var e;if(this.label){const t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.label.setAttribute("aria-label",t)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox")):(this.label.classList.remove("checked"),this.label.removeAttribute("aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class Ace extends fa{constructor(e,t,i,n,s,r,a){super(e,t),this.selectBox=new Mce(i,n,s,r,a),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect(e=>this.runAction(e.selected,e.index)))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){var e;(e=this.selectBox)===null||e===void 0||e.focus()}blur(){var e;(e=this.selectBox)===null||e===void 0||e.blur()}render(e){this.selectBox.render(e)}}class Rce extends tg{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new W),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=le(e,pe(".monaco-dropdown")),this._label=le(this._element,pe(".dropdown-label"));let i=t.labelRenderer;i||(i=s=>(s.textContent=t.label||"",null));for(const s of[Se.CLICK,Se.MOUSE_DOWN,ni.Tap])this._register(J(this.element,s,r=>ct.stop(r,!0)));for(const s of[Se.MOUSE_DOWN,ni.Tap])this._register(J(this._label,s,r=>{EM(r)&&(r.detail>1||r.button!==0)||(this.visible?this.hide():this.show())}));this._register(J(this._label,Se.KEY_UP,s=>{const r=new gi(s);(r.equals(3)||r.equals(10))&&(ct.stop(s,!0),this.visible?this.hide():this.show())}));const n=i(this._label);n&&this._register(n),this._register(ei.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class Pce extends Rce{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class eS extends fa{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new W),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=s=>{this.element=le(s,pe("a.action-label"));let r=[];return typeof this.options.classNames=="string"?r=this.options.classNames.split(/\s+/g).filter(a=>!!a):this.options.classNames&&(r=this.options.classNames),r.find(a=>a==="icon")||r.push("codicon"),this.element.classList.add(...r),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},i=Array.isArray(this.menuActionsOrProvider),n={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:i?this.menuActionsOrProvider:void 0,actionProvider:i?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new Pce(e,n)),this._register(this.dropdownMenu.onDidChangeVisibility(s=>{var r;(r=this.element)===null||r===void 0||r.setAttribute("aria-expanded",`${s}`),this._onDidChangeVisibility.fire(s)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const s=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return s.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){var e;(e=this.dropdownMenu)===null||e===void 0||e.show()}updateEnabled(){var e,t;const i=!this.action.enabled;(e=this.actionItem)===null||e===void 0||e.classList.toggle("disabled",i),(t=this.element)===null||t===void 0||t.classList.toggle("disabled",i)}}function Oce(o){return o?o.condition!==void 0:!1}var fp;(function(o){o[o.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",o[o.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(fp||(fp={}));var Vf;(function(o){o[o.None=0]="None",o[o.Initialized=1]="Initialized",o[o.Closed=2]="Closed"})(Vf||(Vf={}));class pp extends q{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new Yh),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=Vf.None,this.cache=new Map,this.flushDelayer=this._register(new N8(pp.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var t,i;this._onDidChangeStorage.pause();try{(t=e.changed)===null||t===void 0||t.forEach((n,s)=>this.acceptExternal(s,n)),(i=e.deleted)===null||i===void 0||i.forEach(n=>this.acceptExternal(n,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===Vf.Closed)return;let i=!1;Ro(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){const i=this.cache.get(e);return Ro(i)?t:i}getBoolean(e,t){const i=this.get(e);return Ro(i)?t:i==="true"}getNumber(e,t){const i=this.get(e);return Ro(i)?t:parseInt(i,10)}async set(e,t,i=!1){if(this.state===Vf.Closed)return;if(Ro(t))return this.delete(e,i);const n=Es(t)||Array.isArray(t)?Vde(t):String(t);if(this.cache.get(e)!==n)return this.cache.set(e,n),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:i}),this.doFlush()}async delete(e,t=!1){if(!(this.state===Vf.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{var t;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(t=this.whenFlushedCallbacks.pop())===null||t===void 0||t()})}async doFlush(e){return this.options.hint===fp.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),e)}}pp.DEFAULT_FLUSH_DELAY=100;class zx{constructor(){this.onDidChangeItemsExternal=ye.None,this.items=new Map}async updateItems(e){var t,i;(t=e.insert)===null||t===void 0||t.forEach((n,s)=>this.items.set(s,n)),(i=e.delete)===null||i===void 0||i.forEach(n=>this.items.delete(n))}}const M1="__$__targetStorageMarker",Xr=bt("storageService");var rb;(function(o){o[o.NONE=0]="NONE",o[o.SHUTDOWN=1]="SHUTDOWN"})(rb||(rb={}));function Fce(o){const e=o.get(M1);if(e)try{return JSON.parse(e)}catch{}return Object.create(null)}class nL extends q{constructor(e={flushInterval:nL.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new Yh),this._onDidChangeTarget=this._register(new Yh),this._onWillSaveState=this._register(new W),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,t,i){return ye.filter(this._onDidChangeValue.event,n=>n.scope===e&&(t===void 0||n.key===t),i)}emitDidChangeValue(e,t){const{key:i,external:n}=t;if(i===M1){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:i,target:this.getKeyTargets(e)[i],external:n})}get(e,t,i){var n;return(n=this.getStorage(t))===null||n===void 0?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return(n=this.getStorage(t))===null||n===void 0?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return(n=this.getStorage(t))===null||n===void 0?void 0:n.getNumber(e,i)}store(e,t,i,n,s=!1){if(Ro(t)){this.remove(e,i,s);return}this.withPausedEmitters(()=>{var r;this.updateKeyTarget(e,i,n),(r=this.getStorage(i))===null||r===void 0||r.set(e,t,s)})}remove(e,t,i=!1){this.withPausedEmitters(()=>{var n;this.updateKeyTarget(e,t,void 0),(n=this.getStorage(t))===null||n===void 0||n.delete(e,i)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i,n=!1){var s,r;const a=this.getKeyTargets(t);typeof i=="number"?a[e]!==i&&(a[e]=i,(s=this.getStorage(t))===null||s===void 0||s.set(M1,JSON.stringify(a),n)):typeof a[e]=="number"&&(delete a[e],(r=this.getStorage(t))===null||r===void 0||r.set(M1,JSON.stringify(a),n))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const t=this.getStorage(e);return t?Fce(t):Object.create(null)}}nL.DEFAULT_FLUSH_INTERVAL=60*1e3;class Bce extends nL{constructor(){super(),this.applicationStorage=this._register(new pp(new zx,{hint:fp.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new pp(new zx,{hint:fp.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new pp(new zx,{hint:fp.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e)))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}function Wce(o,e){const t={...e};for(const i in o){const n=o[i];t[i]=n!==void 0?Ee(n):void 0}return t}const Vce={keybindingLabelBackground:Ee(Lte),keybindingLabelForeground:Ee(Dte),keybindingLabelBorder:Ee(xte),keybindingLabelBottomBorder:Ee(kte),keybindingLabelShadow:Ee(ml)},Hce={buttonForeground:Ee(f_),buttonSeparator:Ee(cte),buttonBackground:Ee(p_),buttonHoverBackground:Ee(ute),buttonSecondaryForeground:Ee(gte),buttonSecondaryBackground:Ee(iE),buttonSecondaryHoverBackground:Ee(fte),buttonBorder:Ee(hte)},zce={progressBarBackground:Ee(_te)},tS={inputActiveOptionBorder:Ee(KM),inputActiveOptionForeground:Ee(qM),inputActiveOptionBackground:Ee(Ih)};Ee(rie),Ee(lie),Ee(aie);Ee(Fi),Ee(bl),Ee(ml),Ee(Lt),Ee(Lie),Ee(Die),Ee(xie),Ee(Jee);const iS={inputBackground:Ee(T7),inputForeground:Ee(M7),inputBorder:Ee(A7),inputValidationInfoBorder:Ee(ite),inputValidationInfoBackground:Ee(ete),inputValidationInfoForeground:Ee(tte),inputValidationWarningBorder:Ee(ote),inputValidationWarningBackground:Ee(nte),inputValidationWarningForeground:Ee(ste),inputValidationErrorBorder:Ee(lte),inputValidationErrorBackground:Ee(rte),inputValidationErrorForeground:Ee(ate)},$ce={listFilterWidgetBackground:Ee(Jte),listFilterWidgetOutline:Ee(eie),listFilterWidgetNoMatchesOutline:Ee(tie),listFilterWidgetShadow:Ee(iie),inputBoxStyles:iS,toggleStyles:tS},y6={badgeBackground:Ee(y1),badgeForeground:Ee(pte),badgeBorder:Ee(Lt)};Ee(_ie),Ee(mie),Ee(s4),Ee(s4),Ee(vie);const Fg={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:Ee($te),listFocusForeground:Ee(Ute),listFocusOutline:Ee(jte),listActiveSelectionBackground:Ee(Ed),listActiveSelectionForeground:Ee(Sl),listActiveSelectionIconForeground:Ee(b_),listFocusAndSelectionOutline:Ee(Kte),listFocusAndSelectionBackground:Ee(Ed),listFocusAndSelectionForeground:Ee(Sl),listInactiveSelectionBackground:Ee(qte),listInactiveSelectionIconForeground:Ee(Zte),listInactiveSelectionForeground:Ee(Gte),listInactiveFocusBackground:Ee(Yte),listInactiveFocusOutline:Ee(Xte),listHoverBackground:Ee(O7),listHoverForeground:Ee(F7),listDropBackground:Ee(Qte),listSelectionOutline:Ee(fi),listHoverOutline:Ee(fi),treeIndentGuidesStroke:Ee(C_),treeInactiveIndentGuidesStroke:Ee(nie),tableColumnsBorder:Ee(sie),tableOddRowsBackgroundColor:Ee(oie)};function Sm(o){return Wce(o,Fg)}const Uce={selectBackground:Ee(_l),selectListBackground:Ee(dte),selectForeground:Ee(xd),decoratorRightForeground:Ee(R7),selectBorder:Ee(If),focusBorder:Ee(Ho),listFocusBackground:Ee(Nh),listInactiveSelectionIconForeground:Ee(Ef),listFocusForeground:Ee(Eh),listFocusOutline:Yee(fi,Y.transparent.toString()),listHoverBackground:Ee(O7),listHoverForeground:Ee(F7),listHoverOutline:Ee(fi),selectListBorder:Ee(Cl),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0},jce={shadowColor:Ee(ml),borderColor:Ee(die),foregroundColor:Ee(cie),backgroundColor:Ee(uie),selectionForegroundColor:Ee(hie),selectionBackgroundColor:Ee(gie),selectionBorderColor:Ee(fie),separatorColor:Ee(pie),scrollbarShadow:Ee(mte),scrollbarSliderBackground:Ee(m_),scrollbarSliderHoverBackground:Ee(__),scrollbarSliderActiveBackground:Ee(v_)};var sL=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},js=function(o,e){return function(t,i){e(t,i,o)}};function Kce(o,e,t,i){const n=o.getActions(e),s=Dd.getInstance(),r=s.keyStatus.altKey||(is||ws)&&s.keyStatus.shiftKey;L6(n,t,r,a=>a==="navigation")}function VA(o,e,t,i,n,s){const r=o.getActions(e);L6(r,t,!1,typeof i=="string"?l=>l===i:i,n,s)}function L6(o,e,t,i=r=>r==="navigation",n=()=>!1,s=!1){let r,a;Array.isArray(e)?(r=e,a=e):(r=e.primary,a=e.secondary);const l=new Set;for(const[d,c]of o){let u;i(d)?(u=r,u.length>0&&s&&u.push(new Mn)):(u=a,u.length>0&&u.push(new Mn));for(let h of c){t&&(h=h instanceof Ur&&h.alt?h.alt:h);const g=u.push(h);h instanceof xp&&l.add({group:d,action:h,index:g-1})}}for(const{group:d,action:c,index:u}of l){const h=i(d)?r:a,g=c.actions;n(c,d,h.length)&&h.splice(u,1,...g)}}let dg=class extends jp{constructor(e,t,i,n,s,r,a,l){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:t==null?void 0:t.draggable,keybinding:t==null?void 0:t.keybinding,hoverDelegate:t==null?void 0:t.hoverDelegate}),this._keybindingService=i,this._notificationService=n,this._contextKeyService=s,this._themeService=r,this._contextMenuService=a,this._accessibilityService=l,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new An),this._altKey=Dd.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){e.preventDefault(),e.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(t){this._notificationService.error(t)}}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1;const i=()=>{var n;const s=!!(!((n=this._menuItemAction.alt)===null||n===void 0)&&n.enabled)&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);s!==this._wantsAltCommand&&(this._wantsAltCommand=s,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(i)),this._register(J(e,"mouseleave",n=>{t=!1,i()})),this._register(J(e,"mouseenter",n=>{t=!0,i()})),i()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var e;const t=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),i=t&&t.getLabel(),n=this._commandAction.tooltip||this._commandAction.label;let s=i?p("titleAndKb","{0} ({1})",n,i):n;if(!this._wantsAltCommand&&(!((e=this._menuItemAction.alt)===null||e===void 0)&&e.enabled)){const r=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,a=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),l=a&&a.getLabel(),d=l?p("titleAndKb","{0} ({1})",r,l):r;s=p("titleAndKbAndAlt",`{0} +[{1}] {2}`,s,IA.modifierLabels[Vo].altKey,d)}return s}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:i}=this;if(!t||!i)return;const n=this._commandAction.checked&&Oce(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(n)if(Ue.isThemeIcon(n)){const s=Ue.asClassNameArray(n);i.classList.add(...s),this._itemClassDispose.value=je(()=>{i.classList.remove(...s)})}else i.style.backgroundImage=Pp(this._themeService.getColorTheme().type)?du(n.dark):du(n.light),i.classList.add("icon"),this._itemClassDispose.value=Hr(je(()=>{i.style.backgroundImage="",i.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};dg=sL([js(2,Xt),js(3,sn),js(4,Xe),js(5,Sn),js(6,Sr),js(7,Zl)],dg);let tN=class extends eS{constructor(e,t,i,n,s){var r,a,l;const d={...t,menuAsChild:(r=t==null?void 0:t.menuAsChild)!==null&&r!==void 0?r:!1,classNames:(a=t==null?void 0:t.classNames)!==null&&a!==void 0?a:Ue.isThemeIcon(e.item.icon)?Ue.asClassName(e.item.icon):void 0,keybindingProvider:(l=t==null?void 0:t.keybindingProvider)!==null&&l!==void 0?l:c=>i.lookupKeybinding(c.id)};super(e,{getActions:()=>e.actions},n,d),this._keybindingService=i,this._contextMenuService=n,this._themeService=s}render(e){super.render(e),qt(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!Ue.isThemeIcon(i)){this.element.classList.add("icon");const n=()=>{this.element&&(this.element.style.backgroundImage=Pp(this._themeService.getColorTheme().type)?du(i.dark):du(i.light))};n(),this._register(this._themeService.onDidColorThemeChange(()=>{n()}))}}};tN=sL([js(2,Xt),js(3,Sr),js(4,Sn)],tN);let iN=class extends fa{constructor(e,t,i,n,s,r,a,l){var d,c,u;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=s,this._menuService=r,this._instaService=a,this._storageService=l,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let h;const g=t!=null&&t.persistLastActionId?l.get(this._storageKey,1):void 0;g&&(h=e.actions.find(m=>g===m.id)),h||(h=e.actions[0]),this._defaultAction=this._instaService.createInstance(dg,h,{keybinding:this._getDefaultActionKeybindingLabel(h)});const f={keybindingProvider:m=>this._keybindingService.lookupKeybinding(m.id),...t,menuAsChild:(d=t==null?void 0:t.menuAsChild)!==null&&d!==void 0?d:!0,classNames:(c=t==null?void 0:t.classNames)!==null&&c!==void 0?c:["codicon","codicon-chevron-down"],actionRunner:(u=t==null?void 0:t.actionRunner)!==null&&u!==void 0?u:new tg};this._dropdown=new eS(e,e.actions,this._contextMenuService,f),this._dropdown.actionRunner.onDidRun(m=>{m.action instanceof Ur&&this.update(m.action)})}update(e){var t;!((t=this._options)===null||t===void 0)&&t.persistLastActionId&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(dg,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends tg{async runAction(i,n){await i.run(void 0)}},this._container&&this._defaultAction.render(Z8(this._container,pe(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let i;if(!((t=this._options)===null||t===void 0)&&t.renderKeybindingWithDefaultActionLabel){const n=this._keybindingService.lookupKeybinding(e.id);n&&(i=`(${n.getLabel()})`)}return i}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=pe(".action-container");this._defaultAction.render(le(this._container,t)),this._register(J(t,Se.KEY_DOWN,n=>{const s=new gi(n);s.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),s.stopPropagation())}));const i=pe(".dropdown-action-container");this._dropdown.render(le(this._container,i)),this._register(J(i,Se.KEY_DOWN,n=>{var s;const r=new gi(n);r.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(s=this._defaultAction.element)===null||s===void 0||s.focus(),r.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};iN=sL([js(2,Xt),js(3,sn),js(4,Sr),js(5,Ba),js(6,qe),js(7,Xr)],iN);let nN=class extends Ace{constructor(e,t){super(null,e,e.actions.map(i=>({text:i.id===Mn.ID?"─────────":i.label,isDisabled:!i.enabled})),0,t,Uce,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex(i=>i.checked)))}render(e){super.render(e),e.style.borderColor=Ee(If)}runAction(e,t){const i=this.action.actions[t];i&&this.actionRunner.run(i)}};nN=sL([js(1,Gd)],nN);function qce(o,e,t){return e instanceof Ur?o.createInstance(dg,e,t):e instanceof xv?e.item.isSelection?o.createInstance(nN,e):e.item.rememberDefaultAction?o.createInstance(iN,e,{...t,persistLastActionId:!0}):o.createInstance(tN,e,t):void 0}class Cr extends q{constructor(e,t={}){var i,n,s,r,a,l;super(),this._actionRunnerDisposables=this._register(new de),this.viewItemDisposables=this._register(new nM),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new W),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new W({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new W),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new W),this.onWillRun=this._onWillRun.event,this.options=t,this._context=(i=t.context)!==null&&i!==void 0?i:null,this._orientation=(n=this.options.orientation)!==null&&n!==void 0?n:0,this._triggerKeys={keyDown:(r=(s=this.options.triggerKeys)===null||s===void 0?void 0:s.keyDown)!==null&&r!==void 0?r:!1,keys:(l=(a=this.options.triggerKeys)===null||a===void 0?void 0:a.keys)!==null&&l!==void 0?l:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new tg,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(u=>this._onDidRun.fire(u))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(u=>this._onWillRun.fire(u))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",t.animated!==!1&&this.domNode.classList.add("animated");let d,c;switch(this._orientation){case 0:d=[15],c=[17];break;case 1:d=[16],c=[18],this.domNode.className+=" vertical";break}this._register(J(this.domNode,Se.KEY_DOWN,u=>{const h=new gi(u);let g=!0;const f=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;d&&(h.equals(d[0])||h.equals(d[1]))?g=this.focusPrevious():c&&(h.equals(c[0])||h.equals(c[1]))?g=this.focusNext():h.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():h.equals(14)?g=this.focusFirst():h.equals(13)?g=this.focusLast():h.equals(2)&&f instanceof fa&&f.trapsArrowNavigation?g=this.focusNext():this.isTriggerKeyEvent(h)?this._triggerKeys.keyDown?this.doTrigger(h):this.triggerKeyDown=!0:g=!1,g&&(h.preventDefault(),h.stopPropagation())})),this._register(J(this.domNode,Se.KEY_UP,u=>{const h=new gi(u);this.isTriggerKeyEvent(h)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(h)),h.preventDefault(),h.stopPropagation()):(h.equals(2)||h.equals(1026)||h.equals(16)||h.equals(18)||h.equals(15)||h.equals(17))&&this.updateFocusedItem()})),this.focusTracker=this._register(Pl(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(jo()===this.domNode||!Qn(jo(),this.domNode))&&(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const t=this.viewItems.find(i=>i instanceof fa&&i.isEnabled());t instanceof fa&&t.setFocusable(!0)}else this.viewItems.forEach(t=>{t instanceof fa&&t.setFocusable(!1)})}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(i=>{t=t||e.equals(i)}),t}updateFocusedItem(){var e,t;for(let i=0;it.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(t=>this._onDidRun.fire(t))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(t=>this._onWillRun.fire(t))),this.viewItems.forEach(t=>t.actionRunner=e)}getContainer(){return this.domNode}getAction(e){var t;if(typeof e=="number")return(t=this.viewItems[e])===null||t===void 0?void 0:t.action;if(e instanceof HTMLElement){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let i=0;i{const r=document.createElement("li");r.className="action-item",r.setAttribute("role","presentation");let a;const l={hoverDelegate:this.options.hoverDelegate,...t};this.options.actionViewItemProvider&&(a=this.options.actionViewItemProvider(s,l)),a||(a=new jp(this.context,s,l)),this.options.allowContextMenu||this.viewItemDisposables.set(a,J(r,Se.CONTEXT_MENU,d=>{ct.stop(d,!0)})),a.actionRunner=this._actionRunner,a.setActionContext(this.context),a.render(r),this.focusable&&a instanceof fa&&this.viewItems.length===0&&a.setFocusable(!0),n===null||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(r),this.viewItems.push(a)):(this.actionsList.insertBefore(r,this.actionsList.children[n]),this.viewItems.splice(n,0,a),n++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=jt(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),$n(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(e){let t=!1,i;if(e===void 0?t=!0:typeof e=="number"?i=e:typeof e=="boolean"&&(t=e),t&&typeof this.focusedItem>"u"){const n=this.viewItems.findIndex(s=>s.isEnabled());this.focusedItem=n===-1?void 0:n,this.updateFocus(void 0,void 0,!0)}else i!==void 0&&(this.focusedItem=i),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===Mn.ID));return this.updateFocus(),!0}focusPrevious(e){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===Mn.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){var n,s;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((n=this.viewItems[this.previouslyFocusedItem])===null||n===void 0||n.blur());const r=this.focusedItem!==void 0?this.viewItems[this.focusedItem]:void 0;if(r){let a=!0;_v(r.focus)||(a=!1),this.options.focusOnlyEnabledItems&&_v(r.isEnabled)&&!r.isEnabled()&&(a=!1),r.action.id===Mn.ID&&(a=!1),a&&((s=r.showHover)===null||s===void 0||s.call(r)),a?(i||this.previouslyFocusedItem!==this.focusedItem)&&(r.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0)}}doTrigger(e){if(typeof this.focusedItem>"u")return;const t=this.viewItems[this.focusedItem];if(t instanceof fa){const i=t._context===null||t._context===void 0?e:t._context;this.run(t._action,i)}}async run(e,t){await this._actionRunner.run(e,t)}dispose(){this._context=void 0,this.viewItems=jt(this.viewItems),this.getContainer().remove(),super.dispose()}}const sN=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,$x=/(&)?(&)([^\s&])/g;var nS;(function(o){o[o.Right=0]="Right",o[o.Left=1]="Left"})(nS||(nS={}));class mp extends Cr{constructor(e,t,i,n){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const s=document.createElement("div");s.classList.add("monaco-menu"),s.setAttribute("role","presentation"),super(s,{orientation:1,actionViewItemProvider:d=>this.doGetActionViewItem(d,i,r),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...It||ws?[10]:[]],keyDown:!0}}),this.menuStyles=n,this.menuElement=s,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,n),this._register(ei.addTarget(s)),this._register(J(s,Se.KEY_DOWN,d=>{new gi(d).equals(2)&&d.preventDefault()})),i.enableMnemonics&&this._register(J(s,Se.KEY_DOWN,d=>{const c=d.key.toLocaleLowerCase();if(this.mnemonics.has(c)){ct.stop(d,!0);const u=this.mnemonics.get(c);if(u.length===1&&(u[0]instanceof jF&&u[0].container&&this.focusItemByElement(u[0].container),u[0].onClick(d)),u.length>1){const h=u.shift();h&&h.container&&(this.focusItemByElement(h.container),u.push(h)),this.mnemonics.set(c,u)}}})),ws&&this._register(J(s,Se.KEY_DOWN,d=>{const c=new gi(d);c.equals(14)||c.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),ct.stop(d,!0)):(c.equals(13)||c.equals(12))&&(this.focusedItem=0,this.focusPrevious(),ct.stop(d,!0))})),this._register(J(this.domNode,Se.MOUSE_OUT,d=>{const c=d.relatedTarget;Qn(c,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),d.stopPropagation())})),this._register(J(this.actionsList,Se.MOUSE_OVER,d=>{let c=d.target;if(!(!c||!Qn(c,this.actionsList)||c===this.actionsList)){for(;c.parentElement!==this.actionsList&&c.parentElement!==null;)c=c.parentElement;if(c.classList.contains("action-item")){const u=this.focusedItem;this.setFocusedItem(c),u!==this.focusedItem&&this.updateFocus()}}})),this._register(ei.addTarget(this.actionsList)),this._register(J(this.actionsList,ni.Tap,d=>{let c=d.initialTarget;if(!(!c||!Qn(c,this.actionsList)||c===this.actionsList)){for(;c.parentElement!==this.actionsList&&c.parentElement!==null;)c=c.parentElement;if(c.classList.contains("action-item")){const u=this.focusedItem;this.setFocusedItem(c),u!==this.focusedItem&&this.updateFocus()}}}));const r={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new a0(s,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const a=this.scrollableElement.getDomNode();a.style.position="",this.styleScrollElement(a,n),this._register(J(s,ni.Change,d=>{ct.stop(d,!0);const c=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:c-d.translationY})})),this._register(J(a,Se.MOUSE_UP,d=>{d.preventDefault()}));const l=Je(e);s.style.maxHeight=`${Math.max(10,l.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter(d=>{var c;return!((c=i.submenuIds)===null||c===void 0)&&c.has(d.id)?(console.warn(`Found submenu cycle: ${d.id}`),!1):!0}),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(d=>!(d instanceof KF)).forEach((d,c,u)=>{d.updatePositionInSet(c+1,u.length)})}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(fw(e)?this.styleSheet=mr(e):(mp.globalStyleSheet||(mp.globalStyleSheet=mr()),this.styleSheet=mp.globalStyleSheet)),this.styleSheet.textContent=Zce(t,fw(e))}styleScrollElement(e,t){var i,n;const s=(i=t.foregroundColor)!==null&&i!==void 0?i:"",r=(n=t.backgroundColor)!==null&&n!==void 0?n:"",a=t.borderColor?`1px solid ${t.borderColor}`:"",l="5px",d=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=a,e.style.borderRadius=l,e.style.color=s,e.style.backgroundColor=r,e.style.boxShadow=d}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register(J(this.element,Se.MOUSE_UP,s=>{if(ct.stop(s,!0),pr){if(new Pr(Je(this.element),s).rightButton)return;this.onClick(s)}else setTimeout(()=>{this.onClick(s)},0)})),this._register(J(this.element,Se.CONTEXT_MENU,s=>{ct.stop(s,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=le(this.element,pe("a.action-menu-item")),this._action.id===Mn.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=le(this.item,pe("span.menu-item-check"+Ue.asCSSSelector(ve.menuSelection))),this.check.setAttribute("role","none"),this.label=le(this.item,pe("span.action-label")),this.options.label&&this.options.keybinding&&(le(this.item,pe("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var e;super.focus(),(e=this.item)===null||e===void 0||e.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){var e;if(this.label&&this.options.label){$n(this.label);let t=OA(this.action.label);if(t){const i=Gce(t);this.options.enableMnemonics||(t=i),this.label.setAttribute("aria-label",i.replace(/&&/g,"&"));const n=sN.exec(t);if(n){t=dw(t),$x.lastIndex=0;let s=$x.exec(t);for(;s&&s[1];)s=$x.exec(t);const r=a=>a.replace(/&&/g,"&");s?this.label.append(Xb(r(t.substr(0,s.index))," "),pe("u",{"aria-hidden":"true"},s[3]),g8(r(t.substr(s.index+s[0].length))," ")):this.label.innerText=r(t).trim(),(e=this.item)===null||e===void 0||e.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else this.label.innerText=t.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),e!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",s=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=t??"",this.item.style.backgroundColor=i??"",this.item.style.outline=n,this.item.style.outlineOffset=s),this.check&&(this.check.style.color=t??"")}}class jF extends D6{constructor(e,t,i,n,s){super(e,e,n,s),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new de),this.mouseOver=!1,this.expandDirection=n&&n.expandDirection!==void 0?n.expandDirection:nS.Right,this.showScheduler=new Yt(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new Yt(()=>{this.element&&!Qn(jo(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=le(this.item,pe("span.submenu-indicator"+Ue.asCSSSelector(ve.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(J(this.element,Se.KEY_UP,t=>{const i=new gi(t);(i.equals(17)||i.equals(3))&&(ct.stop(t,!0),this.createSubmenu(!0))})),this._register(J(this.element,Se.KEY_DOWN,t=>{const i=new gi(t);jo()===this.item&&(i.equals(17)||i.equals(3))&&ct.stop(t,!0)})),this._register(J(this.element,Se.MOUSE_OVER,t=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(J(this.element,Se.MOUSE_LEAVE,t=>{this.mouseOver=!1})),this._register(J(this.element,Se.FOCUS_OUT,t=>{this.element&&!Qn(jo(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(e){ct.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const s={top:0,left:0};return s.left=Bf(e.width,t.width,{position:n===nS.Right?0:1,offset:i.left,size:i.width}),s.left>=i.left&&s.left{new gi(c).equals(15)&&(ct.stop(c,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(J(this.submenuContainer,Se.KEY_DOWN,c=>{new gi(c).equals(15)&&ct.stop(c,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&((t=this.item)===null||t===void 0||t.setAttribute("aria-expanded",e))}applyStyle(){super.applyStyle();const t=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class KF extends jp{constructor(e,t,i,n){super(e,t,i),this.menuStyles=n}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function Gce(o){const e=sN,t=e.exec(o);if(!t)return o;const i=!t[1];return o.replace(e,i?"$2$3":"").trim()}function qF(o){const e=d8()[o.id];return`.codicon-${o.id}:before { content: '\\${e.toString(16)}'; }`}function Zce(o,e){let t=` .monaco-menu { font-size: 13px; border-radius: 5px; @@ -599,78 +599,78 @@ ${qF(ve.menuSubmenu)} .monaco-scrollable-element > .scrollbar > .slider.active { background: ${r}; } - `)}return t}class Kce{constructor(e,t,i,n){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;this.focusToReturn=jo();let i;const n=e.domForShadowRoot instanceof HTMLElement?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:s=>{var r;this.lastContainer=s;const a=e.getMenuClassName?e.getMenuClassName():"";a&&(s.className+=" "+a),this.options.blockMouse&&(this.block=s.appendChild(pe(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(r=this.blockDisposable)===null||r===void 0||r.dispose(),this.blockDisposable=J(this.block,Se.MOUSE_DOWN,u=>u.stopPropagation()));const l=new de,d=e.actionRunner||new tg;d.onWillRun(u=>this.onActionRun(u,!e.skipTelemetry),this,l),d.onDidRun(this.onDidActionRun,this,l),i=new mp(s,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:d,getKeyBinding:e.getKeyBinding?e.getKeyBinding:u=>this.keybindingService.lookupKeybinding(u.id)},Hce),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,l),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,l);const c=Je(s);return l.add(J(c,Se.BLUR,()=>this.contextViewService.hideContextView(!0))),l.add(J(c,Se.MOUSE_DOWN,u=>{if(u.defaultPrevented)return;const h=new Pr(c,u);let g=h.target;if(!h.rightButton){for(;g;){if(g===s)return;g=g.parentElement}this.contextViewService.hideContextView(!0)}})),Hr(l,i)},focus:()=>{i==null||i.focus(!!e.autoSelectFirstItem)},onHide:s=>{var r,a,l;(r=e.onHide)===null||r===void 0||r.call(e,!!s),this.block&&(this.block.remove(),this.block=null),(a=this.blockDisposable)===null||a===void 0||a.dispose(),this.blockDisposable=null,this.lastContainer&&(jo()===this.lastContainer||Qn(jo(),this.lastContainer))&&((l=this.focusToReturn)===null||l===void 0||l.focus()),this.lastContainer=null}},n,!!n)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!Fa(e.error)&&this.notificationService.error(e.error)}}var qce=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sf=function(o,e){return function(t,i){e(t,i,o)}};let oN=class extends q{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new Kce(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,i,n,s,r){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=i,this.keybindingService=n,this.menuService=s,this.contextKeyService=r,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new W),this._onDidHideContextMenu=this._store.add(new W)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=rN.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:t=>{var i;(i=e.onHide)===null||i===void 0||i.call(e,t),this._onDidHideContextMenu.fire()}}),Dd.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};oN=qce([sf(0,vo),sf(1,sn),sf(2,Gd),sf(3,Xt),sf(4,Ba),sf(5,Xe)],oN);var rN;(function(o){function e(i){return i&&i.menuId instanceof N}function t(i,n,s){if(!e(i))return i;const{menuId:r,menuActionOptions:a,contextKeyService:l}=i;return{...i,getActions:()=>{const d=[];if(r){const c=n.createMenu(r,l??s);zce(c,a,d),c.dispose()}return i.getActions?Mn.join(i.getActions(),d):d}}}o.transform=t})(rN||(rN={}));var sS;(function(o){o[o.API=0]="API",o[o.USER=1]="USER"})(sS||(sS={}));const So=bt("openerService");function Gce(o){let e;const t=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(o.fragment);return t&&(e={startLineNumber:parseInt(t[1]),startColumn:t[2]?parseInt(t[2]):1,endLineNumber:t[4]?parseInt(t[4]):void 0,endColumn:t[4]?t[5]?parseInt(t[5]):1:void 0},o=o.with({fragment:""})),{selection:e,uri:o}}var HA=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},oS=function(o,e){return function(t,i){e(t,i,o)}};let aN=class{constructor(e){this._commandService=e}async open(e,t){if(!yM(e,ot.command))return!1;if(!(t!=null&&t.allowCommands)||(typeof e=="string"&&(e=ze.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path)))return!0;let i=[];try{i=YE(decodeURIComponent(e.query))}catch{try{i=YE(e.query)}catch{}}return Array.isArray(i)||(i=[i]),await this._commandService.executeCommand(e.path,...i),!0}};aN=HA([oS(0,Ri)],aN);let lN=class{constructor(e){this._editorService=e}async open(e,t){typeof e=="string"&&(e=ze.parse(e));const{selection:i,uri:n}=Gce(e);return e=n,e.scheme===ot.file&&(e=Poe(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:i,source:t!=null&&t.fromUserGesture?sS.USER:sS.API,...t==null?void 0:t.editorOptions}},this._editorService.getFocusedCodeEditor(),t==null?void 0:t.openToSide),!0}};lN=HA([oS(0,Ot)],lN);let dN=class{constructor(e,t){this._openers=new Ns,this._validators=new Ns,this._resolvers=new Ns,this._resolvedUriTargets=new Gi(i=>i.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new Ns,this._defaultExternalOpener={openExternal:async i=>(nO(i,ot.http,ot.https)?X7(i):Ai.location.href=i,!0)},this._openers.push({open:async(i,n)=>n!=null&&n.openExternal||nO(i,ot.mailto,ot.http,ot.https,ot.vsls)?(await this._doOpenExternal(i,n),!0):!1}),this._openers.push(new aN(t)),this._openers.push(new lN(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}async open(e,t){var i;const n=typeof e=="string"?ze.parse(e):e,s=(i=this._resolvedUriTargets.get(n))!==null&&i!==void 0?i:e;for(const r of this._validators)if(!await r.shouldOpen(s,t))return!1;for(const r of this._openers)if(await r.open(e,t))return!0;return!1}async resolveExternalUri(e,t){for(const i of this._resolvers)try{const n=await i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch{}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,t){const i=typeof e=="string"?ze.parse(e):e;let n;try{n=(await this.resolveExternalUri(i,t)).resolved}catch{n=i}let s;if(typeof e=="string"&&i.toString()===n.toString()?s=e:s=encodeURI(n.toString(!0)),t!=null&&t.allowContributedOpeners){const r=typeof(t==null?void 0:t.allowContributedOpeners)=="string"?t==null?void 0:t.allowContributedOpeners:void 0;for(const a of this._externalOpeners)if(await a.openExternal(s,{sourceUri:i,preferredOpenerId:r},vt.None))return!0}return this._defaultExternalOpener.openExternal(s,{sourceUri:i},vt.None)}dispose(){this._validators.clear()}};dN=HA([oS(0,Ot),oS(1,Ri)],dN);const Qr=bt("editorWorkerService");var Mi;(function(o){o[o.Hint=1]="Hint",o[o.Info=2]="Info",o[o.Warning=4]="Warning",o[o.Error=8]="Error"})(Mi||(Mi={}));(function(o){function e(r,a){return a-r}o.compare=e;const t=Object.create(null);t[o.Error]=p("sev.error","Error"),t[o.Warning]=p("sev.warning","Warning"),t[o.Info]=p("sev.info","Info");function i(r){return t[r]||""}o.toString=i;function n(r){switch(r){case ji.Error:return o.Error;case ji.Warning:return o.Warning;case ji.Info:return o.Info;case ji.Ignore:return o.Hint}}o.fromSeverity=n;function s(r){switch(r){case o.Error:return ji.Error;case o.Warning:return ji.Warning;case o.Info:return ji.Info;case o.Hint:return ji.Ignore}}o.toSeverity=s})(Mi||(Mi={}));var rS;(function(o){const e="";function t(n){return i(n,!0)}o.makeKey=t;function i(n,s){const r=[e];return n.source?r.push(n.source.replace("¦","\\¦")):r.push(e),n.code?typeof n.code=="string"?r.push(n.code.replace("¦","\\¦")):r.push(n.code.value.replace("¦","\\¦")):r.push(e),n.severity!==void 0&&n.severity!==null?r.push(Mi.toString(n.severity)):r.push(e),n.message&&s?r.push(n.message.replace("¦","\\¦")):r.push(e),n.startLineNumber!==void 0&&n.startLineNumber!==null?r.push(n.startLineNumber.toString()):r.push(e),n.startColumn!==void 0&&n.startColumn!==null?r.push(n.startColumn.toString()):r.push(e),n.endLineNumber!==void 0&&n.endLineNumber!==null?r.push(n.endLineNumber.toString()):r.push(e),n.endColumn!==void 0&&n.endColumn!==null?r.push(n.endColumn.toString()):r.push(e),r.push(e),r.join("¦")}o.makeKeyOptionalMessage=i})(rS||(rS={}));const Yl=bt("markerService");function Zce(o,e){const t=[],i=[];for(const n of o)e.has(n)||t.push(n);for(const n of e)o.has(n)||i.push(n);return{removed:t,added:i}}function Yce(o,e){const t=new Set;for(const i of e)o.has(i)&&t.add(i);return t}var Xce=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},GF=function(o,e){return function(t,i){e(t,i,o)}};let cN=class extends q{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new W),this._markerDecorations=new Gi,e.getModels().forEach(i=>this._onModelAdded(i)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach(t=>{const i=this._markerDecorations.get(t);i&&this._updateDecorations(i)})}_onModelAdded(e){const t=new Qce(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){var t;const i=this._markerDecorations.get(e.uri);i&&(i.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===ot.inMemory||e.uri.scheme===ot.internal||e.uri.scheme===ot.vscode)&&((t=this._markerService)===null||t===void 0||t.read({resource:e.uri}).map(n=>n.owner).forEach(n=>this._markerService.remove(n,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};cN=Xce([GF(0,Si),GF(1,Yl)],cN);class Qce extends q{constructor(e){super(),this.model=e,this._map=new BJ,this._register(je(()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()}))}update(e){const{added:t,removed:i}=Zce(new Set(this._map.keys()),new Set(e));if(t.length===0&&i.length===0)return!1;const n=i.map(a=>this._map.get(a)),s=t.map(a=>({range:this._createDecorationRange(this.model,a),options:this._createDecorationOption(a)})),r=this.model.deltaDecorations(n,s);for(const a of i)this._map.delete(a);for(let a=0;a=n)return i;const s=e.getWordAtPosition(i.getStartPosition());s&&(i=new k(i.startLineNumber,s.startColumn,i.endLineNumber,s.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&t.startColumn===1&&i.startLineNumber===i.endLineNumber){const n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n=0:!1}}var Jce=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Xm=function(o,e){return function(t,i){e(t,i,o)}},mf;function nh(o){return o.toString()}class eue{constructor(e,t,i){this.model=e,this._modelEventListeners=new de,this.model=e,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(n=>i(e,n)))}dispose(){this._modelEventListeners.dispose()}}const tue=ws||It?1:2;class iue{constructor(e,t,i,n,s,r,a,l){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=s,this.sha1=r,this.versionId=a,this.alternativeVersionId=l}}let aS=mf=class extends q{constructor(e,t,i,n,s){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=i,this._languageService=n,this._languageConfigurationService=s,this._onModelAdded=this._register(new W),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new W),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new W),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(r=>this._updateModelOptions(r))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){var i;let n=rs.tabSize;if(e.editor&&typeof e.editor.tabSize<"u"){const g=parseInt(e.editor.tabSize,10);isNaN(g)||(n=g),n<1&&(n=1)}let s="tabSize";if(e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"){const g=parseInt(e.editor.indentSize,10);isNaN(g)||(s=Math.max(g,1))}let r=rs.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(r=e.editor.insertSpaces==="false"?!1:!!e.editor.insertSpaces);let a=tue;const l=e.eol;l===`\r + `)}return t}class Yce{constructor(e,t,i,n){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;this.focusToReturn=jo();let i;const n=e.domForShadowRoot instanceof HTMLElement?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:s=>{var r;this.lastContainer=s;const a=e.getMenuClassName?e.getMenuClassName():"";a&&(s.className+=" "+a),this.options.blockMouse&&(this.block=s.appendChild(pe(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(r=this.blockDisposable)===null||r===void 0||r.dispose(),this.blockDisposable=J(this.block,Se.MOUSE_DOWN,u=>u.stopPropagation()));const l=new de,d=e.actionRunner||new tg;d.onWillRun(u=>this.onActionRun(u,!e.skipTelemetry),this,l),d.onDidRun(this.onDidActionRun,this,l),i=new mp(s,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:d,getKeyBinding:e.getKeyBinding?e.getKeyBinding:u=>this.keybindingService.lookupKeybinding(u.id)},jce),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,l),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,l);const c=Je(s);return l.add(J(c,Se.BLUR,()=>this.contextViewService.hideContextView(!0))),l.add(J(c,Se.MOUSE_DOWN,u=>{if(u.defaultPrevented)return;const h=new Pr(c,u);let g=h.target;if(!h.rightButton){for(;g;){if(g===s)return;g=g.parentElement}this.contextViewService.hideContextView(!0)}})),Hr(l,i)},focus:()=>{i==null||i.focus(!!e.autoSelectFirstItem)},onHide:s=>{var r,a,l;(r=e.onHide)===null||r===void 0||r.call(e,!!s),this.block&&(this.block.remove(),this.block=null),(a=this.blockDisposable)===null||a===void 0||a.dispose(),this.blockDisposable=null,this.lastContainer&&(jo()===this.lastContainer||Qn(jo(),this.lastContainer))&&((l=this.focusToReturn)===null||l===void 0||l.focus()),this.lastContainer=null}},n,!!n)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!Fa(e.error)&&this.notificationService.error(e.error)}}var Xce=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sf=function(o,e){return function(t,i){e(t,i,o)}};let oN=class extends q{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new Yce(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,i,n,s,r){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=i,this.keybindingService=n,this.menuService=s,this.contextKeyService=r,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new W),this._onDidHideContextMenu=this._store.add(new W)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=rN.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:t=>{var i;(i=e.onHide)===null||i===void 0||i.call(e,t),this._onDidHideContextMenu.fire()}}),Dd.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};oN=Xce([sf(0,vo),sf(1,sn),sf(2,Gd),sf(3,Xt),sf(4,Ba),sf(5,Xe)],oN);var rN;(function(o){function e(i){return i&&i.menuId instanceof N}function t(i,n,s){if(!e(i))return i;const{menuId:r,menuActionOptions:a,contextKeyService:l}=i;return{...i,getActions:()=>{const d=[];if(r){const c=n.createMenu(r,l??s);Kce(c,a,d),c.dispose()}return i.getActions?Mn.join(i.getActions(),d):d}}}o.transform=t})(rN||(rN={}));var sS;(function(o){o[o.API=0]="API",o[o.USER=1]="USER"})(sS||(sS={}));const So=bt("openerService");function Qce(o){let e;const t=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(o.fragment);return t&&(e={startLineNumber:parseInt(t[1]),startColumn:t[2]?parseInt(t[2]):1,endLineNumber:t[4]?parseInt(t[4]):void 0,endColumn:t[4]?t[5]?parseInt(t[5]):1:void 0},o=o.with({fragment:""})),{selection:e,uri:o}}var HA=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},oS=function(o,e){return function(t,i){e(t,i,o)}};let aN=class{constructor(e){this._commandService=e}async open(e,t){if(!yM(e,ot.command))return!1;if(!(t!=null&&t.allowCommands)||(typeof e=="string"&&(e=ze.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path)))return!0;let i=[];try{i=YE(decodeURIComponent(e.query))}catch{try{i=YE(e.query)}catch{}}return Array.isArray(i)||(i=[i]),await this._commandService.executeCommand(e.path,...i),!0}};aN=HA([oS(0,Ri)],aN);let lN=class{constructor(e){this._editorService=e}async open(e,t){typeof e=="string"&&(e=ze.parse(e));const{selection:i,uri:n}=Qce(e);return e=n,e.scheme===ot.file&&(e=Woe(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:i,source:t!=null&&t.fromUserGesture?sS.USER:sS.API,...t==null?void 0:t.editorOptions}},this._editorService.getFocusedCodeEditor(),t==null?void 0:t.openToSide),!0}};lN=HA([oS(0,Ot)],lN);let dN=class{constructor(e,t){this._openers=new Ns,this._validators=new Ns,this._resolvers=new Ns,this._resolvedUriTargets=new Gi(i=>i.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new Ns,this._defaultExternalOpener={openExternal:async i=>(nO(i,ot.http,ot.https)?X8(i):Ai.location.href=i,!0)},this._openers.push({open:async(i,n)=>n!=null&&n.openExternal||nO(i,ot.mailto,ot.http,ot.https,ot.vsls)?(await this._doOpenExternal(i,n),!0):!1}),this._openers.push(new aN(t)),this._openers.push(new lN(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}async open(e,t){var i;const n=typeof e=="string"?ze.parse(e):e,s=(i=this._resolvedUriTargets.get(n))!==null&&i!==void 0?i:e;for(const r of this._validators)if(!await r.shouldOpen(s,t))return!1;for(const r of this._openers)if(await r.open(e,t))return!0;return!1}async resolveExternalUri(e,t){for(const i of this._resolvers)try{const n=await i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch{}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,t){const i=typeof e=="string"?ze.parse(e):e;let n;try{n=(await this.resolveExternalUri(i,t)).resolved}catch{n=i}let s;if(typeof e=="string"&&i.toString()===n.toString()?s=e:s=encodeURI(n.toString(!0)),t!=null&&t.allowContributedOpeners){const r=typeof(t==null?void 0:t.allowContributedOpeners)=="string"?t==null?void 0:t.allowContributedOpeners:void 0;for(const a of this._externalOpeners)if(await a.openExternal(s,{sourceUri:i,preferredOpenerId:r},vt.None))return!0}return this._defaultExternalOpener.openExternal(s,{sourceUri:i},vt.None)}dispose(){this._validators.clear()}};dN=HA([oS(0,Ot),oS(1,Ri)],dN);const Qr=bt("editorWorkerService");var Mi;(function(o){o[o.Hint=1]="Hint",o[o.Info=2]="Info",o[o.Warning=4]="Warning",o[o.Error=8]="Error"})(Mi||(Mi={}));(function(o){function e(r,a){return a-r}o.compare=e;const t=Object.create(null);t[o.Error]=p("sev.error","Error"),t[o.Warning]=p("sev.warning","Warning"),t[o.Info]=p("sev.info","Info");function i(r){return t[r]||""}o.toString=i;function n(r){switch(r){case ji.Error:return o.Error;case ji.Warning:return o.Warning;case ji.Info:return o.Info;case ji.Ignore:return o.Hint}}o.fromSeverity=n;function s(r){switch(r){case o.Error:return ji.Error;case o.Warning:return ji.Warning;case o.Info:return ji.Info;case o.Hint:return ji.Ignore}}o.toSeverity=s})(Mi||(Mi={}));var rS;(function(o){const e="";function t(n){return i(n,!0)}o.makeKey=t;function i(n,s){const r=[e];return n.source?r.push(n.source.replace("¦","\\¦")):r.push(e),n.code?typeof n.code=="string"?r.push(n.code.replace("¦","\\¦")):r.push(n.code.value.replace("¦","\\¦")):r.push(e),n.severity!==void 0&&n.severity!==null?r.push(Mi.toString(n.severity)):r.push(e),n.message&&s?r.push(n.message.replace("¦","\\¦")):r.push(e),n.startLineNumber!==void 0&&n.startLineNumber!==null?r.push(n.startLineNumber.toString()):r.push(e),n.startColumn!==void 0&&n.startColumn!==null?r.push(n.startColumn.toString()):r.push(e),n.endLineNumber!==void 0&&n.endLineNumber!==null?r.push(n.endLineNumber.toString()):r.push(e),n.endColumn!==void 0&&n.endColumn!==null?r.push(n.endColumn.toString()):r.push(e),r.push(e),r.join("¦")}o.makeKeyOptionalMessage=i})(rS||(rS={}));const Yl=bt("markerService");function Jce(o,e){const t=[],i=[];for(const n of o)e.has(n)||t.push(n);for(const n of e)o.has(n)||i.push(n);return{removed:t,added:i}}function eue(o,e){const t=new Set;for(const i of e)o.has(i)&&t.add(i);return t}var tue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},GF=function(o,e){return function(t,i){e(t,i,o)}};let cN=class extends q{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new W),this._markerDecorations=new Gi,e.getModels().forEach(i=>this._onModelAdded(i)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach(t=>{const i=this._markerDecorations.get(t);i&&this._updateDecorations(i)})}_onModelAdded(e){const t=new iue(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){var t;const i=this._markerDecorations.get(e.uri);i&&(i.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===ot.inMemory||e.uri.scheme===ot.internal||e.uri.scheme===ot.vscode)&&((t=this._markerService)===null||t===void 0||t.read({resource:e.uri}).map(n=>n.owner).forEach(n=>this._markerService.remove(n,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};cN=tue([GF(0,Si),GF(1,Yl)],cN);class iue extends q{constructor(e){super(),this.model=e,this._map=new zJ,this._register(je(()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()}))}update(e){const{added:t,removed:i}=Jce(new Set(this._map.keys()),new Set(e));if(t.length===0&&i.length===0)return!1;const n=i.map(a=>this._map.get(a)),s=t.map(a=>({range:this._createDecorationRange(this.model,a),options:this._createDecorationOption(a)})),r=this.model.deltaDecorations(n,s);for(const a of i)this._map.delete(a);for(let a=0;a=n)return i;const s=e.getWordAtPosition(i.getStartPosition());s&&(i=new k(i.startLineNumber,s.startColumn,i.endLineNumber,s.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&t.startColumn===1&&i.startLineNumber===i.endLineNumber){const n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n=0:!1}}var nue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Xm=function(o,e){return function(t,i){e(t,i,o)}},mf;function nh(o){return o.toString()}class sue{constructor(e,t,i){this.model=e,this._modelEventListeners=new de,this.model=e,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(n=>i(e,n)))}dispose(){this._modelEventListeners.dispose()}}const oue=ws||It?1:2;class rue{constructor(e,t,i,n,s,r,a,l){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=s,this.sha1=r,this.versionId=a,this.alternativeVersionId=l}}let aS=mf=class extends q{constructor(e,t,i,n,s){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=i,this._languageService=n,this._languageConfigurationService=s,this._onModelAdded=this._register(new W),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new W),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new W),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(r=>this._updateModelOptions(r))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){var i;let n=rs.tabSize;if(e.editor&&typeof e.editor.tabSize<"u"){const g=parseInt(e.editor.tabSize,10);isNaN(g)||(n=g),n<1&&(n=1)}let s="tabSize";if(e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"){const g=parseInt(e.editor.indentSize,10);isNaN(g)||(s=Math.max(g,1))}let r=rs.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(r=e.editor.insertSpaces==="false"?!1:!!e.editor.insertSpaces);let a=oue;const l=e.eol;l===`\r `?a=2:l===` `&&(a=1);let d=rs.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(d=e.editor.trimAutoWhitespace==="false"?!1:!!e.editor.trimAutoWhitespace);let c=rs.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(c=e.editor.detectIndentation==="false"?!1:!!e.editor.detectIndentation);let u=rs.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(u=e.editor.largeFileOptimizations==="false"?!1:!!e.editor.largeFileOptimizations);let h=rs.bracketPairColorizationOptions;return!((i=e.editor)===null||i===void 0)&&i.bracketPairColorization&&typeof e.editor.bracketPairColorization=="object"&&(h={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:s,insertSpaces:r,detectIndentation:c,defaultEOL:a,trimAutoWhitespace:d,largeFileOptimizations:u,bracketPairColorizationOptions:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&typeof i=="string"&&i!=="auto"?i:Vo===3||Vo===2?` `:`\r -`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,i){const n=typeof e=="string"?e:e.languageId;let s=this._modelCreationOptionsByLanguageAndResource[n+t];if(!s){const r=this._configurationService.getValue("editor",{overrideIdentifier:n,resource:t}),a=this._getEOL(t,n);s=mf._readModelOptions({editor:r,eol:a},i),this._modelCreationOptionsByLanguageAndResource[n+t]=s}return s}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,s=i.length;ne){const t=[];for(this._disposedModels.forEach(i=>{i.sharesUndoRedoStack||t.push(i)}),t.sort((i,n)=>i.time-n.time);t.length>0&&this._disposedModelsHeapSize>e;){const i=t.shift();this._removeDisposedModel(i.uri),i.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(i.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const s=this.getCreationOptions(t,i,n),r=new Wl(e,t,s,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(nh(i))){const d=this._removeDisposedModel(i),c=this._undoRedoService.getElements(i),u=this._getSHA1Computer(),h=u.canComputeSHA1(r)?u.computeSHA1(r)===d.sha1:!1;if(h||d.sharesUndoRedoStack){for(const g of c.past)pd(g)&&g.matchesResource(i)&&g.setModel(r);for(const g of c.future)pd(g)&&g.matchesResource(i)&&g.setModel(r);this._undoRedoService.setElementsValidFlag(i,!0,g=>pd(g)&&g.matchesResource(i)),h&&(r._overwriteVersionId(d.versionId),r._overwriteAlternativeVersionId(d.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(d.initialUndoRedoSnapshot))}else d.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(d.initialUndoRedoSnapshot)}const a=nh(r.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");const l=new eue(r,d=>this._onWillDispose(d),(d,c)=>this._onDidChangeLanguage(d,c));return this._models[a]=l,l}createModel(e,t,i,n=!1){let s;return t?s=this._createModelData(e,t,i,n):s=this._createModelData(e,Ko,i,n),this._onModelAdded.fire(s.model),s.model}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||d.future.length>0){for(const c of d.past)pd(c)&&c.matchesResource(e.uri)&&(s=!0,r+=c.heapSize(e.uri),c.setModel(e.uri));for(const c of d.future)pd(c)&&c.matchesResource(e.uri)&&(s=!0,r+=c.heapSize(e.uri),c.setModel(e.uri))}}const a=mf.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,l=this._getSHA1Computer();if(s)if(!n&&(r>a||!l.canComputeSHA1(e))){const d=i.model.getInitialUndoRedoSnapshot();d!==null&&this._undoRedoService.restoreSnapshot(d)}else this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(e.uri,!1,d=>pd(d)&&d.matchesResource(e.uri)),this._insertDisposedModel(new iue(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),n,r,l.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!n){const d=i.model.getInitialUndoRedoSnapshot();d!==null&&this._undoRedoService.restoreSnapshot(d)}delete this._models[t],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const i=t.oldLanguage,n=e.getLanguageId(),s=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget);mf._setModelOptionsForModel(e,r,s),this._onModelModeChanged.fire({model:e,oldLanguageId:i})}_getSHA1Computer(){return new oL}};aS.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024;aS=mf=Jce([Xm(0,Dt),Xm(1,S8),Xm(2,Gy),Xm(3,bi),Xm(4,si)],aS);class oL{canComputeSHA1(e){return e.getValueLength()<=oL.MAX_MODEL_SIZE}computeSHA1(e){const t=new yy,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}}oL.MAX_MODEL_SIZE=10*1024*1024;class nue{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:q.None}}renderElement(e,t,i,n){var s;if((s=i.disposable)===null||s===void 0||s.dispose(),!i.data)return;const r=this.modelProvider();if(r.isResolved(e))return this.renderer.renderElement(r.get(e),e,i.data,n);const a=new tn,l=r.resolve(e,a.token);i.disposable={dispose:()=>a.cancel()},this.renderer.renderPlaceholder(e,i.data),l.then(d=>this.renderer.renderElement(d,e,i.data,n))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class sue{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}function oue(o,e){return{...e,accessibilityProvider:e.accessibilityProvider&&new sue(o,e.accessibilityProvider)}}class rue{constructor(e,t,i,n,s={}){const r=()=>this.model,a=n.map(l=>new nue(l,r));this.list=new Yr(e,t,i,a,oue(r,s))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return ye.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:i}))}get onPointer(){return ye.map(this.list.onPointer,({element:e,index:t,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:i}))}get onDidChangeSelection(){return ye.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:i})=>({elements:e.map(n=>this._model.get(n)),indexes:t,browserEvent:i}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,Ls(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}var ym=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};const aue=!1;var lS;(function(o){o.North="north",o.South="south",o.East="east",o.West="west"})(lS||(lS={}));let lue=4;const due=new W;let cue=300;const uue=new W;class zA{constructor(e){this.el=e,this.disposables=new de}get onPointerMove(){return this.disposables.add(new St(Je(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new St(Je(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}ym([nn],zA.prototype,"onPointerMove",null);ym([nn],zA.prototype,"onPointerUp",null);class $A{get onPointerMove(){return this.disposables.add(new St(this.el,ni.Change)).event}get onPointerUp(){return this.disposables.add(new St(this.el,ni.End)).event}constructor(e){this.el=e,this.disposables=new de}dispose(){this.disposables.dispose()}}ym([nn],$A.prototype,"onPointerMove",null);ym([nn],$A.prototype,"onPointerUp",null);class dS{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}ym([nn],dS.prototype,"onPointerMove",null);ym([nn],dS.prototype,"onPointerUp",null);const ZF="pointer-events-disabled";class ss extends q{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=i=>{this.orthogonalStartDragHandleDisposables.clear(),i!==0&&(this._orthogonalStartDragHandle=le(this.el,pe(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(je(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new St(this._orthogonalStartDragHandle,"mouseenter")).event(()=>ss.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new St(this._orthogonalStartDragHandle,"mouseleave")).event(()=>ss.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=i=>{this.orthogonalEndDragHandleDisposables.clear(),i!==0&&(this._orthogonalEndDragHandle=le(this.el,pe(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(je(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new St(this._orthogonalEndDragHandle,"mouseenter")).event(()=>ss.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new St(this._orthogonalEndDragHandle,"mouseleave")).event(()=>ss.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,i){super(),this.hoverDelay=cue,this.hoverDelayer=this._register(new jr(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new W),this._onDidStart=this._register(new W),this._onDidChange=this._register(new W),this._onDidReset=this._register(new W),this._onDidEnd=this._register(new W),this.orthogonalStartSashDisposables=this._register(new de),this.orthogonalStartDragHandleDisposables=this._register(new de),this.orthogonalEndSashDisposables=this._register(new de),this.orthogonalEndDragHandleDisposables=this._register(new de),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=le(e,pe(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),It&&this.el.classList.add("mac");const n=this._register(new St(this.el,"mousedown")).event;this._register(n(u=>this.onPointerStart(u,new zA(e)),this));const s=this._register(new St(this.el,"dblclick")).event;this._register(s(this.onPointerDoublePress,this));const r=this._register(new St(this.el,"mouseenter")).event;this._register(r(()=>ss.onMouseEnter(this)));const a=this._register(new St(this.el,"mouseleave")).event;this._register(a(()=>ss.onMouseLeave(this))),this._register(ei.addTarget(this.el));const l=this._register(new St(this.el,ni.Start)).event;this._register(l(u=>this.onPointerStart(u,new $A(this.el)),this));const d=this._register(new St(this.el,ni.Tap)).event;let c;this._register(d(u=>{if(c){clearTimeout(c),c=void 0,this.onPointerDoublePress(u);return}clearTimeout(c),c=setTimeout(()=>c=void 0,250)},this)),typeof i.size=="number"?(this.size=i.size,i.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=lue,this._register(due.event(u=>{this.size=u,this.layout()}))),this._register(uue.event(u=>this.hoverDelay=u)),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",aue),this.layout()}onPointerStart(e,t){ct.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const f=this.getOrthogonalSash(e);f&&(i=!0,e.__orthogonalSashEvent=!0,f.onPointerStart(e,new dS(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new dS(t))),!this.state)return;const n=this.el.ownerDocument.getElementsByTagName("iframe");for(const f of n)f.classList.add(ZF);const s=e.pageX,r=e.pageY,a=e.altKey,l={startX:s,currentX:s,startY:r,currentY:r,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const d=mr(this.el),c=()=>{let f="";i?f="all-scroll":this.orientation===1?this.state===1?f="s-resize":this.state===2?f="n-resize":f=It?"row-resize":"ns-resize":this.state===1?f="e-resize":this.state===2?f="w-resize":f=It?"col-resize":"ew-resize",d.textContent=`* { cursor: ${f} !important; }`},u=new de;c(),i||this.onDidEnablementChange.event(c,null,u);const h=f=>{ct.stop(f,!1);const m={startX:s,currentX:f.pageX,startY:r,currentY:f.pageY,altKey:a};this._onDidChange.fire(m)},g=f=>{ct.stop(f,!1),this.el.removeChild(d),this.el.classList.remove("active"),this._onDidEnd.fire(),u.dispose();for(const m of n)m.classList.remove(ZF)};t.onPointerMove(h,null,u),t.onPointerUp(g,null,u),u.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!t&&e.linkedSash&&ss.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&ss.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){ss.onMouseLeave(this)}layout(){if(this.orientation===0){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){var t;const i=(t=e.initialTarget)!==null&&t!==void 0?t:e.target;if(!(!i||!(i instanceof HTMLElement))&&i.classList.contains("orthogonal-drag-handle"))return i.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}const hue={separatorBorder:Y.transparent};class x6{set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(e,t){var i,n;if(e!==this.visible){e?(this.size=io(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof t=="number"?t:this.size,this.size=0),this.container.classList.toggle("visible",e);try{(n=(i=this.view).setVisible)===null||n===void 0||n.call(i,e)}catch(s){console.error("Splitview: Failed to set visible view"),console.error(s)}}}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){var e;return(e=this.view.proportionalLayout)!==null&&e!==void 0?e:!0}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,typeof i=="number"?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}layout(e,t){this.layoutContainer(e);try{this.view.layout(this.size,e,t)}catch(i){console.error("Splitview: Failed to layout view"),console.error(i)}}dispose(){this.disposable.dispose()}}class gue extends x6{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class fue extends x6{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var ud;(function(o){o[o.Idle=0]="Idle",o[o.Busy=1]="Busy"})(ud||(ud={}));var cS;(function(o){o.Distribute={type:"distribute"};function e(n){return{type:"split",index:n}}o.Split=e;function t(n){return{type:"auto",index:n}}o.Auto=t;function i(n){return{type:"invisible",cachedVisibleSize:n}}o.Invisible=i})(cS||(cS={}));class k6 extends q{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){var i,n,s,r,a;super(),this.size=0,this._contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=ud.Idle,this._onDidSashChange=this._register(new W),this._onDidSashReset=this._register(new W),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=(i=t.orientation)!==null&&i!==void 0?i:0,this.inverseAltBehavior=(n=t.inverseAltBehavior)!==null&&n!==void 0?n:!1,this.proportionalLayout=(s=t.proportionalLayout)!==null&&s!==void 0?s:!0,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=le(this.el,pe(".sash-container")),this.viewContainer=pe(".split-view-container"),this.scrollable=this._register(new bm({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:d=>po(Je(this.el),d)})),this.scrollableElement=this._register(new Vy(this.viewContainer,{vertical:this.orientation===0?(r=t.scrollbarVisibility)!==null&&r!==void 0?r:1:2,horizontal:this.orientation===1?(a=t.scrollbarVisibility)!==null&&a!==void 0?a:1:2},this.scrollable));const l=this._register(new St(this.viewContainer,"scroll")).event;this._register(l(d=>{const c=this.scrollableElement.getScrollPosition(),u=Math.abs(this.viewContainer.scrollLeft-c.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,h=Math.abs(this.viewContainer.scrollTop-c.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(u!==void 0||h!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:u,scrollTop:h})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(d=>{d.scrollTopChanged&&(this.viewContainer.scrollTop=d.scrollTop),d.scrollLeftChanged&&(this.viewContainer.scrollLeft=d.scrollLeft)})),le(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||hue),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((d,c)=>{const u=ro(d.visible)||d.visible?d.size:{type:"invisible",cachedVisibleSize:d.size},h=d.view;this.doAddView(h,u,c,!0)}),this._contentSize=this.viewItems.reduce((d,c)=>d+c.size,0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this._contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let n=0;for(let s=0;s0&&(r.size=io(Math.round(a*e/n),r.minimumSize,r.maximumSize))}}else{const n=Ls(this.viewItems.length),s=n.filter(a=>this.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);this.resize(this.viewItems.length-1,e-i,void 0,s,r)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map(e=>e.proportionalLayout&&e.visible?e.size/this._contentSize:void 0))}onSashStart({sash:e,start:t,alt:i}){for(const a of this.viewItems)a.enabled=!1;const n=this.sashItems.findIndex(a=>a.sash===e),s=Hr(J(this.el.ownerDocument.body,"keydown",a=>r(this.sashDragState.current,a.altKey)),J(this.el.ownerDocument.body,"keyup",()=>r(this.sashDragState.current,!1))),r=(a,l)=>{const d=this.viewItems.map(f=>f.size);let c=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(l=!l),l)if(n===this.sashItems.length-1){const m=this.viewItems[n];c=(m.minimumSize-m.size)/2,u=(m.maximumSize-m.size)/2}else{const m=this.viewItems[n+1];c=(m.size-m.maximumSize)/2,u=(m.size-m.minimumSize)/2}let h,g;if(!l){const f=Ls(n,-1),m=Ls(n+1,this.viewItems.length),v=f.reduce((I,E)=>I+(this.viewItems[E].minimumSize-d[E]),0),_=f.reduce((I,E)=>I+(this.viewItems[E].viewMaximumSize-d[E]),0),b=m.length===0?Number.POSITIVE_INFINITY:m.reduce((I,E)=>I+(d[E]-this.viewItems[E].minimumSize),0),C=m.length===0?Number.NEGATIVE_INFINITY:m.reduce((I,E)=>I+(d[E]-this.viewItems[E].viewMaximumSize),0),w=Math.max(v,C),S=Math.min(b,_),x=this.findFirstSnapIndex(f),y=this.findFirstSnapIndex(m);if(typeof x=="number"){const I=this.viewItems[x],E=Math.floor(I.viewMinimumSize/2);h={index:x,limitDelta:I.visible?w-E:w+E,size:I.size}}if(typeof y=="number"){const I=this.viewItems[y],E=Math.floor(I.viewMinimumSize/2);g={index:y,limitDelta:I.visible?S+E:S-E,size:I.size}}}this.sashDragState={start:a,current:a,index:n,sizes:d,minDelta:c,maxDelta:u,alt:l,snapBefore:h,snapAfter:g,disposable:s}};r(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:s,minDelta:r,maxDelta:a,snapBefore:l,snapAfter:d}=this.sashDragState;this.sashDragState.current=e;const c=e-i,u=this.resize(t,c,n,void 0,void 0,r,a,l,d);if(s){const h=t===this.sashItems.length-1,g=this.viewItems.map(C=>C.size),f=h?t:t+1,m=this.viewItems[f],v=m.size-m.maximumSize,_=m.size-m.minimumSize,b=h?t-1:t+1;this.resize(b,-u,g,void 0,void 0,v,_)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const t of this.viewItems)t.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t=typeof t=="number"?t:e.size,t=io(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(!(e<0||e>=this.viewItems.length)){if(this.state!==ud.Idle)throw new Error("Cant modify splitview");this.state=ud.Busy;try{const i=Ls(this.viewItems.length).filter(a=>a!==e),n=[...i.filter(a=>this.viewItems[a].priority===1),e],s=i.filter(a=>this.viewItems[a].priority===2),r=this.viewItems[e];t=Math.round(t),t=io(t,r.minimumSize,Math.min(r.maximumSize,this.size)),r.size=t,this.relayout(n,s)}finally{this.state=ud.Idle}}}distributeViewSizes(){const e=[];let t=0;for(const a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),t+=a.size);const i=Math.floor(t/e.length);for(const a of e)a.size=io(i,a.minimumSize,a.maximumSize);const n=Ls(this.viewItems.length),s=n.filter(a=>this.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);this.relayout(s,r)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,n){if(this.state!==ud.Idle)throw new Error("Cant modify splitview");this.state=ud.Busy;try{const s=pe(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(s):this.viewContainer.insertBefore(s,this.viewContainer.children.item(i));const r=e.onDidChange(h=>this.onViewChange(c,h)),a=je(()=>this.viewContainer.removeChild(s)),l=Hr(r,a);let d;typeof t=="number"?d=t:(t.type==="auto"&&(this.areViewsDistributed()?t={type:"distribute"}:t={type:"split",index:t.index}),t.type==="split"?d=this.getViewSize(t.index)/2:t.type==="invisible"?d={cachedVisibleSize:t.cachedVisibleSize}:d=e.minimumSize);const c=this.orientation===0?new gue(s,e,d,l):new fue(s,e,d,l);if(this.viewItems.splice(i,0,c),this.viewItems.length>1){const h={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},g=this.orientation===0?new ss(this.sashContainer,{getHorizontalSashTop:I=>this.getSashPosition(I),getHorizontalSashWidth:this.getSashOrthogonalSize},{...h,orientation:1}):new ss(this.sashContainer,{getVerticalSashLeft:I=>this.getSashPosition(I),getVerticalSashHeight:this.getSashOrthogonalSize},{...h,orientation:0}),f=this.orientation===0?I=>({sash:g,start:I.startY,current:I.currentY,alt:I.altKey}):I=>({sash:g,start:I.startX,current:I.currentX,alt:I.altKey}),v=ye.map(g.onDidStart,f)(this.onSashStart,this),b=ye.map(g.onDidChange,f)(this.onSashChange,this),w=ye.map(g.onDidEnd,()=>this.sashItems.findIndex(I=>I.sash===g))(this.onSashEnd,this),S=g.onDidReset(()=>{const I=this.sashItems.findIndex($=>$.sash===g),E=Ls(I,-1),R=Ls(I+1,this.viewItems.length),j=this.findFirstSnapIndex(E),O=this.findFirstSnapIndex(R);typeof j=="number"&&!this.viewItems[j].visible||typeof O=="number"&&!this.viewItems[O].visible||this._onDidSashReset.fire(I)}),x=Hr(v,b,w,S,g),y={sash:g,disposable:x};this.sashItems.splice(i-1,0,y)}s.appendChild(e.element);let u;typeof t!="number"&&t.type==="split"&&(u=[t.index]),n||this.relayout([i],u),!n&&typeof t!="number"&&t.type==="distribute"&&this.distributeViewSizes()}finally{this.state=ud.Idle}}relayout(e,t){const i=this.viewItems.reduce((n,s)=>n+s.size,0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map(c=>c.size),n,s,r=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l,d){if(e<0||e>=this.viewItems.length)return 0;const c=Ls(e,-1),u=Ls(e+1,this.viewItems.length);if(s)for(const y of s)DD(c,y),DD(u,y);if(n)for(const y of n)$0(c,y),$0(u,y);const h=c.map(y=>this.viewItems[y]),g=c.map(y=>i[y]),f=u.map(y=>this.viewItems[y]),m=u.map(y=>i[y]),v=c.reduce((y,I)=>y+(this.viewItems[I].minimumSize-i[I]),0),_=c.reduce((y,I)=>y+(this.viewItems[I].maximumSize-i[I]),0),b=u.length===0?Number.POSITIVE_INFINITY:u.reduce((y,I)=>y+(i[I]-this.viewItems[I].minimumSize),0),C=u.length===0?Number.NEGATIVE_INFINITY:u.reduce((y,I)=>y+(i[I]-this.viewItems[I].maximumSize),0),w=Math.max(v,C,r),S=Math.min(b,_,a);let x=!1;if(l){const y=this.viewItems[l.index],I=t>=l.limitDelta;x=I!==y.visible,y.setVisible(I,l.size)}if(!x&&d){const y=this.viewItems[d.index],I=ta+l.size,0);let i=this.size-t;const n=Ls(this.viewItems.length-1,-1),s=n.filter(a=>this.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);for(const a of r)DD(n,a);for(const a of s)$0(n,a);typeof e=="number"&&$0(n,e);for(let a=0;i!==0&&at+i.size,0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(t=>t.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this._contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this._contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map(l=>e=l.size-l.minimumSize>0||e);e=!1;const i=this.viewItems.map(l=>e=l.maximumSize-l.size>0||e),n=[...this.viewItems].reverse();e=!1;const s=n.map(l=>e=l.size-l.minimumSize>0||e).reverse();e=!1;const r=n.map(l=>e=l.maximumSize-l.size>0||e).reverse();let a=0;for(let l=0;l0||this.startSnappingEnabled)?d.state=1:b&&t[l]&&(a0)return;if(!i.visible&&i.snap)return t}}areViewsDistributed(){let e,t;for(const i of this.viewItems)if(e=e===void 0?i.size:Math.min(e,i.size),t=t===void 0?i.size:Math.max(t,i.size),t-e>2)return!1;return!0}dispose(){var e;(e=this.sashDragState)===null||e===void 0||e.disposable.dispose(),jt(this.viewItems),this.viewItems=[],this.sashItems.forEach(t=>t.disposable.dispose()),this.sashItems=[],super.dispose()}}class v0{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=v0.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map(s=>[s.templateId,s]));this.renderers=[];for(const s of e){const r=n.get(s.templateId);if(!r)throw new Error(`Table cell renderer for template id ${s.templateId} not found.`);this.renderers.push(r)}}renderTemplate(e){const t=le(e,pe(".monaco-table-tr")),i=[],n=[];for(let r=0;rnew mue(c,u)),l={size:a.reduce((c,u)=>c+u.column.weight,0),views:a.map(c=>({size:c.column.weight,view:c}))};this.splitview=this.disposables.add(new k6(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:l})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const d=new v0(n,s,c=>this.splitview.getViewSize(c));this.list=this.disposables.add(new Yr(e,this.domNode,pue(i),[d],r)),ye.any(...a.map(c=>c.onDidLayout))(([c,u])=>d.layoutColumn(c,u),null,this.disposables),this.splitview.onDidSashReset(c=>{const u=n.reduce((g,f)=>g+f.weight,0),h=n[c].weight/u*this.cachedWidth;this.splitview.resizeView(c,h)},null,this.disposables),this.styleElement=mr(this.domNode),this.style(bce)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { +`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,i){const n=typeof e=="string"?e:e.languageId;let s=this._modelCreationOptionsByLanguageAndResource[n+t];if(!s){const r=this._configurationService.getValue("editor",{overrideIdentifier:n,resource:t}),a=this._getEOL(t,n);s=mf._readModelOptions({editor:r,eol:a},i),this._modelCreationOptionsByLanguageAndResource[n+t]=s}return s}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,s=i.length;ne){const t=[];for(this._disposedModels.forEach(i=>{i.sharesUndoRedoStack||t.push(i)}),t.sort((i,n)=>i.time-n.time);t.length>0&&this._disposedModelsHeapSize>e;){const i=t.shift();this._removeDisposedModel(i.uri),i.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(i.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const s=this.getCreationOptions(t,i,n),r=new Wl(e,t,s,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(nh(i))){const d=this._removeDisposedModel(i),c=this._undoRedoService.getElements(i),u=this._getSHA1Computer(),h=u.canComputeSHA1(r)?u.computeSHA1(r)===d.sha1:!1;if(h||d.sharesUndoRedoStack){for(const g of c.past)pd(g)&&g.matchesResource(i)&&g.setModel(r);for(const g of c.future)pd(g)&&g.matchesResource(i)&&g.setModel(r);this._undoRedoService.setElementsValidFlag(i,!0,g=>pd(g)&&g.matchesResource(i)),h&&(r._overwriteVersionId(d.versionId),r._overwriteAlternativeVersionId(d.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(d.initialUndoRedoSnapshot))}else d.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(d.initialUndoRedoSnapshot)}const a=nh(r.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");const l=new sue(r,d=>this._onWillDispose(d),(d,c)=>this._onDidChangeLanguage(d,c));return this._models[a]=l,l}createModel(e,t,i,n=!1){let s;return t?s=this._createModelData(e,t,i,n):s=this._createModelData(e,Ko,i,n),this._onModelAdded.fire(s.model),s.model}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||d.future.length>0){for(const c of d.past)pd(c)&&c.matchesResource(e.uri)&&(s=!0,r+=c.heapSize(e.uri),c.setModel(e.uri));for(const c of d.future)pd(c)&&c.matchesResource(e.uri)&&(s=!0,r+=c.heapSize(e.uri),c.setModel(e.uri))}}const a=mf.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,l=this._getSHA1Computer();if(s)if(!n&&(r>a||!l.canComputeSHA1(e))){const d=i.model.getInitialUndoRedoSnapshot();d!==null&&this._undoRedoService.restoreSnapshot(d)}else this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(e.uri,!1,d=>pd(d)&&d.matchesResource(e.uri)),this._insertDisposedModel(new rue(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),n,r,l.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!n){const d=i.model.getInitialUndoRedoSnapshot();d!==null&&this._undoRedoService.restoreSnapshot(d)}delete this._models[t],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const i=t.oldLanguage,n=e.getLanguageId(),s=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget);mf._setModelOptionsForModel(e,r,s),this._onModelModeChanged.fire({model:e,oldLanguageId:i})}_getSHA1Computer(){return new oL}};aS.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024;aS=mf=nue([Xm(0,Dt),Xm(1,S7),Xm(2,Gy),Xm(3,bi),Xm(4,si)],aS);class oL{canComputeSHA1(e){return e.getValueLength()<=oL.MAX_MODEL_SIZE}computeSHA1(e){const t=new yy,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}}oL.MAX_MODEL_SIZE=10*1024*1024;class aue{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:q.None}}renderElement(e,t,i,n){var s;if((s=i.disposable)===null||s===void 0||s.dispose(),!i.data)return;const r=this.modelProvider();if(r.isResolved(e))return this.renderer.renderElement(r.get(e),e,i.data,n);const a=new tn,l=r.resolve(e,a.token);i.disposable={dispose:()=>a.cancel()},this.renderer.renderPlaceholder(e,i.data),l.then(d=>this.renderer.renderElement(d,e,i.data,n))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class lue{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}function due(o,e){return{...e,accessibilityProvider:e.accessibilityProvider&&new lue(o,e.accessibilityProvider)}}class cue{constructor(e,t,i,n,s={}){const r=()=>this.model,a=n.map(l=>new aue(l,r));this.list=new Yr(e,t,i,a,due(r,s))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return ye.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:i}))}get onPointer(){return ye.map(this.list.onPointer,({element:e,index:t,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:i}))}get onDidChangeSelection(){return ye.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:i})=>({elements:e.map(n=>this._model.get(n)),indexes:t,browserEvent:i}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,Ls(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}var ym=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};const uue=!1;var lS;(function(o){o.North="north",o.South="south",o.East="east",o.West="west"})(lS||(lS={}));let hue=4;const gue=new W;let fue=300;const pue=new W;class zA{constructor(e){this.el=e,this.disposables=new de}get onPointerMove(){return this.disposables.add(new St(Je(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new St(Je(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}ym([nn],zA.prototype,"onPointerMove",null);ym([nn],zA.prototype,"onPointerUp",null);class $A{get onPointerMove(){return this.disposables.add(new St(this.el,ni.Change)).event}get onPointerUp(){return this.disposables.add(new St(this.el,ni.End)).event}constructor(e){this.el=e,this.disposables=new de}dispose(){this.disposables.dispose()}}ym([nn],$A.prototype,"onPointerMove",null);ym([nn],$A.prototype,"onPointerUp",null);class dS{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}ym([nn],dS.prototype,"onPointerMove",null);ym([nn],dS.prototype,"onPointerUp",null);const ZF="pointer-events-disabled";class ss extends q{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=i=>{this.orthogonalStartDragHandleDisposables.clear(),i!==0&&(this._orthogonalStartDragHandle=le(this.el,pe(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(je(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new St(this._orthogonalStartDragHandle,"mouseenter")).event(()=>ss.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new St(this._orthogonalStartDragHandle,"mouseleave")).event(()=>ss.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=i=>{this.orthogonalEndDragHandleDisposables.clear(),i!==0&&(this._orthogonalEndDragHandle=le(this.el,pe(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(je(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new St(this._orthogonalEndDragHandle,"mouseenter")).event(()=>ss.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new St(this._orthogonalEndDragHandle,"mouseleave")).event(()=>ss.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,i){super(),this.hoverDelay=fue,this.hoverDelayer=this._register(new jr(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new W),this._onDidStart=this._register(new W),this._onDidChange=this._register(new W),this._onDidReset=this._register(new W),this._onDidEnd=this._register(new W),this.orthogonalStartSashDisposables=this._register(new de),this.orthogonalStartDragHandleDisposables=this._register(new de),this.orthogonalEndSashDisposables=this._register(new de),this.orthogonalEndDragHandleDisposables=this._register(new de),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=le(e,pe(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),It&&this.el.classList.add("mac");const n=this._register(new St(this.el,"mousedown")).event;this._register(n(u=>this.onPointerStart(u,new zA(e)),this));const s=this._register(new St(this.el,"dblclick")).event;this._register(s(this.onPointerDoublePress,this));const r=this._register(new St(this.el,"mouseenter")).event;this._register(r(()=>ss.onMouseEnter(this)));const a=this._register(new St(this.el,"mouseleave")).event;this._register(a(()=>ss.onMouseLeave(this))),this._register(ei.addTarget(this.el));const l=this._register(new St(this.el,ni.Start)).event;this._register(l(u=>this.onPointerStart(u,new $A(this.el)),this));const d=this._register(new St(this.el,ni.Tap)).event;let c;this._register(d(u=>{if(c){clearTimeout(c),c=void 0,this.onPointerDoublePress(u);return}clearTimeout(c),c=setTimeout(()=>c=void 0,250)},this)),typeof i.size=="number"?(this.size=i.size,i.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=hue,this._register(gue.event(u=>{this.size=u,this.layout()}))),this._register(pue.event(u=>this.hoverDelay=u)),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",uue),this.layout()}onPointerStart(e,t){ct.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const f=this.getOrthogonalSash(e);f&&(i=!0,e.__orthogonalSashEvent=!0,f.onPointerStart(e,new dS(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new dS(t))),!this.state)return;const n=this.el.ownerDocument.getElementsByTagName("iframe");for(const f of n)f.classList.add(ZF);const s=e.pageX,r=e.pageY,a=e.altKey,l={startX:s,currentX:s,startY:r,currentY:r,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const d=mr(this.el),c=()=>{let f="";i?f="all-scroll":this.orientation===1?this.state===1?f="s-resize":this.state===2?f="n-resize":f=It?"row-resize":"ns-resize":this.state===1?f="e-resize":this.state===2?f="w-resize":f=It?"col-resize":"ew-resize",d.textContent=`* { cursor: ${f} !important; }`},u=new de;c(),i||this.onDidEnablementChange.event(c,null,u);const h=f=>{ct.stop(f,!1);const m={startX:s,currentX:f.pageX,startY:r,currentY:f.pageY,altKey:a};this._onDidChange.fire(m)},g=f=>{ct.stop(f,!1),this.el.removeChild(d),this.el.classList.remove("active"),this._onDidEnd.fire(),u.dispose();for(const m of n)m.classList.remove(ZF)};t.onPointerMove(h,null,u),t.onPointerUp(g,null,u),u.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!t&&e.linkedSash&&ss.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&ss.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){ss.onMouseLeave(this)}layout(){if(this.orientation===0){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){var t;const i=(t=e.initialTarget)!==null&&t!==void 0?t:e.target;if(!(!i||!(i instanceof HTMLElement))&&i.classList.contains("orthogonal-drag-handle"))return i.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}const mue={separatorBorder:Y.transparent};class x6{set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(e,t){var i,n;if(e!==this.visible){e?(this.size=io(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof t=="number"?t:this.size,this.size=0),this.container.classList.toggle("visible",e);try{(n=(i=this.view).setVisible)===null||n===void 0||n.call(i,e)}catch(s){console.error("Splitview: Failed to set visible view"),console.error(s)}}}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){var e;return(e=this.view.proportionalLayout)!==null&&e!==void 0?e:!0}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,typeof i=="number"?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}layout(e,t){this.layoutContainer(e);try{this.view.layout(this.size,e,t)}catch(i){console.error("Splitview: Failed to layout view"),console.error(i)}}dispose(){this.disposable.dispose()}}class _ue extends x6{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class vue extends x6{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var ud;(function(o){o[o.Idle=0]="Idle",o[o.Busy=1]="Busy"})(ud||(ud={}));var cS;(function(o){o.Distribute={type:"distribute"};function e(n){return{type:"split",index:n}}o.Split=e;function t(n){return{type:"auto",index:n}}o.Auto=t;function i(n){return{type:"invisible",cachedVisibleSize:n}}o.Invisible=i})(cS||(cS={}));class k6 extends q{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){var i,n,s,r,a;super(),this.size=0,this._contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=ud.Idle,this._onDidSashChange=this._register(new W),this._onDidSashReset=this._register(new W),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=(i=t.orientation)!==null&&i!==void 0?i:0,this.inverseAltBehavior=(n=t.inverseAltBehavior)!==null&&n!==void 0?n:!1,this.proportionalLayout=(s=t.proportionalLayout)!==null&&s!==void 0?s:!0,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=le(this.el,pe(".sash-container")),this.viewContainer=pe(".split-view-container"),this.scrollable=this._register(new bm({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:d=>po(Je(this.el),d)})),this.scrollableElement=this._register(new Vy(this.viewContainer,{vertical:this.orientation===0?(r=t.scrollbarVisibility)!==null&&r!==void 0?r:1:2,horizontal:this.orientation===1?(a=t.scrollbarVisibility)!==null&&a!==void 0?a:1:2},this.scrollable));const l=this._register(new St(this.viewContainer,"scroll")).event;this._register(l(d=>{const c=this.scrollableElement.getScrollPosition(),u=Math.abs(this.viewContainer.scrollLeft-c.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,h=Math.abs(this.viewContainer.scrollTop-c.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(u!==void 0||h!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:u,scrollTop:h})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(d=>{d.scrollTopChanged&&(this.viewContainer.scrollTop=d.scrollTop),d.scrollLeftChanged&&(this.viewContainer.scrollLeft=d.scrollLeft)})),le(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||mue),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((d,c)=>{const u=ro(d.visible)||d.visible?d.size:{type:"invisible",cachedVisibleSize:d.size},h=d.view;this.doAddView(h,u,c,!0)}),this._contentSize=this.viewItems.reduce((d,c)=>d+c.size,0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this._contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let n=0;for(let s=0;s0&&(r.size=io(Math.round(a*e/n),r.minimumSize,r.maximumSize))}}else{const n=Ls(this.viewItems.length),s=n.filter(a=>this.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);this.resize(this.viewItems.length-1,e-i,void 0,s,r)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map(e=>e.proportionalLayout&&e.visible?e.size/this._contentSize:void 0))}onSashStart({sash:e,start:t,alt:i}){for(const a of this.viewItems)a.enabled=!1;const n=this.sashItems.findIndex(a=>a.sash===e),s=Hr(J(this.el.ownerDocument.body,"keydown",a=>r(this.sashDragState.current,a.altKey)),J(this.el.ownerDocument.body,"keyup",()=>r(this.sashDragState.current,!1))),r=(a,l)=>{const d=this.viewItems.map(f=>f.size);let c=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(l=!l),l)if(n===this.sashItems.length-1){const m=this.viewItems[n];c=(m.minimumSize-m.size)/2,u=(m.maximumSize-m.size)/2}else{const m=this.viewItems[n+1];c=(m.size-m.maximumSize)/2,u=(m.size-m.minimumSize)/2}let h,g;if(!l){const f=Ls(n,-1),m=Ls(n+1,this.viewItems.length),v=f.reduce((I,E)=>I+(this.viewItems[E].minimumSize-d[E]),0),_=f.reduce((I,E)=>I+(this.viewItems[E].viewMaximumSize-d[E]),0),b=m.length===0?Number.POSITIVE_INFINITY:m.reduce((I,E)=>I+(d[E]-this.viewItems[E].minimumSize),0),C=m.length===0?Number.NEGATIVE_INFINITY:m.reduce((I,E)=>I+(d[E]-this.viewItems[E].viewMaximumSize),0),w=Math.max(v,C),S=Math.min(b,_),x=this.findFirstSnapIndex(f),y=this.findFirstSnapIndex(m);if(typeof x=="number"){const I=this.viewItems[x],E=Math.floor(I.viewMinimumSize/2);h={index:x,limitDelta:I.visible?w-E:w+E,size:I.size}}if(typeof y=="number"){const I=this.viewItems[y],E=Math.floor(I.viewMinimumSize/2);g={index:y,limitDelta:I.visible?S+E:S-E,size:I.size}}}this.sashDragState={start:a,current:a,index:n,sizes:d,minDelta:c,maxDelta:u,alt:l,snapBefore:h,snapAfter:g,disposable:s}};r(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:s,minDelta:r,maxDelta:a,snapBefore:l,snapAfter:d}=this.sashDragState;this.sashDragState.current=e;const c=e-i,u=this.resize(t,c,n,void 0,void 0,r,a,l,d);if(s){const h=t===this.sashItems.length-1,g=this.viewItems.map(C=>C.size),f=h?t:t+1,m=this.viewItems[f],v=m.size-m.maximumSize,_=m.size-m.minimumSize,b=h?t-1:t+1;this.resize(b,-u,g,void 0,void 0,v,_)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const t of this.viewItems)t.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t=typeof t=="number"?t:e.size,t=io(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(!(e<0||e>=this.viewItems.length)){if(this.state!==ud.Idle)throw new Error("Cant modify splitview");this.state=ud.Busy;try{const i=Ls(this.viewItems.length).filter(a=>a!==e),n=[...i.filter(a=>this.viewItems[a].priority===1),e],s=i.filter(a=>this.viewItems[a].priority===2),r=this.viewItems[e];t=Math.round(t),t=io(t,r.minimumSize,Math.min(r.maximumSize,this.size)),r.size=t,this.relayout(n,s)}finally{this.state=ud.Idle}}}distributeViewSizes(){const e=[];let t=0;for(const a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),t+=a.size);const i=Math.floor(t/e.length);for(const a of e)a.size=io(i,a.minimumSize,a.maximumSize);const n=Ls(this.viewItems.length),s=n.filter(a=>this.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);this.relayout(s,r)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,n){if(this.state!==ud.Idle)throw new Error("Cant modify splitview");this.state=ud.Busy;try{const s=pe(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(s):this.viewContainer.insertBefore(s,this.viewContainer.children.item(i));const r=e.onDidChange(h=>this.onViewChange(c,h)),a=je(()=>this.viewContainer.removeChild(s)),l=Hr(r,a);let d;typeof t=="number"?d=t:(t.type==="auto"&&(this.areViewsDistributed()?t={type:"distribute"}:t={type:"split",index:t.index}),t.type==="split"?d=this.getViewSize(t.index)/2:t.type==="invisible"?d={cachedVisibleSize:t.cachedVisibleSize}:d=e.minimumSize);const c=this.orientation===0?new _ue(s,e,d,l):new vue(s,e,d,l);if(this.viewItems.splice(i,0,c),this.viewItems.length>1){const h={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},g=this.orientation===0?new ss(this.sashContainer,{getHorizontalSashTop:I=>this.getSashPosition(I),getHorizontalSashWidth:this.getSashOrthogonalSize},{...h,orientation:1}):new ss(this.sashContainer,{getVerticalSashLeft:I=>this.getSashPosition(I),getVerticalSashHeight:this.getSashOrthogonalSize},{...h,orientation:0}),f=this.orientation===0?I=>({sash:g,start:I.startY,current:I.currentY,alt:I.altKey}):I=>({sash:g,start:I.startX,current:I.currentX,alt:I.altKey}),v=ye.map(g.onDidStart,f)(this.onSashStart,this),b=ye.map(g.onDidChange,f)(this.onSashChange,this),w=ye.map(g.onDidEnd,()=>this.sashItems.findIndex(I=>I.sash===g))(this.onSashEnd,this),S=g.onDidReset(()=>{const I=this.sashItems.findIndex($=>$.sash===g),E=Ls(I,-1),R=Ls(I+1,this.viewItems.length),j=this.findFirstSnapIndex(E),O=this.findFirstSnapIndex(R);typeof j=="number"&&!this.viewItems[j].visible||typeof O=="number"&&!this.viewItems[O].visible||this._onDidSashReset.fire(I)}),x=Hr(v,b,w,S,g),y={sash:g,disposable:x};this.sashItems.splice(i-1,0,y)}s.appendChild(e.element);let u;typeof t!="number"&&t.type==="split"&&(u=[t.index]),n||this.relayout([i],u),!n&&typeof t!="number"&&t.type==="distribute"&&this.distributeViewSizes()}finally{this.state=ud.Idle}}relayout(e,t){const i=this.viewItems.reduce((n,s)=>n+s.size,0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map(c=>c.size),n,s,r=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l,d){if(e<0||e>=this.viewItems.length)return 0;const c=Ls(e,-1),u=Ls(e+1,this.viewItems.length);if(s)for(const y of s)DD(c,y),DD(u,y);if(n)for(const y of n)$0(c,y),$0(u,y);const h=c.map(y=>this.viewItems[y]),g=c.map(y=>i[y]),f=u.map(y=>this.viewItems[y]),m=u.map(y=>i[y]),v=c.reduce((y,I)=>y+(this.viewItems[I].minimumSize-i[I]),0),_=c.reduce((y,I)=>y+(this.viewItems[I].maximumSize-i[I]),0),b=u.length===0?Number.POSITIVE_INFINITY:u.reduce((y,I)=>y+(i[I]-this.viewItems[I].minimumSize),0),C=u.length===0?Number.NEGATIVE_INFINITY:u.reduce((y,I)=>y+(i[I]-this.viewItems[I].maximumSize),0),w=Math.max(v,C,r),S=Math.min(b,_,a);let x=!1;if(l){const y=this.viewItems[l.index],I=t>=l.limitDelta;x=I!==y.visible,y.setVisible(I,l.size)}if(!x&&d){const y=this.viewItems[d.index],I=ta+l.size,0);let i=this.size-t;const n=Ls(this.viewItems.length-1,-1),s=n.filter(a=>this.viewItems[a].priority===1),r=n.filter(a=>this.viewItems[a].priority===2);for(const a of r)DD(n,a);for(const a of s)$0(n,a);typeof e=="number"&&$0(n,e);for(let a=0;i!==0&&at+i.size,0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(t=>t.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this._contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this._contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map(l=>e=l.size-l.minimumSize>0||e);e=!1;const i=this.viewItems.map(l=>e=l.maximumSize-l.size>0||e),n=[...this.viewItems].reverse();e=!1;const s=n.map(l=>e=l.size-l.minimumSize>0||e).reverse();e=!1;const r=n.map(l=>e=l.maximumSize-l.size>0||e).reverse();let a=0;for(let l=0;l0||this.startSnappingEnabled)?d.state=1:b&&t[l]&&(a0)return;if(!i.visible&&i.snap)return t}}areViewsDistributed(){let e,t;for(const i of this.viewItems)if(e=e===void 0?i.size:Math.min(e,i.size),t=t===void 0?i.size:Math.max(t,i.size),t-e>2)return!1;return!0}dispose(){var e;(e=this.sashDragState)===null||e===void 0||e.disposable.dispose(),jt(this.viewItems),this.viewItems=[],this.sashItems.forEach(t=>t.disposable.dispose()),this.sashItems=[],super.dispose()}}class v0{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=v0.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map(s=>[s.templateId,s]));this.renderers=[];for(const s of e){const r=n.get(s.templateId);if(!r)throw new Error(`Table cell renderer for template id ${s.templateId} not found.`);this.renderers.push(r)}}renderTemplate(e){const t=le(e,pe(".monaco-table-tr")),i=[],n=[];for(let r=0;rnew Cue(c,u)),l={size:a.reduce((c,u)=>c+u.column.weight,0),views:a.map(c=>({size:c.column.weight,view:c}))};this.splitview=this.disposables.add(new k6(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:l})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const d=new v0(n,s,c=>this.splitview.getViewSize(c));this.list=this.disposables.add(new Yr(e,this.domNode,bue(i),[d],r)),ye.any(...a.map(c=>c.onDidLayout))(([c,u])=>d.layoutColumn(c,u),null,this.disposables),this.splitview.onDidSashReset(c=>{const u=n.reduce((g,f)=>g+f.weight,0),h=n[c].weight/u*this.cachedWidth;this.splitview.resizeView(c,h)},null,this.disposables),this.styleElement=mr(this.domNode),this.style(yce)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { top: ${this.virtualDelegate.headerRowHeight+1}px; height: calc(100% - ${this.virtualDelegate.headerRowHeight}px); }`),this.styleElement.textContent=t.join(` -`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}rL.InstanceCount=0;class Lm extends Gr{constructor(e){super(),this._onChange=this._register(new W),this.onChange=this._onChange.event,this._onKeyDown=this._register(new W),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...Ue.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,i=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),i.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,i=>{if(i.keyCode===10||i.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),i.preventDefault(),i.stopPropagation();return}this._onKeyDown.fire(i)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const _ue=p("caseDescription","Match Case"),vue=p("wordsDescription","Match Whole Word"),bue=p("regexDescription","Use Regular Expression");class I6 extends Lm{constructor(e){super({icon:ve.caseSensitive,title:_ue+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class E6 extends Lm{constructor(e){super({icon:ve.wholeWord,title:vue+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class N6 extends Lm{constructor(e){super({icon:ve.regex,title:bue+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Cue{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class wue{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new Cue(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach(t=>e.push(t)),e}}const Qm=pe;let Sue=class extends Gr{constructor(e,t,i){var n;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new W),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new W),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(n=this.options.tooltip)!==null&&n!==void 0?n:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=le(e,Qm(".monaco-inputbox.idle"));const s=this.options.flexibleHeight?"textarea":"input",r=le(this.element,Qm(".ibwrapper"));if(this.input=le(r,Qm(s+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=le(r,Qm("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new K8(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),le(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(d=>this.input.scrollTop=d.scrollTop));const a=this._register(new St(e.ownerDocument,"selectionchange")),l=ye.filter(a.event,()=>{const d=e.ownerDocument.getSelection();return(d==null?void 0:d.anchorNode)===r});this._register(l(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new Cr(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:kh(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return Dy(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){if(this.state==="open"&&Uo(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${Bh(i.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e==null?void 0:e.type}stylesForType(e){const t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const t=()=>e.style.width=zs(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:n=>{var s,r;if(!this.message)return null;e=le(n,Qm(".monaco-inputbox-container")),t();const a={inline:!0,className:"monaco-inputbox-message"},l=this.message.formatContent?Tde(this.message.content,a):Nde(this.message.content,a);l.classList.add(this.classForType(this.message.type));const d=this.stylesForType(this.message.type);return l.style.backgroundColor=(s=d.background)!==null&&s!==void 0?s:"",l.style.color=(r=d.foreground)!==null&&r!==void 0?r:"",l.style.border=d.border?`1px solid ${d.border}`:"",le(e,l),null},onHide:()=>{this.state="closed"},layout:t});let i;this.message.type===3?i=p("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?i=p("alertWarningMessage","Warning: {0}",this.message.content):i=p("alertInfoMessage","Info: {0}",this.message.content),mo(i),this.state="open"}_hideMessage(){this.contextViewProvider&&(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,i=e.charCodeAt(e.length-1)===10?" ":"";(e+i).replace(/\u000c/g,"")?this.mirror.textContent=e+i:this.mirror.innerText=" ",this.layout()}applyStyles(){var e,t,i;const n=this.options.inputBoxStyles,s=(e=n.inputBackground)!==null&&e!==void 0?e:"",r=(t=n.inputForeground)!==null&&t!==void 0?t:"",a=(i=n.inputBorder)!==null&&i!==void 0?i:"";this.element.style.backgroundColor=s,this.element.style.color=r,this.input.style.backgroundColor="inherit",this.input.style.color=r,this.element.style.border=`1px solid ${Bh(a,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=kh(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,s=t.value;i!==null&&n!==null&&(this.value=s.substr(0,i)+e+s.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){var e;this._hideMessage(),this.message=null,(e=this.actionbar)===null||e===void 0||e.dispose(),super.dispose()}};class T6 extends Sue{constructor(e,t,i){const n=p({}," or {0} for history","⇅"),s=p({}," ({0} for history)","⇅");super(e,t,i),this._onDidFocus=this._register(new W),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new W),this.onDidBlur=this._onDidBlur.event,this.history=new wue(i.history,100);const r=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(n)&&!this.placeholder.endsWith(s)&&this.history.getHistory().length){const a=this.placeholder.endsWith(")")?n:s,l=this.placeholder+a;i.showPlaceholderOnFocus&&!Dy(this.input)?this.placeholder=l:this.setPlaceHolder(l)}};this.observer=new MutationObserver((a,l)=>{a.forEach(d=>{d.target.textContent||r()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>r()),this.onblur(this.input,()=>{const a=l=>{if(this.placeholder.endsWith(l)){const d=this.placeholder.slice(0,this.placeholder.length-l.length);return i.showPlaceholderOnFocus?this.placeholder=d:this.setPlaceHolder(d),!0}else return!1};a(s)||a(n)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",hu(this.value?this.value:p("clearedInput","Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,hu(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}const yue=p("defaultLabel","input");class M6 extends Gr{constructor(e,t,i){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new An),this.additionalToggles=[],this._onDidOptionChange=this._register(new W),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new W),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new W),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new W),this._onKeyUp=this._register(new W),this._onCaseSensitiveKeyDown=this._register(new W),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new W),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||yue,this.showCommonFindToggles=!!i.showCommonFindToggles;const n=i.appendCaseSensitiveLabel||"",s=i.appendWholeWordsLabel||"",r=i.appendRegexLabel||"",a=i.history||[],l=!!i.flexibleHeight,d=!!i.flexibleWidth,c=i.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new T6(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:a,showHistoryHint:i.showHistoryHint,flexibleHeight:l,flexibleWidth:d,flexibleMaxHeight:c,inputBoxStyles:i.inputBoxStyles})),this.showCommonFindToggles){this.regex=this._register(new N6({appendTitle:r,isChecked:!1,...i.toggleStyles})),this._register(this.regex.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(h=>{this._onRegexKeyDown.fire(h)})),this.wholeWords=this._register(new E6({appendTitle:s,isChecked:!1,...i.toggleStyles})),this._register(this.wholeWords.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new I6({appendTitle:n,isChecked:!1,...i.toggleStyles})),this._register(this.caseSensitive.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(h=>{this._onCaseSensitiveKeyDown.fire(h)}));const u=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){const g=u.indexOf(this.domNode.ownerDocument.activeElement);if(g>=0){let f=-1;h.equals(17)?f=(g+1)%u.length:h.equals(15)&&(g===0?f=u.length-1:f=g-1),h.equals(9)?(u[g].blur(),this.inputBox.focus()):f>=0&&u[f].focus(),ct.stop(h,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(i==null?void 0:i.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e==null||e.appendChild(this.domNode),this._register(J(this.inputBox.inputElement,"compositionstart",u=>{this.imeSessionInProgress=!0})),this._register(J(this.inputBox.inputElement,"compositionend",u=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,u=>this._onKeyDown.fire(u)),this.onkeyup(this.inputBox.inputElement,u=>this._onKeyUp.fire(u)),this.oninput(this.inputBox.inputElement,u=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,u=>this._onMouseDown.fire(u))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){var e,t,i;this.domNode.classList.remove("disabled"),this.inputBox.enable(),(e=this.regex)===null||e===void 0||e.enable(),(t=this.wholeWords)===null||t===void 0||t.enable(),(i=this.caseSensitive)===null||i===void 0||i.enable();for(const n of this.additionalToggles)n.enable()}disable(){var e,t,i;this.domNode.classList.add("disabled"),this.inputBox.disable(),(e=this.regex)===null||e===void 0||e.disable(),(t=this.wholeWords)===null||t===void 0||t.disable(),(i=this.caseSensitive)===null||i===void 0||i.disable();for(const n of this.additionalToggles)n.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(const t of this.additionalToggles)t.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new de;for(const t of e??[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange(i=>{this._onDidOptionChange.fire(i),!i&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){var t,i,n,s,r,a;e?this.inputBox.paddingRight=0:this.inputBox.paddingRight=((i=(t=this.caseSensitive)===null||t===void 0?void 0:t.width())!==null&&i!==void 0?i:0)+((s=(n=this.wholeWords)===null||n===void 0?void 0:n.width())!==null&&s!==void 0?s:0)+((a=(r=this.regex)===null||r===void 0?void 0:r.width())!==null&&a!==void 0?a:0)+this.additionalToggles.reduce((l,d)=>l+d.width(),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var e,t;return(t=(e=this.caseSensitive)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){var e,t;return(t=(e=this.wholeWords)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){var e,t;return(t=(e=this.regex)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){var e;(e=this.caseSensitive)===null||e===void 0||e.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}var Mo;(function(o){o[o.Expanded=0]="Expanded",o[o.Collapsed=1]="Collapsed",o[o.PreserveOrExpanded=2]="PreserveOrExpanded",o[o.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(Mo||(Mo={}));var Rh;(function(o){o[o.Unknown=0]="Unknown",o[o.Twistie=1]="Twistie",o[o.Element=2]="Element",o[o.Filter=3]="Filter"})(Rh||(Rh={}));class Oo extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class UA{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}function jA(o){return typeof o=="object"&&"visibility"in o&&"data"in o}function ab(o){switch(o){case!0:return 1;case!1:return 0;default:return o}}function Ux(o){return typeof o.collapsible=="boolean"}class Lue{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new oM,this._onDidChangeCollapseState=new W,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new W,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new W,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new jr(E7),this.collapseByDefault=typeof n.collapseByDefault>"u"?!1:n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=typeof n.autoExpandSingleChildren>"u"?!1:n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=wt.empty(),n={}){if(e.length===0)throw new Oo(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n,s,r){var a;n===void 0&&(n=wt.empty()),r===void 0&&(r=(a=s.diffDepth)!==null&&a!==void 0?a:0);const{parentNode:l}=this.getParentNodeWithListIndex(t);if(!l.lastDiffIds)return this.spliceSimple(t,i,n,s);const d=[...n],c=t[t.length-1],u=new rl({getElements:()=>l.lastDiffIds},{getElements:()=>[...l.children.slice(0,c),...d,...l.children.slice(c+i)].map(v=>e.getId(v.element).toString())}).ComputeDiff(!1);if(u.quitEarly)return l.lastDiffIds=void 0,this.spliceSimple(t,i,d,s);const h=t.slice(0,-1),g=(v,_,b)=>{if(r>0)for(let C=0;Cb.originalStart-_.originalStart))g(f,m,f-(v.originalStart+v.originalLength)),f=v.originalStart,m=v.modifiedStart-c,this.spliceSimple([...h,f],v.originalLength,wt.slice(d,m,m+v.modifiedLength),s);g(f,m,f)}spliceSimple(e,t,i=wt.empty(),{onDidCreateNode:n,onDidDeleteNode:s,diffIdentityProvider:r}){const{parentNode:a,listIndex:l,revealed:d,visible:c}=this.getParentNodeWithListIndex(e),u=[],h=wt.map(i,y=>this.createTreeNode(y,a,a.visible?1:0,d,u,n)),g=e[e.length-1],f=a.children.length>0;let m=0;for(let y=g;y>=0&&yr.getId(y.element).toString())):a.lastDiffIds=a.children.map(y=>r.getId(y.element).toString()):a.lastDiffIds=void 0;let w=0;for(const y of C)y.visible&&w++;if(w!==0)for(let y=g+v.length;yI+(E.visible?E.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(a,b-y),this.list.splice(l,y,u)}if(C.length>0&&s){const y=I=>{s(I),I.children.forEach(y)};C.forEach(y)}this._onDidSplice.fire({insertedNodes:v,deletedNodes:C});const S=a.children.length>0;f!==S&&this.setCollapsible(e.slice(0,-1),S);let x=a;for(;x;){if(x.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}x=x.parent}}rerender(e){if(e.length===0)throw new Oo(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);typeof t>"u"&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,n))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);typeof t>"u"&&(t=!n.collapsed);const s={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,s))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:s}=this.getTreeNodeWithListIndex(e),r=this._setListNodeCollapseState(i,n,s,t);if(i!==this.root&&this.autoExpandSingleChildren&&r&&!Ux(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let a=-1;for(let l=0;l-1){a=-1;break}else a=l;a>-1&&this._setCollapseState([...e,a],t)}return r}_setListNodeCollapseState(e,t,i,n){const s=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!s)return s;const r=e.renderNodeCount,a=this.updateNodeAfterCollapseChange(e),l=r-(t===-1?0:1);return this.list.splice(t+1,l,a.slice(1)),s}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(Ux(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!Ux(t)&&t.recursive)for(const s of e.children)n=this._setNodeCollapseState(s,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,s,r){const a={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed<"u",collapsed:typeof e.collapsed>"u"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},l=this._filterNode(a,i);a.visibility=l,n&&s.push(a);const d=e.children||wt.empty(),c=n&&l!==0&&!a.collapsed;let u=0,h=1;for(const g of d){const f=this.createTreeNode(g,a,l,c,s,r);a.children.push(f),h+=f.renderNodeCount,f.visible&&(f.visibleChildIndex=u++)}return a.collapsible=a.collapsible||a.children.length>0,a.visibleChildrenCount=u,a.visible=l===2?u>0:l===1,a.visible?a.collapsed||(a.renderNodeCount=h):(a.renderNodeCount=0,n&&s.pop()),r==null||r(a),a}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(e.visible===!1)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let s;if(e!==this.root){if(s=this._filterNode(e,t),s===0)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const r=i.length;e.renderNodeCount=e===this.root?0:1;let a=!1;if(!e.collapsed||s!==0){let l=0;for(const d of e.children)a=this._updateNodeAfterFilterChange(d,s,i,n&&!e.collapsed)||a,d.visible&&(d.visibleChildIndex=l++);e.visibleChildrenCount=l}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=s===2?a:s===1,e.visibility=s),e.visible?e.collapsed||(e.renderNodeCount+=i.length-r):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(t!==0)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return typeof i=="boolean"?(e.filterData=void 0,i?1:0):jA(i)?(e.filterData=i.data,ab(i.visibility)):(e.filterData=void 0,ab(i))}hasTreeNode(e,t=this.root){if(!e||e.length===0)return!0;const[i,...n]=e;return i<0||i>t.children.length?!1:this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||e.length===0)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new Oo(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(e.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:n,visible:s}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new Oo(this.user,"Invalid tree location");const a=t.children[r];return{node:a,listIndex:i,revealed:n,visible:s&&a.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,s=!0){const[r,...a]=e;if(r<0||r>t.children.length)throw new Oo(this.user,"Invalid tree location");for(let l=0;lt.element)),this.data=e}}function jx(o){return o instanceof m0?new Due(o):o}class xue{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=q.None,this.disposables=new de}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(i=>i.element),t)}onDragStart(e,t){var i,n;(n=(i=this.dnd).onDragStart)===null||n===void 0||n.call(i,jx(e),t)}onDragOver(e,t,i,n,s=!0){const r=this.dnd.onDragOver(jx(e),t&&t.element,i,n),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),typeof t>"u")return r;if(a&&typeof r!="boolean"&&r.autoExpand&&(this.autoExpandDisposable=lu(()=>{const h=this.modelProvider(),g=h.getNodeLocation(t);h.isCollapsed(g)&&h.setCollapsed(g,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof r=="boolean"||!r.accept||typeof r.bubble>"u"||r.feedback){if(!s){const h=typeof r=="boolean"?r:r.accept,g=typeof r=="boolean"?void 0:r.effect;return{accept:h,effect:g,feedback:[i]}}return r}if(r.bubble===1){const h=this.modelProvider(),g=h.getNodeLocation(t),f=h.getParentNodeLocation(g),m=h.getNode(f),v=f&&h.getListIndex(f);return this.onDragOver(e,m,v,n,!1)}const l=this.modelProvider(),d=l.getNodeLocation(t),c=l.getListIndex(d),u=l.getListRenderCount(d);return{...r,feedback:Ls(c,c+u)}}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(jx(e),t&&t.element,i,n)}onDragEnd(e){var t,i;(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}function kue(o,e){return e&&{...e,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new xue(o,e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent({...t,element:t.element})},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent({...t,element:t.element})}},accessibilityProvider:e.accessibilityProvider&&{...e.accessibilityProvider,getSetSize(t){const i=o(),n=i.getNodeLocation(t),s=i.getParentNodeLocation(n);return i.getNode(s).visibleChildrenCount},getPosInSet(t){return t.visibleChildIndex+1},isChecked:e.accessibilityProvider&&e.accessibilityProvider.isChecked?t=>e.accessibilityProvider.isChecked(t.element):void 0,getRole:e.accessibilityProvider&&e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider&&e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider&&e.accessibilityProvider.getAriaLevel?t=>e.accessibilityProvider.getAriaLevel(t.element):t=>t.depth,getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}}}}class KA{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){var i,n;(n=(i=this.delegate).setDynamicHeight)===null||n===void 0||n.call(i,e.element,t)}}var lb;(function(o){o.None="none",o.OnHover="onHover",o.Always="always"})(lb||(lb={}));class Iue{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new de,this.onDidChange=ye.forEach(e,i=>this._elements=i,this.disposables)}dispose(){this.disposables.dispose()}}class db{constructor(e,t,i,n,s,r={}){var a;this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedIndentGuides=s,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=db.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=q.None,this.disposables=new de,this.templateId=e.templateId,this.updateOptions(r),ye.map(i,l=>l.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(a=e.onDidChangeTwistieState)===null||a===void 0||a.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent<"u"){const t=io(e.indent,0,40);if(t!==this.indent){this.indent=t;for(const[i,n]of this.renderedNodes)this.renderTreeElement(i,n)}}if(typeof e.renderIndentGuides<"u"){const t=e.renderIndentGuides!==lb.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(const[i,n]of this.renderedNodes)this._renderIndentGuides(i,n);if(this.indentGuidesDisposable.dispose(),t){const i=new de;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,i),this.indentGuidesDisposable=i,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof e.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=le(e,pe(".monaco-tl-row")),i=le(t,pe(".monaco-tl-indent")),n=le(t,pe(".monaco-tl-twistie")),s=le(t,pe(".monaco-tl-contents")),r=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:n,indentGuidesDisposable:q.None,templateData:r}}renderElement(e,t,i,n){this.renderedNodes.set(e,i),this.renderedElements.set(e.element,e),this.renderTreeElement(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){var s,r;i.indentGuidesDisposable.dispose(),(r=(s=this.renderer).disposeElement)===null||r===void 0||r.call(s,e,t,i.templateData,n),typeof n=="number"&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){const i=db.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${i}px`,t.indent.style.width=`${i+this.indent-16}px`,e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...Ue.asClassNameArray(ve.treeItemExpanded));let n=!1;this.renderer.renderTwistie&&(n=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(n||t.twistie.classList.add(...Ue.asClassNameArray(ve.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if($n(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new de,n=this.modelProvider();for(;;){const s=n.getNodeLocation(e),r=n.getParentNodeLocation(s);if(!r)break;const a=n.getNode(r),l=pe(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(a)&&l.classList.add("active"),t.indent.childElementCount===0?t.indent.appendChild(l):t.indent.insertBefore(l,t.indent.firstElementChild),this.renderedIndentGuides.add(a,l),i.add(je(()=>this.renderedIndentGuides.delete(a,l))),e=a}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach(n=>{const s=i.getNodeLocation(n);try{const r=i.getParentNodeLocation(s);n.collapsible&&n.children.length>0&&!n.collapsed?t.add(n):r&&t.add(i.getNode(r))}catch{}}),this.activeIndentNodes.forEach(n=>{t.has(n)||this.renderedIndentGuides.forEach(n,s=>s.classList.remove("active"))}),t.forEach(n=>{this.activeIndentNodes.has(n)||this.renderedIndentGuides.forEach(n,s=>s.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),jt(this.disposables)}}db.DefaultIndent=8;class Eue{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new de,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let i=1;if(this._filter){const r=this._filter.filter(e,t);if(typeof r=="boolean"?i=r?1:0:jA(r)?i=ab(r.visibility):i=r,i===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:ka.Default,visibility:i};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),s=Array.isArray(n)?n:[n];for(const r of s){const a=r&&r.toString();if(typeof a>"u")return{data:ka.Default,visibility:i};let l;if(this.tree.findMatchType===cg.Contiguous){const d=a.toLowerCase().indexOf(this._lowercasePattern);if(d>-1){l=[Number.MAX_SAFE_INTEGER,0];for(let c=this._lowercasePattern.length;c>0;c--)l.push(d+c-1)}}else l=lg(this._pattern,this._lowercasePattern,0,a,a.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(l)return this._matchCount++,s.length===1?{data:l,visibility:i}:{data:{label:a,score:l},visibility:i}}return this.tree.findMode===yl.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:ka.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){jt(this.disposables)}}var yl;(function(o){o[o.Highlight=0]="Highlight",o[o.Filter=1]="Filter"})(yl||(yl={}));var cg;(function(o){o[o.Fuzzy=0]="Fuzzy",o[o.Contiguous=1]="Contiguous"})(cg||(cg={}));let Nue=class{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,i,n,s,r={}){var a,l;this.tree=e,this.view=i,this.filter=n,this.contextViewProvider=s,this.options=r,this._pattern="",this.width=0,this._onDidChangeMode=new W,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new W,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new W,this._onDidChangeOpenState=new W,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new de,this.disposables=new de,this._mode=(a=e.options.defaultFindMode)!==null&&a!==void 0?a:yl.Highlight,this._matchType=(l=e.options.defaultFindMatchType)!==null&&l!==void 0?l:cg.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){e.defaultFindMode!==void 0&&(this.mode=e.defaultFindMode),e.defaultFindMatchType!==void 0&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){var e,t,i,n;const s=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&s?!((e=this.tree.options.showNotFoundMessage)!==null&&e!==void 0)||e?(t=this.widget)===null||t===void 0||t.showMessage({type:2,content:p("not found","No elements found.")}):(i=this.widget)===null||i===void 0||i.showMessage({type:2}):(n=this.widget)===null||n===void 0||n.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this._mode===yl.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!ka.isDefault(e.filterData)}layout(e){var t;this.width=e,(t=this.widget)===null||t===void 0||t.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}};function Tue(o,e){return o.position===e.position&&o.node.element===e.node.element&&o.startIndex===e.startIndex&&o.height===e.height&&o.endIndex===e.endIndex}class Mue extends q{constructor(e=[]){super(),this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return Bi(this.stickyNodes,e.stickyNodes,Tue)}addDisposable(e){this._register(e)}}let YF=class extends q{get firstVisibleNode(){const e=this.view.firstVisibleIndex;if(!(e<0||e>=this.view.length))return this.view.element(e)}constructor(e,t,i,n,s,r={}){super(),this.tree=e,this.model=t,this.view=i,this.treeDelegate=s,this.maxWidgetViewRatio=.4;const a=this.validateStickySettings(r);this.stickyScrollMaxItemCount=a.stickyScrollMaxItemCount,this._widget=this._register(new Aue(i.getScrollableElement(),i,t,n,s)),this._register(i.onDidScroll(()=>this.update())),this._register(i.onDidChangeContentHeight(()=>this.update())),this._register(e.onDidChangeCollapseState(()=>this.update())),this.update()}update(){const e=this.firstVisibleNode;if(!e||this.tree.scrollTop===0){this._widget.setState(void 0);return}const t=this.findStickyState(e);this._widget.setState(t)}findStickyState(e){const t=[],i=this.view.renderHeight*this.maxWidgetViewRatio;let n=e,s=0,r=this.getNextStickyNode(n,void 0,s);for(;r&&s+r.height=this.stickyScrollMaxItemCount||(n=this.getNextVisibleNode(n),!n)));)r=this.getNextStickyNode(n,r.node,s);return t.length?new Mue(t):void 0}getNextVisibleNode(e){const t=this.getNodeIndex(e);return t===-1||t===this.view.length-1?void 0:this.view.element(t+1)}getNextStickyNode(e,t,i){const n=this.getAncestorUnderPrevious(e,t);if(n&&!(n===e&&(!this.nodeIsUncollapsedParent(e)||this.nodeTopAlignsWithStickyNodesBottom(e,i))))return this.createStickyScrollNode(n,i)}nodeTopAlignsWithStickyNodesBottom(e,t){const i=this.getNodeIndex(e),n=this.view.getElementTop(i),s=t;return this.view.scrollTop===n-s}createStickyScrollNode(e,t){const i=this.treeDelegate.getHeight(e),{startIndex:n,endIndex:s}=this.getNodeRange(e),r=this.calculateStickyNodePosition(s,t);return{node:e,position:r,height:i,startIndex:n,endIndex:s}}getAncestorUnderPrevious(e,t=void 0){let i=e,n=this.getParentNode(i);for(;n;){if(n===t)return i;i=n,n=this.getParentNode(i)}if(t===void 0)return i}calculateStickyNodePosition(e,t){let i=this.view.getRelativeTop(e);if(i===null&&this.view.firstVisibleIndex===e&&e+1r&&t<=a?r:t}getParentNode(e){const t=this.model.getNodeLocation(e),i=this.model.getParentNodeLocation(t);return i?this.model.getNode(i):void 0}nodeIsUncollapsedParent(e){const t=this.model.getNodeLocation(e);return this.model.getListRenderCount(t)>1}getNodeIndex(e,t){return t===void 0&&(t=this.model.getNodeLocation(e)),this.model.getListIndex(t)}getNodeRange(e){const t=this.model.getNodeLocation(e),i=this.model.getListIndex(t);if(i<0)throw new Error("Node not found in tree");const n=this.model.getListRenderCount(t),s=i+n-1;return{startIndex:i,endIndex:s}}nodePositionTopBelowWidget(e){const t=[];let i=this.getParentNode(e);for(;i;)t.push(i),i=this.getParentNode(i);let n=0;for(let s=0;s0,n=!!e&&e.count>0;if(!i&&!n||i&&n&&this._previousState.equal(e)||(i!==n&&this.setVisible(n),(t=this._previousState)===null||t===void 0||t.dispose(),this._previousState=e,!n))return;for(let a=e.count-1;a>=0;a--){const l=e.stickyNodes[a],d=a?e.stickyNodes[a-1]:void 0,c=d?d.position+d.height:0,{element:u,disposable:h}=this.createElement(l,c);this._rootDomNode.appendChild(u),e.addDisposable(h)}const s=pe(".monaco-tree-sticky-container-shadow");this._rootDomNode.appendChild(s),e.addDisposable(je(()=>s.remove()));const r=e.stickyNodes[e.count-1];this._rootDomNode.style.height=`${r.position+r.height}px`}createElement(e,t){const i=this.model.getNodeLocation(e.node),n=this.model.getListIndex(i),s=document.createElement("div");s.style.top=`${e.position}px`,s.style.height=`${e.height}px`,s.style.lineHeight=`${e.height}px`,s.classList.add("monaco-tree-sticky-row"),s.classList.add("monaco-list-row"),s.setAttribute("data-index",`${n}`),s.setAttribute("data-parity",n%2===0?"even":"odd"),s.setAttribute("id",this.view.getElementID(n));const r=this.treeDelegate.getTemplateId(e.node),a=this.treeRenderers.find(u=>u.templateId===r);if(!a)throw new Error(`No renderer found for template id ${r}`);const l=new Proxy(e.node,{}),d=a.renderTemplate(s);a.renderElement(l,e.startIndex,d,e.height);const c=je(()=>{a.disposeElement(l,e.startIndex,d,e.height),a.disposeTemplate(d),s.remove()});return{element:s,disposable:c}}setVisible(e){this._rootDomNode.style.display=e?"block":"none"}dispose(){var e;(e=this._previousState)===null||e===void 0||e.dispose(),this._rootDomNode.remove()}};function XF(o){let e=Rh.Unknown;return UD(o.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=Rh.Twistie:UD(o.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?e=Rh.Element:UD(o.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(e=Rh.Filter),{browserEvent:o.browserEvent,element:o.element?o.element.element:null,target:e}}function A1(o,e){e(o),o.children.forEach(t=>A1(t,e))}class Kx{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new W,this.onDidChange=this._onDidChange.event}set(e,t){!(t!=null&&t.__forceEvent)&&Bi(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const n=this;this._onDidChange.fire({get elements(){return n.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const l=this.createNodeSet(),d=c=>l.delete(c);t.forEach(c=>A1(c,d)),this.set([...l.values()]);return}const i=new Set,n=l=>i.add(this.identityProvider.getId(l.element).toString());t.forEach(l=>A1(l,n));const s=new Map,r=l=>s.set(this.identityProvider.getId(l.element).toString(),l);e.forEach(l=>A1(l,r));const a=[];for(const l of this.nodes){const d=this.identityProvider.getId(l.element).toString();if(!i.has(d))a.push(l);else{const u=s.get(d);u&&u.visible&&a.push(u)}}if(this.nodes.length>0&&a.length===0){const l=this.getFirstViewElementWithTrait();l&&a.push(l)}this._set(a,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class Rue extends C6{constructor(e,t,i){super(e),this.tree=t,this.stickyScrollProvider=i}onViewPointer(e){if(m6(e.browserEvent.target)||qc(e.browserEvent.target)||k_(e.browserEvent.target)||e.browserEvent.isHandledByList)return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,s=fce(e.browserEvent.target);let r=!1;if(s?r=!0:typeof this.tree.expandOnlyOnTwistieClick=="function"?r=this.tree.expandOnlyOnTwistieClick(t.element):r=!!this.tree.expandOnlyOnTwistieClick,s)this.handleStickyScrollMouseEvent(e,t);else{if(r&&!n&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e)}if(t.collapsible&&(!s||n)){const a=this.tree.getNodeLocation(t),l=e.browserEvent.altKey;if(this.tree.setFocus([a]),this.tree.toggleCollapsed(a,l),r&&n){e.browserEvent.isHandledByList=!0;return}}s||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,t){if(hce(e.browserEvent.target)||gce(e.browserEvent.target))return;const i=this.stickyScrollProvider();if(!i)throw new Error("Sticky scroll controller not found");const n=this.list.indexOf(t),s=this.list.getElementTop(n),r=i.nodePositionTopBelowWidget(t);this.tree.scrollTop=s-r,this.list.setFocus([n]),this.list.setSelection([n])}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||e.browserEvent.isHandledByList||super.onDoubleClick(e)}}class Pue extends Yr{constructor(e,t,i,n,s,r,a,l){super(e,t,i,n,l),this.focusTrait=s,this.selectionTrait=r,this.anchorTrait=a}createMouseController(e){return new Rue(this,e.tree,e.stickyScrollProvider)}splice(e,t,i=[]){if(super.splice(e,t,i),i.length===0)return;const n=[],s=[];let r;i.forEach((a,l)=>{this.focusTrait.has(a)&&n.push(e+l),this.selectionTrait.has(a)&&s.push(e+l),this.anchorTrait.has(a)&&(r=e+l)}),n.length>0&&super.setFocus(iu([...super.getFocus(),...n])),s.length>0&&super.setSelection(iu([...super.getSelection(),...s])),typeof r=="number"&&super.setAnchor(r)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map(n=>this.element(n)),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map(n=>this.element(n)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(typeof e>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class A6{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return ye.filter(ye.map(this.view.onMouseDblClick,XF),e=>e.target!==Rh.Filter)}get onPointer(){return ye.map(this.view.onPointer,XF)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return ye.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e,t;return(t=(e=this.findController)===null||e===void 0?void 0:e.mode)!==null&&t!==void 0?t:yl.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){var e,t;return(t=(e=this.findController)===null||e===void 0?void 0:e.matchType)!==null&&t!==void 0?t:cg.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,i,n,s={}){var r;this._user=e,this._options=s,this.eventBufferer=new oM,this.onDidChangeFindOpenState=ye.None,this.disposables=new de,this._onWillRefilter=new W,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new W,this.treeDelegate=new KA(i);const a=new FP,l=new FP,d=this.disposables.add(new Iue(l.event)),c=new PM;this.renderers=n.map(m=>new db(m,()=>this.model,a.event,d,c,s));for(const m of this.renderers)this.disposables.add(m);let u;s.keyboardNavigationLabelProvider&&(u=new Eue(this,s.keyboardNavigationLabelProvider,s.filter),s={...s,filter:u},this.disposables.add(u)),this.focus=new Kx(()=>this.view.getFocusedElements()[0],s.identityProvider),this.selection=new Kx(()=>this.view.getSelectedElements()[0],s.identityProvider),this.anchor=new Kx(()=>this.view.getAnchorElement(),s.identityProvider),this.view=new Pue(e,t,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...kue(()=>this.model,s),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(e,this.view,s),a.input=this.model.onDidChangeCollapseState;const h=ye.forEach(this.model.onDidSplice,m=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(m),this.selection.onDidModelSplice(m)})},this.disposables);h(()=>null,null,this.disposables);const g=this.disposables.add(new W),f=this.disposables.add(new jr(0));if(this.disposables.add(ye.any(h,this.focus.onDidChange,this.selection.onDidChange)(()=>{f.trigger(()=>{const m=new Set;for(const v of this.focus.getNodes())m.add(v);for(const v of this.selection.getNodes())m.add(v);g.fire([...m.values()])})})),l.input=g.event,s.keyboardSupport!==!1){const m=ye.chain(this.view.onKeyDown,v=>v.filter(_=>!qc(_.target)).map(_=>new gi(_)));ye.chain(m,v=>v.filter(_=>_.keyCode===15))(this.onLeftArrow,this,this.disposables),ye.chain(m,v=>v.filter(_=>_.keyCode===17))(this.onRightArrow,this,this.disposables),ye.chain(m,v=>v.filter(_=>_.keyCode===10))(this.onSpace,this,this.disposables)}if((!((r=s.findWidgetEnabled)!==null&&r!==void 0)||r)&&s.keyboardNavigationLabelProvider&&s.contextViewProvider){const m=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new Nue(this,this.model,this.view,u,s.contextViewProvider,m),this.focusNavigationFilter=v=>this.findController.shouldAllowFocus(v),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=ye.None,this.onDidChangeFindMatchType=ye.None;s.enableStickyScroll&&(this.stickyScrollController=new YF(this,this.model,this.view,this.renderers,this.treeDelegate,s)),this.styleElement=mr(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===lb.Always)}updateOptions(e={}){var t;this._options={...this._options,...e};for(const i of this.renderers)i.updateOptions(e);this.view.updateOptions(this._options),(t=this.findController)===null||t===void 0||t.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===lb.Always)}get options(){return this._options}updateStickyScroll(e){var t;!this.stickyScrollController&&this._options.enableStickyScroll?this.stickyScrollController=new YF(this,this.model,this.view,this.renderers,this.treeDelegate,this._options):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.stickyScrollController.dispose(),this.stickyScrollController=void 0),(t=this.stickyScrollController)===null||t===void 0||t.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}domFocus(){this.view.domFocus()}layout(e,t){var i;this.view.layout(e,t),nu(t)&&((i=this.findController)===null||i===void 0||i.layout(t))}style(e){const t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),e.listBackground&&(i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${e.listBackground}; }`),i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${e.listBackground}; }`)),this.styleElement.textContent=i.join(` -`),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const i=e.map(s=>this.model.getNode(s));this.selection.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map(s=>this.model.getNode(s));this.focus.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setFocus(n,t,!0)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);if(i!==-1)if(!this.stickyScrollController)this.view.reveal(i,t);else{const n=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(i,t,n)}}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const r=this.model.getParentNodeLocation(n);if(!r)return;const a=this.model.getListIndex(r);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some(l=>l.visible))return;const[r]=this.view.getFocus(),a=r+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}dispose(){var e;jt(this.disposables),(e=this.stickyScrollController)===null||e===void 0||e.dispose(),this.view.dispose()}}class qA{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new Lue(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare(n,s){return i.sorter.compare(n.element,s.element)}}),this.identityProvider=i.identityProvider}setChildren(e,t=wt.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=wt.empty(),i){const n=new Set,s=new Set,r=l=>{var d;if(l.element===null)return;const c=l;if(n.add(c.element),this.nodes.set(c.element,c),this.identityProvider){const u=this.identityProvider.getId(c.element).toString();s.add(u),this.nodesByIdentity.set(u,c)}(d=i.onDidCreateNode)===null||d===void 0||d.call(i,c)},a=l=>{var d;if(l.element===null)return;const c=l;if(n.has(c.element)||this.nodes.delete(c.element),this.identityProvider){const u=this.identityProvider.getId(c.element).toString();s.has(u)||this.nodesByIdentity.delete(u)}(d=i.onDidDeleteNode)===null||d===void 0||d.call(i,c)};this.model.splice([...e,0],Number.MAX_VALUE,t,{...i,onDidCreateNode:r,onDidDeleteNode:a})}preserveCollapseState(e=wt.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),wt.map(e,t=>{let i=this.nodes.get(t.element);if(!i&&this.identityProvider){const r=this.identityProvider.getId(t.element).toString();i=this.nodesByIdentity.get(r)}if(!i){let r;return typeof t.collapsed>"u"?r=void 0:t.collapsed===Mo.Collapsed||t.collapsed===Mo.PreserveOrCollapsed?r=!0:t.collapsed===Mo.Expanded||t.collapsed===Mo.PreserveOrExpanded?r=!1:r=!!t.collapsed,{...t,children:this.preserveCollapseState(t.children),collapsed:r}}const n=typeof t.collapsible=="boolean"?t.collapsible:i.collapsible;let s;return typeof t.collapsed>"u"||t.collapsed===Mo.PreserveOrCollapsed||t.collapsed===Mo.PreserveOrExpanded?s=i.collapsed:t.collapsed===Mo.Collapsed?s=!0:t.collapsed===Mo.Expanded?s=!1:s=!!t.collapsed,{...t,collapsible:n,collapsed:s,children:this.preserveCollapseState(t.children)}})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new Oo(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new Oo(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new Oo(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(e===null)return[];const t=this.nodes.get(e);if(!t)throw new Oo(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function R1(o){const e=[o.element],t=o.incompressible||!1;return{element:{elements:e,incompressible:t},children:wt.map(wt.from(o.children),R1),collapsible:o.collapsible,collapsed:o.collapsed}}function P1(o){const e=[o.element],t=o.incompressible||!1;let i,n;for(;[n,i]=wt.consume(wt.from(o.children),2),!(n.length!==1||n[0].incompressible);)o=n[0],e.push(o.element);return{element:{elements:e,incompressible:t},children:wt.map(wt.concat(n,i),P1),collapsible:o.collapsible,collapsed:o.collapsed}}function uN(o,e=0){let t;return euN(i,0)),e===0&&o.element.incompressible?{element:o.element.elements[e],children:t,incompressible:!0,collapsible:o.collapsible,collapsed:o.collapsed}:{element:o.element.elements[e],children:t,collapsible:o.collapsible,collapsed:o.collapsed}}function QF(o){return uN(o,0)}function R6(o,e,t){return o.element===e?{...o,children:t}:{...o,children:wt.map(wt.from(o.children),i=>R6(i,e,t))}}const Oue=o=>({getId(e){return e.elements.map(t=>o.getId(t).toString()).join("\0")}});class Fue{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new qA(e,t,i),this.enabled=typeof i.compressionEnabled>"u"?!0:i.compressionEnabled,this.identityProvider=i.identityProvider}setChildren(e,t=wt.empty(),i){const n=i.diffIdentityProvider&&Oue(i.diffIdentityProvider);if(e===null){const f=wt.map(t,this.enabled?P1:R1);this._setChildren(null,f,{diffIdentityProvider:n,diffDepth:1/0});return}const s=this.nodes.get(e);if(!s)throw new Oo(this.user,"Unknown compressed tree node");const r=this.model.getNode(s),a=this.model.getParentNodeLocation(s),l=this.model.getNode(a),d=QF(r),c=R6(d,e,t),u=(this.enabled?P1:R1)(c),h=i.diffIdentityProvider?(f,m)=>i.diffIdentityProvider.getId(f)===i.diffIdentityProvider.getId(m):void 0;if(Bi(u.element.elements,r.element.elements,h)){this._setChildren(s,u.children||wt.empty(),{diffIdentityProvider:n,diffDepth:1});return}const g=l.children.map(f=>f===r?u:f);this._setChildren(l.element,g,{diffIdentityProvider:n,diffDepth:r.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const i=this.model.getNode().children,n=wt.map(i,QF),s=wt.map(n,e?P1:R1);this._setChildren(null,s,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set,s=a=>{for(const l of a.element.elements)n.add(l),this.nodes.set(l,a.element)},r=a=>{for(const l of a.element.elements)n.has(l)||this.nodes.delete(l)};this.model.setChildren(e,t,{...i,onDidCreateNode:s,onDidDeleteNode:r})}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(typeof e>"u")return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return t===null?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return i===null?null:i.elements[i.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(e===null)return null;const t=this.nodes.get(e);if(!t)throw new Oo(this.user,`Tree element not found: ${e}`);return t}}const Bue=o=>o[o.length-1];class GA{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new GA(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}}function Wue(o,e){return{splice(t,i,n){e.splice(t,i,n.map(s=>o.map(s)))},updateElementHeight(t,i){e.updateElementHeight(t,i)}}}function Vue(o,e){return{...e,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(o(t))}},sorter:e.sorter&&{compare(t,i){return e.sorter.compare(t.elements[0],i.elements[0])}},filter:e.filter&&{filter(t,i){return e.filter.filter(o(t),i)}}}}class Hue{get onDidSplice(){return ye.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(i=>this.nodeMapper.map(i)),deletedNodes:t.map(i=>this.nodeMapper.map(i))}))}get onDidChangeCollapseState(){return ye.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return ye.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||Bue;const n=s=>this.elementMapper(s.elements);this.nodeMapper=new UA(s=>new GA(n,s)),this.model=new Fue(e,Wue(this.nodeMapper,t),Vue(n,i))}setChildren(e,t=wt.empty(),i={}){this.model.setChildren(e,t,i)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return t===null||typeof t>"u"?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var zue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};class ZA extends A6{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,i,n,s={}){super(e,t,i,n,s),this.user=e}setChildren(e,t=wt.empty(),i){this.model.setChildren(e,t,i)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new qA(e,t,i)}}class P6{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){const s=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);s.element.elements.length===1?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=s,this.renderer.renderCompressedElements(s,t,i.data,n))}disposeElement(e,t,i,n){var s,r,a,l;i.compressedTreeNode?(r=(s=this.renderer).disposeCompressedElements)===null||r===void 0||r.call(s,i.compressedTreeNode,t,i.data,n):(l=(a=this.renderer).disposeElement)===null||l===void 0||l.call(a,e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return this.renderer.renderTwistie?this.renderer.renderTwistie(e,t):!1}}zue([nn],P6.prototype,"compressedTreeNodeProvider",null);function $ue(o,e){return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(t){let i;try{i=o().getCompressedTreeNode(t)}catch{return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t)}return i.element.elements.length===1?e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t):e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.element.elements)}}}}class O6 extends ZA{constructor(e,t,i,n,s={}){const r=()=>this,a=n.map(l=>new P6(r,l));super(e,t,i,a,$ue(r,s))}setChildren(e,t=wt.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new Hue(e,t,i)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled<"u"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}function qx(o){return{...o,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function hN(o,e){return e.parent?e.parent===o?!0:hN(o,e.parent):!1}function Uue(o,e){return o===e||hN(o,e)||hN(e,o)}class YA{get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new YA(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class jue{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...Ue.asClassNameArray(ve.treeItemLoading)),!0):(t.classList.remove(...Ue.asClassNameArray(ve.treeItemLoading)),!1)}disposeElement(e,t,i,n){var s,r;(r=(s=this.renderer).disposeElement)===null||r===void 0||r.call(s,this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function JF(o){return{browserEvent:o.browserEvent,elements:o.elements.map(e=>e.element)}}function e5(o){return{browserEvent:o.browserEvent,element:o.element&&o.element.element,target:o.target}}class Kue extends m0{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}}function Gx(o){return o instanceof m0?new Kue(o):o}class que{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(i=>i.element),t)}onDragStart(e,t){var i,n;(n=(i=this.dnd).onDragStart)===null||n===void 0||n.call(i,Gx(e),t)}onDragOver(e,t,i,n,s=!0){return this.dnd.onDragOver(Gx(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(Gx(e),t&&t.element,i,n)}onDragEnd(e){var t,i;(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}dispose(){this.dnd.dispose()}}function F6(o){return o&&{...o,collapseByDefault:!0,identityProvider:o.identityProvider&&{getId(e){return o.identityProvider.getId(e.element)}},dnd:o.dnd&&new que(o.dnd),multipleSelectionController:o.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return o.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element})},isSelectionRangeChangeEvent(e){return o.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})}},accessibilityProvider:o.accessibilityProvider&&{...o.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:o.accessibilityProvider.getRole?e=>o.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:o.accessibilityProvider.isChecked?e=>{var t;return!!(!((t=o.accessibilityProvider)===null||t===void 0)&&t.isChecked(e.element))}:void 0,getAriaLabel(e){return o.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return o.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:o.accessibilityProvider.getWidgetRole?()=>o.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:o.accessibilityProvider.getAriaLevel&&(e=>o.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:o.accessibilityProvider.getActiveDescendantId&&(e=>o.accessibilityProvider.getActiveDescendantId(e.element))},filter:o.filter&&{filter(e,t){return o.filter.filter(e.element,t)}},keyboardNavigationLabelProvider:o.keyboardNavigationLabelProvider&&{...o.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(e){return o.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof o.expandOnlyOnTwistieClick>"u"?void 0:typeof o.expandOnlyOnTwistieClick!="function"?o.expandOnlyOnTwistieClick:e=>o.expandOnlyOnTwistieClick(e.element),defaultFindVisibility:e=>e.hasChildren&&e.stale?1:typeof o.defaultFindVisibility=="number"?o.defaultFindVisibility:typeof o.defaultFindVisibility>"u"?2:o.defaultFindVisibility(e.element)}}function gN(o,e){e(o),o.children.forEach(t=>gN(t,e))}class B6{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return ye.map(this.tree.onDidChangeFocus,JF)}get onDidChangeSelection(){return ye.map(this.tree.onDidChangeSelection,JF)}get onMouseDblClick(){return ye.map(this.tree.onMouseDblClick,e5)}get onPointer(){return ye.map(this.tree.onPointer,e5)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,i,n,s,r={}){this.user=e,this.dataSource=s,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new W,this._onDidChangeNodeSlowState=new W,this.nodeMapper=new UA(a=>new YA(a)),this.disposables=new de,this.identityProvider=r.identityProvider,this.autoExpandSingleChildren=typeof r.autoExpandSingleChildren>"u"?!1:r.autoExpandSingleChildren,this.sorter=r.sorter,this.getDefaultCollapseState=a=>r.collapseByDefault?r.collapseByDefault(a)?Mo.PreserveOrCollapsed:Mo.PreserveOrExpanded:void 0,this.tree=this.createTree(e,t,i,n,r),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.root=qx({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,t,i,n,s){const r=new KA(i),a=n.map(d=>new jue(d,this.nodeMapper,this._onDidChangeNodeSlowState.event)),l=F6(s)||{};return new ZA(e,t,r,a,l)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,t){this.refreshPromises.forEach(n=>n.cancel()),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};await this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&typeof t.scrollTop=="number"&&(this.scrollTop=t.scrollTop)}async _updateChildren(e=this.root.element,t=!0,i=!1,n,s){if(typeof this.root.element>"u")throw new Oo(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await ye.toPromise(this._onDidRender.event));const r=this.getDataNode(e);if(await this.refreshAndRenderNode(r,t,n,s),i)try{this.tree.rerender(r)}catch{}}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}async expand(e,t=!1){if(typeof this.root.element>"u")throw new Oo(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await ye.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i)||(i.refreshPromise&&(await this.root.refreshPromise,await ye.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i)))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(await this.root.refreshPromise,await ye.toPromise(this._onDidRender.event)),n}setSelection(e,t){const i=e.map(n=>this.getDataNode(n));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map(t=>t.element)}setFocus(e,t){const i=e.map(n=>this.getDataNode(n));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map(t=>t.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new Oo(this.user,`Data tree node not found: ${e}`);return t}async refreshAndRenderNode(e,t,i,n){await this.refreshNode(e,t,i),this.render(e,i,n)}async refreshNode(e,t,i){let n;if(this.subTreeRefreshPromises.forEach((s,r)=>{!n&&Uue(r,e)&&(n=s.then(()=>this.refreshNode(e,t,i)))}),n)return n;if(e!==this.root&&this.tree.getNode(e).collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0;return}return this.doRefreshSubTree(e,t,i)}async doRefreshSubTree(e,t,i){let n;e.refreshPromise=new Promise(s=>n=s),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{const s=await this.doRefreshNode(e,t,i);e.stale=!1,await FI.settled(s.map(r=>this.doRefreshSubTree(r,t,i)))}finally{n()}}async doRefreshNode(e,t,i){e.hasChildren=!!this.dataSource.hasChildren(e.element);let n;if(!e.hasChildren)n=Promise.resolve(wt.empty());else{const s=this.doGetChildren(e);if(TP(s))n=Promise.resolve(s);else{const r=au(800);r.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},a=>null),n=s.finally(()=>r.cancel())}}try{const s=await n;return this.setChildren(e,s,t,i)}catch(s){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),Fa(s))return[];throw s}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const i=this.dataSource.getChildren(e.element);return TP(i)?this.processChildren(i):(t=_n(async()=>this.processChildren(await i)),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){e.element!==null&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(nt))}setChildren(e,t,i,n){const s=[...t];if(e.children.length===0&&s.length===0)return[];const r=new Map,a=new Map;for(const c of e.children)r.set(c.element,c),this.identityProvider&&a.set(c.id,{node:c,collapsed:this.tree.hasElement(c)&&this.tree.isCollapsed(c)});const l=[],d=s.map(c=>{const u=!!this.dataSource.hasChildren(c);if(!this.identityProvider){const m=qx({element:c,parent:e,hasChildren:u,defaultCollapseState:this.getDefaultCollapseState(c)});return u&&m.defaultCollapseState===Mo.PreserveOrExpanded&&l.push(m),m}const h=this.identityProvider.getId(c).toString(),g=a.get(h);if(g){const m=g.node;return r.delete(m.element),this.nodes.delete(m.element),this.nodes.set(c,m),m.element=c,m.hasChildren=u,i?g.collapsed?(m.children.forEach(v=>gN(v,_=>this.nodes.delete(_.element))),m.children.splice(0,m.children.length),m.stale=!0):l.push(m):u&&!g.collapsed&&l.push(m),m}const f=qx({element:c,parent:e,id:h,hasChildren:u,defaultCollapseState:this.getDefaultCollapseState(c)});return n&&n.viewState.focus&&n.viewState.focus.indexOf(h)>-1&&n.focus.push(f),n&&n.viewState.selection&&n.viewState.selection.indexOf(h)>-1&&n.selection.push(f),(n&&n.viewState.expanded&&n.viewState.expanded.indexOf(h)>-1||u&&f.defaultCollapseState===Mo.PreserveOrExpanded)&&l.push(f),f});for(const c of r.values())gN(c,u=>this.nodes.delete(u.element));for(const c of d)this.nodes.set(c.element,c);return e.children.splice(0,e.children.length,...d),e!==this.root&&this.autoExpandSingleChildren&&d.length===1&&l.length===0&&(d[0].forceExpanded=!0,l.push(d[0])),l}render(e,t,i){const n=e.children.map(r=>this.asTreeElement(r,t)),s=i&&{...i,diffIdentityProvider:i.diffIdentityProvider&&{getId(r){return i.diffIdentityProvider.getId(r.element)}}};this.tree.setChildren(e===this.root?null:e,n,s),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?i=!1:e.forceExpanded?(i=!1,e.forceExpanded=!1):i=e.defaultCollapseState,{element:e,children:e.hasChildren?wt.map(e.children,n=>this.asTreeElement(n,t)):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}}class XA{get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new XA(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class Gue{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...Ue.asClassNameArray(ve.treeItemLoading)),!0):(t.classList.remove(...Ue.asClassNameArray(ve.treeItemLoading)),!1)}disposeElement(e,t,i,n){var s,r;(r=(s=this.renderer).disposeElement)===null||r===void 0||r.call(s,this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){var s,r;(r=(s=this.renderer).disposeCompressedElements)===null||r===void 0||r.call(s,this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=jt(this.disposables)}}function Zue(o){const e=o&&F6(o);return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(t){return o.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(i=>i.element))}}}}class Yue extends B6{constructor(e,t,i,n,s,r,a={}){super(e,t,i,s,r,a),this.compressionDelegate=n,this.compressibleNodeMapper=new UA(l=>new XA(l)),this.filter=a.filter}createTree(e,t,i,n,s){const r=new KA(i),a=n.map(d=>new Gue(d,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),l=Zue(s)||{};return new O6(e,t,r,a,l)}asTreeElement(e,t){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,t)}}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const i=h=>this.identityProvider.getId(h).toString(),n=h=>{const g=new Set;for(const f of h){const m=this.tree.getCompressedTreeNode(f===this.root?null:f);if(m.element)for(const v of m.element.elements)g.add(i(v.element))}return g},s=n(this.tree.getSelection()),r=n(this.tree.getFocus());super.render(e,t);const a=this.getSelection();let l=!1;const d=this.getFocus();let c=!1;const u=h=>{const g=h.element;if(g)for(let f=0;f{const i=this.filter.filter(t,1),n=Xue(i);if(n===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return n===1})),super.processChildren(e)}}function Xue(o){return typeof o=="boolean"?o?1:0:jA(o)?ab(o.visibility):ab(o)}class Que extends A6{constructor(e,t,i,n,s,r={}){super(e,t,i,n,r),this.user=e,this.dataSource=s,this.identityProvider=r.identityProvider}createModel(e,t,i){return new qA(e,t,i)}}new De("isMac",It,p("isMac","Whether the operating system is macOS"));new De("isLinux",ws,p("isLinux","Whether the operating system is Linux"));const aL=new De("isWindows",is,p("isWindows","Whether the operating system is Windows")),W6=new De("isWeb",Tu,p("isWeb","Whether the platform is a web browser"));new De("isMacNative",It&&!Tu,p("isMacNative","Whether the operating system is macOS on a non-browser platform"));new De("isIOS",Ea,p("isIOS","Whether the operating system is iOS"));new De("isMobile",mG,p("isMobile","Whether the platform is a mobile web browser"));new De("isDevelopment",!1,!0);new De("productQualityType","",p("productQualityType","Quality type of VS Code"));const V6="inputFocus";new De(V6,!1,p("inputFocus","Whether keyboard focus is inside an input box"));let xo;const Zx=globalThis.vscode;if(typeof Zx<"u"&&typeof Zx.context<"u"){const o=Zx.context.configuration();if(o)xo=o.product;else throw new Error("Sandbox: unable to resolve product configuration from preload script.")}else if(globalThis._VSCODE_PRODUCT_JSON&&globalThis._VSCODE_PACKAGE_JSON){if(xo=globalThis._VSCODE_PRODUCT_JSON,sw.VSCODE_DEV&&Object.assign(xo,{nameShort:`${xo.nameShort} Dev`,nameLong:`${xo.nameLong} Dev`,dataFolderName:`${xo.dataFolderName}-dev`,serverDataFolderName:xo.serverDataFolderName?`${xo.serverDataFolderName}-dev`:void 0}),!xo.version){const o=globalThis._VSCODE_PACKAGE_JSON;Object.assign(xo,{version:o.version})}}else xo={},Object.keys(xo).length===0&&Object.assign(xo,{version:"1.82.0-dev",nameShort:"Code - OSS Dev",nameLong:"Code - OSS Dev",applicationName:"code-oss",dataFolderName:".vscode-oss",urlProtocol:"code-oss",reportIssueUrl:"https://github.com/microsoft/vscode/issues/new",licenseName:"MIT",licenseUrl:"https://github.com/microsoft/vscode/blob/main/LICENSE.txt",serverLicenseUrl:"https://github.com/microsoft/vscode/blob/main/LICENSE.txt"});const t5=xo;var Yd=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},di=function(o,e){return function(t,i){e(t,i,o)}};const Lr=bt("listService");class Jue{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new de,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){var t,i;e!==this._lastFocusedWidget&&((t=this._lastFocusedWidget)===null||t===void 0||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,(i=this._lastFocusedWidget)===null||i===void 0||i.getHTMLElement().classList.add("last-focused"))}register(e,t){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new w6(mr(),"").style(Fg)),this.lists.some(n=>n.widget===e))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),Dy(e.getHTMLElement())&&this.setLastFocusedList(e),Hr(e.onDidFocus(()=>this.setLastFocusedList(e)),je(()=>this.lists.splice(this.lists.indexOf(i),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(n=>n!==i),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}}const cb=new De("listScrollAtBoundary","none");ae.or(cb.isEqualTo("top"),cb.isEqualTo("both"));ae.or(cb.isEqualTo("bottom"),cb.isEqualTo("both"));const H6=new De("listFocus",!0),lL=new De("listSupportsMultiselect",!0),z6=ae.and(H6,ae.not(V6)),QA=new De("listHasSelectionOrFocus",!1),JA=new De("listDoubleSelection",!1),eR=new De("listMultiSelection",!1),dL=new De("listSelectionNavigation",!1),ehe=new De("listSupportsFind",!0),tR=new De("treeElementCanCollapse",!1),the=new De("treeElementHasParent",!1),iR=new De("treeElementCanExpand",!1),ihe=new De("treeElementHasChild",!1),nhe=new De("treeFindOpen",!1),$6="listTypeNavigationMode",U6="listAutomaticKeyboardNavigation";function cL(o,e){const t=o.createScoped(e.getHTMLElement());return H6.bindTo(t),t}function uL(o,e){const t=cb.bindTo(o),i=()=>{const n=e.scrollTop===0,s=e.scrollHeight-e.renderHeight-e.scrollTop<1;n&&s?t.set("both"):n?t.set("top"):s?t.set("bottom"):t.set("none")};return i(),e.onDidScroll(i)}const Bg="workbench.list.multiSelectModifier",O1="workbench.list.openMode",fr="workbench.list.horizontalScrolling",nR="workbench.list.defaultFindMode",sR="workbench.list.typeNavigationMode",uS="workbench.list.keyboardNavigation",Ma="workbench.list.scrollByPage",oR="workbench.list.defaultFindMatchType",ub="workbench.tree.indent",hS="workbench.tree.renderIndentGuides",Aa="workbench.list.smoothScrolling",Vl="workbench.list.mouseWheelScrollSensitivity",Hl="workbench.list.fastScrollSensitivity",gS="workbench.tree.expandMode",fS="workbench.tree.enableStickyScroll",pS="workbench.tree.stickyScrollMaxItemCount";function zl(o){return o.getValue(Bg)==="alt"}class she extends q{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=zl(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(Bg)&&(this.useAltAsMultipleSelectionModifier=zl(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:v6(e)}isSelectionRangeChangeEvent(e){return b6(e)}}function hL(o,e){var t;const i=o.get(Dt),n=o.get(Xt),s=new de;return[{...e,keyboardNavigationDelegate:{mightProducePrintableCharacter(a){return n.mightProducePrintableCharacter(a)}},smoothScrolling:!!i.getValue(Aa),mouseWheelScrollSensitivity:i.getValue(Vl),fastScrollSensitivity:i.getValue(Hl),multipleSelectionController:(t=e.multipleSelectionController)!==null&&t!==void 0?t:s.add(new she(i)),keyboardNavigationEventFilter:ahe(n),scrollByPage:!!i.getValue(Ma)},s]}let fN=class extends Yr{constructor(e,t,i,n,s,r,a,l,d){const c=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:!!l.getValue(fr),[u,h]=d.invokeFunction(hL,s);super(e,t,i,n,{keyboardSupport:!1,...u,horizontalScrolling:c}),this.disposables.add(h),this.contextKeyService=cL(r,this),this.disposables.add(uL(this.contextKeyService,this)),this.listSupportsMultiSelect=lL.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),dL.bindTo(this.contextKeyService).set(!!s.selectionNavigation),this.listHasSelectionOrFocus=QA.bindTo(this.contextKeyService),this.listDoubleSelection=JA.bindTo(this.contextKeyService),this.listMultiSelection=eR.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=zl(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const f=this.getSelection(),m=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(f.length>0||m.length>0),this.listMultiSelection.set(f.length>1),this.listDoubleSelection.set(f.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const f=this.getSelection(),m=this.getFocus();this.listHasSelectionOrFocus.set(f.length>0||m.length>0)})),this.disposables.add(l.onDidChangeConfiguration(f=>{f.affectsConfiguration(Bg)&&(this._useAltAsMultipleSelectionModifier=zl(l));let m={};if(f.affectsConfiguration(fr)&&this.horizontalScrolling===void 0){const v=!!l.getValue(fr);m={...m,horizontalScrolling:v}}if(f.affectsConfiguration(Ma)){const v=!!l.getValue(Ma);m={...m,scrollByPage:v}}if(f.affectsConfiguration(Aa)){const v=!!l.getValue(Aa);m={...m,smoothScrolling:v}}if(f.affectsConfiguration(Vl)){const v=l.getValue(Vl);m={...m,mouseWheelScrollSensitivity:v}}if(f.affectsConfiguration(Hl)){const v=l.getValue(Hl);m={...m,fastScrollSensitivity:v}}Object.keys(m).length>0&&this.updateOptions(m)})),this.navigator=new j6(this,{configurationService:l,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?Sm(e):Fg)}};fN=Yd([di(5,Xe),di(6,Lr),di(7,Dt),di(8,qe)],fN);let i5=class extends rue{constructor(e,t,i,n,s,r,a,l,d){const c=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:!!l.getValue(fr),[u,h]=d.invokeFunction(hL,s);super(e,t,i,n,{keyboardSupport:!1,...u,horizontalScrolling:c}),this.disposables=new de,this.disposables.add(h),this.contextKeyService=cL(r,this),this.disposables.add(uL(this.contextKeyService,this.widget)),this.horizontalScrolling=s.horizontalScrolling,this.listSupportsMultiSelect=lL.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),dL.bindTo(this.contextKeyService).set(!!s.selectionNavigation),this._useAltAsMultipleSelectionModifier=zl(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(l.onDidChangeConfiguration(f=>{f.affectsConfiguration(Bg)&&(this._useAltAsMultipleSelectionModifier=zl(l));let m={};if(f.affectsConfiguration(fr)&&this.horizontalScrolling===void 0){const v=!!l.getValue(fr);m={...m,horizontalScrolling:v}}if(f.affectsConfiguration(Ma)){const v=!!l.getValue(Ma);m={...m,scrollByPage:v}}if(f.affectsConfiguration(Aa)){const v=!!l.getValue(Aa);m={...m,smoothScrolling:v}}if(f.affectsConfiguration(Vl)){const v=l.getValue(Vl);m={...m,mouseWheelScrollSensitivity:v}}if(f.affectsConfiguration(Hl)){const v=l.getValue(Hl);m={...m,fastScrollSensitivity:v}}Object.keys(m).length>0&&this.updateOptions(m)})),this.navigator=new j6(this,{configurationService:l,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?Sm(e):Fg)}dispose(){this.disposables.dispose(),super.dispose()}};i5=Yd([di(5,Xe),di(6,Lr),di(7,Dt),di(8,qe)],i5);let n5=class extends rL{constructor(e,t,i,n,s,r,a,l,d,c){const u=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!d.getValue(fr),[h,g]=c.invokeFunction(hL,r);super(e,t,i,n,s,{keyboardSupport:!1,...h,horizontalScrolling:u}),this.disposables.add(g),this.contextKeyService=cL(a,this),this.disposables.add(uL(this.contextKeyService,this)),this.listSupportsMultiSelect=lL.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),dL.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this.listHasSelectionOrFocus=QA.bindTo(this.contextKeyService),this.listDoubleSelection=JA.bindTo(this.contextKeyService),this.listMultiSelection=eR.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=zl(d),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),this.updateStyles(r.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const m=this.getSelection(),v=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(m.length>0||v.length>0),this.listMultiSelection.set(m.length>1),this.listDoubleSelection.set(m.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const m=this.getSelection(),v=this.getFocus();this.listHasSelectionOrFocus.set(m.length>0||v.length>0)})),this.disposables.add(d.onDidChangeConfiguration(m=>{m.affectsConfiguration(Bg)&&(this._useAltAsMultipleSelectionModifier=zl(d));let v={};if(m.affectsConfiguration(fr)&&this.horizontalScrolling===void 0){const _=!!d.getValue(fr);v={...v,horizontalScrolling:_}}if(m.affectsConfiguration(Ma)){const _=!!d.getValue(Ma);v={...v,scrollByPage:_}}if(m.affectsConfiguration(Aa)){const _=!!d.getValue(Aa);v={...v,smoothScrolling:_}}if(m.affectsConfiguration(Vl)){const _=d.getValue(Vl);v={...v,mouseWheelScrollSensitivity:_}}if(m.affectsConfiguration(Hl)){const _=d.getValue(Hl);v={...v,fastScrollSensitivity:_}}Object.keys(v).length>0&&this.updateOptions(v)})),this.navigator=new ohe(this,{configurationService:d,...r}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?Sm(e):Fg)}dispose(){this.disposables.dispose(),super.dispose()}};n5=Yd([di(6,Xe),di(7,Lr),di(8,Dt),di(9,qe)],n5);class rR extends q{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new W),this.onDidOpen=this._onDidOpen.event,this._register(ye.filter(this.widget.onDidChangeSelection,n=>G7(n.browserEvent))(n=>this.onSelectionFromKeyboard(n))),this._register(this.widget.onPointer(n=>this.onPointer(n.element,n.browserEvent))),this._register(this.widget.onMouseDblClick(n=>this.onMouseDblClick(n.element,n.browserEvent))),typeof(t==null?void 0:t.openOnSingleClick)!="boolean"&&(t!=null&&t.configurationService)?(this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(O1))!=="doubleClick",this._register(t==null?void 0:t.configurationService.onDidChangeConfiguration(n=>{n.affectsConfiguration(O1)&&(this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(O1))!=="doubleClick")}))):this.openOnSingleClick=(i=t==null?void 0:t.openOnSingleClick)!==null&&i!==void 0?i:!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;const t=e.browserEvent,i=typeof t.preserveFocus=="boolean"?t.preserveFocus:!0,n=typeof t.pinned=="boolean"?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick||t.detail===2)return;const n=t.button===1,s=!0,r=n,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,r,a,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;const s=!1,r=!0,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,r,a,t)}_open(e,t,i,n,s){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:s})}}class j6 extends rR{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class ohe extends rR{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class rhe extends rR{constructor(e,t){super(e,t)}getSelectedElement(){var e;return(e=this.widget.getSelection()[0])!==null&&e!==void 0?e:void 0}}function ahe(o){let e=!1;return t=>{if(t.toKeyCodeChord().isModifierKey())return!1;if(e)return e=!1,!1;const i=o.softDispatch(t,t.target);return i.kind===1?(e=!0,!1):(e=!1,i.kind===0)}}let s5=class extends ZA{constructor(e,t,i,n,s,r,a,l,d){const{options:c,getTypeNavigationMode:u,disposable:h}=r.invokeFunction(b0,s);super(e,t,i,n,c),this.disposables.add(h),this.internals=new ug(this,s,u,s.overrideStyles,a,l,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};s5=Yd([di(5,qe),di(6,Xe),di(7,Lr),di(8,Dt)],s5);let o5=class extends O6{constructor(e,t,i,n,s,r,a,l,d){const{options:c,getTypeNavigationMode:u,disposable:h}=r.invokeFunction(b0,s);super(e,t,i,n,c),this.disposables.add(h),this.internals=new ug(this,s,u,s.overrideStyles,a,l,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};o5=Yd([di(5,qe),di(6,Xe),di(7,Lr),di(8,Dt)],o5);let r5=class extends Que{constructor(e,t,i,n,s,r,a,l,d,c){const{options:u,getTypeNavigationMode:h,disposable:g}=a.invokeFunction(b0,r);super(e,t,i,n,s,u),this.disposables.add(g),this.internals=new ug(this,r,h,r.overrideStyles,l,d,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles!==void 0&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};r5=Yd([di(6,qe),di(7,Xe),di(8,Lr),di(9,Dt)],r5);let pN=class extends B6{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,i,n,s,r,a,l,d,c){const{options:u,getTypeNavigationMode:h,disposable:g}=a.invokeFunction(b0,r);super(e,t,i,n,s,u),this.disposables.add(g),this.internals=new ug(this,r,h,r.overrideStyles,l,d,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};pN=Yd([di(6,qe),di(7,Xe),di(8,Lr),di(9,Dt)],pN);let a5=class extends Yue{constructor(e,t,i,n,s,r,a,l,d,c,u){const{options:h,getTypeNavigationMode:g,disposable:f}=l.invokeFunction(b0,a);super(e,t,i,n,s,r,h),this.disposables.add(f),this.internals=new ug(this,a,g,a.overrideStyles,d,c,u),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};a5=Yd([di(7,qe),di(8,Xe),di(9,Lr),di(10,Dt)],a5);function K6(o){const e=o.getValue(nR);if(e==="highlight")return yl.Highlight;if(e==="filter")return yl.Filter;const t=o.getValue(uS);if(t==="simple"||t==="highlight")return yl.Highlight;if(t==="filter")return yl.Filter}function q6(o){const e=o.getValue(oR);if(e==="fuzzy")return cg.Fuzzy;if(e==="contiguous")return cg.Contiguous}function b0(o,e){var t;const i=o.get(Dt),n=o.get(Gd),s=o.get(Xe),r=o.get(qe),a=()=>{const g=s.getContextKeyValue($6);if(g==="automatic")return cl.Automatic;if(g==="trigger"||s.getContextKeyValue(U6)===!1)return cl.Trigger;const m=i.getValue(sR);if(m==="automatic")return cl.Automatic;if(m==="trigger")return cl.Trigger},l=e.horizontalScrolling!==void 0?e.horizontalScrolling:!!i.getValue(fr),[d,c]=r.invokeFunction(hL,e),u=e.paddingBottom,h=e.renderIndentGuides!==void 0?e.renderIndentGuides:i.getValue(hS);return{getTypeNavigationMode:a,disposable:c,options:{keyboardSupport:!1,...d,indent:typeof i.getValue(ub)=="number"?i.getValue(ub):void 0,renderIndentGuides:h,smoothScrolling:!!i.getValue(Aa),defaultFindMode:K6(i),defaultFindMatchType:q6(i),horizontalScrolling:l,scrollByPage:!!i.getValue(Ma),paddingBottom:u,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(t=e.expandOnlyOnTwistieClick)!==null&&t!==void 0?t:i.getValue(gS)==="doubleClick",contextViewProvider:n,findWidgetStyles:Wce,enableStickyScroll:!!i.getValue(fS),stickyScrollMaxItemCount:Number(i.getValue(pS))}}}let ug=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,i,n,s,r,a){var l;this.tree=e,this.disposables=[],this.contextKeyService=cL(s,e),this.disposables.push(uL(this.contextKeyService,e)),this.listSupportsMultiSelect=lL.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(t.multipleSelectionSupport!==!1),dL.bindTo(this.contextKeyService).set(!!t.selectionNavigation),this.listSupportFindWidget=ehe.bindTo(this.contextKeyService),this.listSupportFindWidget.set((l=t.findWidgetEnabled)!==null&&l!==void 0?l:!0),this.hasSelectionOrFocus=QA.bindTo(this.contextKeyService),this.hasDoubleSelection=JA.bindTo(this.contextKeyService),this.hasMultiSelection=eR.bindTo(this.contextKeyService),this.treeElementCanCollapse=tR.bindTo(this.contextKeyService),this.treeElementHasParent=the.bindTo(this.contextKeyService),this.treeElementCanExpand=iR.bindTo(this.contextKeyService),this.treeElementHasChild=ihe.bindTo(this.contextKeyService),this.treeFindOpen=nhe.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=zl(a),this.updateStyleOverrides(n);const c=()=>{const h=e.getFocus()[0];if(!h)return;const g=e.getNode(h);this.treeElementCanCollapse.set(g.collapsible&&!g.collapsed),this.treeElementHasParent.set(!!e.getParentElement(h)),this.treeElementCanExpand.set(g.collapsible&&g.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(h))},u=new Set;u.add($6),u.add(U6),this.disposables.push(this.contextKeyService,r.register(e),e.onDidChangeSelection(()=>{const h=e.getSelection(),g=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(h.length>0||g.length>0),this.hasMultiSelection.set(h.length>1),this.hasDoubleSelection.set(h.length===2)})}),e.onDidChangeFocus(()=>{const h=e.getSelection(),g=e.getFocus();this.hasSelectionOrFocus.set(h.length>0||g.length>0),c()}),e.onDidChangeCollapseState(c),e.onDidChangeModel(c),e.onDidChangeFindOpenState(h=>this.treeFindOpen.set(h)),a.onDidChangeConfiguration(h=>{let g={};if(h.affectsConfiguration(Bg)&&(this._useAltAsMultipleSelectionModifier=zl(a)),h.affectsConfiguration(ub)){const f=a.getValue(ub);g={...g,indent:f}}if(h.affectsConfiguration(hS)&&t.renderIndentGuides===void 0){const f=a.getValue(hS);g={...g,renderIndentGuides:f}}if(h.affectsConfiguration(Aa)){const f=!!a.getValue(Aa);g={...g,smoothScrolling:f}}if(h.affectsConfiguration(nR)||h.affectsConfiguration(uS)){const f=K6(a);g={...g,defaultFindMode:f}}if(h.affectsConfiguration(sR)||h.affectsConfiguration(uS)){const f=i();g={...g,typeNavigationMode:f}}if(h.affectsConfiguration(oR)){const f=q6(a);g={...g,defaultFindMatchType:f}}if(h.affectsConfiguration(fr)&&t.horizontalScrolling===void 0){const f=!!a.getValue(fr);g={...g,horizontalScrolling:f}}if(h.affectsConfiguration(Ma)){const f=!!a.getValue(Ma);g={...g,scrollByPage:f}}if(h.affectsConfiguration(gS)&&t.expandOnlyOnTwistieClick===void 0&&(g={...g,expandOnlyOnTwistieClick:a.getValue(gS)==="doubleClick"}),h.affectsConfiguration(fS)){const f=a.getValue(fS);g={...g,enableStickyScroll:f}}if(h.affectsConfiguration(pS)){const f=Math.max(1,a.getValue(pS));g={...g,stickyScrollMaxItemCount:f}}if(h.affectsConfiguration(Vl)){const f=a.getValue(Vl);g={...g,mouseWheelScrollSensitivity:f}}if(h.affectsConfiguration(Hl)){const f=a.getValue(Hl);g={...g,fastScrollSensitivity:f}}Object.keys(g).length>0&&e.updateOptions(g)}),this.contextKeyService.onDidChangeContext(h=>{h.affectsSome(u)&&e.updateOptions({typeNavigationMode:i()})})),this.navigator=new rhe(e,{configurationService:a,...t}),this.disposables.push(this.navigator)}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?Sm(e):Fg)}dispose(){this.disposables=jt(this.disposables)}};ug=Yd([di(4,Xe),di(5,Lr),di(6,Dt)],ug);const lhe=xi.as(Va.Configuration);lhe.registerConfiguration({id:"workbench",order:7,title:p("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[Bg]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[p("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),p("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:p({},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[O1]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:p({},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[fr]:{type:"boolean",default:!1,description:p("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[Ma]:{type:"boolean",default:!1,description:p("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[ub]:{type:"number",default:8,minimum:4,maximum:40,description:p("tree indent setting","Controls tree indentation in pixels.")},[hS]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:p("render tree indent guides","Controls whether the tree should render indent guides.")},[Aa]:{type:"boolean",default:!1,description:p("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[Vl]:{type:"number",default:1,markdownDescription:p("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[Hl]:{type:"number",default:5,markdownDescription:p("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[nR]:{type:"string",enum:["highlight","filter"],enumDescriptions:[p("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),p("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:p("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[uS]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[p("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),p("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),p("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:p("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:p("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and 'workbench.list.typeNavigationMode' instead.")},[oR]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[p("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),p("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:p("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[gS]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:p("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[fS]:{type:"boolean",default:typeof t5.quality=="string"&&t5.quality!=="stable",description:p("sticky scroll","Controls whether sticky scrolling is enabled in trees.")},[pS]:{type:"number",minimum:1,default:7,markdownDescription:p("sticky scroll maximum items","Controls the number of sticky elements displayed in the tree when `#workbench.tree.enableStickyScroll#` is enabled.")},[sR]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:p("typeNavigationMode2","Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}});var mN;(function(o){o[o.PRESERVE=0]="PRESERVE",o[o.LAST=1]="LAST"})(mN||(mN={}));const Wg={Quickaccess:"workbench.contributions.quickaccess"};class dhe{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((t,i)=>i.prefix.length-t.prefix.length),je(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return Ia([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(i=>e.startsWith(i.prefix))||void 0||this.defaultProvider}}xi.add(Wg.Quickaccess,new dhe);const che={ctrlCmd:!1,alt:!1};var hb;(function(o){o[o.Blur=1]="Blur",o[o.Gesture=2]="Gesture",o[o.Other=3]="Other"})(hb||(hb={}));var da;(function(o){o[o.NONE=0]="NONE",o[o.FIRST=1]="FIRST",o[o.SECOND=2]="SECOND",o[o.LAST=3]="LAST"})(da||(da={}));const Ha=bt("quickInputService");var uhe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},l5=function(o,e){return function(t,i){e(t,i,o)}};let _N=class extends q{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=xi.as(Wg.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n;const[s,r]=this.getOrInstantiateProvider(e),a=this.visibleQuickAccess,l=a==null?void 0:a.descriptor;if(a&&r&&l===r){e!==r.prefix&&!(i!=null&&i.preserveValue)&&(a.picker.value=e),this.adjustValueSelection(a.picker,r,i);return}if(r&&!(i!=null&&i.preserveValue)){let g;if(a&&l&&l!==r){const f=a.value.substr(l.prefix.length);f&&(g=`${r.prefix}${f}`)}if(!g){const f=s==null?void 0:s.defaultFilterValue;f===mN.LAST?g=this.lastAcceptedPickerValues.get(r):typeof f=="string"&&(g=`${r.prefix}${f}`)}typeof g=="string"&&(e=g)}const d=new de,c=d.add(this.quickInputService.createQuickPick());c.value=e,this.adjustValueSelection(c,r,i),c.placeholder=r==null?void 0:r.placeholder,c.quickNavigate=i==null?void 0:i.quickNavigateConfiguration,c.hideInput=!!c.quickNavigate&&!a,(typeof(i==null?void 0:i.itemActivation)=="number"||i!=null&&i.quickNavigateConfiguration)&&(c.itemActivation=(n=i==null?void 0:i.itemActivation)!==null&&n!==void 0?n:da.SECOND),c.contextKey=r==null?void 0:r.contextKey,c.filterValue=g=>g.substring(r?r.prefix.length:0);let u;t&&(u=new wy,d.add(ye.once(c.onWillAccept)(g=>{g.veto(),c.hide()}))),d.add(this.registerPickerListeners(c,s,r,e,i==null?void 0:i.providerOptions));const h=d.add(new tn);if(s&&d.add(s.provide(c,h.token,i==null?void 0:i.providerOptions)),ye.once(c.onDidHide)(()=>{c.selectedItems.length===0&&h.cancel(),d.dispose(),u==null||u.complete(c.selectedItems.slice(0))}),c.show(),t)return u==null?void 0:u.p}adjustValueSelection(e,t,i){var n;let s;i!=null&&i.preserveValue?s=[e.value.length,e.value.length]:s=[(n=t==null?void 0:t.prefix.length)!==null&&n!==void 0?n:0,e.value.length],e.valueSelection=s}registerPickerListeners(e,t,i,n,s){const r=new de,a=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return r.add(je(()=>{a===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),r.add(e.onDidChangeValue(l=>{const[d]=this.getOrInstantiateProvider(l);d!==t?this.show(l,{preserveValue:!0,providerOptions:s}):a.value=l})),i&&r.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,e.value)})),r}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};_N=uhe([l5(0,Ha),l5(1,qe)],_N);Y.white.toString(),Y.white.toString();class mS extends q{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new W),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);const i=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,n=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=n||"",this._element.style.backgroundColor=i||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),e.appendChild(this._element),this._register(ei.addTarget(this._element)),[Se.CLICK,ni.Tap].forEach(s=>{this._register(J(this._element,s,r=>{if(!this.enabled){ct.stop(r);return}this._onDidClick.fire(r)}))}),this._register(J(this._element,Se.KEY_DOWN,s=>{const r=new gi(s);let a=!1;this.enabled&&(r.equals(3)||r.equals(10))?(this._onDidClick.fire(s),a=!0):r.equals(9)&&(this._element.blur(),a=!0),a&&ct.stop(r,!0)})),this._register(J(this._element,Se.MOUSE_OVER,s=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register(J(this._element,Se.MOUSE_OUT,s=>{this.updateBackground(!1)})),this.focusTracker=this._register(Pl(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const t=[];for(let i of Kc(e))if(typeof i=="string"){if(i=i.trim(),i==="")continue;const n=document.createElement("span");n.textContent=i,t.push(n)}else t.push(i);return t}updateBackground(e){let t;this.options.secondary?t=e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:t=e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){var t;if(this._label===e||jc(this._label)&&jc(e)&&Dde(this._label,e))return;this._element.classList.add("monaco-text-button");const i=this.options.supportShortLabel?this._labelElement:this._element;if(jc(e)){const n=iL(e,{inline:!0});n.dispose();const s=(t=n.element.querySelector("p"))===null||t===void 0?void 0:t.innerHTML;if(s){const r=F7(s,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});i.innerHTML=r}else es(i)}else this.options.supportIcons?es(i,...this.getContentElements(e)):i.textContent=e;typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=Vde(e)),this._label=e}get label(){return this._label}set icon(e){this._element.classList.add(...Ue.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}class vN{constructor(e,t,i){this.options=t,this.styles=i,this.count=0,this.element=le(e,pe(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){var e,t;this.element.textContent=Xh(this.countFormat,this.count),this.element.title=Xh(this.titleFormat,this.count),this.element.style.backgroundColor=(e=this.styles.badgeBackground)!==null&&e!==void 0?e:"",this.element.style.color=(t=this.styles.badgeForeground)!==null&&t!==void 0?t:"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}const d5="done",c5="active",Yx="infinite",Xx="infinite-long-running",u5="discrete";class gL extends q{constructor(e,t){super(),this.workedVal=0,this.showDelayedScheduler=this._register(new Yt(()=>oo(this.element),0)),this.longRunningScheduler=this._register(new Yt(()=>this.infiniteLongRunning(),gL.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=(t==null?void 0:t.progressBarBackground)||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(c5,Yx,Xx,u5),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(d5),this.element.classList.contains(Yx)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(u5,d5,Xx),this.element.classList.add(c5,Yx),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(Xx)}getContainer(){return this.element}}gL.LONG_RUNNING_INFINITE_THRESHOLD=1e4;const hhe=pe;class ghe extends q{constructor(e,t,i){super(),this.parent=e,this.onKeyDown=s=>Wi(this.findInput.inputBox.inputElement,Se.KEY_DOWN,s),this.onMouseDown=s=>Wi(this.findInput.inputBox.inputElement,Se.MOUSE_DOWN,s),this.onDidChange=s=>this.findInput.onDidChange(s),this.container=le(this.parent,hhe(".quick-input-box")),this.findInput=this._register(new M6(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i}));const n=this.findInput.inputBox.inputElement;n.role="combobox",n.ariaHasPopup="menu",n.ariaAutoComplete="list",n.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}showDecoration(e){e===ji.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===ji.Info?1:e===ji.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===ji.Info?1:e===ji.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}class Gc{constructor(e,t){var i;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=(i=t==null?void 0:t.supportIcons)!==null&&i!==void 0?i:!1,this.domNode=le(e,pe("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=Gc.escapeNewLines(e,t)),!(this.didEverRender&&this.text===e&&this.title===i&&Uo(this.highlights,t))&&(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t{n=s===`\r -`?-1:0,r+=i;for(const a of t)a.end<=r||(a.start>=r&&(a.start+=n),a.end>=r&&(a.end+=n));return i+=n,"⏎"})}}class Jm{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class _S extends q{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new Jm(le(e,pe(".monaco-icon-label")))),this.labelContainer=le(this.domNode.element,pe(".monaco-icon-label-container")),this.nameContainer=le(this.labelContainer,pe("span.monaco-icon-name-container")),t!=null&&t.supportHighlights||t!=null&&t.supportIcons?this.nameNode=new mhe(this.nameContainer,!!t.supportIcons):this.nameNode=new fhe(this.nameContainer),this.hoverDelegate=t==null?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){var n;const s=["monaco-icon-label"],r=["monaco-icon-label-container"];let a="";if(i&&(i.extraClasses&&s.push(...i.extraClasses),i.italic&&s.push("italic"),i.strikethrough&&s.push("strikethrough"),i.disabledCommand&&r.push("disabled"),i.title&&(typeof i.title=="string"?a+=i.title:a+=e)),this.domNode.className=s.join(" "),this.domNode.element.setAttribute("aria-label",a),this.labelContainer.className=r.join(" "),this.setupHover(i!=null&&i.descriptionTitle?this.labelContainer:this.element,i==null?void 0:i.title),this.nameNode.setLabel(e,i),t||this.descriptionNode){const l=this.getOrCreateDescriptionNode();l instanceof Gc?(l.set(t||"",i?i.descriptionMatches:void 0,void 0,i==null?void 0:i.labelEscapeNewLines),this.setupHover(l.element,i==null?void 0:i.descriptionTitle)):(l.textContent=t&&(i!=null&&i.labelEscapeNewLines)?Gc.escapeNewLines(t,[]):t||"",this.setupHover(l.element,(i==null?void 0:i.descriptionTitle)||""),l.empty=!t)}if(i!=null&&i.suffix||this.suffixNode){const l=this.getOrCreateSuffixNode();l.textContent=(n=i==null?void 0:i.suffix)!==null&&n!==void 0?n:""}}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}if(!this.hoverDelegate)Ide(e,t);else{const n=f6(this.hoverDelegate,e,t);n&&this.customHovers.set(e,n)}}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){const e=this._register(new Jm(YX(this.nameContainer,pe("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new Jm(le(e.element,pe("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){var e;if(!this.descriptionNode){const t=this._register(new Jm(le(this.labelContainer,pe("span.monaco-icon-description-container"))));!((e=this.creationOptions)===null||e===void 0)&&e.supportDescriptionHighlights?this.descriptionNode=new Gc(le(t.element,pe("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new Jm(le(t.element,pe("span.label-description"))))}return this.descriptionNode}}class fhe{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&Uo(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=le(this.container,pe("a.label-name",{id:t==null?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const s={start:i,end:i+n.length},r=t.map(a=>ns.intersect(s,a)).filter(a=>!ns.isEmpty(a)).map(({start:a,end:l})=>({start:a-i,end:l-i}));return i=s.end+e.length,r})}class mhe{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&Uo(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new Gc(le(this.container,pe("a.label-name",{id:t==null?void 0:t.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(e,t==null?void 0:t.matches,void 0,t==null?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=(t==null?void 0:t.separator)||"/",n=phe(e,i,t==null?void 0:t.matches);for(let s=0;s{const o=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:o,collatorIsNumeric:o.resolvedOptions().numeric}});function vhe(o,e,t=!1){const i=o||"",n=e||"",s=h5.value.collator.compare(i,n);return h5.value.collatorIsNumeric&&s===0&&i!==n?in.length)return 1}return 0}var whe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};class G6{constructor(e){this.nodes=e}toString(){return this.nodes.map(e=>typeof e=="string"?e:e.label).join("")}}whe([nn],G6.prototype,"toString",null);const She=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;function yhe(o){const e=[];let t=0,i;for(;i=She.exec(o);){i.index-t>0&&e.push(o.substring(t,i.index));const[,n,s,,r]=i;r?e.push({label:n,href:s,title:r}):e.push({label:n,href:s}),t=i.index+i[0].length}return t{qX(g)&&ct.stop(g,!0),t.callback(s.href)},d=t.disposables.add(new St(a,Se.CLICK)).event,c=t.disposables.add(new St(a,Se.KEY_DOWN)).event,u=ye.chain(c,g=>g.filter(f=>{const m=new gi(f);return m.equals(10)||m.equals(3)}));t.disposables.add(ei.addTarget(a));const h=t.disposables.add(new St(a,ni.Tap)).event;ye.any(d,h,u)(l,null,t.disposables),e.appendChild(a)}}var Z6=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};const sa=pe;class xhe{constructor(e,t,i,n,s,r,a){var l,d,c;this._checked=!1,this._hidden=!1,this.hasCheckbox=n,this.index=i,this.fireButtonTriggered=s,this.fireSeparatorButtonTriggered=r,this._onChecked=a,this.onChecked=n?ye.map(ye.filter(this._onChecked.event,u=>u.listElement===this),u=>u.checked):ye.None,e.type==="separator"?this._separator=e:(this.item=e,t&&t.type==="separator"&&!t.buttons&&(this._separator=t),this.saneDescription=this.item.description,this.saneDetail=this.item.detail,this._labelHighlights=(l=this.item.highlights)===null||l===void 0?void 0:l.label,this._descriptionHighlights=(d=this.item.highlights)===null||d===void 0?void 0:d.description,this._detailHighlights=(c=this.item.highlights)===null||c===void 0?void 0:c.detail,this.saneTooltip=this.item.tooltip),this._init=new Ru(()=>{var u;const h=(u=e.label)!==null&&u!==void 0?u:"",g=x_(h).text.trim(),f=e.ariaLabel||[h,this.saneDescription,this.saneDetail].map(m=>Lde(m)).filter(m=>!!m).join(", ");return{saneLabel:h,saneSortLabel:g,saneAriaLabel:f}})}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({listElement:this,checked:e}))}get separator(){return this._separator}set separator(e){this._separator=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}}class w0{constructor(e){this.themeService=e}get templateId(){return w0.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=le(e,sa(".quick-input-list-entry"));const i=le(t.entry,sa("label.quick-input-list-label"));t.toDisposeTemplate.push(Wi(i,Se.CLICK,d=>{t.checkbox.offsetParent||d.preventDefault()})),t.checkbox=le(i,sa("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(Wi(t.checkbox,Se.CHANGE,d=>{t.element.checked=t.checkbox.checked}));const n=le(i,sa(".quick-input-list-rows")),s=le(n,sa(".quick-input-list-row")),r=le(n,sa(".quick-input-list-row"));t.label=new _S(s,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0}),t.toDisposeTemplate.push(t.label),t.icon=Z7(t.label.element,sa(".quick-input-list-icon"));const a=le(s,sa(".quick-input-list-entry-keybinding"));t.keybinding=new C0(a,Vo);const l=le(r,sa(".quick-input-list-label-meta"));return t.detail=new _S(l,{supportHighlights:!0,supportIcons:!0}),t.toDisposeTemplate.push(t.detail),t.separator=le(t.entry,sa(".quick-input-list-separator")),t.actionBar=new Cr(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){var n,s,r,a;i.element=e,e.element=(n=i.entry)!==null&&n!==void 0?n:void 0;const l=e.item?e.item:e.separator;i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked(f=>i.checkbox.checked=f));const{labelHighlights:d,descriptionHighlights:c,detailHighlights:u}=e;if(!((s=e.item)===null||s===void 0)&&s.iconPath){const f=Pp(this.themeService.getColorTheme().type)?e.item.iconPath.dark:(r=e.item.iconPath.light)!==null&&r!==void 0?r:e.item.iconPath.dark,m=ze.revive(f);i.icon.className="quick-input-list-icon",i.icon.style.backgroundImage=du(m)}else i.icon.style.backgroundImage="",i.icon.className=!((a=e.item)===null||a===void 0)&&a.iconClass?`quick-input-list-icon ${e.item.iconClass}`:"";const h={matches:d||[],descriptionTitle:e.saneDescription,descriptionMatches:c||[],labelEscapeNewLines:!0};l.type!=="separator"?(h.extraClasses=l.iconClasses,h.italic=l.italic,h.strikethrough=l.strikethrough,i.entry.classList.remove("quick-input-list-separator-as-item")):i.entry.classList.add("quick-input-list-separator-as-item"),i.label.setLabel(e.saneLabel,e.saneDescription,h),i.keybinding.set(l.type==="separator"?void 0:l.keybinding),e.saneDetail?(i.detail.element.style.display="",i.detail.setLabel(e.saneDetail,void 0,{matches:u,title:e.saneDetail,labelEscapeNewLines:!0})):i.detail.element.style.display="none",e.item&&e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator);const g=l.buttons;g&&g.length?(i.actionBar.push(g.map((f,m)=>{let v=f.iconClass||(f.iconPath?bN(f.iconPath):void 0);return f.alwaysVisible&&(v=v?`${v} always-visible`:"always-visible"),{id:`id-${m}`,class:v,enabled:!0,label:"",tooltip:f.tooltip||"",run:()=>{l.type!=="separator"?e.fireButtonTriggered({button:f,item:l}):e.fireSeparatorButtonTriggered({button:f,separator:l})}}}),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=jt(i.toDisposeElement),i.actionBar.clear()}disposeTemplate(e){e.toDisposeElement=jt(e.toDisposeElement),e.toDisposeTemplate=jt(e.toDisposeTemplate)}}w0.ID="listelement";class khe{getHeight(e){return e.item?e.saneDetail?44:22:24}getTemplateId(e){return w0.ID}}var kn;(function(o){o[o.First=1]="First",o[o.Second=2]="Second",o[o.Last=3]="Last",o[o.Next=4]="Next",o[o.Previous=5]="Previous",o[o.NextPage=6]="NextPage",o[o.PreviousPage=7]="PreviousPage"})(kn||(kn={}));class aR{constructor(e,t,i,n){this.parent=e,this.options=i,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.sortByLabel=!0,this._onChangedAllVisibleChecked=new W,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new W,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new W,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new W,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new W,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new W,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._onKeyDown=new W,this.onKeyDown=this._onKeyDown.event,this._onLeave=new W,this.onLeave=this._onLeave.event,this._listElementChecked=new W,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=le(this.parent,sa(".quick-input-list"));const s=new khe,r=new Nhe;if(this.list=i.createList("QuickInput",this.container,s,[new w0(n)],{identityProvider:{getId:a=>{var l,d,c,u,h,g,f,m;return(m=(g=(u=(d=(l=a.item)===null||l===void 0?void 0:l.id)!==null&&d!==void 0?d:(c=a.item)===null||c===void 0?void 0:c.label)!==null&&u!==void 0?u:(h=a.separator)===null||h===void 0?void 0:h.id)!==null&&g!==void 0?g:(f=a.separator)===null||f===void 0?void 0:f.label)!==null&&m!==void 0?m:""}},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:r}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(a=>{const l=new gi(a);switch(l.keyCode){case 10:this.toggleCheckbox();break;case 31:(It?a.metaKey:a.ctrlKey)&&this.list.setFocus(Ls(this.list.length));break;case 16:{const d=this.list.getFocus();d.length===1&&d[0]===0&&this._onLeave.fire();break}case 18:{const d=this.list.getFocus();d.length===1&&d[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(l)})),this.disposables.push(this.list.onMouseDown(a=>{a.browserEvent.button!==2&&a.browserEvent.preventDefault()})),this.disposables.push(J(this.container,Se.CLICK,a=>{(a.x||a.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(a=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(a=>{typeof a.index=="number"&&(a.browserEvent.preventDefault(),this.list.setSelection([a.index]))})),i.hoverDelegate){const a=new N7(i.hoverDelegate.delay);this.disposables.push(this.list.onMouseOver(async l=>{var d;if(l.browserEvent.target instanceof HTMLAnchorElement){a.cancel();return}if(!(!(l.browserEvent.relatedTarget instanceof HTMLAnchorElement)&&Qn(l.browserEvent.relatedTarget,(d=l.element)===null||d===void 0?void 0:d.element)))try{await a.trigger(async()=>{l.element&&this.showHover(l.element)})}catch(c){if(!Fa(c))throw c}})),this.disposables.push(this.list.onMouseOut(l=>{var d;Qn(l.browserEvent.relatedTarget,(d=l.element)===null||d===void 0?void 0:d.element)||a.cancel()})),this.disposables.push(a)}this.disposables.push(this._listElementChecked.event(a=>this.fireCheckedEvents())),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return ye.map(this.list.onDidChangeFocus,e=>e.elements.map(t=>t.item))}get onDidChangeSelection(){return ye.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(t=>t.item),event:e.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}get ariaLabel(){return this.list.getHTMLElement().ariaLabel}set ariaLabel(e){this.list.getHTMLElement().ariaLabel=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=jt(this.elementDisposables);const t=r=>this.fireButtonTriggered(r),i=r=>this.fireSeparatorButtonTriggered(r);this.inputElements=e;const n=new Map,s=this.parent.classList.contains("show-checkboxes");this.elements=e.reduce((r,a,l)=>{var d;const c=l>0?e[l-1]:void 0;if(a.type==="separator"&&!a.buttons)return r;const u=new xhe(a,c,l,s,t,i,this._listElementChecked),h=r.length;return r.push(u),n.set((d=u.item)!==null&&d!==void 0?d:u.separator,h),r},[]),this.elementsToIndexes=n,this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(e=>e.item)}setFocusedElements(e){if(this.list.setFocus(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t))),e.length>0){const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item).filter(e=>!!e)}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const i of this.elements)i.checked=t.has(i.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===kn.Second&&this.list.length<2&&(e=kn.First),e){case kn.First:this.list.scrollTop=0,this.list.focusFirst(void 0,i=>!!i.item);break;case kn.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,i=>!!i.item);break;case kn.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,i=>!!i.item);break;case kn.Next:{this.list.focusNext(void 0,!0,void 0,n=>!!n.item);const i=this.list.getFocus()[0];i!==0&&!this.elements[i-1].item&&this.list.firstVisibleIndex>i-1&&this.list.reveal(i-1);break}case kn.Previous:{this.list.focusPrevious(void 0,!0,void 0,n=>!!n.item);const i=this.list.getFocus()[0];i!==0&&!this.elements[i-1].item&&this.list.firstVisibleIndex>i-1&&this.list.reveal(i-1);break}case kn.NextPage:this.list.focusNextPage(void 0,i=>!!i.item);break;case kn.PreviousPage:this.list.focusPreviousPage(void 0,i=>!!i.item);break}const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}showHover(e){var t,i,n;this.options.hoverDelegate!==void 0&&(this._lastHover&&!this._lastHover.isDisposed&&((i=(t=this.options.hoverDelegate).onDidHideHover)===null||i===void 0||i.call(t),(n=this._lastHover)===null||n===void 0||n.dispose()),!(!e.element||!e.saneTooltip)&&(this._lastHover=this.options.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:s=>{this.options.linkOpenerDelegate(s)},appearance:{showPointer:!0},container:this.container,position:{hoverPosition:1}},!1)))}layout(e){this.list.getHTMLElement().style.maxHeight=e?`${Math.floor(e/44)*44+6}px`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const t=e;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(n=>{n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!1;const s=n.index&&this.inputElements[n.index-1];n.item&&(n.separator=s&&s.type==="separator"&&!s.buttons?s:void 0)});else{let n;this.elements.forEach(s=>{var r,a,l,d;let c;this.matchOnLabelMode==="fuzzy"?c=this.matchOnLabel&&(r=Fx(e,x_(s.saneLabel)))!==null&&r!==void 0?r:void 0:c=this.matchOnLabel&&(a=Ihe(t,x_(s.saneLabel)))!==null&&a!==void 0?a:void 0;const u=this.matchOnDescription&&(l=Fx(e,x_(s.saneDescription||"")))!==null&&l!==void 0?l:void 0,h=this.matchOnDetail&&(d=Fx(e,x_(s.saneDetail||"")))!==null&&d!==void 0?d:void 0;if(c||u||h?(s.labelHighlights=c,s.descriptionHighlights=u,s.detailHighlights=h,s.hidden=!1):(s.labelHighlights=void 0,s.descriptionHighlights=void 0,s.detailHighlights=void 0,s.hidden=s.item?!s.item.alwaysShow:!0),s.item?s.separator=void 0:s.separator&&(s.hidden=!0),!this.sortByLabel){const g=s.index&&this.inputElements[s.index-1];n=g&&g.type==="separator"?g:n,n&&!s.hidden&&(s.separator=n,n=void 0)}})}const i=this.elements.filter(n=>!n.hidden);if(this.sortByLabel&&e){const n=e.toLowerCase();i.sort((s,r)=>Ehe(s,r,n))}return this.elementsToIndexes=i.reduce((n,s,r)=>{var a;return n.set((a=s.item)!==null&&a!==void 0?a:s.separator,r),n},new Map),this.list.splice(0,this.list.length,i),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(i.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=jt(this.elementDisposables),this.disposables=jt(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}fireSeparatorButtonTriggered(e){this._onSeparatorButtonTriggered.fire(e)}style(e){this.list.style(e)}toggleHover(){const e=this.list.getFocusedElements()[0];if(!(e!=null&&e.saneTooltip))return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}const t=this.list.getFocusedElements()[0];if(!t)return;this.showHover(t);const i=new de;i.add(this.list.onDidChangeFocus(n=>{n.indexes.length&&this.showHover(n.elements[0])})),this._lastHover&&i.add(this._lastHover),this._toggleHover=i,this.elementDisposables.push(this._toggleHover)}}Z6([nn],aR.prototype,"onDidChangeFocus",null);Z6([nn],aR.prototype,"onDidChangeSelection",null);function Ihe(o,e){const{text:t,iconOffsets:i}=e;if(!i||i.length===0)return g5(o,t);const n=Xb(t," "),s=t.length-n.length,r=g5(o,n);if(r)for(const a of r){const l=i[a.start+s]+s;a.start+=l,a.end+=l}return r}function g5(o,e){const t=e.toLowerCase().indexOf(o.toLowerCase());return t!==-1?[{start:t,end:t+o.length}]:null}function Ehe(o,e,t){const i=o.labelHighlights||[],n=e.labelHighlights||[];return i.length&&!n.length?-1:!i.length&&n.length?1:i.length===0&&n.length===0?0:bhe(o.saneSortLabel,e.saneSortLabel,t)}class Nhe{getWidgetAriaLabel(){return p("quickInput","Quick Input")}getAriaLabel(e){var t;return!((t=e.separator)===null||t===void 0)&&t.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(e.hasCheckbox)return{value:e.checked,onDidChange:e.onChecked}}}const CN={iconClass:Ue.asClassName(ve.quickInputBack),tooltip:p("quickInput.back","Back")};class S0 extends q{constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=S0.noPromptMessage,this._severity=ji.Ignore,this.onDidTriggerButtonEmitter=this._register(new W),this.onDidHideEmitter=this._register(new W),this.onDisposeEmitter=this._register(new W),this.visibleDisposables=this._register(new de),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!Ea;this._ignoreFocusOut=e&&!Ea,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=e??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=hb.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){var e,t;if(!this.visible)return;const i=this.getTitle();i&&this.ui.title.textContent!==i?this.ui.title.textContent=i:!i&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText=" ");const n=this.getDescription();if(this.ui.description1.textContent!==n&&(this.ui.description1.textContent=n),this.ui.description2.textContent!==n&&(this.ui.description2.textContent=n),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?es(this.ui.widget,this._widget):es(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new qr,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const r=this.buttons.filter(l=>l===CN);this.ui.leftActionBar.push(r.map((l,d)=>{const c=new Rs(`id-${d}`,"",l.iconClass||bN(l.iconPath),!0,async()=>{this.onDidTriggerButtonEmitter.fire(l)});return c.tooltip=l.tooltip||"",c}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const a=this.buttons.filter(l=>l!==CN);this.ui.rightActionBar.push(a.map((l,d)=>{const c=new Rs(`id-${d}`,"",l.iconClass||bN(l.iconPath),!0,async()=>{this.onDidTriggerButtonEmitter.fire(l)});return c.tooltip=l.tooltip||"",c}),{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const r=(t=(e=this.toggles)===null||e===void 0?void 0:e.filter(a=>a instanceof Lm))!==null&&t!==void 0?t:[];this.ui.inputBox.toggles=r}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const s=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==s&&(this._lastValidationMessage=s,es(this.ui.message),Dhe(s,this.ui.message,{callback:r=>{this.ui.linkOpenerDelegate(r)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?p("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==ji.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}S0.noPromptMessage=p("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class gb extends S0{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new W),this.onWillAcceptEmitter=this._register(new W),this.onDidAcceptEmitter=this._register(new W),this.onDidCustomEmitter=this._register(new W),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=da.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new W),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new W),this.onDidTriggerItemButtonEmitter=this._register(new W),this.onDidTriggerSeparatorButtonEmitter=this._register(new W),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?che:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(kn.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{this.doSetValue(e,!0)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(e=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(e=>{switch(e.keyCode){case 18:this.ui.list.focus(kn.Next),this.canSelectMany&&this.ui.list.domFocus(),ct.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(kn.Previous):this.ui.list.focus(kn.Last),this.canSelectMany&&this.ui.list.domFocus(),ct.stop(e,!0);break;case 12:this.ui.list.focus(kn.NextPage),this.canSelectMany&&this.ui.list.domFocus(),ct.stop(e,!0);break;case 11:this.ui.list.focus(kn.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),ct.stop(e,!0);break;case 17:if(!this._canAcceptInBackground||!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(kn.First),ct.stop(e,!0));break;case 13:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(kn.Last),ct.stop(e,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&Bi(e,this._activeItems,(t,i)=>t===i)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&Bi(e,this._selectedItems,(i,n)=>i===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(EM(t)&&t.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&Bi(e,this._selectedItems,(t,i)=>t===i)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(e=>this.onDidTriggerSeparatorButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return J(this.ui.container,Se.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new gi(e),i=t.keyCode;this._quickNavigate.keybindings.some(r=>{const a=r.getChords();return a.length>1?!1:a[0].shiftKey&&i===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(a[0].altKey&&i===6||a[0].ctrlKey&&i===5||a[0].metaKey&&i===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,i={title:!!this.title||!!this.step||!!this.buttons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let n=this.ariaLabel;if(!n&&i.inputBox&&(n=this.placeholder||gb.DEFAULT_ARIA_LABEL,this.title&&(n+=` - ${this.title}`)),this.ui.list.ariaLabel!==n&&(this.ui.list.ariaLabel=n??null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case da.NONE:this._itemActivation=da.FIRST;break;case da.SECOND:this.ui.list.focus(kn.Second),this._itemActivation=da.FIRST;break;case da.LAST:this.ui.list.focus(kn.Last),this._itemActivation=da.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(kn.First)),this.keepScrollPosition&&(this.scrollTop=e)}}gb.DEFAULT_ARIA_LABEL=p("quickInputBox.ariaLabel","Type to narrow down results.");class The extends S0{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new W),this.onDidAcceptEmitter=this._register(new W),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}const eo=pe;class fL extends q{constructor(e,t,i){super(),this.options=e,this.themeService=t,this.layoutService=i,this.enabled=!0,this.onDidAcceptEmitter=this._register(new W),this.onDidCustomEmitter=this._register(new W),this.onDidTriggerButtonEmitter=this._register(new W),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new W),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new W),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this._register(ye.runAndSubscribe(xM,({window:n,disposables:s})=>this.registerKeyModsListeners(n,s),{window:Ai,disposables:this._store})),this._register(AX(n=>{this.ui&&Je(this.ui.container)===n&&this.reparentUI(this.layoutService.mainContainer)}))}registerKeyModsListeners(e,t){const i=n=>{this.keyMods.ctrlCmd=n.ctrlKey||n.metaKey,this.keyMods.alt=n.altKey};for(const n of[Se.KEY_DOWN,Se.KEY_UP,Se.MOUSE_DOWN])t.add(J(e,n,i,!0))}getUI(e){if(this.ui)return e&&this.parentElement.ownerDocument!==this.layoutService.activeContainer.ownerDocument&&this.reparentUI(this.layoutService.activeContainer),this.ui;const t=le(this.parentElement,eo(".quick-input-widget.show-file-icons"));t.tabIndex=-1,t.style.display="none";const i=mr(t),n=le(t,eo(".quick-input-titlebar")),s=this.options.hoverDelegate?{hoverDelegate:this.options.hoverDelegate}:void 0,r=this._register(new Cr(n,s));r.domNode.classList.add("quick-input-left-action-bar");const a=le(n,eo(".quick-input-title")),l=this._register(new Cr(n,s));l.domNode.classList.add("quick-input-right-action-bar");const d=le(t,eo(".quick-input-header")),c=le(d,eo("input.quick-input-check-all"));c.type="checkbox",c.setAttribute("aria-label",p("quickInput.checkAll","Toggle all checkboxes")),this._register(Wi(c,Se.CHANGE,K=>{const oe=c.checked;O.setAllVisibleChecked(oe)})),this._register(J(c,Se.CLICK,K=>{(K.x||K.y)&&f.setFocus()}));const u=le(d,eo(".quick-input-description")),h=le(d,eo(".quick-input-and-message")),g=le(h,eo(".quick-input-filter")),f=this._register(new ghe(g,this.styles.inputBox,this.styles.toggle));f.setAttribute("aria-describedby",`${this.idPrefix}message`);const m=le(g,eo(".quick-input-visible-count"));m.setAttribute("aria-live","polite"),m.setAttribute("aria-atomic","true");const v=new vN(m,{countFormat:p({},"{0} Results")},this.styles.countBadge),_=le(g,eo(".quick-input-count"));_.setAttribute("aria-live","polite");const b=new vN(_,{countFormat:p({},"{0} Selected")},this.styles.countBadge),C=le(d,eo(".quick-input-action")),w=this._register(new mS(C,this.styles.button));w.label=p("ok","OK"),this._register(w.onDidClick(K=>{this.onDidAcceptEmitter.fire()}));const S=le(d,eo(".quick-input-action")),x=this._register(new mS(S,this.styles.button));x.label=p("custom","Custom"),this._register(x.onDidClick(K=>{this.onDidCustomEmitter.fire()}));const y=le(h,eo(`#${this.idPrefix}message.quick-input-message`)),I=this._register(new gL(t,this.styles.progressBar));I.getContainer().classList.add("quick-input-progress");const E=le(t,eo(".quick-input-html-widget"));E.tabIndex=-1;const R=le(t,eo(".quick-input-description")),j=this.idPrefix+"list",O=this._register(new aR(t,j,this.options,this.themeService));f.setAttribute("aria-controls",j),this._register(O.onDidChangeFocus(()=>{var K;f.setAttribute("aria-activedescendant",(K=O.getActiveDescendant())!==null&&K!==void 0?K:"")})),this._register(O.onChangedAllVisibleChecked(K=>{c.checked=K})),this._register(O.onChangedVisibleCount(K=>{v.setCount(K)})),this._register(O.onChangedCheckedCount(K=>{b.setCount(K)})),this._register(O.onLeave(()=>{setTimeout(()=>{f.setFocus(),this.controller instanceof gb&&this.controller.canSelectMany&&O.clearFocus()},0)}));const $=Pl(t);return this._register($),this._register(J(t,Se.FOCUS,K=>{Qn(K.relatedTarget,t)||(this.previousFocusElement=K.relatedTarget instanceof HTMLElement?K.relatedTarget:void 0)},!0)),this._register($.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(hb.Blur),this.previousFocusElement=void 0})),this._register(J(t,Se.FOCUS,K=>{f.setFocus()})),this._register(Wi(t,Se.KEY_DOWN,K=>{if(!Qn(K.target,E))switch(K.keyCode){case 3:ct.stop(K,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:ct.stop(K,!0),this.hide(hb.Gesture);break;case 2:if(!K.altKey&&!K.ctrlKey&&!K.metaKey){const oe=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(t.classList.contains("show-checkboxes")?oe.push("input"):oe.push("input[type=text]"),this.getUI().list.isDisplayed()&&oe.push(".monaco-list"),this.getUI().message&&oe.push(".quick-input-message a"),this.getUI().widget){if(Qn(K.target,this.getUI().widget))break;oe.push(".quick-input-html-widget")}const Le=t.querySelectorAll(oe.join(", "));K.shiftKey&&K.target===Le[0]?(ct.stop(K,!0),O.clearFocus()):!K.shiftKey&&Qn(K.target,Le[Le.length-1])&&(ct.stop(K,!0),Le[0].focus())}break;case 10:K.ctrlKey&&(ct.stop(K,!0),this.getUI().list.toggleHover());break}})),this.ui={container:t,styleSheet:i,leftActionBar:r,titleBar:n,title:a,description1:R,description2:u,widget:E,rightActionBar:l,checkAll:c,inputContainer:h,filterContainer:g,inputBox:f,visibleCountContainer:m,visibleCount:v,countContainer:_,count:b,okContainer:C,ok:w,message:y,customButtonContainer:S,customButton:x,list:O,progressBar:I,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:K=>this.show(K),hide:()=>this.hide(),setVisibilities:K=>this.setVisibilities(K),setEnabled:K=>this.setEnabled(K),setContextKey:K=>this.options.setContextKey(K),linkOpenerDelegate:K=>this.options.linkOpenerDelegate(K)},this.updateStyles(),this.ui}reparentUI(e){this.ui&&(this.parentElement=e,le(this.parentElement,this.ui.container))}pick(e,t={},i=vt.None){return new Promise((n,s)=>{let r=c=>{var u;r=n,(u=t.onKeyMods)===null||u===void 0||u.call(t,a.keyMods),n(c)};if(i.isCancellationRequested){r(void 0);return}const a=this.createQuickPick();let l;const d=[a,a.onDidAccept(()=>{if(a.canSelectMany)r(a.selectedItems.slice()),a.hide();else{const c=a.activeItems[0];c&&(r(c),a.hide())}}),a.onDidChangeActive(c=>{const u=c[0];u&&t.onDidFocus&&t.onDidFocus(u)}),a.onDidChangeSelection(c=>{if(!a.canSelectMany){const u=c[0];u&&(r(u),a.hide())}}),a.onDidTriggerItemButton(c=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton({...c,removeItem:()=>{const u=a.items.indexOf(c.item);if(u!==-1){const h=a.items.slice(),g=h.splice(u,1),f=a.activeItems.filter(v=>v!==g[0]),m=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=h,f&&(a.activeItems=f),a.keepScrollPosition=m}}})),a.onDidTriggerSeparatorButton(c=>{var u;return(u=t.onDidTriggerSeparatorButton)===null||u===void 0?void 0:u.call(t,c)}),a.onDidChangeValue(c=>{l&&!c&&(a.activeItems.length!==1||a.activeItems[0]!==l)&&(a.activeItems=[l])}),i.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{jt(d),r(void 0)})];a.title=t.title,a.canSelectMany=!!t.canPickMany,a.placeholder=t.placeHolder,a.ignoreFocusOut=!!t.ignoreFocusLost,a.matchOnDescription=!!t.matchOnDescription,a.matchOnDetail=!!t.matchOnDetail,a.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,a.autoFocusOnList=t.autoFocusOnList===void 0||t.autoFocusOnList,a.quickNavigate=t.quickNavigate,a.hideInput=!!t.hideInput,a.contextKey=t.contextKey,a.busy=!0,Promise.all([e,t.activeItem]).then(([c,u])=>{l=u,a.busy=!1,a.items=c,a.canSelectMany&&(a.selectedItems=c.filter(h=>h.type!=="separator"&&h.picked)),l&&(a.activeItems=[l])}),a.show(),Promise.resolve(e).then(void 0,c=>{s(c),a.hide()})})}createQuickPick(){const e=this.getUI(!0);return new gb(e)}createInputBox(){const e=this.getUI(!0);return new The(e)}show(e){const t=this.getUI(!0);this.onShowEmitter.fire();const i=this.controller;this.controller=e,i==null||i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",es(t.widget),t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(ji.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),es(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;const n=this.options.backKeybindingLabel();CN.tooltip=n?p("quickInput.backWithKeybinding","Back ({0})",n):p("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}isVisible(){return!!this.ui&&this.ui.container.style.display!=="none"}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",t.checkAll.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t,i;const n=this.controller;if(!n)return;const s=(t=this.ui)===null||t===void 0?void 0:t.container,r=s&&!zX(s);if(this.controller=null,this.onHideEmitter.fire(),s&&(s.style.display="none"),!r){let a=this.previousFocusElement;for(;a&&!a.offsetParent;)a=(i=a.parentElement)!==null&&i!==void 0?i:void 0;a!=null&&a.offsetParent?(a.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}n.didHide(e)}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isVisible()){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(this.dimension.width*.62,fL.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,widgetBorder:n,widgetShadow:s}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e??"",this.ui.container.style.backgroundColor=t??"",this.ui.container.style.color=i??"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=s?`0 0 8px 2px ${s}`:"",this.ui.list.style(this.styles.list);const r=[];this.styles.pickerGroup.pickerGroupBorder&&r.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&r.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&r.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(r.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&r.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&r.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&r.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&r.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&r.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),r.push("}"));const a=r.join(` -`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}}fL.MAX_WIDTH=600;var Mhe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},NC=function(o,e){return function(t,i){e(t,i,o)}};let wN=class extends une{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(_N))),this._quickAccess}constructor(e,t,i,n){super(i),this.instantiationService=e,this.contextKeyService=t,this.layoutService=n,this._onShow=this._register(new W),this._onHide=this._register(new W),this.contexts=new Map}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:s=>this.setContextKey(s),linkOpenerDelegate:s=>{this.instantiationService.invokeFunction(r=>{r.get(So).open(s,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>e.focus(),createList:(s,r,a,l,d)=>this.instantiationService.createInstance(fN,s,r,a,l,d),styles:this.computeStyles()},n=this._register(new fL({...i,...t},this.themeService,this.layoutService));return n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer(s=>n.layout(s,e.activeContainerOffset.quickPickTop))),this._register(e.onDidChangeActiveContainer(()=>{n.isVisible()||n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop)})),this._register(n.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(n.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),n}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new De(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t==null||t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},i=vt.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:Ee(i4),quickInputForeground:Ee(_te),quickInputTitleBackground:Ee(vte),widgetBorder:Ee(jM),widgetShadow:Ee(ml)},inputBox:iS,toggle:tS,countBadge:y6,button:Fce,progressBar:Bce,keybindingLabel:Oce,list:Sm({listBackground:i4,listFocusBackground:Nh,listFocusForeground:Eh,listInactiveFocusForeground:Eh,listInactiveSelectionIconForeground:Ef,listInactiveFocusBackground:Nh,listFocusOutline:fi,listInactiveFocusOutline:fi}),pickerGroup:{pickerGroupBorder:Ee(bte),pickerGroupForeground:Ee(R8)}}}};wN=Mhe([NC(0,qe),NC(1,Xe),NC(2,Sn),NC(3,wm)],wN);var Y6=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Hf=function(o,e){return function(t,i){e(t,i,o)}};let SN=class extends wN{constructor(e,t,i,n,s){super(t,i,n,new TE(e.getContainerDomNode(),s)),this.host=void 0;const r=Kp.get(e);if(r){const a=r.widget;this.host={_serviceBrand:void 0,get mainContainer(){return a.getDomNode()},getContainer(){return a.getDomNode()},get containers(){return[a.getDomNode()]},get activeContainer(){return a.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return ye.map(e.onDidLayoutChange,l=>({container:a.getDomNode(),dimension:l}))},get onDidChangeActiveContainer(){return ye.None},get onDidAddContainer(){return ye.None},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};SN=Y6([Hf(1,qe),Hf(2,Xe),Hf(3,Sn),Hf(4,Ot)],SN);let yN=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(SN,e);this.mapEditorToService.set(e,t),su(e.onDidDispose)(()=>{i.dispose(),this.mapEditorToService.delete(e)})}return t}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t={},i=vt.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};yN=Y6([Hf(0,qe),Hf(1,Ot)],yN);class Kp{static get(e){return e.getContribution(Kp.ID)}constructor(e){this.editor=e,this.widget=new pL(this.editor)}dispose(){this.widget.dispose()}}Kp.ID="editor.controller.quickInput";class pL{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return pL.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}pL.ID="editor.contrib.quickInputWidget";At(Kp.ID,Kp,4);class Ahe{constructor(e,t,i,n,s){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=s}}function Rhe(o){if(!o||!Array.isArray(o))return[];const e=[];let t=0;for(let i=0,n=o.length;i{const h=Vhe(c.token,u.token);return h!==0?h:c.index-u.index});let t=0,i="000000",n="ffffff";for(;o.length>=1&&o[0].token==="";){const c=o.shift();c.fontStyle!==-1&&(t=c.fontStyle),c.foreground!==null&&(i=c.foreground),c.background!==null&&(n=c.background)}const s=new Fhe;for(const c of e)s.getId(c);const r=s.getId(i),a=s.getId(n),l=new lR(t,r,a),d=new dR(l);for(let c=0,u=o.length;c"u"){const n=this._match(t),s=Whe(t);i=(n.metadata|s<<8)>>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const Bhe=/\b(comment|string|regex|regexp)\b/;function Whe(o){const e=o.match(Bhe);if(!e)return 0;switch(e[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}function Vhe(o,e){return oe?1:0}class lR{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new lR(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){e!==-1&&(this._fontStyle=e),t!==0&&(this._foreground=t),i!==0&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class dR{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;const t=e.indexOf(".");let i,n;t===-1?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));const s=this._children.get(i);return typeof s<"u"?s.match(n):this._mainRule}insert(e,t,i,n){if(e===""){this._mainRule.acceptOverwrite(t,i,n);return}const s=e.indexOf(".");let r,a;s===-1?(r=e,a=""):(r=e.substring(0,s),a=e.substring(s+1));let l=this._children.get(r);typeof l>"u"&&(l=new dR(this._mainRule.clone()),this._children.set(r,l)),l.insert(a,t,i,n)}}function Hhe(o){const e=[];for(let t=1,i=o.length;t({format:n.format,location:n.location.toString()}))}}o.toJSONObject=e;function t(i){const n=s=>As(s)?s:void 0;if(i&&Array.isArray(i.src)&&i.src.every(s=>As(s.format)&&As(s.location)))return{weight:n(i.weight),style:n(i.style),src:i.src.map(s=>({format:s.format,location:ze.parse(s.location)}))}}o.fromJSONObject=t})(p5||(p5={}));class qhe{constructor(){this._onDidChange=new W,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:p("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:p("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${Ue.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const s=this.iconsById[e];if(s){if(i&&!s.description){s.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const l=this.iconReferenceSchema.enum.indexOf(e);l!==-1&&(this.iconReferenceSchema.enumDescriptions[l]=i),this._onDidChange.fire()}return s}const r={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=r;const a={$ref:"#/definitions/icons"};return n&&(a.deprecationMessage=n),i&&(a.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=a,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(s,r)=>s.id.localeCompare(r.id),t=s=>{for(;Ue.isThemeIcon(s.defaults);)s=this.iconsById[s.defaults.id];return`codicon codicon-${s?s.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map(s=>this.iconsById[s]);for(const s of n.filter(r=>!!r.description).sort(e))i.push(`||${s.id}|${Ue.isThemeIcon(s.defaults)?s.defaults.id:s.id}|${s.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const s of n.filter(r=>!Ue.isThemeIcon(r.defaults)).sort(e))i.push(`||${s.id}|`);return i.join(` -`)}}const Vg=new qhe;xi.add(Khe.IconContribution,Vg);function Zi(o,e,t,i){return Vg.registerIcon(o,e,t,i)}function Q6(){return Vg}function Ghe(){const o=d7();for(const e in o){const t="\\"+o[e].toString(16);Vg.registerIcon(e,{fontCharacter:t})}}Ghe();const J6="vscode://schemas/icons",eW=xi.as(My.JSONContribution);eW.registerSchema(J6,Vg.getIconSchema());const m5=new Yt(()=>eW.notifySchemaChanged(J6),200);Vg.onDidChange(()=>{m5.isScheduled()||m5.schedule()});const tW=Zi("widget-close",ve.close,p("widgetClose","Icon for the close action in widgets."));Zi("goto-previous-location",ve.arrowUp,p("previousChangeIcon","Icon for goto previous editor location."));Zi("goto-next-location",ve.arrowDown,p("nextChangeIcon","Icon for goto next editor location."));Ue.modify(ve.sync,"spin");Ue.modify(ve.loading,"spin");function Zhe(o){const e=new de,t=e.add(new W),i=Q6();return e.add(i.onDidChange(()=>t.fire())),o&&e.add(o.onDidProductIconThemeChange(()=>t.fire())),{dispose:()=>e.dispose(),onDidChange:t.event,getCSS(){const n=o?o.getProductIconTheme():new iW,s={},r=l=>{const d=n.getIcon(l);if(!d)return;const c=d.font;return c?(s[c.id]=c.definition,`.codicon-${l.id}:before { content: '${d.fontCharacter}'; font-family: ${lO(c.id)}; }`):`.codicon-${l.id}:before { content: '${d.fontCharacter}'; }`},a=[];for(const l of i.getIcons()){const d=r(l);d&&a.push(d)}for(const l in s){const d=s[l],c=d.weight?`font-weight: ${d.weight};`:"",u=d.style?`font-style: ${d.style};`:"",h=d.src.map(g=>`${du(g.location)} format('${g.format}')`).join(", ");a.push(`@font-face { src: ${h}; font-family: ${lO(l)};${c}${u} font-display: block; }`)}return a.join(` -`)}}}class iW{getIcon(e){const t=Q6();let i=e.defaults;for(;Ue.isThemeIcon(i);){const n=t.getIcon(i.id);if(!n)return;i=n.defaults}return i}}const yd="vs",_p="vs-dark",Uh="hc-black",jh="hc-light",nW=xi.as(N8.ColorContribution),Yhe=xi.as(q8.ThemingContribution);class sW{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(F1(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,Y.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=LN(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,Y.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);if(i)return i;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=nW.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case yd:return lr.LIGHT;case Uh:return lr.HIGH_CONTRAST_DARK;case jh:return lr.HIGH_CONTRAST_LIGHT;default:return lr.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const s=LN(this.themeData.base);e=s.rules,s.encodedTokensColors&&(t=s.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const s={token:""};i&&(s.foreground=i),n&&(s.background=n),e.push(s)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=X6.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const s=this.tokenTheme._match([e].concat(t).join(".")).metadata,r=Yn.getForeground(s),a=Yn.getFontStyle(s);return{foreground:r,italic:!!(a&1),bold:!!(a&2),underline:!!(a&4),strikethrough:!!(a&8)}}}function F1(o){return o===yd||o===_p||o===Uh||o===jh}function LN(o){switch(o){case yd:return zhe;case _p:return $he;case Uh:return Uhe;case jh:return jhe}}function TC(o){const e=LN(o);return new sW(o,e)}class Xhe extends q{constructor(){super(),this._onColorThemeChange=this._register(new W),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new W),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new iW,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(yd,TC(yd)),this._knownThemes.set(_p,TC(_p)),this._knownThemes.set(Uh,TC(Uh)),this._knownThemes.set(jh,TC(jh));const e=this._register(Zhe(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} -${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(yd),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),C7("(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return fw(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=mr(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),q.None}_registerShadowDomContainer(e){const t=mr(e,i=>{i.className="monaco-colors",i.textContent=this._allCSS});return this._styleElements.push(t),{dispose:()=>{for(let i=0;i{i.base===e&&i.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(yd),this._updateActualTheme(t)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=Ai.matchMedia("(forced-colors: active)").matches;if(e!==xa(this._theme.type)){let t;Pp(this._theme.type)?t=e?Uh:_p:t=e?jh:yd,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:r=>{t[r]||(e.push(r),t[r]=!0)}};Yhe.getThemingParticipants().forEach(r=>r(this._theme,i,this._environment));const n=[];for(const r of nW.getColors()){const a=this._theme.getColor(r.id,!0);a&&n.push(`${UM(r.id)}: ${a.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${n.join(` -`)} }`);const s=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(Hhe(s)),this._themeCSS=e.join(` +`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}rL.InstanceCount=0;class Lm extends Gr{constructor(e){super(),this._onChange=this._register(new W),this.onChange=this._onChange.event,this._onKeyDown=this._register(new W),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...Ue.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,i=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),i.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,i=>{if(i.keyCode===10||i.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),i.preventDefault(),i.stopPropagation();return}this._onKeyDown.fire(i)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const wue=p("caseDescription","Match Case"),Sue=p("wordsDescription","Match Whole Word"),yue=p("regexDescription","Use Regular Expression");class I6 extends Lm{constructor(e){super({icon:ve.caseSensitive,title:wue+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class E6 extends Lm{constructor(e){super({icon:ve.wholeWord,title:Sue+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class N6 extends Lm{constructor(e){super({icon:ve.regex,title:yue+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Lue{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class Due{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new Lue(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach(t=>e.push(t)),e}}const Qm=pe;let xue=class extends Gr{constructor(e,t,i){var n;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new W),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new W),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(n=this.options.tooltip)!==null&&n!==void 0?n:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=le(e,Qm(".monaco-inputbox.idle"));const s=this.options.flexibleHeight?"textarea":"input",r=le(this.element,Qm(".ibwrapper"));if(this.input=le(r,Qm(s+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=le(r,Qm("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new K7(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),le(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(d=>this.input.scrollTop=d.scrollTop));const a=this._register(new St(e.ownerDocument,"selectionchange")),l=ye.filter(a.event,()=>{const d=e.ownerDocument.getSelection();return(d==null?void 0:d.anchorNode)===r});this._register(l(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new Cr(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:kh(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return Dy(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){if(this.state==="open"&&Uo(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${Bh(i.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e==null?void 0:e.type}stylesForType(e){const t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const t=()=>e.style.width=zs(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:n=>{var s,r;if(!this.message)return null;e=le(n,Qm(".monaco-inputbox-container")),t();const a={inline:!0,className:"monaco-inputbox-message"},l=this.message.formatContent?Pde(this.message.content,a):Rde(this.message.content,a);l.classList.add(this.classForType(this.message.type));const d=this.stylesForType(this.message.type);return l.style.backgroundColor=(s=d.background)!==null&&s!==void 0?s:"",l.style.color=(r=d.foreground)!==null&&r!==void 0?r:"",l.style.border=d.border?`1px solid ${d.border}`:"",le(e,l),null},onHide:()=>{this.state="closed"},layout:t});let i;this.message.type===3?i=p("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?i=p("alertWarningMessage","Warning: {0}",this.message.content):i=p("alertInfoMessage","Info: {0}",this.message.content),mo(i),this.state="open"}_hideMessage(){this.contextViewProvider&&(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,i=e.charCodeAt(e.length-1)===10?" ":"";(e+i).replace(/\u000c/g,"")?this.mirror.textContent=e+i:this.mirror.innerText=" ",this.layout()}applyStyles(){var e,t,i;const n=this.options.inputBoxStyles,s=(e=n.inputBackground)!==null&&e!==void 0?e:"",r=(t=n.inputForeground)!==null&&t!==void 0?t:"",a=(i=n.inputBorder)!==null&&i!==void 0?i:"";this.element.style.backgroundColor=s,this.element.style.color=r,this.input.style.backgroundColor="inherit",this.input.style.color=r,this.element.style.border=`1px solid ${Bh(a,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=kh(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,s=t.value;i!==null&&n!==null&&(this.value=s.substr(0,i)+e+s.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){var e;this._hideMessage(),this.message=null,(e=this.actionbar)===null||e===void 0||e.dispose(),super.dispose()}};class T6 extends xue{constructor(e,t,i){const n=p({}," or {0} for history","⇅"),s=p({}," ({0} for history)","⇅");super(e,t,i),this._onDidFocus=this._register(new W),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new W),this.onDidBlur=this._onDidBlur.event,this.history=new Due(i.history,100);const r=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(n)&&!this.placeholder.endsWith(s)&&this.history.getHistory().length){const a=this.placeholder.endsWith(")")?n:s,l=this.placeholder+a;i.showPlaceholderOnFocus&&!Dy(this.input)?this.placeholder=l:this.setPlaceHolder(l)}};this.observer=new MutationObserver((a,l)=>{a.forEach(d=>{d.target.textContent||r()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>r()),this.onblur(this.input,()=>{const a=l=>{if(this.placeholder.endsWith(l)){const d=this.placeholder.slice(0,this.placeholder.length-l.length);return i.showPlaceholderOnFocus?this.placeholder=d:this.setPlaceHolder(d),!0}else return!1};a(s)||a(n)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",hu(this.value?this.value:p("clearedInput","Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,hu(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}const kue=p("defaultLabel","input");class M6 extends Gr{constructor(e,t,i){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new An),this.additionalToggles=[],this._onDidOptionChange=this._register(new W),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new W),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new W),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new W),this._onKeyUp=this._register(new W),this._onCaseSensitiveKeyDown=this._register(new W),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new W),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||kue,this.showCommonFindToggles=!!i.showCommonFindToggles;const n=i.appendCaseSensitiveLabel||"",s=i.appendWholeWordsLabel||"",r=i.appendRegexLabel||"",a=i.history||[],l=!!i.flexibleHeight,d=!!i.flexibleWidth,c=i.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new T6(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:a,showHistoryHint:i.showHistoryHint,flexibleHeight:l,flexibleWidth:d,flexibleMaxHeight:c,inputBoxStyles:i.inputBoxStyles})),this.showCommonFindToggles){this.regex=this._register(new N6({appendTitle:r,isChecked:!1,...i.toggleStyles})),this._register(this.regex.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(h=>{this._onRegexKeyDown.fire(h)})),this.wholeWords=this._register(new E6({appendTitle:s,isChecked:!1,...i.toggleStyles})),this._register(this.wholeWords.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new I6({appendTitle:n,isChecked:!1,...i.toggleStyles})),this._register(this.caseSensitive.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(h=>{this._onCaseSensitiveKeyDown.fire(h)}));const u=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){const g=u.indexOf(this.domNode.ownerDocument.activeElement);if(g>=0){let f=-1;h.equals(17)?f=(g+1)%u.length:h.equals(15)&&(g===0?f=u.length-1:f=g-1),h.equals(9)?(u[g].blur(),this.inputBox.focus()):f>=0&&u[f].focus(),ct.stop(h,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(i==null?void 0:i.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e==null||e.appendChild(this.domNode),this._register(J(this.inputBox.inputElement,"compositionstart",u=>{this.imeSessionInProgress=!0})),this._register(J(this.inputBox.inputElement,"compositionend",u=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,u=>this._onKeyDown.fire(u)),this.onkeyup(this.inputBox.inputElement,u=>this._onKeyUp.fire(u)),this.oninput(this.inputBox.inputElement,u=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,u=>this._onMouseDown.fire(u))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){var e,t,i;this.domNode.classList.remove("disabled"),this.inputBox.enable(),(e=this.regex)===null||e===void 0||e.enable(),(t=this.wholeWords)===null||t===void 0||t.enable(),(i=this.caseSensitive)===null||i===void 0||i.enable();for(const n of this.additionalToggles)n.enable()}disable(){var e,t,i;this.domNode.classList.add("disabled"),this.inputBox.disable(),(e=this.regex)===null||e===void 0||e.disable(),(t=this.wholeWords)===null||t===void 0||t.disable(),(i=this.caseSensitive)===null||i===void 0||i.disable();for(const n of this.additionalToggles)n.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(const t of this.additionalToggles)t.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new de;for(const t of e??[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange(i=>{this._onDidOptionChange.fire(i),!i&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){var t,i,n,s,r,a;e?this.inputBox.paddingRight=0:this.inputBox.paddingRight=((i=(t=this.caseSensitive)===null||t===void 0?void 0:t.width())!==null&&i!==void 0?i:0)+((s=(n=this.wholeWords)===null||n===void 0?void 0:n.width())!==null&&s!==void 0?s:0)+((a=(r=this.regex)===null||r===void 0?void 0:r.width())!==null&&a!==void 0?a:0)+this.additionalToggles.reduce((l,d)=>l+d.width(),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var e,t;return(t=(e=this.caseSensitive)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){var e,t;return(t=(e=this.wholeWords)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){var e,t;return(t=(e=this.regex)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){var e;(e=this.caseSensitive)===null||e===void 0||e.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}var Mo;(function(o){o[o.Expanded=0]="Expanded",o[o.Collapsed=1]="Collapsed",o[o.PreserveOrExpanded=2]="PreserveOrExpanded",o[o.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(Mo||(Mo={}));var Rh;(function(o){o[o.Unknown=0]="Unknown",o[o.Twistie=1]="Twistie",o[o.Element=2]="Element",o[o.Filter=3]="Filter"})(Rh||(Rh={}));class Oo extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class UA{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}function jA(o){return typeof o=="object"&&"visibility"in o&&"data"in o}function ab(o){switch(o){case!0:return 1;case!1:return 0;default:return o}}function Ux(o){return typeof o.collapsible=="boolean"}class Iue{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new oM,this._onDidChangeCollapseState=new W,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new W,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new W,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new jr(E8),this.collapseByDefault=typeof n.collapseByDefault>"u"?!1:n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=typeof n.autoExpandSingleChildren>"u"?!1:n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=wt.empty(),n={}){if(e.length===0)throw new Oo(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n,s,r){var a;n===void 0&&(n=wt.empty()),r===void 0&&(r=(a=s.diffDepth)!==null&&a!==void 0?a:0);const{parentNode:l}=this.getParentNodeWithListIndex(t);if(!l.lastDiffIds)return this.spliceSimple(t,i,n,s);const d=[...n],c=t[t.length-1],u=new rl({getElements:()=>l.lastDiffIds},{getElements:()=>[...l.children.slice(0,c),...d,...l.children.slice(c+i)].map(v=>e.getId(v.element).toString())}).ComputeDiff(!1);if(u.quitEarly)return l.lastDiffIds=void 0,this.spliceSimple(t,i,d,s);const h=t.slice(0,-1),g=(v,_,b)=>{if(r>0)for(let C=0;Cb.originalStart-_.originalStart))g(f,m,f-(v.originalStart+v.originalLength)),f=v.originalStart,m=v.modifiedStart-c,this.spliceSimple([...h,f],v.originalLength,wt.slice(d,m,m+v.modifiedLength),s);g(f,m,f)}spliceSimple(e,t,i=wt.empty(),{onDidCreateNode:n,onDidDeleteNode:s,diffIdentityProvider:r}){const{parentNode:a,listIndex:l,revealed:d,visible:c}=this.getParentNodeWithListIndex(e),u=[],h=wt.map(i,y=>this.createTreeNode(y,a,a.visible?1:0,d,u,n)),g=e[e.length-1],f=a.children.length>0;let m=0;for(let y=g;y>=0&&yr.getId(y.element).toString())):a.lastDiffIds=a.children.map(y=>r.getId(y.element).toString()):a.lastDiffIds=void 0;let w=0;for(const y of C)y.visible&&w++;if(w!==0)for(let y=g+v.length;yI+(E.visible?E.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(a,b-y),this.list.splice(l,y,u)}if(C.length>0&&s){const y=I=>{s(I),I.children.forEach(y)};C.forEach(y)}this._onDidSplice.fire({insertedNodes:v,deletedNodes:C});const S=a.children.length>0;f!==S&&this.setCollapsible(e.slice(0,-1),S);let x=a;for(;x;){if(x.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}x=x.parent}}rerender(e){if(e.length===0)throw new Oo(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);typeof t>"u"&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,n))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);typeof t>"u"&&(t=!n.collapsed);const s={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,s))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:s}=this.getTreeNodeWithListIndex(e),r=this._setListNodeCollapseState(i,n,s,t);if(i!==this.root&&this.autoExpandSingleChildren&&r&&!Ux(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let a=-1;for(let l=0;l-1){a=-1;break}else a=l;a>-1&&this._setCollapseState([...e,a],t)}return r}_setListNodeCollapseState(e,t,i,n){const s=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!s)return s;const r=e.renderNodeCount,a=this.updateNodeAfterCollapseChange(e),l=r-(t===-1?0:1);return this.list.splice(t+1,l,a.slice(1)),s}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(Ux(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!Ux(t)&&t.recursive)for(const s of e.children)n=this._setNodeCollapseState(s,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,s,r){const a={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed<"u",collapsed:typeof e.collapsed>"u"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},l=this._filterNode(a,i);a.visibility=l,n&&s.push(a);const d=e.children||wt.empty(),c=n&&l!==0&&!a.collapsed;let u=0,h=1;for(const g of d){const f=this.createTreeNode(g,a,l,c,s,r);a.children.push(f),h+=f.renderNodeCount,f.visible&&(f.visibleChildIndex=u++)}return a.collapsible=a.collapsible||a.children.length>0,a.visibleChildrenCount=u,a.visible=l===2?u>0:l===1,a.visible?a.collapsed||(a.renderNodeCount=h):(a.renderNodeCount=0,n&&s.pop()),r==null||r(a),a}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(e.visible===!1)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let s;if(e!==this.root){if(s=this._filterNode(e,t),s===0)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const r=i.length;e.renderNodeCount=e===this.root?0:1;let a=!1;if(!e.collapsed||s!==0){let l=0;for(const d of e.children)a=this._updateNodeAfterFilterChange(d,s,i,n&&!e.collapsed)||a,d.visible&&(d.visibleChildIndex=l++);e.visibleChildrenCount=l}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=s===2?a:s===1,e.visibility=s),e.visible?e.collapsed||(e.renderNodeCount+=i.length-r):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(t!==0)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return typeof i=="boolean"?(e.filterData=void 0,i?1:0):jA(i)?(e.filterData=i.data,ab(i.visibility)):(e.filterData=void 0,ab(i))}hasTreeNode(e,t=this.root){if(!e||e.length===0)return!0;const[i,...n]=e;return i<0||i>t.children.length?!1:this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||e.length===0)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new Oo(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(e.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:n,visible:s}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new Oo(this.user,"Invalid tree location");const a=t.children[r];return{node:a,listIndex:i,revealed:n,visible:s&&a.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,s=!0){const[r,...a]=e;if(r<0||r>t.children.length)throw new Oo(this.user,"Invalid tree location");for(let l=0;lt.element)),this.data=e}}function jx(o){return o instanceof m0?new Eue(o):o}class Nue{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=q.None,this.disposables=new de}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(i=>i.element),t)}onDragStart(e,t){var i,n;(n=(i=this.dnd).onDragStart)===null||n===void 0||n.call(i,jx(e),t)}onDragOver(e,t,i,n,s=!0){const r=this.dnd.onDragOver(jx(e),t&&t.element,i,n),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),typeof t>"u")return r;if(a&&typeof r!="boolean"&&r.autoExpand&&(this.autoExpandDisposable=lu(()=>{const h=this.modelProvider(),g=h.getNodeLocation(t);h.isCollapsed(g)&&h.setCollapsed(g,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof r=="boolean"||!r.accept||typeof r.bubble>"u"||r.feedback){if(!s){const h=typeof r=="boolean"?r:r.accept,g=typeof r=="boolean"?void 0:r.effect;return{accept:h,effect:g,feedback:[i]}}return r}if(r.bubble===1){const h=this.modelProvider(),g=h.getNodeLocation(t),f=h.getParentNodeLocation(g),m=h.getNode(f),v=f&&h.getListIndex(f);return this.onDragOver(e,m,v,n,!1)}const l=this.modelProvider(),d=l.getNodeLocation(t),c=l.getListIndex(d),u=l.getListRenderCount(d);return{...r,feedback:Ls(c,c+u)}}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(jx(e),t&&t.element,i,n)}onDragEnd(e){var t,i;(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}function Tue(o,e){return e&&{...e,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new Nue(o,e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent({...t,element:t.element})},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent({...t,element:t.element})}},accessibilityProvider:e.accessibilityProvider&&{...e.accessibilityProvider,getSetSize(t){const i=o(),n=i.getNodeLocation(t),s=i.getParentNodeLocation(n);return i.getNode(s).visibleChildrenCount},getPosInSet(t){return t.visibleChildIndex+1},isChecked:e.accessibilityProvider&&e.accessibilityProvider.isChecked?t=>e.accessibilityProvider.isChecked(t.element):void 0,getRole:e.accessibilityProvider&&e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider&&e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider&&e.accessibilityProvider.getAriaLevel?t=>e.accessibilityProvider.getAriaLevel(t.element):t=>t.depth,getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}}}}class KA{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){var i,n;(n=(i=this.delegate).setDynamicHeight)===null||n===void 0||n.call(i,e.element,t)}}var lb;(function(o){o.None="none",o.OnHover="onHover",o.Always="always"})(lb||(lb={}));class Mue{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new de,this.onDidChange=ye.forEach(e,i=>this._elements=i,this.disposables)}dispose(){this.disposables.dispose()}}class db{constructor(e,t,i,n,s,r={}){var a;this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedIndentGuides=s,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=db.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=q.None,this.disposables=new de,this.templateId=e.templateId,this.updateOptions(r),ye.map(i,l=>l.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(a=e.onDidChangeTwistieState)===null||a===void 0||a.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent<"u"){const t=io(e.indent,0,40);if(t!==this.indent){this.indent=t;for(const[i,n]of this.renderedNodes)this.renderTreeElement(i,n)}}if(typeof e.renderIndentGuides<"u"){const t=e.renderIndentGuides!==lb.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(const[i,n]of this.renderedNodes)this._renderIndentGuides(i,n);if(this.indentGuidesDisposable.dispose(),t){const i=new de;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,i),this.indentGuidesDisposable=i,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof e.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=le(e,pe(".monaco-tl-row")),i=le(t,pe(".monaco-tl-indent")),n=le(t,pe(".monaco-tl-twistie")),s=le(t,pe(".monaco-tl-contents")),r=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:n,indentGuidesDisposable:q.None,templateData:r}}renderElement(e,t,i,n){this.renderedNodes.set(e,i),this.renderedElements.set(e.element,e),this.renderTreeElement(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){var s,r;i.indentGuidesDisposable.dispose(),(r=(s=this.renderer).disposeElement)===null||r===void 0||r.call(s,e,t,i.templateData,n),typeof n=="number"&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){const i=db.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${i}px`,t.indent.style.width=`${i+this.indent-16}px`,e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...Ue.asClassNameArray(ve.treeItemExpanded));let n=!1;this.renderer.renderTwistie&&(n=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(n||t.twistie.classList.add(...Ue.asClassNameArray(ve.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if($n(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new de,n=this.modelProvider();for(;;){const s=n.getNodeLocation(e),r=n.getParentNodeLocation(s);if(!r)break;const a=n.getNode(r),l=pe(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(a)&&l.classList.add("active"),t.indent.childElementCount===0?t.indent.appendChild(l):t.indent.insertBefore(l,t.indent.firstElementChild),this.renderedIndentGuides.add(a,l),i.add(je(()=>this.renderedIndentGuides.delete(a,l))),e=a}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach(n=>{const s=i.getNodeLocation(n);try{const r=i.getParentNodeLocation(s);n.collapsible&&n.children.length>0&&!n.collapsed?t.add(n):r&&t.add(i.getNode(r))}catch{}}),this.activeIndentNodes.forEach(n=>{t.has(n)||this.renderedIndentGuides.forEach(n,s=>s.classList.remove("active"))}),t.forEach(n=>{this.activeIndentNodes.has(n)||this.renderedIndentGuides.forEach(n,s=>s.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),jt(this.disposables)}}db.DefaultIndent=8;class Aue{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new de,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let i=1;if(this._filter){const r=this._filter.filter(e,t);if(typeof r=="boolean"?i=r?1:0:jA(r)?i=ab(r.visibility):i=r,i===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:ka.Default,visibility:i};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),s=Array.isArray(n)?n:[n];for(const r of s){const a=r&&r.toString();if(typeof a>"u")return{data:ka.Default,visibility:i};let l;if(this.tree.findMatchType===cg.Contiguous){const d=a.toLowerCase().indexOf(this._lowercasePattern);if(d>-1){l=[Number.MAX_SAFE_INTEGER,0];for(let c=this._lowercasePattern.length;c>0;c--)l.push(d+c-1)}}else l=lg(this._pattern,this._lowercasePattern,0,a,a.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(l)return this._matchCount++,s.length===1?{data:l,visibility:i}:{data:{label:a,score:l},visibility:i}}return this.tree.findMode===yl.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:ka.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){jt(this.disposables)}}var yl;(function(o){o[o.Highlight=0]="Highlight",o[o.Filter=1]="Filter"})(yl||(yl={}));var cg;(function(o){o[o.Fuzzy=0]="Fuzzy",o[o.Contiguous=1]="Contiguous"})(cg||(cg={}));let Rue=class{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,i,n,s,r={}){var a,l;this.tree=e,this.view=i,this.filter=n,this.contextViewProvider=s,this.options=r,this._pattern="",this.width=0,this._onDidChangeMode=new W,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new W,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new W,this._onDidChangeOpenState=new W,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new de,this.disposables=new de,this._mode=(a=e.options.defaultFindMode)!==null&&a!==void 0?a:yl.Highlight,this._matchType=(l=e.options.defaultFindMatchType)!==null&&l!==void 0?l:cg.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){e.defaultFindMode!==void 0&&(this.mode=e.defaultFindMode),e.defaultFindMatchType!==void 0&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){var e,t,i,n;const s=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&s?!((e=this.tree.options.showNotFoundMessage)!==null&&e!==void 0)||e?(t=this.widget)===null||t===void 0||t.showMessage({type:2,content:p("not found","No elements found.")}):(i=this.widget)===null||i===void 0||i.showMessage({type:2}):(n=this.widget)===null||n===void 0||n.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this._mode===yl.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!ka.isDefault(e.filterData)}layout(e){var t;this.width=e,(t=this.widget)===null||t===void 0||t.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}};function Pue(o,e){return o.position===e.position&&o.node.element===e.node.element&&o.startIndex===e.startIndex&&o.height===e.height&&o.endIndex===e.endIndex}class Oue extends q{constructor(e=[]){super(),this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return Bi(this.stickyNodes,e.stickyNodes,Pue)}addDisposable(e){this._register(e)}}let YF=class extends q{get firstVisibleNode(){const e=this.view.firstVisibleIndex;if(!(e<0||e>=this.view.length))return this.view.element(e)}constructor(e,t,i,n,s,r={}){super(),this.tree=e,this.model=t,this.view=i,this.treeDelegate=s,this.maxWidgetViewRatio=.4;const a=this.validateStickySettings(r);this.stickyScrollMaxItemCount=a.stickyScrollMaxItemCount,this._widget=this._register(new Fue(i.getScrollableElement(),i,t,n,s)),this._register(i.onDidScroll(()=>this.update())),this._register(i.onDidChangeContentHeight(()=>this.update())),this._register(e.onDidChangeCollapseState(()=>this.update())),this.update()}update(){const e=this.firstVisibleNode;if(!e||this.tree.scrollTop===0){this._widget.setState(void 0);return}const t=this.findStickyState(e);this._widget.setState(t)}findStickyState(e){const t=[],i=this.view.renderHeight*this.maxWidgetViewRatio;let n=e,s=0,r=this.getNextStickyNode(n,void 0,s);for(;r&&s+r.height=this.stickyScrollMaxItemCount||(n=this.getNextVisibleNode(n),!n)));)r=this.getNextStickyNode(n,r.node,s);return t.length?new Oue(t):void 0}getNextVisibleNode(e){const t=this.getNodeIndex(e);return t===-1||t===this.view.length-1?void 0:this.view.element(t+1)}getNextStickyNode(e,t,i){const n=this.getAncestorUnderPrevious(e,t);if(n&&!(n===e&&(!this.nodeIsUncollapsedParent(e)||this.nodeTopAlignsWithStickyNodesBottom(e,i))))return this.createStickyScrollNode(n,i)}nodeTopAlignsWithStickyNodesBottom(e,t){const i=this.getNodeIndex(e),n=this.view.getElementTop(i),s=t;return this.view.scrollTop===n-s}createStickyScrollNode(e,t){const i=this.treeDelegate.getHeight(e),{startIndex:n,endIndex:s}=this.getNodeRange(e),r=this.calculateStickyNodePosition(s,t);return{node:e,position:r,height:i,startIndex:n,endIndex:s}}getAncestorUnderPrevious(e,t=void 0){let i=e,n=this.getParentNode(i);for(;n;){if(n===t)return i;i=n,n=this.getParentNode(i)}if(t===void 0)return i}calculateStickyNodePosition(e,t){let i=this.view.getRelativeTop(e);if(i===null&&this.view.firstVisibleIndex===e&&e+1r&&t<=a?r:t}getParentNode(e){const t=this.model.getNodeLocation(e),i=this.model.getParentNodeLocation(t);return i?this.model.getNode(i):void 0}nodeIsUncollapsedParent(e){const t=this.model.getNodeLocation(e);return this.model.getListRenderCount(t)>1}getNodeIndex(e,t){return t===void 0&&(t=this.model.getNodeLocation(e)),this.model.getListIndex(t)}getNodeRange(e){const t=this.model.getNodeLocation(e),i=this.model.getListIndex(t);if(i<0)throw new Error("Node not found in tree");const n=this.model.getListRenderCount(t),s=i+n-1;return{startIndex:i,endIndex:s}}nodePositionTopBelowWidget(e){const t=[];let i=this.getParentNode(e);for(;i;)t.push(i),i=this.getParentNode(i);let n=0;for(let s=0;s0,n=!!e&&e.count>0;if(!i&&!n||i&&n&&this._previousState.equal(e)||(i!==n&&this.setVisible(n),(t=this._previousState)===null||t===void 0||t.dispose(),this._previousState=e,!n))return;for(let a=e.count-1;a>=0;a--){const l=e.stickyNodes[a],d=a?e.stickyNodes[a-1]:void 0,c=d?d.position+d.height:0,{element:u,disposable:h}=this.createElement(l,c);this._rootDomNode.appendChild(u),e.addDisposable(h)}const s=pe(".monaco-tree-sticky-container-shadow");this._rootDomNode.appendChild(s),e.addDisposable(je(()=>s.remove()));const r=e.stickyNodes[e.count-1];this._rootDomNode.style.height=`${r.position+r.height}px`}createElement(e,t){const i=this.model.getNodeLocation(e.node),n=this.model.getListIndex(i),s=document.createElement("div");s.style.top=`${e.position}px`,s.style.height=`${e.height}px`,s.style.lineHeight=`${e.height}px`,s.classList.add("monaco-tree-sticky-row"),s.classList.add("monaco-list-row"),s.setAttribute("data-index",`${n}`),s.setAttribute("data-parity",n%2===0?"even":"odd"),s.setAttribute("id",this.view.getElementID(n));const r=this.treeDelegate.getTemplateId(e.node),a=this.treeRenderers.find(u=>u.templateId===r);if(!a)throw new Error(`No renderer found for template id ${r}`);const l=new Proxy(e.node,{}),d=a.renderTemplate(s);a.renderElement(l,e.startIndex,d,e.height);const c=je(()=>{a.disposeElement(l,e.startIndex,d,e.height),a.disposeTemplate(d),s.remove()});return{element:s,disposable:c}}setVisible(e){this._rootDomNode.style.display=e?"block":"none"}dispose(){var e;(e=this._previousState)===null||e===void 0||e.dispose(),this._rootDomNode.remove()}};function XF(o){let e=Rh.Unknown;return UD(o.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=Rh.Twistie:UD(o.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?e=Rh.Element:UD(o.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(e=Rh.Filter),{browserEvent:o.browserEvent,element:o.element?o.element.element:null,target:e}}function A1(o,e){e(o),o.children.forEach(t=>A1(t,e))}class Kx{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new W,this.onDidChange=this._onDidChange.event}set(e,t){!(t!=null&&t.__forceEvent)&&Bi(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const n=this;this._onDidChange.fire({get elements(){return n.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const l=this.createNodeSet(),d=c=>l.delete(c);t.forEach(c=>A1(c,d)),this.set([...l.values()]);return}const i=new Set,n=l=>i.add(this.identityProvider.getId(l.element).toString());t.forEach(l=>A1(l,n));const s=new Map,r=l=>s.set(this.identityProvider.getId(l.element).toString(),l);e.forEach(l=>A1(l,r));const a=[];for(const l of this.nodes){const d=this.identityProvider.getId(l.element).toString();if(!i.has(d))a.push(l);else{const u=s.get(d);u&&u.visible&&a.push(u)}}if(this.nodes.length>0&&a.length===0){const l=this.getFirstViewElementWithTrait();l&&a.push(l)}this._set(a,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class Bue extends C6{constructor(e,t,i){super(e),this.tree=t,this.stickyScrollProvider=i}onViewPointer(e){if(m6(e.browserEvent.target)||qc(e.browserEvent.target)||k_(e.browserEvent.target)||e.browserEvent.isHandledByList)return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,s=vce(e.browserEvent.target);let r=!1;if(s?r=!0:typeof this.tree.expandOnlyOnTwistieClick=="function"?r=this.tree.expandOnlyOnTwistieClick(t.element):r=!!this.tree.expandOnlyOnTwistieClick,s)this.handleStickyScrollMouseEvent(e,t);else{if(r&&!n&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e)}if(t.collapsible&&(!s||n)){const a=this.tree.getNodeLocation(t),l=e.browserEvent.altKey;if(this.tree.setFocus([a]),this.tree.toggleCollapsed(a,l),r&&n){e.browserEvent.isHandledByList=!0;return}}s||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,t){if(mce(e.browserEvent.target)||_ce(e.browserEvent.target))return;const i=this.stickyScrollProvider();if(!i)throw new Error("Sticky scroll controller not found");const n=this.list.indexOf(t),s=this.list.getElementTop(n),r=i.nodePositionTopBelowWidget(t);this.tree.scrollTop=s-r,this.list.setFocus([n]),this.list.setSelection([n])}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||e.browserEvent.isHandledByList||super.onDoubleClick(e)}}class Wue extends Yr{constructor(e,t,i,n,s,r,a,l){super(e,t,i,n,l),this.focusTrait=s,this.selectionTrait=r,this.anchorTrait=a}createMouseController(e){return new Bue(this,e.tree,e.stickyScrollProvider)}splice(e,t,i=[]){if(super.splice(e,t,i),i.length===0)return;const n=[],s=[];let r;i.forEach((a,l)=>{this.focusTrait.has(a)&&n.push(e+l),this.selectionTrait.has(a)&&s.push(e+l),this.anchorTrait.has(a)&&(r=e+l)}),n.length>0&&super.setFocus(iu([...super.getFocus(),...n])),s.length>0&&super.setSelection(iu([...super.getSelection(),...s])),typeof r=="number"&&super.setAnchor(r)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map(n=>this.element(n)),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map(n=>this.element(n)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(typeof e>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class A6{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return ye.filter(ye.map(this.view.onMouseDblClick,XF),e=>e.target!==Rh.Filter)}get onPointer(){return ye.map(this.view.onPointer,XF)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return ye.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e,t;return(t=(e=this.findController)===null||e===void 0?void 0:e.mode)!==null&&t!==void 0?t:yl.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){var e,t;return(t=(e=this.findController)===null||e===void 0?void 0:e.matchType)!==null&&t!==void 0?t:cg.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,i,n,s={}){var r;this._user=e,this._options=s,this.eventBufferer=new oM,this.onDidChangeFindOpenState=ye.None,this.disposables=new de,this._onWillRefilter=new W,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new W,this.treeDelegate=new KA(i);const a=new FP,l=new FP,d=this.disposables.add(new Mue(l.event)),c=new PM;this.renderers=n.map(m=>new db(m,()=>this.model,a.event,d,c,s));for(const m of this.renderers)this.disposables.add(m);let u;s.keyboardNavigationLabelProvider&&(u=new Aue(this,s.keyboardNavigationLabelProvider,s.filter),s={...s,filter:u},this.disposables.add(u)),this.focus=new Kx(()=>this.view.getFocusedElements()[0],s.identityProvider),this.selection=new Kx(()=>this.view.getSelectedElements()[0],s.identityProvider),this.anchor=new Kx(()=>this.view.getAnchorElement(),s.identityProvider),this.view=new Wue(e,t,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...Tue(()=>this.model,s),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(e,this.view,s),a.input=this.model.onDidChangeCollapseState;const h=ye.forEach(this.model.onDidSplice,m=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(m),this.selection.onDidModelSplice(m)})},this.disposables);h(()=>null,null,this.disposables);const g=this.disposables.add(new W),f=this.disposables.add(new jr(0));if(this.disposables.add(ye.any(h,this.focus.onDidChange,this.selection.onDidChange)(()=>{f.trigger(()=>{const m=new Set;for(const v of this.focus.getNodes())m.add(v);for(const v of this.selection.getNodes())m.add(v);g.fire([...m.values()])})})),l.input=g.event,s.keyboardSupport!==!1){const m=ye.chain(this.view.onKeyDown,v=>v.filter(_=>!qc(_.target)).map(_=>new gi(_)));ye.chain(m,v=>v.filter(_=>_.keyCode===15))(this.onLeftArrow,this,this.disposables),ye.chain(m,v=>v.filter(_=>_.keyCode===17))(this.onRightArrow,this,this.disposables),ye.chain(m,v=>v.filter(_=>_.keyCode===10))(this.onSpace,this,this.disposables)}if((!((r=s.findWidgetEnabled)!==null&&r!==void 0)||r)&&s.keyboardNavigationLabelProvider&&s.contextViewProvider){const m=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new Rue(this,this.model,this.view,u,s.contextViewProvider,m),this.focusNavigationFilter=v=>this.findController.shouldAllowFocus(v),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=ye.None,this.onDidChangeFindMatchType=ye.None;s.enableStickyScroll&&(this.stickyScrollController=new YF(this,this.model,this.view,this.renderers,this.treeDelegate,s)),this.styleElement=mr(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===lb.Always)}updateOptions(e={}){var t;this._options={...this._options,...e};for(const i of this.renderers)i.updateOptions(e);this.view.updateOptions(this._options),(t=this.findController)===null||t===void 0||t.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===lb.Always)}get options(){return this._options}updateStickyScroll(e){var t;!this.stickyScrollController&&this._options.enableStickyScroll?this.stickyScrollController=new YF(this,this.model,this.view,this.renderers,this.treeDelegate,this._options):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.stickyScrollController.dispose(),this.stickyScrollController=void 0),(t=this.stickyScrollController)===null||t===void 0||t.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}domFocus(){this.view.domFocus()}layout(e,t){var i;this.view.layout(e,t),nu(t)&&((i=this.findController)===null||i===void 0||i.layout(t))}style(e){const t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),e.listBackground&&(i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${e.listBackground}; }`),i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${e.listBackground}; }`)),this.styleElement.textContent=i.join(` +`),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const i=e.map(s=>this.model.getNode(s));this.selection.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map(s=>this.model.getNode(s));this.focus.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setFocus(n,t,!0)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);if(i!==-1)if(!this.stickyScrollController)this.view.reveal(i,t);else{const n=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(i,t,n)}}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const r=this.model.getParentNodeLocation(n);if(!r)return;const a=this.model.getListIndex(r);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some(l=>l.visible))return;const[r]=this.view.getFocus(),a=r+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}dispose(){var e;jt(this.disposables),(e=this.stickyScrollController)===null||e===void 0||e.dispose(),this.view.dispose()}}class qA{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new Iue(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare(n,s){return i.sorter.compare(n.element,s.element)}}),this.identityProvider=i.identityProvider}setChildren(e,t=wt.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=wt.empty(),i){const n=new Set,s=new Set,r=l=>{var d;if(l.element===null)return;const c=l;if(n.add(c.element),this.nodes.set(c.element,c),this.identityProvider){const u=this.identityProvider.getId(c.element).toString();s.add(u),this.nodesByIdentity.set(u,c)}(d=i.onDidCreateNode)===null||d===void 0||d.call(i,c)},a=l=>{var d;if(l.element===null)return;const c=l;if(n.has(c.element)||this.nodes.delete(c.element),this.identityProvider){const u=this.identityProvider.getId(c.element).toString();s.has(u)||this.nodesByIdentity.delete(u)}(d=i.onDidDeleteNode)===null||d===void 0||d.call(i,c)};this.model.splice([...e,0],Number.MAX_VALUE,t,{...i,onDidCreateNode:r,onDidDeleteNode:a})}preserveCollapseState(e=wt.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),wt.map(e,t=>{let i=this.nodes.get(t.element);if(!i&&this.identityProvider){const r=this.identityProvider.getId(t.element).toString();i=this.nodesByIdentity.get(r)}if(!i){let r;return typeof t.collapsed>"u"?r=void 0:t.collapsed===Mo.Collapsed||t.collapsed===Mo.PreserveOrCollapsed?r=!0:t.collapsed===Mo.Expanded||t.collapsed===Mo.PreserveOrExpanded?r=!1:r=!!t.collapsed,{...t,children:this.preserveCollapseState(t.children),collapsed:r}}const n=typeof t.collapsible=="boolean"?t.collapsible:i.collapsible;let s;return typeof t.collapsed>"u"||t.collapsed===Mo.PreserveOrCollapsed||t.collapsed===Mo.PreserveOrExpanded?s=i.collapsed:t.collapsed===Mo.Collapsed?s=!0:t.collapsed===Mo.Expanded?s=!1:s=!!t.collapsed,{...t,collapsible:n,collapsed:s,children:this.preserveCollapseState(t.children)}})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new Oo(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new Oo(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new Oo(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(e===null)return[];const t=this.nodes.get(e);if(!t)throw new Oo(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function R1(o){const e=[o.element],t=o.incompressible||!1;return{element:{elements:e,incompressible:t},children:wt.map(wt.from(o.children),R1),collapsible:o.collapsible,collapsed:o.collapsed}}function P1(o){const e=[o.element],t=o.incompressible||!1;let i,n;for(;[n,i]=wt.consume(wt.from(o.children),2),!(n.length!==1||n[0].incompressible);)o=n[0],e.push(o.element);return{element:{elements:e,incompressible:t},children:wt.map(wt.concat(n,i),P1),collapsible:o.collapsible,collapsed:o.collapsed}}function uN(o,e=0){let t;return euN(i,0)),e===0&&o.element.incompressible?{element:o.element.elements[e],children:t,incompressible:!0,collapsible:o.collapsible,collapsed:o.collapsed}:{element:o.element.elements[e],children:t,collapsible:o.collapsible,collapsed:o.collapsed}}function QF(o){return uN(o,0)}function R6(o,e,t){return o.element===e?{...o,children:t}:{...o,children:wt.map(wt.from(o.children),i=>R6(i,e,t))}}const Vue=o=>({getId(e){return e.elements.map(t=>o.getId(t).toString()).join("\0")}});class Hue{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new qA(e,t,i),this.enabled=typeof i.compressionEnabled>"u"?!0:i.compressionEnabled,this.identityProvider=i.identityProvider}setChildren(e,t=wt.empty(),i){const n=i.diffIdentityProvider&&Vue(i.diffIdentityProvider);if(e===null){const f=wt.map(t,this.enabled?P1:R1);this._setChildren(null,f,{diffIdentityProvider:n,diffDepth:1/0});return}const s=this.nodes.get(e);if(!s)throw new Oo(this.user,"Unknown compressed tree node");const r=this.model.getNode(s),a=this.model.getParentNodeLocation(s),l=this.model.getNode(a),d=QF(r),c=R6(d,e,t),u=(this.enabled?P1:R1)(c),h=i.diffIdentityProvider?(f,m)=>i.diffIdentityProvider.getId(f)===i.diffIdentityProvider.getId(m):void 0;if(Bi(u.element.elements,r.element.elements,h)){this._setChildren(s,u.children||wt.empty(),{diffIdentityProvider:n,diffDepth:1});return}const g=l.children.map(f=>f===r?u:f);this._setChildren(l.element,g,{diffIdentityProvider:n,diffDepth:r.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const i=this.model.getNode().children,n=wt.map(i,QF),s=wt.map(n,e?P1:R1);this._setChildren(null,s,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set,s=a=>{for(const l of a.element.elements)n.add(l),this.nodes.set(l,a.element)},r=a=>{for(const l of a.element.elements)n.has(l)||this.nodes.delete(l)};this.model.setChildren(e,t,{...i,onDidCreateNode:s,onDidDeleteNode:r})}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(typeof e>"u")return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return t===null?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return i===null?null:i.elements[i.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(e===null)return null;const t=this.nodes.get(e);if(!t)throw new Oo(this.user,`Tree element not found: ${e}`);return t}}const zue=o=>o[o.length-1];class GA{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new GA(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}}function $ue(o,e){return{splice(t,i,n){e.splice(t,i,n.map(s=>o.map(s)))},updateElementHeight(t,i){e.updateElementHeight(t,i)}}}function Uue(o,e){return{...e,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(o(t))}},sorter:e.sorter&&{compare(t,i){return e.sorter.compare(t.elements[0],i.elements[0])}},filter:e.filter&&{filter(t,i){return e.filter.filter(o(t),i)}}}}class jue{get onDidSplice(){return ye.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(i=>this.nodeMapper.map(i)),deletedNodes:t.map(i=>this.nodeMapper.map(i))}))}get onDidChangeCollapseState(){return ye.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return ye.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||zue;const n=s=>this.elementMapper(s.elements);this.nodeMapper=new UA(s=>new GA(n,s)),this.model=new Hue(e,$ue(this.nodeMapper,t),Uue(n,i))}setChildren(e,t=wt.empty(),i={}){this.model.setChildren(e,t,i)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return t===null||typeof t>"u"?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var Kue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};class ZA extends A6{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,i,n,s={}){super(e,t,i,n,s),this.user=e}setChildren(e,t=wt.empty(),i){this.model.setChildren(e,t,i)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new qA(e,t,i)}}class P6{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){const s=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);s.element.elements.length===1?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=s,this.renderer.renderCompressedElements(s,t,i.data,n))}disposeElement(e,t,i,n){var s,r,a,l;i.compressedTreeNode?(r=(s=this.renderer).disposeCompressedElements)===null||r===void 0||r.call(s,i.compressedTreeNode,t,i.data,n):(l=(a=this.renderer).disposeElement)===null||l===void 0||l.call(a,e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return this.renderer.renderTwistie?this.renderer.renderTwistie(e,t):!1}}Kue([nn],P6.prototype,"compressedTreeNodeProvider",null);function que(o,e){return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(t){let i;try{i=o().getCompressedTreeNode(t)}catch{return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t)}return i.element.elements.length===1?e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t):e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.element.elements)}}}}class O6 extends ZA{constructor(e,t,i,n,s={}){const r=()=>this,a=n.map(l=>new P6(r,l));super(e,t,i,a,que(r,s))}setChildren(e,t=wt.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new jue(e,t,i)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled<"u"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}function qx(o){return{...o,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function hN(o,e){return e.parent?e.parent===o?!0:hN(o,e.parent):!1}function Gue(o,e){return o===e||hN(o,e)||hN(e,o)}class YA{get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new YA(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class Zue{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...Ue.asClassNameArray(ve.treeItemLoading)),!0):(t.classList.remove(...Ue.asClassNameArray(ve.treeItemLoading)),!1)}disposeElement(e,t,i,n){var s,r;(r=(s=this.renderer).disposeElement)===null||r===void 0||r.call(s,this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function JF(o){return{browserEvent:o.browserEvent,elements:o.elements.map(e=>e.element)}}function e5(o){return{browserEvent:o.browserEvent,element:o.element&&o.element.element,target:o.target}}class Yue extends m0{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}}function Gx(o){return o instanceof m0?new Yue(o):o}class Xue{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(i=>i.element),t)}onDragStart(e,t){var i,n;(n=(i=this.dnd).onDragStart)===null||n===void 0||n.call(i,Gx(e),t)}onDragOver(e,t,i,n,s=!0){return this.dnd.onDragOver(Gx(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(Gx(e),t&&t.element,i,n)}onDragEnd(e){var t,i;(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}dispose(){this.dnd.dispose()}}function F6(o){return o&&{...o,collapseByDefault:!0,identityProvider:o.identityProvider&&{getId(e){return o.identityProvider.getId(e.element)}},dnd:o.dnd&&new Xue(o.dnd),multipleSelectionController:o.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return o.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element})},isSelectionRangeChangeEvent(e){return o.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})}},accessibilityProvider:o.accessibilityProvider&&{...o.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:o.accessibilityProvider.getRole?e=>o.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:o.accessibilityProvider.isChecked?e=>{var t;return!!(!((t=o.accessibilityProvider)===null||t===void 0)&&t.isChecked(e.element))}:void 0,getAriaLabel(e){return o.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return o.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:o.accessibilityProvider.getWidgetRole?()=>o.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:o.accessibilityProvider.getAriaLevel&&(e=>o.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:o.accessibilityProvider.getActiveDescendantId&&(e=>o.accessibilityProvider.getActiveDescendantId(e.element))},filter:o.filter&&{filter(e,t){return o.filter.filter(e.element,t)}},keyboardNavigationLabelProvider:o.keyboardNavigationLabelProvider&&{...o.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(e){return o.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof o.expandOnlyOnTwistieClick>"u"?void 0:typeof o.expandOnlyOnTwistieClick!="function"?o.expandOnlyOnTwistieClick:e=>o.expandOnlyOnTwistieClick(e.element),defaultFindVisibility:e=>e.hasChildren&&e.stale?1:typeof o.defaultFindVisibility=="number"?o.defaultFindVisibility:typeof o.defaultFindVisibility>"u"?2:o.defaultFindVisibility(e.element)}}function gN(o,e){e(o),o.children.forEach(t=>gN(t,e))}class B6{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return ye.map(this.tree.onDidChangeFocus,JF)}get onDidChangeSelection(){return ye.map(this.tree.onDidChangeSelection,JF)}get onMouseDblClick(){return ye.map(this.tree.onMouseDblClick,e5)}get onPointer(){return ye.map(this.tree.onPointer,e5)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,i,n,s,r={}){this.user=e,this.dataSource=s,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new W,this._onDidChangeNodeSlowState=new W,this.nodeMapper=new UA(a=>new YA(a)),this.disposables=new de,this.identityProvider=r.identityProvider,this.autoExpandSingleChildren=typeof r.autoExpandSingleChildren>"u"?!1:r.autoExpandSingleChildren,this.sorter=r.sorter,this.getDefaultCollapseState=a=>r.collapseByDefault?r.collapseByDefault(a)?Mo.PreserveOrCollapsed:Mo.PreserveOrExpanded:void 0,this.tree=this.createTree(e,t,i,n,r),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.root=qx({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,t,i,n,s){const r=new KA(i),a=n.map(d=>new Zue(d,this.nodeMapper,this._onDidChangeNodeSlowState.event)),l=F6(s)||{};return new ZA(e,t,r,a,l)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,t){this.refreshPromises.forEach(n=>n.cancel()),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};await this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&typeof t.scrollTop=="number"&&(this.scrollTop=t.scrollTop)}async _updateChildren(e=this.root.element,t=!0,i=!1,n,s){if(typeof this.root.element>"u")throw new Oo(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await ye.toPromise(this._onDidRender.event));const r=this.getDataNode(e);if(await this.refreshAndRenderNode(r,t,n,s),i)try{this.tree.rerender(r)}catch{}}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}async expand(e,t=!1){if(typeof this.root.element>"u")throw new Oo(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await ye.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i)||(i.refreshPromise&&(await this.root.refreshPromise,await ye.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i)))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(await this.root.refreshPromise,await ye.toPromise(this._onDidRender.event)),n}setSelection(e,t){const i=e.map(n=>this.getDataNode(n));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map(t=>t.element)}setFocus(e,t){const i=e.map(n=>this.getDataNode(n));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map(t=>t.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new Oo(this.user,`Data tree node not found: ${e}`);return t}async refreshAndRenderNode(e,t,i,n){await this.refreshNode(e,t,i),this.render(e,i,n)}async refreshNode(e,t,i){let n;if(this.subTreeRefreshPromises.forEach((s,r)=>{!n&&Gue(r,e)&&(n=s.then(()=>this.refreshNode(e,t,i)))}),n)return n;if(e!==this.root&&this.tree.getNode(e).collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0;return}return this.doRefreshSubTree(e,t,i)}async doRefreshSubTree(e,t,i){let n;e.refreshPromise=new Promise(s=>n=s),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{const s=await this.doRefreshNode(e,t,i);e.stale=!1,await FI.settled(s.map(r=>this.doRefreshSubTree(r,t,i)))}finally{n()}}async doRefreshNode(e,t,i){e.hasChildren=!!this.dataSource.hasChildren(e.element);let n;if(!e.hasChildren)n=Promise.resolve(wt.empty());else{const s=this.doGetChildren(e);if(TP(s))n=Promise.resolve(s);else{const r=au(800);r.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},a=>null),n=s.finally(()=>r.cancel())}}try{const s=await n;return this.setChildren(e,s,t,i)}catch(s){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),Fa(s))return[];throw s}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const i=this.dataSource.getChildren(e.element);return TP(i)?this.processChildren(i):(t=_n(async()=>this.processChildren(await i)),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){e.element!==null&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(nt))}setChildren(e,t,i,n){const s=[...t];if(e.children.length===0&&s.length===0)return[];const r=new Map,a=new Map;for(const c of e.children)r.set(c.element,c),this.identityProvider&&a.set(c.id,{node:c,collapsed:this.tree.hasElement(c)&&this.tree.isCollapsed(c)});const l=[],d=s.map(c=>{const u=!!this.dataSource.hasChildren(c);if(!this.identityProvider){const m=qx({element:c,parent:e,hasChildren:u,defaultCollapseState:this.getDefaultCollapseState(c)});return u&&m.defaultCollapseState===Mo.PreserveOrExpanded&&l.push(m),m}const h=this.identityProvider.getId(c).toString(),g=a.get(h);if(g){const m=g.node;return r.delete(m.element),this.nodes.delete(m.element),this.nodes.set(c,m),m.element=c,m.hasChildren=u,i?g.collapsed?(m.children.forEach(v=>gN(v,_=>this.nodes.delete(_.element))),m.children.splice(0,m.children.length),m.stale=!0):l.push(m):u&&!g.collapsed&&l.push(m),m}const f=qx({element:c,parent:e,id:h,hasChildren:u,defaultCollapseState:this.getDefaultCollapseState(c)});return n&&n.viewState.focus&&n.viewState.focus.indexOf(h)>-1&&n.focus.push(f),n&&n.viewState.selection&&n.viewState.selection.indexOf(h)>-1&&n.selection.push(f),(n&&n.viewState.expanded&&n.viewState.expanded.indexOf(h)>-1||u&&f.defaultCollapseState===Mo.PreserveOrExpanded)&&l.push(f),f});for(const c of r.values())gN(c,u=>this.nodes.delete(u.element));for(const c of d)this.nodes.set(c.element,c);return e.children.splice(0,e.children.length,...d),e!==this.root&&this.autoExpandSingleChildren&&d.length===1&&l.length===0&&(d[0].forceExpanded=!0,l.push(d[0])),l}render(e,t,i){const n=e.children.map(r=>this.asTreeElement(r,t)),s=i&&{...i,diffIdentityProvider:i.diffIdentityProvider&&{getId(r){return i.diffIdentityProvider.getId(r.element)}}};this.tree.setChildren(e===this.root?null:e,n,s),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?i=!1:e.forceExpanded?(i=!1,e.forceExpanded=!1):i=e.defaultCollapseState,{element:e,children:e.hasChildren?wt.map(e.children,n=>this.asTreeElement(n,t)):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}}class XA{get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new XA(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class Que{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...Ue.asClassNameArray(ve.treeItemLoading)),!0):(t.classList.remove(...Ue.asClassNameArray(ve.treeItemLoading)),!1)}disposeElement(e,t,i,n){var s,r;(r=(s=this.renderer).disposeElement)===null||r===void 0||r.call(s,this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){var s,r;(r=(s=this.renderer).disposeCompressedElements)===null||r===void 0||r.call(s,this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=jt(this.disposables)}}function Jue(o){const e=o&&F6(o);return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(t){return o.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(i=>i.element))}}}}class ehe extends B6{constructor(e,t,i,n,s,r,a={}){super(e,t,i,s,r,a),this.compressionDelegate=n,this.compressibleNodeMapper=new UA(l=>new XA(l)),this.filter=a.filter}createTree(e,t,i,n,s){const r=new KA(i),a=n.map(d=>new Que(d,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),l=Jue(s)||{};return new O6(e,t,r,a,l)}asTreeElement(e,t){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,t)}}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const i=h=>this.identityProvider.getId(h).toString(),n=h=>{const g=new Set;for(const f of h){const m=this.tree.getCompressedTreeNode(f===this.root?null:f);if(m.element)for(const v of m.element.elements)g.add(i(v.element))}return g},s=n(this.tree.getSelection()),r=n(this.tree.getFocus());super.render(e,t);const a=this.getSelection();let l=!1;const d=this.getFocus();let c=!1;const u=h=>{const g=h.element;if(g)for(let f=0;f{const i=this.filter.filter(t,1),n=the(i);if(n===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return n===1})),super.processChildren(e)}}function the(o){return typeof o=="boolean"?o?1:0:jA(o)?ab(o.visibility):ab(o)}class ihe extends A6{constructor(e,t,i,n,s,r={}){super(e,t,i,n,r),this.user=e,this.dataSource=s,this.identityProvider=r.identityProvider}createModel(e,t,i){return new qA(e,t,i)}}new De("isMac",It,p("isMac","Whether the operating system is macOS"));new De("isLinux",ws,p("isLinux","Whether the operating system is Linux"));const aL=new De("isWindows",is,p("isWindows","Whether the operating system is Windows")),W6=new De("isWeb",Tu,p("isWeb","Whether the platform is a web browser"));new De("isMacNative",It&&!Tu,p("isMacNative","Whether the operating system is macOS on a non-browser platform"));new De("isIOS",Ea,p("isIOS","Whether the operating system is iOS"));new De("isMobile",CG,p("isMobile","Whether the platform is a mobile web browser"));new De("isDevelopment",!1,!0);new De("productQualityType","",p("productQualityType","Quality type of VS Code"));const V6="inputFocus";new De(V6,!1,p("inputFocus","Whether keyboard focus is inside an input box"));let xo;const Zx=globalThis.vscode;if(typeof Zx<"u"&&typeof Zx.context<"u"){const o=Zx.context.configuration();if(o)xo=o.product;else throw new Error("Sandbox: unable to resolve product configuration from preload script.")}else if(globalThis._VSCODE_PRODUCT_JSON&&globalThis._VSCODE_PACKAGE_JSON){if(xo=globalThis._VSCODE_PRODUCT_JSON,sw.VSCODE_DEV&&Object.assign(xo,{nameShort:`${xo.nameShort} Dev`,nameLong:`${xo.nameLong} Dev`,dataFolderName:`${xo.dataFolderName}-dev`,serverDataFolderName:xo.serverDataFolderName?`${xo.serverDataFolderName}-dev`:void 0}),!xo.version){const o=globalThis._VSCODE_PACKAGE_JSON;Object.assign(xo,{version:o.version})}}else xo={},Object.keys(xo).length===0&&Object.assign(xo,{version:"1.82.0-dev",nameShort:"Code - OSS Dev",nameLong:"Code - OSS Dev",applicationName:"code-oss",dataFolderName:".vscode-oss",urlProtocol:"code-oss",reportIssueUrl:"https://github.com/microsoft/vscode/issues/new",licenseName:"MIT",licenseUrl:"https://github.com/microsoft/vscode/blob/main/LICENSE.txt",serverLicenseUrl:"https://github.com/microsoft/vscode/blob/main/LICENSE.txt"});const t5=xo;var Yd=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},di=function(o,e){return function(t,i){e(t,i,o)}};const Lr=bt("listService");class nhe{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new de,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){var t,i;e!==this._lastFocusedWidget&&((t=this._lastFocusedWidget)===null||t===void 0||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,(i=this._lastFocusedWidget)===null||i===void 0||i.getHTMLElement().classList.add("last-focused"))}register(e,t){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new w6(mr(),"").style(Fg)),this.lists.some(n=>n.widget===e))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),Dy(e.getHTMLElement())&&this.setLastFocusedList(e),Hr(e.onDidFocus(()=>this.setLastFocusedList(e)),je(()=>this.lists.splice(this.lists.indexOf(i),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(n=>n!==i),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}}const cb=new De("listScrollAtBoundary","none");ae.or(cb.isEqualTo("top"),cb.isEqualTo("both"));ae.or(cb.isEqualTo("bottom"),cb.isEqualTo("both"));const H6=new De("listFocus",!0),lL=new De("listSupportsMultiselect",!0),z6=ae.and(H6,ae.not(V6)),QA=new De("listHasSelectionOrFocus",!1),JA=new De("listDoubleSelection",!1),eR=new De("listMultiSelection",!1),dL=new De("listSelectionNavigation",!1),she=new De("listSupportsFind",!0),tR=new De("treeElementCanCollapse",!1),ohe=new De("treeElementHasParent",!1),iR=new De("treeElementCanExpand",!1),rhe=new De("treeElementHasChild",!1),ahe=new De("treeFindOpen",!1),$6="listTypeNavigationMode",U6="listAutomaticKeyboardNavigation";function cL(o,e){const t=o.createScoped(e.getHTMLElement());return H6.bindTo(t),t}function uL(o,e){const t=cb.bindTo(o),i=()=>{const n=e.scrollTop===0,s=e.scrollHeight-e.renderHeight-e.scrollTop<1;n&&s?t.set("both"):n?t.set("top"):s?t.set("bottom"):t.set("none")};return i(),e.onDidScroll(i)}const Bg="workbench.list.multiSelectModifier",O1="workbench.list.openMode",fr="workbench.list.horizontalScrolling",nR="workbench.list.defaultFindMode",sR="workbench.list.typeNavigationMode",uS="workbench.list.keyboardNavigation",Ma="workbench.list.scrollByPage",oR="workbench.list.defaultFindMatchType",ub="workbench.tree.indent",hS="workbench.tree.renderIndentGuides",Aa="workbench.list.smoothScrolling",Vl="workbench.list.mouseWheelScrollSensitivity",Hl="workbench.list.fastScrollSensitivity",gS="workbench.tree.expandMode",fS="workbench.tree.enableStickyScroll",pS="workbench.tree.stickyScrollMaxItemCount";function zl(o){return o.getValue(Bg)==="alt"}class lhe extends q{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=zl(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(Bg)&&(this.useAltAsMultipleSelectionModifier=zl(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:v6(e)}isSelectionRangeChangeEvent(e){return b6(e)}}function hL(o,e){var t;const i=o.get(Dt),n=o.get(Xt),s=new de;return[{...e,keyboardNavigationDelegate:{mightProducePrintableCharacter(a){return n.mightProducePrintableCharacter(a)}},smoothScrolling:!!i.getValue(Aa),mouseWheelScrollSensitivity:i.getValue(Vl),fastScrollSensitivity:i.getValue(Hl),multipleSelectionController:(t=e.multipleSelectionController)!==null&&t!==void 0?t:s.add(new lhe(i)),keyboardNavigationEventFilter:uhe(n),scrollByPage:!!i.getValue(Ma)},s]}let fN=class extends Yr{constructor(e,t,i,n,s,r,a,l,d){const c=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:!!l.getValue(fr),[u,h]=d.invokeFunction(hL,s);super(e,t,i,n,{keyboardSupport:!1,...u,horizontalScrolling:c}),this.disposables.add(h),this.contextKeyService=cL(r,this),this.disposables.add(uL(this.contextKeyService,this)),this.listSupportsMultiSelect=lL.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),dL.bindTo(this.contextKeyService).set(!!s.selectionNavigation),this.listHasSelectionOrFocus=QA.bindTo(this.contextKeyService),this.listDoubleSelection=JA.bindTo(this.contextKeyService),this.listMultiSelection=eR.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=zl(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const f=this.getSelection(),m=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(f.length>0||m.length>0),this.listMultiSelection.set(f.length>1),this.listDoubleSelection.set(f.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const f=this.getSelection(),m=this.getFocus();this.listHasSelectionOrFocus.set(f.length>0||m.length>0)})),this.disposables.add(l.onDidChangeConfiguration(f=>{f.affectsConfiguration(Bg)&&(this._useAltAsMultipleSelectionModifier=zl(l));let m={};if(f.affectsConfiguration(fr)&&this.horizontalScrolling===void 0){const v=!!l.getValue(fr);m={...m,horizontalScrolling:v}}if(f.affectsConfiguration(Ma)){const v=!!l.getValue(Ma);m={...m,scrollByPage:v}}if(f.affectsConfiguration(Aa)){const v=!!l.getValue(Aa);m={...m,smoothScrolling:v}}if(f.affectsConfiguration(Vl)){const v=l.getValue(Vl);m={...m,mouseWheelScrollSensitivity:v}}if(f.affectsConfiguration(Hl)){const v=l.getValue(Hl);m={...m,fastScrollSensitivity:v}}Object.keys(m).length>0&&this.updateOptions(m)})),this.navigator=new j6(this,{configurationService:l,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?Sm(e):Fg)}};fN=Yd([di(5,Xe),di(6,Lr),di(7,Dt),di(8,qe)],fN);let i5=class extends cue{constructor(e,t,i,n,s,r,a,l,d){const c=typeof s.horizontalScrolling<"u"?s.horizontalScrolling:!!l.getValue(fr),[u,h]=d.invokeFunction(hL,s);super(e,t,i,n,{keyboardSupport:!1,...u,horizontalScrolling:c}),this.disposables=new de,this.disposables.add(h),this.contextKeyService=cL(r,this),this.disposables.add(uL(this.contextKeyService,this.widget)),this.horizontalScrolling=s.horizontalScrolling,this.listSupportsMultiSelect=lL.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),dL.bindTo(this.contextKeyService).set(!!s.selectionNavigation),this._useAltAsMultipleSelectionModifier=zl(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(l.onDidChangeConfiguration(f=>{f.affectsConfiguration(Bg)&&(this._useAltAsMultipleSelectionModifier=zl(l));let m={};if(f.affectsConfiguration(fr)&&this.horizontalScrolling===void 0){const v=!!l.getValue(fr);m={...m,horizontalScrolling:v}}if(f.affectsConfiguration(Ma)){const v=!!l.getValue(Ma);m={...m,scrollByPage:v}}if(f.affectsConfiguration(Aa)){const v=!!l.getValue(Aa);m={...m,smoothScrolling:v}}if(f.affectsConfiguration(Vl)){const v=l.getValue(Vl);m={...m,mouseWheelScrollSensitivity:v}}if(f.affectsConfiguration(Hl)){const v=l.getValue(Hl);m={...m,fastScrollSensitivity:v}}Object.keys(m).length>0&&this.updateOptions(m)})),this.navigator=new j6(this,{configurationService:l,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?Sm(e):Fg)}dispose(){this.disposables.dispose(),super.dispose()}};i5=Yd([di(5,Xe),di(6,Lr),di(7,Dt),di(8,qe)],i5);let n5=class extends rL{constructor(e,t,i,n,s,r,a,l,d,c){const u=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!d.getValue(fr),[h,g]=c.invokeFunction(hL,r);super(e,t,i,n,s,{keyboardSupport:!1,...h,horizontalScrolling:u}),this.disposables.add(g),this.contextKeyService=cL(a,this),this.disposables.add(uL(this.contextKeyService,this)),this.listSupportsMultiSelect=lL.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),dL.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this.listHasSelectionOrFocus=QA.bindTo(this.contextKeyService),this.listDoubleSelection=JA.bindTo(this.contextKeyService),this.listMultiSelection=eR.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=zl(d),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),this.updateStyles(r.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const m=this.getSelection(),v=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(m.length>0||v.length>0),this.listMultiSelection.set(m.length>1),this.listDoubleSelection.set(m.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const m=this.getSelection(),v=this.getFocus();this.listHasSelectionOrFocus.set(m.length>0||v.length>0)})),this.disposables.add(d.onDidChangeConfiguration(m=>{m.affectsConfiguration(Bg)&&(this._useAltAsMultipleSelectionModifier=zl(d));let v={};if(m.affectsConfiguration(fr)&&this.horizontalScrolling===void 0){const _=!!d.getValue(fr);v={...v,horizontalScrolling:_}}if(m.affectsConfiguration(Ma)){const _=!!d.getValue(Ma);v={...v,scrollByPage:_}}if(m.affectsConfiguration(Aa)){const _=!!d.getValue(Aa);v={...v,smoothScrolling:_}}if(m.affectsConfiguration(Vl)){const _=d.getValue(Vl);v={...v,mouseWheelScrollSensitivity:_}}if(m.affectsConfiguration(Hl)){const _=d.getValue(Hl);v={...v,fastScrollSensitivity:_}}Object.keys(v).length>0&&this.updateOptions(v)})),this.navigator=new dhe(this,{configurationService:d,...r}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?Sm(e):Fg)}dispose(){this.disposables.dispose(),super.dispose()}};n5=Yd([di(6,Xe),di(7,Lr),di(8,Dt),di(9,qe)],n5);class rR extends q{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new W),this.onDidOpen=this._onDidOpen.event,this._register(ye.filter(this.widget.onDidChangeSelection,n=>G8(n.browserEvent))(n=>this.onSelectionFromKeyboard(n))),this._register(this.widget.onPointer(n=>this.onPointer(n.element,n.browserEvent))),this._register(this.widget.onMouseDblClick(n=>this.onMouseDblClick(n.element,n.browserEvent))),typeof(t==null?void 0:t.openOnSingleClick)!="boolean"&&(t!=null&&t.configurationService)?(this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(O1))!=="doubleClick",this._register(t==null?void 0:t.configurationService.onDidChangeConfiguration(n=>{n.affectsConfiguration(O1)&&(this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(O1))!=="doubleClick")}))):this.openOnSingleClick=(i=t==null?void 0:t.openOnSingleClick)!==null&&i!==void 0?i:!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;const t=e.browserEvent,i=typeof t.preserveFocus=="boolean"?t.preserveFocus:!0,n=typeof t.pinned=="boolean"?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick||t.detail===2)return;const n=t.button===1,s=!0,r=n,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,r,a,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;const s=!1,r=!0,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,r,a,t)}_open(e,t,i,n,s){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:s})}}class j6 extends rR{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class dhe extends rR{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class che extends rR{constructor(e,t){super(e,t)}getSelectedElement(){var e;return(e=this.widget.getSelection()[0])!==null&&e!==void 0?e:void 0}}function uhe(o){let e=!1;return t=>{if(t.toKeyCodeChord().isModifierKey())return!1;if(e)return e=!1,!1;const i=o.softDispatch(t,t.target);return i.kind===1?(e=!0,!1):(e=!1,i.kind===0)}}let s5=class extends ZA{constructor(e,t,i,n,s,r,a,l,d){const{options:c,getTypeNavigationMode:u,disposable:h}=r.invokeFunction(b0,s);super(e,t,i,n,c),this.disposables.add(h),this.internals=new ug(this,s,u,s.overrideStyles,a,l,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};s5=Yd([di(5,qe),di(6,Xe),di(7,Lr),di(8,Dt)],s5);let o5=class extends O6{constructor(e,t,i,n,s,r,a,l,d){const{options:c,getTypeNavigationMode:u,disposable:h}=r.invokeFunction(b0,s);super(e,t,i,n,c),this.disposables.add(h),this.internals=new ug(this,s,u,s.overrideStyles,a,l,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};o5=Yd([di(5,qe),di(6,Xe),di(7,Lr),di(8,Dt)],o5);let r5=class extends ihe{constructor(e,t,i,n,s,r,a,l,d,c){const{options:u,getTypeNavigationMode:h,disposable:g}=a.invokeFunction(b0,r);super(e,t,i,n,s,u),this.disposables.add(g),this.internals=new ug(this,r,h,r.overrideStyles,l,d,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles!==void 0&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};r5=Yd([di(6,qe),di(7,Xe),di(8,Lr),di(9,Dt)],r5);let pN=class extends B6{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,i,n,s,r,a,l,d,c){const{options:u,getTypeNavigationMode:h,disposable:g}=a.invokeFunction(b0,r);super(e,t,i,n,s,u),this.disposables.add(g),this.internals=new ug(this,r,h,r.overrideStyles,l,d,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};pN=Yd([di(6,qe),di(7,Xe),di(8,Lr),di(9,Dt)],pN);let a5=class extends ehe{constructor(e,t,i,n,s,r,a,l,d,c,u){const{options:h,getTypeNavigationMode:g,disposable:f}=l.invokeFunction(b0,a);super(e,t,i,n,s,r,h),this.disposables.add(f),this.internals=new ug(this,a,g,a.overrideStyles,d,c,u),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};a5=Yd([di(7,qe),di(8,Xe),di(9,Lr),di(10,Dt)],a5);function K6(o){const e=o.getValue(nR);if(e==="highlight")return yl.Highlight;if(e==="filter")return yl.Filter;const t=o.getValue(uS);if(t==="simple"||t==="highlight")return yl.Highlight;if(t==="filter")return yl.Filter}function q6(o){const e=o.getValue(oR);if(e==="fuzzy")return cg.Fuzzy;if(e==="contiguous")return cg.Contiguous}function b0(o,e){var t;const i=o.get(Dt),n=o.get(Gd),s=o.get(Xe),r=o.get(qe),a=()=>{const g=s.getContextKeyValue($6);if(g==="automatic")return cl.Automatic;if(g==="trigger"||s.getContextKeyValue(U6)===!1)return cl.Trigger;const m=i.getValue(sR);if(m==="automatic")return cl.Automatic;if(m==="trigger")return cl.Trigger},l=e.horizontalScrolling!==void 0?e.horizontalScrolling:!!i.getValue(fr),[d,c]=r.invokeFunction(hL,e),u=e.paddingBottom,h=e.renderIndentGuides!==void 0?e.renderIndentGuides:i.getValue(hS);return{getTypeNavigationMode:a,disposable:c,options:{keyboardSupport:!1,...d,indent:typeof i.getValue(ub)=="number"?i.getValue(ub):void 0,renderIndentGuides:h,smoothScrolling:!!i.getValue(Aa),defaultFindMode:K6(i),defaultFindMatchType:q6(i),horizontalScrolling:l,scrollByPage:!!i.getValue(Ma),paddingBottom:u,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(t=e.expandOnlyOnTwistieClick)!==null&&t!==void 0?t:i.getValue(gS)==="doubleClick",contextViewProvider:n,findWidgetStyles:$ce,enableStickyScroll:!!i.getValue(fS),stickyScrollMaxItemCount:Number(i.getValue(pS))}}}let ug=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,i,n,s,r,a){var l;this.tree=e,this.disposables=[],this.contextKeyService=cL(s,e),this.disposables.push(uL(this.contextKeyService,e)),this.listSupportsMultiSelect=lL.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(t.multipleSelectionSupport!==!1),dL.bindTo(this.contextKeyService).set(!!t.selectionNavigation),this.listSupportFindWidget=she.bindTo(this.contextKeyService),this.listSupportFindWidget.set((l=t.findWidgetEnabled)!==null&&l!==void 0?l:!0),this.hasSelectionOrFocus=QA.bindTo(this.contextKeyService),this.hasDoubleSelection=JA.bindTo(this.contextKeyService),this.hasMultiSelection=eR.bindTo(this.contextKeyService),this.treeElementCanCollapse=tR.bindTo(this.contextKeyService),this.treeElementHasParent=ohe.bindTo(this.contextKeyService),this.treeElementCanExpand=iR.bindTo(this.contextKeyService),this.treeElementHasChild=rhe.bindTo(this.contextKeyService),this.treeFindOpen=ahe.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=zl(a),this.updateStyleOverrides(n);const c=()=>{const h=e.getFocus()[0];if(!h)return;const g=e.getNode(h);this.treeElementCanCollapse.set(g.collapsible&&!g.collapsed),this.treeElementHasParent.set(!!e.getParentElement(h)),this.treeElementCanExpand.set(g.collapsible&&g.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(h))},u=new Set;u.add($6),u.add(U6),this.disposables.push(this.contextKeyService,r.register(e),e.onDidChangeSelection(()=>{const h=e.getSelection(),g=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(h.length>0||g.length>0),this.hasMultiSelection.set(h.length>1),this.hasDoubleSelection.set(h.length===2)})}),e.onDidChangeFocus(()=>{const h=e.getSelection(),g=e.getFocus();this.hasSelectionOrFocus.set(h.length>0||g.length>0),c()}),e.onDidChangeCollapseState(c),e.onDidChangeModel(c),e.onDidChangeFindOpenState(h=>this.treeFindOpen.set(h)),a.onDidChangeConfiguration(h=>{let g={};if(h.affectsConfiguration(Bg)&&(this._useAltAsMultipleSelectionModifier=zl(a)),h.affectsConfiguration(ub)){const f=a.getValue(ub);g={...g,indent:f}}if(h.affectsConfiguration(hS)&&t.renderIndentGuides===void 0){const f=a.getValue(hS);g={...g,renderIndentGuides:f}}if(h.affectsConfiguration(Aa)){const f=!!a.getValue(Aa);g={...g,smoothScrolling:f}}if(h.affectsConfiguration(nR)||h.affectsConfiguration(uS)){const f=K6(a);g={...g,defaultFindMode:f}}if(h.affectsConfiguration(sR)||h.affectsConfiguration(uS)){const f=i();g={...g,typeNavigationMode:f}}if(h.affectsConfiguration(oR)){const f=q6(a);g={...g,defaultFindMatchType:f}}if(h.affectsConfiguration(fr)&&t.horizontalScrolling===void 0){const f=!!a.getValue(fr);g={...g,horizontalScrolling:f}}if(h.affectsConfiguration(Ma)){const f=!!a.getValue(Ma);g={...g,scrollByPage:f}}if(h.affectsConfiguration(gS)&&t.expandOnlyOnTwistieClick===void 0&&(g={...g,expandOnlyOnTwistieClick:a.getValue(gS)==="doubleClick"}),h.affectsConfiguration(fS)){const f=a.getValue(fS);g={...g,enableStickyScroll:f}}if(h.affectsConfiguration(pS)){const f=Math.max(1,a.getValue(pS));g={...g,stickyScrollMaxItemCount:f}}if(h.affectsConfiguration(Vl)){const f=a.getValue(Vl);g={...g,mouseWheelScrollSensitivity:f}}if(h.affectsConfiguration(Hl)){const f=a.getValue(Hl);g={...g,fastScrollSensitivity:f}}Object.keys(g).length>0&&e.updateOptions(g)}),this.contextKeyService.onDidChangeContext(h=>{h.affectsSome(u)&&e.updateOptions({typeNavigationMode:i()})})),this.navigator=new che(e,{configurationService:a,...t}),this.disposables.push(this.navigator)}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?Sm(e):Fg)}dispose(){this.disposables=jt(this.disposables)}};ug=Yd([di(4,Xe),di(5,Lr),di(6,Dt)],ug);const hhe=xi.as(Va.Configuration);hhe.registerConfiguration({id:"workbench",order:7,title:p("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[Bg]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[p("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),p("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:p({},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[O1]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:p({},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[fr]:{type:"boolean",default:!1,description:p("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[Ma]:{type:"boolean",default:!1,description:p("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[ub]:{type:"number",default:8,minimum:4,maximum:40,description:p("tree indent setting","Controls tree indentation in pixels.")},[hS]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:p("render tree indent guides","Controls whether the tree should render indent guides.")},[Aa]:{type:"boolean",default:!1,description:p("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[Vl]:{type:"number",default:1,markdownDescription:p("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[Hl]:{type:"number",default:5,markdownDescription:p("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[nR]:{type:"string",enum:["highlight","filter"],enumDescriptions:[p("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),p("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:p("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[uS]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[p("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),p("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),p("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:p("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:p("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and 'workbench.list.typeNavigationMode' instead.")},[oR]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[p("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),p("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:p("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[gS]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:p("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[fS]:{type:"boolean",default:typeof t5.quality=="string"&&t5.quality!=="stable",description:p("sticky scroll","Controls whether sticky scrolling is enabled in trees.")},[pS]:{type:"number",minimum:1,default:7,markdownDescription:p("sticky scroll maximum items","Controls the number of sticky elements displayed in the tree when `#workbench.tree.enableStickyScroll#` is enabled.")},[sR]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:p("typeNavigationMode2","Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}});var mN;(function(o){o[o.PRESERVE=0]="PRESERVE",o[o.LAST=1]="LAST"})(mN||(mN={}));const Wg={Quickaccess:"workbench.contributions.quickaccess"};class ghe{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((t,i)=>i.prefix.length-t.prefix.length),je(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return Ia([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(i=>e.startsWith(i.prefix))||void 0||this.defaultProvider}}xi.add(Wg.Quickaccess,new ghe);const fhe={ctrlCmd:!1,alt:!1};var hb;(function(o){o[o.Blur=1]="Blur",o[o.Gesture=2]="Gesture",o[o.Other=3]="Other"})(hb||(hb={}));var da;(function(o){o[o.NONE=0]="NONE",o[o.FIRST=1]="FIRST",o[o.SECOND=2]="SECOND",o[o.LAST=3]="LAST"})(da||(da={}));const Ha=bt("quickInputService");var phe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},l5=function(o,e){return function(t,i){e(t,i,o)}};let _N=class extends q{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=xi.as(Wg.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n;const[s,r]=this.getOrInstantiateProvider(e),a=this.visibleQuickAccess,l=a==null?void 0:a.descriptor;if(a&&r&&l===r){e!==r.prefix&&!(i!=null&&i.preserveValue)&&(a.picker.value=e),this.adjustValueSelection(a.picker,r,i);return}if(r&&!(i!=null&&i.preserveValue)){let g;if(a&&l&&l!==r){const f=a.value.substr(l.prefix.length);f&&(g=`${r.prefix}${f}`)}if(!g){const f=s==null?void 0:s.defaultFilterValue;f===mN.LAST?g=this.lastAcceptedPickerValues.get(r):typeof f=="string"&&(g=`${r.prefix}${f}`)}typeof g=="string"&&(e=g)}const d=new de,c=d.add(this.quickInputService.createQuickPick());c.value=e,this.adjustValueSelection(c,r,i),c.placeholder=r==null?void 0:r.placeholder,c.quickNavigate=i==null?void 0:i.quickNavigateConfiguration,c.hideInput=!!c.quickNavigate&&!a,(typeof(i==null?void 0:i.itemActivation)=="number"||i!=null&&i.quickNavigateConfiguration)&&(c.itemActivation=(n=i==null?void 0:i.itemActivation)!==null&&n!==void 0?n:da.SECOND),c.contextKey=r==null?void 0:r.contextKey,c.filterValue=g=>g.substring(r?r.prefix.length:0);let u;t&&(u=new wy,d.add(ye.once(c.onWillAccept)(g=>{g.veto(),c.hide()}))),d.add(this.registerPickerListeners(c,s,r,e,i==null?void 0:i.providerOptions));const h=d.add(new tn);if(s&&d.add(s.provide(c,h.token,i==null?void 0:i.providerOptions)),ye.once(c.onDidHide)(()=>{c.selectedItems.length===0&&h.cancel(),d.dispose(),u==null||u.complete(c.selectedItems.slice(0))}),c.show(),t)return u==null?void 0:u.p}adjustValueSelection(e,t,i){var n;let s;i!=null&&i.preserveValue?s=[e.value.length,e.value.length]:s=[(n=t==null?void 0:t.prefix.length)!==null&&n!==void 0?n:0,e.value.length],e.valueSelection=s}registerPickerListeners(e,t,i,n,s){const r=new de,a=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return r.add(je(()=>{a===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),r.add(e.onDidChangeValue(l=>{const[d]=this.getOrInstantiateProvider(l);d!==t?this.show(l,{preserveValue:!0,providerOptions:s}):a.value=l})),i&&r.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,e.value)})),r}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};_N=phe([l5(0,Ha),l5(1,qe)],_N);Y.white.toString(),Y.white.toString();class mS extends q{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new W),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);const i=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,n=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=n||"",this._element.style.backgroundColor=i||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),e.appendChild(this._element),this._register(ei.addTarget(this._element)),[Se.CLICK,ni.Tap].forEach(s=>{this._register(J(this._element,s,r=>{if(!this.enabled){ct.stop(r);return}this._onDidClick.fire(r)}))}),this._register(J(this._element,Se.KEY_DOWN,s=>{const r=new gi(s);let a=!1;this.enabled&&(r.equals(3)||r.equals(10))?(this._onDidClick.fire(s),a=!0):r.equals(9)&&(this._element.blur(),a=!0),a&&ct.stop(r,!0)})),this._register(J(this._element,Se.MOUSE_OVER,s=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register(J(this._element,Se.MOUSE_OUT,s=>{this.updateBackground(!1)})),this.focusTracker=this._register(Pl(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const t=[];for(let i of Kc(e))if(typeof i=="string"){if(i=i.trim(),i==="")continue;const n=document.createElement("span");n.textContent=i,t.push(n)}else t.push(i);return t}updateBackground(e){let t;this.options.secondary?t=e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:t=e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){var t;if(this._label===e||jc(this._label)&&jc(e)&&Ede(this._label,e))return;this._element.classList.add("monaco-text-button");const i=this.options.supportShortLabel?this._labelElement:this._element;if(jc(e)){const n=iL(e,{inline:!0});n.dispose();const s=(t=n.element.querySelector("p"))===null||t===void 0?void 0:t.innerHTML;if(s){const r=F8(s,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});i.innerHTML=r}else es(i)}else this.options.supportIcons?es(i,...this.getContentElements(e)):i.textContent=e;typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=Ude(e)),this._label=e}get label(){return this._label}set icon(e){this._element.classList.add(...Ue.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}class vN{constructor(e,t,i){this.options=t,this.styles=i,this.count=0,this.element=le(e,pe(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){var e,t;this.element.textContent=Xh(this.countFormat,this.count),this.element.title=Xh(this.titleFormat,this.count),this.element.style.backgroundColor=(e=this.styles.badgeBackground)!==null&&e!==void 0?e:"",this.element.style.color=(t=this.styles.badgeForeground)!==null&&t!==void 0?t:"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}const d5="done",c5="active",Yx="infinite",Xx="infinite-long-running",u5="discrete";class gL extends q{constructor(e,t){super(),this.workedVal=0,this.showDelayedScheduler=this._register(new Yt(()=>oo(this.element),0)),this.longRunningScheduler=this._register(new Yt(()=>this.infiniteLongRunning(),gL.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=(t==null?void 0:t.progressBarBackground)||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(c5,Yx,Xx,u5),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(d5),this.element.classList.contains(Yx)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(u5,d5,Xx),this.element.classList.add(c5,Yx),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(Xx)}getContainer(){return this.element}}gL.LONG_RUNNING_INFINITE_THRESHOLD=1e4;const mhe=pe;class _he extends q{constructor(e,t,i){super(),this.parent=e,this.onKeyDown=s=>Wi(this.findInput.inputBox.inputElement,Se.KEY_DOWN,s),this.onMouseDown=s=>Wi(this.findInput.inputBox.inputElement,Se.MOUSE_DOWN,s),this.onDidChange=s=>this.findInput.onDidChange(s),this.container=le(this.parent,mhe(".quick-input-box")),this.findInput=this._register(new M6(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i}));const n=this.findInput.inputBox.inputElement;n.role="combobox",n.ariaHasPopup="menu",n.ariaAutoComplete="list",n.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}showDecoration(e){e===ji.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===ji.Info?1:e===ji.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===ji.Info?1:e===ji.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}class Gc{constructor(e,t){var i;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=(i=t==null?void 0:t.supportIcons)!==null&&i!==void 0?i:!1,this.domNode=le(e,pe("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=Gc.escapeNewLines(e,t)),!(this.didEverRender&&this.text===e&&this.title===i&&Uo(this.highlights,t))&&(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t{n=s===`\r +`?-1:0,r+=i;for(const a of t)a.end<=r||(a.start>=r&&(a.start+=n),a.end>=r&&(a.end+=n));return i+=n,"⏎"})}}class Jm{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class _S extends q{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new Jm(le(e,pe(".monaco-icon-label")))),this.labelContainer=le(this.domNode.element,pe(".monaco-icon-label-container")),this.nameContainer=le(this.labelContainer,pe("span.monaco-icon-name-container")),t!=null&&t.supportHighlights||t!=null&&t.supportIcons?this.nameNode=new Che(this.nameContainer,!!t.supportIcons):this.nameNode=new vhe(this.nameContainer),this.hoverDelegate=t==null?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){var n;const s=["monaco-icon-label"],r=["monaco-icon-label-container"];let a="";if(i&&(i.extraClasses&&s.push(...i.extraClasses),i.italic&&s.push("italic"),i.strikethrough&&s.push("strikethrough"),i.disabledCommand&&r.push("disabled"),i.title&&(typeof i.title=="string"?a+=i.title:a+=e)),this.domNode.className=s.join(" "),this.domNode.element.setAttribute("aria-label",a),this.labelContainer.className=r.join(" "),this.setupHover(i!=null&&i.descriptionTitle?this.labelContainer:this.element,i==null?void 0:i.title),this.nameNode.setLabel(e,i),t||this.descriptionNode){const l=this.getOrCreateDescriptionNode();l instanceof Gc?(l.set(t||"",i?i.descriptionMatches:void 0,void 0,i==null?void 0:i.labelEscapeNewLines),this.setupHover(l.element,i==null?void 0:i.descriptionTitle)):(l.textContent=t&&(i!=null&&i.labelEscapeNewLines)?Gc.escapeNewLines(t,[]):t||"",this.setupHover(l.element,(i==null?void 0:i.descriptionTitle)||""),l.empty=!t)}if(i!=null&&i.suffix||this.suffixNode){const l=this.getOrCreateSuffixNode();l.textContent=(n=i==null?void 0:i.suffix)!==null&&n!==void 0?n:""}}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}if(!this.hoverDelegate)Mde(e,t);else{const n=f6(this.hoverDelegate,e,t);n&&this.customHovers.set(e,n)}}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){const e=this._register(new Jm(eQ(this.nameContainer,pe("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new Jm(le(e.element,pe("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){var e;if(!this.descriptionNode){const t=this._register(new Jm(le(this.labelContainer,pe("span.monaco-icon-description-container"))));!((e=this.creationOptions)===null||e===void 0)&&e.supportDescriptionHighlights?this.descriptionNode=new Gc(le(t.element,pe("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new Jm(le(t.element,pe("span.label-description"))))}return this.descriptionNode}}class vhe{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&Uo(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=le(this.container,pe("a.label-name",{id:t==null?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const s={start:i,end:i+n.length},r=t.map(a=>ns.intersect(s,a)).filter(a=>!ns.isEmpty(a)).map(({start:a,end:l})=>({start:a-i,end:l-i}));return i=s.end+e.length,r})}class Che{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&Uo(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new Gc(le(this.container,pe("a.label-name",{id:t==null?void 0:t.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(e,t==null?void 0:t.matches,void 0,t==null?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=(t==null?void 0:t.separator)||"/",n=bhe(e,i,t==null?void 0:t.matches);for(let s=0;s{const o=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:o,collatorIsNumeric:o.resolvedOptions().numeric}});function She(o,e,t=!1){const i=o||"",n=e||"",s=h5.value.collator.compare(i,n);return h5.value.collatorIsNumeric&&s===0&&i!==n?in.length)return 1}return 0}var Dhe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};class G6{constructor(e){this.nodes=e}toString(){return this.nodes.map(e=>typeof e=="string"?e:e.label).join("")}}Dhe([nn],G6.prototype,"toString",null);const xhe=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;function khe(o){const e=[];let t=0,i;for(;i=xhe.exec(o);){i.index-t>0&&e.push(o.substring(t,i.index));const[,n,s,,r]=i;r?e.push({label:n,href:s,title:r}):e.push({label:n,href:s}),t=i.index+i[0].length}return t{XX(g)&&ct.stop(g,!0),t.callback(s.href)},d=t.disposables.add(new St(a,Se.CLICK)).event,c=t.disposables.add(new St(a,Se.KEY_DOWN)).event,u=ye.chain(c,g=>g.filter(f=>{const m=new gi(f);return m.equals(10)||m.equals(3)}));t.disposables.add(ei.addTarget(a));const h=t.disposables.add(new St(a,ni.Tap)).event;ye.any(d,h,u)(l,null,t.disposables),e.appendChild(a)}}var Z6=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};const sa=pe;class Nhe{constructor(e,t,i,n,s,r,a){var l,d,c;this._checked=!1,this._hidden=!1,this.hasCheckbox=n,this.index=i,this.fireButtonTriggered=s,this.fireSeparatorButtonTriggered=r,this._onChecked=a,this.onChecked=n?ye.map(ye.filter(this._onChecked.event,u=>u.listElement===this),u=>u.checked):ye.None,e.type==="separator"?this._separator=e:(this.item=e,t&&t.type==="separator"&&!t.buttons&&(this._separator=t),this.saneDescription=this.item.description,this.saneDetail=this.item.detail,this._labelHighlights=(l=this.item.highlights)===null||l===void 0?void 0:l.label,this._descriptionHighlights=(d=this.item.highlights)===null||d===void 0?void 0:d.description,this._detailHighlights=(c=this.item.highlights)===null||c===void 0?void 0:c.detail,this.saneTooltip=this.item.tooltip),this._init=new Ru(()=>{var u;const h=(u=e.label)!==null&&u!==void 0?u:"",g=x_(h).text.trim(),f=e.ariaLabel||[h,this.saneDescription,this.saneDetail].map(m=>Ide(m)).filter(m=>!!m).join(", ");return{saneLabel:h,saneSortLabel:g,saneAriaLabel:f}})}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({listElement:this,checked:e}))}get separator(){return this._separator}set separator(e){this._separator=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}}class w0{constructor(e){this.themeService=e}get templateId(){return w0.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=le(e,sa(".quick-input-list-entry"));const i=le(t.entry,sa("label.quick-input-list-label"));t.toDisposeTemplate.push(Wi(i,Se.CLICK,d=>{t.checkbox.offsetParent||d.preventDefault()})),t.checkbox=le(i,sa("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(Wi(t.checkbox,Se.CHANGE,d=>{t.element.checked=t.checkbox.checked}));const n=le(i,sa(".quick-input-list-rows")),s=le(n,sa(".quick-input-list-row")),r=le(n,sa(".quick-input-list-row"));t.label=new _S(s,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0}),t.toDisposeTemplate.push(t.label),t.icon=Z8(t.label.element,sa(".quick-input-list-icon"));const a=le(s,sa(".quick-input-list-entry-keybinding"));t.keybinding=new C0(a,Vo);const l=le(r,sa(".quick-input-list-label-meta"));return t.detail=new _S(l,{supportHighlights:!0,supportIcons:!0}),t.toDisposeTemplate.push(t.detail),t.separator=le(t.entry,sa(".quick-input-list-separator")),t.actionBar=new Cr(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){var n,s,r,a;i.element=e,e.element=(n=i.entry)!==null&&n!==void 0?n:void 0;const l=e.item?e.item:e.separator;i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked(f=>i.checkbox.checked=f));const{labelHighlights:d,descriptionHighlights:c,detailHighlights:u}=e;if(!((s=e.item)===null||s===void 0)&&s.iconPath){const f=Pp(this.themeService.getColorTheme().type)?e.item.iconPath.dark:(r=e.item.iconPath.light)!==null&&r!==void 0?r:e.item.iconPath.dark,m=ze.revive(f);i.icon.className="quick-input-list-icon",i.icon.style.backgroundImage=du(m)}else i.icon.style.backgroundImage="",i.icon.className=!((a=e.item)===null||a===void 0)&&a.iconClass?`quick-input-list-icon ${e.item.iconClass}`:"";const h={matches:d||[],descriptionTitle:e.saneDescription,descriptionMatches:c||[],labelEscapeNewLines:!0};l.type!=="separator"?(h.extraClasses=l.iconClasses,h.italic=l.italic,h.strikethrough=l.strikethrough,i.entry.classList.remove("quick-input-list-separator-as-item")):i.entry.classList.add("quick-input-list-separator-as-item"),i.label.setLabel(e.saneLabel,e.saneDescription,h),i.keybinding.set(l.type==="separator"?void 0:l.keybinding),e.saneDetail?(i.detail.element.style.display="",i.detail.setLabel(e.saneDetail,void 0,{matches:u,title:e.saneDetail,labelEscapeNewLines:!0})):i.detail.element.style.display="none",e.item&&e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator);const g=l.buttons;g&&g.length?(i.actionBar.push(g.map((f,m)=>{let v=f.iconClass||(f.iconPath?bN(f.iconPath):void 0);return f.alwaysVisible&&(v=v?`${v} always-visible`:"always-visible"),{id:`id-${m}`,class:v,enabled:!0,label:"",tooltip:f.tooltip||"",run:()=>{l.type!=="separator"?e.fireButtonTriggered({button:f,item:l}):e.fireSeparatorButtonTriggered({button:f,separator:l})}}}),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=jt(i.toDisposeElement),i.actionBar.clear()}disposeTemplate(e){e.toDisposeElement=jt(e.toDisposeElement),e.toDisposeTemplate=jt(e.toDisposeTemplate)}}w0.ID="listelement";class The{getHeight(e){return e.item?e.saneDetail?44:22:24}getTemplateId(e){return w0.ID}}var kn;(function(o){o[o.First=1]="First",o[o.Second=2]="Second",o[o.Last=3]="Last",o[o.Next=4]="Next",o[o.Previous=5]="Previous",o[o.NextPage=6]="NextPage",o[o.PreviousPage=7]="PreviousPage"})(kn||(kn={}));class aR{constructor(e,t,i,n){this.parent=e,this.options=i,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.sortByLabel=!0,this._onChangedAllVisibleChecked=new W,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new W,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new W,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new W,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new W,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new W,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._onKeyDown=new W,this.onKeyDown=this._onKeyDown.event,this._onLeave=new W,this.onLeave=this._onLeave.event,this._listElementChecked=new W,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=le(this.parent,sa(".quick-input-list"));const s=new The,r=new Rhe;if(this.list=i.createList("QuickInput",this.container,s,[new w0(n)],{identityProvider:{getId:a=>{var l,d,c,u,h,g,f,m;return(m=(g=(u=(d=(l=a.item)===null||l===void 0?void 0:l.id)!==null&&d!==void 0?d:(c=a.item)===null||c===void 0?void 0:c.label)!==null&&u!==void 0?u:(h=a.separator)===null||h===void 0?void 0:h.id)!==null&&g!==void 0?g:(f=a.separator)===null||f===void 0?void 0:f.label)!==null&&m!==void 0?m:""}},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:r}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(a=>{const l=new gi(a);switch(l.keyCode){case 10:this.toggleCheckbox();break;case 31:(It?a.metaKey:a.ctrlKey)&&this.list.setFocus(Ls(this.list.length));break;case 16:{const d=this.list.getFocus();d.length===1&&d[0]===0&&this._onLeave.fire();break}case 18:{const d=this.list.getFocus();d.length===1&&d[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(l)})),this.disposables.push(this.list.onMouseDown(a=>{a.browserEvent.button!==2&&a.browserEvent.preventDefault()})),this.disposables.push(J(this.container,Se.CLICK,a=>{(a.x||a.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(a=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(a=>{typeof a.index=="number"&&(a.browserEvent.preventDefault(),this.list.setSelection([a.index]))})),i.hoverDelegate){const a=new N8(i.hoverDelegate.delay);this.disposables.push(this.list.onMouseOver(async l=>{var d;if(l.browserEvent.target instanceof HTMLAnchorElement){a.cancel();return}if(!(!(l.browserEvent.relatedTarget instanceof HTMLAnchorElement)&&Qn(l.browserEvent.relatedTarget,(d=l.element)===null||d===void 0?void 0:d.element)))try{await a.trigger(async()=>{l.element&&this.showHover(l.element)})}catch(c){if(!Fa(c))throw c}})),this.disposables.push(this.list.onMouseOut(l=>{var d;Qn(l.browserEvent.relatedTarget,(d=l.element)===null||d===void 0?void 0:d.element)||a.cancel()})),this.disposables.push(a)}this.disposables.push(this._listElementChecked.event(a=>this.fireCheckedEvents())),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return ye.map(this.list.onDidChangeFocus,e=>e.elements.map(t=>t.item))}get onDidChangeSelection(){return ye.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(t=>t.item),event:e.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}get ariaLabel(){return this.list.getHTMLElement().ariaLabel}set ariaLabel(e){this.list.getHTMLElement().ariaLabel=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=jt(this.elementDisposables);const t=r=>this.fireButtonTriggered(r),i=r=>this.fireSeparatorButtonTriggered(r);this.inputElements=e;const n=new Map,s=this.parent.classList.contains("show-checkboxes");this.elements=e.reduce((r,a,l)=>{var d;const c=l>0?e[l-1]:void 0;if(a.type==="separator"&&!a.buttons)return r;const u=new Nhe(a,c,l,s,t,i,this._listElementChecked),h=r.length;return r.push(u),n.set((d=u.item)!==null&&d!==void 0?d:u.separator,h),r},[]),this.elementsToIndexes=n,this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(e=>e.item)}setFocusedElements(e){if(this.list.setFocus(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t))),e.length>0){const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item).filter(e=>!!e)}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const i of this.elements)i.checked=t.has(i.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===kn.Second&&this.list.length<2&&(e=kn.First),e){case kn.First:this.list.scrollTop=0,this.list.focusFirst(void 0,i=>!!i.item);break;case kn.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,i=>!!i.item);break;case kn.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,i=>!!i.item);break;case kn.Next:{this.list.focusNext(void 0,!0,void 0,n=>!!n.item);const i=this.list.getFocus()[0];i!==0&&!this.elements[i-1].item&&this.list.firstVisibleIndex>i-1&&this.list.reveal(i-1);break}case kn.Previous:{this.list.focusPrevious(void 0,!0,void 0,n=>!!n.item);const i=this.list.getFocus()[0];i!==0&&!this.elements[i-1].item&&this.list.firstVisibleIndex>i-1&&this.list.reveal(i-1);break}case kn.NextPage:this.list.focusNextPage(void 0,i=>!!i.item);break;case kn.PreviousPage:this.list.focusPreviousPage(void 0,i=>!!i.item);break}const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}showHover(e){var t,i,n;this.options.hoverDelegate!==void 0&&(this._lastHover&&!this._lastHover.isDisposed&&((i=(t=this.options.hoverDelegate).onDidHideHover)===null||i===void 0||i.call(t),(n=this._lastHover)===null||n===void 0||n.dispose()),!(!e.element||!e.saneTooltip)&&(this._lastHover=this.options.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:s=>{this.options.linkOpenerDelegate(s)},appearance:{showPointer:!0},container:this.container,position:{hoverPosition:1}},!1)))}layout(e){this.list.getHTMLElement().style.maxHeight=e?`${Math.floor(e/44)*44+6}px`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const t=e;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(n=>{n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!1;const s=n.index&&this.inputElements[n.index-1];n.item&&(n.separator=s&&s.type==="separator"&&!s.buttons?s:void 0)});else{let n;this.elements.forEach(s=>{var r,a,l,d;let c;this.matchOnLabelMode==="fuzzy"?c=this.matchOnLabel&&(r=Fx(e,x_(s.saneLabel)))!==null&&r!==void 0?r:void 0:c=this.matchOnLabel&&(a=Mhe(t,x_(s.saneLabel)))!==null&&a!==void 0?a:void 0;const u=this.matchOnDescription&&(l=Fx(e,x_(s.saneDescription||"")))!==null&&l!==void 0?l:void 0,h=this.matchOnDetail&&(d=Fx(e,x_(s.saneDetail||"")))!==null&&d!==void 0?d:void 0;if(c||u||h?(s.labelHighlights=c,s.descriptionHighlights=u,s.detailHighlights=h,s.hidden=!1):(s.labelHighlights=void 0,s.descriptionHighlights=void 0,s.detailHighlights=void 0,s.hidden=s.item?!s.item.alwaysShow:!0),s.item?s.separator=void 0:s.separator&&(s.hidden=!0),!this.sortByLabel){const g=s.index&&this.inputElements[s.index-1];n=g&&g.type==="separator"?g:n,n&&!s.hidden&&(s.separator=n,n=void 0)}})}const i=this.elements.filter(n=>!n.hidden);if(this.sortByLabel&&e){const n=e.toLowerCase();i.sort((s,r)=>Ahe(s,r,n))}return this.elementsToIndexes=i.reduce((n,s,r)=>{var a;return n.set((a=s.item)!==null&&a!==void 0?a:s.separator,r),n},new Map),this.list.splice(0,this.list.length,i),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(i.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=jt(this.elementDisposables),this.disposables=jt(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}fireSeparatorButtonTriggered(e){this._onSeparatorButtonTriggered.fire(e)}style(e){this.list.style(e)}toggleHover(){const e=this.list.getFocusedElements()[0];if(!(e!=null&&e.saneTooltip))return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}const t=this.list.getFocusedElements()[0];if(!t)return;this.showHover(t);const i=new de;i.add(this.list.onDidChangeFocus(n=>{n.indexes.length&&this.showHover(n.elements[0])})),this._lastHover&&i.add(this._lastHover),this._toggleHover=i,this.elementDisposables.push(this._toggleHover)}}Z6([nn],aR.prototype,"onDidChangeFocus",null);Z6([nn],aR.prototype,"onDidChangeSelection",null);function Mhe(o,e){const{text:t,iconOffsets:i}=e;if(!i||i.length===0)return g5(o,t);const n=Xb(t," "),s=t.length-n.length,r=g5(o,n);if(r)for(const a of r){const l=i[a.start+s]+s;a.start+=l,a.end+=l}return r}function g5(o,e){const t=e.toLowerCase().indexOf(o.toLowerCase());return t!==-1?[{start:t,end:t+o.length}]:null}function Ahe(o,e,t){const i=o.labelHighlights||[],n=e.labelHighlights||[];return i.length&&!n.length?-1:!i.length&&n.length?1:i.length===0&&n.length===0?0:yhe(o.saneSortLabel,e.saneSortLabel,t)}class Rhe{getWidgetAriaLabel(){return p("quickInput","Quick Input")}getAriaLabel(e){var t;return!((t=e.separator)===null||t===void 0)&&t.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(e.hasCheckbox)return{value:e.checked,onDidChange:e.onChecked}}}const CN={iconClass:Ue.asClassName(ve.quickInputBack),tooltip:p("quickInput.back","Back")};class S0 extends q{constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=S0.noPromptMessage,this._severity=ji.Ignore,this.onDidTriggerButtonEmitter=this._register(new W),this.onDidHideEmitter=this._register(new W),this.onDisposeEmitter=this._register(new W),this.visibleDisposables=this._register(new de),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!Ea;this._ignoreFocusOut=e&&!Ea,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=e??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=hb.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){var e,t;if(!this.visible)return;const i=this.getTitle();i&&this.ui.title.textContent!==i?this.ui.title.textContent=i:!i&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText=" ");const n=this.getDescription();if(this.ui.description1.textContent!==n&&(this.ui.description1.textContent=n),this.ui.description2.textContent!==n&&(this.ui.description2.textContent=n),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?es(this.ui.widget,this._widget):es(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new qr,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const r=this.buttons.filter(l=>l===CN);this.ui.leftActionBar.push(r.map((l,d)=>{const c=new Rs(`id-${d}`,"",l.iconClass||bN(l.iconPath),!0,async()=>{this.onDidTriggerButtonEmitter.fire(l)});return c.tooltip=l.tooltip||"",c}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const a=this.buttons.filter(l=>l!==CN);this.ui.rightActionBar.push(a.map((l,d)=>{const c=new Rs(`id-${d}`,"",l.iconClass||bN(l.iconPath),!0,async()=>{this.onDidTriggerButtonEmitter.fire(l)});return c.tooltip=l.tooltip||"",c}),{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const r=(t=(e=this.toggles)===null||e===void 0?void 0:e.filter(a=>a instanceof Lm))!==null&&t!==void 0?t:[];this.ui.inputBox.toggles=r}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const s=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==s&&(this._lastValidationMessage=s,es(this.ui.message),Ehe(s,this.ui.message,{callback:r=>{this.ui.linkOpenerDelegate(r)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?p("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==ji.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}S0.noPromptMessage=p("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class gb extends S0{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new W),this.onWillAcceptEmitter=this._register(new W),this.onDidAcceptEmitter=this._register(new W),this.onDidCustomEmitter=this._register(new W),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=da.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new W),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new W),this.onDidTriggerItemButtonEmitter=this._register(new W),this.onDidTriggerSeparatorButtonEmitter=this._register(new W),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?fhe:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(kn.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{this.doSetValue(e,!0)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(e=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(e=>{switch(e.keyCode){case 18:this.ui.list.focus(kn.Next),this.canSelectMany&&this.ui.list.domFocus(),ct.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(kn.Previous):this.ui.list.focus(kn.Last),this.canSelectMany&&this.ui.list.domFocus(),ct.stop(e,!0);break;case 12:this.ui.list.focus(kn.NextPage),this.canSelectMany&&this.ui.list.domFocus(),ct.stop(e,!0);break;case 11:this.ui.list.focus(kn.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),ct.stop(e,!0);break;case 17:if(!this._canAcceptInBackground||!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(kn.First),ct.stop(e,!0));break;case 13:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(kn.Last),ct.stop(e,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&Bi(e,this._activeItems,(t,i)=>t===i)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&Bi(e,this._selectedItems,(i,n)=>i===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(EM(t)&&t.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&Bi(e,this._selectedItems,(t,i)=>t===i)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(e=>this.onDidTriggerSeparatorButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return J(this.ui.container,Se.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new gi(e),i=t.keyCode;this._quickNavigate.keybindings.some(r=>{const a=r.getChords();return a.length>1?!1:a[0].shiftKey&&i===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(a[0].altKey&&i===6||a[0].ctrlKey&&i===5||a[0].metaKey&&i===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,i={title:!!this.title||!!this.step||!!this.buttons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let n=this.ariaLabel;if(!n&&i.inputBox&&(n=this.placeholder||gb.DEFAULT_ARIA_LABEL,this.title&&(n+=` - ${this.title}`)),this.ui.list.ariaLabel!==n&&(this.ui.list.ariaLabel=n??null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case da.NONE:this._itemActivation=da.FIRST;break;case da.SECOND:this.ui.list.focus(kn.Second),this._itemActivation=da.FIRST;break;case da.LAST:this.ui.list.focus(kn.Last),this._itemActivation=da.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(kn.First)),this.keepScrollPosition&&(this.scrollTop=e)}}gb.DEFAULT_ARIA_LABEL=p("quickInputBox.ariaLabel","Type to narrow down results.");class Phe extends S0{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new W),this.onDidAcceptEmitter=this._register(new W),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}const eo=pe;class fL extends q{constructor(e,t,i){super(),this.options=e,this.themeService=t,this.layoutService=i,this.enabled=!0,this.onDidAcceptEmitter=this._register(new W),this.onDidCustomEmitter=this._register(new W),this.onDidTriggerButtonEmitter=this._register(new W),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new W),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new W),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this._register(ye.runAndSubscribe(xM,({window:n,disposables:s})=>this.registerKeyModsListeners(n,s),{window:Ai,disposables:this._store})),this._register(FX(n=>{this.ui&&Je(this.ui.container)===n&&this.reparentUI(this.layoutService.mainContainer)}))}registerKeyModsListeners(e,t){const i=n=>{this.keyMods.ctrlCmd=n.ctrlKey||n.metaKey,this.keyMods.alt=n.altKey};for(const n of[Se.KEY_DOWN,Se.KEY_UP,Se.MOUSE_DOWN])t.add(J(e,n,i,!0))}getUI(e){if(this.ui)return e&&this.parentElement.ownerDocument!==this.layoutService.activeContainer.ownerDocument&&this.reparentUI(this.layoutService.activeContainer),this.ui;const t=le(this.parentElement,eo(".quick-input-widget.show-file-icons"));t.tabIndex=-1,t.style.display="none";const i=mr(t),n=le(t,eo(".quick-input-titlebar")),s=this.options.hoverDelegate?{hoverDelegate:this.options.hoverDelegate}:void 0,r=this._register(new Cr(n,s));r.domNode.classList.add("quick-input-left-action-bar");const a=le(n,eo(".quick-input-title")),l=this._register(new Cr(n,s));l.domNode.classList.add("quick-input-right-action-bar");const d=le(t,eo(".quick-input-header")),c=le(d,eo("input.quick-input-check-all"));c.type="checkbox",c.setAttribute("aria-label",p("quickInput.checkAll","Toggle all checkboxes")),this._register(Wi(c,Se.CHANGE,K=>{const oe=c.checked;O.setAllVisibleChecked(oe)})),this._register(J(c,Se.CLICK,K=>{(K.x||K.y)&&f.setFocus()}));const u=le(d,eo(".quick-input-description")),h=le(d,eo(".quick-input-and-message")),g=le(h,eo(".quick-input-filter")),f=this._register(new _he(g,this.styles.inputBox,this.styles.toggle));f.setAttribute("aria-describedby",`${this.idPrefix}message`);const m=le(g,eo(".quick-input-visible-count"));m.setAttribute("aria-live","polite"),m.setAttribute("aria-atomic","true");const v=new vN(m,{countFormat:p({},"{0} Results")},this.styles.countBadge),_=le(g,eo(".quick-input-count"));_.setAttribute("aria-live","polite");const b=new vN(_,{countFormat:p({},"{0} Selected")},this.styles.countBadge),C=le(d,eo(".quick-input-action")),w=this._register(new mS(C,this.styles.button));w.label=p("ok","OK"),this._register(w.onDidClick(K=>{this.onDidAcceptEmitter.fire()}));const S=le(d,eo(".quick-input-action")),x=this._register(new mS(S,this.styles.button));x.label=p("custom","Custom"),this._register(x.onDidClick(K=>{this.onDidCustomEmitter.fire()}));const y=le(h,eo(`#${this.idPrefix}message.quick-input-message`)),I=this._register(new gL(t,this.styles.progressBar));I.getContainer().classList.add("quick-input-progress");const E=le(t,eo(".quick-input-html-widget"));E.tabIndex=-1;const R=le(t,eo(".quick-input-description")),j=this.idPrefix+"list",O=this._register(new aR(t,j,this.options,this.themeService));f.setAttribute("aria-controls",j),this._register(O.onDidChangeFocus(()=>{var K;f.setAttribute("aria-activedescendant",(K=O.getActiveDescendant())!==null&&K!==void 0?K:"")})),this._register(O.onChangedAllVisibleChecked(K=>{c.checked=K})),this._register(O.onChangedVisibleCount(K=>{v.setCount(K)})),this._register(O.onChangedCheckedCount(K=>{b.setCount(K)})),this._register(O.onLeave(()=>{setTimeout(()=>{f.setFocus(),this.controller instanceof gb&&this.controller.canSelectMany&&O.clearFocus()},0)}));const $=Pl(t);return this._register($),this._register(J(t,Se.FOCUS,K=>{Qn(K.relatedTarget,t)||(this.previousFocusElement=K.relatedTarget instanceof HTMLElement?K.relatedTarget:void 0)},!0)),this._register($.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(hb.Blur),this.previousFocusElement=void 0})),this._register(J(t,Se.FOCUS,K=>{f.setFocus()})),this._register(Wi(t,Se.KEY_DOWN,K=>{if(!Qn(K.target,E))switch(K.keyCode){case 3:ct.stop(K,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:ct.stop(K,!0),this.hide(hb.Gesture);break;case 2:if(!K.altKey&&!K.ctrlKey&&!K.metaKey){const oe=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(t.classList.contains("show-checkboxes")?oe.push("input"):oe.push("input[type=text]"),this.getUI().list.isDisplayed()&&oe.push(".monaco-list"),this.getUI().message&&oe.push(".quick-input-message a"),this.getUI().widget){if(Qn(K.target,this.getUI().widget))break;oe.push(".quick-input-html-widget")}const Le=t.querySelectorAll(oe.join(", "));K.shiftKey&&K.target===Le[0]?(ct.stop(K,!0),O.clearFocus()):!K.shiftKey&&Qn(K.target,Le[Le.length-1])&&(ct.stop(K,!0),Le[0].focus())}break;case 10:K.ctrlKey&&(ct.stop(K,!0),this.getUI().list.toggleHover());break}})),this.ui={container:t,styleSheet:i,leftActionBar:r,titleBar:n,title:a,description1:R,description2:u,widget:E,rightActionBar:l,checkAll:c,inputContainer:h,filterContainer:g,inputBox:f,visibleCountContainer:m,visibleCount:v,countContainer:_,count:b,okContainer:C,ok:w,message:y,customButtonContainer:S,customButton:x,list:O,progressBar:I,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:K=>this.show(K),hide:()=>this.hide(),setVisibilities:K=>this.setVisibilities(K),setEnabled:K=>this.setEnabled(K),setContextKey:K=>this.options.setContextKey(K),linkOpenerDelegate:K=>this.options.linkOpenerDelegate(K)},this.updateStyles(),this.ui}reparentUI(e){this.ui&&(this.parentElement=e,le(this.parentElement,this.ui.container))}pick(e,t={},i=vt.None){return new Promise((n,s)=>{let r=c=>{var u;r=n,(u=t.onKeyMods)===null||u===void 0||u.call(t,a.keyMods),n(c)};if(i.isCancellationRequested){r(void 0);return}const a=this.createQuickPick();let l;const d=[a,a.onDidAccept(()=>{if(a.canSelectMany)r(a.selectedItems.slice()),a.hide();else{const c=a.activeItems[0];c&&(r(c),a.hide())}}),a.onDidChangeActive(c=>{const u=c[0];u&&t.onDidFocus&&t.onDidFocus(u)}),a.onDidChangeSelection(c=>{if(!a.canSelectMany){const u=c[0];u&&(r(u),a.hide())}}),a.onDidTriggerItemButton(c=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton({...c,removeItem:()=>{const u=a.items.indexOf(c.item);if(u!==-1){const h=a.items.slice(),g=h.splice(u,1),f=a.activeItems.filter(v=>v!==g[0]),m=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=h,f&&(a.activeItems=f),a.keepScrollPosition=m}}})),a.onDidTriggerSeparatorButton(c=>{var u;return(u=t.onDidTriggerSeparatorButton)===null||u===void 0?void 0:u.call(t,c)}),a.onDidChangeValue(c=>{l&&!c&&(a.activeItems.length!==1||a.activeItems[0]!==l)&&(a.activeItems=[l])}),i.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{jt(d),r(void 0)})];a.title=t.title,a.canSelectMany=!!t.canPickMany,a.placeholder=t.placeHolder,a.ignoreFocusOut=!!t.ignoreFocusLost,a.matchOnDescription=!!t.matchOnDescription,a.matchOnDetail=!!t.matchOnDetail,a.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,a.autoFocusOnList=t.autoFocusOnList===void 0||t.autoFocusOnList,a.quickNavigate=t.quickNavigate,a.hideInput=!!t.hideInput,a.contextKey=t.contextKey,a.busy=!0,Promise.all([e,t.activeItem]).then(([c,u])=>{l=u,a.busy=!1,a.items=c,a.canSelectMany&&(a.selectedItems=c.filter(h=>h.type!=="separator"&&h.picked)),l&&(a.activeItems=[l])}),a.show(),Promise.resolve(e).then(void 0,c=>{s(c),a.hide()})})}createQuickPick(){const e=this.getUI(!0);return new gb(e)}createInputBox(){const e=this.getUI(!0);return new Phe(e)}show(e){const t=this.getUI(!0);this.onShowEmitter.fire();const i=this.controller;this.controller=e,i==null||i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",es(t.widget),t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(ji.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),es(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;const n=this.options.backKeybindingLabel();CN.tooltip=n?p("quickInput.backWithKeybinding","Back ({0})",n):p("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}isVisible(){return!!this.ui&&this.ui.container.style.display!=="none"}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",t.checkAll.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t,i;const n=this.controller;if(!n)return;const s=(t=this.ui)===null||t===void 0?void 0:t.container,r=s&&!KX(s);if(this.controller=null,this.onHideEmitter.fire(),s&&(s.style.display="none"),!r){let a=this.previousFocusElement;for(;a&&!a.offsetParent;)a=(i=a.parentElement)!==null&&i!==void 0?i:void 0;a!=null&&a.offsetParent?(a.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}n.didHide(e)}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isVisible()){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(this.dimension.width*.62,fL.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,widgetBorder:n,widgetShadow:s}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e??"",this.ui.container.style.backgroundColor=t??"",this.ui.container.style.color=i??"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=s?`0 0 8px 2px ${s}`:"",this.ui.list.style(this.styles.list);const r=[];this.styles.pickerGroup.pickerGroupBorder&&r.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&r.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&r.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(r.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&r.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&r.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&r.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&r.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&r.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),r.push("}"));const a=r.join(` +`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}}fL.MAX_WIDTH=600;var Ohe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},NC=function(o,e){return function(t,i){e(t,i,o)}};let wN=class extends pne{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(_N))),this._quickAccess}constructor(e,t,i,n){super(i),this.instantiationService=e,this.contextKeyService=t,this.layoutService=n,this._onShow=this._register(new W),this._onHide=this._register(new W),this.contexts=new Map}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:s=>this.setContextKey(s),linkOpenerDelegate:s=>{this.instantiationService.invokeFunction(r=>{r.get(So).open(s,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>e.focus(),createList:(s,r,a,l,d)=>this.instantiationService.createInstance(fN,s,r,a,l,d),styles:this.computeStyles()},n=this._register(new fL({...i,...t},this.themeService,this.layoutService));return n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer(s=>n.layout(s,e.activeContainerOffset.quickPickTop))),this._register(e.onDidChangeActiveContainer(()=>{n.isVisible()||n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop)})),this._register(n.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(n.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),n}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new De(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t==null||t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},i=vt.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:Ee(i4),quickInputForeground:Ee(wte),quickInputTitleBackground:Ee(Ste),widgetBorder:Ee(jM),widgetShadow:Ee(ml)},inputBox:iS,toggle:tS,countBadge:y6,button:Hce,progressBar:zce,keybindingLabel:Vce,list:Sm({listBackground:i4,listFocusBackground:Nh,listFocusForeground:Eh,listInactiveFocusForeground:Eh,listInactiveSelectionIconForeground:Ef,listInactiveFocusBackground:Nh,listFocusOutline:fi,listInactiveFocusOutline:fi}),pickerGroup:{pickerGroupBorder:Ee(yte),pickerGroupForeground:Ee(R7)}}}};wN=Ohe([NC(0,qe),NC(1,Xe),NC(2,Sn),NC(3,wm)],wN);var Y6=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Hf=function(o,e){return function(t,i){e(t,i,o)}};let SN=class extends wN{constructor(e,t,i,n,s){super(t,i,n,new TE(e.getContainerDomNode(),s)),this.host=void 0;const r=Kp.get(e);if(r){const a=r.widget;this.host={_serviceBrand:void 0,get mainContainer(){return a.getDomNode()},getContainer(){return a.getDomNode()},get containers(){return[a.getDomNode()]},get activeContainer(){return a.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return ye.map(e.onDidLayoutChange,l=>({container:a.getDomNode(),dimension:l}))},get onDidChangeActiveContainer(){return ye.None},get onDidAddContainer(){return ye.None},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};SN=Y6([Hf(1,qe),Hf(2,Xe),Hf(3,Sn),Hf(4,Ot)],SN);let yN=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(SN,e);this.mapEditorToService.set(e,t),su(e.onDidDispose)(()=>{i.dispose(),this.mapEditorToService.delete(e)})}return t}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t={},i=vt.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};yN=Y6([Hf(0,qe),Hf(1,Ot)],yN);class Kp{static get(e){return e.getContribution(Kp.ID)}constructor(e){this.editor=e,this.widget=new pL(this.editor)}dispose(){this.widget.dispose()}}Kp.ID="editor.controller.quickInput";class pL{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return pL.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}pL.ID="editor.contrib.quickInputWidget";At(Kp.ID,Kp,4);class Fhe{constructor(e,t,i,n,s){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=s}}function Bhe(o){if(!o||!Array.isArray(o))return[];const e=[];let t=0;for(let i=0,n=o.length;i{const h=Uhe(c.token,u.token);return h!==0?h:c.index-u.index});let t=0,i="000000",n="ffffff";for(;o.length>=1&&o[0].token==="";){const c=o.shift();c.fontStyle!==-1&&(t=c.fontStyle),c.foreground!==null&&(i=c.foreground),c.background!==null&&(n=c.background)}const s=new Hhe;for(const c of e)s.getId(c);const r=s.getId(i),a=s.getId(n),l=new lR(t,r,a),d=new dR(l);for(let c=0,u=o.length;c"u"){const n=this._match(t),s=$he(t);i=(n.metadata|s<<8)>>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const zhe=/\b(comment|string|regex|regexp)\b/;function $he(o){const e=o.match(zhe);if(!e)return 0;switch(e[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}function Uhe(o,e){return oe?1:0}class lR{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new lR(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){e!==-1&&(this._fontStyle=e),t!==0&&(this._foreground=t),i!==0&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class dR{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;const t=e.indexOf(".");let i,n;t===-1?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));const s=this._children.get(i);return typeof s<"u"?s.match(n):this._mainRule}insert(e,t,i,n){if(e===""){this._mainRule.acceptOverwrite(t,i,n);return}const s=e.indexOf(".");let r,a;s===-1?(r=e,a=""):(r=e.substring(0,s),a=e.substring(s+1));let l=this._children.get(r);typeof l>"u"&&(l=new dR(this._mainRule.clone()),this._children.set(r,l)),l.insert(a,t,i,n)}}function jhe(o){const e=[];for(let t=1,i=o.length;t({format:n.format,location:n.location.toString()}))}}o.toJSONObject=e;function t(i){const n=s=>As(s)?s:void 0;if(i&&Array.isArray(i.src)&&i.src.every(s=>As(s.format)&&As(s.location)))return{weight:n(i.weight),style:n(i.style),src:i.src.map(s=>({format:s.format,location:ze.parse(s.location)}))}}o.fromJSONObject=t})(p5||(p5={}));class Xhe{constructor(){this._onDidChange=new W,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:p("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:p("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${Ue.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const s=this.iconsById[e];if(s){if(i&&!s.description){s.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const l=this.iconReferenceSchema.enum.indexOf(e);l!==-1&&(this.iconReferenceSchema.enumDescriptions[l]=i),this._onDidChange.fire()}return s}const r={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=r;const a={$ref:"#/definitions/icons"};return n&&(a.deprecationMessage=n),i&&(a.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=a,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(s,r)=>s.id.localeCompare(r.id),t=s=>{for(;Ue.isThemeIcon(s.defaults);)s=this.iconsById[s.defaults.id];return`codicon codicon-${s?s.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map(s=>this.iconsById[s]);for(const s of n.filter(r=>!!r.description).sort(e))i.push(`||${s.id}|${Ue.isThemeIcon(s.defaults)?s.defaults.id:s.id}|${s.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const s of n.filter(r=>!Ue.isThemeIcon(r.defaults)).sort(e))i.push(`||${s.id}|`);return i.join(` +`)}}const Vg=new Xhe;xi.add(Yhe.IconContribution,Vg);function Zi(o,e,t,i){return Vg.registerIcon(o,e,t,i)}function Q6(){return Vg}function Qhe(){const o=d8();for(const e in o){const t="\\"+o[e].toString(16);Vg.registerIcon(e,{fontCharacter:t})}}Qhe();const J6="vscode://schemas/icons",eW=xi.as(My.JSONContribution);eW.registerSchema(J6,Vg.getIconSchema());const m5=new Yt(()=>eW.notifySchemaChanged(J6),200);Vg.onDidChange(()=>{m5.isScheduled()||m5.schedule()});const tW=Zi("widget-close",ve.close,p("widgetClose","Icon for the close action in widgets."));Zi("goto-previous-location",ve.arrowUp,p("previousChangeIcon","Icon for goto previous editor location."));Zi("goto-next-location",ve.arrowDown,p("nextChangeIcon","Icon for goto next editor location."));Ue.modify(ve.sync,"spin");Ue.modify(ve.loading,"spin");function Jhe(o){const e=new de,t=e.add(new W),i=Q6();return e.add(i.onDidChange(()=>t.fire())),o&&e.add(o.onDidProductIconThemeChange(()=>t.fire())),{dispose:()=>e.dispose(),onDidChange:t.event,getCSS(){const n=o?o.getProductIconTheme():new iW,s={},r=l=>{const d=n.getIcon(l);if(!d)return;const c=d.font;return c?(s[c.id]=c.definition,`.codicon-${l.id}:before { content: '${d.fontCharacter}'; font-family: ${lO(c.id)}; }`):`.codicon-${l.id}:before { content: '${d.fontCharacter}'; }`},a=[];for(const l of i.getIcons()){const d=r(l);d&&a.push(d)}for(const l in s){const d=s[l],c=d.weight?`font-weight: ${d.weight};`:"",u=d.style?`font-style: ${d.style};`:"",h=d.src.map(g=>`${du(g.location)} format('${g.format}')`).join(", ");a.push(`@font-face { src: ${h}; font-family: ${lO(l)};${c}${u} font-display: block; }`)}return a.join(` +`)}}}class iW{getIcon(e){const t=Q6();let i=e.defaults;for(;Ue.isThemeIcon(i);){const n=t.getIcon(i.id);if(!n)return;i=n.defaults}return i}}const yd="vs",_p="vs-dark",Uh="hc-black",jh="hc-light",nW=xi.as(N7.ColorContribution),ege=xi.as(q7.ThemingContribution);class sW{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(F1(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,Y.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=LN(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,Y.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);if(i)return i;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=nW.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case yd:return lr.LIGHT;case Uh:return lr.HIGH_CONTRAST_DARK;case jh:return lr.HIGH_CONTRAST_LIGHT;default:return lr.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const s=LN(this.themeData.base);e=s.rules,s.encodedTokensColors&&(t=s.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const s={token:""};i&&(s.foreground=i),n&&(s.background=n),e.push(s)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=X6.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const s=this.tokenTheme._match([e].concat(t).join(".")).metadata,r=Yn.getForeground(s),a=Yn.getFontStyle(s);return{foreground:r,italic:!!(a&1),bold:!!(a&2),underline:!!(a&4),strikethrough:!!(a&8)}}}function F1(o){return o===yd||o===_p||o===Uh||o===jh}function LN(o){switch(o){case yd:return Khe;case _p:return qhe;case Uh:return Ghe;case jh:return Zhe}}function TC(o){const e=LN(o);return new sW(o,e)}class tge extends q{constructor(){super(),this._onColorThemeChange=this._register(new W),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new W),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new iW,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(yd,TC(yd)),this._knownThemes.set(_p,TC(_p)),this._knownThemes.set(Uh,TC(Uh)),this._knownThemes.set(jh,TC(jh));const e=this._register(Jhe(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} +${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(yd),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),C8("(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return fw(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=mr(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),q.None}_registerShadowDomContainer(e){const t=mr(e,i=>{i.className="monaco-colors",i.textContent=this._allCSS});return this._styleElements.push(t),{dispose:()=>{for(let i=0;i{i.base===e&&i.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(yd),this._updateActualTheme(t)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=Ai.matchMedia("(forced-colors: active)").matches;if(e!==xa(this._theme.type)){let t;Pp(this._theme.type)?t=e?Uh:_p:t=e?jh:yd,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:r=>{t[r]||(e.push(r),t[r]=!0)}};ege.getThemingParticipants().forEach(r=>r(this._theme,i,this._environment));const n=[];for(const r of nW.getColors()){const a=this._theme.getColor(r.id,!0);a&&n.push(`${UM(r.id)}: ${a.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${n.join(` +`)} }`);const s=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(jhe(s)),this._themeCSS=e.join(` `),this._updateCSS(),Ei.setColorMap(s),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS} -${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}const Jo=bt("themeService");var Qhe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Jx=function(o,e){return function(t,i){e(t,i,o)}};let DN=class extends q{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new W,this._onDidChangeReducedMotion=new W,this._accessibilityModeEnabledContext=s0.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(r=>{r.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),r.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),n(),this._register(this.onDidChangeScreenReaderOptimized(()=>n()));const s=Ai.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=s.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(s)}initReducedMotionListeners(e){this._register(J(e,"change",()=>{this._systemMotionReduced=e.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const t=()=>{const i=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("reduce-motion",i),this._layoutService.mainContainer.classList.toggle("enable-motion",!i)};t(),this._register(this.onDidChangeReducedMotion(()=>t()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return e==="on"||e==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};DN=Qhe([Jx(0,Xe),Jx(1,wm),Jx(2,Dt)],DN);var mL=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hg=function(o,e){return function(t,i){e(t,i,o)}},_f,gc;let xN=class{constructor(e,t){this._commandService=e,this._hiddenStates=new vS(t)}createMenu(e,t,i){return new IN(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,t)}resetHiddenStates(e){this._hiddenStates.reset(e)}};xN=mL([hg(0,Ri),hg(1,Xr)],xN);let vS=_f=class{constructor(e){this._storageService=e,this._disposables=new de,this._onDidChange=new W,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(_f._key,0,"{}");this._data=JSON.parse(t)}catch{this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,_f._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{const t=e.get(_f._key,0,"{}");this._data=JSON.parse(t)}catch(t){console.log("FAILED to read storage after UPDATE",t)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){var i;return(i=this._hiddenByDefaultCache.get(`${e.id}/${t}`))!==null&&i!==void 0?i:!1}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){var i,n;const s=this._isHiddenByDefault(e,t),r=(n=(i=this._data[e.id])===null||i===void 0?void 0:i.includes(t))!==null&&n!==void 0?n:!1;return s?!r:r}updateHidden(e,t,i){this._isHiddenByDefault(e,t)&&(i=!i);const s=this._data[e.id];if(i)s?s.indexOf(t)<0&&s.push(t):this._data[e.id]=[t];else if(s){const r=s.indexOf(t);r>=0&&Xq(s,r),s.length===0&&delete this._data[e.id]}this._persist()}reset(e){if(e===void 0)this._data=Object.create(null),this._persist();else{for(const{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const e=JSON.stringify(this._data);this._storageService.store(_f._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};vS._key="menu.hiddenCommands";vS=_f=mL([hg(0,Xr)],vS);let kN=gc=class{constructor(e,t,i,n,s){this._id=e,this._hiddenStates=t,this._collectContextKeysForSubmenus=i,this._commandService=n,this._contextKeyService=s,this._menuGroups=[],this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const e=zn.getMenuItems(this._id);let t;e.sort(gc._compareMenuItems);for(const i of e){const n=i.group||"";(!t||t[0]!==n)&&(t=[n,[]],this._menuGroups.push(t)),t[1].push(i),this._collectContextKeys(i)}}_collectContextKeys(e){if(gc._fillInKbExprKeys(e.when,this._structureContextKeys),Lf(e)){if(e.command.precondition&&gc._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){const t=e.command.toggled.condition||e.command.toggled;gc._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&zn.getMenuItems(e.submenu).forEach(this._collectContextKeys,this)}createActionGroups(e){const t=[];for(const i of this._menuGroups){const[n,s]=i,r=[];for(const a of s)if(this._contextKeyService.contextMatchesRules(a.when)){const l=Lf(a);l&&this._hiddenStates.setDefaultState(this._id,a.command.id,!!a.isHiddenByDefault);const d=Jhe(this._id,l?a.command:a,this._hiddenStates);if(l)r.push(new Ur(a.command,a.alt,e,d,this._contextKeyService,this._commandService));else{const c=new gc(a.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(e),u=Mn.join(...c.map(h=>h[1]));u.length>0&&r.push(new xv(a,d,u))}}r.length>0&&t.push([n,r])}return t}static _fillInKbExprKeys(e,t){if(e)for(const i of e.keys())t.add(i)}static _compareMenuItems(e,t){const i=e.group,n=t.group;if(i!==n){if(i){if(!n)return-1}else return 1;if(i==="navigation")return-1;if(n==="navigation")return 1;const a=i.localeCompare(n);if(a!==0)return a}const s=e.order||0,r=t.order||0;return sr?1:gc._compareTitles(Lf(e)?e.command.title:e.title,Lf(t)?t.command.title:t.title)}static _compareTitles(e,t){const i=typeof e=="string"?e:e.original,n=typeof t=="string"?t:t.original;return i.localeCompare(n)}};kN=gc=mL([hg(3,Ri),hg(4,Xe)],kN);let IN=class{constructor(e,t,i,n,s){this._disposables=new de,this._menuInfo=new kN(e,t,i.emitEventsForSubmenuChanges,n,s);const r=new Yt(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},i.eventDebounceDelay);this._disposables.add(r),this._disposables.add(zn.onDidChangeMenu(c=>{c.has(e)&&r.schedule()}));const a=this._disposables.add(new de),l=c=>{let u=!1,h=!1,g=!1;for(const f of c)if(u=u||f.isStructuralChange,h=h||f.isEnablementChange,g=g||f.isToggleChange,u&&h&&g)break;return{menu:this,isStructuralChange:u,isEnablementChange:h,isToggleChange:g}},d=()=>{a.add(s.onDidChangeContext(c=>{const u=c.affectsSome(this._menuInfo.structureContextKeys),h=c.affectsSome(this._menuInfo.preconditionContextKeys),g=c.affectsSome(this._menuInfo.toggledContextKeys);(u||h||g)&&this._onDidChange.fire({menu:this,isStructuralChange:u,isEnablementChange:h,isToggleChange:g})})),a.add(t.onDidChange(c=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new J9({onWillAddFirstListener:d,onDidRemoveLastListener:a.clear.bind(a),delay:i.eventDebounceDelay,merge:l}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};IN=mL([hg(3,Ri),hg(4,Xe)],IN);function Jhe(o,e,t){const i=zY(e)?e.submenu.id:e.id,n=typeof e.title=="string"?e.title:e.title.value,s=Qf({id:`hide/${o.id}/${i}`,label:p("hide.label","Hide '{0}'",n),run(){t.updateHidden(o,i,!0)}}),r=Qf({id:`toggle/${o.id}/${i}`,label:n,get checked(){return!t.isHidden(o,i)},run(){t.updateHidden(o,i,!!this.checked)}});return{hide:s,toggle:r,get isHidden(){return!r.checked}}}var ege=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_5=function(o,e){return function(t,i){e(t,i,o)}};let EN=class extends q{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],(ru||w7)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const e=()=>{const t=new wy;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=t,navigator.clipboard.write([new ClipboardItem({"text/plain":t.p})]).catch(async i=>{(!(i instanceof Error)||i.name!=="NotAllowedError"||!t.isRejected)&&this.logService.error(i)})};this._register(ye.runAndSubscribe(this.layoutService.onDidAddContainer,({container:t,disposables:i})=>{i.add(J(t,"click",e)),i.add(J(t,"keydown",e))},{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,t){if(t){this.mapTextToType.set(t,e);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return await navigator.clipboard.writeText(e)}catch(r){console.error(r)}const i=fm(),n=i.activeElement,s=i.body.appendChild(pe("textarea",{"aria-hidden":!0}));s.style.height="1px",s.style.width="1px",s.style.position="absolute",s.value=e,s.focus(),s.select(),i.execCommand("copy"),n instanceof HTMLElement&&n.focus(),i.body.removeChild(s)}async readText(e){if(e)return this.mapTextToType.get(e)||"";try{return await navigator.clipboard.readText()}catch(t){return console.error(t),""}}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}async writeResources(e){this.resources=e}async readResources(){return this.resources}};EN=ege([_5(0,wm),_5(1,bo)],EN);const Xd=bt("clipboardService");var tge=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ige=function(o,e){return function(t,i){e(t,i,o)}};const iv="data-keybinding-context";let cR=class{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return{...this._value}}setValue(e,t){return this._value[e]!==t?(this._value[e]=t,!0):!1}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){const t=this._value[e];return typeof t>"u"&&this._parent?this._parent.getValue(e):t}};class qp extends cR{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}qp.INSTANCE=new qp;class fb extends cR{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=gp.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(n=>{if(n.source===7){const s=Array.from(this._values,([r])=>r);this._values.clear(),i.fire(new b5(s))}else{const s=[];for(const r of n.affectedKeys){const a=`config.${r}`,l=this._values.findSuperstr(a);l!==void 0&&(s.push(...wt.map(l,([d])=>d)),this._values.deleteSuperstr(a)),this._values.has(a)&&(s.push(a),this._values.delete(a))}i.fire(new b5(s))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(fb._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(fb._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:Array.isArray(i)?n=JSON.stringify(i):n=i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}fb._keyPrefix="config.";class nge{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class v5{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class b5{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every(t=>e.has(t))}}class sge{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every(t=>t.allKeysContainedIn(e))}}function oge(o,e){return o.allKeysContainedIn(new Set(Object.keys(e)))}class oW extends q{constructor(e){super(),this._onDidChangeContext=this._register(new Yh({merge:t=>new sge(t)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new nge(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new rge(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return e?e.evaluate(t):!0}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new v5(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new v5(e))}getContext(e){return this._isDisposed?qp.INSTANCE:this.getContextValuesContainer(age(e))}dispose(){super.dispose(),this._isDisposed=!0}}let NN=class extends oW{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;const t=this._register(new fb(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t)}getContextValuesContainer(e){return this._isDisposed?qp.INSTANCE:this._contexts.get(e)||qp.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const t=++this._lastContextId;return this._contexts.set(t,new cR(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};NN=tge([ige(0,Dt)],NN);class rge extends oW{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new An),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(iv)){let i="";this._domNode.classList&&(i=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${i?": "+i:""}`)}this._domNode.setAttribute(iv,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(e=>{const i=this._parent.getContextValuesContainer(this._myContextId).value;oge(e,i)||this._onDidChangeContext.fire(e)})}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(iv),super.dispose())}getContextValuesContainer(e){return this._isDisposed?qp.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}function age(o){for(;o;){if(o.hasAttribute(iv)){const e=o.getAttribute(iv);return e?parseInt(e,10):NaN}o=o.parentElement}return 0}function lge(o,e,t){o.get(Xe).createKey(String(e),dge(t))}function dge(o){return V9(o,e=>{if(typeof e=="object"&&e.$mid===1)return ze.revive(e).toString();if(e instanceof ze)return e.toString()})}Et.registerCommand("_setContext",lge);Et.registerCommand({id:"getContextKeyInfo",handler(){return[...De.all()].sort((o,e)=>o.key.localeCompare(e.key))},metadata:{description:p("getContextKeyInfo","A command that returns information about context keys"),args:[]}});Et.registerCommand("_generateContextKeyInfo",function(){const o=[],e=new Set;for(const t of De.all())e.has(t.key)||(e.add(t.key),o.push(t));o.sort((t,i)=>t.key.localeCompare(i.key)),console.log(JSON.stringify(o,void 0,2))});let cge=class{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}};class C5{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const t of this._nodes.values())t.outgoing.size===0&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(n.key,n),n.incoming.set(i.key,i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(const i of this._nodes.values())i.outgoing.delete(t),i.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new cge(t,e),this._nodes.set(t,i)),i}isEmpty(){return this._nodes.size===0}toString(){const e=[];for(const[t,i]of this._nodes)e.push(`${t} +${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}const Jo=bt("themeService");var ige=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Jx=function(o,e){return function(t,i){e(t,i,o)}};let DN=class extends q{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new W,this._onDidChangeReducedMotion=new W,this._accessibilityModeEnabledContext=s0.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(r=>{r.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),r.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),n(),this._register(this.onDidChangeScreenReaderOptimized(()=>n()));const s=Ai.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=s.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(s)}initReducedMotionListeners(e){this._register(J(e,"change",()=>{this._systemMotionReduced=e.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const t=()=>{const i=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("reduce-motion",i),this._layoutService.mainContainer.classList.toggle("enable-motion",!i)};t(),this._register(this.onDidChangeReducedMotion(()=>t()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return e==="on"||e==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};DN=ige([Jx(0,Xe),Jx(1,wm),Jx(2,Dt)],DN);var mL=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hg=function(o,e){return function(t,i){e(t,i,o)}},_f,gc;let xN=class{constructor(e,t){this._commandService=e,this._hiddenStates=new vS(t)}createMenu(e,t,i){return new IN(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,t)}resetHiddenStates(e){this._hiddenStates.reset(e)}};xN=mL([hg(0,Ri),hg(1,Xr)],xN);let vS=_f=class{constructor(e){this._storageService=e,this._disposables=new de,this._onDidChange=new W,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(_f._key,0,"{}");this._data=JSON.parse(t)}catch{this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,_f._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{const t=e.get(_f._key,0,"{}");this._data=JSON.parse(t)}catch(t){console.log("FAILED to read storage after UPDATE",t)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){var i;return(i=this._hiddenByDefaultCache.get(`${e.id}/${t}`))!==null&&i!==void 0?i:!1}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){var i,n;const s=this._isHiddenByDefault(e,t),r=(n=(i=this._data[e.id])===null||i===void 0?void 0:i.includes(t))!==null&&n!==void 0?n:!1;return s?!r:r}updateHidden(e,t,i){this._isHiddenByDefault(e,t)&&(i=!i);const s=this._data[e.id];if(i)s?s.indexOf(t)<0&&s.push(t):this._data[e.id]=[t];else if(s){const r=s.indexOf(t);r>=0&&tG(s,r),s.length===0&&delete this._data[e.id]}this._persist()}reset(e){if(e===void 0)this._data=Object.create(null),this._persist();else{for(const{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const e=JSON.stringify(this._data);this._storageService.store(_f._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};vS._key="menu.hiddenCommands";vS=_f=mL([hg(0,Xr)],vS);let kN=gc=class{constructor(e,t,i,n,s){this._id=e,this._hiddenStates=t,this._collectContextKeysForSubmenus=i,this._commandService=n,this._contextKeyService=s,this._menuGroups=[],this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const e=zn.getMenuItems(this._id);let t;e.sort(gc._compareMenuItems);for(const i of e){const n=i.group||"";(!t||t[0]!==n)&&(t=[n,[]],this._menuGroups.push(t)),t[1].push(i),this._collectContextKeys(i)}}_collectContextKeys(e){if(gc._fillInKbExprKeys(e.when,this._structureContextKeys),Lf(e)){if(e.command.precondition&&gc._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){const t=e.command.toggled.condition||e.command.toggled;gc._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&zn.getMenuItems(e.submenu).forEach(this._collectContextKeys,this)}createActionGroups(e){const t=[];for(const i of this._menuGroups){const[n,s]=i,r=[];for(const a of s)if(this._contextKeyService.contextMatchesRules(a.when)){const l=Lf(a);l&&this._hiddenStates.setDefaultState(this._id,a.command.id,!!a.isHiddenByDefault);const d=nge(this._id,l?a.command:a,this._hiddenStates);if(l)r.push(new Ur(a.command,a.alt,e,d,this._contextKeyService,this._commandService));else{const c=new gc(a.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(e),u=Mn.join(...c.map(h=>h[1]));u.length>0&&r.push(new xv(a,d,u))}}r.length>0&&t.push([n,r])}return t}static _fillInKbExprKeys(e,t){if(e)for(const i of e.keys())t.add(i)}static _compareMenuItems(e,t){const i=e.group,n=t.group;if(i!==n){if(i){if(!n)return-1}else return 1;if(i==="navigation")return-1;if(n==="navigation")return 1;const a=i.localeCompare(n);if(a!==0)return a}const s=e.order||0,r=t.order||0;return sr?1:gc._compareTitles(Lf(e)?e.command.title:e.title,Lf(t)?t.command.title:t.title)}static _compareTitles(e,t){const i=typeof e=="string"?e:e.original,n=typeof t=="string"?t:t.original;return i.localeCompare(n)}};kN=gc=mL([hg(3,Ri),hg(4,Xe)],kN);let IN=class{constructor(e,t,i,n,s){this._disposables=new de,this._menuInfo=new kN(e,t,i.emitEventsForSubmenuChanges,n,s);const r=new Yt(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},i.eventDebounceDelay);this._disposables.add(r),this._disposables.add(zn.onDidChangeMenu(c=>{c.has(e)&&r.schedule()}));const a=this._disposables.add(new de),l=c=>{let u=!1,h=!1,g=!1;for(const f of c)if(u=u||f.isStructuralChange,h=h||f.isEnablementChange,g=g||f.isToggleChange,u&&h&&g)break;return{menu:this,isStructuralChange:u,isEnablementChange:h,isToggleChange:g}},d=()=>{a.add(s.onDidChangeContext(c=>{const u=c.affectsSome(this._menuInfo.structureContextKeys),h=c.affectsSome(this._menuInfo.preconditionContextKeys),g=c.affectsSome(this._menuInfo.toggledContextKeys);(u||h||g)&&this._onDidChange.fire({menu:this,isStructuralChange:u,isEnablementChange:h,isToggleChange:g})})),a.add(t.onDidChange(c=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new J9({onWillAddFirstListener:d,onDidRemoveLastListener:a.clear.bind(a),delay:i.eventDebounceDelay,merge:l}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};IN=mL([hg(3,Ri),hg(4,Xe)],IN);function nge(o,e,t){const i=KY(e)?e.submenu.id:e.id,n=typeof e.title=="string"?e.title:e.title.value,s=Qf({id:`hide/${o.id}/${i}`,label:p("hide.label","Hide '{0}'",n),run(){t.updateHidden(o,i,!0)}}),r=Qf({id:`toggle/${o.id}/${i}`,label:n,get checked(){return!t.isHidden(o,i)},run(){t.updateHidden(o,i,!!this.checked)}});return{hide:s,toggle:r,get isHidden(){return!r.checked}}}var sge=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_5=function(o,e){return function(t,i){e(t,i,o)}};let EN=class extends q{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],(ru||w8)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const e=()=>{const t=new wy;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=t,navigator.clipboard.write([new ClipboardItem({"text/plain":t.p})]).catch(async i=>{(!(i instanceof Error)||i.name!=="NotAllowedError"||!t.isRejected)&&this.logService.error(i)})};this._register(ye.runAndSubscribe(this.layoutService.onDidAddContainer,({container:t,disposables:i})=>{i.add(J(t,"click",e)),i.add(J(t,"keydown",e))},{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,t){if(t){this.mapTextToType.set(t,e);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return await navigator.clipboard.writeText(e)}catch(r){console.error(r)}const i=fm(),n=i.activeElement,s=i.body.appendChild(pe("textarea",{"aria-hidden":!0}));s.style.height="1px",s.style.width="1px",s.style.position="absolute",s.value=e,s.focus(),s.select(),i.execCommand("copy"),n instanceof HTMLElement&&n.focus(),i.body.removeChild(s)}async readText(e){if(e)return this.mapTextToType.get(e)||"";try{return await navigator.clipboard.readText()}catch(t){return console.error(t),""}}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}async writeResources(e){this.resources=e}async readResources(){return this.resources}};EN=sge([_5(0,wm),_5(1,bo)],EN);const Xd=bt("clipboardService");var oge=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rge=function(o,e){return function(t,i){e(t,i,o)}};const iv="data-keybinding-context";let cR=class{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return{...this._value}}setValue(e,t){return this._value[e]!==t?(this._value[e]=t,!0):!1}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){const t=this._value[e];return typeof t>"u"&&this._parent?this._parent.getValue(e):t}};class qp extends cR{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}qp.INSTANCE=new qp;class fb extends cR{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=gp.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(n=>{if(n.source===7){const s=Array.from(this._values,([r])=>r);this._values.clear(),i.fire(new b5(s))}else{const s=[];for(const r of n.affectedKeys){const a=`config.${r}`,l=this._values.findSuperstr(a);l!==void 0&&(s.push(...wt.map(l,([d])=>d)),this._values.deleteSuperstr(a)),this._values.has(a)&&(s.push(a),this._values.delete(a))}i.fire(new b5(s))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(fb._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(fb._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:Array.isArray(i)?n=JSON.stringify(i):n=i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}fb._keyPrefix="config.";class age{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class v5{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class b5{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every(t=>e.has(t))}}class lge{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every(t=>t.allKeysContainedIn(e))}}function dge(o,e){return o.allKeysContainedIn(new Set(Object.keys(e)))}class oW extends q{constructor(e){super(),this._onDidChangeContext=this._register(new Yh({merge:t=>new lge(t)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new age(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new cge(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return e?e.evaluate(t):!0}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new v5(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new v5(e))}getContext(e){return this._isDisposed?qp.INSTANCE:this.getContextValuesContainer(uge(e))}dispose(){super.dispose(),this._isDisposed=!0}}let NN=class extends oW{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;const t=this._register(new fb(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t)}getContextValuesContainer(e){return this._isDisposed?qp.INSTANCE:this._contexts.get(e)||qp.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const t=++this._lastContextId;return this._contexts.set(t,new cR(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};NN=oge([rge(0,Dt)],NN);class cge extends oW{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new An),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(iv)){let i="";this._domNode.classList&&(i=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${i?": "+i:""}`)}this._domNode.setAttribute(iv,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(e=>{const i=this._parent.getContextValuesContainer(this._myContextId).value;dge(e,i)||this._onDidChangeContext.fire(e)})}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(iv),super.dispose())}getContextValuesContainer(e){return this._isDisposed?qp.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}function uge(o){for(;o;){if(o.hasAttribute(iv)){const e=o.getAttribute(iv);return e?parseInt(e,10):NaN}o=o.parentElement}return 0}function hge(o,e,t){o.get(Xe).createKey(String(e),gge(t))}function gge(o){return V9(o,e=>{if(typeof e=="object"&&e.$mid===1)return ze.revive(e).toString();if(e instanceof ze)return e.toString()})}Et.registerCommand("_setContext",hge);Et.registerCommand({id:"getContextKeyInfo",handler(){return[...De.all()].sort((o,e)=>o.key.localeCompare(e.key))},metadata:{description:p("getContextKeyInfo","A command that returns information about context keys"),args:[]}});Et.registerCommand("_generateContextKeyInfo",function(){const o=[],e=new Set;for(const t of De.all())e.has(t.key)||(e.add(t.key),o.push(t));o.sort((t,i)=>t.key.localeCompare(i.key)),console.log(JSON.stringify(o,void 0,2))});let fge=class{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}};class C5{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const t of this._nodes.values())t.outgoing.size===0&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(n.key,n),n.incoming.set(i.key,i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(const i of this._nodes.values())i.outgoing.delete(t),i.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new fge(t,e),this._nodes.set(t,i)),i}isEmpty(){return this._nodes.size===0}toString(){const e=[];for(const[t,i]of this._nodes)e.push(`${t} (-> incoming)[${[...i.incoming.keys()].join(", ")}] (outgoing ->)[${[...i.outgoing.keys()].join(",")}] `);return e.join(` -`)}findCycleSlow(){for(const[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(const[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const s=this._findCycle(n,t);if(s)return s;t.delete(i)}}}const uge=!1;class w5 extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=(t=e.findCycleSlow())!==null&&t!==void 0?t:`UNABLE to detect cycle, dumping graph: -${e.toString()}`}}class bS{constructor(e=new h0,t=!1,i,n=uge){var s;this._services=e,this._strict=t,this._parent=i,this._enableTracing=n,this._activeInstantiations=new Set,this._services.set(qe,this),this._globalGraph=n?(s=i==null?void 0:i._globalGraph)!==null&&s!==void 0?s:new C5(r=>r):void 0}createChild(e){return new bS(e,this._strict,this,this._enableTracing)}invokeFunction(e,...t){const i=$s.traceInvocation(this._enableTracing,e);let n=!1;try{return e({get:r=>{if(n)throw tM("service accessor is only valid during the invocation of its target method");const a=this._getOrCreateServiceInstance(r,i);if(!a)throw new Error(`[invokeFunction] unknown service '${r}'`);return a}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof tl?(i=$s.traceCreation(this._enableTracing,e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=$s.traceCreation(this._enableTracing,e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=wa.getServiceDependencies(e).sort((a,l)=>a.index-l.index),s=[];for(const a of n){const l=this._getOrCreateServiceInstance(a.id,i);l||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`,!1),s.push(l)}const r=n.length>0?n[0].index:t.length;if(t.length!==r){console.trace(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);const a=r-t.length;a>0?t=t.concat(new Array(a)):t=t.slice(0,r)}return Reflect.construct(e,t.concat(s))}_setServiceInstance(e,t){if(this._services.get(e)instanceof tl)this._services.set(e,t);else if(this._parent)this._parent._setServiceInstance(e,t);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){const t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const i=this._getServiceInstanceOrDescriptor(e);return i instanceof tl?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){var n;const s=new C5(l=>l.id.toString());let r=0;const a=[{id:e,desc:t,_trace:i}];for(;a.length;){const l=a.pop();if(s.lookupOrInsertNode(l),r++>1e3)throw new w5(s);for(const d of wa.getServiceDependencies(l.desc.ctor)){const c=this._getServiceInstanceOrDescriptor(d.id);if(c||this._throwIfStrict(`[createInstance] ${e} depends on ${d.id} which is NOT registered.`,!0),(n=this._globalGraph)===null||n===void 0||n.insertEdge(String(l.id),String(d.id)),c instanceof tl){const u={id:d.id,desc:c,_trace:l._trace.branch(d.id,!0)};s.insertEdge(l,u),a.push(u)}}}for(;;){const l=s.roots();if(l.length===0){if(!s.isEmpty())throw new w5(s);break}for(const{data:d}of l){if(this._getServiceInstanceOrDescriptor(d.id)instanceof tl){const u=this._createServiceInstanceWithOwner(d.id,d.desc.ctor,d.desc.staticArguments,d.desc.supportsDelayedInstantiation,d._trace);this._setServiceInstance(d.id,u)}s.removeNode(d)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,s){if(this._services.get(e)instanceof tl)return this._createServiceInstance(e,t,i,n,s);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,s);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,i=[],n,s){if(n){const r=new bS(void 0,this._strict,this,this._enableTracing);r._globalGraphImplicitDependency=String(e);const a=new Map,l=new iX(()=>{const d=r._createInstance(t,i,s);for(const[c,u]of a){const h=d[c];if(typeof h=="function")for(const g of u)h.apply(d,g)}return a.clear(),d});return new Proxy(Object.create(null),{get(d,c){if(!l.isInitialized&&typeof c=="string"&&(c.startsWith("onDid")||c.startsWith("onWill"))){let g=a.get(c);return g||(g=new Ns,a.set(c,g)),(m,v,_)=>{const b=g.push([m,v,_]);return je(b)}}if(c in d)return d[c];const u=l.value;let h=u[c];return typeof h!="function"||(h=h.bind(u),d[c]=h),h},set(d,c,u){return l.value[c]=u,!0},getPrototypeOf(d){return t.prototype}})}else return this._createInstance(t,i,s)}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}}class $s{static traceInvocation(e,t){return e?new $s(2,t.name||new Error().stack.split(` +`)}findCycleSlow(){for(const[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(const[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const s=this._findCycle(n,t);if(s)return s;t.delete(i)}}}const pge=!1;class w5 extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=(t=e.findCycleSlow())!==null&&t!==void 0?t:`UNABLE to detect cycle, dumping graph: +${e.toString()}`}}class bS{constructor(e=new h0,t=!1,i,n=pge){var s;this._services=e,this._strict=t,this._parent=i,this._enableTracing=n,this._activeInstantiations=new Set,this._services.set(qe,this),this._globalGraph=n?(s=i==null?void 0:i._globalGraph)!==null&&s!==void 0?s:new C5(r=>r):void 0}createChild(e){return new bS(e,this._strict,this,this._enableTracing)}invokeFunction(e,...t){const i=$s.traceInvocation(this._enableTracing,e);let n=!1;try{return e({get:r=>{if(n)throw tM("service accessor is only valid during the invocation of its target method");const a=this._getOrCreateServiceInstance(r,i);if(!a)throw new Error(`[invokeFunction] unknown service '${r}'`);return a}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof tl?(i=$s.traceCreation(this._enableTracing,e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=$s.traceCreation(this._enableTracing,e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=wa.getServiceDependencies(e).sort((a,l)=>a.index-l.index),s=[];for(const a of n){const l=this._getOrCreateServiceInstance(a.id,i);l||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`,!1),s.push(l)}const r=n.length>0?n[0].index:t.length;if(t.length!==r){console.trace(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);const a=r-t.length;a>0?t=t.concat(new Array(a)):t=t.slice(0,r)}return Reflect.construct(e,t.concat(s))}_setServiceInstance(e,t){if(this._services.get(e)instanceof tl)this._services.set(e,t);else if(this._parent)this._parent._setServiceInstance(e,t);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){const t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const i=this._getServiceInstanceOrDescriptor(e);return i instanceof tl?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){var n;const s=new C5(l=>l.id.toString());let r=0;const a=[{id:e,desc:t,_trace:i}];for(;a.length;){const l=a.pop();if(s.lookupOrInsertNode(l),r++>1e3)throw new w5(s);for(const d of wa.getServiceDependencies(l.desc.ctor)){const c=this._getServiceInstanceOrDescriptor(d.id);if(c||this._throwIfStrict(`[createInstance] ${e} depends on ${d.id} which is NOT registered.`,!0),(n=this._globalGraph)===null||n===void 0||n.insertEdge(String(l.id),String(d.id)),c instanceof tl){const u={id:d.id,desc:c,_trace:l._trace.branch(d.id,!0)};s.insertEdge(l,u),a.push(u)}}}for(;;){const l=s.roots();if(l.length===0){if(!s.isEmpty())throw new w5(s);break}for(const{data:d}of l){if(this._getServiceInstanceOrDescriptor(d.id)instanceof tl){const u=this._createServiceInstanceWithOwner(d.id,d.desc.ctor,d.desc.staticArguments,d.desc.supportsDelayedInstantiation,d._trace);this._setServiceInstance(d.id,u)}s.removeNode(d)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,s){if(this._services.get(e)instanceof tl)return this._createServiceInstance(e,t,i,n,s);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,s);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,i=[],n,s){if(n){const r=new bS(void 0,this._strict,this,this._enableTracing);r._globalGraphImplicitDependency=String(e);const a=new Map,l=new rX(()=>{const d=r._createInstance(t,i,s);for(const[c,u]of a){const h=d[c];if(typeof h=="function")for(const g of u)h.apply(d,g)}return a.clear(),d});return new Proxy(Object.create(null),{get(d,c){if(!l.isInitialized&&typeof c=="string"&&(c.startsWith("onDid")||c.startsWith("onWill"))){let g=a.get(c);return g||(g=new Ns,a.set(c,g)),(m,v,_)=>{const b=g.push([m,v,_]);return je(b)}}if(c in d)return d[c];const u=l.value;let h=u[c];return typeof h!="function"||(h=h.bind(u),d[c]=h),h},set(d,c,u){return l.value[c]=u,!0},getPrototypeOf(d){return t.prototype}})}else return this._createInstance(t,i,s)}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}}class $s{static traceInvocation(e,t){return e?new $s(2,t.name||new Error().stack.split(` `).slice(3,4).join(` `)):$s._None}static traceCreation(e,t){return e?new $s(1,t.name):$s._None}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){const i=new $s(3,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;$s._totals+=e;let t=!1;function i(s,r){const a=[],l=new Array(s+1).join(" ");for(const[d,c,u]of r._dep)if(c&&u){t=!0,a.push(`${l}CREATES -> ${d}`);const h=i(s+1,u);h&&a.push(h)}else a.push(`${l}uses -> ${d}`);return a.join(` `)}const n=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${i(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${$s._totals.toFixed(2)}ms)`];(e>2||t)&&$s.all.add(n.join(` -`))}}$s.all=new Set;$s._None=new class extends $s{constructor(){super(0,null)}stop(){}branch(){return this}};$s._totals=0;const hge=new Set([ot.inMemory,ot.vscodeSourceControl,ot.walkThrough,ot.walkThroughSnippet]);class gge{constructor(){this._byResource=new Gi,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let s=this._byOwner.get(t);s||(s=new Gi,this._byOwner.set(t,s)),s.set(e,i)}get(e,t){const i=this._byResource.get(e);return i==null?void 0:i.get(t)}delete(e,t){let i=!1,n=!1;const s=this._byResource.get(e);s&&(i=s.delete(t));const r=this._byOwner.get(t);if(r&&(n=r.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,s;return typeof e=="string"?(i=(t=this._byOwner.get(e))===null||t===void 0?void 0:t.values())!==null&&i!==void 0?i:wt.empty():ze.isUri(e)?(s=(n=this._byResource.get(e))===null||n===void 0?void 0:n.values())!==null&&s!==void 0?s:wt.empty():wt.map(wt.concat(...this._byOwner.values()),r=>r[1])}}class fge{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new Gi,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const i=this._data.get(t);i&&this._substract(i);const n=this._resourceStats(t);this._add(n),this._data.set(t,n)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(hge.has(e.scheme))return t;for(const{severity:i}of this._service.read({resource:e}))i===Mi.Error?t.errors+=1:i===Mi.Warning?t.warnings+=1:i===Mi.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class mc{constructor(){this._onMarkerChanged=new J9({delay:0,merge:mc._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new gge,this._stats=new fge(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if(P9(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const s of i){const r=mc._toMarker(e,t,s);r&&n.push(r)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:s,message:r,source:a,startLineNumber:l,startColumn:d,endLineNumber:c,endColumn:u,relatedInformation:h,tags:g}=i;if(r)return l=l>0?l:1,d=d>0?d:1,c=c>=l?c:l,u=u>0?u:d,{resource:t,owner:e,code:n,severity:s,message:r,source:a,startLineNumber:l,startColumn:d,endLineNumber:c,endColumn:u,relatedInformation:h,tags:g}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const s of n){const r=wt.first(s);r&&(i.push(r.resource),this._data.delete(r.resource,e))}if(ls(t)){const s=new Gi;for(const{resource:r,marker:a}of t){const l=mc._toMarker(e,r,a);if(!l)continue;const d=s.get(r);d?d.push(l):(s.set(r,[l]),i.push(r))}for(const[r,a]of s)this._data.set(r,e,a)}i.length>0&&this._onMarkerChanged.fire(i)}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:s}=e;if((!s||s<0)&&(s=-1),t&&i){const r=this._data.get(i,t);if(r){const a=[];for(const l of r)if(mc._accept(l,n)){const d=a.push(l);if(s>0&&d===s)break}return a}else return[]}else if(!t&&!i){const r=[];for(const a of this._data.values())for(const l of a)if(mc._accept(l,n)){const d=r.push(l);if(s>0&&d===s)return r}return r}else{const r=this._data.values(i??t),a=[];for(const l of r)for(const d of l)if(mc._accept(d,n)){const c=a.push(d);if(s>0&&c===s)return a}return a}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){const t=new Gi;for(const i of e)for(const n of i)t.set(n,!0);return Array.from(t.keys())}}class pge extends q{constructor(){super(...arguments),this._configurationModel=new os}get configurationModel(){return this._configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=new os;const e=xi.as(Va.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const i=this.getConfigurationDefaultOverrides();for(const n of e){const s=i[n],r=t[n];s!==void 0?this._configurationModel.addValue(n,s):r?this._configurationModel.addValue(n,r.default):this._configurationModel.removeValue(n)}}}const y0=bt("audioCue");class tt{static register(e){return new tt(e.fileName)}constructor(e){this.fileName=e}}tt.error=tt.register({fileName:"error.mp3"});tt.warning=tt.register({fileName:"warning.mp3"});tt.foldedArea=tt.register({fileName:"foldedAreas.mp3"});tt.break=tt.register({fileName:"break.mp3"});tt.quickFixes=tt.register({fileName:"quickFixes.mp3"});tt.taskCompleted=tt.register({fileName:"taskCompleted.mp3"});tt.taskFailed=tt.register({fileName:"taskFailed.mp3"});tt.terminalBell=tt.register({fileName:"terminalBell.mp3"});tt.diffLineInserted=tt.register({fileName:"diffLineInserted.mp3"});tt.diffLineDeleted=tt.register({fileName:"diffLineDeleted.mp3"});tt.diffLineModified=tt.register({fileName:"diffLineModified.mp3"});tt.chatRequestSent=tt.register({fileName:"chatRequestSent.mp3"});tt.chatResponsePending=tt.register({fileName:"chatResponsePending.mp3"});tt.chatResponseReceived1=tt.register({fileName:"chatResponseReceived1.mp3"});tt.chatResponseReceived2=tt.register({fileName:"chatResponseReceived2.mp3"});tt.chatResponseReceived3=tt.register({fileName:"chatResponseReceived3.mp3"});tt.chatResponseReceived4=tt.register({fileName:"chatResponseReceived4.mp3"});tt.clear=tt.register({fileName:"clear.mp3"});tt.save=tt.register({fileName:"save.mp3"});tt.format=tt.register({fileName:"format.mp3"});class mge{constructor(e){this.randomOneOf=e}}class gt{static register(e){const t=new mge("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),i=new gt(t,e.name,e.settingsKey);return gt._audioCues.add(i),i}constructor(e,t,i){this.sound=e,this.name=t,this.settingsKey=i}}gt._audioCues=new Set;gt.error=gt.register({name:p("audioCues.lineHasError.name","Error on Line"),sound:tt.error,settingsKey:"audioCues.lineHasError"});gt.warning=gt.register({name:p("audioCues.lineHasWarning.name","Warning on Line"),sound:tt.warning,settingsKey:"audioCues.lineHasWarning"});gt.foldedArea=gt.register({name:p("audioCues.lineHasFoldedArea.name","Folded Area on Line"),sound:tt.foldedArea,settingsKey:"audioCues.lineHasFoldedArea"});gt.break=gt.register({name:p("audioCues.lineHasBreakpoint.name","Breakpoint on Line"),sound:tt.break,settingsKey:"audioCues.lineHasBreakpoint"});gt.inlineSuggestion=gt.register({name:p("audioCues.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:tt.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"});gt.terminalQuickFix=gt.register({name:p("audioCues.terminalQuickFix.name","Terminal Quick Fix"),sound:tt.quickFixes,settingsKey:"audioCues.terminalQuickFix"});gt.onDebugBreak=gt.register({name:p("audioCues.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:tt.break,settingsKey:"audioCues.onDebugBreak"});gt.noInlayHints=gt.register({name:p("audioCues.noInlayHints","No Inlay Hints on Line"),sound:tt.error,settingsKey:"audioCues.noInlayHints"});gt.taskCompleted=gt.register({name:p("audioCues.taskCompleted","Task Completed"),sound:tt.taskCompleted,settingsKey:"audioCues.taskCompleted"});gt.taskFailed=gt.register({name:p("audioCues.taskFailed","Task Failed"),sound:tt.taskFailed,settingsKey:"audioCues.taskFailed"});gt.terminalCommandFailed=gt.register({name:p("audioCues.terminalCommandFailed","Terminal Command Failed"),sound:tt.error,settingsKey:"audioCues.terminalCommandFailed"});gt.terminalBell=gt.register({name:p("audioCues.terminalBell","Terminal Bell"),sound:tt.terminalBell,settingsKey:"audioCues.terminalBell"});gt.notebookCellCompleted=gt.register({name:p("audioCues.notebookCellCompleted","Notebook Cell Completed"),sound:tt.taskCompleted,settingsKey:"audioCues.notebookCellCompleted"});gt.notebookCellFailed=gt.register({name:p("audioCues.notebookCellFailed","Notebook Cell Failed"),sound:tt.taskFailed,settingsKey:"audioCues.notebookCellFailed"});gt.diffLineInserted=gt.register({name:p("audioCues.diffLineInserted","Diff Line Inserted"),sound:tt.diffLineInserted,settingsKey:"audioCues.diffLineInserted"});gt.diffLineDeleted=gt.register({name:p("audioCues.diffLineDeleted","Diff Line Deleted"),sound:tt.diffLineDeleted,settingsKey:"audioCues.diffLineDeleted"});gt.diffLineModified=gt.register({name:p("audioCues.diffLineModified","Diff Line Modified"),sound:tt.diffLineModified,settingsKey:"audioCues.diffLineModified"});gt.chatRequestSent=gt.register({name:p("audioCues.chatRequestSent","Chat Request Sent"),sound:tt.chatRequestSent,settingsKey:"audioCues.chatRequestSent"});gt.chatResponseReceived=gt.register({name:p("audioCues.chatResponseReceived","Chat Response Received"),settingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[tt.chatResponseReceived1,tt.chatResponseReceived2,tt.chatResponseReceived3,tt.chatResponseReceived4]}});gt.chatResponsePending=gt.register({name:p("audioCues.chatResponsePending","Chat Response Pending"),sound:tt.chatResponsePending,settingsKey:"audioCues.chatResponsePending"});gt.clear=gt.register({name:p("audioCues.clear","Clear"),sound:tt.clear,settingsKey:"audioCues.clear"});gt.save=gt.register({name:p("audioCues.save","Save"),sound:tt.save,settingsKey:"audioCues.save"});gt.format=gt.register({name:p("audioCues.format","Format"),sound:tt.format,settingsKey:"audioCues.format"});class _ge extends q{constructor(e,t=[]){super(),this.logger=new UY([e,...t]),this._register(e.onDidChangeLogLevel(i=>this.setLevel(i)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}const rW=[];function _L(o){rW.push(o)}function vge(){return rW.slice(0)}var Wu=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Hn=function(o,e){return function(t,i){e(t,i,o)}};class bge{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new W}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let TN=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new mZ(new bge(t))):Promise.reject(new Error("Model not found"))}};TN=Wu([Hn(0,Si)],TN);class vL{show(){return vL.NULL_PROGRESS_RUNNER}async showWhile(e,t){await e}}vL.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class Cge{withProgress(e,t,i){return t({report:()=>{}})}}class wge{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}}class Sge{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,t){let i=e;return t&&(i=i+` +`))}}$s.all=new Set;$s._None=new class extends $s{constructor(){super(0,null)}stop(){}branch(){return this}};$s._totals=0;const mge=new Set([ot.inMemory,ot.vscodeSourceControl,ot.walkThrough,ot.walkThroughSnippet]);class _ge{constructor(){this._byResource=new Gi,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let s=this._byOwner.get(t);s||(s=new Gi,this._byOwner.set(t,s)),s.set(e,i)}get(e,t){const i=this._byResource.get(e);return i==null?void 0:i.get(t)}delete(e,t){let i=!1,n=!1;const s=this._byResource.get(e);s&&(i=s.delete(t));const r=this._byOwner.get(t);if(r&&(n=r.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,s;return typeof e=="string"?(i=(t=this._byOwner.get(e))===null||t===void 0?void 0:t.values())!==null&&i!==void 0?i:wt.empty():ze.isUri(e)?(s=(n=this._byResource.get(e))===null||n===void 0?void 0:n.values())!==null&&s!==void 0?s:wt.empty():wt.map(wt.concat(...this._byOwner.values()),r=>r[1])}}class vge{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new Gi,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const i=this._data.get(t);i&&this._substract(i);const n=this._resourceStats(t);this._add(n),this._data.set(t,n)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(mge.has(e.scheme))return t;for(const{severity:i}of this._service.read({resource:e}))i===Mi.Error?t.errors+=1:i===Mi.Warning?t.warnings+=1:i===Mi.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class mc{constructor(){this._onMarkerChanged=new J9({delay:0,merge:mc._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new _ge,this._stats=new vge(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if(P9(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const s of i){const r=mc._toMarker(e,t,s);r&&n.push(r)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:s,message:r,source:a,startLineNumber:l,startColumn:d,endLineNumber:c,endColumn:u,relatedInformation:h,tags:g}=i;if(r)return l=l>0?l:1,d=d>0?d:1,c=c>=l?c:l,u=u>0?u:d,{resource:t,owner:e,code:n,severity:s,message:r,source:a,startLineNumber:l,startColumn:d,endLineNumber:c,endColumn:u,relatedInformation:h,tags:g}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const s of n){const r=wt.first(s);r&&(i.push(r.resource),this._data.delete(r.resource,e))}if(ls(t)){const s=new Gi;for(const{resource:r,marker:a}of t){const l=mc._toMarker(e,r,a);if(!l)continue;const d=s.get(r);d?d.push(l):(s.set(r,[l]),i.push(r))}for(const[r,a]of s)this._data.set(r,e,a)}i.length>0&&this._onMarkerChanged.fire(i)}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:s}=e;if((!s||s<0)&&(s=-1),t&&i){const r=this._data.get(i,t);if(r){const a=[];for(const l of r)if(mc._accept(l,n)){const d=a.push(l);if(s>0&&d===s)break}return a}else return[]}else if(!t&&!i){const r=[];for(const a of this._data.values())for(const l of a)if(mc._accept(l,n)){const d=r.push(l);if(s>0&&d===s)return r}return r}else{const r=this._data.values(i??t),a=[];for(const l of r)for(const d of l)if(mc._accept(d,n)){const c=a.push(d);if(s>0&&c===s)return a}return a}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){const t=new Gi;for(const i of e)for(const n of i)t.set(n,!0);return Array.from(t.keys())}}class bge extends q{constructor(){super(...arguments),this._configurationModel=new os}get configurationModel(){return this._configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=new os;const e=xi.as(Va.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const i=this.getConfigurationDefaultOverrides();for(const n of e){const s=i[n],r=t[n];s!==void 0?this._configurationModel.addValue(n,s):r?this._configurationModel.addValue(n,r.default):this._configurationModel.removeValue(n)}}}const y0=bt("audioCue");class tt{static register(e){return new tt(e.fileName)}constructor(e){this.fileName=e}}tt.error=tt.register({fileName:"error.mp3"});tt.warning=tt.register({fileName:"warning.mp3"});tt.foldedArea=tt.register({fileName:"foldedAreas.mp3"});tt.break=tt.register({fileName:"break.mp3"});tt.quickFixes=tt.register({fileName:"quickFixes.mp3"});tt.taskCompleted=tt.register({fileName:"taskCompleted.mp3"});tt.taskFailed=tt.register({fileName:"taskFailed.mp3"});tt.terminalBell=tt.register({fileName:"terminalBell.mp3"});tt.diffLineInserted=tt.register({fileName:"diffLineInserted.mp3"});tt.diffLineDeleted=tt.register({fileName:"diffLineDeleted.mp3"});tt.diffLineModified=tt.register({fileName:"diffLineModified.mp3"});tt.chatRequestSent=tt.register({fileName:"chatRequestSent.mp3"});tt.chatResponsePending=tt.register({fileName:"chatResponsePending.mp3"});tt.chatResponseReceived1=tt.register({fileName:"chatResponseReceived1.mp3"});tt.chatResponseReceived2=tt.register({fileName:"chatResponseReceived2.mp3"});tt.chatResponseReceived3=tt.register({fileName:"chatResponseReceived3.mp3"});tt.chatResponseReceived4=tt.register({fileName:"chatResponseReceived4.mp3"});tt.clear=tt.register({fileName:"clear.mp3"});tt.save=tt.register({fileName:"save.mp3"});tt.format=tt.register({fileName:"format.mp3"});class Cge{constructor(e){this.randomOneOf=e}}class gt{static register(e){const t=new Cge("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),i=new gt(t,e.name,e.settingsKey);return gt._audioCues.add(i),i}constructor(e,t,i){this.sound=e,this.name=t,this.settingsKey=i}}gt._audioCues=new Set;gt.error=gt.register({name:p("audioCues.lineHasError.name","Error on Line"),sound:tt.error,settingsKey:"audioCues.lineHasError"});gt.warning=gt.register({name:p("audioCues.lineHasWarning.name","Warning on Line"),sound:tt.warning,settingsKey:"audioCues.lineHasWarning"});gt.foldedArea=gt.register({name:p("audioCues.lineHasFoldedArea.name","Folded Area on Line"),sound:tt.foldedArea,settingsKey:"audioCues.lineHasFoldedArea"});gt.break=gt.register({name:p("audioCues.lineHasBreakpoint.name","Breakpoint on Line"),sound:tt.break,settingsKey:"audioCues.lineHasBreakpoint"});gt.inlineSuggestion=gt.register({name:p("audioCues.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:tt.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"});gt.terminalQuickFix=gt.register({name:p("audioCues.terminalQuickFix.name","Terminal Quick Fix"),sound:tt.quickFixes,settingsKey:"audioCues.terminalQuickFix"});gt.onDebugBreak=gt.register({name:p("audioCues.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:tt.break,settingsKey:"audioCues.onDebugBreak"});gt.noInlayHints=gt.register({name:p("audioCues.noInlayHints","No Inlay Hints on Line"),sound:tt.error,settingsKey:"audioCues.noInlayHints"});gt.taskCompleted=gt.register({name:p("audioCues.taskCompleted","Task Completed"),sound:tt.taskCompleted,settingsKey:"audioCues.taskCompleted"});gt.taskFailed=gt.register({name:p("audioCues.taskFailed","Task Failed"),sound:tt.taskFailed,settingsKey:"audioCues.taskFailed"});gt.terminalCommandFailed=gt.register({name:p("audioCues.terminalCommandFailed","Terminal Command Failed"),sound:tt.error,settingsKey:"audioCues.terminalCommandFailed"});gt.terminalBell=gt.register({name:p("audioCues.terminalBell","Terminal Bell"),sound:tt.terminalBell,settingsKey:"audioCues.terminalBell"});gt.notebookCellCompleted=gt.register({name:p("audioCues.notebookCellCompleted","Notebook Cell Completed"),sound:tt.taskCompleted,settingsKey:"audioCues.notebookCellCompleted"});gt.notebookCellFailed=gt.register({name:p("audioCues.notebookCellFailed","Notebook Cell Failed"),sound:tt.taskFailed,settingsKey:"audioCues.notebookCellFailed"});gt.diffLineInserted=gt.register({name:p("audioCues.diffLineInserted","Diff Line Inserted"),sound:tt.diffLineInserted,settingsKey:"audioCues.diffLineInserted"});gt.diffLineDeleted=gt.register({name:p("audioCues.diffLineDeleted","Diff Line Deleted"),sound:tt.diffLineDeleted,settingsKey:"audioCues.diffLineDeleted"});gt.diffLineModified=gt.register({name:p("audioCues.diffLineModified","Diff Line Modified"),sound:tt.diffLineModified,settingsKey:"audioCues.diffLineModified"});gt.chatRequestSent=gt.register({name:p("audioCues.chatRequestSent","Chat Request Sent"),sound:tt.chatRequestSent,settingsKey:"audioCues.chatRequestSent"});gt.chatResponseReceived=gt.register({name:p("audioCues.chatResponseReceived","Chat Response Received"),settingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[tt.chatResponseReceived1,tt.chatResponseReceived2,tt.chatResponseReceived3,tt.chatResponseReceived4]}});gt.chatResponsePending=gt.register({name:p("audioCues.chatResponsePending","Chat Response Pending"),sound:tt.chatResponsePending,settingsKey:"audioCues.chatResponsePending"});gt.clear=gt.register({name:p("audioCues.clear","Clear"),sound:tt.clear,settingsKey:"audioCues.clear"});gt.save=gt.register({name:p("audioCues.save","Save"),sound:tt.save,settingsKey:"audioCues.save"});gt.format=gt.register({name:p("audioCues.format","Format"),sound:tt.format,settingsKey:"audioCues.format"});class wge extends q{constructor(e,t=[]){super(),this.logger=new GY([e,...t]),this._register(e.onDidChangeLogLevel(i=>this.setLevel(i)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}const rW=[];function _L(o){rW.push(o)}function Sge(){return rW.slice(0)}var Wu=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Hn=function(o,e){return function(t,i){e(t,i,o)}};class yge{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new W}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let TN=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new CZ(new yge(t))):Promise.reject(new Error("Model not found"))}};TN=Wu([Hn(0,Si)],TN);class vL{show(){return vL.NULL_PROGRESS_RUNNER}async showWhile(e,t){await e}}vL.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class Lge{withProgress(e,t,i){return t({report:()=>{}})}}class Dge{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}}class xge{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,t){let i=e;return t&&(i=i+` -`+t),Ai.confirm(i)}async prompt(e){var t,i;let n;if(this.doConfirm(e.message,e.detail)){const r=[...(t=e.buttons)!==null&&t!==void 0?t:[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&r.push(e.cancelButton),n=await((i=r[0])===null||i===void 0?void 0:i.run({checkboxChecked:!1}))}return{result:n}}async error(e,t){await this.prompt({type:ji.Error,message:e,detail:t})}}class pb{info(e){return this.notify({severity:ji.Info,message:e})}warn(e){return this.notify({severity:ji.Warning,message:e})}error(e){return this.notify({severity:ji.Error,message:e})}notify(e){switch(e.severity){case ji.Error:console.error(e.message);break;case ji.Warning:console.warn(e.message);break;default:console.log(e.message);break}return pb.NO_OP}prompt(e,t,i,n){return pb.NO_OP}status(e,t){return q.None}}pb.NO_OP=new yae;let MN=class{constructor(e){this._onWillExecuteCommand=new W,this._onDidExecuteCommand=new W,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=Et.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}};MN=Wu([Hn(0,qe)],MN);let Gp=class extends kle{constructor(e,t,i,n,s,r){super(e,t,i,n,s),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const a=g=>{const f=new de;f.add(J(g,Se.KEY_DOWN,m=>{const v=new gi(m);this._dispatch(v,v.target)&&(v.preventDefault(),v.stopPropagation())})),f.add(J(g,Se.KEY_UP,m=>{const v=new gi(m);this._singleModifierDispatch(v,v.target)&&v.preventDefault()})),this._domNodeListeners.push(new yge(g,f))},l=g=>{for(let f=0;f{g.getOption(61)||a(g.getContainerDomNode())},c=g=>{g.getOption(61)||l(g.getContainerDomNode())};this._register(r.onCodeEditorAdd(d)),this._register(r.onCodeEditorRemove(c)),r.listCodeEditors().forEach(d);const u=g=>{a(g.getContainerDomNode())},h=g=>{l(g.getContainerDomNode())};this._register(r.onDiffEditorAdd(u)),this._register(r.onDiffEditorRemove(h)),r.listDiffEditors().forEach(u)}addDynamicKeybinding(e,t,i,n){return Hr(Et.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map(i=>{var n;return{keybinding:PI(i.keybinding,Vo),command:(n=i.command)!==null&&n!==void 0?n:null,commandArgs:i.commandArgs,when:i.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}});return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),je(()=>{for(let i=0;ithis._log(i))}return this._cachedResolver}_documentHasFocus(){return Ai.document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const s of e){const r=s.when||void 0,a=s.keybinding;if(!a)i[n++]=new TF(void 0,s.command,s.commandArgs,r,t,null,!1);else{const l=eb.resolveKeybinding(a,Vo);for(const d of l)i[n++]=new TF(d,s.command,s.commandArgs,r,t,null,!1)}}return i}resolveKeyboardEvent(e){const t=new zd(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new eb([t],Vo)}};Gp=Wu([Hn(0,Xe),Hn(1,Ri),Hn(2,vo),Hn(3,sn),Hn(4,bo),Hn(5,Ot)],Gp);class yge extends q{constructor(e,t){super(),this.domNode=e,this._register(t)}}function S5(o){return o&&typeof o=="object"&&(!o.overrideIdentifier||typeof o.overrideIdentifier=="string")&&(!o.resource||o.resource instanceof ze)}class aW{constructor(){this._onDidChangeConfiguration=new W,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const e=new pge;this._configuration=new Qy(e.reload(),new os,new os,new os),e.dispose()}getValue(e,t){const i=typeof e=="string"?e:void 0,n=S5(e)?e:S5(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const n of e){const[s,r]=n;this.getValue(s)!==r&&(this._configuration.updateValue(s,r),i.push(s))}if(i.length>0){const n=new yle({keys:i,overrides:[]},t,this._configuration);n.source=8,n.sourceConfig=null,this._onDidChangeConfiguration.fire(n)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}}let AN=class{constructor(e,t,i){this.configurationService=e,this.modelService=t,this.languageService=i,this._onDidChangeConfiguration=new W,this.configurationService.onDidChangeConfiguration(n=>{this._onDidChangeConfiguration.fire({affectedKeys:n.affectedKeys,affectsConfiguration:(s,r)=>n.affectsConfiguration(r)})})}getValue(e,t,i){const n=z.isIPosition(t)?t:null,s=n?typeof i=="string"?i:void 0:typeof t=="string"?t:void 0,r=e?this.getLanguage(e,n):void 0;return typeof s>"u"?this.configurationService.getValue({resource:e,overrideIdentifier:r}):this.configurationService.getValue(s,{resource:e,overrideIdentifier:r})}getLanguage(e,t){const i=this.modelService.getModel(e);return i?t?i.getLanguageIdAtPosition(t.lineNumber,t.column):i.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};AN=Wu([Hn(0,Dt),Hn(1,Si),Hn(2,bi)],AN);let RN=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&typeof i=="string"&&i!=="auto"?i:ws||It?` +`+t),Ai.confirm(i)}async prompt(e){var t,i;let n;if(this.doConfirm(e.message,e.detail)){const r=[...(t=e.buttons)!==null&&t!==void 0?t:[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&r.push(e.cancelButton),n=await((i=r[0])===null||i===void 0?void 0:i.run({checkboxChecked:!1}))}return{result:n}}async error(e,t){await this.prompt({type:ji.Error,message:e,detail:t})}}class pb{info(e){return this.notify({severity:ji.Info,message:e})}warn(e){return this.notify({severity:ji.Warning,message:e})}error(e){return this.notify({severity:ji.Error,message:e})}notify(e){switch(e.severity){case ji.Error:console.error(e.message);break;case ji.Warning:console.warn(e.message);break;default:console.log(e.message);break}return pb.NO_OP}prompt(e,t,i,n){return pb.NO_OP}status(e,t){return q.None}}pb.NO_OP=new kae;let MN=class{constructor(e){this._onWillExecuteCommand=new W,this._onDidExecuteCommand=new W,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=Et.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}};MN=Wu([Hn(0,qe)],MN);let Gp=class extends Tle{constructor(e,t,i,n,s,r){super(e,t,i,n,s),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const a=g=>{const f=new de;f.add(J(g,Se.KEY_DOWN,m=>{const v=new gi(m);this._dispatch(v,v.target)&&(v.preventDefault(),v.stopPropagation())})),f.add(J(g,Se.KEY_UP,m=>{const v=new gi(m);this._singleModifierDispatch(v,v.target)&&v.preventDefault()})),this._domNodeListeners.push(new kge(g,f))},l=g=>{for(let f=0;f{g.getOption(61)||a(g.getContainerDomNode())},c=g=>{g.getOption(61)||l(g.getContainerDomNode())};this._register(r.onCodeEditorAdd(d)),this._register(r.onCodeEditorRemove(c)),r.listCodeEditors().forEach(d);const u=g=>{a(g.getContainerDomNode())},h=g=>{l(g.getContainerDomNode())};this._register(r.onDiffEditorAdd(u)),this._register(r.onDiffEditorRemove(h)),r.listDiffEditors().forEach(u)}addDynamicKeybinding(e,t,i,n){return Hr(Et.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map(i=>{var n;return{keybinding:PI(i.keybinding,Vo),command:(n=i.command)!==null&&n!==void 0?n:null,commandArgs:i.commandArgs,when:i.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}});return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),je(()=>{for(let i=0;ithis._log(i))}return this._cachedResolver}_documentHasFocus(){return Ai.document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const s of e){const r=s.when||void 0,a=s.keybinding;if(!a)i[n++]=new TF(void 0,s.command,s.commandArgs,r,t,null,!1);else{const l=eb.resolveKeybinding(a,Vo);for(const d of l)i[n++]=new TF(d,s.command,s.commandArgs,r,t,null,!1)}}return i}resolveKeyboardEvent(e){const t=new zd(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new eb([t],Vo)}};Gp=Wu([Hn(0,Xe),Hn(1,Ri),Hn(2,vo),Hn(3,sn),Hn(4,bo),Hn(5,Ot)],Gp);class kge extends q{constructor(e,t){super(),this.domNode=e,this._register(t)}}function S5(o){return o&&typeof o=="object"&&(!o.overrideIdentifier||typeof o.overrideIdentifier=="string")&&(!o.resource||o.resource instanceof ze)}class aW{constructor(){this._onDidChangeConfiguration=new W,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const e=new bge;this._configuration=new Qy(e.reload(),new os,new os,new os),e.dispose()}getValue(e,t){const i=typeof e=="string"?e:void 0,n=S5(e)?e:S5(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const n of e){const[s,r]=n;this.getValue(s)!==r&&(this._configuration.updateValue(s,r),i.push(s))}if(i.length>0){const n=new kle({keys:i,overrides:[]},t,this._configuration);n.source=8,n.sourceConfig=null,this._onDidChangeConfiguration.fire(n)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}}let AN=class{constructor(e,t,i){this.configurationService=e,this.modelService=t,this.languageService=i,this._onDidChangeConfiguration=new W,this.configurationService.onDidChangeConfiguration(n=>{this._onDidChangeConfiguration.fire({affectedKeys:n.affectedKeys,affectsConfiguration:(s,r)=>n.affectsConfiguration(r)})})}getValue(e,t,i){const n=z.isIPosition(t)?t:null,s=n?typeof i=="string"?i:void 0:typeof t=="string"?t:void 0,r=e?this.getLanguage(e,n):void 0;return typeof s>"u"?this.configurationService.getValue({resource:e,overrideIdentifier:r}):this.configurationService.getValue(s,{resource:e,overrideIdentifier:r})}getLanguage(e,t){const i=this.modelService.getModel(e);return i?t?i.getLanguageIdAtPosition(t.lineNumber,t.column):i.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};AN=Wu([Hn(0,Dt),Hn(1,Si),Hn(2,bi)],AN);let RN=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&typeof i=="string"&&i!=="auto"?i:ws||It?` `:`\r -`}};RN=Wu([Hn(0,Dt)],RN);class Lge{publicLog2(){}}class mb{constructor(){const e=ze.from({scheme:mb.SCHEME,authority:"model",path:"/"});this.workspace={id:e6,folders:[new Hle({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===mb.SCHEME?this.workspace.folders[0]:null}}mb.SCHEME="inmemory";function CS(o,e,t){if(!e||!(o instanceof aW))return;const i=[];Object.keys(e).forEach(n=>{vle(n)&&i.push([`editor.${n}`,e[n]]),t&&ble(n)&&i.push([`diffEditor.${n}`,e[n]])}),i.length>0&&o.updateValues(i)}let PN=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){const i=Array.isArray(e)?e:kA.convert(e),n=new Map;for(const a of i){if(!(a instanceof Od))throw new Error("bad edit - only text edits are supported");const l=this._modelService.getModel(a.resource);if(!l)throw new Error("bad edit - model not found");if(typeof a.versionId=="number"&&l.getVersionId()!==a.versionId)throw new Error("bad state - model changed in the meantime");let d=n.get(l);d||(d=[],n.set(l,d)),d.push(Li.replaceMove(k.lift(a.textEdit.range),a.textEdit.text))}let s=0,r=0;for(const[a,l]of n)a.pushStackElement(),a.pushEditOperations([],l,()=>[]),a.pushStackElement(),r+=1,s+=l.length;return{ariaSummary:Xh(zE.bulkEditServiceSummary,s,r),isApplied:s>0}}};PN=Wu([Hn(0,Si)],PN);class Dge{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return br(e)}}let ON=class extends $E{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const n=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();n&&(t=n.getContainerDomNode())}return super.showContextView(e,t,i)}};ON=Wu([Hn(0,wm),Hn(1,Ot)],ON);class xge{constructor(){this._neverEmitter=new W,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class kge extends nb{constructor(){super()}}class Ige extends _ge{constructor(){super(new $Y)}}let FN=class extends oN{constructor(e,t,i,n,s,r){super(e,t,i,n,s,r),this.configure({blockMouse:!1})}};FN=Wu([Hn(0,vo),Hn(1,sn),Hn(2,Gd),Hn(3,Xt),Hn(4,Ba),Hn(5,Xe)],FN);class Ege{async playAudioCue(e,t){}}class Nge{notify(e,t){}}xt(Dt,aW,0);xt(FM,AN,0);xt(S8,RN,0);xt(ag,mb,0);xt(Hp,Dge,0);xt(vo,Lge,0);xt(g0,Sge,0);xt(LA,wge,0);xt(sn,pb,0);xt(Yl,mc,0);xt(bi,kge,0);xt(Jo,Xhe,0);xt(bo,Ige,0);xt(Si,aS,0);xt($M,cN,0);xt(Xe,NN,0);xt(JB,Cge,0);xt(Bu,vL,0);xt(Xr,Rce,0);xt(Qr,YI,0);xt(f0,PN,0);xt(t6,xge,0);xt(Xs,TN,0);xt(Zl,DN,0);xt(Lr,Jue,0);xt(Ri,MN,0);xt(Xt,Gp,0);xt(Ha,yN,0);xt(Gd,ON,0);xt(So,dN,0);xt(Xd,EN,0);xt(Sr,FN,0);xt(Ba,xN,0);xt(y0,Ege,0);xt(Py,Nge,0);var Ge;(function(o){const e=new h0;for(const[l,d]of _O())e.set(l,d);const t=new bS(e,!0);e.set(qe,t);function i(l){n||r({});const d=e.get(l);if(!d)throw new Error("Missing service "+l);return d instanceof tl?t.invokeFunction(c=>c.get(l)):d}o.get=i;let n=!1;const s=new W;function r(l){if(n)return t;n=!0;for(const[c,u]of _O())e.get(c)||e.set(c,u);for(const c in l)if(l.hasOwnProperty(c)){const u=bt(c);e.get(u)instanceof tl&&e.set(u,l[c])}const d=vge();for(const c of d)try{t.createInstance(c)}catch(u){nt(u)}return s.fire(),t}o.initialize=r;function a(l){if(n)return l();const d=new de,c=d.add(s.event(()=>{c.dispose(),d.add(l())}));return d}o.withServices=a})(Ge||(Ge={}));let Tge;function Nl(){return Tge}let lW;function Mge(o){lW=o}let dW;function Age(o){dW=o}class cW{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){const i=t===void 0?void 0:e,n=t===void 0?e:t;return dW({owner:i,debugName:()=>{const s=Vu(n);if(s!==void 0)return s;const a=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(n.toString());if(a)return`${this.debugName}.${a[2]}`;if(!i)return`${this.debugName} (mapped)`}},s=>n(this.read(s),s))}recomputeInitiallyAndOnChange(e,t){return e.add(lW(this,t)),this}}class L0 extends cW{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),t===0&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function wi(o,e){const t=new bL(o,e);try{o(t)}finally{t.finish()}}let MC;function B1(o){if(MC)o(MC);else{const e=new bL(o,void 0);MC=e;try{o(e)}finally{e.finish(),MC=void 0}}}async function Rge(o,e){const t=new bL(o,e);try{await o(t)}finally{t.finish()}}function _b(o,e,t){o?e(o):wi(e,t)}class bL{constructor(e,t){var i;this._fn=e,this._getDebugName=t,this.updatingObservers=[],(i=Nl())===null||i===void 0||i.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():Vu(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){var e;const t=this.updatingObservers;for(let i=0;i{},()=>`Setting ${this.debugName}`));try{const r=this._value;this._setValue(e),(n=Nl())===null||n===void 0||n.handleObservableChanged(this,{oldValue:r,newValue:e,change:i,didChange:!0,hadValue:!0});for(const a of this.observers)t.updateObserver(a,this),a.handleChange(this,i)}finally{s&&s.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function wS(o,e){return typeof o=="string"?new x5(void 0,o,e):new x5(o,void 0,e)}class x5 extends WN{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;(e=this._value)===null||e===void 0||e.dispose()}}const Zp=(o,e)=>o===e;function rt(o,e){return e!==void 0?new Yp(o,void 0,e,void 0,void 0,void 0,Zp):new Yp(void 0,void 0,o,void 0,void 0,void 0,Zp)}function VN(o,e){var t;return new Yp(o.owner,o.debugName,e,void 0,void 0,void 0,(t=o.equalityComparer)!==null&&t!==void 0?t:Zp)}function Bge(o,e){var t;return new Yp(o.owner,o.debugName,e,o.createEmptyChangeSummary,o.handleChange,void 0,(t=o.equalityComparer)!==null&&t!==void 0?t:Zp)}function Dm(o,e){let t,i;e===void 0?(t=o,i=void 0):(i=o,t=e);const n=new de;return new Yp(i,()=>{var s;return(s=Vu(t))!==null&&s!==void 0?s:"(anonymous)"},s=>(n.clear(),t(s,n)),void 0,void 0,()=>n.dispose(),Zp)}function fc(o,e){let t,i;e===void 0?(t=o,i=void 0):(i=o,t=e);const n=new de;return new Yp(i,()=>{var s;return(s=Vu(t))!==null&&s!==void 0?s:"(anonymous)"},s=>{n.clear();const r=t(s);return r&&n.add(r),r},void 0,void 0,()=>n.dispose(),Zp)}Age(VN);class Yp extends L0{get debugName(){var e;return(e=uR(this,this._debugName,this._computeFn,this._owner,this))!==null&&e!==void 0?e:"(anonymous)"}constructor(e,t,i,n,s,r=void 0,a){var l,d;super(),this._owner=e,this._debugName=t,this._computeFn=i,this.createChangeSummary=n,this._handleChange=s,this._handleLastObserverRemoved=r,this._equalityComparator=a,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=(l=this.createChangeSummary)===null||l===void 0?void 0:l.call(this),(d=Nl())===null||d===void 0||d.handleDerivedCreated(this)}onLastObserverRemoved(){var e;this.state=0,this.value=void 0;for(const t of this.dependencies)t.removeObserver(this);this.dependencies.clear(),(e=this._handleLastObserverRemoved)===null||e===void 0||e.call(this)}get(){var e;if(this.observers.size===0){const t=this._computeFn(this,(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this));return this.onLastObserverRemoved(),t}else{do{if(this.state===1){for(const t of this.dependencies)if(t.reportChanges(),this.state===2)break}this.state===1&&(this.state=3),this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var e,t;if(this.state===3)return;const i=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=i;const n=this.state!==0,s=this.value;this.state=3;const r=this.changeSummary;this.changeSummary=(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this);try{this.value=this._computeFn(this,r)}finally{for(const l of this.dependenciesToBeRemoved)l.removeObserver(this);this.dependenciesToBeRemoved.clear()}const a=n&&!this._equalityComparator(s,this.value);if((t=Nl())===null||t===void 0||t.handleDerivedRecomputed(this,{oldValue:s,newValue:this.value,change:void 0,didChange:a,hadValue:n}),a)for(const l of this.observers)l.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const t=this.updateCount===1;if(this.state===3&&(this.state=1,!t))for(const i of this.observers)i.handlePossibleChange(this);if(t)for(const i of this.observers)i.beginUpdate(this)}endUpdate(e){if(this.updateCount--,this.updateCount===0){const t=[...this.observers];for(const i of t)i.endUpdate(this)}if(this.updateCount<0)throw new Ci}handlePossibleChange(e){if(this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const t of this.observers)t.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const i=this._handleChange?this._handleChange({changedObservable:e,change:t,didChange:s=>s===e},this.changeSummary):!0,n=this.state===3;if(i&&(this.state===1||n)&&(this.state=2,n))for(const s of this.observers)s.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}function zt(o){return new wL(void 0,o,void 0,void 0)}function CL(o,e){return new wL(o.debugName,e,void 0,void 0)}function D0(o,e){return new wL(o.debugName,e,o.createEmptyChangeSummary,o.handleChange)}function Qd(o){const e=new de,t=CL({debugName:()=>Vu(o)||"(anonymous)"},i=>{e.clear(),o(i,e)});return je(()=>{t.dispose(),e.dispose()})}class wL{get debugName(){if(typeof this._debugName=="string")return this._debugName;if(typeof this._debugName=="function"){const t=this._debugName();if(t!==void 0)return t}const e=Vu(this._runFn);return e!==void 0?e:"(anonymous)"}constructor(e,t,i,n){var s,r;this._debugName=e,this._runFn=t,this.createChangeSummary=i,this._handleChange=n,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=(s=this.createChangeSummary)===null||s===void 0?void 0:s.call(this),(r=Nl())===null||r===void 0||r.handleAutorunCreated(this),this._runIfNeeded()}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}_runIfNeeded(){var e,t,i;if(this.state===3)return;const n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n,this.state=3;const s=this.disposed;try{if(!s){(e=Nl())===null||e===void 0||e.handleAutorunTriggered(this);const r=this.changeSummary;this.changeSummary=(t=this.createChangeSummary)===null||t===void 0?void 0:t.call(this),this._runFn(this,r)}}finally{s||(i=Nl())===null||i===void 0||i.handleAutorunFinished(this);for(const r of this.dependenciesToBeRemoved)r.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,Dv(()=>this.updateCount>=0)}handlePossibleChange(e){this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:n=>n===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}(function(o){o.Observer=wL})(zt||(zt={}));function SS(o){return new Wge(o)}class Wge extends cW{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function Vge(o,e){return new Promise(t=>{let i=!1,n=!1;const s=o.map(a=>({isFinished:e(a),state:a})),r=zt(a=>{const{isFinished:l,state:d}=s.read(a);l&&(i?r.dispose():n=!0,t(d))});i=!0,n&&r.dispose()})}function Oi(o,e){return new Ph(o,e)}class Ph extends L0{constructor(e,t){super(),this.event=e,this._getValue=t,this.hasValue=!1,this.handleEvent=i=>{var n;const s=this._getValue(i),r=this.value,a=!this.hasValue||r!==s;let l=!1;a&&(this.value=s,this.hasValue&&(l=!0,_b(Ph.globalTransaction,d=>{var c;(c=Nl())===null||c===void 0||c.handleFromEventObservableTriggered(this,{oldValue:r,newValue:s,change:void 0,didChange:a,hadValue:this.hasValue});for(const u of this.observers)d.updateObserver(u,this),u.handleChange(this,void 0)},()=>{const d=this.getDebugName();return"Event fired"+(d?`: ${d}`:"")})),this.hasValue=!0),l||(n=Nl())===null||n===void 0||n.handleFromEventObservableTriggered(this,{oldValue:r,newValue:s,change:void 0,didChange:a,hadValue:this.hasValue})}}getDebugName(){return Vu(this._getValue)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}}(function(o){o.Observer=Ph;function e(t,i){let n=!1;Ph.globalTransaction===void 0&&(Ph.globalTransaction=t,n=!0);try{i()}finally{n&&(Ph.globalTransaction=void 0)}}o.batchEventsGlobally=e})(Oi||(Oi={}));function Fo(o,e){return new Hge(o,e)}class Hge extends L0{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{wi(i=>{for(const n of this.observers)i.updateObserver(n,this),n.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function hR(o){return typeof o=="string"?new k5(o):new k5(void 0,o)}class k5 extends L0{get debugName(){var e;return(e=uR(this,this._debugName,void 0,this._owner,this))!==null&&e!==void 0?e:"Observable Signal"}constructor(e,t){super(),this._debugName=e,this._owner=t}trigger(e,t){if(!e){wi(i=>{this.trigger(i,t)},()=>`Trigger signal ${this.debugName}`);return}for(const i of this.observers)e.updateObserver(i,this),i.handleChange(this,t)}get(){}}function x0(o,e){const t=new zge(!0,e);return o.addObserver(t),e?e(o.get()):o.reportChanges(),je(()=>{o.removeObserver(t)})}Mge(x0);class zge{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,this._counter===0&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}}function $ge(o){let e;return rt(i=>(e=o(i,e),e))}class Ra{static capture(e){if(e.getScrollTop()===0||e.hasPendingScrollAnimation())return new Ra(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0;const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const s=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-s}return new Ra(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,s){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=s}restore(e){if(!(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())&&this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i)}}function gR(){return sw&&!!sw.VSCODE_DEV}function uW(o){if(gR()){const e=Uge();return e.add(o),{dispose(){e.delete(o)}}}else return{dispose(){}}}function Uge(){AC||(AC=new Set);const o=globalThis;return o.$hotReload_applyNewExports||(o.$hotReload_applyNewExports=e=>{for(const t of AC){const i=t(e);if(i)return i}}),AC}let AC;gR()&&uW(({oldExports:o,newSrc:e})=>{if(e.indexOf("/* hot-reload:patch-prototype-methods */")!==-1)return t=>{var i,n;for(const s in t){const r=t[s];if(console.log(`[hot-reload] Patching prototype methods of '${s}'`,{exportedItem:r}),typeof r=="function"&&r.prototype){const a=o[s];if(a){for(const l of Object.getOwnPropertyNames(r.prototype)){const d=Object.getOwnPropertyDescriptor(r.prototype,l),c=Object.getOwnPropertyDescriptor(a.prototype,l);((i=d==null?void 0:d.value)===null||i===void 0?void 0:i.toString())!==((n=c==null?void 0:c.value)===null||n===void 0?void 0:n.toString())&&console.log(`[hot-reload] Patching prototype method '${s}.${l}'`),Object.defineProperty(a.prototype,l,d)}t[s]=a}}}return!0}});function jge(o,e,t,i){if(o.length===0)return e;if(e.length===0)return o;const n=[];let s=0,r=0;for(;sc?(n.push(l),r++):(n.push(i(a,l)),s++,r++)}for(;s`Apply decorations from ${e.debugName}`},n=>{const s=e.read(n);i.set(s)})),t.add({dispose:()=>{i.clear()}}),t}function RC(o,e){return o.appendChild(e),je(()=>{o.removeChild(e)})}class hW extends q{get width(){return this._width}get height(){return this._height}constructor(e,t){super(),this.elementSizeObserver=this._register(new E8(e,t)),this._width=Pt(this,this.elementSizeObserver.getWidth()),this._height=Pt(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(i=>wi(n=>{this._width.set(this.elementSizeObserver.getWidth(),n),this._height.set(this.elementSizeObserver.getHeight(),n)})))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function I5(o,e,t){let i=e.get(),n=i,s=i;const r=Pt("animatedValue",i);let a=-1;const l=300;let d;t.add(D0({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(u,h)=>(u.didChange(e)&&(h.animate=h.animate||u.change),!0)},(u,h)=>{d!==void 0&&(o.cancelAnimationFrame(d),d=void 0),n=s,i=e.read(u),a=Date.now()-(h.animate?0:l),c()}));function c(){const u=Date.now()-a;s=Math.floor(Kge(u,n,i-n,l)),u{this._actualTop.set(i,void 0)},this.onComputedHeight=i=>{this._actualHeight.set(i,void 0)}}}class SL{constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId=`managedOverlayWidget-${SL._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}SL._counter=0;function Zc(o,e){return zt(t=>{for(let[i,n]of Object.entries(e))n&&typeof n=="object"&&"read"in n&&(n=n.read(t)),typeof n=="number"&&(n=`${n}px`),i=i.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o.style[i]=n})}function nl(o,e){return qge([o],e),o}function qge(o,e){gR()&&Fo("reload",i=>uW(({oldExports:n})=>{if([...Object.values(n)].some(s=>o.includes(s)))return s=>(i(void 0),!0)})).read(e)}function DS(o,e,t,i){const n=new de,s=[];return n.add(Qd((r,a)=>{const l=e.read(r),d=new Map,c=new Map;t&&t(!0),o.changeViewZones(u=>{for(const h of s)u.removeZone(h),i==null||i.delete(h);s.length=0;for(const h of l){const g=u.addZone(h);h.setZoneId&&h.setZoneId(g),s.push(g),i==null||i.add(g),d.set(h,g)}}),t&&t(!1),a.add(D0({createEmptyChangeSummary(){return{zoneIds:[]}},handleChange(u,h){const g=c.get(u.changedObservable);return g!==void 0&&h.zoneIds.push(g),!0}},(u,h)=>{for(const g of l)g.onChange&&(c.set(g.onChange,d.get(g)),g.onChange.read(u));t&&t(!0),o.changeViewZones(g=>{for(const f of h.zoneIds)g.layoutZone(f)}),t&&t(!1)}))})),n.add({dispose(){t&&t(!0),o.changeViewZones(r=>{for(const a of s)r.removeZone(a)}),i==null||i.clear(),t&&t(!1)}}),n}class Gge extends tn{dispose(){super.dispose(!0)}}function E5(o,e){const t=Nv(e,n=>n.original.startLineNumber<=o.lineNumber);if(!t)return k.fromPositions(o);if(t.original.endLineNumberExclusive<=o.lineNumber){const n=o.lineNumber-t.original.endLineNumberExclusive+t.modified.endLineNumberExclusive;return k.fromPositions(new z(n,o.column))}if(!t.innerChanges)return k.fromPositions(new z(t.modified.startLineNumber,1));const i=Nv(t.innerChanges,n=>n.originalRange.getStartPosition().isBeforeOrEqual(o));if(!i){const n=o.lineNumber-t.original.startLineNumber+t.modified.startLineNumber;return k.fromPositions(new z(n,o.column))}if(i.originalRange.containsPosition(o))return i.modifiedRange;{const n=Zge(i.originalRange.getEndPosition(),o);return k.fromPositions(Yge(i.modifiedRange.getEndPosition(),n))}}function Zge(o,e){return o.lineNumber===e.lineNumber?new Gv(0,e.column-o.column):new Gv(e.lineNumber-o.lineNumber,e.column-1)}function Yge(o,e){return e.lineCount===0?new z(o.lineNumber,o.column+e.columnCount):new z(o.lineNumber+e.lineCount,e.columnCount+1)}function PC(o,e,t){const i=o.bindTo(e);return CL({debugName:()=>`Update ${o.key}`},n=>{i.set(t(n))})}var fR=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},pR=function(o,e){return function(t,i){e(t,i,o)}};const Xge=Zi("diff-review-insert",ve.add,p("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer.")),Qge=Zi("diff-review-remove",ve.remove,p("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer.")),Jge=Zi("diff-review-close",ve.close,p("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer."));let Rc=class extends q{constructor(e,t,i,n,s,r,a,l,d){super(),this._parentNode=e,this._visible=t,this._setVisible=i,this._canClose=n,this._width=s,this._height=r,this._diffs=a,this._editors=l,this._instantiationService=d,this._state=Dm(this,(c,u)=>{const h=this._visible.read(c);if(this._parentNode.style.visibility=h?"visible":"hidden",!h)return null;const g=u.add(this._instantiationService.createInstance(HN,this._diffs,this._editors,this._setVisible,this._canClose)),f=u.add(this._instantiationService.createInstance(zN,this._parentNode,g,this._width,this._height,this._editors));return{model:g,view:f}}).recomputeInitiallyAndOnChange(this._store)}next(){wi(e=>{const t=this._visible.get();this._setVisible(!0,e),t&&this._state.get().model.nextGroup(e)})}prev(){wi(e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)})}close(){wi(e=>{this._setVisible(!1,e)})}};Rc._ttPolicy=qd("diffReview",{createHTML:o=>o});Rc=fR([pR(8,qe)],Rc);let HN=class extends q{constructor(e,t,i,n,s){super(),this._diffs=e,this._editors=t,this._setVisible=i,this.canClose=n,this._audioCueService=s,this._groups=Pt(this,[]),this._currentGroupIdx=Pt(this,0),this._currentElementIdx=Pt(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((r,a)=>this._groups.read(a)[r]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((r,a)=>{var l;return(l=this.currentGroup.read(a))===null||l===void 0?void 0:l.lines[r]}),this._register(zt(r=>{const a=this._diffs.read(r);if(!a){this._groups.set([],void 0);return}const l=efe(a,this._editors.original.getModel().getLineCount(),this._editors.modified.getModel().getLineCount());wi(d=>{const c=this._editors.modified.getPosition();if(c){const u=l.findIndex(h=>(c==null?void 0:c.lineNumber){const a=this.currentElement.read(r);(a==null?void 0:a.type)===ks.Deleted?this._audioCueService.playAudioCue(gt.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):(a==null?void 0:a.type)===ks.Added&&this._audioCueService.playAudioCue(gt.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register(zt(r=>{var a;const l=this.currentElement.read(r);if(l&&l.type!==ks.Header){const d=(a=l.modifiedLineNumber)!==null&&a!==void 0?a:l.diff.modified.startLineNumber;this._editors.modified.setSelection(k.fromPositions(new z(d,1)))}}))}_goToGroupDelta(e,t){const i=this.groups.get();!i||i.length<=1||_b(t,n=>{this._currentGroupIdx.set(ut.ofLength(i.length).clipCyclic(this._currentGroupIdx.get()+e),n),this._currentElementIdx.set(0,n)})}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const t=this.currentGroup.get();!t||t.lines.length<=1||wi(i=>{this._currentElementIdx.set(ut.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),i)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const t=this.currentGroup.get();if(!t)return;const i=t.lines.indexOf(e);i!==-1&&wi(n=>{this._currentElementIdx.set(i,n)})}revealCurrentElementInEditor(){this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===ks.Deleted?(this._editors.original.setSelection(k.fromPositions(new z(e.originalLineNumber,1))),this._editors.original.revealLine(e.originalLineNumber),this._editors.original.focus()):(e.type!==ks.Header&&(this._editors.modified.setSelection(k.fromPositions(new z(e.modifiedLineNumber,1))),this._editors.modified.revealLine(e.modifiedLineNumber)),this._editors.modified.focus()))}close(){this._setVisible(!1,void 0),this._editors.modified.focus()}};HN=fR([pR(4,y0)],HN);const e_=3;function efe(o,e,t){const i=[];for(const n of A9(o,(s,r)=>r.modified.startLineNumber-s.modified.endLineNumberExclusive<2*e_)){const s=[];s.push(new ife);const r=new yt(Math.max(1,n[0].original.startLineNumber-e_),Math.min(n[n.length-1].original.endLineNumberExclusive+e_,e+1)),a=new yt(Math.max(1,n[0].modified.startLineNumber-e_),Math.min(n[n.length-1].modified.endLineNumberExclusive+e_,t+1));R9(n,(c,u)=>{const h=new yt(c?c.original.endLineNumberExclusive:r.startLineNumber,u?u.original.startLineNumber:r.endLineNumberExclusive),g=new yt(c?c.modified.endLineNumberExclusive:a.startLineNumber,u?u.modified.startLineNumber:a.endLineNumberExclusive);h.forEach(f=>{s.push(new ofe(f,g.startLineNumber+(f-h.startLineNumber)))}),u&&(u.original.forEach(f=>{s.push(new nfe(u,f))}),u.modified.forEach(f=>{s.push(new sfe(u,f))}))});const l=n[0].modified.join(n[n.length-1].modified),d=n[0].original.join(n[n.length-1].original);i.push(new tfe(new Ol(l,d),s))}return i}var ks;(function(o){o[o.Header=0]="Header",o[o.Unchanged=1]="Unchanged",o[o.Deleted=2]="Deleted",o[o.Added=3]="Added"})(ks||(ks={}));class tfe{constructor(e,t){this.range=e,this.lines=t}}class ife{constructor(){this.type=ks.Header}}class nfe{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=ks.Deleted,this.modifiedLineNumber=void 0}}class sfe{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=ks.Added,this.originalLineNumber=void 0}}class ofe{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=ks.Unchanged}}let zN=class extends q{constructor(e,t,i,n,s,r){super(),this._element=e,this._model=t,this._width=i,this._height=n,this._editors=s,this._languageService=r,this.domNode=this._element,this.domNode.className="diff-review monaco-editor-background";const a=document.createElement("div");a.className="diff-review-actions",this._actionBar=this._register(new Cr(a)),this._register(zt(l=>{this._actionBar.clear(),this._model.canClose.read(l)&&this._actionBar.push(new Rs("diffreview.close",p("label.close","Close"),"close-diff-review "+Ue.asClassName(Jge),!0,async()=>t.close()),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new a0(this._content,{})),es(this.domNode,this._scrollbar.getDomNode(),a),this._register(je(()=>{es(this.domNode)})),this._register(Zc(this.domNode,{width:this._width,height:this._height})),this._register(Zc(this._content,{width:this._width,height:this._height})),this._register(Qd((l,d)=>{this._model.currentGroup.read(l),this._render(d)})),this._register(Wi(this.domNode,"keydown",l=>{(l.equals(18)||l.equals(2066)||l.equals(530))&&(l.preventDefault(),this._model.goToNextLine()),(l.equals(16)||l.equals(2064)||l.equals(528))&&(l.preventDefault(),this._model.goToPreviousLine()),(l.equals(9)||l.equals(2057)||l.equals(521)||l.equals(1033))&&(l.preventDefault(),this._model.close()),(l.equals(10)||l.equals(3))&&(l.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(e){const t=this._editors.original.getOptions(),i=this._editors.modified.getOptions(),n=document.createElement("div");n.className="diff-review-table",n.setAttribute("role","list"),n.setAttribute("aria-label",p("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate.")),Jn(n,i.get(50)),es(this._content,n);const s=this._editors.original.getModel(),r=this._editors.modified.getModel();if(!s||!r)return;const a=s.getOptions(),l=r.getOptions(),d=i.get(66),c=this._model.currentGroup.get();for(const u of(c==null?void 0:c.lines)||[]){if(!c)break;let h;if(u.type===ks.Header){const f=document.createElement("div");f.className="diff-review-row",f.setAttribute("role","listitem");const m=c.range,v=this._model.currentGroupIndex.get(),_=this._model.groups.get().length,b=x=>x===0?p("no_lines_changed","no lines changed"):x===1?p("one_line_changed","1 line changed"):p("more_lines_changed","{0} lines changed",x),C=b(m.original.length),w=b(m.modified.length);f.setAttribute("aria-label",p({},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",v+1,_,m.original.startLineNumber,C,m.modified.startLineNumber,w));const S=document.createElement("div");S.className="diff-review-cell diff-review-summary",S.appendChild(document.createTextNode(`${v+1}/${_}: @@ -${m.original.startLineNumber},${m.original.length} +${m.modified.startLineNumber},${m.modified.length} @@`)),f.appendChild(S),h=f}else h=this._createRow(u,d,this._width.get(),t,s,a,i,r,l);n.appendChild(h);const g=rt(f=>this._model.currentElement.read(f)===u);e.add(zt(f=>{const m=g.read(f);h.tabIndex=m?0:-1,m&&h.focus()})),e.add(J(h,"focus",()=>{this._model.goToLine(u)}))}this._scrollbar.scanDomNode()}_createRow(e,t,i,n,s,r,a,l,d){const c=n.get(143),u=c.glyphMarginWidth+c.lineNumbersWidth,h=a.get(143),g=10+h.glyphMarginWidth+h.lineNumbersWidth;let f="diff-review-row",m="";const v="diff-review-spacer";let _=null;switch(e.type){case ks.Added:f="diff-review-row line-insert",m=" char-insert",_=Xge;break;case ks.Deleted:f="diff-review-row line-delete",m=" char-delete",_=Qge;break}const b=document.createElement("div");b.style.minWidth=i+"px",b.className=f,b.setAttribute("role","listitem"),b.ariaLevel="";const C=document.createElement("div");C.className="diff-review-cell",C.style.height=`${t}px`,b.appendChild(C);const w=document.createElement("span");w.style.width=u+"px",w.style.minWidth=u+"px",w.className="diff-review-line-number"+m,e.originalLineNumber!==void 0?w.appendChild(document.createTextNode(String(e.originalLineNumber))):w.innerText=" ",C.appendChild(w);const S=document.createElement("span");S.style.width=g+"px",S.style.minWidth=g+"px",S.style.paddingRight="10px",S.className="diff-review-line-number"+m,e.modifiedLineNumber!==void 0?S.appendChild(document.createTextNode(String(e.modifiedLineNumber))):S.innerText=" ",C.appendChild(S);const x=document.createElement("span");if(x.className=v,_){const E=document.createElement("span");E.className=Ue.asClassName(_),E.innerText="  ",x.appendChild(E)}else x.innerText="  ";C.appendChild(x);let y;if(e.modifiedLineNumber!==void 0){let E=this._getLineHtml(l,a,d.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);Rc._ttPolicy&&(E=Rc._ttPolicy.createHTML(E)),C.insertAdjacentHTML("beforeend",E),y=l.getLineContent(e.modifiedLineNumber)}else{let E=this._getLineHtml(s,n,r.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);Rc._ttPolicy&&(E=Rc._ttPolicy.createHTML(E)),C.insertAdjacentHTML("beforeend",E),y=s.getLineContent(e.originalLineNumber)}y.length===0&&(y=p("blankLine","blank"));let I="";switch(e.type){case ks.Unchanged:e.originalLineNumber===e.modifiedLineNumber?I=p({},"{0} unchanged line {1}",y,e.originalLineNumber):I=p("equalLine","{0} original line {1} modified line {2}",y,e.originalLineNumber,e.modifiedLineNumber);break;case ks.Added:I=p("insertLine","+ {0} modified line {1}",y,e.modifiedLineNumber);break;case ks.Deleted:I=p("deleteLine","- {0} original line {1}",y,e.originalLineNumber);break}return b.setAttribute("aria-label",I),b}_getLineHtml(e,t,i,n,s){const r=e.getLineContent(n),a=t.get(50),l=Cn.createEmpty(r,s),d=Zo.isBasicASCII(r,e.mightContainNonBasicASCII()),c=Zo.containsRTL(r,d,e.mightContainRTL());return Ry(new Ou(a.isMonospace&&!t.get(33),a.canUseHalfwidthRightwardsArrow,r,!1,d,c,0,l,[],i,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,t.get(116),t.get(98),t.get(93),t.get(51)!==Po.OFF,null)).html}};zN=fR([pR(5,bi)],zN);const rfe=Zi("diff-insert",ve.add,p("diffInsertIcon","Line decoration for inserts in the diff editor.")),fW=Zi("diff-remove",ve.remove,p("diffRemoveIcon","Line decoration for removals in the diff editor.")),N5=st.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+Ue.asClassName(rfe),marginClassName:"gutter-insert"}),T5=st.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+Ue.asClassName(fW),marginClassName:"gutter-delete"}),M5=st.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),A5=st.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),R5=st.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),afe=st.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),lfe=st.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),$N=st.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),dfe=st.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),cfe=st.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"});class Yc extends q{constructor(e,t,i,n,s){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=i,this._modifiedEditorLayoutInfo=n,this._editors=s,this._originalScrollTop=Oi(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Oi(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=Fo("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=Pt(this,0),this._modifiedViewZonesChangedSignal=Fo("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=Fo("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=Dm(this,(h,g)=>{var f;this._element.replaceChildren();const m=this._diffModel.read(h),v=(f=m==null?void 0:m.diff.read(h))===null||f===void 0?void 0:f.movedTexts;if(!v||v.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(h);const _=this._originalEditorLayoutInfo.read(h),b=this._modifiedEditorLayoutInfo.read(h);if(!_||!b){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(h),this._originalViewZonesChangedSignal.read(h);const C=v.map(R=>{function j(Q,H){const G=H.getTopForLineNumber(Q.startLineNumber,!0),Z=H.getTopForLineNumber(Q.endLineNumberExclusive,!0);return(G+Z)/2}const O=j(R.lineRangeMapping.original,this._editors.original),$=this._originalScrollTop.read(h),K=j(R.lineRangeMapping.modified,this._editors.modified),oe=this._modifiedScrollTop.read(h),Le=O-$,he=K-oe,se=Math.min(O,K),V=Math.max(O,K);return{range:new ut(se,V),from:Le,to:he,fromWithoutScroll:O,toWithoutScroll:K,move:R}});C.sort(tG(ur(R=>R.fromWithoutScroll>R.toWithoutScroll,iG),ur(R=>R.fromWithoutScroll>R.toWithoutScroll?R.fromWithoutScroll:-R.toWithoutScroll,Md)));const w=mR.compute(C.map(R=>R.range)),S=10,x=_.verticalScrollbarWidth,y=(w.getTrackCount()-1)*10+S*2,I=x+y+(b.contentLeft-Yc.movedCodeBlockPadding);let E=0;for(const R of C){const j=w.getTrack(E),O=x+S+j*10,$=15,K=15,oe=I,Le=b.glyphMarginWidth+b.lineNumbersWidth,he=18,se=document.createElementNS("http://www.w3.org/2000/svg","rect");se.classList.add("arrow-rectangle"),se.setAttribute("x",`${oe-Le}`),se.setAttribute("y",`${R.to-he/2}`),se.setAttribute("width",`${Le}`),se.setAttribute("height",`${he}`),this._element.appendChild(se);const V=document.createElementNS("http://www.w3.org/2000/svg","g"),Q=document.createElementNS("http://www.w3.org/2000/svg","path");Q.setAttribute("d",`M 0 ${R.from} L ${O} ${R.from} L ${O} ${R.to} L ${oe-K} ${R.to}`),Q.setAttribute("fill","none"),V.appendChild(Q);const H=document.createElementNS("http://www.w3.org/2000/svg","polygon");H.classList.add("arrow"),g.add(zt(G=>{Q.classList.toggle("currentMove",R.move===m.activeMovedText.read(G)),H.classList.toggle("currentMove",R.move===m.activeMovedText.read(G))})),H.setAttribute("points",`${oe-K},${R.to-$/2} ${oe},${R.to} ${oe-K},${R.to+$/2}`),V.appendChild(H),this._element.appendChild(V),E++}this.width.set(y,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register(je(()=>this._element.remove())),this._register(zt(h=>{const g=this._originalEditorLayoutInfo.read(h),f=this._modifiedEditorLayoutInfo.read(h);!g||!f||(this._element.style.left=`${g.width-g.verticalScrollbarWidth}px`,this._element.style.height=`${g.height}px`,this._element.style.width=`${g.verticalScrollbarWidth+g.contentLeft-Yc.movedCodeBlockPadding+this.width.read(h)}px`)})),this._register(x0(this._state));const r=rt(h=>{const g=this._diffModel.read(h),f=g==null?void 0:g.diff.read(h);return f?f.movedTexts.map(m=>({move:m,original:new LS(SS(m.lineRangeMapping.original.startLineNumber-1),18),modified:new LS(SS(m.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register(DS(this._editors.original,r.map(h=>h.map(g=>g.original)))),this._register(DS(this._editors.modified,r.map(h=>h.map(g=>g.modified)))),this._register(Qd((h,g)=>{const f=r.read(h);for(const m of f)g.add(new P5(this._editors.original,m.original,m.move,"original",this._diffModel.get())),g.add(new P5(this._editors.modified,m.modified,m.move,"modified",this._diffModel.get()))}));const a=Oi(this._editors.original.onDidChangeCursorPosition,()=>this._editors.original.getPosition()),l=Oi(this._editors.modified.onDidChangeCursorPosition,()=>this._editors.modified.getPosition()),d=Fo("original.onDidFocusEditorWidget",h=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>h(void 0),0))),c=Fo("modified.onDidFocusEditorWidget",h=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>h(void 0),0)));let u="modified";this._register(D0({createEmptyChangeSummary:()=>{},handleChange:(h,g)=>(h.didChange(d)&&(u="original"),h.didChange(c)&&(u="modified"),!0)},h=>{d.read(h),c.read(h);const g=this._diffModel.read(h);if(!g)return;const f=g.diff.read(h);let m;if(f&&u==="original"){const v=a.read(h);v&&(m=f.movedTexts.find(_=>_.lineRangeMapping.original.contains(v.lineNumber)))}if(f&&u==="modified"){const v=l.read(h);v&&(m=f.movedTexts.find(_=>_.lineRangeMapping.modified.contains(v.lineNumber)))}m!==g.movedTextToCompare.get()&&g.movedTextToCompare.set(void 0,void 0),g.setActiveMovedText(m)}))}}Yc.movedCodeBlockPadding=4;class mR{static compute(e){const t=[],i=[];for(const n of e){let s=t.findIndex(r=>!r.intersectsStrict(n));s===-1&&(t.length>=6?s=LJ(t,ur(a=>a.intersectWithRangeLength(n),Md)):(s=t.length,t.push(new AM))),t[s].addRange(n),i.push(s)}return new mR(t.length,i)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class P5 extends gW{constructor(e,t,i,n,s){const r=vi("div.diff-hidden-lines-widget");super(e,t,r.root),this._editor=e,this._move=i,this._kind=n,this._diffModel=s,this._nodes=vi("div.diff-moved-code-block",{style:{marginRight:"4px"}},[vi("div.text-content@textContent"),vi("div.action-bar@actionBar")]),r.root.appendChild(this._nodes.root);const a=Oi(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register(Zc(this._nodes.root,{paddingRight:a.map(h=>h.verticalScrollbarWidth)}));let l;i.changes.length>0?l=this._kind==="original"?p("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):p("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):l=this._kind==="original"?p("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):p("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const d=this._register(new Cr(this._nodes.actionBar,{highlightToggledItems:!0})),c=new Rs("",l,"",!1);d.push(c,{icon:!1,label:!0});const u=new Rs("","Compare",Ue.asClassName(ve.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===i?void 0:this._move,void 0)});this._register(zt(h=>{const g=this._diffModel.movedTextToCompare.read(h)===i;u.checked=g})),d.push(u,{icon:!1,label:!0})}}class ufe extends q{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._decorations=rt(this,s=>{var r;const a=(r=this._diffModel.read(s))===null||r===void 0?void 0:r.diff.read(s);if(!a)return null;const l=this._diffModel.read(s).movedTextToCompare.read(s),d=this._options.renderIndicators.read(s),c=this._options.showEmptyDecorations.read(s),u=[],h=[];if(!l)for(const f of a.mappings)if(f.lineRangeMapping.original.isEmpty||u.push({range:f.lineRangeMapping.original.toInclusiveRange(),options:d?T5:A5}),f.lineRangeMapping.modified.isEmpty||h.push({range:f.lineRangeMapping.modified.toInclusiveRange(),options:d?N5:M5}),f.lineRangeMapping.modified.isEmpty||f.lineRangeMapping.original.isEmpty)f.lineRangeMapping.original.isEmpty||u.push({range:f.lineRangeMapping.original.toInclusiveRange(),options:dfe}),f.lineRangeMapping.modified.isEmpty||h.push({range:f.lineRangeMapping.modified.toInclusiveRange(),options:afe});else for(const m of f.lineRangeMapping.innerChanges||[])f.lineRangeMapping.original.contains(m.originalRange.startLineNumber)&&u.push({range:m.originalRange,options:m.originalRange.isEmpty()&&c?cfe:$N}),f.lineRangeMapping.modified.contains(m.modifiedRange.startLineNumber)&&h.push({range:m.modifiedRange,options:m.modifiedRange.isEmpty()&&c?lfe:R5});if(l)for(const f of l.changes){const m=f.original.toInclusiveRange();m&&u.push({range:m,options:d?T5:A5});const v=f.modified.toInclusiveRange();v&&h.push({range:v,options:d?N5:M5});for(const _ of f.innerChanges||[])u.push({range:_.originalRange,options:$N}),h.push({range:_.modifiedRange,options:R5})}const g=this._diffModel.read(s).activeMovedText.read(s);for(const f of a.movedTexts)u.push({range:f.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(f===g?" currentMove":""),blockPadding:[Yc.movedCodeBlockPadding,0,Yc.movedCodeBlockPadding,Yc.movedCodeBlockPadding]}}),h.push({range:f.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(f===g?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:u,modifiedDecorations:h}}),this._register(new hfe(e,t,i,n)),this._register(yS(this._editors.original,this._decorations.map(s=>(s==null?void 0:s.originalDecorations)||[]))),this._register(yS(this._editors.modified,this._decorations.map(s=>(s==null?void 0:s.modifiedDecorations)||[])))}}class hfe extends q{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._widget=n;const s=[],r=rt(this,a=>{const l=this._diffModel.read(a),d=l==null?void 0:l.diff.read(a);if(!d)return s;const c=this._editors.modifiedSelections.read(a);if(c.every(f=>f.isEmpty()))return s;const u=new va(c.map(f=>yt.fromRangeInclusive(f))),g=d.mappings.filter(f=>f.lineRangeMapping.innerChanges&&u.intersects(f.lineRangeMapping.modified)).map(f=>({mapping:f,rangeMappings:f.lineRangeMapping.innerChanges.filter(m=>c.some(v=>k.areIntersecting(m.modifiedRange,v)))}));return g.length===0||g.every(f=>f.rangeMappings.length===0)?s:g});this._register(Qd((a,l)=>{const d=this._diffModel.read(a),c=d==null?void 0:d.diff.read(a);if(!d||!c||this._diffModel.read(a).movedTextToCompare.read(a)||!this._options.shouldRenderRevertArrows.read(a))return;const h=[],g=r.read(a),f=new Set(g.map(m=>m.mapping));if(g.length>0){const m=this._editors.modifiedSelections.read(a),v=new vb(m[m.length-1].positionLineNumber,this._widget,g.flatMap(_=>_.rangeMappings),!0);this._editors.modified.addGlyphMarginWidget(v),h.push(v)}for(const m of c.mappings)if(!f.has(m)&&!m.lineRangeMapping.modified.isEmpty&&m.lineRangeMapping.innerChanges){const v=new vb(m.lineRangeMapping.modified.startLineNumber,this._widget,m.lineRangeMapping.innerChanges,!1);this._editors.modified.addGlyphMarginWidget(v),h.push(v)}l.add(je(()=>{for(const m of h)this._editors.modified.removeGlyphMarginWidget(m)}))}))}}class vb{getId(){return this._id}constructor(e,t,i,n){this._lineNumber=e,this._widget=t,this._diffs=i,this._selection=n,this._id=`revertButton${vb.counter++}`,this._domNode=vi("div.revertButton",{title:this._selection?p("revertSelectedChanges","Revert Selected Changes"):p("revertChange","Revert Change")},[Qw(ve.arrowRight)]).root,this._domNode.onmousedown=s=>{s.button!==2&&(s.stopPropagation(),s.preventDefault())},this._domNode.onmouseup=s=>{s.stopPropagation(),s.preventDefault()},this._domNode.onclick=s=>{this._widget.revertRangeMappings(this._diffs),s.stopPropagation(),s.preventDefault()}}getDomNode(){return this._domNode}getPosition(){return{lane:Wh.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}}vb.counter=0;class gfe extends q{constructor(e,t,i,n){super(),this._options=e,this._domNode=t,this._dimensions=i,this._sashes=n,this._sashRatio=Pt(this,void 0),this.sashLeft=rt(this,s=>{var r;const a=(r=this._sashRatio.read(s))!==null&&r!==void 0?r:this._options.splitViewDefaultRatio.read(s);return this._computeSashLeft(a,s)}),this._sash=this._register(new ss(this._domNode,{getVerticalSashTop:s=>0,getVerticalSashLeft:s=>this.sashLeft.get(),getVerticalSashHeight:s=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(s=>{const r=this._dimensions.width.get(),a=this._computeSashLeft((this._startSashPosition+(s.currentX-s.startX))/r,void 0);this._sashRatio.set(a/r,void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._sashRatio.set(void 0,void 0))),this._register(zt(s=>{const r=this._sashes.read(s);r&&(this._sash.orthogonalEndSash=r.bottom)})),this._register(zt(s=>{const r=this._options.enableSplitViewResizing.read(s);this._sash.state=r?3:0,this.sashLeft.read(s),this._dimensions.height.read(s),this._sash.layout()}))}_computeSashLeft(e,t){const i=this._dimensions.width.read(t),n=Math.floor(this._options.splitViewDefaultRatio.read(t)*i),s=this._options.enableSplitViewResizing.read(t)?Math.floor(e*i):n,r=100;return i<=r*2?n:si-r?i-r:s}}let zf=class{remove(){var e;(e=this.parent)===null||e===void 0||e.children.delete(this.id)}static findId(e,t){let i;typeof e=="string"?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,t.children.get(i)!==void 0&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let s=0;t.children.get(n)!==void 0;s++)n=`${i}_${s}`;return n}static empty(e){return e.children.size===0}},O5=class extends zf{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}},ffe=class extends zf{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}},pfe=class hh extends zf{static create(e,t,i){const n=new tn(i),s=new hh(t.uri),r=e.ordered(t),a=r.map((d,c)=>{var u;const h=zf.findId(`provider_${c}`,s),g=new ffe(h,s,(u=d.displayName)!==null&&u!==void 0?u:"Unknown Outline Provider",c);return Promise.resolve(d.provideDocumentSymbols(t,n.token)).then(f=>{for(const m of f||[])hh._makeOutlineElement(m,g);return g},f=>(en(f),g)).then(f=>{zf.empty(f)?f.remove():s._groups.set(h,f)})}),l=e.onDidChange(()=>{const d=e.ordered(t);Bi(d,r)||n.cancel()});return Promise.all(a).then(()=>n.token.isCancellationRequested&&!i.isCancellationRequested?hh.create(e,t,i):s._compact()).finally(()=>{n.dispose(),l.dispose()})}static _makeOutlineElement(e,t){const i=zf.findId(e,t),n=new O5(i,t,e);if(e.children)for(const s of e.children)hh._makeOutlineElement(s,n);t.children.set(n.id,n)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,i]of this._groups)i.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{const t=wt.first(this._groups.values());for(const[,i]of t.children)i.parent=this,this.children.set(i.id,i)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof O5?e.push(t.symbol):e.push(...wt.map(t.children.values(),i=>i.symbol));return e.sort((t,i)=>k.compareRangesUsingStarts(t.range,i.range))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return hh._flattenDocumentSymbols(t,e,""),t.sort((i,n)=>z.compare(k.getStartPosition(i.range),k.getStartPosition(n.range))||z.compare(k.getEndPosition(n.range),k.getEndPosition(i.range)))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&hh._flattenDocumentSymbols(e,n.children,n.name)}};var pW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},mW=function(o,e){return function(t,i){e(t,i,o)}};let UN=class extends q{get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._languageFeaturesService=n,this._modifiedOutlineSource=fc(this,l=>{const d=this._editors.modifiedModel.read(l);return d?new jN(this._languageFeaturesService,d):void 0}),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition(l=>{if(l.reason===3){const d=this._diffModel.get();wi(c=>{for(const u of this._editors.original.getSelections()||[])d==null||d.ensureOriginalLineIsVisible(u.getStartPosition().lineNumber,c),d==null||d.ensureOriginalLineIsVisible(u.getEndPosition().lineNumber,c)})}})),this._register(this._editors.modified.onDidChangeCursorPosition(l=>{if(l.reason===3){const d=this._diffModel.get();wi(c=>{for(const u of this._editors.modified.getSelections()||[])d==null||d.ensureModifiedLineIsVisible(u.getStartPosition().lineNumber,c),d==null||d.ensureModifiedLineIsVisible(u.getEndPosition().lineNumber,c)})}}));const s=this._diffModel.map((l,d)=>{var c,u;return((c=l==null?void 0:l.diff.read(d))===null||c===void 0?void 0:c.mappings.length)===0?[]:(u=l==null?void 0:l.unchangedRegions.read(d))!==null&&u!==void 0?u:[]});this.viewZones=Dm(this,(l,d)=>{const c=this._modifiedOutlineSource.read(l);if(!c)return{origViewZones:[],modViewZones:[]};const u=[],h=[],g=this._options.renderSideBySide.read(l),f=s.read(l);for(const m of f)if(!m.shouldHideControls(l)){{const v=rt(this,b=>m.getHiddenOriginalRange(b).startLineNumber-1),_=new LS(v,24);u.push(_),d.add(new F5(this._editors.original,_,m,m.originalUnchangedRange,!g,c,b=>this._diffModel.get().ensureModifiedLineIsVisible(b,void 0),this._options))}{const v=rt(this,b=>m.getHiddenModifiedRange(b).startLineNumber-1),_=new LS(v,24);h.push(_),d.add(new F5(this._editors.modified,_,m,m.modifiedUnchangedRange,!1,c,b=>this._diffModel.get().ensureModifiedLineIsVisible(b,void 0),this._options))}}return{origViewZones:u,modViewZones:h}});const r={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},a={description:"Fold Unchanged",glyphMarginHoverMessage:new as(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(p("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+Ue.asClassName(ve.fold),zIndex:10001};this._register(yS(this._editors.original,rt(this,l=>{const d=s.read(l),c=d.map(u=>({range:u.originalUnchangedRange.toInclusiveRange(),options:r}));for(const u of d)u.shouldHideControls(l)&&c.push({range:k.fromPositions(new z(u.originalLineNumber,1)),options:a});return c}))),this._register(yS(this._editors.modified,rt(this,l=>{const d=s.read(l),c=d.map(u=>({range:u.modifiedUnchangedRange.toInclusiveRange(),options:r}));for(const u of d)u.shouldHideControls(l)&&c.push({range:yt.ofLength(u.modifiedLineNumber,1).toInclusiveRange(),options:a});return c}))),this._register(zt(l=>{const d=s.read(l);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(d.map(c=>c.getHiddenOriginalRange(l).toInclusiveRange()).filter(mv)),this._editors.modified.setHiddenAreas(d.map(c=>c.getHiddenModifiedRange(l).toInclusiveRange()).filter(mv))}finally{this._isUpdatingHiddenAreas=!1}})),this._register(this._editors.modified.onMouseUp(l=>{var d;if(!l.event.rightButton&&l.target.position&&(!((d=l.target.element)===null||d===void 0)&&d.className.includes("fold-unchanged"))){const c=l.target.position.lineNumber,u=this._diffModel.get();if(!u)return;const h=u.unchangedRegions.get().find(g=>g.modifiedUnchangedRange.includes(c));if(!h)return;h.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(l=>{var d;if(!l.event.rightButton&&l.target.position&&(!((d=l.target.element)===null||d===void 0)&&d.className.includes("fold-unchanged"))){const c=l.target.position.lineNumber,u=this._diffModel.get();if(!u)return;const h=u.unchangedRegions.get().find(g=>g.originalUnchangedRange.includes(c));if(!h)return;h.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}}))}};UN=pW([mW(3,Me)],UN);class F5 extends gW{constructor(e,t,i,n,s,r,a,l){const d=vi("div.diff-hidden-lines-widget");super(e,t,d.root),this._editor=e,this._unchangedRegion=i,this._unchangedRegionRange=n,this._hide=s,this._modifiedOutlineSource=r,this._revealModifiedHiddenLine=a,this._options=l,this._nodes=vi("div.diff-hidden-lines",[vi("div.top@top",{title:p("diff.hiddenLines.top","Click or drag to show more above")}),vi("div.center@content",{style:{display:"flex"}},[vi("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[pe("a",{title:p("showUnchangedRegion","Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...Kc("$(unfold)"))]),vi("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),vi("div.bottom@bottom",{title:p("diff.bottom","Click or drag to show more below"),role:"button"})]),d.root.appendChild(this._nodes.root);const c=Oi(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._hide?es(this._nodes.first):this._register(Zc(this._nodes.first,{width:c.map(h=>h.contentLeft)})),this._register(zt(h=>{const g=this._unchangedRegion.visibleLineCountTop.read(h)+this._unchangedRegion.visibleLineCountBottom.read(h)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!g),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(h)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(h)>0),this._nodes.top.classList.toggle("canMoveBottom",!g);const f=this._unchangedRegion.isDragged.read(h),m=this._editor.getDomNode();m&&(m.classList.toggle("draggingUnchangedRegion",!!f),f==="top"?(m.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(h)>0),m.classList.toggle("canMoveBottom",!g)):f==="bottom"?(m.classList.toggle("canMoveTop",!g),m.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(h)>0)):(m.classList.toggle("canMoveTop",!1),m.classList.toggle("canMoveBottom",!1)))}));const u=this._editor;this._register(J(this._nodes.top,"mousedown",h=>{if(h.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),h.preventDefault();const g=h.clientY;let f=!1;const m=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);const v=Je(this._nodes.top),_=J(v,"mousemove",C=>{const S=C.clientY-g;f=f||Math.abs(S)>2;const x=Math.round(S/u.getOption(66)),y=Math.max(0,Math.min(m+x,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(y,void 0)}),b=J(v,"mouseup",C=>{f||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),_.dispose(),b.dispose()})})),this._register(J(this._nodes.bottom,"mousedown",h=>{if(h.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),h.preventDefault();const g=h.clientY;let f=!1;const m=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);const v=Je(this._nodes.bottom),_=J(v,"mousemove",C=>{const S=C.clientY-g;f=f||Math.abs(S)>2;const x=Math.round(S/u.getOption(66)),y=Math.max(0,Math.min(m-x,this._unchangedRegion.getMaxVisibleLineCountBottom())),I=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(y,void 0);const E=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);u.setScrollTop(u.getScrollTop()+(E-I))}),b=J(v,"mouseup",C=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!f){const w=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const S=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);u.setScrollTop(u.getScrollTop()+(S-w))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),_.dispose(),b.dispose()})})),this._register(zt(h=>{const g=[];if(!this._hide){const f=i.getHiddenModifiedRange(h).length,m=p("hiddenLines","{0} hidden lines",f),v=pe("span",{title:p("diff.hiddenLines.expandAll","Double click to unfold")},m);v.addEventListener("dblclick",C=>{C.button===0&&(C.preventDefault(),this._unchangedRegion.showAll(void 0))}),g.push(v);const _=this._unchangedRegion.getHiddenModifiedRange(h),b=this._modifiedOutlineSource.getBreadcrumbItems(_,h);if(b.length>0){g.push(pe("span",void 0,"  |  "));for(let C=0;C{this._revealModifiedHiddenLine(w.startLineNumber)}}}}es(this._nodes.others,...g)}))}}let jN=class extends q{constructor(e,t){super(),this._languageFeaturesService=e,this._textModel=t,this._currentModel=Pt(this,void 0);const i=Fo("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),n=Fo("_textModel.onDidChangeContent",ye.debounce(s=>this._textModel.onDidChangeContent(s),()=>{},100));this._register(Qd(async(s,r)=>{i.read(s),n.read(s);const a=r.add(new Gge),l=await pfe.create(this._languageFeaturesService.documentSymbolProvider,this._textModel,a.token);r.isDisposed||this._currentModel.set(l,void 0)}))}getBreadcrumbItems(e,t){const i=this._currentModel.read(t);if(!i)return[];const n=i.asListOfDocumentSymbols().filter(s=>e.contains(s.range.startLineNumber)&&!e.contains(s.range.endLineNumber));return n.sort(F9(ur(s=>s.range.endLineNumber-s.range.startLineNumber,Md))),n.map(s=>({name:s.name,kind:s.kind,startLineNumber:s.range.startLineNumber}))}};jN=pW([mW(0,Me)],jN);var mfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},B5=function(o,e){return function(t,i){e(t,i,o)}},gh;let xS=gh=class{constructor(e,t,i){this.editorWorkerService=t,this.telemetryService=i,this.onDidChangeEventEmitter=new W,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){var e;(e=this.diffAlgorithmOnDidChangeSubscription)===null||e===void 0||e.dispose()}async computeDiff(e,t,i,n){var s,r;if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(e,t,i,n);if(e.getLineCount()===1&&e.getLineMaxColumn(1)===1)return t.getLineCount()===1&&t.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new vr(new yt(1,2),new yt(1,t.getLineCount()+1),[new uu(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const a=JSON.stringify([e.uri.toString(),t.uri.toString()]),l=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(i)]),d=gh.diffCache.get(a);if(d&&d.context===l)return d.result;const c=ds.create(),u=await this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm),h=c.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:h,timedOut:(s=u==null?void 0:u.quitEarly)!==null&&s!==void 0?s:!0,detectedMoves:i.computeMoves?(r=u==null?void 0:u.moves.length)!==null&&r!==void 0?r:0:-1}),n.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!u)throw new Error("no diff result available");return gh.diffCache.size>10&&gh.diffCache.delete(gh.diffCache.keys().next().value),gh.diffCache.set(a,{result:u,context:l}),u}setOptions(e){var t;let i=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&((t=this.diffAlgorithmOnDidChangeSubscription)===null||t===void 0||t.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,typeof e.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),i=!0),i&&this.onDidChangeEventEmitter.fire()}};xS.diffCache=new Map;xS=gh=mfe([B5(1,Qr),B5(2,vo)],xS);var _fe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vfe=function(o,e){return function(t,i){e(t,i,o)}};const _W=bt("diffProviderFactoryService");let KN=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(xS,e)}};KN=_fe([vfe(0,qe)],KN);xt(_W,KN,1);var bfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Cfe=function(o,e){return function(t,i){e(t,i,o)}};let qN=class extends q{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,i){super(),this.model=e,this._options=t,this._diffProviderFactoryService=i,this._isDiffUpToDate=Pt(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=Pt(this,void 0),this.diff=this._diff,this._unchangedRegions=Pt(this,{regions:[],originalDecorationIds:[],modifiedDecorationIds:[]}),this.unchangedRegions=rt(this,a=>this._options.hideUnchangedRegions.read(a)?this._unchangedRegions.read(a).regions:(wi(l=>{for(const d of this._unchangedRegions.get().regions)d.collapseAll(l)}),[])),this.movedTextToCompare=Pt(this,void 0),this._activeMovedText=Pt(this,void 0),this._hoveredMovedText=Pt(this,void 0),this.activeMovedText=rt(this,a=>{var l,d;return(d=(l=this.movedTextToCompare.read(a))!==null&&l!==void 0?l:this._hoveredMovedText.read(a))!==null&&d!==void 0?d:this._activeMovedText.read(a)}),this._cancellationTokenSource=new tn,this._diffProvider=rt(this,a=>{const l=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(a)}),d=Fo("onDidChange",l.onDidChange);return{diffProvider:l,onChangeSignal:d}}),this._register(je(()=>this._cancellationTokenSource.cancel()));const n=hR("contentChangedSignal"),s=this._register(new Yt(()=>n.trigger(void 0),200)),r=(a,l,d)=>{const c=kS.fromDiffs(a.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(d),this._options.hideUnchangedRegionsContextLineCount.read(d)),u=this._unchangedRegions.get(),h=u.originalDecorationIds.map(v=>e.original.getDecorationRange(v)).map(v=>v?yt.fromRange(v):void 0),g=u.modifiedDecorationIds.map(v=>e.modified.getDecorationRange(v)).map(v=>v?yt.fromRange(v):void 0),f=e.original.deltaDecorations(u.originalDecorationIds,c.map(v=>({range:v.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),m=e.modified.deltaDecorations(u.modifiedDecorationIds,c.map(v=>({range:v.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));for(const v of c)for(let _=0;_{if(this._diff.get()){const d=Td.fromModelContentChanges(a.changes);this._lastDiff,e.original,e.modified}this._isDiffUpToDate.set(!1,void 0),s.schedule()})),this._register(e.original.onDidChangeContent(a=>{if(this._diff.get()){const d=Td.fromModelContentChanges(a.changes);this._lastDiff,e.original,e.modified}this._isDiffUpToDate.set(!1,void 0),s.schedule()})),this._register(Qd(async(a,l)=>{var d,c;this._options.hideUnchangedRegionsMinimumLineCount.read(a),this._options.hideUnchangedRegionsContextLineCount.read(a),s.cancel(),n.read(a);const u=this._diffProvider.read(a);u.onChangeSignal.read(a),nl(C8,a),nl(ZI,a),this._isDiffUpToDate.set(!1,void 0);let h=[];l.add(e.original.onDidChangeContent(m=>{const v=Td.fromModelContentChanges(m.changes);h=Ow(h,v)}));let g=[];l.add(e.modified.onDidChangeContent(m=>{const v=Td.fromModelContentChanges(m.changes);g=Ow(g,v)}));let f=await u.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(a),maxComputationTimeMs:this._options.maxComputationTimeMs.read(a),computeMoves:this._options.showMoves.read(a)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||(f=wfe(f,e.original,e.modified),f=(d=(e.original,e.modified,void 0))!==null&&d!==void 0?d:f,f=(c=(e.original,e.modified,void 0))!==null&&c!==void 0?c:f,wi(m=>{r(f,m),this._lastDiff=f;const v=_R.fromDiffResult(f);this._diff.set(v,m),this._isDiffUpToDate.set(!0,m);const _=this.movedTextToCompare.get();this.movedTextToCompare.set(_?this._lastDiff.moves.find(b=>b.lineRangeMapping.modified.intersect(_.lineRangeMapping.modified)):void 0,m)}))}))}ensureModifiedLineIsVisible(e,t){var i;if(((i=this.diff.get())===null||i===void 0?void 0:i.mappings.length)===0)return;const n=this._unchangedRegions.get().regions;for(const s of n)if(s.getHiddenModifiedRange(void 0).contains(e)){s.showModifiedLine(e,t);return}}ensureOriginalLineIsVisible(e,t){var i;if(((i=this.diff.get())===null||i===void 0?void 0:i.mappings.length)===0)return;const n=this._unchangedRegions.get().regions;for(const s of n)if(s.getHiddenOriginalRange(void 0).contains(e)){s.showOriginalLine(e,t);return}}async waitForDiff(){await Vge(this.isDiffUpToDate,e=>e)}serializeState(){return{collapsedRegions:this._unchangedRegions.get().regions.map(t=>({range:t.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(e){const t=e.collapsedRegions.map(n=>yt.deserialize(n.range)),i=this._unchangedRegions.get();wi(n=>{for(const s of i.regions)for(const r of t)if(s.modifiedUnchangedRange.intersect(r)){s.setHiddenModifiedRange(r,n);break}})}};qN=bfe([Cfe(2,_W)],qN);function wfe(o,e,t){return{changes:o.changes.map(i=>new vr(i.original,i.modified,i.innerChanges?i.innerChanges.map(n=>Sfe(n,e,t)):void 0)),moves:o.moves,identical:o.identical,quitEarly:o.quitEarly}}function Sfe(o,e,t){let i=o.originalRange,n=o.modifiedRange;return(i.endColumn!==1||n.endColumn!==1)&&i.endColumn===e.getLineMaxColumn(i.endLineNumber)&&n.endColumn===t.getLineMaxColumn(n.endLineNumber)&&i.endLineNumbernew vW(t)),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,i,n){this.mappings=e,this.movedTexts=t,this.identical=i,this.quitEarly=n}}class vW{constructor(e){this.lineRangeMapping=e}}class kS{static fromDiffs(e,t,i,n,s){const r=vr.inverse(e,t,i),a=[];for(const l of r){let d=l.original.startLineNumber,c=l.modified.startLineNumber,u=l.original.length;const h=d===1&&c===1,g=d+u===t+1&&c+u===i+1;(h||g)&&u>=s+n?(h&&!g&&(u-=s),g&&!h&&(d+=s,c+=s,u-=s),a.push(new kS(d,c,u,0,0))):u>=s*2+n&&(d+=s,c+=s,u-=s*2,a.push(new kS(d,c,u,0,0)))}return a}get originalUnchangedRange(){return yt.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return yt.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,i,n,s){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=i,this._visibleLineCountTop=Pt(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=Pt(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=rt(this,r=>this.visibleLineCountTop.read(r)+this.visibleLineCountBottom.read(r)===this.lineCount&&!this.isDragged.read(r)),this.isDragged=Pt(this,void 0),this._visibleLineCountTop.set(n,void 0),this._visibleLineCountBottom.set(s,void 0)}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return yt.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return yt.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){const i=e.startLineNumber-this.modifiedLineNumber,n=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(i,n,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){const i=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,i),t)}showMoreBelow(e=10,t){const i=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,i),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t){const i=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),n=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;i{var v;this._contextMenuService.showContextMenu({domForShadowRoot:h&&(v=i.getDomNode())!==null&&v!==void 0?v:void 0,getAnchor:()=>({x:f,y:m}),getActions:()=>{const _=[],b=n.modified.isEmpty;return _.push(new Rs("diff.clipboard.copyDeletedContent",b?n.original.length>1?p("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):p("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):n.original.length>1?p("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):p("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,async()=>{const w=this._originalTextModel.getValueInRange(n.original.toExclusiveRange());await this._clipboardService.writeText(w)})),n.original.length>1&&_.push(new Rs("diff.clipboard.copyDeletedLineContent",b?p("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.original.startLineNumber+u):p("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.original.startLineNumber+u),void 0,!0,async()=>{let w=this._originalTextModel.getLineContent(n.original.startLineNumber+u);w===""&&(w=this._originalTextModel.getEndOfLineSequence()===0?` +`}};RN=Wu([Hn(0,Dt)],RN);class Ige{publicLog2(){}}class mb{constructor(){const e=ze.from({scheme:mb.SCHEME,authority:"model",path:"/"});this.workspace={id:e6,folders:[new jle({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===mb.SCHEME?this.workspace.folders[0]:null}}mb.SCHEME="inmemory";function CS(o,e,t){if(!e||!(o instanceof aW))return;const i=[];Object.keys(e).forEach(n=>{Sle(n)&&i.push([`editor.${n}`,e[n]]),t&&yle(n)&&i.push([`diffEditor.${n}`,e[n]])}),i.length>0&&o.updateValues(i)}let PN=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){const i=Array.isArray(e)?e:kA.convert(e),n=new Map;for(const a of i){if(!(a instanceof Od))throw new Error("bad edit - only text edits are supported");const l=this._modelService.getModel(a.resource);if(!l)throw new Error("bad edit - model not found");if(typeof a.versionId=="number"&&l.getVersionId()!==a.versionId)throw new Error("bad state - model changed in the meantime");let d=n.get(l);d||(d=[],n.set(l,d)),d.push(Li.replaceMove(k.lift(a.textEdit.range),a.textEdit.text))}let s=0,r=0;for(const[a,l]of n)a.pushStackElement(),a.pushEditOperations([],l,()=>[]),a.pushStackElement(),r+=1,s+=l.length;return{ariaSummary:Xh(zE.bulkEditServiceSummary,s,r),isApplied:s>0}}};PN=Wu([Hn(0,Si)],PN);class Ege{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return br(e)}}let ON=class extends $E{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const n=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();n&&(t=n.getContainerDomNode())}return super.showContextView(e,t,i)}};ON=Wu([Hn(0,wm),Hn(1,Ot)],ON);class Nge{constructor(){this._neverEmitter=new W,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class Tge extends nb{constructor(){super()}}class Mge extends wge{constructor(){super(new qY)}}let FN=class extends oN{constructor(e,t,i,n,s,r){super(e,t,i,n,s,r),this.configure({blockMouse:!1})}};FN=Wu([Hn(0,vo),Hn(1,sn),Hn(2,Gd),Hn(3,Xt),Hn(4,Ba),Hn(5,Xe)],FN);class Age{async playAudioCue(e,t){}}class Rge{notify(e,t){}}xt(Dt,aW,0);xt(FM,AN,0);xt(S7,RN,0);xt(ag,mb,0);xt(Hp,Ege,0);xt(vo,Ige,0);xt(g0,xge,0);xt(LA,Dge,0);xt(sn,pb,0);xt(Yl,mc,0);xt(bi,Tge,0);xt(Jo,tge,0);xt(bo,Mge,0);xt(Si,aS,0);xt($M,cN,0);xt(Xe,NN,0);xt(JB,Lge,0);xt(Bu,vL,0);xt(Xr,Bce,0);xt(Qr,YI,0);xt(f0,PN,0);xt(t6,Nge,0);xt(Xs,TN,0);xt(Zl,DN,0);xt(Lr,nhe,0);xt(Ri,MN,0);xt(Xt,Gp,0);xt(Ha,yN,0);xt(Gd,ON,0);xt(So,dN,0);xt(Xd,EN,0);xt(Sr,FN,0);xt(Ba,xN,0);xt(y0,Age,0);xt(Py,Rge,0);var Ge;(function(o){const e=new h0;for(const[l,d]of _O())e.set(l,d);const t=new bS(e,!0);e.set(qe,t);function i(l){n||r({});const d=e.get(l);if(!d)throw new Error("Missing service "+l);return d instanceof tl?t.invokeFunction(c=>c.get(l)):d}o.get=i;let n=!1;const s=new W;function r(l){if(n)return t;n=!0;for(const[c,u]of _O())e.get(c)||e.set(c,u);for(const c in l)if(l.hasOwnProperty(c)){const u=bt(c);e.get(u)instanceof tl&&e.set(u,l[c])}const d=Sge();for(const c of d)try{t.createInstance(c)}catch(u){nt(u)}return s.fire(),t}o.initialize=r;function a(l){if(n)return l();const d=new de,c=d.add(s.event(()=>{c.dispose(),d.add(l())}));return d}o.withServices=a})(Ge||(Ge={}));let Pge;function Nl(){return Pge}let lW;function Oge(o){lW=o}let dW;function Fge(o){dW=o}class cW{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){const i=t===void 0?void 0:e,n=t===void 0?e:t;return dW({owner:i,debugName:()=>{const s=Vu(n);if(s!==void 0)return s;const a=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(n.toString());if(a)return`${this.debugName}.${a[2]}`;if(!i)return`${this.debugName} (mapped)`}},s=>n(this.read(s),s))}recomputeInitiallyAndOnChange(e,t){return e.add(lW(this,t)),this}}class L0 extends cW{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),t===0&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function wi(o,e){const t=new bL(o,e);try{o(t)}finally{t.finish()}}let MC;function B1(o){if(MC)o(MC);else{const e=new bL(o,void 0);MC=e;try{o(e)}finally{e.finish(),MC=void 0}}}async function Bge(o,e){const t=new bL(o,e);try{await o(t)}finally{t.finish()}}function _b(o,e,t){o?e(o):wi(e,t)}class bL{constructor(e,t){var i;this._fn=e,this._getDebugName=t,this.updatingObservers=[],(i=Nl())===null||i===void 0||i.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():Vu(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){var e;const t=this.updatingObservers;for(let i=0;i{},()=>`Setting ${this.debugName}`));try{const r=this._value;this._setValue(e),(n=Nl())===null||n===void 0||n.handleObservableChanged(this,{oldValue:r,newValue:e,change:i,didChange:!0,hadValue:!0});for(const a of this.observers)t.updateObserver(a,this),a.handleChange(this,i)}finally{s&&s.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function wS(o,e){return typeof o=="string"?new x5(void 0,o,e):new x5(o,void 0,e)}class x5 extends WN{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;(e=this._value)===null||e===void 0||e.dispose()}}const Zp=(o,e)=>o===e;function rt(o,e){return e!==void 0?new Yp(o,void 0,e,void 0,void 0,void 0,Zp):new Yp(void 0,void 0,o,void 0,void 0,void 0,Zp)}function VN(o,e){var t;return new Yp(o.owner,o.debugName,e,void 0,void 0,void 0,(t=o.equalityComparer)!==null&&t!==void 0?t:Zp)}function zge(o,e){var t;return new Yp(o.owner,o.debugName,e,o.createEmptyChangeSummary,o.handleChange,void 0,(t=o.equalityComparer)!==null&&t!==void 0?t:Zp)}function Dm(o,e){let t,i;e===void 0?(t=o,i=void 0):(i=o,t=e);const n=new de;return new Yp(i,()=>{var s;return(s=Vu(t))!==null&&s!==void 0?s:"(anonymous)"},s=>(n.clear(),t(s,n)),void 0,void 0,()=>n.dispose(),Zp)}function fc(o,e){let t,i;e===void 0?(t=o,i=void 0):(i=o,t=e);const n=new de;return new Yp(i,()=>{var s;return(s=Vu(t))!==null&&s!==void 0?s:"(anonymous)"},s=>{n.clear();const r=t(s);return r&&n.add(r),r},void 0,void 0,()=>n.dispose(),Zp)}Fge(VN);class Yp extends L0{get debugName(){var e;return(e=uR(this,this._debugName,this._computeFn,this._owner,this))!==null&&e!==void 0?e:"(anonymous)"}constructor(e,t,i,n,s,r=void 0,a){var l,d;super(),this._owner=e,this._debugName=t,this._computeFn=i,this.createChangeSummary=n,this._handleChange=s,this._handleLastObserverRemoved=r,this._equalityComparator=a,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=(l=this.createChangeSummary)===null||l===void 0?void 0:l.call(this),(d=Nl())===null||d===void 0||d.handleDerivedCreated(this)}onLastObserverRemoved(){var e;this.state=0,this.value=void 0;for(const t of this.dependencies)t.removeObserver(this);this.dependencies.clear(),(e=this._handleLastObserverRemoved)===null||e===void 0||e.call(this)}get(){var e;if(this.observers.size===0){const t=this._computeFn(this,(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this));return this.onLastObserverRemoved(),t}else{do{if(this.state===1){for(const t of this.dependencies)if(t.reportChanges(),this.state===2)break}this.state===1&&(this.state=3),this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var e,t;if(this.state===3)return;const i=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=i;const n=this.state!==0,s=this.value;this.state=3;const r=this.changeSummary;this.changeSummary=(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this);try{this.value=this._computeFn(this,r)}finally{for(const l of this.dependenciesToBeRemoved)l.removeObserver(this);this.dependenciesToBeRemoved.clear()}const a=n&&!this._equalityComparator(s,this.value);if((t=Nl())===null||t===void 0||t.handleDerivedRecomputed(this,{oldValue:s,newValue:this.value,change:void 0,didChange:a,hadValue:n}),a)for(const l of this.observers)l.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const t=this.updateCount===1;if(this.state===3&&(this.state=1,!t))for(const i of this.observers)i.handlePossibleChange(this);if(t)for(const i of this.observers)i.beginUpdate(this)}endUpdate(e){if(this.updateCount--,this.updateCount===0){const t=[...this.observers];for(const i of t)i.endUpdate(this)}if(this.updateCount<0)throw new Ci}handlePossibleChange(e){if(this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const t of this.observers)t.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const i=this._handleChange?this._handleChange({changedObservable:e,change:t,didChange:s=>s===e},this.changeSummary):!0,n=this.state===3;if(i&&(this.state===1||n)&&(this.state=2,n))for(const s of this.observers)s.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}function zt(o){return new wL(void 0,o,void 0,void 0)}function CL(o,e){return new wL(o.debugName,e,void 0,void 0)}function D0(o,e){return new wL(o.debugName,e,o.createEmptyChangeSummary,o.handleChange)}function Qd(o){const e=new de,t=CL({debugName:()=>Vu(o)||"(anonymous)"},i=>{e.clear(),o(i,e)});return je(()=>{t.dispose(),e.dispose()})}class wL{get debugName(){if(typeof this._debugName=="string")return this._debugName;if(typeof this._debugName=="function"){const t=this._debugName();if(t!==void 0)return t}const e=Vu(this._runFn);return e!==void 0?e:"(anonymous)"}constructor(e,t,i,n){var s,r;this._debugName=e,this._runFn=t,this.createChangeSummary=i,this._handleChange=n,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=(s=this.createChangeSummary)===null||s===void 0?void 0:s.call(this),(r=Nl())===null||r===void 0||r.handleAutorunCreated(this),this._runIfNeeded()}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}_runIfNeeded(){var e,t,i;if(this.state===3)return;const n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n,this.state=3;const s=this.disposed;try{if(!s){(e=Nl())===null||e===void 0||e.handleAutorunTriggered(this);const r=this.changeSummary;this.changeSummary=(t=this.createChangeSummary)===null||t===void 0?void 0:t.call(this),this._runFn(this,r)}}finally{s||(i=Nl())===null||i===void 0||i.handleAutorunFinished(this);for(const r of this.dependenciesToBeRemoved)r.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,Dv(()=>this.updateCount>=0)}handlePossibleChange(e){this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:n=>n===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}(function(o){o.Observer=wL})(zt||(zt={}));function SS(o){return new $ge(o)}class $ge extends cW{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function Uge(o,e){return new Promise(t=>{let i=!1,n=!1;const s=o.map(a=>({isFinished:e(a),state:a})),r=zt(a=>{const{isFinished:l,state:d}=s.read(a);l&&(i?r.dispose():n=!0,t(d))});i=!0,n&&r.dispose()})}function Oi(o,e){return new Ph(o,e)}class Ph extends L0{constructor(e,t){super(),this.event=e,this._getValue=t,this.hasValue=!1,this.handleEvent=i=>{var n;const s=this._getValue(i),r=this.value,a=!this.hasValue||r!==s;let l=!1;a&&(this.value=s,this.hasValue&&(l=!0,_b(Ph.globalTransaction,d=>{var c;(c=Nl())===null||c===void 0||c.handleFromEventObservableTriggered(this,{oldValue:r,newValue:s,change:void 0,didChange:a,hadValue:this.hasValue});for(const u of this.observers)d.updateObserver(u,this),u.handleChange(this,void 0)},()=>{const d=this.getDebugName();return"Event fired"+(d?`: ${d}`:"")})),this.hasValue=!0),l||(n=Nl())===null||n===void 0||n.handleFromEventObservableTriggered(this,{oldValue:r,newValue:s,change:void 0,didChange:a,hadValue:this.hasValue})}}getDebugName(){return Vu(this._getValue)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}}(function(o){o.Observer=Ph;function e(t,i){let n=!1;Ph.globalTransaction===void 0&&(Ph.globalTransaction=t,n=!0);try{i()}finally{n&&(Ph.globalTransaction=void 0)}}o.batchEventsGlobally=e})(Oi||(Oi={}));function Fo(o,e){return new jge(o,e)}class jge extends L0{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{wi(i=>{for(const n of this.observers)i.updateObserver(n,this),n.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function hR(o){return typeof o=="string"?new k5(o):new k5(void 0,o)}class k5 extends L0{get debugName(){var e;return(e=uR(this,this._debugName,void 0,this._owner,this))!==null&&e!==void 0?e:"Observable Signal"}constructor(e,t){super(),this._debugName=e,this._owner=t}trigger(e,t){if(!e){wi(i=>{this.trigger(i,t)},()=>`Trigger signal ${this.debugName}`);return}for(const i of this.observers)e.updateObserver(i,this),i.handleChange(this,t)}get(){}}function x0(o,e){const t=new Kge(!0,e);return o.addObserver(t),e?e(o.get()):o.reportChanges(),je(()=>{o.removeObserver(t)})}Oge(x0);class Kge{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,this._counter===0&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}}function qge(o){let e;return rt(i=>(e=o(i,e),e))}class Ra{static capture(e){if(e.getScrollTop()===0||e.hasPendingScrollAnimation())return new Ra(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0;const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const s=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-s}return new Ra(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,s){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=s}restore(e){if(!(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())&&this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i)}}function gR(){return sw&&!!sw.VSCODE_DEV}function uW(o){if(gR()){const e=Gge();return e.add(o),{dispose(){e.delete(o)}}}else return{dispose(){}}}function Gge(){AC||(AC=new Set);const o=globalThis;return o.$hotReload_applyNewExports||(o.$hotReload_applyNewExports=e=>{for(const t of AC){const i=t(e);if(i)return i}}),AC}let AC;gR()&&uW(({oldExports:o,newSrc:e})=>{if(e.indexOf("/* hot-reload:patch-prototype-methods */")!==-1)return t=>{var i,n;for(const s in t){const r=t[s];if(console.log(`[hot-reload] Patching prototype methods of '${s}'`,{exportedItem:r}),typeof r=="function"&&r.prototype){const a=o[s];if(a){for(const l of Object.getOwnPropertyNames(r.prototype)){const d=Object.getOwnPropertyDescriptor(r.prototype,l),c=Object.getOwnPropertyDescriptor(a.prototype,l);((i=d==null?void 0:d.value)===null||i===void 0?void 0:i.toString())!==((n=c==null?void 0:c.value)===null||n===void 0?void 0:n.toString())&&console.log(`[hot-reload] Patching prototype method '${s}.${l}'`),Object.defineProperty(a.prototype,l,d)}t[s]=a}}}return!0}});function Zge(o,e,t,i){if(o.length===0)return e;if(e.length===0)return o;const n=[];let s=0,r=0;for(;sc?(n.push(l),r++):(n.push(i(a,l)),s++,r++)}for(;s`Apply decorations from ${e.debugName}`},n=>{const s=e.read(n);i.set(s)})),t.add({dispose:()=>{i.clear()}}),t}function RC(o,e){return o.appendChild(e),je(()=>{o.removeChild(e)})}class hW extends q{get width(){return this._width}get height(){return this._height}constructor(e,t){super(),this.elementSizeObserver=this._register(new E7(e,t)),this._width=Pt(this,this.elementSizeObserver.getWidth()),this._height=Pt(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(i=>wi(n=>{this._width.set(this.elementSizeObserver.getWidth(),n),this._height.set(this.elementSizeObserver.getHeight(),n)})))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function I5(o,e,t){let i=e.get(),n=i,s=i;const r=Pt("animatedValue",i);let a=-1;const l=300;let d;t.add(D0({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(u,h)=>(u.didChange(e)&&(h.animate=h.animate||u.change),!0)},(u,h)=>{d!==void 0&&(o.cancelAnimationFrame(d),d=void 0),n=s,i=e.read(u),a=Date.now()-(h.animate?0:l),c()}));function c(){const u=Date.now()-a;s=Math.floor(Yge(u,n,i-n,l)),u{this._actualTop.set(i,void 0)},this.onComputedHeight=i=>{this._actualHeight.set(i,void 0)}}}class SL{constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId=`managedOverlayWidget-${SL._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}SL._counter=0;function Zc(o,e){return zt(t=>{for(let[i,n]of Object.entries(e))n&&typeof n=="object"&&"read"in n&&(n=n.read(t)),typeof n=="number"&&(n=`${n}px`),i=i.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o.style[i]=n})}function nl(o,e){return Xge([o],e),o}function Xge(o,e){gR()&&Fo("reload",i=>uW(({oldExports:n})=>{if([...Object.values(n)].some(s=>o.includes(s)))return s=>(i(void 0),!0)})).read(e)}function DS(o,e,t,i){const n=new de,s=[];return n.add(Qd((r,a)=>{const l=e.read(r),d=new Map,c=new Map;t&&t(!0),o.changeViewZones(u=>{for(const h of s)u.removeZone(h),i==null||i.delete(h);s.length=0;for(const h of l){const g=u.addZone(h);h.setZoneId&&h.setZoneId(g),s.push(g),i==null||i.add(g),d.set(h,g)}}),t&&t(!1),a.add(D0({createEmptyChangeSummary(){return{zoneIds:[]}},handleChange(u,h){const g=c.get(u.changedObservable);return g!==void 0&&h.zoneIds.push(g),!0}},(u,h)=>{for(const g of l)g.onChange&&(c.set(g.onChange,d.get(g)),g.onChange.read(u));t&&t(!0),o.changeViewZones(g=>{for(const f of h.zoneIds)g.layoutZone(f)}),t&&t(!1)}))})),n.add({dispose(){t&&t(!0),o.changeViewZones(r=>{for(const a of s)r.removeZone(a)}),i==null||i.clear(),t&&t(!1)}}),n}class Qge extends tn{dispose(){super.dispose(!0)}}function E5(o,e){const t=Nv(e,n=>n.original.startLineNumber<=o.lineNumber);if(!t)return k.fromPositions(o);if(t.original.endLineNumberExclusive<=o.lineNumber){const n=o.lineNumber-t.original.endLineNumberExclusive+t.modified.endLineNumberExclusive;return k.fromPositions(new z(n,o.column))}if(!t.innerChanges)return k.fromPositions(new z(t.modified.startLineNumber,1));const i=Nv(t.innerChanges,n=>n.originalRange.getStartPosition().isBeforeOrEqual(o));if(!i){const n=o.lineNumber-t.original.startLineNumber+t.modified.startLineNumber;return k.fromPositions(new z(n,o.column))}if(i.originalRange.containsPosition(o))return i.modifiedRange;{const n=Jge(i.originalRange.getEndPosition(),o);return k.fromPositions(efe(i.modifiedRange.getEndPosition(),n))}}function Jge(o,e){return o.lineNumber===e.lineNumber?new Gv(0,e.column-o.column):new Gv(e.lineNumber-o.lineNumber,e.column-1)}function efe(o,e){return e.lineCount===0?new z(o.lineNumber,o.column+e.columnCount):new z(o.lineNumber+e.lineCount,e.columnCount+1)}function PC(o,e,t){const i=o.bindTo(e);return CL({debugName:()=>`Update ${o.key}`},n=>{i.set(t(n))})}var fR=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},pR=function(o,e){return function(t,i){e(t,i,o)}};const tfe=Zi("diff-review-insert",ve.add,p("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer.")),ife=Zi("diff-review-remove",ve.remove,p("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer.")),nfe=Zi("diff-review-close",ve.close,p("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer."));let Rc=class extends q{constructor(e,t,i,n,s,r,a,l,d){super(),this._parentNode=e,this._visible=t,this._setVisible=i,this._canClose=n,this._width=s,this._height=r,this._diffs=a,this._editors=l,this._instantiationService=d,this._state=Dm(this,(c,u)=>{const h=this._visible.read(c);if(this._parentNode.style.visibility=h?"visible":"hidden",!h)return null;const g=u.add(this._instantiationService.createInstance(HN,this._diffs,this._editors,this._setVisible,this._canClose)),f=u.add(this._instantiationService.createInstance(zN,this._parentNode,g,this._width,this._height,this._editors));return{model:g,view:f}}).recomputeInitiallyAndOnChange(this._store)}next(){wi(e=>{const t=this._visible.get();this._setVisible(!0,e),t&&this._state.get().model.nextGroup(e)})}prev(){wi(e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)})}close(){wi(e=>{this._setVisible(!1,e)})}};Rc._ttPolicy=qd("diffReview",{createHTML:o=>o});Rc=fR([pR(8,qe)],Rc);let HN=class extends q{constructor(e,t,i,n,s){super(),this._diffs=e,this._editors=t,this._setVisible=i,this.canClose=n,this._audioCueService=s,this._groups=Pt(this,[]),this._currentGroupIdx=Pt(this,0),this._currentElementIdx=Pt(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((r,a)=>this._groups.read(a)[r]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((r,a)=>{var l;return(l=this.currentGroup.read(a))===null||l===void 0?void 0:l.lines[r]}),this._register(zt(r=>{const a=this._diffs.read(r);if(!a){this._groups.set([],void 0);return}const l=sfe(a,this._editors.original.getModel().getLineCount(),this._editors.modified.getModel().getLineCount());wi(d=>{const c=this._editors.modified.getPosition();if(c){const u=l.findIndex(h=>(c==null?void 0:c.lineNumber){const a=this.currentElement.read(r);(a==null?void 0:a.type)===ks.Deleted?this._audioCueService.playAudioCue(gt.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):(a==null?void 0:a.type)===ks.Added&&this._audioCueService.playAudioCue(gt.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register(zt(r=>{var a;const l=this.currentElement.read(r);if(l&&l.type!==ks.Header){const d=(a=l.modifiedLineNumber)!==null&&a!==void 0?a:l.diff.modified.startLineNumber;this._editors.modified.setSelection(k.fromPositions(new z(d,1)))}}))}_goToGroupDelta(e,t){const i=this.groups.get();!i||i.length<=1||_b(t,n=>{this._currentGroupIdx.set(ut.ofLength(i.length).clipCyclic(this._currentGroupIdx.get()+e),n),this._currentElementIdx.set(0,n)})}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const t=this.currentGroup.get();!t||t.lines.length<=1||wi(i=>{this._currentElementIdx.set(ut.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),i)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const t=this.currentGroup.get();if(!t)return;const i=t.lines.indexOf(e);i!==-1&&wi(n=>{this._currentElementIdx.set(i,n)})}revealCurrentElementInEditor(){this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===ks.Deleted?(this._editors.original.setSelection(k.fromPositions(new z(e.originalLineNumber,1))),this._editors.original.revealLine(e.originalLineNumber),this._editors.original.focus()):(e.type!==ks.Header&&(this._editors.modified.setSelection(k.fromPositions(new z(e.modifiedLineNumber,1))),this._editors.modified.revealLine(e.modifiedLineNumber)),this._editors.modified.focus()))}close(){this._setVisible(!1,void 0),this._editors.modified.focus()}};HN=fR([pR(4,y0)],HN);const e_=3;function sfe(o,e,t){const i=[];for(const n of A9(o,(s,r)=>r.modified.startLineNumber-s.modified.endLineNumberExclusive<2*e_)){const s=[];s.push(new rfe);const r=new yt(Math.max(1,n[0].original.startLineNumber-e_),Math.min(n[n.length-1].original.endLineNumberExclusive+e_,e+1)),a=new yt(Math.max(1,n[0].modified.startLineNumber-e_),Math.min(n[n.length-1].modified.endLineNumberExclusive+e_,t+1));R9(n,(c,u)=>{const h=new yt(c?c.original.endLineNumberExclusive:r.startLineNumber,u?u.original.startLineNumber:r.endLineNumberExclusive),g=new yt(c?c.modified.endLineNumberExclusive:a.startLineNumber,u?u.modified.startLineNumber:a.endLineNumberExclusive);h.forEach(f=>{s.push(new dfe(f,g.startLineNumber+(f-h.startLineNumber)))}),u&&(u.original.forEach(f=>{s.push(new afe(u,f))}),u.modified.forEach(f=>{s.push(new lfe(u,f))}))});const l=n[0].modified.join(n[n.length-1].modified),d=n[0].original.join(n[n.length-1].original);i.push(new ofe(new Ol(l,d),s))}return i}var ks;(function(o){o[o.Header=0]="Header",o[o.Unchanged=1]="Unchanged",o[o.Deleted=2]="Deleted",o[o.Added=3]="Added"})(ks||(ks={}));class ofe{constructor(e,t){this.range=e,this.lines=t}}class rfe{constructor(){this.type=ks.Header}}class afe{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=ks.Deleted,this.modifiedLineNumber=void 0}}class lfe{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=ks.Added,this.originalLineNumber=void 0}}class dfe{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=ks.Unchanged}}let zN=class extends q{constructor(e,t,i,n,s,r){super(),this._element=e,this._model=t,this._width=i,this._height=n,this._editors=s,this._languageService=r,this.domNode=this._element,this.domNode.className="diff-review monaco-editor-background";const a=document.createElement("div");a.className="diff-review-actions",this._actionBar=this._register(new Cr(a)),this._register(zt(l=>{this._actionBar.clear(),this._model.canClose.read(l)&&this._actionBar.push(new Rs("diffreview.close",p("label.close","Close"),"close-diff-review "+Ue.asClassName(nfe),!0,async()=>t.close()),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new a0(this._content,{})),es(this.domNode,this._scrollbar.getDomNode(),a),this._register(je(()=>{es(this.domNode)})),this._register(Zc(this.domNode,{width:this._width,height:this._height})),this._register(Zc(this._content,{width:this._width,height:this._height})),this._register(Qd((l,d)=>{this._model.currentGroup.read(l),this._render(d)})),this._register(Wi(this.domNode,"keydown",l=>{(l.equals(18)||l.equals(2066)||l.equals(530))&&(l.preventDefault(),this._model.goToNextLine()),(l.equals(16)||l.equals(2064)||l.equals(528))&&(l.preventDefault(),this._model.goToPreviousLine()),(l.equals(9)||l.equals(2057)||l.equals(521)||l.equals(1033))&&(l.preventDefault(),this._model.close()),(l.equals(10)||l.equals(3))&&(l.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(e){const t=this._editors.original.getOptions(),i=this._editors.modified.getOptions(),n=document.createElement("div");n.className="diff-review-table",n.setAttribute("role","list"),n.setAttribute("aria-label",p("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate.")),Jn(n,i.get(50)),es(this._content,n);const s=this._editors.original.getModel(),r=this._editors.modified.getModel();if(!s||!r)return;const a=s.getOptions(),l=r.getOptions(),d=i.get(66),c=this._model.currentGroup.get();for(const u of(c==null?void 0:c.lines)||[]){if(!c)break;let h;if(u.type===ks.Header){const f=document.createElement("div");f.className="diff-review-row",f.setAttribute("role","listitem");const m=c.range,v=this._model.currentGroupIndex.get(),_=this._model.groups.get().length,b=x=>x===0?p("no_lines_changed","no lines changed"):x===1?p("one_line_changed","1 line changed"):p("more_lines_changed","{0} lines changed",x),C=b(m.original.length),w=b(m.modified.length);f.setAttribute("aria-label",p({},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",v+1,_,m.original.startLineNumber,C,m.modified.startLineNumber,w));const S=document.createElement("div");S.className="diff-review-cell diff-review-summary",S.appendChild(document.createTextNode(`${v+1}/${_}: @@ -${m.original.startLineNumber},${m.original.length} +${m.modified.startLineNumber},${m.modified.length} @@`)),f.appendChild(S),h=f}else h=this._createRow(u,d,this._width.get(),t,s,a,i,r,l);n.appendChild(h);const g=rt(f=>this._model.currentElement.read(f)===u);e.add(zt(f=>{const m=g.read(f);h.tabIndex=m?0:-1,m&&h.focus()})),e.add(J(h,"focus",()=>{this._model.goToLine(u)}))}this._scrollbar.scanDomNode()}_createRow(e,t,i,n,s,r,a,l,d){const c=n.get(143),u=c.glyphMarginWidth+c.lineNumbersWidth,h=a.get(143),g=10+h.glyphMarginWidth+h.lineNumbersWidth;let f="diff-review-row",m="";const v="diff-review-spacer";let _=null;switch(e.type){case ks.Added:f="diff-review-row line-insert",m=" char-insert",_=tfe;break;case ks.Deleted:f="diff-review-row line-delete",m=" char-delete",_=ife;break}const b=document.createElement("div");b.style.minWidth=i+"px",b.className=f,b.setAttribute("role","listitem"),b.ariaLevel="";const C=document.createElement("div");C.className="diff-review-cell",C.style.height=`${t}px`,b.appendChild(C);const w=document.createElement("span");w.style.width=u+"px",w.style.minWidth=u+"px",w.className="diff-review-line-number"+m,e.originalLineNumber!==void 0?w.appendChild(document.createTextNode(String(e.originalLineNumber))):w.innerText=" ",C.appendChild(w);const S=document.createElement("span");S.style.width=g+"px",S.style.minWidth=g+"px",S.style.paddingRight="10px",S.className="diff-review-line-number"+m,e.modifiedLineNumber!==void 0?S.appendChild(document.createTextNode(String(e.modifiedLineNumber))):S.innerText=" ",C.appendChild(S);const x=document.createElement("span");if(x.className=v,_){const E=document.createElement("span");E.className=Ue.asClassName(_),E.innerText="  ",x.appendChild(E)}else x.innerText="  ";C.appendChild(x);let y;if(e.modifiedLineNumber!==void 0){let E=this._getLineHtml(l,a,d.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);Rc._ttPolicy&&(E=Rc._ttPolicy.createHTML(E)),C.insertAdjacentHTML("beforeend",E),y=l.getLineContent(e.modifiedLineNumber)}else{let E=this._getLineHtml(s,n,r.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);Rc._ttPolicy&&(E=Rc._ttPolicy.createHTML(E)),C.insertAdjacentHTML("beforeend",E),y=s.getLineContent(e.originalLineNumber)}y.length===0&&(y=p("blankLine","blank"));let I="";switch(e.type){case ks.Unchanged:e.originalLineNumber===e.modifiedLineNumber?I=p({},"{0} unchanged line {1}",y,e.originalLineNumber):I=p("equalLine","{0} original line {1} modified line {2}",y,e.originalLineNumber,e.modifiedLineNumber);break;case ks.Added:I=p("insertLine","+ {0} modified line {1}",y,e.modifiedLineNumber);break;case ks.Deleted:I=p("deleteLine","- {0} original line {1}",y,e.originalLineNumber);break}return b.setAttribute("aria-label",I),b}_getLineHtml(e,t,i,n,s){const r=e.getLineContent(n),a=t.get(50),l=Cn.createEmpty(r,s),d=Zo.isBasicASCII(r,e.mightContainNonBasicASCII()),c=Zo.containsRTL(r,d,e.mightContainRTL());return Ry(new Ou(a.isMonospace&&!t.get(33),a.canUseHalfwidthRightwardsArrow,r,!1,d,c,0,l,[],i,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,t.get(116),t.get(98),t.get(93),t.get(51)!==Po.OFF,null)).html}};zN=fR([pR(5,bi)],zN);const cfe=Zi("diff-insert",ve.add,p("diffInsertIcon","Line decoration for inserts in the diff editor.")),fW=Zi("diff-remove",ve.remove,p("diffRemoveIcon","Line decoration for removals in the diff editor.")),N5=st.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+Ue.asClassName(cfe),marginClassName:"gutter-insert"}),T5=st.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+Ue.asClassName(fW),marginClassName:"gutter-delete"}),M5=st.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),A5=st.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),R5=st.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),ufe=st.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),hfe=st.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),$N=st.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),gfe=st.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),ffe=st.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"});class Yc extends q{constructor(e,t,i,n,s){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=i,this._modifiedEditorLayoutInfo=n,this._editors=s,this._originalScrollTop=Oi(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Oi(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=Fo("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=Pt(this,0),this._modifiedViewZonesChangedSignal=Fo("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=Fo("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=Dm(this,(h,g)=>{var f;this._element.replaceChildren();const m=this._diffModel.read(h),v=(f=m==null?void 0:m.diff.read(h))===null||f===void 0?void 0:f.movedTexts;if(!v||v.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(h);const _=this._originalEditorLayoutInfo.read(h),b=this._modifiedEditorLayoutInfo.read(h);if(!_||!b){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(h),this._originalViewZonesChangedSignal.read(h);const C=v.map(R=>{function j(Q,H){const G=H.getTopForLineNumber(Q.startLineNumber,!0),Z=H.getTopForLineNumber(Q.endLineNumberExclusive,!0);return(G+Z)/2}const O=j(R.lineRangeMapping.original,this._editors.original),$=this._originalScrollTop.read(h),K=j(R.lineRangeMapping.modified,this._editors.modified),oe=this._modifiedScrollTop.read(h),Le=O-$,he=K-oe,se=Math.min(O,K),V=Math.max(O,K);return{range:new ut(se,V),from:Le,to:he,fromWithoutScroll:O,toWithoutScroll:K,move:R}});C.sort(oG(ur(R=>R.fromWithoutScroll>R.toWithoutScroll,rG),ur(R=>R.fromWithoutScroll>R.toWithoutScroll?R.fromWithoutScroll:-R.toWithoutScroll,Md)));const w=mR.compute(C.map(R=>R.range)),S=10,x=_.verticalScrollbarWidth,y=(w.getTrackCount()-1)*10+S*2,I=x+y+(b.contentLeft-Yc.movedCodeBlockPadding);let E=0;for(const R of C){const j=w.getTrack(E),O=x+S+j*10,$=15,K=15,oe=I,Le=b.glyphMarginWidth+b.lineNumbersWidth,he=18,se=document.createElementNS("http://www.w3.org/2000/svg","rect");se.classList.add("arrow-rectangle"),se.setAttribute("x",`${oe-Le}`),se.setAttribute("y",`${R.to-he/2}`),se.setAttribute("width",`${Le}`),se.setAttribute("height",`${he}`),this._element.appendChild(se);const V=document.createElementNS("http://www.w3.org/2000/svg","g"),Q=document.createElementNS("http://www.w3.org/2000/svg","path");Q.setAttribute("d",`M 0 ${R.from} L ${O} ${R.from} L ${O} ${R.to} L ${oe-K} ${R.to}`),Q.setAttribute("fill","none"),V.appendChild(Q);const H=document.createElementNS("http://www.w3.org/2000/svg","polygon");H.classList.add("arrow"),g.add(zt(G=>{Q.classList.toggle("currentMove",R.move===m.activeMovedText.read(G)),H.classList.toggle("currentMove",R.move===m.activeMovedText.read(G))})),H.setAttribute("points",`${oe-K},${R.to-$/2} ${oe},${R.to} ${oe-K},${R.to+$/2}`),V.appendChild(H),this._element.appendChild(V),E++}this.width.set(y,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register(je(()=>this._element.remove())),this._register(zt(h=>{const g=this._originalEditorLayoutInfo.read(h),f=this._modifiedEditorLayoutInfo.read(h);!g||!f||(this._element.style.left=`${g.width-g.verticalScrollbarWidth}px`,this._element.style.height=`${g.height}px`,this._element.style.width=`${g.verticalScrollbarWidth+g.contentLeft-Yc.movedCodeBlockPadding+this.width.read(h)}px`)})),this._register(x0(this._state));const r=rt(h=>{const g=this._diffModel.read(h),f=g==null?void 0:g.diff.read(h);return f?f.movedTexts.map(m=>({move:m,original:new LS(SS(m.lineRangeMapping.original.startLineNumber-1),18),modified:new LS(SS(m.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register(DS(this._editors.original,r.map(h=>h.map(g=>g.original)))),this._register(DS(this._editors.modified,r.map(h=>h.map(g=>g.modified)))),this._register(Qd((h,g)=>{const f=r.read(h);for(const m of f)g.add(new P5(this._editors.original,m.original,m.move,"original",this._diffModel.get())),g.add(new P5(this._editors.modified,m.modified,m.move,"modified",this._diffModel.get()))}));const a=Oi(this._editors.original.onDidChangeCursorPosition,()=>this._editors.original.getPosition()),l=Oi(this._editors.modified.onDidChangeCursorPosition,()=>this._editors.modified.getPosition()),d=Fo("original.onDidFocusEditorWidget",h=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>h(void 0),0))),c=Fo("modified.onDidFocusEditorWidget",h=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>h(void 0),0)));let u="modified";this._register(D0({createEmptyChangeSummary:()=>{},handleChange:(h,g)=>(h.didChange(d)&&(u="original"),h.didChange(c)&&(u="modified"),!0)},h=>{d.read(h),c.read(h);const g=this._diffModel.read(h);if(!g)return;const f=g.diff.read(h);let m;if(f&&u==="original"){const v=a.read(h);v&&(m=f.movedTexts.find(_=>_.lineRangeMapping.original.contains(v.lineNumber)))}if(f&&u==="modified"){const v=l.read(h);v&&(m=f.movedTexts.find(_=>_.lineRangeMapping.modified.contains(v.lineNumber)))}m!==g.movedTextToCompare.get()&&g.movedTextToCompare.set(void 0,void 0),g.setActiveMovedText(m)}))}}Yc.movedCodeBlockPadding=4;class mR{static compute(e){const t=[],i=[];for(const n of e){let s=t.findIndex(r=>!r.intersectsStrict(n));s===-1&&(t.length>=6?s=IJ(t,ur(a=>a.intersectWithRangeLength(n),Md)):(s=t.length,t.push(new AM))),t[s].addRange(n),i.push(s)}return new mR(t.length,i)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class P5 extends gW{constructor(e,t,i,n,s){const r=vi("div.diff-hidden-lines-widget");super(e,t,r.root),this._editor=e,this._move=i,this._kind=n,this._diffModel=s,this._nodes=vi("div.diff-moved-code-block",{style:{marginRight:"4px"}},[vi("div.text-content@textContent"),vi("div.action-bar@actionBar")]),r.root.appendChild(this._nodes.root);const a=Oi(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register(Zc(this._nodes.root,{paddingRight:a.map(h=>h.verticalScrollbarWidth)}));let l;i.changes.length>0?l=this._kind==="original"?p("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):p("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):l=this._kind==="original"?p("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):p("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const d=this._register(new Cr(this._nodes.actionBar,{highlightToggledItems:!0})),c=new Rs("",l,"",!1);d.push(c,{icon:!1,label:!0});const u=new Rs("","Compare",Ue.asClassName(ve.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===i?void 0:this._move,void 0)});this._register(zt(h=>{const g=this._diffModel.movedTextToCompare.read(h)===i;u.checked=g})),d.push(u,{icon:!1,label:!0})}}class pfe extends q{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._decorations=rt(this,s=>{var r;const a=(r=this._diffModel.read(s))===null||r===void 0?void 0:r.diff.read(s);if(!a)return null;const l=this._diffModel.read(s).movedTextToCompare.read(s),d=this._options.renderIndicators.read(s),c=this._options.showEmptyDecorations.read(s),u=[],h=[];if(!l)for(const f of a.mappings)if(f.lineRangeMapping.original.isEmpty||u.push({range:f.lineRangeMapping.original.toInclusiveRange(),options:d?T5:A5}),f.lineRangeMapping.modified.isEmpty||h.push({range:f.lineRangeMapping.modified.toInclusiveRange(),options:d?N5:M5}),f.lineRangeMapping.modified.isEmpty||f.lineRangeMapping.original.isEmpty)f.lineRangeMapping.original.isEmpty||u.push({range:f.lineRangeMapping.original.toInclusiveRange(),options:gfe}),f.lineRangeMapping.modified.isEmpty||h.push({range:f.lineRangeMapping.modified.toInclusiveRange(),options:ufe});else for(const m of f.lineRangeMapping.innerChanges||[])f.lineRangeMapping.original.contains(m.originalRange.startLineNumber)&&u.push({range:m.originalRange,options:m.originalRange.isEmpty()&&c?ffe:$N}),f.lineRangeMapping.modified.contains(m.modifiedRange.startLineNumber)&&h.push({range:m.modifiedRange,options:m.modifiedRange.isEmpty()&&c?hfe:R5});if(l)for(const f of l.changes){const m=f.original.toInclusiveRange();m&&u.push({range:m,options:d?T5:A5});const v=f.modified.toInclusiveRange();v&&h.push({range:v,options:d?N5:M5});for(const _ of f.innerChanges||[])u.push({range:_.originalRange,options:$N}),h.push({range:_.modifiedRange,options:R5})}const g=this._diffModel.read(s).activeMovedText.read(s);for(const f of a.movedTexts)u.push({range:f.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(f===g?" currentMove":""),blockPadding:[Yc.movedCodeBlockPadding,0,Yc.movedCodeBlockPadding,Yc.movedCodeBlockPadding]}}),h.push({range:f.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(f===g?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:u,modifiedDecorations:h}}),this._register(new mfe(e,t,i,n)),this._register(yS(this._editors.original,this._decorations.map(s=>(s==null?void 0:s.originalDecorations)||[]))),this._register(yS(this._editors.modified,this._decorations.map(s=>(s==null?void 0:s.modifiedDecorations)||[])))}}class mfe extends q{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._widget=n;const s=[],r=rt(this,a=>{const l=this._diffModel.read(a),d=l==null?void 0:l.diff.read(a);if(!d)return s;const c=this._editors.modifiedSelections.read(a);if(c.every(f=>f.isEmpty()))return s;const u=new va(c.map(f=>yt.fromRangeInclusive(f))),g=d.mappings.filter(f=>f.lineRangeMapping.innerChanges&&u.intersects(f.lineRangeMapping.modified)).map(f=>({mapping:f,rangeMappings:f.lineRangeMapping.innerChanges.filter(m=>c.some(v=>k.areIntersecting(m.modifiedRange,v)))}));return g.length===0||g.every(f=>f.rangeMappings.length===0)?s:g});this._register(Qd((a,l)=>{const d=this._diffModel.read(a),c=d==null?void 0:d.diff.read(a);if(!d||!c||this._diffModel.read(a).movedTextToCompare.read(a)||!this._options.shouldRenderRevertArrows.read(a))return;const h=[],g=r.read(a),f=new Set(g.map(m=>m.mapping));if(g.length>0){const m=this._editors.modifiedSelections.read(a),v=new vb(m[m.length-1].positionLineNumber,this._widget,g.flatMap(_=>_.rangeMappings),!0);this._editors.modified.addGlyphMarginWidget(v),h.push(v)}for(const m of c.mappings)if(!f.has(m)&&!m.lineRangeMapping.modified.isEmpty&&m.lineRangeMapping.innerChanges){const v=new vb(m.lineRangeMapping.modified.startLineNumber,this._widget,m.lineRangeMapping.innerChanges,!1);this._editors.modified.addGlyphMarginWidget(v),h.push(v)}l.add(je(()=>{for(const m of h)this._editors.modified.removeGlyphMarginWidget(m)}))}))}}class vb{getId(){return this._id}constructor(e,t,i,n){this._lineNumber=e,this._widget=t,this._diffs=i,this._selection=n,this._id=`revertButton${vb.counter++}`,this._domNode=vi("div.revertButton",{title:this._selection?p("revertSelectedChanges","Revert Selected Changes"):p("revertChange","Revert Change")},[Qw(ve.arrowRight)]).root,this._domNode.onmousedown=s=>{s.button!==2&&(s.stopPropagation(),s.preventDefault())},this._domNode.onmouseup=s=>{s.stopPropagation(),s.preventDefault()},this._domNode.onclick=s=>{this._widget.revertRangeMappings(this._diffs),s.stopPropagation(),s.preventDefault()}}getDomNode(){return this._domNode}getPosition(){return{lane:Wh.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}}vb.counter=0;class _fe extends q{constructor(e,t,i,n){super(),this._options=e,this._domNode=t,this._dimensions=i,this._sashes=n,this._sashRatio=Pt(this,void 0),this.sashLeft=rt(this,s=>{var r;const a=(r=this._sashRatio.read(s))!==null&&r!==void 0?r:this._options.splitViewDefaultRatio.read(s);return this._computeSashLeft(a,s)}),this._sash=this._register(new ss(this._domNode,{getVerticalSashTop:s=>0,getVerticalSashLeft:s=>this.sashLeft.get(),getVerticalSashHeight:s=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(s=>{const r=this._dimensions.width.get(),a=this._computeSashLeft((this._startSashPosition+(s.currentX-s.startX))/r,void 0);this._sashRatio.set(a/r,void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._sashRatio.set(void 0,void 0))),this._register(zt(s=>{const r=this._sashes.read(s);r&&(this._sash.orthogonalEndSash=r.bottom)})),this._register(zt(s=>{const r=this._options.enableSplitViewResizing.read(s);this._sash.state=r?3:0,this.sashLeft.read(s),this._dimensions.height.read(s),this._sash.layout()}))}_computeSashLeft(e,t){const i=this._dimensions.width.read(t),n=Math.floor(this._options.splitViewDefaultRatio.read(t)*i),s=this._options.enableSplitViewResizing.read(t)?Math.floor(e*i):n,r=100;return i<=r*2?n:si-r?i-r:s}}let zf=class{remove(){var e;(e=this.parent)===null||e===void 0||e.children.delete(this.id)}static findId(e,t){let i;typeof e=="string"?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,t.children.get(i)!==void 0&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let s=0;t.children.get(n)!==void 0;s++)n=`${i}_${s}`;return n}static empty(e){return e.children.size===0}},O5=class extends zf{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}},vfe=class extends zf{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}},bfe=class hh extends zf{static create(e,t,i){const n=new tn(i),s=new hh(t.uri),r=e.ordered(t),a=r.map((d,c)=>{var u;const h=zf.findId(`provider_${c}`,s),g=new vfe(h,s,(u=d.displayName)!==null&&u!==void 0?u:"Unknown Outline Provider",c);return Promise.resolve(d.provideDocumentSymbols(t,n.token)).then(f=>{for(const m of f||[])hh._makeOutlineElement(m,g);return g},f=>(en(f),g)).then(f=>{zf.empty(f)?f.remove():s._groups.set(h,f)})}),l=e.onDidChange(()=>{const d=e.ordered(t);Bi(d,r)||n.cancel()});return Promise.all(a).then(()=>n.token.isCancellationRequested&&!i.isCancellationRequested?hh.create(e,t,i):s._compact()).finally(()=>{n.dispose(),l.dispose()})}static _makeOutlineElement(e,t){const i=zf.findId(e,t),n=new O5(i,t,e);if(e.children)for(const s of e.children)hh._makeOutlineElement(s,n);t.children.set(n.id,n)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,i]of this._groups)i.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{const t=wt.first(this._groups.values());for(const[,i]of t.children)i.parent=this,this.children.set(i.id,i)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof O5?e.push(t.symbol):e.push(...wt.map(t.children.values(),i=>i.symbol));return e.sort((t,i)=>k.compareRangesUsingStarts(t.range,i.range))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return hh._flattenDocumentSymbols(t,e,""),t.sort((i,n)=>z.compare(k.getStartPosition(i.range),k.getStartPosition(n.range))||z.compare(k.getEndPosition(n.range),k.getEndPosition(i.range)))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&hh._flattenDocumentSymbols(e,n.children,n.name)}};var pW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},mW=function(o,e){return function(t,i){e(t,i,o)}};let UN=class extends q{get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._languageFeaturesService=n,this._modifiedOutlineSource=fc(this,l=>{const d=this._editors.modifiedModel.read(l);return d?new jN(this._languageFeaturesService,d):void 0}),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition(l=>{if(l.reason===3){const d=this._diffModel.get();wi(c=>{for(const u of this._editors.original.getSelections()||[])d==null||d.ensureOriginalLineIsVisible(u.getStartPosition().lineNumber,c),d==null||d.ensureOriginalLineIsVisible(u.getEndPosition().lineNumber,c)})}})),this._register(this._editors.modified.onDidChangeCursorPosition(l=>{if(l.reason===3){const d=this._diffModel.get();wi(c=>{for(const u of this._editors.modified.getSelections()||[])d==null||d.ensureModifiedLineIsVisible(u.getStartPosition().lineNumber,c),d==null||d.ensureModifiedLineIsVisible(u.getEndPosition().lineNumber,c)})}}));const s=this._diffModel.map((l,d)=>{var c,u;return((c=l==null?void 0:l.diff.read(d))===null||c===void 0?void 0:c.mappings.length)===0?[]:(u=l==null?void 0:l.unchangedRegions.read(d))!==null&&u!==void 0?u:[]});this.viewZones=Dm(this,(l,d)=>{const c=this._modifiedOutlineSource.read(l);if(!c)return{origViewZones:[],modViewZones:[]};const u=[],h=[],g=this._options.renderSideBySide.read(l),f=s.read(l);for(const m of f)if(!m.shouldHideControls(l)){{const v=rt(this,b=>m.getHiddenOriginalRange(b).startLineNumber-1),_=new LS(v,24);u.push(_),d.add(new F5(this._editors.original,_,m,m.originalUnchangedRange,!g,c,b=>this._diffModel.get().ensureModifiedLineIsVisible(b,void 0),this._options))}{const v=rt(this,b=>m.getHiddenModifiedRange(b).startLineNumber-1),_=new LS(v,24);h.push(_),d.add(new F5(this._editors.modified,_,m,m.modifiedUnchangedRange,!1,c,b=>this._diffModel.get().ensureModifiedLineIsVisible(b,void 0),this._options))}}return{origViewZones:u,modViewZones:h}});const r={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},a={description:"Fold Unchanged",glyphMarginHoverMessage:new as(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(p("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+Ue.asClassName(ve.fold),zIndex:10001};this._register(yS(this._editors.original,rt(this,l=>{const d=s.read(l),c=d.map(u=>({range:u.originalUnchangedRange.toInclusiveRange(),options:r}));for(const u of d)u.shouldHideControls(l)&&c.push({range:k.fromPositions(new z(u.originalLineNumber,1)),options:a});return c}))),this._register(yS(this._editors.modified,rt(this,l=>{const d=s.read(l),c=d.map(u=>({range:u.modifiedUnchangedRange.toInclusiveRange(),options:r}));for(const u of d)u.shouldHideControls(l)&&c.push({range:yt.ofLength(u.modifiedLineNumber,1).toInclusiveRange(),options:a});return c}))),this._register(zt(l=>{const d=s.read(l);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(d.map(c=>c.getHiddenOriginalRange(l).toInclusiveRange()).filter(mv)),this._editors.modified.setHiddenAreas(d.map(c=>c.getHiddenModifiedRange(l).toInclusiveRange()).filter(mv))}finally{this._isUpdatingHiddenAreas=!1}})),this._register(this._editors.modified.onMouseUp(l=>{var d;if(!l.event.rightButton&&l.target.position&&(!((d=l.target.element)===null||d===void 0)&&d.className.includes("fold-unchanged"))){const c=l.target.position.lineNumber,u=this._diffModel.get();if(!u)return;const h=u.unchangedRegions.get().find(g=>g.modifiedUnchangedRange.includes(c));if(!h)return;h.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(l=>{var d;if(!l.event.rightButton&&l.target.position&&(!((d=l.target.element)===null||d===void 0)&&d.className.includes("fold-unchanged"))){const c=l.target.position.lineNumber,u=this._diffModel.get();if(!u)return;const h=u.unchangedRegions.get().find(g=>g.originalUnchangedRange.includes(c));if(!h)return;h.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}}))}};UN=pW([mW(3,Me)],UN);class F5 extends gW{constructor(e,t,i,n,s,r,a,l){const d=vi("div.diff-hidden-lines-widget");super(e,t,d.root),this._editor=e,this._unchangedRegion=i,this._unchangedRegionRange=n,this._hide=s,this._modifiedOutlineSource=r,this._revealModifiedHiddenLine=a,this._options=l,this._nodes=vi("div.diff-hidden-lines",[vi("div.top@top",{title:p("diff.hiddenLines.top","Click or drag to show more above")}),vi("div.center@content",{style:{display:"flex"}},[vi("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[pe("a",{title:p("showUnchangedRegion","Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...Kc("$(unfold)"))]),vi("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),vi("div.bottom@bottom",{title:p("diff.bottom","Click or drag to show more below"),role:"button"})]),d.root.appendChild(this._nodes.root);const c=Oi(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._hide?es(this._nodes.first):this._register(Zc(this._nodes.first,{width:c.map(h=>h.contentLeft)})),this._register(zt(h=>{const g=this._unchangedRegion.visibleLineCountTop.read(h)+this._unchangedRegion.visibleLineCountBottom.read(h)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!g),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(h)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(h)>0),this._nodes.top.classList.toggle("canMoveBottom",!g);const f=this._unchangedRegion.isDragged.read(h),m=this._editor.getDomNode();m&&(m.classList.toggle("draggingUnchangedRegion",!!f),f==="top"?(m.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(h)>0),m.classList.toggle("canMoveBottom",!g)):f==="bottom"?(m.classList.toggle("canMoveTop",!g),m.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(h)>0)):(m.classList.toggle("canMoveTop",!1),m.classList.toggle("canMoveBottom",!1)))}));const u=this._editor;this._register(J(this._nodes.top,"mousedown",h=>{if(h.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),h.preventDefault();const g=h.clientY;let f=!1;const m=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);const v=Je(this._nodes.top),_=J(v,"mousemove",C=>{const S=C.clientY-g;f=f||Math.abs(S)>2;const x=Math.round(S/u.getOption(66)),y=Math.max(0,Math.min(m+x,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(y,void 0)}),b=J(v,"mouseup",C=>{f||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),_.dispose(),b.dispose()})})),this._register(J(this._nodes.bottom,"mousedown",h=>{if(h.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),h.preventDefault();const g=h.clientY;let f=!1;const m=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);const v=Je(this._nodes.bottom),_=J(v,"mousemove",C=>{const S=C.clientY-g;f=f||Math.abs(S)>2;const x=Math.round(S/u.getOption(66)),y=Math.max(0,Math.min(m-x,this._unchangedRegion.getMaxVisibleLineCountBottom())),I=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(y,void 0);const E=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);u.setScrollTop(u.getScrollTop()+(E-I))}),b=J(v,"mouseup",C=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!f){const w=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const S=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);u.setScrollTop(u.getScrollTop()+(S-w))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),_.dispose(),b.dispose()})})),this._register(zt(h=>{const g=[];if(!this._hide){const f=i.getHiddenModifiedRange(h).length,m=p("hiddenLines","{0} hidden lines",f),v=pe("span",{title:p("diff.hiddenLines.expandAll","Double click to unfold")},m);v.addEventListener("dblclick",C=>{C.button===0&&(C.preventDefault(),this._unchangedRegion.showAll(void 0))}),g.push(v);const _=this._unchangedRegion.getHiddenModifiedRange(h),b=this._modifiedOutlineSource.getBreadcrumbItems(_,h);if(b.length>0){g.push(pe("span",void 0,"  |  "));for(let C=0;C{this._revealModifiedHiddenLine(w.startLineNumber)}}}}es(this._nodes.others,...g)}))}}let jN=class extends q{constructor(e,t){super(),this._languageFeaturesService=e,this._textModel=t,this._currentModel=Pt(this,void 0);const i=Fo("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),n=Fo("_textModel.onDidChangeContent",ye.debounce(s=>this._textModel.onDidChangeContent(s),()=>{},100));this._register(Qd(async(s,r)=>{i.read(s),n.read(s);const a=r.add(new Qge),l=await bfe.create(this._languageFeaturesService.documentSymbolProvider,this._textModel,a.token);r.isDisposed||this._currentModel.set(l,void 0)}))}getBreadcrumbItems(e,t){const i=this._currentModel.read(t);if(!i)return[];const n=i.asListOfDocumentSymbols().filter(s=>e.contains(s.range.startLineNumber)&&!e.contains(s.range.endLineNumber));return n.sort(F9(ur(s=>s.range.endLineNumber-s.range.startLineNumber,Md))),n.map(s=>({name:s.name,kind:s.kind,startLineNumber:s.range.startLineNumber}))}};jN=pW([mW(0,Me)],jN);var Cfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},B5=function(o,e){return function(t,i){e(t,i,o)}},gh;let xS=gh=class{constructor(e,t,i){this.editorWorkerService=t,this.telemetryService=i,this.onDidChangeEventEmitter=new W,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){var e;(e=this.diffAlgorithmOnDidChangeSubscription)===null||e===void 0||e.dispose()}async computeDiff(e,t,i,n){var s,r;if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(e,t,i,n);if(e.getLineCount()===1&&e.getLineMaxColumn(1)===1)return t.getLineCount()===1&&t.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new vr(new yt(1,2),new yt(1,t.getLineCount()+1),[new uu(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const a=JSON.stringify([e.uri.toString(),t.uri.toString()]),l=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(i)]),d=gh.diffCache.get(a);if(d&&d.context===l)return d.result;const c=ds.create(),u=await this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm),h=c.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:h,timedOut:(s=u==null?void 0:u.quitEarly)!==null&&s!==void 0?s:!0,detectedMoves:i.computeMoves?(r=u==null?void 0:u.moves.length)!==null&&r!==void 0?r:0:-1}),n.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!u)throw new Error("no diff result available");return gh.diffCache.size>10&&gh.diffCache.delete(gh.diffCache.keys().next().value),gh.diffCache.set(a,{result:u,context:l}),u}setOptions(e){var t;let i=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&((t=this.diffAlgorithmOnDidChangeSubscription)===null||t===void 0||t.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,typeof e.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),i=!0),i&&this.onDidChangeEventEmitter.fire()}};xS.diffCache=new Map;xS=gh=Cfe([B5(1,Qr),B5(2,vo)],xS);var wfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Sfe=function(o,e){return function(t,i){e(t,i,o)}};const _W=bt("diffProviderFactoryService");let KN=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(xS,e)}};KN=wfe([Sfe(0,qe)],KN);xt(_W,KN,1);var yfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Lfe=function(o,e){return function(t,i){e(t,i,o)}};let qN=class extends q{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,i){super(),this.model=e,this._options=t,this._diffProviderFactoryService=i,this._isDiffUpToDate=Pt(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=Pt(this,void 0),this.diff=this._diff,this._unchangedRegions=Pt(this,{regions:[],originalDecorationIds:[],modifiedDecorationIds:[]}),this.unchangedRegions=rt(this,a=>this._options.hideUnchangedRegions.read(a)?this._unchangedRegions.read(a).regions:(wi(l=>{for(const d of this._unchangedRegions.get().regions)d.collapseAll(l)}),[])),this.movedTextToCompare=Pt(this,void 0),this._activeMovedText=Pt(this,void 0),this._hoveredMovedText=Pt(this,void 0),this.activeMovedText=rt(this,a=>{var l,d;return(d=(l=this.movedTextToCompare.read(a))!==null&&l!==void 0?l:this._hoveredMovedText.read(a))!==null&&d!==void 0?d:this._activeMovedText.read(a)}),this._cancellationTokenSource=new tn,this._diffProvider=rt(this,a=>{const l=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(a)}),d=Fo("onDidChange",l.onDidChange);return{diffProvider:l,onChangeSignal:d}}),this._register(je(()=>this._cancellationTokenSource.cancel()));const n=hR("contentChangedSignal"),s=this._register(new Yt(()=>n.trigger(void 0),200)),r=(a,l,d)=>{const c=kS.fromDiffs(a.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(d),this._options.hideUnchangedRegionsContextLineCount.read(d)),u=this._unchangedRegions.get(),h=u.originalDecorationIds.map(v=>e.original.getDecorationRange(v)).map(v=>v?yt.fromRange(v):void 0),g=u.modifiedDecorationIds.map(v=>e.modified.getDecorationRange(v)).map(v=>v?yt.fromRange(v):void 0),f=e.original.deltaDecorations(u.originalDecorationIds,c.map(v=>({range:v.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),m=e.modified.deltaDecorations(u.modifiedDecorationIds,c.map(v=>({range:v.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));for(const v of c)for(let _=0;_{if(this._diff.get()){const d=Td.fromModelContentChanges(a.changes);this._lastDiff,e.original,e.modified}this._isDiffUpToDate.set(!1,void 0),s.schedule()})),this._register(e.original.onDidChangeContent(a=>{if(this._diff.get()){const d=Td.fromModelContentChanges(a.changes);this._lastDiff,e.original,e.modified}this._isDiffUpToDate.set(!1,void 0),s.schedule()})),this._register(Qd(async(a,l)=>{var d,c;this._options.hideUnchangedRegionsMinimumLineCount.read(a),this._options.hideUnchangedRegionsContextLineCount.read(a),s.cancel(),n.read(a);const u=this._diffProvider.read(a);u.onChangeSignal.read(a),nl(C7,a),nl(ZI,a),this._isDiffUpToDate.set(!1,void 0);let h=[];l.add(e.original.onDidChangeContent(m=>{const v=Td.fromModelContentChanges(m.changes);h=Ow(h,v)}));let g=[];l.add(e.modified.onDidChangeContent(m=>{const v=Td.fromModelContentChanges(m.changes);g=Ow(g,v)}));let f=await u.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(a),maxComputationTimeMs:this._options.maxComputationTimeMs.read(a),computeMoves:this._options.showMoves.read(a)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||(f=Dfe(f,e.original,e.modified),f=(d=(e.original,e.modified,void 0))!==null&&d!==void 0?d:f,f=(c=(e.original,e.modified,void 0))!==null&&c!==void 0?c:f,wi(m=>{r(f,m),this._lastDiff=f;const v=_R.fromDiffResult(f);this._diff.set(v,m),this._isDiffUpToDate.set(!0,m);const _=this.movedTextToCompare.get();this.movedTextToCompare.set(_?this._lastDiff.moves.find(b=>b.lineRangeMapping.modified.intersect(_.lineRangeMapping.modified)):void 0,m)}))}))}ensureModifiedLineIsVisible(e,t){var i;if(((i=this.diff.get())===null||i===void 0?void 0:i.mappings.length)===0)return;const n=this._unchangedRegions.get().regions;for(const s of n)if(s.getHiddenModifiedRange(void 0).contains(e)){s.showModifiedLine(e,t);return}}ensureOriginalLineIsVisible(e,t){var i;if(((i=this.diff.get())===null||i===void 0?void 0:i.mappings.length)===0)return;const n=this._unchangedRegions.get().regions;for(const s of n)if(s.getHiddenOriginalRange(void 0).contains(e)){s.showOriginalLine(e,t);return}}async waitForDiff(){await Uge(this.isDiffUpToDate,e=>e)}serializeState(){return{collapsedRegions:this._unchangedRegions.get().regions.map(t=>({range:t.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(e){const t=e.collapsedRegions.map(n=>yt.deserialize(n.range)),i=this._unchangedRegions.get();wi(n=>{for(const s of i.regions)for(const r of t)if(s.modifiedUnchangedRange.intersect(r)){s.setHiddenModifiedRange(r,n);break}})}};qN=yfe([Lfe(2,_W)],qN);function Dfe(o,e,t){return{changes:o.changes.map(i=>new vr(i.original,i.modified,i.innerChanges?i.innerChanges.map(n=>xfe(n,e,t)):void 0)),moves:o.moves,identical:o.identical,quitEarly:o.quitEarly}}function xfe(o,e,t){let i=o.originalRange,n=o.modifiedRange;return(i.endColumn!==1||n.endColumn!==1)&&i.endColumn===e.getLineMaxColumn(i.endLineNumber)&&n.endColumn===t.getLineMaxColumn(n.endLineNumber)&&i.endLineNumbernew vW(t)),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,i,n){this.mappings=e,this.movedTexts=t,this.identical=i,this.quitEarly=n}}class vW{constructor(e){this.lineRangeMapping=e}}class kS{static fromDiffs(e,t,i,n,s){const r=vr.inverse(e,t,i),a=[];for(const l of r){let d=l.original.startLineNumber,c=l.modified.startLineNumber,u=l.original.length;const h=d===1&&c===1,g=d+u===t+1&&c+u===i+1;(h||g)&&u>=s+n?(h&&!g&&(u-=s),g&&!h&&(d+=s,c+=s,u-=s),a.push(new kS(d,c,u,0,0))):u>=s*2+n&&(d+=s,c+=s,u-=s*2,a.push(new kS(d,c,u,0,0)))}return a}get originalUnchangedRange(){return yt.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return yt.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,i,n,s){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=i,this._visibleLineCountTop=Pt(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=Pt(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=rt(this,r=>this.visibleLineCountTop.read(r)+this.visibleLineCountBottom.read(r)===this.lineCount&&!this.isDragged.read(r)),this.isDragged=Pt(this,void 0),this._visibleLineCountTop.set(n,void 0),this._visibleLineCountBottom.set(s,void 0)}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return yt.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return yt.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){const i=e.startLineNumber-this.modifiedLineNumber,n=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(i,n,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){const i=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,i),t)}showMoreBelow(e=10,t){const i=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,i),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t){const i=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),n=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;i{var v;this._contextMenuService.showContextMenu({domForShadowRoot:h&&(v=i.getDomNode())!==null&&v!==void 0?v:void 0,getAnchor:()=>({x:f,y:m}),getActions:()=>{const _=[],b=n.modified.isEmpty;return _.push(new Rs("diff.clipboard.copyDeletedContent",b?n.original.length>1?p("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):p("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):n.original.length>1?p("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):p("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,async()=>{const w=this._originalTextModel.getValueInRange(n.original.toExclusiveRange());await this._clipboardService.writeText(w)})),n.original.length>1&&_.push(new Rs("diff.clipboard.copyDeletedLineContent",b?p("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.original.startLineNumber+u):p("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.original.startLineNumber+u),void 0,!0,async()=>{let w=this._originalTextModel.getLineContent(n.original.startLineNumber+u);w===""&&(w=this._originalTextModel.getEndOfLineSequence()===0?` `:`\r -`),await this._clipboardService.writeText(w)})),i.getOption(90)||_.push(new Rs("diff.inline.revertChange",p("diff.inline.revertChange.label","Revert this change"),void 0,!0,async()=>{this._editor.revert(this._diff)})),_},autoSelectFirstItem:!0})};this._register(Wi(this._diffActions,"mousedown",f=>{if(!f.leftButton)return;const{top:m,height:v}=gn(this._diffActions),_=Math.floor(c/3);f.preventDefault(),g(f.posx,m+v+_)})),this._register(i.onMouseMove(f=>{(f.target.type===8||f.target.type===5)&&f.target.detail.viewZoneId===this._getViewZoneId()?(u=this._updateLightBulbPosition(this._marginDomNode,f.event.browserEvent.y,c),this.visibility=!0):this.visibility=!1})),this._register(i.onMouseDown(f=>{f.event.leftButton&&(f.target.type===8||f.target.type===5)&&f.target.detail.viewZoneId===this._getViewZoneId()&&(f.event.preventDefault(),u=this._updateLightBulbPosition(this._marginDomNode,f.event.browserEvent.y,c),g(f.event.posx,f.event.posy+c))}))}_updateLightBulbPosition(e,t,i){const{top:n}=gn(e),s=t-n,r=Math.floor(s/i),a=r*i;if(this._diffActions.style.top=`${a}px`,this._viewLineCounts){let l=0;for(let d=0;do});function Lfe(o,e,t,i){Jn(i,e.fontInfo);const n=t.length>0,s=new mm(1e4);let r=0,a=0;const l=[];for(let h=0;h');const l=e.getLineContent(),d=Zo.isBasicASCII(l,n),c=Zo.containsRTL(l,d,s),u=n0(new Ou(r.fontInfo.isMonospace&&!r.disableMonospaceOptimizations,r.fontInfo.canUseHalfwidthRightwardsArrow,l,!1,d,c,0,e,t,r.tabSize,0,r.fontInfo.spaceWidth,r.fontInfo.middotWidth,r.fontInfo.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==Po.OFF,null),a);return a.appendString(""),u.characterMapping.getHorizontalOffset(u.characterMapping.length)}var xfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},H5=function(o,e){return function(t,i){e(t,i,o)}};let GN=class extends q{constructor(e,t,i,n,s,r,a,l,d,c){super(),this._targetWindow=e,this._editors=t,this._diffModel=i,this._options=n,this._diffEditorWidget=s,this._canIgnoreViewZoneUpdateEvent=r,this._origViewZonesToIgnore=a,this._modViewZonesToIgnore=l,this._clipboardService=d,this._contextMenuService=c,this._originalTopPadding=Pt(this,0),this._originalScrollOffset=Pt(this,0),this._originalScrollOffsetAnimated=I5(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=Pt(this,0),this._modifiedScrollOffset=Pt(this,0),this._modifiedScrollOffsetAnimated=I5(this._targetWindow,this._modifiedScrollOffset,this._store);const u=Pt("invalidateAlignmentsState",0),h=this._register(new Yt(()=>{u.set(u.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(C=>{this._canIgnoreViewZoneUpdateEvent()||h.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(C=>{this._canIgnoreViewZoneUpdateEvent()||h.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(C=>{(C.hasChanged(144)||C.hasChanged(66))&&h.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(C=>{(C.hasChanged(144)||C.hasChanged(66))&&h.schedule()}));const g=this._diffModel.map(C=>C?Oi(C.model.original.onDidChangeTokens,()=>C.model.original.tokenization.backgroundTokenizationState===2):void 0).map((C,w)=>C==null?void 0:C.read(w)),f=rt(C=>{const w=this._diffModel.read(C),S=w==null?void 0:w.diff.read(C);if(!w||!S)return null;u.read(C);const y=this._options.renderSideBySide.read(C);return z5(this._editors.original,this._editors.modified,S.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,y)}),m=rt(C=>{var w;const S=(w=this._diffModel.read(C))===null||w===void 0?void 0:w.movedTextToCompare.read(C);if(!S)return null;u.read(C);const x=S.changes.map(y=>new vW(y));return z5(this._editors.original,this._editors.modified,x,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)});function v(){const C=document.createElement("div");return C.className="diagonal-fill",C}const _=this._register(new de);this.viewZones=Dm(this,(C,w)=>{var S,x,y,I,E,R,j,O;_.clear();const $=f.read(C)||[],K=[],oe=[],Le=this._modifiedTopPadding.read(C);Le>0&&oe.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:Le,showInHiddenAreas:!0,suppressMouseDown:!0});const he=this._originalTopPadding.read(C);he>0&&K.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:he,showInHiddenAreas:!0,suppressMouseDown:!0});const se=this._options.renderSideBySide.read(C),V=se||(S=this._editors.modified._getViewModel())===null||S===void 0?void 0:S.createLineBreaksComputer();if(V){for(const Ce of $)if(Ce.diff)for(let re=Ce.originalRange.startLineNumber;rethis._editors.original.getModel().tokenization.getLineTokens(ci)),Ce.originalRange.mapToLineArray(ci=>Q[H++]),$e,ft),Ie=[];for(const ci of Ce.diff.innerChanges||[])Ie.push(new W_(ci.originalRange.delta(-(Ce.diff.original.startLineNumber-1)),$N.className,0));const mt=Lfe(ce,Bt,Ie,ke),Ct=document.createElement("div");if(Ct.className="inline-deleted-margin-view-zone",Jn(Ct,Bt.fontInfo),this._options.renderIndicators.read(C))for(let ci=0;ciLc(Mt),Ct,this._editors.modified,Ce.diff,this._diffEditorWidget,mt.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let ci=0;ci1&&K.push({afterLineNumber:Ce.originalRange.startLineNumber+ci,domNode:v(),heightInPx:(yn-1)*G,showInHiddenAreas:!0,suppressMouseDown:!0})}oe.push({afterLineNumber:Ce.modifiedRange.startLineNumber-1,domNode:ke,heightInPx:mt.heightInLines*G,minWidthInPx:mt.minWidthInPx,marginDomNode:Ct,setZoneId(ci){Mt=ci},showInHiddenAreas:!0,suppressMouseDown:!0})}const re=document.createElement("div");re.className="gutter-delete",K.push({afterLineNumber:Ce.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:Ce.modifiedHeightInPx,marginDomNode:re,showInHiddenAreas:!0,suppressMouseDown:!0})}else{const re=Ce.modifiedHeightInPx-Ce.originalHeightInPx;if(re>0){if(Z!=null&&Z.lineRangeMapping.original.delta(-1).deltaLength(2).contains(Ce.originalRange.endLineNumberExclusive-1))continue;K.push({afterLineNumber:Ce.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:re,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let ke=function(){const Ie=document.createElement("div");return Ie.className="arrow-revert-change "+Ue.asClassName(ve.arrowRight),w.add(J(Ie,"mousedown",mt=>mt.stopPropagation())),w.add(J(Ie,"click",mt=>{mt.stopPropagation(),s.revert(Ce.diff)})),pe("div",{},Ie)};if(Z!=null&&Z.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(Ce.modifiedRange.endLineNumberExclusive-1))continue;let ce;Ce.diff&&Ce.diff.modified.isEmpty&&this._options.shouldRenderRevertArrows.read(C)&&(ce=ke()),oe.push({afterLineNumber:Ce.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-re,marginDomNode:ce,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(const Ce of(O=m.read(C))!==null&&O!==void 0?O:[]){if(!(Z!=null&&Z.lineRangeMapping.original.intersect(Ce.originalRange))||!(Z!=null&&Z.lineRangeMapping.modified.intersect(Ce.modifiedRange)))continue;const re=Ce.modifiedHeightInPx-Ce.originalHeightInPx;re>0?K.push({afterLineNumber:Ce.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:re,showInHiddenAreas:!0,suppressMouseDown:!0}):oe.push({afterLineNumber:Ce.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-re,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:K,mod:oe}});let b=!1;this._register(this._editors.original.onDidScrollChange(C=>{C.scrollLeftChanged&&!b&&(b=!0,this._editors.modified.setScrollLeft(C.scrollLeft),b=!1)})),this._register(this._editors.modified.onDidScrollChange(C=>{C.scrollLeftChanged&&!b&&(b=!0,this._editors.original.setScrollLeft(C.scrollLeft),b=!1)})),this._originalScrollTop=Oi(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Oi(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register(zt(C=>{const w=this._originalScrollTop.read(C)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(C))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(C));w!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(w,1)})),this._register(zt(C=>{const w=this._modifiedScrollTop.read(C)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(C))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(C));w!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(w,1)})),this._register(zt(C=>{var w;const S=(w=this._diffModel.read(C))===null||w===void 0?void 0:w.movedTextToCompare.read(C);let x=0;if(S){const y=this._editors.original.getTopForLineNumber(S.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();x=this._editors.modified.getTopForLineNumber(S.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-y}x>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(x,void 0)):x<0?(this._modifiedTopPadding.set(-x,void 0),this._originalTopPadding.set(0,void 0)):setTimeout(()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)},400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-x,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+x,void 0,!0)}))}};GN=xfe([H5(8,Xd),H5(9,Sr)],GN);function z5(o,e,t,i,n,s){const r=new Hd($5(o,i)),a=new Hd($5(e,n)),l=o.getOption(66),d=e.getOption(66),c=[];let u=0,h=0;function g(f,m){for(;;){let v=r.peek(),_=a.peek();if(v&&v.lineNumber>=f&&(v=void 0),_&&_.lineNumber>=m&&(_=void 0),!v&&!_)break;const b=v?v.lineNumber-u:Number.MAX_VALUE,C=_?_.lineNumber-h:Number.MAX_VALUE;bC?(a.dequeue(),v={lineNumber:_.lineNumber-h+u,heightInPx:0}):(r.dequeue(),a.dequeue()),c.push({originalRange:yt.ofLength(v.lineNumber,1),modifiedRange:yt.ofLength(_.lineNumber,1),originalHeightInPx:l+v.heightInPx,modifiedHeightInPx:d+_.heightInPx,diff:void 0})}}for(const f of t){let C=function(w,S){var x,y,I,E;if(wK.lineNumberK+oe.heightInPx,0))!==null&&y!==void 0?y:0,$=(E=(I=a.takeWhile(K=>K.lineNumberK+oe.heightInPx,0))!==null&&E!==void 0?E:0;c.push({originalRange:R,modifiedRange:j,originalHeightInPx:R.length*l+O,modifiedHeightInPx:j.length*d+$,diff:f.lineRangeMapping}),b=w,_=S};const m=f.lineRangeMapping;g(m.original.startLineNumber,m.modified.startLineNumber);let v=!0,_=m.modified.startLineNumber,b=m.original.startLineNumber;if(s)for(const w of m.innerChanges||[])w.originalRange.startColumn>1&&w.modifiedRange.startColumn>1&&C(w.originalRange.startLineNumber,w.modifiedRange.startLineNumber),w.originalRange.endColumn1&&i.push({lineNumber:l,heightInPx:r*(d-1)})}for(const l of o.getWhitespaces()){if(e.has(l.id))continue;const d=l.afterLineNumber===0?0:s.convertViewPositionToModelPosition(new z(l.afterLineNumber,1)).lineNumber;t.push({lineNumber:d,heightInPx:l.height})}return jge(t,i,l=>l.lineNumber,(l,d)=>({lineNumber:l.lineNumber,heightInPx:l.heightInPx+d.heightInPx}))}var kfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ife=function(o,e){return function(t,i){e(t,i,o)}},Tr;let gg=Tr=class extends q{constructor(e,t,i,n,s,r,a){super(),this._editors=e,this._rootElement=t,this._diffModel=i,this._rootWidth=n,this._rootHeight=s,this._modifiedEditorLayoutInfo=r,this._themeService=a,this.width=Tr.ENTIRE_DIFF_OVERVIEW_WIDTH;const l=Oi(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),d=rt(h=>{const g=l.read(h),f=g.getColor(Fte)||(g.getColor(Pte)||nE).transparent(2),m=g.getColor(Bte)||(g.getColor(Ote)||sE).transparent(2);return{insertColor:f,removeColor:m}}),c=Ht(document.createElement("div"));c.setClassName("diffViewport"),c.setPosition("absolute");const u=vi("div.diffOverview",{style:{position:"absolute",top:"0px",width:Tr.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register(RC(u,c.domNode)),this._register(Wi(u,Se.POINTER_DOWN,h=>{this._editors.modified.delegateVerticalScrollbarPointerDown(h)})),this._register(J(u,Se.MOUSE_WHEEL,h=>{this._editors.modified.delegateScrollFromMouseWheelEvent(h)},{passive:!1})),this._register(RC(this._rootElement,u)),this._register(Qd((h,g)=>{const f=this._diffModel.read(h),m=this._editors.original.createOverviewRuler("original diffOverviewRuler");m&&(g.add(m),g.add(RC(u,m.getDomNode())));const v=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(v&&(g.add(v),g.add(RC(u,v.getDomNode()))),!m||!v)return;const _=Fo("viewZoneChanged",this._editors.original.onDidChangeViewZones),b=Fo("viewZoneChanged",this._editors.modified.onDidChangeViewZones),C=Fo("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),w=Fo("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);g.add(zt(S=>{var x;_.read(S),b.read(S),C.read(S),w.read(S);const y=d.read(S),I=(x=f==null?void 0:f.diff.read(S))===null||x===void 0?void 0:x.mappings;function E(O,$,K){const oe=K._getViewModel();return oe?O.filter(Le=>Le.length>0).map(Le=>{const he=oe.coordinatesConverter.convertModelPositionToViewPosition(new z(Le.startLineNumber,1)),se=oe.coordinatesConverter.convertModelPositionToViewPosition(new z(Le.endLineNumberExclusive,1)),V=se.lineNumber-he.lineNumber;return new fB(he.lineNumber,se.lineNumber,V,$.toString())}):[]}const R=E((I||[]).map(O=>O.lineRangeMapping.original),y.removeColor,this._editors.original),j=E((I||[]).map(O=>O.lineRangeMapping.modified),y.insertColor,this._editors.modified);m==null||m.setZones(R),v==null||v.setZones(j)})),g.add(zt(S=>{const x=this._rootHeight.read(S),y=this._rootWidth.read(S),I=this._modifiedEditorLayoutInfo.read(S);if(I){const E=Tr.ENTIRE_DIFF_OVERVIEW_WIDTH-2*Tr.ONE_OVERVIEW_WIDTH;m.setLayout({top:0,height:x,right:E+Tr.ONE_OVERVIEW_WIDTH,width:Tr.ONE_OVERVIEW_WIDTH}),v.setLayout({top:0,height:x,right:0,width:Tr.ONE_OVERVIEW_WIDTH});const R=this._editors.modifiedScrollTop.read(S),j=this._editors.modifiedScrollHeight.read(S),O=this._editors.modified.getOption(102),$=new Bp(O.verticalHasArrows?O.arrowSize:0,O.verticalScrollbarSize,0,I.height,j,R);c.setTop($.getSliderPosition()),c.setHeight($.getSliderSize())}else c.setTop(0),c.setHeight(0);u.style.height=x+"px",u.style.left=y-Tr.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",c.setWidth(Tr.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}};gg.ONE_OVERVIEW_WIDTH=15;gg.ENTIRE_DIFF_OVERVIEW_WIDTH=Tr.ONE_OVERVIEW_WIDTH*2;gg=Tr=kfe([Ife(6,Sn)],gg);M("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},p("diffEditor.move.border","The border color for text that got moved in the diff editor."));M("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},p("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor."));M("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},p("diffEditor.unchangedRegionShadow","The color of the shadow around unchanged region widgets."));class yL extends q{constructor(){super(...arguments),this._id=++yL.idCounter,this._onDidDispose=this._register(new W),this.onDidDispose=this._onDidDispose.event}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,i=0){this._targetEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._targetEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._targetEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._targetEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,i){this._targetEditor.trigger(e,t,i)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}}yL.idCounter=0;var Efe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},U5=function(o,e){return function(t,i){e(t,i,o)}};let ZN=class extends q{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,t,i,n,s,r,a){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=i,this._createInnerEditor=s,this._instantiationService=r,this._keybindingService=a,this._onDidContentSizeChange=this._register(new W),this.original=this._register(this._createLeftHandSideEditor(i.editorOptions.get(),n.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(i.editorOptions.get(),n.modifiedEditor||{})),this.modifiedModel=Oi(this.modified.onDidChangeModel,()=>this.modified.getModel()),this.modifiedScrollTop=Oi(this.modified.onDidScrollChange,()=>this.modified.getScrollTop()),this.modifiedScrollHeight=Oi(this.modified.onDidScrollChange,()=>this.modified.getScrollHeight()),this.modifiedSelections=Oi(this.modified.onDidChangeCursorSelection,()=>{var l;return(l=this.modified.getSelections())!==null&&l!==void 0?l:[]}),this.modifiedCursor=Oi(this.modified.onDidChangeCursorPosition,()=>{var l;return(l=this.modified.getPosition())!==null&&l!==void 0?l:new z(1,1)}),this._register(D0({createEmptyChangeSummary:()=>({}),handleChange:(l,d)=>(l.didChange(i.editorOptions)&&Object.assign(d,l.change.changedOptions),!0)},(l,d)=>{i.editorOptions.read(l),this._options.renderSideBySide.read(l),this.modified.updateOptions(this._adjustOptionsForRightHandSide(l,d)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(l,d))}))}_createLeftHandSideEditor(e,t){const i=this._adjustOptionsForLeftHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,i,t);return n.setContextValue("isInDiffLeftEditor",!0),n}_createRightHandSideEditor(e,t){const i=this._adjustOptionsForRightHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,i,t);return n.setContextValue("isInDiffRightEditor",!0),n}_constructInnerEditor(e,t,i,n){const s=this._createInnerEditor(e,t,i,n);return this._register(s.onDidContentSizeChange(r=>{const a=this.original.getContentWidth()+this.modified.getContentWidth()+gg.ENTIRE_DIFF_OVERVIEW_WIDTH,l=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:l,contentWidth:a,contentHeightChanged:r.contentHeightChanged,contentWidthChanged:r.contentWidthChanged})})),s}_adjustOptionsForLeftHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(i.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},i.wordWrapOverride1=this._options.diffWordWrap.get()):(i.wordWrapOverride1="off",i.wordWrapOverride2="off",i.stickyScroll={enabled:!1},i.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),i.glyphMargin=this._options.renderSideBySide.get(),t.originalAriaLabel&&(i.ariaLabel=t.originalAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.readOnly=!this._options.originalEditable.get(),i.dropIntoEditor={enabled:!i.readOnly},i.extraEditorClassName="original-in-monaco-diff-editor",i}_adjustOptionsForRightHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.wordWrapOverride1=this._options.diffWordWrap.get(),i.revealHorizontalRightPadding=Oa.revealHorizontalRightPadding.defaultValue+gg.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",i}_adjustOptionsForSubEditor(e){const t={...e,dimension:{height:0,width:0}};return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar={...t.scrollbar||{}},t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap={...t.minimap||{}},t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){var t;e||(e="");const i=p("diff-aria-navigation-tip"," use {0} to open the accessibility help.",(t=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))===null||t===void 0?void 0:t.getAriaLabel());return this._options.accessibilityVerbose.get()?e+i:e?e.replaceAll(i,""):""}};ZN=Efe([U5(5,qe),U5(6,Xt)],ZN);class Nfe{get editorOptions(){return this._options}constructor(e){this._diffEditorWidth=Pt(this,0),this.couldShowInlineViewBecauseOfSize=rt(this,i=>this._options.read(i).renderSideBySide&&this._diffEditorWidth.read(i)<=this._options.read(i).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=rt(this,i=>this._options.read(i).renderOverviewRuler),this.renderSideBySide=rt(this,i=>this._options.read(i).renderSideBySide&&!(this._options.read(i).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(i))),this.readOnly=rt(this,i=>this._options.read(i).readOnly),this.shouldRenderRevertArrows=rt(this,i=>!(!this._options.read(i).renderMarginRevertIcon||!this.renderSideBySide.read(i)||this.readOnly.read(i))),this.renderIndicators=rt(this,i=>this._options.read(i).renderIndicators),this.enableSplitViewResizing=rt(this,i=>this._options.read(i).enableSplitViewResizing),this.splitViewDefaultRatio=rt(this,i=>this._options.read(i).splitViewDefaultRatio),this.ignoreTrimWhitespace=rt(this,i=>this._options.read(i).ignoreTrimWhitespace),this.maxComputationTimeMs=rt(this,i=>this._options.read(i).maxComputationTime),this.showMoves=rt(this,i=>this._options.read(i).experimental.showMoves&&this.renderSideBySide.read(i)),this.isInEmbeddedEditor=rt(this,i=>this._options.read(i).isInEmbeddedEditor),this.diffWordWrap=rt(this,i=>this._options.read(i).diffWordWrap),this.originalEditable=rt(this,i=>this._options.read(i).originalEditable),this.diffCodeLens=rt(this,i=>this._options.read(i).diffCodeLens),this.accessibilityVerbose=rt(this,i=>this._options.read(i).accessibilityVerbose),this.diffAlgorithm=rt(this,i=>this._options.read(i).diffAlgorithm),this.showEmptyDecorations=rt(this,i=>this._options.read(i).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=rt(this,i=>this._options.read(i).onlyShowAccessibleDiffViewer),this.hideUnchangedRegions=rt(this,i=>this._options.read(i).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=rt(this,i=>this._options.read(i).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=rt(this,i=>this._options.read(i).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=rt(this,i=>this._options.read(i).hideUnchangedRegions.minimumLineCount);const t={...e,...j5(e,ps)};this._options=Pt(this,t)}updateOptions(e){const t=j5(e,this._options.get()),i={...this._options.get(),...e,...t};this._options.set(i,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}}function j5(o,e){var t,i,n,s,r,a,l,d;return{enableSplitViewResizing:Be(o.enableSplitViewResizing,e.enableSplitViewResizing),splitViewDefaultRatio:LG(o.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:Be(o.renderSideBySide,e.renderSideBySide),renderMarginRevertIcon:Be(o.renderMarginRevertIcon,e.renderMarginRevertIcon),maxComputationTime:ah(o.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:ah(o.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:Be(o.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:Be(o.renderIndicators,e.renderIndicators),originalEditable:Be(o.originalEditable,e.originalEditable),diffCodeLens:Be(o.diffCodeLens,e.diffCodeLens),renderOverviewRuler:Be(o.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:Ki(o.diffWordWrap,e.diffWordWrap,["off","on","inherit"]),diffAlgorithm:Ki(o.diffAlgorithm,e.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:Be(o.accessibilityVerbose,e.accessibilityVerbose),experimental:{showMoves:Be((t=o.experimental)===null||t===void 0?void 0:t.showMoves,e.experimental.showMoves),showEmptyDecorations:Be((i=o.experimental)===null||i===void 0?void 0:i.showEmptyDecorations,e.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:Be((s=(n=o.hideUnchangedRegions)===null||n===void 0?void 0:n.enabled)!==null&&s!==void 0?s:(r=o.experimental)===null||r===void 0?void 0:r.collapseUnchangedRegions,e.hideUnchangedRegions.enabled),contextLineCount:ah((a=o.hideUnchangedRegions)===null||a===void 0?void 0:a.contextLineCount,e.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:ah((l=o.hideUnchangedRegions)===null||l===void 0?void 0:l.minimumLineCount,e.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:ah((d=o.hideUnchangedRegions)===null||d===void 0?void 0:d.revealLineCount,e.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:Be(o.isInEmbeddedEditor,e.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:Be(o.onlyShowAccessibleDiffViewer,e.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:ah(o.renderSideBySideInlineBreakpoint,e.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:Be(o.useInlineViewWhenSpaceIsLimited,e.useInlineViewWhenSpaceIsLimited)}}var Tfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},t_=function(o,e){return function(t,i){e(t,i,o)}};let vu=class extends yL{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,t,i,n,s,r,a,l){var d;super(),this._domElement=e,this._parentContextKeyService=n,this._parentInstantiationService=s,this._audioCueService=a,this._editorProgressService=l,this.elements=vi("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[vi("div.noModificationsOverlay@overlay",{style:{position:"absolute",height:"100%",visibility:"hidden"}},[pe("span",{},"No Changes")]),vi("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),vi("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),vi("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModel=Pt(this,void 0),this._shouldDisposeDiffModel=!1,this.onDidChangeModel=ye.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._parentInstantiationService.createChild(new h0([Xe,this._contextKeyService])),this._boundarySashes=Pt(this,void 0),this._accessibleDiffViewerShouldBeVisible=Pt(this,!1),this._accessibleDiffViewerVisible=rt(this,w=>this._options.onlyShowAccessibleDiffViewer.read(w)?!0:this._accessibleDiffViewerShouldBeVisible.read(w)),this._movedBlocksLinesPart=Pt(this,void 0),this._layoutInfo=rt(this,w=>{var S,x,y,I,E;const R=this._rootSizeObserver.width.read(w),j=this._rootSizeObserver.height.read(w),O=(S=this._sash.read(w))===null||S===void 0?void 0:S.sashLeft.read(w),$=O??Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),K=R-$-((y=(x=this._overviewRulerPart.read(w))===null||x===void 0?void 0:x.width)!==null&&y!==void 0?y:0),oe=(E=(I=this._movedBlocksLinesPart.read(w))===null||I===void 0?void 0:I.width.read(w))!==null&&E!==void 0?E:0,Le=$-oe;return this.elements.original.style.width=Le+"px",this.elements.original.style.left="0px",this.elements.modified.style.width=K+"px",this.elements.modified.style.left=$+"px",this._editors.original.layout({width:Le,height:j},!0),this._editors.modified.layout({width:K,height:j},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((w,S)=>w==null?void 0:w.diff.read(S)),this.onDidUpdateDiff=ye.fromObservableLight(this._diffValue),r.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(je(()=>this._domElement.removeChild(this.elements.root))),this._rootSizeObserver=this._register(new hW(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout((d=t.automaticLayout)!==null&&d!==void 0?d:!1),this._options=new Nfe(t),this._register(zt(w=>{this._options.setWidth(this._rootSizeObserver.width.read(w))})),this._contextKeyService.createKey(T.isEmbeddedDiffEditor.key,!1),this._register(PC(T.isEmbeddedDiffEditor,this._contextKeyService,w=>this._options.isInEmbeddedEditor.read(w))),this._register(PC(T.comparingMovedCode,this._contextKeyService,w=>{var S;return!!(!((S=this._diffModel.read(w))===null||S===void 0)&&S.movedTextToCompare.read(w))})),this._register(PC(T.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,w=>this._options.couldShowInlineViewBecauseOfSize.read(w))),this._register(PC(T.hasChanges,this._contextKeyService,w=>{var S,x,y;return((y=(x=(S=this._diffModel.read(w))===null||S===void 0?void 0:S.diff.read(w))===null||x===void 0?void 0:x.mappings.length)!==null&&y!==void 0?y:0)>0})),this._editors=this._register(this._instantiationService.createInstance(ZN,this.elements.original,this.elements.modified,this._options,i,(w,S,x,y)=>this._createInnerEditor(w,S,x,y))),this._overviewRulerPart=fc(this,w=>this._options.renderOverviewRuler.read(w)?this._instantiationService.createInstance(nl(gg,w),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(S=>S.modifiedEditor)):void 0).recomputeInitiallyAndOnChange(this._store),this._sash=fc(this,w=>{const S=this._options.renderSideBySide.read(w);return this.elements.root.classList.toggle("side-by-side",S),S?new gfe(this._options,this.elements.root,{height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((x,y)=>{var I,E;return x-((E=(I=this._overviewRulerPart.read(y))===null||I===void 0?void 0:I.width)!==null&&E!==void 0?E:0)})},this._boundarySashes):void 0}).recomputeInitiallyAndOnChange(this._store);const c=fc(this,w=>this._instantiationService.createInstance(nl(UN,w),this._editors,this._diffModel,this._options)).recomputeInitiallyAndOnChange(this._store);fc(this,w=>this._instantiationService.createInstance(nl(ufe,w),this._editors,this._diffModel,this._options,this)).recomputeInitiallyAndOnChange(this._store);const u=new Set,h=new Set;let g=!1;const f=fc(this,w=>this._instantiationService.createInstance(nl(GN,w),Je(this._domElement),this._editors,this._diffModel,this._options,this,()=>g||c.get().isUpdatingHiddenAreas,u,h)).recomputeInitiallyAndOnChange(this._store),m=rt(this,w=>{const S=f.read(w).viewZones.read(w).orig,x=c.read(w).viewZones.read(w).origViewZones;return S.concat(x)}),v=rt(this,w=>{const S=f.read(w).viewZones.read(w).mod,x=c.read(w).viewZones.read(w).modViewZones;return S.concat(x)});this._register(DS(this._editors.original,m,w=>{g=w},u));let _;this._register(DS(this._editors.modified,v,w=>{g=w,g?_=Ra.capture(this._editors.modified):(_==null||_.restore(this._editors.modified),_=void 0)},h)),this._accessibleDiffViewer=fc(this,w=>this._instantiationService.createInstance(nl(Rc,w),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(S,x)=>this._accessibleDiffViewerShouldBeVisible.set(S,x),this._options.onlyShowAccessibleDiffViewer.map(S=>!S),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((S,x)=>{var y;return(y=S==null?void 0:S.diff.read(x))===null||y===void 0?void 0:y.mappings.map(I=>I.lineRangeMapping)}),this._editors)).recomputeInitiallyAndOnChange(this._store);const b=this._accessibleDiffViewerVisible.map(w=>w?"hidden":"visible");this._register(Zc(this.elements.modified,{visibility:b})),this._register(Zc(this.elements.original,{visibility:b})),this._createDiffEditorContributions(),r.addDiffEditor(this),this._register(x0(this._layoutInfo)),fc(this,w=>new(nl(Yc,w))(this.elements.root,this._diffModel,this._layoutInfo.map(S=>S.originalEditor),this._layoutInfo.map(S=>S.modifiedEditor),this._editors)).recomputeInitiallyAndOnChange(this._store,w=>{this._movedBlocksLinesPart.set(w,void 0)}),this._register(Zc(this.elements.overlay,{width:this._layoutInfo.map((w,S)=>w.originalEditor.width+(this._options.renderSideBySide.read(S)?0:w.modifiedEditor.width)),visibility:rt(w=>{var S,x;return this._options.hideUnchangedRegions.read(w)&&((x=(S=this._diffModel.read(w))===null||S===void 0?void 0:S.diff.read(w))===null||x===void 0?void 0:x.mappings.length)===0?"visible":"hidden"})})),this._register(ye.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,w=>{var S,x;if((w==null?void 0:w.reason)===3){const y=(x=(S=this._diffModel.get())===null||S===void 0?void 0:S.diff.get())===null||x===void 0?void 0:x.mappings.find(I=>I.lineRangeMapping.modified.contains(w.position.lineNumber));y!=null&&y.lineRangeMapping.modified.isEmpty?this._audioCueService.playAudioCue(gt.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):y!=null&&y.lineRangeMapping.original.isEmpty?this._audioCueService.playAudioCue(gt.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):y&&this._audioCueService.playAudioCue(gt.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}));const C=this._diffModel.map(this,(w,S)=>{if(w)return w.diff.read(S)===void 0&&!w.isDiffUpToDate.read(S)});this._register(Qd((w,S)=>{if(C.read(w)===!0){const x=this._editorProgressService.show(!0,1e3);S.add(je(()=>x.done()))}})),this._register(je(()=>{var w;this._shouldDisposeDiffModel&&((w=this._diffModel.get())===null||w===void 0||w.dispose())}))}_createInnerEditor(e,t,i,n){return e.createInstance(Vp,t,i,n)}_createDiffEditorContributions(){const e=Jf.getDiffEditorContributions();for(const t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(i){nt(i)}}get _targetEditor(){return this._editors.modified}getEditorType(){return i0.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var e;const t=this._editors.original.saveViewState(),i=this._editors.modified.saveViewState();return{original:t,modified:i,modelState:(e=this._diffModel.get())===null||e===void 0?void 0:e.serializeState()}}restoreViewState(e){var t;if(e&&e.original&&e.modified){const i=e;this._editors.original.restoreViewState(i.original),this._editors.modified.restoreViewState(i.modified),i.modelState&&((t=this._diffModel.get())===null||t===void 0||t.restoreSerializedState(i.modelState))}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(qN,e,this._options)}getModel(){var e,t;return(t=(e=this._diffModel.get())===null||e===void 0?void 0:e.model)!==null&&t!==void 0?t:null}setModel(e,t){!e&&this._diffModel.get()&&this._accessibleDiffViewer.get().close();const i=e?"model"in e?{model:e,shouldDispose:!1}:{model:this.createViewModel(e),shouldDispose:!0}:void 0;this._diffModel.get()!==(i==null?void 0:i.model)&&_b(t,n=>{var s;Oi.batchEventsGlobally(n,()=>{this._editors.original.setModel(i?i.model.model.original:null),this._editors.modified.setModel(i?i.model.model.modified:null)});const r=this._diffModel.get(),a=this._shouldDisposeDiffModel;this._shouldDisposeDiffModel=(s=i==null?void 0:i.shouldDispose)!==null&&s!==void 0?s:!1,this._diffModel.set(i==null?void 0:i.model,n),a&&(r==null||r.dispose())})}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var e;const t=(e=this._diffModel.get())===null||e===void 0?void 0:e.diff.get();return t?Mfe(t):null}revert(e){var t;if(e.innerChanges){this.revertRangeMappings(e.innerChanges);return}const i=(t=this._diffModel.get())===null||t===void 0?void 0:t.model;i&&this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:i.original.getValueInRange(e.original.toExclusiveRange())}])}revertRangeMappings(e){const t=this._diffModel.get();if(!t||!t.isDiffUpToDate.get())return;const i=e.map(n=>({range:n.modifiedRange,text:t.model.original.getValueInRange(n.originalRange)}));this._editors.modified.executeEdits("diffEditor",i)}_goTo(e){this._editors.modified.setPosition(new z(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){var t,i,n,s;const r=(i=(t=this._diffModel.get())===null||t===void 0?void 0:t.diff.get())===null||i===void 0?void 0:i.mappings;if(!r||r.length===0)return;const a=this._editors.modified.getPosition().lineNumber;let l;e==="next"?l=(n=r.find(d=>d.lineRangeMapping.modified.startLineNumber>a))!==null&&n!==void 0?n:r[0]:l=(s=Nv(r,d=>d.lineRangeMapping.modified.startLineNumber{var t;const i=(t=e.diff.get())===null||t===void 0?void 0:t.mappings;!i||i.length===0||this._goTo(i[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){const e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){var e,t;const i=this._editors.modified.hasWidgetFocus(),n=i?this._editors.modified:this._editors.original,s=i?this._editors.original:this._editors.modified;let r;const a=n.getSelection();if(a){const l=(t=(e=this._diffModel.get())===null||e===void 0?void 0:e.diff.get())===null||t===void 0?void 0:t.mappings.map(d=>i?d.lineRangeMapping.flip():d.lineRangeMapping);if(l){const d=E5(a.getStartPosition(),l),c=E5(a.getEndPosition(),l);r=k.plusRange(d,c)}}return{destination:s,destinationSelection:r}}switchSide(){const{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){const e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){var e;const t=(e=this._diffModel.get())===null||e===void 0?void 0:e.unchangedRegions.get();t&&wi(i=>{for(const n of t)n.collapseAll(i)})}showAllUnchangedRegions(){var e;const t=(e=this._diffModel.get())===null||e===void 0?void 0:e.unchangedRegions.get();t&&wi(i=>{for(const n of t)n.showAll(i)})}};vu=Tfe([t_(3,Xe),t_(4,qe),t_(5,Ot),t_(6,y0),t_(7,Bu)],vu);function Mfe(o){return o.mappings.map(e=>{const t=e.lineRangeMapping;let i,n,s,r,a=t.innerChanges;return t.original.isEmpty?(i=t.original.startLineNumber-1,n=0,a=void 0):(i=t.original.startLineNumber,n=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(s=t.modified.startLineNumber-1,r=0,a=void 0):(s=t.modified.startLineNumber,r=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:i,originalEndLineNumber:n,modifiedStartLineNumber:s,modifiedEndLineNumber:r,charChanges:a==null?void 0:a.map(l=>({originalStartLineNumber:l.originalRange.startLineNumber,originalStartColumn:l.originalRange.startColumn,originalEndLineNumber:l.originalRange.endLineNumber,originalEndColumn:l.originalRange.endColumn,modifiedStartLineNumber:l.modifiedRange.startLineNumber,modifiedStartColumn:l.modifiedRange.startColumn,modifiedEndLineNumber:l.modifiedRange.endLineNumber,modifiedEndColumn:l.modifiedRange.endColumn}))}})}var bR=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_i=function(o,e){return function(t,i){e(t,i,o)}};let Afe=0,K5=!1;function Rfe(o){if(!o){if(K5)return;K5=!0}Aee(o||Ai.document.body)}let IS=class extends Vp{constructor(e,t,i,n,s,r,a,l,d,c,u,h){const g={...t};g.ariaLabel=g.ariaLabel||Yw.editorViewAccessibleLabel,g.ariaLabel=g.ariaLabel+";"+Yw.accessibilityHelpMessage,super(e,g,{},i,n,s,r,l,d,c,u,h),a instanceof Gp?this._standaloneKeybindingService=a:this._standaloneKeybindingService=null,Rfe(g.ariaContainerElement)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++Afe,s=ae.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),q.None;const t=e.id,i=e.label,n=ae.and(ae.equals("editorId",this.getId()),ae.deserialize(e.precondition)),s=e.keybindings,r=ae.and(n,ae.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,d=(g,...f)=>Promise.resolve(e.run(this,...f)),c=new de,u=this.getId()+":"+t;if(c.add(Et.registerCommand(u,d)),a){const g={command:{id:u,title:i},when:n,group:a,order:l};c.add(zn.appendMenuItem(N.EditorContext,g))}if(Array.isArray(s))for(const g of s)c.add(this._standaloneKeybindingService.addDynamicKeybinding(u,g,d,r));const h=new pB(u,i,i,void 0,n,(...g)=>Promise.resolve(e.run(this,...g)),this._contextKeyService);return this._actions.set(t,h),c.add(je(()=>{this._actions.delete(t)})),c}_triggerCommand(e,t){if(this._codeEditorService instanceof zw)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};IS=bR([_i(2,qe),_i(3,Ot),_i(4,Ri),_i(5,Xe),_i(6,Xt),_i(7,Sn),_i(8,sn),_i(9,Zl),_i(10,si),_i(11,Me)],IS);let YN=class extends IS{constructor(e,t,i,n,s,r,a,l,d,c,u,h,g,f,m){const v={...t};CS(c,v,!1);const _=l.registerEditorContainer(e);typeof v.theme=="string"&&l.setTheme(v.theme),typeof v.autoDetectHighContrast<"u"&&l.setAutoDetectHighContrast(!!v.autoDetectHighContrast);const b=v.model;delete v.model,super(e,v,i,n,s,r,a,l,d,u,f,m),this._configurationService=c,this._standaloneThemeService=l,this._register(_);let C;if(typeof b>"u"){const w=g.getLanguageIdByMimeType(v.language)||v.language||Ko;C=bW(h,g,v.value||"",w,void 0),this._ownsModel=!0}else C=b,this._ownsModel=!1;if(this._attachModel(C),C){const w={oldModelUrl:null,newModelUrl:C.uri};this._onDidChangeModel.fire(w)}}dispose(){super.dispose()}updateOptions(e){CS(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};YN=bR([_i(2,qe),_i(3,Ot),_i(4,Ri),_i(5,Xe),_i(6,Xt),_i(7,Jo),_i(8,sn),_i(9,Dt),_i(10,Zl),_i(11,Si),_i(12,bi),_i(13,si),_i(14,Me)],YN);let XN=class extends vu{constructor(e,t,i,n,s,r,a,l,d,c,u,h){const g={...t};CS(l,g,!0);const f=r.registerEditorContainer(e);typeof g.theme=="string"&&r.setTheme(g.theme),typeof g.autoDetectHighContrast<"u"&&r.setAutoDetectHighContrast(!!g.autoDetectHighContrast),super(e,g,{},n,i,s,h,c),this._configurationService=l,this._standaloneThemeService=r,this._register(f)}dispose(){super.dispose()}updateOptions(e){CS(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(IS,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};XN=bR([_i(2,qe),_i(3,Xe),_i(4,Ot),_i(5,Jo),_i(6,sn),_i(7,Dt),_i(8,Sr),_i(9,Bu),_i(10,Xd),_i(11,y0)],XN);function bW(o,e,t,i,n){if(t=t||"",!i){const s=t.indexOf(` -`);let r=t;return s!==-1&&(r=t.substring(0,s)),q5(o,t,e.createByFilepathOrFirstLine(n||null,r),n)}return q5(o,t,e.createById(i),n)}function q5(o,e,t,i){return o.createModel(e,t,i)}class Pfe extends q{constructor(e,t,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new yZ),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new de),this.options=i,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new bb(()=>{var n;return(n=this.toggleMenuActionViewItem)===null||n===void 0?void 0:n.show()},i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new Cr(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,actionViewItemProvider:(n,s)=>{var r;if(n.id===bb.ID)return this.toggleMenuActionViewItem=new eS(n,n.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:Ue.asClassNameArray((r=i.moreIcon)!==null&&r!==void 0?r:ve.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(i.actionViewItemProvider){const a=i.actionViewItemProvider(n,s);if(a)return a}if(n instanceof xp){const a=new eS(n,n.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:n.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return a.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(a),this.disposables.add(this._onDidChangeDropdownVisibility.add(a.onDidChangeVisibility)),a}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();const i=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.forEach(n=>{this.actionBar.push(n,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(n)})})}getKeybindingLabel(e){var t,i,n;const s=this.lookupKeybindings?(i=(t=this.options).getKeyBinding)===null||i===void 0?void 0:i.call(t,e):void 0;return(n=s==null?void 0:s.getLabel())!==null&&n!==void 0?n:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class bb extends Rs{constructor(e,t){t=t||p("moreActions","More Actions..."),super(bb.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}bb.ID="toolbar.toggle.more";var CW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hl=function(o,e){return function(t,i){e(t,i,o)}};let ES=class extends Pfe{constructor(e,t,i,n,s,r,a){super(e,s,{getKeyBinding:d=>{var c;return(c=r.lookupKeybinding(d.id))!==null&&c!==void 0?c:void 0},...t,allowContextMenu:!0,skipTelemetry:typeof(t==null?void 0:t.telemetrySource)=="string"}),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=s,this._sessionDisposables=this._store.add(new de);const l=t==null?void 0:t.telemetrySource;l&&this._store.add(this.actionBar.onDidRun(d=>a.publicLog2("workbenchActionExecuted",{id:d.action.id,from:l})))}setActions(e,t=[],i){var n,s,r;this._sessionDisposables.clear();const a=e.slice(),l=t.slice(),d=[];let c=0;const u=[];let h=!1;if(((n=this._options)===null||n===void 0?void 0:n.hiddenItemStrategy)!==-1)for(let g=0;gv==null?void 0:v.id)),f=this._options.overflowBehavior.maxItems-g.size;let m=0;for(let v=0;v=f&&(a[v]=void 0,u[v]=_))}}EP(a),EP(u),super.setActions(a,Mn.join(u,l)),d.length>0&&this._sessionDisposables.add(J(this.getElement(),"contextmenu",g=>{var f,m,v,_,b;const C=new Pr(Je(this.getElement()),g),w=this.getItemAction(C.target);if(!w)return;C.preventDefault(),C.stopPropagation();let S=!1;if(c===1&&((f=this._options)===null||f===void 0?void 0:f.hiddenItemStrategy)===0){S=!0;for(let I=0;Ithis._menuService.resetHiddenStates(i)}))),this._contextMenuService.showContextMenu({getAnchor:()=>C,getActions:()=>y,menuId:(v=this._options)===null||v===void 0?void 0:v.contextMenu,menuActionOptions:{renderShortTitle:!0,...(_=this._options)===null||_===void 0?void 0:_.menuOptions},skipTelemetry:typeof((b=this._options)===null||b===void 0?void 0:b.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};ES=CW([hl(2,Ba),hl(3,Xe),hl(4,Sr),hl(5,Xt),hl(6,vo)],ES);let QN=class extends ES{constructor(e,t,i,n,s,r,a,l){super(e,{resetMenu:t,...i},n,s,r,a,l),this._onDidChangeMenuItems=this._store.add(new W);const d=this._store.add(n.createMenu(t,s,{emitEventsForSubmenuChanges:!0})),c=()=>{var u,h,g;const f=[],m=[];VA(d,i==null?void 0:i.menuOptions,{primary:f,secondary:m},(u=i==null?void 0:i.toolbarOptions)===null||u===void 0?void 0:u.primaryGroup,(h=i==null?void 0:i.toolbarOptions)===null||h===void 0?void 0:h.shouldInlineSubmenu,(g=i==null?void 0:i.toolbarOptions)===null||g===void 0?void 0:g.useSeparatorsInPrimaryActions),e.classList.toggle("has-no-actions",f.length===0&&m.length===0),super.setActions(f,m)};this._store.add(d.onDidChange(()=>{c(),this._onDidChangeMenuItems.fire(this)})),c()}setActions(){throw new Ci("This toolbar is populated from a menu.")}};QN=CW([hl(3,Ba),hl(4,Xe),hl(5,Sr),hl(6,Xt),hl(7,vo)],QN);class Ofe extends tg{constructor(e){super(),this._getContext=e}runAction(e,t){return super.runAction(e,this._getContext())}}var Ffe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Bfe=function(o,e){return function(t,i){e(t,i,o)}};class Wfe{constructor(e){this.viewModel=e}getId(){return this.viewModel}}let NS=class extends q{constructor(e,t,i,n){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=i,this._instantiationService=n,this._viewModel=Pt(this,void 0),this._collapsed=rt(this,r=>{var a;return(a=this._viewModel.read(r))===null||a===void 0?void 0:a.collapsed.read(r)}),this._contentHeight=Pt(this,500),this.height=rt(this,r=>(this._collapsed.read(r)?0:this._contentHeight.read(r))+this._outerEditorHeight),this._modifiedContentWidth=Pt(this,0),this._modifiedWidth=Pt(this,0),this._originalContentWidth=Pt(this,0),this._originalWidth=Pt(this,0),this.maxScroll=rt(this,r=>{const a=this._modifiedContentWidth.read(r)-this._modifiedWidth.read(r),l=this._originalContentWidth.read(r)-this._originalWidth.read(r);return a>l?{maxScroll:a,width:this._modifiedWidth.read(r)}:{maxScroll:l,width:this._originalWidth.read(r)}}),this._elements=vi("div.multiDiffEntry",[vi("div.content",{style:{display:"flex",flexDirection:"column",flex:"1",overflow:"hidden"}},[vi("div.header@header",[vi("div.collapse-button@collapseButton"),vi("div.title.show-file-icons@title",[]),vi("div.actions@actions")]),vi("div.editorParent",{style:{flex:"1",display:"flex",flexDirection:"column"}},[vi("div.editorContainer@editor",{style:{flex:"1"}})])])]),this.editor=this._register(this._instantiationService.createInstance(vu,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=G5(this.editor.getModifiedEditor()),this.isOriginalFocused=G5(this.editor.getOriginalEditor()),this.isFocused=rt(this,r=>this.isModifedFocused.read(r)||this.isOriginalFocused.read(r)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.title)):void 0,this._dataStore=new de,this._headerHeight=this._elements.header.clientHeight;const s=new mS(this._elements.collapseButton,{});this._register(zt(r=>{s.element.className="",s.icon=this._collapsed.read(r)?ve.chevronRight:ve.chevronDown})),this._register(s.onDidClick(()=>{var r;(r=this._viewModel.get())===null||r===void 0||r.collapsed.set(!this._collapsed.get(),void 0)})),this._register(zt(r=>{this._elements.editor.style.display=this._collapsed.read(r)?"none":"block"})),this.editor.getModifiedEditor().onDidLayoutChange(r=>{const a=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(a,void 0)}),this.editor.getOriginalEditor().onDidLayoutChange(r=>{const a=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(a,void 0)}),this._register(this.editor.onDidContentSizeChange(r=>{B1(a=>{this._contentHeight.set(r.contentHeight,a),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),a),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),a)})})),this._register(zt(r=>{const a=this.isFocused.read(r);this._elements.root.classList.toggle("focused",a)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=38,this._register(this._instantiationService.createInstance(QN,this._elements.actions,N.MultiDiffEditorFileToolbar,{actionRunner:this._register(new Ofe(()=>{var r,a;return(a=(r=this._viewModel.get())===null||r===void 0?void 0:r.diffEditorViewModel)===null||a===void 0?void 0:a.model.modified.uri})),menuOptions:{shouldForwardArgs:!0}}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){function t(n){return{...n,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0}}const i=e.viewModel.entry.value;i.onOptionsDidChange&&this._dataStore.add(i.onOptionsDidChange(()=>{var n;this.editor.updateOptions(t((n=i.options)!==null&&n!==void 0?n:{}))})),B1(n=>{var s,r;(s=this._resourceLabel)===null||s===void 0||s.setUri(e.viewModel.diffEditorViewModel.model.modified.uri),this._dataStore.clear(),this._viewModel.set(e.viewModel,n),this.editor.setModel(e.viewModel.diffEditorViewModel,n),this.editor.updateOptions(t((r=i.options)!==null&&r!==void 0?r:{}))})}render(e,t,i,n){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${t}px`,this._elements.root.style.position="absolute";const s=Math.max(0,Math.min(e.length-this._headerHeight,n.start-e.start));this._elements.header.style.transform=`translateY(${s}px)`,B1(r=>{this.editor.layout({width:t,height:e.length-this._outerEditorHeight})}),this.editor.getOriginalEditor().setScrollTop(i),this._elements.header.classList.toggle("shadow",s>0||i>0)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};NS=Ffe([Bfe(3,qe)],NS);function G5(o){return Oi(e=>{const t=new de;return t.add(o.onDidFocusEditorWidget(()=>e(!0))),t.add(o.onDidBlurEditorWidget(()=>e(!1))),t},()=>o.hasWidgetFocus())}class Vfe{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){var t;let i;if(this._unused.size===0)i=this._create(e),this._itemData.set(i,e);else{const n=[...this._unused.values()];i=(t=n.find(s=>this._itemData.get(s).getId()===e.getId()))!==null&&t!==void 0?t:n[0],this._unused.delete(i),this._itemData.set(i,e),i.setData(e)}return this._used.add(i),{object:i,dispose:()=>{this._used.delete(i),this._unused.size>5?i.dispose():this._unused.add(i)}}}dispose(){for(const e of this._used)e.dispose();for(const e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}var Hfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Z5=function(o,e){return function(t,i){e(t,i,o)}};let JN=class extends q{constructor(e,t,i,n,s,r){super(),this._element=e,this._dimension=t,this._viewModel=i,this._workbenchUIElementFactory=n,this._parentContextKeyService=s,this._parentInstantiationService=r,this._elements=vi("div",{style:{overflowY:"hidden"}},[vi("div@content",{style:{overflow:"hidden"}}),vi("div.monaco-editor@overflowWidgetsDomNode",{})]),this._sizeObserver=this._register(new hW(this._element,void 0)),this._objectPool=this._register(new Vfe(l=>{const d=this._instantiationService.createInstance(NS,this._elements.content,this._elements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return d.setData(l),d})),this._scrollable=this._register(new bm({forceIntegerValues:!1,scheduleAtNextAnimationFrame:l=>po(Je(this._element),l),smoothScrollDuration:100})),this._scrollableElement=this._register(new Vy(this._elements.root,{vertical:1,horizontal:1,className:"monaco-component",useShadows:!1},this._scrollable)),this.scrollTop=Oi(this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=Oi(this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItems=Dm(this,(l,d)=>{const c=this._viewModel.read(l);return c?c.items.read(l).map(h=>d.add(new zfe(h,this._objectPool,this.scrollLeft))):[]}),this._totalHeight=this._viewItems.map(this,(l,d)=>l.reduce((c,u)=>c+u.contentHeight.read(d),0)),this.activeDiffItem=rt(this,l=>this._viewItems.read(l).find(d=>{var c;return(c=d.template.read(l))===null||c===void 0?void 0:c.isFocused.read(l)})),this.lastActiveDiffItem=$ge((l,d)=>{var c;return(c=this.activeDiffItem.read(l))!==null&&c!==void 0?c:d}),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._parentInstantiationService.createChild(new h0([Xe,this._contextKeyService])),this._contextKeyService.createKey(T.inMultiDiffEditor.key,!0);const a=this._parentContextKeyService.createKey(T.multiDiffEditorAllCollapsed.key,!1);this._register(zt(l=>{const d=this._viewModel.read(l);if(d){const c=d.items.read(l).every(u=>u.collapsed.read(l));a.set(c)}})),this._register(zt(l=>{const d=this.lastActiveDiffItem.read(l);wi(c=>{var u;(u=this._viewModel.read(l))===null||u===void 0||u.activeDiffItem.set(d==null?void 0:d.viewModel,c)})})),this._register(zt(l=>{const d=this._dimension.read(l);this._sizeObserver.observe(d)})),this._elements.content.style.position="relative",this._register(zt(l=>{const d=this._sizeObserver.height.read(l);this._elements.root.style.height=`${d}px`;const c=this._totalHeight.read(l);this._elements.content.style.height=`${c}px`;const u=this._sizeObserver.width.read(l);let h=u;const g=this._viewItems.read(l),f=RM(g,m=>m.maxScroll.read(l).maxScroll);if(f){const m=f.maxScroll.read(l);h=u+m.maxScroll}this._scrollableElement.setScrollDimensions({width:u,height:d,scrollHeight:c,scrollWidth:h})})),e.replaceChildren(this._scrollableElement.getDomNode()),this._register(je(()=>{e.replaceChildren()})),this._register(this._register(zt(l=>{B1(d=>{this.render(l)})})))}render(e){const t=this.scrollTop.read(e);let i=0,n=0,s=0;const r=this._sizeObserver.height.read(e),a=ut.ofStartAndLength(t,r),l=this._sizeObserver.width.read(e);for(const d of this._viewItems.read(e)){const c=d.contentHeight.read(e),u=Math.min(c,r),h=ut.ofStartAndLength(n,u),g=ut.ofStartAndLength(s,c);if(g.isBefore(a))i-=c-u,d.hide();else if(g.isAfter(a))d.hide();else{const f=Math.max(0,Math.min(a.start-g.start,c-u));i-=f;const m=ut.ofStartAndLength(t+i,r);d.render(h,f,l,m)}n+=u,s+=c}this._elements.content.style.transform=`translateY(${-(t+i)}px)`}};JN=Hfe([Z5(4,Xe),Z5(5,qe)],JN);class zfe extends q{constructor(e,t,i){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=i,this._lastTemplateData=Pt(this,{contentHeight:500,maxScroll:{maxScroll:0,width:0}}),this._templateRef=this._register(wS(this,void 0)),this.contentHeight=rt(this,n=>{var s,r,a;return(a=(r=(s=this._templateRef.read(n))===null||s===void 0?void 0:s.object.height)===null||r===void 0?void 0:r.read(n))!==null&&a!==void 0?a:this._lastTemplateData.read(n).contentHeight}),this.maxScroll=rt(this,n=>{var s,r;return(r=(s=this._templateRef.read(n))===null||s===void 0?void 0:s.object.maxScroll.read(n))!==null&&r!==void 0?r:this._lastTemplateData.read(n).maxScroll}),this.template=rt(this,n=>{var s;return(s=this._templateRef.read(n))===null||s===void 0?void 0:s.object}),this._isHidden=Pt(this,!1),this._register(zt(n=>{var s;const r=this._scrollLeft.read(n);(s=this._templateRef.read(n))===null||s===void 0||s.object.setScrollLeft(r)})),this._register(zt(n=>{const s=this._templateRef.read(n);!s||!this._isHidden.read(n)||s.object.isFocused.read(n)||wi(l=>{this._lastTemplateData.set({contentHeight:s.object.height.get(),maxScroll:{maxScroll:0,width:0}},l),s.object.hide(),this._templateRef.set(void 0,l)})}))}dispose(){this.hide(),super.dispose()}toString(){return`VirtualViewItem(${this.viewModel.entry.value.title})`}hide(){this._isHidden.set(!0,void 0)}render(e,t,i,n){this._isHidden.set(!1,void 0);let s=this._templateRef.get();s||(s=this._objectPool.getUnusedObj(new Wfe(this.viewModel)),this._templateRef.set(s,void 0)),s.object.render(e,i,t,n)}}M("multiDiffEditor.headerBackground",{dark:"#808080",light:"#b4b4b4",hcDark:"#808080",hcLight:"#b4b4b4"},p("multiDiffEditor.headerBackground","The background color of the diff editor's header"));var $fe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ufe=function(o,e){return function(t,i){e(t,i,o)}};let eT=class extends q{constructor(e,t,i){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=i,this._dimension=Pt(this,void 0),this._viewModel=Pt(this,void 0),this._widgetImpl=Dm(this,(n,s)=>(nl(NS,n),s.add(this._instantiationService.createInstance(nl(JN,n),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory)))),this._register(x0(this._widgetImpl))}};eT=$fe([Ufe(2,qe)],eT);function jfe(o,e,t){return Ge.initialize(t||{}).createInstance(YN,o,e)}function Kfe(o){return Ge.get(Ot).onCodeEditorAdd(t=>{o(t)})}function qfe(o){return Ge.get(Ot).onDiffEditorAdd(t=>{o(t)})}function Gfe(){return Ge.get(Ot).listCodeEditors()}function Zfe(){return Ge.get(Ot).listDiffEditors()}function Yfe(o,e,t){return Ge.initialize(t||{}).createInstance(XN,o,e)}function Xfe(o,e){const t=Ge.initialize(e||{});return new eT(o,{},t)}function Qfe(o){if(typeof o.id!="string"||typeof o.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return Et.registerCommand(o.id,o.run)}function Jfe(o){if(typeof o.id!="string"||typeof o.label!="string"||typeof o.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const e=ae.deserialize(o.precondition),t=(n,...s)=>Rn.runEditorCommand(n,s,e,(r,a,l)=>Promise.resolve(o.run(a,...l))),i=new de;if(i.add(Et.registerCommand(o.id,t)),o.contextMenuGroupId){const n={command:{id:o.id,title:o.label},when:e,group:o.contextMenuGroupId,order:o.contextMenuOrder||0};i.add(zn.appendMenuItem(N.EditorContext,n))}if(Array.isArray(o.keybindings)){const n=Ge.get(Xt);if(!(n instanceof Gp))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const s=ae.and(e,ae.deserialize(o.keybindingContext));i.add(n.addDynamicKeybindings(o.keybindings.map(r=>({keybinding:r,command:o.id,when:s}))))}}return i}function epe(o){return wW([o])}function wW(o){const e=Ge.get(Xt);return e instanceof Gp?e.addDynamicKeybindings(o.map(t=>({keybinding:t.keybinding,command:t.command,commandArgs:t.commandArgs,when:ae.deserialize(t.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),q.None)}function tpe(o,e,t){const i=Ge.get(bi),n=i.getLanguageIdByMimeType(e)||e;return bW(Ge.get(Si),i,o,n,t)}function ipe(o,e){const t=Ge.get(bi),i=t.getLanguageIdByMimeType(e)||e||Ko;o.setLanguage(t.createById(i))}function npe(o,e,t){o&&Ge.get(Yl).changeOne(e,o.uri,t)}function spe(o){Ge.get(Yl).changeAll(o,[])}function ope(o){return Ge.get(Yl).read(o)}function rpe(o){return Ge.get(Yl).onMarkerChanged(o)}function ape(o){return Ge.get(Si).getModel(o)}function lpe(){return Ge.get(Si).getModels()}function dpe(o){return Ge.get(Si).onModelAdded(o)}function cpe(o){return Ge.get(Si).onModelRemoved(o)}function upe(o){return Ge.get(Si).onModelLanguageChanged(t=>{o({model:t.model,oldLanguage:t.oldLanguageId})})}function hpe(o){return aee(Ge.get(Si),Ge.get(si),o)}function gpe(o,e){const t=Ge.get(bi),i=Ge.get(Jo);return zM.colorizeElement(i,t,o,e).then(()=>{i.registerEditorContainer(o)})}function fpe(o,e,t){const i=Ge.get(bi);return Ge.get(Jo).registerEditorContainer(Ai.document.body),zM.colorize(i,o,e,t)}function ppe(o,e,t=4){return Ge.get(Jo).registerEditorContainer(Ai.document.body),zM.colorizeModelLine(o,e,t)}function mpe(o){const e=Ei.get(o);return e||{getInitialState:()=>Tp,tokenize:(t,i,n)=>WM(o,n)}}function _pe(o,e){Ei.getOrCreate(e);const t=mpe(e),i=Rl(o),n=[];let s=t.getInitialState();for(let r=0,a=i.length;r{var s;if(!i)return null;const r=(s=t.options)===null||s===void 0?void 0:s.selection;let a;return r&&typeof r.endLineNumber=="number"&&typeof r.endColumn=="number"?a=r:r&&(a={lineNumber:r.startLineNumber,column:r.startColumn}),await o.openCodeEditor(i,t.resource,a)?i:null})}function Lpe(){return{create:jfe,getEditors:Gfe,getDiffEditors:Zfe,onDidCreateEditor:Kfe,onDidCreateDiffEditor:qfe,createDiffEditor:Yfe,addCommand:Qfe,addEditorAction:Jfe,addKeybindingRule:epe,addKeybindingRules:wW,createModel:tpe,setModelLanguage:ipe,setModelMarkers:npe,getModelMarkers:ope,removeAllMarkers:spe,onDidChangeMarkers:rpe,getModels:lpe,getModel:ape,onDidCreateModel:dpe,onWillDisposeModel:cpe,onDidChangeModelLanguage:upe,createWebWorker:hpe,colorizeElement:gpe,colorize:fpe,colorizeModelLine:ppe,tokenize:_pe,defineTheme:vpe,setTheme:bpe,remeasureFonts:Cpe,registerCommand:wpe,registerLinkOpener:Spe,registerEditorOpener:ype,AccessibilitySupport:zk,ContentWidgetPositionPreference:Gk,CursorChangeReason:Zk,DefaultEndOfLine:Yk,EditorAutoIndentStrategy:Qk,EditorOption:Jk,EndOfLinePreference:eI,EndOfLineSequence:tI,MinimapPosition:cI,MouseTargetType:uI,OverlayWidgetPositionPreference:hI,OverviewRulerLane:gI,GlyphMarginLane:iI,RenderLineNumbersType:pI,RenderMinimap:mI,ScrollbarVisibility:vI,ScrollType:_I,TextEditorCursorBlinkingStyle:LI,TextEditorCursorStyle:DI,TrackedRangeStickiness:xI,WrappingIndent:kI,InjectedTextCursorStops:sI,PositionAffinity:fI,ShowAiIconMode:CI,ConfigurationChangedEvent:Z9,BareFontInfo:Fh,FontInfo:NI,TextModelResolvedOptions:b1,FindMatch:Ev,ApplyUpdateResult:P_,EditorZoom:sr,createMultiFileDiffEditor:Xfe,EditorType:i0,EditorOptions:Oa}}function Dpe(o,e){if(!e||!Array.isArray(e))return!1;for(const t of e)if(!o(t))return!1;return!0}function OC(o,e){return typeof o=="boolean"?o:e}function Y5(o,e){return typeof o=="string"?o:e}function xpe(o){const e={};for(const t of o)e[t]=!0;return e}function X5(o,e=!1){e&&(o=o.map(function(i){return i.toLowerCase()}));const t=xpe(o);return e?function(i){return t[i.toLowerCase()]!==void 0&&t.hasOwnProperty(i.toLowerCase())}:function(i){return t[i]!==void 0&&t.hasOwnProperty(i)}}function tT(o,e){e=e.replace(/@@/g,"");let t=0,i;do i=!1,e=e.replace(/@(\w+)/g,function(s,r){i=!0;let a="";if(typeof o[r]=="string")a=o[r];else if(o[r]&&o[r]instanceof RegExp)a=o[r].source;else throw o[r]===void 0?hi(o,"language definition does not contain attribute '"+r+"', used at: "+e):hi(o,"attribute reference '"+r+"' must be a string, used at: "+e);return pf(a)?"":"(?:"+a+")"}),t++;while(i&&t<5);e=e.replace(/\x01/g,"@");const n=(o.ignoreCase?"i":"")+(o.unicode?"u":"");return new RegExp(e,n)}function kpe(o,e,t,i){if(i<0)return o;if(i=100){i=i-100;const n=t.split(".");if(n.unshift(t),i=0&&(i.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")i.bracket=1;else if(t.bracket==="@close")i.bracket=-1;else throw hi(o,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw hi(o,"the next state must be a string value in rule: "+e);{let n=t.next;if(!/^(@pop|@push|@popall)$/.test(n)&&(n[0]==="@"&&(n=n.substr(1)),n.indexOf("$")<0&&!xee(o,vc(o,n,"",[],""))))throw hi(o,"the next state '"+t.next+"' is not defined in rule: "+e);i.next=n}}return typeof t.goBack=="number"&&(i.goBack=t.goBack),typeof t.switchTo=="string"&&(i.switchTo=t.switchTo),typeof t.log=="string"&&(i.log=t.log),typeof t.nextEmbedded=="string"&&(i.nextEmbedded=t.nextEmbedded,o.usesEmbedded=!0),i}}else if(Array.isArray(t)){const i=[];for(let n=0,s=t.length;n0&&i[0]==="^",this.name=this.name+": "+i,this.regex=tT(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=iT(e,this.name,t)}}function SW(o,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");const t={};t.languageId=o,t.includeLF=OC(e.includeLF,!1),t.noThrow=!1,t.maxStack=100,t.start=typeof e.start=="string"?e.start:null,t.ignoreCase=OC(e.ignoreCase,!1),t.unicode=OC(e.unicode,!1),t.tokenPostfix=Y5(e.tokenPostfix,"."+t.languageId),t.defaultToken=Y5(e.defaultToken,"source"),t.usesEmbedded=!1;const i=e;i.languageId=o,i.includeLF=t.includeLF,i.ignoreCase=t.ignoreCase,i.unicode=t.unicode,i.noThrow=t.noThrow,i.usesEmbedded=t.usesEmbedded,i.stateNames=e.tokenizer,i.defaultToken=t.defaultToken;function n(r,a,l){for(const d of l){let c=d.include;if(c){if(typeof c!="string")throw hi(t,"an 'include' attribute must be a string at: "+r);if(c[0]==="@"&&(c=c.substr(1)),!e.tokenizer[c])throw hi(t,"include target '"+c+"' is not defined at: "+r);n(r+"."+c,a,e.tokenizer[c])}else{const u=new Epe(r);if(Array.isArray(d)&&d.length>=1&&d.length<=3)if(u.setRegex(i,d[0]),d.length>=3)if(typeof d[1]=="string")u.setAction(i,{token:d[1],next:d[2]});else if(typeof d[1]=="object"){const h=d[1];h.next=d[2],u.setAction(i,h)}else throw hi(t,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+r);else u.setAction(i,d[1]);else{if(!d.regex)throw hi(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+r);d.name&&typeof d.name=="string"&&(u.name=d.name),d.matchOnlyAtStart&&(u.matchOnlyAtLineStart=OC(d.matchOnlyAtLineStart,!1)),u.setRegex(i,d.regex),u.setAction(i,d.action)}a.push(u)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw hi(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(const r in e.tokenizer)if(e.tokenizer.hasOwnProperty(r)){t.start||(t.start=r);const a=e.tokenizer[r];t.tokenizer[r]=new Array,n("tokenizer."+r,t.tokenizer[r],a)}if(t.usesEmbedded=i.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw hi(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const s=[];for(const r of e.brackets){let a=r;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw hi(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+` - hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:$c(t,a.open),close:$c(t,a.close)});else throw hi(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}function Npe(o){Ip.registerLanguage(o)}function Tpe(){let o=[];return o=o.concat(Ip.getLanguages()),o}function Mpe(o){return Ge.get(bi).languageIdCodec.encodeLanguageId(o)}function Ape(o,e){return Ge.withServices(()=>{const i=Ge.get(bi).onDidRequestRichLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function Rpe(o,e){return Ge.withServices(()=>{const i=Ge.get(bi).onDidRequestBasicLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function Ppe(o,e){if(!Ge.get(bi).isRegisteredLanguageId(o))throw new Error(`Cannot set configuration for unknown language ${o}`);return Ge.get(si).register(o,e,100)}class Ope{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if(typeof this._actual.tokenize=="function")return Cb.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new ly(n.tokens,n.endState)}}class Cb{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let s=0,r=e.length;s0&&s[r-1]===h)continue;let g=u.startIndex;d===0?g=0:g{const i=await Promise.resolve(e.create());return i?Fpe(i)?LW(o,i):new Ov(Ge.get(bi),Ge.get(Jo),o,SW(o,i),Ge.get(Dt)):null});return Ei.registerFactory(o,t)}function Vpe(o,e){if(!Ge.get(bi).isRegisteredLanguageId(o))throw new Error(`Cannot set tokens provider for unknown language ${o}`);return yW(e)?CR(o,{create:()=>e}):Ei.register(o,LW(o,e))}function Hpe(o,e){const t=i=>new Ov(Ge.get(bi),Ge.get(Jo),o,SW(o,i),Ge.get(Dt));return yW(e)?CR(o,{create:()=>e}):Ei.register(o,t(e))}function zpe(o,e){return Ge.get(Me).referenceProvider.register(o,e)}function $pe(o,e){return Ge.get(Me).renameProvider.register(o,e)}function Upe(o,e){return Ge.get(Me).signatureHelpProvider.register(o,e)}function jpe(o,e){return Ge.get(Me).hoverProvider.register(o,{provideHover:(i,n,s)=>{const r=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s)).then(a=>{if(a)return!a.range&&r&&(a.range=new k(n.lineNumber,r.startColumn,n.lineNumber,r.endColumn)),a.range||(a.range=new k(n.lineNumber,n.column,n.lineNumber,n.column)),a})}})}function Kpe(o,e){return Ge.get(Me).documentSymbolProvider.register(o,e)}function qpe(o,e){return Ge.get(Me).documentHighlightProvider.register(o,e)}function Gpe(o,e){return Ge.get(Me).linkedEditingRangeProvider.register(o,e)}function Zpe(o,e){return Ge.get(Me).definitionProvider.register(o,e)}function Ype(o,e){return Ge.get(Me).implementationProvider.register(o,e)}function Xpe(o,e){return Ge.get(Me).typeDefinitionProvider.register(o,e)}function Qpe(o,e){return Ge.get(Me).codeLensProvider.register(o,e)}function Jpe(o,e,t){return Ge.get(Me).codeActionProvider.register(o,{providedCodeActionKinds:t==null?void 0:t.providedCodeActionKinds,documentation:t==null?void 0:t.documentation,provideCodeActions:(n,s,r,a)=>{const d=Ge.get(Yl).read({resource:n.uri}).filter(c=>k.areIntersectingOrTouching(c,s));return e.provideCodeActions(n,s,{markers:d,only:r.only,trigger:r.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function eme(o,e){return Ge.get(Me).documentFormattingEditProvider.register(o,e)}function tme(o,e){return Ge.get(Me).documentRangeFormattingEditProvider.register(o,e)}function ime(o,e){return Ge.get(Me).onTypeFormattingEditProvider.register(o,e)}function nme(o,e){return Ge.get(Me).linkProvider.register(o,e)}function sme(o,e){return Ge.get(Me).completionProvider.register(o,e)}function ome(o,e){return Ge.get(Me).colorProvider.register(o,e)}function rme(o,e){return Ge.get(Me).foldingRangeProvider.register(o,e)}function ame(o,e){return Ge.get(Me).declarationProvider.register(o,e)}function lme(o,e){return Ge.get(Me).selectionRangeProvider.register(o,e)}function dme(o,e){return Ge.get(Me).documentSemanticTokensProvider.register(o,e)}function cme(o,e){return Ge.get(Me).documentRangeSemanticTokensProvider.register(o,e)}function ume(o,e){return Ge.get(Me).inlineCompletionsProvider.register(o,e)}function hme(o,e){return Ge.get(Me).inlayHintsProvider.register(o,e)}function gme(){return{register:Npe,getLanguages:Tpe,onLanguage:Ape,onLanguageEncountered:Rpe,getEncodedLanguageId:Mpe,setLanguageConfiguration:Ppe,setColorMap:Wpe,registerTokensProviderFactory:CR,setTokensProvider:Vpe,setMonarchTokensProvider:Hpe,registerReferenceProvider:zpe,registerRenameProvider:$pe,registerCompletionItemProvider:sme,registerSignatureHelpProvider:Upe,registerHoverProvider:jpe,registerDocumentSymbolProvider:Kpe,registerDocumentHighlightProvider:qpe,registerLinkedEditingRangeProvider:Gpe,registerDefinitionProvider:Zpe,registerImplementationProvider:Ype,registerTypeDefinitionProvider:Xpe,registerCodeLensProvider:Qpe,registerCodeActionProvider:Jpe,registerDocumentFormattingEditProvider:eme,registerDocumentRangeFormattingEditProvider:tme,registerOnTypeFormattingEditProvider:ime,registerLinkProvider:nme,registerColorProvider:ome,registerFoldingRangeProvider:rme,registerDeclarationProvider:ame,registerSelectionRangeProvider:lme,registerDocumentSemanticTokensProvider:dme,registerDocumentRangeSemanticTokensProvider:cme,registerInlineCompletionsProvider:ume,registerInlayHintsProvider:hme,DocumentHighlightKind:Xk,CompletionItemKind:jk,CompletionItemTag:Kk,CompletionItemInsertTextRule:Uk,SymbolKind:SI,SymbolTag:yI,IndentAction:nI,CompletionTriggerKind:qk,SignatureHelpTriggerKind:wI,InlayHintKind:oI,InlineCompletionTriggerKind:rI,CodeActionTriggerType:$k,FoldingRangeKind:Ts,SelectedSuggestionInfo:c7}}const wR=bt("IEditorCancelService"),DW=new De("cancellableOperation",!1,p("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));xt(wR,class{constructor(){this._tokens=new WeakMap}add(o,e){let t=this._tokens.get(o);t||(t=o.invokeWithinContext(n=>{const s=DW.bindTo(n.get(Xe)),r=new Ns;return{key:s,tokens:r}}),this._tokens.set(o,t));let i;return t.key.set(!0),i=t.tokens.push(e),()=>{i&&(i(),t.key.set(!t.tokens.isEmpty()),i=void 0)}}cancel(o){const e=this._tokens.get(o);if(!e)return;const t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},1);class fme extends tn{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(i=>i.get(wR).add(e,this))}dispose(){this._unregister(),super.dispose()}}we(new class extends Rn{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:DW})}runEditorCommand(o,e){o.get(wR).cancel(e)}});let xW=class nT{constructor(e,t){if(this.flags=t,this.flags&1){const i=e.getModel();this.modelVersionId=i?Xh("{0}#{1}",i.uri.toString(),i.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=e.getPosition():this.position=null,this.flags&2?this.selection=e.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof nT))return!1;const t=e;return!(this.modelVersionId!==t.modelVersionId||this.scrollLeft!==t.scrollLeft||this.scrollTop!==t.scrollTop||!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position)||!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new nT(e,this.flags))}};class bu extends fme{constructor(e,t,i,n){super(e,n),this._listener=new de,t&4&&this._listener.add(e.onDidChangeCursorPosition(s=>{(!i||!k.containsPosition(i,s.position))&&this.cancel()})),t&2&&this._listener.add(e.onDidChangeCursorSelection(s=>{(!i||!k.containsRange(i,s.selection))&&this.cancel()})),t&8&&this._listener.add(e.onDidScrollChange(s=>this.cancel())),t&1&&(this._listener.add(e.onDidChangeModel(s=>this.cancel())),this._listener.add(e.onDidChangeModelContent(s=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class SR extends tn{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}function $l(o){return o&&typeof o.getEditorType=="function"?o.getEditorType()===i0.ICodeEditor:!1}function yR(o){return o&&typeof o.getEditorType=="function"?o.getEditorType()===i0.IDiffEditor:!1}function pme(o){return!!o&&typeof o=="object"&&typeof o.onDidChangeActiveEditor=="function"}function kW(o){return $l(o)?o:yR(o)?o.getModifiedEditor():pme(o)&&$l(o.activeCodeEditor)?o.activeCodeEditor:null}class Xp{static _handleEolEdits(e,t){let i;const n=[];for(const s of t)typeof s.eol=="number"&&(i=s.eol),s.range&&typeof s.text=="string"&&n.push(s);return typeof i=="number"&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const n=Ra.capture(e),s=Xp._handleEolEdits(e,t);s.length===1&&Xp._isFullModelReplaceEdit(e,s[0])?e.executeEdits("formatEditsCommand",s.map(r=>Li.replace(k.lift(r.range),r.text))):e.executeEdits("formatEditsCommand",s.map(r=>Li.replaceMove(k.lift(r.range),r.text))),i&&e.pushUndoStop(),n.restoreRelativeVerticalPositionOfCursor(e)}}class Q5{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}class mme{constructor(e){if(this._set=new Set,e)for(const t of e)this.add(t)}add(e){this._set.add(Q5.toKey(e))}has(e){return this._set.has(Q5.toKey(e))}}function IW(o,e,t){const i=[],n=new mme,s=o.ordered(t);for(const a of s)i.push(a),a.extensionId&&n.add(a.extensionId);const r=e.ordered(t);for(const a of r){if(a.extensionId){if(n.has(a.extensionId))continue;n.add(a.extensionId)}i.push({displayName:a.displayName,extensionId:a.extensionId,provideDocumentFormattingEdits(l,d,c){return a.provideDocumentRangeFormattingEdits(l,l.getFullModelRange(),d,c)}})}return i}class fg{static setFormatterSelector(e){return{dispose:fg._selectors.unshift(e)}}static async select(e,t,i){if(e.length===0)return;const n=wt.first(fg._selectors);if(n)return await n(e,t,i)}}fg._selectors=new Ns;async function EW(o,e,t,i,n,s,r){const a=o.get(qe),{documentRangeFormattingEditProvider:l}=o.get(Me),d=$l(e)?e.getModel():e,c=l.ordered(d),u=await fg.select(c,d,i);u&&(n.report(u),await a.invokeFunction(_me,u,e,t,s,r))}async function _me(o,e,t,i,n,s){var r,a;const l=o.get(Qr),d=o.get(bo),c=o.get(Py);let u,h;$l(t)?(u=t.getModel(),h=new bu(t,5,void 0,n)):(u=t,h=new SR(t,n));const g=[];let f=0;for(const C of Z2(i).sort(k.compareRangesUsingStarts))f>0&&k.areIntersectingOrTouching(g[f-1],C)?g[f-1]=k.fromPositions(g[f-1].getStartPosition(),C.getEndPosition()):f=g.push(C);const m=async C=>{var w,S;d.trace("[format][provideDocumentRangeFormattingEdits] (request)",(w=e.extensionId)===null||w===void 0?void 0:w.value,C);const x=await e.provideDocumentRangeFormattingEdits(u,C,u.getFormattingOptions(),h.token)||[];return d.trace("[format][provideDocumentRangeFormattingEdits] (response)",(S=e.extensionId)===null||S===void 0?void 0:S.value,x),x},v=(C,w)=>{if(!C.length||!w.length)return!1;const S=C.reduce((x,y)=>k.plusRange(x,y.range),C[0].range);if(!w.some(x=>k.intersectRanges(S,x.range)))return!1;for(const x of C)for(const y of w)if(k.intersectRanges(x.range,y.range))return!0;return!1},_=[],b=[];try{if(typeof e.provideDocumentRangesFormattingEdits=="function"){d.trace("[format][provideDocumentRangeFormattingEdits] (request)",(r=e.extensionId)===null||r===void 0?void 0:r.value,g);const C=await e.provideDocumentRangesFormattingEdits(u,g,u.getFormattingOptions(),h.token)||[];d.trace("[format][provideDocumentRangeFormattingEdits] (response)",(a=e.extensionId)===null||a===void 0?void 0:a.value,C),b.push(C)}else{for(const C of g){if(h.token.isCancellationRequested)return!0;b.push(await m(C))}for(let C=0;C({text:S.text,range:k.lift(S.range),forceMoveMarkers:!0})),S=>{for(const{range:x}of S)if(k.areIntersectingOrTouching(x,w))return[new Re(x.startLineNumber,x.startColumn,x.endLineNumber,x.endColumn)];return null})}return c.notify("format",s),!0}async function vme(o,e,t,i,n,s){const r=o.get(qe),a=o.get(Me),l=$l(e)?e.getModel():e,d=IW(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,l),c=await fg.select(d,l,t);c&&(i.report(c),await r.invokeFunction(bme,c,e,t,n,s))}async function bme(o,e,t,i,n,s){const r=o.get(Qr),a=o.get(Py);let l,d;$l(t)?(l=t.getModel(),d=new bu(t,5,void 0,n)):(l=t,d=new SR(t,n));let c;try{const u=await e.provideDocumentFormattingEdits(l,l.getFormattingOptions(),d.token);if(c=await r.computeMoreMinimalEdits(l.uri,u),d.token.isCancellationRequested)return!0}finally{d.dispose()}if(!c||c.length===0)return!1;if($l(t))Xp.execute(t,c,i!==2),i!==2&&t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1);else{const[{range:u}]=c,h=new Re(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn);l.pushEditOperations([h],c.map(g=>({text:g.text,range:k.lift(g.range),forceMoveMarkers:!0})),g=>{for(const{range:f}of g)if(k.areIntersectingOrTouching(f,h))return[new Re(f.startLineNumber,f.startColumn,f.endLineNumber,f.endColumn)];return null})}return a.notify("format",s),!0}async function Cme(o,e,t,i,n,s){const r=e.documentRangeFormattingEditProvider.ordered(t);for(const a of r){const l=await Promise.resolve(a.provideDocumentRangeFormattingEdits(t,i,n,s)).catch(en);if(ls(l))return await o.computeMoreMinimalEdits(t.uri,l)}}async function wme(o,e,t,i,n){const s=IW(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,t);for(const r of s){const a=await Promise.resolve(r.provideDocumentFormattingEdits(t,i,n)).catch(en);if(ls(a))return await o.computeMoreMinimalEdits(t.uri,a)}}function NW(o,e,t,i,n,s,r){const a=e.onTypeFormattingEditProvider.ordered(t);return a.length===0||a[0].autoFormatTriggerCharacters.indexOf(n)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,i,n,s,r)).catch(en).then(l=>o.computeMoreMinimalEdits(t.uri,l))}Et.registerCommand("_executeFormatRangeProvider",async function(o,...e){const[t,i,n]=e;qt(ze.isUri(t)),qt(k.isIRange(i));const s=o.get(Xs),r=o.get(Qr),a=o.get(Me),l=await s.createModelReference(t);try{return Cme(r,a,l.object.textEditorModel,k.lift(i),n,vt.None)}finally{l.dispose()}});Et.registerCommand("_executeFormatDocumentProvider",async function(o,...e){const[t,i]=e;qt(ze.isUri(t));const n=o.get(Xs),s=o.get(Qr),r=o.get(Me),a=await n.createModelReference(t);try{return wme(s,r,a.object.textEditorModel,i,vt.None)}finally{a.dispose()}});Et.registerCommand("_executeFormatOnTypeProvider",async function(o,...e){const[t,i,n,s]=e;qt(ze.isUri(t)),qt(z.isIPosition(i)),qt(typeof n=="string");const r=o.get(Xs),a=o.get(Qr),l=o.get(Me),d=await r.createModelReference(t);try{return NW(a,l,d.object.textEditorModel,z.lift(i),n,s,vt.None)}finally{d.dispose()}});Oa.wrappingIndent.defaultValue=0;Oa.glyphMargin.defaultValue=!1;Oa.autoIndent.defaultValue=3;Oa.overviewRulerLanes.defaultValue=2;fg.setFormatterSelector((o,e,t)=>Promise.resolve(o[0]));const Bs=u7();Bs.editor=Lpe();Bs.languages=gme();const Sme=Bs.CancellationTokenSource,yme=Bs.Emitter,Lme=Bs.KeyCode,Dme=Bs.KeyMod,xme=Bs.Position,kme=Bs.Range,Ime=Bs.Selection,Eme=Bs.SelectionDirection,Nme=Bs.MarkerSeverity,Tme=Bs.MarkerTag,Mme=Bs.Uri,Ame=Bs.Token,sT=Bs.editor,Rme=Bs.languages,ek=globalThis.MonacoEnvironment;(ek!=null&&ek.globalAPI||typeof define=="function"&&define.amd)&&(globalThis.monaco=Bs);typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});const k0=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:Sme,Emitter:yme,KeyCode:Lme,KeyMod:Dme,MarkerSeverity:Nme,MarkerTag:Tme,Position:xme,Range:kme,Selection:Ime,SelectionDirection:Eme,Token:Ame,Uri:Mme,editor:sT,languages:Rme},Symbol.toStringTag,{value:"Module"}));/*!----------------------------------------------------------------------------- +`),await this._clipboardService.writeText(w)})),i.getOption(90)||_.push(new Rs("diff.inline.revertChange",p("diff.inline.revertChange.label","Revert this change"),void 0,!0,async()=>{this._editor.revert(this._diff)})),_},autoSelectFirstItem:!0})};this._register(Wi(this._diffActions,"mousedown",f=>{if(!f.leftButton)return;const{top:m,height:v}=gn(this._diffActions),_=Math.floor(c/3);f.preventDefault(),g(f.posx,m+v+_)})),this._register(i.onMouseMove(f=>{(f.target.type===8||f.target.type===5)&&f.target.detail.viewZoneId===this._getViewZoneId()?(u=this._updateLightBulbPosition(this._marginDomNode,f.event.browserEvent.y,c),this.visibility=!0):this.visibility=!1})),this._register(i.onMouseDown(f=>{f.event.leftButton&&(f.target.type===8||f.target.type===5)&&f.target.detail.viewZoneId===this._getViewZoneId()&&(f.event.preventDefault(),u=this._updateLightBulbPosition(this._marginDomNode,f.event.browserEvent.y,c),g(f.event.posx,f.event.posy+c))}))}_updateLightBulbPosition(e,t,i){const{top:n}=gn(e),s=t-n,r=Math.floor(s/i),a=r*i;if(this._diffActions.style.top=`${a}px`,this._viewLineCounts){let l=0;for(let d=0;do});function Ife(o,e,t,i){Jn(i,e.fontInfo);const n=t.length>0,s=new mm(1e4);let r=0,a=0;const l=[];for(let h=0;h');const l=e.getLineContent(),d=Zo.isBasicASCII(l,n),c=Zo.containsRTL(l,d,s),u=n0(new Ou(r.fontInfo.isMonospace&&!r.disableMonospaceOptimizations,r.fontInfo.canUseHalfwidthRightwardsArrow,l,!1,d,c,0,e,t,r.tabSize,0,r.fontInfo.spaceWidth,r.fontInfo.middotWidth,r.fontInfo.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==Po.OFF,null),a);return a.appendString(""),u.characterMapping.getHorizontalOffset(u.characterMapping.length)}var Nfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},H5=function(o,e){return function(t,i){e(t,i,o)}};let GN=class extends q{constructor(e,t,i,n,s,r,a,l,d,c){super(),this._targetWindow=e,this._editors=t,this._diffModel=i,this._options=n,this._diffEditorWidget=s,this._canIgnoreViewZoneUpdateEvent=r,this._origViewZonesToIgnore=a,this._modViewZonesToIgnore=l,this._clipboardService=d,this._contextMenuService=c,this._originalTopPadding=Pt(this,0),this._originalScrollOffset=Pt(this,0),this._originalScrollOffsetAnimated=I5(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=Pt(this,0),this._modifiedScrollOffset=Pt(this,0),this._modifiedScrollOffsetAnimated=I5(this._targetWindow,this._modifiedScrollOffset,this._store);const u=Pt("invalidateAlignmentsState",0),h=this._register(new Yt(()=>{u.set(u.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(C=>{this._canIgnoreViewZoneUpdateEvent()||h.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(C=>{this._canIgnoreViewZoneUpdateEvent()||h.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(C=>{(C.hasChanged(144)||C.hasChanged(66))&&h.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(C=>{(C.hasChanged(144)||C.hasChanged(66))&&h.schedule()}));const g=this._diffModel.map(C=>C?Oi(C.model.original.onDidChangeTokens,()=>C.model.original.tokenization.backgroundTokenizationState===2):void 0).map((C,w)=>C==null?void 0:C.read(w)),f=rt(C=>{const w=this._diffModel.read(C),S=w==null?void 0:w.diff.read(C);if(!w||!S)return null;u.read(C);const y=this._options.renderSideBySide.read(C);return z5(this._editors.original,this._editors.modified,S.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,y)}),m=rt(C=>{var w;const S=(w=this._diffModel.read(C))===null||w===void 0?void 0:w.movedTextToCompare.read(C);if(!S)return null;u.read(C);const x=S.changes.map(y=>new vW(y));return z5(this._editors.original,this._editors.modified,x,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)});function v(){const C=document.createElement("div");return C.className="diagonal-fill",C}const _=this._register(new de);this.viewZones=Dm(this,(C,w)=>{var S,x,y,I,E,R,j,O;_.clear();const $=f.read(C)||[],K=[],oe=[],Le=this._modifiedTopPadding.read(C);Le>0&&oe.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:Le,showInHiddenAreas:!0,suppressMouseDown:!0});const he=this._originalTopPadding.read(C);he>0&&K.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:he,showInHiddenAreas:!0,suppressMouseDown:!0});const se=this._options.renderSideBySide.read(C),V=se||(S=this._editors.modified._getViewModel())===null||S===void 0?void 0:S.createLineBreaksComputer();if(V){for(const Ce of $)if(Ce.diff)for(let re=Ce.originalRange.startLineNumber;rethis._editors.original.getModel().tokenization.getLineTokens(ci)),Ce.originalRange.mapToLineArray(ci=>Q[H++]),$e,ft),Ie=[];for(const ci of Ce.diff.innerChanges||[])Ie.push(new W_(ci.originalRange.delta(-(Ce.diff.original.startLineNumber-1)),$N.className,0));const mt=Ife(ce,Bt,Ie,ke),Ct=document.createElement("div");if(Ct.className="inline-deleted-margin-view-zone",Jn(Ct,Bt.fontInfo),this._options.renderIndicators.read(C))for(let ci=0;ciLc(Mt),Ct,this._editors.modified,Ce.diff,this._diffEditorWidget,mt.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let ci=0;ci1&&K.push({afterLineNumber:Ce.originalRange.startLineNumber+ci,domNode:v(),heightInPx:(yn-1)*G,showInHiddenAreas:!0,suppressMouseDown:!0})}oe.push({afterLineNumber:Ce.modifiedRange.startLineNumber-1,domNode:ke,heightInPx:mt.heightInLines*G,minWidthInPx:mt.minWidthInPx,marginDomNode:Ct,setZoneId(ci){Mt=ci},showInHiddenAreas:!0,suppressMouseDown:!0})}const re=document.createElement("div");re.className="gutter-delete",K.push({afterLineNumber:Ce.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:Ce.modifiedHeightInPx,marginDomNode:re,showInHiddenAreas:!0,suppressMouseDown:!0})}else{const re=Ce.modifiedHeightInPx-Ce.originalHeightInPx;if(re>0){if(Z!=null&&Z.lineRangeMapping.original.delta(-1).deltaLength(2).contains(Ce.originalRange.endLineNumberExclusive-1))continue;K.push({afterLineNumber:Ce.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:re,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let ke=function(){const Ie=document.createElement("div");return Ie.className="arrow-revert-change "+Ue.asClassName(ve.arrowRight),w.add(J(Ie,"mousedown",mt=>mt.stopPropagation())),w.add(J(Ie,"click",mt=>{mt.stopPropagation(),s.revert(Ce.diff)})),pe("div",{},Ie)};if(Z!=null&&Z.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(Ce.modifiedRange.endLineNumberExclusive-1))continue;let ce;Ce.diff&&Ce.diff.modified.isEmpty&&this._options.shouldRenderRevertArrows.read(C)&&(ce=ke()),oe.push({afterLineNumber:Ce.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-re,marginDomNode:ce,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(const Ce of(O=m.read(C))!==null&&O!==void 0?O:[]){if(!(Z!=null&&Z.lineRangeMapping.original.intersect(Ce.originalRange))||!(Z!=null&&Z.lineRangeMapping.modified.intersect(Ce.modifiedRange)))continue;const re=Ce.modifiedHeightInPx-Ce.originalHeightInPx;re>0?K.push({afterLineNumber:Ce.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:re,showInHiddenAreas:!0,suppressMouseDown:!0}):oe.push({afterLineNumber:Ce.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-re,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:K,mod:oe}});let b=!1;this._register(this._editors.original.onDidScrollChange(C=>{C.scrollLeftChanged&&!b&&(b=!0,this._editors.modified.setScrollLeft(C.scrollLeft),b=!1)})),this._register(this._editors.modified.onDidScrollChange(C=>{C.scrollLeftChanged&&!b&&(b=!0,this._editors.original.setScrollLeft(C.scrollLeft),b=!1)})),this._originalScrollTop=Oi(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Oi(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register(zt(C=>{const w=this._originalScrollTop.read(C)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(C))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(C));w!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(w,1)})),this._register(zt(C=>{const w=this._modifiedScrollTop.read(C)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(C))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(C));w!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(w,1)})),this._register(zt(C=>{var w;const S=(w=this._diffModel.read(C))===null||w===void 0?void 0:w.movedTextToCompare.read(C);let x=0;if(S){const y=this._editors.original.getTopForLineNumber(S.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();x=this._editors.modified.getTopForLineNumber(S.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-y}x>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(x,void 0)):x<0?(this._modifiedTopPadding.set(-x,void 0),this._originalTopPadding.set(0,void 0)):setTimeout(()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)},400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-x,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+x,void 0,!0)}))}};GN=Nfe([H5(8,Xd),H5(9,Sr)],GN);function z5(o,e,t,i,n,s){const r=new Hd($5(o,i)),a=new Hd($5(e,n)),l=o.getOption(66),d=e.getOption(66),c=[];let u=0,h=0;function g(f,m){for(;;){let v=r.peek(),_=a.peek();if(v&&v.lineNumber>=f&&(v=void 0),_&&_.lineNumber>=m&&(_=void 0),!v&&!_)break;const b=v?v.lineNumber-u:Number.MAX_VALUE,C=_?_.lineNumber-h:Number.MAX_VALUE;bC?(a.dequeue(),v={lineNumber:_.lineNumber-h+u,heightInPx:0}):(r.dequeue(),a.dequeue()),c.push({originalRange:yt.ofLength(v.lineNumber,1),modifiedRange:yt.ofLength(_.lineNumber,1),originalHeightInPx:l+v.heightInPx,modifiedHeightInPx:d+_.heightInPx,diff:void 0})}}for(const f of t){let C=function(w,S){var x,y,I,E;if(wK.lineNumberK+oe.heightInPx,0))!==null&&y!==void 0?y:0,$=(E=(I=a.takeWhile(K=>K.lineNumberK+oe.heightInPx,0))!==null&&E!==void 0?E:0;c.push({originalRange:R,modifiedRange:j,originalHeightInPx:R.length*l+O,modifiedHeightInPx:j.length*d+$,diff:f.lineRangeMapping}),b=w,_=S};const m=f.lineRangeMapping;g(m.original.startLineNumber,m.modified.startLineNumber);let v=!0,_=m.modified.startLineNumber,b=m.original.startLineNumber;if(s)for(const w of m.innerChanges||[])w.originalRange.startColumn>1&&w.modifiedRange.startColumn>1&&C(w.originalRange.startLineNumber,w.modifiedRange.startLineNumber),w.originalRange.endColumn1&&i.push({lineNumber:l,heightInPx:r*(d-1)})}for(const l of o.getWhitespaces()){if(e.has(l.id))continue;const d=l.afterLineNumber===0?0:s.convertViewPositionToModelPosition(new z(l.afterLineNumber,1)).lineNumber;t.push({lineNumber:d,heightInPx:l.height})}return Zge(t,i,l=>l.lineNumber,(l,d)=>({lineNumber:l.lineNumber,heightInPx:l.heightInPx+d.heightInPx}))}var Tfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Mfe=function(o,e){return function(t,i){e(t,i,o)}},Tr;let gg=Tr=class extends q{constructor(e,t,i,n,s,r,a){super(),this._editors=e,this._rootElement=t,this._diffModel=i,this._rootWidth=n,this._rootHeight=s,this._modifiedEditorLayoutInfo=r,this._themeService=a,this.width=Tr.ENTIRE_DIFF_OVERVIEW_WIDTH;const l=Oi(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),d=rt(h=>{const g=l.read(h),f=g.getColor(Hte)||(g.getColor(Wte)||nE).transparent(2),m=g.getColor(zte)||(g.getColor(Vte)||sE).transparent(2);return{insertColor:f,removeColor:m}}),c=Ht(document.createElement("div"));c.setClassName("diffViewport"),c.setPosition("absolute");const u=vi("div.diffOverview",{style:{position:"absolute",top:"0px",width:Tr.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register(RC(u,c.domNode)),this._register(Wi(u,Se.POINTER_DOWN,h=>{this._editors.modified.delegateVerticalScrollbarPointerDown(h)})),this._register(J(u,Se.MOUSE_WHEEL,h=>{this._editors.modified.delegateScrollFromMouseWheelEvent(h)},{passive:!1})),this._register(RC(this._rootElement,u)),this._register(Qd((h,g)=>{const f=this._diffModel.read(h),m=this._editors.original.createOverviewRuler("original diffOverviewRuler");m&&(g.add(m),g.add(RC(u,m.getDomNode())));const v=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(v&&(g.add(v),g.add(RC(u,v.getDomNode()))),!m||!v)return;const _=Fo("viewZoneChanged",this._editors.original.onDidChangeViewZones),b=Fo("viewZoneChanged",this._editors.modified.onDidChangeViewZones),C=Fo("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),w=Fo("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);g.add(zt(S=>{var x;_.read(S),b.read(S),C.read(S),w.read(S);const y=d.read(S),I=(x=f==null?void 0:f.diff.read(S))===null||x===void 0?void 0:x.mappings;function E(O,$,K){const oe=K._getViewModel();return oe?O.filter(Le=>Le.length>0).map(Le=>{const he=oe.coordinatesConverter.convertModelPositionToViewPosition(new z(Le.startLineNumber,1)),se=oe.coordinatesConverter.convertModelPositionToViewPosition(new z(Le.endLineNumberExclusive,1)),V=se.lineNumber-he.lineNumber;return new fB(he.lineNumber,se.lineNumber,V,$.toString())}):[]}const R=E((I||[]).map(O=>O.lineRangeMapping.original),y.removeColor,this._editors.original),j=E((I||[]).map(O=>O.lineRangeMapping.modified),y.insertColor,this._editors.modified);m==null||m.setZones(R),v==null||v.setZones(j)})),g.add(zt(S=>{const x=this._rootHeight.read(S),y=this._rootWidth.read(S),I=this._modifiedEditorLayoutInfo.read(S);if(I){const E=Tr.ENTIRE_DIFF_OVERVIEW_WIDTH-2*Tr.ONE_OVERVIEW_WIDTH;m.setLayout({top:0,height:x,right:E+Tr.ONE_OVERVIEW_WIDTH,width:Tr.ONE_OVERVIEW_WIDTH}),v.setLayout({top:0,height:x,right:0,width:Tr.ONE_OVERVIEW_WIDTH});const R=this._editors.modifiedScrollTop.read(S),j=this._editors.modifiedScrollHeight.read(S),O=this._editors.modified.getOption(102),$=new Bp(O.verticalHasArrows?O.arrowSize:0,O.verticalScrollbarSize,0,I.height,j,R);c.setTop($.getSliderPosition()),c.setHeight($.getSliderSize())}else c.setTop(0),c.setHeight(0);u.style.height=x+"px",u.style.left=y-Tr.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",c.setWidth(Tr.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}};gg.ONE_OVERVIEW_WIDTH=15;gg.ENTIRE_DIFF_OVERVIEW_WIDTH=Tr.ONE_OVERVIEW_WIDTH*2;gg=Tr=Tfe([Mfe(6,Sn)],gg);M("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},p("diffEditor.move.border","The border color for text that got moved in the diff editor."));M("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},p("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor."));M("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},p("diffEditor.unchangedRegionShadow","The color of the shadow around unchanged region widgets."));class yL extends q{constructor(){super(...arguments),this._id=++yL.idCounter,this._onDidDispose=this._register(new W),this.onDidDispose=this._onDidDispose.event}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,i=0){this._targetEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._targetEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._targetEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._targetEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,i){this._targetEditor.trigger(e,t,i)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}}yL.idCounter=0;var Afe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},U5=function(o,e){return function(t,i){e(t,i,o)}};let ZN=class extends q{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,t,i,n,s,r,a){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=i,this._createInnerEditor=s,this._instantiationService=r,this._keybindingService=a,this._onDidContentSizeChange=this._register(new W),this.original=this._register(this._createLeftHandSideEditor(i.editorOptions.get(),n.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(i.editorOptions.get(),n.modifiedEditor||{})),this.modifiedModel=Oi(this.modified.onDidChangeModel,()=>this.modified.getModel()),this.modifiedScrollTop=Oi(this.modified.onDidScrollChange,()=>this.modified.getScrollTop()),this.modifiedScrollHeight=Oi(this.modified.onDidScrollChange,()=>this.modified.getScrollHeight()),this.modifiedSelections=Oi(this.modified.onDidChangeCursorSelection,()=>{var l;return(l=this.modified.getSelections())!==null&&l!==void 0?l:[]}),this.modifiedCursor=Oi(this.modified.onDidChangeCursorPosition,()=>{var l;return(l=this.modified.getPosition())!==null&&l!==void 0?l:new z(1,1)}),this._register(D0({createEmptyChangeSummary:()=>({}),handleChange:(l,d)=>(l.didChange(i.editorOptions)&&Object.assign(d,l.change.changedOptions),!0)},(l,d)=>{i.editorOptions.read(l),this._options.renderSideBySide.read(l),this.modified.updateOptions(this._adjustOptionsForRightHandSide(l,d)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(l,d))}))}_createLeftHandSideEditor(e,t){const i=this._adjustOptionsForLeftHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,i,t);return n.setContextValue("isInDiffLeftEditor",!0),n}_createRightHandSideEditor(e,t){const i=this._adjustOptionsForRightHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,i,t);return n.setContextValue("isInDiffRightEditor",!0),n}_constructInnerEditor(e,t,i,n){const s=this._createInnerEditor(e,t,i,n);return this._register(s.onDidContentSizeChange(r=>{const a=this.original.getContentWidth()+this.modified.getContentWidth()+gg.ENTIRE_DIFF_OVERVIEW_WIDTH,l=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:l,contentWidth:a,contentHeightChanged:r.contentHeightChanged,contentWidthChanged:r.contentWidthChanged})})),s}_adjustOptionsForLeftHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(i.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},i.wordWrapOverride1=this._options.diffWordWrap.get()):(i.wordWrapOverride1="off",i.wordWrapOverride2="off",i.stickyScroll={enabled:!1},i.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),i.glyphMargin=this._options.renderSideBySide.get(),t.originalAriaLabel&&(i.ariaLabel=t.originalAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.readOnly=!this._options.originalEditable.get(),i.dropIntoEditor={enabled:!i.readOnly},i.extraEditorClassName="original-in-monaco-diff-editor",i}_adjustOptionsForRightHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.wordWrapOverride1=this._options.diffWordWrap.get(),i.revealHorizontalRightPadding=Oa.revealHorizontalRightPadding.defaultValue+gg.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",i}_adjustOptionsForSubEditor(e){const t={...e,dimension:{height:0,width:0}};return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar={...t.scrollbar||{}},t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap={...t.minimap||{}},t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){var t;e||(e="");const i=p("diff-aria-navigation-tip"," use {0} to open the accessibility help.",(t=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))===null||t===void 0?void 0:t.getAriaLabel());return this._options.accessibilityVerbose.get()?e+i:e?e.replaceAll(i,""):""}};ZN=Afe([U5(5,qe),U5(6,Xt)],ZN);class Rfe{get editorOptions(){return this._options}constructor(e){this._diffEditorWidth=Pt(this,0),this.couldShowInlineViewBecauseOfSize=rt(this,i=>this._options.read(i).renderSideBySide&&this._diffEditorWidth.read(i)<=this._options.read(i).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=rt(this,i=>this._options.read(i).renderOverviewRuler),this.renderSideBySide=rt(this,i=>this._options.read(i).renderSideBySide&&!(this._options.read(i).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(i))),this.readOnly=rt(this,i=>this._options.read(i).readOnly),this.shouldRenderRevertArrows=rt(this,i=>!(!this._options.read(i).renderMarginRevertIcon||!this.renderSideBySide.read(i)||this.readOnly.read(i))),this.renderIndicators=rt(this,i=>this._options.read(i).renderIndicators),this.enableSplitViewResizing=rt(this,i=>this._options.read(i).enableSplitViewResizing),this.splitViewDefaultRatio=rt(this,i=>this._options.read(i).splitViewDefaultRatio),this.ignoreTrimWhitespace=rt(this,i=>this._options.read(i).ignoreTrimWhitespace),this.maxComputationTimeMs=rt(this,i=>this._options.read(i).maxComputationTime),this.showMoves=rt(this,i=>this._options.read(i).experimental.showMoves&&this.renderSideBySide.read(i)),this.isInEmbeddedEditor=rt(this,i=>this._options.read(i).isInEmbeddedEditor),this.diffWordWrap=rt(this,i=>this._options.read(i).diffWordWrap),this.originalEditable=rt(this,i=>this._options.read(i).originalEditable),this.diffCodeLens=rt(this,i=>this._options.read(i).diffCodeLens),this.accessibilityVerbose=rt(this,i=>this._options.read(i).accessibilityVerbose),this.diffAlgorithm=rt(this,i=>this._options.read(i).diffAlgorithm),this.showEmptyDecorations=rt(this,i=>this._options.read(i).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=rt(this,i=>this._options.read(i).onlyShowAccessibleDiffViewer),this.hideUnchangedRegions=rt(this,i=>this._options.read(i).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=rt(this,i=>this._options.read(i).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=rt(this,i=>this._options.read(i).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=rt(this,i=>this._options.read(i).hideUnchangedRegions.minimumLineCount);const t={...e,...j5(e,ps)};this._options=Pt(this,t)}updateOptions(e){const t=j5(e,this._options.get()),i={...this._options.get(),...e,...t};this._options.set(i,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}}function j5(o,e){var t,i,n,s,r,a,l,d;return{enableSplitViewResizing:Be(o.enableSplitViewResizing,e.enableSplitViewResizing),splitViewDefaultRatio:IG(o.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:Be(o.renderSideBySide,e.renderSideBySide),renderMarginRevertIcon:Be(o.renderMarginRevertIcon,e.renderMarginRevertIcon),maxComputationTime:ah(o.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:ah(o.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:Be(o.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:Be(o.renderIndicators,e.renderIndicators),originalEditable:Be(o.originalEditable,e.originalEditable),diffCodeLens:Be(o.diffCodeLens,e.diffCodeLens),renderOverviewRuler:Be(o.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:Ki(o.diffWordWrap,e.diffWordWrap,["off","on","inherit"]),diffAlgorithm:Ki(o.diffAlgorithm,e.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:Be(o.accessibilityVerbose,e.accessibilityVerbose),experimental:{showMoves:Be((t=o.experimental)===null||t===void 0?void 0:t.showMoves,e.experimental.showMoves),showEmptyDecorations:Be((i=o.experimental)===null||i===void 0?void 0:i.showEmptyDecorations,e.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:Be((s=(n=o.hideUnchangedRegions)===null||n===void 0?void 0:n.enabled)!==null&&s!==void 0?s:(r=o.experimental)===null||r===void 0?void 0:r.collapseUnchangedRegions,e.hideUnchangedRegions.enabled),contextLineCount:ah((a=o.hideUnchangedRegions)===null||a===void 0?void 0:a.contextLineCount,e.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:ah((l=o.hideUnchangedRegions)===null||l===void 0?void 0:l.minimumLineCount,e.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:ah((d=o.hideUnchangedRegions)===null||d===void 0?void 0:d.revealLineCount,e.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:Be(o.isInEmbeddedEditor,e.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:Be(o.onlyShowAccessibleDiffViewer,e.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:ah(o.renderSideBySideInlineBreakpoint,e.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:Be(o.useInlineViewWhenSpaceIsLimited,e.useInlineViewWhenSpaceIsLimited)}}var Pfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},t_=function(o,e){return function(t,i){e(t,i,o)}};let vu=class extends yL{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,t,i,n,s,r,a,l){var d;super(),this._domElement=e,this._parentContextKeyService=n,this._parentInstantiationService=s,this._audioCueService=a,this._editorProgressService=l,this.elements=vi("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[vi("div.noModificationsOverlay@overlay",{style:{position:"absolute",height:"100%",visibility:"hidden"}},[pe("span",{},"No Changes")]),vi("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),vi("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),vi("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModel=Pt(this,void 0),this._shouldDisposeDiffModel=!1,this.onDidChangeModel=ye.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._parentInstantiationService.createChild(new h0([Xe,this._contextKeyService])),this._boundarySashes=Pt(this,void 0),this._accessibleDiffViewerShouldBeVisible=Pt(this,!1),this._accessibleDiffViewerVisible=rt(this,w=>this._options.onlyShowAccessibleDiffViewer.read(w)?!0:this._accessibleDiffViewerShouldBeVisible.read(w)),this._movedBlocksLinesPart=Pt(this,void 0),this._layoutInfo=rt(this,w=>{var S,x,y,I,E;const R=this._rootSizeObserver.width.read(w),j=this._rootSizeObserver.height.read(w),O=(S=this._sash.read(w))===null||S===void 0?void 0:S.sashLeft.read(w),$=O??Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),K=R-$-((y=(x=this._overviewRulerPart.read(w))===null||x===void 0?void 0:x.width)!==null&&y!==void 0?y:0),oe=(E=(I=this._movedBlocksLinesPart.read(w))===null||I===void 0?void 0:I.width.read(w))!==null&&E!==void 0?E:0,Le=$-oe;return this.elements.original.style.width=Le+"px",this.elements.original.style.left="0px",this.elements.modified.style.width=K+"px",this.elements.modified.style.left=$+"px",this._editors.original.layout({width:Le,height:j},!0),this._editors.modified.layout({width:K,height:j},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((w,S)=>w==null?void 0:w.diff.read(S)),this.onDidUpdateDiff=ye.fromObservableLight(this._diffValue),r.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(je(()=>this._domElement.removeChild(this.elements.root))),this._rootSizeObserver=this._register(new hW(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout((d=t.automaticLayout)!==null&&d!==void 0?d:!1),this._options=new Rfe(t),this._register(zt(w=>{this._options.setWidth(this._rootSizeObserver.width.read(w))})),this._contextKeyService.createKey(T.isEmbeddedDiffEditor.key,!1),this._register(PC(T.isEmbeddedDiffEditor,this._contextKeyService,w=>this._options.isInEmbeddedEditor.read(w))),this._register(PC(T.comparingMovedCode,this._contextKeyService,w=>{var S;return!!(!((S=this._diffModel.read(w))===null||S===void 0)&&S.movedTextToCompare.read(w))})),this._register(PC(T.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,w=>this._options.couldShowInlineViewBecauseOfSize.read(w))),this._register(PC(T.hasChanges,this._contextKeyService,w=>{var S,x,y;return((y=(x=(S=this._diffModel.read(w))===null||S===void 0?void 0:S.diff.read(w))===null||x===void 0?void 0:x.mappings.length)!==null&&y!==void 0?y:0)>0})),this._editors=this._register(this._instantiationService.createInstance(ZN,this.elements.original,this.elements.modified,this._options,i,(w,S,x,y)=>this._createInnerEditor(w,S,x,y))),this._overviewRulerPart=fc(this,w=>this._options.renderOverviewRuler.read(w)?this._instantiationService.createInstance(nl(gg,w),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(S=>S.modifiedEditor)):void 0).recomputeInitiallyAndOnChange(this._store),this._sash=fc(this,w=>{const S=this._options.renderSideBySide.read(w);return this.elements.root.classList.toggle("side-by-side",S),S?new _fe(this._options,this.elements.root,{height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((x,y)=>{var I,E;return x-((E=(I=this._overviewRulerPart.read(y))===null||I===void 0?void 0:I.width)!==null&&E!==void 0?E:0)})},this._boundarySashes):void 0}).recomputeInitiallyAndOnChange(this._store);const c=fc(this,w=>this._instantiationService.createInstance(nl(UN,w),this._editors,this._diffModel,this._options)).recomputeInitiallyAndOnChange(this._store);fc(this,w=>this._instantiationService.createInstance(nl(pfe,w),this._editors,this._diffModel,this._options,this)).recomputeInitiallyAndOnChange(this._store);const u=new Set,h=new Set;let g=!1;const f=fc(this,w=>this._instantiationService.createInstance(nl(GN,w),Je(this._domElement),this._editors,this._diffModel,this._options,this,()=>g||c.get().isUpdatingHiddenAreas,u,h)).recomputeInitiallyAndOnChange(this._store),m=rt(this,w=>{const S=f.read(w).viewZones.read(w).orig,x=c.read(w).viewZones.read(w).origViewZones;return S.concat(x)}),v=rt(this,w=>{const S=f.read(w).viewZones.read(w).mod,x=c.read(w).viewZones.read(w).modViewZones;return S.concat(x)});this._register(DS(this._editors.original,m,w=>{g=w},u));let _;this._register(DS(this._editors.modified,v,w=>{g=w,g?_=Ra.capture(this._editors.modified):(_==null||_.restore(this._editors.modified),_=void 0)},h)),this._accessibleDiffViewer=fc(this,w=>this._instantiationService.createInstance(nl(Rc,w),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(S,x)=>this._accessibleDiffViewerShouldBeVisible.set(S,x),this._options.onlyShowAccessibleDiffViewer.map(S=>!S),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((S,x)=>{var y;return(y=S==null?void 0:S.diff.read(x))===null||y===void 0?void 0:y.mappings.map(I=>I.lineRangeMapping)}),this._editors)).recomputeInitiallyAndOnChange(this._store);const b=this._accessibleDiffViewerVisible.map(w=>w?"hidden":"visible");this._register(Zc(this.elements.modified,{visibility:b})),this._register(Zc(this.elements.original,{visibility:b})),this._createDiffEditorContributions(),r.addDiffEditor(this),this._register(x0(this._layoutInfo)),fc(this,w=>new(nl(Yc,w))(this.elements.root,this._diffModel,this._layoutInfo.map(S=>S.originalEditor),this._layoutInfo.map(S=>S.modifiedEditor),this._editors)).recomputeInitiallyAndOnChange(this._store,w=>{this._movedBlocksLinesPart.set(w,void 0)}),this._register(Zc(this.elements.overlay,{width:this._layoutInfo.map((w,S)=>w.originalEditor.width+(this._options.renderSideBySide.read(S)?0:w.modifiedEditor.width)),visibility:rt(w=>{var S,x;return this._options.hideUnchangedRegions.read(w)&&((x=(S=this._diffModel.read(w))===null||S===void 0?void 0:S.diff.read(w))===null||x===void 0?void 0:x.mappings.length)===0?"visible":"hidden"})})),this._register(ye.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,w=>{var S,x;if((w==null?void 0:w.reason)===3){const y=(x=(S=this._diffModel.get())===null||S===void 0?void 0:S.diff.get())===null||x===void 0?void 0:x.mappings.find(I=>I.lineRangeMapping.modified.contains(w.position.lineNumber));y!=null&&y.lineRangeMapping.modified.isEmpty?this._audioCueService.playAudioCue(gt.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):y!=null&&y.lineRangeMapping.original.isEmpty?this._audioCueService.playAudioCue(gt.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):y&&this._audioCueService.playAudioCue(gt.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}));const C=this._diffModel.map(this,(w,S)=>{if(w)return w.diff.read(S)===void 0&&!w.isDiffUpToDate.read(S)});this._register(Qd((w,S)=>{if(C.read(w)===!0){const x=this._editorProgressService.show(!0,1e3);S.add(je(()=>x.done()))}})),this._register(je(()=>{var w;this._shouldDisposeDiffModel&&((w=this._diffModel.get())===null||w===void 0||w.dispose())}))}_createInnerEditor(e,t,i,n){return e.createInstance(Vp,t,i,n)}_createDiffEditorContributions(){const e=Jf.getDiffEditorContributions();for(const t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(i){nt(i)}}get _targetEditor(){return this._editors.modified}getEditorType(){return i0.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var e;const t=this._editors.original.saveViewState(),i=this._editors.modified.saveViewState();return{original:t,modified:i,modelState:(e=this._diffModel.get())===null||e===void 0?void 0:e.serializeState()}}restoreViewState(e){var t;if(e&&e.original&&e.modified){const i=e;this._editors.original.restoreViewState(i.original),this._editors.modified.restoreViewState(i.modified),i.modelState&&((t=this._diffModel.get())===null||t===void 0||t.restoreSerializedState(i.modelState))}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(qN,e,this._options)}getModel(){var e,t;return(t=(e=this._diffModel.get())===null||e===void 0?void 0:e.model)!==null&&t!==void 0?t:null}setModel(e,t){!e&&this._diffModel.get()&&this._accessibleDiffViewer.get().close();const i=e?"model"in e?{model:e,shouldDispose:!1}:{model:this.createViewModel(e),shouldDispose:!0}:void 0;this._diffModel.get()!==(i==null?void 0:i.model)&&_b(t,n=>{var s;Oi.batchEventsGlobally(n,()=>{this._editors.original.setModel(i?i.model.model.original:null),this._editors.modified.setModel(i?i.model.model.modified:null)});const r=this._diffModel.get(),a=this._shouldDisposeDiffModel;this._shouldDisposeDiffModel=(s=i==null?void 0:i.shouldDispose)!==null&&s!==void 0?s:!1,this._diffModel.set(i==null?void 0:i.model,n),a&&(r==null||r.dispose())})}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var e;const t=(e=this._diffModel.get())===null||e===void 0?void 0:e.diff.get();return t?Ofe(t):null}revert(e){var t;if(e.innerChanges){this.revertRangeMappings(e.innerChanges);return}const i=(t=this._diffModel.get())===null||t===void 0?void 0:t.model;i&&this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:i.original.getValueInRange(e.original.toExclusiveRange())}])}revertRangeMappings(e){const t=this._diffModel.get();if(!t||!t.isDiffUpToDate.get())return;const i=e.map(n=>({range:n.modifiedRange,text:t.model.original.getValueInRange(n.originalRange)}));this._editors.modified.executeEdits("diffEditor",i)}_goTo(e){this._editors.modified.setPosition(new z(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){var t,i,n,s;const r=(i=(t=this._diffModel.get())===null||t===void 0?void 0:t.diff.get())===null||i===void 0?void 0:i.mappings;if(!r||r.length===0)return;const a=this._editors.modified.getPosition().lineNumber;let l;e==="next"?l=(n=r.find(d=>d.lineRangeMapping.modified.startLineNumber>a))!==null&&n!==void 0?n:r[0]:l=(s=Nv(r,d=>d.lineRangeMapping.modified.startLineNumber{var t;const i=(t=e.diff.get())===null||t===void 0?void 0:t.mappings;!i||i.length===0||this._goTo(i[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){const e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){var e,t;const i=this._editors.modified.hasWidgetFocus(),n=i?this._editors.modified:this._editors.original,s=i?this._editors.original:this._editors.modified;let r;const a=n.getSelection();if(a){const l=(t=(e=this._diffModel.get())===null||e===void 0?void 0:e.diff.get())===null||t===void 0?void 0:t.mappings.map(d=>i?d.lineRangeMapping.flip():d.lineRangeMapping);if(l){const d=E5(a.getStartPosition(),l),c=E5(a.getEndPosition(),l);r=k.plusRange(d,c)}}return{destination:s,destinationSelection:r}}switchSide(){const{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){const e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){var e;const t=(e=this._diffModel.get())===null||e===void 0?void 0:e.unchangedRegions.get();t&&wi(i=>{for(const n of t)n.collapseAll(i)})}showAllUnchangedRegions(){var e;const t=(e=this._diffModel.get())===null||e===void 0?void 0:e.unchangedRegions.get();t&&wi(i=>{for(const n of t)n.showAll(i)})}};vu=Pfe([t_(3,Xe),t_(4,qe),t_(5,Ot),t_(6,y0),t_(7,Bu)],vu);function Ofe(o){return o.mappings.map(e=>{const t=e.lineRangeMapping;let i,n,s,r,a=t.innerChanges;return t.original.isEmpty?(i=t.original.startLineNumber-1,n=0,a=void 0):(i=t.original.startLineNumber,n=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(s=t.modified.startLineNumber-1,r=0,a=void 0):(s=t.modified.startLineNumber,r=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:i,originalEndLineNumber:n,modifiedStartLineNumber:s,modifiedEndLineNumber:r,charChanges:a==null?void 0:a.map(l=>({originalStartLineNumber:l.originalRange.startLineNumber,originalStartColumn:l.originalRange.startColumn,originalEndLineNumber:l.originalRange.endLineNumber,originalEndColumn:l.originalRange.endColumn,modifiedStartLineNumber:l.modifiedRange.startLineNumber,modifiedStartColumn:l.modifiedRange.startColumn,modifiedEndLineNumber:l.modifiedRange.endLineNumber,modifiedEndColumn:l.modifiedRange.endColumn}))}})}var bR=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_i=function(o,e){return function(t,i){e(t,i,o)}};let Ffe=0,K5=!1;function Bfe(o){if(!o){if(K5)return;K5=!0}Fee(o||Ai.document.body)}let IS=class extends Vp{constructor(e,t,i,n,s,r,a,l,d,c,u,h){const g={...t};g.ariaLabel=g.ariaLabel||Yw.editorViewAccessibleLabel,g.ariaLabel=g.ariaLabel+";"+Yw.accessibilityHelpMessage,super(e,g,{},i,n,s,r,l,d,c,u,h),a instanceof Gp?this._standaloneKeybindingService=a:this._standaloneKeybindingService=null,Bfe(g.ariaContainerElement)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++Ffe,s=ae.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),q.None;const t=e.id,i=e.label,n=ae.and(ae.equals("editorId",this.getId()),ae.deserialize(e.precondition)),s=e.keybindings,r=ae.and(n,ae.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,d=(g,...f)=>Promise.resolve(e.run(this,...f)),c=new de,u=this.getId()+":"+t;if(c.add(Et.registerCommand(u,d)),a){const g={command:{id:u,title:i},when:n,group:a,order:l};c.add(zn.appendMenuItem(N.EditorContext,g))}if(Array.isArray(s))for(const g of s)c.add(this._standaloneKeybindingService.addDynamicKeybinding(u,g,d,r));const h=new pB(u,i,i,void 0,n,(...g)=>Promise.resolve(e.run(this,...g)),this._contextKeyService);return this._actions.set(t,h),c.add(je(()=>{this._actions.delete(t)})),c}_triggerCommand(e,t){if(this._codeEditorService instanceof zw)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};IS=bR([_i(2,qe),_i(3,Ot),_i(4,Ri),_i(5,Xe),_i(6,Xt),_i(7,Sn),_i(8,sn),_i(9,Zl),_i(10,si),_i(11,Me)],IS);let YN=class extends IS{constructor(e,t,i,n,s,r,a,l,d,c,u,h,g,f,m){const v={...t};CS(c,v,!1);const _=l.registerEditorContainer(e);typeof v.theme=="string"&&l.setTheme(v.theme),typeof v.autoDetectHighContrast<"u"&&l.setAutoDetectHighContrast(!!v.autoDetectHighContrast);const b=v.model;delete v.model,super(e,v,i,n,s,r,a,l,d,u,f,m),this._configurationService=c,this._standaloneThemeService=l,this._register(_);let C;if(typeof b>"u"){const w=g.getLanguageIdByMimeType(v.language)||v.language||Ko;C=bW(h,g,v.value||"",w,void 0),this._ownsModel=!0}else C=b,this._ownsModel=!1;if(this._attachModel(C),C){const w={oldModelUrl:null,newModelUrl:C.uri};this._onDidChangeModel.fire(w)}}dispose(){super.dispose()}updateOptions(e){CS(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};YN=bR([_i(2,qe),_i(3,Ot),_i(4,Ri),_i(5,Xe),_i(6,Xt),_i(7,Jo),_i(8,sn),_i(9,Dt),_i(10,Zl),_i(11,Si),_i(12,bi),_i(13,si),_i(14,Me)],YN);let XN=class extends vu{constructor(e,t,i,n,s,r,a,l,d,c,u,h){const g={...t};CS(l,g,!0);const f=r.registerEditorContainer(e);typeof g.theme=="string"&&r.setTheme(g.theme),typeof g.autoDetectHighContrast<"u"&&r.setAutoDetectHighContrast(!!g.autoDetectHighContrast),super(e,g,{},n,i,s,h,c),this._configurationService=l,this._standaloneThemeService=r,this._register(f)}dispose(){super.dispose()}updateOptions(e){CS(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(IS,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};XN=bR([_i(2,qe),_i(3,Xe),_i(4,Ot),_i(5,Jo),_i(6,sn),_i(7,Dt),_i(8,Sr),_i(9,Bu),_i(10,Xd),_i(11,y0)],XN);function bW(o,e,t,i,n){if(t=t||"",!i){const s=t.indexOf(` +`);let r=t;return s!==-1&&(r=t.substring(0,s)),q5(o,t,e.createByFilepathOrFirstLine(n||null,r),n)}return q5(o,t,e.createById(i),n)}function q5(o,e,t,i){return o.createModel(e,t,i)}class Wfe extends q{constructor(e,t,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new kZ),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new de),this.options=i,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new bb(()=>{var n;return(n=this.toggleMenuActionViewItem)===null||n===void 0?void 0:n.show()},i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new Cr(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,actionViewItemProvider:(n,s)=>{var r;if(n.id===bb.ID)return this.toggleMenuActionViewItem=new eS(n,n.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:Ue.asClassNameArray((r=i.moreIcon)!==null&&r!==void 0?r:ve.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(i.actionViewItemProvider){const a=i.actionViewItemProvider(n,s);if(a)return a}if(n instanceof xp){const a=new eS(n,n.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:n.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return a.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(a),this.disposables.add(this._onDidChangeDropdownVisibility.add(a.onDidChangeVisibility)),a}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();const i=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.forEach(n=>{this.actionBar.push(n,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(n)})})}getKeybindingLabel(e){var t,i,n;const s=this.lookupKeybindings?(i=(t=this.options).getKeyBinding)===null||i===void 0?void 0:i.call(t,e):void 0;return(n=s==null?void 0:s.getLabel())!==null&&n!==void 0?n:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class bb extends Rs{constructor(e,t){t=t||p("moreActions","More Actions..."),super(bb.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}bb.ID="toolbar.toggle.more";var CW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hl=function(o,e){return function(t,i){e(t,i,o)}};let ES=class extends Wfe{constructor(e,t,i,n,s,r,a){super(e,s,{getKeyBinding:d=>{var c;return(c=r.lookupKeybinding(d.id))!==null&&c!==void 0?c:void 0},...t,allowContextMenu:!0,skipTelemetry:typeof(t==null?void 0:t.telemetrySource)=="string"}),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=s,this._sessionDisposables=this._store.add(new de);const l=t==null?void 0:t.telemetrySource;l&&this._store.add(this.actionBar.onDidRun(d=>a.publicLog2("workbenchActionExecuted",{id:d.action.id,from:l})))}setActions(e,t=[],i){var n,s,r;this._sessionDisposables.clear();const a=e.slice(),l=t.slice(),d=[];let c=0;const u=[];let h=!1;if(((n=this._options)===null||n===void 0?void 0:n.hiddenItemStrategy)!==-1)for(let g=0;gv==null?void 0:v.id)),f=this._options.overflowBehavior.maxItems-g.size;let m=0;for(let v=0;v=f&&(a[v]=void 0,u[v]=_))}}EP(a),EP(u),super.setActions(a,Mn.join(u,l)),d.length>0&&this._sessionDisposables.add(J(this.getElement(),"contextmenu",g=>{var f,m,v,_,b;const C=new Pr(Je(this.getElement()),g),w=this.getItemAction(C.target);if(!w)return;C.preventDefault(),C.stopPropagation();let S=!1;if(c===1&&((f=this._options)===null||f===void 0?void 0:f.hiddenItemStrategy)===0){S=!0;for(let I=0;Ithis._menuService.resetHiddenStates(i)}))),this._contextMenuService.showContextMenu({getAnchor:()=>C,getActions:()=>y,menuId:(v=this._options)===null||v===void 0?void 0:v.contextMenu,menuActionOptions:{renderShortTitle:!0,...(_=this._options)===null||_===void 0?void 0:_.menuOptions},skipTelemetry:typeof((b=this._options)===null||b===void 0?void 0:b.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};ES=CW([hl(2,Ba),hl(3,Xe),hl(4,Sr),hl(5,Xt),hl(6,vo)],ES);let QN=class extends ES{constructor(e,t,i,n,s,r,a,l){super(e,{resetMenu:t,...i},n,s,r,a,l),this._onDidChangeMenuItems=this._store.add(new W);const d=this._store.add(n.createMenu(t,s,{emitEventsForSubmenuChanges:!0})),c=()=>{var u,h,g;const f=[],m=[];VA(d,i==null?void 0:i.menuOptions,{primary:f,secondary:m},(u=i==null?void 0:i.toolbarOptions)===null||u===void 0?void 0:u.primaryGroup,(h=i==null?void 0:i.toolbarOptions)===null||h===void 0?void 0:h.shouldInlineSubmenu,(g=i==null?void 0:i.toolbarOptions)===null||g===void 0?void 0:g.useSeparatorsInPrimaryActions),e.classList.toggle("has-no-actions",f.length===0&&m.length===0),super.setActions(f,m)};this._store.add(d.onDidChange(()=>{c(),this._onDidChangeMenuItems.fire(this)})),c()}setActions(){throw new Ci("This toolbar is populated from a menu.")}};QN=CW([hl(3,Ba),hl(4,Xe),hl(5,Sr),hl(6,Xt),hl(7,vo)],QN);class Vfe extends tg{constructor(e){super(),this._getContext=e}runAction(e,t){return super.runAction(e,this._getContext())}}var Hfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zfe=function(o,e){return function(t,i){e(t,i,o)}};class $fe{constructor(e){this.viewModel=e}getId(){return this.viewModel}}let NS=class extends q{constructor(e,t,i,n){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=i,this._instantiationService=n,this._viewModel=Pt(this,void 0),this._collapsed=rt(this,r=>{var a;return(a=this._viewModel.read(r))===null||a===void 0?void 0:a.collapsed.read(r)}),this._contentHeight=Pt(this,500),this.height=rt(this,r=>(this._collapsed.read(r)?0:this._contentHeight.read(r))+this._outerEditorHeight),this._modifiedContentWidth=Pt(this,0),this._modifiedWidth=Pt(this,0),this._originalContentWidth=Pt(this,0),this._originalWidth=Pt(this,0),this.maxScroll=rt(this,r=>{const a=this._modifiedContentWidth.read(r)-this._modifiedWidth.read(r),l=this._originalContentWidth.read(r)-this._originalWidth.read(r);return a>l?{maxScroll:a,width:this._modifiedWidth.read(r)}:{maxScroll:l,width:this._originalWidth.read(r)}}),this._elements=vi("div.multiDiffEntry",[vi("div.content",{style:{display:"flex",flexDirection:"column",flex:"1",overflow:"hidden"}},[vi("div.header@header",[vi("div.collapse-button@collapseButton"),vi("div.title.show-file-icons@title",[]),vi("div.actions@actions")]),vi("div.editorParent",{style:{flex:"1",display:"flex",flexDirection:"column"}},[vi("div.editorContainer@editor",{style:{flex:"1"}})])])]),this.editor=this._register(this._instantiationService.createInstance(vu,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=G5(this.editor.getModifiedEditor()),this.isOriginalFocused=G5(this.editor.getOriginalEditor()),this.isFocused=rt(this,r=>this.isModifedFocused.read(r)||this.isOriginalFocused.read(r)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.title)):void 0,this._dataStore=new de,this._headerHeight=this._elements.header.clientHeight;const s=new mS(this._elements.collapseButton,{});this._register(zt(r=>{s.element.className="",s.icon=this._collapsed.read(r)?ve.chevronRight:ve.chevronDown})),this._register(s.onDidClick(()=>{var r;(r=this._viewModel.get())===null||r===void 0||r.collapsed.set(!this._collapsed.get(),void 0)})),this._register(zt(r=>{this._elements.editor.style.display=this._collapsed.read(r)?"none":"block"})),this.editor.getModifiedEditor().onDidLayoutChange(r=>{const a=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(a,void 0)}),this.editor.getOriginalEditor().onDidLayoutChange(r=>{const a=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(a,void 0)}),this._register(this.editor.onDidContentSizeChange(r=>{B1(a=>{this._contentHeight.set(r.contentHeight,a),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),a),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),a)})})),this._register(zt(r=>{const a=this.isFocused.read(r);this._elements.root.classList.toggle("focused",a)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=38,this._register(this._instantiationService.createInstance(QN,this._elements.actions,N.MultiDiffEditorFileToolbar,{actionRunner:this._register(new Vfe(()=>{var r,a;return(a=(r=this._viewModel.get())===null||r===void 0?void 0:r.diffEditorViewModel)===null||a===void 0?void 0:a.model.modified.uri})),menuOptions:{shouldForwardArgs:!0}}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){function t(n){return{...n,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0}}const i=e.viewModel.entry.value;i.onOptionsDidChange&&this._dataStore.add(i.onOptionsDidChange(()=>{var n;this.editor.updateOptions(t((n=i.options)!==null&&n!==void 0?n:{}))})),B1(n=>{var s,r;(s=this._resourceLabel)===null||s===void 0||s.setUri(e.viewModel.diffEditorViewModel.model.modified.uri),this._dataStore.clear(),this._viewModel.set(e.viewModel,n),this.editor.setModel(e.viewModel.diffEditorViewModel,n),this.editor.updateOptions(t((r=i.options)!==null&&r!==void 0?r:{}))})}render(e,t,i,n){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${t}px`,this._elements.root.style.position="absolute";const s=Math.max(0,Math.min(e.length-this._headerHeight,n.start-e.start));this._elements.header.style.transform=`translateY(${s}px)`,B1(r=>{this.editor.layout({width:t,height:e.length-this._outerEditorHeight})}),this.editor.getOriginalEditor().setScrollTop(i),this._elements.header.classList.toggle("shadow",s>0||i>0)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};NS=Hfe([zfe(3,qe)],NS);function G5(o){return Oi(e=>{const t=new de;return t.add(o.onDidFocusEditorWidget(()=>e(!0))),t.add(o.onDidBlurEditorWidget(()=>e(!1))),t},()=>o.hasWidgetFocus())}class Ufe{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){var t;let i;if(this._unused.size===0)i=this._create(e),this._itemData.set(i,e);else{const n=[...this._unused.values()];i=(t=n.find(s=>this._itemData.get(s).getId()===e.getId()))!==null&&t!==void 0?t:n[0],this._unused.delete(i),this._itemData.set(i,e),i.setData(e)}return this._used.add(i),{object:i,dispose:()=>{this._used.delete(i),this._unused.size>5?i.dispose():this._unused.add(i)}}}dispose(){for(const e of this._used)e.dispose();for(const e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}var jfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Z5=function(o,e){return function(t,i){e(t,i,o)}};let JN=class extends q{constructor(e,t,i,n,s,r){super(),this._element=e,this._dimension=t,this._viewModel=i,this._workbenchUIElementFactory=n,this._parentContextKeyService=s,this._parentInstantiationService=r,this._elements=vi("div",{style:{overflowY:"hidden"}},[vi("div@content",{style:{overflow:"hidden"}}),vi("div.monaco-editor@overflowWidgetsDomNode",{})]),this._sizeObserver=this._register(new hW(this._element,void 0)),this._objectPool=this._register(new Ufe(l=>{const d=this._instantiationService.createInstance(NS,this._elements.content,this._elements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return d.setData(l),d})),this._scrollable=this._register(new bm({forceIntegerValues:!1,scheduleAtNextAnimationFrame:l=>po(Je(this._element),l),smoothScrollDuration:100})),this._scrollableElement=this._register(new Vy(this._elements.root,{vertical:1,horizontal:1,className:"monaco-component",useShadows:!1},this._scrollable)),this.scrollTop=Oi(this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=Oi(this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItems=Dm(this,(l,d)=>{const c=this._viewModel.read(l);return c?c.items.read(l).map(h=>d.add(new Kfe(h,this._objectPool,this.scrollLeft))):[]}),this._totalHeight=this._viewItems.map(this,(l,d)=>l.reduce((c,u)=>c+u.contentHeight.read(d),0)),this.activeDiffItem=rt(this,l=>this._viewItems.read(l).find(d=>{var c;return(c=d.template.read(l))===null||c===void 0?void 0:c.isFocused.read(l)})),this.lastActiveDiffItem=qge((l,d)=>{var c;return(c=this.activeDiffItem.read(l))!==null&&c!==void 0?c:d}),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._parentInstantiationService.createChild(new h0([Xe,this._contextKeyService])),this._contextKeyService.createKey(T.inMultiDiffEditor.key,!0);const a=this._parentContextKeyService.createKey(T.multiDiffEditorAllCollapsed.key,!1);this._register(zt(l=>{const d=this._viewModel.read(l);if(d){const c=d.items.read(l).every(u=>u.collapsed.read(l));a.set(c)}})),this._register(zt(l=>{const d=this.lastActiveDiffItem.read(l);wi(c=>{var u;(u=this._viewModel.read(l))===null||u===void 0||u.activeDiffItem.set(d==null?void 0:d.viewModel,c)})})),this._register(zt(l=>{const d=this._dimension.read(l);this._sizeObserver.observe(d)})),this._elements.content.style.position="relative",this._register(zt(l=>{const d=this._sizeObserver.height.read(l);this._elements.root.style.height=`${d}px`;const c=this._totalHeight.read(l);this._elements.content.style.height=`${c}px`;const u=this._sizeObserver.width.read(l);let h=u;const g=this._viewItems.read(l),f=RM(g,m=>m.maxScroll.read(l).maxScroll);if(f){const m=f.maxScroll.read(l);h=u+m.maxScroll}this._scrollableElement.setScrollDimensions({width:u,height:d,scrollHeight:c,scrollWidth:h})})),e.replaceChildren(this._scrollableElement.getDomNode()),this._register(je(()=>{e.replaceChildren()})),this._register(this._register(zt(l=>{B1(d=>{this.render(l)})})))}render(e){const t=this.scrollTop.read(e);let i=0,n=0,s=0;const r=this._sizeObserver.height.read(e),a=ut.ofStartAndLength(t,r),l=this._sizeObserver.width.read(e);for(const d of this._viewItems.read(e)){const c=d.contentHeight.read(e),u=Math.min(c,r),h=ut.ofStartAndLength(n,u),g=ut.ofStartAndLength(s,c);if(g.isBefore(a))i-=c-u,d.hide();else if(g.isAfter(a))d.hide();else{const f=Math.max(0,Math.min(a.start-g.start,c-u));i-=f;const m=ut.ofStartAndLength(t+i,r);d.render(h,f,l,m)}n+=u,s+=c}this._elements.content.style.transform=`translateY(${-(t+i)}px)`}};JN=jfe([Z5(4,Xe),Z5(5,qe)],JN);class Kfe extends q{constructor(e,t,i){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=i,this._lastTemplateData=Pt(this,{contentHeight:500,maxScroll:{maxScroll:0,width:0}}),this._templateRef=this._register(wS(this,void 0)),this.contentHeight=rt(this,n=>{var s,r,a;return(a=(r=(s=this._templateRef.read(n))===null||s===void 0?void 0:s.object.height)===null||r===void 0?void 0:r.read(n))!==null&&a!==void 0?a:this._lastTemplateData.read(n).contentHeight}),this.maxScroll=rt(this,n=>{var s,r;return(r=(s=this._templateRef.read(n))===null||s===void 0?void 0:s.object.maxScroll.read(n))!==null&&r!==void 0?r:this._lastTemplateData.read(n).maxScroll}),this.template=rt(this,n=>{var s;return(s=this._templateRef.read(n))===null||s===void 0?void 0:s.object}),this._isHidden=Pt(this,!1),this._register(zt(n=>{var s;const r=this._scrollLeft.read(n);(s=this._templateRef.read(n))===null||s===void 0||s.object.setScrollLeft(r)})),this._register(zt(n=>{const s=this._templateRef.read(n);!s||!this._isHidden.read(n)||s.object.isFocused.read(n)||wi(l=>{this._lastTemplateData.set({contentHeight:s.object.height.get(),maxScroll:{maxScroll:0,width:0}},l),s.object.hide(),this._templateRef.set(void 0,l)})}))}dispose(){this.hide(),super.dispose()}toString(){return`VirtualViewItem(${this.viewModel.entry.value.title})`}hide(){this._isHidden.set(!0,void 0)}render(e,t,i,n){this._isHidden.set(!1,void 0);let s=this._templateRef.get();s||(s=this._objectPool.getUnusedObj(new $fe(this.viewModel)),this._templateRef.set(s,void 0)),s.object.render(e,i,t,n)}}M("multiDiffEditor.headerBackground",{dark:"#808080",light:"#b4b4b4",hcDark:"#808080",hcLight:"#b4b4b4"},p("multiDiffEditor.headerBackground","The background color of the diff editor's header"));var qfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Gfe=function(o,e){return function(t,i){e(t,i,o)}};let eT=class extends q{constructor(e,t,i){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=i,this._dimension=Pt(this,void 0),this._viewModel=Pt(this,void 0),this._widgetImpl=Dm(this,(n,s)=>(nl(NS,n),s.add(this._instantiationService.createInstance(nl(JN,n),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory)))),this._register(x0(this._widgetImpl))}};eT=qfe([Gfe(2,qe)],eT);function Zfe(o,e,t){return Ge.initialize(t||{}).createInstance(YN,o,e)}function Yfe(o){return Ge.get(Ot).onCodeEditorAdd(t=>{o(t)})}function Xfe(o){return Ge.get(Ot).onDiffEditorAdd(t=>{o(t)})}function Qfe(){return Ge.get(Ot).listCodeEditors()}function Jfe(){return Ge.get(Ot).listDiffEditors()}function epe(o,e,t){return Ge.initialize(t||{}).createInstance(XN,o,e)}function tpe(o,e){const t=Ge.initialize(e||{});return new eT(o,{},t)}function ipe(o){if(typeof o.id!="string"||typeof o.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return Et.registerCommand(o.id,o.run)}function npe(o){if(typeof o.id!="string"||typeof o.label!="string"||typeof o.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const e=ae.deserialize(o.precondition),t=(n,...s)=>Rn.runEditorCommand(n,s,e,(r,a,l)=>Promise.resolve(o.run(a,...l))),i=new de;if(i.add(Et.registerCommand(o.id,t)),o.contextMenuGroupId){const n={command:{id:o.id,title:o.label},when:e,group:o.contextMenuGroupId,order:o.contextMenuOrder||0};i.add(zn.appendMenuItem(N.EditorContext,n))}if(Array.isArray(o.keybindings)){const n=Ge.get(Xt);if(!(n instanceof Gp))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const s=ae.and(e,ae.deserialize(o.keybindingContext));i.add(n.addDynamicKeybindings(o.keybindings.map(r=>({keybinding:r,command:o.id,when:s}))))}}return i}function spe(o){return wW([o])}function wW(o){const e=Ge.get(Xt);return e instanceof Gp?e.addDynamicKeybindings(o.map(t=>({keybinding:t.keybinding,command:t.command,commandArgs:t.commandArgs,when:ae.deserialize(t.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),q.None)}function ope(o,e,t){const i=Ge.get(bi),n=i.getLanguageIdByMimeType(e)||e;return bW(Ge.get(Si),i,o,n,t)}function rpe(o,e){const t=Ge.get(bi),i=t.getLanguageIdByMimeType(e)||e||Ko;o.setLanguage(t.createById(i))}function ape(o,e,t){o&&Ge.get(Yl).changeOne(e,o.uri,t)}function lpe(o){Ge.get(Yl).changeAll(o,[])}function dpe(o){return Ge.get(Yl).read(o)}function cpe(o){return Ge.get(Yl).onMarkerChanged(o)}function upe(o){return Ge.get(Si).getModel(o)}function hpe(){return Ge.get(Si).getModels()}function gpe(o){return Ge.get(Si).onModelAdded(o)}function fpe(o){return Ge.get(Si).onModelRemoved(o)}function ppe(o){return Ge.get(Si).onModelLanguageChanged(t=>{o({model:t.model,oldLanguage:t.oldLanguageId})})}function mpe(o){return uee(Ge.get(Si),Ge.get(si),o)}function _pe(o,e){const t=Ge.get(bi),i=Ge.get(Jo);return zM.colorizeElement(i,t,o,e).then(()=>{i.registerEditorContainer(o)})}function vpe(o,e,t){const i=Ge.get(bi);return Ge.get(Jo).registerEditorContainer(Ai.document.body),zM.colorize(i,o,e,t)}function bpe(o,e,t=4){return Ge.get(Jo).registerEditorContainer(Ai.document.body),zM.colorizeModelLine(o,e,t)}function Cpe(o){const e=Ei.get(o);return e||{getInitialState:()=>Tp,tokenize:(t,i,n)=>WM(o,n)}}function wpe(o,e){Ei.getOrCreate(e);const t=Cpe(e),i=Rl(o),n=[];let s=t.getInitialState();for(let r=0,a=i.length;r{var s;if(!i)return null;const r=(s=t.options)===null||s===void 0?void 0:s.selection;let a;return r&&typeof r.endLineNumber=="number"&&typeof r.endColumn=="number"?a=r:r&&(a={lineNumber:r.startLineNumber,column:r.startColumn}),await o.openCodeEditor(i,t.resource,a)?i:null})}function Ipe(){return{create:Zfe,getEditors:Qfe,getDiffEditors:Jfe,onDidCreateEditor:Yfe,onDidCreateDiffEditor:Xfe,createDiffEditor:epe,addCommand:ipe,addEditorAction:npe,addKeybindingRule:spe,addKeybindingRules:wW,createModel:ope,setModelLanguage:rpe,setModelMarkers:ape,getModelMarkers:dpe,removeAllMarkers:lpe,onDidChangeMarkers:cpe,getModels:hpe,getModel:upe,onDidCreateModel:gpe,onWillDisposeModel:fpe,onDidChangeModelLanguage:ppe,createWebWorker:mpe,colorizeElement:_pe,colorize:vpe,colorizeModelLine:bpe,tokenize:wpe,defineTheme:Spe,setTheme:ype,remeasureFonts:Lpe,registerCommand:Dpe,registerLinkOpener:xpe,registerEditorOpener:kpe,AccessibilitySupport:zk,ContentWidgetPositionPreference:Gk,CursorChangeReason:Zk,DefaultEndOfLine:Yk,EditorAutoIndentStrategy:Qk,EditorOption:Jk,EndOfLinePreference:eI,EndOfLineSequence:tI,MinimapPosition:cI,MouseTargetType:uI,OverlayWidgetPositionPreference:hI,OverviewRulerLane:gI,GlyphMarginLane:iI,RenderLineNumbersType:pI,RenderMinimap:mI,ScrollbarVisibility:vI,ScrollType:_I,TextEditorCursorBlinkingStyle:LI,TextEditorCursorStyle:DI,TrackedRangeStickiness:xI,WrappingIndent:kI,InjectedTextCursorStops:sI,PositionAffinity:fI,ShowAiIconMode:CI,ConfigurationChangedEvent:Z9,BareFontInfo:Fh,FontInfo:NI,TextModelResolvedOptions:b1,FindMatch:Ev,ApplyUpdateResult:P_,EditorZoom:sr,createMultiFileDiffEditor:tpe,EditorType:i0,EditorOptions:Oa}}function Epe(o,e){if(!e||!Array.isArray(e))return!1;for(const t of e)if(!o(t))return!1;return!0}function OC(o,e){return typeof o=="boolean"?o:e}function Y5(o,e){return typeof o=="string"?o:e}function Npe(o){const e={};for(const t of o)e[t]=!0;return e}function X5(o,e=!1){e&&(o=o.map(function(i){return i.toLowerCase()}));const t=Npe(o);return e?function(i){return t[i.toLowerCase()]!==void 0&&t.hasOwnProperty(i.toLowerCase())}:function(i){return t[i]!==void 0&&t.hasOwnProperty(i)}}function tT(o,e){e=e.replace(/@@/g,"");let t=0,i;do i=!1,e=e.replace(/@(\w+)/g,function(s,r){i=!0;let a="";if(typeof o[r]=="string")a=o[r];else if(o[r]&&o[r]instanceof RegExp)a=o[r].source;else throw o[r]===void 0?hi(o,"language definition does not contain attribute '"+r+"', used at: "+e):hi(o,"attribute reference '"+r+"' must be a string, used at: "+e);return pf(a)?"":"(?:"+a+")"}),t++;while(i&&t<5);e=e.replace(/\x01/g,"@");const n=(o.ignoreCase?"i":"")+(o.unicode?"u":"");return new RegExp(e,n)}function Tpe(o,e,t,i){if(i<0)return o;if(i=100){i=i-100;const n=t.split(".");if(n.unshift(t),i=0&&(i.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")i.bracket=1;else if(t.bracket==="@close")i.bracket=-1;else throw hi(o,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw hi(o,"the next state must be a string value in rule: "+e);{let n=t.next;if(!/^(@pop|@push|@popall)$/.test(n)&&(n[0]==="@"&&(n=n.substr(1)),n.indexOf("$")<0&&!Nee(o,vc(o,n,"",[],""))))throw hi(o,"the next state '"+t.next+"' is not defined in rule: "+e);i.next=n}}return typeof t.goBack=="number"&&(i.goBack=t.goBack),typeof t.switchTo=="string"&&(i.switchTo=t.switchTo),typeof t.log=="string"&&(i.log=t.log),typeof t.nextEmbedded=="string"&&(i.nextEmbedded=t.nextEmbedded,o.usesEmbedded=!0),i}}else if(Array.isArray(t)){const i=[];for(let n=0,s=t.length;n0&&i[0]==="^",this.name=this.name+": "+i,this.regex=tT(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=iT(e,this.name,t)}}function SW(o,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");const t={};t.languageId=o,t.includeLF=OC(e.includeLF,!1),t.noThrow=!1,t.maxStack=100,t.start=typeof e.start=="string"?e.start:null,t.ignoreCase=OC(e.ignoreCase,!1),t.unicode=OC(e.unicode,!1),t.tokenPostfix=Y5(e.tokenPostfix,"."+t.languageId),t.defaultToken=Y5(e.defaultToken,"source"),t.usesEmbedded=!1;const i=e;i.languageId=o,i.includeLF=t.includeLF,i.ignoreCase=t.ignoreCase,i.unicode=t.unicode,i.noThrow=t.noThrow,i.usesEmbedded=t.usesEmbedded,i.stateNames=e.tokenizer,i.defaultToken=t.defaultToken;function n(r,a,l){for(const d of l){let c=d.include;if(c){if(typeof c!="string")throw hi(t,"an 'include' attribute must be a string at: "+r);if(c[0]==="@"&&(c=c.substr(1)),!e.tokenizer[c])throw hi(t,"include target '"+c+"' is not defined at: "+r);n(r+"."+c,a,e.tokenizer[c])}else{const u=new Ape(r);if(Array.isArray(d)&&d.length>=1&&d.length<=3)if(u.setRegex(i,d[0]),d.length>=3)if(typeof d[1]=="string")u.setAction(i,{token:d[1],next:d[2]});else if(typeof d[1]=="object"){const h=d[1];h.next=d[2],u.setAction(i,h)}else throw hi(t,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+r);else u.setAction(i,d[1]);else{if(!d.regex)throw hi(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+r);d.name&&typeof d.name=="string"&&(u.name=d.name),d.matchOnlyAtStart&&(u.matchOnlyAtLineStart=OC(d.matchOnlyAtLineStart,!1)),u.setRegex(i,d.regex),u.setAction(i,d.action)}a.push(u)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw hi(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(const r in e.tokenizer)if(e.tokenizer.hasOwnProperty(r)){t.start||(t.start=r);const a=e.tokenizer[r];t.tokenizer[r]=new Array,n("tokenizer."+r,t.tokenizer[r],a)}if(t.usesEmbedded=i.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw hi(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const s=[];for(const r of e.brackets){let a=r;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw hi(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+` + hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:$c(t,a.open),close:$c(t,a.close)});else throw hi(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}function Rpe(o){Ip.registerLanguage(o)}function Ppe(){let o=[];return o=o.concat(Ip.getLanguages()),o}function Ope(o){return Ge.get(bi).languageIdCodec.encodeLanguageId(o)}function Fpe(o,e){return Ge.withServices(()=>{const i=Ge.get(bi).onDidRequestRichLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function Bpe(o,e){return Ge.withServices(()=>{const i=Ge.get(bi).onDidRequestBasicLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function Wpe(o,e){if(!Ge.get(bi).isRegisteredLanguageId(o))throw new Error(`Cannot set configuration for unknown language ${o}`);return Ge.get(si).register(o,e,100)}class Vpe{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if(typeof this._actual.tokenize=="function")return Cb.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new ly(n.tokens,n.endState)}}class Cb{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let s=0,r=e.length;s0&&s[r-1]===h)continue;let g=u.startIndex;d===0?g=0:g{const i=await Promise.resolve(e.create());return i?Hpe(i)?LW(o,i):new Ov(Ge.get(bi),Ge.get(Jo),o,SW(o,i),Ge.get(Dt)):null});return Ei.registerFactory(o,t)}function Upe(o,e){if(!Ge.get(bi).isRegisteredLanguageId(o))throw new Error(`Cannot set tokens provider for unknown language ${o}`);return yW(e)?CR(o,{create:()=>e}):Ei.register(o,LW(o,e))}function jpe(o,e){const t=i=>new Ov(Ge.get(bi),Ge.get(Jo),o,SW(o,i),Ge.get(Dt));return yW(e)?CR(o,{create:()=>e}):Ei.register(o,t(e))}function Kpe(o,e){return Ge.get(Me).referenceProvider.register(o,e)}function qpe(o,e){return Ge.get(Me).renameProvider.register(o,e)}function Gpe(o,e){return Ge.get(Me).signatureHelpProvider.register(o,e)}function Zpe(o,e){return Ge.get(Me).hoverProvider.register(o,{provideHover:(i,n,s)=>{const r=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s)).then(a=>{if(a)return!a.range&&r&&(a.range=new k(n.lineNumber,r.startColumn,n.lineNumber,r.endColumn)),a.range||(a.range=new k(n.lineNumber,n.column,n.lineNumber,n.column)),a})}})}function Ype(o,e){return Ge.get(Me).documentSymbolProvider.register(o,e)}function Xpe(o,e){return Ge.get(Me).documentHighlightProvider.register(o,e)}function Qpe(o,e){return Ge.get(Me).linkedEditingRangeProvider.register(o,e)}function Jpe(o,e){return Ge.get(Me).definitionProvider.register(o,e)}function eme(o,e){return Ge.get(Me).implementationProvider.register(o,e)}function tme(o,e){return Ge.get(Me).typeDefinitionProvider.register(o,e)}function ime(o,e){return Ge.get(Me).codeLensProvider.register(o,e)}function nme(o,e,t){return Ge.get(Me).codeActionProvider.register(o,{providedCodeActionKinds:t==null?void 0:t.providedCodeActionKinds,documentation:t==null?void 0:t.documentation,provideCodeActions:(n,s,r,a)=>{const d=Ge.get(Yl).read({resource:n.uri}).filter(c=>k.areIntersectingOrTouching(c,s));return e.provideCodeActions(n,s,{markers:d,only:r.only,trigger:r.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function sme(o,e){return Ge.get(Me).documentFormattingEditProvider.register(o,e)}function ome(o,e){return Ge.get(Me).documentRangeFormattingEditProvider.register(o,e)}function rme(o,e){return Ge.get(Me).onTypeFormattingEditProvider.register(o,e)}function ame(o,e){return Ge.get(Me).linkProvider.register(o,e)}function lme(o,e){return Ge.get(Me).completionProvider.register(o,e)}function dme(o,e){return Ge.get(Me).colorProvider.register(o,e)}function cme(o,e){return Ge.get(Me).foldingRangeProvider.register(o,e)}function ume(o,e){return Ge.get(Me).declarationProvider.register(o,e)}function hme(o,e){return Ge.get(Me).selectionRangeProvider.register(o,e)}function gme(o,e){return Ge.get(Me).documentSemanticTokensProvider.register(o,e)}function fme(o,e){return Ge.get(Me).documentRangeSemanticTokensProvider.register(o,e)}function pme(o,e){return Ge.get(Me).inlineCompletionsProvider.register(o,e)}function mme(o,e){return Ge.get(Me).inlayHintsProvider.register(o,e)}function _me(){return{register:Rpe,getLanguages:Ppe,onLanguage:Fpe,onLanguageEncountered:Bpe,getEncodedLanguageId:Ope,setLanguageConfiguration:Wpe,setColorMap:$pe,registerTokensProviderFactory:CR,setTokensProvider:Upe,setMonarchTokensProvider:jpe,registerReferenceProvider:Kpe,registerRenameProvider:qpe,registerCompletionItemProvider:lme,registerSignatureHelpProvider:Gpe,registerHoverProvider:Zpe,registerDocumentSymbolProvider:Ype,registerDocumentHighlightProvider:Xpe,registerLinkedEditingRangeProvider:Qpe,registerDefinitionProvider:Jpe,registerImplementationProvider:eme,registerTypeDefinitionProvider:tme,registerCodeLensProvider:ime,registerCodeActionProvider:nme,registerDocumentFormattingEditProvider:sme,registerDocumentRangeFormattingEditProvider:ome,registerOnTypeFormattingEditProvider:rme,registerLinkProvider:ame,registerColorProvider:dme,registerFoldingRangeProvider:cme,registerDeclarationProvider:ume,registerSelectionRangeProvider:hme,registerDocumentSemanticTokensProvider:gme,registerDocumentRangeSemanticTokensProvider:fme,registerInlineCompletionsProvider:pme,registerInlayHintsProvider:mme,DocumentHighlightKind:Xk,CompletionItemKind:jk,CompletionItemTag:Kk,CompletionItemInsertTextRule:Uk,SymbolKind:SI,SymbolTag:yI,IndentAction:nI,CompletionTriggerKind:qk,SignatureHelpTriggerKind:wI,InlayHintKind:oI,InlineCompletionTriggerKind:rI,CodeActionTriggerType:$k,FoldingRangeKind:Ts,SelectedSuggestionInfo:c8}}const wR=bt("IEditorCancelService"),DW=new De("cancellableOperation",!1,p("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));xt(wR,class{constructor(){this._tokens=new WeakMap}add(o,e){let t=this._tokens.get(o);t||(t=o.invokeWithinContext(n=>{const s=DW.bindTo(n.get(Xe)),r=new Ns;return{key:s,tokens:r}}),this._tokens.set(o,t));let i;return t.key.set(!0),i=t.tokens.push(e),()=>{i&&(i(),t.key.set(!t.tokens.isEmpty()),i=void 0)}}cancel(o){const e=this._tokens.get(o);if(!e)return;const t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},1);class vme extends tn{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(i=>i.get(wR).add(e,this))}dispose(){this._unregister(),super.dispose()}}we(new class extends Rn{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:DW})}runEditorCommand(o,e){o.get(wR).cancel(e)}});let xW=class nT{constructor(e,t){if(this.flags=t,this.flags&1){const i=e.getModel();this.modelVersionId=i?Xh("{0}#{1}",i.uri.toString(),i.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=e.getPosition():this.position=null,this.flags&2?this.selection=e.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof nT))return!1;const t=e;return!(this.modelVersionId!==t.modelVersionId||this.scrollLeft!==t.scrollLeft||this.scrollTop!==t.scrollTop||!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position)||!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new nT(e,this.flags))}};class bu extends vme{constructor(e,t,i,n){super(e,n),this._listener=new de,t&4&&this._listener.add(e.onDidChangeCursorPosition(s=>{(!i||!k.containsPosition(i,s.position))&&this.cancel()})),t&2&&this._listener.add(e.onDidChangeCursorSelection(s=>{(!i||!k.containsRange(i,s.selection))&&this.cancel()})),t&8&&this._listener.add(e.onDidScrollChange(s=>this.cancel())),t&1&&(this._listener.add(e.onDidChangeModel(s=>this.cancel())),this._listener.add(e.onDidChangeModelContent(s=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class SR extends tn{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}function $l(o){return o&&typeof o.getEditorType=="function"?o.getEditorType()===i0.ICodeEditor:!1}function yR(o){return o&&typeof o.getEditorType=="function"?o.getEditorType()===i0.IDiffEditor:!1}function bme(o){return!!o&&typeof o=="object"&&typeof o.onDidChangeActiveEditor=="function"}function kW(o){return $l(o)?o:yR(o)?o.getModifiedEditor():bme(o)&&$l(o.activeCodeEditor)?o.activeCodeEditor:null}class Xp{static _handleEolEdits(e,t){let i;const n=[];for(const s of t)typeof s.eol=="number"&&(i=s.eol),s.range&&typeof s.text=="string"&&n.push(s);return typeof i=="number"&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const n=Ra.capture(e),s=Xp._handleEolEdits(e,t);s.length===1&&Xp._isFullModelReplaceEdit(e,s[0])?e.executeEdits("formatEditsCommand",s.map(r=>Li.replace(k.lift(r.range),r.text))):e.executeEdits("formatEditsCommand",s.map(r=>Li.replaceMove(k.lift(r.range),r.text))),i&&e.pushUndoStop(),n.restoreRelativeVerticalPositionOfCursor(e)}}class Q5{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}class Cme{constructor(e){if(this._set=new Set,e)for(const t of e)this.add(t)}add(e){this._set.add(Q5.toKey(e))}has(e){return this._set.has(Q5.toKey(e))}}function IW(o,e,t){const i=[],n=new Cme,s=o.ordered(t);for(const a of s)i.push(a),a.extensionId&&n.add(a.extensionId);const r=e.ordered(t);for(const a of r){if(a.extensionId){if(n.has(a.extensionId))continue;n.add(a.extensionId)}i.push({displayName:a.displayName,extensionId:a.extensionId,provideDocumentFormattingEdits(l,d,c){return a.provideDocumentRangeFormattingEdits(l,l.getFullModelRange(),d,c)}})}return i}class fg{static setFormatterSelector(e){return{dispose:fg._selectors.unshift(e)}}static async select(e,t,i){if(e.length===0)return;const n=wt.first(fg._selectors);if(n)return await n(e,t,i)}}fg._selectors=new Ns;async function EW(o,e,t,i,n,s,r){const a=o.get(qe),{documentRangeFormattingEditProvider:l}=o.get(Me),d=$l(e)?e.getModel():e,c=l.ordered(d),u=await fg.select(c,d,i);u&&(n.report(u),await a.invokeFunction(wme,u,e,t,s,r))}async function wme(o,e,t,i,n,s){var r,a;const l=o.get(Qr),d=o.get(bo),c=o.get(Py);let u,h;$l(t)?(u=t.getModel(),h=new bu(t,5,void 0,n)):(u=t,h=new SR(t,n));const g=[];let f=0;for(const C of Z2(i).sort(k.compareRangesUsingStarts))f>0&&k.areIntersectingOrTouching(g[f-1],C)?g[f-1]=k.fromPositions(g[f-1].getStartPosition(),C.getEndPosition()):f=g.push(C);const m=async C=>{var w,S;d.trace("[format][provideDocumentRangeFormattingEdits] (request)",(w=e.extensionId)===null||w===void 0?void 0:w.value,C);const x=await e.provideDocumentRangeFormattingEdits(u,C,u.getFormattingOptions(),h.token)||[];return d.trace("[format][provideDocumentRangeFormattingEdits] (response)",(S=e.extensionId)===null||S===void 0?void 0:S.value,x),x},v=(C,w)=>{if(!C.length||!w.length)return!1;const S=C.reduce((x,y)=>k.plusRange(x,y.range),C[0].range);if(!w.some(x=>k.intersectRanges(S,x.range)))return!1;for(const x of C)for(const y of w)if(k.intersectRanges(x.range,y.range))return!0;return!1},_=[],b=[];try{if(typeof e.provideDocumentRangesFormattingEdits=="function"){d.trace("[format][provideDocumentRangeFormattingEdits] (request)",(r=e.extensionId)===null||r===void 0?void 0:r.value,g);const C=await e.provideDocumentRangesFormattingEdits(u,g,u.getFormattingOptions(),h.token)||[];d.trace("[format][provideDocumentRangeFormattingEdits] (response)",(a=e.extensionId)===null||a===void 0?void 0:a.value,C),b.push(C)}else{for(const C of g){if(h.token.isCancellationRequested)return!0;b.push(await m(C))}for(let C=0;C({text:S.text,range:k.lift(S.range),forceMoveMarkers:!0})),S=>{for(const{range:x}of S)if(k.areIntersectingOrTouching(x,w))return[new Ae(x.startLineNumber,x.startColumn,x.endLineNumber,x.endColumn)];return null})}return c.notify("format",s),!0}async function Sme(o,e,t,i,n,s){const r=o.get(qe),a=o.get(Me),l=$l(e)?e.getModel():e,d=IW(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,l),c=await fg.select(d,l,t);c&&(i.report(c),await r.invokeFunction(yme,c,e,t,n,s))}async function yme(o,e,t,i,n,s){const r=o.get(Qr),a=o.get(Py);let l,d;$l(t)?(l=t.getModel(),d=new bu(t,5,void 0,n)):(l=t,d=new SR(t,n));let c;try{const u=await e.provideDocumentFormattingEdits(l,l.getFormattingOptions(),d.token);if(c=await r.computeMoreMinimalEdits(l.uri,u),d.token.isCancellationRequested)return!0}finally{d.dispose()}if(!c||c.length===0)return!1;if($l(t))Xp.execute(t,c,i!==2),i!==2&&t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1);else{const[{range:u}]=c,h=new Ae(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn);l.pushEditOperations([h],c.map(g=>({text:g.text,range:k.lift(g.range),forceMoveMarkers:!0})),g=>{for(const{range:f}of g)if(k.areIntersectingOrTouching(f,h))return[new Ae(f.startLineNumber,f.startColumn,f.endLineNumber,f.endColumn)];return null})}return a.notify("format",s),!0}async function Lme(o,e,t,i,n,s){const r=e.documentRangeFormattingEditProvider.ordered(t);for(const a of r){const l=await Promise.resolve(a.provideDocumentRangeFormattingEdits(t,i,n,s)).catch(en);if(ls(l))return await o.computeMoreMinimalEdits(t.uri,l)}}async function Dme(o,e,t,i,n){const s=IW(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,t);for(const r of s){const a=await Promise.resolve(r.provideDocumentFormattingEdits(t,i,n)).catch(en);if(ls(a))return await o.computeMoreMinimalEdits(t.uri,a)}}function NW(o,e,t,i,n,s,r){const a=e.onTypeFormattingEditProvider.ordered(t);return a.length===0||a[0].autoFormatTriggerCharacters.indexOf(n)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,i,n,s,r)).catch(en).then(l=>o.computeMoreMinimalEdits(t.uri,l))}Et.registerCommand("_executeFormatRangeProvider",async function(o,...e){const[t,i,n]=e;qt(ze.isUri(t)),qt(k.isIRange(i));const s=o.get(Xs),r=o.get(Qr),a=o.get(Me),l=await s.createModelReference(t);try{return Lme(r,a,l.object.textEditorModel,k.lift(i),n,vt.None)}finally{l.dispose()}});Et.registerCommand("_executeFormatDocumentProvider",async function(o,...e){const[t,i]=e;qt(ze.isUri(t));const n=o.get(Xs),s=o.get(Qr),r=o.get(Me),a=await n.createModelReference(t);try{return Dme(s,r,a.object.textEditorModel,i,vt.None)}finally{a.dispose()}});Et.registerCommand("_executeFormatOnTypeProvider",async function(o,...e){const[t,i,n,s]=e;qt(ze.isUri(t)),qt(z.isIPosition(i)),qt(typeof n=="string");const r=o.get(Xs),a=o.get(Qr),l=o.get(Me),d=await r.createModelReference(t);try{return NW(a,l,d.object.textEditorModel,z.lift(i),n,s,vt.None)}finally{d.dispose()}});Oa.wrappingIndent.defaultValue=0;Oa.glyphMargin.defaultValue=!1;Oa.autoIndent.defaultValue=3;Oa.overviewRulerLanes.defaultValue=2;fg.setFormatterSelector((o,e,t)=>Promise.resolve(o[0]));const Bs=u8();Bs.editor=Ipe();Bs.languages=_me();const xme=Bs.CancellationTokenSource,kme=Bs.Emitter,Ime=Bs.KeyCode,Eme=Bs.KeyMod,Nme=Bs.Position,Tme=Bs.Range,Mme=Bs.Selection,Ame=Bs.SelectionDirection,Rme=Bs.MarkerSeverity,Pme=Bs.MarkerTag,Ome=Bs.Uri,Fme=Bs.Token,sT=Bs.editor,Bme=Bs.languages,ek=globalThis.MonacoEnvironment;(ek!=null&&ek.globalAPI||typeof define=="function"&&define.amd)&&(globalThis.monaco=Bs);typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});const k0=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:xme,Emitter:kme,KeyCode:Ime,KeyMod:Eme,MarkerSeverity:Rme,MarkerTag:Pme,Position:Nme,Range:Tme,Selection:Mme,SelectionDirection:Ame,Token:Fme,Uri:Ome,editor:sT,languages:Bme},Symbol.toStringTag,{value:"Module"}));/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var Pme=Object.defineProperty,Ome=Object.getOwnPropertyDescriptor,Fme=Object.getOwnPropertyNames,Bme=Object.prototype.hasOwnProperty,Wme=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Fme(e))!Bme.call(o,n)&&n!==t&&Pme(o,n,{get:()=>e[n],enumerable:!(i=Ome(e,n))||i.enumerable});return o},Vme=(o,e,t)=>(Wme(o,e,"default"),t),I_={};Vme(I_,k0);var TW={},tk={},MW=class{constructor(o){ri(this,"_languageId");ri(this,"_loadingTriggered");ri(this,"_lazyLoadPromise");ri(this,"_lazyLoadPromiseResolve");ri(this,"_lazyLoadPromiseReject");this._languageId=o,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(o){return tk[o]||(tk[o]=new MW(o)),tk[o]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,TW[this._languageId].loader().then(o=>this._lazyLoadPromiseResolve(o),o=>this._lazyLoadPromiseReject(o))),this._lazyLoadPromise}};function Ve(o){const e=o.id;TW[e]=o,I_.languages.register(o);const t=MW.getOrCreate(e);I_.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),I_.languages.onLanguageEncountered(e,async()=>{const i=await t.load();I_.languages.setLanguageConfiguration(e,i.conf)})}Ve({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Oe(()=>import("./abap-HeDQy6fh.js"),[])});Ve({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Oe(()=>import("./apex-CbmXAvAW.js"),[])});Ve({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Oe(()=>import("./azcli-BPy9tPO_.js"),[])});Ve({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Oe(()=>import("./bat-C2kkMZXD.js"),[])});Ve({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Oe(()=>import("./bicep-STK2XETz.js"),[])});Ve({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Oe(()=>import("./cameligo-D88lnp7m.js"),[])});Ve({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Oe(()=>import("./clojure-BVXjUq6W.js"),[])});Ve({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Oe(()=>import("./coffee-BRG4GrUX.js"),[])});Ve({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Oe(()=>import("./cpp-DeB58NaV.js"),[])});Ve({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Oe(()=>import("./cpp-DeB58NaV.js"),[])});Ve({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Oe(()=>import("./csharp-DWSjX1vK.js"),[])});Ve({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>Oe(()=>import("./csp-C2dP3GFv.js"),[])});Ve({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Oe(()=>import("./css-1NjUY7wv.js"),[])});Ve({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>Oe(()=>import("./cypher-CvujjWtm.js"),[])});Ve({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Oe(()=>import("./dart-BE_rHeGz.js"),[])});Ve({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Oe(()=>import("./dockerfile-DU9BjHlP.js"),[])});Ve({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Oe(()=>import("./ecl-hUW-QHbE.js"),[])});Ve({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Oe(()=>import("./elixir-BAkJxX25.js"),[])});Ve({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Oe(()=>import("./flow9-C5jFnEuB.js"),[])});Ve({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Oe(()=>import("./fsharp-CCzPE5Ie.js"),[])});Ve({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Oe(()=>import("./freemarker2-CkAicm6I.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(o=>o.TagAutoInterpolationDollar)});Ve({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Oe(()=>import("./freemarker2-CkAicm6I.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(o=>o.TagAngleInterpolationDollar)});Ve({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Oe(()=>import("./freemarker2-CkAicm6I.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(o=>o.TagBracketInterpolationDollar)});Ve({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Oe(()=>import("./freemarker2-CkAicm6I.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(o=>o.TagAngleInterpolationBracket)});Ve({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Oe(()=>import("./freemarker2-CkAicm6I.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(o=>o.TagBracketInterpolationBracket)});Ve({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Oe(()=>import("./freemarker2-CkAicm6I.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(o=>o.TagAutoInterpolationDollar)});Ve({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Oe(()=>import("./freemarker2-CkAicm6I.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(o=>o.TagAutoInterpolationBracket)});Ve({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Oe(()=>import("./go-BJDrqb1l.js"),[])});Ve({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Oe(()=>import("./graphql-DeqjH8oo.js"),[])});Ve({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Oe(()=>import("./handlebars-C5uyFx9F.js"),__vite__mapDeps([9,1,2,3,4,5,6,7,8]))});Ve({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Oe(()=>import("./hcl-fhYSe8Ik.js"),[])});Ve({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>Oe(()=>import("./html-D2gt6e4j.js"),__vite__mapDeps([10,1,2,3,4,5,6,7,8]))});Ve({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Oe(()=>import("./ini-bfKW7yAs.js"),[])});Ve({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Oe(()=>import("./java-89tSEgoR.js"),[])});Ve({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Oe(()=>import("./javascript-DjmYe7rk.js"),__vite__mapDeps([11,12,1,2,3,4,5,6,7,8]))});Ve({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Oe(()=>import("./julia-CULLjdBi.js"),[])});Ve({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Oe(()=>import("./kotlin-bF-WLz8W.js"),[])});Ve({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Oe(()=>import("./less-BcX_owYs.js"),[])});Ve({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Oe(()=>import("./lexon-Bgb1VazO.js"),[])});Ve({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Oe(()=>import("./lua-D4wIloCQ.js"),[])});Ve({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Oe(()=>import("./liquid-BpyfeEKH.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,8]))});Ve({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Oe(()=>import("./m3-CIXVZ5K0.js"),[])});Ve({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Oe(()=>import("./markdown-C2pIiAgT.js"),[])});Ve({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>Oe(()=>import("./mdx-DyHo1t2K.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,8]))});Ve({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Oe(()=>import("./mips-DDY3B9Me.js"),[])});Ve({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Oe(()=>import("./msdax-BVGHujNV.js"),[])});Ve({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Oe(()=>import("./mysql-wocE9kcw.js"),[])});Ve({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Oe(()=>import("./objective-c-B7y1xvNi.js"),[])});Ve({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Oe(()=>import("./pascal-6_Qmrcj5.js"),[])});Ve({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Oe(()=>import("./pascaligo-Y4zGRFv3.js"),[])});Ve({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>Oe(()=>import("./perl-BvZxJ37z.js"),[])});Ve({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Oe(()=>import("./pgsql-CHFmffvM.js"),[])});Ve({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Oe(()=>import("./php-BIcBwoxY.js"),[])});Ve({id:"pla",extensions:[".pla"],loader:()=>Oe(()=>import("./pla-CjQQiOJm.js"),[])});Ve({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Oe(()=>import("./postiats-B_GcsHt8.js"),[])});Ve({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Oe(()=>import("./powerquery-y2EyZOlv.js"),[])});Ve({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Oe(()=>import("./powershell-CIHf91ML.js"),[])});Ve({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Oe(()=>import("./protobuf-COTbE6tN.js"),[])});Ve({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Oe(()=>import("./pug-CIrW4JuG.js"),[])});Ve({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Oe(()=>import("./python-DPicRBVQ.js"),__vite__mapDeps([15,1,2,3,4,5,6,7,8]))});Ve({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Oe(()=>import("./qsharp-BCyDeG3W.js"),[])});Ve({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Oe(()=>import("./r-D_s1dKTl.js"),[])});Ve({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Oe(()=>import("./razor-B_0SmNCn.js"),__vite__mapDeps([16,1,2,3,4,5,6,7,8]))});Ve({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Oe(()=>import("./redis-we8ROkDz.js"),[])});Ve({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Oe(()=>import("./redshift-DQMg6JSq.js"),[])});Ve({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Oe(()=>import("./restructuredtext-DoYentzJ.js"),[])});Ve({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Oe(()=>import("./ruby-hSrJXfwP.js"),[])});Ve({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Oe(()=>import("./rust-D5UdS7wL.js"),[])});Ve({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Oe(()=>import("./sb-Bn2Vf2CV.js"),[])});Ve({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>Oe(()=>import("./scala-D-F3YBtN.js"),[])});Ve({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Oe(()=>import("./scheme-CLt6TZUf.js"),[])});Ve({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Oe(()=>import("./scss-Cn8qbFRi.js"),[])});Ve({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Oe(()=>import("./shell-Bb53obFu.js"),[])});Ve({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Oe(()=>import("./solidity-CNXlEMqq.js"),[])});Ve({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Oe(()=>import("./sophia-BXWm5v_b.js"),[])});Ve({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Oe(()=>import("./sparql-C3G7U7Rs.js"),[])});Ve({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Oe(()=>import("./sql-D_PatrnJ.js"),[])});Ve({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>Oe(()=>import("./st-Brb-FAmL.js"),[])});Ve({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Oe(()=>import("./swift-CEFhrl9k.js"),[])});Ve({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Oe(()=>import("./systemverilog-BJexHUqq.js"),[])});Ve({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Oe(()=>import("./systemverilog-BJexHUqq.js"),[])});Ve({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Oe(()=>import("./tcl-Bf9L4G3H.js"),[])});Ve({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Oe(()=>import("./twig-DdbCxuaz.js"),[])});Ve({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Oe(()=>import("./typescript-BfLRVFnk.js"),__vite__mapDeps([12,1,2,3,4,5,6,7,8]))});Ve({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Oe(()=>import("./vb-CzTmPDQx.js"),[])});Ve({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>Oe(()=>import("./wgsl-Bt_avhfa.js"),[])});Ve({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\Oe(()=>import("./xml-BJKkYGLb.js"),__vite__mapDeps([17,1,2,3,4,5,6,7,8]))});Ve({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Oe(()=>import("./yaml-DXnlxOOm.js"),__vite__mapDeps([18,1,2,3,4,5,6,7,8]))});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var Wme=Object.defineProperty,Vme=Object.getOwnPropertyDescriptor,Hme=Object.getOwnPropertyNames,zme=Object.prototype.hasOwnProperty,$me=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Hme(e))!zme.call(o,n)&&n!==t&&Wme(o,n,{get:()=>e[n],enumerable:!(i=Vme(e,n))||i.enumerable});return o},Ume=(o,e,t)=>($me(o,e,"default"),t),I_={};Ume(I_,k0);var TW={},tk={},MW=class{constructor(o){ri(this,"_languageId");ri(this,"_loadingTriggered");ri(this,"_lazyLoadPromise");ri(this,"_lazyLoadPromiseResolve");ri(this,"_lazyLoadPromiseReject");this._languageId=o,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(o){return tk[o]||(tk[o]=new MW(o)),tk[o]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,TW[this._languageId].loader().then(o=>this._lazyLoadPromiseResolve(o),o=>this._lazyLoadPromiseReject(o))),this._lazyLoadPromise}};function Ve(o){const e=o.id;TW[e]=o,I_.languages.register(o);const t=MW.getOrCreate(e);I_.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),I_.languages.onLanguageEncountered(e,async()=>{const i=await t.load();I_.languages.setLanguageConfiguration(e,i.conf)})}Ve({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Oe(()=>import("./abap-HeDQy6fh.js"),[])});Ve({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Oe(()=>import("./apex-CbmXAvAW.js"),[])});Ve({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Oe(()=>import("./azcli-BPy9tPO_.js"),[])});Ve({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Oe(()=>import("./bat-C2kkMZXD.js"),[])});Ve({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Oe(()=>import("./bicep-STK2XETz.js"),[])});Ve({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Oe(()=>import("./cameligo-D88lnp7m.js"),[])});Ve({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Oe(()=>import("./clojure-BVXjUq6W.js"),[])});Ve({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Oe(()=>import("./coffee-BRG4GrUX.js"),[])});Ve({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Oe(()=>import("./cpp-DeB58NaV.js"),[])});Ve({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Oe(()=>import("./cpp-DeB58NaV.js"),[])});Ve({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Oe(()=>import("./csharp-DWSjX1vK.js"),[])});Ve({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>Oe(()=>import("./csp-C2dP3GFv.js"),[])});Ve({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Oe(()=>import("./css-1NjUY7wv.js"),[])});Ve({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>Oe(()=>import("./cypher-CvujjWtm.js"),[])});Ve({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Oe(()=>import("./dart-BE_rHeGz.js"),[])});Ve({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Oe(()=>import("./dockerfile-DU9BjHlP.js"),[])});Ve({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Oe(()=>import("./ecl-hUW-QHbE.js"),[])});Ve({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Oe(()=>import("./elixir-BAkJxX25.js"),[])});Ve({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Oe(()=>import("./flow9-C5jFnEuB.js"),[])});Ve({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Oe(()=>import("./fsharp-CCzPE5Ie.js"),[])});Ve({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Oe(()=>import("./freemarker2-C7VanfqX.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(o=>o.TagAutoInterpolationDollar)});Ve({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Oe(()=>import("./freemarker2-C7VanfqX.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(o=>o.TagAngleInterpolationDollar)});Ve({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Oe(()=>import("./freemarker2-C7VanfqX.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(o=>o.TagBracketInterpolationDollar)});Ve({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Oe(()=>import("./freemarker2-C7VanfqX.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(o=>o.TagAngleInterpolationBracket)});Ve({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Oe(()=>import("./freemarker2-C7VanfqX.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(o=>o.TagBracketInterpolationBracket)});Ve({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Oe(()=>import("./freemarker2-C7VanfqX.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(o=>o.TagAutoInterpolationDollar)});Ve({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Oe(()=>import("./freemarker2-C7VanfqX.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(o=>o.TagAutoInterpolationBracket)});Ve({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Oe(()=>import("./go-BJDrqb1l.js"),[])});Ve({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Oe(()=>import("./graphql-DeqjH8oo.js"),[])});Ve({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Oe(()=>import("./handlebars-Ce5o-Jd2.js"),__vite__mapDeps([9,1,2,3,4,5,6,7,8]))});Ve({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Oe(()=>import("./hcl-fhYSe8Ik.js"),[])});Ve({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>Oe(()=>import("./html-BQBqHUj9.js"),__vite__mapDeps([10,1,2,3,4,5,6,7,8]))});Ve({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Oe(()=>import("./ini-bfKW7yAs.js"),[])});Ve({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Oe(()=>import("./java-89tSEgoR.js"),[])});Ve({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Oe(()=>import("./javascript-ClmtgjpZ.js"),__vite__mapDeps([11,12,1,2,3,4,5,6,7,8]))});Ve({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Oe(()=>import("./julia-CULLjdBi.js"),[])});Ve({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Oe(()=>import("./kotlin-bF-WLz8W.js"),[])});Ve({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Oe(()=>import("./less-BcX_owYs.js"),[])});Ve({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Oe(()=>import("./lexon-Bgb1VazO.js"),[])});Ve({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Oe(()=>import("./lua-D4wIloCQ.js"),[])});Ve({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Oe(()=>import("./liquid-jrk-G9V0.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,8]))});Ve({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Oe(()=>import("./m3-CIXVZ5K0.js"),[])});Ve({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Oe(()=>import("./markdown-C2pIiAgT.js"),[])});Ve({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>Oe(()=>import("./mdx-W_e0gsbC.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,8]))});Ve({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Oe(()=>import("./mips-DDY3B9Me.js"),[])});Ve({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Oe(()=>import("./msdax-BVGHujNV.js"),[])});Ve({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Oe(()=>import("./mysql-wocE9kcw.js"),[])});Ve({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Oe(()=>import("./objective-c-B7y1xvNi.js"),[])});Ve({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Oe(()=>import("./pascal-6_Qmrcj5.js"),[])});Ve({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Oe(()=>import("./pascaligo-Y4zGRFv3.js"),[])});Ve({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>Oe(()=>import("./perl-BvZxJ37z.js"),[])});Ve({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Oe(()=>import("./pgsql-CHFmffvM.js"),[])});Ve({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Oe(()=>import("./php-BIcBwoxY.js"),[])});Ve({id:"pla",extensions:[".pla"],loader:()=>Oe(()=>import("./pla-CjQQiOJm.js"),[])});Ve({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Oe(()=>import("./postiats-B_GcsHt8.js"),[])});Ve({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Oe(()=>import("./powerquery-y2EyZOlv.js"),[])});Ve({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Oe(()=>import("./powershell-CIHf91ML.js"),[])});Ve({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Oe(()=>import("./protobuf-COTbE6tN.js"),[])});Ve({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Oe(()=>import("./pug-CIrW4JuG.js"),[])});Ve({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Oe(()=>import("./python-CizQR6lC.js"),__vite__mapDeps([15,1,2,3,4,5,6,7,8]))});Ve({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Oe(()=>import("./qsharp-BCyDeG3W.js"),[])});Ve({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Oe(()=>import("./r-D_s1dKTl.js"),[])});Ve({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Oe(()=>import("./razor-ByehaRkx.js"),__vite__mapDeps([16,1,2,3,4,5,6,7,8]))});Ve({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Oe(()=>import("./redis-we8ROkDz.js"),[])});Ve({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Oe(()=>import("./redshift-DQMg6JSq.js"),[])});Ve({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Oe(()=>import("./restructuredtext-DoYentzJ.js"),[])});Ve({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Oe(()=>import("./ruby-hSrJXfwP.js"),[])});Ve({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Oe(()=>import("./rust-D5UdS7wL.js"),[])});Ve({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Oe(()=>import("./sb-Bn2Vf2CV.js"),[])});Ve({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>Oe(()=>import("./scala-D-F3YBtN.js"),[])});Ve({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Oe(()=>import("./scheme-CLt6TZUf.js"),[])});Ve({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Oe(()=>import("./scss-Cn8qbFRi.js"),[])});Ve({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Oe(()=>import("./shell-Bb53obFu.js"),[])});Ve({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Oe(()=>import("./solidity-CNXlEMqq.js"),[])});Ve({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Oe(()=>import("./sophia-BXWm5v_b.js"),[])});Ve({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Oe(()=>import("./sparql-C3G7U7Rs.js"),[])});Ve({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Oe(()=>import("./sql-D_PatrnJ.js"),[])});Ve({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>Oe(()=>import("./st-Brb-FAmL.js"),[])});Ve({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Oe(()=>import("./swift-CEFhrl9k.js"),[])});Ve({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Oe(()=>import("./systemverilog-BJexHUqq.js"),[])});Ve({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Oe(()=>import("./systemverilog-BJexHUqq.js"),[])});Ve({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Oe(()=>import("./tcl-Bf9L4G3H.js"),[])});Ve({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Oe(()=>import("./twig-DdbCxuaz.js"),[])});Ve({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Oe(()=>import("./typescript-DIQD8-gM.js"),__vite__mapDeps([12,1,2,3,4,5,6,7,8]))});Ve({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Oe(()=>import("./vb-CzTmPDQx.js"),[])});Ve({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>Oe(()=>import("./wgsl-Bt_avhfa.js"),[])});Ve({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\Oe(()=>import("./xml-zvgeEvYc.js"),__vite__mapDeps([17,1,2,3,4,5,6,7,8]))});Ve({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Oe(()=>import("./yaml-C5T5Ig_l.js"),__vite__mapDeps([18,1,2,3,4,5,6,7,8]))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var Hme=Object.defineProperty,zme=Object.getOwnPropertyDescriptor,$me=Object.getOwnPropertyNames,Ume=Object.prototype.hasOwnProperty,jme=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of $me(e))!Ume.call(o,n)&&n!==t&&Hme(o,n,{get:()=>e[n],enumerable:!(i=zme(e,n))||i.enumerable});return o},Kme=(o,e,t)=>(jme(o,e,"default"),t),xm={};Kme(xm,k0);var LR=class{constructor(e,t,i){ri(this,"_onDidChange",new xm.Emitter);ri(this,"_options");ri(this,"_modeConfiguration");ri(this,"_languageId");this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},DR={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},xR={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},AW=new LR("css",DR,xR),RW=new LR("scss",DR,xR),PW=new LR("less",DR,xR);xm.languages.css={cssDefaults:AW,lessDefaults:PW,scssDefaults:RW};function kR(){return Oe(()=>import("./cssMode-dU5ExThW.js"),__vite__mapDeps([19,1,2,3,4,5,6,7,8]))}xm.languages.onLanguage("less",()=>{kR().then(o=>o.setupMode(PW))});xm.languages.onLanguage("scss",()=>{kR().then(o=>o.setupMode(RW))});xm.languages.onLanguage("css",()=>{kR().then(o=>o.setupMode(AW))});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var jme=Object.defineProperty,Kme=Object.getOwnPropertyDescriptor,qme=Object.getOwnPropertyNames,Gme=Object.prototype.hasOwnProperty,Zme=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of qme(e))!Gme.call(o,n)&&n!==t&&jme(o,n,{get:()=>e[n],enumerable:!(i=Kme(e,n))||i.enumerable});return o},Yme=(o,e,t)=>(Zme(o,e,"default"),t),xm={};Yme(xm,k0);var LR=class{constructor(e,t,i){ri(this,"_onDidChange",new xm.Emitter);ri(this,"_options");ri(this,"_modeConfiguration");ri(this,"_languageId");this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},DR={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},xR={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},AW=new LR("css",DR,xR),RW=new LR("scss",DR,xR),PW=new LR("less",DR,xR);xm.languages.css={cssDefaults:AW,lessDefaults:PW,scssDefaults:RW};function kR(){return Oe(()=>import("./cssMode-CRvchvYB.js"),__vite__mapDeps([19,1,2,3,4,5,6,7,8]))}xm.languages.onLanguage("less",()=>{kR().then(o=>o.setupMode(PW))});xm.languages.onLanguage("scss",()=>{kR().then(o=>o.setupMode(RW))});xm.languages.onLanguage("css",()=>{kR().then(o=>o.setupMode(AW))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var qme=Object.defineProperty,Gme=Object.getOwnPropertyDescriptor,Zme=Object.getOwnPropertyNames,Yme=Object.prototype.hasOwnProperty,Xme=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Zme(e))!Yme.call(o,n)&&n!==t&&qme(o,n,{get:()=>e[n],enumerable:!(i=Gme(e,n))||i.enumerable});return o},Qme=(o,e,t)=>(Xme(o,e,"default"),t),LL={};Qme(LL,k0);var Jme=class{constructor(e,t,i){ri(this,"_onDidChange",new LL.Emitter);ri(this,"_options");ri(this,"_modeConfiguration");ri(this,"_languageId");this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},e_e={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},DL={format:e_e,suggest:{},data:{useDefaultDataProvider:!0}};function xL(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===nv,documentFormattingEdits:o===nv,documentRangeFormattingEdits:o===nv}}var nv="html",J5="handlebars",e3="razor",OW=kL(nv,DL,xL(nv)),t_e=OW.defaults,FW=kL(J5,DL,xL(J5)),i_e=FW.defaults,BW=kL(e3,DL,xL(e3)),n_e=BW.defaults;LL.languages.html={htmlDefaults:t_e,razorDefaults:n_e,handlebarDefaults:i_e,htmlLanguageService:OW,handlebarLanguageService:FW,razorLanguageService:BW,registerHTMLLanguageService:kL};function s_e(){return Oe(()=>import("./htmlMode-Cl5XUd21.js"),__vite__mapDeps([20,1,2,3,4,5,6,7,8]))}function kL(o,e=DL,t=xL(o)){const i=new Jme(o,e,t);let n;const s=LL.languages.onLanguage(o,async()=>{n=(await s_e()).setupMode(i)});return{defaults:i,dispose(){s.dispose(),n==null||n.dispose(),n=void 0}}}/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var Xme=Object.defineProperty,Qme=Object.getOwnPropertyDescriptor,Jme=Object.getOwnPropertyNames,e_e=Object.prototype.hasOwnProperty,t_e=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Jme(e))!e_e.call(o,n)&&n!==t&&Xme(o,n,{get:()=>e[n],enumerable:!(i=Qme(e,n))||i.enumerable});return o},i_e=(o,e,t)=>(t_e(o,e,"default"),t),LL={};i_e(LL,k0);var n_e=class{constructor(e,t,i){ri(this,"_onDidChange",new LL.Emitter);ri(this,"_options");ri(this,"_modeConfiguration");ri(this,"_languageId");this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},s_e={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},DL={format:s_e,suggest:{},data:{useDefaultDataProvider:!0}};function xL(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===nv,documentFormattingEdits:o===nv,documentRangeFormattingEdits:o===nv}}var nv="html",J5="handlebars",e3="razor",OW=kL(nv,DL,xL(nv)),o_e=OW.defaults,FW=kL(J5,DL,xL(J5)),r_e=FW.defaults,BW=kL(e3,DL,xL(e3)),a_e=BW.defaults;LL.languages.html={htmlDefaults:o_e,razorDefaults:a_e,handlebarDefaults:r_e,htmlLanguageService:OW,handlebarLanguageService:FW,razorLanguageService:BW,registerHTMLLanguageService:kL};function l_e(){return Oe(()=>import("./htmlMode-k6nyQsqC.js"),__vite__mapDeps([20,1,2,3,4,5,6,7,8]))}function kL(o,e=DL,t=xL(o)){const i=new n_e(o,e,t);let n;const s=LL.languages.onLanguage(o,async()=>{n=(await l_e()).setupMode(i)});return{defaults:i,dispose(){s.dispose(),n==null||n.dispose(),n=void 0}}}/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var o_e=Object.defineProperty,r_e=Object.getOwnPropertyDescriptor,a_e=Object.getOwnPropertyNames,l_e=Object.prototype.hasOwnProperty,d_e=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of a_e(e))!l_e.call(o,n)&&n!==t&&o_e(o,n,{get:()=>e[n],enumerable:!(i=r_e(e,n))||i.enumerable});return o},c_e=(o,e,t)=>(d_e(o,e,"default"),t),I0={};c_e(I0,k0);var u_e=class{constructor(e,t,i){ri(this,"_onDidChange",new I0.Emitter);ri(this,"_diagnosticsOptions");ri(this,"_modeConfiguration");ri(this,"_languageId");this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},h_e={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},g_e={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},WW=new u_e("json",h_e,g_e);I0.languages.json={jsonDefaults:WW};function f_e(){return Oe(()=>import("./jsonMode-DrXkewyD.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,8]))}I0.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});I0.languages.onLanguage("json",()=>{f_e().then(o=>o.setupMode(WW))});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var d_e=Object.defineProperty,c_e=Object.getOwnPropertyDescriptor,u_e=Object.getOwnPropertyNames,h_e=Object.prototype.hasOwnProperty,g_e=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of u_e(e))!h_e.call(o,n)&&n!==t&&d_e(o,n,{get:()=>e[n],enumerable:!(i=c_e(e,n))||i.enumerable});return o},f_e=(o,e,t)=>(g_e(o,e,"default"),t),I0={};f_e(I0,k0);var p_e=class{constructor(e,t,i){ri(this,"_onDidChange",new I0.Emitter);ri(this,"_diagnosticsOptions");ri(this,"_modeConfiguration");ri(this,"_languageId");this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},m_e={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},__e={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},WW=new p_e("json",m_e,__e);I0.languages.json={jsonDefaults:WW};function v_e(){return Oe(()=>import("./jsonMode-CA0blgmE.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,8]))}I0.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});I0.languages.onLanguage("json",()=>{v_e().then(o=>o.setupMode(WW))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var p_e=Object.defineProperty,m_e=Object.getOwnPropertyDescriptor,__e=Object.getOwnPropertyNames,v_e=Object.prototype.hasOwnProperty,b_e=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of __e(e))!v_e.call(o,n)&&n!==t&&p_e(o,n,{get:()=>e[n],enumerable:!(i=m_e(e,n))||i.enumerable});return o},C_e=(o,e,t)=>(b_e(o,e,"default"),t),w_e="5.0.2",Qp={};C_e(Qp,k0);var VW=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(VW||{}),HW=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(HW||{}),zW=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(zW||{}),$W=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))($W||{}),UW=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(UW||{}),jW=class{constructor(o,e,t,i,n){ri(this,"_onDidChange",new Qp.Emitter);ri(this,"_onDidExtraLibsChange",new Qp.Emitter);ri(this,"_extraLibs");ri(this,"_removedExtraLibs");ri(this,"_eagerModelSync");ri(this,"_compilerOptions");ri(this,"_diagnosticsOptions");ri(this,"_workerOptions");ri(this,"_onDidExtraLibsChangeTimeout");ri(this,"_inlayHintsOptions");ri(this,"_modeConfiguration");this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(o),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this.setModeConfiguration(n),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(o,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===o)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(i=this._extraLibs[t].version+1),this._extraLibs[t]={content:o,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let n=this._extraLibs[t];n&&n.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(o){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),o&&o.length>0)for(const e of o){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let n=1;this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(o){this._compilerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(o){this._diagnosticsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(o){this._workerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(o){this._inlayHintsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(o){}setEagerModelSync(o){this._eagerModelSync=o}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(void 0)}},S_e=w_e,KW={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},qW=new jW({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},KW),GW=new jW({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},KW),y_e=()=>IL().then(o=>o.getTypeScriptWorker()),L_e=()=>IL().then(o=>o.getJavaScriptWorker());Qp.languages.typescript={ModuleKind:VW,JsxEmit:HW,NewLineKind:zW,ScriptTarget:$W,ModuleResolutionKind:UW,typescriptVersion:S_e,typescriptDefaults:qW,javascriptDefaults:GW,getTypeScriptWorker:y_e,getJavaScriptWorker:L_e};function IL(){return Oe(()=>import("./tsMode-CA06cS6L.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,8]))}Qp.languages.onLanguage("typescript",()=>IL().then(o=>o.setupTypeScript(qW)));Qp.languages.onLanguage("javascript",()=>IL().then(o=>o.setupJavaScript(GW)));class D_e extends Qo{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:{value:p("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),original:"Toggle Collapse Unchanged Regions"},icon:ve.map,toggled:ae.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:ae.has("isInDiffEditor"),menu:{when:ae.has("isInDiffEditor"),id:N.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(Dt),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}mi(D_e);class ZW extends Qo{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:{value:p("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),original:"Toggle Show Moved Code Blocks"},precondition:ae.has("isInDiffEditor")})}run(e,...t){const i=e.get(Dt),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}mi(ZW);class YW extends Qo{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:{value:p("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),original:"Toggle Use Inline View When Space Is Limited"},precondition:ae.has("isInDiffEditor")})}run(e,...t){const i=e.get(Dt),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}mi(YW);zn.appendMenuItem(N.EditorTitle,{command:{id:new YW().desc.id,title:p("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:ae.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:ae.has("isInDiffEditor")},order:11,group:"1_diff",when:ae.and(T.diffEditorRenderSideBySideInlineBreakpointReached,ae.has("isInDiffEditor"))});zn.appendMenuItem(N.EditorTitle,{command:{id:new ZW().desc.id,title:p("showMoves","Show Moved Code Blocks"),icon:ve.move,toggled:gm.create("config.diffEditor.experimental.showMoves",!0),precondition:ae.has("isInDiffEditor")},order:10,group:"1_diff",when:ae.has("isInDiffEditor")});const EL={value:p("diffEditor","Diff Editor"),original:"Diff Editor"};class x_e extends Wa{constructor(){super({id:"diffEditor.switchSide",title:{value:p("switchSide","Switch Side"),original:"Switch Side"},icon:ve.arrowSwap,precondition:ae.has("isInDiffEditor"),f1:!0,category:EL})}runEditorCommand(e,t,i){const n=Im(e);if(n instanceof vu){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}mi(x_e);class k_e extends Wa{constructor(){super({id:"diffEditor.exitCompareMove",title:{value:p("exitCompareMove","Exit Compare Move"),original:"Exit Compare Move"},icon:ve.close,precondition:T.comparingMovedCode,f1:!1,category:EL,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=Im(e);n instanceof vu&&n.exitCompareMove()}}mi(k_e);class I_e extends Wa{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:{value:p("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),original:"Collapse All Unchanged Regions"},icon:ve.fold,precondition:ae.has("isInDiffEditor"),f1:!0,category:EL})}runEditorCommand(e,t,...i){const n=Im(e);n instanceof vu&&n.collapseAllUnchangedRegions()}}mi(I_e);class E_e extends Wa{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:{value:p("showAllUnchangedRegions","Show All Unchanged Regions"),original:"Show All Unchanged Regions"},icon:ve.unfold,precondition:ae.has("isInDiffEditor"),f1:!0,category:EL})}runEditorCommand(e,t,...i){const n=Im(e);n instanceof vu&&n.showAllUnchangedRegions()}}mi(E_e);const XW={value:p("accessibleDiffViewer","Accessible Diff Viewer"),original:"Accessible Diff Viewer"};class km extends Qo{constructor(){super({id:km.id,title:{value:p("editor.action.accessibleDiffViewer.next","Go to Next Difference"),original:"Go to Next Difference"},category:XW,precondition:ae.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=Im(e);t==null||t.accessibleDiffViewerNext()}}km.id="editor.action.accessibleDiffViewer.next";zn.appendMenuItem(N.EditorTitle,{command:{id:km.id,title:p("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:ae.has("isInDiffEditor")},order:10,group:"2_diff",when:ae.and(T.accessibleDiffViewerVisible.negate(),ae.has("isInDiffEditor"))});class E0 extends Qo{constructor(){super({id:E0.id,title:{value:p("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),original:"Go to Previous Difference"},category:XW,precondition:ae.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=Im(e);t==null||t.accessibleDiffViewerPrev()}}E0.id="editor.action.accessibleDiffViewer.prev";function Im(o){var e;const t=o.get(Ot),i=t.listDiffEditors(),n=(e=t.getFocusedCodeEditor())!==null&&e!==void 0?e:t.getActiveCodeEditor();if(!n)return null;for(let r=0,a=i.length;r=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},M_e=function(o,e){return function(t,i){e(t,i,o)}},oT;const NL=new De("selectionAnchorSet",!1);let $d=oT=class{static get(e){return e.getContribution(oT.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=NL.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(Re.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new as().appendText(p("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),mo(p("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(Re.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};$d.ID="editor.contrib.selectionAnchorController";$d=oT=T_e([M_e(1,Xe)],$d);class A_e extends Te{constructor(){super({id:"editor.action.setSelectionAnchor",label:p("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2080),weight:100}})}async run(e,t){var i;(i=$d.get(t))===null||i===void 0||i.setSelectionAnchor()}}class R_e extends Te{constructor(){super({id:"editor.action.goToSelectionAnchor",label:p("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:NL})}async run(e,t){var i;(i=$d.get(t))===null||i===void 0||i.goToSelectionAnchor()}}class P_e extends Te{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:p("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:NL,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2089),weight:100}})}async run(e,t){var i;(i=$d.get(t))===null||i===void 0||i.selectFromAnchorToCursor()}}class O_e extends Te{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:p("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:NL,kbOpts:{kbExpr:T.editorTextFocus,primary:9,weight:100}})}async run(e,t){var i;(i=$d.get(t))===null||i===void 0||i.cancelSelectionAnchor()}}At($d.ID,$d,4);_e(A_e);_e(R_e);_e(P_e);_e(O_e);const F_e=M("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},p("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class B_e extends Te{constructor(){super({id:"editor.action.jumpToBracket",label:p("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:3165,weight:100}})}run(e,t){var i;(i=$r.get(t))===null||i===void 0||i.jumpToBracket()}}class W_e extends Te{constructor(){super({id:"editor.action.selectToBracket",label:p("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:cG("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var n;let s=!0;i&&i.selectBrackets===!1&&(s=!1),(n=$r.get(t))===null||n===void 0||n.selectToBracket(s)}}class V_e extends Te{constructor(){super({id:"editor.action.removeBrackets",label:p("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:2561,weight:100}})}run(e,t){var i;(i=$r.get(t))===null||i===void 0||i.removeBrackets(this.id)}}class H_e{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class $r extends q{static get(e){return e.getContribution($r.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Yt(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(71),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(71)&&(this._matchBrackets=this._editor.getOption(71),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const n=i.getStartPosition(),s=e.bracketPairs.matchBracket(n);let r=null;if(s)s[0].containsPosition(n)&&!s[1].containsPosition(n)?r=s[1].getStartPosition():s[1].containsPosition(n)&&(r=s[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(n);if(a)r=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(n);l&&l.range&&(r=l.range.getStartPosition())}}return r?new Re(r.lineNumber,r.column,r.lineNumber,r.column):new Re(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{const s=n.getStartPosition();let r=t.bracketPairs.matchBracket(s);if(!r&&(r=t.bracketPairs.findEnclosingBrackets(s),!r)){const d=t.bracketPairs.findNextBracket(s);d&&d.range&&(r=t.bracketPairs.matchBracket(d.range.getStartPosition()))}let a=null,l=null;if(r){r.sort(k.compareRangesUsingStarts);const[d,c]=r;if(a=e?d.getStartPosition():d.getEndPosition(),l=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(s)){const u=a;a=l,l=u}}a&&l&&i.push(new Re(a.lineNumber,a.column,l.lineNumber,l.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(i=>{const n=i.getPosition();let s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let r=0;for(let u=0,h=e.length;u1&&s.sort(z.compare);const a=[];let l=0,d=0;const c=n.length;for(let u=0,h=s.length;u0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}_e(j_e);const pg="9_cutcopypaste",K_e=Ml||document.queryCommandSupported("cut"),JW=Ml||document.queryCommandSupported("copy"),q_e=typeof navigator.clipboard>"u"||pr?document.queryCommandSupported("paste"):!0;function IR(o){return o.register(),o}const G_e=K_e?IR(new pm({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Ml?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:N.MenubarEditMenu,group:"2_ccp",title:p({},"Cu&&t"),order:1},{menuId:N.EditorContext,group:pg,title:p("actions.clipboard.cutLabel","Cut"),when:T.writable,order:1},{menuId:N.CommandPalette,group:"",title:p("actions.clipboard.cutLabel","Cut"),order:1},{menuId:N.SimpleEditorContext,group:pg,title:p("actions.clipboard.cutLabel","Cut"),when:T.writable,order:1}]})):void 0,Z_e=JW?IR(new pm({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Ml?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:N.MenubarEditMenu,group:"2_ccp",title:p({},"&&Copy"),order:2},{menuId:N.EditorContext,group:pg,title:p("actions.clipboard.copyLabel","Copy"),order:2},{menuId:N.CommandPalette,group:"",title:p("actions.clipboard.copyLabel","Copy"),order:1},{menuId:N.SimpleEditorContext,group:pg,title:p("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;zn.appendMenuItem(N.MenubarEditMenu,{submenu:N.MenubarCopy,title:{value:p("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});zn.appendMenuItem(N.EditorContext,{submenu:N.EditorContextCopy,title:{value:p("copy as","Copy As"),original:"Copy As"},group:pg,order:3});zn.appendMenuItem(N.EditorContext,{submenu:N.EditorContextShare,title:{value:p("share","Share"),original:"Share"},group:"11_share",order:-1,when:ae.and(ae.notEquals("resourceScheme","output"),T.editorTextFocus)});zn.appendMenuItem(N.EditorTitleContext,{submenu:N.EditorTitleContextShare,title:{value:p("share","Share"),original:"Share"},group:"11_share",order:-1});zn.appendMenuItem(N.ExplorerContext,{submenu:N.ExplorerContextShare,title:{value:p("share","Share"),original:"Share"},group:"11_share",order:-1});const ik=q_e?IR(new pm({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Ml?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:N.MenubarEditMenu,group:"2_ccp",title:p({},"&&Paste"),order:4},{menuId:N.EditorContext,group:pg,title:p("actions.clipboard.pasteLabel","Paste"),when:T.writable,order:4},{menuId:N.CommandPalette,group:"",title:p("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:N.SimpleEditorContext,group:pg,title:p("actions.clipboard.pasteLabel","Paste"),when:T.writable,order:4}]})):void 0;class Y_e extends Te{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:p("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(37)&&t.getSelection().isEmpty()||(rE.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),rE.forceCopyWithSyntaxHighlighting=!1)}}function eV(o,e){o&&(o.addImplementation(1e4,"code-editor",(t,i)=>{const n=t.get(Ot).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const s=n.getOption(37),r=n.getSelection();return r&&r.isEmpty()&&!s||n.getContainerDomNode().ownerDocument.execCommand(e),!0}return!1}),o.addImplementation(0,"generic-dom",(t,i)=>(fm().execCommand(e),!0)))}eV(G_e,"cut");eV(Z_e,"copy");ik&&(ik.addImplementation(1e4,"code-editor",(o,e)=>{const t=o.get(Ot),i=o.get(Xd),n=t.getFocusedCodeEditor();return n&&n.hasTextFocus()?!n.getContainerDomNode().ownerDocument.execCommand("paste")&&Tu?(async()=>{const r=await i.readText();if(r!==""){const a=$v.INSTANCE.get(r);let l=!1,d=null,c=null;a&&(l=n.getOption(37)&&!!a.isFromEmptySelection,d=typeof a.multicursorText<"u"?a.multicursorText:null,c=a.mode),n.trigger("keyboard","paste",{text:r,pasteOnNewLine:l,multicursorText:d,mode:c})}})():!0:!1}),ik.addImplementation(0,"generic-dom",(o,e)=>(fm().execCommand("paste"),!0)));JW&&_e(Y_e);class Ze{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+Ze.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new Ze(this.value+Ze.sep+e)}}Ze.sep=".";Ze.None=new Ze("@@none@@");Ze.Empty=new Ze("");Ze.QuickFix=new Ze("quickfix");Ze.Refactor=new Ze("refactor");Ze.RefactorExtract=Ze.Refactor.append("extract");Ze.RefactorInline=Ze.Refactor.append("inline");Ze.RefactorMove=Ze.Refactor.append("move");Ze.RefactorRewrite=Ze.Refactor.append("rewrite");Ze.Notebook=new Ze("notebook");Ze.Source=new Ze("source");Ze.SourceOrganizeImports=Ze.Source.append("organizeImports");Ze.SourceFixAll=Ze.Source.append("fixAll");Ze.SurroundWith=Ze.Refactor.append("surround");var _o;(function(o){o.Refactor="refactor",o.RefactorPreview="refactor preview",o.Lightbulb="lightbulb",o.Default="other (default)",o.SourceAction="source action",o.QuickFix="quick fix action",o.FixAll="fix all",o.OrganizeImports="organize imports",o.AutoFix="auto fix",o.QuickFixHover="quick fix hover window",o.OnSave="save participants",o.ProblemsView="problems view"})(_o||(_o={}));function X_e(o,e){return!(o.include&&!o.include.intersects(e)||o.excludes&&o.excludes.some(t=>tV(e,t,o.include))||!o.includeSourceActions&&Ze.Source.contains(e))}function Q_e(o,e){const t=e.kind?new Ze(e.kind):void 0;return!(o.include&&(!t||!o.include.contains(t))||o.excludes&&t&&o.excludes.some(i=>tV(t,i,o.include))||!o.includeSourceActions&&t&&Ze.Source.contains(t)||o.onlyIncludePreferredActions&&!e.isPreferred)}function tV(o,e,t){return!(!e.contains(o)||t&&e.contains(t))}class gl{static fromUser(e,t){return!e||typeof e!="object"?new gl(t.kind,t.apply,!1):new gl(gl.getKindFromUser(e,t.kind),gl.getApplyFromUser(e,t.apply),gl.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new Ze(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}}class J_e{constructor(e,t,i){this.action=e,this.provider=t,this.highlightRange=i}async resolve(e){var t;if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let i;try{i=await this.provider.resolveCodeAction(this.action,e)}catch(n){en(n)}i&&(this.action.edit=i.edit)}return this}}const iV="editor.action.codeAction",ER="editor.action.quickFix",nV="editor.action.autoFix",sV="editor.action.refactor",oV="editor.action.sourceAction",NR="editor.action.organizeImports",TR="editor.action.fixAll";class sv extends q{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return e.isAI&&!t.isAI?1:!e.isAI&&t.isAI?-1:ls(e.diagnostics)?ls(t.diagnostics)?sv.codeActionsPreferredComparator(e,t):-1:ls(t.diagnostics)?1:sv.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(sv.codeActionsComparator),this.validActions=this.allActions.filter(({action:n})=>!n.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Ze.QuickFix.contains(new Ze(e.kind))&&!!e.isPreferred)}get hasAIFix(){return this.validActions.some(({action:e})=>!!e.isAI)}get allAIFixes(){return this.validActions.every(({action:e})=>!!e.isAI)}}const t3={actions:[],documentation:void 0};async function ov(o,e,t,i,n,s){var r;const a=i.filter||{},l={...a,excludes:[...a.excludes||[],Ze.Notebook]},d={only:(r=a.include)===null||r===void 0?void 0:r.value,trigger:i.type},c=new SR(e,s),u=i.type===2,h=eve(o,e,u?l:a),g=new de,f=h.map(async v=>{try{n.report(v);const _=await v.provideCodeActions(e,t,d,c.token);if(_&&g.add(_),c.token.isCancellationRequested)return t3;const b=((_==null?void 0:_.actions)||[]).filter(w=>w&&Q_e(a,w)),C=ive(v,b,a.include);return{actions:b.map(w=>new J_e(w,v)),documentation:C}}catch(_){if(Fa(_))throw _;return en(_),t3}}),m=o.onDidChange(()=>{const v=o.all(e);Bi(v,h)||c.cancel()});try{const v=await Promise.all(f),_=v.map(C=>C.actions).flat(),b=[...Ia(v.map(C=>C.documentation)),...tve(o,e,i,_)];return new sv(_,b,g)}finally{m.dispose(),c.dispose()}}function eve(o,e,t){return o.all(e).filter(i=>i.providedCodeActionKinds?i.providedCodeActionKinds.some(n=>X_e(t,new Ze(n))):!0)}function*tve(o,e,t,i){var n,s,r;if(e&&i.length)for(const a of o.all(e))a._getAdditionalMenuItems&&(yield*(n=a._getAdditionalMenuItems)===null||n===void 0?void 0:n.call(a,{trigger:t.type,only:(r=(s=t.filter)===null||s===void 0?void 0:s.include)===null||r===void 0?void 0:r.value},i.map(l=>l.action)))}function ive(o,e,t){if(!o.documentation)return;const i=o.documentation.map(n=>({kind:new Ze(n.kind),command:n.command}));if(t){let n;for(const s of i)s.kind.contains(t)&&(n?n.kind.contains(s.kind)&&(n=s):n=s);if(n)return n==null?void 0:n.command}for(const n of e)if(n.kind){for(const s of i)if(s.kind.contains(new Ze(n.kind)))return s.command}}var TS;(function(o){o.OnSave="onSave",o.FromProblemsView="fromProblemsView",o.FromCodeActions="fromCodeActions"})(TS||(TS={}));async function nve(o,e,t,i,n=vt.None){var s;const r=o.get(f0),a=o.get(Ri),l=o.get(vo),d=o.get(sn);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),await e.resolve(n),!n.isCancellationRequested&&!(!((s=e.action.edit)===null||s===void 0)&&s.edits.length&&!(await r.apply(e.action.edit,{editor:i==null?void 0:i.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==TS.OnSave,showPreview:i==null?void 0:i.preview})).isApplied)&&e.action.command)try{await a.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(c){const u=sve(c);d.error(typeof u=="string"?u:p("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}function sve(o){return typeof o=="string"?o:o instanceof Error&&typeof o.message=="string"?o.message:void 0}Et.registerCommand("_executeCodeActionProvider",async function(o,e,t,i,n){if(!(e instanceof ze))throw hr();const{codeActionProvider:s}=o.get(Me),r=o.get(Si).getModel(e);if(!r)throw hr();const a=Re.isISelection(t)?Re.liftSelection(t):k.isIRange(t)?r.validateRange(t):void 0;if(!a)throw hr();const l=typeof i=="string"?new Ze(i):void 0,d=await ov(s,r,a,{type:1,triggerAction:_o.Default,filter:{includeSourceActions:!0,include:l}},Fd.None,vt.None),c=[],u=Math.min(d.validActions.length,typeof n=="number"?n:0);for(let h=0;hh.action)}finally{setTimeout(()=>d.dispose(),100)}});var ove=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rve=function(o,e){return function(t,i){e(t,i,o)}},rT;let MS=rT=class{constructor(e){this.keybindingService=e}getResolver(){const e=new Ru(()=>this.keybindingService.getKeybindings().filter(t=>rT.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let i=t.commandArgs;return t.command===NR?i={kind:Ze.SourceOrganizeImports.value}:t.command===TR&&(i={kind:Ze.SourceFixAll.value}),{resolvedKeybinding:t.resolvedKeybinding,...gl.fromUser(i,{kind:Ze.None,apply:"never"})}}));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.value);return i==null?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new Ze(e.kind);return t.filter(n=>n.kind.contains(i)).filter(n=>n.preferred?e.isPreferred:!0).reduceRight((n,s)=>n?n.kind.contains(s.kind)?s:n:s,void 0)}};MS.codeActionCommands=[sV,iV,oV,NR,TR];MS=rT=ove([rve(0,Xt)],MS);M("symbolIcon.arrayForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.booleanForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},p("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.colorForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.constantForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},p("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},p("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},p("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},p("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},p("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.fileForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.folderForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},p("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},p("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.keyForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.keywordForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},p("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.moduleForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.namespaceForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.nullForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.numberForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.objectForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.operatorForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.packageForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.propertyForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.referenceForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.snippetForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.stringForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.structForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.textForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.typeParameterForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.unitForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},p("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const rV=Object.freeze({kind:Ze.Empty,title:p("codeAction.widget.id.more","More Actions...")}),ave=Object.freeze([{kind:Ze.QuickFix,title:p("codeAction.widget.id.quickfix","Quick Fix")},{kind:Ze.RefactorExtract,title:p("codeAction.widget.id.extract","Extract"),icon:ve.wrench},{kind:Ze.RefactorInline,title:p("codeAction.widget.id.inline","Inline"),icon:ve.wrench},{kind:Ze.RefactorRewrite,title:p("codeAction.widget.id.convert","Rewrite"),icon:ve.wrench},{kind:Ze.RefactorMove,title:p("codeAction.widget.id.move","Move"),icon:ve.wrench},{kind:Ze.SurroundWith,title:p("codeAction.widget.id.surround","Surround With"),icon:ve.symbolSnippet},{kind:Ze.Source,title:p("codeAction.widget.id.source","Source Action"),icon:ve.symbolFile},rV]);function lve(o,e,t){if(!e)return o.map(s=>{var r;return{kind:"action",item:s,group:rV,disabled:!!s.action.disabled,label:s.action.disabled||s.action.title,canPreview:!!(!((r=s.action.edit)===null||r===void 0)&&r.edits.length)}});const i=ave.map(s=>({group:s,actions:[]}));for(const s of o){const r=s.action.kind?new Ze(s.action.kind):Ze.None;for(const a of i)if(a.group.kind.contains(r)){a.actions.push(s);break}}const n=[];for(const s of i)if(s.actions.length){n.push({kind:"header",group:s.group});for(const r of s.actions){const a=s.group;n.push({kind:"action",item:r,group:r.action.isAI?{title:a.title,kind:a.kind,icon:ve.sparkle}:a,label:r.action.title,disabled:!!r.action.disabled,keybinding:t(r.action)})}}return n}var dve=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},i3=function(o,e){return function(t,i){e(t,i,o)}},aT,$f;(function(o){o.Hidden={type:0};class e{constructor(i,n,s,r){this.actions=i,this.trigger=n,this.editorPosition=s,this.widgetPosition=r,this.type=1}}o.Showing=e})($f||($f={}));let mg=aT=class extends q{constructor(e,t,i){super(),this._editor=e,this._keybindingService=t,this._onClick=this._register(new W),this.onClick=this._onClick.event,this._state=$f.Hidden,this._iconClasses=[],this._domNode=pe("div.lightBulbWidget"),this._register(ei.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{const s=this._editor.getModel();(this.state.type!==1||!s||this.state.editorPosition.lineNumber>=s.getLineCount())&&this.hide()})),this._register(OX(this._domNode,n=>{var s;if(this.state.type!==1)return;const r=this._editor.getOption(64).experimental.showAiIcon;if((r===so.On||r===so.OnCode)&&this.state.actions.allAIFixes&&this.state.actions.validActions.length===1){const u=this.state.actions.validActions[0].action;if(!((s=u.command)===null||s===void 0)&&s.id){i.executeCommand(u.command.id,...u.command.arguments||[]),n.preventDefault();return}}this._editor.focus(),n.preventDefault();const{top:a,height:l}=gn(this._domNode),d=this._editor.getOption(66);let c=Math.floor(d/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(n.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(64)&&(this._editor.getOption(64).enabled||this.hide(),this._updateLightBulbTitleAndIcon())})),this._register(ye.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{var n,s,r,a;this._preferredKbLabel=(s=(n=this._keybindingService.lookupKeybinding(nV))===null||n===void 0?void 0:n.getLabel())!==null&&s!==void 0?s:void 0,this._quickFixKbLabel=(a=(r=this._keybindingService.lookupKeybinding(ER))===null||r===void 0?void 0:r.getLabel())!==null&&a!==void 0?a:void 0,this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.hide();const n=this._editor.getOptions();if(!n.get(64).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:r,column:a}=s.validatePosition(i),l=s.getOptions().tabSize,d=n.get(50),c=s.getLineContent(r),u=jy(c,l),h=d.spaceWidth*u>22,g=m=>m>2&&this._editor.getTopForLineNumber(m)===this._editor.getTopForLineNumber(m-1);let f=r;if(!h){if(r>1&&!g(r-1))f-=1;else if(!g(r+1))f+=1;else if(a*d.spaceWidth<22)return this.hide()}this.state=new $f.Showing(e,t,i,{position:{lineNumber:f,column:s.getLineContent(f).match(/^\S\s*$/)?2:1},preference:aT._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==$f.Hidden&&(this.state=$f.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){var e,t,i;if(this._domNode.classList.remove(...this._iconClasses),this._iconClasses=[],this.state.type!==1)return;const n=()=>{this._preferredKbLabel&&(this.title=p("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel))},s=()=>{this._quickFixKbLabel?this.title=p("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=p("codeAction","Show Code Actions")};let r;const a=this._editor.getOption(64).experimental.showAiIcon;if(a===so.On||a===so.OnCode)if(a===so.On&&this.state.actions.allAIFixes)if(r=ve.sparkleFilled,this.state.actions.allAIFixes&&this.state.actions.validActions.length===1)if(((e=this.state.actions.validActions[0].action.command)===null||e===void 0?void 0:e.id)==="inlineChat.start"){const l=(i=(t=this._keybindingService.lookupKeybinding("inlineChat.start"))===null||t===void 0?void 0:t.getLabel())!==null&&i!==void 0?i:void 0;this.title=l?p("codeActionStartInlineChatWithKb","Start Inline Chat ({0})",l):p("codeActionStartInlineChat","Start Inline Chat")}else this.title=p("codeActionTriggerAiAction","Trigger AI Action");else s();else this.state.actions.hasAutoFix?(this.state.actions.hasAIFix?r=ve.lightbulbSparkleAutofix:r=ve.lightbulbAutofix,n()):this.state.actions.hasAIFix?(r=ve.lightbulbSparkle,s()):(r=ve.lightBulb,s());else this.state.actions.hasAutoFix?(r=ve.lightbulbAutofix,n()):(r=ve.lightBulb,s());this._iconClasses=Ue.asClassNameArray(r),this._domNode.classList.add(...this._iconClasses)}set title(e){this._domNode.title=e}};mg.ID="editor.contrib.lightbulbWidget";mg._posPref=[0];mg=aT=dve([i3(1,Xt),i3(2,Ri)],mg);var cve=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},n3=function(o,e){return function(t,i){e(t,i,o)}},lT;let Ud=lT=class{constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new W,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const n=new de,s=n.add(iL(e,{...this._getRenderOptions(e,n),...t},i));return s.element.classList.add("rendered-markdown"),{element:s.element,dispose:()=>n.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:async(i,n)=>{var s,r,a;let l;i?l=this._languageService.getLanguageIdByLanguageName(i):this._options.editor&&(l=(s=this._options.editor.getModel())===null||s===void 0?void 0:s.getLanguageId()),l||(l=Ko);const d=await sae(this._languageService,n,l),c=document.createElement("span");if(c.innerHTML=(a=(r=lT._ttpTokenizer)===null||r===void 0?void 0:r.createHTML(d))!==null&&a!==void 0?a:d,this._options.editor){const u=this._options.editor.getOption(50);Jn(c,u)}else this._options.codeBlockFontFamily&&(c.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(c.style.fontSize=this._options.codeBlockFontSize),c},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:i=>aV(this._openerService,i,e.isTrusted),disposables:t}}}};Ud._ttpTokenizer=qd("tokenizeToString",{createHTML(o){return o}});Ud=lT=cve([n3(1,bi),n3(2,So)],Ud);async function aV(o,e,t){try{return await o.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:uve(t)})}catch(i){return nt(i),!1}}function uve(o){return o===!0?!0:o&&Array.isArray(o.enabledCommands)?o.enabledCommands:!1}var hve=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},s3=function(o,e){return function(t,i){e(t,i,o)}},W1;let ho=W1=class{static get(e){return e.getContribution(W1.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new An,this._messageListeners=new de,this._mouseOverMessage=!1,this._editor=e,this._visible=W1.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)===null||e===void 0||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){mo(jc(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=jc(e)?iL(e,{actionHandler:{callback:n=>aV(this._openerService,n,jc(e)?e.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new o3(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(ye.debounce(this._editor.onDidBlurEditorText,(n,s)=>s,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&Qn(jo(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(J(this._messageWidget.value.getDomNode(),Se.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(J(this._messageWidget.value.getDomNode(),Se.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let i;this._messageListeners.add(this._editor.onMouseMove(n=>{n.target.position&&(i?i.containsPosition(n.target.position)||this.closeMessage():i=new k(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(o3.fadeOut(this._messageWidget.value))}};ho.ID="editor.contrib.messageController";ho.MESSAGE_VISIBLE=new De("messageVisible",!1,p("messageVisible","Whether the editor is currently showing an inline message"));ho=W1=hve([s3(1,Xe),s3(2,So)],ho);const gve=Rn.bindToContribution(ho.get);we(new gve({id:"leaveEditorMessage",precondition:ho.MESSAGE_VISIBLE,handler:o=>o.closeMessage(),kbOpts:{weight:130,primary:9}}));let o3=class{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const r=document.createElement("div");typeof n=="string"?(r.classList.add("message"),r.textContent=n):(n.classList.add("message"),r.appendChild(n)),this._domNode.appendChild(r);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};At(ho.ID,ho,4);var lV=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},dT=function(o,e){return function(t,i){e(t,i,o)}};const dV="acceptSelectedCodeAction",cV="previewSelectedCodeAction";class fve{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){var n,s;i.text.textContent=(s=(n=e.group)===null||n===void 0?void 0:n.title)!==null&&s!==void 0?s:""}disposeTemplate(e){}}let cT=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const i=document.createElement("span");i.className="title",e.append(i);const n=new C0(e,Vo);return{container:e,icon:t,text:i,keybinding:n}}renderElement(e,t,i){var n,s,r;if(!((n=e.group)===null||n===void 0)&&n.icon?(i.icon.className=Ue.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=Ee(e.group.icon.color.id))):(i.icon.className=Ue.asClassName(ve.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=uV(e.label),i.keybinding.set(e.keybinding),QX(!!e.keybinding,i.keybinding.element);const a=(s=this._keybindingService.lookupKeybinding(dV))===null||s===void 0?void 0:s.getLabel(),l=(r=this._keybindingService.lookupKeybinding(cV))===null||r===void 0?void 0:r.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:a&&l?this._supportsPreview&&e.canPreview?i.container.title=p({},"{0} to apply, {1} to preview",a,l):i.container.title=p({},"{0} to apply",a):i.container.title=""}disposeTemplate(e){}};cT=lV([dT(1,Xt)],cT);class pve extends UIEvent{constructor(){super("acceptSelectedAction")}}class r3 extends UIEvent{constructor(){super("previewSelectedAction")}}function mve(o){if(o.kind==="action")return o.label}let uT=class extends q{constructor(e,t,i,n,s,r){super(),this._delegate=n,this._contextViewService=s,this._keybindingService=r,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new tn),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const a={getHeight:l=>l.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:l=>l.kind};this._list=this._register(new Yr(e,this.domNode,a,[new cT(t,this._keybindingService),new fve],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:mve},accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let d=l.label?uV(l==null?void 0:l.label):"";return l.disabled&&(d=p({},"{0}, Disabled Reason: {1}",d,l.disabled)),d}return null},getWidgetAriaLabel:()=>p({},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(Fg),this._register(this._list.onMouseClick(l=>this.onListClick(l))),this._register(this._list.onMouseOver(l=>this.onListHover(l))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(l=>this.onListSelection(l))),this._allMenuItems=i,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter(l=>l.kind==="header").length,n=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(n);let s=e;if(this._allMenuItems.length>=50)s=380;else{const l=this._allMenuItems.map((d,c)=>{const u=this.domNode.ownerDocument.getElementById(this._list.getElementID(c));if(u){u.style.width="auto";const h=u.getBoundingClientRect().width;return u.style.width="",h}return 0});s=Math.max(...l,e)}const a=Math.min(n,this.domNode.ownerDocument.body.clientHeight*.7);return this._list.layout(a,s),this.domNode.style.height=`${a}px`,this._list.domFocus(),s}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(t.length===0)return;const i=t[0],n=this._list.element(i);if(!this.focusCondition(n))return;const s=e?new r3:new pve;this._list.setSelection([i],s)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof r3):this._list.setSelection([])}onFocus(){var e,t;this._list.domFocus();const i=this._list.getFocus();if(i.length===0)return;const n=i[0],s=this._list.element(n);(t=(e=this._delegate).onFocus)===null||t===void 0||t.call(e,s.item)}async onListHover(e){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&t.kind==="action"){const i=await this._delegate.onHover(t.item,this.cts.token);t.canPreview=i?i.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};uT=lV([dT(4,Gd),dT(5,Xt)],uT);function uV(o){return o.replace(/\r\n|\r|\n/g," ")}var _ve=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nk=function(o,e){return function(t,i){e(t,i,o)}};M("actionBar.toggledBackground",{dark:Ih,light:Ih,hcDark:Ih,hcLight:Ih},p("actionBar.toggledBackground","Background color for toggled action items in action bar."));const _g={Visible:new De("codeActionMenuVisible",!1,p("codeActionMenuVisible","Whether the action widget list is visible"))},Hg=bt("actionWidgetService");let vg=class extends q{get isVisible(){return _g.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new An)}show(e,t,i,n,s,r,a){const l=_g.Visible.bindTo(this._contextKeyService),d=this._instantiationService.createInstance(uT,e,t,i,n);this._contextViewService.showContextView({getAnchor:()=>s,render:c=>(l.set(!0),this._renderWidget(c,d,a??[])),onHide:c=>{l.reset(),this._onWidgetClosed(c)}},r,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,i){var n;const s=document.createElement("div");if(s.classList.add("action-widget"),e.appendChild(s),this._list.value=t,this._list.value)s.appendChild(this._list.value.domNode);else throw new Error("List has no value");const r=new de,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),r.add(J(l,Se.MOUSE_DOWN,f=>f.stopPropagation()));const d=document.createElement("div"),c=e.appendChild(d);c.classList.add("context-view-pointerBlock"),r.add(J(c,Se.POINTER_MOVE,()=>c.remove())),r.add(J(c,Se.MOUSE_DOWN,()=>c.remove()));let u=0;if(i.length){const f=this._createActionBar(".action-widget-action-bar",i);f&&(s.appendChild(f.getContainer().parentElement),r.add(f),u=f.getContainer().offsetWidth)}const h=(n=this._list.value)===null||n===void 0?void 0:n.layout(u);s.style.width=`${h}px`;const g=r.add(Pl(e));return r.add(g.onDidBlur(()=>this.hide())),r}_createActionBar(e,t){if(!t.length)return;const i=pe(e),n=new Cr(i);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};vg=_ve([nk(0,Gd),nk(1,Xe),nk(2,qe)],vg);xt(Hg,vg,1);const N0=1100;mi(class extends Qo{constructor(){super({id:"hideCodeActionWidget",title:{value:p("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:_g.Visible,keybinding:{weight:N0,primary:9,secondary:[1033]}})}run(o){o.get(Hg).hide()}});mi(class extends Qo{constructor(){super({id:"selectPrevCodeAction",title:{value:p("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:_g.Visible,keybinding:{weight:N0,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(o){const e=o.get(Hg);e instanceof vg&&e.focusPrevious()}});mi(class extends Qo{constructor(){super({id:"selectNextCodeAction",title:{value:p("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:_g.Visible,keybinding:{weight:N0,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(o){const e=o.get(Hg);e instanceof vg&&e.focusNext()}});mi(class extends Qo{constructor(){super({id:dV,title:{value:p("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:_g.Visible,keybinding:{weight:N0,primary:3,secondary:[2137]}})}run(o){const e=o.get(Hg);e instanceof vg&&e.acceptSelected()}});mi(class extends Qo{constructor(){super({id:cV,title:{value:p("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:_g.Visible,keybinding:{weight:N0,primary:2051}})}run(o){const e=o.get(Hg);e instanceof vg&&e.acceptSelected(!0)}});const hV=new De("supportedCodeAction","");class vve extends q{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new qr),this._register(this._markerService.onMarkerChanged(s=>this._onMarkerChanges(s))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(i=>dA(i,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:_o.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){var t;if(!this._editor.hasModel())return;const i=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&e.type===2){const{lineNumber:s,column:r}=n.getPosition(),a=i.getLineContent(s);if(a.length===0){if(!(((t=this._editor.getOption(64).experimental)===null||t===void 0?void 0:t.showAiIcon)===so.On))return}else if(r===1){if(/\s/.test(a[0]))return}else if(r===i.getLineMaxColumn(s)){if(/\s/.test(a[a.length-1]))return}else if(/\s/.test(a[r-2])&&/\s/.test(a[r-1]))return}return n}}var Lh;(function(o){o.Empty={type:0};class e{constructor(i,n,s){this.trigger=i,this.position=n,this._cancellablePromise=s,this.type=1,this.actions=s.catch(r=>{if(Fa(r))return gV;throw r})}cancel(){this._cancellablePromise.cancel()}}o.Triggered=e})(Lh||(Lh={}));const gV=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class bve extends q{constructor(e,t,i,n,s,r){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=s,this._configurationService=r,this._codeActionOracle=this._register(new An),this._state=Lh.Empty,this._onDidChangeState=this._register(new W),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=hV.bindTo(n),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(Lh.Empty,!0))}_settingEnabledNearbyQuickfixes(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:t==null?void 0:t.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(Lh.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(90)){const t=this._registry.all(e).flatMap(i=>{var n;return(n=i.providedCodeActionKinds)!==null&&n!==void 0?n:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new vve(this._editor,this._markerService,i=>{var n;if(!i){this.setState(Lh.Empty);return}const s=i.selection.getStartPosition(),r=_n(async a=>{var l,d,c,u,h,g;if(this._settingEnabledNearbyQuickfixes()&&i.trigger.type===1&&(i.trigger.triggerAction===_o.QuickFix||!((d=(l=i.trigger.filter)===null||l===void 0?void 0:l.include)===null||d===void 0)&&d.contains(Ze.QuickFix))){const f=await ov(this._registry,e,i.selection,i.trigger,Fd.None,a),m=[...f.allActions];if(a.isCancellationRequested)return gV;if(!((c=f.validActions)===null||c===void 0?void 0:c.some(_=>_.action.kind?Ze.QuickFix.contains(new Ze(_.action.kind)):!1))){const _=this._markerService.read({resource:e.uri});if(_.length>0){const b=i.selection.getPosition();let C=b,w=Number.MAX_VALUE;const S=[...f.validActions];for(const y of _){const I=y.endColumn,E=y.endLineNumber,R=y.startLineNumber;if(E===b.lineNumber||R===b.lineNumber){C=new z(E,I);const j={type:i.trigger.type,triggerAction:i.trigger.triggerAction,filter:{include:!((u=i.trigger.filter)===null||u===void 0)&&u.include?(h=i.trigger.filter)===null||h===void 0?void 0:h.include:Ze.QuickFix},autoApply:i.trigger.autoApply,context:{notAvailableMessage:((g=i.trigger.context)===null||g===void 0?void 0:g.notAvailableMessage)||"",position:C}},O=new Re(C.lineNumber,C.column,C.lineNumber,C.column),$=await ov(this._registry,e,O,j,Fd.None,a);if($.validActions.length!==0){for(const K of $.validActions)K.highlightRange=K.action.isPreferred;f.allActions.length===0&&m.push(...$.allActions),Math.abs(b.column-I)E.findIndex(R=>R.action.title===y.action.title)===I);return x.sort((y,I)=>y.action.isPreferred&&!I.action.isPreferred?-1:!y.action.isPreferred&&I.action.isPreferred||y.action.isAI&&!I.action.isAI?1:!y.action.isAI&&I.action.isAI?-1:0),{validActions:x,allActions:m,documentation:f.documentation,hasAutoFix:f.hasAutoFix,hasAIFix:f.hasAIFix,allAIFixes:f.allAIFixes,dispose:()=>{f.dispose()}}}}}return ov(this._registry,e,i.selection,i.trigger,Fd.None,a)});i.trigger.type===1&&((n=this._progressService)===null||n===void 0||n.showWhile(r,250)),this.setState(new Lh.Triggered(i.trigger,s,r))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:_o.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!this._disposed&&this._onDidChangeState.fire(e))}}var Cve=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},id=function(o,e){return function(t,i){e(t,i,o)}},V1;const wve="quickfix-edit-highlight";let Cu=V1=class extends q{static get(e){return e.getContribution(V1.ID)}constructor(e,t,i,n,s,r,a,l,d,c){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=d,this._instantiationService=c,this._activeCodeActions=this._register(new An),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new bve(this._editor,s.codeActionProvider,t,i,r,l)),this._register(this._model.onDidChangeState(u=>this.update(u))),this._lightBulbWidget=new Ru(()=>{const u=this._editor.getContribution(mg.ID);return u&&this._register(u.onClick(h=>this.showCodeActionList(h.actions,h,{includeDisabledActions:!1,fromLightbulb:!0}))),u}),this._resolver=n.createInstance(MS),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}showCodeActions(e,t,i){return this.showCodeActionList(t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,n){var s;if(!this._editor.hasModel())return;(s=ho.get(this._editor))===null||s===void 0||s.closeMessage();const r=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:n,context:{notAvailableMessage:e,position:r}})}_trigger(e){return this._model.trigger(e)}async _applyCodeAction(e,t,i){try{await this._instantiationService.invokeFunction(nve,e,TS.FromCodeActions,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:_o.QuickFix,filter:{}})}}async update(e){var t,i,n,s,r,a,l;if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let d;try{d=await e.actions}catch(c){nt(c);return}if(!this._disposed)if((i=this._lightBulbWidget.value)===null||i===void 0||i.update(d,e.trigger,e.position),e.trigger.type===1){if(!((n=e.trigger.filter)===null||n===void 0)&&n.include){const u=this.tryGetValidActionToApply(e.trigger,d);if(u){try{(s=this._lightBulbWidget.value)===null||s===void 0||s.hide(),await this._applyCodeAction(u,!1,!1)}finally{d.dispose()}return}if(e.trigger.context){const h=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,d);if(h&&h.action.disabled){(r=ho.get(this._editor))===null||r===void 0||r.showMessage(h.action.disabled,e.trigger.context.position),d.dispose();return}}}const c=!!(!((a=e.trigger.filter)===null||a===void 0)&&a.include);if(e.trigger.context&&(!d.allActions.length||!c&&!d.validActions.length)){(l=ho.get(this._editor))===null||l===void 0||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=d,d.dispose();return}this._activeCodeActions.value=d,this.showCodeActionList(d,this.toCoords(e.position),{includeDisabledActions:c,fromLightbulb:!1})}else this._actionWidgetService.isVisible?d.dispose():this._activeCodeActions.value=d}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:i})=>i.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}async showCodeActionList(e,t,i){const n=this._editor.createDecorationsCollection(),s=this._editor.getDomNode();if(!s)return;const r=i.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!r.length)return;const a=z.isIPosition(t)?this.toCoords(t):t,l={onSelect:async(d,c)=>{this._applyCodeAction(d,!0,!!c),this._actionWidgetService.hide(),n.clear()},onHide:()=>{var d;(d=this._editor)===null||d===void 0||d.focus(),n.clear()},onHover:async(d,c)=>{var u;if(await d.resolve(c),!c.isCancellationRequested)return{canPreview:!!(!((u=d.action.edit)===null||u===void 0)&&u.edits.length)}},onFocus:d=>{var c,u;if(d&&d.highlightRange&&d.action.diagnostics){const h=[{range:d.action.diagnostics[0],options:V1.DECORATION}];n.set(h);const g=d.action.diagnostics[0],f=(u=(c=this._editor.getModel())===null||c===void 0?void 0:c.getWordAtPosition({lineNumber:g.startLineNumber,column:g.startColumn}))===null||u===void 0?void 0:u.word;hu(p("editingNewSelection","Context: {0} at line {1} and column {2}.",f,g.startLineNumber,g.startColumn))}else n.clear()}};this._actionWidgetService.show("codeActionWidget",!0,lve(r,this._shouldShowHeaders(),this._resolver.getResolver()),l,a,s,this._getActionBarActions(e,t,i))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=gn(this._editor.getDomNode()),n=i.left+t.left,s=i.top+t.top+t.height;return{x:n,y:s}}_shouldShowHeaders(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const n=e.documentation.map(s=>{var r;return{id:s.id,label:s.title,tooltip:(r=s.tooltip)!==null&&r!==void 0?r:"",class:void 0,enabled:!0,run:()=>{var a;return this._commandService.executeCommand(s.id,...(a=s.arguments)!==null&&a!==void 0?a:[])}}});return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:p("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:p("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),n}};Cu.ID="editor.contrib.codeActionController";Cu.DECORATION=st.register({description:"quickfix-highlight",className:wve});Cu=V1=Cve([id(1,Yl),id(2,Xe),id(3,qe),id(4,Me),id(5,Bu),id(6,Ri),id(7,Dt),id(8,Hg),id(9,qe)],Cu);Zr((o,e)=>{((n,s)=>{s&&e.addRule(`.monaco-editor ${n} { background-color: ${s}; }`)})(".quickfix-edit-highlight",o.getColor(wl));const i=o.getColor(Ic);i&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${xa(o.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`)});function T0(o){return ae.regex(hV.keys()[0],new RegExp("(\\s|^)"+qo(o.value)+"\\b"))}const MR={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:p("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:p("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[p("args.schema.apply.first","Always apply the first returned code action."),p("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),p("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:p("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function zg(o,e,t,i,n=_o.Default){if(o.hasModel()){const s=Cu.get(o);s==null||s.manualTriggerAtCurrentPosition(e,n,t,i)}}class Sve extends Te{constructor(){super({id:ER,label:p("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:ae.and(T.writable,T.hasCodeActionsProvider),kbOpts:{kbExpr:T.textInputFocus,primary:2137,weight:100}})}run(e,t){return zg(t,p("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,_o.QuickFix)}}class yve extends Rn{constructor(){super({id:iV,precondition:ae.and(T.writable,T.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:MR}]}})}runEditorCommand(e,t,i){const n=gl.fromUser(i,{kind:Ze.Empty,apply:"ifSingle"});return zg(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?p("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):p("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?p("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):p("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class Lve extends Te{constructor(){super({id:sV,label:p("refactor.label","Refactor..."),alias:"Refactor...",precondition:ae.and(T.writable,T.hasCodeActionsProvider),kbOpts:{kbExpr:T.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:ae.and(T.writable,T0(Ze.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:MR}]}})}run(e,t,i){const n=gl.fromUser(i,{kind:Ze.Refactor,apply:"never"});return zg(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?p("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):p("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):n.preferred?p("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):p("editor.action.refactor.noneMessage","No refactorings available"),{include:Ze.Refactor.contains(n.kind)?n.kind:Ze.None,onlyIncludePreferredActions:n.preferred},n.apply,_o.Refactor)}}class Dve extends Te{constructor(){super({id:oV,label:p("source.label","Source Action..."),alias:"Source Action...",precondition:ae.and(T.writable,T.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:ae.and(T.writable,T0(Ze.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:MR}]}})}run(e,t,i){const n=gl.fromUser(i,{kind:Ze.Source,apply:"never"});return zg(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?p("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):p("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?p("editor.action.source.noneMessage.preferred","No preferred source actions available"):p("editor.action.source.noneMessage","No source actions available"),{include:Ze.Source.contains(n.kind)?n.kind:Ze.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,_o.SourceAction)}}class xve extends Te{constructor(){super({id:NR,label:p("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:ae.and(T.writable,T0(Ze.SourceOrganizeImports)),kbOpts:{kbExpr:T.textInputFocus,primary:1581,weight:100}})}run(e,t){return zg(t,p("editor.action.organize.noneMessage","No organize imports action available"),{include:Ze.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",_o.OrganizeImports)}}class kve extends Te{constructor(){super({id:TR,label:p("fixAll.label","Fix All"),alias:"Fix All",precondition:ae.and(T.writable,T0(Ze.SourceFixAll))})}run(e,t){return zg(t,p("fixAll.noneMessage","No fix all action available"),{include:Ze.SourceFixAll,includeSourceActions:!0},"ifSingle",_o.FixAll)}}class Ive extends Te{constructor(){super({id:nV,label:p("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:ae.and(T.writable,T0(Ze.QuickFix)),kbOpts:{kbExpr:T.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return zg(t,p("editor.action.autoFix.noneMessage","No auto fixes available"),{include:Ze.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",_o.AutoFix)}}At(Cu.ID,Cu,3);At(mg.ID,mg,4);_e(Sve);_e(Lve);_e(Dve);_e(xve);_e(Ive);_e(kve);we(new yve);xi.as(Va.Configuration).registerConfiguration({...Xy,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:p("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}});xi.as(Va.Configuration).registerConfiguration({...Xy,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:p("includeNearbyQuickFixes","Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}});class hT{constructor(){this.lenses=[],this._disposables=new de}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}async function fV(o,e,t){const i=o.ordered(e),n=new Map,s=new hT,r=i.map(async(a,l)=>{n.set(a,l);try{const d=await Promise.resolve(a.provideCodeLenses(e,t));d&&s.add(d,a)}catch(d){en(d)}});return await Promise.all(r),s.lenses=s.lenses.sort((a,l)=>a.symbol.range.startLineNumberl.symbol.range.startLineNumber?1:n.get(a.provider)n.get(l.provider)?1:a.symbol.range.startColumnl.symbol.range.startColumn?1:0),s}Et.registerCommand("_executeCodeLensProvider",function(o,...e){let[t,i]=e;qt(ze.isUri(t)),qt(typeof i=="number"||!i);const{codeLensProvider:n}=o.get(Me),s=o.get(Si).getModel(t);if(!s)throw hr();const r=[],a=new de;return fV(n,s,vt.None).then(l=>{a.add(l);const d=[];for(const c of l.lenses)i==null||c.symbol.command?r.push(c.symbol):i-- >0&&c.provider.resolveCodeLens&&d.push(Promise.resolve(c.provider.resolveCodeLens(s,c.symbol,vt.None)).then(u=>r.push(u||c.symbol)));return Promise.all(d)}).then(()=>r).finally(()=>{setTimeout(()=>a.dispose(),100)})});var Eve=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Nve=function(o,e){return function(t,i){e(t,i,o)}};const pV=bt("ICodeLensCache");class a3{constructor(e,t){this.lineCount=e,this.data=t}}let gT=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new Pu(20,.75);const t="codelens/cache";g_(Ai,()=>e.remove(t,1));const i="codelens/cache2",n=e.get(i,1,"{}");this._deserialize(n),ye.once(e.onWillSaveState)(s=>{s.reason===rb.SHUTDOWN&&e.store(i,this._serialize(),1,1)})}put(e,t){const i=t.lenses.map(r=>{var a;return{range:r.symbol.range,command:r.symbol.command&&{id:"",title:(a=r.symbol.command)===null||a===void 0?void 0:a.title}}}),n=new hT;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const s=new a3(e.getLineCount(),n);this._cache.set(e.uri.toString(),s)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const s of i.data.lenses)n.add(s.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const i in t){const n=t[i],s=[];for(const a of n.lines)s.push({range:new k(a,1,a,11)});const r=new hT;r.add({lenses:s,dispose(){}},this._fakeProvider),this._cache.set(i,new a3(n.lineCount,r))}}catch{}}};gT=Eve([Nve(0,Xr)],gT);xt(pV,gT,1);class Tve{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class TL{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${TL._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const i=[];let n=!1;for(let s=0;s{d.symbol.command&&l.push(d.symbol),i.addDecoration({range:d.symbol.range,options:l3},u=>this._decorationIds[c]=u),a?a=k.plusRange(a,d.symbol.range):a=k.lift(d.symbol.range)}),this._viewZone=new Tve(a.startLineNumber-1,s,r),this._viewZoneId=n.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new TL(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!!(i&&k.isEmpty(n.range)===i.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((i,n)=>{t.addDecoration({range:i.symbol.range,options:l3},s=>this._decorationIds[n]=s)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},i_=function(o,e){return function(t,i){e(t,i,o)}};let Jp=class{constructor(e,t,i,n,s,r){this._editor=e,this._languageFeaturesService=t,this._commandService=n,this._notificationService=s,this._codeLensCache=r,this._disposables=new de,this._localToDispose=new de,this._lenses=[],this._oldCodeLensModels=new de,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Yt(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{(a.hasChanged(50)||a.hasChanged(19)||a.hasChanged(18))&&this._updateLensStyle(),a.hasChanged(17)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(66)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=this._editor.getOption(52)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(18),n=this._editor.getOption(50),{style:s}=this._editor.getContainerDomNode();s.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),s.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),s.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),i&&(s.setProperty("--vscode-editorCodeLens-fontFamily",i),s.setProperty("--vscode-editorCodeLens-fontFamilyDefault",co.fontFamily)),this._editor.changeViewZones(r=>{for(const a of this._lenses)a.updateHeight(e,r)})}_localDispose(){var e,t,i;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(i=this._currentCodeLensModel)===null||i===void 0||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&lu(()=>{const n=this._codeLensCache.get(e);t===n&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3,this._localToDispose);return}for(const n of this._languageFeaturesService.codeLensProvider.all(e))if(typeof n.onDidChange=="function"){const s=n.onDidChange(()=>i.schedule());this._localToDispose.add(s)}const i=new Yt(()=>{var n;const s=Date.now();(n=this._getCodeLensModelPromise)===null||n===void 0||n.cancel(),this._getCodeLensModelPromise=_n(r=>fV(this._languageFeaturesService.codeLensProvider,e,r)),this._getCodeLensModelPromise.then(r=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=r,this._codeLensCache.put(e,r);const a=this._provideCodeLensDebounce.update(e,Date.now()-s);i.delay=a,this._renderCodeLensSymbols(r),this._resolveCodeLensesInViewportSoon()},nt)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(je(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var n;this._editor.changeDecorations(s=>{this._editor.changeViewZones(r=>{const a=[];let l=-1;this._lenses.forEach(c=>{!c.isValid()||l===c.getLineNumber()?a.push(c):(c.update(r),l=c.getLineNumber())});const d=new sk;a.forEach(c=>{c.dispose(d,r),this._lenses.splice(this._lenses.indexOf(c),1)}),d.commit(s)})}),i.schedule(),this._resolveCodeLensesScheduler.cancel(),(n=this._resolveCodeLensesPromise)===null||n===void 0||n.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{i.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{i.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(je(()=>{if(this._editor.getModel()){const n=Ra.capture(this._editor);this._editor.changeDecorations(s=>{this._editor.changeViewZones(r=>{this._disposeAllLenses(s,r)})}),n.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(n=>{if(n.target.type!==9)return;let s=n.target.element;if((s==null?void 0:s.tagName)==="SPAN"&&(s=s.parentElement),(s==null?void 0:s.tagName)==="A")for(const r of this._lenses){const a=r.getCommand(s);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),i.schedule()}_disposeAllLenses(e,t){const i=new sk;for(const n of this._lenses)n.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let n;for(const a of e.lenses){const l=a.symbol.range.startLineNumber;l<1||l>t||(n&&n[n.length-1].symbol.range.startLineNumber===l?n.push(a):(n=[a],i.push(n)))}if(!i.length&&!this._lenses.length)return;const s=Ra.capture(this._editor),r=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{const d=new sk;let c=0,u=0;for(;uthis._resolveCodeLensesInViewportSoon())),c++,u++)}for(;cthis._resolveCodeLensesInViewportSoon())),u++;d.commit(a)})}),s.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],n=[];if(this._lenses.forEach(a=>{const l=a.computeIfNecessary(t);l&&(i.push(l),n.push(a))}),i.length===0)return;const s=Date.now(),r=_n(a=>{const l=i.map((d,c)=>{const u=new Array(d.length),h=d.map((g,f)=>!g.symbol.command&&typeof g.provider.resolveCodeLens=="function"?Promise.resolve(g.provider.resolveCodeLens(t,g.symbol,a)).then(m=>{u[f]=m},en):(u[f]=g.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!a.isCancellationRequested&&!n[c].isDisposed()&&n[c].updateCommands(u)})});return Promise.all(l)});this._resolveCodeLensesPromise=r,this._resolveCodeLensesPromise.then(()=>{const a=this._resolveCodeLensesDebounce.update(t,Date.now()-s);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{nt(a),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}async getModel(){var e;return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,!((e=this._currentCodeLensModel)===null||e===void 0)&&e.isDisposed?void 0:this._currentCodeLensModel}};Jp.ID="css.editor.codeLens";Jp=Mve([i_(1,Me),i_(2,wr),i_(3,Ri),i_(4,sn),i_(5,pV)],Jp);At(Jp.ID,Jp,1);_e(class extends Te{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:T.hasCodeLensProvider,label:p("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}async run(e,t){if(!t.hasModel())return;const i=e.get(Ha),n=e.get(Ri),s=e.get(sn),r=t.getSelection().positionLineNumber,a=t.getContribution(Jp.ID);if(!a)return;const l=await a.getModel();if(!l)return;const d=[];for(const h of l.lenses)h.symbol.command&&h.symbol.range.startLineNumber===r&&d.push({label:h.symbol.command.title,command:h.symbol.command});if(d.length===0)return;const c=await i.pick(d,{canPickMany:!1,placeHolder:p("placeHolder","Select a command")});if(!c)return;let u=c.command;if(l.isDisposed){const h=await a.getModel(),g=h==null?void 0:h.lenses.find(f=>{var m;return f.symbol.range.startLineNumber===r&&((m=f.symbol.command)===null||m===void 0?void 0:m.title)===u.title});if(!g||!g.symbol.command)return;u=g.symbol.command}try{await n.executeCommand(u.id,...u.arguments||[])}catch(h){s.error(h)}}});var Ave=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ok=function(o,e){return function(t,i){e(t,i,o)}};class AR{constructor(e,t){this._editorWorkerClient=new BM(e,!1,"editorWorkerService",t)}async provideDocumentColors(e,t){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,t,i){const n=t.range,s=t.color,r=s.alpha,a=new Y(new kt(Math.round(255*s.red),Math.round(255*s.green),Math.round(255*s.blue),r)),l=r?Y.Format.CSS.formatRGB(a):Y.Format.CSS.formatRGBA(a),d=r?Y.Format.CSS.formatHSL(a):Y.Format.CSS.formatHSLA(a),c=r?Y.Format.CSS.formatHex(a):Y.Format.CSS.formatHexA(a),u=[];return u.push({label:l,textEdit:{range:n,text:l}}),u.push({label:d,textEdit:{range:n,text:d}}),u.push({label:c,textEdit:{range:n,text:c}}),u}}let fT=class extends q{constructor(e,t,i){super(),this._register(i.colorProvider.register("*",new AR(e,t)))}};fT=Ave([ok(0,Si),ok(1,si),ok(2,Me)],fT);_L(fT);async function mV(o,e,t,i=!0){return RR(new Rve,o,e,t,i)}function _V(o,e,t,i){return Promise.resolve(t.provideColorPresentations(o,e,i))}class Rve{constructor(){}async compute(e,t,i,n){const s=await e.provideDocumentColors(t,i);if(Array.isArray(s))for(const r of s)n.push({colorInfo:r,provider:e});return Array.isArray(s)}}class Pve{constructor(){}async compute(e,t,i,n){const s=await e.provideDocumentColors(t,i);if(Array.isArray(s))for(const r of s)n.push({range:r.range,color:[r.color.red,r.color.green,r.color.blue,r.color.alpha]});return Array.isArray(s)}}class Ove{constructor(e){this.colorInfo=e}async compute(e,t,i,n){const s=await e.provideColorPresentations(t,this.colorInfo,vt.None);return Array.isArray(s)&&n.push(...s),Array.isArray(s)}}async function RR(o,e,t,i,n){let s=!1,r;const a=[],l=e.ordered(t);for(let d=l.length-1;d>=0;d--){const c=l[d];if(c instanceof AR)r=c;else try{await o.compute(c,t,i,a)&&(s=!0)}catch(u){en(u)}}return s?a:r&&n?(await o.compute(r,t,i,a),a):[]}function vV(o,e){const{colorProvider:t}=o.get(Me),i=o.get(Si).getModel(e);if(!i)throw hr();const n=o.get(Dt).getValue("editor.defaultColorDecorators",{resource:e});return{model:i,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:n}}Et.registerCommand("_executeDocumentColorProvider",function(o,...e){const[t]=e;if(!(t instanceof ze))throw hr();const{model:i,colorProviderRegistry:n,isDefaultColorDecoratorsEnabled:s}=vV(o,t);return RR(new Pve,n,i,vt.None,s)});Et.registerCommand("_executeColorPresentationProvider",function(o,...e){const[t,i]=e,{uri:n,range:s}=i;if(!(n instanceof ze)||!Array.isArray(t)||t.length!==4||!k.isIRange(s))throw hr();const{model:r,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=vV(o,n),[d,c,u,h]=t;return RR(new Ove({range:s,color:{red:d,green:c,blue:u,alpha:h}}),a,r,vt.None,l)});var Fve=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rk=function(o,e){return function(t,i){e(t,i,o)}},pT;const bV=Object.create({});let wu=pT=class extends q{constructor(e,t,i,n){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new de),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new o0(this._editor),this._decoratorLimitReporter=new Bve,this._colorDecorationClassRefs=this._register(new de),this._debounceInformation=n.for(i.colorProvider,"Document Colors",{min:pT.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(i.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(s=>{const r=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145);const a=r!==this._isColorDecoratorsEnabled||s.hasChanged(21),l=s.hasChanged(145);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&typeof i=="object"){const n=i.colorDecorators;if(n&&n.enable!==void 0&&!n.enable)return n.enable}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new qr,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}async beginCompute(){this._computePromise=_n(async e=>{const t=this._editor.getModel();if(!t)return[];const i=new ds(!1),n=await mV(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,i.elapsed()),n});try{const e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){nt(e)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map(i=>({range:{startLineNumber:i.colorInfo.range.startLineNumber,startColumn:i.colorInfo.range.startColumn,endLineNumber:i.colorInfo.range.endLineNumber,endColumn:i.colorInfo.range.endColumn},options:st.EMPTY}));this._editor.changeDecorations(i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((n,s)=>this._colorDatas.set(n,e[s]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(21);for(let s=0;sthis._colorDatas.has(n.id));return i.length===0?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};wu.ID="editor.contrib.colorDetector";wu.RECOMPUTE_TIME=1e3;wu=pT=Fve([rk(1,Dt),rk(2,Me),rk(3,wr)],wu);class Bve{constructor(){this._onDidChange=new W,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}At(wu.ID,wu,1);class Wve{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new W,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new W,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new W,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let i=-1;for(let n=0;n{this.backgroundColor=r.getColor(xw)||Y.white})),this._register(J(this._pickedColorNode,Se.CLICK,()=>this.model.selectNextColorPresentation())),this._register(J(this._originalColorNode,Se.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=Y.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new Hve(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=Y.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}class Hve extends q{constructor(e){super(),this._onClicked=this._register(new W),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),le(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),le(this._button,t),le(t,Bo(".button"+Ue.asCSSSelector(Zi("color-picker-close",ve.close,p("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}}class zve extends q{constructor(e,t,i,n=!1){super(),this.model=t,this.pixelRatio=i,this._insertButton=null,this._domNode=Bo(".colorpicker-body"),le(e,this._domNode),this._saturationBox=new $ve(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new Uve(this._domNode,this.model,n),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new jve(this._domNode,this.model,n),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),n&&(this._insertButton=this._register(new Kve(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new Y(new pl(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new Y(new pl(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=(1-e)*360;this.model.color=new Y(new pl(i===360?0:i,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class $ve extends q{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new W,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new W,this.onColorFlushed=this._onColorFlushed.event,this._domNode=Bo(".saturation-wrap"),le(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",le(this._domNode,this._canvas),this.selection=Bo(".saturation-selection"),le(this._domNode,this.selection),this.layout(),this._register(J(this._domNode,Se.POINTER_DOWN,n=>this.onPointerDown(n))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new vm);const t=gn(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>this.onDidChangePosition(n.pageX-t.left,n.pageY-t.top),()=>null);const i=J(e.target.ownerDocument,Se.POINTER_UP,()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new Y(new pl(e.h,1,1,1)),i=this._canvas.getContext("2d"),n=i.createLinearGradient(0,0,this._canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const s=i.createLinearGradient(0,0,0,this._canvas.height);s.addColorStop(0,"rgba(0, 0, 0, 0)"),s.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this._canvas.width,this._canvas.height),i.fillStyle=Y.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=s,i.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class CV extends q{constructor(e,t,i=!1){super(),this.model=t,this._onDidChange=new W,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new W,this.onColorFlushed=this._onColorFlushed.event,i?(this.domNode=le(e,Bo(".standalone-strip")),this.overlay=le(this.domNode,Bo(".standalone-overlay"))):(this.domNode=le(e,Bo(".strip")),this.overlay=le(this.domNode,Bo(".overlay"))),this.slider=le(this.domNode,Bo(".slider")),this.slider.style.top="0px",this._register(J(this.domNode,Se.POINTER_DOWN,n=>this.onPointerDown(n))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._register(new vm),i=gn(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,s=>this.onDidChangeTop(s.pageY-i.top),()=>null);const n=J(e.target.ownerDocument,Se.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class Uve extends CV{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:i,b:n}=e.rgba,s=new Y(new kt(t,i,n,1)),r=new Y(new kt(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${s} 0%, ${r} 100%)`}getValue(e){return e.hsva.a}}class jve extends CV{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class Kve extends q{constructor(e){super(),this._onClicked=this._register(new W),this.onClicked=this._onClicked.event,this._button=le(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=t=>{this._onClicked.fire()}}get button(){return this._button}}class qve extends Gr{constructor(e,t,i,n,s=!1){super(),this.model=t,this.pixelRatio=i,this._register(yv.onDidChange(()=>this.layout()));const r=Bo(".colorpicker-widget");e.appendChild(r),this.header=this._register(new Vve(r,this.model,n,s)),this.body=this._register(new zve(r,this.model,this.pixelRatio,s))}layout(){this.body.layout()}}var wV=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},SV=function(o,e){return function(t,i){e(t,i,o)}};class Gve{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let AS=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,i){return rn.fromPromise(this._computeAsync(e,t,i))}async _computeAsync(e,t,i){if(!this._editor.hasModel())return[];const n=wu.get(this._editor);if(!n)return[];for(const s of t){if(!n.isColorDecoration(s))continue;const r=n.getColorData(s.range.getStartPosition());if(r)return[await yV(this,this._editor.getModel(),r.colorInfo,r.provider)]}return[]}renderHoverParts(e,t){return LV(this,this._editor,this._themeService,t,e)}};AS=wV([SV(1,Sn)],AS);class Zve{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n}}let wb=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}async createColorHover(e,t,i){if(!this._editor.hasModel()||!wu.get(this._editor))return null;const s=await mV(i,this._editor.getModel(),vt.None);let r=null,a=null;for(const u of s){const h=u.colorInfo;k.containsRange(h.range,e.range)&&(r=h,a=u.provider)}const l=r??e,d=a??t,c=!!r;return{colorHover:await yV(this,this._editor.getModel(),l,d),foundInEditor:c}}async updateEditorModel(e){if(!this._editor.hasModel())return;const t=e.model;let i=new k(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(await H1(this._editor.getModel(),t,this._color,i,e),i=DV(this._editor,i,t))}renderHoverParts(e,t){return LV(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};wb=wV([SV(1,Sn)],wb);async function yV(o,e,t,i){const n=e.getValueInRange(t.range),{red:s,green:r,blue:a,alpha:l}=t.color,d=new kt(Math.round(s*255),Math.round(r*255),Math.round(a*255),l),c=new Y(d),u=await _V(e,t,i,vt.None),h=new Wve(c,[],0);return h.colorPresentations=u||[],h.guessColorPresentation(c,n),o instanceof AS?new Gve(o,k.lift(t.range),h,i):new Zve(o,k.lift(t.range),h,i)}function LV(o,e,t,i,n){if(i.length===0||!e.hasModel())return q.None;if(n.setMinimumDimensions){const h=e.getOption(66)+8;n.setMinimumDimensions(new Rt(302,h))}const s=new de,r=i[0],a=e.getModel(),l=r.model,d=s.add(new qve(n.fragment,l,e.getOption(141),t,o instanceof wb));n.setColorPicker(d);let c=!1,u=new k(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn);if(o instanceof wb){const h=i[0].model.color;o.color=h,H1(a,l,h,u,r),s.add(l.onColorFlushed(g=>{o.color=g}))}else s.add(l.onColorFlushed(async h=>{await H1(a,l,h,u,r),c=!0,u=DV(e,u,l,n)}));return s.add(l.onDidChangeColor(h=>{H1(a,l,h,u,r)})),s.add(e.onDidChangeModelContent(h=>{c?c=!1:(n.hide(),e.focus())})),s}function DV(o,e,t,i){let n,s;if(t.presentation.textEdit){n=[t.presentation.textEdit],s=new k(t.presentation.textEdit.range.startLineNumber,t.presentation.textEdit.range.startColumn,t.presentation.textEdit.range.endLineNumber,t.presentation.textEdit.range.endColumn);const r=o.getModel()._setTrackedRange(null,s,3);o.pushUndoStop(),o.executeEdits("colorpicker",n),s=o.getModel()._getTrackedRange(r)||s}else n=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],s=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),o.pushUndoStop(),o.executeEdits("colorpicker",n);return t.presentation.additionalTextEdits&&(n=[...t.presentation.additionalTextEdits],o.executeEdits("colorpicker",n),i&&i.hide()),o.pushUndoStop(),s}async function H1(o,e,t,i,n){const s=await _V(o,{range:i,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},n.provider,vt.None);e.colorPresentations=s||[]}function mT(o,e){return!!o[e]}class ak{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=mT(e.event,t.triggerModifier),this.hasSideBySideModifier=mT(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class c3{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=mT(e,t.triggerModifier)}}class FC{constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function u3(o){return o==="altKey"?It?new FC(57,"metaKey",6,"altKey"):new FC(5,"ctrlKey",6,"altKey"):It?new FC(6,"altKey",57,"metaKey"):new FC(6,"altKey",5,"ctrlKey")}class ML extends q{constructor(e,t){var i;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new W),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new W),this.onExecute=this._onExecute.event,this._onCancel=this._register(new W),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=(i=t==null?void 0:t.extractLineNumberFromMouseEvent)!==null&&i!==void 0?i:n=>n.target.position?n.target.position.lineNumber:0,this._opts=u3(this._editor.getOption(77)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(77)){const s=u3(this._editor.getOption(77));if(this._opts.equals(s))return;this._opts=s,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new ak(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new ak(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new ak(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new c3(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new c3(n,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(n=>this._onDidChangeCursorSelection(n))),this._register(this._editor.onDidChangeModel(n=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(n=>{(n.scrollTopChanged||n.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}var Yve=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nd=function(o,e){return function(t,i){e(t,i,o)}};let Su=class extends Vp{constructor(e,t,i,n,s,r,a,l,d,c,u,h,g){super(e,{...n.getRawOptions(),overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()},i,s,r,a,l,d,c,u,h,g),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration(f=>this._onParentConfigurationChanged(f)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){ry(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Su=Yve([nd(4,qe),nd(5,Ot),nd(6,Ri),nd(7,Xe),nd(8,Sn),nd(9,sn),nd(10,Zl),nd(11,si),nd(12,Me)],Su);const h3=new Y(new kt(0,122,204)),Xve={showArrow:!0,showFrame:!0,className:"",frameColor:h3,arrowColor:h3,keepEditorSelection:!1},Qve="vs.editor.contrib.zoneWidget";class Jve{constructor(e,t,i,n,s,r,a,l){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=s,this._onComputedHeight=r}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class ebe{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class AL{constructor(e){this._editor=e,this._ruleName=AL._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),VI(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){VI(this._ruleName),pw(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:k.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}AL._IdGenerator=new BA(".arrow-decoration-");class tbe{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new de,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=gd(t),ry(this.options,Xve,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(i=>{const n=this._getWidth(i);this.domNode.style.width=n+"px",this.domNode.style.left=this._getLeft(i)+"px",this._onWidth(n)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new AL(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;if(this.domNode.style.height=`${e}px`,this.container){const i=e-this._decoratingElementsHeight();this.container.style.height=`${i}px`;const n=this.editor.getLayoutInfo();this._doLayout(i,this._getWidth(n))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const i=k.isIRange(e)?k.lift(e):k.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:st.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)===null||e===void 0||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(66);let t=0;if(this.options.showArrow){const i=Math.round(e/3);t+=2*i}if(this.options.showFrame){const i=Math.round(e/9);t+=2*i}return t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),s=this._getWidth(n);this.domNode.style.width=`${s}px`,this.domNode.style.left=this._getLeft(n)+"px";const r=document.createElement("div");r.style.overflow="hidden";const a=this.editor.getOption(66);if(!this.options.allowUnlimitedHeight){const h=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,h)}let l=0,d=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(d=Math.round(a/9)),this.editor.changeViewZones(h=>{this._viewZone&&h.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new Jve(r,i.lineNumber,i.column,t,g=>this._onViewZoneTop(g),g=>this._onViewZoneHeight(g),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new ebe(Qve+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const h=this.options.frameWidth?this.options.frameWidth:d;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}const c=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,s),this.options.keepEditorSelection||this.editor.setSelection(e);const u=this.editor.getModel();if(u){const h=u.validateRange(new k(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(h,h.startLineNumber===u.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new ss(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){const i=(t.currentY-e.startY)/this.editor.getOption(66),n=i<0?Math.ceil(i):Math.floor(i),s=e.heightInLines+n;s>5&&s<35&&this._relayout(s)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var xV=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},kV=function(o,e){return function(t,i){e(t,i,o)}};const IV=bt("IPeekViewService");xt(IV,class{constructor(){this._widgets=new Map}addExclusiveWidget(o,e){const t=this._widgets.get(o);t&&(t.listener.dispose(),t.widget.dispose());const i=()=>{const n=this._widgets.get(o);n&&n.widget===e&&(n.listener.dispose(),this._widgets.delete(o))};this._widgets.set(o,{widget:e,listener:e.onDidClose(i)})}},1);var Zs;(function(o){o.inPeekEditor=new De("inReferenceSearchEditor",!0,p("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),o.notInPeekEditor=o.inPeekEditor.toNegated()})(Zs||(Zs={}));let Sb=class{constructor(e,t){e instanceof Su&&Zs.inPeekEditor.bindTo(t)}dispose(){}};Sb.ID="editor.contrib.referenceController";Sb=xV([kV(1,Xe)],Sb);At(Sb.ID,Sb,0);function ibe(o){const e=o.get(Ot).getFocusedCodeEditor();return e instanceof Su?e.getParentEditor():e}const nbe={headerBackgroundColor:Y.white,primaryHeadingColor:Y.fromHex("#333333"),secondaryHeadingColor:Y.fromHex("#6c6c6cb3")};let RS=class extends tbe{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new W,this.onDidClose=this._onDidClose.event,ry(this.options,nbe,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=pe(".head"),this._bodyElement=pe(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=pe(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),Wi(this._titleElement,"click",s=>this._onTitleClick(s))),le(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=pe("span.filename"),this._secondaryHeading=pe("span.dirname"),this._metaHeading=pe("span.meta"),le(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=pe(".peekview-actions");le(this._headElement,i);const n=this._getActionBarOptions();this._actionbarWidget=new Cr(i,n),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new Rs("peekview.close",p("label.close","Close"),Ue.asClassName(ve.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:$ce.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:$n(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,oo(this._metaHeading)):xs(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const i=Math.ceil(this.editor.getOption(66)*1.2),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};RS=xV([kV(2,qe)],RS);const sbe=M("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:Y.black,hcLight:Y.white},p("peekViewTitleBackground","Background color of the peek view title area.")),EV=M("peekViewTitleLabel.foreground",{dark:Y.white,light:Y.black,hcDark:Y.white,hcLight:Fr},p("peekViewTitleForeground","Color of the peek view title.")),NV=M("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},p("peekViewTitleInfoForeground","Color of the peek view title info.")),obe=M("peekView.border",{dark:Ks,light:Ks,hcDark:Lt,hcLight:Lt},p("peekViewBorder","Color of the peek view borders and arrow.")),rbe=M("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:Y.black,hcLight:Y.white},p("peekViewResultsBackground","Background color of the peek view result list."));M("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:Y.white,hcLight:Fr},p("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));M("peekViewResult.fileForeground",{dark:Y.white,light:"#1E1E1E",hcDark:Y.white,hcLight:Fr},p("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));M("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},p("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));M("peekViewResult.selectionForeground",{dark:Y.white,light:"#6C6C6C",hcDark:Y.white,hcLight:Fr},p("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const Pc=M("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:Y.black,hcLight:Y.white},p("peekViewEditorBackground","Background color of the peek view editor."));M("peekViewEditorGutter.background",{dark:Pc,light:Pc,hcDark:Pc,hcLight:Pc},p("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));M("peekViewEditorStickyScroll.background",{dark:Pc,light:Pc,hcDark:Pc,hcLight:Pc},p("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));M("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},p("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));M("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},p("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));M("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:fi,hcLight:fi},p("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));class yu{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=ZE.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?p({},"{0} in {1} on line {2} at column {3}",t.value,br(this.uri),this.range.startLineNumber,this.range.startColumn):p("aria.oneReference","in {0} on line {1} at column {2}",br(this.uri),this.range.startLineNumber,this.range.startColumn)}}class abe{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:s,endLineNumber:r,endColumn:a}=e,l=i.getWordUntilPosition({lineNumber:n,column:s-t}),d=new k(n,l.startColumn,n,s),c=new k(r,a,r,1073741824),u=i.getValueInRange(d).replace(/^\s+/,""),h=i.getValueInRange(e),g=i.getValueInRange(c).replace(/\s+$/,"");return{value:u+h+g,highlight:{start:u.length,end:u.length+h.length}}}}class yb{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new Gi}dispose(){jt(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?p("aria.fileReferences.1","1 symbol in {0}, full path {1}",br(this.uri),this.uri.fsPath):p("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,br(this.uri),this.uri.fsPath)}async resolve(e){if(this._previews.size!==0)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const i=await e.createModelReference(t.uri);this._previews.set(t.uri,new abe(i))}catch(i){nt(i)}return this}}class go{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new W,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;e.sort(go._compareReferences);let n;for(const s of e)if((!n||!pi.isEqual(n.uri,s.uri,!0))&&(n=new yb(this,s.uri),this.groups.push(n)),n.children.length===0||go._compareReferences(s,n.children[n.children.length-1])!==0){const r=new yu(i===s,n,s,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(r),n.children.push(r)}}dispose(){jt(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new go(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?p("aria.result.0","No results found"):this.references.length===1?p("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?p("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):p("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let n=i.children.indexOf(e);const s=i.children.length,r=i.parent.groups.length;return r===1||t&&n+10?(t?n=(n+1)%s:n=(n+s-1)%s,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%r,i.parent.groups[n].children[0]):(n=(n+r-1)%r,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map((n,s)=>({idx:s,prefixLen:Qh(n.uri.toString(),e.toString()),offsetDist:Math.abs(n.range.startLineNumber-t.lineNumber)*100+Math.abs(n.range.startColumn-t.column)})).sort((n,s)=>n.prefixLen>s.prefixLen?-1:n.prefixLens.offsetDist?1:0)[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&k.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return pi.compare(e.uri,t.uri)||k.compareRangesUsingStarts(e.range,t.range)}}var RL=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},PL=function(o,e){return function(t,i){e(t,i,o)}},_T;let vT=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof go||e instanceof yb}getChildren(e){if(e instanceof go)return e.groups;if(e instanceof yb)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};vT=RL([PL(0,Xs)],vT);class lbe{getHeight(){return 23}getTemplateId(e){return e instanceof yb?Lb.id:M0.id}}let bT=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof yu){const i=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(i)return i.value}return br(e.uri)}};bT=RL([PL(0,Xt)],bT);class dbe{getId(e){return e instanceof yu?e.id:e.uri}}let CT=class extends q{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new _S(i,{supportHighlights:!0})),this.badge=new vN(le(i,pe(".count")),{},y6),e.appendChild(i)}set(e,t){const i=qy(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat(p("referencesCount","{0} references",n)):this.badge.setTitleFormat(p("referenceCount","{0} reference",n))}};CT=RL([PL(1,Hp)],CT);let Lb=_T=class{constructor(e){this._instantiationService=e,this.templateId=_T.id}renderTemplate(e){return this._instantiationService.createInstance(CT,e)}renderElement(e,t,i){i.set(e.element,p0(e.filterData))}disposeTemplate(e){e.dispose()}};Lb.id="FileReferencesRenderer";Lb=_T=RL([PL(0,qe)],Lb);class cbe{constructor(e){this.label=new Gc(e)}set(e,t){var i;const n=(i=e.parent.getPreview(e))===null||i===void 0?void 0:i.preview(e.range);if(!n||!n.value)this.label.set(`${br(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:s,highlight:r}=n;t&&!ka.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(s,p0(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(s,[r]))}}}class M0{constructor(){this.templateId=M0.id}renderTemplate(e){return new cbe(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}M0.id="OneReferenceRenderer";class ube{getWidgetAriaLabel(){return p("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var hbe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sd=function(o,e){return function(t,i){e(t,i,o)}};class OL{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new de,this._callOnModelChange=new de,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e){for(const t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],i=[];for(let n=0,s=e.children.length;n{const s=n.deltaDecorations([],t);for(let r=0;r{s.equals(9)&&(this._keybindingService.dispatchEvent(s,s.target),s.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(fbe,"ReferencesWidget",this._treeContainer,new lbe,[this._instantiationService.createInstance(Lb),this._instantiationService.createInstance(M0)],this._instantiationService.createInstance(vT),i),this._splitView.addView({onDidChange:ye.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:s=>{this._preview.layout({height:this._dim.height,width:s})}},cS.Distribute),this._splitView.addView({onDidChange:ye.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:s=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${s}px`,this._tree.layout(this._dim.height,s)}},cS.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const n=(s,r)=>{s instanceof yu&&(r==="show"&&this._revealReference(s,!1),this._onDidSelectReference.fire({element:s,kind:r,source:"tree"}))};this._tree.onDidOpen(s=>{s.sideBySide?n(s.element,"side"):s.editorOptions.pinned?n(s.element,"goto"):n(s.element,"show")}),xs(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Rt(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=p("noResults","No results"),oo(this._messageContainer),Promise.resolve(void 0)):(xs(this._messageContainer),this._decorationsManager=new OL(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:t,target:i}=e;if(t.detail!==2)return;const n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),oo(this._treeContainer),oo(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof yu)return e;if(e instanceof yb&&e.children.length>0)return e.children[0]}async revealReference(e){await this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}async _revealReference(e,t){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==ot.inMemory?this.setTitle(Moe(e.uri),this._uriLabel.getUriLabel(qy(e.uri))):this.setTitle(p("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),await this._tree.expand(e.parent),this._tree.reveal(e));const n=await i;if(!this._model){n.dispose();return}jt(this._previewModelReference);const s=n.object;if(s){const r=this._preview.getModel()===s.textEditorModel?0:1,a=k.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(s.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,r)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()}};wT=hbe([sd(3,Sn),sd(4,Xs),sd(5,qe),sd(6,IV),sd(7,Hp),sd(8,Gy),sd(9,Xt),sd(10,bi),sd(11,si)],wT);var pbe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},of=function(o,e){return function(t,i){e(t,i,o)}},z1;const $g=new De("referenceSearchVisible",!1,p("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Lu=z1=class{static get(e){return e.getContribution(z1.ID)}constructor(e,t,i,n,s,r,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=s,this._instantiationService=r,this._storageService=a,this._configurationService=l,this._disposables=new de,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=$g.bindTo(i)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),n&&e.containsPosition(n))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const s="peekViewLayout",r=gbe.fromJSON(this._storageService.get(s,0,"{}"));this._widget=this._instantiationService.createInstance(wT,this._editor,this._defaultTreeKeyboardSupport,r),this._widget.setTitle(p("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(s,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(l=>{const{element:d,kind:c}=l;if(d)switch(c){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(d,!1,!1);break;case"side":this.openReference(d,!0,!1);break;case"goto":i?this._gotoReference(d,!0):this.openReference(d,!1,!0);break}}));const a=++this._requestIdPool;t.then(l=>{var d;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(d=this._model)===null||d===void 0||d.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(p("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const c=this._editor.getModel().uri,u=new z(e.startLineNumber,e.startColumn),h=this._model.nearestReference(c,u);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(86)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(e){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),s=this._editor.hasTextFocus(),r=this._widget.isPreviewEditorFocused();await this._widget.setSelection(n),await this._gotoReference(n,!1),s?this._editor.focus():this._widget&&r&&this._widget.focusOnPreviewEditor()}async revealReference(e){!this._editor.hasModel()||!this._model||!this._widget||await this._widget.revealReference(e)}closeWidget(e=!0){var t,i;(t=this._widget)===null||t===void 0||t.dispose(),(i=this._model)===null||i===void 0||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var i;(i=this._widget)===null||i===void 0||i.hide(),this._ignoreModelChangeEvent=!0;const n=k.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:n,selectionSource:"code.jump",pinned:t}},this._editor).then(s=>{var r;if(this._ignoreModelChangeEvent=!1,!s||!this._widget){this.closeWidget();return}if(this._editor===s)this._widget.show(n),this._widget.focusOnReferenceTree();else{const a=z1.get(s),l=this._model.clone();this.closeWidget(),s.focus(),a==null||a.toggleWidget(n,_n(d=>Promise.resolve(l)),(r=this._peekMode)!==null&&r!==void 0?r:!1)}},s=>{this._ignoreModelChangeEvent=!1,nt(s)})}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:s}=e;this._editorService.openCodeEditor({resource:n,options:{selection:s,selectionSource:"code.jump",pinned:i}},this._editor,t)}};Lu.ID="editor.contrib.referencesController";Lu=z1=pbe([of(2,Xe),of(3,Ot),of(4,sn),of(5,qe),of(6,Xr),of(7,Dt)],Lu);function Ug(o,e){const t=ibe(o);if(!t)return;const i=Lu.get(t);i&&e(i)}Gs.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:fn(2089,60),when:ae.or($g,Zs.inPeekEditor),handler(o){Ug(o,e=>{e.changeFocusBetweenPreviewAndReferences()})}});Gs.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:ae.or($g,Zs.inPeekEditor),handler(o){Ug(o,e=>{e.goToNextOrPreviousReference(!0)})}});Gs.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:ae.or($g,Zs.inPeekEditor),handler(o){Ug(o,e=>{e.goToNextOrPreviousReference(!1)})}});Et.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");Et.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");Et.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");Et.registerCommand("closeReferenceSearch",o=>Ug(o,e=>e.closeWidget()));Gs.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:ae.and(Zs.inPeekEditor,ae.not("config.editor.stablePeek"))});Gs.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:ae.and($g,ae.not("config.editor.stablePeek"))});Gs.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:ae.and($g,z6,tR.negate(),iR.negate()),handler(o){var e;const i=(e=o.get(Lr).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof yu&&Ug(o,n=>n.revealReference(i[0]))}});Gs.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:ae.and($g,z6,tR.negate(),iR.negate()),handler(o){var e;const i=(e=o.get(Lr).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof yu&&Ug(o,n=>n.openReference(i[0],!0,!0))}});Et.registerCommand("openReference",o=>{var e;const i=(e=o.get(Lr).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof yu&&Ug(o,n=>n.openReference(i[0],!1,!0))});var TV=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},E_=function(o,e){return function(t,i){e(t,i,o)}};const PR=new De("hasSymbols",!1,p("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),FL=bt("ISymbolNavigationService");let ST=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=PR.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new yT(this._editorService),n=i.onDidChange(s=>{if(this._ignoreEditorChange)return;const r=this._editorService.getActiveCodeEditor();if(!r)return;const a=r.getModel(),l=r.getPosition();if(!a||!l)return;let d=!1,c=!1;for(const u of t.references)if(dA(u.uri,a.uri))d=!0,c=c||k.containsPosition(u.range,l);else if(d)break;(!d||!c)&&this.reset()});this._currentState=Hr(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:k.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?p("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):p("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};ST=TV([E_(0,Xe),E_(1,Ot),E_(2,sn),E_(3,Xt)],ST);xt(FL,ST,1);we(new class extends Rn{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:PR,kbOpts:{weight:100,primary:70}})}runEditorCommand(o,e){return o.get(FL).revealNext(e)}});Gs.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:PR,primary:9,handler(o){o.get(FL).reset()}});let yT=class{constructor(e){this._listener=new Map,this._disposables=new de,this._onDidChange=new W,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),jt(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,Hr(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};yT=TV([E_(0,Ot)],yT);async function A0(o,e,t,i){const s=t.ordered(o).map(a=>Promise.resolve(i(a,o,e)).then(void 0,l=>{en(l)})),r=await Promise.all(s);return Ia(r.flat())}function BL(o,e,t,i){return A0(e,t,o,(n,s,r)=>n.provideDefinition(s,r,i))}function MV(o,e,t,i){return A0(e,t,o,(n,s,r)=>n.provideDeclaration(s,r,i))}function AV(o,e,t,i){return A0(e,t,o,(n,s,r)=>n.provideImplementation(s,r,i))}function RV(o,e,t,i){return A0(e,t,o,(n,s,r)=>n.provideTypeDefinition(s,r,i))}function WL(o,e,t,i,n){return A0(e,t,o,async(s,r,a)=>{const l=await s.provideReferences(r,a,{includeDeclaration:!0},n);if(!i||!l||l.length!==2)return l;const d=await s.provideReferences(r,a,{includeDeclaration:!1},n);return d&&d.length===1?d:l})}async function R0(o){const e=await o(),t=new go(e,""),i=t.references.map(n=>n.link);return t.dispose(),i}ql("_executeDefinitionProvider",(o,e,t)=>{const i=o.get(Me),n=BL(i.definitionProvider,e,t,vt.None);return R0(()=>n)});ql("_executeTypeDefinitionProvider",(o,e,t)=>{const i=o.get(Me),n=RV(i.typeDefinitionProvider,e,t,vt.None);return R0(()=>n)});ql("_executeDeclarationProvider",(o,e,t)=>{const i=o.get(Me),n=MV(i.declarationProvider,e,t,vt.None);return R0(()=>n)});ql("_executeReferenceProvider",(o,e,t)=>{const i=o.get(Me),n=WL(i.referenceProvider,e,t,!1,vt.None);return R0(()=>n)});ql("_executeImplementationProvider",(o,e,t)=>{const i=o.get(Me),n=AV(i.implementationProvider,e,t,vt.None);return R0(()=>n)});var n_,s_,o_,BC,WC,VC,HC,zC;zn.appendMenuItem(N.EditorContext,{submenu:N.EditorContextPeek,title:p("peek.submenu","Peek"),group:"navigation",order:100});class em{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof em||z.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}}class bs extends Wa{static all(){return bs._allSymbolNavigationCommands.values()}static _patchConfig(e){const t={...e,f1:!0};if(t.menu)for(const i of wt.wrap(t.menu))(i.id===N.EditorContext||i.id===N.EditorContextPeek)&&(i.when=ae.and(e.precondition,i.when));return t}constructor(e,t){super(bs._patchConfig(t)),this.configuration=e,bs._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,n){if(!t.hasModel())return Promise.resolve(void 0);const s=e.get(sn),r=e.get(Ot),a=e.get(Bu),l=e.get(FL),d=e.get(Me),c=e.get(qe),u=t.getModel(),h=t.getPosition(),g=em.is(i)?i:new em(u,h),f=new bu(t,5),m=Cy(this._getLocationModel(d,g.model,g.position,f.token),f.token).then(async v=>{var _;if(!v||f.token.isCancellationRequested)return;mo(v.ariaMessage);let b;if(v.referenceAt(u.uri,h)){const w=this._getAlternativeCommand(t);!bs._activeAlternativeCommands.has(w)&&bs._allSymbolNavigationCommands.has(w)&&(b=bs._allSymbolNavigationCommands.get(w))}const C=v.references.length;if(C===0){if(!this.configuration.muteMessage){const w=u.getWordAtPosition(h);(_=ho.get(t))===null||_===void 0||_.showMessage(this._getNoResultFoundMessage(w),h)}}else if(C===1&&b)bs._activeAlternativeCommands.add(this.desc.id),c.invokeFunction(w=>b.runEditorCommand(w,t,i,n).finally(()=>{bs._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(r,l,t,v,n)},v=>{s.error(v)}).finally(()=>{f.dispose()});return a.showWhile(m,250),m}async _onResult(e,t,i,n,s){const r=this._getGoToPreference(i);if(!(i instanceof Su)&&(this.configuration.openInPeek||r==="peek"&&n.references.length>1))this._openInPeek(i,n,s);else{const a=n.firstReference(),l=n.references.length>1&&r==="gotoAndPeek",d=await this._openReference(i,e,a,this.configuration.openToSide,!l);l&&d?this._openInPeek(d,n,s):n.dispose(),r==="goto"&&t.put(a)}}async _openReference(e,t,i,n,s){let r;if(qZ(i)&&(r=i.targetSelectionRange),r||(r=i.range),!r)return;const a=await t.openCodeEditor({resource:i.uri,options:{selection:k.collapseToStart(r),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(a){if(s){const l=a.getModel(),d=a.createDecorationsCollection([{range:r,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&d.clear()},350)}return a}}_openInPeek(e,t,i){const n=Lu.get(e);n&&e.hasModel()?n.toggleWidget(i??e.getSelection(),_n(s=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}bs._allSymbolNavigationCommands=new Map;bs._activeAlternativeCommands=new Set;class P0 extends bs{async _getLocationModel(e,t,i,n){return new go(await BL(e.definitionProvider,t,i,n),p("def.title","Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?p("noResultWord","No definition found for '{0}'",e.word):p("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}mi((n_=class extends P0{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:n_.id,title:{value:p("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:p({},"Go to &&Definition")},precondition:ae.and(T.hasDefinitionProvider,T.isInWalkThroughSnippet.toNegated()),keybinding:[{when:T.editorTextFocus,primary:70,weight:100},{when:ae.and(T.editorTextFocus,W6),primary:2118,weight:100}],menu:[{id:N.EditorContext,group:"navigation",order:1.1},{id:N.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),Et.registerCommandAlias("editor.action.goToDeclaration",n_.id)}},n_.id="editor.action.revealDefinition",n_));mi((s_=class extends P0{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:s_.id,title:{value:p("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:ae.and(T.hasDefinitionProvider,T.isInWalkThroughSnippet.toNegated()),keybinding:[{when:T.editorTextFocus,primary:fn(2089,70),weight:100},{when:ae.and(T.editorTextFocus,W6),primary:fn(2089,2118),weight:100}]}),Et.registerCommandAlias("editor.action.openDeclarationToTheSide",s_.id)}},s_.id="editor.action.revealDefinitionAside",s_));mi((o_=class extends P0{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:o_.id,title:{value:p("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:ae.and(T.hasDefinitionProvider,Zs.notInPeekEditor,T.isInWalkThroughSnippet.toNegated()),keybinding:{when:T.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:N.EditorContextPeek,group:"peek",order:2}}),Et.registerCommandAlias("editor.action.previewDeclaration",o_.id)}},o_.id="editor.action.peekDefinition",o_));class PV extends bs{async _getLocationModel(e,t,i,n){return new go(await MV(e.declarationProvider,t,i,n),p("decl.title","Declarations"))}_getNoResultFoundMessage(e){return e&&e.word?p("decl.noResultWord","No declaration found for '{0}'",e.word):p("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}mi((BC=class extends PV{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:BC.id,title:{value:p("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:p({},"Go to &&Declaration")},precondition:ae.and(T.hasDeclarationProvider,T.isInWalkThroughSnippet.toNegated()),menu:[{id:N.EditorContext,group:"navigation",order:1.3},{id:N.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?p("decl.noResultWord","No declaration found for '{0}'",e.word):p("decl.generic.noResults","No declaration found")}},BC.id="editor.action.revealDeclaration",BC));mi(class extends PV{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:p("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:ae.and(T.hasDeclarationProvider,Zs.notInPeekEditor,T.isInWalkThroughSnippet.toNegated()),menu:{id:N.EditorContextPeek,group:"peek",order:3}})}});class OV extends bs{async _getLocationModel(e,t,i,n){return new go(await RV(e.typeDefinitionProvider,t,i,n),p("typedef.title","Type Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?p("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):p("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}mi((WC=class extends OV{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:WC.ID,title:{value:p("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:p({},"Go to &&Type Definition")},precondition:ae.and(T.hasTypeDefinitionProvider,T.isInWalkThroughSnippet.toNegated()),keybinding:{when:T.editorTextFocus,primary:0,weight:100},menu:[{id:N.EditorContext,group:"navigation",order:1.4},{id:N.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},WC.ID="editor.action.goToTypeDefinition",WC));mi((VC=class extends OV{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:VC.ID,title:{value:p("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:ae.and(T.hasTypeDefinitionProvider,Zs.notInPeekEditor,T.isInWalkThroughSnippet.toNegated()),menu:{id:N.EditorContextPeek,group:"peek",order:4}})}},VC.ID="editor.action.peekTypeDefinition",VC));class FV extends bs{async _getLocationModel(e,t,i,n){return new go(await AV(e.implementationProvider,t,i,n),p("impl.title","Implementations"))}_getNoResultFoundMessage(e){return e&&e.word?p("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):p("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}mi((HC=class extends FV{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:HC.ID,title:{value:p("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:p({},"Go to &&Implementations")},precondition:ae.and(T.hasImplementationProvider,T.isInWalkThroughSnippet.toNegated()),keybinding:{when:T.editorTextFocus,primary:2118,weight:100},menu:[{id:N.EditorContext,group:"navigation",order:1.45},{id:N.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},HC.ID="editor.action.goToImplementation",HC));mi((zC=class extends FV{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:zC.ID,title:{value:p("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:ae.and(T.hasImplementationProvider,Zs.notInPeekEditor,T.isInWalkThroughSnippet.toNegated()),keybinding:{when:T.editorTextFocus,primary:3142,weight:100},menu:{id:N.EditorContextPeek,group:"peek",order:5}})}},zC.ID="editor.action.peekImplementation",zC));class BV extends bs{_getNoResultFoundMessage(e){return e?p("references.no","No references found for '{0}'",e.word):p("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}mi(class extends BV{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:p("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:p({},"Go to &&References")},precondition:ae.and(T.hasReferenceProvider,Zs.notInPeekEditor,T.isInWalkThroughSnippet.toNegated()),keybinding:{when:T.editorTextFocus,primary:1094,weight:100},menu:[{id:N.EditorContext,group:"navigation",order:1.45},{id:N.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(e,t,i,n){return new go(await WL(e.referenceProvider,t,i,!0,n),p("ref.title","References"))}});mi(class extends BV{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:p("references.action.label","Peek References"),original:"Peek References"},precondition:ae.and(T.hasReferenceProvider,Zs.notInPeekEditor,T.isInWalkThroughSnippet.toNegated()),menu:{id:N.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,t,i,n){return new go(await WL(e.referenceProvider,t,i,!1,n),p("ref.title","References"))}});class mbe extends bs{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:{value:p("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:ae.and(Zs.notInPeekEditor,T.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}async _getLocationModel(e,t,i,n){return new go(this._references,p("generic.title","Locations"))}_getNoResultFoundMessage(e){return e&&p("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}Et.registerCommand({id:"editor.action.goToLocations",metadata:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:ze},{name:"position",description:"The position at which to start",constraint:z.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:async(o,e,t,i,n,s,r)=>{qt(ze.isUri(e)),qt(z.isIPosition(t)),qt(Array.isArray(i)),qt(typeof n>"u"||typeof n=="string"),qt(typeof r>"u"||typeof r=="boolean");const a=o.get(Ot),l=await a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if($l(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(d=>{const c=new class extends mbe{_getNoResultFoundMessage(u){return s||super._getNoResultFoundMessage(u)}}({muteMessage:!s,openInPeek:!!r,openToSide:!1},i,n);d.get(qe).invokeFunction(c.run.bind(c),l)})}});Et.registerCommand({id:"editor.action.peekLocations",metadata:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:ze},{name:"position",description:"The position at which to start",constraint:z.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:async(o,e,t,i,n)=>{o.get(Ri).executeCommand("editor.action.goToLocations",e,t,i,n,void 0,!0)}});Et.registerCommand({id:"editor.action.findReferences",handler:(o,e,t)=>{qt(ze.isUri(e)),qt(z.isIPosition(t));const i=o.get(Me),n=o.get(Ot);return n.openCodeEditor({resource:e},n.getFocusedCodeEditor()).then(s=>{if(!$l(s)||!s.hasModel())return;const r=Lu.get(s);if(!r)return;const a=_n(d=>WL(i.referenceProvider,s.getModel(),z.lift(t),!1,d).then(c=>new go(c,p("ref.title","References")))),l=new k(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(r.toggleWidget(l,a,!1))})}});Et.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var _be=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lk=function(o,e){return function(t,i){e(t,i,o)}},N_;let bg=N_=class{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new de,this.toUnhookForKeyboard=new de,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const s=new ML(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown(([r,a])=>{this.startFindDefinitionFromMouse(r,a??void 0)})),this.toUnhook.add(s.onExecute(r=>{this.isEnabled(r)&&this.gotoDefinition(r.target.position,r.hasSideBySideModifier).catch(a=>{nt(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(s.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(N_.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const i=e.target.position;this.startFindDefinition(i)}async startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const i=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!i){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return;this.currentWordAtPosition=i;const n=new xW(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=_n(a=>this.findDefinition(e,a));let s;try{s=await this.previousPromise}catch(a){nt(a);return}if(!s||!s.length||!n.validate(this.editor)){this.removeLinkDecorations();return}const r=s[0].originSelectionRange?k.lift(s[0].originSelectionRange):new k(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);if(s.length>1){let a=r;for(const{originSelectionRange:l}of s)l&&(a=k.plusRange(a,l));this.addDecoration(a,new as().appendText(p("multipleResults","Click to show {0} definitions.",s.length)))}else{const a=s[0];if(!a.uri)return;this.textModelResolverService.createModelReference(a.uri).then(l=>{if(!l.object||!l.object.textEditorModel){l.dispose();return}const{object:{textEditorModel:d}}=l,{startLineNumber:c}=a.range;if(c<1||c>d.getLineCount()){l.dispose();return}const u=this.getPreviewValue(d,c,a),h=this.languageService.guessLanguageIdByFilepathOrFirstLine(d.uri);this.addDecoration(r,u?new as().appendCodeblock(h||"",u):void 0),l.dispose()})}}getPreviewValue(e,t,i){let n=i.range;return n.endLineNumber-n.startLineNumber>=N_.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let s=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a{const n=!t&&this.editor.getOption(87)&&!this.isInPeekEditor(i);return new P0({openToSide:t,openInPeek:n,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(i)})}isInPeekEditor(e){const t=e.get(Xe);return Zs.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};bg.ID="editor.contrib.gotodefinitionatposition";bg.MAX_SOURCE_PREVIEW_LINES=8;bg=N_=_be([lk(1,Xs),lk(2,bi),lk(3,Me)],bg);At(bg.ID,bg,2);const $C=pe;class WV extends q{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new a0(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class OR extends q{static render(e,t,i){return new OR(e,t,i)}constructor(e,t,i){super(),this.actionContainer=le(e,$C("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=le(this.actionContainer,$C("a.action")),this.action.setAttribute("role","button"),t.iconClass&&le(this.action,$C(`span.icon.${t.iconClass}`));const n=le(this.action,$C("span"));n.textContent=i?`${t.label} (${i})`:t.label,this._register(J(this.actionContainer,Se.CLICK,s=>{s.stopPropagation(),s.preventDefault(),t.run(this.actionContainer)})),this._register(J(this.actionContainer,Se.KEY_DOWN,s=>{const r=new gi(s);(r.equals(3)||r.equals(10))&&(s.stopPropagation(),s.preventDefault(),t.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}function vbe(o,e){return o&&e?p("acessibleViewHint","Inspect this in the accessible view with {0}.",e):o?p("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}let bbe=class{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}};class VV extends q{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new W),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Yt(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Yt(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Yt(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=sX(e=>this._computer.computeAsync(e)),(async()=>{try{for await(const e of this._asyncIterable)e&&(this._result.push(e),this._fireResult());this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(e){nt(e)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const e=this._state===0,t=this._state===4;this._onResult.fire(new bbe(this._result.slice(0),e,t))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class dk{constructor(e,t,i,n){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=n,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class $1{constructor(e,t,i,n,s,r){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=n,this.initialMousePosY=s,this.supportsMarkerHover=r,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}const jg=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class FR{constructor(){this._onDidWillResize=new W,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new W,this.onDidResize=this._onDidResize.event,this._sashListener=new de,this._size=new Rt(0,0),this._minSize=new Rt(0,0),this._maxSize=new Rt(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new ss(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new ss(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new ss(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:lS.North}),this._southSash=new ss(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:lS.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,i=0;this._sashListener.add(ye.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)})),this._sashListener.add(ye.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(ye.any(this._eastSash.onDidReset,this._westSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(ye.any(this._northSash.onDidReset,this._southSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:n}=this._minSize,{height:s,width:r}=this._maxSize;e=Math.max(i,Math.min(s,e)),t=Math.max(n,Math.min(r,t));const a=new Rt(t,e);Rt.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}const Cbe=30,wbe=24;class Sbe extends q{constructor(e,t=new Rt(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new FR),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=Rt.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(i=>{this._resize(new Rt(i.dimension.width,i.dimension.height)),i.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return!((e=this._contentPosition)===null||e===void 0)&&e.position?z.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);return!t||!i?void 0:gn(t).top+i.top-Cbe}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;const n=gn(t),s=ng(t.ownerDocument.body),r=n.top+i.top+i.height;return s.height-r-wbe}_findPositionPreference(e,t){var i,n;const s=Math.min((i=this._availableVerticalSpaceBelow(t))!==null&&i!==void 0?i:1/0,e),r=Math.min((n=this._availableVerticalSpaceAbove(t))!==null&&n!==void 0?n:1/0,e),a=Math.min(Math.max(r,s),e),l=Math.min(e,a);let d;return this._editor.getOption(60).above?d=l<=r?1:2:d=l<=s?2:1,d===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),d}_resize(e){this._resizableNode.layout(e.height,e.width)}}var BR=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Oh=function(o,e){return function(t,i){e(t,i,o)}},U1,Xa;const g3=pe;let PS=U1=class extends q{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(Xc,this._editor)),this._participants=[];for(const n of jg.getAll())this._participants.push(this._instantiationService.createInstance(n,this._editor));this._participants.sort((n,s)=>n.hoverOrdinal-s.hoverOrdinal),this._computer=new FS(this._editor,this._participants),this._hoverOperation=this._register(new VV(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{if(!this._computer.anchor)return;const s=n.hasLoadingMessage?this._addLoadingMessage(n.value):n.value;this._withResult(new HV(this._computer.anchor,s,n.isComplete))})),this._register(Wi(this._widget.getDomNode(),"keydown",n=>{n.equals(9)&&this.hide()})),this._register(Ei.onDidChange(()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}get widget(){return this._widget}maybeShowAt(e){if(this._widget.isResizing)return!0;const t=[];for(const n of this._participants)if(n.suggestHoverAnchor){const s=n.suggestHoverAnchor(e);s&&t.push(s)}const i=e.target;if(i.type===6&&t.push(new dk(0,i.range,e.event.posx,e.event.posy)),i.type===7){const n=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&typeof i.detail.horizontalDistanceToText=="number"&&i.detail.horizontalDistanceToTexts.priority-n.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,i,n){this._startShowingOrUpdateHover(new dk(0,e,void 0,void 0),t,i,n,null)}_startShowingOrUpdateHover(e,t,i,n,s){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):!1:this._editor.getOption(60).sticky&&s&&this._widget.isMouseGettingCloser(s.event.posx,s.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,i,n,!0),!0):e?e&&this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,i,n,s){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=n,this._computer.source=i,this._computer.insistOnKeepingHoverVisible=s,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&e.messages.length===0&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}containsNode(e){return e?this._widget.getDomNode().contains(e):!1}_addLoadingMessage(e){if(this._computer.anchor){for(const t of this._participants)if(t.createLoadingMessage){const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}}return e}_withResult(e){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!e.isComplete||this._computer.insistOnKeepingHoverVisible&&e.messages.length===0)||this._setCurrentResult(e)}_renderMessages(e,t){const{showAtPosition:i,showAtSecondaryPosition:n,highlightRange:s}=U1.computeHoverRanges(this._editor,e.range,t),r=new de,a=r.add(new OS(this._keybindingService)),l=document.createDocumentFragment();let d=null;const c={fragment:l,statusBar:a,setColorPicker:h=>d=h,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:h=>this._widget.setMinimumDimensions(h),hide:()=>this.hide()};for(const h of this._participants){const g=t.filter(f=>f.owner===h);g.length>0&&r.add(h.renderHoverParts(c,g))}const u=t.some(h=>h.isBeforeContent);if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(s){const h=this._editor.createDecorationsCollection();h.set([{range:s,options:U1._DECORATION_OPTIONS}]),r.add(je(()=>{h.clear()}))}this._widget.showAt(l,new Lbe(d,i,n,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,u,e.initialMousePosX,e.initialMousePosY,r))}else r.dispose()}static computeHoverRanges(e,t,i){let n=1;if(e.hasModel()){const d=e._getViewModel(),c=d.coordinatesConverter,u=c.convertModelRangeToViewRange(t),h=new z(u.startLineNumber,d.getLineMinColumn(u.startLineNumber));n=c.convertViewPositionToModelPosition(h).column}const s=t.startLineNumber;let r=t.startColumn,a=i[0].range,l=null;for(const d of i)a=k.plusRange(a,d.range),d.range.startLineNumber===s&&d.range.endLineNumber===s&&(r=Math.max(Math.min(r,d.range.startColumn),n)),d.forceShowAtRange&&(l=d.range);return{showAtPosition:l?l.getStartPosition():new z(s,t.startColumn),showAtSecondaryPosition:l?l.getStartPosition():new z(s,r),highlightRange:a}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}};PS._DECORATION_OPTIONS=st.register({description:"content-hover-highlight",className:"hoverHighlight"});PS=U1=BR([Oh(1,qe),Oh(2,Xt)],PS);class HV{constructor(e,t,i){this.anchor=e,this.messages=t,this.isComplete=i}filter(e){const t=this.messages.filter(i=>i.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new ybe(this,this.anchor,t,this.isComplete)}}class ybe extends HV{constructor(e,t,i,n){super(t,i,n),this.original=e}filter(e){return this.original.filter(e)}}class Lbe{constructor(e,t,i,n,s,r,a,l,d,c){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=i,this.preferAbove=n,this.stoleFocus=s,this.source=r,this.isBeforeContent=a,this.initialMousePosX=l,this.initialMousePosY=d,this.disposables=c,this.closestMouseDistance=void 0}}const f3=30,ck=10,Dbe=6;let Xc=Xa=class extends Sbe{get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}get isVisibleFromKeyboard(){var e;return((e=this._visibleData)===null||e===void 0?void 0:e.source)===1}get isVisible(){var e;return(e=this._hoverVisibleKey.get())!==null&&e!==void 0?e:!1}get isFocused(){var e;return(e=this._hoverFocusedKey.get())!==null&&e!==void 0?e:!1}constructor(e,t,i,n,s){const r=e.getOption(66)+8,a=150,l=new Rt(a,r);super(e,l),this._configurationService=i,this._accessibilityService=n,this._keybindingService=s,this._hover=this._register(new WV),this._minimumSize=l,this._hoverVisibleKey=T.hoverVisible.bindTo(t),this._hoverFocusedKey=T.hoverFocused.bindTo(t),le(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>{this.isVisible&&this._updateMaxDimensions()})),this._register(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(50)&&this._updateFont()}));const d=this._register(Pl(this._resizableNode.domNode));this._register(d.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(d.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),(e=this._visibleData)===null||e===void 0||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return Xa.ID}static _applyDimensions(e,t,i){const n=typeof t=="number"?`${t}px`:t,s=typeof i=="number"?`${i}px`:i;e.style.width=n,e.style.height=s}_setContentsDomNodeDimensions(e,t){const i=this._hover.contentsDomNode;return Xa._applyDimensions(i,e,t)}_setContainerDomNodeDimensions(e,t){const i=this._hover.containerDomNode;return Xa._applyDimensions(i,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,i){const n=typeof t=="number"?`${t}px`:t,s=typeof i=="number"?`${i}px`:i;e.style.maxWidth=n,e.style.maxHeight=s}_setHoverWidgetMaxDimensions(e,t){Xa._applyMaxDimensions(this._hover.contentsDomNode,e,t),Xa._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_hasHorizontalScrollbar(){const e=this._hover.scrollbar.getScrollDimensions();return e.scrollWidth>e.width}_adjustContentsBottomPadding(){const e=this._hover.contentsDomNode,t=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;e.style.paddingBottom!==t&&(e.style.paddingBottom=t)}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,i=e.height;this._setHoverWidgetDimensions(t,i),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(t,i-ck))}_updateResizableNodeMaxDimensions(){var e,t;const i=(e=this._findMaximumRenderingWidth())!==null&&e!==void 0?e:1/0,n=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._resizableNode.maxSize=new Rt(i,n),this._setHoverWidgetMaxDimensions(i,n)}_resize(e){var t,i;Xa._lastDimensions=new Rt(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(i=(t=this._visibleData)===null||t===void 0?void 0:t.colorPicker)===null||i===void 0||i.layout()}_findAvailableSpaceVertically(){var e;const t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition;if(t)return this._positionPreference===1?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=Dbe;return Array.from(this._hover.contentsDomNode.children).forEach(i=>{t+=i.clientHeight}),this._hasHorizontalScrollbar()&&(t+=ck),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some(t=>t.scrollWidth>t.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),t=typeof this._contentWidth>"u"?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidth"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;const i=gn(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=p3(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,i.left,i.top,i.width,i.height));const n=p3(e,t,i.left,i.top,i.width,i.height);return n>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,n),!0)}_setHoverData(e){var t;(t=this._visibleData)===null||t===void 0||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){const{fontSize:e,lineHeight:t}=this._editor.getOption(50),i=this._hover.contentsDomNode;i.style.fontSize=`${e}px`,i.style.lineHeight=`${t/e}`,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(s=>this._editor.applyFontInfo(s))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,Xa._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,500,Xa._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),this._updateFont(),this._updateContent(e),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var e;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[(e=this._positionPreference)!==null&&e!==void 0?e:1]}:null}showAt(e,t){var i,n,s,r;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);const a=kh(this._hover.containerDomNode),l=t.showAtPosition;this._positionPreference=(i=this._findPositionPreference(a,l))!==null&&i!==void 0?i:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(n=t.colorPicker)===null||n===void 0||n.layout();const c=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&vbe(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(r=(s=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||s===void 0?void 0:s.getAriaLabel())!==null&&r!==void 0?r:"");c&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+c)}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new Rt(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}_adjustHoverHeightForScrollbar(e){var t;const i=this._hover.containerDomNode,n=this._hover.contentsDomNode,s=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._setContainerDomNodeDimensions(zs(i),Math.min(s,e)),this._setContentsDomNodeDimensions(zs(n),Math.min(s,e-ck))}setMinimumDimensions(e){this._minimumSize=new Rt(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new Rt(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const t=this._hover.containerDomNode;let i=kh(t),n=zs(t);if(this._resizableNode.layout(i,n),this._setHoverWidgetDimensions(n,i),i=kh(t),n=zs(t),this._contentWidth=n,this._updateMinimumWidth(),this._resizableNode.layout(i,n),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(i)),!((e=this._visibleData)===null||e===void 0)&&e.showAtPosition){const s=kh(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(s,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-f3})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+f3})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};Xc.ID="editor.contrib.resizableContentHoverWidget";Xc._lastDimensions=new Rt(0,0);Xc=Xa=BR([Oh(1,Xe),Oh(2,Dt),Oh(3,Zl),Oh(4,Xt)],Xc);let OS=class extends q{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=g3("div.hover-row.status-bar"),this.actionsElement=le(this.hoverElement,g3("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(OR.render(this.actionsElement,e,i))}append(e){const t=le(this.actionsElement,e);return this._hasContent=!0,t}};OS=BR([Oh(0,Xt)],OS);class FS{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const s=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter(r=>{if(r.options.isWholeLine)return!0;const a=r.range.startLineNumber===n?r.range.startColumn:1,l=r.range.endLineNumber===n?r.range.endColumn:s;if(r.options.showIfCollapsed){if(a>t.range.startColumn+1||t.range.endColumn-1>l)return!1}else if(a>t.range.startColumn||t.range.endColumn>l)return!1;return!0})}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return rn.EMPTY;const i=FS._getLineDecorations(this._editor,t);return rn.merge(this._participants.map(n=>n.computeAsync?n.computeAsync(t,i,e):rn.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=FS._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return Ia(t)}}function p3(o,e,t,i,n,s){const r=t+n/2,a=i+s/2,l=Math.max(Math.abs(o-r)-n/2,0),d=Math.max(Math.abs(e-a)-s/2,0);return Math.sqrt(l*l+d*d)}const m3=pe;class vp extends q{constructor(e,t,i){super(),this._renderDisposeables=this._register(new de),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new WV),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new Ud({editor:this._editor},t,i)),this._computer=new xbe(this._editor),this._hoverOperation=this._register(new VV(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{this._withResult(n.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(50)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return vp.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const n of t){const s=m3("div.hover-row.markdown-hover"),r=le(s,m3("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(n.value));r.appendChild(a.element),i.appendChild(s)}this._updateContents(i),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),s=this._editor.getOption(66),r=this._hover.containerDomNode.clientHeight,a=i-n-(r-s)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}}vp.ID="editor.contrib.modesGlyphHoverWidget";class xbe{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=n=>({value:n}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const n of t){if(!n.options.glyphMarginClassName)continue;const s=n.options.glyphMarginHoverMessage;!s||Up(s)||i.push(...Z2(s).map(e))}return i}}class kbe{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}async function Ibe(o,e,t,i,n){try{const s=await Promise.resolve(o.provideHover(t,i,n));if(s&&Nbe(s))return new kbe(o,s,e)}catch(s){en(s)}}function WR(o,e,t,i){const s=o.ordered(e).map((r,a)=>Ibe(r,a,e,t,i));return rn.fromPromises(s).coalesce()}function Ebe(o,e,t,i){return WR(o,e,t,i).map(n=>n.hover).toPromise()}ql("_executeHoverProvider",(o,e,t)=>{const i=o.get(Me);return Ebe(i.hoverProvider,e,t,vt.None)});function Nbe(o){const e=typeof o.range<"u",t=typeof o.contents<"u"&&o.contents&&o.contents.length>0;return e&&t}var Tbe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},UC=function(o,e){return function(t,i){e(t,i,o)}};const _3=pe;class ba{constructor(e,t,i,n,s){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=n,this.ordinal=s}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let BS=class{constructor(e,t,i,n,s){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=s,this.hoverOrdinal=3}createLoadingMessage(e){return new ba(this,e.range,[new as().appendText(p("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),r=[];let a=1e3;const l=i.getLineLength(n),d=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),c=this._editor.getOption(116),u=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:d});let h=!1;c>=0&&l>c&&e.range.startColumn>=c&&(h=!0,r.push(new ba(this,e.range,[{value:p("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,a++))),!h&&typeof u=="number"&&l>=u&&r.push(new ba(this,e.range,[{value:p("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let g=!1;for(const f of t){const m=f.range.startLineNumber===n?f.range.startColumn:1,v=f.range.endLineNumber===n?f.range.endColumn:s,_=f.options.hoverMessage;if(!_||Up(_))continue;f.options.beforeContentClassName&&(g=!0);const b=new k(e.range.startLineNumber,m,e.range.startLineNumber,v);r.push(new ba(this,b,Z2(_),g,a++))}return r}computeAsync(e,t,i){if(!this._editor.hasModel()||e.type!==1)return rn.EMPTY;const n=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(n))return rn.EMPTY;const s=new z(e.range.startLineNumber,e.range.startColumn);return WR(this._languageFeaturesService.hoverProvider,n,s,i).filter(r=>!Up(r.hover.contents)).map(r=>{const a=r.hover.range?k.lift(r.hover.range):e.range;return new ba(this,a,r.hover.contents,!1,r.ordinal)})}renderHoverParts(e,t){return zV(e,t,this._editor,this._languageService,this._openerService)}};BS=Tbe([UC(1,bi),UC(2,So),UC(3,Dt),UC(4,Me)],BS);function zV(o,e,t,i,n){e.sort((r,a)=>r.ordinal-a.ordinal);const s=new de;for(const r of e)for(const a of r.contents){if(Up(a))continue;const l=_3("div.hover-row.markdown-hover"),d=le(l,_3("div.hover-contents")),c=s.add(new Ud({editor:t},i,n));s.add(c.onDidRenderAsync(()=>{d.className="hover-contents code-hover-contents",o.onContentsChanged()}));const u=s.add(c.render(a));d.appendChild(u.element),o.fragment.appendChild(l)}return s}var $V=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},WS=function(o,e){return function(t,i){e(t,i,o)}};class v3{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let LT=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new W,this.onDidChange=this._onDidChange.event,this._dispoables=new de,this._markers=[],this._nextIdx=-1,ze.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),s=(a,l)=>{let d=Sv(a.resource.toString(),l.resource.toString());return d===0&&(n==="position"?d=k.compareRangesUsingStarts(a,l)||Mi.compare(a.severity,l.severity):d=Mi.compare(a.severity,l.severity)||k.compareRangesUsingStarts(a,l)),d},r=()=>{this._markers=this._markerService.read({resource:ze.isUri(e)?e:void 0,severities:Mi.Error|Mi.Warning|Mi.Info}),typeof e=="function"&&(this._markers=this._markers.filter(a=>this._resourceFilter(a.resource))),this._markers.sort(s)};r(),this._dispoables.add(t.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&(r(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new v3(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,s=this._markers.findIndex(r=>r.resource.toString()===e.uri.toString());s<0&&(s=fv(this._markers,{resource:e.uri},(r,a)=>Sv(r.resource.toString(),a.resource.toString())),s<0&&(s=~s));for(let r=s;rn.resource.toString()===e.toString());if(!(i<0)){for(;i=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rf=function(o,e){return function(t,i){e(t,i,o)}},kT;class Abe{constructor(e,t,i,n,s){this._openerService=n,this._labelService=s,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new de,this._editor=t;const r=document.createElement("div");r.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),r.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),r.appendChild(this._relatedBlock),this._disposables.add(Wi(this._relatedBlock,"click",a=>{a.preventDefault();const l=this._relatedDiagnostics.get(a.target);l&&i(l)})),this._scrollable=new K8(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{r.style.left=`-${a.scrollLeft}px`,r.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){jt(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:s}=e;let r=((t==null?void 0:t.length)||0)+2;s&&(typeof s=="string"?r+=s.length:r+=s.value.length);const a=Rl(i);this._lines=a.length,this._longestLineLength=0;for(const h of a)this._longestLineLength=Math.max(h.length+r,this._longestLineLength);$n(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(const h of a)l=document.createElement("div"),l.innerText=h,h===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||s){const h=document.createElement("span");if(h.classList.add("details"),l.appendChild(h),t){const g=document.createElement("span");g.innerText=t,g.classList.add("source"),h.appendChild(g)}if(s)if(typeof s=="string"){const g=document.createElement("span");g.innerText=`(${s})`,g.classList.add("code"),h.appendChild(g)}else{this._codeLink=pe("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=f=>{this._openerService.open(s.target,{allowCommands:!0}),f.preventDefault(),f.stopPropagation()};const g=le(this._codeLink,pe("span"));g.innerText=s.value,h.appendChild(this._codeLink)}}if($n(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),ls(n)){const h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(66)*.66)}px`,this._lines+=1;for(const g of n){const f=document.createElement("div"),m=document.createElement("a");m.classList.add("filename"),m.innerText=`${this._labelService.getUriBasenameLabel(g.resource)}(${g.startLineNumber}, ${g.startColumn}): `,m.title=this._labelService.getUriLabel(g.resource),this._relatedDiagnostics.set(m,g);const v=document.createElement("span");v.innerText=g.message,f.appendChild(m),f.appendChild(v),this._lines+=1,h.appendChild(f)}}const d=this._editor.getOption(50),c=Math.ceil(d.typicalFullwidthCharacterWidth*this._longestLineLength*.75),u=d.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:u})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Mi.Error:t=p("Error","Error");break;case Mi.Warning:t=p("Warning","Warning");break;case Mi.Info:t=p("Info","Info");break;case Mi.Hint:t=p("Hint","Hint");break}let i=p("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let tm=kT=class extends RS{constructor(e,t,i,n,s,r,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},s),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=r,this._labelService=a,this._callOnDispose=new de,this._onDidSelectRelatedInformation=new W,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Mi.Warning,this._backgroundColor=Y.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Fbe);let t=IT,i=Rbe;this._severity===Mi.Warning?(t=j1,i=Pbe):this._severity===Mi.Info&&(t=ET,i=Obe);const n=e.getColor(t),s=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:s,primaryHeadingColor:e.getColor(EV),secondaryHeadingColor:e.getColor(NV)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(n=>this.editor.focus()));const t=[],i=this._menuService.createMenu(kT.TitleMenu,this._contextKeyService);VA(i,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=le(e,pe(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new Abe(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const n=k.lift(e),s=this.editor.getPosition(),r=s&&n.containsPosition(s)?s:n.getStartPosition();super.show(r,this.computeRequiredHeight());const a=this.editor.getModel();if(a){const l=i>1?p("problems","{0} of {1} problems",t,i):p("change","{0} of {1} problem",t,i);this.setTitle(br(a.uri),l)}this._icon.className=`codicon ${xT.className(Mi.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(r,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};tm.TitleMenu=new N("gotoErrorTitleMenu");tm=kT=Mbe([rf(1,Sn),rf(2,So),rf(3,Ba),rf(4,qe),rf(5,Xe),rf(6,Hp)],tm);const b3=Vv(vl,fte),C3=Vv(zo,Bv),w3=Vv(Ks,Wv),IT=M("editorMarkerNavigationError.background",{dark:b3,light:b3,hcDark:Lt,hcLight:Lt},p("editorMarkerNavigationError","Editor marker navigation widget error color.")),Rbe=M("editorMarkerNavigationError.headerBackground",{dark:We(IT,.1),light:We(IT,.1),hcDark:null,hcLight:null},p("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),j1=M("editorMarkerNavigationWarning.background",{dark:C3,light:C3,hcDark:Lt,hcLight:Lt},p("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),Pbe=M("editorMarkerNavigationWarning.headerBackground",{dark:We(j1,.1),light:We(j1,.1),hcDark:"#0C141F",hcLight:We(j1,.2)},p("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),ET=M("editorMarkerNavigationInfo.background",{dark:w3,light:w3,hcDark:Lt,hcLight:Lt},p("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Obe=M("editorMarkerNavigationInfo.headerBackground",{dark:We(ET,.1),light:We(ET,.1),hcDark:null,hcLight:null},p("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),Fbe=M("editorMarkerNavigation.background",{dark:wn,light:wn,hcDark:wn,hcLight:wn},p("editorMarkerNavigationBackground","Editor marker navigation widget background."));var Bbe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},jC=function(o,e){return function(t,i){e(t,i,o)}},T_;let Du=T_=class{static get(e){return e.getContribution(T_.ID)}constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new de,this._editor=e,this._widgetVisible=jV.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(tm,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(i=>{var n,s,r;(!(!((n=this._model)===null||n===void 0)&&n.selected)||!k.containsPosition((s=this._model)===null||s===void 0?void 0:s.selected.marker,i.position))&&((r=this._model)===null||r===void 0||r.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const i=this._model.find(this._editor.getModel().uri,this._widget.position);i?this._widget.updateMarker(i.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(i=>{this._editorService.openCodeEditor({resource:i.resource,options:{pinned:!0,revealIfOpened:!0,selection:k.lift(i).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new z(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}async nagivate(e,t){var i,n;if(this._editor.hasModel()){const s=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(s.move(e,this._editor.getModel(),this._editor.getPosition()),!s.selected)return;if(s.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const r=await this._editorService.openCodeEditor({resource:s.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:s.selected.marker}},this._editor);r&&((i=T_.get(r))===null||i===void 0||i.close(),(n=T_.get(r))===null||n===void 0||n.nagivate(e,t))}else this._widget.showAtMarker(s.selected.marker,s.selected.index,s.selected.total)}}};Du.ID="editor.contrib.markerController";Du=T_=Bbe([jC(1,UV),jC(2,Xe),jC(3,Ot),jC(4,qe)],Du);class VL extends Te{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}async run(e,t){var i;t.hasModel()&&((i=Du.get(t))===null||i===void 0||i.nagivate(this._next,this._multiFile))}}class Qc extends VL{constructor(){super(!0,!1,{id:Qc.ID,label:Qc.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:578,weight:100},menuOpts:{menuId:tm.TitleMenu,title:Qc.LABEL,icon:Zi("marker-navigation-next",ve.arrowDown,p("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}Qc.ID="editor.action.marker.next";Qc.LABEL=p("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class Kh extends VL{constructor(){super(!1,!1,{id:Kh.ID,label:Kh.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:1602,weight:100},menuOpts:{menuId:tm.TitleMenu,title:Kh.LABEL,icon:Zi("marker-navigation-previous",ve.arrowUp,p("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}Kh.ID="editor.action.marker.prev";Kh.LABEL=p("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class Wbe extends VL{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:p("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:66,weight:100},menuOpts:{menuId:N.MenubarGoMenu,title:p({},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class Vbe extends VL{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:p("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:1090,weight:100},menuOpts:{menuId:N.MenubarGoMenu,title:p({},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}At(Du.ID,Du,4);_e(Qc);_e(Kh);_e(Wbe);_e(Vbe);const jV=new De("markersNavigationVisible",!1),Hbe=Rn.bindToContribution(Du.get);we(new Hbe({id:"closeMarkersNavigation",precondition:jV,handler:o=>o.close(),kbOpts:{weight:150,kbExpr:T.focus,primary:9,secondary:[1033]}}));var zbe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uk=function(o,e){return function(t,i){e(t,i,o)}};const Ir=pe;class $be{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const S3={type:1,filter:{include:Ze.QuickFix},triggerAction:_o.QuickFixHover};let NT=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),r=[];for(const a of t){const l=a.range.startLineNumber===n?a.range.startColumn:1,d=a.range.endLineNumber===n?a.range.endColumn:s,c=this._markerDecorationsService.getMarker(i.uri,a);if(!c)continue;const u=new k(e.range.startLineNumber,l,e.range.startLineNumber,d);r.push(new $be(this,u,c))}return r}renderHoverParts(e,t){if(!t.length)return q.None;const i=new de;t.forEach(s=>e.fragment.appendChild(this.renderMarkerHover(s,i)));const n=t.length===1?t[0]:t.sort((s,r)=>Mi.compare(s.marker.severity,r.marker.severity))[0];return this.renderMarkerStatusbar(e,n,i),i}renderMarkerHover(e,t){const i=Ir("div.hover-row"),n=le(i,Ir("div.marker.hover-contents")),{source:s,message:r,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(n);const d=le(n,Ir("span"));if(d.style.whiteSpace="pre-wrap",d.innerText=r,s||a)if(a&&typeof a!="string"){const c=Ir("span");if(s){const f=le(c,Ir("span"));f.innerText=s}const u=le(c,Ir("a.code-link"));u.setAttribute("href",a.target.toString()),t.add(J(u,"click",f=>{this._openerService.open(a.target,{allowCommands:!0}),f.preventDefault(),f.stopPropagation()}));const h=le(u,Ir("span"));h.innerText=a.value;const g=le(n,c);g.style.opacity="0.6",g.style.paddingLeft="6px"}else{const c=le(n,Ir("span"));c.style.opacity="0.6",c.style.paddingLeft="6px",c.innerText=s&&a?`${s}(${a})`:s||`(${a})`}if(ls(l))for(const{message:c,resource:u,startLineNumber:h,startColumn:g}of l){const f=le(n,Ir("div"));f.style.marginTop="8px";const m=le(f,Ir("a"));m.innerText=`${br(u)}(${h}, ${g}): `,m.style.cursor="pointer",t.add(J(m,"click",_=>{_.stopPropagation(),_.preventDefault(),this._openerService&&this._openerService.open(u,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:g}}}).catch(nt)}));const v=le(f,Ir("span"));v.innerText=c,this._editor.applyFontInfo(v)}return i}renderMarkerStatusbar(e,t,i){if((t.marker.severity===Mi.Error||t.marker.severity===Mi.Warning||t.marker.severity===Mi.Info)&&e.statusBar.addAction({label:p("view problem","View Problem"),commandId:Qc.ID,run:()=>{var n;e.hide(),(n=Du.get(this._editor))===null||n===void 0||n.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(90)){const n=e.statusBar.append(Ir("div"));this.recentMarkerCodeActionsInfo&&(rS.makeKey(this.recentMarkerCodeActionsInfo.marker)===rS.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=p("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?q.None:i.add(lu(()=>n.textContent=p("checkingForQuickFixes","Checking for quick fixes..."),200));n.textContent||(n.textContent=" ");const r=this.getCodeActions(t.marker);i.add(je(()=>r.cancel())),r.then(a=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),n.textContent=p("noQuickFixes","No quick fixes available");return}n.style.display="none";let l=!1;i.add(je(()=>{l||a.dispose()})),e.statusBar.addAction({label:p("quick fixes","Quick Fix..."),commandId:ER,run:d=>{l=!0;const c=Cu.get(this._editor),u=gn(d);e.hide(),c==null||c.showCodeActions(S3,a,{x:u.left,y:u.top,width:u.width,height:u.height})}})},nt)}}getCodeActions(e){return _n(t=>ov(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new k(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),S3,Fd.None,t))}};NT=zbe([uk(1,$M),uk(2,So),uk(3,Me)],NT);const KV="editor.action.inlineSuggest.commit",qV="editor.action.inlineSuggest.showPrevious",GV="editor.action.inlineSuggest.showNext";var VR=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ca=function(o,e){return function(t,i){e(t,i,o)}},K1;let TT=class extends q{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=Oi(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).showToolbar==="always"),this.sessionPosition=void 0,this.position=rt(this,n=>{var s,r,a;const l=(s=this.model.read(n))===null||s===void 0?void 0:s.ghostText.read(n);if(!this.alwaysShowToolbar.read(n)||!l||l.parts.length===0)return this.sessionPosition=void 0,null;const d=l.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==l.lineNumber&&(this.sessionPosition=void 0);const c=new z(l.lineNumber,Math.min(d,(a=(r=this.sessionPosition)===null||r===void 0?void 0:r.column)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER));return this.sessionPosition=c,c}),this._register(Qd((n,s)=>{const r=this.model.read(n);if(!r||!this.alwaysShowToolbar.read(n))return;const a=s.add(this.instantiationService.createInstance(xu,this.editor,!0,this.position,r.selectedInlineCompletionIndex,r.inlineCompletionsCount,r.selectedInlineCompletion.map(l=>{var d;return(d=l==null?void 0:l.inlineCompletion.source.inlineCompletions.commands)!==null&&d!==void 0?d:[]})));e.addContentWidget(a),s.add(je(()=>e.removeContentWidget(a))),s.add(zt(l=>{this.position.read(l)&&r.lastTriggerKind.read(l)!==Rd.Explicit&&r.triggerExplicitly()}))}))}};TT=VR([Ca(2,qe)],TT);const Ube=Zi("inline-suggestion-hints-next",ve.chevronRight,p("parameterHintsNextIcon","Icon for show next parameter hint.")),jbe=Zi("inline-suggestion-hints-previous",ve.chevronLeft,p("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let xu=K1=class extends q{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,i){const n=new Rs(e,t,i,!0,()=>this._commandService.executeCommand(e)),s=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let r=t;return s&&(r=p({},"{0} ({1})",t,s.getLabel())),n.tooltip=r,n}constructor(e,t,i,n,s,r,a,l,d,c,u){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=n,this._suggestionCount=s,this._extraCommands=r,this._commandService=a,this.keybindingService=d,this._contextKeyService=c,this._menuService=u,this.id=`InlineSuggestionHintsContentWidget${K1.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=vi("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[vi("div@toolBar")]),this.previousAction=this.createCommandAction(qV,p("previous","Previous"),Ue.asClassName(jbe)),this.availableSuggestionCountAction=new Rs("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(GV,p("next","Next"),Ue.asClassName(Ube)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(N.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Yt(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new Yt(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[],this.toolBar=this._register(l.createInstance(MT,this.nodes.toolBar,N.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:h=>h.startsWith("primary")},actionViewItemProvider:(h,g)=>{if(h instanceof Ur)return l.createInstance(qbe,h,void 0);if(h===this.availableSuggestionCountAction){const f=new Kbe(void 0,h,{label:!0,icon:!1});return f.setClass("availableSuggestionCount"),f}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(h=>{K1._dropDownVisible=h})),this._register(zt(h=>{this._position.read(h),this.editor.layoutContentWidget(this)})),this._register(zt(h=>{const g=this._suggestionCount.read(h),f=this._currentSuggestionIdx.read(h);g!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${f+1}/${g}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),g!==void 0&&g>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(zt(h=>{const g=this._extraCommands.read(h);if(Bi(this.lastCommands,g))return;this.lastCommands=g;const f=g.map(m=>({class:void 0,id:m.id,enabled:!0,tooltip:m.tooltip||"",label:m.title,run:v=>this._commandService.executeCommand(m.id)}));for(const[m,v]of this.inlineCompletionsActionsMenus.getActions())for(const _ of v)_ instanceof Ur&&f.push(_);f.length>0&&f.unshift(new Mn),this.toolBar.setAdditionalSecondaryActions(f)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};xu._dropDownVisible=!1;xu.id=0;xu=K1=VR([Ca(6,Ri),Ca(7,qe),Ca(8,Xt),Ca(9,Xe),Ca(10,Ba)],xu);class Kbe extends jp{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}}let qbe=class extends dg{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=vi("div.keybinding").root;new C0(t,Vo,{disableTitle:!0,..._he}).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},MT=class extends ES{constructor(e,t,i,n,s,r,a,l){super(e,{resetMenu:t,...i},n,s,r,a,l),this.menuId=t,this.options2=i,this.menuService=n,this.contextKeyService=s,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,t,i,n,s,r,a;const l=[],d=[];VA(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:l,secondary:d},(i=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||i===void 0?void 0:i.primaryGroup,(s=(n=this.options2)===null||n===void 0?void 0:n.toolbarOptions)===null||s===void 0?void 0:s.shouldInlineSubmenu,(a=(r=this.options2)===null||r===void 0?void 0:r.toolbarOptions)===null||a===void 0?void 0:a.useSeparatorsInPrimaryActions),d.push(...this.additionalActions),l.unshift(...this.prependedPrimaryActions),this.setActions(l,d)}setPrependedPrimaryActions(e){Bi(this.prependedPrimaryActions,e,(t,i)=>t===i)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){Bi(this.additionalActions,e,(t,i)=>t===i)||(this.additionalActions=e,this.updateToolbar())}};MT=VR([Ca(3,Ba),Ca(4,Xe),Ca(5,Sr),Ca(6,Xt),Ca(7,vo)],MT);var Gbe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},KC=function(o,e){return function(t,i){e(t,i,o)}},AT;let Ys=AT=class extends q{static get(e){return e.getContribution(AT.ID)}constructor(e,t,i,n,s){super(),this._editor=e,this._instantiationService=t,this._openerService=i,this._languageService=n,this._keybindingService=s,this._toUnhook=new de,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._reactToEditorMouseMoveRunner=this._register(new Yt(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookEvents(),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(60)&&(this._unhookEvents(),this._hookEvents())}))}_hookEvents(){const e=this._editor.getOption(60);this._isHoverEnabled=e.enabled,this._isHoverSticky=e.sticky,this._hidingDelay=e.hidingDelay,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._toUnhook.add(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._toUnhook.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._toUnhook.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))):(this._toUnhook.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._toUnhook.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))),this._toUnhook.add(this._editor.onMouseLeave(t=>this._onEditorMouseLeave(t))),this._toUnhook.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this._hideWidgets()})),this._toUnhook.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._toUnhook.add(this._editor.onDidScrollChange(t=>this._onEditorScrollChanged(t)))}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._isMouseDown=!0;const i=e.target;if(i.type===9&&i.detail===Xc.ID){this._hoverClicked=!0;return}i.type===12&&i.detail===vp.ID||(i.type!==12&&(this._hoverClicked=!1),!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t,i;this._cancelScheduler();const n=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||!((i=this._contentWidget)===null||i===void 0)&&i.containsNode(n)||this._hideWidgets()}_isMouseOverWidget(e){var t,i,n,s,r;const a=e.target;return!!(this._isHoverSticky&&a.type===9&&a.detail===Xc.ID||this._isHoverSticky&&(!((t=this._contentWidget)===null||t===void 0)&&t.containsNode((i=e.event.browserEvent.view)===null||i===void 0?void 0:i.document.activeElement))&&!(!((s=(n=e.event.browserEvent.view)===null||n===void 0?void 0:n.getSelection())===null||s===void 0)&&s.isCollapsed)||!this._isHoverSticky&&a.type===9&&a.detail===Xc.ID&&(!((r=this._contentWidget)===null||r===void 0)&&r.isColorPickerVisible)||this._isHoverSticky&&a.type===12&&a.detail===vp.ID)}_onEditorMouseMove(e){var t,i,n,s;if(this._mouseMoveEvent=e,!((t=this._contentWidget)===null||t===void 0)&&t.isFocused||!((i=this._contentWidget)===null||i===void 0)&&i.isResizing||this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&(!((n=this._contentWidget)===null||n===void 0)&&n.isVisibleFromKeyboard))return;if(this._isMouseOverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}if(!((s=this._contentWidget)===null||s===void 0)&&s.isVisible&&this._isHoverSticky&&this._hidingDelay>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(this._hidingDelay);return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){var t,i,n;if(!e)return;const s=e.target,r=(t=s.element)===null||t===void 0?void 0:t.classList.contains("colorpicker-color-decoration"),a=this._editor.getOption(146);if(r&&(a==="click"&&!this._hoverActivatedByColorDecoratorClick||a==="hover"&&!this._isHoverEnabled||a==="clickAndHover"&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!r&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(i=this._glyphWidget)===null||i===void 0||i.hide();return}if(s.type===2&&s.position){(n=this._contentWidget)===null||n===void 0||n.hide(),this._glyphWidget||(this._glyphWidget=new vp(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(s.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const i=this._keybindingService.softDispatch(e,this._editor.getDomNode()),n=i.kind===1||i.kind===2&&i.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible);e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!n&&this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible)||xu.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(i=this._contentWidget)===null||i===void 0||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(PS,this._editor)),this._contentWidget}showContentHover(e,t,i,n,s=!1){this._hoverActivatedByColorDecoratorClick=s,this._getOrCreateContentWidget().startShowingAtRange(e,t,i,n)}focus(){var e;(e=this._contentWidget)===null||e===void 0||e.focus()}scrollUp(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)===null||e===void 0||e.pageUp()}pageDown(){var e;(e=this._contentWidget)===null||e===void 0||e.pageDown()}goToTop(){var e;(e=this._contentWidget)===null||e===void 0||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)===null||e===void 0||e.goToBottom()}get isColorPickerVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isVisible}dispose(){var e,t;super.dispose(),this._unhookEvents(),this._toUnhook.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};Ys.ID="editor.contrib.hover";Ys=AT=Gbe([KC(1,qe),KC(2,So),KC(3,bi),KC(4,Xt)],Ys);var ra;(function(o){o.NoAutoFocus="noAutoFocus",o.FocusIfVisible="focusIfVisible",o.AutoFocusImmediately="autoFocusImmediately"})(ra||(ra={}));class Zbe extends Te{constructor(){super({id:"editor.action.showHover",label:p({},"Show or Focus Hover"),metadata:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[ra.NoAutoFocus,ra.FocusIfVisible,ra.AutoFocusImmediately],enumDescriptions:[p("showOrFocusHover.focus.noAutoFocus","The hover will not automatically take focus."),p("showOrFocusHover.focus.focusIfVisible","The hover will take focus only if it is already visible."),p("showOrFocusHover.focus.autoFocusImmediately","The hover will automatically take focus when it appears.")],default:ra.FocusIfVisible}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const n=Ys.get(t);if(!n)return;const s=i==null?void 0:i.focus;let r=ra.FocusIfVisible;s in ra?r=s:typeof s=="boolean"&&s&&(r=ra.AutoFocusImmediately);const a=d=>{const c=t.getPosition(),u=new k(c.lineNumber,c.column,c.lineNumber,c.column);n.showContentHover(u,1,1,d)},l=t.getOption(2)===2;n.isHoverVisible?r!==ra.NoAutoFocus?n.focus():a(l):a(l||r===ra.AutoFocusImmediately)}}class Ybe extends Te{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:p({},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const i=Ys.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const s=new k(n.lineNumber,n.column,n.lineNumber,n.column),r=bg.get(t);if(!r)return;r.startFindDefinitionFromCursor(n).then(()=>{i.showContentHover(s,1,1,!0)})}}class Xbe extends Te{constructor(){super({id:"editor.action.scrollUpHover",label:p({},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:16,weight:100}})}run(e,t){const i=Ys.get(t);i&&i.scrollUp()}}class Qbe extends Te{constructor(){super({id:"editor.action.scrollDownHover",label:p({},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:18,weight:100}})}run(e,t){const i=Ys.get(t);i&&i.scrollDown()}}class Jbe extends Te{constructor(){super({id:"editor.action.scrollLeftHover",label:p({},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:15,weight:100}})}run(e,t){const i=Ys.get(t);i&&i.scrollLeft()}}class e0e extends Te{constructor(){super({id:"editor.action.scrollRightHover",label:p({},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:17,weight:100}})}run(e,t){const i=Ys.get(t);i&&i.scrollRight()}}class t0e extends Te{constructor(){super({id:"editor.action.pageUpHover",label:p({},"Page Up Hover"),alias:"Page Up Hover",precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const i=Ys.get(t);i&&i.pageUp()}}class i0e extends Te{constructor(){super({id:"editor.action.pageDownHover",label:p({},"Page Down Hover"),alias:"Page Down Hover",precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const i=Ys.get(t);i&&i.pageDown()}}class n0e extends Te{constructor(){super({id:"editor.action.goToTopHover",label:p({},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const i=Ys.get(t);i&&i.goToTop()}}class s0e extends Te{constructor(){super({id:"editor.action.goToBottomHover",label:p({},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const i=Ys.get(t);i&&i.goToBottom()}}At(Ys.ID,Ys,2);_e(Zbe);_e(Ybe);_e(Xbe);_e(Qbe);_e(Jbe);_e(e0e);_e(t0e);_e(i0e);_e(n0e);_e(s0e);jg.register(BS);jg.register(NT);Zr((o,e)=>{const t=o.getColor(Ete);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))});class RT extends q{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(146);if(t!=="click"&&t!=="clickAndHover")return;const i=e.target;if(i.type!==6||!i.detail.injectedText||i.detail.injectedText.options.attachedData!==bV||!i.range)return;const n=this._editor.getContribution(Ys.ID);if(n&&!n.isColorPickerVisible){const s=new k(i.range.startLineNumber,i.range.startColumn+1,i.range.endLineNumber,i.range.endColumn+1);n.showContentHover(s,1,0,!1,!0)}}}RT.ID="editor.contrib.colorContribution";At(RT.ID,RT,2);jg.register(AS);var ZV=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},pa=function(o,e){return function(t,i){e(t,i,o)}},PT,OT;let ku=PT=class extends q{constructor(e,t,i,n,s,r,a){super(),this._editor=e,this._modelService=i,this._keybindingService=n,this._instantiationService=s,this._languageFeatureService=r,this._languageConfigurationService=a,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=T.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=T.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new VS(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)===null||e===void 0||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)===null||e===void 0||e.updateEditor(),this.hide()}static get(e){return e.getContribution(PT.ID)}};ku.ID="editor.contrib.standaloneColorPickerController";ku=PT=ZV([pa(1,Xe),pa(2,Si),pa(3,Xt),pa(4,qe),pa(5,Me),pa(6,si)],ku);At(ku.ID,ku,1);const y3=8,o0e=22;let VS=OT=class extends q{constructor(e,t,i,n,s,r,a,l){var d;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=i,this._modelService=s,this._keybindingService=r,this._languageFeaturesService=a,this._languageConfigurationService=l,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new W),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=n.createInstance(wb,this._editor),this._position=(d=this._editor._getViewModel())===null||d===void 0?void 0:d.getPrimaryCursorState().modelState.position;const c=this._editor.getSelection(),u=c?{startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},h=this._register(Pl(this._body));this._register(h.onDidBlur(g=>{this.hide()})),this._register(h.onDidFocus(g=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(g=>{var f;const m=(f=g.target.element)===null||f===void 0?void 0:f.classList;m&&m.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(g=>{this._render(g.value,g.foundInEditor)})),this._start(u),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return OT.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(e){const t=await this._computeAsync(e);t&&this._onResult.fire(new r0e(t.result,t.foundInEditor))}async _computeAsync(e){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},i=await this._standaloneColorPickerParticipant.createColorHover(t,new AR(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null}_render(e,t){const i=document.createDocumentFragment(),n=this._register(new OS(this._keybindingService));let s;const r={fragment:i,statusBar:n,setColorPicker:m=>s=m,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(r,[e])),s===void 0)return;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(i),s.layout();const a=s.body,l=a.saturationBox.domNode.clientWidth,d=a.domNode.clientWidth-l-o0e-y3,c=s.body.enterButton;c==null||c.onClicked(()=>{this.updateEditor(),this.hide()});const u=s.header,h=u.pickedColorNode;h.style.width=l+y3+"px";const g=u.originalColorNode;g.style.width=d+"px";const f=s.header.closeButton;f==null||f.onClicked(()=>{this.hide()}),t&&(c&&(c.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};VS.ID="editor.contrib.standaloneColorPickerWidget";VS=OT=ZV([pa(3,qe),pa(4,Si),pa(5,Xt),pa(6,Me),pa(7,si)],VS);class r0e{constructor(e,t){this.value=e,this.foundInEditor=t}}class a0e extends Wa{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:p("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:p({},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:N.CommandPalette}]})}runEditorCommand(e,t){var i;(i=ku.get(t))===null||i===void 0||i.showOrFocus()}}class l0e extends Te{constructor(){super({id:"editor.action.hideColorPicker",label:p({},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:T.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var i;(i=ku.get(t))===null||i===void 0||i.hide()}}class d0e extends Te{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:p({},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:T.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var i;(i=ku.get(t))===null||i===void 0||i.insertColor()}}_e(l0e);_e(d0e);mi(a0e);class Oc{constructor(e,t,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length,s=e.length;if(i+n>s)return!1;for(let r=0;r=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,s,r){const a=e.startLineNumber,l=e.startColumn,d=e.endLineNumber,c=e.endColumn,u=s.getLineContent(a),h=s.getLineContent(d);let g=u.lastIndexOf(t,l-1+t.length),f=h.indexOf(i,c-1-i.length);if(g!==-1&&f!==-1)if(a===d)u.substring(g+t.length,f).indexOf(i)>=0&&(g=-1,f=-1);else{const v=u.substring(g+t.length),_=h.substring(0,f);(v.indexOf(i)>=0||_.indexOf(i)>=0)&&(g=-1,f=-1)}let m;g!==-1&&f!==-1?(n&&g+t.length0&&h.charCodeAt(f-1)===32&&(i=" "+i,f-=1),m=Oc._createRemoveBlockCommentOperations(new k(a,g+t.length+1,d,f+1),t,i)):(m=Oc._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=m.length===1?i:null);for(const v of m)r.addTrackedEditOperation(v.range,v.text)}static _createRemoveBlockCommentOperations(e,t,i){const n=[];return k.isEmpty(e)?n.push(Li.delete(new k(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(Li.delete(new k(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(Li.delete(new k(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){const s=[];return k.isEmpty(e)?s.push(Li.replace(new k(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(s.push(Li.insert(new z(e.startLineNumber,e.startColumn),t+(n?" ":""))),s.push(Li.insert(new z(e.endLineNumber,e.endColumn),(n?" ":"")+i))),s}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const s=e.getLanguageIdAtPosition(i,n),r=this.languageConfigurationService.getLanguageConfiguration(s).comments;!r||!r.blockCommentStartToken||!r.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,r.blockCommentStartToken,r.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(i.length===2){const n=i[0],s=i[1];return new Re(n.range.endLineNumber,n.range.endColumn,s.range.startLineNumber,s.range.startColumn)}else{const n=i[0].range,s=this._usedEndToken?-this._usedEndToken.length-1:0;return new Re(n.endLineNumber,n.endColumn+s,n.endLineNumber,n.endColumn+s)}}}class hd{constructor(e,t,i,n,s,r,a){this.languageConfigurationService=e,this._selection=t,this._tabSize=i,this._type=n,this._insertSpace=s,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=r,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenization.tokenizeIfCheap(t);const s=e.getLanguageIdAtPosition(t,1),r=n.getLanguageConfiguration(s).comments,a=r?r.lineCommentToken:null;if(!a)return null;const l=[];for(let d=0,c=i-t+1;ds?t[l].commentStrOffset=r-1:t[l].commentStrOffset=r}}}class HR extends Te{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(si);if(!t.hasModel())return;const n=t.getModel(),s=[],r=n.getOptions(),a=t.getOption(23),l=t.getSelections().map((c,u)=>({selection:c,index:u,ignoreFirstLine:!1}));l.sort((c,u)=>k.compareRangesUsingStarts(c.selection,u.selection));let d=l[0];for(let c=1;c=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sh=function(o,e){return function(t,i){e(t,i,o)}},FT;let im=FT=class{static get(e){return e.getContribution(FT.ID)}constructor(e,t,i,n,s,r,a,l){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=s,this._menuService=r,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new de,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(d=>this._onContextMenu(d))),this._toDispose.add(this._editor.onMouseWheel(d=>{if(this._contextMenuIsBeingShownCount>0){const c=this._contextViewService.getContextViewElement(),u=d.srcElement;u.shadowRoot&&sg(c)===u.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(d=>{this._editor.getOption(24)&&d.keyCode===58&&(d.preventDefault(),d.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu(e.event);if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let i=!1;for(const n of this._editor.getSelections())if(n.containsPosition(e.target.position)){i=!0;break}i||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(24)||!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?N.SimpleEditorContext:N.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.createMenu(t,this._contextKeyService),s=n.getActions({arg:e.uri});n.dispose();for(const r of s){const[,a]=r;let l=0;for(const d of a)if(d instanceof xv){const c=this._getMenuActions(e,d.item.submenu);c.length>0&&(i.push(new xp(d.id,d.label,c)),l++)}else i.push(d),l++;l&&i.push(new Mn)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let n=t;if(!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const r=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),a=gn(this._editor.getDomNode()),l=a.left+r.left,d=a.top+r.top+r.height;n={x:l,y:d}}const s=this._editor.getOption(126)&&!Ea;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:s?this._editor.getDomNode():void 0,getAnchor:()=>n,getActions:()=>e,getActionViewItem:r=>{const a=this._keybindingFor(r);if(a)return new jp(r,r,{label:!0,keybinding:a.getLabel(),isMenu:!0});const l=r;return typeof l.getActionViewItem=="function"?l.getActionViewItem():new jp(r,r,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:r=>this._keybindingFor(r),onHide:r=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||zle(this._workspaceContextService.getWorkspace()))return;const t=this._editor.getOption(72);let i=0;const n=d=>({id:`menu-action-${++i}`,label:d.label,tooltip:"",class:void 0,enabled:typeof d.enabled>"u"?!0:d.enabled,checked:d.checked,run:d.run}),s=(d,c)=>new xp(`menu-action-${++i}`,d,c,void 0),r=(d,c,u,h,g)=>{if(!c)return n({label:d,enabled:c,run:()=>{}});const f=v=>()=>{this._configurationService.updateValue(u,v)},m=[];for(const v of g)m.push(n({label:v.label,checked:h===v.value,run:f(v.value)}));return s(d,m)},a=[];a.push(n({label:p("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new Mn),a.push(n({label:p("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(r(p("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:p("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:p("context.minimap.size.fill","Fill"),value:"fill"},{label:p("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(r(p("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:p("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:p("context.minimap.slider.always","Always"),value:"always"}]));const l=this._editor.getOption(126)&&!Ea;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:d=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};im.ID="editor.contrib.contextmenu";im=FT=f0e([sh(1,Sr),sh(2,Gd),sh(3,Xe),sh(4,Xt),sh(5,Ba),sh(6,Dt),sh(7,ag)],im);class p0e extends Te{constructor(){super({id:"editor.action.showContextMenu",label:p("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:1092,weight:100}})}run(e,t){var i;(i=im.get(t))===null||i===void 0||i.showContextMenu()}}At(im.ID,im,2);_e(p0e);class hk{constructor(e){this.selections=e}equals(e){const t=this.selections.length,i=e.selections.length;if(t!==i)return!1;for(let n=0;n{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const i=new hk(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new gk(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new gk(new hk(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new gk(new hk(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}Cg.ID="editor.contrib.cursorUndoRedoController";class m0e extends Te{constructor(){super({id:"cursorUndo",label:p("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:2099,weight:100}})}run(e,t,i){var n;(n=Cg.get(t))===null||n===void 0||n.cursorUndo()}}class _0e extends Te{constructor(){super({id:"cursorRedo",label:p("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){var n;(n=Cg.get(t))===null||n===void 0||n.cursorRedo()}}At(Cg.ID,Cg,0);_e(m0e);_e(_0e);class v0e{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){const i=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new k(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new Re(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new Re(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumberthis._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(35)||this._editor.getOption(22)||(af(e)&&(this._modifierPressed=!0),this._mouseDown&&af(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(35)||this._editor.getOption(22)||(af(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===Bd.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(this._dragSelection===null){const n=(this._editor.getSelections()||[]).filter(s=>t.position&&s.containsPosition(t.position));if(n.length===1)this._dragSelection=n[0];else return}af(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new z(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let i=null;if(e.event.shiftKey){const n=this._editor.getSelection();if(n){const{selectionStartLineNumber:s,selectionStartColumn:r}=n;i=[new Re(s,r,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map(n=>n.containsPosition(t)?new Re(t.lineNumber,t.column,t.lineNumber,t.column):n);this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(af(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(Bd.ID,new v0e(this._dragSelection,t,af(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new k(e.lineNumber,e.column,e.lineNumber,e.column),options:Bd._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}Bd.ID="editor.contrib.dragAndDrop";Bd.TRIGGER_KEY_VALUE=It?6:5;Bd._DECORATION_OPTIONS=st.register({description:"dnd-target",className:"dnd-target"});At(Bd.ID,Bd,2);const HL=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let o;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?o=crypto.getRandomValues.bind(crypto):o=function(i){for(let n=0;no,asFile:()=>{},value:typeof o=="string"?o:void 0}}function b0e(o,e,t){const i={id:HL(),name:o,uri:e,data:t};return{asString:async()=>"",asFile:()=>i,value:void 0}}class YV{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return wt.some(this,([i,n])=>n.asFile())&&t.push("files"),QV(HS(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return HS(e)}}function HS(o){return o.toLowerCase()}function XV(o,e){return QV(HS(o),e.map(HS))}function QV(o,e){if(o==="*/*")return e.length>0;if(e.includes(o))return!0;const t=o.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[i,n,s]=t;return s==="*"?e.some(r=>r.startsWith(n+"/")):!1}const zL=Object.freeze({create:o=>iu(o.map(e=>e.toString())).join(`\r + *-----------------------------------------------------------------------------*/var b_e=Object.defineProperty,C_e=Object.getOwnPropertyDescriptor,w_e=Object.getOwnPropertyNames,S_e=Object.prototype.hasOwnProperty,y_e=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of w_e(e))!S_e.call(o,n)&&n!==t&&b_e(o,n,{get:()=>e[n],enumerable:!(i=C_e(e,n))||i.enumerable});return o},L_e=(o,e,t)=>(y_e(o,e,"default"),t),D_e="5.0.2",Qp={};L_e(Qp,k0);var VW=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(VW||{}),HW=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(HW||{}),zW=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(zW||{}),$W=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))($W||{}),UW=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(UW||{}),jW=class{constructor(o,e,t,i,n){ri(this,"_onDidChange",new Qp.Emitter);ri(this,"_onDidExtraLibsChange",new Qp.Emitter);ri(this,"_extraLibs");ri(this,"_removedExtraLibs");ri(this,"_eagerModelSync");ri(this,"_compilerOptions");ri(this,"_diagnosticsOptions");ri(this,"_workerOptions");ri(this,"_onDidExtraLibsChangeTimeout");ri(this,"_inlayHintsOptions");ri(this,"_modeConfiguration");this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(o),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this.setModeConfiguration(n),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(o,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===o)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(i=this._extraLibs[t].version+1),this._extraLibs[t]={content:o,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let n=this._extraLibs[t];n&&n.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(o){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),o&&o.length>0)for(const e of o){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let n=1;this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(o){this._compilerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(o){this._diagnosticsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(o){this._workerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(o){this._inlayHintsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(o){}setEagerModelSync(o){this._eagerModelSync=o}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(void 0)}},x_e=D_e,KW={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},qW=new jW({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},KW),GW=new jW({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},KW),k_e=()=>IL().then(o=>o.getTypeScriptWorker()),I_e=()=>IL().then(o=>o.getJavaScriptWorker());Qp.languages.typescript={ModuleKind:VW,JsxEmit:HW,NewLineKind:zW,ScriptTarget:$W,ModuleResolutionKind:UW,typescriptVersion:x_e,typescriptDefaults:qW,javascriptDefaults:GW,getTypeScriptWorker:k_e,getJavaScriptWorker:I_e};function IL(){return Oe(()=>import("./tsMode-BQcOR96Y.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,8]))}Qp.languages.onLanguage("typescript",()=>IL().then(o=>o.setupTypeScript(qW)));Qp.languages.onLanguage("javascript",()=>IL().then(o=>o.setupJavaScript(GW)));class E_e extends Qo{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:{value:p("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),original:"Toggle Collapse Unchanged Regions"},icon:ve.map,toggled:ae.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:ae.has("isInDiffEditor"),menu:{when:ae.has("isInDiffEditor"),id:N.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(Dt),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}mi(E_e);class ZW extends Qo{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:{value:p("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),original:"Toggle Show Moved Code Blocks"},precondition:ae.has("isInDiffEditor")})}run(e,...t){const i=e.get(Dt),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}mi(ZW);class YW extends Qo{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:{value:p("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),original:"Toggle Use Inline View When Space Is Limited"},precondition:ae.has("isInDiffEditor")})}run(e,...t){const i=e.get(Dt),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}mi(YW);zn.appendMenuItem(N.EditorTitle,{command:{id:new YW().desc.id,title:p("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:ae.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:ae.has("isInDiffEditor")},order:11,group:"1_diff",when:ae.and(T.diffEditorRenderSideBySideInlineBreakpointReached,ae.has("isInDiffEditor"))});zn.appendMenuItem(N.EditorTitle,{command:{id:new ZW().desc.id,title:p("showMoves","Show Moved Code Blocks"),icon:ve.move,toggled:gm.create("config.diffEditor.experimental.showMoves",!0),precondition:ae.has("isInDiffEditor")},order:10,group:"1_diff",when:ae.has("isInDiffEditor")});const EL={value:p("diffEditor","Diff Editor"),original:"Diff Editor"};class N_e extends Wa{constructor(){super({id:"diffEditor.switchSide",title:{value:p("switchSide","Switch Side"),original:"Switch Side"},icon:ve.arrowSwap,precondition:ae.has("isInDiffEditor"),f1:!0,category:EL})}runEditorCommand(e,t,i){const n=Im(e);if(n instanceof vu){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}mi(N_e);class T_e extends Wa{constructor(){super({id:"diffEditor.exitCompareMove",title:{value:p("exitCompareMove","Exit Compare Move"),original:"Exit Compare Move"},icon:ve.close,precondition:T.comparingMovedCode,f1:!1,category:EL,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=Im(e);n instanceof vu&&n.exitCompareMove()}}mi(T_e);class M_e extends Wa{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:{value:p("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),original:"Collapse All Unchanged Regions"},icon:ve.fold,precondition:ae.has("isInDiffEditor"),f1:!0,category:EL})}runEditorCommand(e,t,...i){const n=Im(e);n instanceof vu&&n.collapseAllUnchangedRegions()}}mi(M_e);class A_e extends Wa{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:{value:p("showAllUnchangedRegions","Show All Unchanged Regions"),original:"Show All Unchanged Regions"},icon:ve.unfold,precondition:ae.has("isInDiffEditor"),f1:!0,category:EL})}runEditorCommand(e,t,...i){const n=Im(e);n instanceof vu&&n.showAllUnchangedRegions()}}mi(A_e);const XW={value:p("accessibleDiffViewer","Accessible Diff Viewer"),original:"Accessible Diff Viewer"};class km extends Qo{constructor(){super({id:km.id,title:{value:p("editor.action.accessibleDiffViewer.next","Go to Next Difference"),original:"Go to Next Difference"},category:XW,precondition:ae.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=Im(e);t==null||t.accessibleDiffViewerNext()}}km.id="editor.action.accessibleDiffViewer.next";zn.appendMenuItem(N.EditorTitle,{command:{id:km.id,title:p("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:ae.has("isInDiffEditor")},order:10,group:"2_diff",when:ae.and(T.accessibleDiffViewerVisible.negate(),ae.has("isInDiffEditor"))});class E0 extends Qo{constructor(){super({id:E0.id,title:{value:p("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),original:"Go to Previous Difference"},category:XW,precondition:ae.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=Im(e);t==null||t.accessibleDiffViewerPrev()}}E0.id="editor.action.accessibleDiffViewer.prev";function Im(o){var e;const t=o.get(Ot),i=t.listDiffEditors(),n=(e=t.getFocusedCodeEditor())!==null&&e!==void 0?e:t.getActiveCodeEditor();if(!n)return null;for(let r=0,a=i.length;r=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},O_e=function(o,e){return function(t,i){e(t,i,o)}},oT;const NL=new De("selectionAnchorSet",!1);let $d=oT=class{static get(e){return e.getContribution(oT.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=NL.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(Ae.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new as().appendText(p("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),mo(p("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(Ae.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};$d.ID="editor.contrib.selectionAnchorController";$d=oT=P_e([O_e(1,Xe)],$d);class F_e extends Te{constructor(){super({id:"editor.action.setSelectionAnchor",label:p("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2080),weight:100}})}async run(e,t){var i;(i=$d.get(t))===null||i===void 0||i.setSelectionAnchor()}}class B_e extends Te{constructor(){super({id:"editor.action.goToSelectionAnchor",label:p("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:NL})}async run(e,t){var i;(i=$d.get(t))===null||i===void 0||i.goToSelectionAnchor()}}class W_e extends Te{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:p("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:NL,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2089),weight:100}})}async run(e,t){var i;(i=$d.get(t))===null||i===void 0||i.selectFromAnchorToCursor()}}class V_e extends Te{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:p("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:NL,kbOpts:{kbExpr:T.editorTextFocus,primary:9,weight:100}})}async run(e,t){var i;(i=$d.get(t))===null||i===void 0||i.cancelSelectionAnchor()}}At($d.ID,$d,4);_e(F_e);_e(B_e);_e(W_e);_e(V_e);const H_e=M("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},p("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class z_e extends Te{constructor(){super({id:"editor.action.jumpToBracket",label:p("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:3165,weight:100}})}run(e,t){var i;(i=$r.get(t))===null||i===void 0||i.jumpToBracket()}}class $_e extends Te{constructor(){super({id:"editor.action.selectToBracket",label:p("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:fG("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var n;let s=!0;i&&i.selectBrackets===!1&&(s=!1),(n=$r.get(t))===null||n===void 0||n.selectToBracket(s)}}class U_e extends Te{constructor(){super({id:"editor.action.removeBrackets",label:p("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:2561,weight:100}})}run(e,t){var i;(i=$r.get(t))===null||i===void 0||i.removeBrackets(this.id)}}class j_e{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class $r extends q{static get(e){return e.getContribution($r.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Yt(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(71),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(71)&&(this._matchBrackets=this._editor.getOption(71),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const n=i.getStartPosition(),s=e.bracketPairs.matchBracket(n);let r=null;if(s)s[0].containsPosition(n)&&!s[1].containsPosition(n)?r=s[1].getStartPosition():s[1].containsPosition(n)&&(r=s[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(n);if(a)r=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(n);l&&l.range&&(r=l.range.getStartPosition())}}return r?new Ae(r.lineNumber,r.column,r.lineNumber,r.column):new Ae(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{const s=n.getStartPosition();let r=t.bracketPairs.matchBracket(s);if(!r&&(r=t.bracketPairs.findEnclosingBrackets(s),!r)){const d=t.bracketPairs.findNextBracket(s);d&&d.range&&(r=t.bracketPairs.matchBracket(d.range.getStartPosition()))}let a=null,l=null;if(r){r.sort(k.compareRangesUsingStarts);const[d,c]=r;if(a=e?d.getStartPosition():d.getEndPosition(),l=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(s)){const u=a;a=l,l=u}}a&&l&&i.push(new Ae(a.lineNumber,a.column,l.lineNumber,l.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(i=>{const n=i.getPosition();let s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let r=0;for(let u=0,h=e.length;u1&&s.sort(z.compare);const a=[];let l=0,d=0;const c=n.length;for(let u=0,h=s.length;u0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}_e(Z_e);const pg="9_cutcopypaste",Y_e=Ml||document.queryCommandSupported("cut"),JW=Ml||document.queryCommandSupported("copy"),X_e=typeof navigator.clipboard>"u"||pr?document.queryCommandSupported("paste"):!0;function IR(o){return o.register(),o}const Q_e=Y_e?IR(new pm({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Ml?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:N.MenubarEditMenu,group:"2_ccp",title:p({},"Cu&&t"),order:1},{menuId:N.EditorContext,group:pg,title:p("actions.clipboard.cutLabel","Cut"),when:T.writable,order:1},{menuId:N.CommandPalette,group:"",title:p("actions.clipboard.cutLabel","Cut"),order:1},{menuId:N.SimpleEditorContext,group:pg,title:p("actions.clipboard.cutLabel","Cut"),when:T.writable,order:1}]})):void 0,J_e=JW?IR(new pm({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Ml?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:N.MenubarEditMenu,group:"2_ccp",title:p({},"&&Copy"),order:2},{menuId:N.EditorContext,group:pg,title:p("actions.clipboard.copyLabel","Copy"),order:2},{menuId:N.CommandPalette,group:"",title:p("actions.clipboard.copyLabel","Copy"),order:1},{menuId:N.SimpleEditorContext,group:pg,title:p("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;zn.appendMenuItem(N.MenubarEditMenu,{submenu:N.MenubarCopy,title:{value:p("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});zn.appendMenuItem(N.EditorContext,{submenu:N.EditorContextCopy,title:{value:p("copy as","Copy As"),original:"Copy As"},group:pg,order:3});zn.appendMenuItem(N.EditorContext,{submenu:N.EditorContextShare,title:{value:p("share","Share"),original:"Share"},group:"11_share",order:-1,when:ae.and(ae.notEquals("resourceScheme","output"),T.editorTextFocus)});zn.appendMenuItem(N.EditorTitleContext,{submenu:N.EditorTitleContextShare,title:{value:p("share","Share"),original:"Share"},group:"11_share",order:-1});zn.appendMenuItem(N.ExplorerContext,{submenu:N.ExplorerContextShare,title:{value:p("share","Share"),original:"Share"},group:"11_share",order:-1});const ik=X_e?IR(new pm({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Ml?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:N.MenubarEditMenu,group:"2_ccp",title:p({},"&&Paste"),order:4},{menuId:N.EditorContext,group:pg,title:p("actions.clipboard.pasteLabel","Paste"),when:T.writable,order:4},{menuId:N.CommandPalette,group:"",title:p("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:N.SimpleEditorContext,group:pg,title:p("actions.clipboard.pasteLabel","Paste"),when:T.writable,order:4}]})):void 0;class eve extends Te{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:p("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(37)&&t.getSelection().isEmpty()||(rE.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),rE.forceCopyWithSyntaxHighlighting=!1)}}function eV(o,e){o&&(o.addImplementation(1e4,"code-editor",(t,i)=>{const n=t.get(Ot).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const s=n.getOption(37),r=n.getSelection();return r&&r.isEmpty()&&!s||n.getContainerDomNode().ownerDocument.execCommand(e),!0}return!1}),o.addImplementation(0,"generic-dom",(t,i)=>(fm().execCommand(e),!0)))}eV(Q_e,"cut");eV(J_e,"copy");ik&&(ik.addImplementation(1e4,"code-editor",(o,e)=>{const t=o.get(Ot),i=o.get(Xd),n=t.getFocusedCodeEditor();return n&&n.hasTextFocus()?!n.getContainerDomNode().ownerDocument.execCommand("paste")&&Tu?(async()=>{const r=await i.readText();if(r!==""){const a=$v.INSTANCE.get(r);let l=!1,d=null,c=null;a&&(l=n.getOption(37)&&!!a.isFromEmptySelection,d=typeof a.multicursorText<"u"?a.multicursorText:null,c=a.mode),n.trigger("keyboard","paste",{text:r,pasteOnNewLine:l,multicursorText:d,mode:c})}})():!0:!1}),ik.addImplementation(0,"generic-dom",(o,e)=>(fm().execCommand("paste"),!0)));JW&&_e(eve);class Ze{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+Ze.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new Ze(this.value+Ze.sep+e)}}Ze.sep=".";Ze.None=new Ze("@@none@@");Ze.Empty=new Ze("");Ze.QuickFix=new Ze("quickfix");Ze.Refactor=new Ze("refactor");Ze.RefactorExtract=Ze.Refactor.append("extract");Ze.RefactorInline=Ze.Refactor.append("inline");Ze.RefactorMove=Ze.Refactor.append("move");Ze.RefactorRewrite=Ze.Refactor.append("rewrite");Ze.Notebook=new Ze("notebook");Ze.Source=new Ze("source");Ze.SourceOrganizeImports=Ze.Source.append("organizeImports");Ze.SourceFixAll=Ze.Source.append("fixAll");Ze.SurroundWith=Ze.Refactor.append("surround");var _o;(function(o){o.Refactor="refactor",o.RefactorPreview="refactor preview",o.Lightbulb="lightbulb",o.Default="other (default)",o.SourceAction="source action",o.QuickFix="quick fix action",o.FixAll="fix all",o.OrganizeImports="organize imports",o.AutoFix="auto fix",o.QuickFixHover="quick fix hover window",o.OnSave="save participants",o.ProblemsView="problems view"})(_o||(_o={}));function tve(o,e){return!(o.include&&!o.include.intersects(e)||o.excludes&&o.excludes.some(t=>tV(e,t,o.include))||!o.includeSourceActions&&Ze.Source.contains(e))}function ive(o,e){const t=e.kind?new Ze(e.kind):void 0;return!(o.include&&(!t||!o.include.contains(t))||o.excludes&&t&&o.excludes.some(i=>tV(t,i,o.include))||!o.includeSourceActions&&t&&Ze.Source.contains(t)||o.onlyIncludePreferredActions&&!e.isPreferred)}function tV(o,e,t){return!(!e.contains(o)||t&&e.contains(t))}class gl{static fromUser(e,t){return!e||typeof e!="object"?new gl(t.kind,t.apply,!1):new gl(gl.getKindFromUser(e,t.kind),gl.getApplyFromUser(e,t.apply),gl.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new Ze(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}}class nve{constructor(e,t,i){this.action=e,this.provider=t,this.highlightRange=i}async resolve(e){var t;if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let i;try{i=await this.provider.resolveCodeAction(this.action,e)}catch(n){en(n)}i&&(this.action.edit=i.edit)}return this}}const iV="editor.action.codeAction",ER="editor.action.quickFix",nV="editor.action.autoFix",sV="editor.action.refactor",oV="editor.action.sourceAction",NR="editor.action.organizeImports",TR="editor.action.fixAll";class sv extends q{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return e.isAI&&!t.isAI?1:!e.isAI&&t.isAI?-1:ls(e.diagnostics)?ls(t.diagnostics)?sv.codeActionsPreferredComparator(e,t):-1:ls(t.diagnostics)?1:sv.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(sv.codeActionsComparator),this.validActions=this.allActions.filter(({action:n})=>!n.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Ze.QuickFix.contains(new Ze(e.kind))&&!!e.isPreferred)}get hasAIFix(){return this.validActions.some(({action:e})=>!!e.isAI)}get allAIFixes(){return this.validActions.every(({action:e})=>!!e.isAI)}}const t3={actions:[],documentation:void 0};async function ov(o,e,t,i,n,s){var r;const a=i.filter||{},l={...a,excludes:[...a.excludes||[],Ze.Notebook]},d={only:(r=a.include)===null||r===void 0?void 0:r.value,trigger:i.type},c=new SR(e,s),u=i.type===2,h=sve(o,e,u?l:a),g=new de,f=h.map(async v=>{try{n.report(v);const _=await v.provideCodeActions(e,t,d,c.token);if(_&&g.add(_),c.token.isCancellationRequested)return t3;const b=((_==null?void 0:_.actions)||[]).filter(w=>w&&ive(a,w)),C=rve(v,b,a.include);return{actions:b.map(w=>new nve(w,v)),documentation:C}}catch(_){if(Fa(_))throw _;return en(_),t3}}),m=o.onDidChange(()=>{const v=o.all(e);Bi(v,h)||c.cancel()});try{const v=await Promise.all(f),_=v.map(C=>C.actions).flat(),b=[...Ia(v.map(C=>C.documentation)),...ove(o,e,i,_)];return new sv(_,b,g)}finally{m.dispose(),c.dispose()}}function sve(o,e,t){return o.all(e).filter(i=>i.providedCodeActionKinds?i.providedCodeActionKinds.some(n=>tve(t,new Ze(n))):!0)}function*ove(o,e,t,i){var n,s,r;if(e&&i.length)for(const a of o.all(e))a._getAdditionalMenuItems&&(yield*(n=a._getAdditionalMenuItems)===null||n===void 0?void 0:n.call(a,{trigger:t.type,only:(r=(s=t.filter)===null||s===void 0?void 0:s.include)===null||r===void 0?void 0:r.value},i.map(l=>l.action)))}function rve(o,e,t){if(!o.documentation)return;const i=o.documentation.map(n=>({kind:new Ze(n.kind),command:n.command}));if(t){let n;for(const s of i)s.kind.contains(t)&&(n?n.kind.contains(s.kind)&&(n=s):n=s);if(n)return n==null?void 0:n.command}for(const n of e)if(n.kind){for(const s of i)if(s.kind.contains(new Ze(n.kind)))return s.command}}var TS;(function(o){o.OnSave="onSave",o.FromProblemsView="fromProblemsView",o.FromCodeActions="fromCodeActions"})(TS||(TS={}));async function ave(o,e,t,i,n=vt.None){var s;const r=o.get(f0),a=o.get(Ri),l=o.get(vo),d=o.get(sn);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),await e.resolve(n),!n.isCancellationRequested&&!(!((s=e.action.edit)===null||s===void 0)&&s.edits.length&&!(await r.apply(e.action.edit,{editor:i==null?void 0:i.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==TS.OnSave,showPreview:i==null?void 0:i.preview})).isApplied)&&e.action.command)try{await a.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(c){const u=lve(c);d.error(typeof u=="string"?u:p("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}function lve(o){return typeof o=="string"?o:o instanceof Error&&typeof o.message=="string"?o.message:void 0}Et.registerCommand("_executeCodeActionProvider",async function(o,e,t,i,n){if(!(e instanceof ze))throw hr();const{codeActionProvider:s}=o.get(Me),r=o.get(Si).getModel(e);if(!r)throw hr();const a=Ae.isISelection(t)?Ae.liftSelection(t):k.isIRange(t)?r.validateRange(t):void 0;if(!a)throw hr();const l=typeof i=="string"?new Ze(i):void 0,d=await ov(s,r,a,{type:1,triggerAction:_o.Default,filter:{includeSourceActions:!0,include:l}},Fd.None,vt.None),c=[],u=Math.min(d.validActions.length,typeof n=="number"?n:0);for(let h=0;hh.action)}finally{setTimeout(()=>d.dispose(),100)}});var dve=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},cve=function(o,e){return function(t,i){e(t,i,o)}},rT;let MS=rT=class{constructor(e){this.keybindingService=e}getResolver(){const e=new Ru(()=>this.keybindingService.getKeybindings().filter(t=>rT.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let i=t.commandArgs;return t.command===NR?i={kind:Ze.SourceOrganizeImports.value}:t.command===TR&&(i={kind:Ze.SourceFixAll.value}),{resolvedKeybinding:t.resolvedKeybinding,...gl.fromUser(i,{kind:Ze.None,apply:"never"})}}));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.value);return i==null?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new Ze(e.kind);return t.filter(n=>n.kind.contains(i)).filter(n=>n.preferred?e.isPreferred:!0).reduceRight((n,s)=>n?n.kind.contains(s.kind)?s:n:s,void 0)}};MS.codeActionCommands=[sV,iV,oV,NR,TR];MS=rT=dve([cve(0,Xt)],MS);M("symbolIcon.arrayForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.booleanForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},p("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.colorForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.constantForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},p("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},p("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},p("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},p("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},p("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.fileForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.folderForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},p("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},p("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.keyForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.keywordForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},p("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.moduleForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.namespaceForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.nullForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.numberForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.objectForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.operatorForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.packageForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.propertyForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.referenceForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.snippetForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.stringForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.structForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.textForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.typeParameterForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.unitForeground",{dark:be,light:be,hcDark:be,hcLight:be},p("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));M("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},p("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const rV=Object.freeze({kind:Ze.Empty,title:p("codeAction.widget.id.more","More Actions...")}),uve=Object.freeze([{kind:Ze.QuickFix,title:p("codeAction.widget.id.quickfix","Quick Fix")},{kind:Ze.RefactorExtract,title:p("codeAction.widget.id.extract","Extract"),icon:ve.wrench},{kind:Ze.RefactorInline,title:p("codeAction.widget.id.inline","Inline"),icon:ve.wrench},{kind:Ze.RefactorRewrite,title:p("codeAction.widget.id.convert","Rewrite"),icon:ve.wrench},{kind:Ze.RefactorMove,title:p("codeAction.widget.id.move","Move"),icon:ve.wrench},{kind:Ze.SurroundWith,title:p("codeAction.widget.id.surround","Surround With"),icon:ve.symbolSnippet},{kind:Ze.Source,title:p("codeAction.widget.id.source","Source Action"),icon:ve.symbolFile},rV]);function hve(o,e,t){if(!e)return o.map(s=>{var r;return{kind:"action",item:s,group:rV,disabled:!!s.action.disabled,label:s.action.disabled||s.action.title,canPreview:!!(!((r=s.action.edit)===null||r===void 0)&&r.edits.length)}});const i=uve.map(s=>({group:s,actions:[]}));for(const s of o){const r=s.action.kind?new Ze(s.action.kind):Ze.None;for(const a of i)if(a.group.kind.contains(r)){a.actions.push(s);break}}const n=[];for(const s of i)if(s.actions.length){n.push({kind:"header",group:s.group});for(const r of s.actions){const a=s.group;n.push({kind:"action",item:r,group:r.action.isAI?{title:a.title,kind:a.kind,icon:ve.sparkle}:a,label:r.action.title,disabled:!!r.action.disabled,keybinding:t(r.action)})}}return n}var gve=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},i3=function(o,e){return function(t,i){e(t,i,o)}},aT,$f;(function(o){o.Hidden={type:0};class e{constructor(i,n,s,r){this.actions=i,this.trigger=n,this.editorPosition=s,this.widgetPosition=r,this.type=1}}o.Showing=e})($f||($f={}));let mg=aT=class extends q{constructor(e,t,i){super(),this._editor=e,this._keybindingService=t,this._onClick=this._register(new W),this.onClick=this._onClick.event,this._state=$f.Hidden,this._iconClasses=[],this._domNode=pe("div.lightBulbWidget"),this._register(ei.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{const s=this._editor.getModel();(this.state.type!==1||!s||this.state.editorPosition.lineNumber>=s.getLineCount())&&this.hide()})),this._register(VX(this._domNode,n=>{var s;if(this.state.type!==1)return;const r=this._editor.getOption(64).experimental.showAiIcon;if((r===so.On||r===so.OnCode)&&this.state.actions.allAIFixes&&this.state.actions.validActions.length===1){const u=this.state.actions.validActions[0].action;if(!((s=u.command)===null||s===void 0)&&s.id){i.executeCommand(u.command.id,...u.command.arguments||[]),n.preventDefault();return}}this._editor.focus(),n.preventDefault();const{top:a,height:l}=gn(this._domNode),d=this._editor.getOption(66);let c=Math.floor(d/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(n.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(64)&&(this._editor.getOption(64).enabled||this.hide(),this._updateLightBulbTitleAndIcon())})),this._register(ye.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{var n,s,r,a;this._preferredKbLabel=(s=(n=this._keybindingService.lookupKeybinding(nV))===null||n===void 0?void 0:n.getLabel())!==null&&s!==void 0?s:void 0,this._quickFixKbLabel=(a=(r=this._keybindingService.lookupKeybinding(ER))===null||r===void 0?void 0:r.getLabel())!==null&&a!==void 0?a:void 0,this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.hide();const n=this._editor.getOptions();if(!n.get(64).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:r,column:a}=s.validatePosition(i),l=s.getOptions().tabSize,d=n.get(50),c=s.getLineContent(r),u=jy(c,l),h=d.spaceWidth*u>22,g=m=>m>2&&this._editor.getTopForLineNumber(m)===this._editor.getTopForLineNumber(m-1);let f=r;if(!h){if(r>1&&!g(r-1))f-=1;else if(!g(r+1))f+=1;else if(a*d.spaceWidth<22)return this.hide()}this.state=new $f.Showing(e,t,i,{position:{lineNumber:f,column:s.getLineContent(f).match(/^\S\s*$/)?2:1},preference:aT._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==$f.Hidden&&(this.state=$f.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){var e,t,i;if(this._domNode.classList.remove(...this._iconClasses),this._iconClasses=[],this.state.type!==1)return;const n=()=>{this._preferredKbLabel&&(this.title=p("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel))},s=()=>{this._quickFixKbLabel?this.title=p("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=p("codeAction","Show Code Actions")};let r;const a=this._editor.getOption(64).experimental.showAiIcon;if(a===so.On||a===so.OnCode)if(a===so.On&&this.state.actions.allAIFixes)if(r=ve.sparkleFilled,this.state.actions.allAIFixes&&this.state.actions.validActions.length===1)if(((e=this.state.actions.validActions[0].action.command)===null||e===void 0?void 0:e.id)==="inlineChat.start"){const l=(i=(t=this._keybindingService.lookupKeybinding("inlineChat.start"))===null||t===void 0?void 0:t.getLabel())!==null&&i!==void 0?i:void 0;this.title=l?p("codeActionStartInlineChatWithKb","Start Inline Chat ({0})",l):p("codeActionStartInlineChat","Start Inline Chat")}else this.title=p("codeActionTriggerAiAction","Trigger AI Action");else s();else this.state.actions.hasAutoFix?(this.state.actions.hasAIFix?r=ve.lightbulbSparkleAutofix:r=ve.lightbulbAutofix,n()):this.state.actions.hasAIFix?(r=ve.lightbulbSparkle,s()):(r=ve.lightBulb,s());else this.state.actions.hasAutoFix?(r=ve.lightbulbAutofix,n()):(r=ve.lightBulb,s());this._iconClasses=Ue.asClassNameArray(r),this._domNode.classList.add(...this._iconClasses)}set title(e){this._domNode.title=e}};mg.ID="editor.contrib.lightbulbWidget";mg._posPref=[0];mg=aT=gve([i3(1,Xt),i3(2,Ri)],mg);var fve=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},n3=function(o,e){return function(t,i){e(t,i,o)}},lT;let Ud=lT=class{constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new W,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const n=new de,s=n.add(iL(e,{...this._getRenderOptions(e,n),...t},i));return s.element.classList.add("rendered-markdown"),{element:s.element,dispose:()=>n.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:async(i,n)=>{var s,r,a;let l;i?l=this._languageService.getLanguageIdByLanguageName(i):this._options.editor&&(l=(s=this._options.editor.getModel())===null||s===void 0?void 0:s.getLanguageId()),l||(l=Ko);const d=await lae(this._languageService,n,l),c=document.createElement("span");if(c.innerHTML=(a=(r=lT._ttpTokenizer)===null||r===void 0?void 0:r.createHTML(d))!==null&&a!==void 0?a:d,this._options.editor){const u=this._options.editor.getOption(50);Jn(c,u)}else this._options.codeBlockFontFamily&&(c.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(c.style.fontSize=this._options.codeBlockFontSize),c},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:i=>aV(this._openerService,i,e.isTrusted),disposables:t}}}};Ud._ttpTokenizer=qd("tokenizeToString",{createHTML(o){return o}});Ud=lT=fve([n3(1,bi),n3(2,So)],Ud);async function aV(o,e,t){try{return await o.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:pve(t)})}catch(i){return nt(i),!1}}function pve(o){return o===!0?!0:o&&Array.isArray(o.enabledCommands)?o.enabledCommands:!1}var mve=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},s3=function(o,e){return function(t,i){e(t,i,o)}},W1;let ho=W1=class{static get(e){return e.getContribution(W1.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new An,this._messageListeners=new de,this._mouseOverMessage=!1,this._editor=e,this._visible=W1.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)===null||e===void 0||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){mo(jc(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=jc(e)?iL(e,{actionHandler:{callback:n=>aV(this._openerService,n,jc(e)?e.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new o3(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(ye.debounce(this._editor.onDidBlurEditorText,(n,s)=>s,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&Qn(jo(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(J(this._messageWidget.value.getDomNode(),Se.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(J(this._messageWidget.value.getDomNode(),Se.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let i;this._messageListeners.add(this._editor.onMouseMove(n=>{n.target.position&&(i?i.containsPosition(n.target.position)||this.closeMessage():i=new k(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(o3.fadeOut(this._messageWidget.value))}};ho.ID="editor.contrib.messageController";ho.MESSAGE_VISIBLE=new De("messageVisible",!1,p("messageVisible","Whether the editor is currently showing an inline message"));ho=W1=mve([s3(1,Xe),s3(2,So)],ho);const _ve=Rn.bindToContribution(ho.get);we(new _ve({id:"leaveEditorMessage",precondition:ho.MESSAGE_VISIBLE,handler:o=>o.closeMessage(),kbOpts:{weight:130,primary:9}}));let o3=class{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const r=document.createElement("div");typeof n=="string"?(r.classList.add("message"),r.textContent=n):(n.classList.add("message"),r.appendChild(n)),this._domNode.appendChild(r);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};At(ho.ID,ho,4);var lV=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},dT=function(o,e){return function(t,i){e(t,i,o)}};const dV="acceptSelectedCodeAction",cV="previewSelectedCodeAction";class vve{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){var n,s;i.text.textContent=(s=(n=e.group)===null||n===void 0?void 0:n.title)!==null&&s!==void 0?s:""}disposeTemplate(e){}}let cT=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const i=document.createElement("span");i.className="title",e.append(i);const n=new C0(e,Vo);return{container:e,icon:t,text:i,keybinding:n}}renderElement(e,t,i){var n,s,r;if(!((n=e.group)===null||n===void 0)&&n.icon?(i.icon.className=Ue.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=Ee(e.group.icon.color.id))):(i.icon.className=Ue.asClassName(ve.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=uV(e.label),i.keybinding.set(e.keybinding),iQ(!!e.keybinding,i.keybinding.element);const a=(s=this._keybindingService.lookupKeybinding(dV))===null||s===void 0?void 0:s.getLabel(),l=(r=this._keybindingService.lookupKeybinding(cV))===null||r===void 0?void 0:r.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:a&&l?this._supportsPreview&&e.canPreview?i.container.title=p({},"{0} to apply, {1} to preview",a,l):i.container.title=p({},"{0} to apply",a):i.container.title=""}disposeTemplate(e){}};cT=lV([dT(1,Xt)],cT);class bve extends UIEvent{constructor(){super("acceptSelectedAction")}}class r3 extends UIEvent{constructor(){super("previewSelectedAction")}}function Cve(o){if(o.kind==="action")return o.label}let uT=class extends q{constructor(e,t,i,n,s,r){super(),this._delegate=n,this._contextViewService=s,this._keybindingService=r,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new tn),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const a={getHeight:l=>l.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:l=>l.kind};this._list=this._register(new Yr(e,this.domNode,a,[new cT(t,this._keybindingService),new vve],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:Cve},accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let d=l.label?uV(l==null?void 0:l.label):"";return l.disabled&&(d=p({},"{0}, Disabled Reason: {1}",d,l.disabled)),d}return null},getWidgetAriaLabel:()=>p({},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(Fg),this._register(this._list.onMouseClick(l=>this.onListClick(l))),this._register(this._list.onMouseOver(l=>this.onListHover(l))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(l=>this.onListSelection(l))),this._allMenuItems=i,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter(l=>l.kind==="header").length,n=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(n);let s=e;if(this._allMenuItems.length>=50)s=380;else{const l=this._allMenuItems.map((d,c)=>{const u=this.domNode.ownerDocument.getElementById(this._list.getElementID(c));if(u){u.style.width="auto";const h=u.getBoundingClientRect().width;return u.style.width="",h}return 0});s=Math.max(...l,e)}const a=Math.min(n,this.domNode.ownerDocument.body.clientHeight*.7);return this._list.layout(a,s),this.domNode.style.height=`${a}px`,this._list.domFocus(),s}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(t.length===0)return;const i=t[0],n=this._list.element(i);if(!this.focusCondition(n))return;const s=e?new r3:new bve;this._list.setSelection([i],s)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof r3):this._list.setSelection([])}onFocus(){var e,t;this._list.domFocus();const i=this._list.getFocus();if(i.length===0)return;const n=i[0],s=this._list.element(n);(t=(e=this._delegate).onFocus)===null||t===void 0||t.call(e,s.item)}async onListHover(e){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&t.kind==="action"){const i=await this._delegate.onHover(t.item,this.cts.token);t.canPreview=i?i.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};uT=lV([dT(4,Gd),dT(5,Xt)],uT);function uV(o){return o.replace(/\r\n|\r|\n/g," ")}var wve=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nk=function(o,e){return function(t,i){e(t,i,o)}};M("actionBar.toggledBackground",{dark:Ih,light:Ih,hcDark:Ih,hcLight:Ih},p("actionBar.toggledBackground","Background color for toggled action items in action bar."));const _g={Visible:new De("codeActionMenuVisible",!1,p("codeActionMenuVisible","Whether the action widget list is visible"))},Hg=bt("actionWidgetService");let vg=class extends q{get isVisible(){return _g.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new An)}show(e,t,i,n,s,r,a){const l=_g.Visible.bindTo(this._contextKeyService),d=this._instantiationService.createInstance(uT,e,t,i,n);this._contextViewService.showContextView({getAnchor:()=>s,render:c=>(l.set(!0),this._renderWidget(c,d,a??[])),onHide:c=>{l.reset(),this._onWidgetClosed(c)}},r,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,i){var n;const s=document.createElement("div");if(s.classList.add("action-widget"),e.appendChild(s),this._list.value=t,this._list.value)s.appendChild(this._list.value.domNode);else throw new Error("List has no value");const r=new de,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),r.add(J(l,Se.MOUSE_DOWN,f=>f.stopPropagation()));const d=document.createElement("div"),c=e.appendChild(d);c.classList.add("context-view-pointerBlock"),r.add(J(c,Se.POINTER_MOVE,()=>c.remove())),r.add(J(c,Se.MOUSE_DOWN,()=>c.remove()));let u=0;if(i.length){const f=this._createActionBar(".action-widget-action-bar",i);f&&(s.appendChild(f.getContainer().parentElement),r.add(f),u=f.getContainer().offsetWidth)}const h=(n=this._list.value)===null||n===void 0?void 0:n.layout(u);s.style.width=`${h}px`;const g=r.add(Pl(e));return r.add(g.onDidBlur(()=>this.hide())),r}_createActionBar(e,t){if(!t.length)return;const i=pe(e),n=new Cr(i);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};vg=wve([nk(0,Gd),nk(1,Xe),nk(2,qe)],vg);xt(Hg,vg,1);const N0=1100;mi(class extends Qo{constructor(){super({id:"hideCodeActionWidget",title:{value:p("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:_g.Visible,keybinding:{weight:N0,primary:9,secondary:[1033]}})}run(o){o.get(Hg).hide()}});mi(class extends Qo{constructor(){super({id:"selectPrevCodeAction",title:{value:p("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:_g.Visible,keybinding:{weight:N0,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(o){const e=o.get(Hg);e instanceof vg&&e.focusPrevious()}});mi(class extends Qo{constructor(){super({id:"selectNextCodeAction",title:{value:p("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:_g.Visible,keybinding:{weight:N0,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(o){const e=o.get(Hg);e instanceof vg&&e.focusNext()}});mi(class extends Qo{constructor(){super({id:dV,title:{value:p("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:_g.Visible,keybinding:{weight:N0,primary:3,secondary:[2137]}})}run(o){const e=o.get(Hg);e instanceof vg&&e.acceptSelected()}});mi(class extends Qo{constructor(){super({id:cV,title:{value:p("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:_g.Visible,keybinding:{weight:N0,primary:2051}})}run(o){const e=o.get(Hg);e instanceof vg&&e.acceptSelected(!0)}});const hV=new De("supportedCodeAction","");class Sve extends q{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new qr),this._register(this._markerService.onMarkerChanged(s=>this._onMarkerChanges(s))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(i=>dA(i,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:_o.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){var t;if(!this._editor.hasModel())return;const i=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&e.type===2){const{lineNumber:s,column:r}=n.getPosition(),a=i.getLineContent(s);if(a.length===0){if(!(((t=this._editor.getOption(64).experimental)===null||t===void 0?void 0:t.showAiIcon)===so.On))return}else if(r===1){if(/\s/.test(a[0]))return}else if(r===i.getLineMaxColumn(s)){if(/\s/.test(a[a.length-1]))return}else if(/\s/.test(a[r-2])&&/\s/.test(a[r-1]))return}return n}}var Lh;(function(o){o.Empty={type:0};class e{constructor(i,n,s){this.trigger=i,this.position=n,this._cancellablePromise=s,this.type=1,this.actions=s.catch(r=>{if(Fa(r))return gV;throw r})}cancel(){this._cancellablePromise.cancel()}}o.Triggered=e})(Lh||(Lh={}));const gV=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class yve extends q{constructor(e,t,i,n,s,r){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=s,this._configurationService=r,this._codeActionOracle=this._register(new An),this._state=Lh.Empty,this._onDidChangeState=this._register(new W),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=hV.bindTo(n),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(Lh.Empty,!0))}_settingEnabledNearbyQuickfixes(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:t==null?void 0:t.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(Lh.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(90)){const t=this._registry.all(e).flatMap(i=>{var n;return(n=i.providedCodeActionKinds)!==null&&n!==void 0?n:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new Sve(this._editor,this._markerService,i=>{var n;if(!i){this.setState(Lh.Empty);return}const s=i.selection.getStartPosition(),r=_n(async a=>{var l,d,c,u,h,g;if(this._settingEnabledNearbyQuickfixes()&&i.trigger.type===1&&(i.trigger.triggerAction===_o.QuickFix||!((d=(l=i.trigger.filter)===null||l===void 0?void 0:l.include)===null||d===void 0)&&d.contains(Ze.QuickFix))){const f=await ov(this._registry,e,i.selection,i.trigger,Fd.None,a),m=[...f.allActions];if(a.isCancellationRequested)return gV;if(!((c=f.validActions)===null||c===void 0?void 0:c.some(_=>_.action.kind?Ze.QuickFix.contains(new Ze(_.action.kind)):!1))){const _=this._markerService.read({resource:e.uri});if(_.length>0){const b=i.selection.getPosition();let C=b,w=Number.MAX_VALUE;const S=[...f.validActions];for(const y of _){const I=y.endColumn,E=y.endLineNumber,R=y.startLineNumber;if(E===b.lineNumber||R===b.lineNumber){C=new z(E,I);const j={type:i.trigger.type,triggerAction:i.trigger.triggerAction,filter:{include:!((u=i.trigger.filter)===null||u===void 0)&&u.include?(h=i.trigger.filter)===null||h===void 0?void 0:h.include:Ze.QuickFix},autoApply:i.trigger.autoApply,context:{notAvailableMessage:((g=i.trigger.context)===null||g===void 0?void 0:g.notAvailableMessage)||"",position:C}},O=new Ae(C.lineNumber,C.column,C.lineNumber,C.column),$=await ov(this._registry,e,O,j,Fd.None,a);if($.validActions.length!==0){for(const K of $.validActions)K.highlightRange=K.action.isPreferred;f.allActions.length===0&&m.push(...$.allActions),Math.abs(b.column-I)E.findIndex(R=>R.action.title===y.action.title)===I);return x.sort((y,I)=>y.action.isPreferred&&!I.action.isPreferred?-1:!y.action.isPreferred&&I.action.isPreferred||y.action.isAI&&!I.action.isAI?1:!y.action.isAI&&I.action.isAI?-1:0),{validActions:x,allActions:m,documentation:f.documentation,hasAutoFix:f.hasAutoFix,hasAIFix:f.hasAIFix,allAIFixes:f.allAIFixes,dispose:()=>{f.dispose()}}}}}return ov(this._registry,e,i.selection,i.trigger,Fd.None,a)});i.trigger.type===1&&((n=this._progressService)===null||n===void 0||n.showWhile(r,250)),this.setState(new Lh.Triggered(i.trigger,s,r))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:_o.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!this._disposed&&this._onDidChangeState.fire(e))}}var Lve=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},id=function(o,e){return function(t,i){e(t,i,o)}},V1;const Dve="quickfix-edit-highlight";let Cu=V1=class extends q{static get(e){return e.getContribution(V1.ID)}constructor(e,t,i,n,s,r,a,l,d,c){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=d,this._instantiationService=c,this._activeCodeActions=this._register(new An),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new yve(this._editor,s.codeActionProvider,t,i,r,l)),this._register(this._model.onDidChangeState(u=>this.update(u))),this._lightBulbWidget=new Ru(()=>{const u=this._editor.getContribution(mg.ID);return u&&this._register(u.onClick(h=>this.showCodeActionList(h.actions,h,{includeDisabledActions:!1,fromLightbulb:!0}))),u}),this._resolver=n.createInstance(MS),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}showCodeActions(e,t,i){return this.showCodeActionList(t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,n){var s;if(!this._editor.hasModel())return;(s=ho.get(this._editor))===null||s===void 0||s.closeMessage();const r=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:n,context:{notAvailableMessage:e,position:r}})}_trigger(e){return this._model.trigger(e)}async _applyCodeAction(e,t,i){try{await this._instantiationService.invokeFunction(ave,e,TS.FromCodeActions,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:_o.QuickFix,filter:{}})}}async update(e){var t,i,n,s,r,a,l;if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let d;try{d=await e.actions}catch(c){nt(c);return}if(!this._disposed)if((i=this._lightBulbWidget.value)===null||i===void 0||i.update(d,e.trigger,e.position),e.trigger.type===1){if(!((n=e.trigger.filter)===null||n===void 0)&&n.include){const u=this.tryGetValidActionToApply(e.trigger,d);if(u){try{(s=this._lightBulbWidget.value)===null||s===void 0||s.hide(),await this._applyCodeAction(u,!1,!1)}finally{d.dispose()}return}if(e.trigger.context){const h=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,d);if(h&&h.action.disabled){(r=ho.get(this._editor))===null||r===void 0||r.showMessage(h.action.disabled,e.trigger.context.position),d.dispose();return}}}const c=!!(!((a=e.trigger.filter)===null||a===void 0)&&a.include);if(e.trigger.context&&(!d.allActions.length||!c&&!d.validActions.length)){(l=ho.get(this._editor))===null||l===void 0||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=d,d.dispose();return}this._activeCodeActions.value=d,this.showCodeActionList(d,this.toCoords(e.position),{includeDisabledActions:c,fromLightbulb:!1})}else this._actionWidgetService.isVisible?d.dispose():this._activeCodeActions.value=d}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:i})=>i.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}async showCodeActionList(e,t,i){const n=this._editor.createDecorationsCollection(),s=this._editor.getDomNode();if(!s)return;const r=i.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!r.length)return;const a=z.isIPosition(t)?this.toCoords(t):t,l={onSelect:async(d,c)=>{this._applyCodeAction(d,!0,!!c),this._actionWidgetService.hide(),n.clear()},onHide:()=>{var d;(d=this._editor)===null||d===void 0||d.focus(),n.clear()},onHover:async(d,c)=>{var u;if(await d.resolve(c),!c.isCancellationRequested)return{canPreview:!!(!((u=d.action.edit)===null||u===void 0)&&u.edits.length)}},onFocus:d=>{var c,u;if(d&&d.highlightRange&&d.action.diagnostics){const h=[{range:d.action.diagnostics[0],options:V1.DECORATION}];n.set(h);const g=d.action.diagnostics[0],f=(u=(c=this._editor.getModel())===null||c===void 0?void 0:c.getWordAtPosition({lineNumber:g.startLineNumber,column:g.startColumn}))===null||u===void 0?void 0:u.word;hu(p("editingNewSelection","Context: {0} at line {1} and column {2}.",f,g.startLineNumber,g.startColumn))}else n.clear()}};this._actionWidgetService.show("codeActionWidget",!0,hve(r,this._shouldShowHeaders(),this._resolver.getResolver()),l,a,s,this._getActionBarActions(e,t,i))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=gn(this._editor.getDomNode()),n=i.left+t.left,s=i.top+t.top+t.height;return{x:n,y:s}}_shouldShowHeaders(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const n=e.documentation.map(s=>{var r;return{id:s.id,label:s.title,tooltip:(r=s.tooltip)!==null&&r!==void 0?r:"",class:void 0,enabled:!0,run:()=>{var a;return this._commandService.executeCommand(s.id,...(a=s.arguments)!==null&&a!==void 0?a:[])}}});return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:p("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:p("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),n}};Cu.ID="editor.contrib.codeActionController";Cu.DECORATION=st.register({description:"quickfix-highlight",className:Dve});Cu=V1=Lve([id(1,Yl),id(2,Xe),id(3,qe),id(4,Me),id(5,Bu),id(6,Ri),id(7,Dt),id(8,Hg),id(9,qe)],Cu);Zr((o,e)=>{((n,s)=>{s&&e.addRule(`.monaco-editor ${n} { background-color: ${s}; }`)})(".quickfix-edit-highlight",o.getColor(wl));const i=o.getColor(Ic);i&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${xa(o.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`)});function T0(o){return ae.regex(hV.keys()[0],new RegExp("(\\s|^)"+qo(o.value)+"\\b"))}const MR={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:p("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:p("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[p("args.schema.apply.first","Always apply the first returned code action."),p("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),p("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:p("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function zg(o,e,t,i,n=_o.Default){if(o.hasModel()){const s=Cu.get(o);s==null||s.manualTriggerAtCurrentPosition(e,n,t,i)}}class xve extends Te{constructor(){super({id:ER,label:p("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:ae.and(T.writable,T.hasCodeActionsProvider),kbOpts:{kbExpr:T.textInputFocus,primary:2137,weight:100}})}run(e,t){return zg(t,p("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,_o.QuickFix)}}class kve extends Rn{constructor(){super({id:iV,precondition:ae.and(T.writable,T.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:MR}]}})}runEditorCommand(e,t,i){const n=gl.fromUser(i,{kind:Ze.Empty,apply:"ifSingle"});return zg(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?p("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):p("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?p("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):p("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class Ive extends Te{constructor(){super({id:sV,label:p("refactor.label","Refactor..."),alias:"Refactor...",precondition:ae.and(T.writable,T.hasCodeActionsProvider),kbOpts:{kbExpr:T.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:ae.and(T.writable,T0(Ze.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:MR}]}})}run(e,t,i){const n=gl.fromUser(i,{kind:Ze.Refactor,apply:"never"});return zg(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?p("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):p("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):n.preferred?p("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):p("editor.action.refactor.noneMessage","No refactorings available"),{include:Ze.Refactor.contains(n.kind)?n.kind:Ze.None,onlyIncludePreferredActions:n.preferred},n.apply,_o.Refactor)}}class Eve extends Te{constructor(){super({id:oV,label:p("source.label","Source Action..."),alias:"Source Action...",precondition:ae.and(T.writable,T.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:ae.and(T.writable,T0(Ze.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:MR}]}})}run(e,t,i){const n=gl.fromUser(i,{kind:Ze.Source,apply:"never"});return zg(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?p("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):p("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?p("editor.action.source.noneMessage.preferred","No preferred source actions available"):p("editor.action.source.noneMessage","No source actions available"),{include:Ze.Source.contains(n.kind)?n.kind:Ze.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,_o.SourceAction)}}class Nve extends Te{constructor(){super({id:NR,label:p("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:ae.and(T.writable,T0(Ze.SourceOrganizeImports)),kbOpts:{kbExpr:T.textInputFocus,primary:1581,weight:100}})}run(e,t){return zg(t,p("editor.action.organize.noneMessage","No organize imports action available"),{include:Ze.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",_o.OrganizeImports)}}class Tve extends Te{constructor(){super({id:TR,label:p("fixAll.label","Fix All"),alias:"Fix All",precondition:ae.and(T.writable,T0(Ze.SourceFixAll))})}run(e,t){return zg(t,p("fixAll.noneMessage","No fix all action available"),{include:Ze.SourceFixAll,includeSourceActions:!0},"ifSingle",_o.FixAll)}}class Mve extends Te{constructor(){super({id:nV,label:p("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:ae.and(T.writable,T0(Ze.QuickFix)),kbOpts:{kbExpr:T.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return zg(t,p("editor.action.autoFix.noneMessage","No auto fixes available"),{include:Ze.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",_o.AutoFix)}}At(Cu.ID,Cu,3);At(mg.ID,mg,4);_e(xve);_e(Ive);_e(Eve);_e(Nve);_e(Mve);_e(Tve);we(new kve);xi.as(Va.Configuration).registerConfiguration({...Xy,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:p("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}});xi.as(Va.Configuration).registerConfiguration({...Xy,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:p("includeNearbyQuickFixes","Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}});class hT{constructor(){this.lenses=[],this._disposables=new de}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}async function fV(o,e,t){const i=o.ordered(e),n=new Map,s=new hT,r=i.map(async(a,l)=>{n.set(a,l);try{const d=await Promise.resolve(a.provideCodeLenses(e,t));d&&s.add(d,a)}catch(d){en(d)}});return await Promise.all(r),s.lenses=s.lenses.sort((a,l)=>a.symbol.range.startLineNumberl.symbol.range.startLineNumber?1:n.get(a.provider)n.get(l.provider)?1:a.symbol.range.startColumnl.symbol.range.startColumn?1:0),s}Et.registerCommand("_executeCodeLensProvider",function(o,...e){let[t,i]=e;qt(ze.isUri(t)),qt(typeof i=="number"||!i);const{codeLensProvider:n}=o.get(Me),s=o.get(Si).getModel(t);if(!s)throw hr();const r=[],a=new de;return fV(n,s,vt.None).then(l=>{a.add(l);const d=[];for(const c of l.lenses)i==null||c.symbol.command?r.push(c.symbol):i-- >0&&c.provider.resolveCodeLens&&d.push(Promise.resolve(c.provider.resolveCodeLens(s,c.symbol,vt.None)).then(u=>r.push(u||c.symbol)));return Promise.all(d)}).then(()=>r).finally(()=>{setTimeout(()=>a.dispose(),100)})});var Ave=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Rve=function(o,e){return function(t,i){e(t,i,o)}};const pV=bt("ICodeLensCache");class a3{constructor(e,t){this.lineCount=e,this.data=t}}let gT=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new Pu(20,.75);const t="codelens/cache";g_(Ai,()=>e.remove(t,1));const i="codelens/cache2",n=e.get(i,1,"{}");this._deserialize(n),ye.once(e.onWillSaveState)(s=>{s.reason===rb.SHUTDOWN&&e.store(i,this._serialize(),1,1)})}put(e,t){const i=t.lenses.map(r=>{var a;return{range:r.symbol.range,command:r.symbol.command&&{id:"",title:(a=r.symbol.command)===null||a===void 0?void 0:a.title}}}),n=new hT;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const s=new a3(e.getLineCount(),n);this._cache.set(e.uri.toString(),s)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const s of i.data.lenses)n.add(s.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const i in t){const n=t[i],s=[];for(const a of n.lines)s.push({range:new k(a,1,a,11)});const r=new hT;r.add({lenses:s,dispose(){}},this._fakeProvider),this._cache.set(i,new a3(n.lineCount,r))}}catch{}}};gT=Ave([Rve(0,Xr)],gT);xt(pV,gT,1);class Pve{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class TL{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${TL._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const i=[];let n=!1;for(let s=0;s{d.symbol.command&&l.push(d.symbol),i.addDecoration({range:d.symbol.range,options:l3},u=>this._decorationIds[c]=u),a?a=k.plusRange(a,d.symbol.range):a=k.lift(d.symbol.range)}),this._viewZone=new Pve(a.startLineNumber-1,s,r),this._viewZoneId=n.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new TL(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!!(i&&k.isEmpty(n.range)===i.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((i,n)=>{t.addDecoration({range:i.symbol.range,options:l3},s=>this._decorationIds[n]=s)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},i_=function(o,e){return function(t,i){e(t,i,o)}};let Jp=class{constructor(e,t,i,n,s,r){this._editor=e,this._languageFeaturesService=t,this._commandService=n,this._notificationService=s,this._codeLensCache=r,this._disposables=new de,this._localToDispose=new de,this._lenses=[],this._oldCodeLensModels=new de,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Yt(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{(a.hasChanged(50)||a.hasChanged(19)||a.hasChanged(18))&&this._updateLensStyle(),a.hasChanged(17)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(66)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=this._editor.getOption(52)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(18),n=this._editor.getOption(50),{style:s}=this._editor.getContainerDomNode();s.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),s.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),s.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),i&&(s.setProperty("--vscode-editorCodeLens-fontFamily",i),s.setProperty("--vscode-editorCodeLens-fontFamilyDefault",co.fontFamily)),this._editor.changeViewZones(r=>{for(const a of this._lenses)a.updateHeight(e,r)})}_localDispose(){var e,t,i;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(i=this._currentCodeLensModel)===null||i===void 0||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&lu(()=>{const n=this._codeLensCache.get(e);t===n&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3,this._localToDispose);return}for(const n of this._languageFeaturesService.codeLensProvider.all(e))if(typeof n.onDidChange=="function"){const s=n.onDidChange(()=>i.schedule());this._localToDispose.add(s)}const i=new Yt(()=>{var n;const s=Date.now();(n=this._getCodeLensModelPromise)===null||n===void 0||n.cancel(),this._getCodeLensModelPromise=_n(r=>fV(this._languageFeaturesService.codeLensProvider,e,r)),this._getCodeLensModelPromise.then(r=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=r,this._codeLensCache.put(e,r);const a=this._provideCodeLensDebounce.update(e,Date.now()-s);i.delay=a,this._renderCodeLensSymbols(r),this._resolveCodeLensesInViewportSoon()},nt)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(je(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var n;this._editor.changeDecorations(s=>{this._editor.changeViewZones(r=>{const a=[];let l=-1;this._lenses.forEach(c=>{!c.isValid()||l===c.getLineNumber()?a.push(c):(c.update(r),l=c.getLineNumber())});const d=new sk;a.forEach(c=>{c.dispose(d,r),this._lenses.splice(this._lenses.indexOf(c),1)}),d.commit(s)})}),i.schedule(),this._resolveCodeLensesScheduler.cancel(),(n=this._resolveCodeLensesPromise)===null||n===void 0||n.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{i.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{i.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(je(()=>{if(this._editor.getModel()){const n=Ra.capture(this._editor);this._editor.changeDecorations(s=>{this._editor.changeViewZones(r=>{this._disposeAllLenses(s,r)})}),n.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(n=>{if(n.target.type!==9)return;let s=n.target.element;if((s==null?void 0:s.tagName)==="SPAN"&&(s=s.parentElement),(s==null?void 0:s.tagName)==="A")for(const r of this._lenses){const a=r.getCommand(s);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),i.schedule()}_disposeAllLenses(e,t){const i=new sk;for(const n of this._lenses)n.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let n;for(const a of e.lenses){const l=a.symbol.range.startLineNumber;l<1||l>t||(n&&n[n.length-1].symbol.range.startLineNumber===l?n.push(a):(n=[a],i.push(n)))}if(!i.length&&!this._lenses.length)return;const s=Ra.capture(this._editor),r=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{const d=new sk;let c=0,u=0;for(;uthis._resolveCodeLensesInViewportSoon())),c++,u++)}for(;cthis._resolveCodeLensesInViewportSoon())),u++;d.commit(a)})}),s.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],n=[];if(this._lenses.forEach(a=>{const l=a.computeIfNecessary(t);l&&(i.push(l),n.push(a))}),i.length===0)return;const s=Date.now(),r=_n(a=>{const l=i.map((d,c)=>{const u=new Array(d.length),h=d.map((g,f)=>!g.symbol.command&&typeof g.provider.resolveCodeLens=="function"?Promise.resolve(g.provider.resolveCodeLens(t,g.symbol,a)).then(m=>{u[f]=m},en):(u[f]=g.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!a.isCancellationRequested&&!n[c].isDisposed()&&n[c].updateCommands(u)})});return Promise.all(l)});this._resolveCodeLensesPromise=r,this._resolveCodeLensesPromise.then(()=>{const a=this._resolveCodeLensesDebounce.update(t,Date.now()-s);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{nt(a),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}async getModel(){var e;return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,!((e=this._currentCodeLensModel)===null||e===void 0)&&e.isDisposed?void 0:this._currentCodeLensModel}};Jp.ID="css.editor.codeLens";Jp=Ove([i_(1,Me),i_(2,wr),i_(3,Ri),i_(4,sn),i_(5,pV)],Jp);At(Jp.ID,Jp,1);_e(class extends Te{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:T.hasCodeLensProvider,label:p("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}async run(e,t){if(!t.hasModel())return;const i=e.get(Ha),n=e.get(Ri),s=e.get(sn),r=t.getSelection().positionLineNumber,a=t.getContribution(Jp.ID);if(!a)return;const l=await a.getModel();if(!l)return;const d=[];for(const h of l.lenses)h.symbol.command&&h.symbol.range.startLineNumber===r&&d.push({label:h.symbol.command.title,command:h.symbol.command});if(d.length===0)return;const c=await i.pick(d,{canPickMany:!1,placeHolder:p("placeHolder","Select a command")});if(!c)return;let u=c.command;if(l.isDisposed){const h=await a.getModel(),g=h==null?void 0:h.lenses.find(f=>{var m;return f.symbol.range.startLineNumber===r&&((m=f.symbol.command)===null||m===void 0?void 0:m.title)===u.title});if(!g||!g.symbol.command)return;u=g.symbol.command}try{await n.executeCommand(u.id,...u.arguments||[])}catch(h){s.error(h)}}});var Fve=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ok=function(o,e){return function(t,i){e(t,i,o)}};class AR{constructor(e,t){this._editorWorkerClient=new BM(e,!1,"editorWorkerService",t)}async provideDocumentColors(e,t){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,t,i){const n=t.range,s=t.color,r=s.alpha,a=new Y(new kt(Math.round(255*s.red),Math.round(255*s.green),Math.round(255*s.blue),r)),l=r?Y.Format.CSS.formatRGB(a):Y.Format.CSS.formatRGBA(a),d=r?Y.Format.CSS.formatHSL(a):Y.Format.CSS.formatHSLA(a),c=r?Y.Format.CSS.formatHex(a):Y.Format.CSS.formatHexA(a),u=[];return u.push({label:l,textEdit:{range:n,text:l}}),u.push({label:d,textEdit:{range:n,text:d}}),u.push({label:c,textEdit:{range:n,text:c}}),u}}let fT=class extends q{constructor(e,t,i){super(),this._register(i.colorProvider.register("*",new AR(e,t)))}};fT=Fve([ok(0,Si),ok(1,si),ok(2,Me)],fT);_L(fT);async function mV(o,e,t,i=!0){return RR(new Bve,o,e,t,i)}function _V(o,e,t,i){return Promise.resolve(t.provideColorPresentations(o,e,i))}class Bve{constructor(){}async compute(e,t,i,n){const s=await e.provideDocumentColors(t,i);if(Array.isArray(s))for(const r of s)n.push({colorInfo:r,provider:e});return Array.isArray(s)}}class Wve{constructor(){}async compute(e,t,i,n){const s=await e.provideDocumentColors(t,i);if(Array.isArray(s))for(const r of s)n.push({range:r.range,color:[r.color.red,r.color.green,r.color.blue,r.color.alpha]});return Array.isArray(s)}}class Vve{constructor(e){this.colorInfo=e}async compute(e,t,i,n){const s=await e.provideColorPresentations(t,this.colorInfo,vt.None);return Array.isArray(s)&&n.push(...s),Array.isArray(s)}}async function RR(o,e,t,i,n){let s=!1,r;const a=[],l=e.ordered(t);for(let d=l.length-1;d>=0;d--){const c=l[d];if(c instanceof AR)r=c;else try{await o.compute(c,t,i,a)&&(s=!0)}catch(u){en(u)}}return s?a:r&&n?(await o.compute(r,t,i,a),a):[]}function vV(o,e){const{colorProvider:t}=o.get(Me),i=o.get(Si).getModel(e);if(!i)throw hr();const n=o.get(Dt).getValue("editor.defaultColorDecorators",{resource:e});return{model:i,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:n}}Et.registerCommand("_executeDocumentColorProvider",function(o,...e){const[t]=e;if(!(t instanceof ze))throw hr();const{model:i,colorProviderRegistry:n,isDefaultColorDecoratorsEnabled:s}=vV(o,t);return RR(new Wve,n,i,vt.None,s)});Et.registerCommand("_executeColorPresentationProvider",function(o,...e){const[t,i]=e,{uri:n,range:s}=i;if(!(n instanceof ze)||!Array.isArray(t)||t.length!==4||!k.isIRange(s))throw hr();const{model:r,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=vV(o,n),[d,c,u,h]=t;return RR(new Vve({range:s,color:{red:d,green:c,blue:u,alpha:h}}),a,r,vt.None,l)});var Hve=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rk=function(o,e){return function(t,i){e(t,i,o)}},pT;const bV=Object.create({});let wu=pT=class extends q{constructor(e,t,i,n){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new de),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new o0(this._editor),this._decoratorLimitReporter=new zve,this._colorDecorationClassRefs=this._register(new de),this._debounceInformation=n.for(i.colorProvider,"Document Colors",{min:pT.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(i.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(s=>{const r=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145);const a=r!==this._isColorDecoratorsEnabled||s.hasChanged(21),l=s.hasChanged(145);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&typeof i=="object"){const n=i.colorDecorators;if(n&&n.enable!==void 0&&!n.enable)return n.enable}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new qr,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}async beginCompute(){this._computePromise=_n(async e=>{const t=this._editor.getModel();if(!t)return[];const i=new ds(!1),n=await mV(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,i.elapsed()),n});try{const e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){nt(e)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map(i=>({range:{startLineNumber:i.colorInfo.range.startLineNumber,startColumn:i.colorInfo.range.startColumn,endLineNumber:i.colorInfo.range.endLineNumber,endColumn:i.colorInfo.range.endColumn},options:st.EMPTY}));this._editor.changeDecorations(i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((n,s)=>this._colorDatas.set(n,e[s]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(21);for(let s=0;sthis._colorDatas.has(n.id));return i.length===0?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};wu.ID="editor.contrib.colorDetector";wu.RECOMPUTE_TIME=1e3;wu=pT=Hve([rk(1,Dt),rk(2,Me),rk(3,wr)],wu);class zve{constructor(){this._onDidChange=new W,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}At(wu.ID,wu,1);class $ve{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new W,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new W,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new W,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let i=-1;for(let n=0;n{this.backgroundColor=r.getColor(xw)||Y.white})),this._register(J(this._pickedColorNode,Se.CLICK,()=>this.model.selectNextColorPresentation())),this._register(J(this._originalColorNode,Se.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=Y.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new jve(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=Y.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}class jve extends q{constructor(e){super(),this._onClicked=this._register(new W),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),le(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),le(this._button,t),le(t,Bo(".button"+Ue.asCSSSelector(Zi("color-picker-close",ve.close,p("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}}class Kve extends q{constructor(e,t,i,n=!1){super(),this.model=t,this.pixelRatio=i,this._insertButton=null,this._domNode=Bo(".colorpicker-body"),le(e,this._domNode),this._saturationBox=new qve(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new Gve(this._domNode,this.model,n),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new Zve(this._domNode,this.model,n),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),n&&(this._insertButton=this._register(new Yve(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new Y(new pl(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new Y(new pl(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=(1-e)*360;this.model.color=new Y(new pl(i===360?0:i,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class qve extends q{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new W,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new W,this.onColorFlushed=this._onColorFlushed.event,this._domNode=Bo(".saturation-wrap"),le(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",le(this._domNode,this._canvas),this.selection=Bo(".saturation-selection"),le(this._domNode,this.selection),this.layout(),this._register(J(this._domNode,Se.POINTER_DOWN,n=>this.onPointerDown(n))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new vm);const t=gn(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>this.onDidChangePosition(n.pageX-t.left,n.pageY-t.top),()=>null);const i=J(e.target.ownerDocument,Se.POINTER_UP,()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new Y(new pl(e.h,1,1,1)),i=this._canvas.getContext("2d"),n=i.createLinearGradient(0,0,this._canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const s=i.createLinearGradient(0,0,0,this._canvas.height);s.addColorStop(0,"rgba(0, 0, 0, 0)"),s.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this._canvas.width,this._canvas.height),i.fillStyle=Y.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=s,i.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class CV extends q{constructor(e,t,i=!1){super(),this.model=t,this._onDidChange=new W,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new W,this.onColorFlushed=this._onColorFlushed.event,i?(this.domNode=le(e,Bo(".standalone-strip")),this.overlay=le(this.domNode,Bo(".standalone-overlay"))):(this.domNode=le(e,Bo(".strip")),this.overlay=le(this.domNode,Bo(".overlay"))),this.slider=le(this.domNode,Bo(".slider")),this.slider.style.top="0px",this._register(J(this.domNode,Se.POINTER_DOWN,n=>this.onPointerDown(n))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._register(new vm),i=gn(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,s=>this.onDidChangeTop(s.pageY-i.top),()=>null);const n=J(e.target.ownerDocument,Se.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class Gve extends CV{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:i,b:n}=e.rgba,s=new Y(new kt(t,i,n,1)),r=new Y(new kt(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${s} 0%, ${r} 100%)`}getValue(e){return e.hsva.a}}class Zve extends CV{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class Yve extends q{constructor(e){super(),this._onClicked=this._register(new W),this.onClicked=this._onClicked.event,this._button=le(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=t=>{this._onClicked.fire()}}get button(){return this._button}}class Xve extends Gr{constructor(e,t,i,n,s=!1){super(),this.model=t,this.pixelRatio=i,this._register(yv.onDidChange(()=>this.layout()));const r=Bo(".colorpicker-widget");e.appendChild(r),this.header=this._register(new Uve(r,this.model,n,s)),this.body=this._register(new Kve(r,this.model,this.pixelRatio,s))}layout(){this.body.layout()}}var wV=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},SV=function(o,e){return function(t,i){e(t,i,o)}};class Qve{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let AS=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,i){return rn.fromPromise(this._computeAsync(e,t,i))}async _computeAsync(e,t,i){if(!this._editor.hasModel())return[];const n=wu.get(this._editor);if(!n)return[];for(const s of t){if(!n.isColorDecoration(s))continue;const r=n.getColorData(s.range.getStartPosition());if(r)return[await yV(this,this._editor.getModel(),r.colorInfo,r.provider)]}return[]}renderHoverParts(e,t){return LV(this,this._editor,this._themeService,t,e)}};AS=wV([SV(1,Sn)],AS);class Jve{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n}}let wb=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}async createColorHover(e,t,i){if(!this._editor.hasModel()||!wu.get(this._editor))return null;const s=await mV(i,this._editor.getModel(),vt.None);let r=null,a=null;for(const u of s){const h=u.colorInfo;k.containsRange(h.range,e.range)&&(r=h,a=u.provider)}const l=r??e,d=a??t,c=!!r;return{colorHover:await yV(this,this._editor.getModel(),l,d),foundInEditor:c}}async updateEditorModel(e){if(!this._editor.hasModel())return;const t=e.model;let i=new k(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(await H1(this._editor.getModel(),t,this._color,i,e),i=DV(this._editor,i,t))}renderHoverParts(e,t){return LV(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};wb=wV([SV(1,Sn)],wb);async function yV(o,e,t,i){const n=e.getValueInRange(t.range),{red:s,green:r,blue:a,alpha:l}=t.color,d=new kt(Math.round(s*255),Math.round(r*255),Math.round(a*255),l),c=new Y(d),u=await _V(e,t,i,vt.None),h=new $ve(c,[],0);return h.colorPresentations=u||[],h.guessColorPresentation(c,n),o instanceof AS?new Qve(o,k.lift(t.range),h,i):new Jve(o,k.lift(t.range),h,i)}function LV(o,e,t,i,n){if(i.length===0||!e.hasModel())return q.None;if(n.setMinimumDimensions){const h=e.getOption(66)+8;n.setMinimumDimensions(new Rt(302,h))}const s=new de,r=i[0],a=e.getModel(),l=r.model,d=s.add(new Xve(n.fragment,l,e.getOption(141),t,o instanceof wb));n.setColorPicker(d);let c=!1,u=new k(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn);if(o instanceof wb){const h=i[0].model.color;o.color=h,H1(a,l,h,u,r),s.add(l.onColorFlushed(g=>{o.color=g}))}else s.add(l.onColorFlushed(async h=>{await H1(a,l,h,u,r),c=!0,u=DV(e,u,l,n)}));return s.add(l.onDidChangeColor(h=>{H1(a,l,h,u,r)})),s.add(e.onDidChangeModelContent(h=>{c?c=!1:(n.hide(),e.focus())})),s}function DV(o,e,t,i){let n,s;if(t.presentation.textEdit){n=[t.presentation.textEdit],s=new k(t.presentation.textEdit.range.startLineNumber,t.presentation.textEdit.range.startColumn,t.presentation.textEdit.range.endLineNumber,t.presentation.textEdit.range.endColumn);const r=o.getModel()._setTrackedRange(null,s,3);o.pushUndoStop(),o.executeEdits("colorpicker",n),s=o.getModel()._getTrackedRange(r)||s}else n=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],s=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),o.pushUndoStop(),o.executeEdits("colorpicker",n);return t.presentation.additionalTextEdits&&(n=[...t.presentation.additionalTextEdits],o.executeEdits("colorpicker",n),i&&i.hide()),o.pushUndoStop(),s}async function H1(o,e,t,i,n){const s=await _V(o,{range:i,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},n.provider,vt.None);e.colorPresentations=s||[]}function mT(o,e){return!!o[e]}class ak{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=mT(e.event,t.triggerModifier),this.hasSideBySideModifier=mT(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class c3{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=mT(e,t.triggerModifier)}}class FC{constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function u3(o){return o==="altKey"?It?new FC(57,"metaKey",6,"altKey"):new FC(5,"ctrlKey",6,"altKey"):It?new FC(6,"altKey",57,"metaKey"):new FC(6,"altKey",5,"ctrlKey")}class ML extends q{constructor(e,t){var i;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new W),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new W),this.onExecute=this._onExecute.event,this._onCancel=this._register(new W),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=(i=t==null?void 0:t.extractLineNumberFromMouseEvent)!==null&&i!==void 0?i:n=>n.target.position?n.target.position.lineNumber:0,this._opts=u3(this._editor.getOption(77)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(77)){const s=u3(this._editor.getOption(77));if(this._opts.equals(s))return;this._opts=s,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new ak(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new ak(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new ak(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new c3(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new c3(n,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(n=>this._onDidChangeCursorSelection(n))),this._register(this._editor.onDidChangeModel(n=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(n=>{(n.scrollTopChanged||n.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}var ebe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nd=function(o,e){return function(t,i){e(t,i,o)}};let Su=class extends Vp{constructor(e,t,i,n,s,r,a,l,d,c,u,h,g){super(e,{...n.getRawOptions(),overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()},i,s,r,a,l,d,c,u,h,g),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration(f=>this._onParentConfigurationChanged(f)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){ry(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Su=ebe([nd(4,qe),nd(5,Ot),nd(6,Ri),nd(7,Xe),nd(8,Sn),nd(9,sn),nd(10,Zl),nd(11,si),nd(12,Me)],Su);const h3=new Y(new kt(0,122,204)),tbe={showArrow:!0,showFrame:!0,className:"",frameColor:h3,arrowColor:h3,keepEditorSelection:!1},ibe="vs.editor.contrib.zoneWidget";class nbe{constructor(e,t,i,n,s,r,a,l){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=s,this._onComputedHeight=r}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class sbe{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class AL{constructor(e){this._editor=e,this._ruleName=AL._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),VI(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){VI(this._ruleName),pw(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:k.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}AL._IdGenerator=new BA(".arrow-decoration-");class obe{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new de,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=gd(t),ry(this.options,tbe,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(i=>{const n=this._getWidth(i);this.domNode.style.width=n+"px",this.domNode.style.left=this._getLeft(i)+"px",this._onWidth(n)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new AL(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;if(this.domNode.style.height=`${e}px`,this.container){const i=e-this._decoratingElementsHeight();this.container.style.height=`${i}px`;const n=this.editor.getLayoutInfo();this._doLayout(i,this._getWidth(n))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const i=k.isIRange(e)?k.lift(e):k.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:st.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)===null||e===void 0||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(66);let t=0;if(this.options.showArrow){const i=Math.round(e/3);t+=2*i}if(this.options.showFrame){const i=Math.round(e/9);t+=2*i}return t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),s=this._getWidth(n);this.domNode.style.width=`${s}px`,this.domNode.style.left=this._getLeft(n)+"px";const r=document.createElement("div");r.style.overflow="hidden";const a=this.editor.getOption(66);if(!this.options.allowUnlimitedHeight){const h=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,h)}let l=0,d=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(d=Math.round(a/9)),this.editor.changeViewZones(h=>{this._viewZone&&h.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new nbe(r,i.lineNumber,i.column,t,g=>this._onViewZoneTop(g),g=>this._onViewZoneHeight(g),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new sbe(ibe+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const h=this.options.frameWidth?this.options.frameWidth:d;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}const c=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,s),this.options.keepEditorSelection||this.editor.setSelection(e);const u=this.editor.getModel();if(u){const h=u.validateRange(new k(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(h,h.startLineNumber===u.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new ss(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){const i=(t.currentY-e.startY)/this.editor.getOption(66),n=i<0?Math.ceil(i):Math.floor(i),s=e.heightInLines+n;s>5&&s<35&&this._relayout(s)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var xV=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},kV=function(o,e){return function(t,i){e(t,i,o)}};const IV=bt("IPeekViewService");xt(IV,class{constructor(){this._widgets=new Map}addExclusiveWidget(o,e){const t=this._widgets.get(o);t&&(t.listener.dispose(),t.widget.dispose());const i=()=>{const n=this._widgets.get(o);n&&n.widget===e&&(n.listener.dispose(),this._widgets.delete(o))};this._widgets.set(o,{widget:e,listener:e.onDidClose(i)})}},1);var Zs;(function(o){o.inPeekEditor=new De("inReferenceSearchEditor",!0,p("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),o.notInPeekEditor=o.inPeekEditor.toNegated()})(Zs||(Zs={}));let Sb=class{constructor(e,t){e instanceof Su&&Zs.inPeekEditor.bindTo(t)}dispose(){}};Sb.ID="editor.contrib.referenceController";Sb=xV([kV(1,Xe)],Sb);At(Sb.ID,Sb,0);function rbe(o){const e=o.get(Ot).getFocusedCodeEditor();return e instanceof Su?e.getParentEditor():e}const abe={headerBackgroundColor:Y.white,primaryHeadingColor:Y.fromHex("#333333"),secondaryHeadingColor:Y.fromHex("#6c6c6cb3")};let RS=class extends obe{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new W,this.onDidClose=this._onDidClose.event,ry(this.options,abe,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=pe(".head"),this._bodyElement=pe(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=pe(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),Wi(this._titleElement,"click",s=>this._onTitleClick(s))),le(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=pe("span.filename"),this._secondaryHeading=pe("span.dirname"),this._metaHeading=pe("span.meta"),le(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=pe(".peekview-actions");le(this._headElement,i);const n=this._getActionBarOptions();this._actionbarWidget=new Cr(i,n),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new Rs("peekview.close",p("label.close","Close"),Ue.asClassName(ve.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:qce.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:$n(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,oo(this._metaHeading)):xs(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const i=Math.ceil(this.editor.getOption(66)*1.2),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};RS=xV([kV(2,qe)],RS);const lbe=M("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:Y.black,hcLight:Y.white},p("peekViewTitleBackground","Background color of the peek view title area.")),EV=M("peekViewTitleLabel.foreground",{dark:Y.white,light:Y.black,hcDark:Y.white,hcLight:Fr},p("peekViewTitleForeground","Color of the peek view title.")),NV=M("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},p("peekViewTitleInfoForeground","Color of the peek view title info.")),dbe=M("peekView.border",{dark:Ks,light:Ks,hcDark:Lt,hcLight:Lt},p("peekViewBorder","Color of the peek view borders and arrow.")),cbe=M("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:Y.black,hcLight:Y.white},p("peekViewResultsBackground","Background color of the peek view result list."));M("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:Y.white,hcLight:Fr},p("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));M("peekViewResult.fileForeground",{dark:Y.white,light:"#1E1E1E",hcDark:Y.white,hcLight:Fr},p("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));M("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},p("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));M("peekViewResult.selectionForeground",{dark:Y.white,light:"#6C6C6C",hcDark:Y.white,hcLight:Fr},p("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const Pc=M("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:Y.black,hcLight:Y.white},p("peekViewEditorBackground","Background color of the peek view editor."));M("peekViewEditorGutter.background",{dark:Pc,light:Pc,hcDark:Pc,hcLight:Pc},p("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));M("peekViewEditorStickyScroll.background",{dark:Pc,light:Pc,hcDark:Pc,hcLight:Pc},p("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));M("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},p("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));M("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},p("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));M("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:fi,hcLight:fi},p("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));class yu{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=ZE.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?p({},"{0} in {1} on line {2} at column {3}",t.value,br(this.uri),this.range.startLineNumber,this.range.startColumn):p("aria.oneReference","in {0} on line {1} at column {2}",br(this.uri),this.range.startLineNumber,this.range.startColumn)}}class ube{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:s,endLineNumber:r,endColumn:a}=e,l=i.getWordUntilPosition({lineNumber:n,column:s-t}),d=new k(n,l.startColumn,n,s),c=new k(r,a,r,1073741824),u=i.getValueInRange(d).replace(/^\s+/,""),h=i.getValueInRange(e),g=i.getValueInRange(c).replace(/\s+$/,"");return{value:u+h+g,highlight:{start:u.length,end:u.length+h.length}}}}class yb{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new Gi}dispose(){jt(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?p("aria.fileReferences.1","1 symbol in {0}, full path {1}",br(this.uri),this.uri.fsPath):p("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,br(this.uri),this.uri.fsPath)}async resolve(e){if(this._previews.size!==0)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const i=await e.createModelReference(t.uri);this._previews.set(t.uri,new ube(i))}catch(i){nt(i)}return this}}class go{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new W,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;e.sort(go._compareReferences);let n;for(const s of e)if((!n||!pi.isEqual(n.uri,s.uri,!0))&&(n=new yb(this,s.uri),this.groups.push(n)),n.children.length===0||go._compareReferences(s,n.children[n.children.length-1])!==0){const r=new yu(i===s,n,s,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(r),n.children.push(r)}}dispose(){jt(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new go(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?p("aria.result.0","No results found"):this.references.length===1?p("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?p("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):p("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let n=i.children.indexOf(e);const s=i.children.length,r=i.parent.groups.length;return r===1||t&&n+10?(t?n=(n+1)%s:n=(n+s-1)%s,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%r,i.parent.groups[n].children[0]):(n=(n+r-1)%r,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map((n,s)=>({idx:s,prefixLen:Qh(n.uri.toString(),e.toString()),offsetDist:Math.abs(n.range.startLineNumber-t.lineNumber)*100+Math.abs(n.range.startColumn-t.column)})).sort((n,s)=>n.prefixLen>s.prefixLen?-1:n.prefixLens.offsetDist?1:0)[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&k.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return pi.compare(e.uri,t.uri)||k.compareRangesUsingStarts(e.range,t.range)}}var RL=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},PL=function(o,e){return function(t,i){e(t,i,o)}},_T;let vT=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof go||e instanceof yb}getChildren(e){if(e instanceof go)return e.groups;if(e instanceof yb)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};vT=RL([PL(0,Xs)],vT);class hbe{getHeight(){return 23}getTemplateId(e){return e instanceof yb?Lb.id:M0.id}}let bT=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof yu){const i=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(i)return i.value}return br(e.uri)}};bT=RL([PL(0,Xt)],bT);class gbe{getId(e){return e instanceof yu?e.id:e.uri}}let CT=class extends q{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new _S(i,{supportHighlights:!0})),this.badge=new vN(le(i,pe(".count")),{},y6),e.appendChild(i)}set(e,t){const i=qy(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat(p("referencesCount","{0} references",n)):this.badge.setTitleFormat(p("referenceCount","{0} reference",n))}};CT=RL([PL(1,Hp)],CT);let Lb=_T=class{constructor(e){this._instantiationService=e,this.templateId=_T.id}renderTemplate(e){return this._instantiationService.createInstance(CT,e)}renderElement(e,t,i){i.set(e.element,p0(e.filterData))}disposeTemplate(e){e.dispose()}};Lb.id="FileReferencesRenderer";Lb=_T=RL([PL(0,qe)],Lb);class fbe{constructor(e){this.label=new Gc(e)}set(e,t){var i;const n=(i=e.parent.getPreview(e))===null||i===void 0?void 0:i.preview(e.range);if(!n||!n.value)this.label.set(`${br(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:s,highlight:r}=n;t&&!ka.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(s,p0(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(s,[r]))}}}class M0{constructor(){this.templateId=M0.id}renderTemplate(e){return new fbe(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}M0.id="OneReferenceRenderer";class pbe{getWidgetAriaLabel(){return p("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var mbe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sd=function(o,e){return function(t,i){e(t,i,o)}};class OL{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new de,this._callOnModelChange=new de,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e){for(const t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],i=[];for(let n=0,s=e.children.length;n{const s=n.deltaDecorations([],t);for(let r=0;r{s.equals(9)&&(this._keybindingService.dispatchEvent(s,s.target),s.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(vbe,"ReferencesWidget",this._treeContainer,new hbe,[this._instantiationService.createInstance(Lb),this._instantiationService.createInstance(M0)],this._instantiationService.createInstance(vT),i),this._splitView.addView({onDidChange:ye.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:s=>{this._preview.layout({height:this._dim.height,width:s})}},cS.Distribute),this._splitView.addView({onDidChange:ye.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:s=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${s}px`,this._tree.layout(this._dim.height,s)}},cS.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const n=(s,r)=>{s instanceof yu&&(r==="show"&&this._revealReference(s,!1),this._onDidSelectReference.fire({element:s,kind:r,source:"tree"}))};this._tree.onDidOpen(s=>{s.sideBySide?n(s.element,"side"):s.editorOptions.pinned?n(s.element,"goto"):n(s.element,"show")}),xs(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Rt(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=p("noResults","No results"),oo(this._messageContainer),Promise.resolve(void 0)):(xs(this._messageContainer),this._decorationsManager=new OL(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:t,target:i}=e;if(t.detail!==2)return;const n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),oo(this._treeContainer),oo(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof yu)return e;if(e instanceof yb&&e.children.length>0)return e.children[0]}async revealReference(e){await this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}async _revealReference(e,t){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==ot.inMemory?this.setTitle(Ooe(e.uri),this._uriLabel.getUriLabel(qy(e.uri))):this.setTitle(p("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),await this._tree.expand(e.parent),this._tree.reveal(e));const n=await i;if(!this._model){n.dispose();return}jt(this._previewModelReference);const s=n.object;if(s){const r=this._preview.getModel()===s.textEditorModel?0:1,a=k.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(s.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,r)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()}};wT=mbe([sd(3,Sn),sd(4,Xs),sd(5,qe),sd(6,IV),sd(7,Hp),sd(8,Gy),sd(9,Xt),sd(10,bi),sd(11,si)],wT);var bbe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},of=function(o,e){return function(t,i){e(t,i,o)}},z1;const $g=new De("referenceSearchVisible",!1,p("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Lu=z1=class{static get(e){return e.getContribution(z1.ID)}constructor(e,t,i,n,s,r,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=s,this._instantiationService=r,this._storageService=a,this._configurationService=l,this._disposables=new de,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=$g.bindTo(i)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),n&&e.containsPosition(n))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const s="peekViewLayout",r=_be.fromJSON(this._storageService.get(s,0,"{}"));this._widget=this._instantiationService.createInstance(wT,this._editor,this._defaultTreeKeyboardSupport,r),this._widget.setTitle(p("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(s,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(l=>{const{element:d,kind:c}=l;if(d)switch(c){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(d,!1,!1);break;case"side":this.openReference(d,!0,!1);break;case"goto":i?this._gotoReference(d,!0):this.openReference(d,!1,!0);break}}));const a=++this._requestIdPool;t.then(l=>{var d;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(d=this._model)===null||d===void 0||d.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(p("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const c=this._editor.getModel().uri,u=new z(e.startLineNumber,e.startColumn),h=this._model.nearestReference(c,u);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(86)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(e){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),s=this._editor.hasTextFocus(),r=this._widget.isPreviewEditorFocused();await this._widget.setSelection(n),await this._gotoReference(n,!1),s?this._editor.focus():this._widget&&r&&this._widget.focusOnPreviewEditor()}async revealReference(e){!this._editor.hasModel()||!this._model||!this._widget||await this._widget.revealReference(e)}closeWidget(e=!0){var t,i;(t=this._widget)===null||t===void 0||t.dispose(),(i=this._model)===null||i===void 0||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var i;(i=this._widget)===null||i===void 0||i.hide(),this._ignoreModelChangeEvent=!0;const n=k.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:n,selectionSource:"code.jump",pinned:t}},this._editor).then(s=>{var r;if(this._ignoreModelChangeEvent=!1,!s||!this._widget){this.closeWidget();return}if(this._editor===s)this._widget.show(n),this._widget.focusOnReferenceTree();else{const a=z1.get(s),l=this._model.clone();this.closeWidget(),s.focus(),a==null||a.toggleWidget(n,_n(d=>Promise.resolve(l)),(r=this._peekMode)!==null&&r!==void 0?r:!1)}},s=>{this._ignoreModelChangeEvent=!1,nt(s)})}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:s}=e;this._editorService.openCodeEditor({resource:n,options:{selection:s,selectionSource:"code.jump",pinned:i}},this._editor,t)}};Lu.ID="editor.contrib.referencesController";Lu=z1=bbe([of(2,Xe),of(3,Ot),of(4,sn),of(5,qe),of(6,Xr),of(7,Dt)],Lu);function Ug(o,e){const t=rbe(o);if(!t)return;const i=Lu.get(t);i&&e(i)}Gs.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:fn(2089,60),when:ae.or($g,Zs.inPeekEditor),handler(o){Ug(o,e=>{e.changeFocusBetweenPreviewAndReferences()})}});Gs.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:ae.or($g,Zs.inPeekEditor),handler(o){Ug(o,e=>{e.goToNextOrPreviousReference(!0)})}});Gs.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:ae.or($g,Zs.inPeekEditor),handler(o){Ug(o,e=>{e.goToNextOrPreviousReference(!1)})}});Et.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");Et.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");Et.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");Et.registerCommand("closeReferenceSearch",o=>Ug(o,e=>e.closeWidget()));Gs.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:ae.and(Zs.inPeekEditor,ae.not("config.editor.stablePeek"))});Gs.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:ae.and($g,ae.not("config.editor.stablePeek"))});Gs.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:ae.and($g,z6,tR.negate(),iR.negate()),handler(o){var e;const i=(e=o.get(Lr).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof yu&&Ug(o,n=>n.revealReference(i[0]))}});Gs.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:ae.and($g,z6,tR.negate(),iR.negate()),handler(o){var e;const i=(e=o.get(Lr).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof yu&&Ug(o,n=>n.openReference(i[0],!0,!0))}});Et.registerCommand("openReference",o=>{var e;const i=(e=o.get(Lr).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof yu&&Ug(o,n=>n.openReference(i[0],!1,!0))});var TV=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},E_=function(o,e){return function(t,i){e(t,i,o)}};const PR=new De("hasSymbols",!1,p("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),FL=bt("ISymbolNavigationService");let ST=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=PR.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new yT(this._editorService),n=i.onDidChange(s=>{if(this._ignoreEditorChange)return;const r=this._editorService.getActiveCodeEditor();if(!r)return;const a=r.getModel(),l=r.getPosition();if(!a||!l)return;let d=!1,c=!1;for(const u of t.references)if(dA(u.uri,a.uri))d=!0,c=c||k.containsPosition(u.range,l);else if(d)break;(!d||!c)&&this.reset()});this._currentState=Hr(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:k.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?p("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):p("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};ST=TV([E_(0,Xe),E_(1,Ot),E_(2,sn),E_(3,Xt)],ST);xt(FL,ST,1);we(new class extends Rn{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:PR,kbOpts:{weight:100,primary:70}})}runEditorCommand(o,e){return o.get(FL).revealNext(e)}});Gs.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:PR,primary:9,handler(o){o.get(FL).reset()}});let yT=class{constructor(e){this._listener=new Map,this._disposables=new de,this._onDidChange=new W,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),jt(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,Hr(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};yT=TV([E_(0,Ot)],yT);async function A0(o,e,t,i){const s=t.ordered(o).map(a=>Promise.resolve(i(a,o,e)).then(void 0,l=>{en(l)})),r=await Promise.all(s);return Ia(r.flat())}function BL(o,e,t,i){return A0(e,t,o,(n,s,r)=>n.provideDefinition(s,r,i))}function MV(o,e,t,i){return A0(e,t,o,(n,s,r)=>n.provideDeclaration(s,r,i))}function AV(o,e,t,i){return A0(e,t,o,(n,s,r)=>n.provideImplementation(s,r,i))}function RV(o,e,t,i){return A0(e,t,o,(n,s,r)=>n.provideTypeDefinition(s,r,i))}function WL(o,e,t,i,n){return A0(e,t,o,async(s,r,a)=>{const l=await s.provideReferences(r,a,{includeDeclaration:!0},n);if(!i||!l||l.length!==2)return l;const d=await s.provideReferences(r,a,{includeDeclaration:!1},n);return d&&d.length===1?d:l})}async function R0(o){const e=await o(),t=new go(e,""),i=t.references.map(n=>n.link);return t.dispose(),i}ql("_executeDefinitionProvider",(o,e,t)=>{const i=o.get(Me),n=BL(i.definitionProvider,e,t,vt.None);return R0(()=>n)});ql("_executeTypeDefinitionProvider",(o,e,t)=>{const i=o.get(Me),n=RV(i.typeDefinitionProvider,e,t,vt.None);return R0(()=>n)});ql("_executeDeclarationProvider",(o,e,t)=>{const i=o.get(Me),n=MV(i.declarationProvider,e,t,vt.None);return R0(()=>n)});ql("_executeReferenceProvider",(o,e,t)=>{const i=o.get(Me),n=WL(i.referenceProvider,e,t,!1,vt.None);return R0(()=>n)});ql("_executeImplementationProvider",(o,e,t)=>{const i=o.get(Me),n=AV(i.implementationProvider,e,t,vt.None);return R0(()=>n)});var n_,s_,o_,BC,WC,VC,HC,zC;zn.appendMenuItem(N.EditorContext,{submenu:N.EditorContextPeek,title:p("peek.submenu","Peek"),group:"navigation",order:100});class em{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof em||z.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}}class bs extends Wa{static all(){return bs._allSymbolNavigationCommands.values()}static _patchConfig(e){const t={...e,f1:!0};if(t.menu)for(const i of wt.wrap(t.menu))(i.id===N.EditorContext||i.id===N.EditorContextPeek)&&(i.when=ae.and(e.precondition,i.when));return t}constructor(e,t){super(bs._patchConfig(t)),this.configuration=e,bs._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,n){if(!t.hasModel())return Promise.resolve(void 0);const s=e.get(sn),r=e.get(Ot),a=e.get(Bu),l=e.get(FL),d=e.get(Me),c=e.get(qe),u=t.getModel(),h=t.getPosition(),g=em.is(i)?i:new em(u,h),f=new bu(t,5),m=Cy(this._getLocationModel(d,g.model,g.position,f.token),f.token).then(async v=>{var _;if(!v||f.token.isCancellationRequested)return;mo(v.ariaMessage);let b;if(v.referenceAt(u.uri,h)){const w=this._getAlternativeCommand(t);!bs._activeAlternativeCommands.has(w)&&bs._allSymbolNavigationCommands.has(w)&&(b=bs._allSymbolNavigationCommands.get(w))}const C=v.references.length;if(C===0){if(!this.configuration.muteMessage){const w=u.getWordAtPosition(h);(_=ho.get(t))===null||_===void 0||_.showMessage(this._getNoResultFoundMessage(w),h)}}else if(C===1&&b)bs._activeAlternativeCommands.add(this.desc.id),c.invokeFunction(w=>b.runEditorCommand(w,t,i,n).finally(()=>{bs._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(r,l,t,v,n)},v=>{s.error(v)}).finally(()=>{f.dispose()});return a.showWhile(m,250),m}async _onResult(e,t,i,n,s){const r=this._getGoToPreference(i);if(!(i instanceof Su)&&(this.configuration.openInPeek||r==="peek"&&n.references.length>1))this._openInPeek(i,n,s);else{const a=n.firstReference(),l=n.references.length>1&&r==="gotoAndPeek",d=await this._openReference(i,e,a,this.configuration.openToSide,!l);l&&d?this._openInPeek(d,n,s):n.dispose(),r==="goto"&&t.put(a)}}async _openReference(e,t,i,n,s){let r;if(XZ(i)&&(r=i.targetSelectionRange),r||(r=i.range),!r)return;const a=await t.openCodeEditor({resource:i.uri,options:{selection:k.collapseToStart(r),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(a){if(s){const l=a.getModel(),d=a.createDecorationsCollection([{range:r,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&d.clear()},350)}return a}}_openInPeek(e,t,i){const n=Lu.get(e);n&&e.hasModel()?n.toggleWidget(i??e.getSelection(),_n(s=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}bs._allSymbolNavigationCommands=new Map;bs._activeAlternativeCommands=new Set;class P0 extends bs{async _getLocationModel(e,t,i,n){return new go(await BL(e.definitionProvider,t,i,n),p("def.title","Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?p("noResultWord","No definition found for '{0}'",e.word):p("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}mi((n_=class extends P0{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:n_.id,title:{value:p("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:p({},"Go to &&Definition")},precondition:ae.and(T.hasDefinitionProvider,T.isInWalkThroughSnippet.toNegated()),keybinding:[{when:T.editorTextFocus,primary:70,weight:100},{when:ae.and(T.editorTextFocus,W6),primary:2118,weight:100}],menu:[{id:N.EditorContext,group:"navigation",order:1.1},{id:N.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),Et.registerCommandAlias("editor.action.goToDeclaration",n_.id)}},n_.id="editor.action.revealDefinition",n_));mi((s_=class extends P0{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:s_.id,title:{value:p("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:ae.and(T.hasDefinitionProvider,T.isInWalkThroughSnippet.toNegated()),keybinding:[{when:T.editorTextFocus,primary:fn(2089,70),weight:100},{when:ae.and(T.editorTextFocus,W6),primary:fn(2089,2118),weight:100}]}),Et.registerCommandAlias("editor.action.openDeclarationToTheSide",s_.id)}},s_.id="editor.action.revealDefinitionAside",s_));mi((o_=class extends P0{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:o_.id,title:{value:p("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:ae.and(T.hasDefinitionProvider,Zs.notInPeekEditor,T.isInWalkThroughSnippet.toNegated()),keybinding:{when:T.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:N.EditorContextPeek,group:"peek",order:2}}),Et.registerCommandAlias("editor.action.previewDeclaration",o_.id)}},o_.id="editor.action.peekDefinition",o_));class PV extends bs{async _getLocationModel(e,t,i,n){return new go(await MV(e.declarationProvider,t,i,n),p("decl.title","Declarations"))}_getNoResultFoundMessage(e){return e&&e.word?p("decl.noResultWord","No declaration found for '{0}'",e.word):p("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}mi((BC=class extends PV{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:BC.id,title:{value:p("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:p({},"Go to &&Declaration")},precondition:ae.and(T.hasDeclarationProvider,T.isInWalkThroughSnippet.toNegated()),menu:[{id:N.EditorContext,group:"navigation",order:1.3},{id:N.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?p("decl.noResultWord","No declaration found for '{0}'",e.word):p("decl.generic.noResults","No declaration found")}},BC.id="editor.action.revealDeclaration",BC));mi(class extends PV{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:p("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:ae.and(T.hasDeclarationProvider,Zs.notInPeekEditor,T.isInWalkThroughSnippet.toNegated()),menu:{id:N.EditorContextPeek,group:"peek",order:3}})}});class OV extends bs{async _getLocationModel(e,t,i,n){return new go(await RV(e.typeDefinitionProvider,t,i,n),p("typedef.title","Type Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?p("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):p("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}mi((WC=class extends OV{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:WC.ID,title:{value:p("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:p({},"Go to &&Type Definition")},precondition:ae.and(T.hasTypeDefinitionProvider,T.isInWalkThroughSnippet.toNegated()),keybinding:{when:T.editorTextFocus,primary:0,weight:100},menu:[{id:N.EditorContext,group:"navigation",order:1.4},{id:N.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},WC.ID="editor.action.goToTypeDefinition",WC));mi((VC=class extends OV{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:VC.ID,title:{value:p("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:ae.and(T.hasTypeDefinitionProvider,Zs.notInPeekEditor,T.isInWalkThroughSnippet.toNegated()),menu:{id:N.EditorContextPeek,group:"peek",order:4}})}},VC.ID="editor.action.peekTypeDefinition",VC));class FV extends bs{async _getLocationModel(e,t,i,n){return new go(await AV(e.implementationProvider,t,i,n),p("impl.title","Implementations"))}_getNoResultFoundMessage(e){return e&&e.word?p("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):p("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}mi((HC=class extends FV{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:HC.ID,title:{value:p("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:p({},"Go to &&Implementations")},precondition:ae.and(T.hasImplementationProvider,T.isInWalkThroughSnippet.toNegated()),keybinding:{when:T.editorTextFocus,primary:2118,weight:100},menu:[{id:N.EditorContext,group:"navigation",order:1.45},{id:N.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},HC.ID="editor.action.goToImplementation",HC));mi((zC=class extends FV{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:zC.ID,title:{value:p("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:ae.and(T.hasImplementationProvider,Zs.notInPeekEditor,T.isInWalkThroughSnippet.toNegated()),keybinding:{when:T.editorTextFocus,primary:3142,weight:100},menu:{id:N.EditorContextPeek,group:"peek",order:5}})}},zC.ID="editor.action.peekImplementation",zC));class BV extends bs{_getNoResultFoundMessage(e){return e?p("references.no","No references found for '{0}'",e.word):p("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}mi(class extends BV{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:p("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:p({},"Go to &&References")},precondition:ae.and(T.hasReferenceProvider,Zs.notInPeekEditor,T.isInWalkThroughSnippet.toNegated()),keybinding:{when:T.editorTextFocus,primary:1094,weight:100},menu:[{id:N.EditorContext,group:"navigation",order:1.45},{id:N.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(e,t,i,n){return new go(await WL(e.referenceProvider,t,i,!0,n),p("ref.title","References"))}});mi(class extends BV{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:p("references.action.label","Peek References"),original:"Peek References"},precondition:ae.and(T.hasReferenceProvider,Zs.notInPeekEditor,T.isInWalkThroughSnippet.toNegated()),menu:{id:N.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,t,i,n){return new go(await WL(e.referenceProvider,t,i,!1,n),p("ref.title","References"))}});class Cbe extends bs{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:{value:p("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:ae.and(Zs.notInPeekEditor,T.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}async _getLocationModel(e,t,i,n){return new go(this._references,p("generic.title","Locations"))}_getNoResultFoundMessage(e){return e&&p("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}Et.registerCommand({id:"editor.action.goToLocations",metadata:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:ze},{name:"position",description:"The position at which to start",constraint:z.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:async(o,e,t,i,n,s,r)=>{qt(ze.isUri(e)),qt(z.isIPosition(t)),qt(Array.isArray(i)),qt(typeof n>"u"||typeof n=="string"),qt(typeof r>"u"||typeof r=="boolean");const a=o.get(Ot),l=await a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if($l(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(d=>{const c=new class extends Cbe{_getNoResultFoundMessage(u){return s||super._getNoResultFoundMessage(u)}}({muteMessage:!s,openInPeek:!!r,openToSide:!1},i,n);d.get(qe).invokeFunction(c.run.bind(c),l)})}});Et.registerCommand({id:"editor.action.peekLocations",metadata:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:ze},{name:"position",description:"The position at which to start",constraint:z.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:async(o,e,t,i,n)=>{o.get(Ri).executeCommand("editor.action.goToLocations",e,t,i,n,void 0,!0)}});Et.registerCommand({id:"editor.action.findReferences",handler:(o,e,t)=>{qt(ze.isUri(e)),qt(z.isIPosition(t));const i=o.get(Me),n=o.get(Ot);return n.openCodeEditor({resource:e},n.getFocusedCodeEditor()).then(s=>{if(!$l(s)||!s.hasModel())return;const r=Lu.get(s);if(!r)return;const a=_n(d=>WL(i.referenceProvider,s.getModel(),z.lift(t),!1,d).then(c=>new go(c,p("ref.title","References")))),l=new k(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(r.toggleWidget(l,a,!1))})}});Et.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var wbe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lk=function(o,e){return function(t,i){e(t,i,o)}},N_;let bg=N_=class{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new de,this.toUnhookForKeyboard=new de,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const s=new ML(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown(([r,a])=>{this.startFindDefinitionFromMouse(r,a??void 0)})),this.toUnhook.add(s.onExecute(r=>{this.isEnabled(r)&&this.gotoDefinition(r.target.position,r.hasSideBySideModifier).catch(a=>{nt(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(s.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(N_.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const i=e.target.position;this.startFindDefinition(i)}async startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const i=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!i){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return;this.currentWordAtPosition=i;const n=new xW(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=_n(a=>this.findDefinition(e,a));let s;try{s=await this.previousPromise}catch(a){nt(a);return}if(!s||!s.length||!n.validate(this.editor)){this.removeLinkDecorations();return}const r=s[0].originSelectionRange?k.lift(s[0].originSelectionRange):new k(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);if(s.length>1){let a=r;for(const{originSelectionRange:l}of s)l&&(a=k.plusRange(a,l));this.addDecoration(a,new as().appendText(p("multipleResults","Click to show {0} definitions.",s.length)))}else{const a=s[0];if(!a.uri)return;this.textModelResolverService.createModelReference(a.uri).then(l=>{if(!l.object||!l.object.textEditorModel){l.dispose();return}const{object:{textEditorModel:d}}=l,{startLineNumber:c}=a.range;if(c<1||c>d.getLineCount()){l.dispose();return}const u=this.getPreviewValue(d,c,a),h=this.languageService.guessLanguageIdByFilepathOrFirstLine(d.uri);this.addDecoration(r,u?new as().appendCodeblock(h||"",u):void 0),l.dispose()})}}getPreviewValue(e,t,i){let n=i.range;return n.endLineNumber-n.startLineNumber>=N_.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let s=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a{const n=!t&&this.editor.getOption(87)&&!this.isInPeekEditor(i);return new P0({openToSide:t,openInPeek:n,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(i)})}isInPeekEditor(e){const t=e.get(Xe);return Zs.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};bg.ID="editor.contrib.gotodefinitionatposition";bg.MAX_SOURCE_PREVIEW_LINES=8;bg=N_=wbe([lk(1,Xs),lk(2,bi),lk(3,Me)],bg);At(bg.ID,bg,2);const $C=pe;class WV extends q{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new a0(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class OR extends q{static render(e,t,i){return new OR(e,t,i)}constructor(e,t,i){super(),this.actionContainer=le(e,$C("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=le(this.actionContainer,$C("a.action")),this.action.setAttribute("role","button"),t.iconClass&&le(this.action,$C(`span.icon.${t.iconClass}`));const n=le(this.action,$C("span"));n.textContent=i?`${t.label} (${i})`:t.label,this._register(J(this.actionContainer,Se.CLICK,s=>{s.stopPropagation(),s.preventDefault(),t.run(this.actionContainer)})),this._register(J(this.actionContainer,Se.KEY_DOWN,s=>{const r=new gi(s);(r.equals(3)||r.equals(10))&&(s.stopPropagation(),s.preventDefault(),t.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}function Sbe(o,e){return o&&e?p("acessibleViewHint","Inspect this in the accessible view with {0}.",e):o?p("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}let ybe=class{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}};class VV extends q{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new W),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Yt(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Yt(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Yt(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=lX(e=>this._computer.computeAsync(e)),(async()=>{try{for await(const e of this._asyncIterable)e&&(this._result.push(e),this._fireResult());this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(e){nt(e)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const e=this._state===0,t=this._state===4;this._onResult.fire(new ybe(this._result.slice(0),e,t))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class dk{constructor(e,t,i,n){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=n,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class $1{constructor(e,t,i,n,s,r){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=n,this.initialMousePosY=s,this.supportsMarkerHover=r,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}const jg=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class FR{constructor(){this._onDidWillResize=new W,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new W,this.onDidResize=this._onDidResize.event,this._sashListener=new de,this._size=new Rt(0,0),this._minSize=new Rt(0,0),this._maxSize=new Rt(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new ss(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new ss(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new ss(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:lS.North}),this._southSash=new ss(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:lS.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,i=0;this._sashListener.add(ye.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)})),this._sashListener.add(ye.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(ye.any(this._eastSash.onDidReset,this._westSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(ye.any(this._northSash.onDidReset,this._southSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:n}=this._minSize,{height:s,width:r}=this._maxSize;e=Math.max(i,Math.min(s,e)),t=Math.max(n,Math.min(r,t));const a=new Rt(t,e);Rt.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}const Lbe=30,Dbe=24;class xbe extends q{constructor(e,t=new Rt(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new FR),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=Rt.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(i=>{this._resize(new Rt(i.dimension.width,i.dimension.height)),i.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return!((e=this._contentPosition)===null||e===void 0)&&e.position?z.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);return!t||!i?void 0:gn(t).top+i.top-Lbe}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;const n=gn(t),s=ng(t.ownerDocument.body),r=n.top+i.top+i.height;return s.height-r-Dbe}_findPositionPreference(e,t){var i,n;const s=Math.min((i=this._availableVerticalSpaceBelow(t))!==null&&i!==void 0?i:1/0,e),r=Math.min((n=this._availableVerticalSpaceAbove(t))!==null&&n!==void 0?n:1/0,e),a=Math.min(Math.max(r,s),e),l=Math.min(e,a);let d;return this._editor.getOption(60).above?d=l<=r?1:2:d=l<=s?2:1,d===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),d}_resize(e){this._resizableNode.layout(e.height,e.width)}}var BR=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Oh=function(o,e){return function(t,i){e(t,i,o)}},U1,Xa;const g3=pe;let PS=U1=class extends q{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(Xc,this._editor)),this._participants=[];for(const n of jg.getAll())this._participants.push(this._instantiationService.createInstance(n,this._editor));this._participants.sort((n,s)=>n.hoverOrdinal-s.hoverOrdinal),this._computer=new FS(this._editor,this._participants),this._hoverOperation=this._register(new VV(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{if(!this._computer.anchor)return;const s=n.hasLoadingMessage?this._addLoadingMessage(n.value):n.value;this._withResult(new HV(this._computer.anchor,s,n.isComplete))})),this._register(Wi(this._widget.getDomNode(),"keydown",n=>{n.equals(9)&&this.hide()})),this._register(Ei.onDidChange(()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}get widget(){return this._widget}maybeShowAt(e){if(this._widget.isResizing)return!0;const t=[];for(const n of this._participants)if(n.suggestHoverAnchor){const s=n.suggestHoverAnchor(e);s&&t.push(s)}const i=e.target;if(i.type===6&&t.push(new dk(0,i.range,e.event.posx,e.event.posy)),i.type===7){const n=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&typeof i.detail.horizontalDistanceToText=="number"&&i.detail.horizontalDistanceToTexts.priority-n.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,i,n){this._startShowingOrUpdateHover(new dk(0,e,void 0,void 0),t,i,n,null)}_startShowingOrUpdateHover(e,t,i,n,s){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):!1:this._editor.getOption(60).sticky&&s&&this._widget.isMouseGettingCloser(s.event.posx,s.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,i,n,!0),!0):e?e&&this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,i,n,s){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=n,this._computer.source=i,this._computer.insistOnKeepingHoverVisible=s,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&e.messages.length===0&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}containsNode(e){return e?this._widget.getDomNode().contains(e):!1}_addLoadingMessage(e){if(this._computer.anchor){for(const t of this._participants)if(t.createLoadingMessage){const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}}return e}_withResult(e){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!e.isComplete||this._computer.insistOnKeepingHoverVisible&&e.messages.length===0)||this._setCurrentResult(e)}_renderMessages(e,t){const{showAtPosition:i,showAtSecondaryPosition:n,highlightRange:s}=U1.computeHoverRanges(this._editor,e.range,t),r=new de,a=r.add(new OS(this._keybindingService)),l=document.createDocumentFragment();let d=null;const c={fragment:l,statusBar:a,setColorPicker:h=>d=h,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:h=>this._widget.setMinimumDimensions(h),hide:()=>this.hide()};for(const h of this._participants){const g=t.filter(f=>f.owner===h);g.length>0&&r.add(h.renderHoverParts(c,g))}const u=t.some(h=>h.isBeforeContent);if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(s){const h=this._editor.createDecorationsCollection();h.set([{range:s,options:U1._DECORATION_OPTIONS}]),r.add(je(()=>{h.clear()}))}this._widget.showAt(l,new Ibe(d,i,n,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,u,e.initialMousePosX,e.initialMousePosY,r))}else r.dispose()}static computeHoverRanges(e,t,i){let n=1;if(e.hasModel()){const d=e._getViewModel(),c=d.coordinatesConverter,u=c.convertModelRangeToViewRange(t),h=new z(u.startLineNumber,d.getLineMinColumn(u.startLineNumber));n=c.convertViewPositionToModelPosition(h).column}const s=t.startLineNumber;let r=t.startColumn,a=i[0].range,l=null;for(const d of i)a=k.plusRange(a,d.range),d.range.startLineNumber===s&&d.range.endLineNumber===s&&(r=Math.max(Math.min(r,d.range.startColumn),n)),d.forceShowAtRange&&(l=d.range);return{showAtPosition:l?l.getStartPosition():new z(s,t.startColumn),showAtSecondaryPosition:l?l.getStartPosition():new z(s,r),highlightRange:a}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}};PS._DECORATION_OPTIONS=st.register({description:"content-hover-highlight",className:"hoverHighlight"});PS=U1=BR([Oh(1,qe),Oh(2,Xt)],PS);class HV{constructor(e,t,i){this.anchor=e,this.messages=t,this.isComplete=i}filter(e){const t=this.messages.filter(i=>i.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new kbe(this,this.anchor,t,this.isComplete)}}class kbe extends HV{constructor(e,t,i,n){super(t,i,n),this.original=e}filter(e){return this.original.filter(e)}}class Ibe{constructor(e,t,i,n,s,r,a,l,d,c){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=i,this.preferAbove=n,this.stoleFocus=s,this.source=r,this.isBeforeContent=a,this.initialMousePosX=l,this.initialMousePosY=d,this.disposables=c,this.closestMouseDistance=void 0}}const f3=30,ck=10,Ebe=6;let Xc=Xa=class extends xbe{get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}get isVisibleFromKeyboard(){var e;return((e=this._visibleData)===null||e===void 0?void 0:e.source)===1}get isVisible(){var e;return(e=this._hoverVisibleKey.get())!==null&&e!==void 0?e:!1}get isFocused(){var e;return(e=this._hoverFocusedKey.get())!==null&&e!==void 0?e:!1}constructor(e,t,i,n,s){const r=e.getOption(66)+8,a=150,l=new Rt(a,r);super(e,l),this._configurationService=i,this._accessibilityService=n,this._keybindingService=s,this._hover=this._register(new WV),this._minimumSize=l,this._hoverVisibleKey=T.hoverVisible.bindTo(t),this._hoverFocusedKey=T.hoverFocused.bindTo(t),le(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>{this.isVisible&&this._updateMaxDimensions()})),this._register(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(50)&&this._updateFont()}));const d=this._register(Pl(this._resizableNode.domNode));this._register(d.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(d.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),(e=this._visibleData)===null||e===void 0||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return Xa.ID}static _applyDimensions(e,t,i){const n=typeof t=="number"?`${t}px`:t,s=typeof i=="number"?`${i}px`:i;e.style.width=n,e.style.height=s}_setContentsDomNodeDimensions(e,t){const i=this._hover.contentsDomNode;return Xa._applyDimensions(i,e,t)}_setContainerDomNodeDimensions(e,t){const i=this._hover.containerDomNode;return Xa._applyDimensions(i,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,i){const n=typeof t=="number"?`${t}px`:t,s=typeof i=="number"?`${i}px`:i;e.style.maxWidth=n,e.style.maxHeight=s}_setHoverWidgetMaxDimensions(e,t){Xa._applyMaxDimensions(this._hover.contentsDomNode,e,t),Xa._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_hasHorizontalScrollbar(){const e=this._hover.scrollbar.getScrollDimensions();return e.scrollWidth>e.width}_adjustContentsBottomPadding(){const e=this._hover.contentsDomNode,t=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;e.style.paddingBottom!==t&&(e.style.paddingBottom=t)}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,i=e.height;this._setHoverWidgetDimensions(t,i),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(t,i-ck))}_updateResizableNodeMaxDimensions(){var e,t;const i=(e=this._findMaximumRenderingWidth())!==null&&e!==void 0?e:1/0,n=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._resizableNode.maxSize=new Rt(i,n),this._setHoverWidgetMaxDimensions(i,n)}_resize(e){var t,i;Xa._lastDimensions=new Rt(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(i=(t=this._visibleData)===null||t===void 0?void 0:t.colorPicker)===null||i===void 0||i.layout()}_findAvailableSpaceVertically(){var e;const t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition;if(t)return this._positionPreference===1?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=Ebe;return Array.from(this._hover.contentsDomNode.children).forEach(i=>{t+=i.clientHeight}),this._hasHorizontalScrollbar()&&(t+=ck),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some(t=>t.scrollWidth>t.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),t=typeof this._contentWidth>"u"?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidth"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;const i=gn(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=p3(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,i.left,i.top,i.width,i.height));const n=p3(e,t,i.left,i.top,i.width,i.height);return n>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,n),!0)}_setHoverData(e){var t;(t=this._visibleData)===null||t===void 0||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){const{fontSize:e,lineHeight:t}=this._editor.getOption(50),i=this._hover.contentsDomNode;i.style.fontSize=`${e}px`,i.style.lineHeight=`${t/e}`,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(s=>this._editor.applyFontInfo(s))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,Xa._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,500,Xa._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),this._updateFont(),this._updateContent(e),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var e;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[(e=this._positionPreference)!==null&&e!==void 0?e:1]}:null}showAt(e,t){var i,n,s,r;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);const a=kh(this._hover.containerDomNode),l=t.showAtPosition;this._positionPreference=(i=this._findPositionPreference(a,l))!==null&&i!==void 0?i:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(n=t.colorPicker)===null||n===void 0||n.layout();const c=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&Sbe(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(r=(s=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||s===void 0?void 0:s.getAriaLabel())!==null&&r!==void 0?r:"");c&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+c)}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new Rt(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}_adjustHoverHeightForScrollbar(e){var t;const i=this._hover.containerDomNode,n=this._hover.contentsDomNode,s=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._setContainerDomNodeDimensions(zs(i),Math.min(s,e)),this._setContentsDomNodeDimensions(zs(n),Math.min(s,e-ck))}setMinimumDimensions(e){this._minimumSize=new Rt(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new Rt(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const t=this._hover.containerDomNode;let i=kh(t),n=zs(t);if(this._resizableNode.layout(i,n),this._setHoverWidgetDimensions(n,i),i=kh(t),n=zs(t),this._contentWidth=n,this._updateMinimumWidth(),this._resizableNode.layout(i,n),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(i)),!((e=this._visibleData)===null||e===void 0)&&e.showAtPosition){const s=kh(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(s,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-f3})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+f3})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};Xc.ID="editor.contrib.resizableContentHoverWidget";Xc._lastDimensions=new Rt(0,0);Xc=Xa=BR([Oh(1,Xe),Oh(2,Dt),Oh(3,Zl),Oh(4,Xt)],Xc);let OS=class extends q{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=g3("div.hover-row.status-bar"),this.actionsElement=le(this.hoverElement,g3("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(OR.render(this.actionsElement,e,i))}append(e){const t=le(this.actionsElement,e);return this._hasContent=!0,t}};OS=BR([Oh(0,Xt)],OS);class FS{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const s=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter(r=>{if(r.options.isWholeLine)return!0;const a=r.range.startLineNumber===n?r.range.startColumn:1,l=r.range.endLineNumber===n?r.range.endColumn:s;if(r.options.showIfCollapsed){if(a>t.range.startColumn+1||t.range.endColumn-1>l)return!1}else if(a>t.range.startColumn||t.range.endColumn>l)return!1;return!0})}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return rn.EMPTY;const i=FS._getLineDecorations(this._editor,t);return rn.merge(this._participants.map(n=>n.computeAsync?n.computeAsync(t,i,e):rn.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=FS._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return Ia(t)}}function p3(o,e,t,i,n,s){const r=t+n/2,a=i+s/2,l=Math.max(Math.abs(o-r)-n/2,0),d=Math.max(Math.abs(e-a)-s/2,0);return Math.sqrt(l*l+d*d)}const m3=pe;class vp extends q{constructor(e,t,i){super(),this._renderDisposeables=this._register(new de),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new WV),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new Ud({editor:this._editor},t,i)),this._computer=new Nbe(this._editor),this._hoverOperation=this._register(new VV(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{this._withResult(n.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(50)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return vp.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const n of t){const s=m3("div.hover-row.markdown-hover"),r=le(s,m3("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(n.value));r.appendChild(a.element),i.appendChild(s)}this._updateContents(i),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),s=this._editor.getOption(66),r=this._hover.containerDomNode.clientHeight,a=i-n-(r-s)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}}vp.ID="editor.contrib.modesGlyphHoverWidget";class Nbe{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=n=>({value:n}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const n of t){if(!n.options.glyphMarginClassName)continue;const s=n.options.glyphMarginHoverMessage;!s||Up(s)||i.push(...Z2(s).map(e))}return i}}class Tbe{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}async function Mbe(o,e,t,i,n){try{const s=await Promise.resolve(o.provideHover(t,i,n));if(s&&Rbe(s))return new Tbe(o,s,e)}catch(s){en(s)}}function WR(o,e,t,i){const s=o.ordered(e).map((r,a)=>Mbe(r,a,e,t,i));return rn.fromPromises(s).coalesce()}function Abe(o,e,t,i){return WR(o,e,t,i).map(n=>n.hover).toPromise()}ql("_executeHoverProvider",(o,e,t)=>{const i=o.get(Me);return Abe(i.hoverProvider,e,t,vt.None)});function Rbe(o){const e=typeof o.range<"u",t=typeof o.contents<"u"&&o.contents&&o.contents.length>0;return e&&t}var Pbe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},UC=function(o,e){return function(t,i){e(t,i,o)}};const _3=pe;class ba{constructor(e,t,i,n,s){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=n,this.ordinal=s}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let BS=class{constructor(e,t,i,n,s){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=s,this.hoverOrdinal=3}createLoadingMessage(e){return new ba(this,e.range,[new as().appendText(p("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),r=[];let a=1e3;const l=i.getLineLength(n),d=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),c=this._editor.getOption(116),u=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:d});let h=!1;c>=0&&l>c&&e.range.startColumn>=c&&(h=!0,r.push(new ba(this,e.range,[{value:p("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,a++))),!h&&typeof u=="number"&&l>=u&&r.push(new ba(this,e.range,[{value:p("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let g=!1;for(const f of t){const m=f.range.startLineNumber===n?f.range.startColumn:1,v=f.range.endLineNumber===n?f.range.endColumn:s,_=f.options.hoverMessage;if(!_||Up(_))continue;f.options.beforeContentClassName&&(g=!0);const b=new k(e.range.startLineNumber,m,e.range.startLineNumber,v);r.push(new ba(this,b,Z2(_),g,a++))}return r}computeAsync(e,t,i){if(!this._editor.hasModel()||e.type!==1)return rn.EMPTY;const n=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(n))return rn.EMPTY;const s=new z(e.range.startLineNumber,e.range.startColumn);return WR(this._languageFeaturesService.hoverProvider,n,s,i).filter(r=>!Up(r.hover.contents)).map(r=>{const a=r.hover.range?k.lift(r.hover.range):e.range;return new ba(this,a,r.hover.contents,!1,r.ordinal)})}renderHoverParts(e,t){return zV(e,t,this._editor,this._languageService,this._openerService)}};BS=Pbe([UC(1,bi),UC(2,So),UC(3,Dt),UC(4,Me)],BS);function zV(o,e,t,i,n){e.sort((r,a)=>r.ordinal-a.ordinal);const s=new de;for(const r of e)for(const a of r.contents){if(Up(a))continue;const l=_3("div.hover-row.markdown-hover"),d=le(l,_3("div.hover-contents")),c=s.add(new Ud({editor:t},i,n));s.add(c.onDidRenderAsync(()=>{d.className="hover-contents code-hover-contents",o.onContentsChanged()}));const u=s.add(c.render(a));d.appendChild(u.element),o.fragment.appendChild(l)}return s}var $V=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},WS=function(o,e){return function(t,i){e(t,i,o)}};class v3{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let LT=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new W,this.onDidChange=this._onDidChange.event,this._dispoables=new de,this._markers=[],this._nextIdx=-1,ze.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),s=(a,l)=>{let d=Sv(a.resource.toString(),l.resource.toString());return d===0&&(n==="position"?d=k.compareRangesUsingStarts(a,l)||Mi.compare(a.severity,l.severity):d=Mi.compare(a.severity,l.severity)||k.compareRangesUsingStarts(a,l)),d},r=()=>{this._markers=this._markerService.read({resource:ze.isUri(e)?e:void 0,severities:Mi.Error|Mi.Warning|Mi.Info}),typeof e=="function"&&(this._markers=this._markers.filter(a=>this._resourceFilter(a.resource))),this._markers.sort(s)};r(),this._dispoables.add(t.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&(r(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new v3(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,s=this._markers.findIndex(r=>r.resource.toString()===e.uri.toString());s<0&&(s=fv(this._markers,{resource:e.uri},(r,a)=>Sv(r.resource.toString(),a.resource.toString())),s<0&&(s=~s));for(let r=s;rn.resource.toString()===e.toString());if(!(i<0)){for(;i=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rf=function(o,e){return function(t,i){e(t,i,o)}},kT;class Fbe{constructor(e,t,i,n,s){this._openerService=n,this._labelService=s,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new de,this._editor=t;const r=document.createElement("div");r.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),r.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),r.appendChild(this._relatedBlock),this._disposables.add(Wi(this._relatedBlock,"click",a=>{a.preventDefault();const l=this._relatedDiagnostics.get(a.target);l&&i(l)})),this._scrollable=new K7(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{r.style.left=`-${a.scrollLeft}px`,r.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){jt(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:s}=e;let r=((t==null?void 0:t.length)||0)+2;s&&(typeof s=="string"?r+=s.length:r+=s.value.length);const a=Rl(i);this._lines=a.length,this._longestLineLength=0;for(const h of a)this._longestLineLength=Math.max(h.length+r,this._longestLineLength);$n(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(const h of a)l=document.createElement("div"),l.innerText=h,h===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||s){const h=document.createElement("span");if(h.classList.add("details"),l.appendChild(h),t){const g=document.createElement("span");g.innerText=t,g.classList.add("source"),h.appendChild(g)}if(s)if(typeof s=="string"){const g=document.createElement("span");g.innerText=`(${s})`,g.classList.add("code"),h.appendChild(g)}else{this._codeLink=pe("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=f=>{this._openerService.open(s.target,{allowCommands:!0}),f.preventDefault(),f.stopPropagation()};const g=le(this._codeLink,pe("span"));g.innerText=s.value,h.appendChild(this._codeLink)}}if($n(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),ls(n)){const h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(66)*.66)}px`,this._lines+=1;for(const g of n){const f=document.createElement("div"),m=document.createElement("a");m.classList.add("filename"),m.innerText=`${this._labelService.getUriBasenameLabel(g.resource)}(${g.startLineNumber}, ${g.startColumn}): `,m.title=this._labelService.getUriLabel(g.resource),this._relatedDiagnostics.set(m,g);const v=document.createElement("span");v.innerText=g.message,f.appendChild(m),f.appendChild(v),this._lines+=1,h.appendChild(f)}}const d=this._editor.getOption(50),c=Math.ceil(d.typicalFullwidthCharacterWidth*this._longestLineLength*.75),u=d.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:u})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Mi.Error:t=p("Error","Error");break;case Mi.Warning:t=p("Warning","Warning");break;case Mi.Info:t=p("Info","Info");break;case Mi.Hint:t=p("Hint","Hint");break}let i=p("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let tm=kT=class extends RS{constructor(e,t,i,n,s,r,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},s),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=r,this._labelService=a,this._callOnDispose=new de,this._onDidSelectRelatedInformation=new W,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Mi.Warning,this._backgroundColor=Y.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Hbe);let t=IT,i=Bbe;this._severity===Mi.Warning?(t=j1,i=Wbe):this._severity===Mi.Info&&(t=ET,i=Vbe);const n=e.getColor(t),s=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:s,primaryHeadingColor:e.getColor(EV),secondaryHeadingColor:e.getColor(NV)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(n=>this.editor.focus()));const t=[],i=this._menuService.createMenu(kT.TitleMenu,this._contextKeyService);VA(i,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=le(e,pe(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new Fbe(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const n=k.lift(e),s=this.editor.getPosition(),r=s&&n.containsPosition(s)?s:n.getStartPosition();super.show(r,this.computeRequiredHeight());const a=this.editor.getModel();if(a){const l=i>1?p("problems","{0} of {1} problems",t,i):p("change","{0} of {1} problem",t,i);this.setTitle(br(a.uri),l)}this._icon.className=`codicon ${xT.className(Mi.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(r,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};tm.TitleMenu=new N("gotoErrorTitleMenu");tm=kT=Obe([rf(1,Sn),rf(2,So),rf(3,Ba),rf(4,qe),rf(5,Xe),rf(6,Hp)],tm);const b3=Vv(vl,vte),C3=Vv(zo,Bv),w3=Vv(Ks,Wv),IT=M("editorMarkerNavigationError.background",{dark:b3,light:b3,hcDark:Lt,hcLight:Lt},p("editorMarkerNavigationError","Editor marker navigation widget error color.")),Bbe=M("editorMarkerNavigationError.headerBackground",{dark:We(IT,.1),light:We(IT,.1),hcDark:null,hcLight:null},p("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),j1=M("editorMarkerNavigationWarning.background",{dark:C3,light:C3,hcDark:Lt,hcLight:Lt},p("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),Wbe=M("editorMarkerNavigationWarning.headerBackground",{dark:We(j1,.1),light:We(j1,.1),hcDark:"#0C141F",hcLight:We(j1,.2)},p("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),ET=M("editorMarkerNavigationInfo.background",{dark:w3,light:w3,hcDark:Lt,hcLight:Lt},p("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Vbe=M("editorMarkerNavigationInfo.headerBackground",{dark:We(ET,.1),light:We(ET,.1),hcDark:null,hcLight:null},p("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),Hbe=M("editorMarkerNavigation.background",{dark:wn,light:wn,hcDark:wn,hcLight:wn},p("editorMarkerNavigationBackground","Editor marker navigation widget background."));var zbe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},jC=function(o,e){return function(t,i){e(t,i,o)}},T_;let Du=T_=class{static get(e){return e.getContribution(T_.ID)}constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new de,this._editor=e,this._widgetVisible=jV.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(tm,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(i=>{var n,s,r;(!(!((n=this._model)===null||n===void 0)&&n.selected)||!k.containsPosition((s=this._model)===null||s===void 0?void 0:s.selected.marker,i.position))&&((r=this._model)===null||r===void 0||r.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const i=this._model.find(this._editor.getModel().uri,this._widget.position);i?this._widget.updateMarker(i.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(i=>{this._editorService.openCodeEditor({resource:i.resource,options:{pinned:!0,revealIfOpened:!0,selection:k.lift(i).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new z(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}async nagivate(e,t){var i,n;if(this._editor.hasModel()){const s=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(s.move(e,this._editor.getModel(),this._editor.getPosition()),!s.selected)return;if(s.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const r=await this._editorService.openCodeEditor({resource:s.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:s.selected.marker}},this._editor);r&&((i=T_.get(r))===null||i===void 0||i.close(),(n=T_.get(r))===null||n===void 0||n.nagivate(e,t))}else this._widget.showAtMarker(s.selected.marker,s.selected.index,s.selected.total)}}};Du.ID="editor.contrib.markerController";Du=T_=zbe([jC(1,UV),jC(2,Xe),jC(3,Ot),jC(4,qe)],Du);class VL extends Te{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}async run(e,t){var i;t.hasModel()&&((i=Du.get(t))===null||i===void 0||i.nagivate(this._next,this._multiFile))}}class Qc extends VL{constructor(){super(!0,!1,{id:Qc.ID,label:Qc.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:578,weight:100},menuOpts:{menuId:tm.TitleMenu,title:Qc.LABEL,icon:Zi("marker-navigation-next",ve.arrowDown,p("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}Qc.ID="editor.action.marker.next";Qc.LABEL=p("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class Kh extends VL{constructor(){super(!1,!1,{id:Kh.ID,label:Kh.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:1602,weight:100},menuOpts:{menuId:tm.TitleMenu,title:Kh.LABEL,icon:Zi("marker-navigation-previous",ve.arrowUp,p("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}Kh.ID="editor.action.marker.prev";Kh.LABEL=p("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class $be extends VL{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:p("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:66,weight:100},menuOpts:{menuId:N.MenubarGoMenu,title:p({},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class Ube extends VL{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:p("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:1090,weight:100},menuOpts:{menuId:N.MenubarGoMenu,title:p({},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}At(Du.ID,Du,4);_e(Qc);_e(Kh);_e($be);_e(Ube);const jV=new De("markersNavigationVisible",!1),jbe=Rn.bindToContribution(Du.get);we(new jbe({id:"closeMarkersNavigation",precondition:jV,handler:o=>o.close(),kbOpts:{weight:150,kbExpr:T.focus,primary:9,secondary:[1033]}}));var Kbe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uk=function(o,e){return function(t,i){e(t,i,o)}};const Ir=pe;class qbe{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const S3={type:1,filter:{include:Ze.QuickFix},triggerAction:_o.QuickFixHover};let NT=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),r=[];for(const a of t){const l=a.range.startLineNumber===n?a.range.startColumn:1,d=a.range.endLineNumber===n?a.range.endColumn:s,c=this._markerDecorationsService.getMarker(i.uri,a);if(!c)continue;const u=new k(e.range.startLineNumber,l,e.range.startLineNumber,d);r.push(new qbe(this,u,c))}return r}renderHoverParts(e,t){if(!t.length)return q.None;const i=new de;t.forEach(s=>e.fragment.appendChild(this.renderMarkerHover(s,i)));const n=t.length===1?t[0]:t.sort((s,r)=>Mi.compare(s.marker.severity,r.marker.severity))[0];return this.renderMarkerStatusbar(e,n,i),i}renderMarkerHover(e,t){const i=Ir("div.hover-row"),n=le(i,Ir("div.marker.hover-contents")),{source:s,message:r,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(n);const d=le(n,Ir("span"));if(d.style.whiteSpace="pre-wrap",d.innerText=r,s||a)if(a&&typeof a!="string"){const c=Ir("span");if(s){const f=le(c,Ir("span"));f.innerText=s}const u=le(c,Ir("a.code-link"));u.setAttribute("href",a.target.toString()),t.add(J(u,"click",f=>{this._openerService.open(a.target,{allowCommands:!0}),f.preventDefault(),f.stopPropagation()}));const h=le(u,Ir("span"));h.innerText=a.value;const g=le(n,c);g.style.opacity="0.6",g.style.paddingLeft="6px"}else{const c=le(n,Ir("span"));c.style.opacity="0.6",c.style.paddingLeft="6px",c.innerText=s&&a?`${s}(${a})`:s||`(${a})`}if(ls(l))for(const{message:c,resource:u,startLineNumber:h,startColumn:g}of l){const f=le(n,Ir("div"));f.style.marginTop="8px";const m=le(f,Ir("a"));m.innerText=`${br(u)}(${h}, ${g}): `,m.style.cursor="pointer",t.add(J(m,"click",_=>{_.stopPropagation(),_.preventDefault(),this._openerService&&this._openerService.open(u,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:g}}}).catch(nt)}));const v=le(f,Ir("span"));v.innerText=c,this._editor.applyFontInfo(v)}return i}renderMarkerStatusbar(e,t,i){if((t.marker.severity===Mi.Error||t.marker.severity===Mi.Warning||t.marker.severity===Mi.Info)&&e.statusBar.addAction({label:p("view problem","View Problem"),commandId:Qc.ID,run:()=>{var n;e.hide(),(n=Du.get(this._editor))===null||n===void 0||n.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(90)){const n=e.statusBar.append(Ir("div"));this.recentMarkerCodeActionsInfo&&(rS.makeKey(this.recentMarkerCodeActionsInfo.marker)===rS.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=p("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?q.None:i.add(lu(()=>n.textContent=p("checkingForQuickFixes","Checking for quick fixes..."),200));n.textContent||(n.textContent=" ");const r=this.getCodeActions(t.marker);i.add(je(()=>r.cancel())),r.then(a=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),n.textContent=p("noQuickFixes","No quick fixes available");return}n.style.display="none";let l=!1;i.add(je(()=>{l||a.dispose()})),e.statusBar.addAction({label:p("quick fixes","Quick Fix..."),commandId:ER,run:d=>{l=!0;const c=Cu.get(this._editor),u=gn(d);e.hide(),c==null||c.showCodeActions(S3,a,{x:u.left,y:u.top,width:u.width,height:u.height})}})},nt)}}getCodeActions(e){return _n(t=>ov(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new k(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),S3,Fd.None,t))}};NT=Kbe([uk(1,$M),uk(2,So),uk(3,Me)],NT);const KV="editor.action.inlineSuggest.commit",qV="editor.action.inlineSuggest.showPrevious",GV="editor.action.inlineSuggest.showNext";var VR=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ca=function(o,e){return function(t,i){e(t,i,o)}},K1;let TT=class extends q{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=Oi(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).showToolbar==="always"),this.sessionPosition=void 0,this.position=rt(this,n=>{var s,r,a;const l=(s=this.model.read(n))===null||s===void 0?void 0:s.ghostText.read(n);if(!this.alwaysShowToolbar.read(n)||!l||l.parts.length===0)return this.sessionPosition=void 0,null;const d=l.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==l.lineNumber&&(this.sessionPosition=void 0);const c=new z(l.lineNumber,Math.min(d,(a=(r=this.sessionPosition)===null||r===void 0?void 0:r.column)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER));return this.sessionPosition=c,c}),this._register(Qd((n,s)=>{const r=this.model.read(n);if(!r||!this.alwaysShowToolbar.read(n))return;const a=s.add(this.instantiationService.createInstance(xu,this.editor,!0,this.position,r.selectedInlineCompletionIndex,r.inlineCompletionsCount,r.selectedInlineCompletion.map(l=>{var d;return(d=l==null?void 0:l.inlineCompletion.source.inlineCompletions.commands)!==null&&d!==void 0?d:[]})));e.addContentWidget(a),s.add(je(()=>e.removeContentWidget(a))),s.add(zt(l=>{this.position.read(l)&&r.lastTriggerKind.read(l)!==Rd.Explicit&&r.triggerExplicitly()}))}))}};TT=VR([Ca(2,qe)],TT);const Gbe=Zi("inline-suggestion-hints-next",ve.chevronRight,p("parameterHintsNextIcon","Icon for show next parameter hint.")),Zbe=Zi("inline-suggestion-hints-previous",ve.chevronLeft,p("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let xu=K1=class extends q{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,i){const n=new Rs(e,t,i,!0,()=>this._commandService.executeCommand(e)),s=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let r=t;return s&&(r=p({},"{0} ({1})",t,s.getLabel())),n.tooltip=r,n}constructor(e,t,i,n,s,r,a,l,d,c,u){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=n,this._suggestionCount=s,this._extraCommands=r,this._commandService=a,this.keybindingService=d,this._contextKeyService=c,this._menuService=u,this.id=`InlineSuggestionHintsContentWidget${K1.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=vi("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[vi("div@toolBar")]),this.previousAction=this.createCommandAction(qV,p("previous","Previous"),Ue.asClassName(Zbe)),this.availableSuggestionCountAction=new Rs("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(GV,p("next","Next"),Ue.asClassName(Gbe)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(N.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Yt(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new Yt(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[],this.toolBar=this._register(l.createInstance(MT,this.nodes.toolBar,N.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:h=>h.startsWith("primary")},actionViewItemProvider:(h,g)=>{if(h instanceof Ur)return l.createInstance(Xbe,h,void 0);if(h===this.availableSuggestionCountAction){const f=new Ybe(void 0,h,{label:!0,icon:!1});return f.setClass("availableSuggestionCount"),f}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(h=>{K1._dropDownVisible=h})),this._register(zt(h=>{this._position.read(h),this.editor.layoutContentWidget(this)})),this._register(zt(h=>{const g=this._suggestionCount.read(h),f=this._currentSuggestionIdx.read(h);g!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${f+1}/${g}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),g!==void 0&&g>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(zt(h=>{const g=this._extraCommands.read(h);if(Bi(this.lastCommands,g))return;this.lastCommands=g;const f=g.map(m=>({class:void 0,id:m.id,enabled:!0,tooltip:m.tooltip||"",label:m.title,run:v=>this._commandService.executeCommand(m.id)}));for(const[m,v]of this.inlineCompletionsActionsMenus.getActions())for(const _ of v)_ instanceof Ur&&f.push(_);f.length>0&&f.unshift(new Mn),this.toolBar.setAdditionalSecondaryActions(f)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};xu._dropDownVisible=!1;xu.id=0;xu=K1=VR([Ca(6,Ri),Ca(7,qe),Ca(8,Xt),Ca(9,Xe),Ca(10,Ba)],xu);class Ybe extends jp{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}}let Xbe=class extends dg{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=vi("div.keybinding").root;new C0(t,Vo,{disableTitle:!0,...whe}).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},MT=class extends ES{constructor(e,t,i,n,s,r,a,l){super(e,{resetMenu:t,...i},n,s,r,a,l),this.menuId=t,this.options2=i,this.menuService=n,this.contextKeyService=s,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,t,i,n,s,r,a;const l=[],d=[];VA(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:l,secondary:d},(i=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||i===void 0?void 0:i.primaryGroup,(s=(n=this.options2)===null||n===void 0?void 0:n.toolbarOptions)===null||s===void 0?void 0:s.shouldInlineSubmenu,(a=(r=this.options2)===null||r===void 0?void 0:r.toolbarOptions)===null||a===void 0?void 0:a.useSeparatorsInPrimaryActions),d.push(...this.additionalActions),l.unshift(...this.prependedPrimaryActions),this.setActions(l,d)}setPrependedPrimaryActions(e){Bi(this.prependedPrimaryActions,e,(t,i)=>t===i)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){Bi(this.additionalActions,e,(t,i)=>t===i)||(this.additionalActions=e,this.updateToolbar())}};MT=VR([Ca(3,Ba),Ca(4,Xe),Ca(5,Sr),Ca(6,Xt),Ca(7,vo)],MT);var Qbe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},KC=function(o,e){return function(t,i){e(t,i,o)}},AT;let Ys=AT=class extends q{static get(e){return e.getContribution(AT.ID)}constructor(e,t,i,n,s){super(),this._editor=e,this._instantiationService=t,this._openerService=i,this._languageService=n,this._keybindingService=s,this._toUnhook=new de,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._reactToEditorMouseMoveRunner=this._register(new Yt(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookEvents(),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(60)&&(this._unhookEvents(),this._hookEvents())}))}_hookEvents(){const e=this._editor.getOption(60);this._isHoverEnabled=e.enabled,this._isHoverSticky=e.sticky,this._hidingDelay=e.hidingDelay,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._toUnhook.add(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._toUnhook.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._toUnhook.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))):(this._toUnhook.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._toUnhook.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))),this._toUnhook.add(this._editor.onMouseLeave(t=>this._onEditorMouseLeave(t))),this._toUnhook.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this._hideWidgets()})),this._toUnhook.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._toUnhook.add(this._editor.onDidScrollChange(t=>this._onEditorScrollChanged(t)))}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._isMouseDown=!0;const i=e.target;if(i.type===9&&i.detail===Xc.ID){this._hoverClicked=!0;return}i.type===12&&i.detail===vp.ID||(i.type!==12&&(this._hoverClicked=!1),!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t,i;this._cancelScheduler();const n=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||!((i=this._contentWidget)===null||i===void 0)&&i.containsNode(n)||this._hideWidgets()}_isMouseOverWidget(e){var t,i,n,s,r;const a=e.target;return!!(this._isHoverSticky&&a.type===9&&a.detail===Xc.ID||this._isHoverSticky&&(!((t=this._contentWidget)===null||t===void 0)&&t.containsNode((i=e.event.browserEvent.view)===null||i===void 0?void 0:i.document.activeElement))&&!(!((s=(n=e.event.browserEvent.view)===null||n===void 0?void 0:n.getSelection())===null||s===void 0)&&s.isCollapsed)||!this._isHoverSticky&&a.type===9&&a.detail===Xc.ID&&(!((r=this._contentWidget)===null||r===void 0)&&r.isColorPickerVisible)||this._isHoverSticky&&a.type===12&&a.detail===vp.ID)}_onEditorMouseMove(e){var t,i,n,s;if(this._mouseMoveEvent=e,!((t=this._contentWidget)===null||t===void 0)&&t.isFocused||!((i=this._contentWidget)===null||i===void 0)&&i.isResizing||this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&(!((n=this._contentWidget)===null||n===void 0)&&n.isVisibleFromKeyboard))return;if(this._isMouseOverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}if(!((s=this._contentWidget)===null||s===void 0)&&s.isVisible&&this._isHoverSticky&&this._hidingDelay>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(this._hidingDelay);return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){var t,i,n;if(!e)return;const s=e.target,r=(t=s.element)===null||t===void 0?void 0:t.classList.contains("colorpicker-color-decoration"),a=this._editor.getOption(146);if(r&&(a==="click"&&!this._hoverActivatedByColorDecoratorClick||a==="hover"&&!this._isHoverEnabled||a==="clickAndHover"&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!r&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(i=this._glyphWidget)===null||i===void 0||i.hide();return}if(s.type===2&&s.position){(n=this._contentWidget)===null||n===void 0||n.hide(),this._glyphWidget||(this._glyphWidget=new vp(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(s.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const i=this._keybindingService.softDispatch(e,this._editor.getDomNode()),n=i.kind===1||i.kind===2&&i.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible);e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!n&&this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible)||xu.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(i=this._contentWidget)===null||i===void 0||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(PS,this._editor)),this._contentWidget}showContentHover(e,t,i,n,s=!1){this._hoverActivatedByColorDecoratorClick=s,this._getOrCreateContentWidget().startShowingAtRange(e,t,i,n)}focus(){var e;(e=this._contentWidget)===null||e===void 0||e.focus()}scrollUp(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)===null||e===void 0||e.pageUp()}pageDown(){var e;(e=this._contentWidget)===null||e===void 0||e.pageDown()}goToTop(){var e;(e=this._contentWidget)===null||e===void 0||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)===null||e===void 0||e.goToBottom()}get isColorPickerVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isVisible}dispose(){var e,t;super.dispose(),this._unhookEvents(),this._toUnhook.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};Ys.ID="editor.contrib.hover";Ys=AT=Qbe([KC(1,qe),KC(2,So),KC(3,bi),KC(4,Xt)],Ys);var ra;(function(o){o.NoAutoFocus="noAutoFocus",o.FocusIfVisible="focusIfVisible",o.AutoFocusImmediately="autoFocusImmediately"})(ra||(ra={}));class Jbe extends Te{constructor(){super({id:"editor.action.showHover",label:p({},"Show or Focus Hover"),metadata:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[ra.NoAutoFocus,ra.FocusIfVisible,ra.AutoFocusImmediately],enumDescriptions:[p("showOrFocusHover.focus.noAutoFocus","The hover will not automatically take focus."),p("showOrFocusHover.focus.focusIfVisible","The hover will take focus only if it is already visible."),p("showOrFocusHover.focus.autoFocusImmediately","The hover will automatically take focus when it appears.")],default:ra.FocusIfVisible}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const n=Ys.get(t);if(!n)return;const s=i==null?void 0:i.focus;let r=ra.FocusIfVisible;s in ra?r=s:typeof s=="boolean"&&s&&(r=ra.AutoFocusImmediately);const a=d=>{const c=t.getPosition(),u=new k(c.lineNumber,c.column,c.lineNumber,c.column);n.showContentHover(u,1,1,d)},l=t.getOption(2)===2;n.isHoverVisible?r!==ra.NoAutoFocus?n.focus():a(l):a(l||r===ra.AutoFocusImmediately)}}class e0e extends Te{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:p({},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const i=Ys.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const s=new k(n.lineNumber,n.column,n.lineNumber,n.column),r=bg.get(t);if(!r)return;r.startFindDefinitionFromCursor(n).then(()=>{i.showContentHover(s,1,1,!0)})}}class t0e extends Te{constructor(){super({id:"editor.action.scrollUpHover",label:p({},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:16,weight:100}})}run(e,t){const i=Ys.get(t);i&&i.scrollUp()}}class i0e extends Te{constructor(){super({id:"editor.action.scrollDownHover",label:p({},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:18,weight:100}})}run(e,t){const i=Ys.get(t);i&&i.scrollDown()}}class n0e extends Te{constructor(){super({id:"editor.action.scrollLeftHover",label:p({},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:15,weight:100}})}run(e,t){const i=Ys.get(t);i&&i.scrollLeft()}}class s0e extends Te{constructor(){super({id:"editor.action.scrollRightHover",label:p({},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:17,weight:100}})}run(e,t){const i=Ys.get(t);i&&i.scrollRight()}}class o0e extends Te{constructor(){super({id:"editor.action.pageUpHover",label:p({},"Page Up Hover"),alias:"Page Up Hover",precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const i=Ys.get(t);i&&i.pageUp()}}class r0e extends Te{constructor(){super({id:"editor.action.pageDownHover",label:p({},"Page Down Hover"),alias:"Page Down Hover",precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const i=Ys.get(t);i&&i.pageDown()}}class a0e extends Te{constructor(){super({id:"editor.action.goToTopHover",label:p({},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const i=Ys.get(t);i&&i.goToTop()}}class l0e extends Te{constructor(){super({id:"editor.action.goToBottomHover",label:p({},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:T.hoverFocused,kbOpts:{kbExpr:T.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const i=Ys.get(t);i&&i.goToBottom()}}At(Ys.ID,Ys,2);_e(Jbe);_e(e0e);_e(t0e);_e(i0e);_e(n0e);_e(s0e);_e(o0e);_e(r0e);_e(a0e);_e(l0e);jg.register(BS);jg.register(NT);Zr((o,e)=>{const t=o.getColor(Ate);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))});class RT extends q{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(146);if(t!=="click"&&t!=="clickAndHover")return;const i=e.target;if(i.type!==6||!i.detail.injectedText||i.detail.injectedText.options.attachedData!==bV||!i.range)return;const n=this._editor.getContribution(Ys.ID);if(n&&!n.isColorPickerVisible){const s=new k(i.range.startLineNumber,i.range.startColumn+1,i.range.endLineNumber,i.range.endColumn+1);n.showContentHover(s,1,0,!1,!0)}}}RT.ID="editor.contrib.colorContribution";At(RT.ID,RT,2);jg.register(AS);var ZV=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},pa=function(o,e){return function(t,i){e(t,i,o)}},PT,OT;let ku=PT=class extends q{constructor(e,t,i,n,s,r,a){super(),this._editor=e,this._modelService=i,this._keybindingService=n,this._instantiationService=s,this._languageFeatureService=r,this._languageConfigurationService=a,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=T.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=T.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new VS(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)===null||e===void 0||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)===null||e===void 0||e.updateEditor(),this.hide()}static get(e){return e.getContribution(PT.ID)}};ku.ID="editor.contrib.standaloneColorPickerController";ku=PT=ZV([pa(1,Xe),pa(2,Si),pa(3,Xt),pa(4,qe),pa(5,Me),pa(6,si)],ku);At(ku.ID,ku,1);const y3=8,d0e=22;let VS=OT=class extends q{constructor(e,t,i,n,s,r,a,l){var d;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=i,this._modelService=s,this._keybindingService=r,this._languageFeaturesService=a,this._languageConfigurationService=l,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new W),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=n.createInstance(wb,this._editor),this._position=(d=this._editor._getViewModel())===null||d===void 0?void 0:d.getPrimaryCursorState().modelState.position;const c=this._editor.getSelection(),u=c?{startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},h=this._register(Pl(this._body));this._register(h.onDidBlur(g=>{this.hide()})),this._register(h.onDidFocus(g=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(g=>{var f;const m=(f=g.target.element)===null||f===void 0?void 0:f.classList;m&&m.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(g=>{this._render(g.value,g.foundInEditor)})),this._start(u),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return OT.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(e){const t=await this._computeAsync(e);t&&this._onResult.fire(new c0e(t.result,t.foundInEditor))}async _computeAsync(e){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},i=await this._standaloneColorPickerParticipant.createColorHover(t,new AR(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null}_render(e,t){const i=document.createDocumentFragment(),n=this._register(new OS(this._keybindingService));let s;const r={fragment:i,statusBar:n,setColorPicker:m=>s=m,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(r,[e])),s===void 0)return;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(i),s.layout();const a=s.body,l=a.saturationBox.domNode.clientWidth,d=a.domNode.clientWidth-l-d0e-y3,c=s.body.enterButton;c==null||c.onClicked(()=>{this.updateEditor(),this.hide()});const u=s.header,h=u.pickedColorNode;h.style.width=l+y3+"px";const g=u.originalColorNode;g.style.width=d+"px";const f=s.header.closeButton;f==null||f.onClicked(()=>{this.hide()}),t&&(c&&(c.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};VS.ID="editor.contrib.standaloneColorPickerWidget";VS=OT=ZV([pa(3,qe),pa(4,Si),pa(5,Xt),pa(6,Me),pa(7,si)],VS);class c0e{constructor(e,t){this.value=e,this.foundInEditor=t}}class u0e extends Wa{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:p("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:p({},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:N.CommandPalette}]})}runEditorCommand(e,t){var i;(i=ku.get(t))===null||i===void 0||i.showOrFocus()}}class h0e extends Te{constructor(){super({id:"editor.action.hideColorPicker",label:p({},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:T.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var i;(i=ku.get(t))===null||i===void 0||i.hide()}}class g0e extends Te{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:p({},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:T.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var i;(i=ku.get(t))===null||i===void 0||i.insertColor()}}_e(h0e);_e(g0e);mi(u0e);class Oc{constructor(e,t,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length,s=e.length;if(i+n>s)return!1;for(let r=0;r=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,s,r){const a=e.startLineNumber,l=e.startColumn,d=e.endLineNumber,c=e.endColumn,u=s.getLineContent(a),h=s.getLineContent(d);let g=u.lastIndexOf(t,l-1+t.length),f=h.indexOf(i,c-1-i.length);if(g!==-1&&f!==-1)if(a===d)u.substring(g+t.length,f).indexOf(i)>=0&&(g=-1,f=-1);else{const v=u.substring(g+t.length),_=h.substring(0,f);(v.indexOf(i)>=0||_.indexOf(i)>=0)&&(g=-1,f=-1)}let m;g!==-1&&f!==-1?(n&&g+t.length0&&h.charCodeAt(f-1)===32&&(i=" "+i,f-=1),m=Oc._createRemoveBlockCommentOperations(new k(a,g+t.length+1,d,f+1),t,i)):(m=Oc._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=m.length===1?i:null);for(const v of m)r.addTrackedEditOperation(v.range,v.text)}static _createRemoveBlockCommentOperations(e,t,i){const n=[];return k.isEmpty(e)?n.push(Li.delete(new k(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(Li.delete(new k(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(Li.delete(new k(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){const s=[];return k.isEmpty(e)?s.push(Li.replace(new k(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(s.push(Li.insert(new z(e.startLineNumber,e.startColumn),t+(n?" ":""))),s.push(Li.insert(new z(e.endLineNumber,e.endColumn),(n?" ":"")+i))),s}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const s=e.getLanguageIdAtPosition(i,n),r=this.languageConfigurationService.getLanguageConfiguration(s).comments;!r||!r.blockCommentStartToken||!r.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,r.blockCommentStartToken,r.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(i.length===2){const n=i[0],s=i[1];return new Ae(n.range.endLineNumber,n.range.endColumn,s.range.startLineNumber,s.range.startColumn)}else{const n=i[0].range,s=this._usedEndToken?-this._usedEndToken.length-1:0;return new Ae(n.endLineNumber,n.endColumn+s,n.endLineNumber,n.endColumn+s)}}}class hd{constructor(e,t,i,n,s,r,a){this.languageConfigurationService=e,this._selection=t,this._tabSize=i,this._type=n,this._insertSpace=s,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=r,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenization.tokenizeIfCheap(t);const s=e.getLanguageIdAtPosition(t,1),r=n.getLanguageConfiguration(s).comments,a=r?r.lineCommentToken:null;if(!a)return null;const l=[];for(let d=0,c=i-t+1;ds?t[l].commentStrOffset=r-1:t[l].commentStrOffset=r}}}class HR extends Te{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(si);if(!t.hasModel())return;const n=t.getModel(),s=[],r=n.getOptions(),a=t.getOption(23),l=t.getSelections().map((c,u)=>({selection:c,index:u,ignoreFirstLine:!1}));l.sort((c,u)=>k.compareRangesUsingStarts(c.selection,u.selection));let d=l[0];for(let c=1;c=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sh=function(o,e){return function(t,i){e(t,i,o)}},FT;let im=FT=class{static get(e){return e.getContribution(FT.ID)}constructor(e,t,i,n,s,r,a,l){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=s,this._menuService=r,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new de,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(d=>this._onContextMenu(d))),this._toDispose.add(this._editor.onMouseWheel(d=>{if(this._contextMenuIsBeingShownCount>0){const c=this._contextViewService.getContextViewElement(),u=d.srcElement;u.shadowRoot&&sg(c)===u.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(d=>{this._editor.getOption(24)&&d.keyCode===58&&(d.preventDefault(),d.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu(e.event);if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let i=!1;for(const n of this._editor.getSelections())if(n.containsPosition(e.target.position)){i=!0;break}i||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(24)||!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?N.SimpleEditorContext:N.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.createMenu(t,this._contextKeyService),s=n.getActions({arg:e.uri});n.dispose();for(const r of s){const[,a]=r;let l=0;for(const d of a)if(d instanceof xv){const c=this._getMenuActions(e,d.item.submenu);c.length>0&&(i.push(new xp(d.id,d.label,c)),l++)}else i.push(d),l++;l&&i.push(new Mn)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let n=t;if(!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const r=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),a=gn(this._editor.getDomNode()),l=a.left+r.left,d=a.top+r.top+r.height;n={x:l,y:d}}const s=this._editor.getOption(126)&&!Ea;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:s?this._editor.getDomNode():void 0,getAnchor:()=>n,getActions:()=>e,getActionViewItem:r=>{const a=this._keybindingFor(r);if(a)return new jp(r,r,{label:!0,keybinding:a.getLabel(),isMenu:!0});const l=r;return typeof l.getActionViewItem=="function"?l.getActionViewItem():new jp(r,r,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:r=>this._keybindingFor(r),onHide:r=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||Kle(this._workspaceContextService.getWorkspace()))return;const t=this._editor.getOption(72);let i=0;const n=d=>({id:`menu-action-${++i}`,label:d.label,tooltip:"",class:void 0,enabled:typeof d.enabled>"u"?!0:d.enabled,checked:d.checked,run:d.run}),s=(d,c)=>new xp(`menu-action-${++i}`,d,c,void 0),r=(d,c,u,h,g)=>{if(!c)return n({label:d,enabled:c,run:()=>{}});const f=v=>()=>{this._configurationService.updateValue(u,v)},m=[];for(const v of g)m.push(n({label:v.label,checked:h===v.value,run:f(v.value)}));return s(d,m)},a=[];a.push(n({label:p("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new Mn),a.push(n({label:p("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(r(p("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:p("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:p("context.minimap.size.fill","Fill"),value:"fill"},{label:p("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(r(p("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:p("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:p("context.minimap.slider.always","Always"),value:"always"}]));const l=this._editor.getOption(126)&&!Ea;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:d=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};im.ID="editor.contrib.contextmenu";im=FT=v0e([sh(1,Sr),sh(2,Gd),sh(3,Xe),sh(4,Xt),sh(5,Ba),sh(6,Dt),sh(7,ag)],im);class b0e extends Te{constructor(){super({id:"editor.action.showContextMenu",label:p("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:1092,weight:100}})}run(e,t){var i;(i=im.get(t))===null||i===void 0||i.showContextMenu()}}At(im.ID,im,2);_e(b0e);class hk{constructor(e){this.selections=e}equals(e){const t=this.selections.length,i=e.selections.length;if(t!==i)return!1;for(let n=0;n{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const i=new hk(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new gk(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new gk(new hk(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new gk(new hk(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}Cg.ID="editor.contrib.cursorUndoRedoController";class C0e extends Te{constructor(){super({id:"cursorUndo",label:p("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:2099,weight:100}})}run(e,t,i){var n;(n=Cg.get(t))===null||n===void 0||n.cursorUndo()}}class w0e extends Te{constructor(){super({id:"cursorRedo",label:p("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){var n;(n=Cg.get(t))===null||n===void 0||n.cursorRedo()}}At(Cg.ID,Cg,0);_e(C0e);_e(w0e);class S0e{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){const i=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new k(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new Ae(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new Ae(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumberthis._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(35)||this._editor.getOption(22)||(af(e)&&(this._modifierPressed=!0),this._mouseDown&&af(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(35)||this._editor.getOption(22)||(af(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===Bd.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(this._dragSelection===null){const n=(this._editor.getSelections()||[]).filter(s=>t.position&&s.containsPosition(t.position));if(n.length===1)this._dragSelection=n[0];else return}af(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new z(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let i=null;if(e.event.shiftKey){const n=this._editor.getSelection();if(n){const{selectionStartLineNumber:s,selectionStartColumn:r}=n;i=[new Ae(s,r,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map(n=>n.containsPosition(t)?new Ae(t.lineNumber,t.column,t.lineNumber,t.column):n);this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(af(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(Bd.ID,new S0e(this._dragSelection,t,af(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new k(e.lineNumber,e.column,e.lineNumber,e.column),options:Bd._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}Bd.ID="editor.contrib.dragAndDrop";Bd.TRIGGER_KEY_VALUE=It?6:5;Bd._DECORATION_OPTIONS=st.register({description:"dnd-target",className:"dnd-target"});At(Bd.ID,Bd,2);const HL=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let o;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?o=crypto.getRandomValues.bind(crypto):o=function(i){for(let n=0;no,asFile:()=>{},value:typeof o=="string"?o:void 0}}function y0e(o,e,t){const i={id:HL(),name:o,uri:e,data:t};return{asString:async()=>"",asFile:()=>i,value:void 0}}class YV{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return wt.some(this,([i,n])=>n.asFile())&&t.push("files"),QV(HS(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return HS(e)}}function HS(o){return o.toLowerCase()}function XV(o,e){return QV(HS(o),e.map(HS))}function QV(o,e){if(o==="*/*")return e.length>0;if(e.includes(o))return!0;const t=o.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[i,n,s]=t;return s==="*"?e.some(r=>r.startsWith(n+"/")):!1}const zL=Object.freeze({create:o=>iu(o.map(e=>e.toString())).join(`\r `),split:o=>o.split(`\r -`),parse:o=>zL.split(o).filter(e=>!e.startsWith("#"))}),L3={EDITORS:"CodeEditors",FILES:"CodeFiles"};class C0e{}const w0e={DragAndDropContribution:"workbench.contributions.dragAndDrop"};xi.add(w0e.DragAndDropContribution,new C0e);class Db{constructor(){}static getInstance(){return Db.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}Db.INSTANCE=new Db;function JV(o){const e=new YV;for(const t of o.items){const i=t.type;if(t.kind==="string"){const n=new Promise(s=>t.getAsString(s));e.append(i,zR(n))}else if(t.kind==="file"){const n=t.getAsFile();n&&e.append(i,S0e(n))}}return e}function S0e(o){const e=o.path?ze.parse(o.path):void 0;return b0e(o.name,e,async()=>new Uint8Array(await o.arrayBuffer()))}const y0e=Object.freeze([L3.EDITORS,L3.FILES,sb.RESOURCES,sb.INTERNAL_URI_LIST]);function eH(o,e=!1){const t=JV(o),i=t.get(sb.INTERNAL_URI_LIST);if(i)t.replace(qi.uriList,i);else if(e||!t.has(qi.uriList)){const n=[];for(const s of o.items){const r=s.getAsFile();if(r){const a=r.path;try{a?n.push(ze.file(a).toString()):n.push(ze.parse(r.name,!0).toString())}catch{}}}n.length&&t.replace(qi.uriList,zR(zL.create(n)))}for(const n of y0e)t.delete(n);return t}function L0e(o,e,t){var i,n;return{edits:[...e.map(s=>new Od(o,typeof t.insertText=="string"?{range:s,text:t.insertText,insertAsSnippet:!1}:{range:s,text:t.insertText.snippet,insertAsSnippet:!0})),...(n=(i=t.additionalEdit)===null||i===void 0?void 0:i.edits)!==null&&n!==void 0?n:[]]}}function tH(o){var e;function t(a,l){return"providerId"in a&&a.providerId===l.providerId||"mimeType"in a&&a.mimeType===l.handledMimeType}const i=new Map;for(const a of o)for(const l of(e=a.yieldTo)!==null&&e!==void 0?e:[])for(const d of o)if(d!==a&&t(l,d)){let c=i.get(a);c||(c=[],i.set(a,c)),c.push(d)}if(!i.size)return Array.from(o);const n=new Set,s=[];function r(a){if(!a.length)return[];const l=a[0];if(s.includes(l))return console.warn(`Yield to cycle detected for ${l.providerId}`),a;if(n.has(l))return r(a.slice(1));let d=[];const c=i.get(l);return c&&(s.push(l),d=r(c),s.pop()),n.add(l),[...d,l,...r(a.slice(1))]}return r(Array.from(o))}var D0e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},x0e=function(o,e){return function(t,i){e(t,i,o)}};const k0e=st.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:b7,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class $L extends q{constructor(e,t,i,n,s){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=s,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=pe(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=pe("span.icon");this.domNode.append(t),t.classList.add(...Ue.asClassNameArray(ve.loading),"codicon-modifier-spin");const i=()=>{const n=this.editor.getOption(66);this.domNode.style.height=`${n}px`,this.domNode.style.width=`${Math.ceil(.8*n)}px`};i(),this._register(this.editor.onDidChangeConfiguration(n=>{(n.hasChanged(52)||n.hasChanged(66))&&i()})),this._register(J(this.domNode,Se.CLICK,n=>{this.delegate.cancel()}))}getId(){return $L.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}$L.baseId="editor.widget.inlineProgressWidget";let zS=class extends q{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new An),this._currentWidget=new An,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}async showWhile(e,t,i){const n=this._operationIdPool++;this._currentOperation=n,this.clear(),this._showPromise.value=lu(()=>{const s=k.fromPositions(e);this._currentDecorations.set([{range:s,options:k0e}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance($L,this.id,this._editor,s,t,i))},this._showDelay);try{return await i}finally{this._currentOperation===n&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};zS=D0e([x0e(2,qe)],zS);var iH=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rv=function(o,e){return function(t,i){e(t,i,o)}},BT;let $S=BT=class extends q{constructor(e,t,i,n,s,r,a,l,d,c){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=s,this.edits=r,this.onSelectNewEdit=a,this._contextMenuService=l,this._keybindingService=c,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(d),this.visibleContext.set(!0),this._register(je(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(je(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(u=>{s.containsPosition(u.position)||this.dispose()})),this._register(ye.runAndSubscribe(c.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var e;const t=(e=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||e===void 0?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=pe(".post-edit-widget"),this.button=this._register(new mS(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(J(this.domNode,Se.CLICK,()=>this.showSelector()))}getId(){return BT.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=gn(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>Qf({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};$S.baseId="editor.widget.postEditWidget";$S=BT=iH([rv(7,Sr),rv(8,Xe),rv(9,Xt)],$S);let US=class extends q{constructor(e,t,i,n,s,r){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._instantiationService=s,this._bulkEditService=r,this._currentWidget=this._register(new An),this._register(ye.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,t,i,n){var s,r;const a=this._editor.getModel();if(!a||!e.length)return;const l=t.allEdits[t.activeEditIndex];if(!l)return;let d=[];(typeof l.insertText=="string"?l.insertText==="":l.insertText.snippet==="")?d=[]:d=e.map(v=>new Od(a.uri,typeof l.insertText=="string"?{range:v,text:l.insertText,insertAsSnippet:!1}:{range:v,text:l.insertText.snippet,insertAsSnippet:!0}));const u={edits:[...d,...(r=(s=l.additionalEdit)===null||s===void 0?void 0:s.edits)!==null&&r!==void 0?r:[]]},h=e[0],g=a.deltaDecorations([],[{range:h,options:{description:"paste-line-suffix",stickiness:0}}]);let f,m;try{f=await this._bulkEditService.apply(u,{editor:this._editor,token:n}),m=a.getDecorationRange(g[0])}finally{a.deltaDecorations(g,[])}i&&f.isApplied&&t.allEdits.length>1&&this.show(m??h,t,async v=>{const _=this._editor.getModel();_&&(await _.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:v,allEdits:t.allEdits},i,n))})}show(e,t,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance($S,this._id,this._editor,this._visibleContext,this._showCommand,e,t,i))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)===null||e===void 0||e.showSelector()}};US=iH([rv(4,qe),rv(5,f0)],US);var I0e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lf=function(o,e){return function(t,i){e(t,i,o)}},WT;const nH="editor.changePasteType",sH=new De("pasteWidgetVisible",!1,p("pasteWidgetVisible","Whether the paste widget is showing")),fk="application/vnd.code.copyMetadata";let wg=WT=class extends q{static get(e){return e.getContribution(WT.ID)}constructor(e,t,i,n,s,r,a){super(),this._bulkEditService=i,this._clipboardService=n,this._languageFeaturesService=s,this._quickInputService=r,this._progressService=a,this._editor=e;const l=e.getContainerDomNode();this._register(J(l,"copy",d=>this.handleCopy(d))),this._register(J(l,"cut",d=>this.handleCopy(d))),this._register(J(l,"paste",d=>this.handlePaste(d),!0)),this._pasteProgressManager=this._register(new zS("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(US,"pasteIntoEditor",e,sH,{id:nH,label:p("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},fm().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(84).enabled&&!this._editor.getOption(90)}handleCopy(e){var t,i;if(!this._editor.hasTextFocus()||(Tu&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled()))return;const n=this._editor.getModel(),s=this._editor.getSelections();if(!n||!(s!=null&&s.length))return;const r=this._editor.getOption(37);let a=s;const l=s.length===1&&s[0].isEmpty();if(l){if(!r)return;a=[new k(a[0].startLineNumber,1,a[0].startLineNumber,1+n.getLineLength(a[0].startLineNumber))]}const d=(t=this._editor._getViewModel())===null||t===void 0?void 0:t.getPlainTextToCopy(s,r,is),u={multicursorText:Array.isArray(d)?d:null,pasteOnNewLine:l,mode:null},h=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter(_=>!!_.prepareDocumentPaste);if(!h.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:u});return}const g=JV(e.clipboardData),f=h.flatMap(_=>{var b;return(b=_.copyMimeTypes)!==null&&b!==void 0?b:[]}),m=HL();this.setCopyMetadata(e.clipboardData,{id:m,providerCopyMimeTypes:f,defaultPastePayload:u});const v=_n(async _=>{const b=Ia(await Promise.all(h.map(async C=>{try{return await C.prepareDocumentPaste(n,a,g,_)}catch(w){console.error(w);return}})));b.reverse();for(const C of b)for(const[w,S]of C)g.replace(w,S);return g});(i=this._currentCopyOperation)===null||i===void 0||i.dataTransferPromise.cancel(),this._currentCopyOperation={handle:m,dataTransferPromise:v}}async handlePaste(e){var t,i;if(!e.clipboardData||!this._editor.hasTextFocus())return;(t=this._currentPasteOperation)===null||t===void 0||t.cancel(),this._currentPasteOperation=void 0;const n=this._editor.getModel(),s=this._editor.getSelections();if(!(s!=null&&s.length)||!n||!this.isPasteAsEnabled())return;const r=this.fetchCopyMetadata(e),a=eH(e.clipboardData);a.delete(fk);const l=[...e.clipboardData.types,...(i=r==null?void 0:r.providerCopyMimeTypes)!==null&&i!==void 0?i:[],qi.uriList],d=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter(c=>{var u;return(u=c.pasteMimeTypes)===null||u===void 0?void 0:u.some(h=>XV(h,l))});d.length&&(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,d,s,a,r):this.doPasteInline(d,s,a,r))}doPasteInline(e,t,i,n){const s=_n(async r=>{const a=this._editor;if(!a.hasModel())return;const l=a.getModel(),d=new bu(a,3,void 0,r);try{if(await this.mergeInDataFromCopy(i,n,d.token),d.token.isCancellationRequested)return;const c=e.filter(h=>D3(h,i));if(!c.length||c.length===1&&c[0].id==="text"){await this.applyDefaultPasteHandler(i,n,d.token);return}const u=await this.getPasteEdits(c,i,l,t,d.token);if(d.token.isCancellationRequested)return;if(u.length===1&&u[0].providerId==="text"){await this.applyDefaultPasteHandler(i,n,d.token);return}if(u.length){const h=a.getOption(84).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:u},h,d.token)}await this.applyDefaultPasteHandler(i,n,d.token)}finally{d.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}});this._pasteProgressManager.showWhile(t[0].getEndPosition(),p("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),s),this._currentPasteOperation=s}showPasteAsPick(e,t,i,n,s){const r=_n(async a=>{const l=this._editor;if(!l.hasModel())return;const d=l.getModel(),c=new bu(l,3,void 0,a);try{if(await this.mergeInDataFromCopy(n,s,c.token),c.token.isCancellationRequested)return;let u=t.filter(m=>D3(m,n));e&&(u=u.filter(m=>m.id===e));const h=await this.getPasteEdits(u,n,d,i,c.token);if(c.token.isCancellationRequested||!h.length)return;let g;if(e)g=h.at(0);else{const m=await this._quickInputService.pick(h.map(v=>({label:v.label,description:v.providerId,detail:v.detail,edit:v})),{placeHolder:p("pasteAsPickerPlaceholder","Select Paste Action")});g=m==null?void 0:m.edit}if(!g)return;const f=L0e(d.uri,i,g);await this._bulkEditService.apply(f,{editor:this._editor})}finally{c.dispose(),this._currentPasteOperation===r&&(this._currentPasteOperation=void 0)}});this._progressService.withProgress({location:10,title:p("pasteAsProgress","Running paste handlers")},()=>r)}setCopyMetadata(e,t){e.setData(fk,JSON.stringify(t))}fetchCopyMetadata(e){var t;if(!e.clipboardData)return;const i=e.clipboardData.getData(fk);if(i)try{return JSON.parse(i)}catch{return}const[n,s]=lE.getTextData(e.clipboardData);if(s)return{defaultPastePayload:{mode:s.mode,multicursorText:(t=s.multicursorText)!==null&&t!==void 0?t:null,pasteOnNewLine:!!s.isFromEmptySelection}}}async mergeInDataFromCopy(e,t,i){var n;if(t!=null&&t.id&&((n=this._currentCopyOperation)===null||n===void 0?void 0:n.handle)===t.id){const s=await this._currentCopyOperation.dataTransferPromise;if(i.isCancellationRequested)return;for(const[r,a]of s)e.replace(r,a)}if(!e.has(qi.uriList)){const s=await this._clipboardService.readResources();if(i.isCancellationRequested)return;s.length&&e.append(qi.uriList,zR(zL.create(s)))}}async getPasteEdits(e,t,i,n,s){const r=await Cy(Promise.all(e.map(async l=>{var d;try{const c=await((d=l.provideDocumentPasteEdits)===null||d===void 0?void 0:d.call(l,i,n,t,s));if(c)return{...c,providerId:l.id}}catch(c){console.error(c)}})),s),a=Ia(r??[]);return tH(a)}async applyDefaultPasteHandler(e,t,i){var n,s,r;const a=(n=e.get(qi.text))!==null&&n!==void 0?n:e.get("text");if(!a)return;const l=await a.asString();if(i.isCancellationRequested)return;const d={text:l,pasteOnNewLine:(s=t==null?void 0:t.defaultPastePayload.pasteOnNewLine)!==null&&s!==void 0?s:!1,multicursorText:(r=t==null?void 0:t.defaultPastePayload.multicursorText)!==null&&r!==void 0?r:null,mode:null};this._editor.trigger("keyboard","paste",d)}};wg.ID="editor.contrib.copyPasteActionController";wg=WT=I0e([lf(1,qe),lf(2,f0),lf(3,Xd),lf(4,Me),lf(5,Ha),lf(6,JB)],wg);function D3(o,e){var t;return!!(!((t=o.pasteMimeTypes)===null||t===void 0)&&t.some(i=>e.matches(i)))}var $R=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xb=function(o,e){return function(t,i){e(t,i,o)}};const UR=p("builtIn","Built-in");class jR{async provideDocumentPasteEdits(e,t,i,n){const s=await this.getEdit(i,n);return s?{insertText:s.insertText,label:s.label,detail:s.detail,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}:void 0}async provideDocumentOnDropEdits(e,t,i,n){const s=await this.getEdit(i,n);return s?{insertText:s.insertText,label:s.label,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}:void 0}}class oH extends jR{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[qi.text],this.pasteMimeTypes=[qi.text]}async getEdit(e,t){const i=e.get(qi.text);if(!i||e.has(qi.uriList))return;const n=await i.asString();return{handledMimeType:qi.text,label:p("text.label","Insert Plain Text"),detail:UR,insertText:n}}}class rH extends jR{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[qi.uriList],this.pasteMimeTypes=[qi.uriList]}async getEdit(e,t){const i=await aH(e);if(!i.length||t.isCancellationRequested)return;let n=0;const s=i.map(({uri:a,originalText:l})=>a.scheme===ot.file?a.fsPath:(n++,l)).join(" ");let r;return n>0?r=i.length>1?p("defaultDropProvider.uriList.uris","Insert Uris"):p("defaultDropProvider.uriList.uri","Insert Uri"):r=i.length>1?p("defaultDropProvider.uriList.paths","Insert Paths"):p("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:qi.uriList,insertText:s,label:r,detail:UR}}}let jS=class extends jR{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[qi.uriList],this.pasteMimeTypes=[qi.uriList]}async getEdit(e,t){const i=await aH(e);if(!i.length||t.isCancellationRequested)return;const n=Ia(i.map(({uri:s})=>{const r=this._workspaceContextService.getWorkspaceFolder(s);return r?Ooe(r.uri,s):void 0}));if(n.length)return{handledMimeType:qi.uriList,insertText:n.join(" "),label:i.length>1?p("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):p("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:UR}}};jS=$R([xb(0,ag)],jS);async function aH(o){const e=o.get(qi.uriList);if(!e)return[];const t=await e.asString(),i=[];for(const n of zL.parse(t))try{i.push({uri:ze.parse(n),originalText:n})}catch{}return i}let VT=class extends q{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new oH)),this._register(e.documentOnDropEditProvider.register("*",new rH)),this._register(e.documentOnDropEditProvider.register("*",new jS(t)))}};VT=$R([xb(0,Me),xb(1,ag)],VT);let HT=class extends q{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new oH)),this._register(e.documentPasteEditProvider.register("*",new rH)),this._register(e.documentPasteEditProvider.register("*",new jS(t)))}};HT=$R([xb(0,Me),xb(1,ag)],HT);At(wg.ID,wg,0);_L(HT);we(new class extends Rn{constructor(){super({id:nH,precondition:sH,kbOpts:{weight:100,primary:2137}})}runEditorCommand(o,e,t){var i;return(i=wg.get(e))===null||i===void 0?void 0:i.changePasteType()}});_e(class extends Te{constructor(){super({id:"editor.action.pasteAs",label:p("pasteAs","Paste As..."),alias:"Paste As...",precondition:void 0,metadata:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:p("pasteAs.id","The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(o,e,t){var i;const n=typeof(t==null?void 0:t.id)=="string"?t.id:void 0;return(i=wg.get(e))===null||i===void 0?void 0:i.pasteAs(n)}});class E0e{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class x3{constructor(e){this.identifier=e}}const lH=bt("treeViewsDndService");xt(lH,E0e,1);var N0e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qC=function(o,e){return function(t,i){e(t,i,o)}},zT;const dH="editor.experimental.dropIntoEditor.defaultProvider",cH="editor.changeDropType",uH=new De("dropWidgetVisible",!1,p("dropWidgetVisible","Whether the drop widget is showing"));let nm=zT=class extends q{static get(e){return e.getContribution(zT.ID)}constructor(e,t,i,n,s){super(),this._configService=i,this._languageFeaturesService=n,this._treeViewsDragAndDropService=s,this.treeItemsTransfer=Db.getInstance(),this._dropProgressManager=this._register(t.createInstance(zS,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(US,"dropIntoEditor",e,uH,{id:cH,label:p("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(r=>this.onDropIntoEditor(e,r.position,r.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,t,i){var n;if(!i.dataTransfer||!e.hasModel())return;(n=this._currentOperation)===null||n===void 0||n.cancel(),e.focus(),e.setPosition(t);const s=_n(async r=>{const a=new bu(e,1,void 0,r);try{const l=await this.extractDataTransferData(i);if(l.size===0||a.token.isCancellationRequested)return;const d=e.getModel();if(!d)return;const c=this._languageFeaturesService.documentOnDropEditProvider.ordered(d).filter(h=>h.dropMimeTypes?h.dropMimeTypes.some(g=>l.matches(g)):!0),u=await this.getDropEdits(c,d,t,l,a);if(a.token.isCancellationRequested)return;if(u.length){const h=this.getInitialActiveEditIndex(d,u),g=e.getOption(36).showDropSelector==="afterDrop";await this._postDropWidgetManager.applyEditAndShowIfNeeded([k.fromPositions(t)],{activeEditIndex:h,allEdits:u},g,r)}}finally{a.dispose(),this._currentOperation===s&&(this._currentOperation=void 0)}});this._dropProgressManager.showWhile(t,p("dropIntoEditorProgress","Running drop handlers. Click to cancel"),s),this._currentOperation=s}async getDropEdits(e,t,i,n,s){const r=await Cy(Promise.all(e.map(async l=>{try{const d=await l.provideDocumentOnDropEdits(t,i,n,s.token);if(d)return{...d,providerId:l.id}}catch(d){console.error(d)}})),s.token),a=Ia(r??[]);return tH(a)}getInitialActiveEditIndex(e,t){const i=this._configService.getValue(dH,{resource:e.uri});for(const[n,s]of Object.entries(i)){const r=t.findIndex(a=>s===a.providerId&&a.handledMimeType&&XV(n,[a.handledMimeType]));if(r>=0)return r}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new YV;const t=eH(e.dataTransfer);if(this.treeItemsTransfer.hasData(x3.prototype)){const i=this.treeItemsTransfer.getData(x3.prototype);if(Array.isArray(i))for(const n of i){const s=await this._treeViewsDragAndDropService.removeDragOperationTransfer(n.identifier);if(s)for(const[r,a]of s)t.replace(r,a)}}return t}};nm.ID="editor.contrib.dropIntoEditorController";nm=zT=N0e([qC(1,qe),qC(2,Dt),qC(3,Me),qC(4,lH)],nm);At(nm.ID,nm,2);we(new class extends Rn{constructor(){super({id:cH,precondition:uH,kbOpts:{weight:100,primary:2137}})}runEditorCommand(o,e,t){var i;(i=nm.get(e))===null||i===void 0||i.changeDropType()}});_L(VT);xi.as(Va.Configuration).registerConfiguration({...Xy,properties:{[dH]:{type:"object",scope:5,description:p("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}});class _s{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e{if(this._highlightedDecorationId!==null&&(n.changeDecorationOptions(this._highlightedDecorationId,_s._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,n.changeDecorationOptions(this._highlightedDecorationId,_s._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let s=this._editor.getModel().getDecorationRange(t);if(s.startLineNumber!==s.endLineNumber&&s.endColumn===1){const r=s.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(r);s=new k(s.startLineNumber,s.startColumn,r,a)}this._rangeHighlightDecorationId=n.addDecoration(s,_s._RANGE_HIGHLIGHT_DECORATION)}}),i}set(e,t){this._editor.changeDecorations(i=>{let n=_s._FIND_MATCH_DECORATION;const s=[];if(e.length>1e3){n=_s._FIND_MATCH_NO_OVERVIEW_DECORATION;const a=this._editor.getModel().getLineCount(),d=this._editor.getLayoutInfo().height/a,c=Math.max(2,Math.ceil(3/d));let u=e[0].range.startLineNumber,h=e[0].range.endLineNumber;for(let g=1,f=e.length;g=m.startLineNumber?m.endLineNumber>h&&(h=m.endLineNumber):(s.push({range:new k(u,1,h,1),options:_s._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),u=m.startLineNumber,h=m.endLineNumber)}s.push({range:new k(u,1,h,1),options:_s._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const r=new Array(e.length);for(let a=0,l=e.length;ai.removeDecoration(a)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(a=>i.addDecoration(a,_s._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){const i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(!(!n||n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return s;if(!(s.startColumn0){const i=[];for(let r=0;rk.compareRangesUsingStarts(r.range,a.range));const n=[];let s=i[0];for(let r=1;r0?e[0].toUpperCase()+e.substr(1):o[0][0].toUpperCase()!==o[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function k3(o,e,t){return o[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&o[0].split(t).length===e.split(t).length}function I3(o,e,t){const i=e.split(t),n=o[0].split(t);let s="";return i.forEach((r,a)=>{s+=hH([n[a]],r)+t}),s.slice(0,-1)}class E3{constructor(e){this.staticValue=e,this.kind=0}}class M0e{constructor(e){this.pieces=e,this.kind=1}}class sm{static fromStaticValue(e){return new sm([qh.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new E3(""):e.length===1&&e[0].staticValue!==null?this._state=new E3(e[0].staticValue):this._state=new M0e(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?hH(e,this._state.staticValue):this._state.staticValue;let i="";for(let n=0,s=this._state.pieces.length;n0){const l=[],d=r.caseOps.length;let c=0;for(let u=0,h=a.length;u=d){l.push(a.slice(u));break}switch(r.caseOps[c]){case"U":l.push(a[u].toUpperCase());break;case"u":l.push(a[u].toUpperCase()),c++;break;case"L":l.push(a[u].toLowerCase());break;case"l":l.push(a[u].toLowerCase()),c++;break;default:l.push(a[u])}}a=l.join("")}i+=a}return i}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let i="";for(;e>0;){if(e=n)break;const r=o.charCodeAt(i);switch(r){case 92:t.emitUnchanged(i-1),t.emitStatic("\\",i+1);break;case 110:t.emitUnchanged(i-1),t.emitStatic(` -`,i+1);break;case 116:t.emitUnchanged(i-1),t.emitStatic(" ",i+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(i-1),t.emitStatic("",i+1),e.push(String.fromCharCode(r));break}continue}if(s===36){if(i++,i>=n)break;const r=o.charCodeAt(i);if(r===36){t.emitUnchanged(i-1),t.emitStatic("$",i+1);continue}if(r===48||r===38){t.emitUnchanged(i-1),t.emitMatchIndex(0,i+1,e),e.length=0;continue}if(49<=r&&r<=57){let a=r-48;if(i+1this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(i=>{(i.reason===3||i.reason===5||i.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(i=>{this._ignoreModelContentChanged||(i.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(i=>this._onStateChanged(i))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,jt(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},P0e)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;typeof t<"u"?t!==null&&(Array.isArray(t)?i=t:i=[t]):i=this._decorations.getFindScopes(),i!==null&&(i=i.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new k(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));const n=this._findMatches(i,!1,Fc);this._decorations.set(n,i);const s=this._editor.getSelection();let r=this._decorations.getCurrentMatchesPosition(s);if(r===0&&n.length>0){const a=Mv(n.map(l=>l.range),l=>k.compareRangesUsingStarts(l,s)>=0);r=a>0?a-1+1:r}this._state.changeMatchInfo(r,this._decorations.getCount(),void 0),e&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||n===1?(i===1?i=s.getLineCount():i--,n=s.getLineMaxColumn(i)):n--,new z(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const c=this._decorations.matchAfterPosition(e);c&&this._setCurrentFindMatch(c);return}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||n===s.getLineMaxColumn(i)?(i===s.getLineCount()?i=1:i++,n=1):n++,new z(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const i=this._decorations.matchBeforePosition(e);i&&this._setCurrentFindMatch(i);return}if(this._decorations.getCount()av._getSearchRange(this._editor.getModel(),s));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=Fc?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const t=new dh(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null).parseSearchRequest();if(!t)return;let i=t.regex;if(!i.multiline){let u="mu";i.ignoreCase&&(u+="i"),i.global&&(u+="g"),i=new RegExp(i.source,u)}const n=this._editor.getModel(),s=n.getValue(1),r=n.getFullModelRange(),a=this._getReplacePattern();let l;const d=this._state.preserveCase;a.hasReplacementPatterns||d?l=s.replace(i,function(){return a.buildReplaceString(arguments,d)}):l=s.replace(i,a.buildReplaceString(null,d));const c=new nA(r,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",c)}_regularReplaceAll(e){const t=this._getReplacePattern(),i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let r=0,a=i.length;rr.range),n);this._executeEditorCommand("replaceAll",s)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let i=this._findMatches(e,!1,1073741824).map(s=>new Re(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn));const n=this._editor.getSelection();for(let s=0,r=i.length;sthis._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const n={inputActiveOptionBorder:Ee(KM),inputActiveOptionForeground:Ee(qM),inputActiveOptionBackground:Ee(Ih)};this.caseSensitive=this._register(new I6({appendTitle:this._keybindingLabelFor(ai.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,...n})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new E6({appendTitle:this._keybindingLabelFor(ai.ToggleWholeWordCommand),isChecked:this._state.wholeWord,...n})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new N6({appendTitle:this._keybindingLabelFor(ai.ToggleRegexCommand),isChecked:this._state.isRegex,...n})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(s=>{let r=!1;s.isRegex&&(this.regex.checked=this._state.isRegex,r=!0),s.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,r=!0),s.matchCase&&(this.caseSensitive.checked=this._state.matchCase,r=!0),!this._state.isRevealed&&r&&this._revealTemporarily()})),this._register(J(this._domNode,Se.MOUSE_LEAVE,s=>this._onMouseLeave())),this._register(J(this._domNode,"mouseover",s=>this._onMouseOver()))}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return jL.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}jL.ID="editor.contrib.findOptionsWidget";function JC(o,e){return o===1?!0:o===2?!1:e}class O0e extends q{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return JC(this._isRegexOverride,this._isRegex)}get wholeWord(){return JC(this._wholeWordOverride,this._wholeWord)}get matchCase(){return JC(this._matchCaseOverride,this._matchCase)}get preserveCase(){return JC(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new W),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,i){const n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let s=!1;t===0&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,s=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,s=!0),typeof i<"u"&&(k.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,s=!0)),s&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;const s={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let r=!1;const a=this.isRegex,l=this.wholeWord,d=this.matchCase,c=this.preserveCase;typeof e.searchString<"u"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,s.searchString=!0,r=!0),typeof e.replaceString<"u"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,s.replaceString=!0,r=!0),typeof e.isRevealed<"u"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,s.isRevealed=!0,r=!0),typeof e.isReplaceRevealed<"u"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,s.isReplaceRevealed=!0,r=!0),typeof e.isRegex<"u"&&(this._isRegex=e.isRegex),typeof e.wholeWord<"u"&&(this._wholeWord=e.wholeWord),typeof e.matchCase<"u"&&(this._matchCase=e.matchCase),typeof e.preserveCase<"u"&&(this._preserveCase=e.preserveCase),typeof e.searchScope<"u"&&(!((n=e.searchScope)===null||n===void 0)&&n.every(u=>{var h;return(h=this._searchScope)===null||h===void 0?void 0:h.some(g=>!k.equalsRange(g,u))})||(this._searchScope=e.searchScope,s.searchScope=!0,r=!0)),typeof e.loop<"u"&&this._loop!==e.loop&&(this._loop=e.loop,s.loop=!0,r=!0),typeof e.isSearching<"u"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,s.isSearching=!0,r=!0),typeof e.filters<"u"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,s.filters=!0,r=!0),this._isRegexOverride=typeof e.isRegexOverride<"u"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride<"u"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride<"u"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride<"u"?e.preserveCaseOverride:0,a!==this.isRegex&&(r=!0,s.isRegex=!0),l!==this.wholeWord&&(r=!0,s.wholeWord=!0),d!==this.matchCase&&(r=!0,s.matchCase=!0),c!==this.preserveCase&&(r=!0,s.preserveCase=!0),r&&this._onFindReplaceStateChange.fire(s)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=Fc}}const F0e=p("defaultLabel","input"),B0e=p("label.preserveCaseToggle","Preserve Case");class W0e extends Lm{constructor(e){super({icon:ve.preserveCase,title:B0e+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class V0e extends Gr{constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new W),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new W),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new W),this._onInput=this._register(new W),this._onKeyUp=this._register(new W),this._onPreserveCaseKeyDown=this._register(new W),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||F0e;const s=n.appendPreserveCaseLabel||"",r=n.history||[],a=!!n.flexibleHeight,l=!!n.flexibleWidth,d=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new T6(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:r,showHistoryHint:n.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:d,inputBoxStyles:n.inputBoxStyles})),this.preserveCase=this._register(new W0e({appendTitle:s,isChecked:!1,...n.toggleStyles})),this._register(this.preserveCase.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(h=>{this._onPreserveCaseKeyDown.fire(h)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const c=[this.preserveCase.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){const g=c.indexOf(this.domNode.ownerDocument.activeElement);if(g>=0){let f=-1;h.equals(17)?f=(g+1)%c.length:h.equals(15)&&(g===0?f=c.length-1:f=g-1),h.equals(9)?(c[g].blur(),this.inputBox.focus()):f>=0&&c[f].focus(),ct.stop(h,!0)}}});const u=document.createElement("div");u.className="controls",u.style.display=this._showOptionButtons?"block":"none",u.appendChild(this.preserveCase.domNode),this.domNode.appendChild(u),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,h=>this._onKeyDown.fire(h)),this.onkeyup(this.inputBox.inputElement,h=>this._onKeyUp.fire(h)),this.oninput(this.inputBox.inputElement,h=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,h=>this._onMouseDown.fire(h))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;(e=this.inputBox)===null||e===void 0||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var gH=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},fH=function(o,e){return function(t,i){e(t,i,o)}};const qR=new De("suggestWidgetVisible",!1,p("suggestWidgetVisible","Whether suggestion are visible")),GR="historyNavigationWidgetFocus",pH="historyNavigationForwardsEnabled",mH="historyNavigationBackwardsEnabled";let Wd;const e1=[];function _H(o,e){if(e1.includes(e))throw new Error("Cannot register the same widget multiple times");e1.push(e);const t=new de,i=new De(GR,!1).bindTo(o),n=new De(pH,!0).bindTo(o),s=new De(mH,!0).bindTo(o),r=()=>{i.set(!0),Wd=e},a=()=>{i.set(!1),Wd===e&&(Wd=void 0)};return Dy(e.element)&&r(),t.add(e.onDidFocus(()=>r())),t.add(e.onDidBlur(()=>a())),t.add(je(()=>{e1.splice(e1.indexOf(e),1),a()})),{historyNavigationForwardsEnablement:n,historyNavigationBackwardsEnablement:s,dispose(){t.dispose()}}}let $T=class extends M6{constructor(e,t,i,n){super(e,t,i);const s=this._register(n.createScoped(this.inputBox.element));this._register(_H(s,this.inputBox))}};$T=gH([fH(3,Xe)],$T);let UT=class extends V0e{constructor(e,t,i,n,s=!1){super(e,t,s,i);const r=this._register(n.createScoped(this.inputBox.element));this._register(_H(r,this.inputBox))}};UT=gH([fH(3,Xe)],UT);Gs.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:ae.and(ae.has(GR),ae.equals(mH,!0),ae.not("isComposing"),qR.isEqualTo(!1)),primary:16,secondary:[528],handler:o=>{Wd==null||Wd.showPreviousValue()}});Gs.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:ae.and(ae.has(GR),ae.equals(pH,!0),ae.not("isComposing"),qR.isEqualTo(!1)),primary:18,secondary:[530],handler:o=>{Wd==null||Wd.showNextValue()}});function N3(o){var e,t;return((e=o.lookupKeybinding("history.showPrevious"))===null||e===void 0?void 0:e.getElectronAccelerator())==="Up"&&((t=o.lookupKeybinding("history.showNext"))===null||t===void 0?void 0:t.getElectronAccelerator())==="Down"}const H0e=Zi("find-selection",ve.selection,p("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),T3=Zi("find-collapsed",ve.chevronRight,p("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),M3=Zi("find-expanded",ve.chevronDown,p("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),z0e=Zi("find-replace",ve.replace,p("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),$0e=Zi("find-replace-all",ve.replaceAll,p("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),U0e=Zi("find-previous-match",ve.arrowUp,p("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),j0e=Zi("find-next-match",ve.arrowDown,p("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),K0e=p("label.findDialog","Find / Replace"),q0e=p("label.find","Find"),G0e=p("placeholder.find","Find"),Z0e=p("label.previousMatchButton","Previous Match"),Y0e=p("label.nextMatchButton","Next Match"),X0e=p("label.toggleSelectionFind","Find in Selection"),Q0e=p("label.closeButton","Close"),J0e=p("label.replace","Replace"),eCe=p("placeholder.replace","Replace"),tCe=p("label.replaceButton","Replace"),iCe=p("label.replaceAllButton","Replace All"),nCe=p("label.toggleReplaceButton","Toggle Replace"),sCe=p("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Fc),oCe=p("label.matchesLocation","{0} of {1}"),A3=p("label.noResults","No results"),qa=419,rCe=275,aCe=rCe-54;let r_=69;const lCe=33,R3="ctrlEnterReplaceAll.windows.donotask",P3=It?256:2048;class pk{constructor(e){this.afterLineNumber=e,this.heightInPx=lCe,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function O3(o,e,t){const i=!!e.match(/\n/);if(t&&i&&t.selectionStart>0){o.stopPropagation();return}}function F3(o,e,t){const i=!!e.match(/\n/);if(t&&i&&t.selectionEndthis._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(c=>this._onStateChanged(c))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(c=>{if(c.hasChanged(90)&&(this._codeEditor.getOption(90)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),c.hasChanged(143)&&this._tryUpdateWidgetWidth(),c.hasChanged(2)&&this.updateAccessibilitySupport(),c.hasChanged(41)){const u=this._codeEditor.getOption(41).loop;this._state.change({loop:u},!1);const h=this._codeEditor.getOption(41).addExtraSpaceOnTop;h&&!this._viewZone&&(this._viewZone=new pk(0),this._showViewZone()),!h&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(async()=>{if(this._isVisible){const c=await this._controller.getGlobalBufferTerm();c&&c!==this._state.searchString&&(this._state.change({searchString:c},!1),this._findInput.select())}})),this._findInputFocused=UL.bindTo(r),this._findFocusTracker=this._register(Pl(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=KR.bindTo(r),this._replaceFocusTracker=this._register(Pl(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new pk(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(c=>{if(c.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return KL.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(90)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=zs(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,nt)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=r_+"px",this._state.matchesCount>=Fc?this._matchesCount.title=sCe:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let e;if(this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=Fc&&(t+="+");let i=String(this._state.matchesPosition);i==="0"&&(i="?"),e=Xh(oCe,i,t)}else e=A3;this._matchesCount.appendChild(document.createTextNode(e)),mo(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),r_=Math.max(r_,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===A3)return i===""?p("ariaSearchNoResultEmpty","{0} found",e):p("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const n=p("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),s=this._codeEditor.getModel();return s&&t.startLineNumber<=s.getLineCount()&&t.startLineNumber>=1?`${s.getLineContent(t.startLineNumber)}, ${n}`:n}return p("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const i=!this._codeEditor.getOption(90);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const i=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=i;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=gn(i),s=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),r=n.left+(s?s.left:0),a=s?s.top:0;if(this._viewZone&&ae.startLineNumber&&(t=!1);const l=U7(this._domNode).left;r>l&&(t=!1);const d=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(d?d.left:0)>l&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const i=this._viewZone;this._viewZoneId!==void 0||!i||this._codeEditor.changeViewZones(n=>{i.heightInPx=this._getHeight(),this._viewZoneId=n.addZone(i),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+i.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new pk(0));const i=this._viewZone;this._codeEditor.changeViewZones(n=>{if(this._viewZoneId!==void 0){const s=this._getHeight();if(s===i.heightInPx)return;const r=s-i.heightInPx;i.heightInPx=s,n.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+r);return}else{let s=this._getHeight();if(s-=this._codeEditor.getOption(83).top,s<=0)return;i.heightInPx=s,this._viewZoneId=n.addZone(i),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!this._domNode.isConnected)return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const i=e.width,n=e.minimap.minimapWidth;let s=!1,r=!1,a=!1;if(this._resized&&zs(this._domNode)>qa){this._domNode.style.maxWidth=`${i-28-n-15}px`,this._replaceInput.width=zs(this._findInput.domNode);return}if(qa+28+n>=i&&(r=!0),qa+28+n-r_>=i&&(a=!0),qa+28+n-r_>=i+50&&(s=!0),this._domNode.classList.toggle("collapsed-find-widget",s),this._domNode.classList.toggle("narrow-find-widget",a),this._domNode.classList.toggle("reduced-find-widget",r),!a&&!s&&(this._domNode.style.maxWidth=`${i-28-n-15}px`),this._findInput.layout({collapsedFindWidget:s,narrowFindWidget:a,reducedFindWidget:r}),this._resized){const l=this._findInput.inputBox.element.clientWidth;l>0&&(this._replaceInput.width=l)}else this._isReplaceVisible&&(this._replaceInput.width=zs(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));const i=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!k.equalsRange(t,i)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(P3|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` +`),parse:o=>zL.split(o).filter(e=>!e.startsWith("#"))}),L3={EDITORS:"CodeEditors",FILES:"CodeFiles"};class L0e{}const D0e={DragAndDropContribution:"workbench.contributions.dragAndDrop"};xi.add(D0e.DragAndDropContribution,new L0e);class Db{constructor(){}static getInstance(){return Db.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}Db.INSTANCE=new Db;function JV(o){const e=new YV;for(const t of o.items){const i=t.type;if(t.kind==="string"){const n=new Promise(s=>t.getAsString(s));e.append(i,zR(n))}else if(t.kind==="file"){const n=t.getAsFile();n&&e.append(i,x0e(n))}}return e}function x0e(o){const e=o.path?ze.parse(o.path):void 0;return y0e(o.name,e,async()=>new Uint8Array(await o.arrayBuffer()))}const k0e=Object.freeze([L3.EDITORS,L3.FILES,sb.RESOURCES,sb.INTERNAL_URI_LIST]);function eH(o,e=!1){const t=JV(o),i=t.get(sb.INTERNAL_URI_LIST);if(i)t.replace(qi.uriList,i);else if(e||!t.has(qi.uriList)){const n=[];for(const s of o.items){const r=s.getAsFile();if(r){const a=r.path;try{a?n.push(ze.file(a).toString()):n.push(ze.parse(r.name,!0).toString())}catch{}}}n.length&&t.replace(qi.uriList,zR(zL.create(n)))}for(const n of k0e)t.delete(n);return t}function I0e(o,e,t){var i,n;return{edits:[...e.map(s=>new Od(o,typeof t.insertText=="string"?{range:s,text:t.insertText,insertAsSnippet:!1}:{range:s,text:t.insertText.snippet,insertAsSnippet:!0})),...(n=(i=t.additionalEdit)===null||i===void 0?void 0:i.edits)!==null&&n!==void 0?n:[]]}}function tH(o){var e;function t(a,l){return"providerId"in a&&a.providerId===l.providerId||"mimeType"in a&&a.mimeType===l.handledMimeType}const i=new Map;for(const a of o)for(const l of(e=a.yieldTo)!==null&&e!==void 0?e:[])for(const d of o)if(d!==a&&t(l,d)){let c=i.get(a);c||(c=[],i.set(a,c)),c.push(d)}if(!i.size)return Array.from(o);const n=new Set,s=[];function r(a){if(!a.length)return[];const l=a[0];if(s.includes(l))return console.warn(`Yield to cycle detected for ${l.providerId}`),a;if(n.has(l))return r(a.slice(1));let d=[];const c=i.get(l);return c&&(s.push(l),d=r(c),s.pop()),n.add(l),[...d,l,...r(a.slice(1))]}return r(Array.from(o))}var E0e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},N0e=function(o,e){return function(t,i){e(t,i,o)}};const T0e=st.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:b8,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class $L extends q{constructor(e,t,i,n,s){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=s,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=pe(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=pe("span.icon");this.domNode.append(t),t.classList.add(...Ue.asClassNameArray(ve.loading),"codicon-modifier-spin");const i=()=>{const n=this.editor.getOption(66);this.domNode.style.height=`${n}px`,this.domNode.style.width=`${Math.ceil(.8*n)}px`};i(),this._register(this.editor.onDidChangeConfiguration(n=>{(n.hasChanged(52)||n.hasChanged(66))&&i()})),this._register(J(this.domNode,Se.CLICK,n=>{this.delegate.cancel()}))}getId(){return $L.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}$L.baseId="editor.widget.inlineProgressWidget";let zS=class extends q{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new An),this._currentWidget=new An,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}async showWhile(e,t,i){const n=this._operationIdPool++;this._currentOperation=n,this.clear(),this._showPromise.value=lu(()=>{const s=k.fromPositions(e);this._currentDecorations.set([{range:s,options:T0e}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance($L,this.id,this._editor,s,t,i))},this._showDelay);try{return await i}finally{this._currentOperation===n&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};zS=E0e([N0e(2,qe)],zS);var iH=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rv=function(o,e){return function(t,i){e(t,i,o)}},BT;let $S=BT=class extends q{constructor(e,t,i,n,s,r,a,l,d,c){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=s,this.edits=r,this.onSelectNewEdit=a,this._contextMenuService=l,this._keybindingService=c,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(d),this.visibleContext.set(!0),this._register(je(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(je(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(u=>{s.containsPosition(u.position)||this.dispose()})),this._register(ye.runAndSubscribe(c.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var e;const t=(e=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||e===void 0?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=pe(".post-edit-widget"),this.button=this._register(new mS(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(J(this.domNode,Se.CLICK,()=>this.showSelector()))}getId(){return BT.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=gn(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>Qf({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};$S.baseId="editor.widget.postEditWidget";$S=BT=iH([rv(7,Sr),rv(8,Xe),rv(9,Xt)],$S);let US=class extends q{constructor(e,t,i,n,s,r){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._instantiationService=s,this._bulkEditService=r,this._currentWidget=this._register(new An),this._register(ye.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,t,i,n){var s,r;const a=this._editor.getModel();if(!a||!e.length)return;const l=t.allEdits[t.activeEditIndex];if(!l)return;let d=[];(typeof l.insertText=="string"?l.insertText==="":l.insertText.snippet==="")?d=[]:d=e.map(v=>new Od(a.uri,typeof l.insertText=="string"?{range:v,text:l.insertText,insertAsSnippet:!1}:{range:v,text:l.insertText.snippet,insertAsSnippet:!0}));const u={edits:[...d,...(r=(s=l.additionalEdit)===null||s===void 0?void 0:s.edits)!==null&&r!==void 0?r:[]]},h=e[0],g=a.deltaDecorations([],[{range:h,options:{description:"paste-line-suffix",stickiness:0}}]);let f,m;try{f=await this._bulkEditService.apply(u,{editor:this._editor,token:n}),m=a.getDecorationRange(g[0])}finally{a.deltaDecorations(g,[])}i&&f.isApplied&&t.allEdits.length>1&&this.show(m??h,t,async v=>{const _=this._editor.getModel();_&&(await _.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:v,allEdits:t.allEdits},i,n))})}show(e,t,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance($S,this._id,this._editor,this._visibleContext,this._showCommand,e,t,i))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)===null||e===void 0||e.showSelector()}};US=iH([rv(4,qe),rv(5,f0)],US);var M0e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lf=function(o,e){return function(t,i){e(t,i,o)}},WT;const nH="editor.changePasteType",sH=new De("pasteWidgetVisible",!1,p("pasteWidgetVisible","Whether the paste widget is showing")),fk="application/vnd.code.copyMetadata";let wg=WT=class extends q{static get(e){return e.getContribution(WT.ID)}constructor(e,t,i,n,s,r,a){super(),this._bulkEditService=i,this._clipboardService=n,this._languageFeaturesService=s,this._quickInputService=r,this._progressService=a,this._editor=e;const l=e.getContainerDomNode();this._register(J(l,"copy",d=>this.handleCopy(d))),this._register(J(l,"cut",d=>this.handleCopy(d))),this._register(J(l,"paste",d=>this.handlePaste(d),!0)),this._pasteProgressManager=this._register(new zS("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(US,"pasteIntoEditor",e,sH,{id:nH,label:p("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},fm().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(84).enabled&&!this._editor.getOption(90)}handleCopy(e){var t,i;if(!this._editor.hasTextFocus()||(Tu&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled()))return;const n=this._editor.getModel(),s=this._editor.getSelections();if(!n||!(s!=null&&s.length))return;const r=this._editor.getOption(37);let a=s;const l=s.length===1&&s[0].isEmpty();if(l){if(!r)return;a=[new k(a[0].startLineNumber,1,a[0].startLineNumber,1+n.getLineLength(a[0].startLineNumber))]}const d=(t=this._editor._getViewModel())===null||t===void 0?void 0:t.getPlainTextToCopy(s,r,is),u={multicursorText:Array.isArray(d)?d:null,pasteOnNewLine:l,mode:null},h=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter(_=>!!_.prepareDocumentPaste);if(!h.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:u});return}const g=JV(e.clipboardData),f=h.flatMap(_=>{var b;return(b=_.copyMimeTypes)!==null&&b!==void 0?b:[]}),m=HL();this.setCopyMetadata(e.clipboardData,{id:m,providerCopyMimeTypes:f,defaultPastePayload:u});const v=_n(async _=>{const b=Ia(await Promise.all(h.map(async C=>{try{return await C.prepareDocumentPaste(n,a,g,_)}catch(w){console.error(w);return}})));b.reverse();for(const C of b)for(const[w,S]of C)g.replace(w,S);return g});(i=this._currentCopyOperation)===null||i===void 0||i.dataTransferPromise.cancel(),this._currentCopyOperation={handle:m,dataTransferPromise:v}}async handlePaste(e){var t,i;if(!e.clipboardData||!this._editor.hasTextFocus())return;(t=this._currentPasteOperation)===null||t===void 0||t.cancel(),this._currentPasteOperation=void 0;const n=this._editor.getModel(),s=this._editor.getSelections();if(!(s!=null&&s.length)||!n||!this.isPasteAsEnabled())return;const r=this.fetchCopyMetadata(e),a=eH(e.clipboardData);a.delete(fk);const l=[...e.clipboardData.types,...(i=r==null?void 0:r.providerCopyMimeTypes)!==null&&i!==void 0?i:[],qi.uriList],d=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter(c=>{var u;return(u=c.pasteMimeTypes)===null||u===void 0?void 0:u.some(h=>XV(h,l))});d.length&&(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,d,s,a,r):this.doPasteInline(d,s,a,r))}doPasteInline(e,t,i,n){const s=_n(async r=>{const a=this._editor;if(!a.hasModel())return;const l=a.getModel(),d=new bu(a,3,void 0,r);try{if(await this.mergeInDataFromCopy(i,n,d.token),d.token.isCancellationRequested)return;const c=e.filter(h=>D3(h,i));if(!c.length||c.length===1&&c[0].id==="text"){await this.applyDefaultPasteHandler(i,n,d.token);return}const u=await this.getPasteEdits(c,i,l,t,d.token);if(d.token.isCancellationRequested)return;if(u.length===1&&u[0].providerId==="text"){await this.applyDefaultPasteHandler(i,n,d.token);return}if(u.length){const h=a.getOption(84).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:u},h,d.token)}await this.applyDefaultPasteHandler(i,n,d.token)}finally{d.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}});this._pasteProgressManager.showWhile(t[0].getEndPosition(),p("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),s),this._currentPasteOperation=s}showPasteAsPick(e,t,i,n,s){const r=_n(async a=>{const l=this._editor;if(!l.hasModel())return;const d=l.getModel(),c=new bu(l,3,void 0,a);try{if(await this.mergeInDataFromCopy(n,s,c.token),c.token.isCancellationRequested)return;let u=t.filter(m=>D3(m,n));e&&(u=u.filter(m=>m.id===e));const h=await this.getPasteEdits(u,n,d,i,c.token);if(c.token.isCancellationRequested||!h.length)return;let g;if(e)g=h.at(0);else{const m=await this._quickInputService.pick(h.map(v=>({label:v.label,description:v.providerId,detail:v.detail,edit:v})),{placeHolder:p("pasteAsPickerPlaceholder","Select Paste Action")});g=m==null?void 0:m.edit}if(!g)return;const f=I0e(d.uri,i,g);await this._bulkEditService.apply(f,{editor:this._editor})}finally{c.dispose(),this._currentPasteOperation===r&&(this._currentPasteOperation=void 0)}});this._progressService.withProgress({location:10,title:p("pasteAsProgress","Running paste handlers")},()=>r)}setCopyMetadata(e,t){e.setData(fk,JSON.stringify(t))}fetchCopyMetadata(e){var t;if(!e.clipboardData)return;const i=e.clipboardData.getData(fk);if(i)try{return JSON.parse(i)}catch{return}const[n,s]=lE.getTextData(e.clipboardData);if(s)return{defaultPastePayload:{mode:s.mode,multicursorText:(t=s.multicursorText)!==null&&t!==void 0?t:null,pasteOnNewLine:!!s.isFromEmptySelection}}}async mergeInDataFromCopy(e,t,i){var n;if(t!=null&&t.id&&((n=this._currentCopyOperation)===null||n===void 0?void 0:n.handle)===t.id){const s=await this._currentCopyOperation.dataTransferPromise;if(i.isCancellationRequested)return;for(const[r,a]of s)e.replace(r,a)}if(!e.has(qi.uriList)){const s=await this._clipboardService.readResources();if(i.isCancellationRequested)return;s.length&&e.append(qi.uriList,zR(zL.create(s)))}}async getPasteEdits(e,t,i,n,s){const r=await Cy(Promise.all(e.map(async l=>{var d;try{const c=await((d=l.provideDocumentPasteEdits)===null||d===void 0?void 0:d.call(l,i,n,t,s));if(c)return{...c,providerId:l.id}}catch(c){console.error(c)}})),s),a=Ia(r??[]);return tH(a)}async applyDefaultPasteHandler(e,t,i){var n,s,r;const a=(n=e.get(qi.text))!==null&&n!==void 0?n:e.get("text");if(!a)return;const l=await a.asString();if(i.isCancellationRequested)return;const d={text:l,pasteOnNewLine:(s=t==null?void 0:t.defaultPastePayload.pasteOnNewLine)!==null&&s!==void 0?s:!1,multicursorText:(r=t==null?void 0:t.defaultPastePayload.multicursorText)!==null&&r!==void 0?r:null,mode:null};this._editor.trigger("keyboard","paste",d)}};wg.ID="editor.contrib.copyPasteActionController";wg=WT=M0e([lf(1,qe),lf(2,f0),lf(3,Xd),lf(4,Me),lf(5,Ha),lf(6,JB)],wg);function D3(o,e){var t;return!!(!((t=o.pasteMimeTypes)===null||t===void 0)&&t.some(i=>e.matches(i)))}var $R=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xb=function(o,e){return function(t,i){e(t,i,o)}};const UR=p("builtIn","Built-in");class jR{async provideDocumentPasteEdits(e,t,i,n){const s=await this.getEdit(i,n);return s?{insertText:s.insertText,label:s.label,detail:s.detail,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}:void 0}async provideDocumentOnDropEdits(e,t,i,n){const s=await this.getEdit(i,n);return s?{insertText:s.insertText,label:s.label,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}:void 0}}class oH extends jR{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[qi.text],this.pasteMimeTypes=[qi.text]}async getEdit(e,t){const i=e.get(qi.text);if(!i||e.has(qi.uriList))return;const n=await i.asString();return{handledMimeType:qi.text,label:p("text.label","Insert Plain Text"),detail:UR,insertText:n}}}class rH extends jR{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[qi.uriList],this.pasteMimeTypes=[qi.uriList]}async getEdit(e,t){const i=await aH(e);if(!i.length||t.isCancellationRequested)return;let n=0;const s=i.map(({uri:a,originalText:l})=>a.scheme===ot.file?a.fsPath:(n++,l)).join(" ");let r;return n>0?r=i.length>1?p("defaultDropProvider.uriList.uris","Insert Uris"):p("defaultDropProvider.uriList.uri","Insert Uri"):r=i.length>1?p("defaultDropProvider.uriList.paths","Insert Paths"):p("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:qi.uriList,insertText:s,label:r,detail:UR}}}let jS=class extends jR{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[qi.uriList],this.pasteMimeTypes=[qi.uriList]}async getEdit(e,t){const i=await aH(e);if(!i.length||t.isCancellationRequested)return;const n=Ia(i.map(({uri:s})=>{const r=this._workspaceContextService.getWorkspaceFolder(s);return r?Voe(r.uri,s):void 0}));if(n.length)return{handledMimeType:qi.uriList,insertText:n.join(" "),label:i.length>1?p("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):p("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:UR}}};jS=$R([xb(0,ag)],jS);async function aH(o){const e=o.get(qi.uriList);if(!e)return[];const t=await e.asString(),i=[];for(const n of zL.parse(t))try{i.push({uri:ze.parse(n),originalText:n})}catch{}return i}let VT=class extends q{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new oH)),this._register(e.documentOnDropEditProvider.register("*",new rH)),this._register(e.documentOnDropEditProvider.register("*",new jS(t)))}};VT=$R([xb(0,Me),xb(1,ag)],VT);let HT=class extends q{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new oH)),this._register(e.documentPasteEditProvider.register("*",new rH)),this._register(e.documentPasteEditProvider.register("*",new jS(t)))}};HT=$R([xb(0,Me),xb(1,ag)],HT);At(wg.ID,wg,0);_L(HT);we(new class extends Rn{constructor(){super({id:nH,precondition:sH,kbOpts:{weight:100,primary:2137}})}runEditorCommand(o,e,t){var i;return(i=wg.get(e))===null||i===void 0?void 0:i.changePasteType()}});_e(class extends Te{constructor(){super({id:"editor.action.pasteAs",label:p("pasteAs","Paste As..."),alias:"Paste As...",precondition:void 0,metadata:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:p("pasteAs.id","The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(o,e,t){var i;const n=typeof(t==null?void 0:t.id)=="string"?t.id:void 0;return(i=wg.get(e))===null||i===void 0?void 0:i.pasteAs(n)}});class A0e{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class x3{constructor(e){this.identifier=e}}const lH=bt("treeViewsDndService");xt(lH,A0e,1);var R0e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qC=function(o,e){return function(t,i){e(t,i,o)}},zT;const dH="editor.experimental.dropIntoEditor.defaultProvider",cH="editor.changeDropType",uH=new De("dropWidgetVisible",!1,p("dropWidgetVisible","Whether the drop widget is showing"));let nm=zT=class extends q{static get(e){return e.getContribution(zT.ID)}constructor(e,t,i,n,s){super(),this._configService=i,this._languageFeaturesService=n,this._treeViewsDragAndDropService=s,this.treeItemsTransfer=Db.getInstance(),this._dropProgressManager=this._register(t.createInstance(zS,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(US,"dropIntoEditor",e,uH,{id:cH,label:p("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(r=>this.onDropIntoEditor(e,r.position,r.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,t,i){var n;if(!i.dataTransfer||!e.hasModel())return;(n=this._currentOperation)===null||n===void 0||n.cancel(),e.focus(),e.setPosition(t);const s=_n(async r=>{const a=new bu(e,1,void 0,r);try{const l=await this.extractDataTransferData(i);if(l.size===0||a.token.isCancellationRequested)return;const d=e.getModel();if(!d)return;const c=this._languageFeaturesService.documentOnDropEditProvider.ordered(d).filter(h=>h.dropMimeTypes?h.dropMimeTypes.some(g=>l.matches(g)):!0),u=await this.getDropEdits(c,d,t,l,a);if(a.token.isCancellationRequested)return;if(u.length){const h=this.getInitialActiveEditIndex(d,u),g=e.getOption(36).showDropSelector==="afterDrop";await this._postDropWidgetManager.applyEditAndShowIfNeeded([k.fromPositions(t)],{activeEditIndex:h,allEdits:u},g,r)}}finally{a.dispose(),this._currentOperation===s&&(this._currentOperation=void 0)}});this._dropProgressManager.showWhile(t,p("dropIntoEditorProgress","Running drop handlers. Click to cancel"),s),this._currentOperation=s}async getDropEdits(e,t,i,n,s){const r=await Cy(Promise.all(e.map(async l=>{try{const d=await l.provideDocumentOnDropEdits(t,i,n,s.token);if(d)return{...d,providerId:l.id}}catch(d){console.error(d)}})),s.token),a=Ia(r??[]);return tH(a)}getInitialActiveEditIndex(e,t){const i=this._configService.getValue(dH,{resource:e.uri});for(const[n,s]of Object.entries(i)){const r=t.findIndex(a=>s===a.providerId&&a.handledMimeType&&XV(n,[a.handledMimeType]));if(r>=0)return r}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new YV;const t=eH(e.dataTransfer);if(this.treeItemsTransfer.hasData(x3.prototype)){const i=this.treeItemsTransfer.getData(x3.prototype);if(Array.isArray(i))for(const n of i){const s=await this._treeViewsDragAndDropService.removeDragOperationTransfer(n.identifier);if(s)for(const[r,a]of s)t.replace(r,a)}}return t}};nm.ID="editor.contrib.dropIntoEditorController";nm=zT=R0e([qC(1,qe),qC(2,Dt),qC(3,Me),qC(4,lH)],nm);At(nm.ID,nm,2);we(new class extends Rn{constructor(){super({id:cH,precondition:uH,kbOpts:{weight:100,primary:2137}})}runEditorCommand(o,e,t){var i;(i=nm.get(e))===null||i===void 0||i.changeDropType()}});_L(VT);xi.as(Va.Configuration).registerConfiguration({...Xy,properties:{[dH]:{type:"object",scope:5,description:p("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}});class _s{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e{if(this._highlightedDecorationId!==null&&(n.changeDecorationOptions(this._highlightedDecorationId,_s._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,n.changeDecorationOptions(this._highlightedDecorationId,_s._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let s=this._editor.getModel().getDecorationRange(t);if(s.startLineNumber!==s.endLineNumber&&s.endColumn===1){const r=s.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(r);s=new k(s.startLineNumber,s.startColumn,r,a)}this._rangeHighlightDecorationId=n.addDecoration(s,_s._RANGE_HIGHLIGHT_DECORATION)}}),i}set(e,t){this._editor.changeDecorations(i=>{let n=_s._FIND_MATCH_DECORATION;const s=[];if(e.length>1e3){n=_s._FIND_MATCH_NO_OVERVIEW_DECORATION;const a=this._editor.getModel().getLineCount(),d=this._editor.getLayoutInfo().height/a,c=Math.max(2,Math.ceil(3/d));let u=e[0].range.startLineNumber,h=e[0].range.endLineNumber;for(let g=1,f=e.length;g=m.startLineNumber?m.endLineNumber>h&&(h=m.endLineNumber):(s.push({range:new k(u,1,h,1),options:_s._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),u=m.startLineNumber,h=m.endLineNumber)}s.push({range:new k(u,1,h,1),options:_s._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const r=new Array(e.length);for(let a=0,l=e.length;ai.removeDecoration(a)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(a=>i.addDecoration(a,_s._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){const i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(!(!n||n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return s;if(!(s.startColumn0){const i=[];for(let r=0;rk.compareRangesUsingStarts(r.range,a.range));const n=[];let s=i[0];for(let r=1;r0?e[0].toUpperCase()+e.substr(1):o[0][0].toUpperCase()!==o[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function k3(o,e,t){return o[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&o[0].split(t).length===e.split(t).length}function I3(o,e,t){const i=e.split(t),n=o[0].split(t);let s="";return i.forEach((r,a)=>{s+=hH([n[a]],r)+t}),s.slice(0,-1)}class E3{constructor(e){this.staticValue=e,this.kind=0}}class O0e{constructor(e){this.pieces=e,this.kind=1}}class sm{static fromStaticValue(e){return new sm([qh.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new E3(""):e.length===1&&e[0].staticValue!==null?this._state=new E3(e[0].staticValue):this._state=new O0e(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?hH(e,this._state.staticValue):this._state.staticValue;let i="";for(let n=0,s=this._state.pieces.length;n0){const l=[],d=r.caseOps.length;let c=0;for(let u=0,h=a.length;u=d){l.push(a.slice(u));break}switch(r.caseOps[c]){case"U":l.push(a[u].toUpperCase());break;case"u":l.push(a[u].toUpperCase()),c++;break;case"L":l.push(a[u].toLowerCase());break;case"l":l.push(a[u].toLowerCase()),c++;break;default:l.push(a[u])}}a=l.join("")}i+=a}return i}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let i="";for(;e>0;){if(e=n)break;const r=o.charCodeAt(i);switch(r){case 92:t.emitUnchanged(i-1),t.emitStatic("\\",i+1);break;case 110:t.emitUnchanged(i-1),t.emitStatic(` +`,i+1);break;case 116:t.emitUnchanged(i-1),t.emitStatic(" ",i+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(i-1),t.emitStatic("",i+1),e.push(String.fromCharCode(r));break}continue}if(s===36){if(i++,i>=n)break;const r=o.charCodeAt(i);if(r===36){t.emitUnchanged(i-1),t.emitStatic("$",i+1);continue}if(r===48||r===38){t.emitUnchanged(i-1),t.emitMatchIndex(0,i+1,e),e.length=0;continue}if(49<=r&&r<=57){let a=r-48;if(i+1this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(i=>{(i.reason===3||i.reason===5||i.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(i=>{this._ignoreModelContentChanged||(i.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(i=>this._onStateChanged(i))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,jt(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},W0e)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;typeof t<"u"?t!==null&&(Array.isArray(t)?i=t:i=[t]):i=this._decorations.getFindScopes(),i!==null&&(i=i.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new k(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));const n=this._findMatches(i,!1,Fc);this._decorations.set(n,i);const s=this._editor.getSelection();let r=this._decorations.getCurrentMatchesPosition(s);if(r===0&&n.length>0){const a=Mv(n.map(l=>l.range),l=>k.compareRangesUsingStarts(l,s)>=0);r=a>0?a-1+1:r}this._state.changeMatchInfo(r,this._decorations.getCount(),void 0),e&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||n===1?(i===1?i=s.getLineCount():i--,n=s.getLineMaxColumn(i)):n--,new z(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const c=this._decorations.matchAfterPosition(e);c&&this._setCurrentFindMatch(c);return}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||n===s.getLineMaxColumn(i)?(i===s.getLineCount()?i=1:i++,n=1):n++,new z(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const i=this._decorations.matchBeforePosition(e);i&&this._setCurrentFindMatch(i);return}if(this._decorations.getCount()av._getSearchRange(this._editor.getModel(),s));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=Fc?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const t=new dh(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null).parseSearchRequest();if(!t)return;let i=t.regex;if(!i.multiline){let u="mu";i.ignoreCase&&(u+="i"),i.global&&(u+="g"),i=new RegExp(i.source,u)}const n=this._editor.getModel(),s=n.getValue(1),r=n.getFullModelRange(),a=this._getReplacePattern();let l;const d=this._state.preserveCase;a.hasReplacementPatterns||d?l=s.replace(i,function(){return a.buildReplaceString(arguments,d)}):l=s.replace(i,a.buildReplaceString(null,d));const c=new nA(r,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",c)}_regularReplaceAll(e){const t=this._getReplacePattern(),i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let r=0,a=i.length;rr.range),n);this._executeEditorCommand("replaceAll",s)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let i=this._findMatches(e,!1,1073741824).map(s=>new Ae(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn));const n=this._editor.getSelection();for(let s=0,r=i.length;sthis._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const n={inputActiveOptionBorder:Ee(KM),inputActiveOptionForeground:Ee(qM),inputActiveOptionBackground:Ee(Ih)};this.caseSensitive=this._register(new I6({appendTitle:this._keybindingLabelFor(ai.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,...n})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new E6({appendTitle:this._keybindingLabelFor(ai.ToggleWholeWordCommand),isChecked:this._state.wholeWord,...n})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new N6({appendTitle:this._keybindingLabelFor(ai.ToggleRegexCommand),isChecked:this._state.isRegex,...n})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(s=>{let r=!1;s.isRegex&&(this.regex.checked=this._state.isRegex,r=!0),s.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,r=!0),s.matchCase&&(this.caseSensitive.checked=this._state.matchCase,r=!0),!this._state.isRevealed&&r&&this._revealTemporarily()})),this._register(J(this._domNode,Se.MOUSE_LEAVE,s=>this._onMouseLeave())),this._register(J(this._domNode,"mouseover",s=>this._onMouseOver()))}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return jL.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}jL.ID="editor.contrib.findOptionsWidget";function JC(o,e){return o===1?!0:o===2?!1:e}class V0e extends q{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return JC(this._isRegexOverride,this._isRegex)}get wholeWord(){return JC(this._wholeWordOverride,this._wholeWord)}get matchCase(){return JC(this._matchCaseOverride,this._matchCase)}get preserveCase(){return JC(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new W),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,i){const n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let s=!1;t===0&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,s=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,s=!0),typeof i<"u"&&(k.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,s=!0)),s&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;const s={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let r=!1;const a=this.isRegex,l=this.wholeWord,d=this.matchCase,c=this.preserveCase;typeof e.searchString<"u"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,s.searchString=!0,r=!0),typeof e.replaceString<"u"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,s.replaceString=!0,r=!0),typeof e.isRevealed<"u"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,s.isRevealed=!0,r=!0),typeof e.isReplaceRevealed<"u"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,s.isReplaceRevealed=!0,r=!0),typeof e.isRegex<"u"&&(this._isRegex=e.isRegex),typeof e.wholeWord<"u"&&(this._wholeWord=e.wholeWord),typeof e.matchCase<"u"&&(this._matchCase=e.matchCase),typeof e.preserveCase<"u"&&(this._preserveCase=e.preserveCase),typeof e.searchScope<"u"&&(!((n=e.searchScope)===null||n===void 0)&&n.every(u=>{var h;return(h=this._searchScope)===null||h===void 0?void 0:h.some(g=>!k.equalsRange(g,u))})||(this._searchScope=e.searchScope,s.searchScope=!0,r=!0)),typeof e.loop<"u"&&this._loop!==e.loop&&(this._loop=e.loop,s.loop=!0,r=!0),typeof e.isSearching<"u"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,s.isSearching=!0,r=!0),typeof e.filters<"u"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,s.filters=!0,r=!0),this._isRegexOverride=typeof e.isRegexOverride<"u"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride<"u"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride<"u"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride<"u"?e.preserveCaseOverride:0,a!==this.isRegex&&(r=!0,s.isRegex=!0),l!==this.wholeWord&&(r=!0,s.wholeWord=!0),d!==this.matchCase&&(r=!0,s.matchCase=!0),c!==this.preserveCase&&(r=!0,s.preserveCase=!0),r&&this._onFindReplaceStateChange.fire(s)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=Fc}}const H0e=p("defaultLabel","input"),z0e=p("label.preserveCaseToggle","Preserve Case");class $0e extends Lm{constructor(e){super({icon:ve.preserveCase,title:z0e+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class U0e extends Gr{constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new W),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new W),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new W),this._onInput=this._register(new W),this._onKeyUp=this._register(new W),this._onPreserveCaseKeyDown=this._register(new W),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||H0e;const s=n.appendPreserveCaseLabel||"",r=n.history||[],a=!!n.flexibleHeight,l=!!n.flexibleWidth,d=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new T6(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:r,showHistoryHint:n.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:d,inputBoxStyles:n.inputBoxStyles})),this.preserveCase=this._register(new $0e({appendTitle:s,isChecked:!1,...n.toggleStyles})),this._register(this.preserveCase.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(h=>{this._onPreserveCaseKeyDown.fire(h)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const c=[this.preserveCase.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){const g=c.indexOf(this.domNode.ownerDocument.activeElement);if(g>=0){let f=-1;h.equals(17)?f=(g+1)%c.length:h.equals(15)&&(g===0?f=c.length-1:f=g-1),h.equals(9)?(c[g].blur(),this.inputBox.focus()):f>=0&&c[f].focus(),ct.stop(h,!0)}}});const u=document.createElement("div");u.className="controls",u.style.display=this._showOptionButtons?"block":"none",u.appendChild(this.preserveCase.domNode),this.domNode.appendChild(u),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,h=>this._onKeyDown.fire(h)),this.onkeyup(this.inputBox.inputElement,h=>this._onKeyUp.fire(h)),this.oninput(this.inputBox.inputElement,h=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,h=>this._onMouseDown.fire(h))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;(e=this.inputBox)===null||e===void 0||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var gH=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},fH=function(o,e){return function(t,i){e(t,i,o)}};const qR=new De("suggestWidgetVisible",!1,p("suggestWidgetVisible","Whether suggestion are visible")),GR="historyNavigationWidgetFocus",pH="historyNavigationForwardsEnabled",mH="historyNavigationBackwardsEnabled";let Wd;const e1=[];function _H(o,e){if(e1.includes(e))throw new Error("Cannot register the same widget multiple times");e1.push(e);const t=new de,i=new De(GR,!1).bindTo(o),n=new De(pH,!0).bindTo(o),s=new De(mH,!0).bindTo(o),r=()=>{i.set(!0),Wd=e},a=()=>{i.set(!1),Wd===e&&(Wd=void 0)};return Dy(e.element)&&r(),t.add(e.onDidFocus(()=>r())),t.add(e.onDidBlur(()=>a())),t.add(je(()=>{e1.splice(e1.indexOf(e),1),a()})),{historyNavigationForwardsEnablement:n,historyNavigationBackwardsEnablement:s,dispose(){t.dispose()}}}let $T=class extends M6{constructor(e,t,i,n){super(e,t,i);const s=this._register(n.createScoped(this.inputBox.element));this._register(_H(s,this.inputBox))}};$T=gH([fH(3,Xe)],$T);let UT=class extends U0e{constructor(e,t,i,n,s=!1){super(e,t,s,i);const r=this._register(n.createScoped(this.inputBox.element));this._register(_H(r,this.inputBox))}};UT=gH([fH(3,Xe)],UT);Gs.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:ae.and(ae.has(GR),ae.equals(mH,!0),ae.not("isComposing"),qR.isEqualTo(!1)),primary:16,secondary:[528],handler:o=>{Wd==null||Wd.showPreviousValue()}});Gs.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:ae.and(ae.has(GR),ae.equals(pH,!0),ae.not("isComposing"),qR.isEqualTo(!1)),primary:18,secondary:[530],handler:o=>{Wd==null||Wd.showNextValue()}});function N3(o){var e,t;return((e=o.lookupKeybinding("history.showPrevious"))===null||e===void 0?void 0:e.getElectronAccelerator())==="Up"&&((t=o.lookupKeybinding("history.showNext"))===null||t===void 0?void 0:t.getElectronAccelerator())==="Down"}const j0e=Zi("find-selection",ve.selection,p("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),T3=Zi("find-collapsed",ve.chevronRight,p("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),M3=Zi("find-expanded",ve.chevronDown,p("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),K0e=Zi("find-replace",ve.replace,p("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),q0e=Zi("find-replace-all",ve.replaceAll,p("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),G0e=Zi("find-previous-match",ve.arrowUp,p("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),Z0e=Zi("find-next-match",ve.arrowDown,p("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),Y0e=p("label.findDialog","Find / Replace"),X0e=p("label.find","Find"),Q0e=p("placeholder.find","Find"),J0e=p("label.previousMatchButton","Previous Match"),eCe=p("label.nextMatchButton","Next Match"),tCe=p("label.toggleSelectionFind","Find in Selection"),iCe=p("label.closeButton","Close"),nCe=p("label.replace","Replace"),sCe=p("placeholder.replace","Replace"),oCe=p("label.replaceButton","Replace"),rCe=p("label.replaceAllButton","Replace All"),aCe=p("label.toggleReplaceButton","Toggle Replace"),lCe=p("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Fc),dCe=p("label.matchesLocation","{0} of {1}"),A3=p("label.noResults","No results"),qa=419,cCe=275,uCe=cCe-54;let r_=69;const hCe=33,R3="ctrlEnterReplaceAll.windows.donotask",P3=It?256:2048;class pk{constructor(e){this.afterLineNumber=e,this.heightInPx=hCe,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function O3(o,e,t){const i=!!e.match(/\n/);if(t&&i&&t.selectionStart>0){o.stopPropagation();return}}function F3(o,e,t){const i=!!e.match(/\n/);if(t&&i&&t.selectionEndthis._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(c=>this._onStateChanged(c))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(c=>{if(c.hasChanged(90)&&(this._codeEditor.getOption(90)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),c.hasChanged(143)&&this._tryUpdateWidgetWidth(),c.hasChanged(2)&&this.updateAccessibilitySupport(),c.hasChanged(41)){const u=this._codeEditor.getOption(41).loop;this._state.change({loop:u},!1);const h=this._codeEditor.getOption(41).addExtraSpaceOnTop;h&&!this._viewZone&&(this._viewZone=new pk(0),this._showViewZone()),!h&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(async()=>{if(this._isVisible){const c=await this._controller.getGlobalBufferTerm();c&&c!==this._state.searchString&&(this._state.change({searchString:c},!1),this._findInput.select())}})),this._findInputFocused=UL.bindTo(r),this._findFocusTracker=this._register(Pl(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=KR.bindTo(r),this._replaceFocusTracker=this._register(Pl(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new pk(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(c=>{if(c.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return KL.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(90)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=zs(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,nt)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=r_+"px",this._state.matchesCount>=Fc?this._matchesCount.title=lCe:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let e;if(this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=Fc&&(t+="+");let i=String(this._state.matchesPosition);i==="0"&&(i="?"),e=Xh(dCe,i,t)}else e=A3;this._matchesCount.appendChild(document.createTextNode(e)),mo(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),r_=Math.max(r_,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===A3)return i===""?p("ariaSearchNoResultEmpty","{0} found",e):p("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const n=p("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),s=this._codeEditor.getModel();return s&&t.startLineNumber<=s.getLineCount()&&t.startLineNumber>=1?`${s.getLineContent(t.startLineNumber)}, ${n}`:n}return p("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const i=!this._codeEditor.getOption(90);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const i=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=i;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=gn(i),s=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),r=n.left+(s?s.left:0),a=s?s.top:0;if(this._viewZone&&ae.startLineNumber&&(t=!1);const l=U8(this._domNode).left;r>l&&(t=!1);const d=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(d?d.left:0)>l&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const i=this._viewZone;this._viewZoneId!==void 0||!i||this._codeEditor.changeViewZones(n=>{i.heightInPx=this._getHeight(),this._viewZoneId=n.addZone(i),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+i.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new pk(0));const i=this._viewZone;this._codeEditor.changeViewZones(n=>{if(this._viewZoneId!==void 0){const s=this._getHeight();if(s===i.heightInPx)return;const r=s-i.heightInPx;i.heightInPx=s,n.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+r);return}else{let s=this._getHeight();if(s-=this._codeEditor.getOption(83).top,s<=0)return;i.heightInPx=s,this._viewZoneId=n.addZone(i),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!this._domNode.isConnected)return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const i=e.width,n=e.minimap.minimapWidth;let s=!1,r=!1,a=!1;if(this._resized&&zs(this._domNode)>qa){this._domNode.style.maxWidth=`${i-28-n-15}px`,this._replaceInput.width=zs(this._findInput.domNode);return}if(qa+28+n>=i&&(r=!0),qa+28+n-r_>=i&&(a=!0),qa+28+n-r_>=i+50&&(s=!0),this._domNode.classList.toggle("collapsed-find-widget",s),this._domNode.classList.toggle("narrow-find-widget",a),this._domNode.classList.toggle("reduced-find-widget",r),!a&&!s&&(this._domNode.style.maxWidth=`${i-28-n-15}px`),this._findInput.layout({collapsedFindWidget:s,narrowFindWidget:a,reducedFindWidget:r}),this._resized){const l=this._findInput.inputBox.element.clientWidth;l>0&&(this._replaceInput.width=l)}else this._isReplaceVisible&&(this._replaceInput.width=zs(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));const i=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!k.equalsRange(t,i)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(P3|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` `),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return O3(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return F3(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(P3|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{is&&Ml&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(p("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(R3,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(` -`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return O3(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return F3(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new $T(null,this._contextViewProvider,{width:aCe,label:q0e,placeholder:G0e,appendCaseSensitiveLabel:this._keybindingLabelFor(ai.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(ai.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(ai.ToggleRegexCommand),validation:l=>{if(l.length===0||!this._findInput.getRegex())return null;try{return new RegExp(l,"gu"),null}catch(d){return{content:d.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>N3(this._keybindingService),inputBoxStyles:iS,toggleStyles:tS},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(l=>this._onFindInputKeyDown(l))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(l=>{l.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),l.preventDefault())})),this._register(this._findInput.onRegexKeyDown(l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),l.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(l=>{this._tryUpdateHeight()&&this._showViewZone()})),ws&&this._register(this._findInput.onMouseDown(l=>this._onFindInputMouseDown(l))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new df({label:Z0e+this._keybindingLabelFor(ai.PreviousMatchFindAction),icon:U0e,onTrigger:()=>{Lc(this._codeEditor.getAction(ai.PreviousMatchFindAction)).run().then(void 0,nt)}})),this._nextBtn=this._register(new df({label:Y0e+this._keybindingLabelFor(ai.NextMatchFindAction),icon:j0e,onTrigger:()=>{Lc(this._codeEditor.getAction(ai.NextMatchFindAction)).run().then(void 0,nt)}}));const i=document.createElement("div");i.className="find-part",i.appendChild(this._findInput.domNode);const n=document.createElement("div");n.className="find-actions",i.appendChild(n),n.appendChild(this._matchesCount),n.appendChild(this._prevBtn.domNode),n.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new Lm({icon:H0e,title:X0e+this._keybindingLabelFor(ai.ToggleSearchScopeCommand),isChecked:!1,inputActiveOptionBackground:Ee(Ih),inputActiveOptionBorder:Ee(KM),inputActiveOptionForeground:Ee(qM)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const l=this._codeEditor.getSelections();l.map(d=>(d.endColumn===1&&d.endLineNumber>d.startLineNumber&&(d=d.setEndPosition(d.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(d.endLineNumber-1))),d.isEmpty()?null:d)).filter(d=>!!d),l.length&&this._state.change({searchScope:l},!0)}}else this._state.change({searchScope:null},!0)})),n.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new df({label:Q0e+this._keybindingLabelFor(ai.CloseFindWidgetCommand),icon:tW,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),l.preventDefault())}})),this._replaceInput=this._register(new UT(null,void 0,{label:J0e,placeholder:eCe,appendPreserveCaseLabel:this._keybindingLabelFor(ai.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>N3(this._keybindingService),inputBoxStyles:iS,toggleStyles:tS},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(l=>this._onReplaceInputKeyDown(l))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(l=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(l=>{l.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),l.preventDefault())})),this._replaceBtn=this._register(new df({label:tCe+this._keybindingLabelFor(ai.ReplaceOneAction),icon:z0e,onTrigger:()=>{this._controller.replace()},onKeyDown:l=>{l.equals(1026)&&(this._closeBtn.focus(),l.preventDefault())}})),this._replaceAllBtn=this._register(new df({label:iCe+this._keybindingLabelFor(ai.ReplaceAllAction),icon:$0e,onTrigger:()=>{this._controller.replaceAll()}}));const s=document.createElement("div");s.className="replace-part",s.appendChild(this._replaceInput.domNode);const r=document.createElement("div");r.className="replace-actions",s.appendChild(r),r.appendChild(this._replaceBtn.domNode),r.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new df({label:nCe,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=zs(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=K0e,this._domNode.role="dialog",this._domNode.style.width=`${qa}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(i),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(s),this._resizeSash=new ss(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let a=qa;this._register(this._resizeSash.onDidStart(()=>{a=zs(this._domNode)})),this._register(this._resizeSash.onDidChange(l=>{this._resized=!0;const d=a+l.startX-l.currentX;if(dc||(this._domNode.style.width=`${d}px`,this._isReplaceVisible&&(this._replaceInput.width=zs(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const l=zs(this._domNode);if(l{this._opts.onTrigger(),i.preventDefault()}),this.onkeydown(this._domNode,i=>{var n,s;if(i.equals(10)||i.equals(3)){this._opts.onTrigger(),i.preventDefault();return}(s=(n=this._opts).onKeyDown)===null||s===void 0||s.call(n,i)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...Ue.asClassNameArray(T3)),this._domNode.classList.add(...Ue.asClassNameArray(M3))):(this._domNode.classList.remove(...Ue.asClassNameArray(M3)),this._domNode.classList.add(...Ue.asClassNameArray(T3)))}}Zr((o,e)=>{const t=(m,v)=>{v&&e.addRule(`.monaco-editor ${m} { background-color: ${v}; }`)};t(".findMatch",o.getColor(wl)),t(".currentFindMatch",o.getColor(Dte)),t(".findScope",o.getColor(xte));const i=o.getColor(Fi);t(".find-widget",i);const n=o.getColor(ml);n&&e.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`);const s=o.getColor(jM);s&&e.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${s}; border-right: 1px solid ${s}; border-bottom: 1px solid ${s}; }`);const r=o.getColor(Ic);r&&e.addRule(`.monaco-editor .findMatch { border: 1px ${xa(o.type)?"dotted":"solid"} ${r}; box-sizing: border-box; }`);const a=o.getColor(kte);a&&e.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${a}; padding: 1px; box-sizing: border-box; }`);const l=o.getColor(Ite);l&&e.addRule(`.monaco-editor .findScope { border: 1px ${xa(o.type)?"dashed":"solid"} ${l}; }`);const d=o.getColor(Lt);d&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${d}; }`);const c=o.getColor(bl);c&&e.addRule(`.monaco-editor .find-widget { color: ${c}; }`);const u=o.getColor(Gee);u&&e.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${u}; }`);const h=o.getColor(mte);if(h)e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${h}; }`);else{const m=o.getColor(Cl);m&&e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${m}; }`)}const g=o.getColor(oE);g&&e.addRule(` +`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return O3(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return F3(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new $T(null,this._contextViewProvider,{width:uCe,label:X0e,placeholder:Q0e,appendCaseSensitiveLabel:this._keybindingLabelFor(ai.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(ai.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(ai.ToggleRegexCommand),validation:l=>{if(l.length===0||!this._findInput.getRegex())return null;try{return new RegExp(l,"gu"),null}catch(d){return{content:d.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>N3(this._keybindingService),inputBoxStyles:iS,toggleStyles:tS},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(l=>this._onFindInputKeyDown(l))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(l=>{l.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),l.preventDefault())})),this._register(this._findInput.onRegexKeyDown(l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),l.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(l=>{this._tryUpdateHeight()&&this._showViewZone()})),ws&&this._register(this._findInput.onMouseDown(l=>this._onFindInputMouseDown(l))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new df({label:J0e+this._keybindingLabelFor(ai.PreviousMatchFindAction),icon:G0e,onTrigger:()=>{Lc(this._codeEditor.getAction(ai.PreviousMatchFindAction)).run().then(void 0,nt)}})),this._nextBtn=this._register(new df({label:eCe+this._keybindingLabelFor(ai.NextMatchFindAction),icon:Z0e,onTrigger:()=>{Lc(this._codeEditor.getAction(ai.NextMatchFindAction)).run().then(void 0,nt)}}));const i=document.createElement("div");i.className="find-part",i.appendChild(this._findInput.domNode);const n=document.createElement("div");n.className="find-actions",i.appendChild(n),n.appendChild(this._matchesCount),n.appendChild(this._prevBtn.domNode),n.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new Lm({icon:j0e,title:tCe+this._keybindingLabelFor(ai.ToggleSearchScopeCommand),isChecked:!1,inputActiveOptionBackground:Ee(Ih),inputActiveOptionBorder:Ee(KM),inputActiveOptionForeground:Ee(qM)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const l=this._codeEditor.getSelections();l.map(d=>(d.endColumn===1&&d.endLineNumber>d.startLineNumber&&(d=d.setEndPosition(d.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(d.endLineNumber-1))),d.isEmpty()?null:d)).filter(d=>!!d),l.length&&this._state.change({searchScope:l},!0)}}else this._state.change({searchScope:null},!0)})),n.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new df({label:iCe+this._keybindingLabelFor(ai.CloseFindWidgetCommand),icon:tW,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),l.preventDefault())}})),this._replaceInput=this._register(new UT(null,void 0,{label:nCe,placeholder:sCe,appendPreserveCaseLabel:this._keybindingLabelFor(ai.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>N3(this._keybindingService),inputBoxStyles:iS,toggleStyles:tS},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(l=>this._onReplaceInputKeyDown(l))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(l=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(l=>{l.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),l.preventDefault())})),this._replaceBtn=this._register(new df({label:oCe+this._keybindingLabelFor(ai.ReplaceOneAction),icon:K0e,onTrigger:()=>{this._controller.replace()},onKeyDown:l=>{l.equals(1026)&&(this._closeBtn.focus(),l.preventDefault())}})),this._replaceAllBtn=this._register(new df({label:rCe+this._keybindingLabelFor(ai.ReplaceAllAction),icon:q0e,onTrigger:()=>{this._controller.replaceAll()}}));const s=document.createElement("div");s.className="replace-part",s.appendChild(this._replaceInput.domNode);const r=document.createElement("div");r.className="replace-actions",s.appendChild(r),r.appendChild(this._replaceBtn.domNode),r.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new df({label:aCe,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=zs(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=Y0e,this._domNode.role="dialog",this._domNode.style.width=`${qa}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(i),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(s),this._resizeSash=new ss(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let a=qa;this._register(this._resizeSash.onDidStart(()=>{a=zs(this._domNode)})),this._register(this._resizeSash.onDidChange(l=>{this._resized=!0;const d=a+l.startX-l.currentX;if(dc||(this._domNode.style.width=`${d}px`,this._isReplaceVisible&&(this._replaceInput.width=zs(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const l=zs(this._domNode);if(l{this._opts.onTrigger(),i.preventDefault()}),this.onkeydown(this._domNode,i=>{var n,s;if(i.equals(10)||i.equals(3)){this._opts.onTrigger(),i.preventDefault();return}(s=(n=this._opts).onKeyDown)===null||s===void 0||s.call(n,i)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...Ue.asClassNameArray(T3)),this._domNode.classList.add(...Ue.asClassNameArray(M3))):(this._domNode.classList.remove(...Ue.asClassNameArray(M3)),this._domNode.classList.add(...Ue.asClassNameArray(T3)))}}Zr((o,e)=>{const t=(m,v)=>{v&&e.addRule(`.monaco-editor ${m} { background-color: ${v}; }`)};t(".findMatch",o.getColor(wl)),t(".currentFindMatch",o.getColor(Ete)),t(".findScope",o.getColor(Nte));const i=o.getColor(Fi);t(".find-widget",i);const n=o.getColor(ml);n&&e.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`);const s=o.getColor(jM);s&&e.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${s}; border-right: 1px solid ${s}; border-bottom: 1px solid ${s}; }`);const r=o.getColor(Ic);r&&e.addRule(`.monaco-editor .findMatch { border: 1px ${xa(o.type)?"dotted":"solid"} ${r}; box-sizing: border-box; }`);const a=o.getColor(Tte);a&&e.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${a}; padding: 1px; box-sizing: border-box; }`);const l=o.getColor(Mte);l&&e.addRule(`.monaco-editor .findScope { border: 1px ${xa(o.type)?"dashed":"solid"} ${l}; }`);const d=o.getColor(Lt);d&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${d}; }`);const c=o.getColor(bl);c&&e.addRule(`.monaco-editor .find-widget { color: ${c}; }`);const u=o.getColor(Qee);u&&e.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${u}; }`);const h=o.getColor(Cte);if(h)e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${h}; }`);else{const m=o.getColor(Cl);m&&e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${m}; }`)}const g=o.getColor(oE);g&&e.addRule(` .monaco-editor .find-widget .button:not(.disabled):hover, .monaco-editor .find-widget .codicon-find-selection:hover { background-color: ${g} !important; } - `);const f=o.getColor(Ho);f&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${f}; }`)});var vH=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ca=function(o,e){return function(t,i){e(t,i,o)}},jT;const dCe=524288;function KT(o,e="single",t=!1){if(!o.hasModel())return null;const i=o.getSelection();if(e==="single"&&i.startLineNumber===i.endLineNumber||e==="multiple"){if(i.isEmpty()){const n=o.getConfiguredWordAtPosition(i.getStartPosition());if(n&&t===!1)return n.word}else if(o.getModel().getValueLengthInRange(i)this._onStateChanged(r))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const r=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),r&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!UL.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){const e=this._editor.getSelections();e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=qo(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}async _start(e,t){if(this.disposeModel(),!this._editor.hasModel())return;const i={...t,isRevealed:!0};if(e.seedSearchStringFromSelection==="single"){const n=KT(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);n&&(this._state.isRegex?i.searchString=qo(n):i.searchString=n)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){const n=KT(this._editor,e.seedSearchStringFromSelection);n&&(i.searchString=n)}if(!i.searchString&&e.seedSearchStringFromGlobalClipboard){const n=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;n&&(i.searchString=n)}if(e.forceRevealReplace||i.isReplaceRevealed?i.isReplaceRevealed=!0:this._findWidgetVisible.get()||(i.isReplaceRevealed=!1),e.updateSearchScope){const n=this._editor.getSelections();n.some(s=>!s.isEmpty())&&(i.searchScope=n)}i.loop=e.loop,this._state.change(i,!1),this._model||(this._model=new av(this._editor,this._state))}start(e,t){return this._start(e,t)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(e){return this._model?(this._model.moveToMatch(e),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){var e;return this._model?!((e=this._editor.getModel())===null||e===void 0)&&e.isTooLargeForHeapOperation()?(this._notificationService.warn(p("too.large.for.replaceall","The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}async getGlobalBufferTerm(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(e){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};Os.ID="editor.contrib.findController";Os=jT=vH([ca(1,Xe),ca(2,Xr),ca(3,Xd),ca(4,sn)],Os);let qT=class extends Os{constructor(e,t,i,n,s,r,a,l){super(e,i,a,l,r),this._contextViewService=t,this._keybindingService=n,this._themeService=s,this._widget=null,this._findOptionsWidget=null}async _start(e,t){this._widget||this._createFindWidget();const i=this._editor.getSelection();let n=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":n=!0;break;case"never":n=!1;break;case"multiline":{n=!!i&&i.startLineNumber!==i.endLineNumber;break}}e.updateSearchScope=e.updateSearchScope||n,await super._start(e,t),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new KL(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new jL(this._editor,this._state,this._keybindingService))}};qT=vH([ca(1,Gd),ca(2,Xe),ca(3,Xt),ca(4,Sn),ca(5,sn),ca(6,Xr),ca(7,Xd)],qT);const cCe=e8(new J7({id:ai.StartFindAction,label:p("startFindAction","Find"),alias:"Find",precondition:ae.or(T.focus,ae.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:N.MenubarEditMenu,group:"3_find",title:p({},"&&Find"),order:1}}));cCe.addImplementation(0,(o,e,t)=>{const i=Os.get(e);return i?i.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop}):!1});const uCe={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:p("actions.find.isRegexOverride",`Overrides "Use Regular Expression" flag. + `);const f=o.getColor(Ho);f&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${f}; }`)});var vH=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ca=function(o,e){return function(t,i){e(t,i,o)}},jT;const gCe=524288;function KT(o,e="single",t=!1){if(!o.hasModel())return null;const i=o.getSelection();if(e==="single"&&i.startLineNumber===i.endLineNumber||e==="multiple"){if(i.isEmpty()){const n=o.getConfiguredWordAtPosition(i.getStartPosition());if(n&&t===!1)return n.word}else if(o.getModel().getValueLengthInRange(i)this._onStateChanged(r))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const r=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),r&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!UL.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){const e=this._editor.getSelections();e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=qo(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}async _start(e,t){if(this.disposeModel(),!this._editor.hasModel())return;const i={...t,isRevealed:!0};if(e.seedSearchStringFromSelection==="single"){const n=KT(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);n&&(this._state.isRegex?i.searchString=qo(n):i.searchString=n)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){const n=KT(this._editor,e.seedSearchStringFromSelection);n&&(i.searchString=n)}if(!i.searchString&&e.seedSearchStringFromGlobalClipboard){const n=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;n&&(i.searchString=n)}if(e.forceRevealReplace||i.isReplaceRevealed?i.isReplaceRevealed=!0:this._findWidgetVisible.get()||(i.isReplaceRevealed=!1),e.updateSearchScope){const n=this._editor.getSelections();n.some(s=>!s.isEmpty())&&(i.searchScope=n)}i.loop=e.loop,this._state.change(i,!1),this._model||(this._model=new av(this._editor,this._state))}start(e,t){return this._start(e,t)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(e){return this._model?(this._model.moveToMatch(e),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){var e;return this._model?!((e=this._editor.getModel())===null||e===void 0)&&e.isTooLargeForHeapOperation()?(this._notificationService.warn(p("too.large.for.replaceall","The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}async getGlobalBufferTerm(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(e){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};Os.ID="editor.contrib.findController";Os=jT=vH([ca(1,Xe),ca(2,Xr),ca(3,Xd),ca(4,sn)],Os);let qT=class extends Os{constructor(e,t,i,n,s,r,a,l){super(e,i,a,l,r),this._contextViewService=t,this._keybindingService=n,this._themeService=s,this._widget=null,this._findOptionsWidget=null}async _start(e,t){this._widget||this._createFindWidget();const i=this._editor.getSelection();let n=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":n=!0;break;case"never":n=!1;break;case"multiline":{n=!!i&&i.startLineNumber!==i.endLineNumber;break}}e.updateSearchScope=e.updateSearchScope||n,await super._start(e,t),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new KL(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new jL(this._editor,this._state,this._keybindingService))}};qT=vH([ca(1,Gd),ca(2,Xe),ca(3,Xt),ca(4,Sn),ca(5,sn),ca(6,Xr),ca(7,Xd)],qT);const fCe=e7(new J8({id:ai.StartFindAction,label:p("startFindAction","Find"),alias:"Find",precondition:ae.or(T.focus,ae.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:N.MenubarEditMenu,group:"3_find",title:p({},"&&Find"),order:1}}));fCe.addImplementation(0,(o,e,t)=>{const i=Os.get(e);return i?i.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop}):!1});const pCe={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:p("actions.find.isRegexOverride",`Overrides "Use Regular Expression" flag. The flag will not be saved for the future. 0: Do Nothing 1: True @@ -686,43 +686,43 @@ The flag will not be saved for the future. The flag will not be saved for the future. 0: Do Nothing 1: True -2: False`)},findInSelection:{type:"boolean"}}}}]};class hCe extends Te{constructor(){super({id:ai.StartFindWithArgs,label:p("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:uCe})}async run(e,t,i){const n=Os.get(t);if(n){const s=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:i.replaceString!==void 0,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&t.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(i==null?void 0:i.findInSelection)||!1,loop:t.getOption(41).loop},s),n.setGlobalBufferTerm(n.getState().searchString)}}}class gCe extends Te{constructor(){super({id:ai.StartFindWithSelection,label:p("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(e,t){const i=Os.get(t);i&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),i.setGlobalBufferTerm(i.getState().searchString))}}class bH extends Te{async run(e,t){const i=Os.get(t);i&&!this._run(i)&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:i.getState().searchString.length===0&&t.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(i))}}class fCe extends bH{constructor(){super({id:ai.NextMatchFindAction,label:p("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:T.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:ae.and(T.focus,UL),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}}class pCe extends bH{constructor(){super({id:ai.PreviousMatchFindAction,label:p("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:T.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:ae.and(T.focus,UL),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class mCe extends Te{constructor(){super({id:ai.GoToMatchFindAction,label:p("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:Jd}),this._highlightDecorations=[]}run(e,t,i){const n=Os.get(t);if(!n)return;const s=n.getState().matchesCount;if(s<1){e.get(sn).notify({severity:Zy.Warning,message:p("findMatchAction.noResults","No matches. Try searching for something else.")});return}const a=e.get(Ha).createInputBox();a.placeholder=p("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",s);const l=c=>{const u=parseInt(c);if(isNaN(u))return;const h=n.getState().matchesCount;if(u>0&&u<=h)return u-1;if(u<0&&u>=-h)return h+u},d=c=>{const u=l(c);if(typeof u=="number"){a.validationMessage=void 0,n.goToMatch(u);const h=n.getState().currentMatch;h&&this.addDecorations(t,h)}else a.validationMessage=p("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount),this.clearDecorations(t)};a.onDidChangeValue(c=>{d(c)}),a.onDidAccept(()=>{const c=l(a.value);typeof c=="number"?(n.goToMatch(c),a.hide()):a.validationMessage=p("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount)}),a.onDidHide(()=>{this.clearDecorations(t),a.dispose()}),a.show()}clearDecorations(e){e.changeDecorations(t=>{this._highlightDecorations=t.deltaDecorations(this._highlightDecorations,[])})}addDecorations(e,t){e.changeDecorations(i=>{this._highlightDecorations=i.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:Ni(X8),position:Go.Full}}}])})}}class CH extends Te{async run(e,t){const i=Os.get(t);if(!i)return;const n=KT(t,"single",!1);n&&i.setSearchString(n),this._run(i)||(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(i))}}class _Ce extends CH{constructor(){super({id:ai.NextSelectionMatchFindAction,label:p("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class vCe extends CH{constructor(){super({id:ai.PreviousSelectionMatchFindAction,label:p("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const bCe=e8(new J7({id:ai.StartFindReplaceAction,label:p("startReplace","Replace"),alias:"Replace",precondition:ae.or(T.focus,ae.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:N.MenubarEditMenu,group:"3_find",title:p({},"&&Replace"),order:2}}));bCe.addImplementation(0,(o,e,t)=>{if(!e.hasModel()||e.getOption(90))return!1;const i=Os.get(e);if(!i)return!1;const n=e.getSelection(),s=i.isFindInputFocused(),r=!n.isEmpty()&&n.startLineNumber===n.endLineNumber&&e.getOption(41).seedSearchStringFromSelection!=="never"&&!s,a=s||r?2:1;return i.start({forceRevealReplace:!0,seedSearchStringFromSelection:r?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop})});At(Os.ID,qT,0);_e(hCe);_e(gCe);_e(fCe);_e(pCe);_e(mCe);_e(_Ce);_e(vCe);const za=Rn.bindToContribution(Os.get);we(new za({id:ai.CloseFindWidgetCommand,precondition:Jd,handler:o=>o.closeFindWidget(),kbOpts:{weight:105,kbExpr:ae.and(T.focus,ae.not("isComposing")),primary:9,secondary:[1033]}}));we(new za({id:ai.ToggleCaseSensitiveCommand,precondition:void 0,handler:o=>o.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:T.focus,primary:GC.primary,mac:GC.mac,win:GC.win,linux:GC.linux}}));we(new za({id:ai.ToggleWholeWordCommand,precondition:void 0,handler:o=>o.toggleWholeWords(),kbOpts:{weight:105,kbExpr:T.focus,primary:ZC.primary,mac:ZC.mac,win:ZC.win,linux:ZC.linux}}));we(new za({id:ai.ToggleRegexCommand,precondition:void 0,handler:o=>o.toggleRegex(),kbOpts:{weight:105,kbExpr:T.focus,primary:YC.primary,mac:YC.mac,win:YC.win,linux:YC.linux}}));we(new za({id:ai.ToggleSearchScopeCommand,precondition:void 0,handler:o=>o.toggleSearchScope(),kbOpts:{weight:105,kbExpr:T.focus,primary:XC.primary,mac:XC.mac,win:XC.win,linux:XC.linux}}));we(new za({id:ai.TogglePreserveCaseCommand,precondition:void 0,handler:o=>o.togglePreserveCase(),kbOpts:{weight:105,kbExpr:T.focus,primary:QC.primary,mac:QC.mac,win:QC.win,linux:QC.linux}}));we(new za({id:ai.ReplaceOneAction,precondition:Jd,handler:o=>o.replace(),kbOpts:{weight:105,kbExpr:T.focus,primary:3094}}));we(new za({id:ai.ReplaceOneAction,precondition:Jd,handler:o=>o.replace(),kbOpts:{weight:105,kbExpr:ae.and(T.focus,KR),primary:3}}));we(new za({id:ai.ReplaceAllAction,precondition:Jd,handler:o=>o.replaceAll(),kbOpts:{weight:105,kbExpr:T.focus,primary:2563}}));we(new za({id:ai.ReplaceAllAction,precondition:Jd,handler:o=>o.replaceAll(),kbOpts:{weight:105,kbExpr:ae.and(T.focus,KR),primary:void 0,mac:{primary:2051}}}));we(new za({id:ai.SelectAllMatchesAction,precondition:Jd,handler:o=>o.selectAllMatches(),kbOpts:{weight:105,kbExpr:T.focus,primary:515}}));const CCe={0:" ",1:"u",2:"r"},B3=65535,ua=16777215,W3=4278190080;class mk{constructor(e){const t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){const t=e/32|0,i=e%32;return(this._states[t]&1<B3)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new mk(e.length),this._userDefinedStates=new mk(e.length),this._recoveredStates=new mk(e.length),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],t=(i,n)=>{const s=e[e.length-1];return this.getStartLineNumber(s)<=i&&this.getEndLineNumber(s)>=n};for(let i=0,n=this._startIndexes.length;iua||r>ua)throw new Error("startLineNumber or endLineNumber must not exceed "+ua);for(;e.length>0&&!t(s,r);)e.pop();const a=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=s+((a&255)<<24),this._endIndexes[i]=r+((a&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&ua}getEndLineNumber(e){return this._endIndexes[e]&ua}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){t===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):t===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let i=!1;if(this._types)for(let n=0;n>>24)+((this._endIndexes[e]&W3)>>>16);return t===B3?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(i===0)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);t!==-1;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){const e=[];for(let t=0;tArray.isArray(m)?_=>__=c.startLineNumber))d&&d.startLineNumber===c.startLineNumber?(c.source===1?m=c:(m=d,m.isCollapsed=c.isCollapsed&&d.endLineNumber===c.endLineNumber,m.source=0),d=s(++a)):(m=c,c.isCollapsed&&c.source===0&&(m.source=2)),c=r(++l);else{let v=l,_=c;for(;;){if(!_||_.startLineNumber>d.endLineNumber){m=d;break}if(_.source===1&&_.endLineNumber>d.endLineNumber)break;_=r(++v)}d=s(++a)}if(m){for(;h&&h.endLineNumberm.startLineNumber&&m.startLineNumber>g&&m.endLineNumber<=i&&(!h||h.endLineNumber>=m.endLineNumber)&&(f.push(m),g=m.startLineNumber,h&&u.push(h),h=m)}}return f}}class wCe{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class SCe{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new W,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new Ao(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((i,n)=>i.regionIndex-n.regionIndex);const t={};this._decorationProvider.changeDecorations(i=>{let n=0,s=-1,r=-1;const a=l=>{for(;nr&&(r=d),n++}};for(const l of e){const d=l.regionIndex,c=this._editorDecorationIds[d];if(c&&!t[c]){t[c]=!0,a(d);const u=!this._regions.isCollapsed(d);this._regions.setCollapsed(d,u),s=Math.max(s,this._regions.getEndLineNumber(d))}}a(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const t=new Array,i=n=>{for(const s of e)if(!(s.startLineNumber>n.endLineNumber||n.startLineNumber>s.endLineNumber))return!0;return!1};for(let n=0;ni&&(i=a)}this._decorationProvider.changeDecorations(n=>this._editorDecorationIds=n.deltaDecorations(this._editorDecorationIds,t)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){const t=(n,s)=>{for(const r of e)if(n=r.endLineNumber||r.startLineNumber<1||r.endLineNumber>i)continue;const a=this._getLinesChecksum(r.startLineNumber+1,r.endLineNumber);t.push({startLineNumber:r.startLineNumber,endLineNumber:r.endLineNumber,isCollapsed:r.isCollapsed,source:r.source,checksum:a})}return t.length>0?t:void 0}applyMemento(e){var t,i;if(!Array.isArray(e))return;const n=[],s=this._textModel.getLineCount();for(const a of e){if(a.startLineNumber>=a.endLineNumber||a.startLineNumber<1||a.endLineNumber>s)continue;const l=this._getLinesChecksum(a.startLineNumber+1,a.endLineNumber);(!a.checksum||l===a.checksum)&&n.push({startLineNumber:a.startLineNumber,endLineNumber:a.endLineNumber,type:void 0,isCollapsed:(t=a.isCollapsed)!==null&&t!==void 0?t:!0,source:(i=a.source)!==null&&i!==void 0?i:0})}const r=Ao.sanitizeAndMerge(this._regions,n,s);this.updatePost(Ao.fromFoldRanges(r))}_getLinesChecksum(e,t){return LM(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){const i=[];if(this._regions){let n=this._regions.findRange(e),s=1;for(;n>=0;){const r=this._regions.toRegion(n);(!t||t(r,s))&&i.push(r),s++,n=r.parentIndex}}return i}getRegionAtLine(e){if(this._regions){const t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){const i=[],n=e?e.regionIndex+1:0,s=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){const r=[];for(let a=n,l=this._regions.length;a0&&!d.containedBy(r[r.length-1]);)r.pop();r.push(d),t(d,r.length)&&i.push(d)}else break}}else for(let r=n,a=this._regions.length;r1){const a=o.getRegionsInside(s,(l,d)=>l.isCollapsed!==r&&d0)for(const s of i){const r=o.getRegionAtLine(s);if(r&&(r.isCollapsed!==e&&n.push(r),t>1)){const a=o.getRegionsInside(r,(l,d)=>l.isCollapsed!==e&&dr.isCollapsed!==e&&aa.isCollapsed!==e&&l<=t);n.push(...r)}o.toggleCollapseState(n)}function yCe(o,e,t){const i=[];for(const n of t){const s=o.getAllRegionsAtLine(n,r=>r.isCollapsed!==e);s.length>0&&i.push(s[0])}o.toggleCollapseState(i)}function LCe(o,e,t,i){const n=(r,a)=>a===e&&r.isCollapsed!==t&&!i.some(l=>r.containsLine(l)),s=o.getRegionsInside(null,n);o.toggleCollapseState(s)}function yH(o,e,t){const i=[];for(const r of t){const a=o.getAllRegionsAtLine(r,void 0);a.length>0&&i.push(a[0])}const n=r=>i.every(a=>!a.containedBy(r)&&!r.containedBy(a))&&r.isCollapsed!==e,s=o.getRegionsInside(null,n);o.toggleCollapseState(s)}function ZR(o,e,t){const i=o.textModel,n=o.regions,s=[];for(let r=n.length-1;r>=0;r--)if(t!==n.isCollapsed(r)){const a=n.getStartLineNumber(r);e.test(i.getLineContent(a))&&s.push(n.toRegion(r))}o.toggleCollapseState(s)}function YR(o,e,t){const i=o.regions,n=[];for(let s=i.length-1;s>=0;s--)t!==i.isCollapsed(s)&&e===i.getType(s)&&n.push(i.toRegion(s));o.toggleCollapseState(n)}function DCe(o,e){let t=null;const i=e.getRegionAtLine(o);if(i!==null&&(t=i.startLineNumber,o===t)){const n=i.parentIndex;n!==-1?t=e.regions.getStartLineNumber(n):t=null}return t}function xCe(o,e){let t=e.getRegionAtLine(o);if(t!==null&&t.startLineNumber===o){if(o!==t.startLineNumber)return t.startLineNumber;{const i=t.parentIndex;let n=0;for(i!==-1&&(n=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=n)return null;if(t.parentIndex===i)return t.startLineNumber}else return null}}else if(e.regions.length>0)for(t=e.regions.toRegion(e.regions.length-1);t!==null;){if(t.startLineNumber0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function kCe(o,e){let t=e.getRegionAtLine(o);if(t!==null&&t.startLineNumber===o){const i=t.parentIndex;let n=0;if(i!==-1)n=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;n=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex=n)return null;if(t.parentIndex===i)return t.startLineNumber}else return null}else if(e.regions.length>0)for(t=e.regions.toRegion(0);t!==null;){if(t.startLineNumber>o)return t.startLineNumber;t.regionIndexthis.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(t=>t.range.endLineNumber!==t.range.startLineNumber||fu(t.text)[0]!==0))}updateHiddenRanges(){let e=!1;const t=[];let i=0,n=0,s=Number.MAX_VALUE,r=-1;const a=this._foldingModel.regions;for(;i0}isHidden(e){return V3(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1;const i=this._foldingModel.textModel;let n=null;const s=r=>((!n||!ECe(r,n))&&(n=V3(this._hiddenRanges,r)),n?n.startLineNumber-1:null);for(let r=0,a=e.length;r0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function ECe(o,e){return o>=e.startLineNumber&&o<=e.endLineNumber}function V3(o,e){const t=Mv(o,i=>e=0&&o[t].endLineNumber>=e?o[t]:null}const NCe=5e3,TCe="indent";class XR{constructor(e,t,i){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=i,this.id=TCe}dispose(){}compute(e){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(RCe(this.editorModel,i,n,this.foldingRangesLimit))}}let MCe=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>ua||t>ua)return;const n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const i=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let s=this._length-1,r=0;s>=0;s--,r++)i[r]=this._startIndexes[s],n[r]=this._endIndexes[s];return new Ao(i,n)}else{this._foldingRangesLimit.update(this._length,t);let i=0,n=this._indentOccurrences.length;for(let l=0;lt){n=l;break}i+=d}}const s=e.getOptions().tabSize,r=new Uint32Array(t),a=new Uint32Array(t);for(let l=this._length-1,d=0;l>=0;l--){const c=this._startIndexes[l],u=e.getLineContent(c),h=jy(u,s);(h{}};function RCe(o,e,t,i=ACe){const n=o.getOptions().tabSize,s=new MCe(i);let r;t&&(r=new RegExp(`(${t.start.source})|(?:${t.end.source})`));const a=[],l=o.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let d=o.getLineCount();d>0;d--){const c=o.getLineContent(d),u=jy(c,n);let h=a[a.length-1];if(u===-1){e&&(h.endAbove=d);continue}let g;if(r&&(g=c.match(r)))if(g[1]){let f=a.length-1;for(;f>0&&a[f].indent!==-2;)f--;if(f>0){a.length=f+1,h=a[f],s.insertFirst(d,h.line,u),h.line=d,h.indent=u,h.endAbove=d;continue}}else{a.push({indent:-2,endAbove:d,line:d});continue}if(h.indent>u){do a.pop(),h=a[a.length-1];while(h.indent>u);const f=h.endAbove-1;f-d>=1&&s.insertFirst(d,f,u)}h.indent===u?h.endAbove=d:a.push({indent:u,endAbove:d,line:d})}return s.toIndentRanges(o)}const PCe=M("editor.foldBackground",{light:We(kc,.3),dark:We(kc,.3),hcDark:null,hcLight:null},p("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);M("editorGutter.foldingControlForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},p("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));const qL=Zi("folding-expanded",ve.chevronDown,p("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),GL=Zi("folding-collapsed",ve.chevronRight,p("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),LH=Zi("folding-manual-collapsed",GL,p("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),DH=Zi("folding-manual-expanded",qL,p("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),QR={color:Ni(PCe),position:uo.Inline};class on{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,i){return t?on.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?e?this.showFoldingHighlights?on.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:on.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:on.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?i?this.showFoldingHighlights?on.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:on.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?on.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:on.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?i?on.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:on.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i?on.MANUALLY_EXPANDED_VISUAL_DECORATION:on.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}}on.COLLAPSED_VISUAL_DECORATION=st.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:Ue.asClassName(GL)});on.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=st.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:QR,isWholeLine:!0,firstLineDecorationClassName:Ue.asClassName(GL)});on.MANUALLY_COLLAPSED_VISUAL_DECORATION=st.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:Ue.asClassName(LH)});on.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=st.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:QR,isWholeLine:!0,firstLineDecorationClassName:Ue.asClassName(LH)});on.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=st.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0});on.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=st.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:QR,isWholeLine:!0});on.EXPANDED_VISUAL_DECORATION=st.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Ue.asClassName(qL)});on.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=st.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:Ue.asClassName(qL)});on.MANUALLY_EXPANDED_VISUAL_DECORATION=st.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Ue.asClassName(DH)});on.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=st.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:Ue.asClassName(DH)});on.NO_CONTROLS_EXPANDED_RANGE_DECORATION=st.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0});on.HIDDEN_RANGE_DECORATION=st.register({description:"folding-hidden-range-decoration",stickiness:1});const OCe={},FCe="syntax";class JR{constructor(e,t,i,n,s){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=i,this.foldingRangesLimit=n,this.fallbackRangeProvider=s,this.id=FCe,this.disposables=new de,s&&this.disposables.add(s);for(const r of t)typeof r.onDidChange=="function"&&this.disposables.add(r.onDidChange(i))}compute(e){return BCe(this.providers,this.editorModel,e).then(t=>{var i,n;return t?VCe(t,this.foldingRangesLimit):(n=(i=this.fallbackRangeProvider)===null||i===void 0?void 0:i.compute(e))!==null&&n!==void 0?n:null})}dispose(){this.disposables.dispose()}}function BCe(o,e,t){let i=null;const n=o.map((s,r)=>Promise.resolve(s.provideFoldingRanges(e,OCe,t)).then(a=>{if(!t.isCancellationRequested&&Array.isArray(a)){Array.isArray(i)||(i=[]);const l=e.getLineCount();for(const d of a)d.start>0&&d.end>d.start&&d.end<=l&&i.push({start:d.start,end:d.end,rank:r,kind:d.kind})}},en));return Promise.all(n).then(s=>i)}class WCe{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,n){if(e>ua||t>ua)return;const s=this._length;this._startIndexes[s]=e,this._endIndexes[s]=t,this._nestingLevels[s]=n,this._types[s]=i,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);const t=new Uint32Array(this._length),i=new Uint32Array(this._length);for(let n=0;ne){i=a;break}t+=l}}const n=new Uint32Array(e),s=new Uint32Array(e),r=[];for(let a=0,l=0;a{let l=r.start-a.start;return l===0&&(l=r.rank-a.rank),l}),i=new WCe(e);let n;const s=[];for(const r of t)if(!n)n=r,i.add(r.start,r.end,r.kind&&r.kind.value,s.length);else if(r.start>n.start)if(r.end<=n.end)s.push(n),n=r,i.add(r.start,r.end,r.kind&&r.kind.value,s.length);else{if(r.start>n.end){do n=s.pop();while(n&&r.start>n.end);n&&s.push(n),n=r}i.add(r.start,r.end,r.kind&&r.kind.value,s.length)}return i.toIndentRanges()}var HCe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},a_=function(o,e){return function(t,i){e(t,i,o)}},vf;const hs=new De("foldingEnabled",!1);let Ul=vf=class extends q{static get(e){return e.getContribution(vf.ID)}static getFoldingRangeProviders(e,t){var i,n;const s=e.foldingRangeProvider.ordered(t);return(n=(i=vf._foldingRangeSelector)===null||i===void 0?void 0:i.call(vf,s,t))!==null&&n!==void 0?n:s}constructor(e,t,i,n,s,r){super(),this.contextKeyService=t,this.languageConfigurationService=i,this.languageFeaturesService=r,this.localToDispose=this._register(new de),this.editor=e,this._foldingLimitReporter=new xH(e);const a=this.editor.getOptions();this._isEnabled=a.get(43),this._useFoldingProviders=a.get(44)!=="indentation",this._unfoldOnClickAfterEndOfLine=a.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=a.get(46),this.updateDebounceInfo=s.for(r.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new on(e),this.foldingDecorationProvider.showFoldingControls=a.get(109),this.foldingDecorationProvider.showFoldingHighlights=a.get(45),this.foldingEnabled=hs.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(l=>{if(l.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),l.hasChanged(47)&&this.onModelChanged(),l.hasChanged(109)||l.hasChanged(45)){const d=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=d.get(109),this.foldingDecorationProvider.showFoldingHighlights=d.get(45),this.triggerFoldingModelChanged()}l.hasChanged(44)&&(this._useFoldingProviders=this.editor.getOptions().get(44)!=="indentation",this.onFoldingStrategyChanged()),l.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),l.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))})),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const t=this.foldingModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const t=this.editor.getModel();if(!(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new SCe(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new ICe(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new jr(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new Yt(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(t=>this.onDidChangeModelContent(t))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(t=>this.onEditorMouseDown(t))),this.localToDispose.add(this.editor.onMouseUp(t=>this.onEditorMouseUp(t))),this.localToDispose.add({dispose:()=>{var t,i;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(t=this.updateScheduler)===null||t===void 0||t.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(i=this.rangeProvider)===null||i===void 0||i.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;(e=this.rangeProvider)===null||e===void 0||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const t=new XR(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){const i=vf.getFoldingRangeProviders(this.languageFeaturesService,e);i.length>0&&(this.rangeProvider=new JR(e,i,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;(t=this.hiddenRangeModel)===null||t===void 0||t.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const e=this.foldingModel;if(!e)return null;const t=new ds,i=this.getRangeProvider(e.textModel),n=this.foldingRegionPromise=_n(s=>i.compute(s));return n.then(s=>{if(s&&n===this.foldingRegionPromise){let r;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const c=s.setCollapsedAllOfType(Ts.Imports.value,!0);c&&(r=Ra.capture(this.editor),this._currentModelHasFoldedImports=c)}const a=this.editor.getSelections(),l=a?a.map(c=>c.startLineNumber):[];e.update(s,l),r==null||r.restore(this.editor);const d=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=d)}return e})}).then(void 0,e=>(nt(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then(t=>{if(t){const i=this.editor.getSelections();if(i&&i.length>0){const n=[];for(const s of i){const r=s.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(r)&&n.push(...t.getAllRegionsAtLine(r,a=>a.isCollapsed&&r>a.startLineNumber))}n.length&&(t.toggleCollapseState(n),this.reveal(i[0].getPosition()))}}}).then(void 0,nt)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:{const n=e.target.detail,s=e.target.element.offsetLeft;if(n.offsetX-s<4)return;i=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){const n=this.editor.getModel();if(n&&t.startColumn===n.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;const i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,s=e.target.range;if(!s||s.startLineNumber!==i)return;if(n){if(e.target.type!==4)return}else{const a=this.editor.getModel();if(!a||s.startColumn!==a.getLineMaxColumn(i))return}const r=t.getRegionAtLine(i);if(r&&r.startLineNumber===i){const a=r.isCollapsed;if(n||a){const l=e.event.altKey;let d=[];if(l){const c=h=>!h.containedBy(r)&&!r.containedBy(h),u=t.getRegionsInside(null,c);for(const h of u)h.isCollapsed&&d.push(h);d.length===0&&(d=u)}else{const c=e.event.middleButton||e.event.shiftKey;if(c)for(const u of t.getRegionsInside(r))u.isCollapsed===a&&d.push(u);(a||!c||d.length===0)&&d.push(r)}t.toggleCollapseState(d),this.reveal({lineNumber:i,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};Ul.ID="editor.contrib.folding";Ul=vf=HCe([a_(1,Xe),a_(2,si),a_(3,sn),a_(4,wr),a_(5,Me)],Ul);class xH{constructor(e){this.editor=e,this._onDidChange=new W,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}class ys extends Te{runEditorCommand(e,t,i){const n=e.get(si),s=Ul.get(t);if(!s)return;const r=s.getFoldingModel();if(r)return this.reportTelemetry(e,t),r.then(a=>{if(a){this.invoke(s,a,t,i,n);const l=t.getSelection();l&&s.reveal(l.getStartPosition())}})}getSelectedLines(e){const t=e.getSelections();return t?t.map(i=>i.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(i=>i+1):this.getSelectedLines(t)}run(e,t){}}function kH(o){if(!ro(o)){if(!Es(o))return!1;const e=o;if(!ro(e.levels)&&!nu(e.levels)||!ro(e.direction)&&!As(e.direction)||!ro(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(nu)))return!1}return!0}class zCe extends ys{constructor(){super({id:"editor.unfold",label:p("unfoldAction.label","Unfold"),alias:"Unfold",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},metadata:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument: +2: False`)},findInSelection:{type:"boolean"}}}}]};class mCe extends Te{constructor(){super({id:ai.StartFindWithArgs,label:p("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:pCe})}async run(e,t,i){const n=Os.get(t);if(n){const s=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:i.replaceString!==void 0,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&t.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(i==null?void 0:i.findInSelection)||!1,loop:t.getOption(41).loop},s),n.setGlobalBufferTerm(n.getState().searchString)}}}class _Ce extends Te{constructor(){super({id:ai.StartFindWithSelection,label:p("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(e,t){const i=Os.get(t);i&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),i.setGlobalBufferTerm(i.getState().searchString))}}class bH extends Te{async run(e,t){const i=Os.get(t);i&&!this._run(i)&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:i.getState().searchString.length===0&&t.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(i))}}class vCe extends bH{constructor(){super({id:ai.NextMatchFindAction,label:p("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:T.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:ae.and(T.focus,UL),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}}class bCe extends bH{constructor(){super({id:ai.PreviousMatchFindAction,label:p("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:T.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:ae.and(T.focus,UL),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class CCe extends Te{constructor(){super({id:ai.GoToMatchFindAction,label:p("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:Jd}),this._highlightDecorations=[]}run(e,t,i){const n=Os.get(t);if(!n)return;const s=n.getState().matchesCount;if(s<1){e.get(sn).notify({severity:Zy.Warning,message:p("findMatchAction.noResults","No matches. Try searching for something else.")});return}const a=e.get(Ha).createInputBox();a.placeholder=p("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",s);const l=c=>{const u=parseInt(c);if(isNaN(u))return;const h=n.getState().matchesCount;if(u>0&&u<=h)return u-1;if(u<0&&u>=-h)return h+u},d=c=>{const u=l(c);if(typeof u=="number"){a.validationMessage=void 0,n.goToMatch(u);const h=n.getState().currentMatch;h&&this.addDecorations(t,h)}else a.validationMessage=p("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount),this.clearDecorations(t)};a.onDidChangeValue(c=>{d(c)}),a.onDidAccept(()=>{const c=l(a.value);typeof c=="number"?(n.goToMatch(c),a.hide()):a.validationMessage=p("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount)}),a.onDidHide(()=>{this.clearDecorations(t),a.dispose()}),a.show()}clearDecorations(e){e.changeDecorations(t=>{this._highlightDecorations=t.deltaDecorations(this._highlightDecorations,[])})}addDecorations(e,t){e.changeDecorations(i=>{this._highlightDecorations=i.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:Ni(X7),position:Go.Full}}}])})}}class CH extends Te{async run(e,t){const i=Os.get(t);if(!i)return;const n=KT(t,"single",!1);n&&i.setSearchString(n),this._run(i)||(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(i))}}class wCe extends CH{constructor(){super({id:ai.NextSelectionMatchFindAction,label:p("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class SCe extends CH{constructor(){super({id:ai.PreviousSelectionMatchFindAction,label:p("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const yCe=e7(new J8({id:ai.StartFindReplaceAction,label:p("startReplace","Replace"),alias:"Replace",precondition:ae.or(T.focus,ae.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:N.MenubarEditMenu,group:"3_find",title:p({},"&&Replace"),order:2}}));yCe.addImplementation(0,(o,e,t)=>{if(!e.hasModel()||e.getOption(90))return!1;const i=Os.get(e);if(!i)return!1;const n=e.getSelection(),s=i.isFindInputFocused(),r=!n.isEmpty()&&n.startLineNumber===n.endLineNumber&&e.getOption(41).seedSearchStringFromSelection!=="never"&&!s,a=s||r?2:1;return i.start({forceRevealReplace:!0,seedSearchStringFromSelection:r?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop})});At(Os.ID,qT,0);_e(mCe);_e(_Ce);_e(vCe);_e(bCe);_e(CCe);_e(wCe);_e(SCe);const za=Rn.bindToContribution(Os.get);we(new za({id:ai.CloseFindWidgetCommand,precondition:Jd,handler:o=>o.closeFindWidget(),kbOpts:{weight:105,kbExpr:ae.and(T.focus,ae.not("isComposing")),primary:9,secondary:[1033]}}));we(new za({id:ai.ToggleCaseSensitiveCommand,precondition:void 0,handler:o=>o.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:T.focus,primary:GC.primary,mac:GC.mac,win:GC.win,linux:GC.linux}}));we(new za({id:ai.ToggleWholeWordCommand,precondition:void 0,handler:o=>o.toggleWholeWords(),kbOpts:{weight:105,kbExpr:T.focus,primary:ZC.primary,mac:ZC.mac,win:ZC.win,linux:ZC.linux}}));we(new za({id:ai.ToggleRegexCommand,precondition:void 0,handler:o=>o.toggleRegex(),kbOpts:{weight:105,kbExpr:T.focus,primary:YC.primary,mac:YC.mac,win:YC.win,linux:YC.linux}}));we(new za({id:ai.ToggleSearchScopeCommand,precondition:void 0,handler:o=>o.toggleSearchScope(),kbOpts:{weight:105,kbExpr:T.focus,primary:XC.primary,mac:XC.mac,win:XC.win,linux:XC.linux}}));we(new za({id:ai.TogglePreserveCaseCommand,precondition:void 0,handler:o=>o.togglePreserveCase(),kbOpts:{weight:105,kbExpr:T.focus,primary:QC.primary,mac:QC.mac,win:QC.win,linux:QC.linux}}));we(new za({id:ai.ReplaceOneAction,precondition:Jd,handler:o=>o.replace(),kbOpts:{weight:105,kbExpr:T.focus,primary:3094}}));we(new za({id:ai.ReplaceOneAction,precondition:Jd,handler:o=>o.replace(),kbOpts:{weight:105,kbExpr:ae.and(T.focus,KR),primary:3}}));we(new za({id:ai.ReplaceAllAction,precondition:Jd,handler:o=>o.replaceAll(),kbOpts:{weight:105,kbExpr:T.focus,primary:2563}}));we(new za({id:ai.ReplaceAllAction,precondition:Jd,handler:o=>o.replaceAll(),kbOpts:{weight:105,kbExpr:ae.and(T.focus,KR),primary:void 0,mac:{primary:2051}}}));we(new za({id:ai.SelectAllMatchesAction,precondition:Jd,handler:o=>o.selectAllMatches(),kbOpts:{weight:105,kbExpr:T.focus,primary:515}}));const LCe={0:" ",1:"u",2:"r"},B3=65535,ua=16777215,W3=4278190080;class mk{constructor(e){const t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){const t=e/32|0,i=e%32;return(this._states[t]&1<B3)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new mk(e.length),this._userDefinedStates=new mk(e.length),this._recoveredStates=new mk(e.length),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],t=(i,n)=>{const s=e[e.length-1];return this.getStartLineNumber(s)<=i&&this.getEndLineNumber(s)>=n};for(let i=0,n=this._startIndexes.length;iua||r>ua)throw new Error("startLineNumber or endLineNumber must not exceed "+ua);for(;e.length>0&&!t(s,r);)e.pop();const a=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=s+((a&255)<<24),this._endIndexes[i]=r+((a&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&ua}getEndLineNumber(e){return this._endIndexes[e]&ua}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){t===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):t===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let i=!1;if(this._types)for(let n=0;n>>24)+((this._endIndexes[e]&W3)>>>16);return t===B3?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(i===0)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);t!==-1;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){const e=[];for(let t=0;tArray.isArray(m)?_=>__=c.startLineNumber))d&&d.startLineNumber===c.startLineNumber?(c.source===1?m=c:(m=d,m.isCollapsed=c.isCollapsed&&d.endLineNumber===c.endLineNumber,m.source=0),d=s(++a)):(m=c,c.isCollapsed&&c.source===0&&(m.source=2)),c=r(++l);else{let v=l,_=c;for(;;){if(!_||_.startLineNumber>d.endLineNumber){m=d;break}if(_.source===1&&_.endLineNumber>d.endLineNumber)break;_=r(++v)}d=s(++a)}if(m){for(;h&&h.endLineNumberm.startLineNumber&&m.startLineNumber>g&&m.endLineNumber<=i&&(!h||h.endLineNumber>=m.endLineNumber)&&(f.push(m),g=m.startLineNumber,h&&u.push(h),h=m)}}return f}}class DCe{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class xCe{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new W,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new Ao(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((i,n)=>i.regionIndex-n.regionIndex);const t={};this._decorationProvider.changeDecorations(i=>{let n=0,s=-1,r=-1;const a=l=>{for(;nr&&(r=d),n++}};for(const l of e){const d=l.regionIndex,c=this._editorDecorationIds[d];if(c&&!t[c]){t[c]=!0,a(d);const u=!this._regions.isCollapsed(d);this._regions.setCollapsed(d,u),s=Math.max(s,this._regions.getEndLineNumber(d))}}a(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const t=new Array,i=n=>{for(const s of e)if(!(s.startLineNumber>n.endLineNumber||n.startLineNumber>s.endLineNumber))return!0;return!1};for(let n=0;ni&&(i=a)}this._decorationProvider.changeDecorations(n=>this._editorDecorationIds=n.deltaDecorations(this._editorDecorationIds,t)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){const t=(n,s)=>{for(const r of e)if(n=r.endLineNumber||r.startLineNumber<1||r.endLineNumber>i)continue;const a=this._getLinesChecksum(r.startLineNumber+1,r.endLineNumber);t.push({startLineNumber:r.startLineNumber,endLineNumber:r.endLineNumber,isCollapsed:r.isCollapsed,source:r.source,checksum:a})}return t.length>0?t:void 0}applyMemento(e){var t,i;if(!Array.isArray(e))return;const n=[],s=this._textModel.getLineCount();for(const a of e){if(a.startLineNumber>=a.endLineNumber||a.startLineNumber<1||a.endLineNumber>s)continue;const l=this._getLinesChecksum(a.startLineNumber+1,a.endLineNumber);(!a.checksum||l===a.checksum)&&n.push({startLineNumber:a.startLineNumber,endLineNumber:a.endLineNumber,type:void 0,isCollapsed:(t=a.isCollapsed)!==null&&t!==void 0?t:!0,source:(i=a.source)!==null&&i!==void 0?i:0})}const r=Ao.sanitizeAndMerge(this._regions,n,s);this.updatePost(Ao.fromFoldRanges(r))}_getLinesChecksum(e,t){return LM(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){const i=[];if(this._regions){let n=this._regions.findRange(e),s=1;for(;n>=0;){const r=this._regions.toRegion(n);(!t||t(r,s))&&i.push(r),s++,n=r.parentIndex}}return i}getRegionAtLine(e){if(this._regions){const t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){const i=[],n=e?e.regionIndex+1:0,s=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){const r=[];for(let a=n,l=this._regions.length;a0&&!d.containedBy(r[r.length-1]);)r.pop();r.push(d),t(d,r.length)&&i.push(d)}else break}}else for(let r=n,a=this._regions.length;r1){const a=o.getRegionsInside(s,(l,d)=>l.isCollapsed!==r&&d0)for(const s of i){const r=o.getRegionAtLine(s);if(r&&(r.isCollapsed!==e&&n.push(r),t>1)){const a=o.getRegionsInside(r,(l,d)=>l.isCollapsed!==e&&dr.isCollapsed!==e&&aa.isCollapsed!==e&&l<=t);n.push(...r)}o.toggleCollapseState(n)}function kCe(o,e,t){const i=[];for(const n of t){const s=o.getAllRegionsAtLine(n,r=>r.isCollapsed!==e);s.length>0&&i.push(s[0])}o.toggleCollapseState(i)}function ICe(o,e,t,i){const n=(r,a)=>a===e&&r.isCollapsed!==t&&!i.some(l=>r.containsLine(l)),s=o.getRegionsInside(null,n);o.toggleCollapseState(s)}function yH(o,e,t){const i=[];for(const r of t){const a=o.getAllRegionsAtLine(r,void 0);a.length>0&&i.push(a[0])}const n=r=>i.every(a=>!a.containedBy(r)&&!r.containedBy(a))&&r.isCollapsed!==e,s=o.getRegionsInside(null,n);o.toggleCollapseState(s)}function ZR(o,e,t){const i=o.textModel,n=o.regions,s=[];for(let r=n.length-1;r>=0;r--)if(t!==n.isCollapsed(r)){const a=n.getStartLineNumber(r);e.test(i.getLineContent(a))&&s.push(n.toRegion(r))}o.toggleCollapseState(s)}function YR(o,e,t){const i=o.regions,n=[];for(let s=i.length-1;s>=0;s--)t!==i.isCollapsed(s)&&e===i.getType(s)&&n.push(i.toRegion(s));o.toggleCollapseState(n)}function ECe(o,e){let t=null;const i=e.getRegionAtLine(o);if(i!==null&&(t=i.startLineNumber,o===t)){const n=i.parentIndex;n!==-1?t=e.regions.getStartLineNumber(n):t=null}return t}function NCe(o,e){let t=e.getRegionAtLine(o);if(t!==null&&t.startLineNumber===o){if(o!==t.startLineNumber)return t.startLineNumber;{const i=t.parentIndex;let n=0;for(i!==-1&&(n=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=n)return null;if(t.parentIndex===i)return t.startLineNumber}else return null}}else if(e.regions.length>0)for(t=e.regions.toRegion(e.regions.length-1);t!==null;){if(t.startLineNumber0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function TCe(o,e){let t=e.getRegionAtLine(o);if(t!==null&&t.startLineNumber===o){const i=t.parentIndex;let n=0;if(i!==-1)n=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;n=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex=n)return null;if(t.parentIndex===i)return t.startLineNumber}else return null}else if(e.regions.length>0)for(t=e.regions.toRegion(0);t!==null;){if(t.startLineNumber>o)return t.startLineNumber;t.regionIndexthis.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(t=>t.range.endLineNumber!==t.range.startLineNumber||fu(t.text)[0]!==0))}updateHiddenRanges(){let e=!1;const t=[];let i=0,n=0,s=Number.MAX_VALUE,r=-1;const a=this._foldingModel.regions;for(;i0}isHidden(e){return V3(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1;const i=this._foldingModel.textModel;let n=null;const s=r=>((!n||!ACe(r,n))&&(n=V3(this._hiddenRanges,r)),n?n.startLineNumber-1:null);for(let r=0,a=e.length;r0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function ACe(o,e){return o>=e.startLineNumber&&o<=e.endLineNumber}function V3(o,e){const t=Mv(o,i=>e=0&&o[t].endLineNumber>=e?o[t]:null}const RCe=5e3,PCe="indent";class XR{constructor(e,t,i){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=i,this.id=PCe}dispose(){}compute(e){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(BCe(this.editorModel,i,n,this.foldingRangesLimit))}}let OCe=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>ua||t>ua)return;const n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const i=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let s=this._length-1,r=0;s>=0;s--,r++)i[r]=this._startIndexes[s],n[r]=this._endIndexes[s];return new Ao(i,n)}else{this._foldingRangesLimit.update(this._length,t);let i=0,n=this._indentOccurrences.length;for(let l=0;lt){n=l;break}i+=d}}const s=e.getOptions().tabSize,r=new Uint32Array(t),a=new Uint32Array(t);for(let l=this._length-1,d=0;l>=0;l--){const c=this._startIndexes[l],u=e.getLineContent(c),h=jy(u,s);(h{}};function BCe(o,e,t,i=FCe){const n=o.getOptions().tabSize,s=new OCe(i);let r;t&&(r=new RegExp(`(${t.start.source})|(?:${t.end.source})`));const a=[],l=o.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let d=o.getLineCount();d>0;d--){const c=o.getLineContent(d),u=jy(c,n);let h=a[a.length-1];if(u===-1){e&&(h.endAbove=d);continue}let g;if(r&&(g=c.match(r)))if(g[1]){let f=a.length-1;for(;f>0&&a[f].indent!==-2;)f--;if(f>0){a.length=f+1,h=a[f],s.insertFirst(d,h.line,u),h.line=d,h.indent=u,h.endAbove=d;continue}}else{a.push({indent:-2,endAbove:d,line:d});continue}if(h.indent>u){do a.pop(),h=a[a.length-1];while(h.indent>u);const f=h.endAbove-1;f-d>=1&&s.insertFirst(d,f,u)}h.indent===u?h.endAbove=d:a.push({indent:u,endAbove:d,line:d})}return s.toIndentRanges(o)}const WCe=M("editor.foldBackground",{light:We(kc,.3),dark:We(kc,.3),hcDark:null,hcLight:null},p("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);M("editorGutter.foldingControlForeground",{dark:Or,light:Or,hcDark:Or,hcLight:Or},p("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));const qL=Zi("folding-expanded",ve.chevronDown,p("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),GL=Zi("folding-collapsed",ve.chevronRight,p("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),LH=Zi("folding-manual-collapsed",GL,p("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),DH=Zi("folding-manual-expanded",qL,p("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),QR={color:Ni(WCe),position:uo.Inline};class on{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,i){return t?on.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?e?this.showFoldingHighlights?on.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:on.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:on.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?i?this.showFoldingHighlights?on.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:on.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?on.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:on.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?i?on.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:on.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i?on.MANUALLY_EXPANDED_VISUAL_DECORATION:on.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}}on.COLLAPSED_VISUAL_DECORATION=st.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:Ue.asClassName(GL)});on.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=st.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:QR,isWholeLine:!0,firstLineDecorationClassName:Ue.asClassName(GL)});on.MANUALLY_COLLAPSED_VISUAL_DECORATION=st.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:Ue.asClassName(LH)});on.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=st.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:QR,isWholeLine:!0,firstLineDecorationClassName:Ue.asClassName(LH)});on.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=st.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0});on.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=st.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:QR,isWholeLine:!0});on.EXPANDED_VISUAL_DECORATION=st.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Ue.asClassName(qL)});on.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=st.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:Ue.asClassName(qL)});on.MANUALLY_EXPANDED_VISUAL_DECORATION=st.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Ue.asClassName(DH)});on.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=st.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:Ue.asClassName(DH)});on.NO_CONTROLS_EXPANDED_RANGE_DECORATION=st.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0});on.HIDDEN_RANGE_DECORATION=st.register({description:"folding-hidden-range-decoration",stickiness:1});const VCe={},HCe="syntax";class JR{constructor(e,t,i,n,s){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=i,this.foldingRangesLimit=n,this.fallbackRangeProvider=s,this.id=HCe,this.disposables=new de,s&&this.disposables.add(s);for(const r of t)typeof r.onDidChange=="function"&&this.disposables.add(r.onDidChange(i))}compute(e){return zCe(this.providers,this.editorModel,e).then(t=>{var i,n;return t?UCe(t,this.foldingRangesLimit):(n=(i=this.fallbackRangeProvider)===null||i===void 0?void 0:i.compute(e))!==null&&n!==void 0?n:null})}dispose(){this.disposables.dispose()}}function zCe(o,e,t){let i=null;const n=o.map((s,r)=>Promise.resolve(s.provideFoldingRanges(e,VCe,t)).then(a=>{if(!t.isCancellationRequested&&Array.isArray(a)){Array.isArray(i)||(i=[]);const l=e.getLineCount();for(const d of a)d.start>0&&d.end>d.start&&d.end<=l&&i.push({start:d.start,end:d.end,rank:r,kind:d.kind})}},en));return Promise.all(n).then(s=>i)}class $Ce{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,n){if(e>ua||t>ua)return;const s=this._length;this._startIndexes[s]=e,this._endIndexes[s]=t,this._nestingLevels[s]=n,this._types[s]=i,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);const t=new Uint32Array(this._length),i=new Uint32Array(this._length);for(let n=0;ne){i=a;break}t+=l}}const n=new Uint32Array(e),s=new Uint32Array(e),r=[];for(let a=0,l=0;a{let l=r.start-a.start;return l===0&&(l=r.rank-a.rank),l}),i=new $Ce(e);let n;const s=[];for(const r of t)if(!n)n=r,i.add(r.start,r.end,r.kind&&r.kind.value,s.length);else if(r.start>n.start)if(r.end<=n.end)s.push(n),n=r,i.add(r.start,r.end,r.kind&&r.kind.value,s.length);else{if(r.start>n.end){do n=s.pop();while(n&&r.start>n.end);n&&s.push(n),n=r}i.add(r.start,r.end,r.kind&&r.kind.value,s.length)}return i.toIndentRanges()}var jCe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},a_=function(o,e){return function(t,i){e(t,i,o)}},vf;const hs=new De("foldingEnabled",!1);let Ul=vf=class extends q{static get(e){return e.getContribution(vf.ID)}static getFoldingRangeProviders(e,t){var i,n;const s=e.foldingRangeProvider.ordered(t);return(n=(i=vf._foldingRangeSelector)===null||i===void 0?void 0:i.call(vf,s,t))!==null&&n!==void 0?n:s}constructor(e,t,i,n,s,r){super(),this.contextKeyService=t,this.languageConfigurationService=i,this.languageFeaturesService=r,this.localToDispose=this._register(new de),this.editor=e,this._foldingLimitReporter=new xH(e);const a=this.editor.getOptions();this._isEnabled=a.get(43),this._useFoldingProviders=a.get(44)!=="indentation",this._unfoldOnClickAfterEndOfLine=a.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=a.get(46),this.updateDebounceInfo=s.for(r.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new on(e),this.foldingDecorationProvider.showFoldingControls=a.get(109),this.foldingDecorationProvider.showFoldingHighlights=a.get(45),this.foldingEnabled=hs.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(l=>{if(l.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),l.hasChanged(47)&&this.onModelChanged(),l.hasChanged(109)||l.hasChanged(45)){const d=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=d.get(109),this.foldingDecorationProvider.showFoldingHighlights=d.get(45),this.triggerFoldingModelChanged()}l.hasChanged(44)&&(this._useFoldingProviders=this.editor.getOptions().get(44)!=="indentation",this.onFoldingStrategyChanged()),l.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),l.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))})),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const t=this.foldingModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const t=this.editor.getModel();if(!(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new xCe(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new MCe(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new jr(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new Yt(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(t=>this.onDidChangeModelContent(t))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(t=>this.onEditorMouseDown(t))),this.localToDispose.add(this.editor.onMouseUp(t=>this.onEditorMouseUp(t))),this.localToDispose.add({dispose:()=>{var t,i;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(t=this.updateScheduler)===null||t===void 0||t.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(i=this.rangeProvider)===null||i===void 0||i.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;(e=this.rangeProvider)===null||e===void 0||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const t=new XR(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){const i=vf.getFoldingRangeProviders(this.languageFeaturesService,e);i.length>0&&(this.rangeProvider=new JR(e,i,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;(t=this.hiddenRangeModel)===null||t===void 0||t.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const e=this.foldingModel;if(!e)return null;const t=new ds,i=this.getRangeProvider(e.textModel),n=this.foldingRegionPromise=_n(s=>i.compute(s));return n.then(s=>{if(s&&n===this.foldingRegionPromise){let r;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const c=s.setCollapsedAllOfType(Ts.Imports.value,!0);c&&(r=Ra.capture(this.editor),this._currentModelHasFoldedImports=c)}const a=this.editor.getSelections(),l=a?a.map(c=>c.startLineNumber):[];e.update(s,l),r==null||r.restore(this.editor);const d=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=d)}return e})}).then(void 0,e=>(nt(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then(t=>{if(t){const i=this.editor.getSelections();if(i&&i.length>0){const n=[];for(const s of i){const r=s.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(r)&&n.push(...t.getAllRegionsAtLine(r,a=>a.isCollapsed&&r>a.startLineNumber))}n.length&&(t.toggleCollapseState(n),this.reveal(i[0].getPosition()))}}}).then(void 0,nt)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:{const n=e.target.detail,s=e.target.element.offsetLeft;if(n.offsetX-s<4)return;i=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){const n=this.editor.getModel();if(n&&t.startColumn===n.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;const i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,s=e.target.range;if(!s||s.startLineNumber!==i)return;if(n){if(e.target.type!==4)return}else{const a=this.editor.getModel();if(!a||s.startColumn!==a.getLineMaxColumn(i))return}const r=t.getRegionAtLine(i);if(r&&r.startLineNumber===i){const a=r.isCollapsed;if(n||a){const l=e.event.altKey;let d=[];if(l){const c=h=>!h.containedBy(r)&&!r.containedBy(h),u=t.getRegionsInside(null,c);for(const h of u)h.isCollapsed&&d.push(h);d.length===0&&(d=u)}else{const c=e.event.middleButton||e.event.shiftKey;if(c)for(const u of t.getRegionsInside(r))u.isCollapsed===a&&d.push(u);(a||!c||d.length===0)&&d.push(r)}t.toggleCollapseState(d),this.reveal({lineNumber:i,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};Ul.ID="editor.contrib.folding";Ul=vf=jCe([a_(1,Xe),a_(2,si),a_(3,sn),a_(4,wr),a_(5,Me)],Ul);class xH{constructor(e){this.editor=e,this._onDidChange=new W,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}class ys extends Te{runEditorCommand(e,t,i){const n=e.get(si),s=Ul.get(t);if(!s)return;const r=s.getFoldingModel();if(r)return this.reportTelemetry(e,t),r.then(a=>{if(a){this.invoke(s,a,t,i,n);const l=t.getSelection();l&&s.reveal(l.getStartPosition())}})}getSelectedLines(e){const t=e.getSelections();return t?t.map(i=>i.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(i=>i+1):this.getSelectedLines(t)}run(e,t){}}function kH(o){if(!ro(o)){if(!Es(o))return!1;const e=o;if(!ro(e.levels)&&!nu(e.levels)||!ro(e.direction)&&!As(e.direction)||!ro(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(nu)))return!1}return!0}class KCe extends ys{constructor(){super({id:"editor.unfold",label:p("unfoldAction.label","Unfold"),alias:"Unfold",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},metadata:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument: * 'levels': Number of levels to unfold. If not set, defaults to 1. * 'direction': If 'up', unfold given number of levels up otherwise unfolds down. * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used. - `,constraint:kH,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=n&&n.levels||1,r=this.getLineNumbers(n,i);n&&n.direction==="up"?SH(t,!1,s,r):Em(t,!1,s,r)}}class $Ce extends ys{constructor(){super({id:"editor.unfoldRecursively",label:p("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2142),weight:100}})}invoke(e,t,i,n){Em(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}class UCe extends ys{constructor(){super({id:"editor.fold",label:p("foldAction.label","Fold"),alias:"Fold",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},metadata:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument: + `,constraint:kH,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=n&&n.levels||1,r=this.getLineNumbers(n,i);n&&n.direction==="up"?SH(t,!1,s,r):Em(t,!1,s,r)}}class qCe extends ys{constructor(){super({id:"editor.unfoldRecursively",label:p("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2142),weight:100}})}invoke(e,t,i,n){Em(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}class GCe extends ys{constructor(){super({id:"editor.fold",label:p("foldAction.label","Fold"),alias:"Fold",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},metadata:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument: * 'levels': Number of levels to fold. * 'direction': If 'up', folds given number of levels up otherwise folds down. * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used. If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead. - `,constraint:kH,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=this.getLineNumbers(n,i),r=n&&n.levels,a=n&&n.direction;typeof r!="number"&&typeof a!="string"?yCe(t,!0,s):a==="up"?SH(t,!0,r||1,s):Em(t,!0,r||1,s)}}class jCe extends ys{constructor(){super({id:"editor.toggleFold",label:p("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2090),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);wH(t,1,n)}}class KCe extends ys{constructor(){super({id:"editor.foldRecursively",label:p("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2140),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);Em(t,!0,Number.MAX_VALUE,n)}}class qCe extends ys{constructor(){super({id:"editor.foldAllBlockComments",label:p("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2138),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())YR(t,Ts.Comment.value,!0);else{const r=i.getModel();if(!r)return;const a=s.getLanguageConfiguration(r.getLanguageId()).comments;if(a&&a.blockCommentStartToken){const l=new RegExp("^\\s*"+qo(a.blockCommentStartToken));ZR(t,l,!0)}}}}class GCe extends ys{constructor(){super({id:"editor.foldAllMarkerRegions",label:p("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2077),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())YR(t,Ts.Region.value,!0);else{const r=i.getModel();if(!r)return;const a=s.getLanguageConfiguration(r.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){const l=new RegExp(a.markers.start);ZR(t,l,!0)}}}}class ZCe extends ys{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:p("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2078),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())YR(t,Ts.Region.value,!1);else{const r=i.getModel();if(!r)return;const a=s.getLanguageConfiguration(r.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){const l=new RegExp(a.markers.start);ZR(t,l,!1)}}}}class YCe extends ys{constructor(){super({id:"editor.foldAllExcept",label:p("foldAllExcept.label","Fold All Except Selected"),alias:"Fold All Except Selected",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2136),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);yH(t,!0,n)}}class XCe extends ys{constructor(){super({id:"editor.unfoldAllExcept",label:p("unfoldAllExcept.label","Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2134),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);yH(t,!1,n)}}class QCe extends ys{constructor(){super({id:"editor.foldAll",label:p("foldAllAction.label","Fold All"),alias:"Fold All",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2069),weight:100}})}invoke(e,t,i){Em(t,!0)}}class JCe extends ys{constructor(){super({id:"editor.unfoldAll",label:p("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2088),weight:100}})}invoke(e,t,i){Em(t,!1)}}class Sg extends ys{getFoldingLevel(){return parseInt(this.id.substr(Sg.ID_PREFIX.length))}invoke(e,t,i){LCe(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}}Sg.ID_PREFIX="editor.foldLevel";Sg.ID=o=>Sg.ID_PREFIX+o;class e1e extends ys{constructor(){super({id:"editor.gotoParentFold",label:p("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const s=DCe(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class t1e extends ys{constructor(){super({id:"editor.gotoPreviousFold",label:p("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const s=xCe(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class i1e extends ys{constructor(){super({id:"editor.gotoNextFold",label:p("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const s=kCe(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class n1e extends ys{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:p("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2135),weight:100}})}invoke(e,t,i){var n;const s=[],r=i.getSelections();if(r){for(const a of r){let l=a.endLineNumber;a.endColumn===1&&--l,l>a.startLineNumber&&(s.push({startLineNumber:a.startLineNumber,endLineNumber:l,type:void 0,isCollapsed:!0,source:1}),i.setSelection({startLineNumber:a.startLineNumber,startColumn:1,endLineNumber:a.startLineNumber,endColumn:1}))}if(s.length>0){s.sort((l,d)=>l.startLineNumber-d.startLineNumber);const a=Ao.sanitizeAndMerge(t.regions,s,(n=i.getModel())===null||n===void 0?void 0:n.getLineCount());t.updatePost(Ao.fromFoldRanges(a))}}}}class s1e extends ys{constructor(){super({id:"editor.removeManualFoldingRanges",label:p("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2137),weight:100}})}invoke(e,t,i){const n=i.getSelections();if(n){const s=[];for(const r of n){const{startLineNumber:a,endLineNumber:l}=r;s.push(l>=a?{startLineNumber:a,endLineNumber:l}:{endLineNumber:l,startLineNumber:a})}t.removeManualRanges(s),e.triggerFoldingModelChanged()}}}At(Ul.ID,Ul,0);_e(zCe);_e($Ce);_e(UCe);_e(KCe);_e(QCe);_e(JCe);_e(qCe);_e(GCe);_e(ZCe);_e(YCe);_e(XCe);_e(jCe);_e(e1e);_e(t1e);_e(i1e);_e(n1e);_e(s1e);for(let o=1;o<=7;o++)sQ(new Sg({id:Sg.ID(o),label:p("foldLevelAction.label","Fold Level {0}",o),alias:`Fold Level ${o}`,precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2048|21+o),weight:100}}));Et.registerCommand("_executeFoldingRangeProvider",async function(o,...e){const[t]=e;if(!(t instanceof ze))throw hr();const i=o.get(Me),n=o.get(Si).getModel(t);if(!n)throw hr();const s=o.get(Dt);if(!s.getValue("editor.folding",{resource:t}))return[];const r=o.get(si),a=s.getValue("editor.foldingStrategy",{resource:t}),l={get limit(){return s.getValue("editor.foldingMaximumRegions",{resource:t})},update:(g,f)=>{}},d=new XR(n,r,l);let c=d;if(a!=="indentation"){const g=Ul.getFoldingRangeProviders(i,n);g.length&&(c=new JR(n,g,()=>{},l,d))}const u=await c.compute(vt.None),h=[];try{if(u)for(let g=0;g=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lv=function(o,e){return function(t,i){e(t,i,o)}};let kb=class{constructor(e,t,i,n){this._editor=e,this._languageFeaturesService=t,this._workerService=i,this._accessibleNotificationService=n,this._disposables=new de,this._sessionDisposables=new de,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(s=>{s.hasChanged(56)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56)||!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const i=new Cw;for(const n of t.autoFormatTriggerCharacters)i.add(n.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(n=>{const s=n.charCodeAt(n.length-1);i.has(s)&&this._trigger(String.fromCharCode(s))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition(),n=new tn,s=this._editor.onDidChangeModelContent(r=>{if(r.isFlush){n.cancel(),s.dispose();return}for(let a=0,l=r.changes.length;a{n.token.isCancellationRequested||ls(r)&&(this._accessibleNotificationService.notify("format",!1),Xp.execute(this._editor,r,!0))}).finally(()=>{s.dispose()})}};kb.ID="editor.contrib.autoFormat";kb=IH([lv(1,Me),lv(2,Qr),lv(3,Py)],kb);let Ib=class{constructor(e,t,i){this.editor=e,this._languageFeaturesService=t,this._instantiationService=i,this._callOnDispose=new de,this._callOnModel=new de,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(EW,this.editor,e,2,Fd.None,vt.None,!1).catch(nt))}};Ib.ID="editor.contrib.formatOnPaste";Ib=IH([lv(1,Me),lv(2,qe)],Ib);class l1e extends Te{constructor(){super({id:"editor.action.formatDocument",label:p("formatDocument.label","Format Document"),alias:"Format Document",precondition:ae.and(T.notInCompositeEditor,T.writable,T.hasDocumentFormattingProvider),kbOpts:{kbExpr:T.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(e,t){if(t.hasModel()){const i=e.get(qe);await e.get(Bu).showWhile(i.invokeFunction(vme,t,1,Fd.None,vt.None,!0),250)}}}class d1e extends Te{constructor(){super({id:"editor.action.formatSelection",label:p("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:ae.and(T.writable,T.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2084),weight:100},contextMenuOpts:{when:T.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(e,t){if(!t.hasModel())return;const i=e.get(qe),n=t.getModel(),s=t.getSelections().map(a=>a.isEmpty()?new k(a.startLineNumber,1,a.startLineNumber,n.getLineMaxColumn(a.startLineNumber)):a);await e.get(Bu).showWhile(i.invokeFunction(EW,t,s,1,Fd.None,vt.None,!0),250)}}At(kb.ID,kb,2);At(Ib.ID,Ib,2);_e(l1e);_e(d1e);Et.registerCommand("editor.action.format",async o=>{const e=o.get(Ot).getFocusedCodeEditor();if(!e||!e.hasModel())return;const t=o.get(Ri);e.getSelection().isEmpty()?await t.executeCommand("editor.action.formatDocument"):await t.executeCommand("editor.action.formatSelection")});var c1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_k=function(o,e){return function(t,i){e(t,i,o)}};class Uf{remove(){var e;(e=this.parent)===null||e===void 0||e.children.delete(this.id)}static findId(e,t){let i;typeof e=="string"?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,t.children.get(i)!==void 0&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let s=0;t.children.get(n)!==void 0;s++)n=`${i}_${s}`;return n}static empty(e){return e.children.size===0}}class GT extends Uf{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class EH extends Uf{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class _d extends Uf{static create(e,t,i){const n=new tn(i),s=new _d(t.uri),r=e.ordered(t),a=r.map((d,c)=>{var u;const h=Uf.findId(`provider_${c}`,s),g=new EH(h,s,(u=d.displayName)!==null&&u!==void 0?u:"Unknown Outline Provider",c);return Promise.resolve(d.provideDocumentSymbols(t,n.token)).then(f=>{for(const m of f||[])_d._makeOutlineElement(m,g);return g},f=>(en(f),g)).then(f=>{Uf.empty(f)?f.remove():s._groups.set(h,f)})}),l=e.onDidChange(()=>{const d=e.ordered(t);Bi(d,r)||n.cancel()});return Promise.all(a).then(()=>n.token.isCancellationRequested&&!i.isCancellationRequested?_d.create(e,t,i):s._compact()).finally(()=>{n.dispose(),l.dispose(),n.dispose()})}static _makeOutlineElement(e,t){const i=Uf.findId(e,t),n=new GT(i,t,e);if(e.children)for(const s of e.children)_d._makeOutlineElement(s,n);t.children.set(n.id,n)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,i]of this._groups)i.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{const t=wt.first(this._groups.values());for(const[,i]of t.children)i.parent=this,this.children.set(i.id,i)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof GT?e.push(t.symbol):e.push(...wt.map(t.children.values(),i=>i.symbol));return e.sort((t,i)=>k.compareRangesUsingStarts(t.range,i.range))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return _d._flattenDocumentSymbols(t,e,""),t.sort((i,n)=>z.compare(k.getStartPosition(i.range),k.getStartPosition(n.range))||z.compare(k.getEndPosition(n.range),k.getEndPosition(i.range)))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&_d._flattenDocumentSymbols(e,n.children,n.name)}}const ZL=bt("IOutlineModelService");let ZT=class{constructor(e,t,i){this._languageFeaturesService=e,this._disposables=new de,this._cache=new Pu(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(i.onModelRemoved(n=>{this._cache.delete(n.id)}))}dispose(){this._disposables.dispose()}async getOrCreate(e,t){const i=this._languageFeaturesService.documentSymbolProvider,n=i.ordered(e);let s=this._cache.get(e.id);if(!s||s.versionId!==e.getVersionId()||!Bi(s.provider,n)){const a=new tn;s={versionId:e.getVersionId(),provider:n,promiseCnt:0,source:a,promise:_d.create(i,e,a.token),model:void 0},this._cache.set(e.id,s);const l=Date.now();s.promise.then(d=>{s.model=d,this._debounceInformation.update(e,Date.now()-l)}).catch(d=>{this._cache.delete(e.id)})}if(s.model)return s.model;s.promiseCnt+=1;const r=t.onCancellationRequested(()=>{--s.promiseCnt===0&&(s.source.cancel(),this._cache.delete(e.id))});try{return await s.promise}finally{r.dispose()}}};ZT=c1e([_k(0,Me),_k(1,wr),_k(2,Si)],ZT);xt(ZL,ZT,1);Et.registerCommand("_executeDocumentSymbolProvider",async function(o,...e){const[t]=e;qt(ze.isUri(t));const i=o.get(ZL),s=await o.get(Xs).createModelReference(t);try{return(await i.getOrCreate(s.object.textEditorModel,vt.None)).getTopLevelSymbols()}finally{s.dispose()}});class Tn extends q{constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=Tn.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=Tn.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=Tn.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=Tn.suppressSuggestions.bindTo(this.contextKeyService),this._register(zt(i=>{const n=this.model.read(i),s=n==null?void 0:n.state.read(i),r=!!(s!=null&&s.inlineCompletion)&&(s==null?void 0:s.ghostText)!==void 0&&!(s!=null&&s.ghostText.isEmpty());this.inlineCompletionVisible.set(r),s!=null&&s.ghostText&&(s!=null&&s.inlineCompletion)&&this.suppressSuggestions.set(s.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register(zt(i=>{const n=this.model.read(i);let s=!1,r=!0;const a=n==null?void 0:n.ghostText.read(i);if(n!=null&&n.selectedSuggestItem&&a&&a.parts.length>0){const{column:l,lines:d}=a.parts[0],c=d[0],u=n.textModel.getLineIndentColumn(a.lineNumber);if(l<=u){let g=Cs(c);g===-1&&(g=c.length-1),s=g>0;const f=n.textModel.getOptions().tabSize;r=mn.visibleColumnFromColumn(c,g+1,f){const s=k.lift(n.range);return{startOffset:t.getOffset(s.getStartPosition()),endOffset:t.getOffset(s.getEndPosition()),text:n.text}});i.sort((n,s)=>s.startOffset-n.startOffset);for(const n of i)o=o.substring(0,n.startOffset)+n.text+o.substring(n.endOffset);return o}class h1e{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;tt)throw new Ci(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new k(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}function m1e(o,e){const t=new de,i=o.createDecorationsCollection();return t.add(CL({debugName:()=>`Apply decorations from ${e.debugName}`},n=>{const s=e.read(n);i.set(s)})),t.add({dispose:()=>{i.clear()}}),t}function YT(o,e){return new z(o.lineNumber+e.lineNumber-1,e.lineNumber===1?o.column+e.column-1:e.column)}function XT(o){let e=1,t=1;for(const i of o)i===` -`?(e++,t=1):t++;return new z(e,t)}class KS{constructor(e,t){this.lineNumber=e,this.parts=t}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every((t,i)=>t.equals(e.parts[i]))}renderForScreenReader(e){if(this.parts.length===0)return"";const t=this.parts[this.parts.length-1],i=e.substr(0,t.column-1);return u1e(i,this.parts.map(s=>({range:{startLineNumber:1,endLineNumber:1,startColumn:s.column,endColumn:s.column},text:s.lines.join(` + `,constraint:kH,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=this.getLineNumbers(n,i),r=n&&n.levels,a=n&&n.direction;typeof r!="number"&&typeof a!="string"?kCe(t,!0,s):a==="up"?SH(t,!0,r||1,s):Em(t,!0,r||1,s)}}class ZCe extends ys{constructor(){super({id:"editor.toggleFold",label:p("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2090),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);wH(t,1,n)}}class YCe extends ys{constructor(){super({id:"editor.foldRecursively",label:p("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2140),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);Em(t,!0,Number.MAX_VALUE,n)}}class XCe extends ys{constructor(){super({id:"editor.foldAllBlockComments",label:p("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2138),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())YR(t,Ts.Comment.value,!0);else{const r=i.getModel();if(!r)return;const a=s.getLanguageConfiguration(r.getLanguageId()).comments;if(a&&a.blockCommentStartToken){const l=new RegExp("^\\s*"+qo(a.blockCommentStartToken));ZR(t,l,!0)}}}}class QCe extends ys{constructor(){super({id:"editor.foldAllMarkerRegions",label:p("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2077),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())YR(t,Ts.Region.value,!0);else{const r=i.getModel();if(!r)return;const a=s.getLanguageConfiguration(r.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){const l=new RegExp(a.markers.start);ZR(t,l,!0)}}}}class JCe extends ys{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:p("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2078),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())YR(t,Ts.Region.value,!1);else{const r=i.getModel();if(!r)return;const a=s.getLanguageConfiguration(r.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){const l=new RegExp(a.markers.start);ZR(t,l,!1)}}}}class e1e extends ys{constructor(){super({id:"editor.foldAllExcept",label:p("foldAllExcept.label","Fold All Except Selected"),alias:"Fold All Except Selected",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2136),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);yH(t,!0,n)}}class t1e extends ys{constructor(){super({id:"editor.unfoldAllExcept",label:p("unfoldAllExcept.label","Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2134),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);yH(t,!1,n)}}class i1e extends ys{constructor(){super({id:"editor.foldAll",label:p("foldAllAction.label","Fold All"),alias:"Fold All",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2069),weight:100}})}invoke(e,t,i){Em(t,!0)}}class n1e extends ys{constructor(){super({id:"editor.unfoldAll",label:p("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2088),weight:100}})}invoke(e,t,i){Em(t,!1)}}class Sg extends ys{getFoldingLevel(){return parseInt(this.id.substr(Sg.ID_PREFIX.length))}invoke(e,t,i){ICe(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}}Sg.ID_PREFIX="editor.foldLevel";Sg.ID=o=>Sg.ID_PREFIX+o;class s1e extends ys{constructor(){super({id:"editor.gotoParentFold",label:p("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const s=ECe(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class o1e extends ys{constructor(){super({id:"editor.gotoPreviousFold",label:p("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const s=NCe(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class r1e extends ys{constructor(){super({id:"editor.gotoNextFold",label:p("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const s=TCe(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class a1e extends ys{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:p("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2135),weight:100}})}invoke(e,t,i){var n;const s=[],r=i.getSelections();if(r){for(const a of r){let l=a.endLineNumber;a.endColumn===1&&--l,l>a.startLineNumber&&(s.push({startLineNumber:a.startLineNumber,endLineNumber:l,type:void 0,isCollapsed:!0,source:1}),i.setSelection({startLineNumber:a.startLineNumber,startColumn:1,endLineNumber:a.startLineNumber,endColumn:1}))}if(s.length>0){s.sort((l,d)=>l.startLineNumber-d.startLineNumber);const a=Ao.sanitizeAndMerge(t.regions,s,(n=i.getModel())===null||n===void 0?void 0:n.getLineCount());t.updatePost(Ao.fromFoldRanges(a))}}}}class l1e extends ys{constructor(){super({id:"editor.removeManualFoldingRanges",label:p("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2137),weight:100}})}invoke(e,t,i){const n=i.getSelections();if(n){const s=[];for(const r of n){const{startLineNumber:a,endLineNumber:l}=r;s.push(l>=a?{startLineNumber:a,endLineNumber:l}:{endLineNumber:l,startLineNumber:a})}t.removeManualRanges(s),e.triggerFoldingModelChanged()}}}At(Ul.ID,Ul,0);_e(KCe);_e(qCe);_e(GCe);_e(YCe);_e(i1e);_e(n1e);_e(XCe);_e(QCe);_e(JCe);_e(e1e);_e(t1e);_e(ZCe);_e(s1e);_e(o1e);_e(r1e);_e(a1e);_e(l1e);for(let o=1;o<=7;o++)lQ(new Sg({id:Sg.ID(o),label:p("foldLevelAction.label","Fold Level {0}",o),alias:`Fold Level ${o}`,precondition:hs,kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2048|21+o),weight:100}}));Et.registerCommand("_executeFoldingRangeProvider",async function(o,...e){const[t]=e;if(!(t instanceof ze))throw hr();const i=o.get(Me),n=o.get(Si).getModel(t);if(!n)throw hr();const s=o.get(Dt);if(!s.getValue("editor.folding",{resource:t}))return[];const r=o.get(si),a=s.getValue("editor.foldingStrategy",{resource:t}),l={get limit(){return s.getValue("editor.foldingMaximumRegions",{resource:t})},update:(g,f)=>{}},d=new XR(n,r,l);let c=d;if(a!=="indentation"){const g=Ul.getFoldingRangeProviders(i,n);g.length&&(c=new JR(n,g,()=>{},l,d))}const u=await c.compute(vt.None),h=[];try{if(u)for(let g=0;g=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lv=function(o,e){return function(t,i){e(t,i,o)}};let kb=class{constructor(e,t,i,n){this._editor=e,this._languageFeaturesService=t,this._workerService=i,this._accessibleNotificationService=n,this._disposables=new de,this._sessionDisposables=new de,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(s=>{s.hasChanged(56)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56)||!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const i=new Cw;for(const n of t.autoFormatTriggerCharacters)i.add(n.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(n=>{const s=n.charCodeAt(n.length-1);i.has(s)&&this._trigger(String.fromCharCode(s))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition(),n=new tn,s=this._editor.onDidChangeModelContent(r=>{if(r.isFlush){n.cancel(),s.dispose();return}for(let a=0,l=r.changes.length;a{n.token.isCancellationRequested||ls(r)&&(this._accessibleNotificationService.notify("format",!1),Xp.execute(this._editor,r,!0))}).finally(()=>{s.dispose()})}};kb.ID="editor.contrib.autoFormat";kb=IH([lv(1,Me),lv(2,Qr),lv(3,Py)],kb);let Ib=class{constructor(e,t,i){this.editor=e,this._languageFeaturesService=t,this._instantiationService=i,this._callOnDispose=new de,this._callOnModel=new de,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(EW,this.editor,e,2,Fd.None,vt.None,!1).catch(nt))}};Ib.ID="editor.contrib.formatOnPaste";Ib=IH([lv(1,Me),lv(2,qe)],Ib);class h1e extends Te{constructor(){super({id:"editor.action.formatDocument",label:p("formatDocument.label","Format Document"),alias:"Format Document",precondition:ae.and(T.notInCompositeEditor,T.writable,T.hasDocumentFormattingProvider),kbOpts:{kbExpr:T.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(e,t){if(t.hasModel()){const i=e.get(qe);await e.get(Bu).showWhile(i.invokeFunction(Sme,t,1,Fd.None,vt.None,!0),250)}}}class g1e extends Te{constructor(){super({id:"editor.action.formatSelection",label:p("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:ae.and(T.writable,T.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:T.editorTextFocus,primary:fn(2089,2084),weight:100},contextMenuOpts:{when:T.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(e,t){if(!t.hasModel())return;const i=e.get(qe),n=t.getModel(),s=t.getSelections().map(a=>a.isEmpty()?new k(a.startLineNumber,1,a.startLineNumber,n.getLineMaxColumn(a.startLineNumber)):a);await e.get(Bu).showWhile(i.invokeFunction(EW,t,s,1,Fd.None,vt.None,!0),250)}}At(kb.ID,kb,2);At(Ib.ID,Ib,2);_e(h1e);_e(g1e);Et.registerCommand("editor.action.format",async o=>{const e=o.get(Ot).getFocusedCodeEditor();if(!e||!e.hasModel())return;const t=o.get(Ri);e.getSelection().isEmpty()?await t.executeCommand("editor.action.formatDocument"):await t.executeCommand("editor.action.formatSelection")});var f1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_k=function(o,e){return function(t,i){e(t,i,o)}};class Uf{remove(){var e;(e=this.parent)===null||e===void 0||e.children.delete(this.id)}static findId(e,t){let i;typeof e=="string"?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,t.children.get(i)!==void 0&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let s=0;t.children.get(n)!==void 0;s++)n=`${i}_${s}`;return n}static empty(e){return e.children.size===0}}class GT extends Uf{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class EH extends Uf{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class _d extends Uf{static create(e,t,i){const n=new tn(i),s=new _d(t.uri),r=e.ordered(t),a=r.map((d,c)=>{var u;const h=Uf.findId(`provider_${c}`,s),g=new EH(h,s,(u=d.displayName)!==null&&u!==void 0?u:"Unknown Outline Provider",c);return Promise.resolve(d.provideDocumentSymbols(t,n.token)).then(f=>{for(const m of f||[])_d._makeOutlineElement(m,g);return g},f=>(en(f),g)).then(f=>{Uf.empty(f)?f.remove():s._groups.set(h,f)})}),l=e.onDidChange(()=>{const d=e.ordered(t);Bi(d,r)||n.cancel()});return Promise.all(a).then(()=>n.token.isCancellationRequested&&!i.isCancellationRequested?_d.create(e,t,i):s._compact()).finally(()=>{n.dispose(),l.dispose(),n.dispose()})}static _makeOutlineElement(e,t){const i=Uf.findId(e,t),n=new GT(i,t,e);if(e.children)for(const s of e.children)_d._makeOutlineElement(s,n);t.children.set(n.id,n)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,i]of this._groups)i.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{const t=wt.first(this._groups.values());for(const[,i]of t.children)i.parent=this,this.children.set(i.id,i)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof GT?e.push(t.symbol):e.push(...wt.map(t.children.values(),i=>i.symbol));return e.sort((t,i)=>k.compareRangesUsingStarts(t.range,i.range))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return _d._flattenDocumentSymbols(t,e,""),t.sort((i,n)=>z.compare(k.getStartPosition(i.range),k.getStartPosition(n.range))||z.compare(k.getEndPosition(n.range),k.getEndPosition(i.range)))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&_d._flattenDocumentSymbols(e,n.children,n.name)}}const ZL=bt("IOutlineModelService");let ZT=class{constructor(e,t,i){this._languageFeaturesService=e,this._disposables=new de,this._cache=new Pu(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(i.onModelRemoved(n=>{this._cache.delete(n.id)}))}dispose(){this._disposables.dispose()}async getOrCreate(e,t){const i=this._languageFeaturesService.documentSymbolProvider,n=i.ordered(e);let s=this._cache.get(e.id);if(!s||s.versionId!==e.getVersionId()||!Bi(s.provider,n)){const a=new tn;s={versionId:e.getVersionId(),provider:n,promiseCnt:0,source:a,promise:_d.create(i,e,a.token),model:void 0},this._cache.set(e.id,s);const l=Date.now();s.promise.then(d=>{s.model=d,this._debounceInformation.update(e,Date.now()-l)}).catch(d=>{this._cache.delete(e.id)})}if(s.model)return s.model;s.promiseCnt+=1;const r=t.onCancellationRequested(()=>{--s.promiseCnt===0&&(s.source.cancel(),this._cache.delete(e.id))});try{return await s.promise}finally{r.dispose()}}};ZT=f1e([_k(0,Me),_k(1,wr),_k(2,Si)],ZT);xt(ZL,ZT,1);Et.registerCommand("_executeDocumentSymbolProvider",async function(o,...e){const[t]=e;qt(ze.isUri(t));const i=o.get(ZL),s=await o.get(Xs).createModelReference(t);try{return(await i.getOrCreate(s.object.textEditorModel,vt.None)).getTopLevelSymbols()}finally{s.dispose()}});class Tn extends q{constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=Tn.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=Tn.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=Tn.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=Tn.suppressSuggestions.bindTo(this.contextKeyService),this._register(zt(i=>{const n=this.model.read(i),s=n==null?void 0:n.state.read(i),r=!!(s!=null&&s.inlineCompletion)&&(s==null?void 0:s.ghostText)!==void 0&&!(s!=null&&s.ghostText.isEmpty());this.inlineCompletionVisible.set(r),s!=null&&s.ghostText&&(s!=null&&s.inlineCompletion)&&this.suppressSuggestions.set(s.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register(zt(i=>{const n=this.model.read(i);let s=!1,r=!0;const a=n==null?void 0:n.ghostText.read(i);if(n!=null&&n.selectedSuggestItem&&a&&a.parts.length>0){const{column:l,lines:d}=a.parts[0],c=d[0],u=n.textModel.getLineIndentColumn(a.lineNumber);if(l<=u){let g=Cs(c);g===-1&&(g=c.length-1),s=g>0;const f=n.textModel.getOptions().tabSize;r=mn.visibleColumnFromColumn(c,g+1,f){const s=k.lift(n.range);return{startOffset:t.getOffset(s.getStartPosition()),endOffset:t.getOffset(s.getEndPosition()),text:n.text}});i.sort((n,s)=>s.startOffset-n.startOffset);for(const n of i)o=o.substring(0,n.startOffset)+n.text+o.substring(n.endOffset);return o}class m1e{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;tt)throw new Ci(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new k(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}function C1e(o,e){const t=new de,i=o.createDecorationsCollection();return t.add(CL({debugName:()=>`Apply decorations from ${e.debugName}`},n=>{const s=e.read(n);i.set(s)})),t.add({dispose:()=>{i.clear()}}),t}function YT(o,e){return new z(o.lineNumber+e.lineNumber-1,e.lineNumber===1?o.column+e.column-1:e.column)}function XT(o){let e=1,t=1;for(const i of o)i===` +`?(e++,t=1):t++;return new z(e,t)}class KS{constructor(e,t){this.lineNumber=e,this.parts=t}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every((t,i)=>t.equals(e.parts[i]))}renderForScreenReader(e){if(this.parts.length===0)return"";const t=this.parts[this.parts.length-1],i=e.substr(0,t.column-1);return p1e(i,this.parts.map(s=>({range:{startLineNumber:1,endLineNumber:1,startColumn:s.column,endColumn:s.column},text:s.lines.join(` `)}))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}get lineCount(){return 1+this.parts.reduce((e,t)=>e+t.lines.length-1,0)}}class QT{constructor(e,t,i){this.column=e,this.lines=t,this.preview=i}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every((t,i)=>t===e.lines[i])}}class JT{constructor(e,t,i,n=0){this.lineNumber=e,this.columnRange=t,this.newLines=i,this.additionalReservedLineCount=n,this.parts=[new QT(this.columnRange.endColumnExclusive,this.newLines,!1)]}renderForScreenReader(e){return this.newLines.join(` -`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every((t,i)=>t===e.newLines[i])&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function H3(o,e){return o===e?!0:!o||!e?!1:o instanceof KS&&e instanceof KS||o instanceof JT&&e instanceof JT?o.equals(e):!1}var _1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},v1e=function(o,e){return function(t,i){e(t,i,o)}};const z3="ghost-text";let e2=class extends q{constructor(e,t,i){super(),this.editor=e,this.model=t,this.languageService=i,this.isDisposed=Pt(this,!1),this.currentTextModel=Oi(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=rt(this,n=>{if(this.isDisposed.read(n))return;const s=this.currentTextModel.read(n);if(s!==this.model.targetTextModel.read(n))return;const r=this.model.ghostText.read(n);if(!r)return;const a=r instanceof JT?r.columnRange:void 0,l=[],d=[];function c(m,v){if(d.length>0){const _=d[d.length-1];v&&_.decorations.push(new lo(_.content.length+1,_.content.length+1+m[0].length,v,0)),_.content+=m[0],m=m.slice(1)}for(const _ of m)d.push({content:_,decorations:v?[new lo(1,_.length+1,v,0)]:[]})}const u=s.getLineContent(r.lineNumber);let h,g=0;for(const m of r.parts){let v=m.lines;h===void 0?(l.push({column:m.column,text:v[0],preview:m.preview}),v=v.slice(1)):c([u.substring(g,m.column-1)],void 0),v.length>0&&(c(v,z3),h===void 0&&m.column<=u.length&&(h=m.column)),g=m.column-1}h!==void 0&&c([u.substring(g)],void 0);const f=h!==void 0?new p1e(h,u.length+1):void 0;return{replacedRange:a,inlineTexts:l,additionalLines:d,hiddenRange:f,lineNumber:r.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(n),targetTextModel:s}}),this.decorations=rt(this,n=>{const s=this.uiState.read(n);if(!s)return[];const r=[];s.replacedRange&&r.push({range:s.replacedRange.toRange(s.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),s.hiddenRange&&r.push({range:s.hiddenRange.toRange(s.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const a of s.inlineTexts)r.push({range:k.fromPositions(new z(s.lineNumber,a.column)),options:{description:z3,after:{content:a.text,inlineClassName:a.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:Sa.Left},showIfCollapsed:!0}});return r}),this.additionalLinesWidget=this._register(new b1e(this.editor,this.languageService.languageIdCodec,rt(n=>{const s=this.uiState.read(n);return s?{lineNumber:s.lineNumber,additionalLines:s.additionalLines,minReservedLineCount:s.additionalReservedLineCount,targetTextModel:s.targetTextModel}:void 0}))),this._register(je(()=>{this.isDisposed.set(!0,void 0)})),this._register(m1e(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};e2=_1e([v1e(2,bi)],e2);class b1e extends q{get viewZoneId(){return this._viewZoneId}constructor(e,t,i){super(),this.editor=e,this.languageIdCodec=t,this.lines=i,this._viewZoneId=void 0,this.editorOptionsChanged=Fo("editorOptionChanged",ye.filter(this.editor.onDidChangeConfiguration,n=>n.hasChanged(33)||n.hasChanged(116)||n.hasChanged(98)||n.hasChanged(93)||n.hasChanged(51)||n.hasChanged(50)||n.hasChanged(66))),this._register(zt(n=>{const s=this.lines.read(n);this.editorOptionsChanged.read(n),s?this.updateLines(s.lineNumber,s.additionalLines,s.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:s}=n.getOptions();this.editor.changeViewZones(r=>{this._viewZoneId&&(r.removeZone(this._viewZoneId),this._viewZoneId=void 0);const a=Math.max(t.length,i);if(a>0){const l=document.createElement("div");C1e(l,s,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=r.addZone({afterLineNumber:e,heightInLines:a,domNode:l,afterColumnAffinity:1})}})}}function C1e(o,e,t,i,n){const s=i.get(33),r=i.get(116),a="none",l=i.get(93),d=i.get(51),c=i.get(50),u=i.get(66),h=new mm(1e4);h.appendString('

');for(let m=0,v=t.length;m');const C=Jb(b),w=Dp(b),S=Cn.createEmpty(b,n);n0(new Ou(c.isMonospace&&!s,c.canUseHalfwidthRightwardsArrow,b,!1,C,w,0,S,_.decorations,e,0,c.spaceWidth,c.middotWidth,c.wsmiddotWidth,r,a,l,d!==Po.OFF,null),h),h.appendString("
")}h.appendString(""),Jn(o,c);const g=h.build(),f=$3?$3.createHTML(g):g;o.innerHTML=f}const $3=qd("editorGhostText",{createHTML:o=>o});function w1e(o,e){const t=new _B,i=new bB(t,d=>e.getLanguageConfiguration(d)),n=new vB(new S1e([o]),i),s=pE(n,[],void 0,!0);let r="";const a=o.getLineContent();function l(d,c){if(d.kind===2)if(l(d.openingBracket,c),c=Ti(c,d.openingBracket.length),d.child&&(l(d.child,c),c=Ti(c,d.child.length)),d.closingBracket)l(d.closingBracket,c),c=Ti(c,d.closingBracket.length);else{const h=i.getSingleLanguageBracketTokens(d.openingBracket.languageId).findClosingTokenText(d.openingBracket.bracketIds);r+=h}else if(d.kind!==3){if(d.kind===0||d.kind===1)r+=a.substring(c,Ti(c,d.length));else if(d.kind===4)for(const u of d.children)l(u,c),c=Ti(c,u.length)}}return l(s,Ms),r}class S1e{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}class Mr{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t=0,i=this.value.charCodeAt(e),n;if(n=Mr._table[i],typeof n=="number")return this.pos+=1,{type:n,pos:e,len:1};if(Mr.isDigitCharacter(i)){n=8;do t+=1,i=this.value.charCodeAt(e+t);while(Mr.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}if(Mr.isVariableCharacter(i)){n=9;do i=this.value.charCodeAt(e+ ++t);while(Mr.isVariableCharacter(i)||Mr.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}n=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof Mr._table[i]>"u"&&!Mr.isDigitCharacter(i)&&!Mr.isVariableCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}}Mr._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class Nm{constructor(){this._children=[]}appendChild(e){return e instanceof Is&&this._children[this._children.length-1]instanceof Is?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),s=i.children.slice(0);s.splice(n,1,...t),i._children=s,function r(a,l){for(const d of a)d.parent=l,r(d.children,d)}(t,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof O0)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class Is extends Nm{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new Is(this.value)}}class NH extends Nm{}class nr extends NH{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof Tm?this._children[0]:void 0}clone(){const e=new nr(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class Tm extends Nm{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof Is&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new Tm;return this.options.forEach(e.appendChild,e),e}}class eP extends Nm{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(s=>s instanceof ha&&!!s.elseValue)&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof ha){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new eP;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}}class ha extends Nm{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((i,n)=>n===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}clone(){return new ha(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class Eb extends NH{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new Is(t)],!0):!1}clone(){const e=new Eb(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function U3(o,e){const t=[...o];for(;t.length>0;){const i=t.shift();if(!e(i))break;t.unshift(...i.children)}}class O0 extends Nm{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(i){return i instanceof nr&&(e.push(i),t=!t||t.indexn===e?(i=!0,!1):(t+=n.len(),!0)),i?t:-1}fullLen(e){let t=0;return U3([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof nr&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof Eb&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new O0;return this._children=this.children.map(t=>t.clone()),e}walk(e){U3(this.children,e)}}class om{constructor(){this._scanner=new Mr,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const n=new O0;return this.parseFragment(e,n),this.ensureFinalTabstop(n,i??!1,t??!1),n}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const n=new Map,s=[];t.walk(l=>(l instanceof nr&&(l.isFinalTabstop?n.set(0,void 0):!n.has(l.index)&&l.children.length>0?n.set(l.index,l.children):s.push(l)),!0));const r=(l,d)=>{const c=n.get(l.index);if(!c)return;const u=new nr(l.index);u.transform=l.transform;for(const h of c){const g=h.clone();u.appendChild(g),g instanceof nr&&n.has(g.index)&&!d.has(g.index)&&(d.add(g.index),r(g,d),d.delete(g.index))}t.replace(l,[u])},a=new Set;for(const l of s)r(l,a);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find(s=>s.index===0)||e.appendChild(new nr(0)))}_accept(e,t){if(e===void 0||this._token.type===e){const i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const n=this._scanner.next();if(n.type!==0&&n.type!==4&&n.type!==5)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new Is(t)),!0):!1}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new nr(Number(t)):new Eb(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const s=new nr(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new Is("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else if(s.index>0&&this._accept(7)){const r=new Tm;for(;;){if(this._parseChoiceElement(r)){if(this._accept(2))continue;if(this._accept(7)&&(s.appendChild(r),this._accept(4)))return e.appendChild(s),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseChoiceElement(e){const t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let n;if((n=this._accept(5,!0))?n=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||n:n=this._accept(void 0,!0),!n)return this._backTo(t),!1;i.push(n)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new Is(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const s=new Eb(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new Is("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseTransform(e){const t=new eP;let i="",n="";for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(6,!0)||s,i+=s;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(5,!0)||this._accept(6,!0)||s,t.appendChild(new Is(s));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,n)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(n)if(i){if(this._accept(4))return e.appendChild(new ha(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new ha(Number(n))),!0;else return this._backTo(t),!1;if(this._accept(6)){const s=this._accept(9,!0);return!s||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new ha(Number(n),s)),!0)}else if(this._accept(11)){const s=this._until(4);if(s)return e.appendChild(new ha(Number(n),void 0,s,void 0)),!0}else if(this._accept(12)){const s=this._until(4);if(s)return e.appendChild(new ha(Number(n),void 0,void 0,s)),!0}else if(this._accept(13)){const s=this._until(1);if(s){const r=this._until(4);if(r)return e.appendChild(new ha(Number(n),void 0,s,r)),!0}}else{const s=this._until(4);if(s)return e.appendChild(new ha(Number(n),void 0,void 0,s)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new Is(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}async function y1e(o,e,t,i,n=vt.None,s){const r=x1e(e,t),a=o.all(t),l=new PM;for(const _ of a)_.groupId&&l.add(_.groupId,_);function d(_){if(!_.yieldsToGroupIds)return[];const b=[];for(const C of _.yieldsToGroupIds||[]){const w=l.get(C);for(const S of w)b.push(S)}return b}const c=new Map,u=new Set;function h(_,b){if(b=[...b,_],u.has(_))return b;u.add(_);try{const C=d(_);for(const w of C){const S=h(w,b);if(S)return S}}finally{u.delete(_)}}function g(_){const b=c.get(_);if(b)return b;const C=h(_,[]);C&&en(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${C.map(S=>S.toString?S.toString():""+S).join(" -> ")}`));const w=new wy;return c.set(_,w.p),(async()=>{if(!C){const S=d(_);for(const x of S){const y=await g(x);if(y&&y.items.length>0)return}}try{return await _.provideInlineCompletions(t,e,i,n)}catch(S){en(S);return}})().then(S=>w.complete(S),S=>w.error(S)),w.p}const f=await Promise.all(a.map(async _=>({provider:_,completions:await g(_)}))),m=new Map,v=[];for(const _ of f){const b=_.completions;if(!b)continue;const C=new D1e(b,_.provider);v.push(C);for(const w of b.items){const S=qS.from(w,C,r,t,s);m.set(S.hash(),S)}}return new L1e(Array.from(m.values()),new Set(m.keys()),v)}class L1e{constructor(e,t,i){this.completions=e,this.hashs=t,this.providerResults=i}has(e){return this.hashs.has(e.hash())}dispose(){for(const e of this.providerResults)e.removeRef()}}class D1e{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}}class qS{static from(e,t,i,n,s){let r,a,l=e.range?k.lift(e.range):i;if(typeof e.insertText=="string"){if(r=e.insertText,s&&e.completeBracketPairs){r=j3(r,l.getStartPosition(),n,s);const d=r.length-e.insertText.length;d!==0&&(l=new k(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+d))}a=void 0}else if("snippet"in e.insertText){const d=e.insertText.snippet.length;if(s&&e.completeBracketPairs){e.insertText.snippet=j3(e.insertText.snippet,l.getStartPosition(),n,s);const u=e.insertText.snippet.length-d;u!==0&&(l=new k(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+u))}const c=new om().parse(e.insertText.snippet);c.children.length===1&&c.children[0]instanceof Is?(r=c.children[0].value,a=void 0):(r=c.toString(),a={snippet:e.insertText.snippet,range:l})}else by(e.insertText);return new qS(r,e.command,l,r,a,e.additionalTextEdits||f1e(),e,t)}constructor(e,t,i,n,s,r,a,l){this.filterText=e,this.command=t,this.range=i,this.insertText=n,this.snippetInfo=s,this.additionalTextEdits=r,this.sourceInlineCompletion=a,this.source=l,e=e.replace(/\r\n|\r/g,` +`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every((t,i)=>t===e.newLines[i])&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function H3(o,e){return o===e?!0:!o||!e?!1:o instanceof KS&&e instanceof KS||o instanceof JT&&e instanceof JT?o.equals(e):!1}var w1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},S1e=function(o,e){return function(t,i){e(t,i,o)}};const z3="ghost-text";let e2=class extends q{constructor(e,t,i){super(),this.editor=e,this.model=t,this.languageService=i,this.isDisposed=Pt(this,!1),this.currentTextModel=Oi(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=rt(this,n=>{if(this.isDisposed.read(n))return;const s=this.currentTextModel.read(n);if(s!==this.model.targetTextModel.read(n))return;const r=this.model.ghostText.read(n);if(!r)return;const a=r instanceof JT?r.columnRange:void 0,l=[],d=[];function c(m,v){if(d.length>0){const _=d[d.length-1];v&&_.decorations.push(new lo(_.content.length+1,_.content.length+1+m[0].length,v,0)),_.content+=m[0],m=m.slice(1)}for(const _ of m)d.push({content:_,decorations:v?[new lo(1,_.length+1,v,0)]:[]})}const u=s.getLineContent(r.lineNumber);let h,g=0;for(const m of r.parts){let v=m.lines;h===void 0?(l.push({column:m.column,text:v[0],preview:m.preview}),v=v.slice(1)):c([u.substring(g,m.column-1)],void 0),v.length>0&&(c(v,z3),h===void 0&&m.column<=u.length&&(h=m.column)),g=m.column-1}h!==void 0&&c([u.substring(g)],void 0);const f=h!==void 0?new b1e(h,u.length+1):void 0;return{replacedRange:a,inlineTexts:l,additionalLines:d,hiddenRange:f,lineNumber:r.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(n),targetTextModel:s}}),this.decorations=rt(this,n=>{const s=this.uiState.read(n);if(!s)return[];const r=[];s.replacedRange&&r.push({range:s.replacedRange.toRange(s.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),s.hiddenRange&&r.push({range:s.hiddenRange.toRange(s.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const a of s.inlineTexts)r.push({range:k.fromPositions(new z(s.lineNumber,a.column)),options:{description:z3,after:{content:a.text,inlineClassName:a.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:Sa.Left},showIfCollapsed:!0}});return r}),this.additionalLinesWidget=this._register(new y1e(this.editor,this.languageService.languageIdCodec,rt(n=>{const s=this.uiState.read(n);return s?{lineNumber:s.lineNumber,additionalLines:s.additionalLines,minReservedLineCount:s.additionalReservedLineCount,targetTextModel:s.targetTextModel}:void 0}))),this._register(je(()=>{this.isDisposed.set(!0,void 0)})),this._register(C1e(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};e2=w1e([S1e(2,bi)],e2);class y1e extends q{get viewZoneId(){return this._viewZoneId}constructor(e,t,i){super(),this.editor=e,this.languageIdCodec=t,this.lines=i,this._viewZoneId=void 0,this.editorOptionsChanged=Fo("editorOptionChanged",ye.filter(this.editor.onDidChangeConfiguration,n=>n.hasChanged(33)||n.hasChanged(116)||n.hasChanged(98)||n.hasChanged(93)||n.hasChanged(51)||n.hasChanged(50)||n.hasChanged(66))),this._register(zt(n=>{const s=this.lines.read(n);this.editorOptionsChanged.read(n),s?this.updateLines(s.lineNumber,s.additionalLines,s.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:s}=n.getOptions();this.editor.changeViewZones(r=>{this._viewZoneId&&(r.removeZone(this._viewZoneId),this._viewZoneId=void 0);const a=Math.max(t.length,i);if(a>0){const l=document.createElement("div");L1e(l,s,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=r.addZone({afterLineNumber:e,heightInLines:a,domNode:l,afterColumnAffinity:1})}})}}function L1e(o,e,t,i,n){const s=i.get(33),r=i.get(116),a="none",l=i.get(93),d=i.get(51),c=i.get(50),u=i.get(66),h=new mm(1e4);h.appendString('
');for(let m=0,v=t.length;m');const C=Jb(b),w=Dp(b),S=Cn.createEmpty(b,n);n0(new Ou(c.isMonospace&&!s,c.canUseHalfwidthRightwardsArrow,b,!1,C,w,0,S,_.decorations,e,0,c.spaceWidth,c.middotWidth,c.wsmiddotWidth,r,a,l,d!==Po.OFF,null),h),h.appendString("
")}h.appendString(""),Jn(o,c);const g=h.build(),f=$3?$3.createHTML(g):g;o.innerHTML=f}const $3=qd("editorGhostText",{createHTML:o=>o});function D1e(o,e){const t=new _B,i=new bB(t,d=>e.getLanguageConfiguration(d)),n=new vB(new x1e([o]),i),s=pE(n,[],void 0,!0);let r="";const a=o.getLineContent();function l(d,c){if(d.kind===2)if(l(d.openingBracket,c),c=Ti(c,d.openingBracket.length),d.child&&(l(d.child,c),c=Ti(c,d.child.length)),d.closingBracket)l(d.closingBracket,c),c=Ti(c,d.closingBracket.length);else{const h=i.getSingleLanguageBracketTokens(d.openingBracket.languageId).findClosingTokenText(d.openingBracket.bracketIds);r+=h}else if(d.kind!==3){if(d.kind===0||d.kind===1)r+=a.substring(c,Ti(c,d.length));else if(d.kind===4)for(const u of d.children)l(u,c),c=Ti(c,u.length)}}return l(s,Ms),r}class x1e{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}class Mr{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t=0,i=this.value.charCodeAt(e),n;if(n=Mr._table[i],typeof n=="number")return this.pos+=1,{type:n,pos:e,len:1};if(Mr.isDigitCharacter(i)){n=8;do t+=1,i=this.value.charCodeAt(e+t);while(Mr.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}if(Mr.isVariableCharacter(i)){n=9;do i=this.value.charCodeAt(e+ ++t);while(Mr.isVariableCharacter(i)||Mr.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}n=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof Mr._table[i]>"u"&&!Mr.isDigitCharacter(i)&&!Mr.isVariableCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}}Mr._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class Nm{constructor(){this._children=[]}appendChild(e){return e instanceof Is&&this._children[this._children.length-1]instanceof Is?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),s=i.children.slice(0);s.splice(n,1,...t),i._children=s,function r(a,l){for(const d of a)d.parent=l,r(d.children,d)}(t,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof O0)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class Is extends Nm{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new Is(this.value)}}class NH extends Nm{}class nr extends NH{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof Tm?this._children[0]:void 0}clone(){const e=new nr(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class Tm extends Nm{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof Is&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new Tm;return this.options.forEach(e.appendChild,e),e}}class eP extends Nm{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(s=>s instanceof ha&&!!s.elseValue)&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof ha){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new eP;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}}class ha extends Nm{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((i,n)=>n===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}clone(){return new ha(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class Eb extends NH{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new Is(t)],!0):!1}clone(){const e=new Eb(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function U3(o,e){const t=[...o];for(;t.length>0;){const i=t.shift();if(!e(i))break;t.unshift(...i.children)}}class O0 extends Nm{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(i){return i instanceof nr&&(e.push(i),t=!t||t.indexn===e?(i=!0,!1):(t+=n.len(),!0)),i?t:-1}fullLen(e){let t=0;return U3([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof nr&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof Eb&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new O0;return this._children=this.children.map(t=>t.clone()),e}walk(e){U3(this.children,e)}}class om{constructor(){this._scanner=new Mr,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const n=new O0;return this.parseFragment(e,n),this.ensureFinalTabstop(n,i??!1,t??!1),n}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const n=new Map,s=[];t.walk(l=>(l instanceof nr&&(l.isFinalTabstop?n.set(0,void 0):!n.has(l.index)&&l.children.length>0?n.set(l.index,l.children):s.push(l)),!0));const r=(l,d)=>{const c=n.get(l.index);if(!c)return;const u=new nr(l.index);u.transform=l.transform;for(const h of c){const g=h.clone();u.appendChild(g),g instanceof nr&&n.has(g.index)&&!d.has(g.index)&&(d.add(g.index),r(g,d),d.delete(g.index))}t.replace(l,[u])},a=new Set;for(const l of s)r(l,a);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find(s=>s.index===0)||e.appendChild(new nr(0)))}_accept(e,t){if(e===void 0||this._token.type===e){const i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const n=this._scanner.next();if(n.type!==0&&n.type!==4&&n.type!==5)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new Is(t)),!0):!1}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new nr(Number(t)):new Eb(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const s=new nr(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new Is("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else if(s.index>0&&this._accept(7)){const r=new Tm;for(;;){if(this._parseChoiceElement(r)){if(this._accept(2))continue;if(this._accept(7)&&(s.appendChild(r),this._accept(4)))return e.appendChild(s),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseChoiceElement(e){const t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let n;if((n=this._accept(5,!0))?n=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||n:n=this._accept(void 0,!0),!n)return this._backTo(t),!1;i.push(n)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new Is(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const s=new Eb(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new Is("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseTransform(e){const t=new eP;let i="",n="";for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(6,!0)||s,i+=s;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(5,!0)||this._accept(6,!0)||s,t.appendChild(new Is(s));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,n)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(n)if(i){if(this._accept(4))return e.appendChild(new ha(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new ha(Number(n))),!0;else return this._backTo(t),!1;if(this._accept(6)){const s=this._accept(9,!0);return!s||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new ha(Number(n),s)),!0)}else if(this._accept(11)){const s=this._until(4);if(s)return e.appendChild(new ha(Number(n),void 0,s,void 0)),!0}else if(this._accept(12)){const s=this._until(4);if(s)return e.appendChild(new ha(Number(n),void 0,void 0,s)),!0}else if(this._accept(13)){const s=this._until(1);if(s){const r=this._until(4);if(r)return e.appendChild(new ha(Number(n),void 0,s,r)),!0}}else{const s=this._until(4);if(s)return e.appendChild(new ha(Number(n),void 0,void 0,s)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new Is(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}async function k1e(o,e,t,i,n=vt.None,s){const r=N1e(e,t),a=o.all(t),l=new PM;for(const _ of a)_.groupId&&l.add(_.groupId,_);function d(_){if(!_.yieldsToGroupIds)return[];const b=[];for(const C of _.yieldsToGroupIds||[]){const w=l.get(C);for(const S of w)b.push(S)}return b}const c=new Map,u=new Set;function h(_,b){if(b=[...b,_],u.has(_))return b;u.add(_);try{const C=d(_);for(const w of C){const S=h(w,b);if(S)return S}}finally{u.delete(_)}}function g(_){const b=c.get(_);if(b)return b;const C=h(_,[]);C&&en(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${C.map(S=>S.toString?S.toString():""+S).join(" -> ")}`));const w=new wy;return c.set(_,w.p),(async()=>{if(!C){const S=d(_);for(const x of S){const y=await g(x);if(y&&y.items.length>0)return}}try{return await _.provideInlineCompletions(t,e,i,n)}catch(S){en(S);return}})().then(S=>w.complete(S),S=>w.error(S)),w.p}const f=await Promise.all(a.map(async _=>({provider:_,completions:await g(_)}))),m=new Map,v=[];for(const _ of f){const b=_.completions;if(!b)continue;const C=new E1e(b,_.provider);v.push(C);for(const w of b.items){const S=qS.from(w,C,r,t,s);m.set(S.hash(),S)}}return new I1e(Array.from(m.values()),new Set(m.keys()),v)}class I1e{constructor(e,t,i){this.completions=e,this.hashs=t,this.providerResults=i}has(e){return this.hashs.has(e.hash())}dispose(){for(const e of this.providerResults)e.removeRef()}}class E1e{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}}class qS{static from(e,t,i,n,s){let r,a,l=e.range?k.lift(e.range):i;if(typeof e.insertText=="string"){if(r=e.insertText,s&&e.completeBracketPairs){r=j3(r,l.getStartPosition(),n,s);const d=r.length-e.insertText.length;d!==0&&(l=new k(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+d))}a=void 0}else if("snippet"in e.insertText){const d=e.insertText.snippet.length;if(s&&e.completeBracketPairs){e.insertText.snippet=j3(e.insertText.snippet,l.getStartPosition(),n,s);const u=e.insertText.snippet.length-d;u!==0&&(l=new k(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+u))}const c=new om().parse(e.insertText.snippet);c.children.length===1&&c.children[0]instanceof Is?(r=c.children[0].value,a=void 0):(r=c.toString(),a={snippet:e.insertText.snippet,range:l})}else by(e.insertText);return new qS(r,e.command,l,r,a,e.additionalTextEdits||v1e(),e,t)}constructor(e,t,i,n,s,r,a,l){this.filterText=e,this.command=t,this.range=i,this.insertText=n,this.snippetInfo=s,this.additionalTextEdits=r,this.sourceInlineCompletion=a,this.source=l,e=e.replace(/\r\n|\r/g,` `),n=e.replace(/\r\n|\r/g,` -`)}withRange(e){return new qS(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}}function x1e(o,e){const t=e.getWordAtPosition(o),i=e.getLineMaxColumn(o.lineNumber);return t?new k(o.lineNumber,t.startColumn,o.lineNumber,i):k.fromPositions(o,o.with(void 0,i))}function j3(o,e,t,i){const s=t.getLineContent(e.lineNumber).substring(0,e.column-1)+o,r=t.tokenization.tokenizeLineWithEdit(e,s.length-(e.column-1),o),a=r==null?void 0:r.sliceAndInflate(e.column-1,s.length,0);return a?w1e(a,i):o}class rm{constructor(e,t){this.range=e,this.text=t}removeCommonPrefix(e,t){const i=t?this.range.intersectRanges(t):this.range;if(!i)return this;const n=e.getValueInRange(i,1),s=Qh(n,this.text),r=YT(this.range.getStartPosition(),XT(n.substring(0,s))),a=this.text.substring(s),l=k.fromPositions(r,this.range.getEndPosition());return new rm(l,a)}augments(e){return this.text.startsWith(e.text)&&k1e(this.range,e.range)}computeGhostText(e,t,i,n=0){let s=this.removeCommonPrefix(e);if(s.range.endLineNumber!==s.range.startLineNumber)return;const r=e.getLineContent(s.range.startLineNumber),a=ii(r).length;if(s.range.startColumn-1<=a){const f=ii(s.text).length,m=r.substring(s.range.startColumn-1,a),[v,_]=[s.range.getStartPosition(),s.range.getEndPosition()],b=v.column+m.length<=_.column?v.delta(0,m.length):_,C=k.fromPositions(b,_),w=s.text.startsWith(m)?s.text.substring(m.length):s.text.substring(f);s=new rm(C,w)}const d=e.getValueInRange(s.range),c=I1e(d,s.text);if(!c)return;const u=s.range.startLineNumber,h=new Array;if(t==="prefix"){const f=c.filter(m=>m.originalLength===0);if(f.length>1||f.length===1&&f[0].originalStart!==d.length)return}const g=s.text.length-n;for(const f of c){const m=s.range.startColumn+f.originalStart+f.originalLength;if(t==="subwordSmart"&&i&&i.lineNumber===s.range.startLineNumber&&m0)return;if(f.modifiedLength===0)continue;const v=f.modifiedStart+f.modifiedLength,_=Math.max(f.modifiedStart,Math.min(v,g)),b=s.text.substring(f.modifiedStart,_),C=s.text.substring(_,Math.max(f.modifiedStart,v));if(b.length>0){const w=Rl(b);h.push(new QT(m,w,!1))}if(C.length>0){const w=Rl(C);h.push(new QT(m,w,!0))}}return new KS(u,h)}}function k1e(o,e){return e.getStartPosition().equals(o.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(o.getEndPosition())}let Ga;function I1e(o,e){if((Ga==null?void 0:Ga.originalValue)===o&&(Ga==null?void 0:Ga.newValue)===e)return Ga==null?void 0:Ga.changes;{let t=q3(o,e,!0);if(t){const i=K3(t);if(i>0){const n=q3(o,e,!1);n&&K3(n)5e3||e.length>5e3)return;function i(d){let c=0;for(let u=0,h=d.length;uc&&(c=g)}return c}const n=Math.max(i(o),i(e));function s(d){if(d<0)throw new Error("unexpected");return n+d+1}function r(d){let c=0,u=0;const h=new Int32Array(d.length);for(let g=0,f=d.length;ga},{getElements:()=>l}).ComputeDiff(!1).changes}var E1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},G3=function(o,e){return function(t,i){e(t,i,o)}};let t2=class extends q{constructor(e,t,i,n,s){super(),this.textModel=e,this.versionId=t,this._debounceValue=i,this.languageFeaturesService=n,this.languageConfigurationService=s,this._updateOperation=this._register(new An),this.inlineCompletions=wS("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=wS("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,t,i){var n,s;const r=new T1e(e,t,this.textModel.getVersionId()),a=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(!((n=this._updateOperation.value)===null||n===void 0)&&n.request.satisfies(r))return this._updateOperation.value.promise;if(!((s=a.get())===null||s===void 0)&&s.request.satisfies(r))return Promise.resolve(!0);const l=!!this._updateOperation.value;this._updateOperation.clear();const d=new tn,c=(async()=>{if((l||t.triggerKind===Rd.Automatic)&&await N1e(this._debounceValue.get(this.textModel)),d.token.isCancellationRequested||this.textModel.getVersionId()!==r.versionId)return!1;const g=new Date,f=await y1e(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,d.token,this.languageConfigurationService);if(d.token.isCancellationRequested||this.textModel.getVersionId()!==r.versionId)return!1;const m=new Date;this._debounceValue.update(this.textModel,m.getTime()-g.getTime());const v=new R1e(f,r,this.textModel,this.versionId);if(i){const _=i.toInlineCompletion(void 0);i.canBeReused(this.textModel,e)&&!f.has(_)&&v.prepend(i.inlineCompletion,_.range,!0)}return this._updateOperation.clear(),wi(_=>{a.set(v,_)}),!0})(),u=new A1e(r,d,c);return this._updateOperation.value=u,c}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var t;!((t=this._updateOperation.value)===null||t===void 0)&&t.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};t2=E1e([G3(3,Me),G3(4,si)],t2);function N1e(o,e){return new Promise(t=>{setTimeout(()=>{t()},o)})}class T1e{constructor(e,t,i){this.position=e,this.context=t,this.versionId=i}satisfies(e){return this.position.equals(e.position)&&M1e(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,(t,i)=>t.equals(i))&&(e.context.triggerKind===Rd.Automatic||this.context.triggerKind===Rd.Explicit)&&this.versionId===e.versionId}}function M1e(o,e,t){return!o||!e?o===e:t(o,e)}class A1e{constructor(e,t,i){this.request=e,this.cancellationTokenSource=t,this.promise=i}dispose(){this.cancellationTokenSource.cancel()}}class R1e{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,i,n){this.inlineCompletionProviderResult=e,this.request=t,this.textModel=i,this.versionId=n,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=rt(this,r=>{this.versionId.read(r);let a=!1;for(const l of this._inlineCompletions)a=a||l._updateRange(this.textModel);return a&&this._rangeVersionIdValue++,this._rangeVersionIdValue});const s=i.deltaDecorations([],e.completions.map(r=>({range:r.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=e.completions.map((r,a)=>new Z3(r,s[a],this._rangeVersionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){setTimeout(()=>{this.textModel.isDisposed()||this.textModel.deltaDecorations(this._inlineCompletions.map(e=>e.decorationId),[])},0),this.inlineCompletionProviderResult.dispose();for(const e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,i){i&&e.source.addRef();const n=this.textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new Z3(e,n,this._rangeVersionId,t)),this._prependedInlineCompletionItems.push(e)}}class Z3{get forwardStable(){var e;return(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)!==null&&e!==void 0?e:!1}constructor(e,t,i,n){this.inlineCompletion=e,this.decorationId=t,this.rangeVersion=i,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=n??e.range}toInlineCompletion(e){return this.inlineCompletion.withRange(this._getUpdatedRange(e))}toSingleTextEdit(e){return new rm(this._getUpdatedRange(e),this.inlineCompletion.insertText)}isVisible(e,t,i){const n=this._toFilterTextReplacement(i).removeCommonPrefix(e);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(i).getStartPosition())||t.lineNumber!==n.range.startLineNumber)return!1;const s=e.getValueInRange(n.range,1),r=n.text,a=Math.max(0,t.column-n.range.startColumn);let l=r.substring(0,a),d=r.substring(a),c=s.substring(0,a),u=s.substring(a);const h=e.getLineIndentColumn(n.range.startLineNumber);return n.range.startColumn<=h&&(c=c.trimStart(),c.length===0&&(u=u.trimStart()),l=l.trimStart(),l.length===0&&(d=d.trimStart())),l.startsWith(c)&&!!o6(u,d)}canBeReused(e,t){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(t)&&this.isVisible(e,t,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(e){return new rm(this._getUpdatedRange(e),this.inlineCompletion.filterText)}_isSmallerThanOriginal(e){return Y3(this._getUpdatedRange(e)).isBefore(Y3(this.inlineCompletion.range))}_getUpdatedRange(e){return this.rangeVersion.read(e),this._updatedRange}_updateRange(e){const t=e.getDecorationRange(this.decorationId);return t?this._updatedRange.equalsRange(t)?!1:(this._updatedRange=t,!0):(this._isValid=!1,!0)}}function Y3(o){return o.startLineNumber===o.endLineNumber?new z(1,1+o.endColumn-o.startColumn):new z(1+o.endLineNumber-o.startLineNumber,o.endColumn)}const dt={Visible:qR,HasFocusedSuggestion:new De("suggestWidgetHasFocusedSuggestion",!1,p("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new De("suggestWidgetDetailsVisible",!1,p("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new De("suggestWidgetMultipleSuggestions",!1,p("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new De("suggestionMakesTextEdit",!0,p("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new De("acceptSuggestionOnEnter",!0,p("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new De("suggestionHasInsertAndReplaceRange",!1,p("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new De("suggestionInsertMode",void 0,{type:"string",description:p("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new De("suggestionCanResolve",!1,p("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},Jc=new N("suggestWidgetStatusBar");class P1e{constructor(e,t,i,n){var s;this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=ka.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:(s=t.label)===null||s===void 0?void 0:s.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,k.isIRange(t.range)?(this.editStart=new z(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new z(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new z(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||k.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new z(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new z(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new z(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||k.spansMultipleLines(t.range.insert)||k.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof n.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}async resolve(e){if(!this._resolveCache){const t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),i=new ds(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(n=>{Object.assign(this.completion,n),this._resolveDuration=i.elapsed()},n=>{Fa(n)&&(this._resolveCache=void 0,this._resolveDuration=void 0)}).finally(()=>{t.dispose()})}return this._resolveCache}}class Nb{constructor(e=2,t=new Set,i=new Set,n=new Map,s=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.providerItemsToReuse=n,this.showDeprecated=s}}Nb.default=new Nb;let O1e;function F1e(){return O1e}class B1e{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}async function tP(o,e,t,i=Nb.default,n={triggerKind:0},s=vt.None){const r=new ds;t=t.clone();const a=e.getWordAtPosition(t),l=a?new k(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):k.fromPositions(t),d={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},c=[],u=new de,h=[];let g=!1;const f=(v,_,b)=>{var C,w,S;let x=!1;if(!_)return x;for(const y of _.suggestions)if(!i.kindFilter.has(y.kind)){if(!i.showDeprecated&&(!((C=y==null?void 0:y.tags)===null||C===void 0)&&C.includes(1)))continue;y.range||(y.range=d),y.sortText||(y.sortText=typeof y.label=="string"?y.label:y.label.label),!g&&y.insertTextRules&&y.insertTextRules&4&&(g=om.guessNeedsClipboard(y.insertText)),c.push(new P1e(t,y,_,v)),x=!0}return iM(_)&&u.add(_),h.push({providerName:(w=v._debugDisplayName)!==null&&w!==void 0?w:"unknown_provider",elapsedProvider:(S=_.duration)!==null&&S!==void 0?S:-1,elapsedOverall:b.elapsed()}),x},m=(async()=>{})();for(const v of o.orderedGroups(e)){let _=!1;if(await Promise.all(v.map(async b=>{if(i.providerItemsToReuse.has(b)){const C=i.providerItemsToReuse.get(b);C.forEach(w=>c.push(w)),_=_||C.length>0;return}if(!(i.providerFilter.size>0&&!i.providerFilter.has(b)))try{const C=new ds,w=await b.provideCompletionItems(e,t,n,s);_=f(b,w,C)||_}catch(C){en(C)}})),_||s.isCancellationRequested)break}return await m,s.isCancellationRequested?(u.dispose(),Promise.reject(new Mu)):new B1e(c.sort(H1e(i.snippetSortOrder)),g,{entries:h,elapsed:r.elapsed()},u)}function iP(o,e){if(o.sortTextLow&&e.sortTextLow){if(o.sortTextLowe.sortTextLow)return 1}return o.textLabele.textLabel?1:o.completion.kind-e.completion.kind}function W1e(o,e){if(o.completion.kind!==e.completion.kind){if(o.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return iP(o,e)}function V1e(o,e){if(o.completion.kind!==e.completion.kind){if(o.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return iP(o,e)}const YL=new Map;YL.set(0,W1e);YL.set(2,V1e);YL.set(1,iP);function H1e(o){return YL.get(o)}Et.registerCommand("_executeCompletionItemProvider",async(o,...e)=>{const[t,i,n,s]=e;qt(ze.isUri(t)),qt(z.isIPosition(i)),qt(typeof n=="string"||!n),qt(typeof s=="number"||!s);const{completionProvider:r}=o.get(Me),a=await o.get(Xs).createModelReference(t);try{const l={incomplete:!1,suggestions:[]},d=[],c=a.object.textEditorModel.validatePosition(i),u=await tP(r,a.object.textEditorModel,c,void 0,{triggerCharacter:n??void 0,triggerKind:n?1:0});for(const h of u.items)d.length<(s??0)&&d.push(h.resolve(vt.None)),l.incomplete=l.incomplete||h.container.incomplete,l.suggestions.push(h.completion);try{return await Promise.all(d),l}finally{setTimeout(()=>u.disposable.dispose(),100)}}finally{a.dispose()}});function z1e(o,e){var t;(t=o.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}class jf{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}function X3(o,e=is){return Noe(o,e)?o.charAt(0).toUpperCase()+o.slice(1):o}var $1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},U1e=function(o,e){return function(t,i){e(t,i,o)}};class Q3{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const i=t.resolve(e);if(i!==void 0)return i}}}class J3{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let i=this._model.getValueInRange(this._selection)||void 0,n=this._selection.startLineNumber!==this._selection.endLineNumber;if(!i&&this._overtypingCapturer){const s=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);s&&(i=s.value,n=s.multiline)}if(i&&n&&e.snippet){const s=this._model.getLineContent(this._selection.startLineNumber),r=ii(s,0,this._selection.startColumn-1);let a=r;e.snippet.walk(d=>d===e?!1:(d instanceof Is&&(a=ii(Rl(d.value).pop())),!0));const l=Qh(a,r);i=i.replace(/(\r\n|\r|\n)(.*)/g,(d,c,u)=>`${c}${a.substr(l)}${u}`)}return i}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){const i=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return i&&i.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}class e9{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if(t==="TM_FILENAME")return Vc(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){const i=Vc(this._model.uri.fsPath),n=i.lastIndexOf(".");return n<=0?i:i.slice(0,n)}else{if(t==="TM_DIRECTORY")return o7(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(qy(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}class t9{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if(e.name!=="CLIPBOARD")return;const t=this._readClipboardText();if(t){if(this._spread){const i=t.split(/\r\n|\n|\r/).filter(n=>!h7(n));if(i.length===this._selectionCount)return i[this._selectionIdx]}return t}}}let GS=class{constructor(e,t,i){this._model=e,this._selection=t,this._languageConfigurationService=i}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=this._languageConfigurationService.getLanguageConfiguration(i).comments;if(n){if(t==="LINE_COMMENT")return n.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return n.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return n.blockCommentEndToken||void 0}}};GS=$1e([U1e(2,si)],GS);class ya{constructor(){this._date=new Date}resolve(e){const{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return ya.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return ya.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return ya.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return ya.monthNamesShort[this._date.getMonth()];if(t==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(t==="CURRENT_TIMEZONE_OFFSET"){const i=this._date.getTimezoneOffset(),n=i>0?"-":"+",s=Math.trunc(Math.abs(i/60)),r=s<10?"0"+s:s,a=Math.abs(i)-s*60,l=a<10?"0"+a:a;return n+r+":"+l}}}ya.dayNames=[p("Sunday","Sunday"),p("Monday","Monday"),p("Tuesday","Tuesday"),p("Wednesday","Wednesday"),p("Thursday","Thursday"),p("Friday","Friday"),p("Saturday","Saturday")];ya.dayNamesShort=[p("SundayShort","Sun"),p("MondayShort","Mon"),p("TuesdayShort","Tue"),p("WednesdayShort","Wed"),p("ThursdayShort","Thu"),p("FridayShort","Fri"),p("SaturdayShort","Sat")];ya.monthNames=[p("January","January"),p("February","February"),p("March","March"),p("April","April"),p("May","May"),p("June","June"),p("July","July"),p("August","August"),p("September","September"),p("October","October"),p("November","November"),p("December","December")];ya.monthNamesShort=[p("JanuaryShort","Jan"),p("FebruaryShort","Feb"),p("MarchShort","Mar"),p("AprilShort","Apr"),p("MayShort","May"),p("JuneShort","Jun"),p("JulyShort","Jul"),p("AugustShort","Aug"),p("SeptemberShort","Sep"),p("OctoberShort","Oct"),p("NovemberShort","Nov"),p("DecemberShort","Dec")];class i9{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=Wle(this._workspaceService.getWorkspace());if(!Fle(t)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(FE(e))return Vc(e.uri.path);let t=Vc(e.configPath.path);return t.endsWith(BE)&&(t=t.substr(0,t.length-BE.length-1)),t}_resoveWorkspacePath(e){if(FE(e))return X3(e.uri.fsPath);const t=Vc(e.configPath.path);let i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?X3(i):"/"}}class n9{resolve(e){const{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return HL()}}var j1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},K1e=function(o,e){return function(t,i){e(t,i,o)}},oa;class ir{constructor(e,t,i){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=i,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=IP(t.placeholders,nr.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations(t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),s=this._snippet.fullLen(i),r=k.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+s)),a=i.isFinalTabstop?ir._decor.inactiveFinal:ir._decor.inactive,l=t.addDecoration(r,a);this._placeholderDecorations.set(i,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const n=[];for(const s of this._placeholderGroups[this._placeholderGroupsIdx])if(s.transform){const r=this._placeholderDecorations.get(s),a=this._editor.getModel().getDecorationRange(r),l=this._editor.getModel().getValueInRange(a),d=s.transform.resolve(l).split(/\r\n|\r|\n/);for(let c=1;c0&&this._editor.executeEdits("snippet.placeholderTransform",n)}let t=!1;e===!0&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations(n=>{const s=new Set,r=[];for(const a of this._placeholderGroups[this._placeholderGroupsIdx]){const l=this._placeholderDecorations.get(a),d=this._editor.getModel().getDecorationRange(l);r.push(new Re(d.startLineNumber,d.startColumn,d.endLineNumber,d.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(a),n.changeDecorationOptions(l,a.isFinalTabstop?ir._decor.activeFinal:ir._decor.active),s.add(a);for(const c of this._snippet.enclosingPlaceholders(a)){const u=this._placeholderDecorations.get(c);n.changeDecorationOptions(u,c.isFinalTabstop?ir._decor.activeFinal:ir._decor.active),s.add(c)}}for(const[a,l]of this._placeholderDecorations)s.has(a)||n.changeDecorationOptions(l,a.isFinalTabstop?ir._decor.inactiveFinal:ir._decor.inactive);return r});return t?this.move(e):i??[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof nr){const i=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(i).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const s=this._placeholderDecorations.get(n),r=this._editor.getModel().getDecorationRange(s);if(!r){e.delete(n.index);break}i.push(r)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(e!=null&&e.choice))return;const t=this._placeholderDecorations.get(e);if(!t)return;const i=this._editor.getModel().getDecorationRange(t);if(i)return{range:i,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof Tm,!e)),e}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const s=e.shift();console.assert(s._offset!==-1),console.assert(!s._placeholderDecorations);const r=s._snippet.placeholderInfo.last.index;for(const l of s._snippet.placeholderInfo.all)l.isFinalTabstop?l.index=n.index+(r+1)/this._nestingLevel:l.index=n.index+l.index/this._nestingLevel;this._snippet.replace(n,s._snippet.children);const a=this._placeholderDecorations.get(n);i.removeDecoration(a),this._placeholderDecorations.delete(n);for(const l of s._snippet.placeholders){const d=s._snippet.offset(l),c=s._snippet.fullLen(l),u=k.fromPositions(t.getPositionAt(s._offset+d),t.getPositionAt(s._offset+d+c)),h=i.addDecoration(u,ir._decor.inactive);this._placeholderDecorations.set(l,h)}}this._placeholderGroups=IP(this._snippet.placeholders,nr.compareByIndex)})}}ir._decor={active:st.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:st.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:st.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:st.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const s9={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let ZS=oa=class{static adjustWhitespace(e,t,i,n,s){const r=e.getLineContent(t.lineNumber),a=ii(r,0,t.column-1);let l;return n.walk(d=>{if(!(d instanceof Is)||d.parent instanceof Tm||s&&!s.has(d))return!0;const c=d.value.split(/\r\n|\r|\n/);if(i){const h=n.offset(d);if(h===0)c[0]=e.normalizeIndentation(c[0]);else{l=l??n.toString();const g=l.charCodeAt(h-1);(g===10||g===13)&&(c[0]=e.normalizeIndentation(a+c[0]))}for(let g=1;gw.get(ag)),f=e.invokeWithinContext(w=>new e9(w.get(Hp),h)),m=()=>a,v=h.getValueInRange(oa.adjustSelection(h,e.getSelection(),i,0)),_=h.getValueInRange(oa.adjustSelection(h,e.getSelection(),0,n)),b=h.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),C=e.getSelections().map((w,S)=>({selection:w,idx:S})).sort((w,S)=>k.compareRangesUsingStarts(w.selection,S.selection));for(const{selection:w,idx:S}of C){let x=oa.adjustSelection(h,w,i,0),y=oa.adjustSelection(h,w,0,n);v!==h.getValueInRange(x)&&(x=w),_!==h.getValueInRange(y)&&(y=w);const I=w.setStartPosition(x.startLineNumber,x.startColumn).setEndPosition(y.endLineNumber,y.endColumn),E=new om().parse(t,!0,s),R=I.getStartPosition(),j=oa.adjustWhitespace(h,R,r||S>0&&b!==h.getLineFirstNonWhitespaceColumn(w.positionLineNumber),E);E.resolveVariables(new Q3([f,new t9(m,S,C.length,e.getOption(78)==="spread"),new J3(h,w,S,l),new GS(h,w,d),new ya,new i9(g),new n9])),c[S]=Li.replace(I,E.toString()),c[S].identifier={major:S,minor:0},c[S]._isTracked=!0,u[S]=new ir(e,E,j)}return{edits:c,snippets:u}}static createEditsAndSnippetsFromEdits(e,t,i,n,s,r,a){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};const l=[],d=e.getModel(),c=new om,u=new O0,h=new Q3([e.invokeWithinContext(f=>new e9(f.get(Hp),d)),new t9(()=>s,0,e.getSelections().length,e.getOption(78)==="spread"),new J3(d,e.getSelection(),0,r),new GS(d,e.getSelection(),a),new ya,new i9(e.invokeWithinContext(f=>f.get(ag))),new n9]);t=t.sort((f,m)=>k.compareRangesUsingStarts(f.range,m.range));let g=0;for(let f=0;f0){const S=t[f-1].range,x=k.fromPositions(S.getEndPosition(),m.getStartPosition()),y=new Is(d.getValueInRange(x));u.appendChild(y),g+=y.value.length}const _=c.parseFragment(v,u);oa.adjustWhitespace(d,m.getStartPosition(),!0,u,new Set(_)),u.resolveVariables(h);const b=u.toString(),C=b.slice(g);g=b.length;const w=Li.replace(m,C);w.identifier={major:f,minor:0},w._isTracked=!0,l.push(w)}return c.ensureFinalTabstop(u,i,!0),{edits:l,snippets:[new ir(e,u,"")]}}constructor(e,t,i=s9,n){this._editor=e,this._template=t,this._options=i,this._languageConfigurationService=n,this._templateMerges=[],this._snippets=[]}dispose(){jt(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}=typeof this._template=="string"?oa.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):oa.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,i=>{const n=i.filter(s=>!!s.identifier);for(let s=0;sRe.fromPositions(s.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=s9){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=oa.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",i,s=>{const r=s.filter(l=>!!l.identifier);for(let l=0;lRe.fromPositions(l.range.getEndPosition()))})}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{s.push(...n.get(r))})}e.sort(k.compareRangesUsingStarts);for(const[i,n]of t){if(n.length!==e.length){t.delete(i);continue}n.sort(k.compareRangesUsingStarts);for(let s=0;s0}};ZS=oa=j1e([K1e(3,si)],ZS);var q1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},t1=function(o,e){return function(t,i){e(t,i,o)}},bf;const o9={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let Un=bf=class{static get(e){return e.getContribution(bf.ID)}constructor(e,t,i,n,s){this._editor=e,this._logService=t,this._languageFeaturesService=i,this._languageConfigurationService=s,this._snippetListener=new de,this._modelVersionId=-1,this._inSnippet=bf.InSnippetMode.bindTo(n),this._hasNextTabstop=bf.HasNextTabstop.bindTo(n),this._hasPrevTabstop=bf.HasPrevTabstop.bindTo(n)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)===null||e===void 0||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,typeof t>"u"?o9:{...o9,...t})}catch(i){this.cancel(),this._logService.error(i),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){var i;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(qt(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new ZS(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),!((i=this._session)===null||i===void 0)&&i.hasChoice){const n={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(c,u)=>{if(!this._session||c!==this._editor.getModel()||!z.equals(this._editor.getPosition(),u))return;const{activeChoice:h}=this._session;if(!h||h.choice.options.length===0)return;const g=c.getValueInRange(h.range),f=!!h.choice.options.find(v=>v.value===g),m=[];for(let v=0;v{r==null||r.dispose(),a=!1},d=()=>{a||(r=this._languageFeaturesService.completionProvider.register({language:s.getLanguageId(),pattern:s.uri.fsPath,scheme:s.uri.scheme,exclusive:!0},n),this._snippetListener.add(r),a=!0)};this._choiceCompletions={provider:n,enable:d,disable:l}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(n=>n.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){var e;if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{activeChoice:t}=this._session;if(!t||!this._choiceCompletions){(e=this._choiceCompletions)===null||e===void 0||e.disable(),this._currentChoice=void 0;return}this._currentChoice!==t.choice&&(this._currentChoice=t.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{z1e(this._editor,this._choiceCompletions.provider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(t=this._session)===null||t===void 0||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;(e=this._session)===null||e===void 0||e.prev(),this._updateState()}next(){var e;(e=this._session)===null||e===void 0||e.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}};Un.ID="snippetController2";Un.InSnippetMode=new De("inSnippetMode",!1,p("inSnippetMode","Whether the editor in current in snippet mode"));Un.HasNextTabstop=new De("hasNextTabstop",!1,p("hasNextTabstop","Whether there is a next tab stop when in snippet mode"));Un.HasPrevTabstop=new De("hasPrevTabstop",!1,p("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"));Un=bf=q1e([t1(1,bo),t1(2,Me),t1(3,Xe),t1(4,si)],Un);At(Un.ID,Un,4);const XL=Rn.bindToContribution(Un.get);we(new XL({id:"jumpToNextSnippetPlaceholder",precondition:ae.and(Un.InSnippetMode,Un.HasNextTabstop),handler:o=>o.next(),kbOpts:{weight:130,kbExpr:T.editorTextFocus,primary:2}}));we(new XL({id:"jumpToPrevSnippetPlaceholder",precondition:ae.and(Un.InSnippetMode,Un.HasPrevTabstop),handler:o=>o.prev(),kbOpts:{weight:130,kbExpr:T.editorTextFocus,primary:1026}}));we(new XL({id:"leaveSnippet",precondition:Un.InSnippetMode,handler:o=>o.cancel(!0),kbOpts:{weight:130,kbExpr:T.editorTextFocus,primary:9,secondary:[1033]}}));we(new XL({id:"acceptSnippet",precondition:Un.InSnippetMode,handler:o=>o.finish()}));var G1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vk=function(o,e){return function(t,i){e(t,i,o)}},No;(function(o){o[o.Undo=0]="Undo",o[o.Redo=1]="Redo",o[o.AcceptWord=2]="AcceptWord",o[o.Other=3]="Other"})(No||(No={}));let i2=class extends q{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,i,n,s,r,a,l,d,c,u,h){super(),this.textModel=e,this.selectedSuggestItem=t,this.cursorPosition=i,this.textModelVersionId=n,this._debounceValue=s,this._suggestPreviewEnabled=r,this._suggestPreviewMode=a,this._inlineSuggestMode=l,this._enabled=d,this._instantiationService=c,this._commandService=u,this._languageConfigurationService=h,this._source=this._register(this._instantiationService.createInstance(t2,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=Pt(this,!1),this._forceUpdateSignal=hR("forceUpdate"),this._selectedInlineCompletionId=Pt(this,void 0),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([No.Redo,No.Undo,No.AcceptWord]),this._fetchInlineCompletions=Bge({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:Rd.Automatic}),handleChange:(f,m)=>(f.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(f.change)?m.preserveCurrentCompletion=!0:f.didChange(this._forceUpdateSignal)&&(m.inlineCompletionTriggerKind=f.change),!0)},(f,m)=>{if(this._forceUpdateSignal.read(f),!(this._enabled.read(f)&&this.selectedSuggestItem.read(f)||this._isActive.read(f))){this._source.cancelUpdate();return}this.textModelVersionId.read(f);const _=this.selectedInlineCompletion.get(),b=m.preserveCurrentCompletion||_!=null&&_.forwardStable?_:void 0,C=this._source.suggestWidgetInlineCompletions.get(),w=this.selectedSuggestItem.read(f);if(C&&!w){const y=this._source.inlineCompletions.get();wi(I=>{(!y||C.request.versionId>y.request.versionId)&&this._source.inlineCompletions.set(C.clone(),I),this._source.clearSuggestWidgetInlineCompletions(I)})}const S=this.cursorPosition.read(f),x={triggerKind:m.inlineCompletionTriggerKind,selectedSuggestionInfo:w==null?void 0:w.toSelectedSuggestionInfo()};return this._source.fetch(S,x,b)}),this._filteredInlineCompletionItems=rt(this,f=>{const m=this._source.inlineCompletions.read(f);if(!m)return[];const v=this.cursorPosition.read(f);return m.inlineCompletions.filter(b=>b.isVisible(this.textModel,v,f))}),this.selectedInlineCompletionIndex=rt(this,f=>{const m=this._selectedInlineCompletionId.read(f),v=this._filteredInlineCompletionItems.read(f),_=this._selectedInlineCompletionId===void 0?-1:v.findIndex(b=>b.semanticId===m);return _===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):_}),this.selectedInlineCompletion=rt(this,f=>{const m=this._filteredInlineCompletionItems.read(f),v=this.selectedInlineCompletionIndex.read(f);return m[v]}),this.lastTriggerKind=this._source.inlineCompletions.map(this,f=>f==null?void 0:f.request.context.triggerKind),this.inlineCompletionsCount=rt(this,f=>{if(this.lastTriggerKind.read(f)===Rd.Explicit)return this._filteredInlineCompletionItems.read(f).length}),this.state=VN({owner:this,equalityComparer:(f,m)=>!f||!m?f===m:H3(f.ghostText,m.ghostText)&&f.inlineCompletion===m.inlineCompletion&&f.suggestItem===m.suggestItem},f=>{var m;const v=this.textModel,_=this.selectedSuggestItem.read(f);if(_){const b=_.toSingleTextEdit().removeCommonPrefix(v),C=this._computeAugmentedCompletion(b,f);if(!this._suggestPreviewEnabled.read(f)&&!C)return;const S=(m=C==null?void 0:C.edit)!==null&&m!==void 0?m:b,x=C?C.edit.text.length-b.text.length:0,y=this._suggestPreviewMode.read(f),I=this.cursorPosition.read(f),E=S.computeGhostText(v,y,I,x);return{ghostText:E??new KS(S.range.endLineNumber,[]),inlineCompletion:C==null?void 0:C.completion,suggestItem:_}}else{if(!this._isActive.read(f))return;const b=this.selectedInlineCompletion.read(f);if(!b)return;const C=b.toSingleTextEdit(f),w=this._inlineSuggestMode.read(f),S=this.cursorPosition.read(f),x=C.computeGhostText(v,w,S);return x?{ghostText:x,inlineCompletion:b,suggestItem:void 0}:void 0}}),this.ghostText=VN({owner:this,equalityComparer:H3},f=>{const m=this.state.read(f);if(m)return m.ghostText}),this._register(x0(this._fetchInlineCompletions));let g;this._register(zt(f=>{var m,v;const _=this.state.read(f),b=_==null?void 0:_.inlineCompletion;if((b==null?void 0:b.semanticId)!==(g==null?void 0:g.semanticId)&&(g=b,b)){const C=b.inlineCompletion,w=C.source;(v=(m=w.provider).handleItemDidShow)===null||v===void 0||v.call(m,w.inlineCompletions,C.sourceInlineCompletion,C.insertText)}}))}async trigger(e){this._isActive.set(!0,e),await this._fetchInlineCompletions.get()}async triggerExplicitly(e){_b(e,t=>{this._isActive.set(!0,t),this._forceUpdateSignal.trigger(t,Rd.Explicit)}),await this._fetchInlineCompletions.get()}stop(e){_b(e,t=>{this._isActive.set(!1,t),this._source.clear(t)})}_computeAugmentedCompletion(e,t){const i=this.textModel,n=this._source.suggestWidgetInlineCompletions.read(t),s=n?n.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter(mv);return DJ(s,a=>{let l=a.toSingleTextEdit(t);return l=l.removeCommonPrefix(i,k.fromPositions(l.range.getStartPosition(),e.range.getEndPosition())),l.augments(e)?{edit:l,completion:a}:void 0})}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){const i=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[i].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){var t;if(e.getModel()!==this.textModel)throw new Ci;const i=this.state.get();if(!i||i.ghostText.isEmpty()||!i.inlineCompletion)return;const n=i.inlineCompletion.toInlineCompletion(void 0);e.pushUndoStop(),n.snippetInfo?(e.executeEdits("inlineSuggestion.accept",[Li.replaceMove(n.range,""),...n.additionalTextEdits]),e.setPosition(n.snippetInfo.range.getStartPosition()),(t=Un.get(e))===null||t===void 0||t.insert(n.snippetInfo.snippet,{undoStopBefore:!1})):e.executeEdits("inlineSuggestion.accept",[Li.replaceMove(n.range,n.insertText),...n.additionalTextEdits]),n.command&&n.source.addRef(),wi(s=>{this._source.clear(s),this._isActive.set(!1,s)}),n.command&&(await this._commandService.executeCommand(n.command.id,...n.command.arguments||[]).then(void 0,en),n.source.removeRef())}async acceptNextWord(e){await this._acceptNext(e,(t,i)=>{const n=this.textModel.getLanguageIdAtPosition(t.lineNumber,t.column),s=this._languageConfigurationService.getLanguageConfiguration(n),r=new RegExp(s.wordDefinition.source,s.wordDefinition.flags.replace("g","")),a=i.match(r);let l=0;a&&a.index!==void 0?a.index===0?l=a[0].length:l=a.index:l=i.length;const c=/\s+/g.exec(i);return c&&c.index!==void 0&&c.index+c[0].length{const n=i.match(/\n/);return n&&n.index!==void 0?n.index+1:i.length})}async _acceptNext(e,t){if(e.getModel()!==this.textModel)throw new Ci;const i=this.state.get();if(!i||i.ghostText.isEmpty()||!i.inlineCompletion)return;const n=i.ghostText,s=i.inlineCompletion.toInlineCompletion(void 0);if(s.snippetInfo||s.filterText!==s.insertText){await this.accept(e);return}const r=n.parts[0],a=new z(n.lineNumber,r.column),l=r.lines.join(` -`),d=t(a,l);if(d===l.length&&n.parts.length===1){this.accept(e);return}const c=l.substring(0,d);s.source.addRef();try{this._isAcceptingPartially=!0;try{e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[Li.replace(k.fromPositions(a),c)]);const u=XT(c);e.setPosition(YT(a,u))}finally{this._isAcceptingPartially=!1}if(s.source.provider.handlePartialAccept){const u=k.fromPositions(s.range.getStartPosition(),YT(a,XT(c))),h=e.getModel().getValueInRange(u,1);s.source.provider.handlePartialAccept(s.source.inlineCompletions,s.sourceInlineCompletion,h.length)}}finally{s.source.removeRef()}}handleSuggestAccepted(e){var t,i;const n=e.toSingleTextEdit().removeCommonPrefix(this.textModel),s=this._computeAugmentedCompletion(n,void 0);if(!s)return;const r=s.completion.inlineCompletion;(i=(t=r.source.provider).handlePartialAccept)===null||i===void 0||i.call(t,r.source.inlineCompletions,r.sourceInlineCompletion,n.text.length)}};i2=G1e([vk(9,qe),vk(10,Ri),vk(11,si)],i2);var Z1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},r9=function(o,e){return function(t,i){e(t,i,o)}},M_;class nP{constructor(e){this.name=e}select(e,t,i){if(i.length===0)return 0;const n=i[0].score[0];for(let s=0;sl&&u.type===i[d].completion.kind&&u.insertText===i[d].completion.insertText&&(l=u.touch,a=d),i[d].completion.preselect&&r===-1)return r=d}return a!==-1?a:r!==-1?r:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();const t=0;for(const[i,n]of e)n.touch=t,n.type=typeof n.type=="number"?n.type:Cv.fromString(n.type),this._cache.set(i,n);this._seq=this._cache.size}}class X1e extends nP{constructor(){super("recentlyUsedByPrefix"),this._trie=gp.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),s=`${e.getLanguageId()}/${n}`;this._trie.set(s,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){const{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);const s=`${e.getLanguageId()}/${n}`;let r=this._trie.get(s);if(r||(r=this._trie.findSubstr(s)),r)for(let a=0;ae.push([i,t])),e.sort((t,i)=>-(t[1].touch-i[1].touch)).forEach((t,i)=>t[1].touch=i),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type=typeof i.type=="number"?i.type:Cv.fromString(i.type),this._trie.set(t,i)}}}let Tb=M_=class{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new de,this._persistSoon=new Yt(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(i=>{i.reason===rb.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(e,t){var i;const n=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(((i=this._strategy)===null||i===void 0?void 0:i.name)!==n){this._saveState();const s=M_._strategyCtors.get(n)||TH;this._strategy=new s;try{const a=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,l=this._storageService.get(`${M_._storagePrefix}/${n}`,a);l&&this._strategy.fromJSON(JSON.parse(l))}catch{}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=JSON.stringify(this._strategy);this._storageService.store(`${M_._storagePrefix}/${this._strategy.name}`,i,t,1)}}};Tb._strategyCtors=new Map([["recentlyUsedByPrefix",X1e],["recentlyUsed",Y1e],["first",TH]]);Tb._storagePrefix="suggest/memories";Tb=M_=Z1e([r9(0,Xr),r9(1,Dt)],Tb);const QL=bt("ISuggestMemories");xt(QL,Tb,1);var Q1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},J1e=function(o,e){return function(t,i){e(t,i,o)}},n2;let Mb=n2=class{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=n2.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(i=>i.hasChanged(122)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),(e=this._selectionListener)===null||e===void 0||e.dispose(),this._ckAtEnd.reset()}_update(){const e=this._editor.getOption(122)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){const t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const i=this._editor.getModel(),n=this._editor.getSelection(),s=i.getWordAtPosition(n.getStartPosition());if(!s){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(s.endColumn===n.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};Mb.AtEnd=new De("atEndOfWord",!1);Mb=n2=Q1e([J1e(1,Xe)],Mb);var ewe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},twe=function(o,e){return function(t,i){e(t,i,o)}},A_;let yg=A_=class{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=A_.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),(e=this._listener)===null||e===void 0||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},i){if(e.items.length===0){this.reset();return}if(A_._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=i,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,i){let n=i;for(let s=t.items.length;s>0&&(n=(n+t.items.length+(e?1:-1))%t.items.length,!(n===i||!t.items[n].completion.additionalTextEdits));s--);return n}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=A_._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};yg.OtherSuggestions=new De("hasOtherSuggestions",!1);yg=A_=ewe([twe(1,Xe)],yg);class iwe{constructor(e,t,i,n){this._disposables=new de,this._disposables.add(i.onDidSuggest(s=>{s.completionModel.items.length===0&&this.reset()})),this._disposables.add(i.onDidCancel(s=>{this.reset()})),this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(s=>{if(this._active&&!t.isFrozen()&&i.state!==0){const r=s.charCodeAt(s.length-1);this._active.acceptCharacters.has(r)&&e.getOption(0)&&n(this._active.item)}}))}_onItem(e){if(!e||!ls(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;const t=new Cw;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}class To{async provideSelectionRanges(e,t){const i=[];for(const n of t){const s=[];i.push(s);const r=new Map;await new Promise(a=>To._bracketsRightYield(a,0,e,n,r)),await new Promise(a=>To._bracketsLeftYield(a,0,e,n,r,s))}return i}static _bracketsRightYield(e,t,i,n,s){const r=new Map,a=Date.now();for(;;){if(t>=To._maxRounds){e();break}if(!n){e();break}const l=i.bracketPairs.findNextBracket(n);if(!l){e();break}if(Date.now()-a>To._maxDuration){setTimeout(()=>To._bracketsRightYield(e,t+1,i,n,s));break}if(l.bracketInfo.isOpeningBracket){const c=l.bracketInfo.bracketText,u=r.has(c)?r.get(c):0;r.set(c,u+1)}else{const c=l.bracketInfo.getOpeningBrackets()[0].bracketText;let u=r.has(c)?r.get(c):0;if(u-=1,r.set(c,Math.max(0,u)),u<0){let h=s.get(c);h||(h=new Ns,s.set(c,h)),h.push(l.range)}}n=l.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,s,r){const a=new Map,l=Date.now();for(;;){if(t>=To._maxRounds&&s.size===0){e();break}if(!n){e();break}const d=i.bracketPairs.findPrevBracket(n);if(!d){e();break}if(Date.now()-l>To._maxDuration){setTimeout(()=>To._bracketsLeftYield(e,t+1,i,n,s,r));break}if(d.bracketInfo.isOpeningBracket){const u=d.bracketInfo.bracketText;let h=a.has(u)?a.get(u):0;if(h-=1,a.set(u,Math.max(0,h)),h<0){const g=s.get(u);if(g){const f=g.shift();g.size===0&&s.delete(u);const m=k.fromPositions(d.range.getEndPosition(),f.getStartPosition()),v=k.fromPositions(d.range.getStartPosition(),f.getEndPosition());r.push({range:m}),r.push({range:v}),To._addBracketLeading(i,v,r)}}}else{const u=d.bracketInfo.getOpeningBrackets()[0].bracketText,h=a.has(u)?a.get(u):0;a.set(u,h+1)}n=d.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,s=e.getLineFirstNonWhitespaceColumn(n);s!==0&&s!==t.startColumn&&(i.push({range:k.fromPositions(new z(n,s),t.getEndPosition())}),i.push({range:k.fromPositions(new z(n,1),t.getEndPosition())}));const r=n-1;if(r>0){const a=e.getLineFirstNonWhitespaceColumn(r);a===t.startColumn&&a!==e.getLineLastNonWhitespaceColumn(r)&&(i.push({range:k.fromPositions(new z(r,a),t.getEndPosition())}),i.push({range:k.fromPositions(new z(r,1),t.getEndPosition())}))}}}To._maxDuration=30;To._maxRounds=2;class ma{static async create(e,t){if(!t.getOption(117).localityBonus||!t.hasModel())return ma.None;const i=t.getModel(),n=t.getPosition();if(!e.canComputeWordRanges(i.uri))return ma.None;const[s]=await new To().provideSelectionRanges(i,[n]);if(s.length===0)return ma.None;const r=await e.computeWordRanges(i.uri,s[0].range);if(!r)return ma.None;const a=i.getWordUntilPosition(n);return delete r[a.word],new class extends ma{distance(l,d){if(!n.equals(t.getPosition()))return 0;if(d.kind===17)return 2<<20;const c=typeof d.label=="string"?d.label:d.label.label,u=r[c];if(P9(u))return 2<<20;const h=fv(u,k.fromPositions(l),k.compareRangesUsingStarts),g=h>=0?u[h]:u[Math.max(0,~h-1)];let f=s.length;for(const m of s){if(!k.containsRange(m.range,g))break;f-=1}return f}}}}ma.None=new class extends ma{distance(){return 0}};let a9=class{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}};class yc{constructor(e,t,i,n,s,r,a=tL.default,l=void 0){this.clipboardText=l,this._snippetCompareFn=yc._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=s,this._refilterKind=1,this._lineContext=i,this._fuzzyScoreOptions=a,r==="top"?this._snippetCompareFn=yc._compareCompletionItemsSnippetsUp:r==="bottom"&&(this._snippetCompareFn=yc._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta0&&i[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let n="",s="";const r=this._refilterKind===1?this._items:this._filteredItems,a=[],l=!this._options.filterGraceful||r.length>2e3?lg:pde;for(let d=0;d=g)c.score=ka.Default;else if(typeof c.completion.filterText=="string"){const m=l(n,s,f,c.completion.filterText,c.filterTextLow,0,this._fuzzyScoreOptions);if(!m)continue;II(c.completion.filterText,c.textLabel)===0?c.score=m:(c.score=ude(n,s,f,c.textLabel,c.labelLow,0),c.score[0]=m[0])}else{const m=l(n,s,f,c.textLabel,c.labelLow,0,this._fuzzyScoreOptions);if(!m)continue;c.score=m}}c.idx=d,c.distance=this._wordDistance.distance(c.position,c.completion),a.push(c),e.push(c.textLabel.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?Mk(e.length-.85,e,(d,c)=>d-c):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return 1;if(t.completion.kind===27)return-1}return yc._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return-1;if(t.completion.kind===27)return 1}return yc._compareCompletionItems(e,t)}}var nwe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sc=function(o,e){return function(t,i){e(t,i,o)}},s2;class oh{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenization.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!(!n||n.endColumn!==i.column&&n.startColumn+1!==i.column||!isNaN(Number(n.word)))}constructor(e,t,i){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=i}}function swe(o,e,t){if(!e.getContextKeyValue(Tn.inlineSuggestionVisible.key))return!0;const i=e.getContextKeyValue(Tn.suppressSuggestions.key);return i!==void 0?!i:!o.getOption(62).suppressSuggestions}function owe(o,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;const i=e.getContextKeyValue(Tn.suppressSuggestions.key);return i!==void 0?!i:!o.getOption(62).suppressSuggestions}let o2=s2=class{constructor(e,t,i,n,s,r,a,l,d){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=s,this._contextKeyService=r,this._configurationService=a,this._languageFeaturesService=l,this._envService=d,this._toDispose=new de,this._triggerCharacterListener=new de,this._triggerQuickSuggest=new qr,this._triggerState=void 0,this._completionDisposables=new de,this._onDidCancel=new W,this._onDidTrigger=new W,this._onDidSuggest=new W,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new Re(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let c=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{c=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{c=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(u=>{c||this._onCursorChange(u)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!c&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){jt(this._triggerCharacterListener),jt([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(90)||!this._editor.hasModel()||!this._editor.getOption(120))return;const e=new Map;for(const i of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const n of i.triggerCharacters||[]){let s=e.get(n);s||(s=new Set,s.add(F1e()),e.set(n,s)),s.add(i)}const t=i=>{var n;if(!owe(this._editor,this._contextKeyService,this._configurationService)||oh.shouldAutoTrigger(this._editor))return;if(!i){const a=this._editor.getPosition();i=this._editor.getModel().getLineContent(a.lineNumber).substr(0,a.column-1)}let s="";Jh(i.charCodeAt(i.length-1))?bn(i.charCodeAt(i.length-2))&&(s=i.substr(i.length-2)):s=i.charAt(i.length-1);const r=e.get(s);if(r){const a=new Map;if(this._completionModel)for(const[l,d]of this._completionModel.getItemsByProvider())r.has(l)||a.set(l,d);this.trigger({auto:!0,triggerKind:1,triggerCharacter:s,retrigger:!!this._completionModel,clipboardText:(n=this._completionModel)===null||n===void 0?void 0:n.clipboardText,completionOptions:{providerFilter:r,providerItemsToReuse:a}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>t()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var t;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(t=this._requestToken)===null||t===void 0||t.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&e.reason===0?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;jf.isAllOff(this._editor.getOption(88))||this._editor.getOption(117).snippetsPreventQuickSuggestions&&(!((e=Un.get(this._editor))===null||e===void 0)&&e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!oh.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const t=this._editor.getModel(),i=this._editor.getPosition(),n=this._editor.getOption(88);if(!jf.isAllOff(n)){if(!jf.isAllOn(n)){t.tokenization.tokenizeIfCheap(i.lineNumber);const s=t.tokenization.getLineTokens(i.lineNumber),r=s.getStandardTokenType(s.findTokenIndexAtOffset(Math.max(i.column-1-1,0)));if(jf.valueFor(n,r)!=="on")return}swe(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(t)&&this.trigger({auto:!0})}},this._editor.getOption(89)))}_refilterCompletionItems(){qt(this._editor.hasModel()),qt(this._triggerState!==void 0);const e=this._editor.getModel(),t=this._editor.getPosition(),i=new oh(e,t,{...this._triggerState,refilter:!0});this._onNewContext(i)}trigger(e){var t,i,n,s,r,a;if(!this._editor.hasModel())return;const l=this._editor.getModel(),d=new oh(l,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:(t=e.shy)!==null&&t!==void 0?t:!1,position:this._editor.getPosition()}),this._context=d;let c={triggerKind:(i=e.triggerKind)!==null&&i!==void 0?i:0};e.triggerCharacter&&(c={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new tn;const u=this._editor.getOption(111);let h=1;switch(u){case"top":h=0;break;case"bottom":h=2;break}const{itemKind:g,showDeprecated:f}=s2._createSuggestFilter(this._editor),m=new Nb(h,(s=(n=e.completionOptions)===null||n===void 0?void 0:n.kindFilter)!==null&&s!==void 0?s:g,(r=e.completionOptions)===null||r===void 0?void 0:r.providerFilter,(a=e.completionOptions)===null||a===void 0?void 0:a.providerItemsToReuse,f),v=ma.create(this._editorWorkerService,this._editor),_=tP(this._languageFeaturesService.completionProvider,l,this._editor.getPosition(),m,c,this._requestToken.token);Promise.all([_,v]).then(async([b,C])=>{var w;if((w=this._requestToken)===null||w===void 0||w.dispose(),!this._editor.hasModel())return;let S=e==null?void 0:e.clipboardText;if(!S&&b.needsClipboard&&(S=await this._clipboardService.readText()),this._triggerState===void 0)return;const x=this._editor.getModel(),y=new oh(x,this._editor.getPosition(),e),I={...tL.default,firstMatchCanBeWeak:!this._editor.getOption(117).matchOnWordStartOnly};if(this._completionModel=new yc(b.items,this._context.column,{leadingLineContent:y.leadingLineContent,characterCountDelta:y.column-this._context.column},C,this._editor.getOption(117),this._editor.getOption(111),I,S),this._completionDisposables.add(b.disposable),this._onNewContext(y),this._reportDurationsTelemetry(b.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const E of b.items)E.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${E.provider._debugDisplayName}`,E.completion)}).catch(nt)}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static _createSuggestFilter(e){const t=new Set;e.getOption(111)==="none"&&t.add(27);const n=e.getOption(117);return n.showMethods||t.add(0),n.showFunctions||t.add(1),n.showConstructors||t.add(2),n.showFields||t.add(3),n.showVariables||t.add(4),n.showClasses||t.add(5),n.showStructs||t.add(6),n.showInterfaces||t.add(7),n.showModules||t.add(8),n.showProperties||t.add(9),n.showEvents||t.add(10),n.showOperators||t.add(11),n.showUnits||t.add(12),n.showValues||t.add(13),n.showConstants||t.add(14),n.showEnums||t.add(15),n.showEnumMembers||t.add(16),n.showKeywords||t.add(17),n.showWords||t.add(18),n.showColors||t.add(19),n.showFiles||t.add(20),n.showReferences||t.add(21),n.showColors||t.add(22),n.showFolders||t.add(23),n.showTypeParameters||t.add(24),n.showSnippets||t.add(27),n.showUsers||t.add(25),n.showIssues||t.add(26),{itemKind:t,showDeprecated:n.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(ii(e.leadingLineContent)!==ii(this._context.leadingLineContent)){this.cancel();return}if(e.columnthis._context.leadingWord.startColumn){if(oh.shouldAutoTrigger(this._editor)&&this._context){const i=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:i}})}return}if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&e.leadingWord.word.length!==0){const t=new Map,i=new Set;for(const[n,s]of this._completionModel.getItemsByProvider())s.length>0&&s[0].container.incomplete?i.add(n):t.set(n,s);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:i,providerItemsToReuse:t}})}else{const t=this._completionModel.lineContext;let i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){const n=oh.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(n&&this._context.leadingWord.endColumn0,i&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:i})}}}}};o2=s2=nwe([sc(1,Qr),sc(2,Xd),sc(3,vo),sc(4,bo),sc(5,Xe),sc(6,Dt),sc(7,Me),sc(8,LA)],o2);class JL{constructor(e,t){this._disposables=new de,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType(()=>{if(this._locked||!e.hasModel())return;const i=e.getSelections(),n=i.length;let s=!1;for(let a=0;aJL._maxSelectionLength)return;this._lastOvertyped[a]={value:r.getValueInRange(l),multiline:l.startLineNumber!==l.endLineNumber}}})),this._disposables.add(t.onDidTrigger(i=>{this._locked=!0})),this._disposables.add(t.onDidCancel(i=>{this._locked=!1}))}getLastOvertypedInfo(e){if(e>=0&&e=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bk=function(o,e){return function(t,i){e(t,i,o)}};class sP extends dg{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=p({},"{0} ({1})",this._action.label,sP.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return(t=e.getLabel())===null||t===void 0?void 0:t.replace(/\benter\b/gi,"⏎")}}let r2=class{constructor(e,t,i,n,s){this._menuId=t,this._menuService=n,this._contextKeyService=s,this._menuDisposables=new de,this.element=le(e,pe(".suggest-status-bar"));const r=a=>a instanceof Ur?i.createInstance(sP,a,void 0):void 0;this._leftActions=new Cr(this.element,{actionViewItemProvider:r}),this._rightActions=new Cr(this.element,{actionViewItemProvider:r}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{const i=[],n=[];for(const[s,r]of e.getActions())s==="left"?i.push(...r):n.push(...r);this._leftActions.clear(),this._leftActions.push(i),this._rightActions.clear(),this._rightActions.push(n)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};r2=rwe([bk(2,qe),bk(3,Ba),bk(4,Xe)],r2);var awe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lwe=function(o,e){return function(t,i){e(t,i,o)}};function oP(o){return!!o&&!!(o.completion.documentation||o.completion.detail&&o.completion.detail!==o.completion.label)}let a2=class{constructor(e,t){this._editor=e,this._onDidClose=new W,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new W,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new de,this._renderDisposeable=new de,this._borderWidth=1,this._size=new Rt(330,0),this.domNode=pe(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(Ud,{editor:e}),this._body=pe(".body"),this._scrollbar=new a0(this._body,{alwaysConsumeMouseWheel:!0}),le(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=le(this._body,pe(".header")),this._close=le(this._header,pe("span"+Ue.asCSSSelector(ve.close))),this._close.title=p("details.close","Close"),this._type=le(this._header,pe("p.type")),this._docs=le(this._body,pe("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(50)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(50),i=t.getMassagedFontFamily(),n=e.get(118)||t.fontSize,s=e.get(119)||t.lineHeight,r=t.fontWeight,a=`${n}px`,l=`${s}px`;this.domNode.style.fontSize=a,this.domNode.style.lineHeight=`${s/n}`,this.domNode.style.fontWeight=r,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=l,this._close.style.width=l}getLayoutInfo(){const e=this._editor.getOption(119)||this._editor.getOption(50).lineHeight,t=this._borderWidth,i=t*2;return{lineHeight:e,borderWidth:t,borderHeight:i,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=p("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,t){var i,n;this._renderDisposeable.clear();let{detail:s,documentation:r}=e.completion;if(t){let a="";a+=`score: ${e.score[0]} +`)}withRange(e){return new qS(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}}function N1e(o,e){const t=e.getWordAtPosition(o),i=e.getLineMaxColumn(o.lineNumber);return t?new k(o.lineNumber,t.startColumn,o.lineNumber,i):k.fromPositions(o,o.with(void 0,i))}function j3(o,e,t,i){const s=t.getLineContent(e.lineNumber).substring(0,e.column-1)+o,r=t.tokenization.tokenizeLineWithEdit(e,s.length-(e.column-1),o),a=r==null?void 0:r.sliceAndInflate(e.column-1,s.length,0);return a?D1e(a,i):o}class rm{constructor(e,t){this.range=e,this.text=t}removeCommonPrefix(e,t){const i=t?this.range.intersectRanges(t):this.range;if(!i)return this;const n=e.getValueInRange(i,1),s=Qh(n,this.text),r=YT(this.range.getStartPosition(),XT(n.substring(0,s))),a=this.text.substring(s),l=k.fromPositions(r,this.range.getEndPosition());return new rm(l,a)}augments(e){return this.text.startsWith(e.text)&&T1e(this.range,e.range)}computeGhostText(e,t,i,n=0){let s=this.removeCommonPrefix(e);if(s.range.endLineNumber!==s.range.startLineNumber)return;const r=e.getLineContent(s.range.startLineNumber),a=ii(r).length;if(s.range.startColumn-1<=a){const f=ii(s.text).length,m=r.substring(s.range.startColumn-1,a),[v,_]=[s.range.getStartPosition(),s.range.getEndPosition()],b=v.column+m.length<=_.column?v.delta(0,m.length):_,C=k.fromPositions(b,_),w=s.text.startsWith(m)?s.text.substring(m.length):s.text.substring(f);s=new rm(C,w)}const d=e.getValueInRange(s.range),c=M1e(d,s.text);if(!c)return;const u=s.range.startLineNumber,h=new Array;if(t==="prefix"){const f=c.filter(m=>m.originalLength===0);if(f.length>1||f.length===1&&f[0].originalStart!==d.length)return}const g=s.text.length-n;for(const f of c){const m=s.range.startColumn+f.originalStart+f.originalLength;if(t==="subwordSmart"&&i&&i.lineNumber===s.range.startLineNumber&&m0)return;if(f.modifiedLength===0)continue;const v=f.modifiedStart+f.modifiedLength,_=Math.max(f.modifiedStart,Math.min(v,g)),b=s.text.substring(f.modifiedStart,_),C=s.text.substring(_,Math.max(f.modifiedStart,v));if(b.length>0){const w=Rl(b);h.push(new QT(m,w,!1))}if(C.length>0){const w=Rl(C);h.push(new QT(m,w,!0))}}return new KS(u,h)}}function T1e(o,e){return e.getStartPosition().equals(o.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(o.getEndPosition())}let Ga;function M1e(o,e){if((Ga==null?void 0:Ga.originalValue)===o&&(Ga==null?void 0:Ga.newValue)===e)return Ga==null?void 0:Ga.changes;{let t=q3(o,e,!0);if(t){const i=K3(t);if(i>0){const n=q3(o,e,!1);n&&K3(n)5e3||e.length>5e3)return;function i(d){let c=0;for(let u=0,h=d.length;uc&&(c=g)}return c}const n=Math.max(i(o),i(e));function s(d){if(d<0)throw new Error("unexpected");return n+d+1}function r(d){let c=0,u=0;const h=new Int32Array(d.length);for(let g=0,f=d.length;ga},{getElements:()=>l}).ComputeDiff(!1).changes}var A1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},G3=function(o,e){return function(t,i){e(t,i,o)}};let t2=class extends q{constructor(e,t,i,n,s){super(),this.textModel=e,this.versionId=t,this._debounceValue=i,this.languageFeaturesService=n,this.languageConfigurationService=s,this._updateOperation=this._register(new An),this.inlineCompletions=wS("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=wS("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,t,i){var n,s;const r=new P1e(e,t,this.textModel.getVersionId()),a=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(!((n=this._updateOperation.value)===null||n===void 0)&&n.request.satisfies(r))return this._updateOperation.value.promise;if(!((s=a.get())===null||s===void 0)&&s.request.satisfies(r))return Promise.resolve(!0);const l=!!this._updateOperation.value;this._updateOperation.clear();const d=new tn,c=(async()=>{if((l||t.triggerKind===Rd.Automatic)&&await R1e(this._debounceValue.get(this.textModel)),d.token.isCancellationRequested||this.textModel.getVersionId()!==r.versionId)return!1;const g=new Date,f=await k1e(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,d.token,this.languageConfigurationService);if(d.token.isCancellationRequested||this.textModel.getVersionId()!==r.versionId)return!1;const m=new Date;this._debounceValue.update(this.textModel,m.getTime()-g.getTime());const v=new B1e(f,r,this.textModel,this.versionId);if(i){const _=i.toInlineCompletion(void 0);i.canBeReused(this.textModel,e)&&!f.has(_)&&v.prepend(i.inlineCompletion,_.range,!0)}return this._updateOperation.clear(),wi(_=>{a.set(v,_)}),!0})(),u=new F1e(r,d,c);return this._updateOperation.value=u,c}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var t;!((t=this._updateOperation.value)===null||t===void 0)&&t.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};t2=A1e([G3(3,Me),G3(4,si)],t2);function R1e(o,e){return new Promise(t=>{setTimeout(()=>{t()},o)})}class P1e{constructor(e,t,i){this.position=e,this.context=t,this.versionId=i}satisfies(e){return this.position.equals(e.position)&&O1e(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,(t,i)=>t.equals(i))&&(e.context.triggerKind===Rd.Automatic||this.context.triggerKind===Rd.Explicit)&&this.versionId===e.versionId}}function O1e(o,e,t){return!o||!e?o===e:t(o,e)}class F1e{constructor(e,t,i){this.request=e,this.cancellationTokenSource=t,this.promise=i}dispose(){this.cancellationTokenSource.cancel()}}class B1e{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,i,n){this.inlineCompletionProviderResult=e,this.request=t,this.textModel=i,this.versionId=n,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=rt(this,r=>{this.versionId.read(r);let a=!1;for(const l of this._inlineCompletions)a=a||l._updateRange(this.textModel);return a&&this._rangeVersionIdValue++,this._rangeVersionIdValue});const s=i.deltaDecorations([],e.completions.map(r=>({range:r.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=e.completions.map((r,a)=>new Z3(r,s[a],this._rangeVersionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){setTimeout(()=>{this.textModel.isDisposed()||this.textModel.deltaDecorations(this._inlineCompletions.map(e=>e.decorationId),[])},0),this.inlineCompletionProviderResult.dispose();for(const e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,i){i&&e.source.addRef();const n=this.textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new Z3(e,n,this._rangeVersionId,t)),this._prependedInlineCompletionItems.push(e)}}class Z3{get forwardStable(){var e;return(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)!==null&&e!==void 0?e:!1}constructor(e,t,i,n){this.inlineCompletion=e,this.decorationId=t,this.rangeVersion=i,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=n??e.range}toInlineCompletion(e){return this.inlineCompletion.withRange(this._getUpdatedRange(e))}toSingleTextEdit(e){return new rm(this._getUpdatedRange(e),this.inlineCompletion.insertText)}isVisible(e,t,i){const n=this._toFilterTextReplacement(i).removeCommonPrefix(e);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(i).getStartPosition())||t.lineNumber!==n.range.startLineNumber)return!1;const s=e.getValueInRange(n.range,1),r=n.text,a=Math.max(0,t.column-n.range.startColumn);let l=r.substring(0,a),d=r.substring(a),c=s.substring(0,a),u=s.substring(a);const h=e.getLineIndentColumn(n.range.startLineNumber);return n.range.startColumn<=h&&(c=c.trimStart(),c.length===0&&(u=u.trimStart()),l=l.trimStart(),l.length===0&&(d=d.trimStart())),l.startsWith(c)&&!!o6(u,d)}canBeReused(e,t){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(t)&&this.isVisible(e,t,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(e){return new rm(this._getUpdatedRange(e),this.inlineCompletion.filterText)}_isSmallerThanOriginal(e){return Y3(this._getUpdatedRange(e)).isBefore(Y3(this.inlineCompletion.range))}_getUpdatedRange(e){return this.rangeVersion.read(e),this._updatedRange}_updateRange(e){const t=e.getDecorationRange(this.decorationId);return t?this._updatedRange.equalsRange(t)?!1:(this._updatedRange=t,!0):(this._isValid=!1,!0)}}function Y3(o){return o.startLineNumber===o.endLineNumber?new z(1,1+o.endColumn-o.startColumn):new z(1+o.endLineNumber-o.startLineNumber,o.endColumn)}const dt={Visible:qR,HasFocusedSuggestion:new De("suggestWidgetHasFocusedSuggestion",!1,p("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new De("suggestWidgetDetailsVisible",!1,p("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new De("suggestWidgetMultipleSuggestions",!1,p("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new De("suggestionMakesTextEdit",!0,p("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new De("acceptSuggestionOnEnter",!0,p("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new De("suggestionHasInsertAndReplaceRange",!1,p("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new De("suggestionInsertMode",void 0,{type:"string",description:p("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new De("suggestionCanResolve",!1,p("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},Jc=new N("suggestWidgetStatusBar");class W1e{constructor(e,t,i,n){var s;this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=ka.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:(s=t.label)===null||s===void 0?void 0:s.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,k.isIRange(t.range)?(this.editStart=new z(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new z(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new z(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||k.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new z(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new z(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new z(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||k.spansMultipleLines(t.range.insert)||k.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof n.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}async resolve(e){if(!this._resolveCache){const t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),i=new ds(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(n=>{Object.assign(this.completion,n),this._resolveDuration=i.elapsed()},n=>{Fa(n)&&(this._resolveCache=void 0,this._resolveDuration=void 0)}).finally(()=>{t.dispose()})}return this._resolveCache}}class Nb{constructor(e=2,t=new Set,i=new Set,n=new Map,s=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.providerItemsToReuse=n,this.showDeprecated=s}}Nb.default=new Nb;let V1e;function H1e(){return V1e}class z1e{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}async function tP(o,e,t,i=Nb.default,n={triggerKind:0},s=vt.None){const r=new ds;t=t.clone();const a=e.getWordAtPosition(t),l=a?new k(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):k.fromPositions(t),d={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},c=[],u=new de,h=[];let g=!1;const f=(v,_,b)=>{var C,w,S;let x=!1;if(!_)return x;for(const y of _.suggestions)if(!i.kindFilter.has(y.kind)){if(!i.showDeprecated&&(!((C=y==null?void 0:y.tags)===null||C===void 0)&&C.includes(1)))continue;y.range||(y.range=d),y.sortText||(y.sortText=typeof y.label=="string"?y.label:y.label.label),!g&&y.insertTextRules&&y.insertTextRules&4&&(g=om.guessNeedsClipboard(y.insertText)),c.push(new W1e(t,y,_,v)),x=!0}return iM(_)&&u.add(_),h.push({providerName:(w=v._debugDisplayName)!==null&&w!==void 0?w:"unknown_provider",elapsedProvider:(S=_.duration)!==null&&S!==void 0?S:-1,elapsedOverall:b.elapsed()}),x},m=(async()=>{})();for(const v of o.orderedGroups(e)){let _=!1;if(await Promise.all(v.map(async b=>{if(i.providerItemsToReuse.has(b)){const C=i.providerItemsToReuse.get(b);C.forEach(w=>c.push(w)),_=_||C.length>0;return}if(!(i.providerFilter.size>0&&!i.providerFilter.has(b)))try{const C=new ds,w=await b.provideCompletionItems(e,t,n,s);_=f(b,w,C)||_}catch(C){en(C)}})),_||s.isCancellationRequested)break}return await m,s.isCancellationRequested?(u.dispose(),Promise.reject(new Mu)):new z1e(c.sort(j1e(i.snippetSortOrder)),g,{entries:h,elapsed:r.elapsed()},u)}function iP(o,e){if(o.sortTextLow&&e.sortTextLow){if(o.sortTextLowe.sortTextLow)return 1}return o.textLabele.textLabel?1:o.completion.kind-e.completion.kind}function $1e(o,e){if(o.completion.kind!==e.completion.kind){if(o.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return iP(o,e)}function U1e(o,e){if(o.completion.kind!==e.completion.kind){if(o.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return iP(o,e)}const YL=new Map;YL.set(0,$1e);YL.set(2,U1e);YL.set(1,iP);function j1e(o){return YL.get(o)}Et.registerCommand("_executeCompletionItemProvider",async(o,...e)=>{const[t,i,n,s]=e;qt(ze.isUri(t)),qt(z.isIPosition(i)),qt(typeof n=="string"||!n),qt(typeof s=="number"||!s);const{completionProvider:r}=o.get(Me),a=await o.get(Xs).createModelReference(t);try{const l={incomplete:!1,suggestions:[]},d=[],c=a.object.textEditorModel.validatePosition(i),u=await tP(r,a.object.textEditorModel,c,void 0,{triggerCharacter:n??void 0,triggerKind:n?1:0});for(const h of u.items)d.length<(s??0)&&d.push(h.resolve(vt.None)),l.incomplete=l.incomplete||h.container.incomplete,l.suggestions.push(h.completion);try{return await Promise.all(d),l}finally{setTimeout(()=>u.disposable.dispose(),100)}}finally{a.dispose()}});function K1e(o,e){var t;(t=o.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}class jf{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}function X3(o,e=is){return Roe(o,e)?o.charAt(0).toUpperCase()+o.slice(1):o}var q1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},G1e=function(o,e){return function(t,i){e(t,i,o)}};class Q3{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const i=t.resolve(e);if(i!==void 0)return i}}}class J3{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let i=this._model.getValueInRange(this._selection)||void 0,n=this._selection.startLineNumber!==this._selection.endLineNumber;if(!i&&this._overtypingCapturer){const s=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);s&&(i=s.value,n=s.multiline)}if(i&&n&&e.snippet){const s=this._model.getLineContent(this._selection.startLineNumber),r=ii(s,0,this._selection.startColumn-1);let a=r;e.snippet.walk(d=>d===e?!1:(d instanceof Is&&(a=ii(Rl(d.value).pop())),!0));const l=Qh(a,r);i=i.replace(/(\r\n|\r|\n)(.*)/g,(d,c,u)=>`${c}${a.substr(l)}${u}`)}return i}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){const i=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return i&&i.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}class e9{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if(t==="TM_FILENAME")return Vc(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){const i=Vc(this._model.uri.fsPath),n=i.lastIndexOf(".");return n<=0?i:i.slice(0,n)}else{if(t==="TM_DIRECTORY")return o8(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(qy(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}class t9{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if(e.name!=="CLIPBOARD")return;const t=this._readClipboardText();if(t){if(this._spread){const i=t.split(/\r\n|\n|\r/).filter(n=>!h8(n));if(i.length===this._selectionCount)return i[this._selectionIdx]}return t}}}let GS=class{constructor(e,t,i){this._model=e,this._selection=t,this._languageConfigurationService=i}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=this._languageConfigurationService.getLanguageConfiguration(i).comments;if(n){if(t==="LINE_COMMENT")return n.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return n.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return n.blockCommentEndToken||void 0}}};GS=q1e([G1e(2,si)],GS);class ya{constructor(){this._date=new Date}resolve(e){const{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return ya.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return ya.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return ya.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return ya.monthNamesShort[this._date.getMonth()];if(t==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(t==="CURRENT_TIMEZONE_OFFSET"){const i=this._date.getTimezoneOffset(),n=i>0?"-":"+",s=Math.trunc(Math.abs(i/60)),r=s<10?"0"+s:s,a=Math.abs(i)-s*60,l=a<10?"0"+a:a;return n+r+":"+l}}}ya.dayNames=[p("Sunday","Sunday"),p("Monday","Monday"),p("Tuesday","Tuesday"),p("Wednesday","Wednesday"),p("Thursday","Thursday"),p("Friday","Friday"),p("Saturday","Saturday")];ya.dayNamesShort=[p("SundayShort","Sun"),p("MondayShort","Mon"),p("TuesdayShort","Tue"),p("WednesdayShort","Wed"),p("ThursdayShort","Thu"),p("FridayShort","Fri"),p("SaturdayShort","Sat")];ya.monthNames=[p("January","January"),p("February","February"),p("March","March"),p("April","April"),p("May","May"),p("June","June"),p("July","July"),p("August","August"),p("September","September"),p("October","October"),p("November","November"),p("December","December")];ya.monthNamesShort=[p("JanuaryShort","Jan"),p("FebruaryShort","Feb"),p("MarchShort","Mar"),p("AprilShort","Apr"),p("MayShort","May"),p("JuneShort","Jun"),p("JulyShort","Jul"),p("AugustShort","Aug"),p("SeptemberShort","Sep"),p("OctoberShort","Oct"),p("NovemberShort","Nov"),p("DecemberShort","Dec")];class i9{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=$le(this._workspaceService.getWorkspace());if(!Hle(t)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(FE(e))return Vc(e.uri.path);let t=Vc(e.configPath.path);return t.endsWith(BE)&&(t=t.substr(0,t.length-BE.length-1)),t}_resoveWorkspacePath(e){if(FE(e))return X3(e.uri.fsPath);const t=Vc(e.configPath.path);let i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?X3(i):"/"}}class n9{resolve(e){const{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return HL()}}var Z1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Y1e=function(o,e){return function(t,i){e(t,i,o)}},oa;class ir{constructor(e,t,i){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=i,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=IP(t.placeholders,nr.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations(t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),s=this._snippet.fullLen(i),r=k.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+s)),a=i.isFinalTabstop?ir._decor.inactiveFinal:ir._decor.inactive,l=t.addDecoration(r,a);this._placeholderDecorations.set(i,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const n=[];for(const s of this._placeholderGroups[this._placeholderGroupsIdx])if(s.transform){const r=this._placeholderDecorations.get(s),a=this._editor.getModel().getDecorationRange(r),l=this._editor.getModel().getValueInRange(a),d=s.transform.resolve(l).split(/\r\n|\r|\n/);for(let c=1;c0&&this._editor.executeEdits("snippet.placeholderTransform",n)}let t=!1;e===!0&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations(n=>{const s=new Set,r=[];for(const a of this._placeholderGroups[this._placeholderGroupsIdx]){const l=this._placeholderDecorations.get(a),d=this._editor.getModel().getDecorationRange(l);r.push(new Ae(d.startLineNumber,d.startColumn,d.endLineNumber,d.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(a),n.changeDecorationOptions(l,a.isFinalTabstop?ir._decor.activeFinal:ir._decor.active),s.add(a);for(const c of this._snippet.enclosingPlaceholders(a)){const u=this._placeholderDecorations.get(c);n.changeDecorationOptions(u,c.isFinalTabstop?ir._decor.activeFinal:ir._decor.active),s.add(c)}}for(const[a,l]of this._placeholderDecorations)s.has(a)||n.changeDecorationOptions(l,a.isFinalTabstop?ir._decor.inactiveFinal:ir._decor.inactive);return r});return t?this.move(e):i??[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof nr){const i=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(i).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const s=this._placeholderDecorations.get(n),r=this._editor.getModel().getDecorationRange(s);if(!r){e.delete(n.index);break}i.push(r)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(e!=null&&e.choice))return;const t=this._placeholderDecorations.get(e);if(!t)return;const i=this._editor.getModel().getDecorationRange(t);if(i)return{range:i,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof Tm,!e)),e}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const s=e.shift();console.assert(s._offset!==-1),console.assert(!s._placeholderDecorations);const r=s._snippet.placeholderInfo.last.index;for(const l of s._snippet.placeholderInfo.all)l.isFinalTabstop?l.index=n.index+(r+1)/this._nestingLevel:l.index=n.index+l.index/this._nestingLevel;this._snippet.replace(n,s._snippet.children);const a=this._placeholderDecorations.get(n);i.removeDecoration(a),this._placeholderDecorations.delete(n);for(const l of s._snippet.placeholders){const d=s._snippet.offset(l),c=s._snippet.fullLen(l),u=k.fromPositions(t.getPositionAt(s._offset+d),t.getPositionAt(s._offset+d+c)),h=i.addDecoration(u,ir._decor.inactive);this._placeholderDecorations.set(l,h)}}this._placeholderGroups=IP(this._snippet.placeholders,nr.compareByIndex)})}}ir._decor={active:st.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:st.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:st.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:st.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const s9={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let ZS=oa=class{static adjustWhitespace(e,t,i,n,s){const r=e.getLineContent(t.lineNumber),a=ii(r,0,t.column-1);let l;return n.walk(d=>{if(!(d instanceof Is)||d.parent instanceof Tm||s&&!s.has(d))return!0;const c=d.value.split(/\r\n|\r|\n/);if(i){const h=n.offset(d);if(h===0)c[0]=e.normalizeIndentation(c[0]);else{l=l??n.toString();const g=l.charCodeAt(h-1);(g===10||g===13)&&(c[0]=e.normalizeIndentation(a+c[0]))}for(let g=1;gw.get(ag)),f=e.invokeWithinContext(w=>new e9(w.get(Hp),h)),m=()=>a,v=h.getValueInRange(oa.adjustSelection(h,e.getSelection(),i,0)),_=h.getValueInRange(oa.adjustSelection(h,e.getSelection(),0,n)),b=h.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),C=e.getSelections().map((w,S)=>({selection:w,idx:S})).sort((w,S)=>k.compareRangesUsingStarts(w.selection,S.selection));for(const{selection:w,idx:S}of C){let x=oa.adjustSelection(h,w,i,0),y=oa.adjustSelection(h,w,0,n);v!==h.getValueInRange(x)&&(x=w),_!==h.getValueInRange(y)&&(y=w);const I=w.setStartPosition(x.startLineNumber,x.startColumn).setEndPosition(y.endLineNumber,y.endColumn),E=new om().parse(t,!0,s),R=I.getStartPosition(),j=oa.adjustWhitespace(h,R,r||S>0&&b!==h.getLineFirstNonWhitespaceColumn(w.positionLineNumber),E);E.resolveVariables(new Q3([f,new t9(m,S,C.length,e.getOption(78)==="spread"),new J3(h,w,S,l),new GS(h,w,d),new ya,new i9(g),new n9])),c[S]=Li.replace(I,E.toString()),c[S].identifier={major:S,minor:0},c[S]._isTracked=!0,u[S]=new ir(e,E,j)}return{edits:c,snippets:u}}static createEditsAndSnippetsFromEdits(e,t,i,n,s,r,a){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};const l=[],d=e.getModel(),c=new om,u=new O0,h=new Q3([e.invokeWithinContext(f=>new e9(f.get(Hp),d)),new t9(()=>s,0,e.getSelections().length,e.getOption(78)==="spread"),new J3(d,e.getSelection(),0,r),new GS(d,e.getSelection(),a),new ya,new i9(e.invokeWithinContext(f=>f.get(ag))),new n9]);t=t.sort((f,m)=>k.compareRangesUsingStarts(f.range,m.range));let g=0;for(let f=0;f0){const S=t[f-1].range,x=k.fromPositions(S.getEndPosition(),m.getStartPosition()),y=new Is(d.getValueInRange(x));u.appendChild(y),g+=y.value.length}const _=c.parseFragment(v,u);oa.adjustWhitespace(d,m.getStartPosition(),!0,u,new Set(_)),u.resolveVariables(h);const b=u.toString(),C=b.slice(g);g=b.length;const w=Li.replace(m,C);w.identifier={major:f,minor:0},w._isTracked=!0,l.push(w)}return c.ensureFinalTabstop(u,i,!0),{edits:l,snippets:[new ir(e,u,"")]}}constructor(e,t,i=s9,n){this._editor=e,this._template=t,this._options=i,this._languageConfigurationService=n,this._templateMerges=[],this._snippets=[]}dispose(){jt(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}=typeof this._template=="string"?oa.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):oa.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,i=>{const n=i.filter(s=>!!s.identifier);for(let s=0;sAe.fromPositions(s.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=s9){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=oa.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",i,s=>{const r=s.filter(l=>!!l.identifier);for(let l=0;lAe.fromPositions(l.range.getEndPosition()))})}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{s.push(...n.get(r))})}e.sort(k.compareRangesUsingStarts);for(const[i,n]of t){if(n.length!==e.length){t.delete(i);continue}n.sort(k.compareRangesUsingStarts);for(let s=0;s0}};ZS=oa=Z1e([Y1e(3,si)],ZS);var X1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},t1=function(o,e){return function(t,i){e(t,i,o)}},bf;const o9={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let Un=bf=class{static get(e){return e.getContribution(bf.ID)}constructor(e,t,i,n,s){this._editor=e,this._logService=t,this._languageFeaturesService=i,this._languageConfigurationService=s,this._snippetListener=new de,this._modelVersionId=-1,this._inSnippet=bf.InSnippetMode.bindTo(n),this._hasNextTabstop=bf.HasNextTabstop.bindTo(n),this._hasPrevTabstop=bf.HasPrevTabstop.bindTo(n)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)===null||e===void 0||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,typeof t>"u"?o9:{...o9,...t})}catch(i){this.cancel(),this._logService.error(i),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){var i;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(qt(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new ZS(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),!((i=this._session)===null||i===void 0)&&i.hasChoice){const n={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(c,u)=>{if(!this._session||c!==this._editor.getModel()||!z.equals(this._editor.getPosition(),u))return;const{activeChoice:h}=this._session;if(!h||h.choice.options.length===0)return;const g=c.getValueInRange(h.range),f=!!h.choice.options.find(v=>v.value===g),m=[];for(let v=0;v{r==null||r.dispose(),a=!1},d=()=>{a||(r=this._languageFeaturesService.completionProvider.register({language:s.getLanguageId(),pattern:s.uri.fsPath,scheme:s.uri.scheme,exclusive:!0},n),this._snippetListener.add(r),a=!0)};this._choiceCompletions={provider:n,enable:d,disable:l}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(n=>n.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){var e;if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{activeChoice:t}=this._session;if(!t||!this._choiceCompletions){(e=this._choiceCompletions)===null||e===void 0||e.disable(),this._currentChoice=void 0;return}this._currentChoice!==t.choice&&(this._currentChoice=t.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{K1e(this._editor,this._choiceCompletions.provider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(t=this._session)===null||t===void 0||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;(e=this._session)===null||e===void 0||e.prev(),this._updateState()}next(){var e;(e=this._session)===null||e===void 0||e.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}};Un.ID="snippetController2";Un.InSnippetMode=new De("inSnippetMode",!1,p("inSnippetMode","Whether the editor in current in snippet mode"));Un.HasNextTabstop=new De("hasNextTabstop",!1,p("hasNextTabstop","Whether there is a next tab stop when in snippet mode"));Un.HasPrevTabstop=new De("hasPrevTabstop",!1,p("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"));Un=bf=X1e([t1(1,bo),t1(2,Me),t1(3,Xe),t1(4,si)],Un);At(Un.ID,Un,4);const XL=Rn.bindToContribution(Un.get);we(new XL({id:"jumpToNextSnippetPlaceholder",precondition:ae.and(Un.InSnippetMode,Un.HasNextTabstop),handler:o=>o.next(),kbOpts:{weight:130,kbExpr:T.editorTextFocus,primary:2}}));we(new XL({id:"jumpToPrevSnippetPlaceholder",precondition:ae.and(Un.InSnippetMode,Un.HasPrevTabstop),handler:o=>o.prev(),kbOpts:{weight:130,kbExpr:T.editorTextFocus,primary:1026}}));we(new XL({id:"leaveSnippet",precondition:Un.InSnippetMode,handler:o=>o.cancel(!0),kbOpts:{weight:130,kbExpr:T.editorTextFocus,primary:9,secondary:[1033]}}));we(new XL({id:"acceptSnippet",precondition:Un.InSnippetMode,handler:o=>o.finish()}));var Q1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vk=function(o,e){return function(t,i){e(t,i,o)}},No;(function(o){o[o.Undo=0]="Undo",o[o.Redo=1]="Redo",o[o.AcceptWord=2]="AcceptWord",o[o.Other=3]="Other"})(No||(No={}));let i2=class extends q{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,i,n,s,r,a,l,d,c,u,h){super(),this.textModel=e,this.selectedSuggestItem=t,this.cursorPosition=i,this.textModelVersionId=n,this._debounceValue=s,this._suggestPreviewEnabled=r,this._suggestPreviewMode=a,this._inlineSuggestMode=l,this._enabled=d,this._instantiationService=c,this._commandService=u,this._languageConfigurationService=h,this._source=this._register(this._instantiationService.createInstance(t2,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=Pt(this,!1),this._forceUpdateSignal=hR("forceUpdate"),this._selectedInlineCompletionId=Pt(this,void 0),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([No.Redo,No.Undo,No.AcceptWord]),this._fetchInlineCompletions=zge({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:Rd.Automatic}),handleChange:(f,m)=>(f.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(f.change)?m.preserveCurrentCompletion=!0:f.didChange(this._forceUpdateSignal)&&(m.inlineCompletionTriggerKind=f.change),!0)},(f,m)=>{if(this._forceUpdateSignal.read(f),!(this._enabled.read(f)&&this.selectedSuggestItem.read(f)||this._isActive.read(f))){this._source.cancelUpdate();return}this.textModelVersionId.read(f);const _=this.selectedInlineCompletion.get(),b=m.preserveCurrentCompletion||_!=null&&_.forwardStable?_:void 0,C=this._source.suggestWidgetInlineCompletions.get(),w=this.selectedSuggestItem.read(f);if(C&&!w){const y=this._source.inlineCompletions.get();wi(I=>{(!y||C.request.versionId>y.request.versionId)&&this._source.inlineCompletions.set(C.clone(),I),this._source.clearSuggestWidgetInlineCompletions(I)})}const S=this.cursorPosition.read(f),x={triggerKind:m.inlineCompletionTriggerKind,selectedSuggestionInfo:w==null?void 0:w.toSelectedSuggestionInfo()};return this._source.fetch(S,x,b)}),this._filteredInlineCompletionItems=rt(this,f=>{const m=this._source.inlineCompletions.read(f);if(!m)return[];const v=this.cursorPosition.read(f);return m.inlineCompletions.filter(b=>b.isVisible(this.textModel,v,f))}),this.selectedInlineCompletionIndex=rt(this,f=>{const m=this._selectedInlineCompletionId.read(f),v=this._filteredInlineCompletionItems.read(f),_=this._selectedInlineCompletionId===void 0?-1:v.findIndex(b=>b.semanticId===m);return _===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):_}),this.selectedInlineCompletion=rt(this,f=>{const m=this._filteredInlineCompletionItems.read(f),v=this.selectedInlineCompletionIndex.read(f);return m[v]}),this.lastTriggerKind=this._source.inlineCompletions.map(this,f=>f==null?void 0:f.request.context.triggerKind),this.inlineCompletionsCount=rt(this,f=>{if(this.lastTriggerKind.read(f)===Rd.Explicit)return this._filteredInlineCompletionItems.read(f).length}),this.state=VN({owner:this,equalityComparer:(f,m)=>!f||!m?f===m:H3(f.ghostText,m.ghostText)&&f.inlineCompletion===m.inlineCompletion&&f.suggestItem===m.suggestItem},f=>{var m;const v=this.textModel,_=this.selectedSuggestItem.read(f);if(_){const b=_.toSingleTextEdit().removeCommonPrefix(v),C=this._computeAugmentedCompletion(b,f);if(!this._suggestPreviewEnabled.read(f)&&!C)return;const S=(m=C==null?void 0:C.edit)!==null&&m!==void 0?m:b,x=C?C.edit.text.length-b.text.length:0,y=this._suggestPreviewMode.read(f),I=this.cursorPosition.read(f),E=S.computeGhostText(v,y,I,x);return{ghostText:E??new KS(S.range.endLineNumber,[]),inlineCompletion:C==null?void 0:C.completion,suggestItem:_}}else{if(!this._isActive.read(f))return;const b=this.selectedInlineCompletion.read(f);if(!b)return;const C=b.toSingleTextEdit(f),w=this._inlineSuggestMode.read(f),S=this.cursorPosition.read(f),x=C.computeGhostText(v,w,S);return x?{ghostText:x,inlineCompletion:b,suggestItem:void 0}:void 0}}),this.ghostText=VN({owner:this,equalityComparer:H3},f=>{const m=this.state.read(f);if(m)return m.ghostText}),this._register(x0(this._fetchInlineCompletions));let g;this._register(zt(f=>{var m,v;const _=this.state.read(f),b=_==null?void 0:_.inlineCompletion;if((b==null?void 0:b.semanticId)!==(g==null?void 0:g.semanticId)&&(g=b,b)){const C=b.inlineCompletion,w=C.source;(v=(m=w.provider).handleItemDidShow)===null||v===void 0||v.call(m,w.inlineCompletions,C.sourceInlineCompletion,C.insertText)}}))}async trigger(e){this._isActive.set(!0,e),await this._fetchInlineCompletions.get()}async triggerExplicitly(e){_b(e,t=>{this._isActive.set(!0,t),this._forceUpdateSignal.trigger(t,Rd.Explicit)}),await this._fetchInlineCompletions.get()}stop(e){_b(e,t=>{this._isActive.set(!1,t),this._source.clear(t)})}_computeAugmentedCompletion(e,t){const i=this.textModel,n=this._source.suggestWidgetInlineCompletions.read(t),s=n?n.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter(mv);return EJ(s,a=>{let l=a.toSingleTextEdit(t);return l=l.removeCommonPrefix(i,k.fromPositions(l.range.getStartPosition(),e.range.getEndPosition())),l.augments(e)?{edit:l,completion:a}:void 0})}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){const i=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[i].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){var t;if(e.getModel()!==this.textModel)throw new Ci;const i=this.state.get();if(!i||i.ghostText.isEmpty()||!i.inlineCompletion)return;const n=i.inlineCompletion.toInlineCompletion(void 0);e.pushUndoStop(),n.snippetInfo?(e.executeEdits("inlineSuggestion.accept",[Li.replaceMove(n.range,""),...n.additionalTextEdits]),e.setPosition(n.snippetInfo.range.getStartPosition()),(t=Un.get(e))===null||t===void 0||t.insert(n.snippetInfo.snippet,{undoStopBefore:!1})):e.executeEdits("inlineSuggestion.accept",[Li.replaceMove(n.range,n.insertText),...n.additionalTextEdits]),n.command&&n.source.addRef(),wi(s=>{this._source.clear(s),this._isActive.set(!1,s)}),n.command&&(await this._commandService.executeCommand(n.command.id,...n.command.arguments||[]).then(void 0,en),n.source.removeRef())}async acceptNextWord(e){await this._acceptNext(e,(t,i)=>{const n=this.textModel.getLanguageIdAtPosition(t.lineNumber,t.column),s=this._languageConfigurationService.getLanguageConfiguration(n),r=new RegExp(s.wordDefinition.source,s.wordDefinition.flags.replace("g","")),a=i.match(r);let l=0;a&&a.index!==void 0?a.index===0?l=a[0].length:l=a.index:l=i.length;const c=/\s+/g.exec(i);return c&&c.index!==void 0&&c.index+c[0].length{const n=i.match(/\n/);return n&&n.index!==void 0?n.index+1:i.length})}async _acceptNext(e,t){if(e.getModel()!==this.textModel)throw new Ci;const i=this.state.get();if(!i||i.ghostText.isEmpty()||!i.inlineCompletion)return;const n=i.ghostText,s=i.inlineCompletion.toInlineCompletion(void 0);if(s.snippetInfo||s.filterText!==s.insertText){await this.accept(e);return}const r=n.parts[0],a=new z(n.lineNumber,r.column),l=r.lines.join(` +`),d=t(a,l);if(d===l.length&&n.parts.length===1){this.accept(e);return}const c=l.substring(0,d);s.source.addRef();try{this._isAcceptingPartially=!0;try{e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[Li.replace(k.fromPositions(a),c)]);const u=XT(c);e.setPosition(YT(a,u))}finally{this._isAcceptingPartially=!1}if(s.source.provider.handlePartialAccept){const u=k.fromPositions(s.range.getStartPosition(),YT(a,XT(c))),h=e.getModel().getValueInRange(u,1);s.source.provider.handlePartialAccept(s.source.inlineCompletions,s.sourceInlineCompletion,h.length)}}finally{s.source.removeRef()}}handleSuggestAccepted(e){var t,i;const n=e.toSingleTextEdit().removeCommonPrefix(this.textModel),s=this._computeAugmentedCompletion(n,void 0);if(!s)return;const r=s.completion.inlineCompletion;(i=(t=r.source.provider).handlePartialAccept)===null||i===void 0||i.call(t,r.source.inlineCompletions,r.sourceInlineCompletion,n.text.length)}};i2=Q1e([vk(9,qe),vk(10,Ri),vk(11,si)],i2);var J1e=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},r9=function(o,e){return function(t,i){e(t,i,o)}},M_;class nP{constructor(e){this.name=e}select(e,t,i){if(i.length===0)return 0;const n=i[0].score[0];for(let s=0;sl&&u.type===i[d].completion.kind&&u.insertText===i[d].completion.insertText&&(l=u.touch,a=d),i[d].completion.preselect&&r===-1)return r=d}return a!==-1?a:r!==-1?r:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();const t=0;for(const[i,n]of e)n.touch=t,n.type=typeof n.type=="number"?n.type:Cv.fromString(n.type),this._cache.set(i,n);this._seq=this._cache.size}}class twe extends nP{constructor(){super("recentlyUsedByPrefix"),this._trie=gp.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),s=`${e.getLanguageId()}/${n}`;this._trie.set(s,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){const{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);const s=`${e.getLanguageId()}/${n}`;let r=this._trie.get(s);if(r||(r=this._trie.findSubstr(s)),r)for(let a=0;ae.push([i,t])),e.sort((t,i)=>-(t[1].touch-i[1].touch)).forEach((t,i)=>t[1].touch=i),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type=typeof i.type=="number"?i.type:Cv.fromString(i.type),this._trie.set(t,i)}}}let Tb=M_=class{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new de,this._persistSoon=new Yt(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(i=>{i.reason===rb.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(e,t){var i;const n=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(((i=this._strategy)===null||i===void 0?void 0:i.name)!==n){this._saveState();const s=M_._strategyCtors.get(n)||TH;this._strategy=new s;try{const a=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,l=this._storageService.get(`${M_._storagePrefix}/${n}`,a);l&&this._strategy.fromJSON(JSON.parse(l))}catch{}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=JSON.stringify(this._strategy);this._storageService.store(`${M_._storagePrefix}/${this._strategy.name}`,i,t,1)}}};Tb._strategyCtors=new Map([["recentlyUsedByPrefix",twe],["recentlyUsed",ewe],["first",TH]]);Tb._storagePrefix="suggest/memories";Tb=M_=J1e([r9(0,Xr),r9(1,Dt)],Tb);const QL=bt("ISuggestMemories");xt(QL,Tb,1);var iwe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nwe=function(o,e){return function(t,i){e(t,i,o)}},n2;let Mb=n2=class{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=n2.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(i=>i.hasChanged(122)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),(e=this._selectionListener)===null||e===void 0||e.dispose(),this._ckAtEnd.reset()}_update(){const e=this._editor.getOption(122)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){const t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const i=this._editor.getModel(),n=this._editor.getSelection(),s=i.getWordAtPosition(n.getStartPosition());if(!s){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(s.endColumn===n.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};Mb.AtEnd=new De("atEndOfWord",!1);Mb=n2=iwe([nwe(1,Xe)],Mb);var swe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},owe=function(o,e){return function(t,i){e(t,i,o)}},A_;let yg=A_=class{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=A_.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),(e=this._listener)===null||e===void 0||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},i){if(e.items.length===0){this.reset();return}if(A_._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=i,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,i){let n=i;for(let s=t.items.length;s>0&&(n=(n+t.items.length+(e?1:-1))%t.items.length,!(n===i||!t.items[n].completion.additionalTextEdits));s--);return n}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=A_._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};yg.OtherSuggestions=new De("hasOtherSuggestions",!1);yg=A_=swe([owe(1,Xe)],yg);class rwe{constructor(e,t,i,n){this._disposables=new de,this._disposables.add(i.onDidSuggest(s=>{s.completionModel.items.length===0&&this.reset()})),this._disposables.add(i.onDidCancel(s=>{this.reset()})),this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(s=>{if(this._active&&!t.isFrozen()&&i.state!==0){const r=s.charCodeAt(s.length-1);this._active.acceptCharacters.has(r)&&e.getOption(0)&&n(this._active.item)}}))}_onItem(e){if(!e||!ls(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;const t=new Cw;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}class To{async provideSelectionRanges(e,t){const i=[];for(const n of t){const s=[];i.push(s);const r=new Map;await new Promise(a=>To._bracketsRightYield(a,0,e,n,r)),await new Promise(a=>To._bracketsLeftYield(a,0,e,n,r,s))}return i}static _bracketsRightYield(e,t,i,n,s){const r=new Map,a=Date.now();for(;;){if(t>=To._maxRounds){e();break}if(!n){e();break}const l=i.bracketPairs.findNextBracket(n);if(!l){e();break}if(Date.now()-a>To._maxDuration){setTimeout(()=>To._bracketsRightYield(e,t+1,i,n,s));break}if(l.bracketInfo.isOpeningBracket){const c=l.bracketInfo.bracketText,u=r.has(c)?r.get(c):0;r.set(c,u+1)}else{const c=l.bracketInfo.getOpeningBrackets()[0].bracketText;let u=r.has(c)?r.get(c):0;if(u-=1,r.set(c,Math.max(0,u)),u<0){let h=s.get(c);h||(h=new Ns,s.set(c,h)),h.push(l.range)}}n=l.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,s,r){const a=new Map,l=Date.now();for(;;){if(t>=To._maxRounds&&s.size===0){e();break}if(!n){e();break}const d=i.bracketPairs.findPrevBracket(n);if(!d){e();break}if(Date.now()-l>To._maxDuration){setTimeout(()=>To._bracketsLeftYield(e,t+1,i,n,s,r));break}if(d.bracketInfo.isOpeningBracket){const u=d.bracketInfo.bracketText;let h=a.has(u)?a.get(u):0;if(h-=1,a.set(u,Math.max(0,h)),h<0){const g=s.get(u);if(g){const f=g.shift();g.size===0&&s.delete(u);const m=k.fromPositions(d.range.getEndPosition(),f.getStartPosition()),v=k.fromPositions(d.range.getStartPosition(),f.getEndPosition());r.push({range:m}),r.push({range:v}),To._addBracketLeading(i,v,r)}}}else{const u=d.bracketInfo.getOpeningBrackets()[0].bracketText,h=a.has(u)?a.get(u):0;a.set(u,h+1)}n=d.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,s=e.getLineFirstNonWhitespaceColumn(n);s!==0&&s!==t.startColumn&&(i.push({range:k.fromPositions(new z(n,s),t.getEndPosition())}),i.push({range:k.fromPositions(new z(n,1),t.getEndPosition())}));const r=n-1;if(r>0){const a=e.getLineFirstNonWhitespaceColumn(r);a===t.startColumn&&a!==e.getLineLastNonWhitespaceColumn(r)&&(i.push({range:k.fromPositions(new z(r,a),t.getEndPosition())}),i.push({range:k.fromPositions(new z(r,1),t.getEndPosition())}))}}}To._maxDuration=30;To._maxRounds=2;class ma{static async create(e,t){if(!t.getOption(117).localityBonus||!t.hasModel())return ma.None;const i=t.getModel(),n=t.getPosition();if(!e.canComputeWordRanges(i.uri))return ma.None;const[s]=await new To().provideSelectionRanges(i,[n]);if(s.length===0)return ma.None;const r=await e.computeWordRanges(i.uri,s[0].range);if(!r)return ma.None;const a=i.getWordUntilPosition(n);return delete r[a.word],new class extends ma{distance(l,d){if(!n.equals(t.getPosition()))return 0;if(d.kind===17)return 2<<20;const c=typeof d.label=="string"?d.label:d.label.label,u=r[c];if(P9(u))return 2<<20;const h=fv(u,k.fromPositions(l),k.compareRangesUsingStarts),g=h>=0?u[h]:u[Math.max(0,~h-1)];let f=s.length;for(const m of s){if(!k.containsRange(m.range,g))break;f-=1}return f}}}}ma.None=new class extends ma{distance(){return 0}};let a9=class{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}};class yc{constructor(e,t,i,n,s,r,a=tL.default,l=void 0){this.clipboardText=l,this._snippetCompareFn=yc._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=s,this._refilterKind=1,this._lineContext=i,this._fuzzyScoreOptions=a,r==="top"?this._snippetCompareFn=yc._compareCompletionItemsSnippetsUp:r==="bottom"&&(this._snippetCompareFn=yc._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta0&&i[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let n="",s="";const r=this._refilterKind===1?this._items:this._filteredItems,a=[],l=!this._options.filterGraceful||r.length>2e3?lg:bde;for(let d=0;d=g)c.score=ka.Default;else if(typeof c.completion.filterText=="string"){const m=l(n,s,f,c.completion.filterText,c.filterTextLow,0,this._fuzzyScoreOptions);if(!m)continue;II(c.completion.filterText,c.textLabel)===0?c.score=m:(c.score=pde(n,s,f,c.textLabel,c.labelLow,0),c.score[0]=m[0])}else{const m=l(n,s,f,c.textLabel,c.labelLow,0,this._fuzzyScoreOptions);if(!m)continue;c.score=m}}c.idx=d,c.distance=this._wordDistance.distance(c.position,c.completion),a.push(c),e.push(c.textLabel.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?Mk(e.length-.85,e,(d,c)=>d-c):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return 1;if(t.completion.kind===27)return-1}return yc._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return-1;if(t.completion.kind===27)return 1}return yc._compareCompletionItems(e,t)}}var awe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sc=function(o,e){return function(t,i){e(t,i,o)}},s2;class oh{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenization.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!(!n||n.endColumn!==i.column&&n.startColumn+1!==i.column||!isNaN(Number(n.word)))}constructor(e,t,i){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=i}}function lwe(o,e,t){if(!e.getContextKeyValue(Tn.inlineSuggestionVisible.key))return!0;const i=e.getContextKeyValue(Tn.suppressSuggestions.key);return i!==void 0?!i:!o.getOption(62).suppressSuggestions}function dwe(o,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;const i=e.getContextKeyValue(Tn.suppressSuggestions.key);return i!==void 0?!i:!o.getOption(62).suppressSuggestions}let o2=s2=class{constructor(e,t,i,n,s,r,a,l,d){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=s,this._contextKeyService=r,this._configurationService=a,this._languageFeaturesService=l,this._envService=d,this._toDispose=new de,this._triggerCharacterListener=new de,this._triggerQuickSuggest=new qr,this._triggerState=void 0,this._completionDisposables=new de,this._onDidCancel=new W,this._onDidTrigger=new W,this._onDidSuggest=new W,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new Ae(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let c=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{c=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{c=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(u=>{c||this._onCursorChange(u)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!c&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){jt(this._triggerCharacterListener),jt([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(90)||!this._editor.hasModel()||!this._editor.getOption(120))return;const e=new Map;for(const i of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const n of i.triggerCharacters||[]){let s=e.get(n);s||(s=new Set,s.add(H1e()),e.set(n,s)),s.add(i)}const t=i=>{var n;if(!dwe(this._editor,this._contextKeyService,this._configurationService)||oh.shouldAutoTrigger(this._editor))return;if(!i){const a=this._editor.getPosition();i=this._editor.getModel().getLineContent(a.lineNumber).substr(0,a.column-1)}let s="";Jh(i.charCodeAt(i.length-1))?bn(i.charCodeAt(i.length-2))&&(s=i.substr(i.length-2)):s=i.charAt(i.length-1);const r=e.get(s);if(r){const a=new Map;if(this._completionModel)for(const[l,d]of this._completionModel.getItemsByProvider())r.has(l)||a.set(l,d);this.trigger({auto:!0,triggerKind:1,triggerCharacter:s,retrigger:!!this._completionModel,clipboardText:(n=this._completionModel)===null||n===void 0?void 0:n.clipboardText,completionOptions:{providerFilter:r,providerItemsToReuse:a}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>t()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var t;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(t=this._requestToken)===null||t===void 0||t.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&e.reason===0?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;jf.isAllOff(this._editor.getOption(88))||this._editor.getOption(117).snippetsPreventQuickSuggestions&&(!((e=Un.get(this._editor))===null||e===void 0)&&e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!oh.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const t=this._editor.getModel(),i=this._editor.getPosition(),n=this._editor.getOption(88);if(!jf.isAllOff(n)){if(!jf.isAllOn(n)){t.tokenization.tokenizeIfCheap(i.lineNumber);const s=t.tokenization.getLineTokens(i.lineNumber),r=s.getStandardTokenType(s.findTokenIndexAtOffset(Math.max(i.column-1-1,0)));if(jf.valueFor(n,r)!=="on")return}lwe(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(t)&&this.trigger({auto:!0})}},this._editor.getOption(89)))}_refilterCompletionItems(){qt(this._editor.hasModel()),qt(this._triggerState!==void 0);const e=this._editor.getModel(),t=this._editor.getPosition(),i=new oh(e,t,{...this._triggerState,refilter:!0});this._onNewContext(i)}trigger(e){var t,i,n,s,r,a;if(!this._editor.hasModel())return;const l=this._editor.getModel(),d=new oh(l,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:(t=e.shy)!==null&&t!==void 0?t:!1,position:this._editor.getPosition()}),this._context=d;let c={triggerKind:(i=e.triggerKind)!==null&&i!==void 0?i:0};e.triggerCharacter&&(c={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new tn;const u=this._editor.getOption(111);let h=1;switch(u){case"top":h=0;break;case"bottom":h=2;break}const{itemKind:g,showDeprecated:f}=s2._createSuggestFilter(this._editor),m=new Nb(h,(s=(n=e.completionOptions)===null||n===void 0?void 0:n.kindFilter)!==null&&s!==void 0?s:g,(r=e.completionOptions)===null||r===void 0?void 0:r.providerFilter,(a=e.completionOptions)===null||a===void 0?void 0:a.providerItemsToReuse,f),v=ma.create(this._editorWorkerService,this._editor),_=tP(this._languageFeaturesService.completionProvider,l,this._editor.getPosition(),m,c,this._requestToken.token);Promise.all([_,v]).then(async([b,C])=>{var w;if((w=this._requestToken)===null||w===void 0||w.dispose(),!this._editor.hasModel())return;let S=e==null?void 0:e.clipboardText;if(!S&&b.needsClipboard&&(S=await this._clipboardService.readText()),this._triggerState===void 0)return;const x=this._editor.getModel(),y=new oh(x,this._editor.getPosition(),e),I={...tL.default,firstMatchCanBeWeak:!this._editor.getOption(117).matchOnWordStartOnly};if(this._completionModel=new yc(b.items,this._context.column,{leadingLineContent:y.leadingLineContent,characterCountDelta:y.column-this._context.column},C,this._editor.getOption(117),this._editor.getOption(111),I,S),this._completionDisposables.add(b.disposable),this._onNewContext(y),this._reportDurationsTelemetry(b.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const E of b.items)E.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${E.provider._debugDisplayName}`,E.completion)}).catch(nt)}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static _createSuggestFilter(e){const t=new Set;e.getOption(111)==="none"&&t.add(27);const n=e.getOption(117);return n.showMethods||t.add(0),n.showFunctions||t.add(1),n.showConstructors||t.add(2),n.showFields||t.add(3),n.showVariables||t.add(4),n.showClasses||t.add(5),n.showStructs||t.add(6),n.showInterfaces||t.add(7),n.showModules||t.add(8),n.showProperties||t.add(9),n.showEvents||t.add(10),n.showOperators||t.add(11),n.showUnits||t.add(12),n.showValues||t.add(13),n.showConstants||t.add(14),n.showEnums||t.add(15),n.showEnumMembers||t.add(16),n.showKeywords||t.add(17),n.showWords||t.add(18),n.showColors||t.add(19),n.showFiles||t.add(20),n.showReferences||t.add(21),n.showColors||t.add(22),n.showFolders||t.add(23),n.showTypeParameters||t.add(24),n.showSnippets||t.add(27),n.showUsers||t.add(25),n.showIssues||t.add(26),{itemKind:t,showDeprecated:n.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(ii(e.leadingLineContent)!==ii(this._context.leadingLineContent)){this.cancel();return}if(e.columnthis._context.leadingWord.startColumn){if(oh.shouldAutoTrigger(this._editor)&&this._context){const i=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:i}})}return}if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&e.leadingWord.word.length!==0){const t=new Map,i=new Set;for(const[n,s]of this._completionModel.getItemsByProvider())s.length>0&&s[0].container.incomplete?i.add(n):t.set(n,s);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:i,providerItemsToReuse:t}})}else{const t=this._completionModel.lineContext;let i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){const n=oh.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(n&&this._context.leadingWord.endColumn0,i&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:i})}}}}};o2=s2=awe([sc(1,Qr),sc(2,Xd),sc(3,vo),sc(4,bo),sc(5,Xe),sc(6,Dt),sc(7,Me),sc(8,LA)],o2);class JL{constructor(e,t){this._disposables=new de,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType(()=>{if(this._locked||!e.hasModel())return;const i=e.getSelections(),n=i.length;let s=!1;for(let a=0;aJL._maxSelectionLength)return;this._lastOvertyped[a]={value:r.getValueInRange(l),multiline:l.startLineNumber!==l.endLineNumber}}})),this._disposables.add(t.onDidTrigger(i=>{this._locked=!0})),this._disposables.add(t.onDidCancel(i=>{this._locked=!1}))}getLastOvertypedInfo(e){if(e>=0&&e=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bk=function(o,e){return function(t,i){e(t,i,o)}};class sP extends dg{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=p({},"{0} ({1})",this._action.label,sP.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return(t=e.getLabel())===null||t===void 0?void 0:t.replace(/\benter\b/gi,"⏎")}}let r2=class{constructor(e,t,i,n,s){this._menuId=t,this._menuService=n,this._contextKeyService=s,this._menuDisposables=new de,this.element=le(e,pe(".suggest-status-bar"));const r=a=>a instanceof Ur?i.createInstance(sP,a,void 0):void 0;this._leftActions=new Cr(this.element,{actionViewItemProvider:r}),this._rightActions=new Cr(this.element,{actionViewItemProvider:r}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{const i=[],n=[];for(const[s,r]of e.getActions())s==="left"?i.push(...r):n.push(...r);this._leftActions.clear(),this._leftActions.push(i),this._rightActions.clear(),this._rightActions.push(n)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};r2=cwe([bk(2,qe),bk(3,Ba),bk(4,Xe)],r2);var uwe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hwe=function(o,e){return function(t,i){e(t,i,o)}};function oP(o){return!!o&&!!(o.completion.documentation||o.completion.detail&&o.completion.detail!==o.completion.label)}let a2=class{constructor(e,t){this._editor=e,this._onDidClose=new W,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new W,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new de,this._renderDisposeable=new de,this._borderWidth=1,this._size=new Rt(330,0),this.domNode=pe(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(Ud,{editor:e}),this._body=pe(".body"),this._scrollbar=new a0(this._body,{alwaysConsumeMouseWheel:!0}),le(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=le(this._body,pe(".header")),this._close=le(this._header,pe("span"+Ue.asCSSSelector(ve.close))),this._close.title=p("details.close","Close"),this._type=le(this._header,pe("p.type")),this._docs=le(this._body,pe("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(50)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(50),i=t.getMassagedFontFamily(),n=e.get(118)||t.fontSize,s=e.get(119)||t.lineHeight,r=t.fontWeight,a=`${n}px`,l=`${s}px`;this.domNode.style.fontSize=a,this.domNode.style.lineHeight=`${s/n}`,this.domNode.style.fontWeight=r,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=l,this._close.style.width=l}getLayoutInfo(){const e=this._editor.getOption(119)||this._editor.getOption(50).lineHeight,t=this._borderWidth,i=t*2;return{lineHeight:e,borderWidth:t,borderHeight:i,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=p("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,t){var i,n;this._renderDisposeable.clear();let{detail:s,documentation:r}=e.completion;if(t){let a="";a+=`score: ${e.score[0]} `,a+=`prefix: ${(i=e.word)!==null&&i!==void 0?i:"(no prefix)"} `,a+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel} `,a+=`distance: ${e.distance} (localityBonus-setting) `,a+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"} `,a+=`commit_chars: ${(n=e.completion.commitCharacters)===null||n===void 0?void 0:n.join("")} -`,r=new as().appendCodeblock("empty",a),s=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!oP(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),s){const a=s.length>1e5?`${s.substr(0,1e5)}…`:s;this._type.textContent=a,this._type.title=a,oo(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(a))}else $n(this._type),this._type.title="",xs(this._type),this.domNode.classList.add("no-type");if($n(this._docs),typeof r=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=r;else if(r){this._docs.classList.add("markdown-docs"),$n(this._docs);const a=this._markdownRenderer.render(r);this._docs.appendChild(a.element),this._renderDisposeable.add(a),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=a=>{a.preventDefault(),a.stopPropagation()},this._close.onclick=a=>{a.preventDefault(),a.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const i=new Rt(e,t);Rt.equals(i,this._size)||(this._size=i,BX(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};a2=awe([lwe(1,qe)],a2);class dwe{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new de,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new FR,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let i,n,s=0,r=0;this._disposables.add(this._resizable.onDidWillResize(()=>{i=this._topLeft,n=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(i&&n){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(r=n.width-a.dimension.width,l=!0),a.north&&(s=n.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:i.top+s,left:i.left+r})}a.done&&(i=void 0,n=void 0,s=0,r=0,this._userSize=a.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var a;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(a=this._userSize)!==null&&a!==void 0?a:this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){var i;const n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,(i=this._userSize)!==null&&i!==void 0?i:this.widget.size,t)}_placeAtAnchor(e,t,i){var n;const s=ng(this.getDomNode().ownerDocument.body),r=this.widget.getLayoutInfo(),a=new Rt(220,2*r.lineHeight),l=e.top,d=function(){const C=s.width-(e.left+e.width+r.borderWidth+r.horizontalPadding),w=-r.borderWidth+e.left+e.width,S=new Rt(C,s.height-e.top-r.borderHeight-r.verticalPadding),x=S.with(void 0,e.top+e.height-r.borderHeight-r.verticalPadding);return{top:l,left:w,fit:C-t.width,maxSizeTop:S,maxSizeBottom:x,minSize:a.with(Math.min(C,a.width))}}(),c=function(){const C=e.left-r.borderWidth-r.horizontalPadding,w=Math.max(r.horizontalPadding,e.left-t.width-r.borderWidth),S=new Rt(C,s.height-e.top-r.borderHeight-r.verticalPadding),x=S.with(void 0,e.top+e.height-r.borderHeight-r.verticalPadding);return{top:l,left:w,fit:C-t.width,maxSizeTop:S,maxSizeBottom:x,minSize:a.with(Math.min(C,a.width))}}(),u=function(){const C=e.left,w=-r.borderWidth+e.top+e.height,S=new Rt(e.width-r.borderHeight,s.height-e.top-e.height-r.verticalPadding);return{top:w,left:C,fit:S.height-t.height,maxSizeBottom:S,maxSizeTop:S,minSize:a.with(S.width)}}(),h=[d,c,u],g=(n=h.find(C=>C.fit>=0))!==null&&n!==void 0?n:h.sort((C,w)=>w.fit-C.fit)[0],f=e.top+e.height-r.borderHeight;let m,v=t.height;const _=Math.max(g.maxSizeTop.height,g.maxSizeBottom.height);v>_&&(v=_);let b;i?v<=g.maxSizeTop.height?(m=!0,b=g.maxSizeTop):(m=!1,b=g.maxSizeBottom):v<=g.maxSizeBottom.height?(m=!1,b=g.maxSizeBottom):(m=!0,b=g.maxSizeTop),this._applyTopLeft({left:g.left,top:m?g.top:f-v}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!m,g===d,m,g!==d),this._resizable.minSize=g.minSize,this._resizable.maxSize=b,this._resizable.layout(v,Math.min(b.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}var Ll;(function(o){o[o.FILE=0]="FILE",o[o.FOLDER=1]="FOLDER",o[o.ROOT_FOLDER=2]="ROOT_FOLDER"})(Ll||(Ll={}));const cwe=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function i1(o,e,t,i){const n=i===Ll.ROOT_FOLDER?["rootfolder-icon"]:i===Ll.FOLDER?["folder-icon"]:["file-icon"];if(t){let s;if(t.scheme===ot.data)s=pu.parseMetaData(t).get(pu.META_DATA_LABEL);else{const r=t.path.match(cwe);r?(s=n1(r[2].toLowerCase()),r[1]&&n.push(`${n1(r[1].toLowerCase())}-name-dir-icon`)):s=n1(t.authority.toLowerCase())}if(i===Ll.ROOT_FOLDER)n.push(`${s}-root-name-folder-icon`);else if(i===Ll.FOLDER)n.push(`${s}-name-folder-icon`);else{if(s){if(n.push(`${s}-name-file-icon`),n.push("name-file-icon"),s.length<=255){const a=s.split(".");for(let l=1;l=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ck=function(o,e){return function(t,i){e(t,i,o)}},oc;function MH(o){return`suggest-aria-id:${o}`}const gwe=Zi("suggest-more-info",ve.chevronRight,p("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),fwe=new(oc=class{extract(e,t){if(e.textLabel.match(oc._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(oc._regexStrict))return t[0]=e.completion.detail,!0;if(typeof e.completion.documentation=="string"){const i=oc._regexRelaxed.exec(e.completion.documentation);if(i&&(i.index===0||i.index+i[0].length===e.completion.documentation.length))return t[0]=i[0],!0}return!1}},oc._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,oc._regexStrict=new RegExp(`^${oc._regexRelaxed.source}$`,"i"),oc);let l2=class{constructor(e,t,i,n){this._editor=e,this._modelService=t,this._languageService=i,this._themeService=n,this._onDidToggleDetails=new W,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=new de,i=e;i.classList.add("show-file-icons");const n=le(e,pe(".icon")),s=le(n,pe("span.colorspan")),r=le(e,pe(".contents")),a=le(r,pe(".main")),l=le(a,pe(".icon-label.codicon")),d=le(a,pe("span.left")),c=le(a,pe("span.right")),u=new _S(d,{supportHighlights:!0,supportIcons:!0});t.add(u);const h=le(d,pe("span.signature-label")),g=le(d,pe("span.qualifier-label")),f=le(c,pe("span.details-label")),m=le(c,pe("span.readMore"+Ue.asCSSSelector(gwe)));m.title=p("readMore","Read More");const v=()=>{const _=this._editor.getOptions(),b=_.get(50),C=b.getMassagedFontFamily(),w=b.fontFeatureSettings,S=_.get(118)||b.fontSize,x=_.get(119)||b.lineHeight,y=b.fontWeight,I=b.letterSpacing,E=`${S}px`,R=`${x}px`,j=`${I}px`;i.style.fontSize=E,i.style.fontWeight=y,i.style.letterSpacing=j,a.style.fontFamily=C,a.style.fontFeatureSettings=w,a.style.lineHeight=R,n.style.height=R,n.style.width=R,m.style.height=R,m.style.width=R};return v(),t.add(this._editor.onDidChangeConfiguration(_=>{(_.hasChanged(50)||_.hasChanged(118)||_.hasChanged(119))&&v()})),{root:i,left:d,right:c,icon:n,colorspan:s,iconLabel:u,iconContainer:l,parametersLabel:h,qualifierLabel:g,detailsLabel:f,readMore:m,disposables:t}}renderElement(e,t,i){const{completion:n}=e;i.root.id=MH(t),i.colorspan.style.backgroundColor="";const s={labelEscapeNewLines:!0,matches:p0(e.score)},r=[];if(n.kind===19&&fwe.extract(e,r))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=r[0];else if(n.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const a=i1(this._modelService,this._languageService,ze.from({scheme:"fake",path:e.textLabel}),Ll.FILE),l=i1(this._modelService,this._languageService,ze.from({scheme:"fake",path:n.detail}),Ll.FILE);s.extraClasses=a.length>l.length?a:l}else n.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",s.extraClasses=[i1(this._modelService,this._languageService,ze.from({scheme:"fake",path:e.textLabel}),Ll.FOLDER),i1(this._modelService,this._languageService,ze.from({scheme:"fake",path:n.detail}),Ll.FOLDER)].flat()):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...Ue.asClassNameArray(Cv.toIcon(n.kind))));n.tags&&n.tags.indexOf(1)>=0&&(s.extraClasses=(s.extraClasses||[]).concat(["deprecated"]),s.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,s),typeof n.label=="string"?(i.parametersLabel.textContent="",i.detailsLabel.textContent=wk(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=wk(n.label.detail||""),i.detailsLabel.textContent=wk(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(117).showInlineDetails?oo(i.detailsLabel):xs(i.detailsLabel),oP(e)?(i.right.classList.add("can-expand-details"),oo(i.readMore),i.readMore.onmousedown=a=>{a.stopPropagation(),a.preventDefault()},i.readMore.onclick=a=>{a.stopPropagation(),a.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),xs(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};l2=hwe([Ck(1,Si),Ck(2,bi),Ck(3,Sn)],l2);function wk(o){return o.replace(/\r\n|\r|\n/g,"")}var pwe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},s1=function(o,e){return function(t,i){e(t,i,o)}},Cf;M("editorSuggestWidget.background",{dark:Fi,light:Fi,hcDark:Fi,hcLight:Fi},p("editorSuggestWidgetBackground","Background color of the suggest widget."));M("editorSuggestWidget.border",{dark:Cl,light:Cl,hcDark:Cl,hcLight:Cl},p("editorSuggestWidgetBorder","Border color of the suggest widget."));const o1=M("editorSuggestWidget.foreground",{dark:Fr,light:Fr,hcDark:Fr,hcLight:Fr},p("editorSuggestWidgetForeground","Foreground color of the suggest widget."));M("editorSuggestWidget.selectedForeground",{dark:Eh,light:Eh,hcDark:Eh,hcLight:Eh},p("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));M("editorSuggestWidget.selectedIconForeground",{dark:Ef,light:Ef,hcDark:Ef,hcLight:Ef},p("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));const mwe=M("editorSuggestWidget.selectedBackground",{dark:Nh,light:Nh,hcDark:Nh,hcLight:Nh},p("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));M("editorSuggestWidget.highlightForeground",{dark:Br,light:Br,hcDark:Br,hcLight:Br},p("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));M("editorSuggestWidget.focusHighlightForeground",{dark:tC,light:tC,hcDark:tC,hcLight:tC},p("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));M("editorSuggestWidgetStatus.foreground",{dark:We(o1,.5),light:We(o1,.5),hcDark:We(o1,.5),hcLight:We(o1,.5)},p("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));class _we{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Su}`}restore(){var e;const t=(e=this._service.get(this._key,0))!==null&&e!==void 0?e:"";try{const i=JSON.parse(t);if(Rt.is(i))return Rt.lift(i)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let Ab=Cf=class{constructor(e,t,i,n,s){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new An,this._pendingShowDetails=new An,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new qr,this._disposables=new de,this._onDidSelect=new Yh,this._onDidFocus=new Yh,this._onDidHide=new W,this._onDidShow=new W,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new W,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new FR,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new vwe(this,e),this._persistedSize=new _we(t,e);class r{constructor(g,f,m=!1,v=!1){this.persistedSize=g,this.currentSize=f,this.persistHeight=m,this.persistWidth=v}}let a;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),a=new r(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(h=>{var g,f,m,v;if(this._resize(h.dimension.width,h.dimension.height),a&&(a.persistHeight=a.persistHeight||!!h.north||!!h.south,a.persistWidth=a.persistWidth||!!h.east||!!h.west),!!h.done){if(a){const{itemHeight:_,defaultSize:b}=this.getLayoutInfo(),C=Math.round(_/2);let{width:w,height:S}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-S)<=C)&&(S=(f=(g=a.persistedSize)===null||g===void 0?void 0:g.height)!==null&&f!==void 0?f:b.height),(!a.persistWidth||Math.abs(a.currentSize.width-w)<=C)&&(w=(v=(m=a.persistedSize)===null||m===void 0?void 0:m.width)!==null&&v!==void 0?v:b.width),this._persistedSize.store(new Rt(w,S))}this._contentWidget.unlockPreference(),a=void 0}})),this._messageElement=le(this.element.domNode,pe(".message")),this._listElement=le(this.element.domNode,pe(".tree"));const l=this._disposables.add(s.createInstance(a2,this.editor));l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new dwe(l,this.editor);const d=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(117).showIcons);d();const c=s.createInstance(l2,this.editor);this._disposables.add(c),this._disposables.add(c.onDidToggleDetails(()=>this.toggleDetails())),this._list=new Yr("SuggestWidget",this._listElement,{getHeight:h=>this.getLayoutInfo().itemHeight,getTemplateId:h=>"suggestion"},[c],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>p("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:h=>{let g=h.textLabel;if(typeof h.completion.label!="string"){const{detail:_,description:b}=h.completion.label;_&&b?g=p("label.full","{0} {1}, {2}",g,_,b):_?g=p("label.detail","{0} {1}",g,_):b&&(g=p("label.desc","{0}, {1}",g,b))}if(!h.isResolved||!this._isDetailsVisible())return g;const{documentation:f,detail:m}=h.completion,v=Xh("{0}{1}",m||"",f?typeof f=="string"?f:f.value:"");return p("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",g,v)}}}),this._list.style(Sm({listInactiveFocusBackground:mwe,listInactiveFocusOutline:fi})),this._status=s.createInstance(r2,this.element.domNode,Jc);const u=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(117).showStatusBar);u(),this._disposables.add(n.onDidColorThemeChange(h=>this._onThemeChange(h))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onTap(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onDidChangeSelection(h=>this._onListSelection(h))),this._disposables.add(this._list.onDidChangeFocus(h=>this._onListFocus(h))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(h=>{h.hasChanged(117)&&(u(),d())})),this._ctxSuggestWidgetVisible=dt.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=dt.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=dt.MultipleSuggestions.bindTo(i),this._ctxSuggestWidgetHasFocusedSuggestion=dt.HasFocusedSuggestion.bindTo(i),this._disposables.add(Wi(this._details.widget.domNode,"keydown",h=>{this._onDetailsKeydown.fire(h)})),this._disposables.add(this.editor.onMouseDown(h=>this._onEditorMouseDown(h)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element>"u"||typeof e.index>"u"||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=xa(e.type)?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const i=e.elements[0],n=e.indexes[0];i!==this._focusedItem&&((t=this._currentSuggestionDetails)===null||t===void 0||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(n),this._currentSuggestionDetails=_n(async s=>{const r=lu(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),a=s.onCancellationRequested(()=>r.dispose());try{return await i.resolve(s)}finally{r.dispose(),a.dispose()}}),this._currentSuggestionDetails.then(()=>{n>=this._list.length||i!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[i]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:MH(n)}))}).catch(nt)),this._onDidFocus.fire({item:i,index:n,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",e===4),this.element.domNode.classList.remove("message"),e){case 0:xs(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=Cf.LOADING_MESSAGE,xs(this._listElement,this._status.element),oo(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,hu(Cf.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=Cf.NO_SUGGESTIONS_MESSAGE,xs(this._listElement,this._status.element),oo(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,hu(Cf.NO_SUGGESTIONS_MESSAGE);break;case 3:xs(this._messageElement),oo(this._listElement,this._status.element),this._show();break;case 4:xs(this._messageElement),oo(this._listElement,this._status.element),this._show();break;case 5:xs(this._messageElement),oo(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,t){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=lu(()=>this._setState(1),t)))}showSuggestions(e,t,i,n,s){var r,a;if(this._contentWidget.setPosition(this.editor.getPosition()),(r=this._loadingTimeout)===null||r===void 0||r.dispose(),(a=this._currentSuggestionDetails)===null||a===void 0||a.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&this._state!==2&&this._state!==0){this._setState(4);return}const l=this._completionModel.items.length,d=l===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(l>1),d){this._setState(n?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0),this._list.setFocus(s?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=gw(Je(this.element.domNode),()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(oP(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=gw(Je(this.element.domNode),()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")})}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;this._pendingLayout.clear(),this._pendingShowDetails.clear(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),i=Math.ceil(this.getLayoutInfo().itemHeight*4.3);t&&t.heightd&&(l=d);const c=this._completionModel?this._completionModel.stats.pLabelLen*r.typicalHalfwidthCharacterWidth:l,u=r.statusBarHeight+this._list.contentHeight+r.borderHeight,h=r.itemHeight+r.statusBarHeight,g=gn(this.editor.getDomNode()),f=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),m=g.top+f.top+f.height,v=Math.min(s.height-m-r.verticalPadding,u),_=g.top+f.top-r.verticalPadding,b=Math.min(_,u);let C=Math.min(Math.max(b,v)+r.borderHeight,u);a===((t=this._cappedHeight)===null||t===void 0?void 0:t.capped)&&(a=this._cappedHeight.wanted),aC&&(a=C),a>v||this._forceRenderingAbove&&_>150?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),C=b):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),C=v),this.element.preferredSize=new Rt(c,r.defaultSize.height),this.element.maxSize=new Rt(d,C),this.element.minSize=new Rt(220,h),this._cappedHeight=a===u?{wanted:(n=(i=this._cappedHeight)===null||i===void 0?void 0:i.wanted)!==null&&n!==void 0?n:e.height,capped:a}:void 0}this._resize(l,a)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:s}=this.getLayoutInfo();this._list.layout(t-s,e),this._listElement.style.height=`${t-s}px`,this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((e=this._contentWidget.getPosition())===null||e===void 0?void 0:e.preference[0])===2)}getLayoutInfo(){const e=this.editor.getOption(50),t=io(this.editor.getOption(119)||e.lineHeight,8,1e3),i=!this.editor.getOption(117).showStatusBar||this._state===2||this._state===1?0:t,n=this._details.widget.borderWidth,s=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:s,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new Rt(430,i+12*t+s)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};Ab.LOADING_MESSAGE=p("suggestWidget.loading","Loading...");Ab.NO_SUGGESTIONS_MESSAGE=p("suggestWidget.noSuggestions","No suggestions.");Ab=Cf=pwe([s1(1,Xr),s1(2,Xe),s1(3,Sn),s1(4,qe)],Ab);class vwe{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new Rt(t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var bwe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},cf=function(o,e){return function(t,i){e(t,i,o)}},d2;class Cwe{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){const n=e.getOffsetAt(t),s=e.getPositionAt(n+1);this._marker=e.deltaDecorations([],[{range:k.fromPositions(t,s),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let Vr=d2=class{static get(e){return e.getContribution(d2.ID)}constructor(e,t,i,n,s,r,a){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=s,this._logService=r,this._telemetryService=a,this._lineSuffix=new An,this._toDispose=new de,this._selectors=new wwe(u=>u.priority),this._onWillInsertSuggestItem=new W,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=s.createInstance(o2,this.editor),this._selectors.register({priority:0,select:(u,h,g)=>this._memoryService.select(u,h,g)});const l=dt.InsertMode.bindTo(n);l.set(e.getOption(117).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>l.set(e.getOption(117).insertMode))),this.widget=this._toDispose.add(new HD(Je(e.getDomNode()),()=>{const u=this._instantiationService.createInstance(Ab,this.editor);this._toDispose.add(u),this._toDispose.add(u.onDidSelect(v=>this._insertSuggestion(v,0),this));const h=new iwe(this.editor,u,this.model,v=>this._insertSuggestion(v,2));this._toDispose.add(h);const g=dt.MakesTextEdit.bindTo(this._contextKeyService),f=dt.HasInsertAndReplaceRange.bindTo(this._contextKeyService),m=dt.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(je(()=>{g.reset(),f.reset(),m.reset()})),this._toDispose.add(u.onDidFocus(({item:v})=>{const _=this.editor.getPosition(),b=v.editStart.column,C=_.column;let w=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!v.completion.additionalTextEdits&&!(v.completion.insertTextRules&4)&&C-b===v.completion.insertText.length&&(w=this.editor.getModel().getValueInRange({startLineNumber:_.lineNumber,startColumn:b,endLineNumber:_.lineNumber,endColumn:C})!==v.completion.insertText),g.set(w),f.set(!z.equals(v.editInsertEnd,v.editReplaceEnd)),m.set(!!v.provider.resolveCompletionItem||!!v.completion.documentation||v.completion.detail!==v.completion.label)})),this._toDispose.add(u.onDetailsKeyDown(v=>{if(v.toKeyCodeChord().equals(new zd(!0,!1,!1,!1,33))||It&&v.toKeyCodeChord().equals(new zd(!1,!1,!1,!0,33))){v.stopPropagation();return}v.toKeyCodeChord().isModifierKey()||this.editor.focus()})),u})),this._overtypingCapturer=this._toDispose.add(new HD(Je(e.getDomNode()),()=>this._toDispose.add(new JL(this.editor,this.model)))),this._alternatives=this._toDispose.add(new HD(Je(e.getDomNode()),()=>this._toDispose.add(new yg(this.editor,this._contextKeyService)))),this._toDispose.add(s.createInstance(Mb,e)),this._toDispose.add(this.model.onDidTrigger(u=>{this.widget.value.showTriggered(u.auto,u.shy?250:50),this._lineSuffix.value=new Cwe(this.editor.getModel(),u.position)})),this._toDispose.add(this.model.onDidSuggest(u=>{if(u.triggerOptions.shy)return;let h=-1;for(const f of this._selectors.itemsOrderedByPriorityDesc)if(h=f.select(this.editor.getModel(),this.editor.getPosition(),u.completionModel.items),h!==-1)break;h===-1&&(h=0);let g=!1;if(u.triggerOptions.auto){const f=this.editor.getOption(117);f.selectionMode==="never"||f.selectionMode==="always"?g=f.selectionMode==="never":f.selectionMode==="whenTriggerCharacter"?g=u.triggerOptions.triggerKind!==1:f.selectionMode==="whenQuickSuggestion"&&(g=u.triggerOptions.triggerKind===1&&!u.triggerOptions.refilter)}this.widget.value.showSuggestions(u.completionModel,h,u.isFrozen,u.triggerOptions.auto,g)})),this._toDispose.add(this.model.onDidCancel(u=>{u.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{this.model.cancel(),this.model.clear()}));const d=dt.AcceptSuggestionsOnEnter.bindTo(n),c=()=>{const u=this.editor.getOption(1);d.set(u==="on"||u==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>c())),c()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,t){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const i=Un.get(this.editor);if(!i)return;this._onWillInsertSuggestItem.fire({item:e.item});const n=this.editor.getModel(),s=n.getAlternativeVersionId(),{item:r}=e,a=[],l=new tn;t&1||this.editor.pushUndoStop();const d=this.getOverwriteInfo(r,!!(t&8));this._memoryService.memorize(n,this.editor.getPosition(),r);const c=r.isResolved;let u=-1,h=-1;if(Array.isArray(r.completion.additionalTextEdits)){this.model.cancel();const f=Ra.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",r.completion.additionalTextEdits.map(m=>Li.replaceMove(k.lift(m.range),m.text))),f.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!c){const f=new ds;let m;const v=n.onDidChangeContent(w=>{if(w.isFlush){l.cancel(),v.dispose();return}for(const S of w.changes){const x=k.getEndPosition(S.range);(!m||z.isBefore(x,m))&&(m=x)}}),_=t;t|=2;let b=!1;const C=this.editor.onWillType(()=>{C.dispose(),b=!0,_&2||this.editor.pushUndoStop()});a.push(r.resolve(l.token).then(()=>{if(!r.completion.additionalTextEdits||l.token.isCancellationRequested)return;if(m&&r.completion.additionalTextEdits.some(S=>z.isBefore(m,k.getStartPosition(S.range))))return!1;b&&this.editor.pushUndoStop();const w=Ra.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",r.completion.additionalTextEdits.map(S=>Li.replaceMove(k.lift(S.range),S.text))),w.restoreRelativeVerticalPositionOfCursor(this.editor),(b||!(_&2))&&this.editor.pushUndoStop(),!0}).then(w=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",f.elapsed(),w),h=w===!0?1:w===!1?0:-2}).finally(()=>{v.dispose(),C.dispose()}))}let{insertText:g}=r.completion;if(r.completion.insertTextRules&4||(g=om.escape(g)),this.model.cancel(),i.insert(g,{overwriteBefore:d.overwriteBefore,overwriteAfter:d.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(r.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),t&2||this.editor.pushUndoStop(),r.completion.command)if(r.completion.command.id===F0.id)this.model.trigger({auto:!0,retrigger:!0});else{const f=new ds;a.push(this._commandService.executeCommand(r.completion.command.id,...r.completion.command.arguments?[...r.completion.command.arguments]:[]).catch(m=>{r.completion.extensionId?en(m):nt(m)}).finally(()=>{u=f.elapsed()}))}t&4&&this._alternatives.value.set(e,f=>{for(l.cancel();n.canUndo();){s!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(f,3|(t&8?8:0));break}}),this._alertCompletionItem(r),Promise.all(a).finally(()=>{this._reportSuggestionAcceptedTelemetry(r,n,c,u,h),this.model.clear(),l.dispose()})}_reportSuggestionAcceptedTelemetry(e,t,i,n,s){var r,a,l;Math.floor(Math.random()*100)!==0&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:(a=(r=e.extensionId)===null||r===void 0?void 0:r.value)!==null&&a!==void 0?a:"unknown",providerId:(l=e.provider._debugDisplayName)!==null&&l!==void 0?l:"unknown",kind:e.completion.kind,basenameHash:LM(br(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:Aoe(t.uri),resolveInfo:e.provider.resolveCompletionItem?i?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:n,additionalEditsAsync:s})}getOverwriteInfo(e,t){qt(this.editor.hasModel());let i=this.editor.getOption(117).insertMode==="replace";t&&(i=!i);const n=e.position.column-e.editStart.column,s=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,r=this.editor.getPosition().column-e.position.column,a=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:n+r,overwriteAfter:s+a}}_alertCompletionItem(e){if(ls(e.completion.additionalTextEdits)){const t=p("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);mo(t)}}triggerSuggest(e,t,i){this.editor.hasModel()&&(this.model.trigger({auto:t??!1,completionOptions:{providerFilter:e,kindFilter:i?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=s=>{if(s.completion.insertTextRules&4||s.completion.additionalTextEdits)return!0;const r=this.editor.getPosition(),a=s.editStart.column,l=r.column;return l-a!==s.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:r.lineNumber,startColumn:a,endLineNumber:r.lineNumber,endColumn:l})!==s.completion.insertText};ye.once(this.model.onDidTrigger)(s=>{const r=[];ye.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{jt(r),i()},void 0,r),this.model.onDidSuggest(({completionModel:a})=>{if(jt(r),a.items.length===0){i();return}const l=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),a.items),d=a.items[l];if(!n(d)){i();return}this.editor.pushUndoStop(),this._insertSuggestion({index:l,item:d,model:a},7)},void 0,r)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};Vr.ID="editor.contrib.suggestController";Vr=d2=bwe([cf(1,QL),cf(2,Ri),cf(3,Xe),cf(4,qe),cf(5,bo),cf(6,vo)],Vr);class wwe{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((t,i)=>this.prioritySelector(i)-this.prioritySelector(t)),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class F0 extends Te{constructor(){super({id:F0.id,label:p("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:ae.and(T.writable,T.hasCompletionItemProvider,dt.Visible.toNegated()),kbOpts:{kbExpr:T.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,i){const n=Vr.get(t);if(!n)return;let s;i&&typeof i=="object"&&i.auto===!0&&(s=!0),n.triggerSuggest(void 0,s,void 0)}}F0.id="editor.action.triggerSuggest";At(Vr.ID,Vr,2);_e(F0);const Yo=190,Ws=Rn.bindToContribution(Vr.get);we(new Ws({id:"acceptSelectedSuggestion",precondition:ae.and(dt.Visible,dt.HasFocusedSuggestion),handler(o){o.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:ae.and(dt.Visible,T.textInputFocus),weight:Yo},{primary:3,kbExpr:ae.and(dt.Visible,T.textInputFocus,dt.AcceptSuggestionsOnEnter,dt.MakesTextEdit),weight:Yo}],menuOpts:[{menuId:Jc,title:p("accept.insert","Insert"),group:"left",order:1,when:dt.HasInsertAndReplaceRange.toNegated()},{menuId:Jc,title:p("accept.insert","Insert"),group:"left",order:1,when:ae.and(dt.HasInsertAndReplaceRange,dt.InsertMode.isEqualTo("insert"))},{menuId:Jc,title:p("accept.replace","Replace"),group:"left",order:1,when:ae.and(dt.HasInsertAndReplaceRange,dt.InsertMode.isEqualTo("replace"))}]}));we(new Ws({id:"acceptAlternativeSelectedSuggestion",precondition:ae.and(dt.Visible,T.textInputFocus,dt.HasFocusedSuggestion),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:1027,secondary:[1026]},handler(o){o.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:Jc,group:"left",order:2,when:ae.and(dt.HasInsertAndReplaceRange,dt.InsertMode.isEqualTo("insert")),title:p("accept.replace","Replace")},{menuId:Jc,group:"left",order:2,when:ae.and(dt.HasInsertAndReplaceRange,dt.InsertMode.isEqualTo("replace")),title:p("accept.insert","Insert")}]}));Et.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");we(new Ws({id:"hideSuggestWidget",precondition:dt.Visible,handler:o=>o.cancelSuggestWidget(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:9,secondary:[1033]}}));we(new Ws({id:"selectNextSuggestion",precondition:ae.and(dt.Visible,ae.or(dt.MultipleSuggestions,dt.HasFocusedSuggestion.negate())),handler:o=>o.selectNextSuggestion(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));we(new Ws({id:"selectNextPageSuggestion",precondition:ae.and(dt.Visible,ae.or(dt.MultipleSuggestions,dt.HasFocusedSuggestion.negate())),handler:o=>o.selectNextPageSuggestion(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:12,secondary:[2060]}}));we(new Ws({id:"selectLastSuggestion",precondition:ae.and(dt.Visible,ae.or(dt.MultipleSuggestions,dt.HasFocusedSuggestion.negate())),handler:o=>o.selectLastSuggestion()}));we(new Ws({id:"selectPrevSuggestion",precondition:ae.and(dt.Visible,ae.or(dt.MultipleSuggestions,dt.HasFocusedSuggestion.negate())),handler:o=>o.selectPrevSuggestion(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));we(new Ws({id:"selectPrevPageSuggestion",precondition:ae.and(dt.Visible,ae.or(dt.MultipleSuggestions,dt.HasFocusedSuggestion.negate())),handler:o=>o.selectPrevPageSuggestion(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:11,secondary:[2059]}}));we(new Ws({id:"selectFirstSuggestion",precondition:ae.and(dt.Visible,ae.or(dt.MultipleSuggestions,dt.HasFocusedSuggestion.negate())),handler:o=>o.selectFirstSuggestion()}));we(new Ws({id:"focusSuggestion",precondition:ae.and(dt.Visible,dt.HasFocusedSuggestion.negate()),handler:o=>o.focusSuggestion(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}}));we(new Ws({id:"focusAndAcceptSuggestion",precondition:ae.and(dt.Visible,dt.HasFocusedSuggestion.negate()),handler:o=>{o.focusSuggestion(),o.acceptSelectedSuggestion(!0,!1)}}));we(new Ws({id:"toggleSuggestionDetails",precondition:ae.and(dt.Visible,dt.HasFocusedSuggestion),handler:o=>o.toggleSuggestionDetails(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:Jc,group:"right",order:1,when:ae.and(dt.DetailsVisible,dt.CanResolve),title:p("detail.more","show less")},{menuId:Jc,group:"right",order:1,when:ae.and(dt.DetailsVisible.toNegated(),dt.CanResolve),title:p("detail.less","show more")}]}));we(new Ws({id:"toggleExplainMode",precondition:dt.Visible,handler:o=>o.toggleExplainMode(),kbOpts:{weight:100,primary:2138}}));we(new Ws({id:"toggleSuggestionFocus",precondition:dt.Visible,handler:o=>o.toggleSuggestionFocus(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:2570,mac:{primary:778}}}));we(new Ws({id:"insertBestCompletion",precondition:ae.and(T.textInputFocus,ae.equals("config.editor.tabCompletion","on"),Mb.AtEnd,dt.Visible.toNegated(),yg.OtherSuggestions.toNegated(),Un.InSnippetMode.toNegated()),handler:(o,e)=>{o.triggerSuggestAndAcceptBest(Es(e)?{fallback:"tab",...e}:{fallback:"tab"})},kbOpts:{weight:Yo,primary:2}}));we(new Ws({id:"insertNextSuggestion",precondition:ae.and(T.textInputFocus,ae.equals("config.editor.tabCompletion","on"),yg.OtherSuggestions,dt.Visible.toNegated(),Un.InSnippetMode.toNegated()),handler:o=>o.acceptNextSuggestion(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:2}}));we(new Ws({id:"insertPrevSuggestion",precondition:ae.and(T.textInputFocus,ae.equals("config.editor.tabCompletion","on"),yg.OtherSuggestions,dt.Visible.toNegated(),Un.InSnippetMode.toNegated()),handler:o=>o.acceptPrevSuggestion(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:1026}}));_e(class extends Te{constructor(){super({id:"editor.action.resetSuggestSize",label:p("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(o,e){var t;(t=Vr.get(e))===null||t===void 0||t.resetWidgetSize()}});class Swe extends q{get selectedItem(){return this._selectedItem}constructor(e,t,i,n){super(),this.editor=e,this.suggestControllerPreselector=t,this.checkModelVersion=i,this.onWillAccept=n,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=Pt(this,void 0),this._register(e.onKeyDown(r=>{r.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(r=>{r.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const s=Vr.get(this.editor);if(s){this._register(s.registerSelector({priority:100,select:(l,d,c)=>{var u;wi(_=>this.checkModelVersion(_));const h=this.editor.getModel();if(!h)return-1;const g=(u=this.suggestControllerPreselector())===null||u===void 0?void 0:u.removeCommonPrefix(h);if(!g)return-1;const f=z.lift(d),m=c.map((_,b)=>{const w=dv.fromSuggestion(s,h,f,_,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(h),S=g.augments(w);return{index:b,valid:S,prefixLength:w.text.length,suggestItem:_}}).filter(_=>_&&_.valid&&_.prefixLength>0),v=RM(m,ur(_=>_.prefixLength,Md));return v?v.index:-1}}));let r=!1;const a=()=>{r||(r=!0,this._register(s.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(s.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(s.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(ye.once(s.model.onDidTrigger)(l=>{a()})),this._register(s.onWillInsertSuggestItem(l=>{const d=this.editor.getPosition(),c=this.editor.getModel();if(!d||!c)return;const u=dv.fromSuggestion(s,c,d,l.item,this.isShiftKeyPressed);this.onWillAccept(u)}))}this.update(this._isActive)}update(e){const t=this.getSuggestItemInfo();(this._isActive!==e||!ywe(this._currentSuggestItemInfo,t))&&(this._isActive=e,this._currentSuggestItemInfo=t,wi(i=>{this.checkModelVersion(i),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,i)}))}getSuggestItemInfo(){const e=Vr.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem(),i=this.editor.getPosition(),n=this.editor.getModel();if(!(!t||!i||!n))return dv.fromSuggestion(e,n,i,t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const e=Vr.get(this.editor);e==null||e.stopForceRenderingAbove()}forceRenderingAbove(){const e=Vr.get(this.editor);e==null||e.forceRenderingAbove()}}class dv{static fromSuggestion(e,t,i,n,s){let{insertText:r}=n.completion,a=!1;if(n.completion.insertTextRules&4){const d=new om().parse(r);d.children.length<100&&ZS.adjustWhitespace(t,i,!0,d),r=d.toString(),a=!0}const l=e.getOverwriteInfo(n,s);return new dv(k.fromPositions(i.delta(0,-l.overwriteBefore),i.delta(0,Math.max(l.overwriteAfter,0))),r,n.completion.kind,a)}constructor(e,t,i,n){this.range=e,this.insertText=t,this.completionItemKind=i,this.isSnippetText=n}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new c7(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new rm(this.range,this.insertText)}}function ywe(o,e){return o===e?!0:!o||!e?!1:o.equals(e)}var Lwe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rc=function(o,e){return function(t,i){e(t,i,o)}},c2;let Xo=c2=class extends q{static get(e){return e.getContribution(c2.ID)}constructor(e,t,i,n,s,r,a,l,d){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=i,this._configurationService=n,this._commandService=s,this._debounceService=r,this._languageFeaturesService=a,this._audioCueService=l,this._keybindingService=d,this.model=wS("inlineCompletionModel",void 0),this._textModelVersionId=Pt(this,-1),this._cursorPosition=Pt(this,new z(1,1)),this._suggestWidgetAdaptor=this._register(new Swe(this.editor,()=>{var h,g;return(g=(h=this.model.get())===null||h===void 0?void 0:h.selectedInlineCompletion.get())===null||g===void 0?void 0:g.toSingleTextEdit(void 0)},h=>this.updateObservables(h,No.Other),h=>{wi(g=>{var f;this.updateObservables(g,No.Other),(f=this.model.get())===null||f===void 0||f.handleSuggestAccepted(h)})})),this._enabled=Oi(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).enabled),this._ghostTextWidget=this._register(this._instantiationService.createInstance(e2,this.editor,{ghostText:this.model.map((h,g)=>h==null?void 0:h.ghostText.read(g)),minReservedLineCount:SS(0),targetTextModel:this.model.map(h=>h==null?void 0:h.textModel)})),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._playAudioCueSignal=hR(this),this._isReadonly=Oi(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(90)),this._textModel=Oi(this.editor.onDidChangeModel,()=>this.editor.getModel()),this._textModelIfWritable=rt(h=>this._isReadonly.read(h)?void 0:this._textModel.read(h)),this._register(new Tn(this._contextKeyService,this.model)),this._register(zt(h=>{const g=this._textModelIfWritable.read(h);wi(f=>{if(this.model.set(void 0,f),this.updateObservables(f,No.Other),g){const m=t.createInstance(i2,g,this._suggestWidgetAdaptor.selectedItem,this._cursorPosition,this._textModelVersionId,this._debounceValue,Oi(e.onDidChangeConfiguration,()=>e.getOption(117).preview),Oi(e.onDidChangeConfiguration,()=>e.getOption(117).previewMode),Oi(e.onDidChangeConfiguration,()=>e.getOption(62).mode),this._enabled);this.model.set(m,f)}})}));const c=h=>{var g;return h.isUndoing?No.Undo:h.isRedoing?No.Redo:!((g=this.model.get())===null||g===void 0)&&g.isAcceptingPartially?No.AcceptWord:No.Other};this._register(e.onDidChangeModelContent(h=>wi(g=>this.updateObservables(g,c(h))))),this._register(e.onDidChangeCursorPosition(h=>wi(g=>{var f;this.updateObservables(g,No.Other),(h.reason===3||h.source==="api")&&((f=this.model.get())===null||f===void 0||f.stop(g))}))),this._register(e.onDidType(()=>wi(h=>{var g;this.updateObservables(h,No.Other),this._enabled.get()&&((g=this.model.get())===null||g===void 0||g.trigger(h))}))),this._register(this._commandService.onDidExecuteCommand(h=>{new Set([ap.Tab.id,ap.DeleteLeft.id,ap.DeleteRight.id,KV,"acceptSelectedSuggestion"]).has(h.commandId)&&e.hasTextFocus()&&this._enabled.get()&&wi(f=>{var m;(m=this.model.get())===null||m===void 0||m.trigger(f)})})),this._register(this.editor.onDidBlurEditorWidget(()=>{this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(62).keepOnBlur||xu.dropDownVisible||wi(h=>{var g;(g=this.model.get())===null||g===void 0||g.stop(h)})})),this._register(zt(h=>{var g;const f=(g=this.model.read(h))===null||g===void 0?void 0:g.state.read(h);f!=null&&f.suggestItem?f.ghostText.lineCount>=2&&this._suggestWidgetAdaptor.forceRenderingAbove():this._suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register(je(()=>{this._suggestWidgetAdaptor.stopForceRenderingAbove()}));let u;this._register(D0({handleChange:(h,g)=>(h.didChange(this._playAudioCueSignal)&&(u=void 0),!0)},async h=>{this._playAudioCueSignal.read(h);const g=this.model.read(h),f=g==null?void 0:g.state.read(h);if(!g||!f||!f.inlineCompletion){u=void 0;return}if(f.inlineCompletion.semanticId!==u){u=f.inlineCompletion.semanticId;const m=g.textModel.getLineContent(f.ghostText.lineNumber);this._audioCueService.playAudioCue(gt.inlineSuggestion).then(()=>{this.editor.getOption(8)&&this.provideScreenReaderUpdate(f.ghostText.renderForScreenReader(m))})}})),this._register(new TT(this.editor,this.model,this._instantiationService)),this._register(this._configurationService.onDidChangeConfiguration(h=>{h.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})})),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}playAudioCue(e){this._playAudioCueSignal.trigger(e)}provideScreenReaderUpdate(e){const t=this._contextKeyService.getContextKeyValue("accessibleViewIsShown"),i=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let n;!t&&i&&this.editor.getOption(147)&&(n=p("showAccessibleViewHint","Inspect this in the accessible view ({0})",i.getAriaLabel())),mo(n?e+", "+n:e)}updateObservables(e,t){var i,n;const s=this.editor.getModel();this._textModelVersionId.set((i=s==null?void 0:s.getVersionId())!==null&&i!==void 0?i:-1,e,t),this._cursorPosition.set((n=this.editor.getPosition())!==null&&n!==void 0?n:new z(1,1),e)}shouldShowHoverAt(e){var t;const i=(t=this.model.get())===null||t===void 0?void 0:t.ghostText.get();return i?i.parts.some(n=>e.containsPosition(new z(i.lineNumber,n.column))):!1}shouldShowHoverAtViewZone(e){return this._ghostTextWidget.ownsViewZone(e)}};Xo.ID="editor.contrib.inlineCompletionsController";Xo=c2=Lwe([rc(1,qe),rc(2,Xe),rc(3,Dt),rc(4,Ri),rc(5,wr),rc(6,Me),rc(7,y0),rc(8,Xt)],Xo);class eD extends Te{constructor(){super({id:eD.ID,label:p("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:ae.and(T.writable,Tn.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}async run(e,t){var i;const n=Xo.get(t);(i=n==null?void 0:n.model.get())===null||i===void 0||i.next()}}eD.ID=GV;class tD extends Te{constructor(){super({id:tD.ID,label:p("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:ae.and(T.writable,Tn.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}async run(e,t){var i;const n=Xo.get(t);(i=n==null?void 0:n.model.get())===null||i===void 0||i.previous()}}tD.ID=qV;class Dwe extends Te{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:p("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:T.writable})}async run(e,t){const i=Xo.get(t);await Rge(async n=>{var s;await((s=i==null?void 0:i.model.get())===null||s===void 0?void 0:s.triggerExplicitly(n)),i==null||i.playAudioCue(n)})}}class xwe extends Te{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:p("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:ae.and(T.writable,Tn.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:ae.and(T.writable,Tn.inlineSuggestionVisible)},menuOpts:[{menuId:N.InlineSuggestionToolbar,title:p("acceptWord","Accept Word"),group:"primary",order:2}]})}async run(e,t){var i;const n=Xo.get(t);await((i=n==null?void 0:n.model.get())===null||i===void 0?void 0:i.acceptNextWord(n.editor))}}class kwe extends Te{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:p("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:ae.and(T.writable,Tn.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:N.InlineSuggestionToolbar,title:p("acceptLine","Accept Line"),group:"secondary",order:2}]})}async run(e,t){var i;const n=Xo.get(t);await((i=n==null?void 0:n.model.get())===null||i===void 0?void 0:i.acceptNextLine(n.editor))}}class Iwe extends Te{constructor(){super({id:KV,label:p("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:Tn.inlineSuggestionVisible,menuOpts:[{menuId:N.InlineSuggestionToolbar,title:p("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:ae.and(Tn.inlineSuggestionVisible,T.tabMovesFocus.toNegated(),Tn.inlineSuggestionHasIndentationLessThanTabSize,dt.Visible.toNegated(),T.hoverFocused.toNegated())}})}async run(e,t){var i;const n=Xo.get(t);n&&((i=n.model.get())===null||i===void 0||i.accept(n.editor),n.editor.focus())}}class iD extends Te{constructor(){super({id:iD.ID,label:p("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:Tn.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}async run(e,t){const i=Xo.get(t);wi(n=>{var s;(s=i==null?void 0:i.model.get())===null||s===void 0||s.stop(n)})}}iD.ID="editor.action.inlineSuggest.hide";class nD extends Qo{constructor(){super({id:nD.ID,title:p("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:N.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:ae.equals("config.editor.inlineSuggest.showToolbar","always")})}async run(e,t){const i=e.get(Dt),s=i.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";i.updateValue("editor.inlineSuggest.showToolbar",s)}}nD.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar";var Ewe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},l_=function(o,e){return function(t,i){e(t,i,o)}};class Nwe{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let u2=class{constructor(e,t,i,n,s,r){this._editor=e,this._languageService=t,this._openerService=i,this.accessibilityService=n,this._instantiationService=s,this._telemetryService=r,this.hoverOrdinal=4}suggestHoverAnchor(e){const t=Xo.get(this._editor);if(!t)return null;const i=e.target;if(i.type===8){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new $1(1e3,this,k.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}return i.type===7&&t.shouldShowHoverAt(i.range)?new $1(1e3,this,i.range,e.event.posx,e.event.posy,!1):i.type===6&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range)?new $1(1e3,this,i.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if(this._editor.getOption(62).showToolbar!=="onHover")return[];const i=Xo.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new Nwe(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new de,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&this.renderScreenReaderText(e,n,i);const s=n.controller.model.get(),r=this._instantiationService.createInstance(xu,this._editor,!1,SS(null),s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.selectedInlineCompletion.map(a=>{var l;return(l=a==null?void 0:a.inlineCompletion.source.inlineCompletions.commands)!==null&&l!==void 0?l:[]}));return e.fragment.appendChild(r.getDomNode()),s.triggerExplicitly(),i.add(r),i}renderScreenReaderText(e,t,i){const n=pe,s=n("div.hover-row.markdown-hover"),r=le(s,n("div.hover-contents",{"aria-live":"assertive"})),a=i.add(new Ud({editor:this._editor},this._languageService,this._openerService)),l=d=>{i.add(a.onDidRenderAsync(()=>{r.className="hover-contents code-hover-contents",e.onContentsChanged()}));const c=p("inlineSuggestionFollows","Suggestion:"),u=i.add(a.render(new as().appendText(c).appendCodeblock("text",d)));r.replaceChildren(u.element)};i.add(zt(d=>{var c;const u=(c=t.controller.model.read(d))===null||c===void 0?void 0:c.ghostText.read(d);if(u){const h=this._editor.getModel().getLineContent(u.lineNumber);l(u.renderForScreenReader(h))}else es(r)})),e.fragment.appendChild(s)}};u2=Ewe([l_(1,bi),l_(2,So),l_(3,Zl),l_(4,qe),l_(5,vo)],u2);At(Xo.ID,Xo,3);_e(Dwe);_e(eD);_e(tD);_e(xwe);_e(kwe);_e(Iwe);_e(iD);mi(nD);jg.register(u2);function to(o,e){let t=0;for(let i=0;i=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Mwe=function(o,e){return function(t,i){e(t,i,o)}};function AH(o,e,t,i,n){if(o.getLineCount()===1&&o.getLineMaxColumn(1)===1)return[];const s=e.getLanguageConfiguration(o.getLanguageId()).indentationRules;if(!s)return[];for(i=Math.min(i,o.getLineCount());t<=i&&s.unIndentedLinePattern;){const v=o.getLineContent(t);if(!s.unIndentedLinePattern.test(v))break;t++}if(t>i-1)return[];const{tabSize:r,indentSize:a,insertSpaces:l}=o.getOptions(),d=(v,_)=>(_=_||1,rr.shiftIndent(v,v.length+_,r,a,l)),c=(v,_)=>(_=_||1,rr.unshiftIndent(v,v.length+_,r,a,l)),u=[];let h;const g=o.getLineContent(t);let f=g;h=ii(g);let m=h;s.increaseIndentPattern&&s.increaseIndentPattern.test(f)?(m=d(m),h=d(h)):s.indentNextLinePattern&&s.indentNextLinePattern.test(f)&&(m=d(m)),t++;for(let v=t;v<=i;v++){const _=o.getLineContent(v),b=ii(_),C=m+_.substring(b.length);s.decreaseIndentPattern&&s.decreaseIndentPattern.test(C)&&(m=c(m),h=c(h)),b!==m&&u.push(Li.replaceMove(new Re(v,1,v,b.length+1),iA(m,a,l))),!(s.unIndentedLinePattern&&s.unIndentedLinePattern.test(_))&&(s.increaseIndentPattern&&s.increaseIndentPattern.test(C)?(h=d(h),m=h):s.indentNextLinePattern&&s.indentNextLinePattern.test(C)?m=d(m):m=h)}return u}class sD extends Te{constructor(){super({id:sD.ID,label:p("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:T.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const r=new Owe(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}sD.ID="editor.action.indentationToSpaces";class oD extends Te{constructor(){super({id:oD.ID,label:p("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:T.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const r=new Fwe(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}oD.ID="editor.action.indentationToTabs";class rP extends Te{constructor(e,t,i){super(i),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){const i=e.get(Ha),n=e.get(Si),s=t.getModel();if(!s)return;const r=n.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget),a=s.getOptions(),l=[1,2,3,4,5,6,7,8].map(c=>({id:c.toString(),label:c.toString(),description:c===r.tabSize&&c===a.tabSize?p("configuredTabSize","Configured Tab Size"):c===r.tabSize?p("defaultTabSize","Default Tab Size"):c===a.tabSize?p("currentTabSize","Current Tab Size"):void 0})),d=Math.min(s.getOptions().tabSize-1,7);setTimeout(()=>{i.pick(l,{placeHolder:p({},"Select Tab Size for Current File"),activeItem:l[d]}).then(c=>{if(c&&s&&!s.isDisposed()){const u=parseInt(c.label,10);this.displaySizeOnly?s.updateOptions({tabSize:u}):s.updateOptions({tabSize:u,indentSize:u,insertSpaces:this.insertSpaces})}})},50)}}class rD extends rP{constructor(){super(!1,!1,{id:rD.ID,label:p("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}rD.ID="editor.action.indentUsingTabs";class aD extends rP{constructor(){super(!0,!1,{id:aD.ID,label:p("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}aD.ID="editor.action.indentUsingSpaces";class lD extends rP{constructor(){super(!0,!0,{id:lD.ID,label:p("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0})}}lD.ID="editor.action.changeTabDisplaySize";class dD extends Te{constructor(){super({id:dD.ID,label:p("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const i=e.get(Si),n=t.getModel();if(!n)return;const s=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(s.insertSpaces,s.tabSize)}}dD.ID="editor.action.detectIndentation";class Awe extends Te{constructor(){super({id:"editor.action.reindentlines",label:p("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:T.writable})}run(e,t){const i=e.get(si),n=t.getModel();if(!n)return;const s=AH(n,i,1,n.getLineCount());s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class Rwe extends Te{constructor(){super({id:"editor.action.reindentselectedlines",label:p("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:T.writable})}run(e,t){const i=e.get(si),n=t.getModel();if(!n)return;const s=t.getSelections();if(s===null)return;const r=[];for(const a of s){let l=a.startLineNumber,d=a.endLineNumber;if(l!==d&&a.endColumn===1&&d--,l===1){if(l===d)continue}else l--;const c=AH(n,i,l,d);r.push(...c)}r.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop())}}class Pwe{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const i of e)i.range&&typeof i.text=="string"&&this._edits.push(i)}getEditOperations(e,t){for(const n of this._edits)t.addEditOperation(k.lift(n.range),n.text);let i=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let Rb=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new de,this.callOnModel=new de,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(12)<4||this.editor.getOption(55))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){const t=this.editor.getSelections();if(t===null||t.length>1)return;const i=this.editor.getModel();if(!i||!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(12),{tabSize:s,indentSize:r,insertSpaces:a}=i.getOptions(),l=[],d={shiftIndent:g=>rr.shiftIndent(g,g.length+1,s,r,a),unshiftIndent:g=>rr.unshiftIndent(g,g.length+1,s,r,a)};let c=e.startLineNumber;for(;c<=e.endLineNumber;){if(this.shouldIgnoreLine(i,c)){c++;continue}break}if(c>e.endLineNumber)return;let u=i.getLineContent(c);if(!/\S/.test(u.substring(0,e.startColumn-1))){const g=z_(n,i,i.getLanguageId(),c,d,this._languageConfigurationService);if(g!==null){const f=ii(u),m=to(g,s),v=to(f,s);if(m!==v){const _=cv(m,s,a);l.push({range:new k(c,1,c,f.length+1),text:_}),u=_+u.substr(f.length)}else{const _=oB(i,c,this._languageConfigurationService);if(_===0||_===8)return}}}const h=c;for(;ci.tokenization.getLineTokens(m),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(m,v)=>i.getLanguageIdAtPosition(m,v)},getLineContent:m=>m===h?u:i.getLineContent(m)},i.getLanguageId(),c+1,d,this._languageConfigurationService);if(f!==null){const m=to(f,s),v=to(ii(i.getLineContent(c+1)),s);if(m!==v){const _=m-v;for(let b=c+1;b<=e.endLineNumber;b++){const C=i.getLineContent(b),w=ii(C),x=to(w,s)+_,y=cv(x,s,a);y!==w&&l.push({range:new k(b,1,b,w.length+1),text:y})}}}}if(l.length>0){this.editor.pushUndoStop();const g=new Pwe(l,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",g),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const i=e.getLineFirstNonWhitespaceColumn(t);if(i===0)return!0;const n=e.tokenization.getLineTokens(t);if(n.getCount()>0){const s=n.findTokenIndexAtOffset(i);if(s>=0&&n.getStandardTokenType(s)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};Rb.ID="editor.contrib.autoIndentOnPaste";Rb=Twe([Mwe(1,si)],Rb);function RH(o,e,t,i){if(o.getLineCount()===1&&o.getLineMaxColumn(1)===1)return;let n="";for(let r=0;rthis._currentResolve=void 0)),await this._currentResolve}}async _doResolve(e){var t,i;try{const n=await Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=(t=n==null?void 0:n.tooltip)!==null&&t!==void 0?t:this.hint.tooltip,this.hint.label=(i=n==null?void 0:n.label)!==null&&i!==void 0?i:this.hint.label,this._isResolved=!0}catch(n){en(n),this._isResolved=!1}}}class Pb{static async create(e,t,i,n){const s=[],r=e.ordered(t).reverse().map(a=>i.map(async l=>{try{const d=await a.provideInlayHints(t,l,n);d!=null&&d.hints.length&&s.push([d,a])}catch(d){en(d)}}));if(await Promise.all(r.flat()),n.isCancellationRequested||t.isDisposed())throw new Mu;return new Pb(i,s,t)}constructor(e,t,i){this._disposables=new de,this.ranges=e,this.provider=new Set;const n=[];for(const[s,r]of t){this._disposables.add(s),this.provider.add(r);for(const a of s.hints){const l=i.validatePosition(a.position);let d="before";const c=Pb._getRangeAtPosition(i,l);let u;c.getStartPosition().isBefore(l)?(u=k.fromPositions(c.getStartPosition(),l),d="after"):(u=k.fromPositions(l,c.getEndPosition()),d="before"),n.push(new aP(a,new PH(u,d),r))}}this.items=n.sort((s,r)=>z.compare(s.hint.position,r.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new k(i,n.startColumn,i,n.endColumn);e.tokenization.tokenizeIfCheap(i);const s=e.tokenization.getLineTokens(i),r=t.column-1,a=s.findTokenIndexAtOffset(r);let l=s.getStartOffset(a),d=s.getEndOffset(a);return d-l===1&&(l===r&&a>1?(l=s.getStartOffset(a-1),d=s.getEndOffset(a-1)):d===r&&aLf(f)?f.command.id:HL()));for(const f of bs.all())h.has(f.desc.id)&&u.push(new Rs(f.desc.id,Ur.label(f.desc,{renderShortTitle:!0}),void 0,!0,async()=>{const m=await s.createModelReference(c.uri);try{const v=new em(m.object.textEditorModel,k.getStartPosition(c.range)),_=i.item.anchor.range;await l.invokeFunction(f.runEditorCommand.bind(f),e,v,_)}finally{m.dispose()}}));if(i.part.command){const{command:f}=i.part;u.push(new Mn),u.push(new Rs(f.id,f.title,void 0,!0,async()=>{var m;try{await a.executeCommand(f.id,...(m=f.arguments)!==null&&m!==void 0?m:[])}catch(v){d.notify({severity:Zy.Error,source:i.item.provider.displayName,message:v})}}))}const g=e.getOption(126);r.showContextMenu({domForShadowRoot:g&&(n=e.getDomNode())!==null&&n!==void 0?n:void 0,getAnchor:()=>{const f=gn(t);return{x:f.left,y:f.top+f.height+8}},getActions:()=>u,onHide:()=>{e.focus()},autoSelectFirstItem:!0})}async function OH(o,e,t,i){const s=await o.get(Xs).createModelReference(i.uri);await t.invokeWithinContext(async r=>{const a=e.hasSideBySideModifier,l=r.get(Xe),d=Zs.inPeekEditor.getValue(l),c=!a&&t.getOption(87)&&!d;return new P0({openToSide:a,openInPeek:c,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(r,new em(s.object.textEditorModel,k.getStartPosition(i.range)),k.lift(i.range))}),s.dispose()}var Vwe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uf=function(o,e){return function(t,i){e(t,i,o)}},q1;class YS{constructor(){this._entries=new Pu(50)}get(e){const t=YS._key(e);return this._entries.get(t)}set(e,t){const i=YS._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const FH=bt("IInlayHintsCache");xt(FH,YS,1);class h2{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}}class Hwe{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}let Lg=q1=class{static get(e){var t;return(t=e.getContribution(q1.ID))!==null&&t!==void 0?t:void 0}constructor(e,t,i,n,s,r,a){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=n,this._commandService=s,this._notificationService=r,this._instaService=a,this._disposables=new de,this._sessionDisposables=new de,this._decorationsMetadata=new Map,this._ruleFactory=new o0(this._editor),this._activeRenderMode=0,this._debounceInfo=i.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(l=>{l.hasChanged(139)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(139);if(e.enabled==="off")return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;const i=this._inlayHintsCache.get(t);i&&this._updateHintsDecorators([t.getFullModelRange()],i),this._sessionDisposables.add(je(()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)}));let n;const s=new Set,r=new Yt(async()=>{const a=Date.now();n==null||n.dispose(!0),n=new tn;const l=t.onWillDispose(()=>n==null?void 0:n.cancel());try{const d=n.token,c=await Pb.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),d);if(r.delay=this._debounceInfo.update(t,Date.now()-a),d.isCancellationRequested){c.dispose();return}for(const u of c.provider)typeof u.onDidChangeInlayHints=="function"&&!s.has(u)&&(s.add(u),this._sessionDisposables.add(u.onDidChangeInlayHints(()=>{r.isScheduled()||r.schedule()})));this._sessionDisposables.add(c),this._updateHintsDecorators(c.ranges,c.items),this._cacheHintsForFastRestore(t)}catch(d){nt(d)}finally{n.dispose(),l.dispose()}},this._debounceInfo.get(t));if(this._sessionDisposables.add(r),this._sessionDisposables.add(je(()=>n==null?void 0:n.dispose(!0))),r.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(a=>{(a.scrollTopChanged||!r.isScheduled())&&r.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(a=>{const l=Math.max(r.delay,1250);r.schedule(l)})),e.enabled==="on")this._activeRenderMode=0;else{let a,l;e.enabled==="onUnlessPressed"?(a=0,l=1):(a=1,l=0),this._activeRenderMode=a,this._sessionDisposables.add(Dd.getInstance().event(d=>{if(!this._editor.hasModel())return;const c=d.altKey&&d.ctrlKey&&!(d.shiftKey||d.metaKey)?l:a;if(c!==this._activeRenderMode){this._activeRenderMode=c;const u=this._editor.getModel(),h=this._copyInlayHintsWithCurrentAnchor(u);this._updateHintsDecorators([u.getFullModelRange()],h),r.schedule(0)}}))}this._sessionDisposables.add(this._installDblClickGesture(()=>r.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new de,t=e.add(new ML(this._editor)),i=new de;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown(n=>{const[s]=n,r=this._getInlayHintLabelPart(s),a=this._editor.getModel();if(!r||!a){i.clear();return}const l=new tn;i.add(je(()=>l.dispose(!0))),r.item.resolve(l.token),this._activeInlayHintPart=r.part.command||r.part.location?new Hwe(r,s.hasTriggerModifier):void 0;const d=a.validatePosition(r.item.hint.position).lineNumber,c=new k(d,1,d,a.getLineMaxColumn(d)),u=this._getInlineHintsForRange(c);this._updateHintsDecorators([c],u),i.add(je(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([c],u)}))})),e.add(t.onCancel(()=>i.clear())),e.add(t.onExecute(async n=>{const s=this._getInlayHintLabelPart(n);if(s){const r=s.part;r.location?this._instaService.invokeFunction(OH,n,this._editor,r.location):Hk.is(r.command)&&await this._invokeCommand(r.command,s.item)}})),e}_getInlineHintsForRange(e){const t=new Set;for(const i of this._decorationsMetadata.values())e.containsRange(i.item.anchor.range)&&t.add(i.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp(async t=>{if(t.event.detail!==2)return;const i=this._getInlayHintLabelPart(t);if(i&&(t.event.preventDefault(),await i.item.resolve(vt.None),ls(i.item.hint.textEdits))){const n=i.item.hint.textEdits.map(s=>Li.replace(k.lift(s.range),s.text));this._editor.executeEdits("inlayHint.default",n),e()}})}_installContextMenu(){return this._editor.onContextMenu(async e=>{if(!(e.event.target instanceof HTMLElement))return;const t=this._getInlayHintLabelPart(e);t&&await this._instaService.invokeFunction(Wwe,this._editor,e.event.target,t)})}_getInlayHintLabelPart(e){var t;if(e.target.type!==6)return;const i=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;if(i instanceof _u&&(i==null?void 0:i.attachedData)instanceof h2)return i.attachedData}async _invokeCommand(e,t){var i;try{await this._commandService.executeCommand(e.id,...(i=e.arguments)!==null&&i!==void 0?i:[])}catch(n){this._notificationService.notify({severity:Zy.Error,source:t.provider.displayName,message:n})}}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[i,n]of this._decorationsMetadata){if(t.has(n.item))continue;const s=e.getDecorationRange(i);if(s){const r=new PH(s,n.item.anchor.direction),a=n.item.with({anchor:r});t.set(n.item,a)}}return Array.from(t.values())}_getHintsRanges(){const t=this._editor.getModel(),i=this._editor.getVisibleRangesPlusViewportAboveBelow(),n=[];for(const s of i.sort(k.compareRangesUsingStarts)){const r=t.validateRange(new k(s.startLineNumber-30,s.startColumn,s.endLineNumber+30,s.endColumn));n.length===0||!k.areIntersectingOrTouching(n[n.length-1],r)?n.push(r):n[n.length-1]=k.plusRange(n[n.length-1],r)}return n}_updateHintsDecorators(e,t){var i,n;const s=[],r=(m,v,_,b,C)=>{const w={content:_,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:v.className,cursorStops:b,attachedData:C};s.push({item:m,classNameRef:v,decoration:{range:m.anchor.range,options:{description:"InlayHint",showIfCollapsed:m.anchor.range.isEmpty(),collapseOnReplaceEdit:!m.anchor.range.isEmpty(),stickiness:0,[m.anchor.direction]:this._activeRenderMode===0?w:void 0}}})},a=(m,v)=>{const _=this._ruleFactory.createClassNameRef({width:`${l/3|0}px`,display:"inline-block"});r(m,_," ",v?Sa.Right:Sa.None)},{fontSize:l,fontFamily:d,padding:c,isUniform:u}=this._getLayoutInfo(),h="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(h,d);for(const m of t){m.hint.paddingLeft&&a(m,!1);const v=typeof m.hint.label=="string"?[{label:m.hint.label}]:m.hint.label;for(let _=0;_q1._MAX_DECORATORS)break}const g=[];for(const m of e)for(const{id:v}of(n=this._editor.getDecorationsInRange(m))!==null&&n!==void 0?n:[]){const _=this._decorationsMetadata.get(v);_&&(g.push(v),_.classNameRef.dispose(),this._decorationsMetadata.delete(v))}const f=Ra.capture(this._editor);this._editor.changeDecorations(m=>{const v=m.deltaDecorations(g,s.map(_=>_.decoration));for(let _=0;_i)&&(s=i);const r=e.fontFamily||n;return{fontSize:s,fontFamily:r,padding:t,isUniform:!t&&r===n&&s===i}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};Lg.ID="editor.contrib.InlayHints";Lg._MAX_DECORATORS=1500;Lg=q1=Vwe([uf(1,Me),uf(2,wr),uf(3,FH),uf(4,Ri),uf(5,sn),uf(6,qe)],Lg);function zwe(o){return o.replace(/[ \t]/g," ")}Et.registerCommand("_executeInlayHintProvider",async(o,...e)=>{const[t,i]=e;qt(ze.isUri(t)),qt(k.isIRange(i));const{inlayHintsProvider:n}=o.get(Me),s=await o.get(Xs).createModelReference(t);try{const r=await Pb.create(n,s.object.textEditorModel,[k.lift(i)],vt.None),a=r.items.map(l=>l.hint);return setTimeout(()=>r.dispose(),0),a}finally{s.dispose()}});var $we=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},d_=function(o,e){return function(t,i){e(t,i,o)}};class l9 extends $1{constructor(e,t,i,n){super(10,t,e.item.anchor.range,i,n,!0),this.part=e}}let g2=class extends BS{constructor(e,t,i,n,s,r){super(e,t,i,n,r),this._resolverService=s,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!Lg.get(this._editor)||e.target.type!==6)return null;const n=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;return n instanceof _u&&n.attachedData instanceof h2?new l9(n.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,i){return e instanceof l9?new rn(async n=>{const{part:s}=e;if(await s.item.resolve(i),i.isCancellationRequested)return;let r;typeof s.item.hint.tooltip=="string"?r=new as().appendText(s.item.hint.tooltip):s.item.hint.tooltip&&(r=s.item.hint.tooltip),r&&n.emitOne(new ba(this,e.range,[r],!1,0)),ls(s.item.hint.textEdits)&&n.emitOne(new ba(this,e.range,[new as().appendText(p("hint.dbl","Double-click to insert"))],!1,10001));let a;if(typeof s.part.tooltip=="string"?a=new as().appendText(s.part.tooltip):s.part.tooltip&&(a=s.part.tooltip),a&&n.emitOne(new ba(this,e.range,[a],!1,1)),s.part.location||s.part.command){let d;const u=this._editor.getOption(77)==="altKey"?It?p("links.navigate.kb.meta.mac","cmd + click"):p("links.navigate.kb.meta","ctrl + click"):It?p("links.navigate.kb.alt.mac","option + click"):p("links.navigate.kb.alt","alt + click");s.part.location&&s.part.command?d=new as().appendText(p("hint.defAndCommand","Go to Definition ({0}), right click for more",u)):s.part.location?d=new as().appendText(p("hint.def","Go to Definition ({0})",u)):s.part.command&&(d=new as(`[${p("hint.cmd","Execute Command")}](${Bwe(s.part.command)} "${s.part.command.title}") (${u})`,{isTrusted:!0})),d&&n.emitOne(new ba(this,e.range,[d],!1,1e4))}const l=await this._resolveInlayHintLabelPartHover(s,i);for await(const d of l)n.emitOne(d)}):rn.EMPTY}async _resolveInlayHintLabelPartHover(e,t){if(!e.part.location)return rn.EMPTY;const{uri:i,range:n}=e.part.location,s=await this._resolverService.createModelReference(i);try{const r=s.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(r)?WR(this._languageFeaturesService.hoverProvider,r,new z(n.startLineNumber,n.startColumn),t).filter(a=>!Up(a.hover.contents)).map(a=>new ba(this,e.item.anchor.range,a.hover.contents,!1,2+a.ordinal)):rn.EMPTY}finally{s.dispose()}}};g2=$we([d_(1,bi),d_(2,So),d_(3,Dt),d_(4,Xs),d_(5,Me)],g2);At(Lg.ID,Lg,1);jg.register(g2);class Uwe{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const n=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new Re(n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn),n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn)):new Re(n.endLineNumber,n.endColumn-this._text.length,n.endLineNumber,n.endColumn)}}var jwe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Kwe=function(o,e){return function(t,i){e(t,i,o)}},G1;let Iu=G1=class{static get(e){return e.getContribution(G1.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var i;(i=this.currentRequest)===null||i===void 0||i.cancel();const n=this.editor.getSelection(),s=this.editor.getModel();if(!s||!n)return;let r=n;if(r.startLineNumber!==r.endLineNumber)return;const a=new xW(this.editor,5),l=s.uri;return this.editorWorkerService.canNavigateValueSet(l)?(this.currentRequest=_n(d=>this.editorWorkerService.navigateValueSet(l,r,t)),this.currentRequest.then(d=>{var c;if(!d||!d.range||!d.value||!a.validate(this.editor))return;const u=k.lift(d.range);let h=d.range;const g=d.value.length-(r.endColumn-r.startColumn);h={startLineNumber:h.startLineNumber,startColumn:h.startColumn,endLineNumber:h.endLineNumber,endColumn:h.startColumn+d.value.length},g>1&&(r=new Re(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn+g-1));const f=new Uwe(u,r,d.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,f),this.editor.pushUndoStop(),this.decorations.set([{range:h,options:G1.DECORATION}]),(c=this.decorationRemover)===null||c===void 0||c.cancel(),this.decorationRemover=au(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(nt)}).catch(nt)):Promise.resolve(void 0)}};Iu.ID="editor.contrib.inPlaceReplaceController";Iu.DECORATION=st.register({description:"in-place-replace",className:"valueSetReplacement"});Iu=G1=jwe([Kwe(1,Qr)],Iu);class qwe extends Te{constructor(){super({id:"editor.action.inPlaceReplace.up",label:p("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:3159,weight:100}})}run(e,t){const i=Iu.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}class Gwe extends Te{constructor(){super({id:"editor.action.inPlaceReplace.down",label:p("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:3161,weight:100}})}run(e,t){const i=Iu.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}At(Iu.ID,Iu,4);_e(qwe);_e(Gwe);class Zwe extends Te{constructor(){super({id:"expandLineSelection",label:p("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:T.textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;const n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(i.source,3,On.expandLineSelection(n,n.getCursorStates())),n.revealPrimaryCursor(i.source,!0)}}_e(Zwe);class Ywe{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){const i=Xwe(e,this._cursors);for(let n=0,s=i.length;nr.lineNumber===a.lineNumber?r.column-a.column:r.lineNumber-a.lineNumber);for(let r=e.length-2;r>=0;r--)e[r].lineNumber===e[r+1].lineNumber&&e.splice(r,1);const t=[];let i=0,n=0;const s=e.length;for(let r=1,a=o.getLineCount();r<=a;r++){const l=o.getLineContent(r),d=l.length+1;let c=0;if(n1e5?`${s.substr(0,1e5)}…`:s;this._type.textContent=a,this._type.title=a,oo(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(a))}else $n(this._type),this._type.title="",xs(this._type),this.domNode.classList.add("no-type");if($n(this._docs),typeof r=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=r;else if(r){this._docs.classList.add("markdown-docs"),$n(this._docs);const a=this._markdownRenderer.render(r);this._docs.appendChild(a.element),this._renderDisposeable.add(a),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=a=>{a.preventDefault(),a.stopPropagation()},this._close.onclick=a=>{a.preventDefault(),a.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const i=new Rt(e,t);Rt.equals(i,this._size)||(this._size=i,zX(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};a2=uwe([hwe(1,qe)],a2);class gwe{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new de,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new FR,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let i,n,s=0,r=0;this._disposables.add(this._resizable.onDidWillResize(()=>{i=this._topLeft,n=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(i&&n){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(r=n.width-a.dimension.width,l=!0),a.north&&(s=n.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:i.top+s,left:i.left+r})}a.done&&(i=void 0,n=void 0,s=0,r=0,this._userSize=a.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var a;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(a=this._userSize)!==null&&a!==void 0?a:this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){var i;const n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,(i=this._userSize)!==null&&i!==void 0?i:this.widget.size,t)}_placeAtAnchor(e,t,i){var n;const s=ng(this.getDomNode().ownerDocument.body),r=this.widget.getLayoutInfo(),a=new Rt(220,2*r.lineHeight),l=e.top,d=function(){const C=s.width-(e.left+e.width+r.borderWidth+r.horizontalPadding),w=-r.borderWidth+e.left+e.width,S=new Rt(C,s.height-e.top-r.borderHeight-r.verticalPadding),x=S.with(void 0,e.top+e.height-r.borderHeight-r.verticalPadding);return{top:l,left:w,fit:C-t.width,maxSizeTop:S,maxSizeBottom:x,minSize:a.with(Math.min(C,a.width))}}(),c=function(){const C=e.left-r.borderWidth-r.horizontalPadding,w=Math.max(r.horizontalPadding,e.left-t.width-r.borderWidth),S=new Rt(C,s.height-e.top-r.borderHeight-r.verticalPadding),x=S.with(void 0,e.top+e.height-r.borderHeight-r.verticalPadding);return{top:l,left:w,fit:C-t.width,maxSizeTop:S,maxSizeBottom:x,minSize:a.with(Math.min(C,a.width))}}(),u=function(){const C=e.left,w=-r.borderWidth+e.top+e.height,S=new Rt(e.width-r.borderHeight,s.height-e.top-e.height-r.verticalPadding);return{top:w,left:C,fit:S.height-t.height,maxSizeBottom:S,maxSizeTop:S,minSize:a.with(S.width)}}(),h=[d,c,u],g=(n=h.find(C=>C.fit>=0))!==null&&n!==void 0?n:h.sort((C,w)=>w.fit-C.fit)[0],f=e.top+e.height-r.borderHeight;let m,v=t.height;const _=Math.max(g.maxSizeTop.height,g.maxSizeBottom.height);v>_&&(v=_);let b;i?v<=g.maxSizeTop.height?(m=!0,b=g.maxSizeTop):(m=!1,b=g.maxSizeBottom):v<=g.maxSizeBottom.height?(m=!1,b=g.maxSizeBottom):(m=!0,b=g.maxSizeTop),this._applyTopLeft({left:g.left,top:m?g.top:f-v}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!m,g===d,m,g!==d),this._resizable.minSize=g.minSize,this._resizable.maxSize=b,this._resizable.layout(v,Math.min(b.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}var Ll;(function(o){o[o.FILE=0]="FILE",o[o.FOLDER=1]="FOLDER",o[o.ROOT_FOLDER=2]="ROOT_FOLDER"})(Ll||(Ll={}));const fwe=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function i1(o,e,t,i){const n=i===Ll.ROOT_FOLDER?["rootfolder-icon"]:i===Ll.FOLDER?["folder-icon"]:["file-icon"];if(t){let s;if(t.scheme===ot.data)s=pu.parseMetaData(t).get(pu.META_DATA_LABEL);else{const r=t.path.match(fwe);r?(s=n1(r[2].toLowerCase()),r[1]&&n.push(`${n1(r[1].toLowerCase())}-name-dir-icon`)):s=n1(t.authority.toLowerCase())}if(i===Ll.ROOT_FOLDER)n.push(`${s}-root-name-folder-icon`);else if(i===Ll.FOLDER)n.push(`${s}-name-folder-icon`);else{if(s){if(n.push(`${s}-name-file-icon`),n.push("name-file-icon"),s.length<=255){const a=s.split(".");for(let l=1;l=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ck=function(o,e){return function(t,i){e(t,i,o)}},oc;function MH(o){return`suggest-aria-id:${o}`}const _we=Zi("suggest-more-info",ve.chevronRight,p("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),vwe=new(oc=class{extract(e,t){if(e.textLabel.match(oc._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(oc._regexStrict))return t[0]=e.completion.detail,!0;if(typeof e.completion.documentation=="string"){const i=oc._regexRelaxed.exec(e.completion.documentation);if(i&&(i.index===0||i.index+i[0].length===e.completion.documentation.length))return t[0]=i[0],!0}return!1}},oc._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,oc._regexStrict=new RegExp(`^${oc._regexRelaxed.source}$`,"i"),oc);let l2=class{constructor(e,t,i,n){this._editor=e,this._modelService=t,this._languageService=i,this._themeService=n,this._onDidToggleDetails=new W,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=new de,i=e;i.classList.add("show-file-icons");const n=le(e,pe(".icon")),s=le(n,pe("span.colorspan")),r=le(e,pe(".contents")),a=le(r,pe(".main")),l=le(a,pe(".icon-label.codicon")),d=le(a,pe("span.left")),c=le(a,pe("span.right")),u=new _S(d,{supportHighlights:!0,supportIcons:!0});t.add(u);const h=le(d,pe("span.signature-label")),g=le(d,pe("span.qualifier-label")),f=le(c,pe("span.details-label")),m=le(c,pe("span.readMore"+Ue.asCSSSelector(_we)));m.title=p("readMore","Read More");const v=()=>{const _=this._editor.getOptions(),b=_.get(50),C=b.getMassagedFontFamily(),w=b.fontFeatureSettings,S=_.get(118)||b.fontSize,x=_.get(119)||b.lineHeight,y=b.fontWeight,I=b.letterSpacing,E=`${S}px`,R=`${x}px`,j=`${I}px`;i.style.fontSize=E,i.style.fontWeight=y,i.style.letterSpacing=j,a.style.fontFamily=C,a.style.fontFeatureSettings=w,a.style.lineHeight=R,n.style.height=R,n.style.width=R,m.style.height=R,m.style.width=R};return v(),t.add(this._editor.onDidChangeConfiguration(_=>{(_.hasChanged(50)||_.hasChanged(118)||_.hasChanged(119))&&v()})),{root:i,left:d,right:c,icon:n,colorspan:s,iconLabel:u,iconContainer:l,parametersLabel:h,qualifierLabel:g,detailsLabel:f,readMore:m,disposables:t}}renderElement(e,t,i){const{completion:n}=e;i.root.id=MH(t),i.colorspan.style.backgroundColor="";const s={labelEscapeNewLines:!0,matches:p0(e.score)},r=[];if(n.kind===19&&vwe.extract(e,r))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=r[0];else if(n.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const a=i1(this._modelService,this._languageService,ze.from({scheme:"fake",path:e.textLabel}),Ll.FILE),l=i1(this._modelService,this._languageService,ze.from({scheme:"fake",path:n.detail}),Ll.FILE);s.extraClasses=a.length>l.length?a:l}else n.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",s.extraClasses=[i1(this._modelService,this._languageService,ze.from({scheme:"fake",path:e.textLabel}),Ll.FOLDER),i1(this._modelService,this._languageService,ze.from({scheme:"fake",path:n.detail}),Ll.FOLDER)].flat()):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...Ue.asClassNameArray(Cv.toIcon(n.kind))));n.tags&&n.tags.indexOf(1)>=0&&(s.extraClasses=(s.extraClasses||[]).concat(["deprecated"]),s.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,s),typeof n.label=="string"?(i.parametersLabel.textContent="",i.detailsLabel.textContent=wk(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=wk(n.label.detail||""),i.detailsLabel.textContent=wk(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(117).showInlineDetails?oo(i.detailsLabel):xs(i.detailsLabel),oP(e)?(i.right.classList.add("can-expand-details"),oo(i.readMore),i.readMore.onmousedown=a=>{a.stopPropagation(),a.preventDefault()},i.readMore.onclick=a=>{a.stopPropagation(),a.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),xs(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};l2=mwe([Ck(1,Si),Ck(2,bi),Ck(3,Sn)],l2);function wk(o){return o.replace(/\r\n|\r|\n/g,"")}var bwe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},s1=function(o,e){return function(t,i){e(t,i,o)}},Cf;M("editorSuggestWidget.background",{dark:Fi,light:Fi,hcDark:Fi,hcLight:Fi},p("editorSuggestWidgetBackground","Background color of the suggest widget."));M("editorSuggestWidget.border",{dark:Cl,light:Cl,hcDark:Cl,hcLight:Cl},p("editorSuggestWidgetBorder","Border color of the suggest widget."));const o1=M("editorSuggestWidget.foreground",{dark:Fr,light:Fr,hcDark:Fr,hcLight:Fr},p("editorSuggestWidgetForeground","Foreground color of the suggest widget."));M("editorSuggestWidget.selectedForeground",{dark:Eh,light:Eh,hcDark:Eh,hcLight:Eh},p("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));M("editorSuggestWidget.selectedIconForeground",{dark:Ef,light:Ef,hcDark:Ef,hcLight:Ef},p("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));const Cwe=M("editorSuggestWidget.selectedBackground",{dark:Nh,light:Nh,hcDark:Nh,hcLight:Nh},p("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));M("editorSuggestWidget.highlightForeground",{dark:Br,light:Br,hcDark:Br,hcLight:Br},p("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));M("editorSuggestWidget.focusHighlightForeground",{dark:tC,light:tC,hcDark:tC,hcLight:tC},p("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));M("editorSuggestWidgetStatus.foreground",{dark:We(o1,.5),light:We(o1,.5),hcDark:We(o1,.5),hcLight:We(o1,.5)},p("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));class wwe{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Su}`}restore(){var e;const t=(e=this._service.get(this._key,0))!==null&&e!==void 0?e:"";try{const i=JSON.parse(t);if(Rt.is(i))return Rt.lift(i)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let Ab=Cf=class{constructor(e,t,i,n,s){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new An,this._pendingShowDetails=new An,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new qr,this._disposables=new de,this._onDidSelect=new Yh,this._onDidFocus=new Yh,this._onDidHide=new W,this._onDidShow=new W,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new W,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new FR,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new Swe(this,e),this._persistedSize=new wwe(t,e);class r{constructor(g,f,m=!1,v=!1){this.persistedSize=g,this.currentSize=f,this.persistHeight=m,this.persistWidth=v}}let a;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),a=new r(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(h=>{var g,f,m,v;if(this._resize(h.dimension.width,h.dimension.height),a&&(a.persistHeight=a.persistHeight||!!h.north||!!h.south,a.persistWidth=a.persistWidth||!!h.east||!!h.west),!!h.done){if(a){const{itemHeight:_,defaultSize:b}=this.getLayoutInfo(),C=Math.round(_/2);let{width:w,height:S}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-S)<=C)&&(S=(f=(g=a.persistedSize)===null||g===void 0?void 0:g.height)!==null&&f!==void 0?f:b.height),(!a.persistWidth||Math.abs(a.currentSize.width-w)<=C)&&(w=(v=(m=a.persistedSize)===null||m===void 0?void 0:m.width)!==null&&v!==void 0?v:b.width),this._persistedSize.store(new Rt(w,S))}this._contentWidget.unlockPreference(),a=void 0}})),this._messageElement=le(this.element.domNode,pe(".message")),this._listElement=le(this.element.domNode,pe(".tree"));const l=this._disposables.add(s.createInstance(a2,this.editor));l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new gwe(l,this.editor);const d=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(117).showIcons);d();const c=s.createInstance(l2,this.editor);this._disposables.add(c),this._disposables.add(c.onDidToggleDetails(()=>this.toggleDetails())),this._list=new Yr("SuggestWidget",this._listElement,{getHeight:h=>this.getLayoutInfo().itemHeight,getTemplateId:h=>"suggestion"},[c],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>p("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:h=>{let g=h.textLabel;if(typeof h.completion.label!="string"){const{detail:_,description:b}=h.completion.label;_&&b?g=p("label.full","{0} {1}, {2}",g,_,b):_?g=p("label.detail","{0} {1}",g,_):b&&(g=p("label.desc","{0}, {1}",g,b))}if(!h.isResolved||!this._isDetailsVisible())return g;const{documentation:f,detail:m}=h.completion,v=Xh("{0}{1}",m||"",f?typeof f=="string"?f:f.value:"");return p("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",g,v)}}}),this._list.style(Sm({listInactiveFocusBackground:Cwe,listInactiveFocusOutline:fi})),this._status=s.createInstance(r2,this.element.domNode,Jc);const u=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(117).showStatusBar);u(),this._disposables.add(n.onDidColorThemeChange(h=>this._onThemeChange(h))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onTap(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onDidChangeSelection(h=>this._onListSelection(h))),this._disposables.add(this._list.onDidChangeFocus(h=>this._onListFocus(h))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(h=>{h.hasChanged(117)&&(u(),d())})),this._ctxSuggestWidgetVisible=dt.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=dt.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=dt.MultipleSuggestions.bindTo(i),this._ctxSuggestWidgetHasFocusedSuggestion=dt.HasFocusedSuggestion.bindTo(i),this._disposables.add(Wi(this._details.widget.domNode,"keydown",h=>{this._onDetailsKeydown.fire(h)})),this._disposables.add(this.editor.onMouseDown(h=>this._onEditorMouseDown(h)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element>"u"||typeof e.index>"u"||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=xa(e.type)?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const i=e.elements[0],n=e.indexes[0];i!==this._focusedItem&&((t=this._currentSuggestionDetails)===null||t===void 0||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(n),this._currentSuggestionDetails=_n(async s=>{const r=lu(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),a=s.onCancellationRequested(()=>r.dispose());try{return await i.resolve(s)}finally{r.dispose(),a.dispose()}}),this._currentSuggestionDetails.then(()=>{n>=this._list.length||i!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[i]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:MH(n)}))}).catch(nt)),this._onDidFocus.fire({item:i,index:n,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",e===4),this.element.domNode.classList.remove("message"),e){case 0:xs(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=Cf.LOADING_MESSAGE,xs(this._listElement,this._status.element),oo(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,hu(Cf.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=Cf.NO_SUGGESTIONS_MESSAGE,xs(this._listElement,this._status.element),oo(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,hu(Cf.NO_SUGGESTIONS_MESSAGE);break;case 3:xs(this._messageElement),oo(this._listElement,this._status.element),this._show();break;case 4:xs(this._messageElement),oo(this._listElement,this._status.element),this._show();break;case 5:xs(this._messageElement),oo(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,t){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=lu(()=>this._setState(1),t)))}showSuggestions(e,t,i,n,s){var r,a;if(this._contentWidget.setPosition(this.editor.getPosition()),(r=this._loadingTimeout)===null||r===void 0||r.dispose(),(a=this._currentSuggestionDetails)===null||a===void 0||a.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&this._state!==2&&this._state!==0){this._setState(4);return}const l=this._completionModel.items.length,d=l===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(l>1),d){this._setState(n?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0),this._list.setFocus(s?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=gw(Je(this.element.domNode),()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(oP(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=gw(Je(this.element.domNode),()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")})}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;this._pendingLayout.clear(),this._pendingShowDetails.clear(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),i=Math.ceil(this.getLayoutInfo().itemHeight*4.3);t&&t.heightd&&(l=d);const c=this._completionModel?this._completionModel.stats.pLabelLen*r.typicalHalfwidthCharacterWidth:l,u=r.statusBarHeight+this._list.contentHeight+r.borderHeight,h=r.itemHeight+r.statusBarHeight,g=gn(this.editor.getDomNode()),f=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),m=g.top+f.top+f.height,v=Math.min(s.height-m-r.verticalPadding,u),_=g.top+f.top-r.verticalPadding,b=Math.min(_,u);let C=Math.min(Math.max(b,v)+r.borderHeight,u);a===((t=this._cappedHeight)===null||t===void 0?void 0:t.capped)&&(a=this._cappedHeight.wanted),aC&&(a=C),a>v||this._forceRenderingAbove&&_>150?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),C=b):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),C=v),this.element.preferredSize=new Rt(c,r.defaultSize.height),this.element.maxSize=new Rt(d,C),this.element.minSize=new Rt(220,h),this._cappedHeight=a===u?{wanted:(n=(i=this._cappedHeight)===null||i===void 0?void 0:i.wanted)!==null&&n!==void 0?n:e.height,capped:a}:void 0}this._resize(l,a)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:s}=this.getLayoutInfo();this._list.layout(t-s,e),this._listElement.style.height=`${t-s}px`,this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((e=this._contentWidget.getPosition())===null||e===void 0?void 0:e.preference[0])===2)}getLayoutInfo(){const e=this.editor.getOption(50),t=io(this.editor.getOption(119)||e.lineHeight,8,1e3),i=!this.editor.getOption(117).showStatusBar||this._state===2||this._state===1?0:t,n=this._details.widget.borderWidth,s=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:s,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new Rt(430,i+12*t+s)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};Ab.LOADING_MESSAGE=p("suggestWidget.loading","Loading...");Ab.NO_SUGGESTIONS_MESSAGE=p("suggestWidget.noSuggestions","No suggestions.");Ab=Cf=bwe([s1(1,Xr),s1(2,Xe),s1(3,Sn),s1(4,qe)],Ab);class Swe{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new Rt(t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var ywe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},cf=function(o,e){return function(t,i){e(t,i,o)}},d2;class Lwe{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){const n=e.getOffsetAt(t),s=e.getPositionAt(n+1);this._marker=e.deltaDecorations([],[{range:k.fromPositions(t,s),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let Vr=d2=class{static get(e){return e.getContribution(d2.ID)}constructor(e,t,i,n,s,r,a){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=s,this._logService=r,this._telemetryService=a,this._lineSuffix=new An,this._toDispose=new de,this._selectors=new Dwe(u=>u.priority),this._onWillInsertSuggestItem=new W,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=s.createInstance(o2,this.editor),this._selectors.register({priority:0,select:(u,h,g)=>this._memoryService.select(u,h,g)});const l=dt.InsertMode.bindTo(n);l.set(e.getOption(117).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>l.set(e.getOption(117).insertMode))),this.widget=this._toDispose.add(new HD(Je(e.getDomNode()),()=>{const u=this._instantiationService.createInstance(Ab,this.editor);this._toDispose.add(u),this._toDispose.add(u.onDidSelect(v=>this._insertSuggestion(v,0),this));const h=new rwe(this.editor,u,this.model,v=>this._insertSuggestion(v,2));this._toDispose.add(h);const g=dt.MakesTextEdit.bindTo(this._contextKeyService),f=dt.HasInsertAndReplaceRange.bindTo(this._contextKeyService),m=dt.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(je(()=>{g.reset(),f.reset(),m.reset()})),this._toDispose.add(u.onDidFocus(({item:v})=>{const _=this.editor.getPosition(),b=v.editStart.column,C=_.column;let w=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!v.completion.additionalTextEdits&&!(v.completion.insertTextRules&4)&&C-b===v.completion.insertText.length&&(w=this.editor.getModel().getValueInRange({startLineNumber:_.lineNumber,startColumn:b,endLineNumber:_.lineNumber,endColumn:C})!==v.completion.insertText),g.set(w),f.set(!z.equals(v.editInsertEnd,v.editReplaceEnd)),m.set(!!v.provider.resolveCompletionItem||!!v.completion.documentation||v.completion.detail!==v.completion.label)})),this._toDispose.add(u.onDetailsKeyDown(v=>{if(v.toKeyCodeChord().equals(new zd(!0,!1,!1,!1,33))||It&&v.toKeyCodeChord().equals(new zd(!1,!1,!1,!0,33))){v.stopPropagation();return}v.toKeyCodeChord().isModifierKey()||this.editor.focus()})),u})),this._overtypingCapturer=this._toDispose.add(new HD(Je(e.getDomNode()),()=>this._toDispose.add(new JL(this.editor,this.model)))),this._alternatives=this._toDispose.add(new HD(Je(e.getDomNode()),()=>this._toDispose.add(new yg(this.editor,this._contextKeyService)))),this._toDispose.add(s.createInstance(Mb,e)),this._toDispose.add(this.model.onDidTrigger(u=>{this.widget.value.showTriggered(u.auto,u.shy?250:50),this._lineSuffix.value=new Lwe(this.editor.getModel(),u.position)})),this._toDispose.add(this.model.onDidSuggest(u=>{if(u.triggerOptions.shy)return;let h=-1;for(const f of this._selectors.itemsOrderedByPriorityDesc)if(h=f.select(this.editor.getModel(),this.editor.getPosition(),u.completionModel.items),h!==-1)break;h===-1&&(h=0);let g=!1;if(u.triggerOptions.auto){const f=this.editor.getOption(117);f.selectionMode==="never"||f.selectionMode==="always"?g=f.selectionMode==="never":f.selectionMode==="whenTriggerCharacter"?g=u.triggerOptions.triggerKind!==1:f.selectionMode==="whenQuickSuggestion"&&(g=u.triggerOptions.triggerKind===1&&!u.triggerOptions.refilter)}this.widget.value.showSuggestions(u.completionModel,h,u.isFrozen,u.triggerOptions.auto,g)})),this._toDispose.add(this.model.onDidCancel(u=>{u.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{this.model.cancel(),this.model.clear()}));const d=dt.AcceptSuggestionsOnEnter.bindTo(n),c=()=>{const u=this.editor.getOption(1);d.set(u==="on"||u==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>c())),c()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,t){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const i=Un.get(this.editor);if(!i)return;this._onWillInsertSuggestItem.fire({item:e.item});const n=this.editor.getModel(),s=n.getAlternativeVersionId(),{item:r}=e,a=[],l=new tn;t&1||this.editor.pushUndoStop();const d=this.getOverwriteInfo(r,!!(t&8));this._memoryService.memorize(n,this.editor.getPosition(),r);const c=r.isResolved;let u=-1,h=-1;if(Array.isArray(r.completion.additionalTextEdits)){this.model.cancel();const f=Ra.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",r.completion.additionalTextEdits.map(m=>Li.replaceMove(k.lift(m.range),m.text))),f.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!c){const f=new ds;let m;const v=n.onDidChangeContent(w=>{if(w.isFlush){l.cancel(),v.dispose();return}for(const S of w.changes){const x=k.getEndPosition(S.range);(!m||z.isBefore(x,m))&&(m=x)}}),_=t;t|=2;let b=!1;const C=this.editor.onWillType(()=>{C.dispose(),b=!0,_&2||this.editor.pushUndoStop()});a.push(r.resolve(l.token).then(()=>{if(!r.completion.additionalTextEdits||l.token.isCancellationRequested)return;if(m&&r.completion.additionalTextEdits.some(S=>z.isBefore(m,k.getStartPosition(S.range))))return!1;b&&this.editor.pushUndoStop();const w=Ra.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",r.completion.additionalTextEdits.map(S=>Li.replaceMove(k.lift(S.range),S.text))),w.restoreRelativeVerticalPositionOfCursor(this.editor),(b||!(_&2))&&this.editor.pushUndoStop(),!0}).then(w=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",f.elapsed(),w),h=w===!0?1:w===!1?0:-2}).finally(()=>{v.dispose(),C.dispose()}))}let{insertText:g}=r.completion;if(r.completion.insertTextRules&4||(g=om.escape(g)),this.model.cancel(),i.insert(g,{overwriteBefore:d.overwriteBefore,overwriteAfter:d.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(r.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),t&2||this.editor.pushUndoStop(),r.completion.command)if(r.completion.command.id===F0.id)this.model.trigger({auto:!0,retrigger:!0});else{const f=new ds;a.push(this._commandService.executeCommand(r.completion.command.id,...r.completion.command.arguments?[...r.completion.command.arguments]:[]).catch(m=>{r.completion.extensionId?en(m):nt(m)}).finally(()=>{u=f.elapsed()}))}t&4&&this._alternatives.value.set(e,f=>{for(l.cancel();n.canUndo();){s!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(f,3|(t&8?8:0));break}}),this._alertCompletionItem(r),Promise.all(a).finally(()=>{this._reportSuggestionAcceptedTelemetry(r,n,c,u,h),this.model.clear(),l.dispose()})}_reportSuggestionAcceptedTelemetry(e,t,i,n,s){var r,a,l;Math.floor(Math.random()*100)!==0&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:(a=(r=e.extensionId)===null||r===void 0?void 0:r.value)!==null&&a!==void 0?a:"unknown",providerId:(l=e.provider._debugDisplayName)!==null&&l!==void 0?l:"unknown",kind:e.completion.kind,basenameHash:LM(br(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:Foe(t.uri),resolveInfo:e.provider.resolveCompletionItem?i?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:n,additionalEditsAsync:s})}getOverwriteInfo(e,t){qt(this.editor.hasModel());let i=this.editor.getOption(117).insertMode==="replace";t&&(i=!i);const n=e.position.column-e.editStart.column,s=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,r=this.editor.getPosition().column-e.position.column,a=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:n+r,overwriteAfter:s+a}}_alertCompletionItem(e){if(ls(e.completion.additionalTextEdits)){const t=p("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);mo(t)}}triggerSuggest(e,t,i){this.editor.hasModel()&&(this.model.trigger({auto:t??!1,completionOptions:{providerFilter:e,kindFilter:i?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=s=>{if(s.completion.insertTextRules&4||s.completion.additionalTextEdits)return!0;const r=this.editor.getPosition(),a=s.editStart.column,l=r.column;return l-a!==s.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:r.lineNumber,startColumn:a,endLineNumber:r.lineNumber,endColumn:l})!==s.completion.insertText};ye.once(this.model.onDidTrigger)(s=>{const r=[];ye.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{jt(r),i()},void 0,r),this.model.onDidSuggest(({completionModel:a})=>{if(jt(r),a.items.length===0){i();return}const l=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),a.items),d=a.items[l];if(!n(d)){i();return}this.editor.pushUndoStop(),this._insertSuggestion({index:l,item:d,model:a},7)},void 0,r)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};Vr.ID="editor.contrib.suggestController";Vr=d2=ywe([cf(1,QL),cf(2,Ri),cf(3,Xe),cf(4,qe),cf(5,bo),cf(6,vo)],Vr);class Dwe{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((t,i)=>this.prioritySelector(i)-this.prioritySelector(t)),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class F0 extends Te{constructor(){super({id:F0.id,label:p("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:ae.and(T.writable,T.hasCompletionItemProvider,dt.Visible.toNegated()),kbOpts:{kbExpr:T.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,i){const n=Vr.get(t);if(!n)return;let s;i&&typeof i=="object"&&i.auto===!0&&(s=!0),n.triggerSuggest(void 0,s,void 0)}}F0.id="editor.action.triggerSuggest";At(Vr.ID,Vr,2);_e(F0);const Yo=190,Ws=Rn.bindToContribution(Vr.get);we(new Ws({id:"acceptSelectedSuggestion",precondition:ae.and(dt.Visible,dt.HasFocusedSuggestion),handler(o){o.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:ae.and(dt.Visible,T.textInputFocus),weight:Yo},{primary:3,kbExpr:ae.and(dt.Visible,T.textInputFocus,dt.AcceptSuggestionsOnEnter,dt.MakesTextEdit),weight:Yo}],menuOpts:[{menuId:Jc,title:p("accept.insert","Insert"),group:"left",order:1,when:dt.HasInsertAndReplaceRange.toNegated()},{menuId:Jc,title:p("accept.insert","Insert"),group:"left",order:1,when:ae.and(dt.HasInsertAndReplaceRange,dt.InsertMode.isEqualTo("insert"))},{menuId:Jc,title:p("accept.replace","Replace"),group:"left",order:1,when:ae.and(dt.HasInsertAndReplaceRange,dt.InsertMode.isEqualTo("replace"))}]}));we(new Ws({id:"acceptAlternativeSelectedSuggestion",precondition:ae.and(dt.Visible,T.textInputFocus,dt.HasFocusedSuggestion),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:1027,secondary:[1026]},handler(o){o.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:Jc,group:"left",order:2,when:ae.and(dt.HasInsertAndReplaceRange,dt.InsertMode.isEqualTo("insert")),title:p("accept.replace","Replace")},{menuId:Jc,group:"left",order:2,when:ae.and(dt.HasInsertAndReplaceRange,dt.InsertMode.isEqualTo("replace")),title:p("accept.insert","Insert")}]}));Et.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");we(new Ws({id:"hideSuggestWidget",precondition:dt.Visible,handler:o=>o.cancelSuggestWidget(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:9,secondary:[1033]}}));we(new Ws({id:"selectNextSuggestion",precondition:ae.and(dt.Visible,ae.or(dt.MultipleSuggestions,dt.HasFocusedSuggestion.negate())),handler:o=>o.selectNextSuggestion(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));we(new Ws({id:"selectNextPageSuggestion",precondition:ae.and(dt.Visible,ae.or(dt.MultipleSuggestions,dt.HasFocusedSuggestion.negate())),handler:o=>o.selectNextPageSuggestion(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:12,secondary:[2060]}}));we(new Ws({id:"selectLastSuggestion",precondition:ae.and(dt.Visible,ae.or(dt.MultipleSuggestions,dt.HasFocusedSuggestion.negate())),handler:o=>o.selectLastSuggestion()}));we(new Ws({id:"selectPrevSuggestion",precondition:ae.and(dt.Visible,ae.or(dt.MultipleSuggestions,dt.HasFocusedSuggestion.negate())),handler:o=>o.selectPrevSuggestion(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));we(new Ws({id:"selectPrevPageSuggestion",precondition:ae.and(dt.Visible,ae.or(dt.MultipleSuggestions,dt.HasFocusedSuggestion.negate())),handler:o=>o.selectPrevPageSuggestion(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:11,secondary:[2059]}}));we(new Ws({id:"selectFirstSuggestion",precondition:ae.and(dt.Visible,ae.or(dt.MultipleSuggestions,dt.HasFocusedSuggestion.negate())),handler:o=>o.selectFirstSuggestion()}));we(new Ws({id:"focusSuggestion",precondition:ae.and(dt.Visible,dt.HasFocusedSuggestion.negate()),handler:o=>o.focusSuggestion(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}}));we(new Ws({id:"focusAndAcceptSuggestion",precondition:ae.and(dt.Visible,dt.HasFocusedSuggestion.negate()),handler:o=>{o.focusSuggestion(),o.acceptSelectedSuggestion(!0,!1)}}));we(new Ws({id:"toggleSuggestionDetails",precondition:ae.and(dt.Visible,dt.HasFocusedSuggestion),handler:o=>o.toggleSuggestionDetails(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:Jc,group:"right",order:1,when:ae.and(dt.DetailsVisible,dt.CanResolve),title:p("detail.more","show less")},{menuId:Jc,group:"right",order:1,when:ae.and(dt.DetailsVisible.toNegated(),dt.CanResolve),title:p("detail.less","show more")}]}));we(new Ws({id:"toggleExplainMode",precondition:dt.Visible,handler:o=>o.toggleExplainMode(),kbOpts:{weight:100,primary:2138}}));we(new Ws({id:"toggleSuggestionFocus",precondition:dt.Visible,handler:o=>o.toggleSuggestionFocus(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:2570,mac:{primary:778}}}));we(new Ws({id:"insertBestCompletion",precondition:ae.and(T.textInputFocus,ae.equals("config.editor.tabCompletion","on"),Mb.AtEnd,dt.Visible.toNegated(),yg.OtherSuggestions.toNegated(),Un.InSnippetMode.toNegated()),handler:(o,e)=>{o.triggerSuggestAndAcceptBest(Es(e)?{fallback:"tab",...e}:{fallback:"tab"})},kbOpts:{weight:Yo,primary:2}}));we(new Ws({id:"insertNextSuggestion",precondition:ae.and(T.textInputFocus,ae.equals("config.editor.tabCompletion","on"),yg.OtherSuggestions,dt.Visible.toNegated(),Un.InSnippetMode.toNegated()),handler:o=>o.acceptNextSuggestion(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:2}}));we(new Ws({id:"insertPrevSuggestion",precondition:ae.and(T.textInputFocus,ae.equals("config.editor.tabCompletion","on"),yg.OtherSuggestions,dt.Visible.toNegated(),Un.InSnippetMode.toNegated()),handler:o=>o.acceptPrevSuggestion(),kbOpts:{weight:Yo,kbExpr:T.textInputFocus,primary:1026}}));_e(class extends Te{constructor(){super({id:"editor.action.resetSuggestSize",label:p("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(o,e){var t;(t=Vr.get(e))===null||t===void 0||t.resetWidgetSize()}});class xwe extends q{get selectedItem(){return this._selectedItem}constructor(e,t,i,n){super(),this.editor=e,this.suggestControllerPreselector=t,this.checkModelVersion=i,this.onWillAccept=n,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=Pt(this,void 0),this._register(e.onKeyDown(r=>{r.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(r=>{r.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const s=Vr.get(this.editor);if(s){this._register(s.registerSelector({priority:100,select:(l,d,c)=>{var u;wi(_=>this.checkModelVersion(_));const h=this.editor.getModel();if(!h)return-1;const g=(u=this.suggestControllerPreselector())===null||u===void 0?void 0:u.removeCommonPrefix(h);if(!g)return-1;const f=z.lift(d),m=c.map((_,b)=>{const w=dv.fromSuggestion(s,h,f,_,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(h),S=g.augments(w);return{index:b,valid:S,prefixLength:w.text.length,suggestItem:_}}).filter(_=>_&&_.valid&&_.prefixLength>0),v=RM(m,ur(_=>_.prefixLength,Md));return v?v.index:-1}}));let r=!1;const a=()=>{r||(r=!0,this._register(s.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(s.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(s.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(ye.once(s.model.onDidTrigger)(l=>{a()})),this._register(s.onWillInsertSuggestItem(l=>{const d=this.editor.getPosition(),c=this.editor.getModel();if(!d||!c)return;const u=dv.fromSuggestion(s,c,d,l.item,this.isShiftKeyPressed);this.onWillAccept(u)}))}this.update(this._isActive)}update(e){const t=this.getSuggestItemInfo();(this._isActive!==e||!kwe(this._currentSuggestItemInfo,t))&&(this._isActive=e,this._currentSuggestItemInfo=t,wi(i=>{this.checkModelVersion(i),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,i)}))}getSuggestItemInfo(){const e=Vr.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem(),i=this.editor.getPosition(),n=this.editor.getModel();if(!(!t||!i||!n))return dv.fromSuggestion(e,n,i,t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const e=Vr.get(this.editor);e==null||e.stopForceRenderingAbove()}forceRenderingAbove(){const e=Vr.get(this.editor);e==null||e.forceRenderingAbove()}}class dv{static fromSuggestion(e,t,i,n,s){let{insertText:r}=n.completion,a=!1;if(n.completion.insertTextRules&4){const d=new om().parse(r);d.children.length<100&&ZS.adjustWhitespace(t,i,!0,d),r=d.toString(),a=!0}const l=e.getOverwriteInfo(n,s);return new dv(k.fromPositions(i.delta(0,-l.overwriteBefore),i.delta(0,Math.max(l.overwriteAfter,0))),r,n.completion.kind,a)}constructor(e,t,i,n){this.range=e,this.insertText=t,this.completionItemKind=i,this.isSnippetText=n}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new c8(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new rm(this.range,this.insertText)}}function kwe(o,e){return o===e?!0:!o||!e?!1:o.equals(e)}var Iwe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rc=function(o,e){return function(t,i){e(t,i,o)}},c2;let Xo=c2=class extends q{static get(e){return e.getContribution(c2.ID)}constructor(e,t,i,n,s,r,a,l,d){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=i,this._configurationService=n,this._commandService=s,this._debounceService=r,this._languageFeaturesService=a,this._audioCueService=l,this._keybindingService=d,this.model=wS("inlineCompletionModel",void 0),this._textModelVersionId=Pt(this,-1),this._cursorPosition=Pt(this,new z(1,1)),this._suggestWidgetAdaptor=this._register(new xwe(this.editor,()=>{var h,g;return(g=(h=this.model.get())===null||h===void 0?void 0:h.selectedInlineCompletion.get())===null||g===void 0?void 0:g.toSingleTextEdit(void 0)},h=>this.updateObservables(h,No.Other),h=>{wi(g=>{var f;this.updateObservables(g,No.Other),(f=this.model.get())===null||f===void 0||f.handleSuggestAccepted(h)})})),this._enabled=Oi(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).enabled),this._ghostTextWidget=this._register(this._instantiationService.createInstance(e2,this.editor,{ghostText:this.model.map((h,g)=>h==null?void 0:h.ghostText.read(g)),minReservedLineCount:SS(0),targetTextModel:this.model.map(h=>h==null?void 0:h.textModel)})),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._playAudioCueSignal=hR(this),this._isReadonly=Oi(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(90)),this._textModel=Oi(this.editor.onDidChangeModel,()=>this.editor.getModel()),this._textModelIfWritable=rt(h=>this._isReadonly.read(h)?void 0:this._textModel.read(h)),this._register(new Tn(this._contextKeyService,this.model)),this._register(zt(h=>{const g=this._textModelIfWritable.read(h);wi(f=>{if(this.model.set(void 0,f),this.updateObservables(f,No.Other),g){const m=t.createInstance(i2,g,this._suggestWidgetAdaptor.selectedItem,this._cursorPosition,this._textModelVersionId,this._debounceValue,Oi(e.onDidChangeConfiguration,()=>e.getOption(117).preview),Oi(e.onDidChangeConfiguration,()=>e.getOption(117).previewMode),Oi(e.onDidChangeConfiguration,()=>e.getOption(62).mode),this._enabled);this.model.set(m,f)}})}));const c=h=>{var g;return h.isUndoing?No.Undo:h.isRedoing?No.Redo:!((g=this.model.get())===null||g===void 0)&&g.isAcceptingPartially?No.AcceptWord:No.Other};this._register(e.onDidChangeModelContent(h=>wi(g=>this.updateObservables(g,c(h))))),this._register(e.onDidChangeCursorPosition(h=>wi(g=>{var f;this.updateObservables(g,No.Other),(h.reason===3||h.source==="api")&&((f=this.model.get())===null||f===void 0||f.stop(g))}))),this._register(e.onDidType(()=>wi(h=>{var g;this.updateObservables(h,No.Other),this._enabled.get()&&((g=this.model.get())===null||g===void 0||g.trigger(h))}))),this._register(this._commandService.onDidExecuteCommand(h=>{new Set([ap.Tab.id,ap.DeleteLeft.id,ap.DeleteRight.id,KV,"acceptSelectedSuggestion"]).has(h.commandId)&&e.hasTextFocus()&&this._enabled.get()&&wi(f=>{var m;(m=this.model.get())===null||m===void 0||m.trigger(f)})})),this._register(this.editor.onDidBlurEditorWidget(()=>{this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(62).keepOnBlur||xu.dropDownVisible||wi(h=>{var g;(g=this.model.get())===null||g===void 0||g.stop(h)})})),this._register(zt(h=>{var g;const f=(g=this.model.read(h))===null||g===void 0?void 0:g.state.read(h);f!=null&&f.suggestItem?f.ghostText.lineCount>=2&&this._suggestWidgetAdaptor.forceRenderingAbove():this._suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register(je(()=>{this._suggestWidgetAdaptor.stopForceRenderingAbove()}));let u;this._register(D0({handleChange:(h,g)=>(h.didChange(this._playAudioCueSignal)&&(u=void 0),!0)},async h=>{this._playAudioCueSignal.read(h);const g=this.model.read(h),f=g==null?void 0:g.state.read(h);if(!g||!f||!f.inlineCompletion){u=void 0;return}if(f.inlineCompletion.semanticId!==u){u=f.inlineCompletion.semanticId;const m=g.textModel.getLineContent(f.ghostText.lineNumber);this._audioCueService.playAudioCue(gt.inlineSuggestion).then(()=>{this.editor.getOption(8)&&this.provideScreenReaderUpdate(f.ghostText.renderForScreenReader(m))})}})),this._register(new TT(this.editor,this.model,this._instantiationService)),this._register(this._configurationService.onDidChangeConfiguration(h=>{h.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})})),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}playAudioCue(e){this._playAudioCueSignal.trigger(e)}provideScreenReaderUpdate(e){const t=this._contextKeyService.getContextKeyValue("accessibleViewIsShown"),i=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let n;!t&&i&&this.editor.getOption(147)&&(n=p("showAccessibleViewHint","Inspect this in the accessible view ({0})",i.getAriaLabel())),mo(n?e+", "+n:e)}updateObservables(e,t){var i,n;const s=this.editor.getModel();this._textModelVersionId.set((i=s==null?void 0:s.getVersionId())!==null&&i!==void 0?i:-1,e,t),this._cursorPosition.set((n=this.editor.getPosition())!==null&&n!==void 0?n:new z(1,1),e)}shouldShowHoverAt(e){var t;const i=(t=this.model.get())===null||t===void 0?void 0:t.ghostText.get();return i?i.parts.some(n=>e.containsPosition(new z(i.lineNumber,n.column))):!1}shouldShowHoverAtViewZone(e){return this._ghostTextWidget.ownsViewZone(e)}};Xo.ID="editor.contrib.inlineCompletionsController";Xo=c2=Iwe([rc(1,qe),rc(2,Xe),rc(3,Dt),rc(4,Ri),rc(5,wr),rc(6,Me),rc(7,y0),rc(8,Xt)],Xo);class eD extends Te{constructor(){super({id:eD.ID,label:p("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:ae.and(T.writable,Tn.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}async run(e,t){var i;const n=Xo.get(t);(i=n==null?void 0:n.model.get())===null||i===void 0||i.next()}}eD.ID=GV;class tD extends Te{constructor(){super({id:tD.ID,label:p("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:ae.and(T.writable,Tn.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}async run(e,t){var i;const n=Xo.get(t);(i=n==null?void 0:n.model.get())===null||i===void 0||i.previous()}}tD.ID=qV;class Ewe extends Te{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:p("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:T.writable})}async run(e,t){const i=Xo.get(t);await Bge(async n=>{var s;await((s=i==null?void 0:i.model.get())===null||s===void 0?void 0:s.triggerExplicitly(n)),i==null||i.playAudioCue(n)})}}class Nwe extends Te{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:p("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:ae.and(T.writable,Tn.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:ae.and(T.writable,Tn.inlineSuggestionVisible)},menuOpts:[{menuId:N.InlineSuggestionToolbar,title:p("acceptWord","Accept Word"),group:"primary",order:2}]})}async run(e,t){var i;const n=Xo.get(t);await((i=n==null?void 0:n.model.get())===null||i===void 0?void 0:i.acceptNextWord(n.editor))}}class Twe extends Te{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:p("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:ae.and(T.writable,Tn.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:N.InlineSuggestionToolbar,title:p("acceptLine","Accept Line"),group:"secondary",order:2}]})}async run(e,t){var i;const n=Xo.get(t);await((i=n==null?void 0:n.model.get())===null||i===void 0?void 0:i.acceptNextLine(n.editor))}}class Mwe extends Te{constructor(){super({id:KV,label:p("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:Tn.inlineSuggestionVisible,menuOpts:[{menuId:N.InlineSuggestionToolbar,title:p("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:ae.and(Tn.inlineSuggestionVisible,T.tabMovesFocus.toNegated(),Tn.inlineSuggestionHasIndentationLessThanTabSize,dt.Visible.toNegated(),T.hoverFocused.toNegated())}})}async run(e,t){var i;const n=Xo.get(t);n&&((i=n.model.get())===null||i===void 0||i.accept(n.editor),n.editor.focus())}}class iD extends Te{constructor(){super({id:iD.ID,label:p("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:Tn.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}async run(e,t){const i=Xo.get(t);wi(n=>{var s;(s=i==null?void 0:i.model.get())===null||s===void 0||s.stop(n)})}}iD.ID="editor.action.inlineSuggest.hide";class nD extends Qo{constructor(){super({id:nD.ID,title:p("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:N.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:ae.equals("config.editor.inlineSuggest.showToolbar","always")})}async run(e,t){const i=e.get(Dt),s=i.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";i.updateValue("editor.inlineSuggest.showToolbar",s)}}nD.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar";var Awe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},l_=function(o,e){return function(t,i){e(t,i,o)}};class Rwe{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let u2=class{constructor(e,t,i,n,s,r){this._editor=e,this._languageService=t,this._openerService=i,this.accessibilityService=n,this._instantiationService=s,this._telemetryService=r,this.hoverOrdinal=4}suggestHoverAnchor(e){const t=Xo.get(this._editor);if(!t)return null;const i=e.target;if(i.type===8){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new $1(1e3,this,k.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}return i.type===7&&t.shouldShowHoverAt(i.range)?new $1(1e3,this,i.range,e.event.posx,e.event.posy,!1):i.type===6&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range)?new $1(1e3,this,i.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if(this._editor.getOption(62).showToolbar!=="onHover")return[];const i=Xo.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new Rwe(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new de,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&this.renderScreenReaderText(e,n,i);const s=n.controller.model.get(),r=this._instantiationService.createInstance(xu,this._editor,!1,SS(null),s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.selectedInlineCompletion.map(a=>{var l;return(l=a==null?void 0:a.inlineCompletion.source.inlineCompletions.commands)!==null&&l!==void 0?l:[]}));return e.fragment.appendChild(r.getDomNode()),s.triggerExplicitly(),i.add(r),i}renderScreenReaderText(e,t,i){const n=pe,s=n("div.hover-row.markdown-hover"),r=le(s,n("div.hover-contents",{"aria-live":"assertive"})),a=i.add(new Ud({editor:this._editor},this._languageService,this._openerService)),l=d=>{i.add(a.onDidRenderAsync(()=>{r.className="hover-contents code-hover-contents",e.onContentsChanged()}));const c=p("inlineSuggestionFollows","Suggestion:"),u=i.add(a.render(new as().appendText(c).appendCodeblock("text",d)));r.replaceChildren(u.element)};i.add(zt(d=>{var c;const u=(c=t.controller.model.read(d))===null||c===void 0?void 0:c.ghostText.read(d);if(u){const h=this._editor.getModel().getLineContent(u.lineNumber);l(u.renderForScreenReader(h))}else es(r)})),e.fragment.appendChild(s)}};u2=Awe([l_(1,bi),l_(2,So),l_(3,Zl),l_(4,qe),l_(5,vo)],u2);At(Xo.ID,Xo,3);_e(Ewe);_e(eD);_e(tD);_e(Nwe);_e(Twe);_e(Mwe);_e(iD);mi(nD);jg.register(u2);function to(o,e){let t=0;for(let i=0;i=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Owe=function(o,e){return function(t,i){e(t,i,o)}};function AH(o,e,t,i,n){if(o.getLineCount()===1&&o.getLineMaxColumn(1)===1)return[];const s=e.getLanguageConfiguration(o.getLanguageId()).indentationRules;if(!s)return[];for(i=Math.min(i,o.getLineCount());t<=i&&s.unIndentedLinePattern;){const v=o.getLineContent(t);if(!s.unIndentedLinePattern.test(v))break;t++}if(t>i-1)return[];const{tabSize:r,indentSize:a,insertSpaces:l}=o.getOptions(),d=(v,_)=>(_=_||1,rr.shiftIndent(v,v.length+_,r,a,l)),c=(v,_)=>(_=_||1,rr.unshiftIndent(v,v.length+_,r,a,l)),u=[];let h;const g=o.getLineContent(t);let f=g;h=ii(g);let m=h;s.increaseIndentPattern&&s.increaseIndentPattern.test(f)?(m=d(m),h=d(h)):s.indentNextLinePattern&&s.indentNextLinePattern.test(f)&&(m=d(m)),t++;for(let v=t;v<=i;v++){const _=o.getLineContent(v),b=ii(_),C=m+_.substring(b.length);s.decreaseIndentPattern&&s.decreaseIndentPattern.test(C)&&(m=c(m),h=c(h)),b!==m&&u.push(Li.replaceMove(new Ae(v,1,v,b.length+1),iA(m,a,l))),!(s.unIndentedLinePattern&&s.unIndentedLinePattern.test(_))&&(s.increaseIndentPattern&&s.increaseIndentPattern.test(C)?(h=d(h),m=h):s.indentNextLinePattern&&s.indentNextLinePattern.test(C)?m=d(m):m=h)}return u}class sD extends Te{constructor(){super({id:sD.ID,label:p("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:T.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const r=new Vwe(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}sD.ID="editor.action.indentationToSpaces";class oD extends Te{constructor(){super({id:oD.ID,label:p("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:T.writable})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const r=new Hwe(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}oD.ID="editor.action.indentationToTabs";class rP extends Te{constructor(e,t,i){super(i),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){const i=e.get(Ha),n=e.get(Si),s=t.getModel();if(!s)return;const r=n.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget),a=s.getOptions(),l=[1,2,3,4,5,6,7,8].map(c=>({id:c.toString(),label:c.toString(),description:c===r.tabSize&&c===a.tabSize?p("configuredTabSize","Configured Tab Size"):c===r.tabSize?p("defaultTabSize","Default Tab Size"):c===a.tabSize?p("currentTabSize","Current Tab Size"):void 0})),d=Math.min(s.getOptions().tabSize-1,7);setTimeout(()=>{i.pick(l,{placeHolder:p({},"Select Tab Size for Current File"),activeItem:l[d]}).then(c=>{if(c&&s&&!s.isDisposed()){const u=parseInt(c.label,10);this.displaySizeOnly?s.updateOptions({tabSize:u}):s.updateOptions({tabSize:u,indentSize:u,insertSpaces:this.insertSpaces})}})},50)}}class rD extends rP{constructor(){super(!1,!1,{id:rD.ID,label:p("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}rD.ID="editor.action.indentUsingTabs";class aD extends rP{constructor(){super(!0,!1,{id:aD.ID,label:p("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}aD.ID="editor.action.indentUsingSpaces";class lD extends rP{constructor(){super(!0,!0,{id:lD.ID,label:p("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0})}}lD.ID="editor.action.changeTabDisplaySize";class dD extends Te{constructor(){super({id:dD.ID,label:p("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const i=e.get(Si),n=t.getModel();if(!n)return;const s=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(s.insertSpaces,s.tabSize)}}dD.ID="editor.action.detectIndentation";class Fwe extends Te{constructor(){super({id:"editor.action.reindentlines",label:p("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:T.writable})}run(e,t){const i=e.get(si),n=t.getModel();if(!n)return;const s=AH(n,i,1,n.getLineCount());s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class Bwe extends Te{constructor(){super({id:"editor.action.reindentselectedlines",label:p("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:T.writable})}run(e,t){const i=e.get(si),n=t.getModel();if(!n)return;const s=t.getSelections();if(s===null)return;const r=[];for(const a of s){let l=a.startLineNumber,d=a.endLineNumber;if(l!==d&&a.endColumn===1&&d--,l===1){if(l===d)continue}else l--;const c=AH(n,i,l,d);r.push(...c)}r.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop())}}class Wwe{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const i of e)i.range&&typeof i.text=="string"&&this._edits.push(i)}getEditOperations(e,t){for(const n of this._edits)t.addEditOperation(k.lift(n.range),n.text);let i=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let Rb=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new de,this.callOnModel=new de,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(12)<4||this.editor.getOption(55))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){const t=this.editor.getSelections();if(t===null||t.length>1)return;const i=this.editor.getModel();if(!i||!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(12),{tabSize:s,indentSize:r,insertSpaces:a}=i.getOptions(),l=[],d={shiftIndent:g=>rr.shiftIndent(g,g.length+1,s,r,a),unshiftIndent:g=>rr.unshiftIndent(g,g.length+1,s,r,a)};let c=e.startLineNumber;for(;c<=e.endLineNumber;){if(this.shouldIgnoreLine(i,c)){c++;continue}break}if(c>e.endLineNumber)return;let u=i.getLineContent(c);if(!/\S/.test(u.substring(0,e.startColumn-1))){const g=z_(n,i,i.getLanguageId(),c,d,this._languageConfigurationService);if(g!==null){const f=ii(u),m=to(g,s),v=to(f,s);if(m!==v){const _=cv(m,s,a);l.push({range:new k(c,1,c,f.length+1),text:_}),u=_+u.substr(f.length)}else{const _=oB(i,c,this._languageConfigurationService);if(_===0||_===8)return}}}const h=c;for(;ci.tokenization.getLineTokens(m),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(m,v)=>i.getLanguageIdAtPosition(m,v)},getLineContent:m=>m===h?u:i.getLineContent(m)},i.getLanguageId(),c+1,d,this._languageConfigurationService);if(f!==null){const m=to(f,s),v=to(ii(i.getLineContent(c+1)),s);if(m!==v){const _=m-v;for(let b=c+1;b<=e.endLineNumber;b++){const C=i.getLineContent(b),w=ii(C),x=to(w,s)+_,y=cv(x,s,a);y!==w&&l.push({range:new k(b,1,b,w.length+1),text:y})}}}}if(l.length>0){this.editor.pushUndoStop();const g=new Wwe(l,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",g),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const i=e.getLineFirstNonWhitespaceColumn(t);if(i===0)return!0;const n=e.tokenization.getLineTokens(t);if(n.getCount()>0){const s=n.findTokenIndexAtOffset(i);if(s>=0&&n.getStandardTokenType(s)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};Rb.ID="editor.contrib.autoIndentOnPaste";Rb=Pwe([Owe(1,si)],Rb);function RH(o,e,t,i){if(o.getLineCount()===1&&o.getLineMaxColumn(1)===1)return;let n="";for(let r=0;rthis._currentResolve=void 0)),await this._currentResolve}}async _doResolve(e){var t,i;try{const n=await Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=(t=n==null?void 0:n.tooltip)!==null&&t!==void 0?t:this.hint.tooltip,this.hint.label=(i=n==null?void 0:n.label)!==null&&i!==void 0?i:this.hint.label,this._isResolved=!0}catch(n){en(n),this._isResolved=!1}}}class Pb{static async create(e,t,i,n){const s=[],r=e.ordered(t).reverse().map(a=>i.map(async l=>{try{const d=await a.provideInlayHints(t,l,n);d!=null&&d.hints.length&&s.push([d,a])}catch(d){en(d)}}));if(await Promise.all(r.flat()),n.isCancellationRequested||t.isDisposed())throw new Mu;return new Pb(i,s,t)}constructor(e,t,i){this._disposables=new de,this.ranges=e,this.provider=new Set;const n=[];for(const[s,r]of t){this._disposables.add(s),this.provider.add(r);for(const a of s.hints){const l=i.validatePosition(a.position);let d="before";const c=Pb._getRangeAtPosition(i,l);let u;c.getStartPosition().isBefore(l)?(u=k.fromPositions(c.getStartPosition(),l),d="after"):(u=k.fromPositions(l,c.getEndPosition()),d="before"),n.push(new aP(a,new PH(u,d),r))}}this.items=n.sort((s,r)=>z.compare(s.hint.position,r.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new k(i,n.startColumn,i,n.endColumn);e.tokenization.tokenizeIfCheap(i);const s=e.tokenization.getLineTokens(i),r=t.column-1,a=s.findTokenIndexAtOffset(r);let l=s.getStartOffset(a),d=s.getEndOffset(a);return d-l===1&&(l===r&&a>1?(l=s.getStartOffset(a-1),d=s.getEndOffset(a-1)):d===r&&aLf(f)?f.command.id:HL()));for(const f of bs.all())h.has(f.desc.id)&&u.push(new Rs(f.desc.id,Ur.label(f.desc,{renderShortTitle:!0}),void 0,!0,async()=>{const m=await s.createModelReference(c.uri);try{const v=new em(m.object.textEditorModel,k.getStartPosition(c.range)),_=i.item.anchor.range;await l.invokeFunction(f.runEditorCommand.bind(f),e,v,_)}finally{m.dispose()}}));if(i.part.command){const{command:f}=i.part;u.push(new Mn),u.push(new Rs(f.id,f.title,void 0,!0,async()=>{var m;try{await a.executeCommand(f.id,...(m=f.arguments)!==null&&m!==void 0?m:[])}catch(v){d.notify({severity:Zy.Error,source:i.item.provider.displayName,message:v})}}))}const g=e.getOption(126);r.showContextMenu({domForShadowRoot:g&&(n=e.getDomNode())!==null&&n!==void 0?n:void 0,getAnchor:()=>{const f=gn(t);return{x:f.left,y:f.top+f.height+8}},getActions:()=>u,onHide:()=>{e.focus()},autoSelectFirstItem:!0})}async function OH(o,e,t,i){const s=await o.get(Xs).createModelReference(i.uri);await t.invokeWithinContext(async r=>{const a=e.hasSideBySideModifier,l=r.get(Xe),d=Zs.inPeekEditor.getValue(l),c=!a&&t.getOption(87)&&!d;return new P0({openToSide:a,openInPeek:c,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(r,new em(s.object.textEditorModel,k.getStartPosition(i.range)),k.lift(i.range))}),s.dispose()}var Uwe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uf=function(o,e){return function(t,i){e(t,i,o)}},q1;class YS{constructor(){this._entries=new Pu(50)}get(e){const t=YS._key(e);return this._entries.get(t)}set(e,t){const i=YS._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const FH=bt("IInlayHintsCache");xt(FH,YS,1);class h2{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}}class jwe{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}let Lg=q1=class{static get(e){var t;return(t=e.getContribution(q1.ID))!==null&&t!==void 0?t:void 0}constructor(e,t,i,n,s,r,a){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=n,this._commandService=s,this._notificationService=r,this._instaService=a,this._disposables=new de,this._sessionDisposables=new de,this._decorationsMetadata=new Map,this._ruleFactory=new o0(this._editor),this._activeRenderMode=0,this._debounceInfo=i.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(l=>{l.hasChanged(139)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(139);if(e.enabled==="off")return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;const i=this._inlayHintsCache.get(t);i&&this._updateHintsDecorators([t.getFullModelRange()],i),this._sessionDisposables.add(je(()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)}));let n;const s=new Set,r=new Yt(async()=>{const a=Date.now();n==null||n.dispose(!0),n=new tn;const l=t.onWillDispose(()=>n==null?void 0:n.cancel());try{const d=n.token,c=await Pb.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),d);if(r.delay=this._debounceInfo.update(t,Date.now()-a),d.isCancellationRequested){c.dispose();return}for(const u of c.provider)typeof u.onDidChangeInlayHints=="function"&&!s.has(u)&&(s.add(u),this._sessionDisposables.add(u.onDidChangeInlayHints(()=>{r.isScheduled()||r.schedule()})));this._sessionDisposables.add(c),this._updateHintsDecorators(c.ranges,c.items),this._cacheHintsForFastRestore(t)}catch(d){nt(d)}finally{n.dispose(),l.dispose()}},this._debounceInfo.get(t));if(this._sessionDisposables.add(r),this._sessionDisposables.add(je(()=>n==null?void 0:n.dispose(!0))),r.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(a=>{(a.scrollTopChanged||!r.isScheduled())&&r.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(a=>{const l=Math.max(r.delay,1250);r.schedule(l)})),e.enabled==="on")this._activeRenderMode=0;else{let a,l;e.enabled==="onUnlessPressed"?(a=0,l=1):(a=1,l=0),this._activeRenderMode=a,this._sessionDisposables.add(Dd.getInstance().event(d=>{if(!this._editor.hasModel())return;const c=d.altKey&&d.ctrlKey&&!(d.shiftKey||d.metaKey)?l:a;if(c!==this._activeRenderMode){this._activeRenderMode=c;const u=this._editor.getModel(),h=this._copyInlayHintsWithCurrentAnchor(u);this._updateHintsDecorators([u.getFullModelRange()],h),r.schedule(0)}}))}this._sessionDisposables.add(this._installDblClickGesture(()=>r.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new de,t=e.add(new ML(this._editor)),i=new de;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown(n=>{const[s]=n,r=this._getInlayHintLabelPart(s),a=this._editor.getModel();if(!r||!a){i.clear();return}const l=new tn;i.add(je(()=>l.dispose(!0))),r.item.resolve(l.token),this._activeInlayHintPart=r.part.command||r.part.location?new jwe(r,s.hasTriggerModifier):void 0;const d=a.validatePosition(r.item.hint.position).lineNumber,c=new k(d,1,d,a.getLineMaxColumn(d)),u=this._getInlineHintsForRange(c);this._updateHintsDecorators([c],u),i.add(je(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([c],u)}))})),e.add(t.onCancel(()=>i.clear())),e.add(t.onExecute(async n=>{const s=this._getInlayHintLabelPart(n);if(s){const r=s.part;r.location?this._instaService.invokeFunction(OH,n,this._editor,r.location):Hk.is(r.command)&&await this._invokeCommand(r.command,s.item)}})),e}_getInlineHintsForRange(e){const t=new Set;for(const i of this._decorationsMetadata.values())e.containsRange(i.item.anchor.range)&&t.add(i.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp(async t=>{if(t.event.detail!==2)return;const i=this._getInlayHintLabelPart(t);if(i&&(t.event.preventDefault(),await i.item.resolve(vt.None),ls(i.item.hint.textEdits))){const n=i.item.hint.textEdits.map(s=>Li.replace(k.lift(s.range),s.text));this._editor.executeEdits("inlayHint.default",n),e()}})}_installContextMenu(){return this._editor.onContextMenu(async e=>{if(!(e.event.target instanceof HTMLElement))return;const t=this._getInlayHintLabelPart(e);t&&await this._instaService.invokeFunction($we,this._editor,e.event.target,t)})}_getInlayHintLabelPart(e){var t;if(e.target.type!==6)return;const i=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;if(i instanceof _u&&(i==null?void 0:i.attachedData)instanceof h2)return i.attachedData}async _invokeCommand(e,t){var i;try{await this._commandService.executeCommand(e.id,...(i=e.arguments)!==null&&i!==void 0?i:[])}catch(n){this._notificationService.notify({severity:Zy.Error,source:t.provider.displayName,message:n})}}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[i,n]of this._decorationsMetadata){if(t.has(n.item))continue;const s=e.getDecorationRange(i);if(s){const r=new PH(s,n.item.anchor.direction),a=n.item.with({anchor:r});t.set(n.item,a)}}return Array.from(t.values())}_getHintsRanges(){const t=this._editor.getModel(),i=this._editor.getVisibleRangesPlusViewportAboveBelow(),n=[];for(const s of i.sort(k.compareRangesUsingStarts)){const r=t.validateRange(new k(s.startLineNumber-30,s.startColumn,s.endLineNumber+30,s.endColumn));n.length===0||!k.areIntersectingOrTouching(n[n.length-1],r)?n.push(r):n[n.length-1]=k.plusRange(n[n.length-1],r)}return n}_updateHintsDecorators(e,t){var i,n;const s=[],r=(m,v,_,b,C)=>{const w={content:_,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:v.className,cursorStops:b,attachedData:C};s.push({item:m,classNameRef:v,decoration:{range:m.anchor.range,options:{description:"InlayHint",showIfCollapsed:m.anchor.range.isEmpty(),collapseOnReplaceEdit:!m.anchor.range.isEmpty(),stickiness:0,[m.anchor.direction]:this._activeRenderMode===0?w:void 0}}})},a=(m,v)=>{const _=this._ruleFactory.createClassNameRef({width:`${l/3|0}px`,display:"inline-block"});r(m,_," ",v?Sa.Right:Sa.None)},{fontSize:l,fontFamily:d,padding:c,isUniform:u}=this._getLayoutInfo(),h="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(h,d);for(const m of t){m.hint.paddingLeft&&a(m,!1);const v=typeof m.hint.label=="string"?[{label:m.hint.label}]:m.hint.label;for(let _=0;_q1._MAX_DECORATORS)break}const g=[];for(const m of e)for(const{id:v}of(n=this._editor.getDecorationsInRange(m))!==null&&n!==void 0?n:[]){const _=this._decorationsMetadata.get(v);_&&(g.push(v),_.classNameRef.dispose(),this._decorationsMetadata.delete(v))}const f=Ra.capture(this._editor);this._editor.changeDecorations(m=>{const v=m.deltaDecorations(g,s.map(_=>_.decoration));for(let _=0;_i)&&(s=i);const r=e.fontFamily||n;return{fontSize:s,fontFamily:r,padding:t,isUniform:!t&&r===n&&s===i}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};Lg.ID="editor.contrib.InlayHints";Lg._MAX_DECORATORS=1500;Lg=q1=Uwe([uf(1,Me),uf(2,wr),uf(3,FH),uf(4,Ri),uf(5,sn),uf(6,qe)],Lg);function Kwe(o){return o.replace(/[ \t]/g," ")}Et.registerCommand("_executeInlayHintProvider",async(o,...e)=>{const[t,i]=e;qt(ze.isUri(t)),qt(k.isIRange(i));const{inlayHintsProvider:n}=o.get(Me),s=await o.get(Xs).createModelReference(t);try{const r=await Pb.create(n,s.object.textEditorModel,[k.lift(i)],vt.None),a=r.items.map(l=>l.hint);return setTimeout(()=>r.dispose(),0),a}finally{s.dispose()}});var qwe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},d_=function(o,e){return function(t,i){e(t,i,o)}};class l9 extends $1{constructor(e,t,i,n){super(10,t,e.item.anchor.range,i,n,!0),this.part=e}}let g2=class extends BS{constructor(e,t,i,n,s,r){super(e,t,i,n,r),this._resolverService=s,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!Lg.get(this._editor)||e.target.type!==6)return null;const n=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;return n instanceof _u&&n.attachedData instanceof h2?new l9(n.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,i){return e instanceof l9?new rn(async n=>{const{part:s}=e;if(await s.item.resolve(i),i.isCancellationRequested)return;let r;typeof s.item.hint.tooltip=="string"?r=new as().appendText(s.item.hint.tooltip):s.item.hint.tooltip&&(r=s.item.hint.tooltip),r&&n.emitOne(new ba(this,e.range,[r],!1,0)),ls(s.item.hint.textEdits)&&n.emitOne(new ba(this,e.range,[new as().appendText(p("hint.dbl","Double-click to insert"))],!1,10001));let a;if(typeof s.part.tooltip=="string"?a=new as().appendText(s.part.tooltip):s.part.tooltip&&(a=s.part.tooltip),a&&n.emitOne(new ba(this,e.range,[a],!1,1)),s.part.location||s.part.command){let d;const u=this._editor.getOption(77)==="altKey"?It?p("links.navigate.kb.meta.mac","cmd + click"):p("links.navigate.kb.meta","ctrl + click"):It?p("links.navigate.kb.alt.mac","option + click"):p("links.navigate.kb.alt","alt + click");s.part.location&&s.part.command?d=new as().appendText(p("hint.defAndCommand","Go to Definition ({0}), right click for more",u)):s.part.location?d=new as().appendText(p("hint.def","Go to Definition ({0})",u)):s.part.command&&(d=new as(`[${p("hint.cmd","Execute Command")}](${zwe(s.part.command)} "${s.part.command.title}") (${u})`,{isTrusted:!0})),d&&n.emitOne(new ba(this,e.range,[d],!1,1e4))}const l=await this._resolveInlayHintLabelPartHover(s,i);for await(const d of l)n.emitOne(d)}):rn.EMPTY}async _resolveInlayHintLabelPartHover(e,t){if(!e.part.location)return rn.EMPTY;const{uri:i,range:n}=e.part.location,s=await this._resolverService.createModelReference(i);try{const r=s.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(r)?WR(this._languageFeaturesService.hoverProvider,r,new z(n.startLineNumber,n.startColumn),t).filter(a=>!Up(a.hover.contents)).map(a=>new ba(this,e.item.anchor.range,a.hover.contents,!1,2+a.ordinal)):rn.EMPTY}finally{s.dispose()}}};g2=qwe([d_(1,bi),d_(2,So),d_(3,Dt),d_(4,Xs),d_(5,Me)],g2);At(Lg.ID,Lg,1);jg.register(g2);class Gwe{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const n=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new Ae(n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn),n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn)):new Ae(n.endLineNumber,n.endColumn-this._text.length,n.endLineNumber,n.endColumn)}}var Zwe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ywe=function(o,e){return function(t,i){e(t,i,o)}},G1;let Iu=G1=class{static get(e){return e.getContribution(G1.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var i;(i=this.currentRequest)===null||i===void 0||i.cancel();const n=this.editor.getSelection(),s=this.editor.getModel();if(!s||!n)return;let r=n;if(r.startLineNumber!==r.endLineNumber)return;const a=new xW(this.editor,5),l=s.uri;return this.editorWorkerService.canNavigateValueSet(l)?(this.currentRequest=_n(d=>this.editorWorkerService.navigateValueSet(l,r,t)),this.currentRequest.then(d=>{var c;if(!d||!d.range||!d.value||!a.validate(this.editor))return;const u=k.lift(d.range);let h=d.range;const g=d.value.length-(r.endColumn-r.startColumn);h={startLineNumber:h.startLineNumber,startColumn:h.startColumn,endLineNumber:h.endLineNumber,endColumn:h.startColumn+d.value.length},g>1&&(r=new Ae(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn+g-1));const f=new Gwe(u,r,d.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,f),this.editor.pushUndoStop(),this.decorations.set([{range:h,options:G1.DECORATION}]),(c=this.decorationRemover)===null||c===void 0||c.cancel(),this.decorationRemover=au(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(nt)}).catch(nt)):Promise.resolve(void 0)}};Iu.ID="editor.contrib.inPlaceReplaceController";Iu.DECORATION=st.register({description:"in-place-replace",className:"valueSetReplacement"});Iu=G1=Zwe([Ywe(1,Qr)],Iu);class Xwe extends Te{constructor(){super({id:"editor.action.inPlaceReplace.up",label:p("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:3159,weight:100}})}run(e,t){const i=Iu.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}class Qwe extends Te{constructor(){super({id:"editor.action.inPlaceReplace.down",label:p("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:3161,weight:100}})}run(e,t){const i=Iu.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}At(Iu.ID,Iu,4);_e(Xwe);_e(Qwe);class Jwe extends Te{constructor(){super({id:"expandLineSelection",label:p("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:T.textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;const n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(i.source,3,On.expandLineSelection(n,n.getCursorStates())),n.revealPrimaryCursor(i.source,!0)}}_e(Jwe);class eSe{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){const i=tSe(e,this._cursors);for(let n=0,s=i.length;nr.lineNumber===a.lineNumber?r.column-a.column:r.lineNumber-a.lineNumber);for(let r=e.length-2;r>=0;r--)e[r].lineNumber===e[r+1].lineNumber&&e.splice(r,1);const t=[];let i=0,n=0;const s=e.length;for(let r=1,a=o.getLineCount();r<=a;r++){const l=o.getLineContent(r),d=l.length+1;let c=0;if(n=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Jwe=function(o,e){return function(t,i){e(t,i,o)}};let f2=class{constructor(e,t,i,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){const i=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===i){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let n=this._selection;n.startLineNumbere.tokenization.getLineTokens(c),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(c,u)=>e.getLanguageIdAtPosition(c,u)},getLineContent:null};if(n.startLineNumber===n.endLineNumber&&e.getLineMaxColumn(n.startLineNumber)===1){const c=n.startLineNumber,u=this._isMovingDown?c+1:c-1;e.getLineMaxColumn(u)===1?t.addEditOperation(new k(1,1,1,1),null):(t.addEditOperation(new k(c,1,c,1),e.getLineContent(u)),t.addEditOperation(new k(u,1,u,e.getLineMaxColumn(u)),null)),n=new Re(u,1,u,1)}else{let c,u;if(this._isMovingDown){c=n.endLineNumber+1,u=e.getLineContent(c),t.addEditOperation(new k(c-1,e.getLineMaxColumn(c-1),c,e.getLineMaxColumn(c)),null);let h=u;if(this.shouldAutoIndent(e,n)){const g=this.matchEnterRule(e,l,s,c,n.startLineNumber-1);if(g!==null){const m=ii(e.getLineContent(c)),v=g+to(m,s);h=cv(v,s,a)+this.trimStart(u)}else{d.getLineContent=v=>v===n.startLineNumber?e.getLineContent(c):e.getLineContent(v);const m=z_(this._autoIndent,d,e.getLanguageIdAtPosition(c,1),n.startLineNumber,l,this._languageConfigurationService);if(m!==null){const v=ii(e.getLineContent(c)),_=to(m,s),b=to(v,s);_!==b&&(h=cv(_,s,a)+this.trimStart(u))}}t.addEditOperation(new k(n.startLineNumber,1,n.startLineNumber,1),h+` +`+s),this._selectionId=t.trackSelection(i),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let n=i.startLineNumber,s=i.startColumn,r=i.endLineNumber,a=i.endColumn;this._startLineNumberDelta!==0&&(n=n+this._startLineNumberDelta,s=1),this._endLineNumberDelta!==0&&(r=r+this._endLineNumberDelta,a=1),i=Ae.createWithDirection(n,s,r,a,this._selectionDirection)}return i}}var iSe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nSe=function(o,e){return function(t,i){e(t,i,o)}};let f2=class{constructor(e,t,i,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){const i=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===i){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let n=this._selection;n.startLineNumbere.tokenization.getLineTokens(c),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(c,u)=>e.getLanguageIdAtPosition(c,u)},getLineContent:null};if(n.startLineNumber===n.endLineNumber&&e.getLineMaxColumn(n.startLineNumber)===1){const c=n.startLineNumber,u=this._isMovingDown?c+1:c-1;e.getLineMaxColumn(u)===1?t.addEditOperation(new k(1,1,1,1),null):(t.addEditOperation(new k(c,1,c,1),e.getLineContent(u)),t.addEditOperation(new k(u,1,u,e.getLineMaxColumn(u)),null)),n=new Ae(u,1,u,1)}else{let c,u;if(this._isMovingDown){c=n.endLineNumber+1,u=e.getLineContent(c),t.addEditOperation(new k(c-1,e.getLineMaxColumn(c-1),c,e.getLineMaxColumn(c)),null);let h=u;if(this.shouldAutoIndent(e,n)){const g=this.matchEnterRule(e,l,s,c,n.startLineNumber-1);if(g!==null){const m=ii(e.getLineContent(c)),v=g+to(m,s);h=cv(v,s,a)+this.trimStart(u)}else{d.getLineContent=v=>v===n.startLineNumber?e.getLineContent(c):e.getLineContent(v);const m=z_(this._autoIndent,d,e.getLanguageIdAtPosition(c,1),n.startLineNumber,l,this._languageConfigurationService);if(m!==null){const v=ii(e.getLineContent(c)),_=to(m,s),b=to(v,s);_!==b&&(h=cv(_,s,a)+this.trimStart(u))}}t.addEditOperation(new k(n.startLineNumber,1,n.startLineNumber,1),h+` `);const f=this.matchEnterRuleMovingDown(e,l,s,n.startLineNumber,c,h);if(f!==null)f!==0&&this.getIndentEditsOfMovingBlock(e,t,n,s,a,f);else{d.getLineContent=v=>v===n.startLineNumber?h:v>=n.startLineNumber+1&&v<=n.endLineNumber+1?e.getLineContent(v-1):e.getLineContent(v);const m=z_(this._autoIndent,d,e.getLanguageIdAtPosition(c,1),n.startLineNumber+1,l,this._languageConfigurationService);if(m!==null){const v=ii(e.getLineContent(n.startLineNumber)),_=to(m,s),b=to(v,s);if(_!==b){const C=_-b;this.getIndentEditsOfMovingBlock(e,t,n,s,a,C)}}}}else t.addEditOperation(new k(n.startLineNumber,1,n.startLineNumber,1),h+` `)}else if(c=n.startLineNumber-1,u=e.getLineContent(c),t.addEditOperation(new k(c,1,c+1,1),null),t.addEditOperation(new k(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),` -`+u),this.shouldAutoIndent(e,n)){d.getLineContent=g=>g===c?e.getLineContent(n.startLineNumber):e.getLineContent(g);const h=this.matchEnterRule(e,l,s,n.startLineNumber,n.startLineNumber-2);if(h!==null)h!==0&&this.getIndentEditsOfMovingBlock(e,t,n,s,a,h);else{const g=z_(this._autoIndent,d,e.getLanguageIdAtPosition(n.startLineNumber,1),c,l,this._languageConfigurationService);if(g!==null){const f=ii(e.getLineContent(n.startLineNumber)),m=to(g,s),v=to(f,s);if(m!==v){const _=m-v;this.getIndentEditsOfMovingBlock(e,t,n,s,a,_)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>rr.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>rr.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,s){if(s){let r=s.indentation;s.indentAction===an.None||s.indentAction===an.Indent?r=s.indentation+s.appendText:s.indentAction===an.IndentOutdent?r=s.indentation:s.indentAction===an.Outdent&&(r=t.unshiftIndent(s.indentation)+s.appendText);const a=e.getLineContent(n);if(this.trimStart(a).indexOf(this.trimStart(r))>=0){const l=ii(e.getLineContent(n));let d=ii(r);const c=oB(e,n,this._languageConfigurationService);c!==null&&c&2&&(d=t.unshiftIndent(d));const u=to(d,i),h=to(l,i);return u-h}}return null}matchEnterRuleMovingDown(e,t,i,n,s,r){if(Da(r)>=0){const a=e.getLineMaxColumn(s),l=rp(this._autoIndent,e,new k(s,a,s,a),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,l)}else{let a=n-1;for(;a>=1;){const c=e.getLineContent(a);if(Da(c)>=0)break;a--}if(a<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(a),d=rp(this._autoIndent,e,new k(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,d)}}matchEnterRule(e,t,i,n,s,r){let a=s;for(;a>=1;){let c;if(a===s&&r!==void 0?c=r:c=e.getLineContent(a),Da(c)>=0)break;a--}if(a<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(a),d=rp(this._autoIndent,e,new k(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,d)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1),n=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(i!==n||this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,i,n,s,r){for(let a=i.startLineNumber;a<=i.endLineNumber;a++){const l=e.getLineContent(a),d=ii(l),u=to(d,n)+r,h=cv(u,n,s);h!==d&&(t.addEditOperation(new k(a,1,a,d.length+1),h),a===i.endLineNumber&&i.endColumn<=d.length+1&&h===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber=n)return null;const s=[];for(let a=i;a<=n;a++)s.push(o.getLineContent(a));let r=s.slice(0);return r.sort(eu.getCollator().compare),t===!0&&(r=r.reverse()),{startLineNumber:i,endLineNumber:n,before:s,after:r}}function eSe(o,e,t){const i=WH(o,e,t);return i?Li.replace(new k(i.startLineNumber,1,i.endLineNumber,o.getLineMaxColumn(i.endLineNumber)),i.after.join(` -`)):null}class VH extends Te{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map((r,a)=>({selection:r,index:a,ignore:!1}));i.sort((r,a)=>k.compareRangesUsingStarts(r.selection,a.selection));let n=i[0];for(let r=1;rnew z(a.positionLineNumber,a.positionColumn)));const s=t.getSelection();if(s===null)return;const r=new Ywe(s,n);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop()}}cD.ID="editor.action.trimTrailingWhitespace";class dSe extends Te{constructor(){super({id:"editor.action.deleteLines",label:p("lines.delete","Delete Line"),alias:"Delete Line",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),n=t.getModel();if(n.getLineCount()===1&&n.getLineMaxColumn(1)===1)return;let s=0;const r=[],a=[];for(let l=0,d=i.length;l1&&(u-=1,g=n.getLineMaxColumn(u)),r.push(Li.replace(new Re(u,g,h,f),"")),a.push(new Re(u-s,c.positionColumn,u-s,c.positionColumn)),s+=c.endLineNumber-c.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,r,a),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map(s=>{let r=s.endLineNumber;return s.startLineNumbers.startLineNumber===r.startLineNumber?s.endLineNumber-r.endLineNumber:s.startLineNumber-r.startLineNumber);const i=[];let n=t[0];for(let s=1;s=t[s].startLineNumber?n.endLineNumber=t[s].endLineNumber:(i.push(n),n=t[s]);return i.push(n),i}}class cSe extends Te{constructor(){super({id:"editor.action.indentLines",label:p("lines.indent","Indent Line"),alias:"Indent Line",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:2142,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,yi.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class uSe extends Te{constructor(){super({id:"editor.action.outdentLines",label:p("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:2140,weight:100}})}run(e,t){ap.Outdent.runEditorCommand(e,t,null)}}class hSe extends Te{constructor(){super({id:"editor.action.insertLineBefore",label:p("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,yi.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class gSe extends Te{constructor(){super({id:"editor.action.insertLineAfter",label:p("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,yi.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class $H extends Te{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),s=[];for(let l=0,d=n.length-1;lLi.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,r),t.pushUndoStop()}}class fSe extends $H{constructor(){super({id:"deleteAllLeft",label:p("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];let s=0;return t.forEach(r=>{let a;if(r.endColumn===1&&s>0){const l=r.startLineNumber-s;a=new Re(l,r.startColumn,l,r.startColumn)}else a=new Re(r.startLineNumber,r.startColumn,r.startLineNumber,r.startColumn);s+=r.endLineNumber-r.startLineNumber,r.intersectRanges(e)?i=a:n.push(a)}),i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getSelections();if(t===null)return[];let i=t;const n=e.getModel();return n===null?[]:(i.sort(k.compareRangesUsingStarts),i=i.map(s=>{if(s.isEmpty())if(s.startColumn===1){const r=Math.max(1,s.startLineNumber-1),a=s.startLineNumber===1?1:n.getLineLength(r)+1;return new k(r,a,s.startLineNumber,1)}else return new k(s.startLineNumber,1,s.startLineNumber,s.startColumn);else return new k(s.startLineNumber,1,s.endLineNumber,s.endColumn)}),i)}}class pSe extends $H{constructor(){super({id:"deleteAllRight",label:p("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];for(let s=0,r=t.length,a=0;s{if(s.isEmpty()){const r=t.getLineMaxColumn(s.startLineNumber);return s.startColumn===r?new k(s.startLineNumber,s.startColumn,s.startLineNumber+1,1):new k(s.startLineNumber,s.startColumn,s.startLineNumber,r)}return s});return n.sort(k.compareRangesUsingStarts),n}}class mSe extends Te{constructor(){super({id:"editor.action.joinLines",label:p("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){const i=t.getSelections();if(i===null)return;let n=t.getSelection();if(n===null)return;i.sort(k.compareRangesUsingStarts);const s=[],r=i.reduce((h,g)=>h.isEmpty()?h.endLineNumber===g.startLineNumber?(n.equalsSelection(h)&&(n=g),g):g.startLineNumber>h.endLineNumber+1?(s.push(h),g):new Re(h.startLineNumber,h.startColumn,g.endLineNumber,g.endColumn):g.startLineNumber>h.endLineNumber?(s.push(h),g):new Re(h.startLineNumber,h.startColumn,g.endLineNumber,g.endColumn));s.push(r);const a=t.getModel();if(a===null)return;const l=[],d=[];let c=n,u=0;for(let h=0,g=s.length;h=1){let R=!0;S===""&&(R=!1),R&&(S.charAt(S.length-1)===" "||S.charAt(S.length-1)===" ")&&(R=!1,S=S.replace(/[\s\uFEFF\xA0]+$/g," "));const j=I.substr(E-1);S+=(R?" ":"")+j,R?_=j.length+1:_=j.length}else _=0}const x=new k(m,v,b,C);if(!x.isEmpty()){let y;f.isEmpty()?(l.push(Li.replace(x,S)),y=new Re(x.startLineNumber-u,S.length-_+1,m-u,S.length-_+1)):f.startLineNumber===f.endLineNumber?(l.push(Li.replace(x,S)),y=new Re(f.startLineNumber-u,f.startColumn,f.endLineNumber-u,f.endColumn)):(l.push(Li.replace(x,S)),y=new Re(f.startLineNumber-u,f.startColumn,f.startLineNumber-u,S.length-w)),k.intersectRanges(x,n)!==null?c=y:d.push(y)}u+=x.endLineNumber-x.startLineNumber}d.unshift(c),t.pushUndoStop(),t.executeEdits(this.id,l,d),t.pushUndoStop()}}class _Se extends Te{constructor(){super({id:"editor.action.transpose",label:p("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:T.writable})}run(e,t){const i=t.getSelections();if(i===null)return;const n=t.getModel();if(n===null)return;const s=[];for(let r=0,a=i.length;r=c){if(d.lineNumber===n.getLineCount())continue;const u=new k(d.lineNumber,Math.max(1,d.column-1),d.lineNumber+1,1),h=n.getValueInRange(u).split("").reverse().join("");s.push(new qn(new Re(d.lineNumber,Math.max(1,d.column-1),d.lineNumber+1,1),h))}else{const u=new k(d.lineNumber,Math.max(1,d.column-1),d.lineNumber,d.column+1),h=n.getValueInRange(u).split("").reverse().join("");s.push(new nA(u,h,new Re(d.lineNumber,d.column+1,d.lineNumber,d.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class Mm extends Te{run(e,t){const i=t.getSelections();if(i===null)return;const n=t.getModel();if(n===null)return;const s=t.getOption(129),r=[];for(const a of i)if(a.isEmpty()){const l=a.getStartPosition(),d=t.getConfiguredWordAtPosition(l);if(!d)continue;const c=new k(l.lineNumber,d.startColumn,l.lineNumber,d.endColumn),u=n.getValueInRange(c);r.push(Li.replace(c,this._modifyText(u,s)))}else{const l=n.getValueInRange(a);r.push(Li.replace(a,this._modifyText(l,s)))}t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop()}}class vSe extends Mm{constructor(){super({id:"editor.action.transformToUppercase",label:p("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:T.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class bSe extends Mm{constructor(){super({id:"editor.action.transformToLowercase",label:p("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:T.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class Kg{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch{}}return this._actual}isSupported(){return this.get()!==null}}class Ob extends Mm{constructor(){super({id:"editor.action.transformToTitlecase",label:p("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:T.writable})}_modifyText(e,t){const i=Ob.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,n=>n.toLocaleUpperCase()):e}}Ob.titleBoundary=new Kg("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class tu extends Mm{constructor(){super({id:"editor.action.transformToSnakecase",label:p("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:T.writable})}_modifyText(e,t){const i=tu.caseBoundary.get(),n=tu.singleLetters.get();return!i||!n?e:e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase()}}tu.caseBoundary=new Kg("(\\p{Ll})(\\p{Lu})","gmu");tu.singleLetters=new Kg("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class Fb extends Mm{constructor(){super({id:"editor.action.transformToCamelcase",label:p("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:T.writable})}_modifyText(e,t){const i=Fb.wordBoundary.get();if(!i)return e;const n=e.split(i);return n.shift()+n.map(r=>r.substring(0,1).toLocaleUpperCase()+r.substring(1)).join("")}}Fb.wordBoundary=new Kg("[_\\s-]","gm");class Vd extends Mm{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(t=>t.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:p("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:T.writable})}_modifyText(e,t){const i=Vd.caseBoundary.get(),n=Vd.singleLetters.get(),s=Vd.underscoreBoundary.get();return!i||!n||!s?e:e.replace(s,"$1-$3").replace(i,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase()}}Vd.caseBoundary=new Kg("(\\p{Ll})(\\p{Lu})","gmu");Vd.singleLetters=new Kg("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu");Vd.underscoreBoundary=new Kg("(\\S)(_)(\\S)","gm");_e(tSe);_e(iSe);_e(nSe);_e(sSe);_e(oSe);_e(rSe);_e(aSe);_e(lSe);_e(cD);_e(dSe);_e(cSe);_e(uSe);_e(hSe);_e(gSe);_e(fSe);_e(pSe);_e(mSe);_e(_Se);_e(vSe);_e(bSe);tu.caseBoundary.isSupported()&&tu.singleLetters.isSupported()&&_e(tu);Fb.wordBoundary.isSupported()&&_e(Fb);Ob.titleBoundary.isSupported()&&_e(Ob);Vd.isSupported()&&_e(Vd);var CSe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},r1=function(o,e){return function(t,i){e(t,i,o)}},Z1;const UH=new De("LinkedEditingInputVisible",!1),wSe="linked-editing-decoration";let Eu=Z1=class extends q{static get(e){return e.getContribution(Z1.ID)}constructor(e,t,i,n,s){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new de),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=UH.bindTo(t),this._debounceInformation=s.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new de),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(r=>{(r.hasChanged(69)||r.hasChanged(92))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){const t=this._editor.getModel(),i=t!==null&&(this._editor.getOption(69)||this._editor.getOption(92))&&this._providers.has(t);if(i===this._enabled&&!e||(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||t===null))return;this._localToDispose.add(ye.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));const n=new jr(this._debounceInformation.get(t)),s=()=>{var l;this._rangeUpdateTriggerPromise=n.trigger(()=>this.updateRanges(),(l=this._debounceDuration)!==null&&l!==void 0?l:this._debounceInformation.get(t))},r=new jr(0),a=l=>{this._rangeSyncTriggerPromise=r.trigger(()=>this._syncRanges(l))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{s()})),this._localToDispose.add(this._editor.onDidChangeModelContent(l=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const d=this._currentDecorations.getRange(0);if(d&&l.changes.every(c=>d.intersectRanges(c.range))){a(this._syncRangesToken);return}}s()})),this._localToDispose.add({dispose:()=>{n.dispose(),r.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;const t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const r=n.match(this._currentWordPattern);if((r?r[0].length:0)!==n.length)return this.clearRanges()}const s=[];for(let r=1,a=this._currentDecorations.length;r1){this.clearRanges();return}const i=this._editor.getModel(),n=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===n){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const r=this._currentDecorations.getRange(0);if(r&&r.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=n;const s=_n(async r=>{try{const a=new ds(!1),l=await jH(this._providers,i,t,r);if(this._debounceInformation.update(i,a.elapsed()),s!==this._currentRequest||(this._currentRequest=null,n!==i.getVersionId()))return;let d=[];l!=null&&l.ranges&&(d=l.ranges),this._currentWordPattern=(l==null?void 0:l.wordPattern)||this._languageWordPattern;let c=!1;for(let h=0,g=d.length;h({range:h,options:Z1.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(u),this._syncRangesToken++}catch(a){Fa(a)||nt(a),(this._currentRequest===s||!this._currentRequest)&&this.clearRanges()}});return this._currentRequest=s,s}};Eu.ID="editor.contrib.linkedEditing";Eu.DECORATION=st.register({description:"linked-editing",stickiness:0,className:wSe});Eu=Z1=CSe([r1(1,Xe),r1(2,Me),r1(3,si),r1(4,wr)],Eu);class SSe extends Te{constructor(){super({id:"editor.action.linkedEditing",label:p("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:ae.and(T.writable,T.hasRenameProvider),kbOpts:{kbExpr:T.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(Ot),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return ze.isUri(n)&&z.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(r=>{r&&(r.setPosition(s),r.invokeWithinContext(a=>(this.reportTelemetry(a,r),this.run(a,r))))},nt):super.runCommand(e,t)}run(e,t){const i=Eu.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const ySe=Rn.bindToContribution(Eu.get);we(new ySe({id:"cancelLinkedEditingInput",precondition:UH,handler:o=>o.clearRanges(),kbOpts:{kbExpr:T.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));function jH(o,e,t,i){const n=o.ordered(e);return wM(n.map(s=>async()=>{try{return await s.provideLinkedEditingRanges(e,t,i)}catch(r){en(r);return}}),s=>!!s&&ls(s==null?void 0:s.ranges))}M("editor.linkedEditingBackground",{dark:Y.fromHex("#f00").transparent(.3),light:Y.fromHex("#f00").transparent(.3),hcDark:Y.fromHex("#f00").transparent(.3),hcLight:Y.white},p("editorLinkedEditingBackground","Background color when the editor auto renames on type."));ql("_executeLinkedEditingProvider",(o,e,t)=>{const{linkedEditingRangeProvider:i}=o.get(Me);return jH(i,e,t,vt.None)});At(Eu.ID,Eu,1);_e(SSe);let LSe=class{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(e){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))}};class XS{constructor(e){this._disposables=new de;let t=[];for(const[i,n]of e){const s=i.links.map(r=>new LSe(r,n));t=XS._union(t,s),iM(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){const i=[];let n,s,r,a;for(n=0,r=0,s=e.length,a=t.length;nPromise.resolve(s.provideLinks(e,t)).then(a=>{a&&(i[r]=[a,s])},en));return Promise.all(n).then(()=>{const s=new XS(Ia(i));return t.isCancellationRequested?(s.dispose(),new XS([])):s})}Et.registerCommand("_executeLinkProvider",async(o,...e)=>{let[t,i]=e;qt(t instanceof ze),typeof i!="number"&&(i=0);const{linkProvider:n}=o.get(Me),s=o.get(Si).getModel(t);if(!s)return[];const r=await KH(n,s,vt.None);if(!r)return[];for(let l=0;l=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},a1=function(o,e){return function(t,i){e(t,i,o)}},p2;let am=p2=class extends q{static get(e){return e.getContribution(p2.ID)}constructor(e,t,i,n,s){super(),this.editor=e,this.openerService=t,this.notificationService=i,this.languageFeaturesService=n,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=s.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new Yt(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const r=this._register(new ML(e));this._register(r.onMouseMoveOrRelevantKeyDown(([a,l])=>{this._onEditorMouseMove(a,l)})),this._register(r.onExecute(a=>{this.onEditorMouseUp(a)})),this._register(r.onCancel(a=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(a=>{a.hasChanged(70)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(a=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(a=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(a=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(a=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(70))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=_n(t=>KH(this.providers,e,t));try{const t=new ds(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){nt(t)}finally{this.computePromise=null}}}updateDecorations(e){const t=this.editor.getOption(77)==="altKey",i=[],n=Object.keys(this.currentOccurrences);for(const r of n){const a=this.currentOccurrences[r];i.push(a.decorationId)}const s=[];if(e)for(const r of e)s.push(bp.decoration(r,t));this.editor.changeDecorations(r=>{const a=r.deltaDecorations(i,s);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let l=0,d=a.length;l{n.activate(s,i),this.activeLinkDecorationId=n.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e=this.editor.getOption(77)==="altKey";if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(i=>{t.deactivate(i,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:n}=e;n.resolve(vt.None).then(s=>{if(typeof s=="string"&&this.editor.hasModel()){const r=this.editor.getModel().uri;if(r.scheme===ot.file&&s.startsWith(`${ot.file}:`)){const a=ze.parse(s);if(a.scheme===ot.file){const l=Ya(a);let d=null;l.startsWith("/./")?d=`.${l.substr(1)}`:l.startsWith("//./")&&(d=`.${l.substr(2)}`),d&&(s=Roe(r,d))}}}return this.openerService.open(s,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},s=>{const r=s instanceof Error?s.message:s;r==="invalid"?this.notificationService.warn(p("invalid.url","Failed to open this link because it is not well-formed: {0}",n.url.toString())):r==="missing"?this.notificationService.warn(p("missing.url","Failed to open this link because its target is missing.")):nt(s)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const i of t){const n=this.currentOccurrences[i.id];if(n)return n}return null}isEnabled(e,t){return!!(e.target.type===6&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&((e=this.activeLinksList)===null||e===void 0||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};am.ID="editor.linkDetector";am=p2=DSe([a1(1,So),a1(2,sn),a1(3,Me),a1(4,wr)],am);const d9={general:st.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:st.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class bp{static decoration(e,t){return{range:e.range,options:bp._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n={...i?d9.active:d9.general};return n.hoverMessage=xSe(e,t),n}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,bp._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,bp._getOptions(this.link,t,!1))}}function xSe(o,e){const t=o.url&&/^command:/i.test(o.url.toString()),i=o.tooltip?o.tooltip:t?p("links.navigate.executeCmd","Execute command"):p("links.navigate.follow","Follow link"),n=e?It?p("links.navigate.kb.meta.mac","cmd + click"):p("links.navigate.kb.meta","ctrl + click"):It?p("links.navigate.kb.alt.mac","option + click"):p("links.navigate.kb.alt","alt + click");if(o.url){let s="";if(/^command:/i.test(o.url.toString())){const a=o.url.toString().match(/^command:([^?#]+)/);if(a){const l=a[1];s=p("tooltip.explanation","Execute command {0}",l)}}return new as("",!0).appendLink(o.url.toString(!0).replace(/ /g,"%20"),i,s).appendMarkdown(` (${n})`)}else return new as().appendText(`${i} (${n})`)}class kSe extends Te{constructor(){super({id:"editor.action.openLink",label:p("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){const i=am.get(t);if(!i||!t.hasModel())return;const n=t.getSelections();for(const s of n){const r=i.getLinkOccurrence(s.getEndPosition());r&&i.openLinkOccurrence(r,!1)}}}At(am.ID,am,1);_e(kSe);class m2 extends q{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(t=>{const i=this._editor.getOption(116);i>=0&&t.target.type===6&&t.target.position.column>=i&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}}m2.ID="editor.contrib.longLinesHelper";At(m2.ID,m2,2);const l1=M("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},p("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);M("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},p("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0);M("editor.wordHighlightTextBackground",{light:l1,dark:l1,hcDark:l1,hcLight:l1},p("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const d1=M("editor.wordHighlightBorder",{light:null,dark:null,hcDark:fi,hcLight:fi},p("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));M("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:fi,hcLight:fi},p("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable."));M("editor.wordHighlightTextBorder",{light:d1,dark:d1,hcDark:d1,hcLight:d1},p("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));const ISe=M("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},p("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),ESe=M("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},p("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),NSe=M("editorOverviewRuler.wordHighlightTextForeground",{dark:w_,light:w_,hcDark:w_,hcLight:w_},p("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),TSe=st.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Ni(ESe),position:Go.Center},minimap:{color:Ni(Fy),position:uo.Inline}}),MSe=st.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:Ni(NSe),position:Go.Center},minimap:{color:Ni(Fy),position:uo.Inline}}),ASe=st.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Ni(w_),position:Go.Center},minimap:{color:Ni(Fy),position:uo.Inline}}),RSe=st.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),PSe=st.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Ni(ISe),position:Go.Center},minimap:{color:Ni(Fy),position:uo.Inline}});function OSe(o){return o===wv.Write?TSe:o===wv.Text?MSe:PSe}function FSe(o){return o?RSe:ASe}Zr((o,e)=>{const t=o.getColor(GM);t&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`)});var BSe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},WSe=function(o,e){return function(t,i){e(t,i,o)}},_2;function Hu(o,e){const t=e.filter(i=>!o.find(n=>n.equals(i)));if(t.length>=1){const i=t.map(s=>`line ${s.viewState.position.lineNumber} column ${s.viewState.position.column}`).join(", "),n=t.length===1?p("cursorAdded","Cursor added: {0}",i):p("cursorsAdded","Cursors added: {0}",i);hu(n)}}class VSe extends Te{constructor(){super({id:"editor.action.insertCursorAbove",label:p("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:N.MenubarSelectionMenu,group:"3_multi",title:p({},"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&i.logicalLine===!1&&(n=!1);const s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();const r=s.getCursorStates();s.setCursorStates(i.source,3,On.addCursorUp(s,r,n)),s.revealTopMostCursor(i.source),Hu(r,s.getCursorStates())}}class HSe extends Te{constructor(){super({id:"editor.action.insertCursorBelow",label:p("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:N.MenubarSelectionMenu,group:"3_multi",title:p({},"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&i.logicalLine===!1&&(n=!1);const s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();const r=s.getCursorStates();s.setCursorStates(i.source,3,On.addCursorDown(s,r,n)),s.revealBottomMostCursor(i.source),Hu(r,s.getCursorStates())}}class zSe extends Te{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:p("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:N.MenubarSelectionMenu,group:"3_multi",title:p({},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n1&&i.push(new Re(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections(),s=t._getViewModel(),r=s.getCursorStates(),a=[];n.forEach(l=>this.getCursorsForSelection(l,i,a)),a.length>0&&t.setSelections(a),Hu(r,s.getCursorStates())}}class $Se extends Te{constructor(){super({id:"editor.action.addCursorsToBottom",label:p("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=t.getModel().getLineCount(),s=[];for(let l=i[0].startLineNumber;l<=n;l++)s.push(new Re(l,i[0].startColumn,l,i[0].endColumn));const r=t._getViewModel(),a=r.getCursorStates();s.length>0&&t.setSelections(s),Hu(a,r.getCursorStates())}}class USe extends Te{constructor(){super({id:"editor.action.addCursorsToTop",label:p("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=[];for(let a=i[0].startLineNumber;a>=1;a--)n.push(new Re(a,i[0].startColumn,a,i[0].endColumn));const s=t._getViewModel(),r=s.getCursorStates();n.length>0&&t.setSelections(n),Hu(r,s.getCursorStates())}}class c1{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class Bb{static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new Bb(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n=!1,s,r;const a=e.getSelections();a.length===1&&a[0].isEmpty()?(n=!0,s=!0,r=!0):(s=i.wholeWord,r=i.matchCase);const l=e.getSelection();let d,c=null;if(l.isEmpty()){const u=e.getConfiguredWordAtPosition(l.getStartPosition());if(!u)return null;d=u.word,c=new Re(l.startLineNumber,u.startColumn,l.startLineNumber,u.endColumn)}else d=e.getModel().getValueInRange(l).replace(/\r\n/g,` -`);return new Bb(e,t,n,d,s,r,c)}constructor(e,t,i,n,s,r,a){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=s,this.matchCase=r,this.currentMatch=a}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new c1(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new c1(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const n=this.currentMatch;return this.currentMatch=null,n}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return i?new Re(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new c1(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new c1(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const n=this.currentMatch;return this.currentMatch=null,n}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return i?new Re(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1,1073741824)}}class Dg extends q{static get(e){return e.getContribution(Dg.ID)}constructor(e){super(),this._sessionDispose=this._register(new de),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=Bb.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(n=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(n=>{(n.matchCase||n.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new Re(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const n=e.getState().matchCase;if(!qH(this._editor.getModel(),t,n)){const r=this._editor.getModel(),a=[];for(let l=0,d=t.length;l0&&i.isRegex){const n=this._editor.getModel();i.searchScope?t=n.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(129):null,!1,1073741824):t=n.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(129):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){const n=this._editor.getSelection();for(let s=0,r=t.length;snew Re(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn)))}}}Dg.ID="editor.contrib.multiCursorController";class Am extends Te{run(e,t){const i=Dg.get(t);if(!i)return;const n=t._getViewModel();if(n){const s=n.getCursorStates(),r=Os.get(t);if(r)this._run(i,r);else{const a=e.get(qe).createInstance(Os,t);this._run(i,a),a.dispose()}Hu(s,n.getCursorStates())}}}class jSe extends Am{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:p("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:2082,weight:100},menuOpts:{menuId:N.MenubarSelectionMenu,group:"3_multi",title:p({},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class KSe extends Am{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:p("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:N.MenubarSelectionMenu,group:"3_multi",title:p({},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class qSe extends Am{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:p("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:fn(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class GSe extends Am{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:p("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class ZSe extends Am{constructor(){super({id:"editor.action.selectHighlights",label:p("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:3114,weight:100},menuOpts:{menuId:N.MenubarSelectionMenu,group:"3_multi",title:p({},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class YSe extends Am{constructor(){super({id:"editor.action.changeAll",label:p("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:ae.and(T.writable,T.editorTextFocus),kbOpts:{kbExpr:T.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class XSe{constructor(e,t,i,n,s){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=n,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,s&&this._model===s._model&&this._searchText===s._searchText&&this._matchCase===s._matchCase&&this._wordSeparators===s._wordSeparators&&this._modelVersionId===s._modelVersionId&&(this._cachedFindMatches=s._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(k.compareRangesUsingStarts)),this._cachedFindMatches}}let Wb=_2=class extends q{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(107),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new Yt(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(n=>{this._isEnabled=e.getOption(107)})),this._register(e.onDidChangeCursorSelection(n=>{this._isEnabled&&(n.selection.isEmpty()?n.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(n=>{this._setState(null)})),this._register(e.onDidChangeModelContent(n=>{this._isEnabled&&this.updateSoon.schedule()}));const i=Os.get(e);i&&this._register(i.getState().onFindReplaceStateChange(n=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(_2._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,i){if(!t||!i.hasModel())return null;const n=i.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;const s=Dg.get(i);if(!s)return null;const r=Os.get(i);if(!r)return null;let a=s.getSession(r);if(!a){const c=i.getSelections();if(c.length>1){const h=r.getState().matchCase;if(!qH(i.getModel(),c,h))return null}a=Bb.create(i,r)}if(!a||a.currentMatch||/^[ \t]+$/.test(a.searchText)||a.searchText.length>200)return null;const l=r.getState(),d=l.matchCase;if(l.isRevealed){let c=l.searchString;d||(c=c.toLowerCase());let u=a.searchText;if(d||(u=u.toLowerCase()),c===u&&a.matchCase===l.matchCase&&a.wholeWord===l.wholeWord&&!l.isRegex)return null}return new XSe(i.getModel(),a.searchText,a.matchCase,a.wholeWord?i.getOption(129):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=this.state.findMatches(),n=this.editor.getSelections();n.sort(k.compareRangesUsingStarts);const s=[];for(let d=0,c=0,u=i.length,h=n.length;d=h)s.push(g),d++;else{const f=k.compareRangesUsingStarts(g,n[c]);f<0?((n[c].isEmpty()||!k.areIntersecting(g,n[c]))&&s.push(g),d++):(f>0||d++,c++)}}const r=this.editor.getOption(80)!=="off",a=this._languageFeaturesService.documentHighlightProvider.has(t)&&r,l=s.map(d=>({range:d,options:FSe(a)}));this._decorations.set(l)}dispose(){this._setState(null),super.dispose()}};Wb.ID="editor.contrib.selectionHighlighter";Wb=_2=BSe([WSe(1,Me)],Wb);function qH(o,e,t){const i=c9(o,e[0],!t);for(let n=1,s=e.length;n{const[t,i,n]=e;qt(ze.isUri(t)),qt(z.isIPosition(i)),qt(typeof n=="string"||!n);const s=o.get(Me),r=await o.get(Xs).createModelReference(t);try{const a=await GH(s.signatureHelpProvider,r.object.textEditorModel,z.lift(i),{triggerKind:xl.Invoke,isRetrigger:!1,triggerCharacter:n},vt.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{r.dispose()}});var _c;(function(o){o.Default={type:0};class e{constructor(n,s){this.request=n,this.previouslyActiveHints=s,this.type=2}}o.Pending=e;class t{constructor(n){this.hints=n,this.type=1}}o.Active=t})(_c||(_c={}));class uD extends q{constructor(e,t,i=uD.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new W),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=_c.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new An),this.triggerChars=new Cw,this.retriggerChars=new Cw,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new jr(i),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(n=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(n=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(n=>this.onCursorChange(n))),this._register(this.editor.onDidChangeModelContent(n=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(n=>this.onDidType(n))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=_c.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!this.providers.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(n),t).catch(nt)}next(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e===e-1,n=this.editor.getOption(85).cycle;if((e<2||i)&&!n){this.cancel();return}this.updateActiveSignature(i&&n?0:t+1)}previous(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t===0,n=this.editor.getOption(85).cycle;if((e<2||i)&&!n){this.cancel();return}this.updateActiveSignature(i&&n?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new _c.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){const t=this.state.type===1||this.state.type===2,i=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const n=this._pendingTriggers.reduce(eye);this._pendingTriggers=[];const s={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const r=this.editor.getModel(),a=this.editor.getPosition();this.state=new _c.Pending(_n(l=>GH(this.providers,r,a,s,l)),i);try{const l=await this.state.request;return e!==this.triggerId?(l==null||l.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l==null||l.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new _c.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=_c.Default),nt(l),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const i of t.signatureHelpTriggerCharacters||[])if(i.length){const n=i.charCodeAt(0);this.triggerChars.add(n),this.retriggerChars.add(n)}for(const i of t.signatureHelpRetriggerCharacters||[])i.length&&this.retriggerChars.add(i.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:xl.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:xl.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:xl.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(85).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}uD.DEFAULT_DELAY=120;function eye(o,e){switch(e.triggerKind){case xl.Invoke:return e;case xl.ContentChange:return o;case xl.TriggerCharacter:default:return e}}var tye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Sk=function(o,e){return function(t,i){e(t,i,o)}},v2;const Lo=pe,iye=Zi("parameter-hints-next",ve.chevronDown,p("parameterHintsNextIcon","Icon for show next parameter hint.")),nye=Zi("parameter-hints-previous",ve.chevronUp,p("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let QS=v2=class extends q{constructor(e,t,i,n,s){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new de),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new Ud({editor:e},s,n)),this.keyVisible=xg.Visible.bindTo(i),this.keyMultipleSignatures=xg.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){const e=Lo(".editor-widget.parameter-hints-widget"),t=le(e,Lo(".phwrapper"));t.tabIndex=-1;const i=le(t,Lo(".controls")),n=le(i,Lo(".button"+Ue.asCSSSelector(nye))),s=le(i,Lo(".overloads")),r=le(i,Lo(".button"+Ue.asCSSSelector(iye)));this._register(J(n,"click",h=>{ct.stop(h),this.previous()})),this._register(J(r,"click",h=>{ct.stop(h),this.next()}));const a=Lo(".body"),l=new a0(a,{alwaysConsumeMouseWheel:!0});this._register(l),t.appendChild(l.getDomNode());const d=le(a,Lo(".signature")),c=le(a,Lo(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:d,overloads:s,docs:c,scrollbar:l},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(h=>{this.visible&&this.editor.layoutContentWidget(this)}));const u=()=>{if(!this.domNodes)return;const h=this.editor.getOption(50);this.domNodes.element.style.fontSize=`${h.fontSize}px`,this.domNodes.element.style.lineHeight=`${h.lineHeight/h.fontSize}`};u(),this._register(ye.chain(this.editor.onDidChangeConfiguration.bind(this.editor),h=>h.filter(g=>g.hasChanged(50)))(u)),this._register(this.editor.onDidLayoutChange(h=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{var e;(e=this.domNodes)===null||e===void 0||e.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,(e=this.domNodes)===null||e===void 0||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;const i=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",i),this.keyMultipleSignatures.set(i),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const n=e.signatures[e.activeSignature];if(!n)return;const s=le(this.domNodes.signature,Lo(".code")),r=this.editor.getOption(50);s.style.fontSize=`${r.fontSize}px`,s.style.fontFamily=r.fontFamily;const a=n.parameters.length>0,l=(t=n.activeParameter)!==null&&t!==void 0?t:e.activeParameter;if(a)this.renderParameters(s,n,l);else{const u=le(s,Lo("span"));u.textContent=n.label}const d=n.parameters[l];if(d!=null&&d.documentation){const u=Lo("span.documentation");if(typeof d.documentation=="string")u.textContent=d.documentation;else{const h=this.renderMarkdownDocs(d.documentation);u.appendChild(h.element)}le(this.domNodes.docs,Lo("p",{},u))}if(n.documentation!==void 0)if(typeof n.documentation=="string")le(this.domNodes.docs,Lo("p",{},n.documentation));else{const u=this.renderMarkdownDocs(n.documentation);le(this.domNodes.docs,u.element)}const c=this.hasDocs(n,d);if(this.domNodes.signature.classList.toggle("has-docs",c),this.domNodes.docs.classList.toggle("empty",!c),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,d){let u="";const h=n.parameters[l];Array.isArray(h.label)?u=n.label.substring(h.label[0],h.label[1]):u=h.label,h.documentation&&(u+=typeof h.documentation=="string"?`, ${h.documentation}`:`, ${h.documentation.value}`),n.documentation&&(u+=typeof n.documentation=="string"?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==u&&(mo(p("hint","{0}, hint",u)),this.announcedLabel=u)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var i;(i=this.domNodes)===null||i===void 0||i.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&Lc(t.documentation).length>0||t&&typeof t.documentation=="object"&&Lc(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&Lc(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&Lc(e.documentation.value).length>0)}renderParameters(e,t,i){const[n,s]=this.getParameterLabelOffsets(t,i),r=document.createElement("span");r.textContent=t.label.substring(0,n);const a=document.createElement("span");a.textContent=t.label.substring(n,s),a.className="parameter active";const l=document.createElement("span");l.textContent=t.label.substring(s),le(e,r,a,l)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const n=new RegExp(`(\\W|^)${qo(i.label)}(?=\\W|$)`,"g");n.test(e.label);const s=n.lastIndex-i.label.length;return s>=0?[s,n.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return v2.ID}updateMaxHeight(){if(!this.domNodes)return;const t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;const i=this.domNodes.element.getElementsByClassName("phwrapper");i.length&&(i[0].style.maxHeight=t)}};QS.ID="editor.widget.parameterHintsWidget";QS=v2=tye([Sk(2,Xe),Sk(3,So),Sk(4,bi)],QS);M("editorHoverWidget.highlightForeground",{dark:Br,light:Br,hcDark:Br,hcLight:Br},p("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));var sye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},u9=function(o,e){return function(t,i){e(t,i,o)}},b2;let kg=b2=class extends q{static get(e){return e.getContribution(b2.ID)}constructor(e,t,i){super(),this.editor=e,this.model=this._register(new uD(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints(n=>{var s;n?(this.widget.value.show(),this.widget.value.render(n)):(s=this.widget.rawValue)===null||s===void 0||s.hide()})),this.widget=new Ru(()=>this._register(t.createInstance(QS,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){var e;(e=this.widget.rawValue)===null||e===void 0||e.previous()}next(){var e;(e=this.widget.rawValue)===null||e===void 0||e.next()}trigger(e){this.model.trigger(e,0)}};kg.ID="editor.controller.parameterHints";kg=b2=sye([u9(1,qe),u9(2,Me)],kg);class oye extends Te{constructor(){super({id:"editor.action.triggerParameterHints",label:p("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:T.hasSignatureHelpProvider,kbOpts:{kbExpr:T.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=kg.get(t);i==null||i.trigger({triggerKind:xl.Invoke})}}At(kg.ID,kg,2);_e(oye);const lP=175,dP=Rn.bindToContribution(kg.get);we(new dP({id:"closeParameterHints",precondition:xg.Visible,handler:o=>o.cancel(),kbOpts:{weight:lP,kbExpr:T.focus,primary:9,secondary:[1033]}}));we(new dP({id:"showPrevParameterHint",precondition:ae.and(xg.Visible,xg.MultipleSignatures),handler:o=>o.previous(),kbOpts:{weight:lP,kbExpr:T.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));we(new dP({id:"showNextParameterHint",precondition:ae.and(xg.Visible,xg.MultipleSignatures),handler:o=>o.next(),kbOpts:{weight:lP,kbExpr:T.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));var rye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yk=function(o,e){return function(t,i){e(t,i,o)}};const hD=new De("renameInputVisible",!1,p("renameInputVisible","Whether the rename input widget is visible"));let C2=class{constructor(e,t,i,n,s){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._disposables=new de,this.allowEditorOverflow=!0,this._visibleContextKey=hD.bindTo(s),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(50)&&this._updateFont()})),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",p("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){var t,i,n,s;if(!this._input||!this._domNode)return;const r=e.getColor(ml),a=e.getColor(jM);this._domNode.style.backgroundColor=String((t=e.getColor(Fi))!==null&&t!==void 0?t:""),this._domNode.style.boxShadow=r?` 0 0 8px 2px ${r}`:"",this._domNode.style.border=a?`1px solid ${a}`:"",this._domNode.style.color=String((i=e.getColor(M8))!==null&&i!==void 0?i:""),this._input.style.backgroundColor=String((n=e.getColor(T8))!==null&&n!==void 0?n:"");const l=e.getColor(A8);this._input.style.borderWidth=l?"1px":"0px",this._input.style.borderStyle=l?"solid":"none",this._input.style.borderColor=(s=l==null?void 0:l.toString())!==null&&s!==void 0?s:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(50);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=`${e.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){var e,t;const[i,n]=this._acceptKeybindings;return this._label.innerText=p({},"{0} to Rename, {1} to Preview",(e=this._keybindingService.lookupKeybinding(i))===null||e===void 0?void 0:e.getLabel(),(t=this._keybindingService.lookupKeybinding(n))===null||t===void 0?void 0:t.getLabel()),null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){var t;(t=this._currentAcceptInput)===null||t===void 0||t.call(this,e)}cancelInput(e){var t;(t=this._currentCancelInput)===null||t===void 0||t.call(this,e)}getInput(e,t,i,n,s,r){this._domNode.classList.toggle("preview",s),this._position=new z(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",i.toString()),this._input.setAttribute("selectionEnd",n.toString()),this._input.size=Math.max((e.endColumn-e.startColumn)*1.1,20);const a=new de;return new Promise(l=>{this._currentCancelInput=d=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l(d),!0),this._currentAcceptInput=d=>{if(this._input.value.trim().length===0||this._input.value===t){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l({newName:this._input.value,wantsPreview:s&&d})},a.add(r.onCancellationRequested(()=>this.cancelInput(!0))),a.add(this._editor.onDidBlurEditorWidget(()=>{var d;return this.cancelInput(!(!((d=this._domNode)===null||d===void 0)&&d.ownerDocument.hasFocus()))})),this._show()}).finally(()=>{a.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};C2=rye([yk(2,Sn),yk(3,Xt),yk(4,Xe)],C2);var aye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rh=function(o,e){return function(t,i){e(t,i,o)}},w2;class cP{constructor(e,t,i){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join(` +`+u),this.shouldAutoIndent(e,n)){d.getLineContent=g=>g===c?e.getLineContent(n.startLineNumber):e.getLineContent(g);const h=this.matchEnterRule(e,l,s,n.startLineNumber,n.startLineNumber-2);if(h!==null)h!==0&&this.getIndentEditsOfMovingBlock(e,t,n,s,a,h);else{const g=z_(this._autoIndent,d,e.getLanguageIdAtPosition(n.startLineNumber,1),c,l,this._languageConfigurationService);if(g!==null){const f=ii(e.getLineContent(n.startLineNumber)),m=to(g,s),v=to(f,s);if(m!==v){const _=m-v;this.getIndentEditsOfMovingBlock(e,t,n,s,a,_)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>rr.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>rr.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,s){if(s){let r=s.indentation;s.indentAction===an.None||s.indentAction===an.Indent?r=s.indentation+s.appendText:s.indentAction===an.IndentOutdent?r=s.indentation:s.indentAction===an.Outdent&&(r=t.unshiftIndent(s.indentation)+s.appendText);const a=e.getLineContent(n);if(this.trimStart(a).indexOf(this.trimStart(r))>=0){const l=ii(e.getLineContent(n));let d=ii(r);const c=oB(e,n,this._languageConfigurationService);c!==null&&c&2&&(d=t.unshiftIndent(d));const u=to(d,i),h=to(l,i);return u-h}}return null}matchEnterRuleMovingDown(e,t,i,n,s,r){if(Da(r)>=0){const a=e.getLineMaxColumn(s),l=rp(this._autoIndent,e,new k(s,a,s,a),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,l)}else{let a=n-1;for(;a>=1;){const c=e.getLineContent(a);if(Da(c)>=0)break;a--}if(a<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(a),d=rp(this._autoIndent,e,new k(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,d)}}matchEnterRule(e,t,i,n,s,r){let a=s;for(;a>=1;){let c;if(a===s&&r!==void 0?c=r:c=e.getLineContent(a),Da(c)>=0)break;a--}if(a<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(a),d=rp(this._autoIndent,e,new k(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,d)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1),n=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(i!==n||this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,i,n,s,r){for(let a=i.startLineNumber;a<=i.endLineNumber;a++){const l=e.getLineContent(a),d=ii(l),u=to(d,n)+r,h=cv(u,n,s);h!==d&&(t.addEditOperation(new k(a,1,a,d.length+1),h),a===i.endLineNumber&&i.endColumn<=d.length+1&&h===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber=n)return null;const s=[];for(let a=i;a<=n;a++)s.push(o.getLineContent(a));let r=s.slice(0);return r.sort(eu.getCollator().compare),t===!0&&(r=r.reverse()),{startLineNumber:i,endLineNumber:n,before:s,after:r}}function sSe(o,e,t){const i=WH(o,e,t);return i?Li.replace(new k(i.startLineNumber,1,i.endLineNumber,o.getLineMaxColumn(i.endLineNumber)),i.after.join(` +`)):null}class VH extends Te{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map((r,a)=>({selection:r,index:a,ignore:!1}));i.sort((r,a)=>k.compareRangesUsingStarts(r.selection,a.selection));let n=i[0];for(let r=1;rnew z(a.positionLineNumber,a.positionColumn)));const s=t.getSelection();if(s===null)return;const r=new eSe(s,n);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop()}}cD.ID="editor.action.trimTrailingWhitespace";class gSe extends Te{constructor(){super({id:"editor.action.deleteLines",label:p("lines.delete","Delete Line"),alias:"Delete Line",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),n=t.getModel();if(n.getLineCount()===1&&n.getLineMaxColumn(1)===1)return;let s=0;const r=[],a=[];for(let l=0,d=i.length;l1&&(u-=1,g=n.getLineMaxColumn(u)),r.push(Li.replace(new Ae(u,g,h,f),"")),a.push(new Ae(u-s,c.positionColumn,u-s,c.positionColumn)),s+=c.endLineNumber-c.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,r,a),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map(s=>{let r=s.endLineNumber;return s.startLineNumbers.startLineNumber===r.startLineNumber?s.endLineNumber-r.endLineNumber:s.startLineNumber-r.startLineNumber);const i=[];let n=t[0];for(let s=1;s=t[s].startLineNumber?n.endLineNumber=t[s].endLineNumber:(i.push(n),n=t[s]);return i.push(n),i}}class fSe extends Te{constructor(){super({id:"editor.action.indentLines",label:p("lines.indent","Indent Line"),alias:"Indent Line",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:2142,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,yi.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class pSe extends Te{constructor(){super({id:"editor.action.outdentLines",label:p("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:2140,weight:100}})}run(e,t){ap.Outdent.runEditorCommand(e,t,null)}}class mSe extends Te{constructor(){super({id:"editor.action.insertLineBefore",label:p("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,yi.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class _Se extends Te{constructor(){super({id:"editor.action.insertLineAfter",label:p("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,yi.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class $H extends Te{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),s=[];for(let l=0,d=n.length-1;lLi.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,r),t.pushUndoStop()}}class vSe extends $H{constructor(){super({id:"deleteAllLeft",label:p("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];let s=0;return t.forEach(r=>{let a;if(r.endColumn===1&&s>0){const l=r.startLineNumber-s;a=new Ae(l,r.startColumn,l,r.startColumn)}else a=new Ae(r.startLineNumber,r.startColumn,r.startLineNumber,r.startColumn);s+=r.endLineNumber-r.startLineNumber,r.intersectRanges(e)?i=a:n.push(a)}),i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getSelections();if(t===null)return[];let i=t;const n=e.getModel();return n===null?[]:(i.sort(k.compareRangesUsingStarts),i=i.map(s=>{if(s.isEmpty())if(s.startColumn===1){const r=Math.max(1,s.startLineNumber-1),a=s.startLineNumber===1?1:n.getLineLength(r)+1;return new k(r,a,s.startLineNumber,1)}else return new k(s.startLineNumber,1,s.startLineNumber,s.startColumn);else return new k(s.startLineNumber,1,s.endLineNumber,s.endColumn)}),i)}}class bSe extends $H{constructor(){super({id:"deleteAllRight",label:p("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];for(let s=0,r=t.length,a=0;s{if(s.isEmpty()){const r=t.getLineMaxColumn(s.startLineNumber);return s.startColumn===r?new k(s.startLineNumber,s.startColumn,s.startLineNumber+1,1):new k(s.startLineNumber,s.startColumn,s.startLineNumber,r)}return s});return n.sort(k.compareRangesUsingStarts),n}}class CSe extends Te{constructor(){super({id:"editor.action.joinLines",label:p("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){const i=t.getSelections();if(i===null)return;let n=t.getSelection();if(n===null)return;i.sort(k.compareRangesUsingStarts);const s=[],r=i.reduce((h,g)=>h.isEmpty()?h.endLineNumber===g.startLineNumber?(n.equalsSelection(h)&&(n=g),g):g.startLineNumber>h.endLineNumber+1?(s.push(h),g):new Ae(h.startLineNumber,h.startColumn,g.endLineNumber,g.endColumn):g.startLineNumber>h.endLineNumber?(s.push(h),g):new Ae(h.startLineNumber,h.startColumn,g.endLineNumber,g.endColumn));s.push(r);const a=t.getModel();if(a===null)return;const l=[],d=[];let c=n,u=0;for(let h=0,g=s.length;h=1){let R=!0;S===""&&(R=!1),R&&(S.charAt(S.length-1)===" "||S.charAt(S.length-1)===" ")&&(R=!1,S=S.replace(/[\s\uFEFF\xA0]+$/g," "));const j=I.substr(E-1);S+=(R?" ":"")+j,R?_=j.length+1:_=j.length}else _=0}const x=new k(m,v,b,C);if(!x.isEmpty()){let y;f.isEmpty()?(l.push(Li.replace(x,S)),y=new Ae(x.startLineNumber-u,S.length-_+1,m-u,S.length-_+1)):f.startLineNumber===f.endLineNumber?(l.push(Li.replace(x,S)),y=new Ae(f.startLineNumber-u,f.startColumn,f.endLineNumber-u,f.endColumn)):(l.push(Li.replace(x,S)),y=new Ae(f.startLineNumber-u,f.startColumn,f.startLineNumber-u,S.length-w)),k.intersectRanges(x,n)!==null?c=y:d.push(y)}u+=x.endLineNumber-x.startLineNumber}d.unshift(c),t.pushUndoStop(),t.executeEdits(this.id,l,d),t.pushUndoStop()}}class wSe extends Te{constructor(){super({id:"editor.action.transpose",label:p("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:T.writable})}run(e,t){const i=t.getSelections();if(i===null)return;const n=t.getModel();if(n===null)return;const s=[];for(let r=0,a=i.length;r=c){if(d.lineNumber===n.getLineCount())continue;const u=new k(d.lineNumber,Math.max(1,d.column-1),d.lineNumber+1,1),h=n.getValueInRange(u).split("").reverse().join("");s.push(new qn(new Ae(d.lineNumber,Math.max(1,d.column-1),d.lineNumber+1,1),h))}else{const u=new k(d.lineNumber,Math.max(1,d.column-1),d.lineNumber,d.column+1),h=n.getValueInRange(u).split("").reverse().join("");s.push(new nA(u,h,new Ae(d.lineNumber,d.column+1,d.lineNumber,d.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class Mm extends Te{run(e,t){const i=t.getSelections();if(i===null)return;const n=t.getModel();if(n===null)return;const s=t.getOption(129),r=[];for(const a of i)if(a.isEmpty()){const l=a.getStartPosition(),d=t.getConfiguredWordAtPosition(l);if(!d)continue;const c=new k(l.lineNumber,d.startColumn,l.lineNumber,d.endColumn),u=n.getValueInRange(c);r.push(Li.replace(c,this._modifyText(u,s)))}else{const l=n.getValueInRange(a);r.push(Li.replace(a,this._modifyText(l,s)))}t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop()}}class SSe extends Mm{constructor(){super({id:"editor.action.transformToUppercase",label:p("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:T.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class ySe extends Mm{constructor(){super({id:"editor.action.transformToLowercase",label:p("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:T.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class Kg{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch{}}return this._actual}isSupported(){return this.get()!==null}}class Ob extends Mm{constructor(){super({id:"editor.action.transformToTitlecase",label:p("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:T.writable})}_modifyText(e,t){const i=Ob.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,n=>n.toLocaleUpperCase()):e}}Ob.titleBoundary=new Kg("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class tu extends Mm{constructor(){super({id:"editor.action.transformToSnakecase",label:p("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:T.writable})}_modifyText(e,t){const i=tu.caseBoundary.get(),n=tu.singleLetters.get();return!i||!n?e:e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase()}}tu.caseBoundary=new Kg("(\\p{Ll})(\\p{Lu})","gmu");tu.singleLetters=new Kg("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class Fb extends Mm{constructor(){super({id:"editor.action.transformToCamelcase",label:p("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:T.writable})}_modifyText(e,t){const i=Fb.wordBoundary.get();if(!i)return e;const n=e.split(i);return n.shift()+n.map(r=>r.substring(0,1).toLocaleUpperCase()+r.substring(1)).join("")}}Fb.wordBoundary=new Kg("[_\\s-]","gm");class Vd extends Mm{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(t=>t.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:p("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:T.writable})}_modifyText(e,t){const i=Vd.caseBoundary.get(),n=Vd.singleLetters.get(),s=Vd.underscoreBoundary.get();return!i||!n||!s?e:e.replace(s,"$1-$3").replace(i,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase()}}Vd.caseBoundary=new Kg("(\\p{Ll})(\\p{Lu})","gmu");Vd.singleLetters=new Kg("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu");Vd.underscoreBoundary=new Kg("(\\S)(_)(\\S)","gm");_e(oSe);_e(rSe);_e(aSe);_e(lSe);_e(dSe);_e(cSe);_e(uSe);_e(hSe);_e(cD);_e(gSe);_e(fSe);_e(pSe);_e(mSe);_e(_Se);_e(vSe);_e(bSe);_e(CSe);_e(wSe);_e(SSe);_e(ySe);tu.caseBoundary.isSupported()&&tu.singleLetters.isSupported()&&_e(tu);Fb.wordBoundary.isSupported()&&_e(Fb);Ob.titleBoundary.isSupported()&&_e(Ob);Vd.isSupported()&&_e(Vd);var LSe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},r1=function(o,e){return function(t,i){e(t,i,o)}},Z1;const UH=new De("LinkedEditingInputVisible",!1),DSe="linked-editing-decoration";let Eu=Z1=class extends q{static get(e){return e.getContribution(Z1.ID)}constructor(e,t,i,n,s){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new de),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=UH.bindTo(t),this._debounceInformation=s.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new de),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(r=>{(r.hasChanged(69)||r.hasChanged(92))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){const t=this._editor.getModel(),i=t!==null&&(this._editor.getOption(69)||this._editor.getOption(92))&&this._providers.has(t);if(i===this._enabled&&!e||(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||t===null))return;this._localToDispose.add(ye.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));const n=new jr(this._debounceInformation.get(t)),s=()=>{var l;this._rangeUpdateTriggerPromise=n.trigger(()=>this.updateRanges(),(l=this._debounceDuration)!==null&&l!==void 0?l:this._debounceInformation.get(t))},r=new jr(0),a=l=>{this._rangeSyncTriggerPromise=r.trigger(()=>this._syncRanges(l))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{s()})),this._localToDispose.add(this._editor.onDidChangeModelContent(l=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const d=this._currentDecorations.getRange(0);if(d&&l.changes.every(c=>d.intersectRanges(c.range))){a(this._syncRangesToken);return}}s()})),this._localToDispose.add({dispose:()=>{n.dispose(),r.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;const t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const r=n.match(this._currentWordPattern);if((r?r[0].length:0)!==n.length)return this.clearRanges()}const s=[];for(let r=1,a=this._currentDecorations.length;r1){this.clearRanges();return}const i=this._editor.getModel(),n=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===n){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const r=this._currentDecorations.getRange(0);if(r&&r.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=n;const s=_n(async r=>{try{const a=new ds(!1),l=await jH(this._providers,i,t,r);if(this._debounceInformation.update(i,a.elapsed()),s!==this._currentRequest||(this._currentRequest=null,n!==i.getVersionId()))return;let d=[];l!=null&&l.ranges&&(d=l.ranges),this._currentWordPattern=(l==null?void 0:l.wordPattern)||this._languageWordPattern;let c=!1;for(let h=0,g=d.length;h({range:h,options:Z1.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(u),this._syncRangesToken++}catch(a){Fa(a)||nt(a),(this._currentRequest===s||!this._currentRequest)&&this.clearRanges()}});return this._currentRequest=s,s}};Eu.ID="editor.contrib.linkedEditing";Eu.DECORATION=st.register({description:"linked-editing",stickiness:0,className:DSe});Eu=Z1=LSe([r1(1,Xe),r1(2,Me),r1(3,si),r1(4,wr)],Eu);class xSe extends Te{constructor(){super({id:"editor.action.linkedEditing",label:p("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:ae.and(T.writable,T.hasRenameProvider),kbOpts:{kbExpr:T.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(Ot),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return ze.isUri(n)&&z.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(r=>{r&&(r.setPosition(s),r.invokeWithinContext(a=>(this.reportTelemetry(a,r),this.run(a,r))))},nt):super.runCommand(e,t)}run(e,t){const i=Eu.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const kSe=Rn.bindToContribution(Eu.get);we(new kSe({id:"cancelLinkedEditingInput",precondition:UH,handler:o=>o.clearRanges(),kbOpts:{kbExpr:T.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));function jH(o,e,t,i){const n=o.ordered(e);return wM(n.map(s=>async()=>{try{return await s.provideLinkedEditingRanges(e,t,i)}catch(r){en(r);return}}),s=>!!s&&ls(s==null?void 0:s.ranges))}M("editor.linkedEditingBackground",{dark:Y.fromHex("#f00").transparent(.3),light:Y.fromHex("#f00").transparent(.3),hcDark:Y.fromHex("#f00").transparent(.3),hcLight:Y.white},p("editorLinkedEditingBackground","Background color when the editor auto renames on type."));ql("_executeLinkedEditingProvider",(o,e,t)=>{const{linkedEditingRangeProvider:i}=o.get(Me);return jH(i,e,t,vt.None)});At(Eu.ID,Eu,1);_e(xSe);let ISe=class{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(e){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))}};class XS{constructor(e){this._disposables=new de;let t=[];for(const[i,n]of e){const s=i.links.map(r=>new ISe(r,n));t=XS._union(t,s),iM(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){const i=[];let n,s,r,a;for(n=0,r=0,s=e.length,a=t.length;nPromise.resolve(s.provideLinks(e,t)).then(a=>{a&&(i[r]=[a,s])},en));return Promise.all(n).then(()=>{const s=new XS(Ia(i));return t.isCancellationRequested?(s.dispose(),new XS([])):s})}Et.registerCommand("_executeLinkProvider",async(o,...e)=>{let[t,i]=e;qt(t instanceof ze),typeof i!="number"&&(i=0);const{linkProvider:n}=o.get(Me),s=o.get(Si).getModel(t);if(!s)return[];const r=await KH(n,s,vt.None);if(!r)return[];for(let l=0;l=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},a1=function(o,e){return function(t,i){e(t,i,o)}},p2;let am=p2=class extends q{static get(e){return e.getContribution(p2.ID)}constructor(e,t,i,n,s){super(),this.editor=e,this.openerService=t,this.notificationService=i,this.languageFeaturesService=n,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=s.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new Yt(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const r=this._register(new ML(e));this._register(r.onMouseMoveOrRelevantKeyDown(([a,l])=>{this._onEditorMouseMove(a,l)})),this._register(r.onExecute(a=>{this.onEditorMouseUp(a)})),this._register(r.onCancel(a=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(a=>{a.hasChanged(70)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(a=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(a=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(a=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(a=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(70))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=_n(t=>KH(this.providers,e,t));try{const t=new ds(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){nt(t)}finally{this.computePromise=null}}}updateDecorations(e){const t=this.editor.getOption(77)==="altKey",i=[],n=Object.keys(this.currentOccurrences);for(const r of n){const a=this.currentOccurrences[r];i.push(a.decorationId)}const s=[];if(e)for(const r of e)s.push(bp.decoration(r,t));this.editor.changeDecorations(r=>{const a=r.deltaDecorations(i,s);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let l=0,d=a.length;l{n.activate(s,i),this.activeLinkDecorationId=n.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e=this.editor.getOption(77)==="altKey";if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(i=>{t.deactivate(i,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:n}=e;n.resolve(vt.None).then(s=>{if(typeof s=="string"&&this.editor.hasModel()){const r=this.editor.getModel().uri;if(r.scheme===ot.file&&s.startsWith(`${ot.file}:`)){const a=ze.parse(s);if(a.scheme===ot.file){const l=Ya(a);let d=null;l.startsWith("/./")?d=`.${l.substr(1)}`:l.startsWith("//./")&&(d=`.${l.substr(2)}`),d&&(s=Boe(r,d))}}}return this.openerService.open(s,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},s=>{const r=s instanceof Error?s.message:s;r==="invalid"?this.notificationService.warn(p("invalid.url","Failed to open this link because it is not well-formed: {0}",n.url.toString())):r==="missing"?this.notificationService.warn(p("missing.url","Failed to open this link because its target is missing.")):nt(s)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const i of t){const n=this.currentOccurrences[i.id];if(n)return n}return null}isEnabled(e,t){return!!(e.target.type===6&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&((e=this.activeLinksList)===null||e===void 0||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};am.ID="editor.linkDetector";am=p2=ESe([a1(1,So),a1(2,sn),a1(3,Me),a1(4,wr)],am);const d9={general:st.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:st.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class bp{static decoration(e,t){return{range:e.range,options:bp._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n={...i?d9.active:d9.general};return n.hoverMessage=NSe(e,t),n}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,bp._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,bp._getOptions(this.link,t,!1))}}function NSe(o,e){const t=o.url&&/^command:/i.test(o.url.toString()),i=o.tooltip?o.tooltip:t?p("links.navigate.executeCmd","Execute command"):p("links.navigate.follow","Follow link"),n=e?It?p("links.navigate.kb.meta.mac","cmd + click"):p("links.navigate.kb.meta","ctrl + click"):It?p("links.navigate.kb.alt.mac","option + click"):p("links.navigate.kb.alt","alt + click");if(o.url){let s="";if(/^command:/i.test(o.url.toString())){const a=o.url.toString().match(/^command:([^?#]+)/);if(a){const l=a[1];s=p("tooltip.explanation","Execute command {0}",l)}}return new as("",!0).appendLink(o.url.toString(!0).replace(/ /g,"%20"),i,s).appendMarkdown(` (${n})`)}else return new as().appendText(`${i} (${n})`)}class TSe extends Te{constructor(){super({id:"editor.action.openLink",label:p("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){const i=am.get(t);if(!i||!t.hasModel())return;const n=t.getSelections();for(const s of n){const r=i.getLinkOccurrence(s.getEndPosition());r&&i.openLinkOccurrence(r,!1)}}}At(am.ID,am,1);_e(TSe);class m2 extends q{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(t=>{const i=this._editor.getOption(116);i>=0&&t.target.type===6&&t.target.position.column>=i&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}}m2.ID="editor.contrib.longLinesHelper";At(m2.ID,m2,2);const l1=M("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},p("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);M("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},p("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0);M("editor.wordHighlightTextBackground",{light:l1,dark:l1,hcDark:l1,hcLight:l1},p("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const d1=M("editor.wordHighlightBorder",{light:null,dark:null,hcDark:fi,hcLight:fi},p("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));M("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:fi,hcLight:fi},p("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable."));M("editor.wordHighlightTextBorder",{light:d1,dark:d1,hcDark:d1,hcLight:d1},p("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));const MSe=M("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},p("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),ASe=M("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},p("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),RSe=M("editorOverviewRuler.wordHighlightTextForeground",{dark:w_,light:w_,hcDark:w_,hcLight:w_},p("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),PSe=st.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Ni(ASe),position:Go.Center},minimap:{color:Ni(Fy),position:uo.Inline}}),OSe=st.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:Ni(RSe),position:Go.Center},minimap:{color:Ni(Fy),position:uo.Inline}}),FSe=st.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Ni(w_),position:Go.Center},minimap:{color:Ni(Fy),position:uo.Inline}}),BSe=st.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),WSe=st.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Ni(MSe),position:Go.Center},minimap:{color:Ni(Fy),position:uo.Inline}});function VSe(o){return o===wv.Write?PSe:o===wv.Text?OSe:WSe}function HSe(o){return o?BSe:FSe}Zr((o,e)=>{const t=o.getColor(GM);t&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`)});var zSe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},$Se=function(o,e){return function(t,i){e(t,i,o)}},_2;function Hu(o,e){const t=e.filter(i=>!o.find(n=>n.equals(i)));if(t.length>=1){const i=t.map(s=>`line ${s.viewState.position.lineNumber} column ${s.viewState.position.column}`).join(", "),n=t.length===1?p("cursorAdded","Cursor added: {0}",i):p("cursorsAdded","Cursors added: {0}",i);hu(n)}}class USe extends Te{constructor(){super({id:"editor.action.insertCursorAbove",label:p("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:N.MenubarSelectionMenu,group:"3_multi",title:p({},"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&i.logicalLine===!1&&(n=!1);const s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();const r=s.getCursorStates();s.setCursorStates(i.source,3,On.addCursorUp(s,r,n)),s.revealTopMostCursor(i.source),Hu(r,s.getCursorStates())}}class jSe extends Te{constructor(){super({id:"editor.action.insertCursorBelow",label:p("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:N.MenubarSelectionMenu,group:"3_multi",title:p({},"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&i.logicalLine===!1&&(n=!1);const s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();const r=s.getCursorStates();s.setCursorStates(i.source,3,On.addCursorDown(s,r,n)),s.revealBottomMostCursor(i.source),Hu(r,s.getCursorStates())}}class KSe extends Te{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:p("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:N.MenubarSelectionMenu,group:"3_multi",title:p({},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n1&&i.push(new Ae(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections(),s=t._getViewModel(),r=s.getCursorStates(),a=[];n.forEach(l=>this.getCursorsForSelection(l,i,a)),a.length>0&&t.setSelections(a),Hu(r,s.getCursorStates())}}class qSe extends Te{constructor(){super({id:"editor.action.addCursorsToBottom",label:p("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=t.getModel().getLineCount(),s=[];for(let l=i[0].startLineNumber;l<=n;l++)s.push(new Ae(l,i[0].startColumn,l,i[0].endColumn));const r=t._getViewModel(),a=r.getCursorStates();s.length>0&&t.setSelections(s),Hu(a,r.getCursorStates())}}class GSe extends Te{constructor(){super({id:"editor.action.addCursorsToTop",label:p("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=[];for(let a=i[0].startLineNumber;a>=1;a--)n.push(new Ae(a,i[0].startColumn,a,i[0].endColumn));const s=t._getViewModel(),r=s.getCursorStates();n.length>0&&t.setSelections(n),Hu(r,s.getCursorStates())}}class c1{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class Bb{static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new Bb(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n=!1,s,r;const a=e.getSelections();a.length===1&&a[0].isEmpty()?(n=!0,s=!0,r=!0):(s=i.wholeWord,r=i.matchCase);const l=e.getSelection();let d,c=null;if(l.isEmpty()){const u=e.getConfiguredWordAtPosition(l.getStartPosition());if(!u)return null;d=u.word,c=new Ae(l.startLineNumber,u.startColumn,l.startLineNumber,u.endColumn)}else d=e.getModel().getValueInRange(l).replace(/\r\n/g,` +`);return new Bb(e,t,n,d,s,r,c)}constructor(e,t,i,n,s,r,a){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=s,this.matchCase=r,this.currentMatch=a}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new c1(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new c1(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const n=this.currentMatch;return this.currentMatch=null,n}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return i?new Ae(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new c1(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new c1(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const n=this.currentMatch;return this.currentMatch=null,n}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return i?new Ae(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1,1073741824)}}class Dg extends q{static get(e){return e.getContribution(Dg.ID)}constructor(e){super(),this._sessionDispose=this._register(new de),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=Bb.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(n=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(n=>{(n.matchCase||n.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new Ae(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const n=e.getState().matchCase;if(!qH(this._editor.getModel(),t,n)){const r=this._editor.getModel(),a=[];for(let l=0,d=t.length;l0&&i.isRegex){const n=this._editor.getModel();i.searchScope?t=n.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(129):null,!1,1073741824):t=n.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(129):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){const n=this._editor.getSelection();for(let s=0,r=t.length;snew Ae(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn)))}}}Dg.ID="editor.contrib.multiCursorController";class Am extends Te{run(e,t){const i=Dg.get(t);if(!i)return;const n=t._getViewModel();if(n){const s=n.getCursorStates(),r=Os.get(t);if(r)this._run(i,r);else{const a=e.get(qe).createInstance(Os,t);this._run(i,a),a.dispose()}Hu(s,n.getCursorStates())}}}class ZSe extends Am{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:p("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:2082,weight:100},menuOpts:{menuId:N.MenubarSelectionMenu,group:"3_multi",title:p({},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class YSe extends Am{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:p("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:N.MenubarSelectionMenu,group:"3_multi",title:p({},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class XSe extends Am{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:p("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:fn(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class QSe extends Am{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:p("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class JSe extends Am{constructor(){super({id:"editor.action.selectHighlights",label:p("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:3114,weight:100},menuOpts:{menuId:N.MenubarSelectionMenu,group:"3_multi",title:p({},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class eye extends Am{constructor(){super({id:"editor.action.changeAll",label:p("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:ae.and(T.writable,T.editorTextFocus),kbOpts:{kbExpr:T.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class tye{constructor(e,t,i,n,s){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=n,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,s&&this._model===s._model&&this._searchText===s._searchText&&this._matchCase===s._matchCase&&this._wordSeparators===s._wordSeparators&&this._modelVersionId===s._modelVersionId&&(this._cachedFindMatches=s._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(k.compareRangesUsingStarts)),this._cachedFindMatches}}let Wb=_2=class extends q{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(107),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new Yt(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(n=>{this._isEnabled=e.getOption(107)})),this._register(e.onDidChangeCursorSelection(n=>{this._isEnabled&&(n.selection.isEmpty()?n.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(n=>{this._setState(null)})),this._register(e.onDidChangeModelContent(n=>{this._isEnabled&&this.updateSoon.schedule()}));const i=Os.get(e);i&&this._register(i.getState().onFindReplaceStateChange(n=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(_2._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,i){if(!t||!i.hasModel())return null;const n=i.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;const s=Dg.get(i);if(!s)return null;const r=Os.get(i);if(!r)return null;let a=s.getSession(r);if(!a){const c=i.getSelections();if(c.length>1){const h=r.getState().matchCase;if(!qH(i.getModel(),c,h))return null}a=Bb.create(i,r)}if(!a||a.currentMatch||/^[ \t]+$/.test(a.searchText)||a.searchText.length>200)return null;const l=r.getState(),d=l.matchCase;if(l.isRevealed){let c=l.searchString;d||(c=c.toLowerCase());let u=a.searchText;if(d||(u=u.toLowerCase()),c===u&&a.matchCase===l.matchCase&&a.wholeWord===l.wholeWord&&!l.isRegex)return null}return new tye(i.getModel(),a.searchText,a.matchCase,a.wholeWord?i.getOption(129):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=this.state.findMatches(),n=this.editor.getSelections();n.sort(k.compareRangesUsingStarts);const s=[];for(let d=0,c=0,u=i.length,h=n.length;d=h)s.push(g),d++;else{const f=k.compareRangesUsingStarts(g,n[c]);f<0?((n[c].isEmpty()||!k.areIntersecting(g,n[c]))&&s.push(g),d++):(f>0||d++,c++)}}const r=this.editor.getOption(80)!=="off",a=this._languageFeaturesService.documentHighlightProvider.has(t)&&r,l=s.map(d=>({range:d,options:HSe(a)}));this._decorations.set(l)}dispose(){this._setState(null),super.dispose()}};Wb.ID="editor.contrib.selectionHighlighter";Wb=_2=zSe([$Se(1,Me)],Wb);function qH(o,e,t){const i=c9(o,e[0],!t);for(let n=1,s=e.length;n{const[t,i,n]=e;qt(ze.isUri(t)),qt(z.isIPosition(i)),qt(typeof n=="string"||!n);const s=o.get(Me),r=await o.get(Xs).createModelReference(t);try{const a=await GH(s.signatureHelpProvider,r.object.textEditorModel,z.lift(i),{triggerKind:xl.Invoke,isRetrigger:!1,triggerCharacter:n},vt.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{r.dispose()}});var _c;(function(o){o.Default={type:0};class e{constructor(n,s){this.request=n,this.previouslyActiveHints=s,this.type=2}}o.Pending=e;class t{constructor(n){this.hints=n,this.type=1}}o.Active=t})(_c||(_c={}));class uD extends q{constructor(e,t,i=uD.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new W),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=_c.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new An),this.triggerChars=new Cw,this.retriggerChars=new Cw,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new jr(i),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(n=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(n=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(n=>this.onCursorChange(n))),this._register(this.editor.onDidChangeModelContent(n=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(n=>this.onDidType(n))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=_c.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!this.providers.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(n),t).catch(nt)}next(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e===e-1,n=this.editor.getOption(85).cycle;if((e<2||i)&&!n){this.cancel();return}this.updateActiveSignature(i&&n?0:t+1)}previous(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t===0,n=this.editor.getOption(85).cycle;if((e<2||i)&&!n){this.cancel();return}this.updateActiveSignature(i&&n?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new _c.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){const t=this.state.type===1||this.state.type===2,i=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const n=this._pendingTriggers.reduce(sye);this._pendingTriggers=[];const s={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const r=this.editor.getModel(),a=this.editor.getPosition();this.state=new _c.Pending(_n(l=>GH(this.providers,r,a,s,l)),i);try{const l=await this.state.request;return e!==this.triggerId?(l==null||l.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l==null||l.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new _c.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=_c.Default),nt(l),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const i of t.signatureHelpTriggerCharacters||[])if(i.length){const n=i.charCodeAt(0);this.triggerChars.add(n),this.retriggerChars.add(n)}for(const i of t.signatureHelpRetriggerCharacters||[])i.length&&this.retriggerChars.add(i.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:xl.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:xl.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:xl.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(85).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}uD.DEFAULT_DELAY=120;function sye(o,e){switch(e.triggerKind){case xl.Invoke:return e;case xl.ContentChange:return o;case xl.TriggerCharacter:default:return e}}var oye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Sk=function(o,e){return function(t,i){e(t,i,o)}},v2;const Lo=pe,rye=Zi("parameter-hints-next",ve.chevronDown,p("parameterHintsNextIcon","Icon for show next parameter hint.")),aye=Zi("parameter-hints-previous",ve.chevronUp,p("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let QS=v2=class extends q{constructor(e,t,i,n,s){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new de),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new Ud({editor:e},s,n)),this.keyVisible=xg.Visible.bindTo(i),this.keyMultipleSignatures=xg.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){const e=Lo(".editor-widget.parameter-hints-widget"),t=le(e,Lo(".phwrapper"));t.tabIndex=-1;const i=le(t,Lo(".controls")),n=le(i,Lo(".button"+Ue.asCSSSelector(aye))),s=le(i,Lo(".overloads")),r=le(i,Lo(".button"+Ue.asCSSSelector(rye)));this._register(J(n,"click",h=>{ct.stop(h),this.previous()})),this._register(J(r,"click",h=>{ct.stop(h),this.next()}));const a=Lo(".body"),l=new a0(a,{alwaysConsumeMouseWheel:!0});this._register(l),t.appendChild(l.getDomNode());const d=le(a,Lo(".signature")),c=le(a,Lo(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:d,overloads:s,docs:c,scrollbar:l},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(h=>{this.visible&&this.editor.layoutContentWidget(this)}));const u=()=>{if(!this.domNodes)return;const h=this.editor.getOption(50);this.domNodes.element.style.fontSize=`${h.fontSize}px`,this.domNodes.element.style.lineHeight=`${h.lineHeight/h.fontSize}`};u(),this._register(ye.chain(this.editor.onDidChangeConfiguration.bind(this.editor),h=>h.filter(g=>g.hasChanged(50)))(u)),this._register(this.editor.onDidLayoutChange(h=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{var e;(e=this.domNodes)===null||e===void 0||e.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,(e=this.domNodes)===null||e===void 0||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;const i=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",i),this.keyMultipleSignatures.set(i),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const n=e.signatures[e.activeSignature];if(!n)return;const s=le(this.domNodes.signature,Lo(".code")),r=this.editor.getOption(50);s.style.fontSize=`${r.fontSize}px`,s.style.fontFamily=r.fontFamily;const a=n.parameters.length>0,l=(t=n.activeParameter)!==null&&t!==void 0?t:e.activeParameter;if(a)this.renderParameters(s,n,l);else{const u=le(s,Lo("span"));u.textContent=n.label}const d=n.parameters[l];if(d!=null&&d.documentation){const u=Lo("span.documentation");if(typeof d.documentation=="string")u.textContent=d.documentation;else{const h=this.renderMarkdownDocs(d.documentation);u.appendChild(h.element)}le(this.domNodes.docs,Lo("p",{},u))}if(n.documentation!==void 0)if(typeof n.documentation=="string")le(this.domNodes.docs,Lo("p",{},n.documentation));else{const u=this.renderMarkdownDocs(n.documentation);le(this.domNodes.docs,u.element)}const c=this.hasDocs(n,d);if(this.domNodes.signature.classList.toggle("has-docs",c),this.domNodes.docs.classList.toggle("empty",!c),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,d){let u="";const h=n.parameters[l];Array.isArray(h.label)?u=n.label.substring(h.label[0],h.label[1]):u=h.label,h.documentation&&(u+=typeof h.documentation=="string"?`, ${h.documentation}`:`, ${h.documentation.value}`),n.documentation&&(u+=typeof n.documentation=="string"?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==u&&(mo(p("hint","{0}, hint",u)),this.announcedLabel=u)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var i;(i=this.domNodes)===null||i===void 0||i.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&Lc(t.documentation).length>0||t&&typeof t.documentation=="object"&&Lc(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&Lc(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&Lc(e.documentation.value).length>0)}renderParameters(e,t,i){const[n,s]=this.getParameterLabelOffsets(t,i),r=document.createElement("span");r.textContent=t.label.substring(0,n);const a=document.createElement("span");a.textContent=t.label.substring(n,s),a.className="parameter active";const l=document.createElement("span");l.textContent=t.label.substring(s),le(e,r,a,l)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const n=new RegExp(`(\\W|^)${qo(i.label)}(?=\\W|$)`,"g");n.test(e.label);const s=n.lastIndex-i.label.length;return s>=0?[s,n.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return v2.ID}updateMaxHeight(){if(!this.domNodes)return;const t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;const i=this.domNodes.element.getElementsByClassName("phwrapper");i.length&&(i[0].style.maxHeight=t)}};QS.ID="editor.widget.parameterHintsWidget";QS=v2=oye([Sk(2,Xe),Sk(3,So),Sk(4,bi)],QS);M("editorHoverWidget.highlightForeground",{dark:Br,light:Br,hcDark:Br,hcLight:Br},p("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));var lye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},u9=function(o,e){return function(t,i){e(t,i,o)}},b2;let kg=b2=class extends q{static get(e){return e.getContribution(b2.ID)}constructor(e,t,i){super(),this.editor=e,this.model=this._register(new uD(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints(n=>{var s;n?(this.widget.value.show(),this.widget.value.render(n)):(s=this.widget.rawValue)===null||s===void 0||s.hide()})),this.widget=new Ru(()=>this._register(t.createInstance(QS,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){var e;(e=this.widget.rawValue)===null||e===void 0||e.previous()}next(){var e;(e=this.widget.rawValue)===null||e===void 0||e.next()}trigger(e){this.model.trigger(e,0)}};kg.ID="editor.controller.parameterHints";kg=b2=lye([u9(1,qe),u9(2,Me)],kg);class dye extends Te{constructor(){super({id:"editor.action.triggerParameterHints",label:p("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:T.hasSignatureHelpProvider,kbOpts:{kbExpr:T.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=kg.get(t);i==null||i.trigger({triggerKind:xl.Invoke})}}At(kg.ID,kg,2);_e(dye);const lP=175,dP=Rn.bindToContribution(kg.get);we(new dP({id:"closeParameterHints",precondition:xg.Visible,handler:o=>o.cancel(),kbOpts:{weight:lP,kbExpr:T.focus,primary:9,secondary:[1033]}}));we(new dP({id:"showPrevParameterHint",precondition:ae.and(xg.Visible,xg.MultipleSignatures),handler:o=>o.previous(),kbOpts:{weight:lP,kbExpr:T.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));we(new dP({id:"showNextParameterHint",precondition:ae.and(xg.Visible,xg.MultipleSignatures),handler:o=>o.next(),kbOpts:{weight:lP,kbExpr:T.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));var cye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yk=function(o,e){return function(t,i){e(t,i,o)}};const hD=new De("renameInputVisible",!1,p("renameInputVisible","Whether the rename input widget is visible"));let C2=class{constructor(e,t,i,n,s){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._disposables=new de,this.allowEditorOverflow=!0,this._visibleContextKey=hD.bindTo(s),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(50)&&this._updateFont()})),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",p("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){var t,i,n,s;if(!this._input||!this._domNode)return;const r=e.getColor(ml),a=e.getColor(jM);this._domNode.style.backgroundColor=String((t=e.getColor(Fi))!==null&&t!==void 0?t:""),this._domNode.style.boxShadow=r?` 0 0 8px 2px ${r}`:"",this._domNode.style.border=a?`1px solid ${a}`:"",this._domNode.style.color=String((i=e.getColor(M7))!==null&&i!==void 0?i:""),this._input.style.backgroundColor=String((n=e.getColor(T7))!==null&&n!==void 0?n:"");const l=e.getColor(A7);this._input.style.borderWidth=l?"1px":"0px",this._input.style.borderStyle=l?"solid":"none",this._input.style.borderColor=(s=l==null?void 0:l.toString())!==null&&s!==void 0?s:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(50);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=`${e.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){var e,t;const[i,n]=this._acceptKeybindings;return this._label.innerText=p({},"{0} to Rename, {1} to Preview",(e=this._keybindingService.lookupKeybinding(i))===null||e===void 0?void 0:e.getLabel(),(t=this._keybindingService.lookupKeybinding(n))===null||t===void 0?void 0:t.getLabel()),null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){var t;(t=this._currentAcceptInput)===null||t===void 0||t.call(this,e)}cancelInput(e){var t;(t=this._currentCancelInput)===null||t===void 0||t.call(this,e)}getInput(e,t,i,n,s,r){this._domNode.classList.toggle("preview",s),this._position=new z(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",i.toString()),this._input.setAttribute("selectionEnd",n.toString()),this._input.size=Math.max((e.endColumn-e.startColumn)*1.1,20);const a=new de;return new Promise(l=>{this._currentCancelInput=d=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l(d),!0),this._currentAcceptInput=d=>{if(this._input.value.trim().length===0||this._input.value===t){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l({newName:this._input.value,wantsPreview:s&&d})},a.add(r.onCancellationRequested(()=>this.cancelInput(!0))),a.add(this._editor.onDidBlurEditorWidget(()=>{var d;return this.cancelInput(!(!((d=this._domNode)===null||d===void 0)&&d.ownerDocument.hasFocus()))})),this._show()}).finally(()=>{a.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};C2=cye([yk(2,Sn),yk(3,Xt),yk(4,Xe)],C2);var uye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rh=function(o,e){return function(t,i){e(t,i,o)}},w2;class cP{constructor(e,t,i){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join(` `):void 0}:{range:k.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(` `):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,i,n){const s=this._providers[t];if(!s)return{edits:[],rejectReason:i.join(` -`)};const r=await s.provideRenameEdits(this.model,this.position,e,n);if(r){if(r.rejectReason)return this._provideRenameEdits(e,t+1,i.concat(r.rejectReason),n)}else return this._provideRenameEdits(e,t+1,i.concat(p("no result","No result.")),n);return r}}async function lye(o,e,t,i){const n=new cP(e,t,o),s=await n.resolveRenameLocation(vt.None);return s!=null&&s.rejectReason?{edits:[],rejectReason:s.rejectReason}:n.provideRenameEdits(i,vt.None)}let Ig=w2=class{static get(e){return e.getContribution(w2.ID)}constructor(e,t,i,n,s,r,a,l){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=r,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new de,this._cts=new tn,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(C2,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){var e,t;if(this._cts.dispose(!0),this._cts=new tn,!this.editor.hasModel())return;const i=this.editor.getPosition(),n=new cP(this.editor.getModel(),i,this._languageFeaturesService.renameProvider);if(!n.hasProvider())return;const s=new bu(this.editor,5,void 0,this._cts.token);let r;try{const f=n.resolveRenameLocation(s.token);this._progressService.showWhile(f,250),r=await f}catch(f){(e=ho.get(this.editor))===null||e===void 0||e.showMessage(f||p("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),i);return}finally{s.dispose()}if(!r)return;if(r.rejectReason){(t=ho.get(this.editor))===null||t===void 0||t.showMessage(r.rejectReason,i);return}if(s.token.isCancellationRequested)return;const a=new bu(this.editor,5,r.range,this._cts.token),l=this.editor.getSelection();let d=0,c=r.text.length;!k.isEmpty(l)&&!k.spansMultipleLines(l)&&k.containsRange(r.range,l)&&(d=Math.max(0,l.startColumn-r.range.startColumn),c=Math.min(r.range.endColumn,l.endColumn)-r.range.startColumn);const u=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),h=await this._renameInputField.getInput(r.range,r.text,d,c,u,a.token);if(typeof h=="boolean"){h&&this.editor.focus(),a.dispose();return}this.editor.focus();const g=Cy(n.provideRenameEdits(h.newName,a.token),a.token).then(async f=>{if(!(!f||!this.editor.hasModel())){if(f.rejectReason){this._notificationService.info(f.rejectReason);return}this.editor.setSelection(k.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(f,{editor:this.editor,showPreview:h.wantsPreview,label:p("label","Renaming '{0}' to '{1}'",r==null?void 0:r.text,h.newName),code:"undoredo.rename",quotableLabel:p("quotableLabel","Renaming {0} to {1}",r==null?void 0:r.text,h.newName),respectAutoSaveConfig:!0}).then(m=>{m.ariaSummary&&mo(p("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",r.text,h.newName,m.ariaSummary))}).catch(m=>{this._notificationService.error(p("rename.failedApply","Rename failed to apply edits")),this._logService.error(m)})}},f=>{this._notificationService.error(p("rename.failed","Rename failed to compute edits")),this._logService.error(f)}).finally(()=>{a.dispose()});return this._progressService.showWhile(g,250),g}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};Ig.ID="editor.contrib.renameController";Ig=w2=aye([rh(1,qe),rh(2,sn),rh(3,f0),rh(4,Bu),rh(5,bo),rh(6,FM),rh(7,Me)],Ig);class dye extends Te{constructor(){super({id:"editor.action.rename",label:p("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:ae.and(T.writable,T.hasRenameProvider),kbOpts:{kbExpr:T.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(Ot),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return ze.isUri(n)&&z.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(r=>{r&&(r.setPosition(s),r.invokeWithinContext(a=>(this.reportTelemetry(a,r),this.run(a,r))))},nt):super.runCommand(e,t)}run(e,t){const i=Ig.get(t);return i?i.run():Promise.resolve()}}At(Ig.ID,Ig,4);_e(dye);const uP=Rn.bindToContribution(Ig.get);we(new uP({id:"acceptRenameInput",precondition:hD,handler:o=>o.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:ae.and(T.focus,ae.not("isComposing")),primary:3}}));we(new uP({id:"acceptRenameInputWithPreview",precondition:ae.and(hD,ae.has("config.editor.rename.enablePreview")),handler:o=>o.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:ae.and(T.focus,ae.not("isComposing")),primary:1027}}));we(new uP({id:"cancelRenameInput",precondition:hD,handler:o=>o.cancelRenameInput(),kbOpts:{weight:199,kbExpr:T.focus,primary:9,secondary:[1033]}}));ql("_executeDocumentRenameProvider",function(o,e,t,...i){const[n]=i;qt(typeof n=="string");const{renameProvider:s}=o.get(Me);return lye(s,e,t,n)});ql("_executePrepareRename",async function(o,e,t){const{renameProvider:i}=o.get(Me),s=await new cP(e,t,i).resolveRenameLocation(vt.None);if(s!=null&&s.rejectReason)throw new Error(s.rejectReason);return s});xi.as(Va.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:p("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});function cye(o){for(let e=0,t=o.length;e0?t[0]:[]}async function QH(o,e,t,i,n){const s=fye(o,e),r=await Promise.all(s.map(async a=>{let l,d=null;try{l=await a.provideDocumentSemanticTokens(e,a===t?i:null,n)}catch(c){d=c,l=null}return(!l||!gD(l)&&!YH(l))&&(l=null),new gye(a,l,d)}));for(const a of r){if(a.error)throw a.error;if(a.tokens)return a}return r.length>0?r[0]:null}function pye(o,e){const t=o.orderedGroups(e);return t.length>0?t[0]:null}class mye{constructor(e,t){this.provider=e,this.tokens=t}}function _ye(o,e){return o.has(e)}function JH(o,e){const t=o.orderedGroups(e);return t.length>0?t[0]:[]}async function hP(o,e,t,i){const n=JH(o,e),s=await Promise.all(n.map(async r=>{let a;try{a=await r.provideDocumentRangeSemanticTokens(e,t,i)}catch(l){en(l),a=null}return(!a||!gD(a))&&(a=null),new mye(r,a)}));for(const r of s)if(r.tokens)return r;return s.length>0?s[0]:null}Et.registerCommand("_provideDocumentSemanticTokensLegend",async(o,...e)=>{const[t]=e;qt(t instanceof ze);const i=o.get(Si).getModel(t);if(!i)return;const{documentSemanticTokensProvider:n}=o.get(Me),s=pye(n,i);return s?s[0].getLegend():o.get(Ri).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)});Et.registerCommand("_provideDocumentSemanticTokens",async(o,...e)=>{const[t]=e;qt(t instanceof ze);const i=o.get(Si).getModel(t);if(!i)return;const{documentSemanticTokensProvider:n}=o.get(Me);if(!XH(n,i))return o.get(Ri).executeCommand("_provideDocumentRangeSemanticTokens",t,i.getFullModelRange());const s=await QH(n,i,null,null,vt.None);if(!s)return;const{provider:r,tokens:a}=s;if(!a||!gD(a))return;const l=ZH({id:0,type:"full",data:a.data});return a.resultId&&r.releaseDocumentSemanticTokens(a.resultId),l});Et.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(o,...e)=>{const[t,i]=e;qt(t instanceof ze);const n=o.get(Si).getModel(t);if(!n)return;const{documentRangeSemanticTokensProvider:s}=o.get(Me),r=JH(s,n);if(r.length===0)return;if(r.length===1)return r[0].getLegend();if(!i||!k.isIRange(i))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),r[0].getLegend();const a=await hP(s,n,k.lift(i),vt.None);if(a)return a.provider.getLegend()});Et.registerCommand("_provideDocumentRangeSemanticTokens",async(o,...e)=>{const[t,i]=e;qt(t instanceof ze),qt(k.isIRange(i));const n=o.get(Si).getModel(t);if(!n)return;const{documentRangeSemanticTokensProvider:s}=o.get(Me),r=await hP(s,n,k.lift(i),vt.None);if(!(!r||!r.tokens))return ZH({id:0,type:"full",data:r.tokens.data})});const gP="editor.semanticHighlighting";function S2(o,e,t){var i;const n=(i=t.getValue(gP,{overrideIdentifier:o.getLanguageId(),resource:o.uri}))===null||i===void 0?void 0:i.enabled;return typeof n=="boolean"?n:e.getColorTheme().semanticHighlighting}var ez=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sl=function(o,e){return function(t,i){e(t,i,o)}},pc;let y2=class extends q{constructor(e,t,i,n,s,r){super(),this._watchers=Object.create(null);const a=c=>{this._watchers[c.uri.toString()]=new Vb(c,e,i,s,r)},l=(c,u)=>{u.dispose(),delete this._watchers[c.uri.toString()]},d=()=>{for(const c of t.getModels()){const u=this._watchers[c.uri.toString()];S2(c,i,n)?u||a(c):u&&l(c,u)}};this._register(t.onModelAdded(c=>{S2(c,i,n)&&a(c)})),this._register(t.onModelRemoved(c=>{const u=this._watchers[c.uri.toString()];u&&l(c,u)})),this._register(n.onDidChangeConfiguration(c=>{c.affectsConfiguration(gP)&&d()})),this._register(i.onDidColorThemeChange(d))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};y2=ez([sl(0,Yy),sl(1,Si),sl(2,Sn),sl(3,Dt),sl(4,wr),sl(5,Me)],y2);let Vb=pc=class extends q{constructor(e,t,i,n,s){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=s.documentSemanticTokensProvider,this._debounceInformation=n.for(this._provider,"DocumentSemanticTokens",{min:pc.REQUEST_MIN_DELAY,max:pc.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new Yt(()=>this._fetchDocumentSemanticTokensNow(),pc.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const r=()=>{jt(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};r(),this._register(this._provider.onDidChange(()=>{r(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(i.onDidColorThemeChange(a=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),jt(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!XH(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const e=new tn,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=QH(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const s=[],r=this._model.onDidChangeContent(l=>{s.push(l)}),a=new ds(!1);n.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,s);else{const{provider:d,tokens:c}=l,u=this._semanticTokensStylingService.getStyling(d);this._setDocumentSemanticTokens(d,c||null,u,s)}},l=>{l&&(Fa(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||nt(l),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),(s.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,i,n,s){s=Math.min(s,i.length-n,e.length-t);for(let r=0;r{(n.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!i){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),r();return}if(YH(t)){if(!s){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:s.data};else{let a=0;for(const h of t.edits)a+=(h.data?h.data.length:0)-h.deleteCount;const l=s.data,d=new Uint32Array(l.length+a);let c=l.length,u=d.length;for(let h=t.edits.length-1;h>=0;h--){const g=t.edits[h];if(g.start>l.length){i.warnInvalidEditStart(s.resultId,t.resultId,h,g.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}const f=c-(g.start+g.deleteCount);f>0&&(pc._copy(l,c-f,d,u-f,f),u-=f),g.data&&(pc._copy(g.data,0,d,u-g.data.length,g.data.length),u-=g.data.length),c=g.start}c>0&&pc._copy(l,0,d,0,c),t={resultId:t.resultId,data:d}}}if(gD(t)){this._currentDocumentResponse=new vye(e,t.resultId,t.data);const a=qB(t,i,this._model.getLanguageId());if(n.length>0)for(const l of n)for(const d of a)for(const c of l.changes)d.applyEdit(c.range,c.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);r()}};Vb.REQUEST_MIN_DELAY=300;Vb.REQUEST_MAX_DELAY=2e3;Vb=pc=ez([sl(1,Yy),sl(2,Sn),sl(3,wr),sl(4,Me)],Vb);class vye{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}_L(y2);var bye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},c_=function(o,e){return function(t,i){e(t,i,o)}};let Hb=class extends q{constructor(e,t,i,n,s,r){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._provider=r.documentRangeSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new Yt(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(l=>{this._cancelAll(),a()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration(gP)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()})),a()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;tthis._requestRange(e,i)))}_requestRange(e,t){const i=e.getVersionId(),n=_n(r=>Promise.resolve(hP(this._provider,e,t,r))),s=new ds(!1);return n.then(r=>{if(this._debounceInformation.update(e,s.elapsed()),!r||!r.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:a,tokens:l}=r,d=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(t,qB(l,d,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(n),()=>this._removeOutstandingRequest(n)),n}};Hb.ID="editor.contrib.viewportSemanticTokens";Hb=bye([c_(1,Yy),c_(2,Sn),c_(3,Dt),c_(4,wr),c_(5,Me)],Hb);At(Hb.ID,Hb,1);class Cye{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const i=[];for(const n of t){const s=[];i.push(s),this.selectSubwords&&this._addInWordRanges(s,e,n),this._addWordRanges(s,e,n),this._addWhitespaceLine(s,e,n),s.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;const{word:s,startColumn:r}=n,a=i.column-r;let l=a,d=a,c=0;for(;l>=0;l--){const u=s.charCodeAt(l);if(l!==a&&(u===95||u===45))break;if(Dc(u)&&el(c))break;c=u}for(l+=1;d0&&t.getLineFirstNonWhitespaceColumn(i.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(i.lineNumber)===0&&e.push({range:new k(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var wye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Sye=function(o,e){return function(t,i){e(t,i,o)}},L2;class fP{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new fP(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let lm=L2=class{static get(e){return e.getContribution(L2.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}async run(e){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||await iz(this._languageFeaturesService.selectionRangeProvider,i,t.map(s=>s.getPosition()),this._editor.getOption(112),vt.None).then(s=>{var r;if(!(!ls(s)||s.length!==t.length)&&!(!this._editor.hasModel()||!Bi(this._editor.getSelections(),t,(a,l)=>a.equalsSelection(l)))){for(let a=0;al.containsPosition(t[a].getStartPosition())&&l.containsPosition(t[a].getEndPosition())),s[a].unshift(t[a]);this._state=s.map(a=>new fP(0,a)),(r=this._selectionListener)===null||r===void 0||r.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var a;this._ignoreSelection||((a=this._selectionListener)===null||a===void 0||a.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(s=>s.mov(e));const n=this._state.map(s=>Re.fromPositions(s.ranges[s.index].getStartPosition(),s.ranges[s.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}}};lm.ID="editor.contrib.smartSelectController";lm=L2=wye([Sye(1,Me)],lm);class tz extends Te{constructor(e,t){super(t),this._forward=e}async run(e,t){const i=lm.get(t);i&&await i.run(this._forward)}}class yye extends tz{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:p("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:N.MenubarSelectionMenu,group:"1_basic",title:p({},"&&Expand Selection"),order:2}})}}Et.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class Lye extends tz{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:p("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:N.MenubarSelectionMenu,group:"1_basic",title:p({},"&&Shrink Selection"),order:3}})}}At(lm.ID,lm,4);_e(yye);_e(Lye);async function iz(o,e,t,i,n){const s=o.all(e).concat(new Cye(i.selectSubwords));s.length===1&&s.unshift(new To);const r=[],a=[];for(const l of s)r.push(Promise.resolve(l.provideSelectionRanges(e,t,n)).then(d=>{if(ls(d)&&d.length===t.length)for(let c=0;c{if(l.length===0)return[];l.sort((h,g)=>z.isBefore(h.getStartPosition(),g.getStartPosition())?1:z.isBefore(g.getStartPosition(),h.getStartPosition())||z.isBefore(h.getEndPosition(),g.getEndPosition())?-1:z.isBefore(g.getEndPosition(),h.getEndPosition())?1:0);const d=[];let c;for(const h of l)(!c||k.containsRange(h,c)&&!k.equalsRange(h,c))&&(d.push(h),c=h);if(!i.selectLeadingAndTrailingWhitespace)return d;const u=[d[0]];for(let h=1;ho}),Lk="data-sticky-line-index",f9="data-sticky-is-line",xye="data-sticky-is-line-number",p9="data-sticky-is-folding-icon";class kye extends q{constructor(e){super(),this._editor=e,this._foldingIconStore=new de,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(66),this._stickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof Su),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(114).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(114)&&t(),i.hasChanged(66)&&(this._lineHeight=this._editor.getOption(66))})),this._register(this._editor.onDidScrollChange(i=>{i.scrollLeftChanged&&t(),i.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{t(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange(i=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getStickyLineForLine(e){return this._stickyLines.find(t=>t.lineNumber===e)}getCurrentLines(){return this._lineNumbers}setState(e,t,i=1/0){if((!this._previousState&&!e||this._previousState&&this._previousState.equals(e))&&i===1/0)return;this._previousState=e;const n=this._stickyLines;if(this._clearStickyWidget(),!e||!this._editor._getViewModel())return;if(e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const r=[...e.startLineNumbers];e.showEndForLine!==null&&(r[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=r}else this._lastLineRelativePosition=0,this._lineNumbers=[];this._renderRootNode(n,t,i)}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-e.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${e.width-e.verticalScrollbarWidth}px`}_clearStickyWidget(){this._stickyLines=[],this._foldingIconStore.clear(),$n(this._lineNumbersDomNode),$n(this._linesDomNode),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(e){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${e?.5:0}s`)}_setFoldingIconsVisibility(e){for(const t of this._stickyLines){const i=t.foldingIcon;i&&i.setVisible(e?!0:i.isCollapsed)}}async _renderRootNode(e,t,i=1/0){const n=this._editor.getLayoutInfo();for(const[r,a]of this._lineNumbers.entries()){const l=e[r],d=a>=i||(l==null?void 0:l.lineNumber)!==a?this._renderChildNode(r,a,t,n):this._updateTopAndZIndexOfStickyLine(l);d&&(this._linesDomNode.appendChild(d.lineDomNode),this._lineNumbersDomNode.appendChild(d.lineNumberDomNode),this._stickyLines.push(d))}t&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));const s=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;if(s===0){this._clearStickyWidget();return}this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${s}px`,this._linesDomNodeScrollable.style.height=`${s}px`,this._rootDomNode.style.height=`${s}px`,this._rootDomNode.style.marginLeft="0px",this._updateMinContentWidth(),this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){this._editor.getOption(109)==="mouseover"&&(this._foldingIconStore.add(J(this._lineNumbersDomNode,Se.MOUSE_ENTER,t=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(J(this._lineNumbersDomNode,Se.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,t,i,n){const s=this._editor._getViewModel();if(!s)return;const r=s.coordinatesConverter.convertModelPositionToViewPosition(new z(t,1)).lineNumber,a=s.getViewLineRenderingData(r),l=this._editor.getOption(67);let d;try{d=lo.filter(a.inlineDecorations,r,a.minColumn,a.maxColumn)}catch{d=[]}const c=new Ou(!0,!0,a.content,a.continuesWithWrappedLine,a.isBasicASCII,a.containsRTL,0,a.tokens,d,a.tabSize,a.startVisibleColumn,1,1,1,500,"none",!0,!0,null),u=new mm(2e3),h=n0(c,u);let g;g9?g=g9.createHTML(u.build()):g=u.build();const f=document.createElement("span");f.setAttribute(Lk,String(e)),f.setAttribute(f9,""),f.setAttribute("role","listitem"),f.tabIndex=0,f.className="sticky-line-content",f.classList.add(`stickyLine${t}`),f.style.lineHeight=`${this._lineHeight}px`,f.innerHTML=g;const m=document.createElement("span");m.setAttribute(Lk,String(e)),m.setAttribute(xye,""),m.className="sticky-line-number",m.style.lineHeight=`${this._lineHeight}px`;const v=n.contentLeft;m.style.width=`${v}px`;const _=document.createElement("span");l.renderType===1||l.renderType===3&&t%10===0?_.innerText=t.toString():l.renderType===2&&(_.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),_.className="sticky-line-number-inner",_.style.lineHeight=`${this._lineHeight}px`,_.style.width=`${n.lineNumbersWidth}px`,_.style.paddingLeft=`${n.lineNumbersLeft}px`,m.appendChild(_);const b=this._renderFoldingIconForLine(i,t);b&&m.appendChild(b.domNode),this._editor.applyFontInfo(f),this._editor.applyFontInfo(_),m.style.lineHeight=`${this._lineHeight}px`,f.style.lineHeight=`${this._lineHeight}px`,m.style.height=`${this._lineHeight}px`,f.style.height=`${this._lineHeight}px`;const C=new Iye(e,t,f,m,b,h.characterMapping);return this._updateTopAndZIndexOfStickyLine(C)}_updateTopAndZIndexOfStickyLine(e){var t;const i=e.index,n=e.lineDomNode,s=e.lineNumberDomNode,r=i===this._lineNumbers.length-1,a="0",l="1";n.style.zIndex=r?a:l,s.style.zIndex=r?a:l;const d=`${i*this._lineHeight+this._lastLineRelativePosition+(!((t=e.foldingIcon)===null||t===void 0)&&t.isCollapsed?1:0)}px`,c=`${i*this._lineHeight}px`;return n.style.top=r?d:c,s.style.top=r?d:c,e}_renderFoldingIconForLine(e,t){const i=this._editor.getOption(109);if(!e||i==="never")return;const n=e.regions,s=n.findRange(t),r=n.getStartLineNumber(s);if(!(t===r))return;const l=n.isCollapsed(s),d=new Eye(l,r,n.getEndLineNumber(s),this._lineHeight);return d.setVisible(this._isOnGlyphMargin?!0:l||i==="always"),d.domNode.setAttribute(p9,""),d}_updateMinContentWidth(){this._minContentWidthInPx=0;for(const e of this._stickyLines)e.lineDomNode.scrollWidth>this._minContentWidthInPx&&(this._minContentWidthInPx=e.lineDomNode.scrollWidth);this._minContentWidthInPx+=this._editor.getLayoutInfo().verticalScrollbarWidth}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const i=QM(t.characterMapping,e,0);return new z(t.lineNumber,i)}getLineNumberFromChildDomNode(e){var t,i;return(i=(t=this._getRenderedStickyLineFromChildDomNode(e))===null||t===void 0?void 0:t.lineNumber)!==null&&i!==void 0?i:null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getLineIndexFromChildDomNode(e);return t===null||t<0||t>=this._stickyLines.length?null:this._stickyLines[t]}getLineIndexFromChildDomNode(e){const t=this._getAttributeValue(e,Lk);return t?parseInt(t,10):null}isInStickyLine(e){return this._getAttributeValue(e,f9)!==void 0}isInFoldingIconDomNode(e){return this._getAttributeValue(e,p9)!==void 0}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){const i=e.getAttribute(t);if(i!==null)return i;e=e.parentElement}}}class Iye{constructor(e,t,i,n,s,r){this.index=e,this.lineNumber=t,this.lineDomNode=i,this.lineNumberDomNode=n,this.foldingIcon=s,this.characterMapping=r}}class Eye{constructor(e,t,i,n){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=i,this.dimension=n,this.domNode=document.createElement("div"),this.domNode.style.width=`${n}px`,this.domNode.style.height=`${n}px`,this.domNode.className=Ue.asClassName(e?GL:qL)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}class uv{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class JS{constructor(e,t,i){this.range=e,this.children=t,this.parent=i}}class nz{constructor(e,t,i,n){this.uri=e,this.version=t,this.element=i,this.outlineProviderId=n}}var fD=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zb=function(o,e){return function(t,i){e(t,i,o)}},hv;(function(o){o.OUTLINE_MODEL="outlineModel",o.FOLDING_PROVIDER_MODEL="foldingProviderModel",o.INDENTATION_MODEL="indentationModel"})(hv||(hv={}));var Bc;(function(o){o[o.VALID=0]="VALID",o[o.INVALID=1]="INVALID",o[o.CANCELED=2]="CANCELED"})(Bc||(Bc={}));let D2=class extends q{constructor(e,t,i,n){super(),this._editor=e,this._languageConfigurationService=t,this._languageFeaturesService=i,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new jr(300)),this._updateOperation=this._register(new de);const s=new x2(i),r=new I2(this._editor,i),a=new k2(this._editor,t);switch(n){case hv.OUTLINE_MODEL:this._modelProviders.push(s),this._modelProviders.push(r),this._modelProviders.push(a);break;case hv.FOLDING_PROVIDER_MODEL:this._modelProviders.push(r),this._modelProviders.push(a);break;case hv.INDENTATION_MODEL:this._modelProviders.push(a);break}}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(e,t,i){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger(async()=>{for(const n of this._modelProviders){const{statusPromise:s,modelPromise:r}=n.computeStickyModel(e,t,i);this._modelPromise=r;const a=await s;if(this._modelPromise!==r)return null;switch(a){case Bc.CANCELED:return this._updateOperation.clear(),null;case Bc.VALID:return n.stickyModel}}return null}).catch(n=>(nt(n),null))}};D2=fD([zb(1,si),zb(2,Me)],D2);class sz{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,Bc.INVALID}computeStickyModel(e,t,i){if(i.isCancellationRequested||!this.isProviderValid(e))return{statusPromise:this._invalid(),modelPromise:null};const n=_n(s=>this.createModelFromProvider(e,t,s));return{statusPromise:n.then(s=>this.isModelValid(s)?i.isCancellationRequested?Bc.CANCELED:(this._stickyModel=this.createStickyModel(e,t,i,s),Bc.VALID):this._invalid()).then(void 0,s=>(nt(s),Bc.CANCELED)),modelPromise:n}}isModelValid(e){return!0}isProviderValid(e){return!0}}let x2=class extends sz{constructor(e){super(),this._languageFeaturesService=e}createModelFromProvider(e,t,i){return _d.create(this._languageFeaturesService.documentSymbolProvider,e,i)}createStickyModel(e,t,i,n){var s;const{stickyOutlineElement:r,providerID:a}=this._stickyModelFromOutlineModel(n,(s=this._stickyModel)===null||s===void 0?void 0:s.outlineProviderId);return new nz(e.uri,t,r,a)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let i;if(wt.first(e.children.values())instanceof EH){const a=wt.find(e.children.values(),l=>l.id===t);if(a)i=a.children;else{let l="",d=-1,c;for(const[u,h]of e.children.entries()){const g=this._findSumOfRangesOfGroup(h);g>d&&(c=h,d=g,l=h.id)}t=l,i=c.children}}else i=e.children;const n=[],s=Array.from(i.values()).sort((a,l)=>{const d=new uv(a.symbol.range.startLineNumber,a.symbol.range.endLineNumber),c=new uv(l.symbol.range.startLineNumber,l.symbol.range.endLineNumber);return this._comparator(d,c)});for(const a of s)n.push(this._stickyModelFromOutlineElement(a,a.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new JS(void 0,n,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){const i=[];for(const s of e.children.values())if(s.symbol.selectionRange.startLineNumber!==s.symbol.range.endLineNumber)if(s.symbol.selectionRange.startLineNumber!==t)i.push(this._stickyModelFromOutlineElement(s,s.symbol.selectionRange.startLineNumber));else for(const r of s.children.values())i.push(this._stickyModelFromOutlineElement(r,s.symbol.selectionRange.startLineNumber));i.sort((s,r)=>this._comparator(s.range,r.range));const n=new uv(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new JS(n,i,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(const i of e.children.values())t+=this._findSumOfRangesOfGroup(i);return e instanceof GT?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};x2=fD([zb(0,Me)],x2);class oz extends sz{constructor(e){super(),this._foldingLimitReporter=new xH(e)}createStickyModel(e,t,i,n){const s=this._fromFoldingRegions(n);return new nz(e.uri,t,s,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){const t=e.length,i=[],n=new JS(void 0,[],void 0);for(let s=0;s0}createModelFromProvider(e,t,i){const n=Ul.getFoldingRangeProviders(this._languageFeaturesService,e);return new JR(e,n,()=>this.createModelFromProvider(e,t,i),this._foldingLimitReporter,void 0).compute(i)}};I2=fD([zb(1,Me)],I2);var Nye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},m9=function(o,e){return function(t,i){e(t,i,o)}};class Tye{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=i}}let E2=class extends q{constructor(e,t,i){super(),this._languageFeaturesService=t,this._languageConfigurationService=i,this._onDidChangeStickyScroll=this._register(new W),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new de),this._updateSoon=this._register(new Yt(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(114)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._stickyModelProvider=null,this._sessionStore.clear(),this._options=this._editor.getOption(114),this._options.enabled&&(this._stickyModelProvider=this._sessionStore.add(new D2(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel)),this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this._onDidChangeStickyScroll.fire(),this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this.update())}getVersionId(){var e;return(e=this._model)===null||e===void 0?void 0:e.version}async update(){var e;(e=this._cts)===null||e===void 0||e.dispose(!0),this._cts=new tn,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(e){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization()){this._model=null;return}const t=this._editor.getModel(),i=t.getVersionId(),n=await this._stickyModelProvider.update(t,i,e);e.isCancellationRequested||(this._model=n)}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,i,n,s){if(t.children.length===0)return;let r=s;const a=[];for(let c=0;cc-u)),d=this.updateIndex(fv(a,e.startLineNumber+n,(c,u)=>c-u));for(let c=l;c<=d;c++){const u=t.children[c];if(!u)return;if(u.range){const h=u.range.startLineNumber,g=u.range.endLineNumber;e.startLineNumber<=g+1&&h-1<=e.endLineNumber&&h!==r&&(r=h,i.push(new Tye(h,g-1,n+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,i,n+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,i,n,s)}}getCandidateStickyLinesIntersecting(e){var t,i;if(!(!((t=this._model)===null||t===void 0)&&t.element))return[];let n=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,n,0,-1);const s=(i=this._editor._getViewModel())===null||i===void 0?void 0:i.getHiddenAreas();if(s)for(const r of s)n=n.filter(a=>!(a.startLineNumber>=r.startLineNumber&&a.endLineNumber<=r.endLineNumber+1));return n}};E2=Nye([m9(1,Me),m9(2,si)],E2);var Mye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hf=function(o,e){return function(t,i){e(t,i,o)}},N2;let jl=N2=class extends q{constructor(e,t,i,n,s,r,a){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=i,this._instaService=n,this._contextKeyService=a,this._sessionStore=new de,this._foldingModel=null,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._showEndForLine=null,this._stickyScrollWidget=new kye(this._editor),this._stickyLineCandidateProvider=new E2(this._editor,i,s),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new h9([],[],0),this._readConfiguration();const l=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(c=>{(c.hasChanged(114)||c.hasChanged(72)||c.hasChanged(66)||c.hasChanged(109))&&this._readConfiguration()})),this._register(J(l,Se.CONTEXT_MENU,async c=>{this._onContextMenu(Je(l),c)})),this._stickyScrollFocusedContextKey=T.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=T.stickyScrollVisible.bindTo(this._contextKeyService);const d=this._register(Pl(l));this._register(d.onDidBlur(c=>{this._positionRevealed===!1&&l.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(d.onDidFocus(c=>{this.focus()})),this._registerMouseListeners(),this._register(J(l,Se.MOUSE_DOWN,c=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(N2.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),(e=this._focusDisposableStore)===null||e===void 0||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new de,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,()=>this._editor.revealPosition(e))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(k.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new de),t=this._register(new ML(this._editor,{extractLineNumberFromMouseEvent:s=>{const r=this._stickyScrollWidget.getEditorPositionFromNode(s.target.element);return r?r.lineNumber:0}})),i=s=>{if(!this._editor.hasModel()||s.target.type!==12||s.target.detail!==this._stickyScrollWidget.getId())return null;const r=s.target.element;if(!r||r.innerText!==r.innerHTML)return null;const a=this._stickyScrollWidget.getEditorPositionFromNode(r);return a?{range:new k(a.lineNumber,a.column,a.lineNumber,a.column+r.innerText.length),textElement:r}:null},n=this._stickyScrollWidget.getDomNode();this._register(Wi(n,Se.CLICK,s=>{if(s.ctrlKey||s.altKey||s.metaKey||!s.leftButton)return;if(s.shiftKey){const d=this._stickyScrollWidget.getLineIndexFromChildDomNode(s.target);if(d===null)return;const c=new z(this._endLineNumbers[d],1);this._revealLineInCenterIfOutsideViewport(c);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(s.target)){const d=this._stickyScrollWidget.getLineNumberFromChildDomNode(s.target);this._toggleFoldingRegionForLine(d);return}if(!this._stickyScrollWidget.isInStickyLine(s.target))return;let l=this._stickyScrollWidget.getEditorPositionFromNode(s.target);if(!l){const d=this._stickyScrollWidget.getLineNumberFromChildDomNode(s.target);if(d===null)return;l=new z(d,1)}this._revealPosition(l)})),this._register(Wi(n,Se.MOUSE_MOVE,s=>{if(s.shiftKey){const r=this._stickyScrollWidget.getLineIndexFromChildDomNode(s.target);if(r===null||this._showEndForLine!==null&&this._showEndForLine===r)return;this._showEndForLine=r,this._renderStickyScroll();return}this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(J(n,Se.MOUSE_LEAVE,s=>{this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(t.onMouseMoveOrRelevantKeyDown(([s,r])=>{const a=i(s);if(!a||!s.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}const{range:l,textElement:d}=a;if(!l.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=l,e.clear();else if(d.style.textDecoration==="underline")return;const c=new tn;e.add(je(()=>c.dispose(!0)));let u;BL(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new z(l.startLineNumber,l.startColumn+1),c.token).then(h=>{if(!c.token.isCancellationRequested)if(h.length!==0){this._candidateDefinitionsLength=h.length;const g=d;u!==g?(e.clear(),u=g,u.style.textDecoration="underline",e.add(je(()=>{u.style.textDecoration="none"}))):u||(u=g,u.style.textDecoration="underline",e.add(je(()=>{u.style.textDecoration="none"})))}else e.clear()})})),this._register(t.onCancel(()=>{e.clear()})),this._register(t.onExecute(async s=>{if(s.target.type!==12||s.target.detail!==this._stickyScrollWidget.getId())return;const r=this._stickyScrollWidget.getEditorPositionFromNode(s.target.element);r&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:r.lineNumber,column:1})),this._instaService.invokeFunction(OH,s,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))}))}_onContextMenu(e,t){const i=new Pr(e,t);this._contextMenuService.showContextMenu({menuId:N.StickyScrollContext,getAnchor:()=>i})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||e===null)return;const t=this._stickyScrollWidget.getStickyLineForLine(e),i=t==null?void 0:t.foldingIcon;if(!i)return;wH(this._foldingModel,Number.MAX_VALUE,[e]),i.isCollapsed=!i.isCollapsed;const n=(i.isCollapsed?this._editor.getTopForLineNumber(i.foldingEndLine):this._editor.getTopForLineNumber(i.foldingStartLine))-this._editor.getOption(66)*t.index+1;this._editor.setScrollTop(n),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(114);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(i=>{i.scrollTopChanged&&(this._showEndForLine=null,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(i=>this._onTokensChange(i))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=null,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(67).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=null,this._renderStickyScroll(-1)}))}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const i of t)for(const n of e.ranges)if(i>=n.fromLineNumber&&i<=n.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(-1)}_onDidResize(){const t=this._editor.getLayoutInfo().height/this._editor.getOption(66);this._maxStickyLines=Math.round(t*.25)}async _renderStickyScroll(e=1/0){var t,i;const n=this._editor.getModel();if(!n||n.isTooLargeForTokenization()){this._foldingModel=null,this._stickyScrollWidget.setState(void 0,null,e);return}const s=this._stickyLineCandidateProvider.getVersionId();if(s===void 0||s===n.getVersionId())if(this._foldingModel=(i=await((t=Ul.get(this._editor))===null||t===void 0?void 0:t.getFoldingModel()))!==null&&i!==void 0?i:null,this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.startLineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e);else if(this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const r=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(r)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}}findScrollWidgetState(){const e=this._editor.getOption(66),t=Math.min(this._maxStickyLines,this._editor.getOption(114).maxLineCount),i=this._editor.getScrollTop();let n=0;const s=[],r=[],a=this._editor.getVisibleRanges();if(a.length!==0){const l=new uv(a[0].startLineNumber,a[a.length-1].endLineNumber),d=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(l);for(const c of d){const u=c.startLineNumber,h=c.endLineNumber,g=c.nestingDepth;if(h-u>0){const f=(g-1)*e,m=g*e,v=this._editor.getBottomForLineNumber(u)-i,_=this._editor.getTopForLineNumber(h)-i,b=this._editor.getBottomForLineNumber(h)-i;if(f>_&&f<=b){s.push(u),r.push(h+1),n=b-m;break}else m>v&&m<=b&&(s.push(u),r.push(h+1));if(s.length===t)break}}}return this._endLineNumbers=r,new h9(s,r,n,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};jl.ID="store.contrib.stickyScrollController";jl=N2=Mye([hf(1,Sr),hf(2,Me),hf(3,qe),hf(4,si),hf(5,wr),hf(6,Xe)],jl);class Aye extends Qo{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:p("toggleStickyScroll","Toggle Sticky Scroll"),mnemonicTitle:p({},"&&Toggle Sticky Scroll"),original:"Toggle Sticky Scroll"},category:Dye.View,toggled:{condition:ae.equals("config.editor.stickyScroll.enabled",!0),title:p("stickyScroll","Sticky Scroll"),mnemonicTitle:p({},"&&Sticky Scroll")},menu:[{id:N.CommandPalette},{id:N.MenubarAppearanceMenu,group:"4_editor",order:3},{id:N.StickyScrollContext}]})}async run(e){const t=e.get(Dt),i=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",i)}}const pD=100;class Rye extends Wa{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:p("focusStickyScroll","Focus Sticky Scroll"),mnemonicTitle:p({},"&&Focus Sticky Scroll"),original:"Focus Sticky Scroll"},precondition:ae.and(ae.has("config.editor.stickyScroll.enabled"),T.stickyScrollVisible),menu:[{id:N.CommandPalette}]})}runEditorCommand(e,t){var i;(i=jl.get(t))===null||i===void 0||i.focus()}}class Pye extends Wa{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:p("selectNextStickyScrollLine.title","Select next sticky scroll line"),original:"Select next sticky scroll line"},precondition:T.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:pD,primary:18}})}runEditorCommand(e,t){var i;(i=jl.get(t))===null||i===void 0||i.focusNext()}}class Oye extends Wa{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:p("selectPreviousStickyScrollLine.title","Select previous sticky scroll line"),original:"Select previous sticky scroll line"},precondition:T.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:pD,primary:16}})}runEditorCommand(e,t){var i;(i=jl.get(t))===null||i===void 0||i.focusPrevious()}}class Fye extends Wa{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:p("goToFocusedStickyScrollLine.title","Go to focused sticky scroll line"),original:"Go to focused sticky scroll line"},precondition:T.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:pD,primary:3}})}runEditorCommand(e,t){var i;(i=jl.get(t))===null||i===void 0||i.goToFocused()}}class Bye extends Wa{constructor(){super({id:"editor.action.selectEditor",title:{value:p("selectEditor.title","Select Editor"),original:"Select Editor"},precondition:T.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:pD,primary:9}})}runEditorCommand(e,t){var i;(i=jl.get(t))===null||i===void 0||i.selectEditor()}}At(jl.ID,jl,1);mi(Aye);mi(Rye);mi(Oye);mi(Pye);mi(Fye);mi(Bye);var pP=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Gh=function(o,e){return function(t,i){e(t,i,o)}},fh;class Wye{constructor(e,t,i,n,s,r){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=s,this.completion=r}}let T2=class extends pZ{constructor(e,t,i,n,s,r){super(s.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=r}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn=0&&l.resolve(vt.None)}return t}};T2=pP([Gh(5,QL)],T2);let M2=class{constructor(e,t,i,n){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=i,this._suggestMemoryService=n}async provideInlineCompletions(e,t,i,n){var s;if(i.selectedSuggestionInfo)return;const r=this._getEditorOption(88,e);if(jf.isAllOff(r))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(jf.valueFor(r,l)!=="inline")return;let d=e.getWordAtPosition(t),c;if(d!=null&&d.word||(c=this._getTriggerCharacterInfo(e,t)),!(d!=null&&d.word)&&!c||(d||(d=e.getWordUntilPosition(t)),d.endColumn!==t.column))return;let u;const h=e.getValueInRange(new k(t.lineNumber,1,t.lineNumber,t.column));if(!c&&(!((s=this._lastResult)===null||s===void 0)&&s.canBeReused(e,t.lineNumber,d))){const g=new a9(h,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=g,this._lastResult.acquire(),u=this._lastResult}else{const g=await tP(this._languageFeatureService.completionProvider,e,t,new Nb(void 0,void 0,c==null?void 0:c.providers),c&&{triggerKind:1,triggerCharacter:c.ch},n);let f;g.needsClipboard&&(f=await this._clipboardService.readText());const m=new yc(g.items,t.column,new a9(h,0),ma.None,this._getEditorOption(117,e),this._getEditorOption(111,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},f);u=new T2(e,t.lineNumber,d,m,g,this._suggestMemoryService)}return this._lastResult=u,u}handleItemDidShow(e,t){t.completion.resolve(vt.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var i;const n=e.getValueInRange(k.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),s=new Set;for(const r of this._languageFeatureService.completionProvider.all(e))!((i=r.triggerCharacters)===null||i===void 0)&&i.includes(n)&&s.add(r);if(s.size!==0)return{providers:s,ch:n}}};M2=pP([Gh(1,Me),Gh(2,Xd),Gh(3,QL)],M2);let ey=fh=class{constructor(e,t,i,n){if(++fh._counter===1){const s=n.createInstance(M2,(r,a)=>{var l;return((l=i.listCodeEditors().find(c=>c.getModel()===a))!==null&&l!==void 0?l:e).getOption(r)});fh._disposable=t.inlineCompletionsProvider.register("*",s)}}dispose(){var e;--fh._counter===0&&((e=fh._disposable)===null||e===void 0||e.dispose(),fh._disposable=void 0)}};ey._counter=0;ey=fh=pP([Gh(1,Me),Gh(2,Ot),Gh(3,qe)],ey);At("suggest.inlineCompletionsProvider",ey,0);class Vye extends Te{constructor(){super({id:"editor.action.forceRetokenize",label:p("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const n=new ds;i.tokenization.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}}_e(Vye);class mD extends Qo{constructor(){super({id:mD.ID,title:{value:p({},"Toggle Tab Key Moves Focus"),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(){const t=!Mp.getTabFocusMode();Mp.setTabFocusMode(t),mo(t?p("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element"):p("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}mD.ID="editor.action.toggleTabFocusMode";mi(mD);var Hye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zye=function(o,e){return function(t,i){e(t,i,o)}};let A2=class extends q{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n){var s;super(),this._link=t,this._enabled=!0,this.el=le(e,pe("a.monaco-link",{tabIndex:(s=t.tabIndex)!==null&&s!==void 0?s:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");const r=this._register(new St(this.el,"click")),a=this._register(new St(this.el,"keypress")),l=ye.chain(a.event,u=>u.map(h=>new gi(h)).filter(h=>h.keyCode===3)),d=this._register(new St(this.el,ni.Tap)).event;this._register(ei.addTarget(this.el));const c=ye.any(r.event,l,d);this._register(c(u=>{this.enabled&&(ct.stop(u,!0),i!=null&&i.opener?i.opener(this._link.href):n.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};A2=Hye([zye(3,So)],A2);var rz=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},az=function(o,e){return function(t,i){e(t,i,o)}};const $ye=26;let R2=class extends q{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(P2))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{var t;this.hide(),(t=e.onClose)===null||t===void 0||t.call(e)}}),this._editor.setBanner(this.banner.element,$ye)}};R2=rz([az(1,qe)],R2);let P2=class extends q{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(Ud,{}),this.element=pe("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){const t=pe("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){$n(this.element)}show(e){$n(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=le(this.element,pe("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild(pe(`div${Ue.asCSSSelector(e.icon)}`));const n=le(this.element,pe("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=le(this.element,pe("div.message-actions-container")),e.actions)for(const r of e.actions)this._register(this.instantiationService.createInstance(A2,this.messageActionsContainer,{...r,tabIndex:-1},{}));const s=le(this.element,pe("div.action-container"));this.actionBar=this._register(new Cr(s)),this.actionBar.push(this._register(new Rs("banner.close","Close Banner",Ue.asClassName(tW),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};P2=rz([az(0,qe)],P2);var mP=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Cp=function(o,e){return function(t,i){e(t,i,o)}};const Uye=Zi("extensions-warning-message",ve.warning,p("warningIcon","Icon shown with a warning message in the extensions editor."));let dm=class extends q{constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=s=>{if(s&&s.hasMore){if(this._bannerClosed)return;const r=Math.max(s.ambiguousCharacterCount,s.nonBasicAsciiCharacterCount,s.invisibleCharacterCount);let a;if(s.nonBasicAsciiCharacterCount>=r)a={message:p("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new Pm};else if(s.ambiguousCharacterCount>=r)a={message:p("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new zu};else if(s.invisibleCharacterCount>=r)a={message:p("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new Rm};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:Uye,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(R2,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(124),this._register(i.onDidChangeTrust(s=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(s=>{s.hasChanged(124)&&(this._options=e.getOption(124),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=jye(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(i=>i===!1))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(i=>i.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(i=>i==="_os"?new Intl.NumberFormat().resolvedOptions().locale:i==="_vscode"?_G:i)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new O2(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new Kye(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};dm.ID="editor.contrib.unicodeHighlighter";dm=mP([Cp(1,Qr),Cp(2,t6),Cp(3,qe)],dm);function jye(o,e){return{nonBasicASCII:e.nonBasicASCII===Io?!o:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===Io?!o:e.includeComments,includeStrings:e.includeStrings===Io?!o:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}let O2=class extends q{constructor(e,t,i,n){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Yt(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const n of t.ranges)i.push({range:n,options:ty.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();if(!vA(t,e))return null;const i=t.getValueInRange(e.range);return{reason:lz(i,this._options),inComment:bA(t,e),inString:CA(t,e)}}};O2=mP([Cp(3,Qr)],O2);class Kye extends q{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Yt(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const n of e){const s=MM.computeUnicodeHighlights(this._model,this._options,n);for(const r of s.ranges)i.ranges.push(r);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||s.hasMore}if(!i.hasMore)for(const n of i.ranges)t.push({range:n,options:ty.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),i=t.getValueInRange(e.range);return vA(t,e)?{reason:lz(i,this._options),inComment:bA(t,e),inString:CA(t,e)}:null}}let F2=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=this._editor.getContribution(dm.ID);if(!n)return[];const s=[],r=new Set;let a=300;for(const l of t){const d=n.getDecorationInfo(l);if(!d)continue;const u=i.getValueInRange(l.range).codePointAt(0),h=Dk(u);let g;switch(d.reason.kind){case 0:{Jb(d.reason.confusableWith)?g=p("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,Dk(d.reason.confusableWith.codePointAt(0))):g=p("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,Dk(d.reason.confusableWith.codePointAt(0)));break}case 1:g=p("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:g=p("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}if(r.has(g))continue;r.add(g);const f={codePoint:u,reason:d.reason,inComment:d.inComment,inString:d.inString},m=p("unicodeHighlight.adjustSettings","Adjust settings"),v=`command:${B0.ID}?${encodeURIComponent(JSON.stringify(f))}`,_=new as("",!0).appendMarkdown(g).appendText(" ").appendLink(v,m);s.push(new ba(this,l.range,[_],!1,a++))}return s}renderHoverParts(e,t){return zV(e,t,this._editor,this._languageService,this._openerService)}};F2=mP([Cp(1,bi),Cp(2,So)],F2);function B2(o){return`U+${o.toString(16).padStart(4,"0")}`}function Dk(o){let e=`\`${B2(o)}\``;return Il.isInvisibleCharacter(o)||(e+=` "${`${qye(o)}`}"`),e}function qye(o){return o===96?"`` ` ``":"`"+String.fromCodePoint(o)+"`"}function lz(o,e){return MM.computeUnicodeHighlightReason(o,e)}class ty{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let n=this.map.get(i);return n||(n=st.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}}ty.instance=new ty;class Gye extends Te{constructor(){super({id:zu.ID,label:p("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}async run(e,t,i){const n=e==null?void 0:e.get(Dt);n&&this.runAction(n)}async runAction(e){await e.updateValue(Us.includeComments,!1,2)}}class Zye extends Te{constructor(){super({id:zu.ID,label:p("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}async run(e,t,i){const n=e==null?void 0:e.get(Dt);n&&this.runAction(n)}async runAction(e){await e.updateValue(Us.includeStrings,!1,2)}}class zu extends Te{constructor(){super({id:zu.ID,label:p("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}async run(e,t,i){const n=e==null?void 0:e.get(Dt);n&&this.runAction(n)}async runAction(e){await e.updateValue(Us.ambiguousCharacters,!1,2)}}zu.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class Rm extends Te{constructor(){super({id:Rm.ID,label:p("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}async run(e,t,i){const n=e==null?void 0:e.get(Dt);n&&this.runAction(n)}async runAction(e){await e.updateValue(Us.invisibleCharacters,!1,2)}}Rm.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class Pm extends Te{constructor(){super({id:Pm.ID,label:p("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}async run(e,t,i){const n=e==null?void 0:e.get(Dt);n&&this.runAction(n)}async runAction(e){await e.updateValue(Us.nonBasicASCII,!1,2)}}Pm.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class B0 extends Te{constructor(){super({id:B0.ID,label:p("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}async run(e,t,i){const{codePoint:n,reason:s,inString:r,inComment:a}=i,l=String.fromCodePoint(n),d=e.get(Ha),c=e.get(Dt);function u(f){return Il.isInvisibleCharacter(f)?p("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",B2(f)):p("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${B2(f)} "${l}"`)}const h=[];if(s.kind===0)for(const f of s.notAmbiguousInLocales)h.push({label:p("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',f),run:async()=>{Xye(c,[f])}});if(h.push({label:u(n),run:()=>Yye(c,[n])}),a){const f=new Gye;h.push({label:f.label,run:async()=>f.runAction(c)})}else if(r){const f=new Zye;h.push({label:f.label,run:async()=>f.runAction(c)})}if(s.kind===0){const f=new zu;h.push({label:f.label,run:async()=>f.runAction(c)})}else if(s.kind===1){const f=new Rm;h.push({label:f.label,run:async()=>f.runAction(c)})}else if(s.kind===2){const f=new Pm;h.push({label:f.label,run:async()=>f.runAction(c)})}else Qye(s);const g=await d.pick(h,{title:p("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});g&&await g.run()}}B0.ID="editor.action.unicodeHighlight.showExcludeOptions";async function Yye(o,e){const t=o.getValue(Us.allowedCharacters);let i;typeof t=="object"&&t?i=t:i={};for(const n of e)i[String.fromCodePoint(n)]=!0;await o.updateValue(Us.allowedCharacters,i,2)}async function Xye(o,e){var t;const i=(t=o.inspect(Us.allowedLocales).user)===null||t===void 0?void 0:t.value;let n;typeof i=="object"&&i?n=Object.assign({},i):n={};for(const s of e)n[s]=!0;await o.updateValue(Us.allowedLocales,n,2)}function Qye(o){throw new Error(`Unexpected value: ${o}`)}_e(zu);_e(Rm);_e(Pm);_e(B0);At(dm.ID,dm,1);jg.register(F2);var Jye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_9=function(o,e){return function(t,i){e(t,i,o)}};const dz="ignoreUnusualLineTerminators";function eLe(o,e,t){o.setModelProperty(e.uri,dz,t)}function tLe(o,e){return o.getModelProperty(e.uri,dz)}let $b=class extends q{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(125),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(125)&&(this._config=this._editor.getOption(125),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(n=>{n.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||tLe(this._codeEditorService,e)===!0||this._editor.getOption(90))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=await this._dialogService.confirm({title:p("unusualLineTerminators.title","Unusual Line Terminators"),message:p("unusualLineTerminators.message","Detected unusual line terminators"),detail:p("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",br(e.uri)),primaryButton:p({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:p("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!i.confirmed){eLe(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}};$b.ID="editor.contrib.unusualLineTerminatorsDetector";$b=Jye([_9(1,g0),_9(2,Ot)],$b);At($b.ID,$b,1);var cz=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Y1=function(o,e){return function(t,i){e(t,i,o)}},Xi,W2;const _D=new De("hasWordHighlights",!1);function uz(o,e,t,i){const n=o.ordered(e);return wM(n.map(s=>()=>Promise.resolve(s.provideDocumentHighlights(e,t,i)).then(void 0,en)),ls).then(s=>{if(s){const r=new Gi;return r.set(e.uri,s),r}return new Gi})}function iLe(o,e,t,i,n,s){const r=o.ordered(e);return wM(r.map(a=>()=>{const l=s.filter(d=>xA(a.selector,d.uri,d.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(a.provideMultiDocumentHighlights(e,t,l,n)).then(void 0,en)}),a=>a instanceof Gi&&a.size>0)}class _P{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=_n(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new k(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,s=t.startColumn,r=t.endColumn,a=this._getCurrentWordRange(e,t);let l=!!(this._wordRange&&this._wordRange.equalsRange(a));for(let d=0,c=i.length;!l&&d=r&&(l=!0)}return l}cancel(){this.result.cancel()}}class nLe extends _P{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return uz(this._providers,e,t.getPosition(),n).then(s=>s||new Gi)}}class sLe extends _P{constructor(e,t,i,n,s){super(e,t,i),this._providers=n,this._otherModels=s}_compute(e,t,i,n){return iLe(this._providers,e,t.getPosition(),i,n,this._otherModels).then(s=>s||new Gi)}}class hz extends _P{constructor(e,t,i,n,s){super(e,t,n),this._otherModels=s,this._selectionIsEmpty=t.isEmpty(),this._word=i}_compute(e,t,i,n){return au(250,n).then(()=>{const s=new Gi;let r;if(this._word?r=this._word:r=e.getWordAtPosition(t.getPosition()),!r)return new Gi;const a=[e,...this._otherModels];for(const l of a){if(l.isDisposed())continue;const c=l.findMatches(r.word,!0,!1,!0,i,!1).map(u=>({range:u.range,kind:wv.Text}));c&&s.set(l.uri,c)}return s})}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty!==n?!1:super.isValid(e,t,i)}}function oLe(o,e,t,i,n){return o.has(e)?new nLe(e,t,n,o):new hz(e,t,i,n,[])}function rLe(o,e,t,i,n,s){return o.has(e)?new sLe(e,t,n,o,s):new hz(e,t,i,n,s)}ql("_executeDocumentHighlights",async(o,e,t)=>{const i=o.get(Me),n=await uz(i.documentHighlightProvider,e,t,vt.None);return n==null?void 0:n.get(e.uri)});let Ub=Xi=class{constructor(e,t,i,n,s){this.toUnhook=new de,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new Gi,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this.multiDocumentProviders=i,this.codeEditorService=s,this._hasWordHighlights=_D.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(80),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(r=>{this._ignorePositionChangeEvent||this.occurrencesHighlight!=="off"&&this._onPositionChanged(r)})),this.toUnhook.add(e.onDidChangeModelContent(r=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(r=>{!r.newModelUrl&&r.oldModelUrl?this._stopSingular():Xi.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(r=>{const a=this.editor.getOption(80);this.occurrencesHighlight!==a&&(this.occurrencesHighlight=a,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,Xi.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight!=="off"&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(k.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const r=this.editor.getModel().getLineContent(n.startLineNumber);mo(`${r}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const r=this.editor.getModel().getLineContent(n.startLineNumber);mo(`${r}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=Xi.storedDecorations.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),Xi.storedDecorations.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(){const e=this.codeEditorService.listCodeEditors();for(const t of e){if(!t.hasModel())continue;const i=Xi.storedDecorations.get(t.getModel().uri);if(!i)continue;t.removeDecorations(i),Xi.storedDecorations.delete(t.getModel().uri);const n=jd.get(t);n!=null&&n.wordHighlighter&&n.wordHighlighter.decorations.length>0&&(n.wordHighlighter.decorations.clear(),n.wordHighlighter._hasWordHighlights.set(!1))}}_stopSingular(){var e,t,i,n;this._removeSingleDecorations(),this.editor.hasWidgetFocus()&&(((e=this.editor.getModel())===null||e===void 0?void 0:e.uri.scheme)!==ot.vscodeNotebookCell&&((i=(t=Xi.query)===null||t===void 0?void 0:t.modelInfo)===null||i===void 0?void 0:i.model.uri.scheme)!==ot.vscodeNotebookCell?(Xi.query=null,this._run()):!((n=Xi.query)===null||n===void 0)&&n.modelInfo&&(Xi.query.modelInfo=null)),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(){this._removeAllDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){var t;if(this.occurrencesHighlight==="off"){this._stopAll();return}if(e.reason!==3&&((t=this.editor.getModel())===null||t===void 0?void 0:t.uri.scheme)!==ot.vscodeNotebookCell){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:i})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===ot.vscodeNotebookCell){const s=[],r=this.codeEditorService.listCodeEditors();for(const a of r){const l=a.getModel();l&&l!==e&&l.uri.scheme===ot.vscodeNotebookCell&&s.push(l)}return s}const i=[],n=this.codeEditorService.listCodeEditors();for(const s of n){if(!yR(s))continue;const r=s.getModel();r&&e===r.modified&&i.push(r.modified)}if(i.length)return i;if(this.occurrencesHighlight==="singleFile")return[];for(const s of n){const r=s.getModel();r&&r!==e&&i.push(r)}return i}_run(){var e,t;let i;if(this.editor.hasWidgetFocus()){const n=this.editor.getSelection();if(!n||n.startLineNumber!==n.endLineNumber){this._stopAll();return}const s=n.startColumn,r=n.endColumn,a=this._getWord();if(!a||a.startColumn>s||a.endColumn{n===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations())},nt)}}computeWithModel(e,t,i,n){return n.length?rLe(this.multiDocumentProviders,e,t,i,this.editor.getOption(129),n):oLe(this.providers,e,t,i,this.editor.getOption(129))}_beginRenderDecorations(){const e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){var e,t,i;this.renderDecorationsTimer=-1;const n=this.codeEditorService.listCodeEditors();for(const s of n){const r=jd.get(s);if(!r)continue;const a=[],l=(e=s.getModel())===null||e===void 0?void 0:e.uri;if(l&&this.workerRequestValue.has(l)){const d=Xi.storedDecorations.get(l),c=this.workerRequestValue.get(l);if(c)for(const h of c)a.push({range:h.range,options:OSe(h.kind)});let u=[];s.changeDecorations(h=>{u=h.deltaDecorations(d??[],a)}),Xi.storedDecorations=Xi.storedDecorations.set(l,u),a.length>0&&((t=r.wordHighlighter)===null||t===void 0||t.decorations.set(a),(i=r.wordHighlighter)===null||i===void 0||i._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}};Ub.storedDecorations=new Gi;Ub.query=null;Ub=Xi=cz([Y1(4,Ot)],Ub);let jd=W2=class extends q{static get(e){return e.getContribution(W2.ID)}constructor(e,t,i,n){super(),this._wordHighlighter=null;const s=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new Ub(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,t,n))};this._register(e.onDidChangeModel(r=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),s()})),s()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){var e;(e=this._wordHighlighter)===null||e===void 0||e.moveNext()}moveBack(){var e;(e=this._wordHighlighter)===null||e===void 0||e.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};jd.ID="editor.contrib.wordHighlighter";jd=W2=cz([Y1(1,Xe),Y1(2,Me),Y1(3,Ot)],jd);class gz extends Te{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=jd.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class aLe extends gz{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:p("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:_D,kbOpts:{kbExpr:T.editorTextFocus,primary:65,weight:100}})}}class lLe extends gz{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:p("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:_D,kbOpts:{kbExpr:T.editorTextFocus,primary:1089,weight:100}})}}class dLe extends Te{constructor(){super({id:"editor.action.wordHighlight.trigger",label:p("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:_D.toNegated(),kbOpts:{kbExpr:T.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=jd.get(t);n&&n.restoreViewState(!0)}}At(jd.ID,jd,0);_e(aLe);_e(lLe);_e(dLe);class vD extends Rn{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=_r(t.getOption(129)),s=t.getModel(),a=t.getSelections().map(l=>{const d=new z(l.positionLineNumber,l.positionColumn),c=this._move(n,s,d,this._wordNavigationType);return this._moveTo(l,c,this._inSelectionMode)});if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>Tt.fromModelSelection(l))),a.length===1){const l=new z(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,i){return i?new Re(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new Re(t.lineNumber,t.column,t.lineNumber,t.column)}}class $u extends vD{_move(e,t,i,n){return Wt.moveWordLeft(e,t,i,n)}}class Uu extends vD{_move(e,t,i,n){return Wt.moveWordRight(e,t,i,n)}}class cLe extends $u{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class uLe extends $u{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class hLe extends $u{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:ae.and(T.textInputFocus,(e=ae.and(s0,aL))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class gLe extends $u{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class fLe extends $u{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class pLe extends $u{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:ae.and(T.textInputFocus,(e=ae.and(s0,aL))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class mLe extends $u{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move(_r(Oa.wordSeparators.defaultValue),t,i,n)}}class _Le extends $u{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move(_r(Oa.wordSeparators.defaultValue),t,i,n)}}class vLe extends Uu{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class bLe extends Uu{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:ae.and(T.textInputFocus,(e=ae.and(s0,aL))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class CLe extends Uu{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class wLe extends Uu{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class SLe extends Uu{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:ae.and(T.textInputFocus,(e=ae.and(s0,aL))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class yLe extends Uu{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class LLe extends Uu{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move(_r(Oa.wordSeparators.defaultValue),t,i,n)}}class DLe extends Uu{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move(_r(Oa.wordSeparators.defaultValue),t,i,n)}}class bD extends Rn{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e.get(si);if(!t.hasModel())return;const s=_r(t.getOption(129)),r=t.getModel(),a=t.getSelections(),l=t.getOption(6),d=t.getOption(11),c=n.getLanguageConfiguration(r.getLanguageId()).getAutoClosingPairs(),u=t._getViewModel(),h=a.map(g=>{const f=this._delete({wordSeparators:s,model:r,selection:g,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:l,autoClosingQuotes:d,autoClosingPairs:c,autoClosedCharacters:u.getCursorAutoClosedCharacters()},this._wordNavigationType);return new qn(f,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}}class vP extends bD{_delete(e,t){const i=Wt.deleteWordLeft(e,t);return i||new k(1,1,1,1)}}class bP extends bD{_delete(e,t){const i=Wt.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new k(n,s,n,s)}}class xLe extends vP{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:T.writable})}}class kLe extends vP{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:T.writable})}}class ILe extends vP{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class ELe extends bP{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:T.writable})}}class NLe extends bP{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:T.writable})}}class TLe extends bP{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class MLe extends Te{constructor(){super({id:"deleteInsideWord",precondition:T.writable,label:p("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=_r(t.getOption(129)),s=t.getModel(),a=t.getSelections().map(l=>{const d=Wt.deleteInsideWord(n,s,l);return new qn(d,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}}we(new cLe);we(new uLe);we(new hLe);we(new gLe);we(new fLe);we(new pLe);we(new vLe);we(new bLe);we(new CLe);we(new wLe);we(new SLe);we(new yLe);we(new mLe);we(new _Le);we(new LLe);we(new DLe);we(new xLe);we(new kLe);we(new ILe);we(new ELe);we(new NLe);we(new TLe);_e(MLe);class ALe extends bD{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const i=zy.deleteWordPartLeft(e);return i||new k(1,1,1,1)}}class RLe extends bD{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=zy.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new k(n,s,n,s)}}class fz extends vD{_move(e,t,i,n){return zy.moveWordPartLeft(e,t,i)}}class PLe extends fz{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}Et.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class OLe extends fz{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}Et.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class pz extends vD{_move(e,t,i,n){return zy.moveWordPartRight(e,t,i)}}class FLe extends pz{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class BLe extends pz{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}we(new ALe);we(new RLe);we(new PLe);we(new OLe);we(new FLe);we(new BLe);class V2 extends q{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const e=ho.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(91);t||(this.editor.isSimpleWidget?t=new as(p("editor.simple.readonly","Cannot edit in read-only input")):t=new as(p("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}}V2.ID="editor.contrib.readOnlyMessageController";At(V2.ID,V2,2);class H2 extends q{constructor(e){super(),this.editor=e,this.widget=null,Ea&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(90);!this.widget&&e?this.widget=new CD(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}H2.ID="editor.contrib.iPadShowKeyboard";class CD extends q{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(J(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(J(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return CD.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}CD.ID="editor.contrib.ShowKeyboardWidget";At(H2.ID,H2,3);var WLe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},v9=function(o,e){return function(t,i){e(t,i,o)}},z2;let cm=z2=class extends q{static get(e){return e.getContribution(z2.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel(n=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(n=>this.stop())),this._register(Ei.onDidChange(n=>this.stop())),this._register(this._editor.onKeyUp(n=>n.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new wD(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};cm.ID="editor.contrib.inspectTokens";cm=z2=WLe([v9(1,Jo),v9(2,bi)],cm);class VLe extends Te{constructor(){super({id:"editor.action.inspectTokens",label:WE.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const i=cm.get(t);i==null||i.launch()}}function HLe(o){let e="";for(let t=0,i=o.length;tTp,tokenize:(n,s,r)=>WM(e,r),tokenizeEncoded:(n,s,r)=>Ay(i,r)}}class wD extends q{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=zLe(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(i=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return wD._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let l=t.tokens1.length-1;l>=0;l--){const d=t.tokens1[l];if(e.column-1>=d.offset){i=l;break}}let n=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){n=l;break}const s=this._model.getLineContent(e.lineNumber);let r="";if(i=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},b9=function(o,e){return function(t,i){e(t,i,o)}},R_;let iy=R_=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=xi.as(Wg.Quickaccess)}provide(e){const t=new de;return t.add(e.onDidAccept(()=>{const[i]=e.selectedItems;i&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(i=>{const n=this.registry.getQuickAccessProvider(i.substr(R_.PREFIX.length));n&&n.prefix&&n.prefix!==R_.PREFIX&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(i=>i.prefix!==R_.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,i)=>t.prefix.localeCompare(i.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{const i=t.prefix||e.prefix,n=i||"…";return{prefix:i,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:p("helpPickAriaLabel","{0}, {1}",n,t.description),description:t.description}})}};iy.PREFIX="?";iy=R_=$Le([b9(0,Ha),b9(1,Xt)],iy);xi.as(Wg.Quickaccess).registerQuickAccessProvider({ctor:iy,prefix:"",helpEntries:[{description:VE.helpQuickAccessActionLabel}]});class mz{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var i;const n=new de;e.canAcceptInBackground=!!(!((i=this.options)===null||i===void 0)&&i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new An);return s.value=this.doProvide(e,t),n.add(this.onDidActiveTextEditorControlChange(()=>{s.value=void 0,s.value=this.doProvide(e,t)})),n}doProvide(e,t){var i;const n=new de,s=this.activeTextEditorControl;if(s&&this.canProvideWithTextEditor(s)){const r={editor:s},a=kW(s);if(a){let l=(i=s.saveViewState())!==null&&i!==void 0?i:void 0;n.add(a.onDidChangeCursorPosition(()=>{var d;l=(d=s.saveViewState())!==null&&d!==void 0?d:void 0})),r.restoreViewState=()=>{l&&s===this.activeTextEditorControl&&s.restoreViewState(l)},n.add(su(t.onCancellationRequested)(()=>{var d;return(d=r.restoreViewState)===null||d===void 0?void 0:d.call(r)}))}n.add(je(()=>this.clearDecorations(s))),n.add(this.provideWithTextEditor(r,e,t))}else n.add(this.provideWithoutTextEditor(e,t));return n}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const i=e.getModel();i&&"getLineContent"in i&&hu(`${i.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return yR(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(i=>{const n=[];this.rangeHighlightDecorationId&&(n.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),n.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const s=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Ni(X8),position:Go.Full}}}],[r,a]=i.deltaDecorations(n,s);this.rangeHighlightDecorationId={rangeHighlightId:r,overviewRulerDecorationId:a}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(i=>{i.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}class SD extends mz{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=p("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,q.None}provideWithTextEditor(e,t,i){const n=e.editor,s=new de;s.add(t.onDidAccept(l=>{const[d]=t.selectedItems;if(d){if(!this.isValidLineNumber(n,d.lineNumber))return;this.gotoLocation(e,{range:this.toRange(d.lineNumber,d.column),keyMods:t.keyMods,preserveFocus:l.inBackground}),l.inBackground||t.hide()}}));const r=()=>{const l=this.parsePosition(n,t.value.trim().substr(SD.PREFIX.length)),d=this.getPickLabel(n,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:d}],t.ariaLabel=d,!this.isValidLineNumber(n,l.lineNumber)){this.clearDecorations(n);return}const c=this.toRange(l.lineNumber,l.column);n.revealRangeInCenter(c,0),this.addDecorations(n,c)};r(),s.add(t.onDidChangeValue(()=>r()));const a=kW(n);return a&&a.getOptions().get(67).renderType===2&&(a.updateOptions({lineNumbers:"on"}),s.add(je(()=>a.updateOptions({lineNumbers:"relative"})))),s}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map(s=>parseInt(s,10)).filter(s=>!isNaN(s)),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?p("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):p("gotoLineLabel","Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},s=this.lineCount(e);return s>1?p("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,s):p("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||typeof i!="number")return!1;const n=this.getModel(e);if(!n)return!1;const s={lineNumber:t,column:i};return n.validatePosition(s).equals(s)}lineCount(e){var t,i;return(i=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&i!==void 0?i:0}}SD.PREFIX=":";var ULe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},jLe=function(o,e){return function(t,i){e(t,i,o)}};let jb=class extends SD{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=ye.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};jb=ULe([jLe(0,Ot)],jb);let CP=class _z extends Te{constructor(){super({id:_z.ID,label:Gw.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(Ha).quickAccess.show(jb.PREFIX)}};CP.ID="editor.action.gotoLine";_e(CP);xi.as(Wg.Quickaccess).registerQuickAccessProvider({ctor:jb,prefix:jb.PREFIX,helpEntries:[{description:Gw.gotoLineActionLabel,commandId:CP.ID}]});const vz=[void 0,[]];function xk(o,e,t=0,i=0){const n=e;return n.values&&n.values.length>1?KLe(o,n.values,t,i):bz(o,e,t,i)}function KLe(o,e,t,i){let n=0;const s=[];for(const r of e){const[a,l]=bz(o,r,t,i);if(typeof a!="number")return vz;n+=a,s.push(...l)}return[n,qLe(s)]}function bz(o,e,t,i){const n=lg(e.original,e.originalLowercase,t,o,o.toLowerCase(),i,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return n?[n[0],p0(n)]:vz}function qLe(o){const e=o.sort((n,s)=>n.start-s.start),t=[];let i;for(const n of e)!i||!GLe(i,n)?(i=n,t.push(n)):(i.start=Math.min(i.start,n.start),i.end=Math.max(i.end,n.end));return t}function GLe(o,e){return!(o.end=0,r=C9(o);let a;const l=o.split(Cz);if(l.length>1)for(const d of l){const c=C9(d),{pathNormalized:u,normalized:h,normalizedLowercase:g}=w9(d);h&&(a||(a=[]),a.push({original:d,originalLowercase:d.toLowerCase(),pathNormalized:u,normalized:h,normalizedLowercase:g,expectContiguousMatch:c}))}return{original:o,originalLowercase:e,pathNormalized:t,normalized:i,normalizedLowercase:n,values:a,containsPathSeparator:s,expectContiguousMatch:r}}function w9(o){let e;is?e=o.replace(/\//g,La):e=o.replace(/\\/g,La);const t=iY(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function S9(o){return Array.isArray(o)?$2(o.map(e=>e.original).join(Cz)):$2(o.original)}var ZLe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},y9=function(o,e){return function(t,i){e(t,i,o)}},wp;let Tl=wp=class extends mz{constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,p("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),q.None}provideWithTextEditor(e,t,i){const n=e.editor,s=this.getModel(n);return s?this._languageFeaturesService.documentSymbolProvider.has(s)?this.doProvideWithEditorSymbols(e,s,t,i):this.doProvideWithoutEditorSymbols(e,s,t,i):q.None}doProvideWithoutEditorSymbols(e,t,i,n){const s=new de;return this.provideLabelPick(i,p("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(async()=>!await this.waitForLanguageSymbolRegistry(t,s)||n.isCancellationRequested||s.add(this.doProvideWithEditorSymbols(e,t,i,n)))(),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new wy,n=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(n.dispose(),i.complete(!0))}));return t.add(je(()=>i.complete(!1))),i.p}doProvideWithEditorSymbols(e,t,i,n){var s;const r=e.editor,a=new de;a.add(i.onDidAccept(u=>{const[h]=i.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:i.keyMods,preserveFocus:u.inBackground}),u.inBackground||i.hide())})),a.add(i.onDidTriggerItemButton(({item:u})=>{u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));const l=this.getDocumentSymbols(t,n);let d;const c=async u=>{d==null||d.dispose(!0),i.busy=!1,d=new tn(n),i.busy=!0;try{const h=$2(i.value.substr(wp.PREFIX.length).trim()),g=await this.doGetSymbolPicks(l,h,void 0,d.token);if(n.isCancellationRequested)return;if(g.length>0){if(i.items=g,u&&h.original.length===0){const f=Nv(g,m=>!!(m.type!=="separator"&&m.range&&k.containsPosition(m.range.decoration,u)));f&&(i.activeItems=[f])}}else h.original.length>0?this.provideLabelPick(i,p("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,p("noSymbolResults","No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}};return a.add(i.onDidChangeValue(()=>c(void 0))),c((s=r.getSelection())===null||s===void 0?void 0:s.getPosition()),a.add(i.onDidChangeActive(()=>{const[u]=i.activeItems;u&&u.range&&(r.revealRangeInCenter(u.range.selection,0),this.addDecorations(r,u.range.decoration))})),a}async doGetSymbolPicks(e,t,i,n){var s,r;const a=await e;if(n.isCancellationRequested)return[];const l=t.original.indexOf(wp.SCOPE_PREFIX)===0,d=l?1:0;let c,u;t.values&&t.values.length>1?(c=S9(t.values[0]),u=S9(t.values.slice(1))):c=t;let h;const g=(r=(s=this.options)===null||s===void 0?void 0:s.openSideBySideDirection)===null||r===void 0?void 0:r.call(s);g&&(h=[{iconClass:g==="right"?Ue.asClassName(ve.splitHorizontal):Ue.asClassName(ve.splitVertical),tooltip:g==="right"?p("openToSide","Open to the Side"):p("openToBottom","Open to the Bottom")}]);const f=[];for(let _=0;_d){let O=!1;if(c!==t&&([y,I]=xk(w,{...t,values:void 0},d,S),typeof y=="number"&&(O=!0)),typeof y!="number"&&([y,I]=xk(w,c,d,S),typeof y!="number"))continue;if(!O&&u){if(x&&u.original.length>0&&([E,R]=xk(x,u)),typeof E!="number")continue;typeof y=="number"&&(y+=E)}}const j=b.tags&&b.tags.indexOf(1)>=0;f.push({index:_,kind:b.kind,score:y,label:w,ariaLabel:ZZ(b.name,b.kind),description:x,highlights:j?void 0:{label:I,description:R},range:{selection:k.collapseToStart(b.selectionRange),decoration:b.range},strikethrough:j,buttons:h})}const m=f.sort((_,b)=>l?this.compareByKindAndScore(_,b):this.compareByScore(_,b));let v=[];if(l){let w=function(){b&&typeof _=="number"&&C>0&&(b.label=Xh(Ik[_]||kk,C))},_,b,C=0;for(const S of m)_!==S.kind?(w(),_=S.kind,C=1,b={type:"separator"},v.push(b)):C++,v.push(S);w()}else m.length>0&&(v=[{label:p("symbols","symbols ({0})",f.length),type:"separator"},...m]);return v}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const i=Ik[e.kind]||kk,n=Ik[t.kind]||kk,s=i.localeCompare(n);return s===0?this.compareByScore(e,t):s}async getDocumentSymbols(e,t){const i=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}};Tl.PREFIX="@";Tl.SCOPE_PREFIX=":";Tl.PREFIX_BY_CATEGORY=`${wp.PREFIX}${wp.SCOPE_PREFIX}`;Tl=wp=ZLe([y9(0,Me),y9(1,ZL)],Tl);const kk=p("property","properties ({0})"),Ik={5:p("method","methods ({0})"),11:p("function","functions ({0})"),8:p("_constructor","constructors ({0})"),12:p("variable","variables ({0})"),4:p("class","classes ({0})"),22:p("struct","structs ({0})"),23:p("event","events ({0})"),24:p("operator","operators ({0})"),10:p("interface","interfaces ({0})"),2:p("namespace","namespaces ({0})"),3:p("package","packages ({0})"),25:p("typeParameter","type parameters ({0})"),1:p("modules","modules ({0})"),6:p("property","properties ({0})"),9:p("enum","enumerations ({0})"),21:p("enumMember","enumeration members ({0})"),14:p("string","strings ({0})"),0:p("file","files ({0})"),17:p("array","arrays ({0})"),15:p("number","numbers ({0})"),16:p("boolean","booleans ({0})"),18:p("object","objects ({0})"),19:p("key","keys ({0})"),7:p("field","fields ({0})"),13:p("constant","constants ({0})")};var YLe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ek=function(o,e){return function(t,i){e(t,i,o)}};let U2=class extends Tl{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=ye.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};U2=YLe([Ek(0,Ot),Ek(1,Me),Ek(2,ZL)],U2);class W0 extends Te{constructor(){super({id:W0.ID,label:tb.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:T.hasDocumentSymbolProvider,kbOpts:{kbExpr:T.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(Ha).quickAccess.show(Tl.PREFIX,{itemActivation:da.NONE})}}W0.ID="editor.action.quickOutline";_e(W0);xi.as(Wg.Quickaccess).registerQuickAccessProvider({ctor:U2,prefix:Tl.PREFIX,helpEntries:[{description:tb.quickOutlineActionLabel,prefix:Tl.PREFIX,commandId:W0.ID},{description:tb.quickOutlineByCategoryActionLabel,prefix:Tl.PREFIX_BY_CATEGORY}]});function Nk(o,e){return e&&(o.stack||o.stacktrace)?p("stackTrace.format","{0}: {1}",D9(o),L9(o.stack)||L9(o.stacktrace)):D9(o)}function L9(o){return Array.isArray(o)?o.join(` -`):o}function D9(o){return o.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${o.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof o.code=="string"&&typeof o.errno=="number"&&typeof o.syscall=="string"?p("nodeExceptionMessage","A system error occurred ({0})",o.message):o.message||p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function wz(o=null,e=!1){if(!o)return p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(o)){const t=Ia(o),i=wz(t[0],e);return t.length>1?p("error.moreErrors","{0} ({1} errors in total)",i,t.length):i}if(As(o))return o;if(o.detail){const t=o.detail;if(t.error)return Nk(t.error,e);if(t.exception)return Nk(t.exception,e)}return o.stack?Nk(o,e):o.message?o.message:p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function XLe(o){var e;const t=new Map;for(const i of o)t.set(i,((e=t.get(i))!==null&&e!==void 0?e:0)+1);return t}class gv{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const i=this.computeEmbedding(e),n=new Map,s=[];for(const[r,a]of this.documents){if(t.isCancellationRequested)return[];for(const l of a.chunks){const d=this.computeSimilarityScore(l,i,n);d>0&&s.push({key:r,score:d})}}return s}static termFrequencies(e){return XLe(gv.splitTerms(e))}static*splitTerms(e){const t=i=>i.toLowerCase();for(const[i]of e.matchAll(new RegExp("\\b\\p{Letter}[\\p{Letter}\\d]{2,}\\b","gu"))){yield t(i);const n=i.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(n.length>1)for(const s of n)s.length>2&&new RegExp("\\p{Letter}{3,}","gu").test(s)&&(yield t(s))}}updateDocuments(e){var t;for(const{key:i}of e)this.deleteDocument(i);for(const i of e){const n=[];for(const s of i.textChunks){const r=gv.termFrequencies(s);for(const a of r.keys())this.chunkOccurrences.set(a,((t=this.chunkOccurrences.get(a))!==null&&t!==void 0?t:0)+1);n.push({text:s,tf:r})}this.chunkCount+=n.length,this.documents.set(i.key,{chunks:n})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const i of t.chunks)for(const n of i.tf.keys()){const s=this.chunkOccurrences.get(n);if(typeof s=="number"){const r=s-1;r<=0?this.chunkOccurrences.delete(n):this.chunkOccurrences.set(n,r)}}}}computeSimilarityScore(e,t,i){let n=0;for(const[s,r]of Object.entries(t)){const a=e.tf.get(s);if(!a)continue;let l=i.get(s);typeof l!="number"&&(l=this.computeIdf(s),i.set(s,l));const d=a*l;n+=d*r}return n}computeEmbedding(e){const t=gv.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){var t;const i=(t=this.chunkOccurrences.get(e))!==null&&t!==void 0?t:0;return i>0?Math.log((this.chunkCount+1)/i):0}computeTfidf(e){const t=Object.create(null);for(const[i,n]of e){const s=this.computeIdf(i);s>0&&(t[i]=n*s)}return t}}function QLe(o){var e,t;const i=o.slice(0);i.sort((s,r)=>r.score-s.score);const n=(t=(e=i[0])===null||e===void 0?void 0:e.score)!==null&&t!==void 0?t:0;if(n>0)for(const s of i)s.score/=n;return i}var Kf;(function(o){o[o.NO_ACTION=0]="NO_ACTION",o[o.CLOSE_PICKER=1]="CLOSE_PICKER",o[o.REFRESH_PICKER=2]="REFRESH_PICKER",o[o.REMOVE_ITEM=3]="REMOVE_ITEM"})(Kf||(Kf={}));function Tk(o){const e=o;return Array.isArray(e.items)}function x9(o){const e=o;return!!e.picks&&e.additionalPicks instanceof Promise}class JLe extends q{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){var n;const s=new de;e.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let r;const a=s.add(new An),l=async()=>{const d=a.value=new de;r==null||r.dispose(!0),e.busy=!1,r=new tn(t);const c=r.token,u=e.value.substr(this.prefix.length).trim(),h=this._getPicks(u,d,c,i),g=(m,v)=>{var _;let b,C;if(Tk(m)?(b=m.items,C=m.active):b=m,b.length===0){if(v)return!1;(u.length>0||e.hideInput)&&(!((_=this.options)===null||_===void 0)&&_.noResultsPick)&&(_v(this.options.noResultsPick)?b=[this.options.noResultsPick(u)]:b=[this.options.noResultsPick])}return e.items=b,C&&(e.activeItems=[C]),!0},f=async m=>{let v=!1,_=!1;await Promise.all([(async()=>{typeof m.mergeDelay=="number"&&(await au(m.mergeDelay),c.isCancellationRequested)||_||(v=g(m.picks,!0))})(),(async()=>{e.busy=!0;try{const b=await m.additionalPicks;if(c.isCancellationRequested)return;let C,w;Tk(m.picks)?(C=m.picks.items,w=m.picks.active):C=m.picks;let S,x;if(Tk(b)?(S=b.items,x=b.active):S=b,S.length>0||!v){let y;if(!w&&!x){const I=e.activeItems[0];I&&C.indexOf(I)!==-1&&(y=I)}g({items:[...C,...S],active:w||x||y})}}finally{c.isCancellationRequested||(e.busy=!1),_=!0}})()])};if(h!==null)if(x9(h))await f(h);else if(!(h instanceof Promise))g(h);else{e.busy=!0;try{const m=await h;if(c.isCancellationRequested)return;x9(m)?await f(m):g(m)}finally{c.isCancellationRequested||(e.busy=!1)}}};return s.add(e.onDidChangeValue(()=>l())),l(),s.add(e.onDidAccept(d=>{const[c]=e.selectedItems;typeof(c==null?void 0:c.accept)=="function"&&(d.inBackground||e.hide(),c.accept(e.keyMods,d))})),s.add(e.onDidTriggerItemButton(async({button:d,item:c})=>{var u,h;if(typeof c.trigger=="function"){const g=(h=(u=c.buttons)===null||u===void 0?void 0:u.indexOf(d))!==null&&h!==void 0?h:-1;if(g>=0){const f=c.trigger(g,e.keyMods),m=typeof f=="number"?f:await f;if(t.isCancellationRequested)return;switch(m){case Kf.NO_ACTION:break;case Kf.CLOSE_PICKER:e.hide();break;case Kf.REFRESH_PICKER:l();break;case Kf.REMOVE_ITEM:{const v=e.items.indexOf(c);if(v!==-1){const _=e.items.slice(),b=_.splice(v,1),C=e.activeItems.filter(S=>S!==b[0]),w=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=_,C&&(e.activeItems=C),e.keepScrollPosition=w}break}}}}})),s}}var Sz=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Dh=function(o,e){return function(t,i){e(t,i,o)}},ph,dn;let Eg=ph=class extends JLe{constructor(e,t,i,n,s,r){super(ph.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=s,this.dialogService=r,this.commandsHistory=this._register(this.instantiationService.createInstance(Nu)),this.options=e}async _getPicks(e,t,i,n){var s,r,a,l;const d=await this.getCommandPicks(i);if(i.isCancellationRequested)return[];const c=su(()=>{const _=new gv;_.updateDocuments(d.map(C=>({key:C.commandId,textChunks:[this.getTfIdfChunk(C)]})));const b=_.calculateScores(e,i);return QLe(b).filter(C=>C.score>ph.TFIDF_THRESHOLD).slice(0,ph.TFIDF_MAX_RESULTS)}),u=[];for(const _ of d){const b=(s=ph.WORD_FILTER(e,_.label))!==null&&s!==void 0?s:void 0,C=_.commandAlias&&(r=ph.WORD_FILTER(e,_.commandAlias))!==null&&r!==void 0?r:void 0;if(b||C)_.highlights={label:b,detail:this.options.showAlias?C:void 0},u.push(_);else if(e===_.commandId)u.push(_);else if(e.length>=3){const w=c();if(i.isCancellationRequested)return[];const S=w.find(x=>x.key===_.commandId);S&&(_.tfIdfScore=S.score,u.push(_))}}const h=new Map;for(const _ of u){const b=h.get(_.label);b?(_.description=_.commandId,b.description=b.commandId):h.set(_.label,_)}u.sort((_,b)=>{if(_.tfIdfScore&&b.tfIdfScore)return _.tfIdfScore===b.tfIdfScore?_.label.localeCompare(b.label):b.tfIdfScore-_.tfIdfScore;if(_.tfIdfScore)return 1;if(b.tfIdfScore)return-1;const C=this.commandsHistory.peek(_.commandId),w=this.commandsHistory.peek(b.commandId);if(C&&w)return C>w?-1:1;if(C)return-1;if(w)return 1;if(this.options.suggestedCommandIds){const S=this.options.suggestedCommandIds.has(_.commandId),x=this.options.suggestedCommandIds.has(b.commandId);if(S&&x)return 0;if(S)return-1;if(x)return 1}return _.label.localeCompare(b.label)});const g=[];let f=!1,m=!0,v=!!this.options.suggestedCommandIds;for(let _=0;_{var _;const b=await this.getAdditionalCommandPicks(d,u,e,i);if(i.isCancellationRequested)return[];const C=b.map(w=>this.toCommandPick(w,n));return m&&((_=C[0])===null||_===void 0?void 0:_.type)!=="separator"&&C.unshift({type:"separator",label:p("suggested","similar commands")}),C})()}:g}toCommandPick(e,t){if(e.type==="separator")return e;const i=this.keybindingService.lookupKeybinding(e.commandId),n=i?p("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,i.getAriaLabel()):e.label;return{...e,ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:async()=>{var s,r;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:(s=t==null?void 0:t.from)!==null&&s!==void 0?s:"quick open"});try{!((r=e.args)===null||r===void 0)&&r.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(a){Fa(a)||this.dialogService.error(p("canNotRun","Command '{0}' resulted in an error",e.label),wz(a))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:i}){let n=e;return t&&t!==e&&(n+=` - ${t}`),i&&i.value!==e&&(n+=` - ${i.value===i.original?i.value:`${i.value} (${i.original})`}`),n}};Eg.PREFIX=">";Eg.TFIDF_THRESHOLD=.5;Eg.TFIDF_MAX_RESULTS=5;Eg.WORD_FILTER=NA(ob,ade,s6);Eg=ph=Sz([Dh(1,qe),Dh(2,Xt),Dh(3,Ri),Dh(4,vo),Dh(5,g0)],Eg);let Nu=dn=class extends q{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===rb.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=dn.getConfiguredCommandHistoryLength(this.configurationService),dn.cache&&dn.cache.limit!==this.configuredCommandsHistoryLength&&(dn.cache.limit=this.configuredCommandsHistoryLength,dn.hasChanges=!0))}load(){const e=this.storageService.get(dn.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch{}const i=dn.cache=new Pu(this.configuredCommandsHistoryLength,1);if(t){let n;t.usesLRU?n=t.entries:n=t.entries.sort((s,r)=>s.value-r.value),n.forEach(s=>i.set(s.key,s.value))}dn.counter=this.storageService.getNumber(dn.PREF_KEY_COUNTER,0,dn.counter)}push(e){dn.cache&&(dn.cache.set(e,dn.counter++),dn.hasChanges=!0)}peek(e){var t;return(t=dn.cache)===null||t===void 0?void 0:t.peek(e)}saveState(){if(!dn.cache||!dn.hasChanges)return;const e={usesLRU:!0,entries:[]};dn.cache.forEach((t,i)=>e.entries.push({key:i,value:t})),this.storageService.store(dn.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(dn.PREF_KEY_COUNTER,dn.counter,0,0),dn.hasChanges=!1}static getConfiguredCommandHistoryLength(e){var t,i;const s=(i=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||i===void 0?void 0:i.history;return typeof s=="number"?s:dn.DEFAULT_COMMANDS_HISTORY_LENGTH}};Nu.DEFAULT_COMMANDS_HISTORY_LENGTH=50;Nu.PREF_KEY_CACHE="commandPalette.mru.cache";Nu.PREF_KEY_COUNTER="commandPalette.mru.counter";Nu.counter=1;Nu.hasChanges=!1;Nu=dn=Sz([Dh(0,Xr),Dh(1,Dt)],Nu);class eDe extends Eg{constructor(e,t,i,n,s,r){super(e,t,i,n,s,r)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:OA(i.label)||i.id});return t}}var tDe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},gf=function(o,e){return function(t,i){e(t,i,o)}};let Kb=class extends eDe{get activeTextEditorControl(){var e;return(e=this.codeEditorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}constructor(e,t,i,n,s,r){super({showAlias:!1},e,i,n,s,r),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};Kb=tDe([gf(0,qe),gf(1,Ot),gf(2,Xt),gf(3,Ri),gf(4,vo),gf(5,g0)],Kb);class V0 extends Te{constructor(){super({id:V0.ID,label:Zw.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(Ha).quickAccess.show(Kb.PREFIX)}}V0.ID="editor.action.quickCommand";_e(V0);xi.as(Wg.Quickaccess).registerQuickAccessProvider({ctor:Kb,prefix:Kb.PREFIX,helpEntries:[{description:Zw.quickCommandHelp,commandId:V0.ID}]});var iDe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ff=function(o,e){return function(t,i){e(t,i,o)}};let j2=class extends Lu{constructor(e,t,i,n,s,r,a){super(!0,e,t,i,n,s,r,a)}};j2=iDe([ff(1,Xe),ff(2,Ot),ff(3,sn),ff(4,qe),ff(5,Xr),ff(6,Dt)],j2);At(Lu.ID,j2,4);class nDe extends Te{constructor(){super({id:"editor.action.toggleHighContrast",label:HE.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(Jo),n=i.getColorTheme();xa(n.type)?(i.setTheme(this._originalThemeName||(Pp(n.type)?_p:yd)),this._originalThemeName=null):(i.setTheme(Pp(n.type)?Uh:jh),this._originalThemeName=n.themeName)}}_e(nDe);const sDe={class:"monaco-editor-container"},oDe=Ss({__name:"MonacoEditor",props:{modelValue:{},placeholder:{default:""},readonly:{type:Boolean,default:!1},language:{default:"json"}},emits:["update:modelValue","change"],setup(o,{emit:e}){const t=o,i=e,n=Ye();let s=null;const r=()=>{n.value&&(s=sT.create(n.value,{value:t.modelValue,language:t.language,theme:"vs-dark",automaticLayout:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,fontFamily:"'Monaco', 'Menlo', 'Ubuntu Mono', monospace",lineNumbers:"on",roundedSelection:!1,scrollbar:{vertical:"visible",horizontal:"visible",verticalScrollbarSize:8,horizontalScrollbarSize:8},folding:!0,wordWrap:"on",renderWhitespace:"selection",tabSize:2,insertSpaces:!0,detectIndentation:!1,trimAutoWhitespace:!0,largeFileOptimizations:!1,readOnly:t.readonly}),s.onDidChangeModelContent(()=>{const l=(s==null?void 0:s.getValue())||"";i("update:modelValue",l),i("change",l)}),sT.defineTheme("custom-dark",{base:"vs-dark",inherit:!0,rules:[{token:"string",foreground:"#34d399"},{token:"number",foreground:"#60a5fa"},{token:"keyword",foreground:"#a78bfa"},{token:"comment",foreground:"#6b7280"},{token:"operator",foreground:"#fbbf24"},{token:"delimiter",foreground:"#fbbf24"}],colors:{"editor.background":"rgba(255, 255, 255, 0.05)","editor.foreground":"#f9fafb","editor.lineHighlightBackground":"rgba(255, 255, 255, 0.08)","editor.selectionBackground":"#3b82f6","editor.inactiveSelectionBackground":"#4b5563","editorCursor.foreground":"#f9fafb","editorWhitespace.foreground":"#6b7280","editorIndentGuide.background":"rgba(255, 255, 255, 0.1)","editorIndentGuide.activeBackground":"#6b7280","editorLineNumber.foreground":"#9ca3af","editorLineNumber.activeForeground":"#f9fafb","editorGutter.background":"rgba(255, 255, 255, 0.05)"}}),s.updateOptions({theme:"custom-dark"}))},a=l=>{s&&s.getValue()!==l&&s.setValue(l)};return cr(()=>t.modelValue,l=>{s&&a(l)}),cr(()=>t.readonly,l=>{s&&s.updateOptions({readOnly:l})}),Kd(()=>{I9(()=>{r()})}),E9(()=>{s&&s.dispose()}),(l,d)=>(ne(),ue("div",sDe,[D("div",{ref_key:"editorContainer",ref:n,class:"editor-wrapper"},null,512)]))}}),yz=us(oDe,[["__scopeId","data-v-df421d9b"]]),rDe={class:"mcp-config-form"},aDe={class:"form-item"},lDe=["value","placeholder"],dDe={class:"form-item"},cDe={key:0,class:"form-item"},uDe=["value","placeholder"],hDe={key:1,class:"form-item"},gDe=["value","placeholder"],fDe={key:2,class:"form-item"},pDe=["value","placeholder"],mDe={key:3,class:"form-item"},_De=["value","placeholder"],vDe={class:"usage-instructions"},bDe={class:"instructions-header"},CDe=Ss({__name:"McpConfigForm",props:{formData:{},isEditMode:{type:Boolean}},emits:["connection-type-change","update:formData"],setup(o,{emit:e}){const{t}=Pa(),i=o,n=e,s=[{id:"STUDIO",name:"STUDIO"},{id:"SSE",name:"SSE"},{id:"STREAMING",name:"STREAMING"}],r=(l,d)=>{const c=d.target;i.isEditMode?i.formData[l]=c.value:n("update:formData",{...i.formData,[l]:c.value})},a=l=>{l&&(i.isEditMode?i.formData.connectionType=l:n("update:formData",{...i.formData,connectionType:l}),n("connection-type-change"))};return(l,d)=>(ne(),ue("div",rDe,[D("div",aDe,[d[5]||(d[5]=D("label",null,[Ae("MCP名称 "),D("span",{class:"required"},"*")],-1)),D("input",{value:l.formData.mcpServerName||"",onInput:d[0]||(d[0]=c=>r("mcpServerName",c)),type:"text",class:"config-input",placeholder:P(t)("config.mcpConfig.mcpServerNamePlaceholder")},null,40,lDe)]),D("div",dDe,[D("label",null,[Ae(B(P(t)("config.mcpConfig.connectionType"))+" ",1),d[6]||(d[6]=D("span",{class:"required"},"*",-1))]),xe(Q1,{"model-value":l.formData.connectionType,"onUpdate:modelValue":a,options:s,placeholder:P(t)("config.mcpConfig.connectionTypePlaceholder"),"dropdown-title":P(t)("config.mcpConfig.connectionTypePlaceholder")},null,8,["model-value","placeholder","dropdown-title"])]),l.formData.connectionType==="STUDIO"?(ne(),ue("div",cDe,[D("label",null,[Ae(B(P(t)("config.mcpConfig.command"))+" ",1),d[7]||(d[7]=D("span",{class:"required"},"*",-1))]),D("input",{value:l.formData.command||"",onInput:d[1]||(d[1]=c=>r("command",c)),type:"text",class:"config-input",placeholder:P(t)("config.mcpConfig.commandPlaceholder")},null,40,uDe)])):at("",!0),l.formData.connectionType==="SSE"||l.formData.connectionType==="STREAMING"?(ne(),ue("div",hDe,[D("label",null,[Ae(B(P(t)("config.mcpConfig.url"))+" ",1),d[8]||(d[8]=D("span",{class:"required"},"*",-1))]),D("input",{value:l.formData.url||"",onInput:d[2]||(d[2]=c=>r("url",c)),type:"text",class:"config-input",placeholder:P(t)("config.mcpConfig.urlPlaceholder")},null,40,gDe)])):at("",!0),l.formData.connectionType==="STUDIO"?(ne(),ue("div",fDe,[D("label",null,[Ae(B(P(t)("config.mcpConfig.args"))+" ",1),d[9]||(d[9]=D("span",{class:"required"},"*",-1))]),D("textarea",{value:l.formData.args||"",onInput:d[3]||(d[3]=c=>r("args",c)),class:"config-textarea",placeholder:P(t)("config.mcpConfig.argsPlaceholder"),rows:"3"},null,40,pDe)])):at("",!0),l.formData.connectionType==="STUDIO"?(ne(),ue("div",mDe,[D("label",null,B(P(t)("config.mcpConfig.env")),1),D("textarea",{value:l.formData.env||"",onInput:d[4]||(d[4]=c=>r("env",c)),class:"config-textarea",placeholder:P(t)("config.mcpConfig.envPlaceholder"),rows:"3"},null,40,_De)])):at("",!0),D("div",vDe,[D("div",bDe,[xe(P(Pe),{icon:"carbon:information",class:"instructions-icon"}),d[10]||(d[10]=D("h4",null,"使用说明",-1))]),d[11]||(d[11]=Tz('
  1. 获取MCP服务列表
    • 可以在mcp.higress.aimcp.so,modelscope.cn上查找可用的MCP服务
    • 如果需要批量配置MCP服务,可以使用右上角的全部导入功能
  2. 配置MCP服务
    • 填写服务名称:
    • 选择连接类型:本地选择 STUDIO 以及输入 Command、Args和Env。远程选择 SSESTREAMING 以及输入 URL
    • 点击保存按钮完成MCP配置,MCP工具将自动注册到系统中
  3. 配置Agent使用
    • 在Agent配置页面创建新的Agent,为Agent添加刚配置的MCP服务,这样可以减少工具冲突,提高Agent选择工具的准确性
',1))])]))}}),k9=us(CDe,[["__scopeId","data-v-c7dc6c11"]]),wDe={class:"tab-panel"},SDe={class:"tab-header"},yDe=["onClick"],LDe={class:"tab-content"},DDe=Ss({__name:"TabPanel",props:{tabs:{},modelValue:{default:0}},emits:["update:modelValue"],setup(o,{emit:e}){const t=o,i=e,n=Ye(t.modelValue);return cr(n,s=>{i("update:modelValue",s)}),cr(()=>t.modelValue,s=>{n.value=s}),(s,r)=>(ne(),ue("div",wDe,[D("div",SDe,[(ne(!0),ue(Ji,null,ln(s.tabs,(a,l)=>(ne(),ue("button",{key:l,class:Nn(["tab-button",{active:n.value===l}]),onClick:d=>n.value=l},B(a.label),11,yDe))),128))]),D("div",LDe,[(ne(!0),ue(Ji,null,ln(s.tabs,(a,l)=>Vt((ne(),ue("div",{key:l,class:"tab-pane"},[Gf(s.$slots,a.name,{tab:a},()=>[Ae(B(a.content),1)])])),[[ny,n.value===l]])),128))])]))}}),xDe=us(DDe,[["__scopeId","data-v-dd5c9237"]]),kDe={class:"json-import-panel"},IDe={class:"form-item"},EDe={class:"json-config-container"},NDe={class:"usage-instructions"},TDe={class:"instructions-header"},MDe={key:0,class:"validation-errors"},ADe=Ss({__name:"JsonImportPanel",props:{modelValue:{default:""},onValidationChange:{type:Function,default:()=>{}}},emits:["update:modelValue","validationChange"],setup(o,{expose:e,emit:t}){const i=o,n=t,{t:s}=Pa(),r=Ye(i.modelValue),a=Ye(!0),l=Ye([]),d=Ye(0),c=Xn(()=>[{name:"json-config",label:"JSON配置"},{name:"config-example",label:"配置示例"}]);cr(()=>i.modelValue,m=>{r.value=m}),cr(r,m=>{n("update:modelValue",m)});const u=()=>{const m=r.value;if(!m){a.value=!0,l.value=[],h();return}try{const v=JSON.parse(m),_=g(v);if(_.isValid){const b=f(v),C=JSON.stringify(b,null,2);C!==m&&(r.value=C),a.value=!0,l.value=[]}else a.value=!1,l.value=_.errors||[];h()}catch(v){a.value=!1;let _=s("config.mcpConfig.invalidJson");if(v instanceof SyntaxError){const b=v.message;b.includes("Unexpected token")?_="❌ JSON语法错误 - 请检查括号、逗号、引号等符号是否正确":b.includes("Unexpected end")?_="❌ JSON不完整 - 请检查是否缺少结束括号或引号":b.includes("Unexpected number")?_="❌ JSON数字格式错误 - 请检查数字格式":b.includes("Unexpected string")?_="❌ JSON字符串格式错误 - 请检查引号是否配对":_=`❌ JSON语法错误: ${b}`}l.value=[_],h()}},h=()=>{var v;const m={isValid:a.value,errors:l.value};n("validationChange",m),(v=i.onValidationChange)==null||v.call(i,m)},g=m=>{const v=[];if(!m.mcpServers||typeof m.mcpServers!="object")return v.push(s("config.mcpConfig.missingMcpServers")),v.push('💡 正确格式示例: {"mcpServers": {"server-id": {"name": "服务器名称", "url": "服务器地址"}}}'),{isValid:!1,errors:v};const _=m.mcpServers;for(const[b,C]of Object.entries(_)){if(typeof C!="object"||C===null){v.push(s("config.mcpConfig.invalidServerConfig",{serverId:b}));continue}const w=C;if(w.command){if(!Array.isArray(w.args))v.push(s("config.mcpConfig.invalidArgs",{serverId:b}));else for(let S=0;S0)for(let S=0;S{if(!m.mcpServers)return m;const v={...m};v.mcpServers={...m.mcpServers};for(const[_,b]of Object.entries(m.mcpServers)){const C=b,w={...C};if(!C.command){const S=C.url&&typeof C.url=="string",x=C.baseUrl&&typeof C.baseUrl=="string";x&&!S?(w.url=C.baseUrl,delete w.baseUrl):!S&&!x&&console.warn(`Server ${_} has no command but also no url or baseUrl`)}v.mcpServers[_]=w}return v};return e({validateJson:u,isJsonValid:Xn(()=>a.value),validationErrors:Xn(()=>l.value)}),(m,v)=>(ne(),ue("div",kDe,[D("div",IDe,[xe(xDe,{tabs:c.value,modelValue:d.value,"onUpdate:modelValue":v[1]||(v[1]=_=>d.value=_),class:"json-tab-panel"},{"json-config":Zt(()=>[D("div",EDe,[xe(yz,{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=_=>r.value=_),language:"json",height:400,onChange:u},null,8,["modelValue"]),D("div",NDe,[D("div",TDe,[xe(P(Pe),{icon:"carbon:information",class:"instructions-icon"}),v[2]||(v[2]=D("h4",null,"使用说明",-1))]),v[3]||(v[3]=D("div",{class:"instructions-content"},[D("ol",{class:"instructions-list"},[D("li",null,[D("strong",null,"获取MCP服务列表"),D("ul",null,[D("li",null,[Ae("可以在"),D("code",null,"mcp.higress.ai"),Ae(","),D("code",null,"mcp.so"),Ae(","),D("code",null,"modelscope.cn"),Ae("上查找可用的MCP服务")])])]),D("li",null,[D("strong",null,"配置MCP服务"),D("ul",null,[D("li",null,"把完整的JSON配置复制到上面的输入框(可以参考配置示例),然后点击导入")])]),D("li",null,[D("strong",null,"配置Agent使用"),D("ul",null,[D("li",null,"在Agent配置页面创建新的Agent,为Agent添加刚配置的MCP服务,这样可以减少工具冲突,提高Agent选择工具的准确性")])])])],-1))])])]),"config-example":Zt(()=>v[4]||(v[4]=[D("pre",{class:"example-json"},[D("code",null,`{ +`)};const r=await s.provideRenameEdits(this.model,this.position,e,n);if(r){if(r.rejectReason)return this._provideRenameEdits(e,t+1,i.concat(r.rejectReason),n)}else return this._provideRenameEdits(e,t+1,i.concat(p("no result","No result.")),n);return r}}async function hye(o,e,t,i){const n=new cP(e,t,o),s=await n.resolveRenameLocation(vt.None);return s!=null&&s.rejectReason?{edits:[],rejectReason:s.rejectReason}:n.provideRenameEdits(i,vt.None)}let Ig=w2=class{static get(e){return e.getContribution(w2.ID)}constructor(e,t,i,n,s,r,a,l){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=r,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new de,this._cts=new tn,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(C2,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){var e,t;if(this._cts.dispose(!0),this._cts=new tn,!this.editor.hasModel())return;const i=this.editor.getPosition(),n=new cP(this.editor.getModel(),i,this._languageFeaturesService.renameProvider);if(!n.hasProvider())return;const s=new bu(this.editor,5,void 0,this._cts.token);let r;try{const f=n.resolveRenameLocation(s.token);this._progressService.showWhile(f,250),r=await f}catch(f){(e=ho.get(this.editor))===null||e===void 0||e.showMessage(f||p("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),i);return}finally{s.dispose()}if(!r)return;if(r.rejectReason){(t=ho.get(this.editor))===null||t===void 0||t.showMessage(r.rejectReason,i);return}if(s.token.isCancellationRequested)return;const a=new bu(this.editor,5,r.range,this._cts.token),l=this.editor.getSelection();let d=0,c=r.text.length;!k.isEmpty(l)&&!k.spansMultipleLines(l)&&k.containsRange(r.range,l)&&(d=Math.max(0,l.startColumn-r.range.startColumn),c=Math.min(r.range.endColumn,l.endColumn)-r.range.startColumn);const u=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),h=await this._renameInputField.getInput(r.range,r.text,d,c,u,a.token);if(typeof h=="boolean"){h&&this.editor.focus(),a.dispose();return}this.editor.focus();const g=Cy(n.provideRenameEdits(h.newName,a.token),a.token).then(async f=>{if(!(!f||!this.editor.hasModel())){if(f.rejectReason){this._notificationService.info(f.rejectReason);return}this.editor.setSelection(k.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(f,{editor:this.editor,showPreview:h.wantsPreview,label:p("label","Renaming '{0}' to '{1}'",r==null?void 0:r.text,h.newName),code:"undoredo.rename",quotableLabel:p("quotableLabel","Renaming {0} to {1}",r==null?void 0:r.text,h.newName),respectAutoSaveConfig:!0}).then(m=>{m.ariaSummary&&mo(p("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",r.text,h.newName,m.ariaSummary))}).catch(m=>{this._notificationService.error(p("rename.failedApply","Rename failed to apply edits")),this._logService.error(m)})}},f=>{this._notificationService.error(p("rename.failed","Rename failed to compute edits")),this._logService.error(f)}).finally(()=>{a.dispose()});return this._progressService.showWhile(g,250),g}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};Ig.ID="editor.contrib.renameController";Ig=w2=uye([rh(1,qe),rh(2,sn),rh(3,f0),rh(4,Bu),rh(5,bo),rh(6,FM),rh(7,Me)],Ig);class gye extends Te{constructor(){super({id:"editor.action.rename",label:p("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:ae.and(T.writable,T.hasRenameProvider),kbOpts:{kbExpr:T.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(Ot),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return ze.isUri(n)&&z.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(r=>{r&&(r.setPosition(s),r.invokeWithinContext(a=>(this.reportTelemetry(a,r),this.run(a,r))))},nt):super.runCommand(e,t)}run(e,t){const i=Ig.get(t);return i?i.run():Promise.resolve()}}At(Ig.ID,Ig,4);_e(gye);const uP=Rn.bindToContribution(Ig.get);we(new uP({id:"acceptRenameInput",precondition:hD,handler:o=>o.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:ae.and(T.focus,ae.not("isComposing")),primary:3}}));we(new uP({id:"acceptRenameInputWithPreview",precondition:ae.and(hD,ae.has("config.editor.rename.enablePreview")),handler:o=>o.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:ae.and(T.focus,ae.not("isComposing")),primary:1027}}));we(new uP({id:"cancelRenameInput",precondition:hD,handler:o=>o.cancelRenameInput(),kbOpts:{weight:199,kbExpr:T.focus,primary:9,secondary:[1033]}}));ql("_executeDocumentRenameProvider",function(o,e,t,...i){const[n]=i;qt(typeof n=="string");const{renameProvider:s}=o.get(Me);return hye(s,e,t,n)});ql("_executePrepareRename",async function(o,e,t){const{renameProvider:i}=o.get(Me),s=await new cP(e,t,i).resolveRenameLocation(vt.None);if(s!=null&&s.rejectReason)throw new Error(s.rejectReason);return s});xi.as(Va.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:p("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});function fye(o){for(let e=0,t=o.length;e0?t[0]:[]}async function QH(o,e,t,i,n){const s=vye(o,e),r=await Promise.all(s.map(async a=>{let l,d=null;try{l=await a.provideDocumentSemanticTokens(e,a===t?i:null,n)}catch(c){d=c,l=null}return(!l||!gD(l)&&!YH(l))&&(l=null),new _ye(a,l,d)}));for(const a of r){if(a.error)throw a.error;if(a.tokens)return a}return r.length>0?r[0]:null}function bye(o,e){const t=o.orderedGroups(e);return t.length>0?t[0]:null}class Cye{constructor(e,t){this.provider=e,this.tokens=t}}function wye(o,e){return o.has(e)}function JH(o,e){const t=o.orderedGroups(e);return t.length>0?t[0]:[]}async function hP(o,e,t,i){const n=JH(o,e),s=await Promise.all(n.map(async r=>{let a;try{a=await r.provideDocumentRangeSemanticTokens(e,t,i)}catch(l){en(l),a=null}return(!a||!gD(a))&&(a=null),new Cye(r,a)}));for(const r of s)if(r.tokens)return r;return s.length>0?s[0]:null}Et.registerCommand("_provideDocumentSemanticTokensLegend",async(o,...e)=>{const[t]=e;qt(t instanceof ze);const i=o.get(Si).getModel(t);if(!i)return;const{documentSemanticTokensProvider:n}=o.get(Me),s=bye(n,i);return s?s[0].getLegend():o.get(Ri).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)});Et.registerCommand("_provideDocumentSemanticTokens",async(o,...e)=>{const[t]=e;qt(t instanceof ze);const i=o.get(Si).getModel(t);if(!i)return;const{documentSemanticTokensProvider:n}=o.get(Me);if(!XH(n,i))return o.get(Ri).executeCommand("_provideDocumentRangeSemanticTokens",t,i.getFullModelRange());const s=await QH(n,i,null,null,vt.None);if(!s)return;const{provider:r,tokens:a}=s;if(!a||!gD(a))return;const l=ZH({id:0,type:"full",data:a.data});return a.resultId&&r.releaseDocumentSemanticTokens(a.resultId),l});Et.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(o,...e)=>{const[t,i]=e;qt(t instanceof ze);const n=o.get(Si).getModel(t);if(!n)return;const{documentRangeSemanticTokensProvider:s}=o.get(Me),r=JH(s,n);if(r.length===0)return;if(r.length===1)return r[0].getLegend();if(!i||!k.isIRange(i))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),r[0].getLegend();const a=await hP(s,n,k.lift(i),vt.None);if(a)return a.provider.getLegend()});Et.registerCommand("_provideDocumentRangeSemanticTokens",async(o,...e)=>{const[t,i]=e;qt(t instanceof ze),qt(k.isIRange(i));const n=o.get(Si).getModel(t);if(!n)return;const{documentRangeSemanticTokensProvider:s}=o.get(Me),r=await hP(s,n,k.lift(i),vt.None);if(!(!r||!r.tokens))return ZH({id:0,type:"full",data:r.tokens.data})});const gP="editor.semanticHighlighting";function S2(o,e,t){var i;const n=(i=t.getValue(gP,{overrideIdentifier:o.getLanguageId(),resource:o.uri}))===null||i===void 0?void 0:i.enabled;return typeof n=="boolean"?n:e.getColorTheme().semanticHighlighting}var ez=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sl=function(o,e){return function(t,i){e(t,i,o)}},pc;let y2=class extends q{constructor(e,t,i,n,s,r){super(),this._watchers=Object.create(null);const a=c=>{this._watchers[c.uri.toString()]=new Vb(c,e,i,s,r)},l=(c,u)=>{u.dispose(),delete this._watchers[c.uri.toString()]},d=()=>{for(const c of t.getModels()){const u=this._watchers[c.uri.toString()];S2(c,i,n)?u||a(c):u&&l(c,u)}};this._register(t.onModelAdded(c=>{S2(c,i,n)&&a(c)})),this._register(t.onModelRemoved(c=>{const u=this._watchers[c.uri.toString()];u&&l(c,u)})),this._register(n.onDidChangeConfiguration(c=>{c.affectsConfiguration(gP)&&d()})),this._register(i.onDidColorThemeChange(d))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};y2=ez([sl(0,Yy),sl(1,Si),sl(2,Sn),sl(3,Dt),sl(4,wr),sl(5,Me)],y2);let Vb=pc=class extends q{constructor(e,t,i,n,s){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=s.documentSemanticTokensProvider,this._debounceInformation=n.for(this._provider,"DocumentSemanticTokens",{min:pc.REQUEST_MIN_DELAY,max:pc.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new Yt(()=>this._fetchDocumentSemanticTokensNow(),pc.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const r=()=>{jt(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};r(),this._register(this._provider.onDidChange(()=>{r(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(i.onDidColorThemeChange(a=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),jt(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!XH(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const e=new tn,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=QH(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const s=[],r=this._model.onDidChangeContent(l=>{s.push(l)}),a=new ds(!1);n.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,s);else{const{provider:d,tokens:c}=l,u=this._semanticTokensStylingService.getStyling(d);this._setDocumentSemanticTokens(d,c||null,u,s)}},l=>{l&&(Fa(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||nt(l),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),(s.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,i,n,s){s=Math.min(s,i.length-n,e.length-t);for(let r=0;r{(n.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!i){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),r();return}if(YH(t)){if(!s){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:s.data};else{let a=0;for(const h of t.edits)a+=(h.data?h.data.length:0)-h.deleteCount;const l=s.data,d=new Uint32Array(l.length+a);let c=l.length,u=d.length;for(let h=t.edits.length-1;h>=0;h--){const g=t.edits[h];if(g.start>l.length){i.warnInvalidEditStart(s.resultId,t.resultId,h,g.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}const f=c-(g.start+g.deleteCount);f>0&&(pc._copy(l,c-f,d,u-f,f),u-=f),g.data&&(pc._copy(g.data,0,d,u-g.data.length,g.data.length),u-=g.data.length),c=g.start}c>0&&pc._copy(l,0,d,0,c),t={resultId:t.resultId,data:d}}}if(gD(t)){this._currentDocumentResponse=new Sye(e,t.resultId,t.data);const a=qB(t,i,this._model.getLanguageId());if(n.length>0)for(const l of n)for(const d of a)for(const c of l.changes)d.applyEdit(c.range,c.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);r()}};Vb.REQUEST_MIN_DELAY=300;Vb.REQUEST_MAX_DELAY=2e3;Vb=pc=ez([sl(1,Yy),sl(2,Sn),sl(3,wr),sl(4,Me)],Vb);class Sye{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}_L(y2);var yye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},c_=function(o,e){return function(t,i){e(t,i,o)}};let Hb=class extends q{constructor(e,t,i,n,s,r){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._provider=r.documentRangeSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new Yt(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(l=>{this._cancelAll(),a()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration(gP)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()})),a()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;tthis._requestRange(e,i)))}_requestRange(e,t){const i=e.getVersionId(),n=_n(r=>Promise.resolve(hP(this._provider,e,t,r))),s=new ds(!1);return n.then(r=>{if(this._debounceInformation.update(e,s.elapsed()),!r||!r.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:a,tokens:l}=r,d=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(t,qB(l,d,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(n),()=>this._removeOutstandingRequest(n)),n}};Hb.ID="editor.contrib.viewportSemanticTokens";Hb=yye([c_(1,Yy),c_(2,Sn),c_(3,Dt),c_(4,wr),c_(5,Me)],Hb);At(Hb.ID,Hb,1);class Lye{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const i=[];for(const n of t){const s=[];i.push(s),this.selectSubwords&&this._addInWordRanges(s,e,n),this._addWordRanges(s,e,n),this._addWhitespaceLine(s,e,n),s.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;const{word:s,startColumn:r}=n,a=i.column-r;let l=a,d=a,c=0;for(;l>=0;l--){const u=s.charCodeAt(l);if(l!==a&&(u===95||u===45))break;if(Dc(u)&&el(c))break;c=u}for(l+=1;d0&&t.getLineFirstNonWhitespaceColumn(i.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(i.lineNumber)===0&&e.push({range:new k(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var Dye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xye=function(o,e){return function(t,i){e(t,i,o)}},L2;class fP{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new fP(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let lm=L2=class{static get(e){return e.getContribution(L2.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}async run(e){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||await iz(this._languageFeaturesService.selectionRangeProvider,i,t.map(s=>s.getPosition()),this._editor.getOption(112),vt.None).then(s=>{var r;if(!(!ls(s)||s.length!==t.length)&&!(!this._editor.hasModel()||!Bi(this._editor.getSelections(),t,(a,l)=>a.equalsSelection(l)))){for(let a=0;al.containsPosition(t[a].getStartPosition())&&l.containsPosition(t[a].getEndPosition())),s[a].unshift(t[a]);this._state=s.map(a=>new fP(0,a)),(r=this._selectionListener)===null||r===void 0||r.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var a;this._ignoreSelection||((a=this._selectionListener)===null||a===void 0||a.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(s=>s.mov(e));const n=this._state.map(s=>Ae.fromPositions(s.ranges[s.index].getStartPosition(),s.ranges[s.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}}};lm.ID="editor.contrib.smartSelectController";lm=L2=Dye([xye(1,Me)],lm);class tz extends Te{constructor(e,t){super(t),this._forward=e}async run(e,t){const i=lm.get(t);i&&await i.run(this._forward)}}class kye extends tz{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:p("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:N.MenubarSelectionMenu,group:"1_basic",title:p({},"&&Expand Selection"),order:2}})}}Et.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class Iye extends tz{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:p("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:T.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:N.MenubarSelectionMenu,group:"1_basic",title:p({},"&&Shrink Selection"),order:3}})}}At(lm.ID,lm,4);_e(kye);_e(Iye);async function iz(o,e,t,i,n){const s=o.all(e).concat(new Lye(i.selectSubwords));s.length===1&&s.unshift(new To);const r=[],a=[];for(const l of s)r.push(Promise.resolve(l.provideSelectionRanges(e,t,n)).then(d=>{if(ls(d)&&d.length===t.length)for(let c=0;c{if(l.length===0)return[];l.sort((h,g)=>z.isBefore(h.getStartPosition(),g.getStartPosition())?1:z.isBefore(g.getStartPosition(),h.getStartPosition())||z.isBefore(h.getEndPosition(),g.getEndPosition())?-1:z.isBefore(g.getEndPosition(),h.getEndPosition())?1:0);const d=[];let c;for(const h of l)(!c||k.containsRange(h,c)&&!k.equalsRange(h,c))&&(d.push(h),c=h);if(!i.selectLeadingAndTrailingWhitespace)return d;const u=[d[0]];for(let h=1;ho}),Lk="data-sticky-line-index",f9="data-sticky-is-line",Nye="data-sticky-is-line-number",p9="data-sticky-is-folding-icon";class Tye extends q{constructor(e){super(),this._editor=e,this._foldingIconStore=new de,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(66),this._stickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof Su),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(114).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(114)&&t(),i.hasChanged(66)&&(this._lineHeight=this._editor.getOption(66))})),this._register(this._editor.onDidScrollChange(i=>{i.scrollLeftChanged&&t(),i.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{t(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange(i=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getStickyLineForLine(e){return this._stickyLines.find(t=>t.lineNumber===e)}getCurrentLines(){return this._lineNumbers}setState(e,t,i=1/0){if((!this._previousState&&!e||this._previousState&&this._previousState.equals(e))&&i===1/0)return;this._previousState=e;const n=this._stickyLines;if(this._clearStickyWidget(),!e||!this._editor._getViewModel())return;if(e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const r=[...e.startLineNumbers];e.showEndForLine!==null&&(r[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=r}else this._lastLineRelativePosition=0,this._lineNumbers=[];this._renderRootNode(n,t,i)}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-e.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${e.width-e.verticalScrollbarWidth}px`}_clearStickyWidget(){this._stickyLines=[],this._foldingIconStore.clear(),$n(this._lineNumbersDomNode),$n(this._linesDomNode),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(e){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${e?.5:0}s`)}_setFoldingIconsVisibility(e){for(const t of this._stickyLines){const i=t.foldingIcon;i&&i.setVisible(e?!0:i.isCollapsed)}}async _renderRootNode(e,t,i=1/0){const n=this._editor.getLayoutInfo();for(const[r,a]of this._lineNumbers.entries()){const l=e[r],d=a>=i||(l==null?void 0:l.lineNumber)!==a?this._renderChildNode(r,a,t,n):this._updateTopAndZIndexOfStickyLine(l);d&&(this._linesDomNode.appendChild(d.lineDomNode),this._lineNumbersDomNode.appendChild(d.lineNumberDomNode),this._stickyLines.push(d))}t&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));const s=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;if(s===0){this._clearStickyWidget();return}this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${s}px`,this._linesDomNodeScrollable.style.height=`${s}px`,this._rootDomNode.style.height=`${s}px`,this._rootDomNode.style.marginLeft="0px",this._updateMinContentWidth(),this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){this._editor.getOption(109)==="mouseover"&&(this._foldingIconStore.add(J(this._lineNumbersDomNode,Se.MOUSE_ENTER,t=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(J(this._lineNumbersDomNode,Se.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,t,i,n){const s=this._editor._getViewModel();if(!s)return;const r=s.coordinatesConverter.convertModelPositionToViewPosition(new z(t,1)).lineNumber,a=s.getViewLineRenderingData(r),l=this._editor.getOption(67);let d;try{d=lo.filter(a.inlineDecorations,r,a.minColumn,a.maxColumn)}catch{d=[]}const c=new Ou(!0,!0,a.content,a.continuesWithWrappedLine,a.isBasicASCII,a.containsRTL,0,a.tokens,d,a.tabSize,a.startVisibleColumn,1,1,1,500,"none",!0,!0,null),u=new mm(2e3),h=n0(c,u);let g;g9?g=g9.createHTML(u.build()):g=u.build();const f=document.createElement("span");f.setAttribute(Lk,String(e)),f.setAttribute(f9,""),f.setAttribute("role","listitem"),f.tabIndex=0,f.className="sticky-line-content",f.classList.add(`stickyLine${t}`),f.style.lineHeight=`${this._lineHeight}px`,f.innerHTML=g;const m=document.createElement("span");m.setAttribute(Lk,String(e)),m.setAttribute(Nye,""),m.className="sticky-line-number",m.style.lineHeight=`${this._lineHeight}px`;const v=n.contentLeft;m.style.width=`${v}px`;const _=document.createElement("span");l.renderType===1||l.renderType===3&&t%10===0?_.innerText=t.toString():l.renderType===2&&(_.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),_.className="sticky-line-number-inner",_.style.lineHeight=`${this._lineHeight}px`,_.style.width=`${n.lineNumbersWidth}px`,_.style.paddingLeft=`${n.lineNumbersLeft}px`,m.appendChild(_);const b=this._renderFoldingIconForLine(i,t);b&&m.appendChild(b.domNode),this._editor.applyFontInfo(f),this._editor.applyFontInfo(_),m.style.lineHeight=`${this._lineHeight}px`,f.style.lineHeight=`${this._lineHeight}px`,m.style.height=`${this._lineHeight}px`,f.style.height=`${this._lineHeight}px`;const C=new Mye(e,t,f,m,b,h.characterMapping);return this._updateTopAndZIndexOfStickyLine(C)}_updateTopAndZIndexOfStickyLine(e){var t;const i=e.index,n=e.lineDomNode,s=e.lineNumberDomNode,r=i===this._lineNumbers.length-1,a="0",l="1";n.style.zIndex=r?a:l,s.style.zIndex=r?a:l;const d=`${i*this._lineHeight+this._lastLineRelativePosition+(!((t=e.foldingIcon)===null||t===void 0)&&t.isCollapsed?1:0)}px`,c=`${i*this._lineHeight}px`;return n.style.top=r?d:c,s.style.top=r?d:c,e}_renderFoldingIconForLine(e,t){const i=this._editor.getOption(109);if(!e||i==="never")return;const n=e.regions,s=n.findRange(t),r=n.getStartLineNumber(s);if(!(t===r))return;const l=n.isCollapsed(s),d=new Aye(l,r,n.getEndLineNumber(s),this._lineHeight);return d.setVisible(this._isOnGlyphMargin?!0:l||i==="always"),d.domNode.setAttribute(p9,""),d}_updateMinContentWidth(){this._minContentWidthInPx=0;for(const e of this._stickyLines)e.lineDomNode.scrollWidth>this._minContentWidthInPx&&(this._minContentWidthInPx=e.lineDomNode.scrollWidth);this._minContentWidthInPx+=this._editor.getLayoutInfo().verticalScrollbarWidth}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const i=QM(t.characterMapping,e,0);return new z(t.lineNumber,i)}getLineNumberFromChildDomNode(e){var t,i;return(i=(t=this._getRenderedStickyLineFromChildDomNode(e))===null||t===void 0?void 0:t.lineNumber)!==null&&i!==void 0?i:null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getLineIndexFromChildDomNode(e);return t===null||t<0||t>=this._stickyLines.length?null:this._stickyLines[t]}getLineIndexFromChildDomNode(e){const t=this._getAttributeValue(e,Lk);return t?parseInt(t,10):null}isInStickyLine(e){return this._getAttributeValue(e,f9)!==void 0}isInFoldingIconDomNode(e){return this._getAttributeValue(e,p9)!==void 0}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){const i=e.getAttribute(t);if(i!==null)return i;e=e.parentElement}}}class Mye{constructor(e,t,i,n,s,r){this.index=e,this.lineNumber=t,this.lineDomNode=i,this.lineNumberDomNode=n,this.foldingIcon=s,this.characterMapping=r}}class Aye{constructor(e,t,i,n){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=i,this.dimension=n,this.domNode=document.createElement("div"),this.domNode.style.width=`${n}px`,this.domNode.style.height=`${n}px`,this.domNode.className=Ue.asClassName(e?GL:qL)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}class uv{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class JS{constructor(e,t,i){this.range=e,this.children=t,this.parent=i}}class nz{constructor(e,t,i,n){this.uri=e,this.version=t,this.element=i,this.outlineProviderId=n}}var fD=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zb=function(o,e){return function(t,i){e(t,i,o)}},hv;(function(o){o.OUTLINE_MODEL="outlineModel",o.FOLDING_PROVIDER_MODEL="foldingProviderModel",o.INDENTATION_MODEL="indentationModel"})(hv||(hv={}));var Bc;(function(o){o[o.VALID=0]="VALID",o[o.INVALID=1]="INVALID",o[o.CANCELED=2]="CANCELED"})(Bc||(Bc={}));let D2=class extends q{constructor(e,t,i,n){super(),this._editor=e,this._languageConfigurationService=t,this._languageFeaturesService=i,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new jr(300)),this._updateOperation=this._register(new de);const s=new x2(i),r=new I2(this._editor,i),a=new k2(this._editor,t);switch(n){case hv.OUTLINE_MODEL:this._modelProviders.push(s),this._modelProviders.push(r),this._modelProviders.push(a);break;case hv.FOLDING_PROVIDER_MODEL:this._modelProviders.push(r),this._modelProviders.push(a);break;case hv.INDENTATION_MODEL:this._modelProviders.push(a);break}}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(e,t,i){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger(async()=>{for(const n of this._modelProviders){const{statusPromise:s,modelPromise:r}=n.computeStickyModel(e,t,i);this._modelPromise=r;const a=await s;if(this._modelPromise!==r)return null;switch(a){case Bc.CANCELED:return this._updateOperation.clear(),null;case Bc.VALID:return n.stickyModel}}return null}).catch(n=>(nt(n),null))}};D2=fD([zb(1,si),zb(2,Me)],D2);class sz{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,Bc.INVALID}computeStickyModel(e,t,i){if(i.isCancellationRequested||!this.isProviderValid(e))return{statusPromise:this._invalid(),modelPromise:null};const n=_n(s=>this.createModelFromProvider(e,t,s));return{statusPromise:n.then(s=>this.isModelValid(s)?i.isCancellationRequested?Bc.CANCELED:(this._stickyModel=this.createStickyModel(e,t,i,s),Bc.VALID):this._invalid()).then(void 0,s=>(nt(s),Bc.CANCELED)),modelPromise:n}}isModelValid(e){return!0}isProviderValid(e){return!0}}let x2=class extends sz{constructor(e){super(),this._languageFeaturesService=e}createModelFromProvider(e,t,i){return _d.create(this._languageFeaturesService.documentSymbolProvider,e,i)}createStickyModel(e,t,i,n){var s;const{stickyOutlineElement:r,providerID:a}=this._stickyModelFromOutlineModel(n,(s=this._stickyModel)===null||s===void 0?void 0:s.outlineProviderId);return new nz(e.uri,t,r,a)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let i;if(wt.first(e.children.values())instanceof EH){const a=wt.find(e.children.values(),l=>l.id===t);if(a)i=a.children;else{let l="",d=-1,c;for(const[u,h]of e.children.entries()){const g=this._findSumOfRangesOfGroup(h);g>d&&(c=h,d=g,l=h.id)}t=l,i=c.children}}else i=e.children;const n=[],s=Array.from(i.values()).sort((a,l)=>{const d=new uv(a.symbol.range.startLineNumber,a.symbol.range.endLineNumber),c=new uv(l.symbol.range.startLineNumber,l.symbol.range.endLineNumber);return this._comparator(d,c)});for(const a of s)n.push(this._stickyModelFromOutlineElement(a,a.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new JS(void 0,n,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){const i=[];for(const s of e.children.values())if(s.symbol.selectionRange.startLineNumber!==s.symbol.range.endLineNumber)if(s.symbol.selectionRange.startLineNumber!==t)i.push(this._stickyModelFromOutlineElement(s,s.symbol.selectionRange.startLineNumber));else for(const r of s.children.values())i.push(this._stickyModelFromOutlineElement(r,s.symbol.selectionRange.startLineNumber));i.sort((s,r)=>this._comparator(s.range,r.range));const n=new uv(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new JS(n,i,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(const i of e.children.values())t+=this._findSumOfRangesOfGroup(i);return e instanceof GT?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};x2=fD([zb(0,Me)],x2);class oz extends sz{constructor(e){super(),this._foldingLimitReporter=new xH(e)}createStickyModel(e,t,i,n){const s=this._fromFoldingRegions(n);return new nz(e.uri,t,s,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){const t=e.length,i=[],n=new JS(void 0,[],void 0);for(let s=0;s0}createModelFromProvider(e,t,i){const n=Ul.getFoldingRangeProviders(this._languageFeaturesService,e);return new JR(e,n,()=>this.createModelFromProvider(e,t,i),this._foldingLimitReporter,void 0).compute(i)}};I2=fD([zb(1,Me)],I2);var Rye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},m9=function(o,e){return function(t,i){e(t,i,o)}};class Pye{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=i}}let E2=class extends q{constructor(e,t,i){super(),this._languageFeaturesService=t,this._languageConfigurationService=i,this._onDidChangeStickyScroll=this._register(new W),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new de),this._updateSoon=this._register(new Yt(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(114)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._stickyModelProvider=null,this._sessionStore.clear(),this._options=this._editor.getOption(114),this._options.enabled&&(this._stickyModelProvider=this._sessionStore.add(new D2(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel)),this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this._onDidChangeStickyScroll.fire(),this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this.update())}getVersionId(){var e;return(e=this._model)===null||e===void 0?void 0:e.version}async update(){var e;(e=this._cts)===null||e===void 0||e.dispose(!0),this._cts=new tn,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(e){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization()){this._model=null;return}const t=this._editor.getModel(),i=t.getVersionId(),n=await this._stickyModelProvider.update(t,i,e);e.isCancellationRequested||(this._model=n)}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,i,n,s){if(t.children.length===0)return;let r=s;const a=[];for(let c=0;cc-u)),d=this.updateIndex(fv(a,e.startLineNumber+n,(c,u)=>c-u));for(let c=l;c<=d;c++){const u=t.children[c];if(!u)return;if(u.range){const h=u.range.startLineNumber,g=u.range.endLineNumber;e.startLineNumber<=g+1&&h-1<=e.endLineNumber&&h!==r&&(r=h,i.push(new Pye(h,g-1,n+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,i,n+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,i,n,s)}}getCandidateStickyLinesIntersecting(e){var t,i;if(!(!((t=this._model)===null||t===void 0)&&t.element))return[];let n=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,n,0,-1);const s=(i=this._editor._getViewModel())===null||i===void 0?void 0:i.getHiddenAreas();if(s)for(const r of s)n=n.filter(a=>!(a.startLineNumber>=r.startLineNumber&&a.endLineNumber<=r.endLineNumber+1));return n}};E2=Rye([m9(1,Me),m9(2,si)],E2);var Oye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hf=function(o,e){return function(t,i){e(t,i,o)}},N2;let jl=N2=class extends q{constructor(e,t,i,n,s,r,a){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=i,this._instaService=n,this._contextKeyService=a,this._sessionStore=new de,this._foldingModel=null,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._showEndForLine=null,this._stickyScrollWidget=new Tye(this._editor),this._stickyLineCandidateProvider=new E2(this._editor,i,s),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new h9([],[],0),this._readConfiguration();const l=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(c=>{(c.hasChanged(114)||c.hasChanged(72)||c.hasChanged(66)||c.hasChanged(109))&&this._readConfiguration()})),this._register(J(l,Se.CONTEXT_MENU,async c=>{this._onContextMenu(Je(l),c)})),this._stickyScrollFocusedContextKey=T.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=T.stickyScrollVisible.bindTo(this._contextKeyService);const d=this._register(Pl(l));this._register(d.onDidBlur(c=>{this._positionRevealed===!1&&l.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(d.onDidFocus(c=>{this.focus()})),this._registerMouseListeners(),this._register(J(l,Se.MOUSE_DOWN,c=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(N2.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),(e=this._focusDisposableStore)===null||e===void 0||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new de,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,()=>this._editor.revealPosition(e))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(k.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new de),t=this._register(new ML(this._editor,{extractLineNumberFromMouseEvent:s=>{const r=this._stickyScrollWidget.getEditorPositionFromNode(s.target.element);return r?r.lineNumber:0}})),i=s=>{if(!this._editor.hasModel()||s.target.type!==12||s.target.detail!==this._stickyScrollWidget.getId())return null;const r=s.target.element;if(!r||r.innerText!==r.innerHTML)return null;const a=this._stickyScrollWidget.getEditorPositionFromNode(r);return a?{range:new k(a.lineNumber,a.column,a.lineNumber,a.column+r.innerText.length),textElement:r}:null},n=this._stickyScrollWidget.getDomNode();this._register(Wi(n,Se.CLICK,s=>{if(s.ctrlKey||s.altKey||s.metaKey||!s.leftButton)return;if(s.shiftKey){const d=this._stickyScrollWidget.getLineIndexFromChildDomNode(s.target);if(d===null)return;const c=new z(this._endLineNumbers[d],1);this._revealLineInCenterIfOutsideViewport(c);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(s.target)){const d=this._stickyScrollWidget.getLineNumberFromChildDomNode(s.target);this._toggleFoldingRegionForLine(d);return}if(!this._stickyScrollWidget.isInStickyLine(s.target))return;let l=this._stickyScrollWidget.getEditorPositionFromNode(s.target);if(!l){const d=this._stickyScrollWidget.getLineNumberFromChildDomNode(s.target);if(d===null)return;l=new z(d,1)}this._revealPosition(l)})),this._register(Wi(n,Se.MOUSE_MOVE,s=>{if(s.shiftKey){const r=this._stickyScrollWidget.getLineIndexFromChildDomNode(s.target);if(r===null||this._showEndForLine!==null&&this._showEndForLine===r)return;this._showEndForLine=r,this._renderStickyScroll();return}this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(J(n,Se.MOUSE_LEAVE,s=>{this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(t.onMouseMoveOrRelevantKeyDown(([s,r])=>{const a=i(s);if(!a||!s.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}const{range:l,textElement:d}=a;if(!l.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=l,e.clear();else if(d.style.textDecoration==="underline")return;const c=new tn;e.add(je(()=>c.dispose(!0)));let u;BL(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new z(l.startLineNumber,l.startColumn+1),c.token).then(h=>{if(!c.token.isCancellationRequested)if(h.length!==0){this._candidateDefinitionsLength=h.length;const g=d;u!==g?(e.clear(),u=g,u.style.textDecoration="underline",e.add(je(()=>{u.style.textDecoration="none"}))):u||(u=g,u.style.textDecoration="underline",e.add(je(()=>{u.style.textDecoration="none"})))}else e.clear()})})),this._register(t.onCancel(()=>{e.clear()})),this._register(t.onExecute(async s=>{if(s.target.type!==12||s.target.detail!==this._stickyScrollWidget.getId())return;const r=this._stickyScrollWidget.getEditorPositionFromNode(s.target.element);r&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:r.lineNumber,column:1})),this._instaService.invokeFunction(OH,s,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))}))}_onContextMenu(e,t){const i=new Pr(e,t);this._contextMenuService.showContextMenu({menuId:N.StickyScrollContext,getAnchor:()=>i})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||e===null)return;const t=this._stickyScrollWidget.getStickyLineForLine(e),i=t==null?void 0:t.foldingIcon;if(!i)return;wH(this._foldingModel,Number.MAX_VALUE,[e]),i.isCollapsed=!i.isCollapsed;const n=(i.isCollapsed?this._editor.getTopForLineNumber(i.foldingEndLine):this._editor.getTopForLineNumber(i.foldingStartLine))-this._editor.getOption(66)*t.index+1;this._editor.setScrollTop(n),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(114);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(i=>{i.scrollTopChanged&&(this._showEndForLine=null,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(i=>this._onTokensChange(i))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=null,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(67).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=null,this._renderStickyScroll(-1)}))}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const i of t)for(const n of e.ranges)if(i>=n.fromLineNumber&&i<=n.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(-1)}_onDidResize(){const t=this._editor.getLayoutInfo().height/this._editor.getOption(66);this._maxStickyLines=Math.round(t*.25)}async _renderStickyScroll(e=1/0){var t,i;const n=this._editor.getModel();if(!n||n.isTooLargeForTokenization()){this._foldingModel=null,this._stickyScrollWidget.setState(void 0,null,e);return}const s=this._stickyLineCandidateProvider.getVersionId();if(s===void 0||s===n.getVersionId())if(this._foldingModel=(i=await((t=Ul.get(this._editor))===null||t===void 0?void 0:t.getFoldingModel()))!==null&&i!==void 0?i:null,this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.startLineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e);else if(this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const r=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(r)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}}findScrollWidgetState(){const e=this._editor.getOption(66),t=Math.min(this._maxStickyLines,this._editor.getOption(114).maxLineCount),i=this._editor.getScrollTop();let n=0;const s=[],r=[],a=this._editor.getVisibleRanges();if(a.length!==0){const l=new uv(a[0].startLineNumber,a[a.length-1].endLineNumber),d=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(l);for(const c of d){const u=c.startLineNumber,h=c.endLineNumber,g=c.nestingDepth;if(h-u>0){const f=(g-1)*e,m=g*e,v=this._editor.getBottomForLineNumber(u)-i,_=this._editor.getTopForLineNumber(h)-i,b=this._editor.getBottomForLineNumber(h)-i;if(f>_&&f<=b){s.push(u),r.push(h+1),n=b-m;break}else m>v&&m<=b&&(s.push(u),r.push(h+1));if(s.length===t)break}}}return this._endLineNumbers=r,new h9(s,r,n,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};jl.ID="store.contrib.stickyScrollController";jl=N2=Oye([hf(1,Sr),hf(2,Me),hf(3,qe),hf(4,si),hf(5,wr),hf(6,Xe)],jl);class Fye extends Qo{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:p("toggleStickyScroll","Toggle Sticky Scroll"),mnemonicTitle:p({},"&&Toggle Sticky Scroll"),original:"Toggle Sticky Scroll"},category:Eye.View,toggled:{condition:ae.equals("config.editor.stickyScroll.enabled",!0),title:p("stickyScroll","Sticky Scroll"),mnemonicTitle:p({},"&&Sticky Scroll")},menu:[{id:N.CommandPalette},{id:N.MenubarAppearanceMenu,group:"4_editor",order:3},{id:N.StickyScrollContext}]})}async run(e){const t=e.get(Dt),i=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",i)}}const pD=100;class Bye extends Wa{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:p("focusStickyScroll","Focus Sticky Scroll"),mnemonicTitle:p({},"&&Focus Sticky Scroll"),original:"Focus Sticky Scroll"},precondition:ae.and(ae.has("config.editor.stickyScroll.enabled"),T.stickyScrollVisible),menu:[{id:N.CommandPalette}]})}runEditorCommand(e,t){var i;(i=jl.get(t))===null||i===void 0||i.focus()}}class Wye extends Wa{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:p("selectNextStickyScrollLine.title","Select next sticky scroll line"),original:"Select next sticky scroll line"},precondition:T.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:pD,primary:18}})}runEditorCommand(e,t){var i;(i=jl.get(t))===null||i===void 0||i.focusNext()}}class Vye extends Wa{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:p("selectPreviousStickyScrollLine.title","Select previous sticky scroll line"),original:"Select previous sticky scroll line"},precondition:T.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:pD,primary:16}})}runEditorCommand(e,t){var i;(i=jl.get(t))===null||i===void 0||i.focusPrevious()}}class Hye extends Wa{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:p("goToFocusedStickyScrollLine.title","Go to focused sticky scroll line"),original:"Go to focused sticky scroll line"},precondition:T.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:pD,primary:3}})}runEditorCommand(e,t){var i;(i=jl.get(t))===null||i===void 0||i.goToFocused()}}class zye extends Wa{constructor(){super({id:"editor.action.selectEditor",title:{value:p("selectEditor.title","Select Editor"),original:"Select Editor"},precondition:T.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:pD,primary:9}})}runEditorCommand(e,t){var i;(i=jl.get(t))===null||i===void 0||i.selectEditor()}}At(jl.ID,jl,1);mi(Fye);mi(Bye);mi(Vye);mi(Wye);mi(Hye);mi(zye);var pP=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Gh=function(o,e){return function(t,i){e(t,i,o)}},fh;class $ye{constructor(e,t,i,n,s,r){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=s,this.completion=r}}let T2=class extends bZ{constructor(e,t,i,n,s,r){super(s.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=r}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn=0&&l.resolve(vt.None)}return t}};T2=pP([Gh(5,QL)],T2);let M2=class{constructor(e,t,i,n){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=i,this._suggestMemoryService=n}async provideInlineCompletions(e,t,i,n){var s;if(i.selectedSuggestionInfo)return;const r=this._getEditorOption(88,e);if(jf.isAllOff(r))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(jf.valueFor(r,l)!=="inline")return;let d=e.getWordAtPosition(t),c;if(d!=null&&d.word||(c=this._getTriggerCharacterInfo(e,t)),!(d!=null&&d.word)&&!c||(d||(d=e.getWordUntilPosition(t)),d.endColumn!==t.column))return;let u;const h=e.getValueInRange(new k(t.lineNumber,1,t.lineNumber,t.column));if(!c&&(!((s=this._lastResult)===null||s===void 0)&&s.canBeReused(e,t.lineNumber,d))){const g=new a9(h,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=g,this._lastResult.acquire(),u=this._lastResult}else{const g=await tP(this._languageFeatureService.completionProvider,e,t,new Nb(void 0,void 0,c==null?void 0:c.providers),c&&{triggerKind:1,triggerCharacter:c.ch},n);let f;g.needsClipboard&&(f=await this._clipboardService.readText());const m=new yc(g.items,t.column,new a9(h,0),ma.None,this._getEditorOption(117,e),this._getEditorOption(111,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},f);u=new T2(e,t.lineNumber,d,m,g,this._suggestMemoryService)}return this._lastResult=u,u}handleItemDidShow(e,t){t.completion.resolve(vt.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var i;const n=e.getValueInRange(k.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),s=new Set;for(const r of this._languageFeatureService.completionProvider.all(e))!((i=r.triggerCharacters)===null||i===void 0)&&i.includes(n)&&s.add(r);if(s.size!==0)return{providers:s,ch:n}}};M2=pP([Gh(1,Me),Gh(2,Xd),Gh(3,QL)],M2);let ey=fh=class{constructor(e,t,i,n){if(++fh._counter===1){const s=n.createInstance(M2,(r,a)=>{var l;return((l=i.listCodeEditors().find(c=>c.getModel()===a))!==null&&l!==void 0?l:e).getOption(r)});fh._disposable=t.inlineCompletionsProvider.register("*",s)}}dispose(){var e;--fh._counter===0&&((e=fh._disposable)===null||e===void 0||e.dispose(),fh._disposable=void 0)}};ey._counter=0;ey=fh=pP([Gh(1,Me),Gh(2,Ot),Gh(3,qe)],ey);At("suggest.inlineCompletionsProvider",ey,0);class Uye extends Te{constructor(){super({id:"editor.action.forceRetokenize",label:p("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const n=new ds;i.tokenization.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}}_e(Uye);class mD extends Qo{constructor(){super({id:mD.ID,title:{value:p({},"Toggle Tab Key Moves Focus"),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(){const t=!Mp.getTabFocusMode();Mp.setTabFocusMode(t),mo(t?p("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element"):p("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}mD.ID="editor.action.toggleTabFocusMode";mi(mD);var jye=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Kye=function(o,e){return function(t,i){e(t,i,o)}};let A2=class extends q{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n){var s;super(),this._link=t,this._enabled=!0,this.el=le(e,pe("a.monaco-link",{tabIndex:(s=t.tabIndex)!==null&&s!==void 0?s:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");const r=this._register(new St(this.el,"click")),a=this._register(new St(this.el,"keypress")),l=ye.chain(a.event,u=>u.map(h=>new gi(h)).filter(h=>h.keyCode===3)),d=this._register(new St(this.el,ni.Tap)).event;this._register(ei.addTarget(this.el));const c=ye.any(r.event,l,d);this._register(c(u=>{this.enabled&&(ct.stop(u,!0),i!=null&&i.opener?i.opener(this._link.href):n.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};A2=jye([Kye(3,So)],A2);var rz=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},az=function(o,e){return function(t,i){e(t,i,o)}};const qye=26;let R2=class extends q{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(P2))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{var t;this.hide(),(t=e.onClose)===null||t===void 0||t.call(e)}}),this._editor.setBanner(this.banner.element,qye)}};R2=rz([az(1,qe)],R2);let P2=class extends q{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(Ud,{}),this.element=pe("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){const t=pe("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){$n(this.element)}show(e){$n(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=le(this.element,pe("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild(pe(`div${Ue.asCSSSelector(e.icon)}`));const n=le(this.element,pe("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=le(this.element,pe("div.message-actions-container")),e.actions)for(const r of e.actions)this._register(this.instantiationService.createInstance(A2,this.messageActionsContainer,{...r,tabIndex:-1},{}));const s=le(this.element,pe("div.action-container"));this.actionBar=this._register(new Cr(s)),this.actionBar.push(this._register(new Rs("banner.close","Close Banner",Ue.asClassName(tW),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};P2=rz([az(0,qe)],P2);var mP=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Cp=function(o,e){return function(t,i){e(t,i,o)}};const Gye=Zi("extensions-warning-message",ve.warning,p("warningIcon","Icon shown with a warning message in the extensions editor."));let dm=class extends q{constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=s=>{if(s&&s.hasMore){if(this._bannerClosed)return;const r=Math.max(s.ambiguousCharacterCount,s.nonBasicAsciiCharacterCount,s.invisibleCharacterCount);let a;if(s.nonBasicAsciiCharacterCount>=r)a={message:p("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new Pm};else if(s.ambiguousCharacterCount>=r)a={message:p("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new zu};else if(s.invisibleCharacterCount>=r)a={message:p("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new Rm};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:Gye,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(R2,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(124),this._register(i.onDidChangeTrust(s=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(s=>{s.hasChanged(124)&&(this._options=e.getOption(124),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=Zye(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(i=>i===!1))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(i=>i.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(i=>i==="_os"?new Intl.NumberFormat().resolvedOptions().locale:i==="_vscode"?wG:i)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new O2(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new Yye(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};dm.ID="editor.contrib.unicodeHighlighter";dm=mP([Cp(1,Qr),Cp(2,t6),Cp(3,qe)],dm);function Zye(o,e){return{nonBasicASCII:e.nonBasicASCII===Io?!o:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===Io?!o:e.includeComments,includeStrings:e.includeStrings===Io?!o:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}let O2=class extends q{constructor(e,t,i,n){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Yt(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const n of t.ranges)i.push({range:n,options:ty.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();if(!vA(t,e))return null;const i=t.getValueInRange(e.range);return{reason:lz(i,this._options),inComment:bA(t,e),inString:CA(t,e)}}};O2=mP([Cp(3,Qr)],O2);class Yye extends q{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Yt(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const n of e){const s=MM.computeUnicodeHighlights(this._model,this._options,n);for(const r of s.ranges)i.ranges.push(r);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||s.hasMore}if(!i.hasMore)for(const n of i.ranges)t.push({range:n,options:ty.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),i=t.getValueInRange(e.range);return vA(t,e)?{reason:lz(i,this._options),inComment:bA(t,e),inString:CA(t,e)}:null}}let F2=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=this._editor.getContribution(dm.ID);if(!n)return[];const s=[],r=new Set;let a=300;for(const l of t){const d=n.getDecorationInfo(l);if(!d)continue;const u=i.getValueInRange(l.range).codePointAt(0),h=Dk(u);let g;switch(d.reason.kind){case 0:{Jb(d.reason.confusableWith)?g=p("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,Dk(d.reason.confusableWith.codePointAt(0))):g=p("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,Dk(d.reason.confusableWith.codePointAt(0)));break}case 1:g=p("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:g=p("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}if(r.has(g))continue;r.add(g);const f={codePoint:u,reason:d.reason,inComment:d.inComment,inString:d.inString},m=p("unicodeHighlight.adjustSettings","Adjust settings"),v=`command:${B0.ID}?${encodeURIComponent(JSON.stringify(f))}`,_=new as("",!0).appendMarkdown(g).appendText(" ").appendLink(v,m);s.push(new ba(this,l.range,[_],!1,a++))}return s}renderHoverParts(e,t){return zV(e,t,this._editor,this._languageService,this._openerService)}};F2=mP([Cp(1,bi),Cp(2,So)],F2);function B2(o){return`U+${o.toString(16).padStart(4,"0")}`}function Dk(o){let e=`\`${B2(o)}\``;return Il.isInvisibleCharacter(o)||(e+=` "${`${Xye(o)}`}"`),e}function Xye(o){return o===96?"`` ` ``":"`"+String.fromCodePoint(o)+"`"}function lz(o,e){return MM.computeUnicodeHighlightReason(o,e)}class ty{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let n=this.map.get(i);return n||(n=st.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}}ty.instance=new ty;class Qye extends Te{constructor(){super({id:zu.ID,label:p("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}async run(e,t,i){const n=e==null?void 0:e.get(Dt);n&&this.runAction(n)}async runAction(e){await e.updateValue(Us.includeComments,!1,2)}}class Jye extends Te{constructor(){super({id:zu.ID,label:p("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}async run(e,t,i){const n=e==null?void 0:e.get(Dt);n&&this.runAction(n)}async runAction(e){await e.updateValue(Us.includeStrings,!1,2)}}class zu extends Te{constructor(){super({id:zu.ID,label:p("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}async run(e,t,i){const n=e==null?void 0:e.get(Dt);n&&this.runAction(n)}async runAction(e){await e.updateValue(Us.ambiguousCharacters,!1,2)}}zu.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class Rm extends Te{constructor(){super({id:Rm.ID,label:p("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}async run(e,t,i){const n=e==null?void 0:e.get(Dt);n&&this.runAction(n)}async runAction(e){await e.updateValue(Us.invisibleCharacters,!1,2)}}Rm.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class Pm extends Te{constructor(){super({id:Pm.ID,label:p("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=p("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}async run(e,t,i){const n=e==null?void 0:e.get(Dt);n&&this.runAction(n)}async runAction(e){await e.updateValue(Us.nonBasicASCII,!1,2)}}Pm.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class B0 extends Te{constructor(){super({id:B0.ID,label:p("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}async run(e,t,i){const{codePoint:n,reason:s,inString:r,inComment:a}=i,l=String.fromCodePoint(n),d=e.get(Ha),c=e.get(Dt);function u(f){return Il.isInvisibleCharacter(f)?p("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",B2(f)):p("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${B2(f)} "${l}"`)}const h=[];if(s.kind===0)for(const f of s.notAmbiguousInLocales)h.push({label:p("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',f),run:async()=>{tLe(c,[f])}});if(h.push({label:u(n),run:()=>eLe(c,[n])}),a){const f=new Qye;h.push({label:f.label,run:async()=>f.runAction(c)})}else if(r){const f=new Jye;h.push({label:f.label,run:async()=>f.runAction(c)})}if(s.kind===0){const f=new zu;h.push({label:f.label,run:async()=>f.runAction(c)})}else if(s.kind===1){const f=new Rm;h.push({label:f.label,run:async()=>f.runAction(c)})}else if(s.kind===2){const f=new Pm;h.push({label:f.label,run:async()=>f.runAction(c)})}else iLe(s);const g=await d.pick(h,{title:p("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});g&&await g.run()}}B0.ID="editor.action.unicodeHighlight.showExcludeOptions";async function eLe(o,e){const t=o.getValue(Us.allowedCharacters);let i;typeof t=="object"&&t?i=t:i={};for(const n of e)i[String.fromCodePoint(n)]=!0;await o.updateValue(Us.allowedCharacters,i,2)}async function tLe(o,e){var t;const i=(t=o.inspect(Us.allowedLocales).user)===null||t===void 0?void 0:t.value;let n;typeof i=="object"&&i?n=Object.assign({},i):n={};for(const s of e)n[s]=!0;await o.updateValue(Us.allowedLocales,n,2)}function iLe(o){throw new Error(`Unexpected value: ${o}`)}_e(zu);_e(Rm);_e(Pm);_e(B0);At(dm.ID,dm,1);jg.register(F2);var nLe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_9=function(o,e){return function(t,i){e(t,i,o)}};const dz="ignoreUnusualLineTerminators";function sLe(o,e,t){o.setModelProperty(e.uri,dz,t)}function oLe(o,e){return o.getModelProperty(e.uri,dz)}let $b=class extends q{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(125),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(125)&&(this._config=this._editor.getOption(125),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(n=>{n.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||oLe(this._codeEditorService,e)===!0||this._editor.getOption(90))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=await this._dialogService.confirm({title:p("unusualLineTerminators.title","Unusual Line Terminators"),message:p("unusualLineTerminators.message","Detected unusual line terminators"),detail:p("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",br(e.uri)),primaryButton:p({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:p("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!i.confirmed){sLe(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}};$b.ID="editor.contrib.unusualLineTerminatorsDetector";$b=nLe([_9(1,g0),_9(2,Ot)],$b);At($b.ID,$b,1);var cz=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Y1=function(o,e){return function(t,i){e(t,i,o)}},Xi,W2;const _D=new De("hasWordHighlights",!1);function uz(o,e,t,i){const n=o.ordered(e);return wM(n.map(s=>()=>Promise.resolve(s.provideDocumentHighlights(e,t,i)).then(void 0,en)),ls).then(s=>{if(s){const r=new Gi;return r.set(e.uri,s),r}return new Gi})}function rLe(o,e,t,i,n,s){const r=o.ordered(e);return wM(r.map(a=>()=>{const l=s.filter(d=>xA(a.selector,d.uri,d.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(a.provideMultiDocumentHighlights(e,t,l,n)).then(void 0,en)}),a=>a instanceof Gi&&a.size>0)}class _P{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=_n(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new k(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,s=t.startColumn,r=t.endColumn,a=this._getCurrentWordRange(e,t);let l=!!(this._wordRange&&this._wordRange.equalsRange(a));for(let d=0,c=i.length;!l&&d=r&&(l=!0)}return l}cancel(){this.result.cancel()}}class aLe extends _P{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return uz(this._providers,e,t.getPosition(),n).then(s=>s||new Gi)}}class lLe extends _P{constructor(e,t,i,n,s){super(e,t,i),this._providers=n,this._otherModels=s}_compute(e,t,i,n){return rLe(this._providers,e,t.getPosition(),i,n,this._otherModels).then(s=>s||new Gi)}}class hz extends _P{constructor(e,t,i,n,s){super(e,t,n),this._otherModels=s,this._selectionIsEmpty=t.isEmpty(),this._word=i}_compute(e,t,i,n){return au(250,n).then(()=>{const s=new Gi;let r;if(this._word?r=this._word:r=e.getWordAtPosition(t.getPosition()),!r)return new Gi;const a=[e,...this._otherModels];for(const l of a){if(l.isDisposed())continue;const c=l.findMatches(r.word,!0,!1,!0,i,!1).map(u=>({range:u.range,kind:wv.Text}));c&&s.set(l.uri,c)}return s})}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty!==n?!1:super.isValid(e,t,i)}}function dLe(o,e,t,i,n){return o.has(e)?new aLe(e,t,n,o):new hz(e,t,i,n,[])}function cLe(o,e,t,i,n,s){return o.has(e)?new lLe(e,t,n,o,s):new hz(e,t,i,n,s)}ql("_executeDocumentHighlights",async(o,e,t)=>{const i=o.get(Me),n=await uz(i.documentHighlightProvider,e,t,vt.None);return n==null?void 0:n.get(e.uri)});let Ub=Xi=class{constructor(e,t,i,n,s){this.toUnhook=new de,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new Gi,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this.multiDocumentProviders=i,this.codeEditorService=s,this._hasWordHighlights=_D.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(80),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(r=>{this._ignorePositionChangeEvent||this.occurrencesHighlight!=="off"&&this._onPositionChanged(r)})),this.toUnhook.add(e.onDidChangeModelContent(r=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(r=>{!r.newModelUrl&&r.oldModelUrl?this._stopSingular():Xi.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(r=>{const a=this.editor.getOption(80);this.occurrencesHighlight!==a&&(this.occurrencesHighlight=a,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,Xi.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight!=="off"&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(k.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const r=this.editor.getModel().getLineContent(n.startLineNumber);mo(`${r}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const r=this.editor.getModel().getLineContent(n.startLineNumber);mo(`${r}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=Xi.storedDecorations.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),Xi.storedDecorations.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(){const e=this.codeEditorService.listCodeEditors();for(const t of e){if(!t.hasModel())continue;const i=Xi.storedDecorations.get(t.getModel().uri);if(!i)continue;t.removeDecorations(i),Xi.storedDecorations.delete(t.getModel().uri);const n=jd.get(t);n!=null&&n.wordHighlighter&&n.wordHighlighter.decorations.length>0&&(n.wordHighlighter.decorations.clear(),n.wordHighlighter._hasWordHighlights.set(!1))}}_stopSingular(){var e,t,i,n;this._removeSingleDecorations(),this.editor.hasWidgetFocus()&&(((e=this.editor.getModel())===null||e===void 0?void 0:e.uri.scheme)!==ot.vscodeNotebookCell&&((i=(t=Xi.query)===null||t===void 0?void 0:t.modelInfo)===null||i===void 0?void 0:i.model.uri.scheme)!==ot.vscodeNotebookCell?(Xi.query=null,this._run()):!((n=Xi.query)===null||n===void 0)&&n.modelInfo&&(Xi.query.modelInfo=null)),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(){this._removeAllDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){var t;if(this.occurrencesHighlight==="off"){this._stopAll();return}if(e.reason!==3&&((t=this.editor.getModel())===null||t===void 0?void 0:t.uri.scheme)!==ot.vscodeNotebookCell){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:i})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===ot.vscodeNotebookCell){const s=[],r=this.codeEditorService.listCodeEditors();for(const a of r){const l=a.getModel();l&&l!==e&&l.uri.scheme===ot.vscodeNotebookCell&&s.push(l)}return s}const i=[],n=this.codeEditorService.listCodeEditors();for(const s of n){if(!yR(s))continue;const r=s.getModel();r&&e===r.modified&&i.push(r.modified)}if(i.length)return i;if(this.occurrencesHighlight==="singleFile")return[];for(const s of n){const r=s.getModel();r&&r!==e&&i.push(r)}return i}_run(){var e,t;let i;if(this.editor.hasWidgetFocus()){const n=this.editor.getSelection();if(!n||n.startLineNumber!==n.endLineNumber){this._stopAll();return}const s=n.startColumn,r=n.endColumn,a=this._getWord();if(!a||a.startColumn>s||a.endColumn{n===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations())},nt)}}computeWithModel(e,t,i,n){return n.length?cLe(this.multiDocumentProviders,e,t,i,this.editor.getOption(129),n):dLe(this.providers,e,t,i,this.editor.getOption(129))}_beginRenderDecorations(){const e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){var e,t,i;this.renderDecorationsTimer=-1;const n=this.codeEditorService.listCodeEditors();for(const s of n){const r=jd.get(s);if(!r)continue;const a=[],l=(e=s.getModel())===null||e===void 0?void 0:e.uri;if(l&&this.workerRequestValue.has(l)){const d=Xi.storedDecorations.get(l),c=this.workerRequestValue.get(l);if(c)for(const h of c)a.push({range:h.range,options:VSe(h.kind)});let u=[];s.changeDecorations(h=>{u=h.deltaDecorations(d??[],a)}),Xi.storedDecorations=Xi.storedDecorations.set(l,u),a.length>0&&((t=r.wordHighlighter)===null||t===void 0||t.decorations.set(a),(i=r.wordHighlighter)===null||i===void 0||i._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}};Ub.storedDecorations=new Gi;Ub.query=null;Ub=Xi=cz([Y1(4,Ot)],Ub);let jd=W2=class extends q{static get(e){return e.getContribution(W2.ID)}constructor(e,t,i,n){super(),this._wordHighlighter=null;const s=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new Ub(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,t,n))};this._register(e.onDidChangeModel(r=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),s()})),s()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){var e;(e=this._wordHighlighter)===null||e===void 0||e.moveNext()}moveBack(){var e;(e=this._wordHighlighter)===null||e===void 0||e.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};jd.ID="editor.contrib.wordHighlighter";jd=W2=cz([Y1(1,Xe),Y1(2,Me),Y1(3,Ot)],jd);class gz extends Te{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=jd.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class uLe extends gz{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:p("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:_D,kbOpts:{kbExpr:T.editorTextFocus,primary:65,weight:100}})}}class hLe extends gz{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:p("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:_D,kbOpts:{kbExpr:T.editorTextFocus,primary:1089,weight:100}})}}class gLe extends Te{constructor(){super({id:"editor.action.wordHighlight.trigger",label:p("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:_D.toNegated(),kbOpts:{kbExpr:T.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=jd.get(t);n&&n.restoreViewState(!0)}}At(jd.ID,jd,0);_e(uLe);_e(hLe);_e(gLe);class vD extends Rn{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=_r(t.getOption(129)),s=t.getModel(),a=t.getSelections().map(l=>{const d=new z(l.positionLineNumber,l.positionColumn),c=this._move(n,s,d,this._wordNavigationType);return this._moveTo(l,c,this._inSelectionMode)});if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>Tt.fromModelSelection(l))),a.length===1){const l=new z(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,i){return i?new Ae(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new Ae(t.lineNumber,t.column,t.lineNumber,t.column)}}class $u extends vD{_move(e,t,i,n){return Wt.moveWordLeft(e,t,i,n)}}class Uu extends vD{_move(e,t,i,n){return Wt.moveWordRight(e,t,i,n)}}class fLe extends $u{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class pLe extends $u{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class mLe extends $u{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:ae.and(T.textInputFocus,(e=ae.and(s0,aL))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class _Le extends $u{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class vLe extends $u{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class bLe extends $u{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:ae.and(T.textInputFocus,(e=ae.and(s0,aL))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class CLe extends $u{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move(_r(Oa.wordSeparators.defaultValue),t,i,n)}}class wLe extends $u{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move(_r(Oa.wordSeparators.defaultValue),t,i,n)}}class SLe extends Uu{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class yLe extends Uu{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:ae.and(T.textInputFocus,(e=ae.and(s0,aL))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class LLe extends Uu{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class DLe extends Uu{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class xLe extends Uu{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:ae.and(T.textInputFocus,(e=ae.and(s0,aL))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class kLe extends Uu{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class ILe extends Uu{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move(_r(Oa.wordSeparators.defaultValue),t,i,n)}}class ELe extends Uu{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move(_r(Oa.wordSeparators.defaultValue),t,i,n)}}class bD extends Rn{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e.get(si);if(!t.hasModel())return;const s=_r(t.getOption(129)),r=t.getModel(),a=t.getSelections(),l=t.getOption(6),d=t.getOption(11),c=n.getLanguageConfiguration(r.getLanguageId()).getAutoClosingPairs(),u=t._getViewModel(),h=a.map(g=>{const f=this._delete({wordSeparators:s,model:r,selection:g,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:l,autoClosingQuotes:d,autoClosingPairs:c,autoClosedCharacters:u.getCursorAutoClosedCharacters()},this._wordNavigationType);return new qn(f,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}}class vP extends bD{_delete(e,t){const i=Wt.deleteWordLeft(e,t);return i||new k(1,1,1,1)}}class bP extends bD{_delete(e,t){const i=Wt.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new k(n,s,n,s)}}class NLe extends vP{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:T.writable})}}class TLe extends vP{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:T.writable})}}class MLe extends vP{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class ALe extends bP{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:T.writable})}}class RLe extends bP{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:T.writable})}}class PLe extends bP{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class OLe extends Te{constructor(){super({id:"deleteInsideWord",precondition:T.writable,label:p("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=_r(t.getOption(129)),s=t.getModel(),a=t.getSelections().map(l=>{const d=Wt.deleteInsideWord(n,s,l);return new qn(d,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}}we(new fLe);we(new pLe);we(new mLe);we(new _Le);we(new vLe);we(new bLe);we(new SLe);we(new yLe);we(new LLe);we(new DLe);we(new xLe);we(new kLe);we(new CLe);we(new wLe);we(new ILe);we(new ELe);we(new NLe);we(new TLe);we(new MLe);we(new ALe);we(new RLe);we(new PLe);_e(OLe);class FLe extends bD{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const i=zy.deleteWordPartLeft(e);return i||new k(1,1,1,1)}}class BLe extends bD{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=zy.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new k(n,s,n,s)}}class fz extends vD{_move(e,t,i,n){return zy.moveWordPartLeft(e,t,i)}}class WLe extends fz{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}Et.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class VLe extends fz{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}Et.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class pz extends vD{_move(e,t,i,n){return zy.moveWordPartRight(e,t,i)}}class HLe extends pz{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class zLe extends pz{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}we(new FLe);we(new BLe);we(new WLe);we(new VLe);we(new HLe);we(new zLe);class V2 extends q{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const e=ho.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(91);t||(this.editor.isSimpleWidget?t=new as(p("editor.simple.readonly","Cannot edit in read-only input")):t=new as(p("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}}V2.ID="editor.contrib.readOnlyMessageController";At(V2.ID,V2,2);class H2 extends q{constructor(e){super(),this.editor=e,this.widget=null,Ea&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(90);!this.widget&&e?this.widget=new CD(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}H2.ID="editor.contrib.iPadShowKeyboard";class CD extends q{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(J(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(J(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return CD.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}CD.ID="editor.contrib.ShowKeyboardWidget";At(H2.ID,H2,3);var $Le=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},v9=function(o,e){return function(t,i){e(t,i,o)}},z2;let cm=z2=class extends q{static get(e){return e.getContribution(z2.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel(n=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(n=>this.stop())),this._register(Ei.onDidChange(n=>this.stop())),this._register(this._editor.onKeyUp(n=>n.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new wD(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};cm.ID="editor.contrib.inspectTokens";cm=z2=$Le([v9(1,Jo),v9(2,bi)],cm);class ULe extends Te{constructor(){super({id:"editor.action.inspectTokens",label:WE.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const i=cm.get(t);i==null||i.launch()}}function jLe(o){let e="";for(let t=0,i=o.length;tTp,tokenize:(n,s,r)=>WM(e,r),tokenizeEncoded:(n,s,r)=>Ay(i,r)}}class wD extends q{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=KLe(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(i=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return wD._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let l=t.tokens1.length-1;l>=0;l--){const d=t.tokens1[l];if(e.column-1>=d.offset){i=l;break}}let n=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){n=l;break}const s=this._model.getLineContent(e.lineNumber);let r="";if(i=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},b9=function(o,e){return function(t,i){e(t,i,o)}},R_;let iy=R_=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=xi.as(Wg.Quickaccess)}provide(e){const t=new de;return t.add(e.onDidAccept(()=>{const[i]=e.selectedItems;i&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(i=>{const n=this.registry.getQuickAccessProvider(i.substr(R_.PREFIX.length));n&&n.prefix&&n.prefix!==R_.PREFIX&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(i=>i.prefix!==R_.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,i)=>t.prefix.localeCompare(i.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{const i=t.prefix||e.prefix,n=i||"…";return{prefix:i,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:p("helpPickAriaLabel","{0}, {1}",n,t.description),description:t.description}})}};iy.PREFIX="?";iy=R_=qLe([b9(0,Ha),b9(1,Xt)],iy);xi.as(Wg.Quickaccess).registerQuickAccessProvider({ctor:iy,prefix:"",helpEntries:[{description:VE.helpQuickAccessActionLabel}]});class mz{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var i;const n=new de;e.canAcceptInBackground=!!(!((i=this.options)===null||i===void 0)&&i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new An);return s.value=this.doProvide(e,t),n.add(this.onDidActiveTextEditorControlChange(()=>{s.value=void 0,s.value=this.doProvide(e,t)})),n}doProvide(e,t){var i;const n=new de,s=this.activeTextEditorControl;if(s&&this.canProvideWithTextEditor(s)){const r={editor:s},a=kW(s);if(a){let l=(i=s.saveViewState())!==null&&i!==void 0?i:void 0;n.add(a.onDidChangeCursorPosition(()=>{var d;l=(d=s.saveViewState())!==null&&d!==void 0?d:void 0})),r.restoreViewState=()=>{l&&s===this.activeTextEditorControl&&s.restoreViewState(l)},n.add(su(t.onCancellationRequested)(()=>{var d;return(d=r.restoreViewState)===null||d===void 0?void 0:d.call(r)}))}n.add(je(()=>this.clearDecorations(s))),n.add(this.provideWithTextEditor(r,e,t))}else n.add(this.provideWithoutTextEditor(e,t));return n}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const i=e.getModel();i&&"getLineContent"in i&&hu(`${i.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return yR(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(i=>{const n=[];this.rangeHighlightDecorationId&&(n.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),n.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const s=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Ni(X7),position:Go.Full}}}],[r,a]=i.deltaDecorations(n,s);this.rangeHighlightDecorationId={rangeHighlightId:r,overviewRulerDecorationId:a}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(i=>{i.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}class SD extends mz{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=p("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,q.None}provideWithTextEditor(e,t,i){const n=e.editor,s=new de;s.add(t.onDidAccept(l=>{const[d]=t.selectedItems;if(d){if(!this.isValidLineNumber(n,d.lineNumber))return;this.gotoLocation(e,{range:this.toRange(d.lineNumber,d.column),keyMods:t.keyMods,preserveFocus:l.inBackground}),l.inBackground||t.hide()}}));const r=()=>{const l=this.parsePosition(n,t.value.trim().substr(SD.PREFIX.length)),d=this.getPickLabel(n,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:d}],t.ariaLabel=d,!this.isValidLineNumber(n,l.lineNumber)){this.clearDecorations(n);return}const c=this.toRange(l.lineNumber,l.column);n.revealRangeInCenter(c,0),this.addDecorations(n,c)};r(),s.add(t.onDidChangeValue(()=>r()));const a=kW(n);return a&&a.getOptions().get(67).renderType===2&&(a.updateOptions({lineNumbers:"on"}),s.add(je(()=>a.updateOptions({lineNumbers:"relative"})))),s}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map(s=>parseInt(s,10)).filter(s=>!isNaN(s)),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?p("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):p("gotoLineLabel","Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},s=this.lineCount(e);return s>1?p("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,s):p("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||typeof i!="number")return!1;const n=this.getModel(e);if(!n)return!1;const s={lineNumber:t,column:i};return n.validatePosition(s).equals(s)}lineCount(e){var t,i;return(i=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&i!==void 0?i:0}}SD.PREFIX=":";var GLe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ZLe=function(o,e){return function(t,i){e(t,i,o)}};let jb=class extends SD{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=ye.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};jb=GLe([ZLe(0,Ot)],jb);let CP=class _z extends Te{constructor(){super({id:_z.ID,label:Gw.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(Ha).quickAccess.show(jb.PREFIX)}};CP.ID="editor.action.gotoLine";_e(CP);xi.as(Wg.Quickaccess).registerQuickAccessProvider({ctor:jb,prefix:jb.PREFIX,helpEntries:[{description:Gw.gotoLineActionLabel,commandId:CP.ID}]});const vz=[void 0,[]];function xk(o,e,t=0,i=0){const n=e;return n.values&&n.values.length>1?YLe(o,n.values,t,i):bz(o,e,t,i)}function YLe(o,e,t,i){let n=0;const s=[];for(const r of e){const[a,l]=bz(o,r,t,i);if(typeof a!="number")return vz;n+=a,s.push(...l)}return[n,XLe(s)]}function bz(o,e,t,i){const n=lg(e.original,e.originalLowercase,t,o,o.toLowerCase(),i,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return n?[n[0],p0(n)]:vz}function XLe(o){const e=o.sort((n,s)=>n.start-s.start),t=[];let i;for(const n of e)!i||!QLe(i,n)?(i=n,t.push(n)):(i.start=Math.min(i.start,n.start),i.end=Math.max(i.end,n.end));return t}function QLe(o,e){return!(o.end=0,r=C9(o);let a;const l=o.split(Cz);if(l.length>1)for(const d of l){const c=C9(d),{pathNormalized:u,normalized:h,normalizedLowercase:g}=w9(d);h&&(a||(a=[]),a.push({original:d,originalLowercase:d.toLowerCase(),pathNormalized:u,normalized:h,normalizedLowercase:g,expectContiguousMatch:c}))}return{original:o,originalLowercase:e,pathNormalized:t,normalized:i,normalizedLowercase:n,values:a,containsPathSeparator:s,expectContiguousMatch:r}}function w9(o){let e;is?e=o.replace(/\//g,La):e=o.replace(/\\/g,La);const t=rY(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function S9(o){return Array.isArray(o)?$2(o.map(e=>e.original).join(Cz)):$2(o.original)}var JLe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},y9=function(o,e){return function(t,i){e(t,i,o)}},wp;let Tl=wp=class extends mz{constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,p("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),q.None}provideWithTextEditor(e,t,i){const n=e.editor,s=this.getModel(n);return s?this._languageFeaturesService.documentSymbolProvider.has(s)?this.doProvideWithEditorSymbols(e,s,t,i):this.doProvideWithoutEditorSymbols(e,s,t,i):q.None}doProvideWithoutEditorSymbols(e,t,i,n){const s=new de;return this.provideLabelPick(i,p("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(async()=>!await this.waitForLanguageSymbolRegistry(t,s)||n.isCancellationRequested||s.add(this.doProvideWithEditorSymbols(e,t,i,n)))(),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new wy,n=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(n.dispose(),i.complete(!0))}));return t.add(je(()=>i.complete(!1))),i.p}doProvideWithEditorSymbols(e,t,i,n){var s;const r=e.editor,a=new de;a.add(i.onDidAccept(u=>{const[h]=i.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:i.keyMods,preserveFocus:u.inBackground}),u.inBackground||i.hide())})),a.add(i.onDidTriggerItemButton(({item:u})=>{u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));const l=this.getDocumentSymbols(t,n);let d;const c=async u=>{d==null||d.dispose(!0),i.busy=!1,d=new tn(n),i.busy=!0;try{const h=$2(i.value.substr(wp.PREFIX.length).trim()),g=await this.doGetSymbolPicks(l,h,void 0,d.token);if(n.isCancellationRequested)return;if(g.length>0){if(i.items=g,u&&h.original.length===0){const f=Nv(g,m=>!!(m.type!=="separator"&&m.range&&k.containsPosition(m.range.decoration,u)));f&&(i.activeItems=[f])}}else h.original.length>0?this.provideLabelPick(i,p("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,p("noSymbolResults","No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}};return a.add(i.onDidChangeValue(()=>c(void 0))),c((s=r.getSelection())===null||s===void 0?void 0:s.getPosition()),a.add(i.onDidChangeActive(()=>{const[u]=i.activeItems;u&&u.range&&(r.revealRangeInCenter(u.range.selection,0),this.addDecorations(r,u.range.decoration))})),a}async doGetSymbolPicks(e,t,i,n){var s,r;const a=await e;if(n.isCancellationRequested)return[];const l=t.original.indexOf(wp.SCOPE_PREFIX)===0,d=l?1:0;let c,u;t.values&&t.values.length>1?(c=S9(t.values[0]),u=S9(t.values.slice(1))):c=t;let h;const g=(r=(s=this.options)===null||s===void 0?void 0:s.openSideBySideDirection)===null||r===void 0?void 0:r.call(s);g&&(h=[{iconClass:g==="right"?Ue.asClassName(ve.splitHorizontal):Ue.asClassName(ve.splitVertical),tooltip:g==="right"?p("openToSide","Open to the Side"):p("openToBottom","Open to the Bottom")}]);const f=[];for(let _=0;_d){let O=!1;if(c!==t&&([y,I]=xk(w,{...t,values:void 0},d,S),typeof y=="number"&&(O=!0)),typeof y!="number"&&([y,I]=xk(w,c,d,S),typeof y!="number"))continue;if(!O&&u){if(x&&u.original.length>0&&([E,R]=xk(x,u)),typeof E!="number")continue;typeof y=="number"&&(y+=E)}}const j=b.tags&&b.tags.indexOf(1)>=0;f.push({index:_,kind:b.kind,score:y,label:w,ariaLabel:JZ(b.name,b.kind),description:x,highlights:j?void 0:{label:I,description:R},range:{selection:k.collapseToStart(b.selectionRange),decoration:b.range},strikethrough:j,buttons:h})}const m=f.sort((_,b)=>l?this.compareByKindAndScore(_,b):this.compareByScore(_,b));let v=[];if(l){let w=function(){b&&typeof _=="number"&&C>0&&(b.label=Xh(Ik[_]||kk,C))},_,b,C=0;for(const S of m)_!==S.kind?(w(),_=S.kind,C=1,b={type:"separator"},v.push(b)):C++,v.push(S);w()}else m.length>0&&(v=[{label:p("symbols","symbols ({0})",f.length),type:"separator"},...m]);return v}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const i=Ik[e.kind]||kk,n=Ik[t.kind]||kk,s=i.localeCompare(n);return s===0?this.compareByScore(e,t):s}async getDocumentSymbols(e,t){const i=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}};Tl.PREFIX="@";Tl.SCOPE_PREFIX=":";Tl.PREFIX_BY_CATEGORY=`${wp.PREFIX}${wp.SCOPE_PREFIX}`;Tl=wp=JLe([y9(0,Me),y9(1,ZL)],Tl);const kk=p("property","properties ({0})"),Ik={5:p("method","methods ({0})"),11:p("function","functions ({0})"),8:p("_constructor","constructors ({0})"),12:p("variable","variables ({0})"),4:p("class","classes ({0})"),22:p("struct","structs ({0})"),23:p("event","events ({0})"),24:p("operator","operators ({0})"),10:p("interface","interfaces ({0})"),2:p("namespace","namespaces ({0})"),3:p("package","packages ({0})"),25:p("typeParameter","type parameters ({0})"),1:p("modules","modules ({0})"),6:p("property","properties ({0})"),9:p("enum","enumerations ({0})"),21:p("enumMember","enumeration members ({0})"),14:p("string","strings ({0})"),0:p("file","files ({0})"),17:p("array","arrays ({0})"),15:p("number","numbers ({0})"),16:p("boolean","booleans ({0})"),18:p("object","objects ({0})"),19:p("key","keys ({0})"),7:p("field","fields ({0})"),13:p("constant","constants ({0})")};var eDe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ek=function(o,e){return function(t,i){e(t,i,o)}};let U2=class extends Tl{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=ye.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};U2=eDe([Ek(0,Ot),Ek(1,Me),Ek(2,ZL)],U2);class W0 extends Te{constructor(){super({id:W0.ID,label:tb.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:T.hasDocumentSymbolProvider,kbOpts:{kbExpr:T.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(Ha).quickAccess.show(Tl.PREFIX,{itemActivation:da.NONE})}}W0.ID="editor.action.quickOutline";_e(W0);xi.as(Wg.Quickaccess).registerQuickAccessProvider({ctor:U2,prefix:Tl.PREFIX,helpEntries:[{description:tb.quickOutlineActionLabel,prefix:Tl.PREFIX,commandId:W0.ID},{description:tb.quickOutlineByCategoryActionLabel,prefix:Tl.PREFIX_BY_CATEGORY}]});function Nk(o,e){return e&&(o.stack||o.stacktrace)?p("stackTrace.format","{0}: {1}",D9(o),L9(o.stack)||L9(o.stacktrace)):D9(o)}function L9(o){return Array.isArray(o)?o.join(` +`):o}function D9(o){return o.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${o.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof o.code=="string"&&typeof o.errno=="number"&&typeof o.syscall=="string"?p("nodeExceptionMessage","A system error occurred ({0})",o.message):o.message||p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function wz(o=null,e=!1){if(!o)return p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(o)){const t=Ia(o),i=wz(t[0],e);return t.length>1?p("error.moreErrors","{0} ({1} errors in total)",i,t.length):i}if(As(o))return o;if(o.detail){const t=o.detail;if(t.error)return Nk(t.error,e);if(t.exception)return Nk(t.exception,e)}return o.stack?Nk(o,e):o.message?o.message:p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function tDe(o){var e;const t=new Map;for(const i of o)t.set(i,((e=t.get(i))!==null&&e!==void 0?e:0)+1);return t}class gv{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const i=this.computeEmbedding(e),n=new Map,s=[];for(const[r,a]of this.documents){if(t.isCancellationRequested)return[];for(const l of a.chunks){const d=this.computeSimilarityScore(l,i,n);d>0&&s.push({key:r,score:d})}}return s}static termFrequencies(e){return tDe(gv.splitTerms(e))}static*splitTerms(e){const t=i=>i.toLowerCase();for(const[i]of e.matchAll(new RegExp("\\b\\p{Letter}[\\p{Letter}\\d]{2,}\\b","gu"))){yield t(i);const n=i.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(n.length>1)for(const s of n)s.length>2&&new RegExp("\\p{Letter}{3,}","gu").test(s)&&(yield t(s))}}updateDocuments(e){var t;for(const{key:i}of e)this.deleteDocument(i);for(const i of e){const n=[];for(const s of i.textChunks){const r=gv.termFrequencies(s);for(const a of r.keys())this.chunkOccurrences.set(a,((t=this.chunkOccurrences.get(a))!==null&&t!==void 0?t:0)+1);n.push({text:s,tf:r})}this.chunkCount+=n.length,this.documents.set(i.key,{chunks:n})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const i of t.chunks)for(const n of i.tf.keys()){const s=this.chunkOccurrences.get(n);if(typeof s=="number"){const r=s-1;r<=0?this.chunkOccurrences.delete(n):this.chunkOccurrences.set(n,r)}}}}computeSimilarityScore(e,t,i){let n=0;for(const[s,r]of Object.entries(t)){const a=e.tf.get(s);if(!a)continue;let l=i.get(s);typeof l!="number"&&(l=this.computeIdf(s),i.set(s,l));const d=a*l;n+=d*r}return n}computeEmbedding(e){const t=gv.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){var t;const i=(t=this.chunkOccurrences.get(e))!==null&&t!==void 0?t:0;return i>0?Math.log((this.chunkCount+1)/i):0}computeTfidf(e){const t=Object.create(null);for(const[i,n]of e){const s=this.computeIdf(i);s>0&&(t[i]=n*s)}return t}}function iDe(o){var e,t;const i=o.slice(0);i.sort((s,r)=>r.score-s.score);const n=(t=(e=i[0])===null||e===void 0?void 0:e.score)!==null&&t!==void 0?t:0;if(n>0)for(const s of i)s.score/=n;return i}var Kf;(function(o){o[o.NO_ACTION=0]="NO_ACTION",o[o.CLOSE_PICKER=1]="CLOSE_PICKER",o[o.REFRESH_PICKER=2]="REFRESH_PICKER",o[o.REMOVE_ITEM=3]="REMOVE_ITEM"})(Kf||(Kf={}));function Tk(o){const e=o;return Array.isArray(e.items)}function x9(o){const e=o;return!!e.picks&&e.additionalPicks instanceof Promise}class nDe extends q{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){var n;const s=new de;e.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let r;const a=s.add(new An),l=async()=>{const d=a.value=new de;r==null||r.dispose(!0),e.busy=!1,r=new tn(t);const c=r.token,u=e.value.substr(this.prefix.length).trim(),h=this._getPicks(u,d,c,i),g=(m,v)=>{var _;let b,C;if(Tk(m)?(b=m.items,C=m.active):b=m,b.length===0){if(v)return!1;(u.length>0||e.hideInput)&&(!((_=this.options)===null||_===void 0)&&_.noResultsPick)&&(_v(this.options.noResultsPick)?b=[this.options.noResultsPick(u)]:b=[this.options.noResultsPick])}return e.items=b,C&&(e.activeItems=[C]),!0},f=async m=>{let v=!1,_=!1;await Promise.all([(async()=>{typeof m.mergeDelay=="number"&&(await au(m.mergeDelay),c.isCancellationRequested)||_||(v=g(m.picks,!0))})(),(async()=>{e.busy=!0;try{const b=await m.additionalPicks;if(c.isCancellationRequested)return;let C,w;Tk(m.picks)?(C=m.picks.items,w=m.picks.active):C=m.picks;let S,x;if(Tk(b)?(S=b.items,x=b.active):S=b,S.length>0||!v){let y;if(!w&&!x){const I=e.activeItems[0];I&&C.indexOf(I)!==-1&&(y=I)}g({items:[...C,...S],active:w||x||y})}}finally{c.isCancellationRequested||(e.busy=!1),_=!0}})()])};if(h!==null)if(x9(h))await f(h);else if(!(h instanceof Promise))g(h);else{e.busy=!0;try{const m=await h;if(c.isCancellationRequested)return;x9(m)?await f(m):g(m)}finally{c.isCancellationRequested||(e.busy=!1)}}};return s.add(e.onDidChangeValue(()=>l())),l(),s.add(e.onDidAccept(d=>{const[c]=e.selectedItems;typeof(c==null?void 0:c.accept)=="function"&&(d.inBackground||e.hide(),c.accept(e.keyMods,d))})),s.add(e.onDidTriggerItemButton(async({button:d,item:c})=>{var u,h;if(typeof c.trigger=="function"){const g=(h=(u=c.buttons)===null||u===void 0?void 0:u.indexOf(d))!==null&&h!==void 0?h:-1;if(g>=0){const f=c.trigger(g,e.keyMods),m=typeof f=="number"?f:await f;if(t.isCancellationRequested)return;switch(m){case Kf.NO_ACTION:break;case Kf.CLOSE_PICKER:e.hide();break;case Kf.REFRESH_PICKER:l();break;case Kf.REMOVE_ITEM:{const v=e.items.indexOf(c);if(v!==-1){const _=e.items.slice(),b=_.splice(v,1),C=e.activeItems.filter(S=>S!==b[0]),w=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=_,C&&(e.activeItems=C),e.keepScrollPosition=w}break}}}}})),s}}var Sz=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Dh=function(o,e){return function(t,i){e(t,i,o)}},ph,dn;let Eg=ph=class extends nDe{constructor(e,t,i,n,s,r){super(ph.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=s,this.dialogService=r,this.commandsHistory=this._register(this.instantiationService.createInstance(Nu)),this.options=e}async _getPicks(e,t,i,n){var s,r,a,l;const d=await this.getCommandPicks(i);if(i.isCancellationRequested)return[];const c=su(()=>{const _=new gv;_.updateDocuments(d.map(C=>({key:C.commandId,textChunks:[this.getTfIdfChunk(C)]})));const b=_.calculateScores(e,i);return iDe(b).filter(C=>C.score>ph.TFIDF_THRESHOLD).slice(0,ph.TFIDF_MAX_RESULTS)}),u=[];for(const _ of d){const b=(s=ph.WORD_FILTER(e,_.label))!==null&&s!==void 0?s:void 0,C=_.commandAlias&&(r=ph.WORD_FILTER(e,_.commandAlias))!==null&&r!==void 0?r:void 0;if(b||C)_.highlights={label:b,detail:this.options.showAlias?C:void 0},u.push(_);else if(e===_.commandId)u.push(_);else if(e.length>=3){const w=c();if(i.isCancellationRequested)return[];const S=w.find(x=>x.key===_.commandId);S&&(_.tfIdfScore=S.score,u.push(_))}}const h=new Map;for(const _ of u){const b=h.get(_.label);b?(_.description=_.commandId,b.description=b.commandId):h.set(_.label,_)}u.sort((_,b)=>{if(_.tfIdfScore&&b.tfIdfScore)return _.tfIdfScore===b.tfIdfScore?_.label.localeCompare(b.label):b.tfIdfScore-_.tfIdfScore;if(_.tfIdfScore)return 1;if(b.tfIdfScore)return-1;const C=this.commandsHistory.peek(_.commandId),w=this.commandsHistory.peek(b.commandId);if(C&&w)return C>w?-1:1;if(C)return-1;if(w)return 1;if(this.options.suggestedCommandIds){const S=this.options.suggestedCommandIds.has(_.commandId),x=this.options.suggestedCommandIds.has(b.commandId);if(S&&x)return 0;if(S)return-1;if(x)return 1}return _.label.localeCompare(b.label)});const g=[];let f=!1,m=!0,v=!!this.options.suggestedCommandIds;for(let _=0;_{var _;const b=await this.getAdditionalCommandPicks(d,u,e,i);if(i.isCancellationRequested)return[];const C=b.map(w=>this.toCommandPick(w,n));return m&&((_=C[0])===null||_===void 0?void 0:_.type)!=="separator"&&C.unshift({type:"separator",label:p("suggested","similar commands")}),C})()}:g}toCommandPick(e,t){if(e.type==="separator")return e;const i=this.keybindingService.lookupKeybinding(e.commandId),n=i?p("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,i.getAriaLabel()):e.label;return{...e,ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:async()=>{var s,r;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:(s=t==null?void 0:t.from)!==null&&s!==void 0?s:"quick open"});try{!((r=e.args)===null||r===void 0)&&r.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(a){Fa(a)||this.dialogService.error(p("canNotRun","Command '{0}' resulted in an error",e.label),wz(a))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:i}){let n=e;return t&&t!==e&&(n+=` - ${t}`),i&&i.value!==e&&(n+=` - ${i.value===i.original?i.value:`${i.value} (${i.original})`}`),n}};Eg.PREFIX=">";Eg.TFIDF_THRESHOLD=.5;Eg.TFIDF_MAX_RESULTS=5;Eg.WORD_FILTER=NA(ob,ude,s6);Eg=ph=Sz([Dh(1,qe),Dh(2,Xt),Dh(3,Ri),Dh(4,vo),Dh(5,g0)],Eg);let Nu=dn=class extends q{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===rb.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=dn.getConfiguredCommandHistoryLength(this.configurationService),dn.cache&&dn.cache.limit!==this.configuredCommandsHistoryLength&&(dn.cache.limit=this.configuredCommandsHistoryLength,dn.hasChanges=!0))}load(){const e=this.storageService.get(dn.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch{}const i=dn.cache=new Pu(this.configuredCommandsHistoryLength,1);if(t){let n;t.usesLRU?n=t.entries:n=t.entries.sort((s,r)=>s.value-r.value),n.forEach(s=>i.set(s.key,s.value))}dn.counter=this.storageService.getNumber(dn.PREF_KEY_COUNTER,0,dn.counter)}push(e){dn.cache&&(dn.cache.set(e,dn.counter++),dn.hasChanges=!0)}peek(e){var t;return(t=dn.cache)===null||t===void 0?void 0:t.peek(e)}saveState(){if(!dn.cache||!dn.hasChanges)return;const e={usesLRU:!0,entries:[]};dn.cache.forEach((t,i)=>e.entries.push({key:i,value:t})),this.storageService.store(dn.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(dn.PREF_KEY_COUNTER,dn.counter,0,0),dn.hasChanges=!1}static getConfiguredCommandHistoryLength(e){var t,i;const s=(i=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||i===void 0?void 0:i.history;return typeof s=="number"?s:dn.DEFAULT_COMMANDS_HISTORY_LENGTH}};Nu.DEFAULT_COMMANDS_HISTORY_LENGTH=50;Nu.PREF_KEY_CACHE="commandPalette.mru.cache";Nu.PREF_KEY_COUNTER="commandPalette.mru.counter";Nu.counter=1;Nu.hasChanges=!1;Nu=dn=Sz([Dh(0,Xr),Dh(1,Dt)],Nu);class sDe extends Eg{constructor(e,t,i,n,s,r){super(e,t,i,n,s,r)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:OA(i.label)||i.id});return t}}var oDe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},gf=function(o,e){return function(t,i){e(t,i,o)}};let Kb=class extends sDe{get activeTextEditorControl(){var e;return(e=this.codeEditorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}constructor(e,t,i,n,s,r){super({showAlias:!1},e,i,n,s,r),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};Kb=oDe([gf(0,qe),gf(1,Ot),gf(2,Xt),gf(3,Ri),gf(4,vo),gf(5,g0)],Kb);class V0 extends Te{constructor(){super({id:V0.ID,label:Zw.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(Ha).quickAccess.show(Kb.PREFIX)}}V0.ID="editor.action.quickCommand";_e(V0);xi.as(Wg.Quickaccess).registerQuickAccessProvider({ctor:Kb,prefix:Kb.PREFIX,helpEntries:[{description:Zw.quickCommandHelp,commandId:V0.ID}]});var rDe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ff=function(o,e){return function(t,i){e(t,i,o)}};let j2=class extends Lu{constructor(e,t,i,n,s,r,a){super(!0,e,t,i,n,s,r,a)}};j2=rDe([ff(1,Xe),ff(2,Ot),ff(3,sn),ff(4,qe),ff(5,Xr),ff(6,Dt)],j2);At(Lu.ID,j2,4);class aDe extends Te{constructor(){super({id:"editor.action.toggleHighContrast",label:HE.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(Jo),n=i.getColorTheme();xa(n.type)?(i.setTheme(this._originalThemeName||(Pp(n.type)?_p:yd)),this._originalThemeName=null):(i.setTheme(Pp(n.type)?Uh:jh),this._originalThemeName=n.themeName)}}_e(aDe);const lDe={class:"monaco-editor-container"},dDe=Ss({__name:"MonacoEditor",props:{modelValue:{},placeholder:{default:""},readonly:{type:Boolean,default:!1},language:{default:"json"}},emits:["update:modelValue","change"],setup(o,{emit:e}){const t=o,i=e,n=Ye();let s=null;const r=()=>{n.value&&(s=sT.create(n.value,{value:t.modelValue,language:t.language,theme:"vs-dark",automaticLayout:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,fontFamily:"'Monaco', 'Menlo', 'Ubuntu Mono', monospace",lineNumbers:"on",roundedSelection:!1,scrollbar:{vertical:"visible",horizontal:"visible",verticalScrollbarSize:8,horizontalScrollbarSize:8},folding:!0,wordWrap:"on",renderWhitespace:"selection",tabSize:2,insertSpaces:!0,detectIndentation:!1,trimAutoWhitespace:!0,largeFileOptimizations:!1,readOnly:t.readonly}),s.onDidChangeModelContent(()=>{const l=(s==null?void 0:s.getValue())||"";i("update:modelValue",l),i("change",l)}),sT.defineTheme("custom-dark",{base:"vs-dark",inherit:!0,rules:[{token:"string",foreground:"#34d399"},{token:"number",foreground:"#60a5fa"},{token:"keyword",foreground:"#a78bfa"},{token:"comment",foreground:"#6b7280"},{token:"operator",foreground:"#fbbf24"},{token:"delimiter",foreground:"#fbbf24"}],colors:{"editor.background":"rgba(255, 255, 255, 0.05)","editor.foreground":"#f9fafb","editor.lineHighlightBackground":"rgba(255, 255, 255, 0.08)","editor.selectionBackground":"#3b82f6","editor.inactiveSelectionBackground":"#4b5563","editorCursor.foreground":"#f9fafb","editorWhitespace.foreground":"#6b7280","editorIndentGuide.background":"rgba(255, 255, 255, 0.1)","editorIndentGuide.activeBackground":"#6b7280","editorLineNumber.foreground":"#9ca3af","editorLineNumber.activeForeground":"#f9fafb","editorGutter.background":"rgba(255, 255, 255, 0.05)"}}),s.updateOptions({theme:"custom-dark"}))},a=l=>{s&&s.getValue()!==l&&s.setValue(l)};return cr(()=>t.modelValue,l=>{s&&a(l)}),cr(()=>t.readonly,l=>{s&&s.updateOptions({readOnly:l})}),Kd(()=>{I9(()=>{r()})}),E9(()=>{s&&s.dispose()}),(l,d)=>(ne(),ue("div",lDe,[L("div",{ref_key:"editorContainer",ref:n,class:"editor-wrapper"},null,512)]))}}),yz=us(dDe,[["__scopeId","data-v-df421d9b"]]),cDe={class:"mcp-config-form"},uDe={class:"form-item"},hDe=["value","placeholder"],gDe={class:"form-item"},fDe={key:0,class:"form-item"},pDe=["value","placeholder"],mDe={key:1,class:"form-item"},_De=["value","placeholder"],vDe={key:2,class:"form-item"},bDe=["value","placeholder"],CDe={key:3,class:"form-item"},wDe=["value","placeholder"],SDe={class:"usage-instructions"},yDe={class:"instructions-header"},LDe={class:"instructions-content"},DDe={class:"instructions-list"},xDe=Ss({__name:"McpConfigForm",props:{formData:{},isEditMode:{type:Boolean}},emits:["connection-type-change","update:formData"],setup(o,{emit:e}){const{t}=Pa(),i=o,n=e,s=[{id:"STUDIO",name:"STUDIO"},{id:"SSE",name:"SSE"},{id:"STREAMING",name:"STREAMING"}],r=(l,d)=>{const c=d.target;i.isEditMode?i.formData[l]=c.value:n("update:formData",{...i.formData,[l]:c.value})},a=l=>{l&&(i.isEditMode?i.formData.connectionType=l:n("update:formData",{...i.formData,connectionType:l}),n("connection-type-change"))};return(l,d)=>(ne(),ue("div",cDe,[L("div",uDe,[L("label",null,[Pe(B(l.$t("config.mcpConfig.mcpName"))+" ",1),d[5]||(d[5]=L("span",{class:"required"},"*",-1))]),L("input",{value:l.formData.mcpServerName||"",onInput:d[0]||(d[0]=c=>r("mcpServerName",c)),type:"text",class:"config-input",placeholder:P(t)("config.mcpConfig.mcpServerNamePlaceholder")},null,40,hDe)]),L("div",gDe,[L("label",null,[Pe(B(P(t)("config.mcpConfig.connectionType"))+" ",1),d[6]||(d[6]=L("span",{class:"required"},"*",-1))]),xe(Q1,{"model-value":l.formData.connectionType,"onUpdate:modelValue":a,options:s,placeholder:P(t)("config.mcpConfig.connectionTypePlaceholder"),"dropdown-title":P(t)("config.mcpConfig.connectionTypePlaceholder")},null,8,["model-value","placeholder","dropdown-title"])]),l.formData.connectionType==="STUDIO"?(ne(),ue("div",fDe,[L("label",null,[Pe(B(P(t)("config.mcpConfig.command"))+" ",1),d[7]||(d[7]=L("span",{class:"required"},"*",-1))]),L("input",{value:l.formData.command||"",onInput:d[1]||(d[1]=c=>r("command",c)),type:"text",class:"config-input",placeholder:P(t)("config.mcpConfig.commandPlaceholder")},null,40,pDe)])):at("",!0),l.formData.connectionType==="SSE"||l.formData.connectionType==="STREAMING"?(ne(),ue("div",mDe,[L("label",null,[Pe(B(P(t)("config.mcpConfig.url"))+" ",1),d[8]||(d[8]=L("span",{class:"required"},"*",-1))]),L("input",{value:l.formData.url||"",onInput:d[2]||(d[2]=c=>r("url",c)),type:"text",class:"config-input",placeholder:P(t)("config.mcpConfig.urlPlaceholder")},null,40,_De)])):at("",!0),l.formData.connectionType==="STUDIO"?(ne(),ue("div",vDe,[L("label",null,[Pe(B(P(t)("config.mcpConfig.args"))+" ",1),d[9]||(d[9]=L("span",{class:"required"},"*",-1))]),L("textarea",{value:l.formData.args||"",onInput:d[3]||(d[3]=c=>r("args",c)),class:"config-textarea",placeholder:P(t)("config.mcpConfig.argsPlaceholder"),rows:"3"},null,40,bDe)])):at("",!0),l.formData.connectionType==="STUDIO"?(ne(),ue("div",CDe,[L("label",null,B(P(t)("config.mcpConfig.env")),1),L("textarea",{value:l.formData.env||"",onInput:d[4]||(d[4]=c=>r("env",c)),class:"config-textarea",placeholder:P(t)("config.mcpConfig.envPlaceholder"),rows:"3"},null,40,wDe)])):at("",!0),L("div",SDe,[L("div",yDe,[xe(P(Re),{icon:"carbon:information",class:"instructions-icon"}),L("h4",null,B(l.$t("config.mcpConfig.usageInstructions")),1)]),L("div",LDe,[L("ol",DDe,[L("li",null,[L("strong",null,B(l.$t("config.mcpConfig.getMcpServiceList")),1),L("ul",null,[L("li",null,B(l.$t("config.mcpConfig.findMcpServices")),1),L("li",null,B(l.$t("config.mcpConfig.batchImportTip")),1)])]),L("li",null,[L("strong",null,B(l.$t("config.mcpConfig.configureMcpService")),1),L("ul",null,[L("li",null,B(l.$t("config.mcpConfig.fillServiceName")),1),L("li",null,B(l.$t("config.mcpConfig.selectConnectionType")),1),L("li",null,B(l.$t("config.mcpConfig.clickSaveToComplete")),1)])]),L("li",null,[L("strong",null,B(l.$t("config.mcpConfig.configureAgentUsage")),1),L("ul",null,[L("li",null,B(l.$t("config.mcpConfig.createAgentTip")),1)])])])])])]))}}),k9=us(xDe,[["__scopeId","data-v-7a2b7153"]]),kDe={class:"tab-panel"},IDe={class:"tab-header"},EDe=["onClick"],NDe={class:"tab-content"},TDe=Ss({__name:"TabPanel",props:{tabs:{},modelValue:{default:0}},emits:["update:modelValue"],setup(o,{emit:e}){const t=o,i=e,n=Ye(t.modelValue);return cr(n,s=>{i("update:modelValue",s)}),cr(()=>t.modelValue,s=>{n.value=s}),(s,r)=>(ne(),ue("div",kDe,[L("div",IDe,[(ne(!0),ue(Ji,null,ln(s.tabs,(a,l)=>(ne(),ue("button",{key:l,class:Nn(["tab-button",{active:n.value===l}]),onClick:d=>n.value=l},B(a.label),11,EDe))),128))]),L("div",NDe,[(ne(!0),ue(Ji,null,ln(s.tabs,(a,l)=>Vt((ne(),ue("div",{key:l,class:"tab-pane"},[Gf(s.$slots,a.name,{tab:a},()=>[Pe(B(a.content),1)])])),[[ny,n.value===l]])),128))])]))}}),MDe=us(TDe,[["__scopeId","data-v-dd5c9237"]]),ADe={class:"json-import-panel"},RDe={class:"form-item"},PDe={class:"json-config-container"},ODe={class:"usage-instructions"},FDe={class:"instructions-header"},BDe={class:"instructions-content"},WDe={class:"instructions-list"},VDe={key:0,class:"validation-errors"},HDe=Ss({__name:"JsonImportPanel",props:{modelValue:{default:""},onValidationChange:{type:Function,default:()=>{}}},emits:["update:modelValue","validationChange"],setup(o,{expose:e,emit:t}){const i=o,n=t,{t:s}=Pa(),r=Ye(i.modelValue),a=Ye(!0),l=Ye([]),d=Ye(0),c=Xn(()=>[{name:"json-config",label:"JSON Configuration"},{name:"config-example",label:"Configuration Example"}]);cr(()=>i.modelValue,m=>{r.value=m}),cr(r,m=>{n("update:modelValue",m)});const u=()=>{const m=r.value;if(!m){a.value=!0,l.value=[],h();return}try{const v=JSON.parse(m),_=g(v);if(_.isValid){const b=f(v),C=JSON.stringify(b,null,2);C!==m&&(r.value=C),a.value=!0,l.value=[]}else a.value=!1,l.value=_.errors||[];h()}catch(v){a.value=!1;let _=s("config.mcpConfig.invalidJson");if(v instanceof SyntaxError){const b=v.message;b.includes("Unexpected token")?_="❌ JSON syntax error - Please check if brackets, commas, quotes and other symbols are correct":b.includes("Unexpected end")?_="❌ JSON incomplete - Please check if closing brackets or quotes are missing":b.includes("Unexpected number")?_="❌ JSON number format error - Please check number format":b.includes("Unexpected string")?_="❌ JSON string format error - Please check if quotes are paired":_=`❌ JSON syntax error: ${b}`}l.value=[_],h()}},h=()=>{var v;const m={isValid:a.value,errors:l.value};n("validationChange",m),(v=i.onValidationChange)==null||v.call(i,m)},g=m=>{const v=[];if(!m.mcpServers||typeof m.mcpServers!="object")return v.push(s("config.mcpConfig.missingMcpServers")),v.push('💡 Correct format example: {"mcpServers": {"server-id": {"name": "Server Name", "url": "Server URL"}}}'),{isValid:!1,errors:v};const _=m.mcpServers;for(const[b,C]of Object.entries(_)){if(typeof C!="object"||C===null){v.push(s("config.mcpConfig.invalidServerConfig",{serverId:b}));continue}const w=C;if(w.command){if(!Array.isArray(w.args))v.push(s("config.mcpConfig.invalidArgs",{serverId:b}));else for(let S=0;S0)for(let S=0;S{if(!m.mcpServers)return m;const v={...m};v.mcpServers={...m.mcpServers};for(const[_,b]of Object.entries(m.mcpServers)){const C=b,w={...C};if(!C.command){const S=C.url&&typeof C.url=="string",x=C.baseUrl&&typeof C.baseUrl=="string";x&&!S?(w.url=C.baseUrl,delete w.baseUrl):!S&&!x&&console.warn(`Server ${_} has no command but also no url or baseUrl`)}v.mcpServers[_]=w}return v};return e({validateJson:u,isJsonValid:Xn(()=>a.value),validationErrors:Xn(()=>l.value)}),(m,v)=>(ne(),ue("div",ADe,[L("div",RDe,[xe(MDe,{tabs:c.value,modelValue:d.value,"onUpdate:modelValue":v[1]||(v[1]=_=>d.value=_),class:"json-tab-panel"},{"json-config":Zt(()=>[L("div",PDe,[xe(yz,{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=_=>r.value=_),language:"json",height:400,onChange:u},null,8,["modelValue"]),L("div",ODe,[L("div",FDe,[xe(P(Re),{icon:"carbon:information",class:"instructions-icon"}),L("h4",null,B(m.$t("config.mcpConfig.usageInstructions")),1)]),L("div",BDe,[L("ol",WDe,[L("li",null,[L("strong",null,B(m.$t("config.mcpConfig.getMcpServiceList")),1),L("ul",null,[L("li",null,B(m.$t("config.mcpConfig.findMcpServices")),1)])]),L("li",null,[L("strong",null,B(m.$t("config.mcpConfig.configureMcpService")),1),L("ul",null,[L("li",null,B(m.$t("config.mcpConfig.copyJsonConfig")),1)])]),L("li",null,[L("strong",null,B(m.$t("config.mcpConfig.configureAgentUsage")),1),L("ul",null,[L("li",null,B(m.$t("config.mcpConfig.createAgentTip")),1)])])])])])])]),"config-example":Zt(()=>v[2]||(v[2]=[L("pre",{class:"example-json"},[L("code",null,`{ "mcpServers": { "mcp-ip-query": { "url": "https://mcp.higress.ai/mcp-ip-query/cmb6h8vpr00e08a01dx15ck8o" @@ -737,14 +737,14 @@ The flag will not be saved for the future. } } } -}`)],-1)])),_:1},8,["tabs","modelValue"])]),a.value?at("",!0):(ne(),ue("div",MDe,[(ne(!0),ue(Ji,null,ln(l.value,_=>(ne(),ue("div",{key:_,class:"error-item"},B(_),1))),128))]))]))}}),RDe=us(ADe,[["__scopeId","data-v-db4635ee"]]);function PDe(){const o=ar({mcpServerName:"",connectionType:"STUDIO",command:"",url:"",args:"",env:"",status:"ENABLE"});return{configForm:o,parseEnvString:r=>{const a={},l=r.split(` +}`)],-1)])),_:1},8,["tabs","modelValue"])]),a.value?at("",!0):(ne(),ue("div",VDe,[(ne(!0),ue(Ji,null,ln(l.value,_=>(ne(),ue("div",{key:_,class:"error-item"},B(_),1))),128))]))]))}}),zDe=us(HDe,[["__scopeId","data-v-acbd9f22"]]);function $De(){const o=ar({mcpServerName:"",connectionType:"STUDIO",command:"",url:"",args:"",env:"",status:"ENABLE"});return{configForm:o,parseEnvString:r=>{const a={},l=r.split(` `).filter(d=>d.trim());for(const d of l){const c=d.indexOf(":");if(c>0){const u=d.substring(0,c).trim(),h=d.substring(c+1).trim();u&&h&&(a[u]=h)}}return a},resetForm:()=>{Object.assign(o,{mcpServerName:"",connectionType:"STUDIO",command:"",url:"",args:"",env:"",status:"ENABLE"})},populateFormFromServer:r=>{try{const a=JSON.parse(r.connectionConfig);o.mcpServerName=r.mcpServerName||"",o.connectionType=r.connectionType,o.command=a.command||"",o.url=a.url||"",a.args&&Array.isArray(a.args)?o.args=a.args.join(` `):o.args="",a.env&&typeof a.env=="object"&&!Array.isArray(a.env)?o.env=Object.entries(a.env).map(([l,d])=>`${l}:${d}`).join(` -`):o.env="",o.status=r.status||"ENABLE"}catch(a){console.error("Failed to parse server configuration:",a),o.mcpServerName=r.mcpServerName||"",o.connectionType=r.connectionType,o.command="",o.url="",o.args="",o.env="",o.status=r.status||"ENABLE"}},validateForm:()=>{var a,l,d;const r=[];return(a=o.mcpServerName)!=null&&a.trim()||r.push("Please enter MCP server name"),o.connectionType==="STUDIO"?(l=o.command)!=null&&l.trim()||r.push("Please enter Command"):(o.connectionType==="SSE"||o.connectionType==="STREAMING")&&((d=o.url)!=null&&d.trim()||r.push("Please enter URL")),{isValid:r.length===0,errors:r}},handleConnectionTypeChange:()=>{o.command="",o.args="",o.env="",o.url=""}}}function ODe(){const o=Ye(!1);return{loading:o,executeRequest:async(t,i,n)=>{try{o.value=!0;const s=await t();return s.success&&i?console.log(i):!s.success&&n&&console.error(n),s}catch(s){return console.error("Request execution failed:",s),n&&console.error(n),null}finally{o.value=!1}}}}const FDe={class:"global-actions"},BDe={class:"json-actions"},WDe={class:"mcp-layout"},VDe={class:"server-list"},HDe={class:"list-header"},zDe={class:"server-count"},$De={class:"search-box"},UDe=["placeholder"],jDe={key:0,class:"servers-container"},KDe=["onClick"],qDe={class:"server-card-header"},GDe={class:"server-name"},ZDe=["onClick"],YDe={class:"toggle-label"},XDe={class:"server-connection-type"},QDe={class:"server-config-summary"},JDe={key:0,class:"config-item"},exe={class:"config-label"},txe={class:"config-value"},ixe={key:1,class:"config-item"},nxe={class:"config-label"},sxe={class:"config-value"},oxe={key:2,class:"config-item"},rxe={class:"config-label"},axe={class:"config-value"},lxe={key:3,class:"config-item"},dxe={class:"config-label"},cxe={class:"config-value"},uxe={key:1,class:"loading-state"},hxe={key:2,class:"empty-state"},gxe={class:"add-config-button-container"},fxe={key:0,class:"server-detail"},pxe={class:"detail-header"},mxe={class:"detail-actions"},_xe=["disabled"],vxe=["disabled"],bxe={class:"detail-content"},Cxe={key:1,class:"server-detail"},wxe={class:"detail-header"},Sxe={class:"detail-actions"},yxe=["disabled"],Lxe={class:"detail-content"},Dxe={key:2,class:"server-detail"},xxe={class:"detail-header"},kxe={class:"detail-actions"},Ixe=["disabled"],Exe={class:"detail-content"},Nxe={key:3,class:"no-selection"},Txe={class:"json-editor-container"},Mxe={class:"json-editor-header"},Axe=["disabled"],Rxe={class:"json-editor-wrapper"},Pxe={class:"delete-confirm"},Oxe={class:"warning-text"},Fxe=Ss({__name:"mcpConfig",setup(o){const{t:e}=Pa(),{configForm:t,resetForm:i,populateFormFromServer:n,validateForm:s,handleConnectionTypeChange:r}=PDe(),{message:a,showMessage:l}=Rz(),{loading:d}=ODe(),c=Ye([]),u=Ye(null),h=Ye(!1),g=Ye(!1),f=Ye(!1),m=Ye(!1),v=Ye(""),_=Ye(!0),b=Ye([]),C=Ye(""),w=Ye(!1),S=Xn(()=>{if(!C.value.trim())return c.value;const re=C.value.toLowerCase();return c.value.filter(ke=>ke.mcpServerName.toLowerCase().includes(re)||ke.connectionType.toLowerCase().includes(re)||ke.connectionConfig.toLowerCase().includes(re))}),x=(re,ke)=>{try{const ce=JSON.parse(re.connectionConfig);switch(ke){case"command":return ce.command||"";case"url":return ce.url||"";case"args":return ce.args&&Array.isArray(ce.args)?ce.args.join(` +`):o.env="",o.status=r.status||"ENABLE"}catch(a){console.error("Failed to parse server configuration:",a),o.mcpServerName=r.mcpServerName||"",o.connectionType=r.connectionType,o.command="",o.url="",o.args="",o.env="",o.status=r.status||"ENABLE"}},validateForm:()=>{var a,l,d;const r=[];return(a=o.mcpServerName)!=null&&a.trim()||r.push("Please enter MCP server name"),o.connectionType==="STUDIO"?(l=o.command)!=null&&l.trim()||r.push("Please enter Command"):(o.connectionType==="SSE"||o.connectionType==="STREAMING")&&((d=o.url)!=null&&d.trim()||r.push("Please enter URL")),{isValid:r.length===0,errors:r}},handleConnectionTypeChange:()=>{o.command="",o.args="",o.env="",o.url=""}}}function UDe(){const o=Ye(!1);return{loading:o,executeRequest:async(t,i,n)=>{try{o.value=!0;const s=await t();return s.success&&i?console.log(i):!s.success&&n&&console.error(n),s}catch(s){return console.error("Request execution failed:",s),n&&console.error(n),null}finally{o.value=!1}}}}const jDe={class:"global-actions"},KDe={class:"json-actions"},qDe={class:"mcp-layout"},GDe={class:"server-list"},ZDe={class:"list-header"},YDe={class:"server-count"},XDe={class:"search-box"},QDe=["placeholder"],JDe={key:0,class:"servers-container"},exe=["onClick"],txe={class:"server-card-header"},ixe={class:"server-name"},nxe=["onClick"],sxe={class:"toggle-label"},oxe={class:"server-connection-type"},rxe={class:"server-config-summary"},axe={key:0,class:"config-item"},lxe={class:"config-label"},dxe={class:"config-value"},cxe={key:1,class:"config-item"},uxe={class:"config-label"},hxe={class:"config-value"},gxe={key:2,class:"config-item"},fxe={class:"config-label"},pxe={class:"config-value"},mxe={key:3,class:"config-item"},_xe={class:"config-label"},vxe={class:"config-value"},bxe={key:1,class:"loading-state"},Cxe={key:2,class:"empty-state"},wxe={class:"add-config-button-container"},Sxe={key:0,class:"server-detail"},yxe={class:"detail-header"},Lxe={class:"detail-actions"},Dxe=["disabled"],xxe=["disabled"],kxe={class:"detail-content"},Ixe={key:1,class:"server-detail"},Exe={class:"detail-header"},Nxe={class:"detail-actions"},Txe=["disabled"],Mxe={class:"detail-content"},Axe={key:2,class:"server-detail"},Rxe={class:"detail-header"},Pxe={class:"detail-actions"},Oxe=["disabled"],Fxe={class:"detail-content"},Bxe={key:3,class:"no-selection"},Wxe={class:"json-editor-container"},Vxe={class:"json-editor-header"},Hxe=["disabled"],zxe={class:"json-editor-wrapper"},$xe={class:"delete-confirm"},Uxe={class:"warning-text"},jxe=Ss({__name:"mcpConfig",setup(o){const{t:e}=Pa(),{configForm:t,resetForm:i,populateFormFromServer:n,validateForm:s,handleConnectionTypeChange:r}=$De(),{message:a,showMessage:l}=Az(),{loading:d}=UDe(),c=Ye([]),u=Ye(null),h=Ye(!1),g=Ye(!1),f=Ye(!1),m=Ye(!1),v=Ye(""),_=Ye(!0),b=Ye([]),C=Ye(""),w=Ye(!1),S=Xn(()=>{if(!C.value.trim())return c.value;const re=C.value.toLowerCase();return c.value.filter(ke=>ke.mcpServerName.toLowerCase().includes(re)||ke.connectionType.toLowerCase().includes(re)||ke.connectionConfig.toLowerCase().includes(re))}),x=(re,ke)=>{try{const ce=JSON.parse(re.connectionConfig);switch(ke){case"command":return ce.command||"";case"url":return ce.url||"";case"args":return ce.args&&Array.isArray(ce.args)?ce.args.join(` `):"";case"env":return ce.env&&typeof ce.env=="object"&&!Array.isArray(ce.env)?Object.entries(ce.env).map(([Ie,mt])=>`${Ie}:${mt}`).join(` -`):"";default:return""}}catch{const Ie=re;switch(ke){case"command":return Ie.command||"";case"url":return Ie.url||"";case"args":return Ie.args||"";case"env":return Ie.env||"";default:return""}}},y=re=>{u.value={...re},g.value=!1,f.value=!1},I=()=>{if(!v.value.trim()){l(e("config.mcpConfig.jsonConfigEmpty"),"error");return}try{const re=JSON.parse(v.value);w.value&&u.value?u.value.connectionConfig=JSON.stringify(re,null,2):E(re),m.value=!1,l(e("config.mcpConfig.jsonConfigSaved"),"success")}catch{l(e("config.mcpConfig.jsonFormatError"),"error")}},E=async re=>{try{d.value=!0;const ke=await od.importMcpServers(re);ke.success?(l(e("config.mcpConfig.addSuccess")),await he()):l(ke.message,"error")}catch(ke){console.error("添加MCP服务器失败:",ke),l(e("config.mcpConfig.addFailed"),"error")}finally{d.value=!1}},R=async()=>{var re;if(!((re=u.value)!=null&&re.id)){l(e("config.mcpConfig.noServerSelected"),"error");return}try{d.value=!0;const ke=await od.removeMcpServer(u.value.id);ke.success?(l(e("config.mcpConfig.deleteSuccess")),u.value=null,h.value=!1,await he()):l(ke.message||e("config.mcpConfig.deleteFailed"),"error")}catch(ke){console.error("删除MCP服务器失败:",ke),l(e("config.mcpConfig.deleteFailed"),"error")}finally{d.value=!1}},j=async()=>{var ke,ce,Ie,mt,Ct;const re=s();if(!re.isValid){l(re.errors[0],"error");return}try{const Mt={connectionType:t.connectionType,mcpServerName:t.mcpServerName,status:t.status};if(t.connectionType==="STUDIO"){if(Mt.command=t.command,(ke=t.args)!=null&&ke.trim())try{const yn=t.args.split(` +`):"";default:return""}}catch{const Ie=re;switch(ke){case"command":return Ie.command||"";case"url":return Ie.url||"";case"args":return Ie.args||"";case"env":return Ie.env||"";default:return""}}},y=re=>{u.value={...re},g.value=!1,f.value=!1},I=()=>{if(!v.value.trim()){l(e("config.mcpConfig.jsonConfigEmpty"),"error");return}try{const re=JSON.parse(v.value);w.value&&u.value?u.value.connectionConfig=JSON.stringify(re,null,2):E(re),m.value=!1,l(e("config.mcpConfig.jsonConfigSaved"),"success")}catch{l(e("config.mcpConfig.jsonFormatError"),"error")}},E=async re=>{try{d.value=!0;const ke=await od.importMcpServers(re);ke.success?(l(e("config.mcpConfig.addSuccess")),await he()):l(ke.message,"error")}catch(ke){console.error("Failed to add MCP server:",ke),l(e("config.mcpConfig.addFailed"),"error")}finally{d.value=!1}},R=async()=>{var re;if(!((re=u.value)!=null&&re.id)){l(e("config.mcpConfig.noServerSelected"),"error");return}try{d.value=!0;const ke=await od.removeMcpServer(u.value.id);ke.success?(l(e("config.mcpConfig.deleteSuccess")),u.value=null,h.value=!1,await he()):l(ke.message||e("config.mcpConfig.deleteFailed"),"error")}catch(ke){console.error("Failed to delete MCP server:",ke),l(e("config.mcpConfig.deleteFailed"),"error")}finally{d.value=!1}},j=async()=>{var ke,ce,Ie,mt,Ct;const re=s();if(!re.isValid){l(re.errors[0],"error");return}try{const Mt={connectionType:t.connectionType,mcpServerName:t.mcpServerName,status:t.status};if(t.connectionType==="STUDIO"){if(Mt.command=t.command,(ke=t.args)!=null&&ke.trim())try{const yn=t.args.split(` `).filter(Qs=>Qs.trim());if(!yn.every(Qs=>typeof Qs=="string")){l(e("config.mcpConfig.argsStringError"),"error");return}Mt.args=yn}catch{l(e("config.mcpConfig.argsFormatError"),"error");return}if((ce=t.env)!=null&&ce.trim())try{const yn=t.env.split(` -`).filter(Dr=>Dr.trim()),Qs={};for(const Dr of yn){const ju=Dr.indexOf(":");if(ju>0){const ge=Dr.substring(0,ju).trim(),te=Dr.substring(ju+1).trim();ge&&te&&(Qs[ge]=te)}}if(!Object.values(Qs).every(Dr=>typeof Dr=="string")){l(e("config.mcpConfig.envStringError"),"error");return}Mt.env=Qs}catch{l(e("config.mcpConfig.envFormatError"),"error");return}}else Mt.url=t.url;(Ie=u.value)!=null&&Ie.id&&(Mt.id=u.value.id);const ci=await od.saveMcpServer(Mt);ci.success?(l((mt=u.value)!=null&&mt.id?e("config.mcpConfig.updateSuccess"):e("config.mcpConfig.addSuccess"),"success"),await he(),(Ct=u.value)!=null&&Ct.id||(i(),g.value=!1)):l(ci.message||e("config.mcpConfig.operationFailed"),"error")}catch(Mt){console.error("保存失败:",Mt),l(e("config.mcpConfig.saveFailed"),"error")}},O=()=>{const re=v.value;if(!re){_.value=!0,b.value=[];return}try{const ke=JSON.parse(re),ce=$(ke);if(ce.isValid){const Ie=oe(ke),mt=JSON.stringify(Ie,null,2);mt!==re&&(v.value=mt),_.value=!0,b.value=[]}else _.value=!1,b.value=ce.errors||[],ce.errors&&ce.errors.length>0&&l(ce.errors.join(` +`).filter(Dr=>Dr.trim()),Qs={};for(const Dr of yn){const ju=Dr.indexOf(":");if(ju>0){const ge=Dr.substring(0,ju).trim(),te=Dr.substring(ju+1).trim();ge&&te&&(Qs[ge]=te)}}if(!Object.values(Qs).every(Dr=>typeof Dr=="string")){l(e("config.mcpConfig.envStringError"),"error");return}Mt.env=Qs}catch{l(e("config.mcpConfig.envFormatError"),"error");return}}else Mt.url=t.url;(Ie=u.value)!=null&&Ie.id&&(Mt.id=u.value.id);const ci=await od.saveMcpServer(Mt);ci.success?(l((mt=u.value)!=null&&mt.id?e("config.mcpConfig.updateSuccess"):e("config.mcpConfig.addSuccess"),"success"),await he(),(Ct=u.value)!=null&&Ct.id||(i(),g.value=!1)):l(ci.message||e("config.mcpConfig.operationFailed"),"error")}catch(Mt){console.error("Save failed:",Mt),l(e("config.mcpConfig.saveFailed"),"error")}},O=()=>{const re=v.value;if(!re){_.value=!0,b.value=[];return}try{const ke=JSON.parse(re),ce=$(ke);if(ce.isValid){const Ie=oe(ke),mt=JSON.stringify(Ie,null,2);mt!==re&&(v.value=mt),_.value=!0,b.value=[]}else _.value=!1,b.value=ce.errors||[],ce.errors&&ce.errors.length>0&&l(ce.errors.join(` `),"error")}catch(ke){_.value=!1;let ce=e("config.mcpConfig.invalidJson");if(ke instanceof SyntaxError){const Ie=ke.message;Ie.includes("Unexpected token")?ce=e("config.mcpConfig.jsonSyntaxError"):Ie.includes("Unexpected end")?ce=e("config.mcpConfig.jsonIncomplete"):Ie.includes("Unexpected number")?ce=e("config.mcpConfig.jsonNumberError"):Ie.includes("Unexpected string")?ce=e("config.mcpConfig.jsonStringError"):ce=e("config.mcpConfig.jsonSyntaxErrorWithMessage",{message:Ie})}b.value=[ce],l(ce,"error")}},$=re=>{const ke=[];if(!re.mcpServers||typeof re.mcpServers!="object")return ke.push(e("config.mcpConfig.missingMcpServers")),ke.push(e("config.mcpConfig.correctFormatExample")),{isValid:!1,errors:ke};const ce=re.mcpServers;for(const[Ie,mt]of Object.entries(ce)){if(typeof mt!="object"||mt===null){ke.push(e("config.mcpConfig.invalidServerConfig",{serverId:Ie}));continue}const Ct=mt;if(Ct.command){if(!Array.isArray(Ct.args))ke.push(e("config.mcpConfig.invalidArgs",{serverId:Ie}));else for(let Mt=0;Mt0)for(let Mt=0;Mt{try{const re=v.value,ke=JSON.parse(re),ce=JSON.stringify(ke,null,2);v.value=ce,O()}catch{l(e("config.mcpConfig.invalidJson"),"error")}},oe=re=>{if(!re.mcpServers)return re;const ke={...re};ke.mcpServers={...re.mcpServers};for(const[ce,Ie]of Object.entries(re.mcpServers)){const mt=Ie,Ct={...mt};if(!mt.command){const Mt=mt.url&&typeof mt.url=="string",ci=mt.baseUrl&&typeof mt.baseUrl=="string";ci&&!Mt?(Ct.url=mt.baseUrl,delete Ct.baseUrl):!Mt&&!ci&&console.warn(e("config.mcpConfig.serverConfigWarning",{serverId:ce}))}ke.mcpServers[ce]=Ct}return ke},Le=()=>v.value?_.value?e("config.mcpConfig.jsonStatusValid"):b.value.length>0?b.value.join(` -`):e("config.mcpConfig.jsonStatusInvalid"):e("config.mcpConfig.jsonStatusEmpty"),he=async()=>{try{d.value=!0,c.value=await od.getAllMcpServers(),c.value.length>0&&!u.value&&!g.value&&!f.value&&y(c.value[0])}catch(re){console.error("加载MCP服务器列表失败:",re),l(e("config.basicConfig.loadConfigFailed"),"error")}finally{d.value=!1}},se=async re=>{try{d.value=!0;let ke;re.status==="ENABLE"?ke=await od.disableMcpServer(re.id):ke=await od.enableMcpServer(re.id),ke.success?(re.status=re.status==="ENABLE"?"DISABLE":"ENABLE",l(ke.message||e("config.mcpConfig.statusToggleSuccess"))):l(ke.message||e("config.mcpConfig.statusToggleFailed"),"error")}catch(ke){console.error("状态切换失败:",ke),l(e("config.mcpConfig.statusToggleFailed"),"error")}finally{d.value=!1}},V=()=>{u.value=null,g.value=!0,f.value=!1,Q()},Q=()=>{i()},H=()=>{f.value=!0,u.value=null,g.value=!1,v.value="",_.value=!0,b.value=[]},G=()=>{f.value=!1,u.value=null,g.value=!1,v.value="",_.value=!0,b.value=[]};cr(u,re=>{re&&n(re)},{immediate:!0}),Kd(()=>{he()});const Z=()=>{if(!u.value){l(e("config.mcpConfig.noServerSelected"),"error");return}h.value=!0},$e=async()=>{try{d.value=!0;const re=await od.getAllMcpServers(),ke={mcpServers:{}};re.forEach(Ct=>{try{const Mt=JSON.parse(Ct.connectionConfig);ke.mcpServers[Ct.mcpServerName]=Mt}catch(Mt){console.error(`解析服务器配置失败: ${Ct.mcpServerName}`,Mt)}});const ce=new Blob([JSON.stringify(ke,null,2)],{type:"application/json"}),Ie=URL.createObjectURL(ce),mt=document.createElement("a");mt.href=Ie,mt.download="mcp_servers.json",document.body.appendChild(mt),mt.click(),document.body.removeChild(mt),URL.revokeObjectURL(Ie),l(e("config.mcpConfig.exportSuccess"))}catch(re){console.error("导出MCP服务器失败:",re),l(e("config.mcpConfig.exportFailed"),"error")}finally{d.value=!1}},ft=re=>{_.value=re.isValid,b.value=re.errors||[]},Bt=async()=>{var re;if(!v.value.trim()){l(e("config.mcpConfig.jsonConfigEmpty"),"error");return}try{const ke=JSON.parse(v.value),ce=$(ke);if(ce.isValid){d.value=!0;const Ie=await od.importMcpServers(ke);Ie.success?(l(e("config.mcpConfig.importSuccess")),await he()):l(Ie.message||e("config.mcpConfig.importFailed"),"error")}else l(((re=ce.errors)==null?void 0:re.join(` -`))||e("config.mcpConfig.importInvalidJson"),"error")}catch{l(e("config.mcpConfig.importFailed"),"error")}finally{d.value=!1,f.value=!1}},Ce=re=>{switch(re){case"STUDIO":return"carbon:plug";case"SSE":return"carbon:plug";case"STREAMING":return"carbon:plug";default:return"carbon:plug"}};return(re,ke)=>(ne(),In(Gb,null,{title:Zt(()=>[D("h2",null,B(P(e)("config.mcpConfig.title")),1)]),actions:Zt(()=>[D("div",FDe,[D("div",BDe,[D("button",{class:"action-btn",onClick:H},[xe(P(Pe),{icon:"carbon:arrow-up"}),Ae(" "+B(P(e)("config.mcpConfig.importAll")),1)]),D("button",{class:"action-btn",onClick:$e},[xe(P(Pe),{icon:"carbon:arrow-down"}),Ae(" "+B(P(e)("config.mcpConfig.exportAll")),1)])])])]),default:Zt(()=>[D("div",WDe,[D("div",VDe,[D("div",HDe,[D("h3",null,B(P(e)("config.mcpConfig.serverList")),1),D("span",zDe,"("+B(c.value.length)+")",1)]),D("div",$De,[Vt(D("input",{"onUpdate:modelValue":ke[0]||(ke[0]=ce=>C.value=ce),type:"text",placeholder:P(e)("config.mcpSearch"),class:"search-input"},null,8,UDe),[[ti,C.value]]),xe(P(Pe),{icon:"carbon:search",class:"search-icon"})]),P(d)?at("",!0):(ne(),ue("div",jDe,[(ne(!0),ue(Ji,null,ln(S.value,ce=>{var Ie;return ne(),ue("div",{key:ce.id,class:Nn(["server-card",{active:((Ie=u.value)==null?void 0:Ie.id)===ce.id}]),onClick:mt=>y(ce)},[D("div",qDe,[D("span",GDe,B(ce.mcpServerName),1),D("div",{class:"server-status-toggle",onClick:Zh(mt=>se(ce),["stop"])},[D("div",{class:Nn(["status-toggle",{enabled:ce.status==="ENABLE"}])},[ke[6]||(ke[6]=D("div",{class:"toggle-thumb"},null,-1)),D("span",YDe,B(ce.status==="ENABLE"?P(e)("config.mcpConfig.enabled"):P(e)("config.mcpConfig.disabled")),1)],2)],8,ZDe)]),D("div",XDe,[xe(P(Pe),{icon:Ce(ce.connectionType),class:"connection-type-icon"},null,8,["icon"]),D("span",{class:Nn(["connection-type-badge",ce.connectionType.toLowerCase()])},B(ce.connectionType),3)]),D("div",QDe,[x(ce,"command")?(ne(),ue("div",JDe,[D("span",exe,B(P(e)("config.mcpConfig.command"))+":",1),D("span",txe,B(x(ce,"command")),1)])):at("",!0),x(ce,"url")?(ne(),ue("div",ixe,[D("span",nxe,B(P(e)("config.mcpConfig.url"))+":",1),D("span",sxe,B(x(ce,"url")),1)])):at("",!0),x(ce,"args")?(ne(),ue("div",oxe,[D("span",rxe,B(P(e)("config.mcpConfig.args"))+":",1),D("span",axe,B(x(ce,"args")),1)])):at("",!0),x(ce,"env")?(ne(),ue("div",lxe,[D("span",dxe,B(P(e)("config.mcpConfig.env"))+":",1),D("span",cxe,B(x(ce,"env")),1)])):at("",!0)])],10,KDe)}),128))])),P(d)?(ne(),ue("div",uxe,[xe(P(Pe),{icon:"carbon:loading",class:"loading-icon"}),Ae(" "+B(P(e)("common.loading")),1)])):at("",!0),!P(d)&&S.value.length===0?(ne(),ue("div",hxe,[xe(P(Pe),{icon:"carbon:bot",class:"empty-icon"}),D("p",null,B(C.value?P(e)("config.notFound"):P(e)("config.mcpConfig.noServers")),1)])):at("",!0),D("div",gxe,[D("button",{class:"add-btn",onClick:V},[xe(P(Pe),{icon:"carbon:add"}),Ae(" "+B(P(e)("config.mcpConfig.newMcpConfig")),1)])])]),u.value?(ne(),ue("div",fxe,[D("div",pxe,[D("h3",null,B(u.value.mcpServerName),1),D("div",mxe,[D("button",{class:"action-btn primary",onClick:j,disabled:P(d)},[xe(P(Pe),{icon:"carbon:save"}),Ae(" "+B(P(e)("config.mcpConfig.save")),1)],8,_xe),D("button",{class:"action-btn danger",onClick:Z,disabled:P(d)},[xe(P(Pe),{icon:"carbon:trash-can"}),Ae(" "+B(P(e)("config.mcpConfig.delete")),1)],8,vxe)])]),D("div",bxe,[xe(k9,{"form-data":P(t),"is-edit-mode":!0,onConnectionTypeChange:P(r)},null,8,["form-data","onConnectionTypeChange"])])])):g.value?(ne(),ue("div",Cxe,[D("div",wxe,[D("h3",null,B(P(e)("config.mcpConfig.newMcpConfig")),1),D("div",Sxe,[D("button",{class:"action-btn primary",onClick:j,disabled:P(d)},[xe(P(Pe),{icon:"carbon:save"}),Ae(" "+B(P(e)("config.mcpConfig.save")),1)],8,yxe),D("button",{class:"action-btn",onClick:Q},[xe(P(Pe),{icon:"carbon:reset"}),Ae(" "+B(P(e)("config.mcpConfig.reset")),1)])])]),D("div",Lxe,[xe(k9,{"form-data":P(t),"is-edit-mode":!1,"onUpdate:formData":ke[1]||(ke[1]=ce=>Object.assign(P(t),ce)),onConnectionTypeChange:P(r)},null,8,["form-data","onConnectionTypeChange"])])])):f.value?(ne(),ue("div",Dxe,[D("div",xxe,[D("h3",null,B(P(e)("config.mcpConfig.importAll")),1),D("div",kxe,[D("button",{class:"action-btn primary",onClick:Bt,disabled:P(d)},[xe(P(Pe),{icon:"carbon:save"}),Ae(" "+B(P(e)("config.mcpConfig.import")),1)],8,Ixe),D("button",{class:"action-btn",onClick:G},[xe(P(Pe),{icon:"carbon:close"}),Ae(" "+B(P(e)("config.mcpConfig.cancel")),1)])])]),D("div",Exe,[xe(RDe,{modelValue:v.value,"onUpdate:modelValue":ke[2]||(ke[2]=ce=>v.value=ce),onValidationChange:ft},null,8,["modelValue"])])])):(ne(),ue("div",Nxe,[xe(P(Pe),{icon:"carbon:bot",class:"placeholder-icon"}),D("p",null,B(P(e)("config.mcpConfig.selectServerHint")),1)]))]),xe(Wo,{modelValue:m.value,"onUpdate:modelValue":ke[4]||(ke[4]=ce=>m.value=ce),title:P(e)("config.mcpConfig.jsonEditor"),onConfirm:I},{default:Zt(()=>[D("div",Txe,[D("div",Mxe,[D("span",{class:Nn(["json-status",{valid:_.value,invalid:!_.value&&v.value.trim()}])},B(Le()),3),v.value.trim()?(ne(),ue("button",{key:0,onClick:K,class:"format-btn",disabled:!_.value},[xe(P(Pe),{icon:"carbon:settings"}),Ae(" "+B(P(e)("config.mcpConfig.formatJson")),1)],8,Axe)):at("",!0)]),D("div",Rxe,[xe(yz,{modelValue:v.value,"onUpdate:modelValue":ke[3]||(ke[3]=ce=>v.value=ce),placeholder:P(e)("config.mcpConfig.configJsonPlaceholder"),onChange:O,class:"json-editor",language:"json"},null,8,["modelValue","placeholder"])])])]),_:1},8,["modelValue","title"]),xe(Wo,{modelValue:h.value,"onUpdate:modelValue":ke[5]||(ke[5]=ce=>h.value=ce),title:P(e)("config.mcpConfig.confirmDelete"),onConfirm:R},{default:Zt(()=>[D("div",Pxe,[xe(P(Pe),{icon:"carbon:warning",class:"warning-icon"}),D("p",null,B(P(e)("config.mcpConfig.deleteConfirmMessage")),1),D("p",Oxe,B(P(e)("config.mcpConfig.deleteWarningText")),1)])]),_:1},8,["modelValue","title"]),xe(qb,{name:"message-fade"},{default:Zt(()=>[P(a).show?(ne(),ue("div",{key:0,class:Nn(["message-toast",P(a).type])},B(P(a).text),3)):at("",!0)]),_:1})]),_:1}))}}),Bxe=us(Fxe,[["__scopeId","data-v-163c5416"]]);class ld{static async getAll(){const e=await fetch(this.BASE_URL);if(!e.ok)throw new Error(`Failed to fetch prompts: ${e.statusText}`);return e.json()}static async getAllByNamespace(e){const t=await fetch(`${this.BASE_URL}/namespace/${e}`);if(!t.ok)throw new Error(`Failed to fetch prompts for namespace ${e}: ${t.statusText}`);return t.json()}static async getById(e){const t=await fetch(`${this.BASE_URL}/${e}`);if(!t.ok)throw new Error(`Failed to fetch prompt ${e}: ${t.statusText}`);return t.json()}static async create(e){const t=await fetch(this.BASE_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`Failed to create prompt: ${t.statusText}`);return t.json()}static async update(e,t){const i=await fetch(`${this.BASE_URL}/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!i.ok)throw new Error(`Failed to update prompt ${e}: ${i.statusText}`);return i.json()}static async delete(e){const t=await fetch(`${this.BASE_URL}/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`Failed to delete prompt ${e}: ${t.statusText}`)}static async getSupportedLanguages(){const e=await fetch(`${this.BASE_URL}/languages`);if(!e.ok)throw new Error(`Failed to fetch supported languages: ${e.statusText}`);return e.json()}static async importSpecificPromptFromLanguage(e,t){const i=await fetch(`${this.BASE_URL}/import/${e}/language/${t}`,{method:"POST"});if(!i.ok)throw new Error(`Failed to import specific prompt ${e} for language ${t}: ${i.statusText}`)}static async importAllPromptsFromLanguage(e){const t=await fetch(`/admin/prompts/switch-language?language=${e}`,{method:"POST"});if(!t.ok)throw new Error(`Failed to switch all prompts to language ${e}: ${t.statusText}`)}}ri(ld,"BASE_URL","/api/prompt");const Wxe={class:"custom-select"},Vxe=["title"],Hxe={key:0,class:"current-option"},zxe={class:"option-name"},$xe={key:1,class:"current-option"},Uxe={class:"select-options"},jxe=["onClick"],Kxe={class:"option-name"},qxe=Ss({__name:"select",props:{modelValue:{},options:{},placeholder:{}},emits:["update:modelValue"],setup(o,{emit:e}){const t=o,i=e,n=Ye(!1),s=Xn(()=>t.options.find(d=>d.id===t.modelValue)),r=d=>d.id===t.modelValue,a=()=>{n.value=!n.value},l=d=>{i("update:modelValue",d.id),n.value=!1};return(d,c)=>(ne(),ue("div",Wxe,[D("button",{class:"select-btn",onClick:a,title:d.placeholder},[s.value?(ne(),ue("span",Hxe,[D("span",zxe,B(s.value.name),1)])):(ne(),ue("span",$xe,B(d.placeholder),1)),xe(P(Pe),{icon:n.value?"carbon:chevron-up":"carbon:chevron-down",width:"14",class:"chevron"},null,8,["icon"])],8,Vxe),xe(qb,{name:"slideDown"},{default:Zt(()=>[Vt(D("div",{class:"select-dropdown",onClick:c[0]||(c[0]=Zh(()=>{},["stop"]))},[D("div",Uxe,[(ne(!0),ue(Ji,null,ln(d.options,u=>(ne(),ue("button",{key:u.id,class:Nn(["select-option",{active:r(u)}]),onClick:h=>l(u)},[D("span",Kxe,B(u.name),1),r(u)?(ne(),In(P(Pe),{key:0,icon:"carbon:checkmark",width:"16",class:"check-icon"})):at("",!0)],10,jxe))),128))])],512),[[ny,n.value]])]),_:1}),n.value?(ne(),ue("div",{key:0,class:"backdrop",onClick:c[1]||(c[1]=u=>n.value=!1)})):at("",!0)]))}}),u1=us(qxe,[["__scopeId","data-v-4c6d676f"]]);function Gxe(o){return!(o==null||typeof o=="string"&&o.trim()===""||Array.isArray(o)&&o.length===0||typeof o=="object"&&Object.keys(o).length===0)}function Zxe(o,e,t="application/json"){const i=JSON.stringify(o,null,2),n=new Blob([i],{type:t}),s=URL.createObjectURL(n),r=document.createElement("a");r.href=s,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(s)}const Yxe={class:"actions-container"},Xxe={class:"prompt-layout"},Qxe={class:"prompt-list"},Jxe={class:"list-header"},eke={class:"prompt-count"},tke={key:0,class:"prompts-container"},ike=["onClick"],nke={class:"prompt-card-header"},ske={class:"prompt-name"},oke={key:0,class:"prompt-desc"},rke={class:"tags"},ake={class:"tag"},lke={key:1,class:"loading-state"},dke={key:2,class:"empty-state"},cke={key:0,class:"prompt-detail"},uke={class:"detail-header"},hke={class:"detail-actions"},gke={key:0,class:"import-language-dropdown"},fke={class:"form-item"},pke=["placeholder"],mke={class:"form-item"},_ke={class:"form-item"},vke={class:"form-item"},bke=["placeholder"],Cke={class:"form-item"},wke=["placeholder"],Ske={key:1,class:"no-selection"},yke={class:"modal-form"},Lke={class:"form-item"},Dke=["placeholder"],xke={class:"form-item"},kke={class:"form-item"},Ike={class:"form-item"},Eke=["placeholder"],Nke={class:"form-item"},Tke=["placeholder"],Mke={class:"delete-confirm"},Ake={class:"warning-text"},Rke={class:"modal-form"},Pke={class:"form-item"},Oke=["value"],Fke={class:"warning-notice"},Bke={class:"modal-form"},Wke={class:"form-item"},Vke=["value"],Hke={class:"warning-notice"},zke=Ss({__name:"dynamicPromptConfig",setup(o){const{t:e}=Pa(),{success:t,error:i}=M9(),n=sy(),{namespace:s}=K2(n),r=Ye(!1),a=ar([]),l=Ye(null),d=Ye(!1),c=Ye(!1),u=Ye(!1),h=Ye(!1),g=Ye("zh"),f=Ye("zh"),m=Ye(["zh","en"]),v=[{id:"USER",name:"USER"},{id:"ASSISTANT",name:"ASSISTANT"},{id:"SYSTEM",name:"SYSTEM"},{id:"TOOL",name:"TOOL"}],_=[{id:"LLM",name:"LLM"},{id:"PLANNING",name:"PLANNING"},{id:"AGENT",name:"AGENT"}],b={promptName:"",messageType:"",type:"",promptDescription:""},C=ar({...b}),w=async()=>{r.value=!0;try{const he=await ld.getAllByNamespace(s.value);he.length>0&&await y(he[0]),a.splice(0,a.length,...he)}catch(he){console.error("加载数据失败:",he),i(e("config.promptConfig.loadDataFailed")+": "+he.message)}finally{r.value=!1}},S=async()=>{if(l.value&&R(l.value))try{const he=await ld.update(l.value.id,l.value),se=a.findIndex(V=>V.id===he.id);se!==-1&&(a[se]=he),l.value={...he},t(e("config.promptConfig.saveSuccess"))}catch(he){i(e("config.promptConfig.saveFailed")+": "+he.message)}},x=async()=>{if(l.value)try{await ld.delete(l.value.id);const he=a.findIndex(se=>se.id===l.value.id);he!==-1&&a.splice(he,1),l.value=a.length>0?a[0]:null,c.value=!1,t(e("config.promptConfig.deleteSuccess"))}catch(he){i(e("config.promptConfig.deleteFailed")+": "+he.message)}},y=async he=>{try{const se=await ld.getById(he.id);l.value={...se}}catch(se){console.error("加载Prompt详情失败:",se),i(e("config.promptConfig.loadDetailsFailed")+": "+se.message),l.value={...he}}},I=async()=>{if(R(C))try{const he={...C,namespace:s.value,builtIn:!1},se=await ld.create(he);a.push(se),l.value=se,d.value=!1,t(e("config.promptConfig.createSuccess"))}catch(he){i(e("config.promptConfig.createFailed")+": "+he.message)}},E=()=>{try{const he=l.value;Zxe(he,`prompt-${he.promptName}-${new Date().toISOString().split("T")[0]}.json`),t(e("config.agentConfig.exportSuccess"))}catch(he){i(e("config.agentConfig.exportFailed")+": "+he.message)}};function R(he){const se=["promptName","messageType","type","promptContent"];for(const Q of se){const H=he[Q];if(H==null||typeof H=="string"&&H.trim()==="")return i(`${Q} is required and cannot be empty`),!1}return!!j(a,he)}function j(he,se){const V=he.find(Q=>Q.promptName===se.promptName);return V&&se.id&&V.id!==se.id?(i(`Name "${se.promptName}" already exists. Please use a different name.`),!1):V&&!se.id?(i(`Name "${se.promptName}" already exists. Please use a different name.`),!1):!0}const O=()=>{C.promptName="",C.promptDescription="",C.promptContent="",Object.assign(C,b),d.value=!0},$=()=>{c.value=!0},K=async()=>{if(l.value)try{await ld.importSpecificPromptFromLanguage(l.value.promptName,g.value),u.value=!1,t(e("config.promptConfig.resetToLanguageDefaultSuccess")),await w()}catch(he){i(e("config.promptConfig.resetToLanguageDefaultFailed")+": "+he.message)}},oe=async()=>{try{await ld.importAllPromptsFromLanguage(f.value),h.value=!1,t(e("config.promptConfig.batchSwitchLanguageSuccess")),await w()}catch(he){i(e("config.promptConfig.batchSwitchLanguageFailed")+": "+he.message)}},Le=async()=>{try{const he=await ld.getSupportedLanguages();m.value=he}catch(he){console.warn("Failed to load supported languages, using default",he)}};return Kd(async()=>{await Le(),await w()}),cr(()=>s.value,(he,se)=>{he!==se&&(a.splice(0),l.value=null,w())}),(he,se)=>(ne(),In(Gb,null,{title:Zt(()=>[D("h2",null,B(P(e)("config.promptConfig.title")),1)]),actions:Zt(()=>[D("div",Yxe,[D("button",{class:"action-btn info",onClick:se[0]||(se[0]=V=>h.value=!0)},[xe(P(Pe),{icon:"carbon:language"}),Ae(" "+B(P(e)("config.promptConfig.batchSwitchLanguage")),1)]),D("button",{class:"action-btn",onClick:E},[xe(P(Pe),{icon:"carbon:download"}),Ae(" "+B(P(e)("config.agentConfig.export")),1)])])]),default:Zt(()=>[D("div",Xxe,[D("div",Qxe,[D("div",Jxe,[D("h3",null,B(P(e)("config.promptConfig.configuredprompts")),1),D("span",eke,"("+B(a.length)+B(P(e)("config.promptConfig.promptCount"))+")",1)]),r.value?at("",!0):(ne(),ue("div",tke,[(ne(!0),ue(Ji,null,ln(a,V=>{var Q,H;return ne(),ue("div",{key:V.id,class:Nn(["prompt-card",{active:((Q=l.value)==null?void 0:Q.id)===V.id}]),onClick:G=>y(V)},[D("div",nke,[D("span",ske,B(V.promptName),1),xe(P(Pe),{icon:"carbon:chevron-right"})]),(H=V.promptDescription)!=null&&H.trim()?(ne(),ue("p",oke,B(V.promptDescription),1)):at("",!0),D("div",rke,[D("span",ake,B(V.builtIn?P(e)("config.promptConfig.builtIn"):P(e)("config.promptConfig.custom")),1)])],10,ike)}),128))])),r.value?(ne(),ue("div",lke,[xe(P(Pe),{icon:"carbon:loading",class:"loading-icon"}),Ae(" "+B(P(e)("common.loading")),1)])):at("",!0),!r.value&&a.length===0?(ne(),ue("div",dke,[xe(P(Pe),{icon:"carbon:bot",class:"empty-icon"}),D("p",null,B(P(e)("config.promptConfig.noPrompts")),1)])):at("",!0),D("button",{class:"add-btn",onClick:O},[xe(P(Pe),{icon:"carbon:add"}),Ae(" "+B(P(e)("config.promptConfig.createNew")),1)])]),l.value?(ne(),ue("div",cke,[D("div",uke,[D("h3",null,B(l.value.promptName),1),D("div",hke,[D("button",{class:"action-btn",onClick:E},[xe(P(Pe),{icon:"carbon:download"}),Ae(" "+B(P(e)("config.agentConfig.export")),1)]),l.value.builtIn?(ne(),ue("div",gke,[D("button",{class:"action-btn info",onClick:se[1]||(se[1]=V=>u.value=!0)},[xe(P(Pe),{icon:"carbon:language"}),Ae(" "+B(P(e)("config.promptConfig.resetToLanguageDefault")),1)])])):at("",!0),D("button",{class:"action-btn primary",onClick:S},[xe(P(Pe),{icon:"carbon:save"}),Ae(" "+B(P(e)("common.save")),1)]),l.value.builtIn?at("",!0):(ne(),ue("button",{key:1,class:"action-btn danger",onClick:$},[xe(P(Pe),{icon:"carbon:trash-can"}),Ae(" "+B(P(e)("common.delete")),1)]))])]),D("div",fke,[D("label",null,[Ae(B(P(e)("config.promptConfig.promptName"))+" ",1),se[21]||(se[21]=D("span",{class:"required"},"*",-1))]),Vt(D("input",{disabled:!0,type:"text","onUpdate:modelValue":se[2]||(se[2]=V=>l.value.promptName=V),placeholder:P(e)("config.promptConfig.placeholder"),required:""},null,8,pke),[[ti,l.value.promptName]])]),D("div",mke,[D("label",null,[Ae(B(P(e)("config.promptConfig.messageType"))+" ",1),se[22]||(se[22]=D("span",{class:"required"},"*",-1))]),l.value.builtIn?Vt((ne(),ue("input",{key:1,type:"text","onUpdate:modelValue":se[4]||(se[4]=V=>l.value.messageType=V),disabled:!0},null,512)),[[ti,l.value.messageType]]):(ne(),In(u1,{key:0,modelValue:l.value.messageType,"onUpdate:modelValue":se[3]||(se[3]=V=>l.value.messageType=V),options:v,disabled:l.value.builtIn,placeholder:P(e)("config.promptConfig.placeholder")},null,8,["modelValue","disabled","placeholder"]))]),D("div",_ke,[D("label",null,[Ae(B(P(e)("config.promptConfig.type"))+" ",1),se[23]||(se[23]=D("span",{class:"required"},"*",-1))]),l.value.builtIn?Vt((ne(),ue("input",{key:1,type:"text","onUpdate:modelValue":se[6]||(se[6]=V=>l.value.type=V),disabled:!0,required:""},null,512)),[[ti,l.value.type]]):(ne(),In(u1,{key:0,modelValue:l.value.type,"onUpdate:modelValue":se[5]||(se[5]=V=>l.value.type=V),options:_,disabled:l.value.builtIn,placeholder:P(e)("config.promptConfig.placeholder")},null,8,["modelValue","disabled","placeholder"]))]),D("div",vke,[D("label",null,B(P(e)("config.promptConfig.description")),1),Vt(D("textarea",{"onUpdate:modelValue":se[7]||(se[7]=V=>l.value.promptDescription=V),rows:"2",placeholder:P(e)("config.promptConfig.descriptionPlaceholder"),required:""},null,8,bke),[[ti,l.value.promptDescription]])]),D("div",Cke,[D("label",null,[Ae(B(P(e)("config.promptConfig.promptContent"))+" ",1),se[24]||(se[24]=D("span",{class:"required"},"*",-1))]),Vt(D("textarea",{"onUpdate:modelValue":se[8]||(se[8]=V=>l.value.promptContent=V),rows:"8",placeholder:P(e)("config.promptConfig.promptContentPlaceholder"),required:""},null,8,wke),[[ti,l.value.promptContent]])])])):(ne(),ue("div",Ske,[xe(P(Pe),{icon:"carbon:bot",class:"placeholder-icon"}),D("p",null,B(P(e)("config.promptConfig.selectPromptHint")),1)]))]),xe(Wo,{modelValue:d.value,"onUpdate:modelValue":se[14]||(se[14]=V=>d.value=V),title:P(e)("config.promptConfig.newPrompt"),onConfirm:I},{default:Zt(()=>[D("div",yke,[D("div",Lke,[D("label",null,[Ae(B(P(e)("config.promptConfig.promptName"))+" ",1),se[25]||(se[25]=D("span",{class:"required"},"*",-1))]),Vt(D("input",{type:"text","onUpdate:modelValue":se[9]||(se[9]=V=>C.promptName=V),placeholder:P(e)("config.promptConfig.placeholder"),required:""},null,8,Dke),[[ti,C.promptName]])]),D("div",xke,[D("label",null,[Ae(B(P(e)("config.promptConfig.messageType"))+" ",1),se[26]||(se[26]=D("span",{class:"required"},"*",-1))]),xe(u1,{modelValue:C.messageType,"onUpdate:modelValue":se[10]||(se[10]=V=>C.messageType=V),options:v,placeholder:P(e)("config.promptConfig.placeholder")},null,8,["modelValue","placeholder"])]),D("div",kke,[D("label",null,[Ae(B(P(e)("config.promptConfig.type"))+" ",1),se[27]||(se[27]=D("span",{class:"required"},"*",-1))]),xe(u1,{modelValue:C.type,"onUpdate:modelValue":se[11]||(se[11]=V=>C.type=V),options:_,placeholder:P(e)("config.promptConfig.placeholder")},null,8,["modelValue","placeholder"])]),D("div",Ike,[D("label",null,B(P(e)("config.promptConfig.description")),1),Vt(D("textarea",{"onUpdate:modelValue":se[12]||(se[12]=V=>C.promptDescription=V),rows:"3",placeholder:P(e)("config.promptConfig.descriptionPlaceholder")},null,8,Eke),[[ti,C.promptDescription]])]),D("div",Nke,[D("label",null,[Ae(B(P(e)("config.promptConfig.promptContent"))+" ",1),se[28]||(se[28]=D("span",{class:"required"},"*",-1))]),Vt(D("textarea",{"onUpdate:modelValue":se[13]||(se[13]=V=>C.promptContent=V),rows:"8",placeholder:P(e)("config.promptConfig.promptContentPlaceholder"),required:""},null,8,Tke),[[ti,C.promptContent]])])])]),_:1},8,["modelValue","title"]),xe(Wo,{modelValue:c.value,"onUpdate:modelValue":se[16]||(se[16]=V=>c.value=V),title:P(e)("config.promptConfig.deleteConfirm")},{footer:Zt(()=>[D("button",{class:"cancel-btn",onClick:se[15]||(se[15]=V=>c.value=!1)},B(P(e)("common.cancel")),1),D("button",{class:"confirm-btn danger",onClick:x},B(P(e)("common.delete")),1)]),default:Zt(()=>{var V;return[D("div",Mke,[xe(P(Pe),{icon:"carbon:warning",class:"warning-icon"}),D("p",null,[Ae(B(P(e)("config.promptConfig.deleteConfirmText"))+" ",1),D("strong",null,B((V=l.value)==null?void 0:V.promptName),1),Ae(" "+B(P(e)("common.confirm"))+"? ",1)]),D("p",Ake,B(P(e)("config.promptConfig.deleteWarning")),1)])]}),_:1},8,["modelValue","title"]),xe(Wo,{modelValue:u.value,"onUpdate:modelValue":se[18]||(se[18]=V=>u.value=V),title:P(e)("config.promptConfig.resetToLanguageDefault"),onConfirm:K},{default:Zt(()=>[D("div",Rke,[D("div",Pke,[D("label",null,B(P(e)("config.promptConfig.selectLanguage")),1),Vt(D("select",{"onUpdate:modelValue":se[17]||(se[17]=V=>g.value=V),class:"language-select-modal"},[(ne(!0),ue(Ji,null,ln(m.value,V=>(ne(),ue("option",{key:V,value:V},B(V==="zh"?"中文":"English"),9,Oke))),128))],512),[[X1,g.value]])]),D("div",Fke,[xe(P(Pe),{icon:"carbon:warning",class:"warning-icon-small"}),D("p",null,B(P(e)("config.promptConfig.resetLanguageWarning")),1)])])]),_:1},8,["modelValue","title"]),xe(Wo,{modelValue:h.value,"onUpdate:modelValue":se[20]||(se[20]=V=>h.value=V),title:P(e)("config.promptConfig.batchSwitchLanguage"),onConfirm:oe},{default:Zt(()=>[D("div",Bke,[D("div",Wke,[D("label",null,B(P(e)("config.promptConfig.selectLanguage")),1),Vt(D("select",{"onUpdate:modelValue":se[19]||(se[19]=V=>f.value=V),class:"language-select-modal"},[(ne(!0),ue(Ji,null,ln(m.value,V=>(ne(),ue("option",{key:V,value:V},B(V==="zh"?"中文":"English"),9,Vke))),128))],512),[[X1,f.value]])]),D("div",Hke,[xe(P(Pe),{icon:"carbon:warning",class:"warning-icon-small"}),D("p",null,B(P(e)("config.promptConfig.batchSwitchLanguageWarning")),1)])])]),_:1},8,["modelValue","title"])]),_:1}))}}),$ke=us(zke,[["__scopeId","data-v-86dcf751"]]);class qf{static async handleResponse(e){if(!e.ok)try{const t=await e.json();throw new Error(t.message||`API request failed: ${e.status}`)}catch{throw new Error(`API request failed: ${e.status} ${e.statusText}`)}return e}static async getAllNamespaces(){try{const e=await fetch(`${this.BASE_URL}`);return await(await this.handleResponse(e)).json()}catch(e){throw console.error("Failed to get Namespace list:",e),e}}static async getNamespaceById(e){try{const t=await fetch(`${this.BASE_URL}/${e}`);return await(await this.handleResponse(t)).json()}catch(t){throw console.error(`Failed to get Namespace[${e}] details:`,t),t}}static async createNamespace(e){try{const t=await fetch(this.BASE_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await(await this.handleResponse(t)).json()}catch(t){throw console.error("Failed to create Namespace:",t),t}}static async updateNamespace(e,t){try{const i=await fetch(`${this.BASE_URL}/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await(await this.handleResponse(i)).json()}catch(i){throw console.error(`Failed to update Namespace[${e}]:`,i),i}}static async deleteNamespace(e){try{const t=await fetch(`${this.BASE_URL}/${e}`,{method:"DELETE"});if(t.status===400)throw new Error("Cannot delete default Namespace");await this.handleResponse(t)}catch(t){throw console.error(`Failed to delete Namespace[${e}]:`,t),t}}}ri(qf,"BASE_URL","/api/namespaces");const Uke={class:"namespace-layout"},jke={class:"namespace-list"},Kke={class:"list-header"},qke={key:0,class:"namespaces-container"},Gke=["onClick"],Zke={class:"namespace-card-header"},Yke={class:"namespace-name"},Xke={key:0,class:"namespace-desc"},Qke={key:1,class:"loading-state"},Jke={key:0,class:"namespace-detail"},eIe={class:"detail-header"},tIe={class:"detail-actions"},iIe={class:"form-item"},nIe=["placeholder"],sIe={class:"form-item"},oIe=["placeholder"],rIe={class:"form-item"},aIe=["placeholder"],lIe={class:"form-item"},dIe=["placeholder"],cIe={key:1,class:"no-selection"},uIe={class:"modal-form"},hIe={class:"form-item"},gIe=["placeholder"],fIe={class:"form-item"},pIe=["placeholder"],mIe={class:"form-item"},_Ie=["placeholder"],vIe={class:"form-item"},bIe=["placeholder"],CIe={class:"delete-confirm"},wIe={class:"warning-text"},SIe=Ss({__name:"namespaceConfig",setup(o){const{t:e}=Pa(),{success:t,error:i}=M9(),n=sy(),{setNamespaces:s}=n,r=Ye(!1),a=ar([]),l=Ye(null),d=Ye(null),c=Ye(!1),u=Ye(!1),h={name:""},g=ar({...h}),f=async()=>{r.value=!0;try{const E=await qf.getAllNamespaces();E.length>0&&await m(E[0]),a.splice(0,a.length,...E)}catch(E){console.error("加载数据失败:",E),i(e("config.namespaceConfig.loadDataFailed")+": "+E.message)}finally{r.value=!1}},m=async E=>{l.value={...E},d.value={...E}},v=async()=>{if(w(g)&&x(g.host))try{const E={description:"",...g},R=await qf.createNamespace(E);a.push({...R}),l.value=R,d.value={...R},c.value=!1,C(),t(e("config.namespaceConfig.saveSuccess"))}catch(E){i(e("config.namespaceConfig.createFailed")+": "+E.message)}},_=async()=>{if(l.value&&w(l.value)&&x(l.value.host))try{const E=await qf.updateNamespace(l.value.id,l.value),R=a.findIndex(j=>j.id===E.id);R!==-1&&(a[R]=E),l.value={...E},d.value={...E},C(),t(e("config.namespaceConfig.saveSuccess"))}catch(E){i(e("config.namespaceConfig.saveFailed")+": "+E.message)}},b=async()=>{if(l.value)try{await qf.deleteNamespace(l.value.id);const E=a.findIndex(R=>R.id===l.value.id);E!==-1&&a.splice(E,1),l.value=a.length>0?a[0]:null,u.value=!1,C(),t(e("config.namespaceConfig.deleteSuccess"))}catch(E){i(e("config.namespaceConfig.deleteFailed")+": "+E.message)}},C=async()=>{s(a.map(E=>({id:E.code,name:E.name,host:E.host})))};function w(E){const R=["name","code"];for(const j of R){const O=E[j];if(O==null||typeof O=="string"&&O.trim()==="")return i(`${j} is required and cannot be empty`),!1}return!!S(a,E,["name","code"])}function S(E,R,j=["name","code"]){for(const O of j){let $;if(O in R)$=R[O];else continue;if(!($!=null&&$.trim()))continue;const K=E.find(oe=>oe[O]===$);if(!(K&&"id"in R&&K.id===R.id)&&K)return i(`${O} "${$}" already exists. Please use a different value.`),!1}return!0}const x=E=>{if(!E)return!0;const j=/^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/i.test(E);return j||i("Please enter a valid URL format"),j},y=()=>{g.name="",Object.assign(g,h),c.value=!0},I=()=>{u.value=!0};return Kd(()=>{f()}),(E,R)=>(ne(),In(Gb,null,{title:Zt(()=>[D("h2",null,B(P(e)("config.namespaceConfig.title")),1)]),default:Zt(()=>{var j;return[D("div",Uke,[D("div",jke,[D("div",Kke,[D("h3",null,B(P(e)("config.namespaceConfig.configured")),1)]),r.value?at("",!0):(ne(),ue("div",qke,[(ne(!0),ue(Ji,null,ln(a,O=>{var $,K;return ne(),ue("div",{key:O.id,class:Nn(["namespace-card",{active:(($=l.value)==null?void 0:$.id)===O.id}]),onClick:oe=>m(O)},[D("div",Zke,[D("span",Yke,B(O.name),1),xe(P(Pe),{icon:"carbon:chevron-right"})]),(K=O.description)!=null&&K.trim()?(ne(),ue("p",Xke,B(O.description),1)):at("",!0)],10,Gke)}),128))])),r.value?(ne(),ue("div",Qke,[xe(P(Pe),{icon:"carbon:loading",class:"loading-icon"}),Ae(" "+B(P(e)("common.loading")),1)])):at("",!0),D("button",{class:"add-btn",onClick:y},[xe(P(Pe),{icon:"carbon:add"}),Ae(" "+B(P(e)("config.namespaceConfig.createNew")),1)])]),l.value?(ne(),ue("div",Jke,[D("div",eIe,[D("h3",null,B(((j=d.value)==null?void 0:j.name)??""),1),D("div",tIe,[D("button",{class:"action-btn primary",onClick:_},[xe(P(Pe),{icon:"carbon:save"}),Ae(" "+B(P(e)("common.save")),1)]),l.value.code!=="default"?(ne(),ue("button",{key:0,class:"action-btn danger",onClick:I},[xe(P(Pe),{icon:"carbon:trash-can"}),Ae(" "+B(P(e)("common.delete")),1)])):at("",!0)])]),D("div",iIe,[D("label",null,[Ae(B(P(e)("config.namespaceConfig.name"))+" ",1),R[11]||(R[11]=D("span",{class:"required"},"*",-1))]),Vt(D("input",{type:"text","onUpdate:modelValue":R[0]||(R[0]=O=>l.value.name=O),placeholder:P(e)("config.namespaceConfig.placeholder"),required:""},null,8,nIe),[[ti,l.value.name]])]),D("div",sIe,[D("label",null,[Ae(B(P(e)("config.namespaceConfig.code"))+" ",1),R[12]||(R[12]=D("span",{class:"required"},"*",-1))]),Vt(D("input",{type:"text","onUpdate:modelValue":R[1]||(R[1]=O=>l.value.code=O),disabled:!0,placeholder:P(e)("config.namespaceConfig.placeholder"),required:""},null,8,oIe),[[ti,l.value.code]])]),D("div",rIe,[D("label",null,B(P(e)("config.namespaceConfig.host")),1),Vt(D("input",{type:"text","onUpdate:modelValue":R[2]||(R[2]=O=>l.value.host=O),placeholder:P(e)("config.namespaceConfig.placeholder"),required:""},null,8,aIe),[[ti,l.value.host]])]),D("div",lIe,[D("label",null,B(P(e)("config.namespaceConfig.description")),1),Vt(D("input",{type:"text","onUpdate:modelValue":R[3]||(R[3]=O=>l.value.description=O),placeholder:P(e)("config.namespaceConfig.placeholder")},null,8,dIe),[[ti,l.value.description]])])])):(ne(),ue("div",cIe,[xe(P(Pe),{icon:"carbon:bot",class:"placeholder-icon"}),D("p",null,B(P(e)("config.namespaceConfig.selectNameSpaceHint")),1)]))]),xe(Wo,{modelValue:c.value,"onUpdate:modelValue":R[8]||(R[8]=O=>c.value=O),title:P(e)("config.namespaceConfig.createNew"),onConfirm:v},{default:Zt(()=>[D("div",uIe,[D("div",hIe,[D("label",null,[Ae(B(P(e)("config.namespaceConfig.name"))+" ",1),R[13]||(R[13]=D("span",{class:"required"},"*",-1))]),Vt(D("input",{type:"text","onUpdate:modelValue":R[4]||(R[4]=O=>g.name=O),placeholder:P(e)("config.namespaceConfig.placeholder"),required:""},null,8,gIe),[[ti,g.name]])]),D("div",fIe,[D("label",null,[Ae(B(P(e)("config.namespaceConfig.code"))+" ",1),R[14]||(R[14]=D("span",{class:"required"},"*",-1))]),Vt(D("input",{type:"text","onUpdate:modelValue":R[5]||(R[5]=O=>g.code=O),placeholder:P(e)("config.namespaceConfig.placeholder"),required:""},null,8,pIe),[[ti,g.code]])]),D("div",mIe,[D("label",null,B(P(e)("config.namespaceConfig.host")),1),Vt(D("input",{type:"text","onUpdate:modelValue":R[6]||(R[6]=O=>g.host=O),placeholder:P(e)("config.namespaceConfig.placeholder"),required:""},null,8,_Ie),[[ti,g.host]])]),D("div",vIe,[D("label",null,B(P(e)("config.namespaceConfig.description")),1),Vt(D("input",{type:"text","onUpdate:modelValue":R[7]||(R[7]=O=>g.description=O),placeholder:P(e)("config.namespaceConfig.placeholder")},null,8,bIe),[[ti,g.description]])])])]),_:1},8,["modelValue","title"]),xe(Wo,{modelValue:u.value,"onUpdate:modelValue":R[10]||(R[10]=O=>u.value=O),title:P(e)("config.namespaceConfig.deleteConfirm")},{footer:Zt(()=>[D("button",{class:"cancel-btn",onClick:R[9]||(R[9]=O=>u.value=!1)},B(P(e)("common.cancel")),1),D("button",{class:"confirm-btn danger",onClick:b},B(P(e)("common.delete")),1)]),default:Zt(()=>{var O;return[D("div",CIe,[xe(P(Pe),{icon:"carbon:warning",class:"warning-icon"}),D("p",null,[Ae(B(P(e)("config.namespaceConfig.deleteConfirmText"))+" ",1),D("strong",null,B((O=l.value)==null?void 0:O.name),1),Ae(" "+B(P(e)("common.confirm"))+"? ",1)]),D("p",wIe,B(P(e)("config.namespaceConfig.deleteWarning")),1)])]}),_:1},8,["modelValue","title"])]}),_:1}))}}),yIe=us(SIe,[["__scopeId","data-v-c4f8fbf9"]]),LIe=Ss({__name:"namespaceSwitch",setup(o){const{t:e}=Pa(),t=T9(),i=N9(),n=sy(),{namespace:s,namespaces:r}=K2(n),{setCurrentNs:a,setNamespaces:l}=n,d=(h,g)=>{if(Gxe(g.host)){const f=g.host,m=f.endsWith("/")?f.slice(0,-1):f,v=new URL(m);if(v.pathname.includes("index.html")){window.open(v.toString(),"_blank");return}try{const _=new URL(window.location.href),b=new URL(_.pathname+_.search+_.hash,m);window.open(b.toString(),"_blank?namespace="+h)}catch(_){console.error("Failed to construct new URL:",_);const b=window.location.pathname+window.location.search,C=m+b;window.open(C,"_blank?namespace="+h)}}else a(h)},c=async()=>{var v;const h=await qf.getAllNamespaces(),g=window.location.host;let f="";const m=h.find(_=>{var b;return(b=_.host)==null?void 0:b.includes(g)});m?f=m.code:f=((v=h[0])==null?void 0:v.code)||"",a(f),l(h.map(_=>({id:_.code,name:_.name,host:_.host})))},u=()=>{i.push({name:t.name,params:{...t.params,category:"namespace"},query:{namespace:s.value}})};return Kd(async()=>{c()}),(h,g)=>(ne(),ue("div",null,[xe(Q1,{modelValue:P(s),"onUpdate:modelValue":g[0]||(g[0]=f=>Mz(s)?s.value=f:null),options:P(r),"dropdown-title":P(e)("config.namespaceConfig.namespace.namespace"),onChange:d,placeholder:P(e)("config.namespaceConfig.namespace.selectNamespace"),direction:"right",dropStyles:{minWidth:"220px"}},null,8,["modelValue","options","dropdown-title","placeholder"]),D("span",{onclick:"event.stopPropagation()",class:"setting-icon-wrapper",onClick:u},[xe(P(Pe),{icon:"carbon:settings-edit",class:"setting-icon",width:"20"})])]))}}),DIe=us(LIe,[["__scopeId","data-v-4727c0a4"]]),xIe={class:"config-container"},kIe={class:"config-header"},IIe={class:"header-actions"},EIe={class:"header-actions-left"},NIe={class:"header-actions-right"},TIe={class:"config-content"},MIe={class:"config-nav"},AIe=["onClick"],RIe={class:"config-details"},PIe=Ss({__name:"index",setup(o){const{t:e}=Pa(),t=T9(),i=N9(),n=Ye(t.params.category||"basic"),s={basic:xP,agent:hK,model:Zq,mcp:Bxe,prompt:$ke,namespace:yIe},r=Xn(()=>{const d=n.value;return s[d]||xP}),a=Xn(()=>[{key:"basic",label:e("config.categories.basic"),icon:"carbon:settings"},{key:"agent",label:e("config.categories.agent"),icon:"carbon:bot"},{key:"model",label:e("config.categories.model"),icon:"carbon:build-image"},{key:"mcp",label:e("config.categories.mcp"),icon:"carbon:tool-box"},{key:"prompt",label:e("config.categories.prompt"),icon:"carbon:repo-artifact"},{key:"namespace",label:e("config.categories.namespace"),disabled:!1,icon:"carbon:batch-job"}]);cr(()=>t.params.category,d=>{d&&(n.value=d)});const l=d=>{i.push({name:t.name,params:{...t.params,category:d},query:t.query})};return(d,c)=>(ne(),ue("div",xIe,[D("div",kIe,[D("div",IIe,[D("div",EIe,[D("button",{class:"action-btn",onClick:c[0]||(c[0]=u=>d.$router.push("/"))},[xe(P(Pe),{icon:"carbon:arrow-left"}),Ae(" "+B(d.$t("backHome")),1)]),xe(Pz)]),D("div",NIe,[xe(DIe)])])]),D("div",TIe,[D("nav",MIe,[(ne(!0),ue(Ji,null,ln(a.value,(u,h)=>(ne(),ue(Ji,null,[u.disabled?at("",!0):(ne(),ue("div",{key:h,class:Nn(["nav-item",{active:n.value===u.key}]),onClick:g=>l(u.key)},[xe(P(Pe),{icon:u.icon,width:"20"},null,8,["icon"]),D("span",null,B(u.label),1)],10,AIe))],64))),256))]),D("div",RIe,[(ne(),In(Az(r.value)))])])]))}}),OIe=us(PIe,[["__scopeId","data-v-29da4edc"]]),bMe=Object.freeze(Object.defineProperty({__proto__:null,default:OIe},Symbol.toStringTag,{value:"Module"}));export{bMe as i,k0 as m,qW as t}; +`):e("config.mcpConfig.jsonStatusInvalid"):e("config.mcpConfig.jsonStatusEmpty"),he=async()=>{try{d.value=!0,c.value=await od.getAllMcpServers(),c.value.length>0&&!u.value&&!g.value&&!f.value&&y(c.value[0])}catch(re){console.error("Failed to load MCP server list:",re),l(e("config.basicConfig.loadConfigFailed"),"error")}finally{d.value=!1}},se=async re=>{try{d.value=!0;let ke;re.status==="ENABLE"?ke=await od.disableMcpServer(re.id):ke=await od.enableMcpServer(re.id),ke.success?(re.status=re.status==="ENABLE"?"DISABLE":"ENABLE",l(ke.message||e("config.mcpConfig.statusToggleSuccess"))):l(ke.message||e("config.mcpConfig.statusToggleFailed"),"error")}catch(ke){console.error("Status toggle failed:",ke),l(e("config.mcpConfig.statusToggleFailed"),"error")}finally{d.value=!1}},V=()=>{u.value=null,g.value=!0,f.value=!1,Q()},Q=()=>{i()},H=()=>{f.value=!0,u.value=null,g.value=!1,v.value="",_.value=!0,b.value=[]},G=()=>{f.value=!1,u.value=null,g.value=!1,v.value="",_.value=!0,b.value=[]};cr(u,re=>{re&&n(re)},{immediate:!0}),Kd(()=>{he()});const Z=()=>{if(!u.value){l(e("config.mcpConfig.noServerSelected"),"error");return}h.value=!0},$e=async()=>{try{d.value=!0;const re=await od.getAllMcpServers(),ke={mcpServers:{}};re.forEach(Ct=>{try{const Mt=JSON.parse(Ct.connectionConfig);ke.mcpServers[Ct.mcpServerName]=Mt}catch(Mt){console.error(`Failed to parse server configuration: ${Ct.mcpServerName}`,Mt)}});const ce=new Blob([JSON.stringify(ke,null,2)],{type:"application/json"}),Ie=URL.createObjectURL(ce),mt=document.createElement("a");mt.href=Ie,mt.download="mcp_servers.json",document.body.appendChild(mt),mt.click(),document.body.removeChild(mt),URL.revokeObjectURL(Ie),l(e("config.mcpConfig.exportSuccess"))}catch(re){console.error("Failed to export MCP servers:",re),l(e("config.mcpConfig.exportFailed"),"error")}finally{d.value=!1}},ft=re=>{_.value=re.isValid,b.value=re.errors||[]},Bt=async()=>{var re;if(!v.value.trim()){l(e("config.mcpConfig.jsonConfigEmpty"),"error");return}try{const ke=JSON.parse(v.value),ce=$(ke);if(ce.isValid){d.value=!0;const Ie=await od.importMcpServers(ke);Ie.success?(l(e("config.mcpConfig.importSuccess")),await he()):l(Ie.message||e("config.mcpConfig.importFailed"),"error")}else l(((re=ce.errors)==null?void 0:re.join(` +`))||e("config.mcpConfig.importInvalidJson"),"error")}catch{l(e("config.mcpConfig.importFailed"),"error")}finally{d.value=!1,f.value=!1}},Ce=re=>{switch(re){case"STUDIO":return"carbon:plug";case"SSE":return"carbon:plug";case"STREAMING":return"carbon:plug";default:return"carbon:plug"}};return(re,ke)=>(ne(),In(Gb,null,{title:Zt(()=>[L("h2",null,B(P(e)("config.mcpConfig.title")),1)]),actions:Zt(()=>[L("div",jDe,[L("div",KDe,[L("button",{class:"action-btn",onClick:H},[xe(P(Re),{icon:"carbon:arrow-up"}),Pe(" "+B(P(e)("config.mcpConfig.importAll")),1)]),L("button",{class:"action-btn",onClick:$e},[xe(P(Re),{icon:"carbon:arrow-down"}),Pe(" "+B(P(e)("config.mcpConfig.exportAll")),1)])])])]),default:Zt(()=>[L("div",qDe,[L("div",GDe,[L("div",ZDe,[L("h3",null,B(P(e)("config.mcpConfig.serverList")),1),L("span",YDe,"("+B(c.value.length)+")",1)]),L("div",XDe,[Vt(L("input",{"onUpdate:modelValue":ke[0]||(ke[0]=ce=>C.value=ce),type:"text",placeholder:P(e)("config.mcpSearch"),class:"search-input"},null,8,QDe),[[ti,C.value]]),xe(P(Re),{icon:"carbon:search",class:"search-icon"})]),P(d)?at("",!0):(ne(),ue("div",JDe,[(ne(!0),ue(Ji,null,ln(S.value,ce=>{var Ie;return ne(),ue("div",{key:ce.id,class:Nn(["server-card",{active:((Ie=u.value)==null?void 0:Ie.id)===ce.id}]),onClick:mt=>y(ce)},[L("div",txe,[L("span",ixe,B(ce.mcpServerName),1),L("div",{class:"server-status-toggle",onClick:Zh(mt=>se(ce),["stop"])},[L("div",{class:Nn(["status-toggle",{enabled:ce.status==="ENABLE"}])},[ke[6]||(ke[6]=L("div",{class:"toggle-thumb"},null,-1)),L("span",sxe,B(ce.status==="ENABLE"?P(e)("config.mcpConfig.enabled"):P(e)("config.mcpConfig.disabled")),1)],2)],8,nxe)]),L("div",oxe,[xe(P(Re),{icon:Ce(ce.connectionType),class:"connection-type-icon"},null,8,["icon"]),L("span",{class:Nn(["connection-type-badge",ce.connectionType.toLowerCase()])},B(ce.connectionType),3)]),L("div",rxe,[x(ce,"command")?(ne(),ue("div",axe,[L("span",lxe,B(P(e)("config.mcpConfig.command"))+":",1),L("span",dxe,B(x(ce,"command")),1)])):at("",!0),x(ce,"url")?(ne(),ue("div",cxe,[L("span",uxe,B(P(e)("config.mcpConfig.url"))+":",1),L("span",hxe,B(x(ce,"url")),1)])):at("",!0),x(ce,"args")?(ne(),ue("div",gxe,[L("span",fxe,B(P(e)("config.mcpConfig.args"))+":",1),L("span",pxe,B(x(ce,"args")),1)])):at("",!0),x(ce,"env")?(ne(),ue("div",mxe,[L("span",_xe,B(P(e)("config.mcpConfig.env"))+":",1),L("span",vxe,B(x(ce,"env")),1)])):at("",!0)])],10,exe)}),128))])),P(d)?(ne(),ue("div",bxe,[xe(P(Re),{icon:"carbon:loading",class:"loading-icon"}),Pe(" "+B(P(e)("common.loading")),1)])):at("",!0),!P(d)&&S.value.length===0?(ne(),ue("div",Cxe,[xe(P(Re),{icon:"carbon:bot",class:"empty-icon"}),L("p",null,B(C.value?P(e)("config.notFound"):P(e)("config.mcpConfig.noServers")),1)])):at("",!0),L("div",wxe,[L("button",{class:"add-btn",onClick:V},[xe(P(Re),{icon:"carbon:add"}),Pe(" "+B(P(e)("config.mcpConfig.newMcpConfig")),1)])])]),u.value?(ne(),ue("div",Sxe,[L("div",yxe,[L("h3",null,B(u.value.mcpServerName),1),L("div",Lxe,[L("button",{class:"action-btn primary",onClick:j,disabled:P(d)},[xe(P(Re),{icon:"carbon:save"}),Pe(" "+B(P(e)("config.mcpConfig.save")),1)],8,Dxe),L("button",{class:"action-btn danger",onClick:Z,disabled:P(d)},[xe(P(Re),{icon:"carbon:trash-can"}),Pe(" "+B(P(e)("config.mcpConfig.delete")),1)],8,xxe)])]),L("div",kxe,[xe(k9,{"form-data":P(t),"is-edit-mode":!0,onConnectionTypeChange:P(r)},null,8,["form-data","onConnectionTypeChange"])])])):g.value?(ne(),ue("div",Ixe,[L("div",Exe,[L("h3",null,B(P(e)("config.mcpConfig.newMcpConfig")),1),L("div",Nxe,[L("button",{class:"action-btn primary",onClick:j,disabled:P(d)},[xe(P(Re),{icon:"carbon:save"}),Pe(" "+B(P(e)("config.mcpConfig.save")),1)],8,Txe),L("button",{class:"action-btn",onClick:Q},[xe(P(Re),{icon:"carbon:reset"}),Pe(" "+B(P(e)("config.mcpConfig.reset")),1)])])]),L("div",Mxe,[xe(k9,{"form-data":P(t),"is-edit-mode":!1,"onUpdate:formData":ke[1]||(ke[1]=ce=>Object.assign(P(t),ce)),onConnectionTypeChange:P(r)},null,8,["form-data","onConnectionTypeChange"])])])):f.value?(ne(),ue("div",Axe,[L("div",Rxe,[L("h3",null,B(P(e)("config.mcpConfig.importAll")),1),L("div",Pxe,[L("button",{class:"action-btn primary",onClick:Bt,disabled:P(d)},[xe(P(Re),{icon:"carbon:save"}),Pe(" "+B(P(e)("config.mcpConfig.import")),1)],8,Oxe),L("button",{class:"action-btn",onClick:G},[xe(P(Re),{icon:"carbon:close"}),Pe(" "+B(P(e)("config.mcpConfig.cancel")),1)])])]),L("div",Fxe,[xe(zDe,{modelValue:v.value,"onUpdate:modelValue":ke[2]||(ke[2]=ce=>v.value=ce),onValidationChange:ft},null,8,["modelValue"])])])):(ne(),ue("div",Bxe,[xe(P(Re),{icon:"carbon:bot",class:"placeholder-icon"}),L("p",null,B(P(e)("config.mcpConfig.selectServerHint")),1)]))]),xe(Wo,{modelValue:m.value,"onUpdate:modelValue":ke[4]||(ke[4]=ce=>m.value=ce),title:P(e)("config.mcpConfig.jsonEditor"),onConfirm:I},{default:Zt(()=>[L("div",Wxe,[L("div",Vxe,[L("span",{class:Nn(["json-status",{valid:_.value,invalid:!_.value&&v.value.trim()}])},B(Le()),3),v.value.trim()?(ne(),ue("button",{key:0,onClick:K,class:"format-btn",disabled:!_.value},[xe(P(Re),{icon:"carbon:settings"}),Pe(" "+B(P(e)("config.mcpConfig.formatJson")),1)],8,Hxe)):at("",!0)]),L("div",zxe,[xe(yz,{modelValue:v.value,"onUpdate:modelValue":ke[3]||(ke[3]=ce=>v.value=ce),placeholder:P(e)("config.mcpConfig.configJsonPlaceholder"),onChange:O,class:"json-editor",language:"json"},null,8,["modelValue","placeholder"])])])]),_:1},8,["modelValue","title"]),xe(Wo,{modelValue:h.value,"onUpdate:modelValue":ke[5]||(ke[5]=ce=>h.value=ce),title:P(e)("config.mcpConfig.confirmDelete"),onConfirm:R},{default:Zt(()=>[L("div",$xe,[xe(P(Re),{icon:"carbon:warning",class:"warning-icon"}),L("p",null,B(P(e)("config.mcpConfig.deleteConfirmMessage")),1),L("p",Uxe,B(P(e)("config.mcpConfig.deleteWarningText")),1)])]),_:1},8,["modelValue","title"]),xe(qb,{name:"message-fade"},{default:Zt(()=>[P(a).show?(ne(),ue("div",{key:0,class:Nn(["message-toast",P(a).type])},B(P(a).text),3)):at("",!0)]),_:1})]),_:1}))}}),Kxe=us(jxe,[["__scopeId","data-v-05c331dc"]]);class ld{static async getAll(){const e=await fetch(this.BASE_URL);if(!e.ok)throw new Error(`Failed to fetch prompts: ${e.statusText}`);return e.json()}static async getAllByNamespace(e){const t=await fetch(`${this.BASE_URL}/namespace/${e}`);if(!t.ok)throw new Error(`Failed to fetch prompts for namespace ${e}: ${t.statusText}`);return t.json()}static async getById(e){const t=await fetch(`${this.BASE_URL}/${e}`);if(!t.ok)throw new Error(`Failed to fetch prompt ${e}: ${t.statusText}`);return t.json()}static async create(e){const t=await fetch(this.BASE_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`Failed to create prompt: ${t.statusText}`);return t.json()}static async update(e,t){const i=await fetch(`${this.BASE_URL}/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!i.ok)throw new Error(`Failed to update prompt ${e}: ${i.statusText}`);return i.json()}static async delete(e){const t=await fetch(`${this.BASE_URL}/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`Failed to delete prompt ${e}: ${t.statusText}`)}static async getSupportedLanguages(){const e=await fetch(`${this.BASE_URL}/languages`);if(!e.ok)throw new Error(`Failed to fetch supported languages: ${e.statusText}`);return e.json()}static async importSpecificPromptFromLanguage(e,t){const i=await fetch(`${this.BASE_URL}/import/${e}/language/${t}`,{method:"POST"});if(!i.ok)throw new Error(`Failed to import specific prompt ${e} for language ${t}: ${i.statusText}`)}static async importAllPromptsFromLanguage(e){const t=await fetch(`/admin/prompts/switch-language?language=${e}`,{method:"POST"});if(!t.ok)throw new Error(`Failed to switch all prompts to language ${e}: ${t.statusText}`)}}ri(ld,"BASE_URL","/api/prompt");const qxe={class:"custom-select"},Gxe=["title"],Zxe={key:0,class:"current-option"},Yxe={class:"option-name"},Xxe={key:1,class:"current-option"},Qxe={class:"select-options"},Jxe=["onClick"],eke={class:"option-name"},tke=Ss({__name:"select",props:{modelValue:{},options:{},placeholder:{}},emits:["update:modelValue"],setup(o,{emit:e}){const t=o,i=e,n=Ye(!1),s=Xn(()=>t.options.find(d=>d.id===t.modelValue)),r=d=>d.id===t.modelValue,a=()=>{n.value=!n.value},l=d=>{i("update:modelValue",d.id),n.value=!1};return(d,c)=>(ne(),ue("div",qxe,[L("button",{class:"select-btn",onClick:a,title:d.placeholder},[s.value?(ne(),ue("span",Zxe,[L("span",Yxe,B(s.value.name),1)])):(ne(),ue("span",Xxe,B(d.placeholder),1)),xe(P(Re),{icon:n.value?"carbon:chevron-up":"carbon:chevron-down",width:"14",class:"chevron"},null,8,["icon"])],8,Gxe),xe(qb,{name:"slideDown"},{default:Zt(()=>[Vt(L("div",{class:"select-dropdown",onClick:c[0]||(c[0]=Zh(()=>{},["stop"]))},[L("div",Qxe,[(ne(!0),ue(Ji,null,ln(d.options,u=>(ne(),ue("button",{key:u.id,class:Nn(["select-option",{active:r(u)}]),onClick:h=>l(u)},[L("span",eke,B(u.name),1),r(u)?(ne(),In(P(Re),{key:0,icon:"carbon:checkmark",width:"16",class:"check-icon"})):at("",!0)],10,Jxe))),128))])],512),[[ny,n.value]])]),_:1}),n.value?(ne(),ue("div",{key:0,class:"backdrop",onClick:c[1]||(c[1]=u=>n.value=!1)})):at("",!0)]))}}),u1=us(tke,[["__scopeId","data-v-4c6d676f"]]);function ike(o){return!(o==null||typeof o=="string"&&o.trim()===""||Array.isArray(o)&&o.length===0||typeof o=="object"&&Object.keys(o).length===0)}function nke(o,e,t="application/json"){const i=JSON.stringify(o,null,2),n=new Blob([i],{type:t}),s=URL.createObjectURL(n),r=document.createElement("a");r.href=s,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(s)}const ske={class:"actions-container"},oke={class:"prompt-layout"},rke={class:"prompt-list"},ake={class:"list-header"},lke={class:"prompt-count"},dke={key:0,class:"prompts-container"},cke=["onClick"],uke={class:"prompt-card-header"},hke={class:"prompt-name"},gke={key:0,class:"prompt-desc"},fke={class:"tags"},pke={class:"tag"},mke={key:1,class:"loading-state"},_ke={key:2,class:"empty-state"},vke={key:0,class:"prompt-detail"},bke={class:"detail-header"},Cke={class:"detail-actions"},wke={key:0,class:"import-language-dropdown"},Ske={class:"form-item"},yke=["placeholder"],Lke={class:"form-item"},Dke={class:"form-item"},xke={class:"form-item"},kke=["placeholder"],Ike={class:"form-item"},Eke=["placeholder"],Nke={key:1,class:"no-selection"},Tke={class:"modal-form"},Mke={class:"form-item"},Ake=["placeholder"],Rke={class:"form-item"},Pke={class:"form-item"},Oke={class:"form-item"},Fke=["placeholder"],Bke={class:"form-item"},Wke=["placeholder"],Vke={class:"delete-confirm"},Hke={class:"warning-text"},zke={class:"modal-form"},$ke={class:"form-item"},Uke=["value"],jke={class:"warning-notice"},Kke={class:"modal-form"},qke={class:"form-item"},Gke=["value"],Zke={class:"warning-notice"},Yke=Ss({__name:"dynamicPromptConfig",setup(o){const{t:e}=Pa(),{success:t,error:i}=M9(),n=sy(),{namespace:s}=K2(n),r=Ye(!1),a=ar([]),l=Ye(null),d=Ye(!1),c=Ye(!1),u=Ye(!1),h=Ye(!1),g=Ye("zh"),f=Ye("zh"),m=Ye(["zh","en"]),v=[{id:"USER",name:"USER"},{id:"ASSISTANT",name:"ASSISTANT"},{id:"SYSTEM",name:"SYSTEM"},{id:"TOOL",name:"TOOL"}],_=[{id:"LLM",name:"LLM"},{id:"PLANNING",name:"PLANNING"},{id:"AGENT",name:"AGENT"}],b={promptName:"",messageType:"",type:"",promptDescription:""},C=ar({...b}),w=async()=>{r.value=!0;try{const he=await ld.getAllByNamespace(s.value);he.length>0&&await y(he[0]),a.splice(0,a.length,...he)}catch(he){console.error("Failed to load data:",he),i(e("config.promptConfig.loadDataFailed")+": "+he.message)}finally{r.value=!1}},S=async()=>{if(l.value&&R(l.value))try{const he=await ld.update(l.value.id,l.value),se=a.findIndex(V=>V.id===he.id);se!==-1&&(a[se]=he),l.value={...he},t(e("config.promptConfig.saveSuccess"))}catch(he){i(e("config.promptConfig.saveFailed")+": "+he.message)}},x=async()=>{if(l.value)try{await ld.delete(l.value.id);const he=a.findIndex(se=>se.id===l.value.id);he!==-1&&a.splice(he,1),l.value=a.length>0?a[0]:null,c.value=!1,t(e("config.promptConfig.deleteSuccess"))}catch(he){i(e("config.promptConfig.deleteFailed")+": "+he.message)}},y=async he=>{try{const se=await ld.getById(he.id);l.value={...se}}catch(se){console.error("Failed to load Prompt details:",se),i(e("config.promptConfig.loadDetailsFailed")+": "+se.message),l.value={...he}}},I=async()=>{if(R(C))try{const he={...C,namespace:s.value,builtIn:!1},se=await ld.create(he);a.push(se),l.value=se,d.value=!1,t(e("config.promptConfig.createSuccess"))}catch(he){i(e("config.promptConfig.createFailed")+": "+he.message)}},E=()=>{try{const he=l.value;nke(he,`prompt-${he.promptName}-${new Date().toISOString().split("T")[0]}.json`),t(e("config.agentConfig.exportSuccess"))}catch(he){i(e("config.agentConfig.exportFailed")+": "+he.message)}};function R(he){const se=["promptName","messageType","type","promptContent"];for(const Q of se){const H=he[Q];if(H==null||typeof H=="string"&&H.trim()==="")return i(`${Q} is required and cannot be empty`),!1}return!!j(a,he)}function j(he,se){const V=he.find(Q=>Q.promptName===se.promptName);return V&&se.id&&V.id!==se.id?(i(`Name "${se.promptName}" already exists. Please use a different name.`),!1):V&&!se.id?(i(`Name "${se.promptName}" already exists. Please use a different name.`),!1):!0}const O=()=>{C.promptName="",C.promptDescription="",C.promptContent="",Object.assign(C,b),d.value=!0},$=()=>{c.value=!0},K=async()=>{if(l.value)try{await ld.importSpecificPromptFromLanguage(l.value.promptName,g.value),u.value=!1,t(e("config.promptConfig.resetToLanguageDefaultSuccess")),await w()}catch(he){i(e("config.promptConfig.resetToLanguageDefaultFailed")+": "+he.message)}},oe=async()=>{try{await ld.importAllPromptsFromLanguage(f.value),h.value=!1,t(e("config.promptConfig.batchSwitchLanguageSuccess")),await w()}catch(he){i(e("config.promptConfig.batchSwitchLanguageFailed")+": "+he.message)}},Le=async()=>{try{const he=await ld.getSupportedLanguages();m.value=he}catch(he){console.warn("Failed to load supported languages, using default",he)}};return Kd(async()=>{await Le(),await w()}),cr(()=>s.value,(he,se)=>{he!==se&&(a.splice(0),l.value=null,w())}),(he,se)=>(ne(),In(Gb,null,{title:Zt(()=>[L("h2",null,B(P(e)("config.promptConfig.title")),1)]),actions:Zt(()=>[L("div",ske,[L("button",{class:"action-btn info",onClick:se[0]||(se[0]=V=>h.value=!0)},[xe(P(Re),{icon:"carbon:language"}),Pe(" "+B(P(e)("config.promptConfig.batchSwitchLanguage")),1)]),L("button",{class:"action-btn",onClick:E},[xe(P(Re),{icon:"carbon:download"}),Pe(" "+B(P(e)("config.agentConfig.export")),1)])])]),default:Zt(()=>[L("div",oke,[L("div",rke,[L("div",ake,[L("h3",null,B(P(e)("config.promptConfig.configuredprompts")),1),L("span",lke,"("+B(a.length)+B(P(e)("config.promptConfig.promptCount"))+")",1)]),r.value?at("",!0):(ne(),ue("div",dke,[(ne(!0),ue(Ji,null,ln(a,V=>{var Q,H;return ne(),ue("div",{key:V.id,class:Nn(["prompt-card",{active:((Q=l.value)==null?void 0:Q.id)===V.id}]),onClick:G=>y(V)},[L("div",uke,[L("span",hke,B(V.promptName),1),xe(P(Re),{icon:"carbon:chevron-right"})]),(H=V.promptDescription)!=null&&H.trim()?(ne(),ue("p",gke,B(V.promptDescription),1)):at("",!0),L("div",fke,[L("span",pke,B(V.builtIn?P(e)("config.promptConfig.builtIn"):P(e)("config.promptConfig.custom")),1)])],10,cke)}),128))])),r.value?(ne(),ue("div",mke,[xe(P(Re),{icon:"carbon:loading",class:"loading-icon"}),Pe(" "+B(P(e)("common.loading")),1)])):at("",!0),!r.value&&a.length===0?(ne(),ue("div",_ke,[xe(P(Re),{icon:"carbon:bot",class:"empty-icon"}),L("p",null,B(P(e)("config.promptConfig.noPrompts")),1)])):at("",!0),L("button",{class:"add-btn",onClick:O},[xe(P(Re),{icon:"carbon:add"}),Pe(" "+B(P(e)("config.promptConfig.createNew")),1)])]),l.value?(ne(),ue("div",vke,[L("div",bke,[L("h3",null,B(l.value.promptName),1),L("div",Cke,[L("button",{class:"action-btn",onClick:E},[xe(P(Re),{icon:"carbon:download"}),Pe(" "+B(P(e)("config.agentConfig.export")),1)]),l.value.builtIn?(ne(),ue("div",wke,[L("button",{class:"action-btn info",onClick:se[1]||(se[1]=V=>u.value=!0)},[xe(P(Re),{icon:"carbon:language"}),Pe(" "+B(P(e)("config.promptConfig.resetToLanguageDefault")),1)])])):at("",!0),L("button",{class:"action-btn primary",onClick:S},[xe(P(Re),{icon:"carbon:save"}),Pe(" "+B(P(e)("common.save")),1)]),l.value.builtIn?at("",!0):(ne(),ue("button",{key:1,class:"action-btn danger",onClick:$},[xe(P(Re),{icon:"carbon:trash-can"}),Pe(" "+B(P(e)("common.delete")),1)]))])]),L("div",Ske,[L("label",null,[Pe(B(P(e)("config.promptConfig.promptName"))+" ",1),se[21]||(se[21]=L("span",{class:"required"},"*",-1))]),Vt(L("input",{disabled:!0,type:"text","onUpdate:modelValue":se[2]||(se[2]=V=>l.value.promptName=V),placeholder:P(e)("config.promptConfig.placeholder"),required:""},null,8,yke),[[ti,l.value.promptName]])]),L("div",Lke,[L("label",null,[Pe(B(P(e)("config.promptConfig.messageType"))+" ",1),se[22]||(se[22]=L("span",{class:"required"},"*",-1))]),l.value.builtIn?Vt((ne(),ue("input",{key:1,type:"text","onUpdate:modelValue":se[4]||(se[4]=V=>l.value.messageType=V),disabled:!0},null,512)),[[ti,l.value.messageType]]):(ne(),In(u1,{key:0,modelValue:l.value.messageType,"onUpdate:modelValue":se[3]||(se[3]=V=>l.value.messageType=V),options:v,disabled:l.value.builtIn,placeholder:P(e)("config.promptConfig.placeholder")},null,8,["modelValue","disabled","placeholder"]))]),L("div",Dke,[L("label",null,[Pe(B(P(e)("config.promptConfig.type"))+" ",1),se[23]||(se[23]=L("span",{class:"required"},"*",-1))]),l.value.builtIn?Vt((ne(),ue("input",{key:1,type:"text","onUpdate:modelValue":se[6]||(se[6]=V=>l.value.type=V),disabled:!0,required:""},null,512)),[[ti,l.value.type]]):(ne(),In(u1,{key:0,modelValue:l.value.type,"onUpdate:modelValue":se[5]||(se[5]=V=>l.value.type=V),options:_,disabled:l.value.builtIn,placeholder:P(e)("config.promptConfig.placeholder")},null,8,["modelValue","disabled","placeholder"]))]),L("div",xke,[L("label",null,B(P(e)("config.promptConfig.description")),1),Vt(L("textarea",{"onUpdate:modelValue":se[7]||(se[7]=V=>l.value.promptDescription=V),rows:"2",placeholder:P(e)("config.promptConfig.descriptionPlaceholder"),required:""},null,8,kke),[[ti,l.value.promptDescription]])]),L("div",Ike,[L("label",null,[Pe(B(P(e)("config.promptConfig.promptContent"))+" ",1),se[24]||(se[24]=L("span",{class:"required"},"*",-1))]),Vt(L("textarea",{"onUpdate:modelValue":se[8]||(se[8]=V=>l.value.promptContent=V),rows:"8",placeholder:P(e)("config.promptConfig.promptContentPlaceholder"),required:""},null,8,Eke),[[ti,l.value.promptContent]])])])):(ne(),ue("div",Nke,[xe(P(Re),{icon:"carbon:bot",class:"placeholder-icon"}),L("p",null,B(P(e)("config.promptConfig.selectPromptHint")),1)]))]),xe(Wo,{modelValue:d.value,"onUpdate:modelValue":se[14]||(se[14]=V=>d.value=V),title:P(e)("config.promptConfig.newPrompt"),onConfirm:I},{default:Zt(()=>[L("div",Tke,[L("div",Mke,[L("label",null,[Pe(B(P(e)("config.promptConfig.promptName"))+" ",1),se[25]||(se[25]=L("span",{class:"required"},"*",-1))]),Vt(L("input",{type:"text","onUpdate:modelValue":se[9]||(se[9]=V=>C.promptName=V),placeholder:P(e)("config.promptConfig.placeholder"),required:""},null,8,Ake),[[ti,C.promptName]])]),L("div",Rke,[L("label",null,[Pe(B(P(e)("config.promptConfig.messageType"))+" ",1),se[26]||(se[26]=L("span",{class:"required"},"*",-1))]),xe(u1,{modelValue:C.messageType,"onUpdate:modelValue":se[10]||(se[10]=V=>C.messageType=V),options:v,placeholder:P(e)("config.promptConfig.placeholder")},null,8,["modelValue","placeholder"])]),L("div",Pke,[L("label",null,[Pe(B(P(e)("config.promptConfig.type"))+" ",1),se[27]||(se[27]=L("span",{class:"required"},"*",-1))]),xe(u1,{modelValue:C.type,"onUpdate:modelValue":se[11]||(se[11]=V=>C.type=V),options:_,placeholder:P(e)("config.promptConfig.placeholder")},null,8,["modelValue","placeholder"])]),L("div",Oke,[L("label",null,B(P(e)("config.promptConfig.description")),1),Vt(L("textarea",{"onUpdate:modelValue":se[12]||(se[12]=V=>C.promptDescription=V),rows:"3",placeholder:P(e)("config.promptConfig.descriptionPlaceholder")},null,8,Fke),[[ti,C.promptDescription]])]),L("div",Bke,[L("label",null,[Pe(B(P(e)("config.promptConfig.promptContent"))+" ",1),se[28]||(se[28]=L("span",{class:"required"},"*",-1))]),Vt(L("textarea",{"onUpdate:modelValue":se[13]||(se[13]=V=>C.promptContent=V),rows:"8",placeholder:P(e)("config.promptConfig.promptContentPlaceholder"),required:""},null,8,Wke),[[ti,C.promptContent]])])])]),_:1},8,["modelValue","title"]),xe(Wo,{modelValue:c.value,"onUpdate:modelValue":se[16]||(se[16]=V=>c.value=V),title:P(e)("config.promptConfig.deleteConfirm")},{footer:Zt(()=>[L("button",{class:"cancel-btn",onClick:se[15]||(se[15]=V=>c.value=!1)},B(P(e)("common.cancel")),1),L("button",{class:"confirm-btn danger",onClick:x},B(P(e)("common.delete")),1)]),default:Zt(()=>{var V;return[L("div",Vke,[xe(P(Re),{icon:"carbon:warning",class:"warning-icon"}),L("p",null,[Pe(B(P(e)("config.promptConfig.deleteConfirmText"))+" ",1),L("strong",null,B((V=l.value)==null?void 0:V.promptName),1),Pe(" "+B(P(e)("common.confirm"))+"? ",1)]),L("p",Hke,B(P(e)("config.promptConfig.deleteWarning")),1)])]}),_:1},8,["modelValue","title"]),xe(Wo,{modelValue:u.value,"onUpdate:modelValue":se[18]||(se[18]=V=>u.value=V),title:P(e)("config.promptConfig.resetToLanguageDefault"),onConfirm:K},{default:Zt(()=>[L("div",zke,[L("div",$ke,[L("label",null,B(P(e)("config.promptConfig.selectLanguage")),1),Vt(L("select",{"onUpdate:modelValue":se[17]||(se[17]=V=>g.value=V),class:"language-select-modal"},[(ne(!0),ue(Ji,null,ln(m.value,V=>(ne(),ue("option",{key:V,value:V},B(V==="zh"?P(e)("language.zh"):P(e)("language.en")),9,Uke))),128))],512),[[X1,g.value]])]),L("div",jke,[xe(P(Re),{icon:"carbon:warning",class:"warning-icon-small"}),L("p",null,B(P(e)("config.promptConfig.resetLanguageWarning")),1)])])]),_:1},8,["modelValue","title"]),xe(Wo,{modelValue:h.value,"onUpdate:modelValue":se[20]||(se[20]=V=>h.value=V),title:P(e)("config.promptConfig.batchSwitchLanguage"),onConfirm:oe},{default:Zt(()=>[L("div",Kke,[L("div",qke,[L("label",null,B(P(e)("config.promptConfig.selectLanguage")),1),Vt(L("select",{"onUpdate:modelValue":se[19]||(se[19]=V=>f.value=V),class:"language-select-modal"},[(ne(!0),ue(Ji,null,ln(m.value,V=>(ne(),ue("option",{key:V,value:V},B(V==="zh"?P(e)("language.zh"):P(e)("language.en")),9,Gke))),128))],512),[[X1,f.value]])]),L("div",Zke,[xe(P(Re),{icon:"carbon:warning",class:"warning-icon-small"}),L("p",null,B(P(e)("config.promptConfig.batchSwitchLanguageWarning")),1)])])]),_:1},8,["modelValue","title"])]),_:1}))}}),Xke=us(Yke,[["__scopeId","data-v-7add0284"]]);class qf{static async handleResponse(e){if(!e.ok)try{const t=await e.json();throw new Error(t.message||`API request failed: ${e.status}`)}catch{throw new Error(`API request failed: ${e.status} ${e.statusText}`)}return e}static async getAllNamespaces(){try{const e=await fetch(`${this.BASE_URL}`);return await(await this.handleResponse(e)).json()}catch(e){throw console.error("Failed to get Namespace list:",e),e}}static async getNamespaceById(e){try{const t=await fetch(`${this.BASE_URL}/${e}`);return await(await this.handleResponse(t)).json()}catch(t){throw console.error(`Failed to get Namespace[${e}] details:`,t),t}}static async createNamespace(e){try{const t=await fetch(this.BASE_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await(await this.handleResponse(t)).json()}catch(t){throw console.error("Failed to create Namespace:",t),t}}static async updateNamespace(e,t){try{const i=await fetch(`${this.BASE_URL}/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return await(await this.handleResponse(i)).json()}catch(i){throw console.error(`Failed to update Namespace[${e}]:`,i),i}}static async deleteNamespace(e){try{const t=await fetch(`${this.BASE_URL}/${e}`,{method:"DELETE"});if(t.status===400)throw new Error("Cannot delete default Namespace");await this.handleResponse(t)}catch(t){throw console.error(`Failed to delete Namespace[${e}]:`,t),t}}}ri(qf,"BASE_URL","/api/namespaces");const Qke={class:"namespace-layout"},Jke={class:"namespace-list"},eIe={class:"list-header"},tIe={key:0,class:"namespaces-container"},iIe=["onClick"],nIe={class:"namespace-card-header"},sIe={class:"namespace-name"},oIe={key:0,class:"namespace-desc"},rIe={key:1,class:"loading-state"},aIe={key:0,class:"namespace-detail"},lIe={class:"detail-header"},dIe={class:"detail-actions"},cIe={class:"form-item"},uIe=["placeholder"],hIe={class:"form-item"},gIe=["placeholder"],fIe={class:"form-item"},pIe=["placeholder"],mIe={class:"form-item"},_Ie=["placeholder"],vIe={key:1,class:"no-selection"},bIe={class:"modal-form"},CIe={class:"form-item"},wIe=["placeholder"],SIe={class:"form-item"},yIe=["placeholder"],LIe={class:"form-item"},DIe=["placeholder"],xIe={class:"form-item"},kIe=["placeholder"],IIe={class:"delete-confirm"},EIe={class:"warning-text"},NIe=Ss({__name:"namespaceConfig",setup(o){const{t:e}=Pa(),{success:t,error:i}=M9(),n=sy(),{setNamespaces:s}=n,r=Ye(!1),a=ar([]),l=Ye(null),d=Ye(null),c=Ye(!1),u=Ye(!1),h={name:""},g=ar({...h}),f=async()=>{r.value=!0;try{const E=await qf.getAllNamespaces();E.length>0&&await m(E[0]),a.splice(0,a.length,...E)}catch(E){console.error("Failed to load data:",E),i(e("config.namespaceConfig.loadDataFailed")+": "+E.message)}finally{r.value=!1}},m=async E=>{l.value={...E},d.value={...E}},v=async()=>{if(w(g)&&x(g.host))try{const E={description:"",...g},R=await qf.createNamespace(E);a.push({...R}),l.value=R,d.value={...R},c.value=!1,C(),t(e("config.namespaceConfig.saveSuccess"))}catch(E){i(e("config.namespaceConfig.createFailed")+": "+E.message)}},_=async()=>{if(l.value&&w(l.value)&&x(l.value.host))try{const E=await qf.updateNamespace(l.value.id,l.value),R=a.findIndex(j=>j.id===E.id);R!==-1&&(a[R]=E),l.value={...E},d.value={...E},C(),t(e("config.namespaceConfig.saveSuccess"))}catch(E){i(e("config.namespaceConfig.saveFailed")+": "+E.message)}},b=async()=>{if(l.value)try{await qf.deleteNamespace(l.value.id);const E=a.findIndex(R=>R.id===l.value.id);E!==-1&&a.splice(E,1),l.value=a.length>0?a[0]:null,u.value=!1,C(),t(e("config.namespaceConfig.deleteSuccess"))}catch(E){i(e("config.namespaceConfig.deleteFailed")+": "+E.message)}},C=async()=>{s(a.map(E=>({id:E.code,name:E.name,host:E.host})))};function w(E){const R=["name","code"];for(const j of R){const O=E[j];if(O==null||typeof O=="string"&&O.trim()==="")return i(`${j} is required and cannot be empty`),!1}return!!S(a,E,["name","code"])}function S(E,R,j=["name","code"]){for(const O of j){let $;if(O in R)$=R[O];else continue;if(!($!=null&&$.trim()))continue;const K=E.find(oe=>oe[O]===$);if(!(K&&"id"in R&&K.id===R.id)&&K)return i(`${O} "${$}" already exists. Please use a different value.`),!1}return!0}const x=E=>{if(!E)return!0;const j=/^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/i.test(E);return j||i("Please enter a valid URL format"),j},y=()=>{g.name="",Object.assign(g,h),c.value=!0},I=()=>{u.value=!0};return Kd(()=>{f()}),(E,R)=>(ne(),In(Gb,null,{title:Zt(()=>[L("h2",null,B(P(e)("config.namespaceConfig.title")),1)]),default:Zt(()=>{var j;return[L("div",Qke,[L("div",Jke,[L("div",eIe,[L("h3",null,B(P(e)("config.namespaceConfig.configured")),1)]),r.value?at("",!0):(ne(),ue("div",tIe,[(ne(!0),ue(Ji,null,ln(a,O=>{var $,K;return ne(),ue("div",{key:O.id,class:Nn(["namespace-card",{active:(($=l.value)==null?void 0:$.id)===O.id}]),onClick:oe=>m(O)},[L("div",nIe,[L("span",sIe,B(O.name),1),xe(P(Re),{icon:"carbon:chevron-right"})]),(K=O.description)!=null&&K.trim()?(ne(),ue("p",oIe,B(O.description),1)):at("",!0)],10,iIe)}),128))])),r.value?(ne(),ue("div",rIe,[xe(P(Re),{icon:"carbon:loading",class:"loading-icon"}),Pe(" "+B(P(e)("common.loading")),1)])):at("",!0),L("button",{class:"add-btn",onClick:y},[xe(P(Re),{icon:"carbon:add"}),Pe(" "+B(P(e)("config.namespaceConfig.createNew")),1)])]),l.value?(ne(),ue("div",aIe,[L("div",lIe,[L("h3",null,B(((j=d.value)==null?void 0:j.name)??""),1),L("div",dIe,[L("button",{class:"action-btn primary",onClick:_},[xe(P(Re),{icon:"carbon:save"}),Pe(" "+B(P(e)("common.save")),1)]),l.value.code!=="default"?(ne(),ue("button",{key:0,class:"action-btn danger",onClick:I},[xe(P(Re),{icon:"carbon:trash-can"}),Pe(" "+B(P(e)("common.delete")),1)])):at("",!0)])]),L("div",cIe,[L("label",null,[Pe(B(P(e)("config.namespaceConfig.name"))+" ",1),R[11]||(R[11]=L("span",{class:"required"},"*",-1))]),Vt(L("input",{type:"text","onUpdate:modelValue":R[0]||(R[0]=O=>l.value.name=O),placeholder:P(e)("config.namespaceConfig.placeholder"),required:""},null,8,uIe),[[ti,l.value.name]])]),L("div",hIe,[L("label",null,[Pe(B(P(e)("config.namespaceConfig.code"))+" ",1),R[12]||(R[12]=L("span",{class:"required"},"*",-1))]),Vt(L("input",{type:"text","onUpdate:modelValue":R[1]||(R[1]=O=>l.value.code=O),disabled:!0,placeholder:P(e)("config.namespaceConfig.placeholder"),required:""},null,8,gIe),[[ti,l.value.code]])]),L("div",fIe,[L("label",null,B(P(e)("config.namespaceConfig.host")),1),Vt(L("input",{type:"text","onUpdate:modelValue":R[2]||(R[2]=O=>l.value.host=O),placeholder:P(e)("config.namespaceConfig.placeholder"),required:""},null,8,pIe),[[ti,l.value.host]])]),L("div",mIe,[L("label",null,B(P(e)("config.namespaceConfig.description")),1),Vt(L("input",{type:"text","onUpdate:modelValue":R[3]||(R[3]=O=>l.value.description=O),placeholder:P(e)("config.namespaceConfig.placeholder")},null,8,_Ie),[[ti,l.value.description]])])])):(ne(),ue("div",vIe,[xe(P(Re),{icon:"carbon:bot",class:"placeholder-icon"}),L("p",null,B(P(e)("config.namespaceConfig.selectNameSpaceHint")),1)]))]),xe(Wo,{modelValue:c.value,"onUpdate:modelValue":R[8]||(R[8]=O=>c.value=O),title:P(e)("config.namespaceConfig.createNew"),onConfirm:v},{default:Zt(()=>[L("div",bIe,[L("div",CIe,[L("label",null,[Pe(B(P(e)("config.namespaceConfig.name"))+" ",1),R[13]||(R[13]=L("span",{class:"required"},"*",-1))]),Vt(L("input",{type:"text","onUpdate:modelValue":R[4]||(R[4]=O=>g.name=O),placeholder:P(e)("config.namespaceConfig.placeholder"),required:""},null,8,wIe),[[ti,g.name]])]),L("div",SIe,[L("label",null,[Pe(B(P(e)("config.namespaceConfig.code"))+" ",1),R[14]||(R[14]=L("span",{class:"required"},"*",-1))]),Vt(L("input",{type:"text","onUpdate:modelValue":R[5]||(R[5]=O=>g.code=O),placeholder:P(e)("config.namespaceConfig.placeholder"),required:""},null,8,yIe),[[ti,g.code]])]),L("div",LIe,[L("label",null,B(P(e)("config.namespaceConfig.host")),1),Vt(L("input",{type:"text","onUpdate:modelValue":R[6]||(R[6]=O=>g.host=O),placeholder:P(e)("config.namespaceConfig.placeholder"),required:""},null,8,DIe),[[ti,g.host]])]),L("div",xIe,[L("label",null,B(P(e)("config.namespaceConfig.description")),1),Vt(L("input",{type:"text","onUpdate:modelValue":R[7]||(R[7]=O=>g.description=O),placeholder:P(e)("config.namespaceConfig.placeholder")},null,8,kIe),[[ti,g.description]])])])]),_:1},8,["modelValue","title"]),xe(Wo,{modelValue:u.value,"onUpdate:modelValue":R[10]||(R[10]=O=>u.value=O),title:P(e)("config.namespaceConfig.deleteConfirm")},{footer:Zt(()=>[L("button",{class:"cancel-btn",onClick:R[9]||(R[9]=O=>u.value=!1)},B(P(e)("common.cancel")),1),L("button",{class:"confirm-btn danger",onClick:b},B(P(e)("common.delete")),1)]),default:Zt(()=>{var O;return[L("div",IIe,[xe(P(Re),{icon:"carbon:warning",class:"warning-icon"}),L("p",null,[Pe(B(P(e)("config.namespaceConfig.deleteConfirmText"))+" ",1),L("strong",null,B((O=l.value)==null?void 0:O.name),1),Pe(" "+B(P(e)("common.confirm"))+"? ",1)]),L("p",EIe,B(P(e)("config.namespaceConfig.deleteWarning")),1)])]}),_:1},8,["modelValue","title"])]}),_:1}))}}),TIe=us(NIe,[["__scopeId","data-v-1399730e"]]),MIe=Ss({__name:"namespaceSwitch",setup(o){const{t:e}=Pa(),t=T9(),i=N9(),n=sy(),{namespace:s,namespaces:r}=K2(n),{setCurrentNs:a,setNamespaces:l}=n,d=(h,g)=>{if(ike(g.host)){const f=g.host,m=f.endsWith("/")?f.slice(0,-1):f,v=new URL(m);if(v.pathname.includes("index.html")){window.open(v.toString(),"_blank");return}try{const _=new URL(window.location.href),b=new URL(_.pathname+_.search+_.hash,m);window.open(b.toString(),"_blank?namespace="+h)}catch(_){console.error("Failed to construct new URL:",_);const b=window.location.pathname+window.location.search,C=m+b;window.open(C,"_blank?namespace="+h)}}else a(h)},c=async()=>{var v;const h=await qf.getAllNamespaces(),g=window.location.host;let f="";const m=h.find(_=>{var b;return(b=_.host)==null?void 0:b.includes(g)});m?f=m.code:f=((v=h[0])==null?void 0:v.code)||"",a(f),l(h.map(_=>({id:_.code,name:_.name,host:_.host})))},u=()=>{i.push({name:t.name,params:{...t.params,category:"namespace"},query:{namespace:s.value}})};return Kd(async()=>{c()}),(h,g)=>(ne(),ue("div",null,[xe(Q1,{modelValue:P(s),"onUpdate:modelValue":g[0]||(g[0]=f=>Tz(s)?s.value=f:null),options:P(r),"dropdown-title":P(e)("config.namespaceConfig.namespace.namespace"),onChange:d,placeholder:P(e)("config.namespaceConfig.namespace.selectNamespace"),direction:"right",dropStyles:{minWidth:"220px"}},null,8,["modelValue","options","dropdown-title","placeholder"]),L("span",{onclick:"event.stopPropagation()",class:"setting-icon-wrapper",onClick:u},[xe(P(Re),{icon:"carbon:settings-edit",class:"setting-icon",width:"20"})])]))}}),AIe=us(MIe,[["__scopeId","data-v-4727c0a4"]]),RIe={class:"config-container"},PIe={class:"config-header"},OIe={class:"header-actions"},FIe={class:"header-actions-left"},BIe={class:"header-actions-right"},WIe={class:"config-content"},VIe={class:"config-nav"},HIe=["onClick"],zIe={class:"config-details"},$Ie=Ss({__name:"index",setup(o){const{t:e}=Pa(),t=T9(),i=N9(),n=Ye(t.params.category||"basic"),s={basic:xP,agent:mK,model:Jq,mcp:Kxe,prompt:Xke,namespace:TIe},r=Xn(()=>{const d=n.value;return s[d]||xP}),a=Xn(()=>[{key:"basic",label:e("config.categories.basic"),icon:"carbon:settings"},{key:"agent",label:e("config.categories.agent"),icon:"carbon:bot"},{key:"model",label:e("config.categories.model"),icon:"carbon:build-image"},{key:"mcp",label:e("config.categories.mcp"),icon:"carbon:tool-box"},{key:"prompt",label:e("config.categories.prompt"),icon:"carbon:repo-artifact"},{key:"namespace",label:e("config.categories.namespace"),disabled:!1,icon:"carbon:batch-job"}]);cr(()=>t.params.category,d=>{d&&(n.value=d)});const l=d=>{i.push({name:t.name,params:{...t.params,category:d},query:t.query})};return(d,c)=>(ne(),ue("div",RIe,[L("div",PIe,[L("div",OIe,[L("div",FIe,[L("button",{class:"action-btn",onClick:c[0]||(c[0]=u=>d.$router.push("/"))},[xe(P(Re),{icon:"carbon:arrow-left"}),Pe(" "+B(d.$t("backHome")),1)]),xe(Rz)]),L("div",BIe,[xe(AIe)])])]),L("div",WIe,[L("nav",VIe,[(ne(!0),ue(Ji,null,ln(a.value,(u,h)=>(ne(),ue(Ji,null,[u.disabled?at("",!0):(ne(),ue("div",{key:h,class:Nn(["nav-item",{active:n.value===u.key}]),onClick:g=>l(u.key)},[xe(P(Re),{icon:u.icon,width:"20"},null,8,["icon"]),L("span",null,B(u.label),1)],10,HIe))],64))),256))]),L("div",zIe,[(ne(),In(Mz(r.value)))])])]))}}),UIe=us($Ie,[["__scopeId","data-v-29da4edc"]]),kMe=Object.freeze(Object.defineProperty({__proto__:null,default:UIe},Symbol.toStringTag,{value:"Module"}));export{kMe as i,k0 as m,qW as t}; diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-Da6ed0Wm.js b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-Da6ed0Wm.js deleted file mode 100644 index 74b6250a95..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-Da6ed0Wm.js +++ /dev/null @@ -1 +0,0 @@ -import{d as I,a as u,b as m,q as $,s as L,f as C,x as E,e as t,t as i,r as x,u as j,c as y,o as F,g as f,w as M,j as R,F as V,l as A,p as G,y as H}from"./index-SarmArA2.js";import{_ as K}from"./Java-AI-BYpq8IxI.js";import{I as N}from"./iconify-B5kZhuXP.js";import{_ as P}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{L as O}from"./index-BPwnW1su.js";import{u as W,s as r}from"./sidebar-EjrN4Sj7.js";import"./llm-check-D2idVWhZ.js";const X={key:1,class:"blur-card-content"},z=I({__name:"index",props:{content:{},wrapperStyle:{}},emits:["clickCard"],setup(S,{emit:d}){const n=S,l=d,c=()=>{console.log("[BlurCard] handleClick called with content:",n.content),l("clickCard",n.content),console.log("[BlurCard] clickCard event emitted")};return(a,w)=>{var p,h,g,v,_;return m(),u("button",{class:"blur-card",onClick:c,style:$(a.wrapperStyle)},[(p=a.content)!=null&&p.icon?(m(),L(E(N),{key:0,icon:a.content.icon,class:"blur-card-icon"},null,8,["icon"])):C("",!0),(h=a.content)!=null&&h.title||(g=a.content)!=null&&g.description?(m(),u("div",X,[t("h3",null,i((v=a.content)==null?void 0:v.title),1),t("p",null,i((_=a.content)==null?void 0:_.description),1)])):C("",!0)],4)}}}),U=P(z,[["__scopeId","data-v-48da0039"]]),Q={class:"home-page"},Y={class:"welcome-container"},Z={class:"header"},ee={class:"header-top"},oe={class:"logo-container"},te={class:"tagline"},ae={class:"main-content"},se={class:"conversation-container"},ne={class:"welcome-section"},le={class:"welcome-title"},re={class:"welcome-subtitle"},ce={class:"input-section"},ie={class:"input-container"},de=["placeholder"],me=["disabled"],pe={class:"examples-section"},ue={class:"examples-grid"},he={class:"card-type"},ge=I({__name:"index",setup(S){const d=G(),n=W(),l=x(""),c=x(),{t:a}=j(),w=()=>{const o=Date.now().toString();d.push({name:"direct",params:{id:o}}).then(()=>{console.log("[Home] jump to direct page"+a("common.success"))}).catch(e=>{console.error("[Home] jump to direct page"+a("common.error"),e)})},p=y(()=>[{title:a("home.examples.stockPrice.title"),type:"message",description:a("home.examples.stockPrice.description"),icon:"carbon:chart-line-data",prompt:a("home.examples.stockPrice.prompt")},{title:a("home.examples.weather.title"),type:"message",description:a("home.examples.weather.description"),icon:"carbon:partly-cloudy",prompt:a("home.examples.weather.prompt")}]),h=y(()=>[{title:a("home.examples.queryplan.title"),type:"plan-act",description:a("home.examples.queryplan.description"),icon:"carbon:plan",prompt:a("home.examples.queryplan.prompt"),planJson:{planType:"simple",title:"查询 沈询 阿里的所有信息(用于展示无限上下文能力)",steps:[{stepRequirement:"[BROWSER_AGENT] 通过 百度 查询 沈询 阿里 , 获取第一页的html 百度数据,合并聚拢 到 html_data 的目录里",terminateColumns:"存放的目录路径"},{stepRequirement:"[BROWSER_AGENT] 从 html_data 目录中找到所有的有效关于沈询 阿里 的网页链接,输出到 link.md里面",terminateColumns:"url地址,说明"}],planId:"planTemplate-1749200517403"}},{title:a("home.examples.ainovel.title"),type:"plan-act",description:a("home.examples.ainovel.description"),icon:"carbon:document-tasks",prompt:a("home.examples.ainovel.prompt"),planJson:{planType:"simple",title:"人工智能逐步击败人类小说创作计划",steps:[{stepRequirement:"[TEXT_FILE_AGENT] 创建小说的大标题和子章节标题的文件,期望是一有10个子章节的的小说,提纲输出到novel.md里,每一个子章节用二级标题,在当前步骤只需要写章节的标题即可,小说的大标题是《人工智能逐步击败人类》",terminateColumns:"文件的名字"},{stepRequirement:"[TEXT_FILE_AGENT] 从novel.md文件获取子标题信息,然后依次完善每一个章节的具体内容,每个轮次只完善一个子章节的内容,用replace来更新内容,每个章节要求有3000字的内容,不要每更新一个章节就查询一下文档的全部内容",terminateColumns:"文件的名字"}],planId:"planTemplate-1753622676988"}}]),g=y(()=>[...p.value,...h.value]),v=o=>{o.type==="message"?D(o):o.type==="plan-act"&&J(o)};F(()=>{console.log("[Home] onMounted called"),console.log("[Home] taskStore:",n),console.log("[Home] examples:",p),n.markHomeVisited(),console.log("[Home] Home visited marked")});const _=async o=>{try{r.createNewTemplate(),r.jsonContent=JSON.stringify(o);const e=await r.saveTemplate();e!=null&&e.duplicate?console.log("[Sidebar] "+a("sidebar.saveCompleted",{message:e.message,versionCount:e.versionCount})):e!=null&&e.saved?console.log("[Sidebar] "+a("sidebar.saveSuccess",{message:e.message,versionCount:e.versionCount})):e!=null&&e.message&&console.log("[Sidebar] "+a("sidebar.saveStatus",{message:e.message}))}catch(e){console.error("[Sidebar] Failed to save the plan to the template library:",e),alert(e.message||a("sidebar.saveFailed"))}},B=()=>{H(()=>{c.value&&(c.value.style.height="auto",c.value.style.height=Math.min(c.value.scrollHeight,200)+"px")})},q=o=>{console.log("[Home] handleKeydown called, key:",o.key),o.key==="Enter"&&!o.shiftKey&&(o.preventDefault(),console.log("[Home] Enter key pressed, calling handleSend"),T())},T=()=>{if(console.log("[Home] handleSend called, userInput:",l.value),!l.value.trim()){console.log("[Home] handleSend aborted - empty input");return}const o=l.value.trim();console.log("[Home] Setting task to store:",o),n.setTask(o),console.log("[Home] Task set to store, current task:",n.currentTask);const e=Date.now().toString();console.log("[Home] Navigating to direct page with chatId:",e),d.push({name:"direct",params:{id:e}}).then(()=>{console.log("[Home] Navigation to direct page completed")}).catch(s=>{console.error("[Home] Navigation error:",s)})},D=o=>{console.log("[Home] selectExample called with example:",o),console.log("[Home] Example prompt:",o.prompt),n.setTask(o.prompt),console.log("[Home] Task set to store from example, current task:",n.currentTask);const e=Date.now().toString();console.log("[Home] Navigating to direct page with chatId:",e),d.push({name:"direct",params:{id:e}}).then(()=>{console.log("[Home] Navigation to direct page completed (from example)")}).catch(s=>{console.error("[Home] Navigation error (from example):",s)})},J=async o=>{console.log("[Home] selectPlan called with plan:",o);try{await _(o.planJson),console.log("[Home] Plan saved to templates");const e=Date.now().toString();await d.push({name:"direct",params:{id:e}}),H(async()=>{await new Promise(k=>setTimeout(k,300)),r.isCollapsed?(await r.toggleSidebar(),console.log("[Sidebar] Sidebar toggled")):console.log("[Sidebar] Sidebar is already open"),await r.loadPlanTemplateList(),console.log("[Sidebar] Template list loaded");const s=r.planTemplateList.find(k=>k.id===o.planJson.planId);if(!s){console.error("[Sidebar] Template not found");return}await r.selectTemplate(s),console.log("[Sidebar] Template selected:",s.title);const b=document.querySelector(".execute-btn");b.disabled?console.error("[Sidebar] Execute button not found or disabled"):(console.log("[Sidebar] Triggering execute button click"),b.click())})}catch(e){console.error("[Home] Error in selectPlan:",e)}};return(o,e)=>(m(),u("div",Q,[t("div",Y,[e[2]||(e[2]=t("div",{class:"background-effects"},[t("div",{class:"gradient-orb orb-1"}),t("div",{class:"gradient-orb orb-2"}),t("div",{class:"gradient-orb orb-3"})],-1)),t("header",Z,[t("div",ee,[f(O)]),t("div",oe,[e[1]||(e[1]=t("div",{class:"logo"},[t("img",{src:K,alt:"JManus",class:"java-logo"}),t("h1",null,"JManus")],-1)),t("span",te,i(o.$t("home.tagline")),1)])]),t("main",ae,[t("div",se,[t("div",ne,[t("h2",le,i(o.$t("home.welcomeTitle")),1),t("p",re,i(o.$t("home.welcomeSubtitle")),1),t("button",{class:"direct-button",onClick:w},i(o.$t("home.directButton")),1)]),t("div",ce,[t("div",ie,[M(t("textarea",{"onUpdate:modelValue":e[0]||(e[0]=s=>l.value=s),ref_key:"textareaRef",ref:c,class:"main-input",placeholder:o.$t("home.inputPlaceholder"),onKeydown:q,onInput:B},null,40,de),[[R,l.value]]),t("button",{class:"send-button",disabled:!l.value.trim(),onClick:T},[f(E(N),{icon:"carbon:send-alt"})],8,me)])]),t("div",pe,[t("div",ue,[(m(!0),u(V,null,A(g.value,s=>(m(),u("div",{key:s.title,class:"card-with-type"},[f(U,{content:s,onClickCard:b=>v(s)},null,8,["content","onClickCard"]),t("span",he,i(s.type),1)]))),128))])])])])])]))}}),we=P(ge,[["__scopeId","data-v-8a1c50e1"]]);export{we as default}; diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-DfXlok8T.css b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-DfXlok8T.css new file mode 100644 index 0000000000..b3a5e16166 --- /dev/null +++ b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-DfXlok8T.css @@ -0,0 +1 @@ +.init-container[data-v-e11ff624]{min-height:100vh;display:flex;align-items:center;justify-content:center;background:#0a0a0a;position:relative;padding:40px 20px}.init-card[data-v-e11ff624]{background:#ffffff0d;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border:1px solid rgba(255,255,255,.1);border-radius:20px;padding:40px;width:100%;max-width:480px;box-shadow:0 20px 40px #0000004d;position:relative;z-index:10;margin:auto;max-height:none}.init-header[data-v-e11ff624]{text-align:center;margin-bottom:40px}.logo h1[data-v-e11ff624]{font-size:48px;margin:0 0 16px;background:linear-gradient(135deg,#667eea,#764ba2);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.init-header h2[data-v-e11ff624]{font-size:28px;color:#fff;margin:0 0 12px;font-weight:600}.description[data-v-e11ff624]{color:#888;font-size:16px;line-height:1.6;margin:0}.init-form[data-v-e11ff624]{margin-bottom:24px}.step-indicator[data-v-e11ff624]{display:flex;align-items:center;justify-content:center;margin:32px 0;padding:0 20px}.step[data-v-e11ff624]{display:flex;flex-direction:column;align-items:center;gap:8px;opacity:.5;transition:all .3s ease}.step.active[data-v-e11ff624],.step.completed[data-v-e11ff624]{opacity:1}.step-number[data-v-e11ff624]{width:40px;height:40px;border-radius:50%;background:#ffffff1a;border:2px solid rgba(255,255,255,.3);display:flex;align-items:center;justify-content:center;font-weight:600;color:#fff;transition:all .3s ease}.step.active .step-number[data-v-e11ff624]{background:#667eea;border-color:#667eea;color:#fff}.step.completed .step-number[data-v-e11ff624]{background:#4ade80;border-color:#4ade80;color:#fff}.step-label[data-v-e11ff624]{font-size:14px;color:#888;text-align:center;transition:all .3s ease}.step.active .step-label[data-v-e11ff624]{color:#fff;font-weight:500}.step.completed .step-label[data-v-e11ff624]{color:#4ade80}.step-divider[data-v-e11ff624]{width:60px;height:2px;background:#fff3;margin:0 20px}.language-selection[data-v-e11ff624]{margin-bottom:0}.language-options[data-v-e11ff624]{display:flex;flex-direction:column;gap:16px}.language-option[data-v-e11ff624]{display:flex;align-items:center;padding:20px;border:2px solid rgba(255,255,255,.2);border-radius:12px;cursor:pointer;transition:all .3s ease;background:#ffffff05}.language-option[data-v-e11ff624]:hover{border-color:#667eea66;background:#ffffff0d;transform:translateY(-2px)}.language-option.active[data-v-e11ff624]{border-color:#667eea;background:#667eea1a;transform:translateY(-2px)}.language-option input[type=radio][data-v-e11ff624]{margin:0 16px 0 0;width:20px;height:20px;accent-color:#667eea}.language-content[data-v-e11ff624]{display:flex;align-items:center;gap:16px}.language-flag[data-v-e11ff624]{font-size:32px;line-height:1}.language-text[data-v-e11ff624]{display:flex;flex-direction:column;gap:4px}.language-text strong[data-v-e11ff624]{color:#fff;font-size:18px;font-weight:600}.language-text small[data-v-e11ff624]{color:#888;font-size:14px}.form-group[data-v-e11ff624]{margin-bottom:24px}.form-label[data-v-e11ff624]{display:block;font-weight:500;color:#fff;margin-bottom:8px;font-size:14px}.required[data-v-e11ff624]{color:#e53e3e;margin-left:4px}.form-input[data-v-e11ff624]{width:100%;padding:12px 16px;border:2px solid rgba(255,255,255,.2);border-radius:8px;font-size:16px;transition:all .3s ease;background:#ffffff0d;color:#fff;box-sizing:border-box}.form-input[data-v-e11ff624]:focus{outline:none;border-color:#667eea;box-shadow:0 0 0 3px #667eea33;background:#ffffff14}.form-input[data-v-e11ff624]:disabled{background:#ffffff05;cursor:not-allowed;opacity:.6}.form-input[data-v-e11ff624]::placeholder{color:#666}.config-mode-selection[data-v-e11ff624]{display:flex;flex-direction:column;gap:16px}.radio-option[data-v-e11ff624]{display:flex;align-items:flex-start;padding:16px;border:2px solid rgba(255,255,255,.2);border-radius:12px;cursor:pointer;transition:all .3s ease;background:#ffffff05}.radio-option[data-v-e11ff624]:hover{border-color:#667eea66;background:#ffffff0d}.radio-option.active[data-v-e11ff624]{border-color:#667eea;background:#667eea1a}.radio-option input[type=radio][data-v-e11ff624]{margin:4px 12px 0 0;width:16px;height:16px;accent-color:#667eea}.radio-text[data-v-e11ff624]{display:flex;flex-direction:column;gap:4px}.radio-text strong[data-v-e11ff624]{color:#fff;font-size:16px;font-weight:600}.radio-text small[data-v-e11ff624]{color:#888;font-size:14px;line-height:1.4}.custom-config-section[data-v-e11ff624]{border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:20px;background:#ffffff05;margin-top:8px}.form-hint[data-v-e11ff624]{font-size:13px;color:#888;margin-top:6px;line-height:1.4}.help-link[data-v-e11ff624]{color:#667eea;text-decoration:none;font-weight:500}.help-link[data-v-e11ff624]:hover{text-decoration:underline;color:#8b9cf0}.form-actions[data-v-e11ff624]{display:flex;gap:16px;justify-content:center;align-items:center}.form-actions.single[data-v-e11ff624]{justify-content:center}.back-btn[data-v-e11ff624]{padding:12px 32px;border:2px solid rgba(255,255,255,.3);border-radius:8px;background:transparent;color:#fff;font-size:16px;font-weight:500;cursor:pointer;transition:all .3s ease;min-width:120px}.back-btn[data-v-e11ff624]:hover:not(:disabled){border-color:#667eea;background:#667eea1a;transform:translateY(-2px)}.back-btn[data-v-e11ff624]:disabled{opacity:.5;cursor:not-allowed}.submit-btn[data-v-e11ff624]{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;padding:14px 32px;border-radius:8px;font-size:16px;font-weight:600;cursor:pointer;transition:all .3s ease;position:relative;min-width:180px;display:inline-flex;align-items:center;justify-content:center;gap:8px}.submit-btn[data-v-e11ff624]:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 8px 25px #667eea4d}.submit-btn[data-v-e11ff624]:disabled{opacity:.6;cursor:not-allowed;transform:none}.loading-spinner[data-v-e11ff624]{width:16px;height:16px;border:2px solid rgba(255,255,255,.3);border-top:2px solid white;border-radius:50%;animation:spin-e11ff624 1s linear infinite}@keyframes spin-e11ff624{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.error-message[data-v-e11ff624]{background:#fed7d7;color:#c53030;padding:12px 16px;border-radius:8px;border:1px solid #feb2b2;font-size:14px;margin-top:16px}.success-message[data-v-e11ff624]{background:#c6f6d5;color:#2f855a;padding:12px 16px;border-radius:8px;border:1px solid #9ae6b4;font-size:14px;margin-top:16px}.error-fade-enter-active[data-v-e11ff624],.error-fade-leave-active[data-v-e11ff624],.success-fade-enter-active[data-v-e11ff624],.success-fade-leave-active[data-v-e11ff624]{transition:all .3s ease}.error-fade-enter-from[data-v-e11ff624],.error-fade-leave-to[data-v-e11ff624],.success-fade-enter-from[data-v-e11ff624],.success-fade-leave-to[data-v-e11ff624]{opacity:0;transform:translateY(-10px)}.background-animation[data-v-e11ff624]{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;z-index:1}.floating-shape[data-v-e11ff624]{position:absolute;background:linear-gradient(135deg,#667eea1a,#764ba21a);border-radius:50%;animation:float-e11ff624 20s infinite linear}.floating-shape[data-v-e11ff624]:nth-child(1){width:80px;height:80px;left:10%;animation-duration:25s;animation-delay:0s}.floating-shape[data-v-e11ff624]:nth-child(2){width:120px;height:120px;left:20%;animation-duration:30s;animation-delay:5s}.floating-shape[data-v-e11ff624]:nth-child(3){width:60px;height:60px;left:70%;animation-duration:22s;animation-delay:10s}.floating-shape[data-v-e11ff624]:nth-child(4){width:100px;height:100px;left:80%;animation-duration:28s;animation-delay:15s}.floating-shape[data-v-e11ff624]:nth-child(5){width:40px;height:40px;left:40%;animation-duration:35s;animation-delay:20s}.floating-shape[data-v-e11ff624]:nth-child(6){width:90px;height:90px;left:60%;animation-duration:24s;animation-delay:8s}@keyframes float-e11ff624{0%{transform:translateY(100vh) rotate(0);opacity:0}10%{opacity:.1}90%{opacity:.1}to{transform:translateY(-100px) rotate(360deg);opacity:0}}.background-effects[data-v-e11ff624]{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;z-index:0}.gradient-orb[data-v-e11ff624]{position:absolute;border-radius:50%;background:linear-gradient(135deg,#667eea,#764ba2);opacity:.1;animation:orbit-e11ff624 20s infinite linear}.orb-1[data-v-e11ff624]{width:400px;height:400px;top:-200px;left:-200px;animation-duration:25s}.orb-2[data-v-e11ff624]{width:300px;height:300px;bottom:-150px;right:-150px;animation-duration:30s;animation-direction:reverse}.orb-3[data-v-e11ff624]{width:200px;height:200px;top:50%;left:50%;transform:translate(-50%,-50%);animation-duration:35s}@keyframes orbit-e11ff624{0%{transform:rotate(0) scale(1)}50%{transform:rotate(180deg) scale(1.1)}to{transform:rotate(360deg) scale(1)}}@media (max-height: 800px){.init-container[data-v-e11ff624]{align-items:flex-start;padding:20px 0 40px}.init-card[data-v-e11ff624]{margin:20px auto}.init-header[data-v-e11ff624]{margin-bottom:30px}.logo h1[data-v-e11ff624]{font-size:36px}.init-header h2[data-v-e11ff624]{font-size:24px}}@media (max-width: 768px){.init-container[data-v-e11ff624]{padding:20px}.init-card[data-v-e11ff624]{padding:30px 24px}.logo h1[data-v-e11ff624]{font-size:40px}.init-header h2[data-v-e11ff624]{font-size:24px}.description[data-v-e11ff624]{font-size:15px}.step-indicator[data-v-e11ff624]{margin:24px 0;padding:0 10px}.step-divider[data-v-e11ff624]{width:40px;margin:0 15px}.language-flag[data-v-e11ff624]{font-size:28px}.language-text strong[data-v-e11ff624]{font-size:16px}.form-actions[data-v-e11ff624]{flex-direction:column}.back-btn[data-v-e11ff624],.submit-btn[data-v-e11ff624]{width:100%;min-width:auto}}@media (max-width: 640px){.init-container[data-v-e11ff624]{padding:15px}.init-card[data-v-e11ff624]{padding:24px;margin:0;border-radius:16px}.logo h1[data-v-e11ff624]{font-size:32px}.init-header h2[data-v-e11ff624]{font-size:22px}.description[data-v-e11ff624]{font-size:14px}.step-indicator[data-v-e11ff624]{margin:20px 0;padding:0 5px}.step-number[data-v-e11ff624]{width:36px;height:36px;font-size:14px}.step-label[data-v-e11ff624]{font-size:12px}.step-divider[data-v-e11ff624]{width:30px;margin:0 10px}.language-option[data-v-e11ff624]{padding:16px}.language-flag[data-v-e11ff624]{font-size:24px}.language-text strong[data-v-e11ff624]{font-size:16px}.language-text small[data-v-e11ff624]{font-size:13px}} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-D55Gujbf.css b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-DjttYkrg.css similarity index 50% rename from spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-D55Gujbf.css rename to spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-DjttYkrg.css index ef85bc59e2..1bfde9c533 100644 --- a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-D55Gujbf.css +++ b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-DjttYkrg.css @@ -1 +1 @@ -.sidebar-wrapper[data-v-a66d585a]{position:relative;width:600px;height:100vh;background:#ffffff0d;border-right:1px solid rgba(255,255,255,.1);transition:all .3s ease-in-out;overflow:hidden}.sidebar-wrapper-collapsed[data-v-a66d585a]{border-right:none;width:0}.sidebar-wrapper-collapsed .sidebar-content[data-v-a66d585a]{opacity:0;pointer-events:none}.sidebar-content[data-v-a66d585a]{height:100%;width:100%;padding:12px 0 12px 12px;display:flex;flex-direction:column;transition:all .3s ease-in-out}.sidebar-content .sidebar-content-header[data-v-a66d585a]{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;overflow:hidden}.sidebar-content .sidebar-content-header .sidebar-content-title[data-v-a66d585a]{font-size:20px;font-weight:600;background:linear-gradient(135deg,#667eea,#764ba2);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-content .tab-switcher[data-v-a66d585a]{display:flex;margin-bottom:16px;background:#ffffff0d;border-radius:8px;padding:4px}.sidebar-content .tab-switcher .tab-button[data-v-a66d585a]{flex:1;padding:8px 12px;background:transparent;border:none;border-radius:6px;color:#ffffffb3;font-size:12px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:all .2s ease}.sidebar-content .tab-switcher .tab-button[data-v-a66d585a]:hover:not(:disabled){background:#ffffff1a;color:#ffffffe6}.sidebar-content .tab-switcher .tab-button.active[data-v-a66d585a]{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;box-shadow:0 2px 4px #667eea4d}.sidebar-content .tab-switcher .tab-button[data-v-a66d585a]:disabled{opacity:.5;cursor:not-allowed}.sidebar-content .tab-content[data-v-a66d585a]{display:flex;flex-direction:column;flex:1;min-height:0}.sidebar-content .config-tab .config-container[data-v-a66d585a]{display:flex;flex-direction:column;height:100%;overflow-y:auto;padding-right:12px}.sidebar-content .config-tab .config-container .template-info-header[data-v-a66d585a]{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;padding:12px;background:#ffffff0d;border-radius:8px}.sidebar-content .config-tab .config-container .template-info-header .template-info[data-v-a66d585a]{flex:1;min-width:0}.sidebar-content .config-tab .config-container .template-info-header .template-info h3[data-v-a66d585a]{margin:0 0 4px;font-size:14px;font-weight:600;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-content .config-tab .config-container .template-info-header .template-info .template-id[data-v-a66d585a]{font-size:11px;color:#ffffff80}.sidebar-content .config-tab .config-container .template-info-header .back-to-list-btn[data-v-a66d585a]{width:28px;height:28px;background:transparent;border:none;border-radius:4px;color:#ffffffb3;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.sidebar-content .config-tab .config-container .template-info-header .back-to-list-btn[data-v-a66d585a]:hover{background:#ffffff1a;color:#fff}.sidebar-content .config-tab .config-container .config-section[data-v-a66d585a]{margin-bottom:16px;background:#ffffff0d;border-radius:8px;padding:12px}.sidebar-content .config-tab .config-container .config-section .section-header[data-v-a66d585a]{display:flex;align-items:center;margin-bottom:12px;color:#667eea;font-size:13px;font-weight:600;gap:8px}.sidebar-content .config-tab .config-container .config-section .section-header .section-actions[data-v-a66d585a]{margin-left:auto;display:flex;gap:6px}.sidebar-content .config-tab .config-container .config-section .json-editor[data-v-a66d585a],.sidebar-content .config-tab .config-container .config-section .prompt-input[data-v-a66d585a],.sidebar-content .config-tab .config-container .config-section .params-input[data-v-a66d585a]{width:100%;background:#0000004d;border:1px solid rgba(255,255,255,.2);border-radius:6px;color:#fff;font-size:12px;font-family:Monaco,Menlo,Ubuntu Mono,monospace;padding:8px;resize:vertical;min-height:100px}.sidebar-content .config-tab .config-container .config-section .json-editor[data-v-a66d585a]:focus,.sidebar-content .config-tab .config-container .config-section .prompt-input[data-v-a66d585a]:focus,.sidebar-content .config-tab .config-container .config-section .params-input[data-v-a66d585a]:focus{outline:none;border-color:#667eea;box-shadow:0 0 0 2px #667eea33}.sidebar-content .config-tab .config-container .config-section .json-editor[data-v-a66d585a]::placeholder,.sidebar-content .config-tab .config-container .config-section .prompt-input[data-v-a66d585a]::placeholder,.sidebar-content .config-tab .config-container .config-section .params-input[data-v-a66d585a]::placeholder{color:#fff6}.sidebar-content .config-tab .config-container .config-section .json-editor[data-v-a66d585a]{min-height:200px;font-size:11px;line-height:1.5;white-space:pre-wrap;overflow-wrap:break-word;word-break:break-word;-moz-tab-size:2;tab-size:2;font-variant-ligatures:none}.sidebar-content .config-tab .config-container .config-section .generator-content[data-v-a66d585a]{display:flex;flex-direction:column;gap:8px}.sidebar-content .config-tab .config-container .config-section .generator-content .generator-actions[data-v-a66d585a]{display:flex;gap:8px}.sidebar-content .config-tab .config-container .config-section .execution-content[data-v-a66d585a]{display:flex;flex-direction:column;gap:12px}.sidebar-content .config-tab .config-container .config-section .execution-content .params-input-group label[data-v-a66d585a]{display:block;margin-bottom:6px;font-size:12px;color:#fffc;font-weight:500}.sidebar-content .config-tab .config-container .config-section .execution-content .params-input-group .params-input-container[data-v-a66d585a]{position:relative;display:flex;align-items:center}.sidebar-content .config-tab .config-container .config-section .execution-content .params-input-group .params-input-container .params-input[data-v-a66d585a]{min-height:auto;padding-right:32px}.sidebar-content .config-tab .config-container .config-section .execution-content .params-input-group .params-input-container .clear-params-btn[data-v-a66d585a]{position:absolute;right:8px;width:20px;height:20px;background:transparent;border:none;border-radius:4px;color:#ffffff80;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.sidebar-content .config-tab .config-container .config-section .execution-content .params-input-group .params-input-container .clear-params-btn[data-v-a66d585a]:hover{background:#f003;color:#ff6b6b}.sidebar-content .config-tab .config-container .config-section .execution-content .params-input-group .params-help-text[data-v-a66d585a]{margin-bottom:6px;font-size:11px;color:#fff9;line-height:1.4;padding:6px 8px;background:#667eea1a;border:1px solid rgba(102,126,234,.2);border-radius:4px}.sidebar-content .config-tab .config-container .config-section .execution-content .api-url-display[data-v-a66d585a]{padding:8px;background:#0000004d;border:1px solid rgba(255,255,255,.1);border-radius:6px;font-size:11px}.sidebar-content .config-tab .config-container .config-section .execution-content .api-url-display .api-url-label[data-v-a66d585a]{color:#ffffffb3;margin-right:8px}.sidebar-content .config-tab .config-container .config-section .execution-content .api-url-display .api-url[data-v-a66d585a]{color:#64b5f6;font-family:Monaco,Menlo,Ubuntu Mono,monospace;word-break:break-all}.sidebar-content .config-tab .config-container .config-section .execution-content .execute-btn[data-v-a66d585a]{padding:10px 16px;font-size:13px;font-weight:500}.sidebar-content .btn[data-v-a66d585a]{padding:6px 12px;border:none;border-radius:4px;font-size:12px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:all .2s ease}.sidebar-content .btn.btn-sm[data-v-a66d585a]{padding:4px 8px;font-size:11px}.sidebar-content .btn.btn-primary[data-v-a66d585a]{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.sidebar-content .btn.btn-primary[data-v-a66d585a]:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 2px 8px #667eea4d}.sidebar-content .btn.btn-secondary[data-v-a66d585a]{background:#ffffff1a;color:#fffc;border:1px solid rgba(255,255,255,.2)}.sidebar-content .btn.btn-secondary[data-v-a66d585a]:hover:not(:disabled){background:#fff3;color:#fff}.sidebar-content .btn[data-v-a66d585a]:disabled{opacity:.5;cursor:not-allowed;transform:none!important;box-shadow:none!important}.sidebar-content .btn .spinning[data-v-a66d585a]{animation:spin-a66d585a 1s linear infinite}.sidebar-content .new-task-section[data-v-a66d585a]{margin-bottom:16px;padding-right:12px}.sidebar-content .new-task-section .new-task-btn[data-v-a66d585a]{width:100%;padding:12px 16px;background:linear-gradient(135deg,#667eea,#764ba2);border:none;border-radius:8px;color:#fff;font-size:14px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:all .2s ease}.sidebar-content .new-task-section .new-task-btn[data-v-a66d585a]:hover{transform:translateY(-1px);box-shadow:0 4px 12px #667eea4d}.sidebar-content .new-task-section .new-task-btn .shortcut[data-v-a66d585a]{font-size:12px;opacity:.8;margin-left:auto}.sidebar-content .sidebar-content-list[data-v-a66d585a]{display:flex;flex-direction:column;flex:1;overflow-y:auto;padding-right:12px}.sidebar-content .sidebar-content-list .loading-state[data-v-a66d585a],.sidebar-content .sidebar-content-list .error-state[data-v-a66d585a],.sidebar-content .sidebar-content-list .empty-state[data-v-a66d585a]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 16px;color:#fff9;font-size:14px;text-align:center;gap:12px}.sidebar-content .sidebar-content-list .loading-state .spinning[data-v-a66d585a],.sidebar-content .sidebar-content-list .error-state .spinning[data-v-a66d585a],.sidebar-content .sidebar-content-list .empty-state .spinning[data-v-a66d585a]{animation:spin-a66d585a 1s linear infinite}.sidebar-content .sidebar-content-list .loading-state .retry-btn[data-v-a66d585a],.sidebar-content .sidebar-content-list .error-state .retry-btn[data-v-a66d585a],.sidebar-content .sidebar-content-list .empty-state .retry-btn[data-v-a66d585a]{padding:8px 16px;background:#ffffff1a;border:1px solid rgba(255,255,255,.2);border-radius:4px;color:#fff;cursor:pointer;font-size:12px;transition:background-color .2s ease}.sidebar-content .sidebar-content-list .loading-state .retry-btn[data-v-a66d585a]:hover,.sidebar-content .sidebar-content-list .error-state .retry-btn[data-v-a66d585a]:hover,.sidebar-content .sidebar-content-list .empty-state .retry-btn[data-v-a66d585a]:hover{background:#fff3}.sidebar-content .sidebar-content-list .sidebar-content-list-item[data-v-a66d585a]{display:flex;align-items:flex-start;padding:12px;margin-bottom:8px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;cursor:pointer;transition:all .2s ease;position:relative}.sidebar-content .sidebar-content-list .sidebar-content-list-item[data-v-a66d585a]:hover{background:#ffffff1a;border-color:#fff3;transform:translateY(-1px)}.sidebar-content .sidebar-content-list .sidebar-content-list-item.sidebar-content-list-item-active[data-v-a66d585a]{border:2px solid #667eea;background:#667eea1a}.sidebar-content .sidebar-content-list .sidebar-content-list-item .task-icon[data-v-a66d585a]{margin-right:12px;color:#667eea;flex-shrink:0;margin-top:2px}.sidebar-content .sidebar-content-list .sidebar-content-list-item .task-details[data-v-a66d585a]{flex:1;min-width:0}.sidebar-content .sidebar-content-list .sidebar-content-list-item .task-details .task-title[data-v-a66d585a]{font-size:14px;font-weight:600;color:#fff;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-content .sidebar-content-list .sidebar-content-list-item .task-details .task-preview[data-v-a66d585a]{font-size:12px;color:#ffffffb3;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-content .sidebar-content-list .sidebar-content-list-item .task-time[data-v-a66d585a]{font-size:11px;color:#ffffff80;margin-left:8px;flex-shrink:0;position:absolute;top:12px;right:40px}.sidebar-content .sidebar-content-list .sidebar-content-list-item .task-actions[data-v-a66d585a]{display:flex;align-items:center;margin-left:8px;flex-shrink:0}.sidebar-content .sidebar-content-list .sidebar-content-list-item .task-actions .delete-task-btn[data-v-a66d585a]{width:24px;height:24px;background:transparent;border:none;border-radius:4px;color:#ffffff80;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease;position:absolute;top:12px;right:12px}.sidebar-content .sidebar-content-list .sidebar-content-list-item .task-actions .delete-task-btn[data-v-a66d585a]:hover{background:#f003;color:#ff6b6b}@keyframes spin-a66d585a{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.right-panel[data-v-e90596ce]{width:50%;display:flex;flex-direction:column}.preview-header[data-v-e90596ce]{padding:20px 24px;border-bottom:1px solid #1a1a1a;background:#ffffff05}.preview-header .tab-button[data-v-e90596ce]{padding:8px 16px;border:1px solid rgba(255,255,255,.1);border-radius:6px;background:linear-gradient(135deg,#667eea33,#764ba233);border-color:#667eea;color:#667eea;cursor:default;display:flex;align-items:center;gap:6px;font-size:14px}.preview-content[data-v-e90596ce]{flex:1;display:flex;flex-direction:column;min-height:0}.step-details[data-v-e90596ce]{flex:1;position:relative;display:flex;flex-direction:column;min-height:0}.step-info-fixed[data-v-e90596ce]{position:sticky;top:0;z-index:10;background:#292a2df2;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-bottom:1px solid rgba(255,255,255,.1);padding:20px;margin:0 20px;border-radius:8px 8px 0 0}.step-info-fixed h3[data-v-e90596ce]{color:#fff;margin:0 0 16px;font-size:18px;font-weight:600;padding-bottom:8px;border-bottom:2px solid #667eea}.step-details-scroll-container[data-v-e90596ce]{flex:1;overflow-y:auto;overflow-x:hidden;padding:0 20px 20px;margin:0 20px 20px;background:#ffffff03;border-radius:0 0 8px 8px}.step-details-scroll-container[data-v-e90596ce]::-webkit-scrollbar{width:6px}.step-details-scroll-container[data-v-e90596ce]::-webkit-scrollbar-track{background:#ffffff1a;border-radius:3px}.step-details-scroll-container[data-v-e90596ce]::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:3px}.step-details-scroll-container[data-v-e90596ce]::-webkit-scrollbar-thumb:hover{background:#ffffff80}.agent-info[data-v-e90596ce]{margin-bottom:16px}.agent-info .info-item[data-v-e90596ce]{display:flex;margin-bottom:8px;font-size:14px;line-height:1.4}.agent-info .info-item .label[data-v-e90596ce]{min-width:100px;font-weight:600;color:#888;flex-shrink:0}.agent-info .info-item .value[data-v-e90596ce]{flex:1;color:#ccc;word-break:break-word}.agent-info .info-item .value.success[data-v-e90596ce]{color:#27ae60}.execution-status[data-v-e90596ce]{margin-top:16px;padding-top:16px;border-top:1px solid rgba(255,255,255,.1)}.execution-status .status-item[data-v-e90596ce]{display:flex;align-items:center;gap:8px}.execution-status .status-item .status-icon[data-v-e90596ce]{font-size:16px}.execution-status .status-item .status-icon.success[data-v-e90596ce]{color:#27ae60}.execution-status .status-item .status-icon.progress[data-v-e90596ce]{color:#3498db}.execution-status .status-item .status-icon.pending[data-v-e90596ce]{color:#f39c12}.execution-status .status-item .status-text[data-v-e90596ce]{color:#ccc;font-weight:500}.no-steps-message[data-v-e90596ce]{text-align:center;color:#666;font-style:italic;margin-top:16px}.no-steps-message p[data-v-e90596ce]{margin:0}.no-execution-message[data-v-e90596ce]{padding:20px;background:#f8f9fa;border:1px solid #e9ecef;border-radius:8px;margin-top:16px}.no-execution-message .info-icon[data-v-e90596ce]{color:#6c757d;font-size:20px;margin-bottom:8px}.no-execution-message h4[data-v-e90596ce]{margin:0 0 16px;color:#495057;font-size:16px;font-weight:500}.no-execution-message .step-basic-info .info-item[data-v-e90596ce]{display:flex;margin-bottom:8px;font-size:14px}.no-execution-message .step-basic-info .info-item .label[data-v-e90596ce]{font-weight:500;color:#6c757d;min-width:80px;margin-right:8px}.no-execution-message .step-basic-info .info-item .value[data-v-e90596ce]{color:#333;flex:1}.no-execution-message .step-basic-info .info-item .value.status-completed[data-v-e90596ce]{color:#28a745;font-weight:500}.no-execution-message .step-basic-info .info-item .value.status-current[data-v-e90596ce]{color:#007bff;font-weight:500}.no-execution-message .step-basic-info .info-item .value.status-pending[data-v-e90596ce]{color:#6c757d}.no-execution-message .no-execution-hint[data-v-e90596ce]{margin:16px 0 0;color:#6c757d;font-style:italic;font-size:13px;text-align:center}.execution-indicator[data-v-e90596ce]{margin-top:20px;padding:20px;background:#4a90e21a;border:1px solid rgba(74,144,226,.3);border-radius:8px;text-align:center;position:relative;overflow:hidden}.execution-waves[data-v-e90596ce]{position:relative;height:4px;margin-bottom:16px;background:#4a90e233;border-radius:2px;overflow:hidden}.wave[data-v-e90596ce]{position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(74,144,226,.6),transparent);border-radius:2px}.wave-1[data-v-e90596ce]{animation:wave-animation-e90596ce 2s ease-in-out infinite}.wave-2[data-v-e90596ce]{animation:wave-animation-e90596ce 2s ease-in-out infinite .6s}.wave-3[data-v-e90596ce]{animation:wave-animation-e90596ce 2s ease-in-out infinite 1.2s}@keyframes wave-animation-e90596ce{0%{left:-100%}50%{left:100%}to{left:100%}}.execution-text[data-v-e90596ce]{color:#4a90e2;font-size:14px;margin:0;display:flex;align-items:center;justify-content:center;gap:8px}.rotating-icon[data-v-e90596ce]{animation:rotate-animation-e90596ce 1s linear infinite}@keyframes rotate-animation-e90596ce{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.step-info h3[data-v-e90596ce]{color:#fff;margin:0 0 20px;font-size:18px;font-weight:600}.think-act-steps[data-v-e90596ce]{margin-top:20px}.think-act-steps h4[data-v-e90596ce]{color:#fff;margin:0 0 16px;font-size:16px;font-weight:600;padding-bottom:8px;border-bottom:1px solid rgba(255,255,255,.2)}.steps-container[data-v-e90596ce]{display:flex;flex-direction:column;gap:12px}.think-act-step[data-v-e90596ce]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:16px}.think-act-step .step-header[data-v-e90596ce]{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.think-act-step .step-header .step-number[data-v-e90596ce]{font-weight:600;color:#667eea;font-size:14px}.think-act-step .step-header .step-status[data-v-e90596ce]{padding:4px 8px;border-radius:4px;font-size:12px;font-weight:500}.think-act-step .step-header .step-status.completed[data-v-e90596ce]{background:#27ae6033;color:#27ae60}.think-act-step .step-header .step-status.running[data-v-e90596ce]{background:#3498db33;color:#3498db}.think-act-step .step-header .step-status.pending[data-v-e90596ce]{background:#f39c1233;color:#f39c12}.think-act-step .think-section[data-v-e90596ce],.think-act-step .action-section[data-v-e90596ce],.think-act-step .sub-plan-section[data-v-e90596ce]{margin-bottom:16px}.think-act-step .think-section[data-v-e90596ce]:last-child,.think-act-step .action-section[data-v-e90596ce]:last-child,.think-act-step .sub-plan-section[data-v-e90596ce]:last-child{margin-bottom:0}.think-act-step .think-section h5[data-v-e90596ce],.think-act-step .action-section h5[data-v-e90596ce],.think-act-step .sub-plan-section h5[data-v-e90596ce]{display:flex;align-items:center;gap:6px;margin:0 0 12px;font-size:14px;font-weight:600;color:#fff}.think-act-step .think-content .input[data-v-e90596ce],.think-act-step .action-content .input[data-v-e90596ce],.think-act-step .think-content .output[data-v-e90596ce],.think-act-step .action-content .output[data-v-e90596ce],.think-act-step .think-content .tool-info[data-v-e90596ce],.think-act-step .action-content .tool-info[data-v-e90596ce]{margin-bottom:12px}.think-act-step .think-content .input[data-v-e90596ce]:last-child,.think-act-step .action-content .input[data-v-e90596ce]:last-child,.think-act-step .think-content .output[data-v-e90596ce]:last-child,.think-act-step .action-content .output[data-v-e90596ce]:last-child,.think-act-step .think-content .tool-info[data-v-e90596ce]:last-child,.think-act-step .action-content .tool-info[data-v-e90596ce]:last-child{margin-bottom:0}.think-act-step .think-content .input .label[data-v-e90596ce],.think-act-step .action-content .input .label[data-v-e90596ce],.think-act-step .think-content .output .label[data-v-e90596ce],.think-act-step .action-content .output .label[data-v-e90596ce],.think-act-step .think-content .tool-info .label[data-v-e90596ce],.think-act-step .action-content .tool-info .label[data-v-e90596ce]{display:block;font-weight:600;color:#888;margin-bottom:4px;font-size:12px}.think-act-step .think-content .input .value[data-v-e90596ce],.think-act-step .action-content .input .value[data-v-e90596ce],.think-act-step .think-content .output .value[data-v-e90596ce],.think-act-step .action-content .output .value[data-v-e90596ce],.think-act-step .think-content .tool-info .value[data-v-e90596ce],.think-act-step .action-content .tool-info .value[data-v-e90596ce]{color:#ccc;font-size:14px}.think-act-step .think-content .input pre[data-v-e90596ce],.think-act-step .action-content .input pre[data-v-e90596ce],.think-act-step .think-content .output pre[data-v-e90596ce],.think-act-step .action-content .output pre[data-v-e90596ce],.think-act-step .think-content .tool-info pre[data-v-e90596ce],.think-act-step .action-content .tool-info pre[data-v-e90596ce]{background:#0000004d;border:1px solid rgba(255,255,255,.1);border-radius:4px;padding:12px;color:#ccc;font-size:12px;overflow-x:auto;white-space:pre-wrap;margin:0;line-height:1.4;max-height:200px;overflow-y:auto}.think-act-step .sub-plan-content .sub-plan-header[data-v-e90596ce]{background:#667eea1a;border:1px solid rgba(102,126,234,.3);border-radius:6px;padding:12px;margin-bottom:12px}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-info[data-v-e90596ce]{display:flex;margin-bottom:8px;font-size:12px}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-info[data-v-e90596ce]:last-child{margin-bottom:0}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-info .label[data-v-e90596ce]{min-width:80px;font-weight:600;color:#888;flex-shrink:0}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-info .value[data-v-e90596ce]{flex:1;color:#ccc;word-break:break-word}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-status[data-v-e90596ce]{display:flex;align-items:center;gap:6px;padding-top:8px;border-top:1px solid rgba(255,255,255,.1)}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-status .status-icon[data-v-e90596ce]{font-size:14px}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-status .status-icon.success[data-v-e90596ce]{color:#27ae60}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-status .status-icon.progress[data-v-e90596ce]{color:#3498db}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-status .status-text[data-v-e90596ce]{color:#ccc;font-size:12px;font-weight:500}.no-selection[data-v-e90596ce]{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#666}.no-selection .empty-icon[data-v-e90596ce]{font-size:48px;margin-bottom:16px;color:#444}.no-selection h3[data-v-e90596ce]{margin:0 0 8px;font-size:18px;color:#888}.no-selection p[data-v-e90596ce]{margin:0;font-size:14px;text-align:center;max-width:300px;line-height:1.5}.scroll-to-bottom-btn[data-v-e90596ce]{position:fixed;bottom:40px;right:40px;width:40px;height:40px;border-radius:50%;background:#4a90e2e6;border:none;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:18px;box-shadow:0 4px 12px #0000004d;transition:all .3s ease;z-index:100}.scroll-to-bottom-btn[data-v-e90596ce]:hover{background:#4a90e2;transform:translateY(-2px);box-shadow:0 6px 16px #0006}.scroll-to-bottom-btn[data-v-e90596ce]:active{transform:translateY(0)}.scroll-button-enter-active[data-v-e90596ce],.scroll-button-leave-active[data-v-e90596ce]{transition:all .3s ease}.scroll-button-enter-from[data-v-e90596ce],.scroll-button-leave-to[data-v-e90596ce]{opacity:0;transform:translateY(20px) scale(.8)}.chat-container[data-v-46f87864]{flex:1;display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.messages[data-v-46f87864]{padding:24px;flex:1;display:flex;flex-direction:column;gap:16px;overflow-y:auto;min-height:0;scroll-behavior:smooth;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.3) transparent}.messages[data-v-46f87864]::-webkit-scrollbar{width:8px}.messages[data-v-46f87864]::-webkit-scrollbar-track{background:transparent}.messages[data-v-46f87864]::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:4px}.messages[data-v-46f87864]::-webkit-scrollbar-thumb:hover{background:#ffffff80}.message[data-v-46f87864]{display:flex}.message.user[data-v-46f87864]{justify-content:flex-end}.message.user .message-content[data-v-46f87864]{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;max-width:80%}.message.assistant[data-v-46f87864]{justify-content:flex-start}.message.assistant .message-content[data-v-46f87864]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);color:#fff;max-width:85%}.message-content[data-v-46f87864]{padding:16px 20px;border-radius:16px;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.user-message[data-v-46f87864]{line-height:1.5}.assistant-message .thinking-section[data-v-46f87864]{margin-bottom:16px;border:1px solid rgba(255,255,255,.1);border-radius:12px;background:#ffffff05;overflow:hidden}.assistant-message .thinking-section .thinking-header[data-v-46f87864]{display:flex;align-items:center;gap:10px;padding:12px 16px;background:#667eea1a;border-bottom:1px solid rgba(255,255,255,.1)}.assistant-message .thinking-section .thinking-header .thinking-avatar[data-v-46f87864]{display:flex;align-items:center;justify-content:center;width:28px;height:28px;background:linear-gradient(135deg,#f59e0b,#d97706);border-radius:50%}.assistant-message .thinking-section .thinking-header .thinking-avatar .thinking-icon[data-v-46f87864]{font-size:16px;color:#fff;animation:pulse-46f87864 2s infinite}.assistant-message .thinking-section .thinking-header .thinking-label[data-v-46f87864]{font-weight:600;font-size:14px;color:#f59e0b;letter-spacing:.5px}.assistant-message .thinking-section .thinking-content[data-v-46f87864]{padding:16px}.assistant-message .thinking-section .thinking[data-v-46f87864]{display:flex;align-items:center;gap:8px;color:#ccc;font-size:14px;margin-bottom:12px;padding:12px;background:#0003;border-radius:8px;border-left:3px solid #f59e0b}.assistant-message .thinking-section .thinking .thinking-icon[data-v-46f87864]{animation:pulse-46f87864 2s infinite}.assistant-message .thinking-section .default-processing[data-v-46f87864]{padding:16px;text-align:center}.assistant-message .thinking-section .default-processing .processing-indicator[data-v-46f87864]{display:flex;align-items:center;justify-content:center;gap:12px;color:#ccc;font-size:14px}.assistant-message .response-section[data-v-46f87864]{border:1px solid rgba(255,255,255,.2);border-radius:18px;background:linear-gradient(135deg,#ffffff1f,#ffffff0f);overflow:hidden;box-shadow:0 6px 20px #00000026;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);margin-top:16px;transition:all .3s ease}.assistant-message .response-section[data-v-46f87864]:hover{transform:translateY(-1px);box-shadow:0 8px 25px #0003}.assistant-message .response-section .response-header[data-v-46f87864]{display:flex;align-items:center;gap:14px;padding:18px 24px 14px;background:linear-gradient(135deg,#667eea2e,#764ba21f);border-bottom:1px solid rgba(255,255,255,.15)}.assistant-message .response-section .response-header .response-avatar[data-v-46f87864]{display:flex;align-items:center;justify-content:center;width:36px;height:36px;background:linear-gradient(135deg,#667eea,#764ba2);border-radius:50%;box-shadow:0 3px 12px #667eea66;transition:transform .2s ease}.assistant-message .response-section .response-header .response-avatar[data-v-46f87864]:hover{transform:scale(1.05)}.assistant-message .response-section .response-header .response-avatar .bot-icon[data-v-46f87864]{font-size:20px;color:#fff}.assistant-message .response-section .response-header .response-name[data-v-46f87864]{font-weight:700;font-size:17px;color:#667eea;letter-spacing:.8px;text-shadow:0 2px 4px rgba(0,0,0,.1);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif}.assistant-message .response-section .response-content[data-v-46f87864]{padding:24px}.assistant-message .response-section .response-content .final-response .response-text[data-v-46f87864]{word-break:break-all;line-height:1.8;color:#fff;font-size:15px;font-weight:400;text-shadow:0 1px 3px rgba(0,0,0,.1);letter-spacing:.4px;word-spacing:1.2px;text-align:left;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif}.assistant-message .response-section .response-content .final-response .response-text p[data-v-46f87864]{margin:0 0 12px}.assistant-message .response-section .response-content .final-response .response-text p[data-v-46f87864]:last-child{margin-bottom:0}.assistant-message .response-section .response-content .final-response .response-text strong[data-v-46f87864]{color:#f8fafc;font-weight:600}.assistant-message .response-section .response-content .final-response .response-text em[data-v-46f87864]{color:#e2e8f0;font-style:italic}.assistant-message .response-section .response-content .response-placeholder[data-v-46f87864]{display:flex;align-items:center;justify-content:center;min-height:90px}.assistant-message .response-section .response-content .response-placeholder .typing-indicator[data-v-46f87864]{display:flex;align-items:center;gap:14px}.assistant-message .response-section .response-content .response-placeholder .typing-indicator .typing-text[data-v-46f87864]{color:#cbd5e0;font-style:italic;font-size:14px;opacity:.9;letter-spacing:.3px}.assistant-message .assistant-header[data-v-46f87864]{display:flex;align-items:center;gap:10px;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid rgba(255,255,255,.1)}.assistant-message .assistant-header .assistant-avatar[data-v-46f87864]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;background:linear-gradient(135deg,#667eea,#764ba2);border-radius:50%}.assistant-message .assistant-header .assistant-avatar .bot-icon[data-v-46f87864]{font-size:18px;color:#fff}.assistant-message .assistant-header .assistant-name[data-v-46f87864]{font-weight:600;font-size:14px;color:#667eea;letter-spacing:.5px}.assistant-message .response[data-v-46f87864]{line-height:1.5;white-space:pre-line}.assistant-message .progress[data-v-46f87864]{margin-top:12px}.assistant-message .progress .progress-bar[data-v-46f87864]{width:100%;height:4px;background:#ffffff1a;border-radius:2px;overflow:hidden;margin-bottom:8px}.assistant-message .progress .progress-bar .progress-fill[data-v-46f87864]{height:100%;background:linear-gradient(90deg,#667eea,#764ba2);transition:width .3s ease}.assistant-message .progress .progress-text[data-v-46f87864]{font-size:12px;color:#888}.assistant-message .steps-container[data-v-46f87864]{margin-top:16px;border:1px solid rgba(255,255,255,.1);border-radius:8px;overflow:hidden}.assistant-message .steps-container .steps-title[data-v-46f87864]{margin:0;padding:10px 16px;font-size:14px;font-weight:600;color:#fff;background:#667eea26;border-bottom:1px solid rgba(255,255,255,.08)}.assistant-message .steps-container .ai-section[data-v-46f87864]{border-bottom:1px solid rgba(255,255,255,.05);cursor:pointer;transition:all .2s ease}.assistant-message .steps-container .ai-section[data-v-46f87864]:last-child{border-bottom:none}.assistant-message .steps-container .ai-section[data-v-46f87864]:hover{background:#ffffff0d}.assistant-message .steps-container .ai-section.running[data-v-46f87864]{background:#667eea1a;border-left:3px solid #667eea}.assistant-message .steps-container .ai-section.completed[data-v-46f87864]{border-left:3px solid rgba(34,197,94,.6)}.assistant-message .steps-container .ai-section.pending[data-v-46f87864]{opacity:.7}.assistant-message .steps-container .ai-section .section-header[data-v-46f87864]{display:flex;align-items:center;gap:12px;padding:12px 16px;background:#ffffff05}.assistant-message .steps-container .ai-section .section-header .step-icon[data-v-46f87864]{display:flex;align-items:center;justify-content:center;width:24px;height:24px;background:#667eea33;border-radius:50%;font-size:12px;font-weight:700;color:#667eea}.assistant-message .steps-container .ai-section .section-header .step-title[data-v-46f87864]{flex:1;font-weight:500;color:#fff}.assistant-message .steps-container .ai-section .section-header .step-status[data-v-46f87864]{font-size:12px;padding:4px 8px;border-radius:12px}.assistant-message .steps-container .ai-section .section-header .step-status.completed[data-v-46f87864]{background:#22c55e33;color:#22c55e}.assistant-message .steps-container .ai-section .section-header .step-status.running[data-v-46f87864]{background:#667eea33;color:#667eea}.assistant-message .steps-container .ai-section .section-header .step-status.pending[data-v-46f87864]{background:#9ca3af33;color:#9ca3af}.assistant-message .steps-container .ai-section .action-info[data-v-46f87864]{padding:12px 16px;background:#0003;border-top:1px dashed rgba(255,255,255,.1)}.assistant-message .steps-container .ai-section .action-info .action-description[data-v-46f87864]{display:flex;align-items:center;gap:8px;margin-bottom:8px}.assistant-message .steps-container .ai-section .action-info .action-description .action-icon[data-v-46f87864]{font-size:16px}.assistant-message .steps-container .ai-section .action-info .tool-params[data-v-46f87864]{display:flex;align-items:flex-start;gap:8px;margin-bottom:8px;font-size:13px}.assistant-message .steps-container .ai-section .action-info .tool-params .tool-icon[data-v-46f87864]{margin-top:2px}.assistant-message .steps-container .ai-section .action-info .tool-params .param-label[data-v-46f87864]{color:#aaa;margin-right:4px}.assistant-message .steps-container .ai-section .action-info .tool-params .param-content[data-v-46f87864]{margin:0;padding:6px;background:#0003;border-radius:4px;font-family:monospace;font-size:12px;white-space:pre-wrap;max-height:100px;overflow-y:auto}.assistant-message .steps-container .ai-section .action-info .think-details[data-v-46f87864]{margin-top:10px;padding-top:8px;border-top:1px dashed rgba(255,255,255,.1)}.assistant-message .steps-container .ai-section .action-info .think-details .think-header[data-v-46f87864]{display:flex;align-items:center;gap:8px;margin-bottom:6px}.assistant-message .steps-container .ai-section .action-info .think-details .think-header .think-icon[data-v-46f87864]{font-size:14px}.assistant-message .steps-container .ai-section .action-info .think-details .think-header .think-label[data-v-46f87864]{color:#aaa;font-size:13px}.assistant-message .steps-container .ai-section .action-info .think-details .think-output .think-content[data-v-46f87864]{margin:0;padding:8px;background:#00000026;border-radius:4px;font-family:monospace;font-size:12px;white-space:pre-wrap;max-height:120px;overflow-y:auto;color:#bbb}.assistant-message .steps-container .ai-section .sub-plan-steps[data-v-46f87864]{margin-top:8px;padding:8px 16px;background:#667eea0d;border-top:1px solid rgba(102,126,234,.2)}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-header[data-v-46f87864]{display:flex;align-items:center;gap:6px;margin-bottom:8px}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-header .sub-plan-icon[data-v-46f87864]{font-size:14px;color:#667eea}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-header .sub-plan-title[data-v-46f87864]{font-size:13px;font-weight:600;color:#667eea}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-list[data-v-46f87864]{display:flex;flex-direction:column;gap:4px}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item[data-v-46f87864]{display:flex;align-items:center;gap:8px;padding:6px 8px;background:#ffffff05;border:1px solid rgba(255,255,255,.05);border-radius:4px;cursor:pointer;transition:all .2s ease;margin-left:20px}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item[data-v-46f87864]:hover{background:#ffffff0d;border-color:#667eea4d}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item.completed[data-v-46f87864]{background:#22c55e0d;border-color:#22c55e33}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item.running[data-v-46f87864]{background:#667eea0d;border-color:#667eea4d;box-shadow:0 0 4px #667eea33}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item.pending[data-v-46f87864]{opacity:.6}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item .sub-step-indicator[data-v-46f87864]{display:flex;align-items:center;gap:4px;flex-shrink:0}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item .sub-step-indicator .sub-step-icon[data-v-46f87864]{display:flex;align-items:center;justify-content:center;width:16px;height:16px;background:#667eea1a;border-radius:50%;font-size:10px;font-weight:700;color:#667eea}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item .sub-step-indicator .sub-step-number[data-v-46f87864]{font-size:10px;color:#888;font-weight:500;min-width:12px;text-align:center}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item .sub-step-content[data-v-46f87864]{flex:1;display:flex;align-items:center;justify-content:space-between;min-width:0}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item .sub-step-content .sub-step-title[data-v-46f87864]{color:#ccc;font-size:12px;line-height:1.3;word-break:break-word;flex:1}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item .sub-step-content .sub-step-badge[data-v-46f87864]{background:#667eea26;color:#667eea;font-size:9px;padding:1px 4px;border-radius:8px;font-weight:500;flex-shrink:0;margin-left:6px}.thinking-dots[data-v-46f87864]{display:flex;gap:4px}.thinking-dots span[data-v-46f87864]{width:4px;height:4px;background:#667eea;border-radius:50%;animation:thinking-46f87864 1.4s infinite ease-in-out}.thinking-dots span[data-v-46f87864]:nth-child(1){animation-delay:-.32s}.thinking-dots span[data-v-46f87864]:nth-child(2){animation-delay:-.16s}.thinking-dots span[data-v-46f87864]:nth-child(3){animation-delay:0s}.typing-dots[data-v-46f87864]{display:flex;gap:3px}.typing-dots span[data-v-46f87864]{width:6px;height:6px;background:#667eea;border-radius:50%;animation:typing-46f87864 1.2s infinite ease-in-out}.typing-dots span[data-v-46f87864]:nth-child(1){animation-delay:0s}.typing-dots span[data-v-46f87864]:nth-child(2){animation-delay:.2s}.typing-dots span[data-v-46f87864]:nth-child(3){animation-delay:.4s}@keyframes thinking-46f87864{0%,80%,to{transform:scale(.8);opacity:.5}40%{transform:scale(1);opacity:1}}@keyframes typing-46f87864{0%,60%,to{transform:translateY(0);opacity:.4}30%{transform:translateY(-8px);opacity:1}}@keyframes pulse-46f87864{0%,to{opacity:1}50%{opacity:.5}}.user-input-form-container[data-v-46f87864]{margin-top:12px;padding:16px;background:#667eea1a;border:1px solid rgba(102,126,234,.2);border-radius:8px}.user-input-form-container .user-input-message[data-v-46f87864]{margin-bottom:12px;font-weight:500;color:#fff;font-size:14px}.user-input-form-container .form-description[data-v-46f87864]{margin-bottom:16px;color:#aaa;font-size:13px;line-height:1.4}.user-input-form-container .user-input-form .form-group[data-v-46f87864]{margin-bottom:16px}.user-input-form-container .user-input-form .form-group label[data-v-46f87864]{display:block;margin-bottom:6px;font-size:13px;font-weight:500;color:#fff}.user-input-form-container .user-input-form .form-group .form-input[data-v-46f87864]{width:100%;padding:8px 12px;background:#0000004d;border:1px solid rgba(255,255,255,.2);border-radius:6px;color:#fff;font-size:14px;transition:border-color .2s ease}.user-input-form-container .user-input-form .form-group .form-input[data-v-46f87864]:focus{outline:none;border-color:#667eea;box-shadow:0 0 0 2px #667eea33}.user-input-form-container .user-input-form .form-group .form-input[data-v-46f87864]::placeholder{color:#888}.user-input-form-container .user-input-form .submit-user-input-btn[data-v-46f87864]{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;padding:10px 20px;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s ease}.user-input-form-container .user-input-form .submit-user-input-btn[data-v-46f87864]:hover{transform:translateY(-1px);box-shadow:0 4px 12px #667eea4d}.user-input-form-container .user-input-form .submit-user-input-btn[data-v-46f87864]:active{transform:translateY(0)}.scroll-to-bottom-btn[data-v-46f87864]{position:absolute;bottom:120px;right:24px;width:48px;height:48px;background:linear-gradient(135deg,#667eea,#764ba2);border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:15;box-shadow:0 6px 16px #667eea66;transition:all .3s ease;animation:pulse-glow-46f87864 2s infinite}.scroll-to-bottom-btn[data-v-46f87864]:hover{transform:translateY(-2px);box-shadow:0 8px 20px #667eea80}.scroll-to-bottom-btn[data-v-46f87864]:active{transform:translateY(0)}.scroll-to-bottom-btn svg[data-v-46f87864]{font-size:20px;color:#fff}@keyframes pulse-glow-46f87864{0%,to{box-shadow:0 6px 16px #667eea66}50%{box-shadow:0 6px 20px #667eea99}}.input-area[data-v-639c8b2a]{min-height:112px;padding:20px 24px;border-top:1px solid #1a1a1a;background:#ffffff05;flex-shrink:0;position:sticky;bottom:0;z-index:100;box-shadow:0 -4px 12px #0000001a;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.input-container[data-v-639c8b2a]{display:flex;align-items:center;gap:8px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:12px 16px}.input-container[data-v-639c8b2a]:focus-within{border-color:#667eea}.attach-btn[data-v-639c8b2a]{flex-shrink:0;width:32px;height:32px;border:none;border-radius:6px;background:#ffffff0d;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.attach-btn[data-v-639c8b2a]:hover{background:#ffffff1a;transform:translateY(-1px)}.chat-input[data-v-639c8b2a]{flex:1;background:transparent;border:none;outline:none;color:#fff;font-size:14px;line-height:1.5;resize:none;min-height:20px;max-height:120px}.chat-input[data-v-639c8b2a]::placeholder{color:#666}.chat-input[data-v-639c8b2a]:disabled{opacity:.5;cursor:not-allowed}.chat-input[data-v-639c8b2a]:disabled::placeholder{color:#444}.plan-mode-btn[data-v-639c8b2a]{flex-shrink:0;display:flex;align-items:center;gap:4px;padding:6px 12px;border:1px solid rgba(255,255,255,.2);border-radius:6px;background:#ffffff0d;color:#fff;font-size:12px;cursor:pointer;transition:all .2s ease}.plan-mode-btn[data-v-639c8b2a]:hover{background:#ffffff1a;border-color:#667eea;transform:translateY(-1px)}.send-button[data-v-639c8b2a]{flex-shrink:0;display:flex;align-items:center;gap:4px;padding:6px 12px;border:none;border-radius:6px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;font-size:12px;cursor:pointer;transition:all .2s ease}.send-button[data-v-639c8b2a]:hover:not(:disabled){transform:translateY(-1px)}.send-button[data-v-639c8b2a]:disabled{opacity:.5;cursor:not-allowed}.modal-overlay[data-v-5b32448e]{position:fixed;top:0;left:0;width:100%;height:100%;background:#000000b3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:1001}.modal-container[data-v-5b32448e]{background:linear-gradient(135deg,#667eea1a,#764ba226);border:1px solid rgba(255,255,255,.1);border-radius:16px;width:90%;max-width:600px;max-height:90vh;overflow-y:auto;box-shadow:0 8px 32px #0006}.modal-header[data-v-5b32448e]{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid rgba(255,255,255,.1)}.modal-header h3[data-v-5b32448e]{margin:0;font-size:18px;font-weight:500;color:#ffffffe6}.header-actions[data-v-5b32448e]{display:flex;align-items:center;gap:16px}.status-switch[data-v-5b32448e]{display:flex;align-items:center;gap:8px}.status-label[data-v-5b32448e]{font-size:14px;color:#ffffffb3}.close-btn[data-v-5b32448e]{background:none;border:none;color:#fff9;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;transition:all .3s}.close-btn[data-v-5b32448e]:hover{color:#ffffffe6}.modal-content[data-v-5b32448e]{padding:24px}.task-form[data-v-5b32448e]{display:flex;flex-direction:column;gap:20px}.form-group[data-v-5b32448e]{display:flex;flex-direction:column;gap:8px}.form-label[data-v-5b32448e]{font-size:14px;font-weight:500;color:#ffffffe6}.form-input[data-v-5b32448e],.form-textarea[data-v-5b32448e],.form-select[data-v-5b32448e]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:12px;color:#ffffffe6;font-size:14px;transition:all .3s}.form-input[data-v-5b32448e]:focus,.form-textarea[data-v-5b32448e]:focus,.form-select[data-v-5b32448e]:focus{outline:none;border-color:#667eea80;box-shadow:0 0 0 2px #667eea1a}.form-input[data-v-5b32448e]::placeholder,.form-textarea[data-v-5b32448e]::placeholder{color:#fff6}.form-textarea[data-v-5b32448e]{resize:vertical;min-height:80px}.form-help[data-v-5b32448e]{font-size:12px;color:#ffffff80;margin-top:4px}.time-info[data-v-5b32448e]{display:flex;align-items:center;gap:8px;padding:8px 0}.time-label[data-v-5b32448e]{font-size:14px;font-weight:500;color:#ffffffb3}.time-value[data-v-5b32448e]{font-size:14px;color:#ffffffe6}.template-toggle[data-v-5b32448e]{display:flex;gap:8px}.template-btn[data-v-5b32448e]{display:flex;align-items:center;gap:6px;padding:8px 16px;border-radius:6px;font-size:14px;cursor:pointer;transition:all .3s;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);color:#ffffffb3}.template-btn.active[data-v-5b32448e]{background:#667eea33;border-color:#667eea4d;color:#667eea}.template-btn[data-v-5b32448e]:hover{background:#ffffff1a}.template-btn.active[data-v-5b32448e]:hover{background:#667eea4d}.template-selector[data-v-5b32448e]{margin-top:8px}.form-select[data-v-5b32448e]{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:36px}.modal-footer[data-v-5b32448e]{padding:20px 24px;border-top:1px solid rgba(255,255,255,.1);display:flex;justify-content:flex-end;gap:12px}.cancel-btn[data-v-5b32448e],.save-btn[data-v-5b32448e]{padding:10px 20px;border-radius:8px;font-size:14px;cursor:pointer;transition:all .3s;display:flex;align-items:center;gap:6px}.cancel-btn[data-v-5b32448e]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);color:#fffc}.cancel-btn[data-v-5b32448e]:hover{background:#ffffff1a}.save-btn[data-v-5b32448e]{background:#667eea33;border:1px solid rgba(102,126,234,.3);color:#667eea}.save-btn[data-v-5b32448e]:hover:not(:disabled){background:#667eea4d}.save-btn[data-v-5b32448e]:disabled{opacity:.5;cursor:not-allowed}.loading-icon[data-v-5b32448e]{animation:spin-5b32448e 1s linear infinite}@keyframes spin-5b32448e{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.modal-enter-active[data-v-5b32448e],.modal-leave-active[data-v-5b32448e]{transition:opacity .3s ease}.modal-enter-from[data-v-5b32448e],.modal-leave-to[data-v-5b32448e]{opacity:0}.toggle-switch[data-v-5b32448e]{position:relative;display:inline-block;width:50px;height:24px}.toggle-switch input[data-v-5b32448e]{opacity:0;width:0;height:0}.toggle-slider[data-v-5b32448e]{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#fff3;transition:.4s;border-radius:24px}.toggle-slider[data-v-5b32448e]:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;transition:.4s;border-radius:50%}input:checked+.toggle-slider[data-v-5b32448e]{background-color:#667eea99}input:focus+.toggle-slider[data-v-5b32448e]{box-shadow:0 0 1px #667eea99}input:checked+.toggle-slider[data-v-5b32448e]:before{transform:translate(26px)}.modal-overlay[data-v-f31a9ce7]{position:fixed;top:0;left:0;width:100%;height:100%;background:#000000b3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:1000}.modal-container[data-v-f31a9ce7]{background:linear-gradient(135deg,#667eea1a,#764ba226);border:1px solid rgba(255,255,255,.1);border-radius:16px;width:90%;max-width:800px;max-height:90vh;overflow-y:auto;box-shadow:0 8px 32px #0006}.modal-header[data-v-f31a9ce7]{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid rgba(255,255,255,.1)}.modal-header h3[data-v-f31a9ce7]{margin:0;font-size:18px;font-weight:500;color:#ffffffe6}.header-actions[data-v-f31a9ce7]{display:flex;align-items:center;gap:12px}.add-task-btn[data-v-f31a9ce7]{display:flex;align-items:center;gap:6px;padding:8px 16px;background:#22c55e1a;border:1px solid rgba(34,197,94,.2);border-radius:8px;color:#22c55e;font-size:14px;font-weight:500;cursor:pointer;transition:all .3s}.add-task-btn[data-v-f31a9ce7]:hover{background:#22c55e33;border-color:#22c55e4d;transform:translateY(-1px)}.close-btn[data-v-f31a9ce7]{background:none;border:none;color:#fff9;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;transition:all .3s}.close-btn[data-v-f31a9ce7]:hover{color:#ffffffe6}.modal-content[data-v-f31a9ce7]{padding:24px;min-height:300px}.loading-container[data-v-f31a9ce7],.empty-container[data-v-f31a9ce7]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:200px;color:#fff9;gap:12px}.loading-icon[data-v-f31a9ce7]{font-size:24px;animation:spin-f31a9ce7 1s linear infinite}.empty-icon[data-v-f31a9ce7]{font-size:48px;opacity:.5}@keyframes spin-f31a9ce7{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.task-list[data-v-f31a9ce7]{display:flex;flex-direction:column;gap:16px}.task-item[data-v-f31a9ce7]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:24px;display:flex;justify-content:space-between;align-items:flex-start;transition:all .3s ease;gap:20px;cursor:pointer}.task-item[data-v-f31a9ce7]:hover{background:#667eea26;border-color:#667eea66;transform:translateY(-3px);box-shadow:0 8px 32px #667eea33}.task-main[data-v-f31a9ce7]{flex:1;display:flex;flex-direction:column;gap:16px}.task-info[data-v-f31a9ce7]{display:flex;flex-direction:column;gap:10px}.task-header[data-v-f31a9ce7]{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.task-name[data-v-f31a9ce7]{font-size:20px;font-weight:700;color:#fffffff2;line-height:1.3;background:linear-gradient(135deg,#fffffff2,#fffc);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.task-status-badge[data-v-f31a9ce7]{display:flex;align-items:center;gap:4px;padding:4px 8px;border-radius:12px;font-size:12px;font-weight:500;border:1px solid transparent;white-space:nowrap}.task-status-badge.active[data-v-f31a9ce7]{background:#3b82f61a;border-color:#3b82f633;color:#3b82f6}.task-status-badge.inactive[data-v-f31a9ce7]{background:#9ca3af1a;border-color:#9ca3af33;color:#9ca3af}.task-description[data-v-f31a9ce7]{font-size:14px;color:#ffffffb3;line-height:1.5;margin:4px 0;max-width:80%;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.task-time[data-v-f31a9ce7]{display:flex;align-items:center;gap:8px;color:#fff9;font-size:13px;padding:6px 10px;background:#ffffff08;border-radius:8px;border:1px solid rgba(255,255,255,.05);transition:all .2s ease}.task-time[data-v-f31a9ce7]:hover{background:#ffffff0f;border-color:#ffffff1a}.cron-readable[data-v-f31a9ce7]{color:#ffffffd9;font-weight:600;font-family:SF Mono,Monaco,Inconsolata,Roboto Mono,monospace}.task-actions[data-v-f31a9ce7]{display:flex;flex-direction:row;gap:8px;min-width:200px;align-items:flex-start;margin-left:auto;justify-content:flex-end}.action-btn[data-v-f31a9ce7]{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:all .3s;white-space:nowrap;border:1px solid transparent}.execute-btn[data-v-f31a9ce7]{background:#3b82f61a;border-color:#3b82f633;color:#3b82f6}.execute-btn[data-v-f31a9ce7]:hover:not(:disabled){background:#3b82f633;border-color:#3b82f64d}.execute-btn[data-v-f31a9ce7]:disabled{opacity:.5;cursor:not-allowed}.delete-btn[data-v-f31a9ce7]{background:#ef44441a;border-color:#ef444433;color:#ef4444}.delete-btn[data-v-f31a9ce7]:hover:not(:disabled){background:#ef444433;border-color:#ef44444d}.delete-btn[data-v-f31a9ce7]:disabled{opacity:.5;cursor:not-allowed}.dropdown-btn[data-v-f31a9ce7]{background:#9ca3af1a;border-color:#9ca3af33;color:#9ca3af}.dropdown-btn[data-v-f31a9ce7]:hover{background:#9ca3af33;border-color:#9ca3af4d}.action-dropdown[data-v-f31a9ce7]{position:relative}.dropdown-menu[data-v-f31a9ce7]{position:absolute;top:100%;right:0;background:#1e1e1ef2;border:1px solid rgba(255,255,255,.1);border-radius:8px;box-shadow:0 8px 32px #0006;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);z-index:100;min-width:140px;margin-top:4px}.dropdown-item[data-v-f31a9ce7]{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;background:none;border:none;color:#fffc;font-size:13px;cursor:pointer;transition:all .2s;text-align:left}.dropdown-item[data-v-f31a9ce7]:first-child{border-radius:8px 8px 0 0}.dropdown-item[data-v-f31a9ce7]:last-child{border-radius:0 0 8px 8px}.dropdown-item[data-v-f31a9ce7]:hover:not(:disabled){background:#ffffff1a;color:#fffffff2}.dropdown-item.edit-btn[data-v-f31a9ce7]:hover:not(:disabled){background:#3b82f61a;color:#3b82f6}.dropdown-item.toggle-btn[data-v-f31a9ce7]:hover:not(:disabled){background:#f973161a;color:#f97316}.dropdown-item.delete-btn[data-v-f31a9ce7]:hover:not(:disabled){background:#ef44441a;color:#ef4444}.dropdown-item[data-v-f31a9ce7]:disabled{opacity:.5;cursor:not-allowed}.modal-enter-active[data-v-f31a9ce7],.modal-leave-active[data-v-f31a9ce7]{transition:opacity .3s ease}.modal-enter-from[data-v-f31a9ce7],.modal-leave-to[data-v-f31a9ce7]{opacity:0}.confirm-modal[data-v-f31a9ce7]{background:linear-gradient(135deg,#667eea1a,#764ba226);border:1px solid rgba(255,255,255,.1);border-radius:16px;width:90%;max-width:480px;box-shadow:0 8px 32px #0006;overflow:hidden}.confirm-header[data-v-f31a9ce7]{display:flex;align-items:center;gap:12px;padding:24px 24px 16px;border-bottom:1px solid rgba(255,255,255,.1)}.warning-icon[data-v-f31a9ce7]{font-size:24px;color:#f59e0b}.confirm-header h3[data-v-f31a9ce7]{margin:0;font-size:18px;font-weight:600;color:#ffffffe6}.confirm-content[data-v-f31a9ce7]{padding:20px 24px}.confirm-content p[data-v-f31a9ce7]{margin:0;color:#fffc;line-height:1.6;font-size:14px}.confirm-actions[data-v-f31a9ce7]{display:flex;gap:12px;padding:16px 24px 24px;justify-content:flex-end}.confirm-btn[data-v-f31a9ce7]{display:flex;align-items:center;gap:6px;padding:10px 16px;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:all .3s;border:1px solid transparent;min-width:80px;justify-content:center}.confirm-btn.cancel-btn[data-v-f31a9ce7]{background:#9ca3af1a;border-color:#9ca3af33;color:#9ca3af}.confirm-btn.cancel-btn[data-v-f31a9ce7]:hover{background:#9ca3af33;border-color:#9ca3af4d}.confirm-btn.delete-btn[data-v-f31a9ce7]{background:#ef44441a;border-color:#ef444433;color:#ef4444}.confirm-btn.delete-btn[data-v-f31a9ce7]:hover:not(:disabled){background:#ef444433;border-color:#ef44444d}.confirm-btn.delete-btn[data-v-f31a9ce7]:disabled{opacity:.5;cursor:not-allowed}.create-options-modal[data-v-f31a9ce7]{max-width:520px}.create-icon[data-v-f31a9ce7]{font-size:24px;color:#3b82f6}.create-options[data-v-f31a9ce7]{display:flex;flex-direction:column;gap:16px;margin-top:20px}.create-option-btn[data-v-f31a9ce7]{display:flex;align-items:center;gap:16px;padding:16px;border-radius:12px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);cursor:pointer;transition:all .3s;text-align:left}.create-option-btn[data-v-f31a9ce7]:hover{transform:translateY(-2px);box-shadow:0 8px 24px #0003}.create-option-btn .iconify[data-v-f31a9ce7]{font-size:24px}.jmanus-btn[data-v-f31a9ce7]{color:#3b82f6}.jmanus-btn[data-v-f31a9ce7]:hover{background:#3b82f61a;border-color:#3b82f64d}.jmanus-btn .iconify[data-v-f31a9ce7]{color:#3b82f6}.manual-btn[data-v-f31a9ce7]{color:#10b981}.manual-btn[data-v-f31a9ce7]:hover{background:#10b9811a;border-color:#10b9814d}.manual-btn .iconify[data-v-f31a9ce7]{color:#10b981}.option-content[data-v-f31a9ce7]{display:flex;flex-direction:column;gap:4px}.option-title[data-v-f31a9ce7]{font-size:16px;font-weight:600}.option-desc[data-v-f31a9ce7]{font-size:13px;color:#fff9}.direct-page[data-v-ea79c7eb]{width:100%;display:flex;position:relative}.direct-chat[data-v-ea79c7eb]{height:100vh;width:100%;background:#0a0a0a;display:flex}.left-panel[data-v-ea79c7eb]{position:relative;border-right:none;display:flex;flex-direction:column;height:100vh;overflow:hidden;transition:width .1s ease}.panel-resizer[data-v-ea79c7eb]{width:6px;height:100vh;background:#1a1a1a;cursor:col-resize;position:relative;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease;flex-shrink:0}.panel-resizer[data-v-ea79c7eb]:hover{background:#2a2a2a}.panel-resizer:hover .resizer-line[data-v-ea79c7eb]{background:#4a90e2;width:2px}.panel-resizer[data-v-ea79c7eb]:active{background:#3a3a3a}.resizer-line[data-v-ea79c7eb]{width:1px;height:40px;background:#3a3a3a;border-radius:1px;transition:all .2s ease}[data-v-ea79c7eb] .right-panel{transition:width .1s ease}.chat-header[data-v-ea79c7eb]{padding:20px 24px;border-bottom:1px solid #1a1a1a;display:flex;align-items:center;gap:16px;background:#ffffff05;flex-shrink:0;position:sticky;top:0;z-index:100}.chat-header h2[data-v-ea79c7eb]{flex:1;margin:0;font-size:18px;font-weight:600;color:#fff}.chat-content[data-v-ea79c7eb]{flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden}.header-actions[data-v-ea79c7eb]{display:flex;align-items:center;gap:12px}.back-button[data-v-ea79c7eb]{padding:8px 12px;border:1px solid rgba(255,255,255,.1);border-radius:6px;background:#ffffff0d;color:#fff;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:6px;font-size:14px}.back-button[data-v-ea79c7eb]:hover{background:#ffffff1a;border-color:#fff3}.config-button[data-v-ea79c7eb]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid rgba(255,255,255,.1);border-radius:6px;background:#ffffff0d;color:#fff;cursor:pointer;transition:all .2s ease}.config-button[data-v-ea79c7eb]:hover{background:#ffffff1a;border-color:#fff3}.cron-task-btn[data-v-ea79c7eb]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid rgba(255,255,255,.1);border-radius:6px;background:#ffffff0d;color:#fff;cursor:pointer;transition:all .2s ease}.cron-task-btn[data-v-ea79c7eb]:hover{background:#ffffff1a;border-color:#fff3}.loading-prompt[data-v-ea79c7eb]{flex:1;display:flex;align-items:center;justify-content:center;color:#888;font-size:16px;padding:50px}.message-toast[data-v-ea79c7eb]{position:fixed;top:80px;right:24px;z-index:9999;min-width:320px;max-width:480px;padding:16px 20px;border-radius:8px;box-shadow:0 4px 20px #00000026;display:flex;align-items:center;justify-content:space-between;animation:slideInRight .3s ease-out;font-size:14px;font-weight:500}.message-toast.error[data-v-ea79c7eb]{color:#fff2f0;background-color:#ff4d4f}.message-content[data-v-ea79c7eb]{display:flex;align-items:center;gap:8px;flex:1;word-break:break-all}.message-content i[data-v-ea79c7eb]{font-size:16px} +.sidebar-wrapper[data-v-3c0cf310]{position:relative;width:600px;height:100vh;background:#ffffff0d;border-right:1px solid rgba(255,255,255,.1);transition:all .3s ease-in-out;overflow:hidden}.sidebar-wrapper-collapsed[data-v-3c0cf310]{border-right:none;width:0}.sidebar-wrapper-collapsed .sidebar-content[data-v-3c0cf310]{opacity:0;pointer-events:none}.sidebar-content[data-v-3c0cf310]{height:100%;width:100%;padding:12px 0 12px 12px;display:flex;flex-direction:column;transition:all .3s ease-in-out}.sidebar-content .sidebar-content-header[data-v-3c0cf310]{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;overflow:hidden}.sidebar-content .sidebar-content-header .sidebar-content-title[data-v-3c0cf310]{font-size:20px;font-weight:600;background:linear-gradient(135deg,#667eea,#764ba2);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-content .tab-switcher[data-v-3c0cf310]{display:flex;margin-bottom:16px;background:#ffffff0d;border-radius:8px;padding:4px}.sidebar-content .tab-switcher .tab-button[data-v-3c0cf310]{flex:1;padding:8px 12px;background:transparent;border:none;border-radius:6px;color:#ffffffb3;font-size:12px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:all .2s ease}.sidebar-content .tab-switcher .tab-button[data-v-3c0cf310]:hover:not(:disabled){background:#ffffff1a;color:#ffffffe6}.sidebar-content .tab-switcher .tab-button.active[data-v-3c0cf310]{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;box-shadow:0 2px 4px #667eea4d}.sidebar-content .tab-switcher .tab-button[data-v-3c0cf310]:disabled{opacity:.5;cursor:not-allowed}.sidebar-content .tab-content[data-v-3c0cf310]{display:flex;flex-direction:column;flex:1;min-height:0}.sidebar-content .config-tab .config-container[data-v-3c0cf310]{display:flex;flex-direction:column;height:100%;overflow-y:auto;padding-right:12px}.sidebar-content .config-tab .config-container .template-info-header[data-v-3c0cf310]{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;padding:12px;background:#ffffff0d;border-radius:8px}.sidebar-content .config-tab .config-container .template-info-header .template-info[data-v-3c0cf310]{flex:1;min-width:0}.sidebar-content .config-tab .config-container .template-info-header .template-info h3[data-v-3c0cf310]{margin:0 0 4px;font-size:14px;font-weight:600;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-content .config-tab .config-container .template-info-header .template-info .template-id[data-v-3c0cf310]{font-size:11px;color:#ffffff80}.sidebar-content .config-tab .config-container .template-info-header .back-to-list-btn[data-v-3c0cf310]{width:28px;height:28px;background:transparent;border:none;border-radius:4px;color:#ffffffb3;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.sidebar-content .config-tab .config-container .template-info-header .back-to-list-btn[data-v-3c0cf310]:hover{background:#ffffff1a;color:#fff}.sidebar-content .config-tab .config-container .config-section[data-v-3c0cf310]{margin-bottom:16px;background:#ffffff0d;border-radius:8px;padding:12px}.sidebar-content .config-tab .config-container .config-section .section-header[data-v-3c0cf310]{display:flex;align-items:center;margin-bottom:12px;color:#667eea;font-size:13px;font-weight:600;gap:8px}.sidebar-content .config-tab .config-container .config-section .section-header .section-actions[data-v-3c0cf310]{margin-left:auto;display:flex;gap:6px}.sidebar-content .config-tab .config-container .config-section .json-editor[data-v-3c0cf310],.sidebar-content .config-tab .config-container .config-section .prompt-input[data-v-3c0cf310],.sidebar-content .config-tab .config-container .config-section .params-input[data-v-3c0cf310]{width:100%;background:#0000004d;border:1px solid rgba(255,255,255,.2);border-radius:6px;color:#fff;font-size:12px;font-family:Monaco,Menlo,Ubuntu Mono,monospace;padding:8px;resize:vertical;min-height:100px}.sidebar-content .config-tab .config-container .config-section .json-editor[data-v-3c0cf310]:focus,.sidebar-content .config-tab .config-container .config-section .prompt-input[data-v-3c0cf310]:focus,.sidebar-content .config-tab .config-container .config-section .params-input[data-v-3c0cf310]:focus{outline:none;border-color:#667eea;box-shadow:0 0 0 2px #667eea33}.sidebar-content .config-tab .config-container .config-section .json-editor[data-v-3c0cf310]::placeholder,.sidebar-content .config-tab .config-container .config-section .prompt-input[data-v-3c0cf310]::placeholder,.sidebar-content .config-tab .config-container .config-section .params-input[data-v-3c0cf310]::placeholder{color:#fff6}.sidebar-content .config-tab .config-container .config-section .json-editor[data-v-3c0cf310]{min-height:200px;font-size:11px;line-height:1.5;white-space:pre-wrap;overflow-wrap:break-word;word-break:break-word;-moz-tab-size:2;tab-size:2;font-variant-ligatures:none}.sidebar-content .config-tab .config-container .config-section .generator-content[data-v-3c0cf310]{display:flex;flex-direction:column;gap:8px}.sidebar-content .config-tab .config-container .config-section .generator-content .generator-actions[data-v-3c0cf310]{display:flex;gap:8px}.sidebar-content .config-tab .config-container .config-section .execution-content[data-v-3c0cf310]{display:flex;flex-direction:column;gap:12px}.sidebar-content .config-tab .config-container .config-section .execution-content .params-input-group label[data-v-3c0cf310]{display:block;margin-bottom:6px;font-size:12px;color:#fffc;font-weight:500}.sidebar-content .config-tab .config-container .config-section .execution-content .params-input-group .params-input-container[data-v-3c0cf310]{position:relative;display:flex;align-items:center}.sidebar-content .config-tab .config-container .config-section .execution-content .params-input-group .params-input-container .params-input[data-v-3c0cf310]{min-height:auto;padding-right:32px}.sidebar-content .config-tab .config-container .config-section .execution-content .params-input-group .params-input-container .clear-params-btn[data-v-3c0cf310]{position:absolute;right:8px;width:20px;height:20px;background:transparent;border:none;border-radius:4px;color:#ffffff80;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.sidebar-content .config-tab .config-container .config-section .execution-content .params-input-group .params-input-container .clear-params-btn[data-v-3c0cf310]:hover{background:#f003;color:#ff6b6b}.sidebar-content .config-tab .config-container .config-section .execution-content .params-input-group .params-help-text[data-v-3c0cf310]{margin-bottom:6px;font-size:11px;color:#fff9;line-height:1.4;padding:6px 8px;background:#667eea1a;border:1px solid rgba(102,126,234,.2);border-radius:4px}.sidebar-content .config-tab .config-container .config-section .execution-content .api-url-display[data-v-3c0cf310]{padding:8px;background:#0000004d;border:1px solid rgba(255,255,255,.1);border-radius:6px;font-size:11px}.sidebar-content .config-tab .config-container .config-section .execution-content .api-url-display .api-url-label[data-v-3c0cf310]{color:#ffffffb3;margin-right:8px}.sidebar-content .config-tab .config-container .config-section .execution-content .api-url-display .api-url[data-v-3c0cf310]{color:#64b5f6;font-family:Monaco,Menlo,Ubuntu Mono,monospace;word-break:break-all}.sidebar-content .config-tab .config-container .config-section .execution-content .execute-btn[data-v-3c0cf310]{padding:10px 16px;font-size:13px;font-weight:500}.sidebar-content .btn[data-v-3c0cf310]{padding:6px 12px;border:none;border-radius:4px;font-size:12px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:all .2s ease}.sidebar-content .btn.btn-sm[data-v-3c0cf310]{padding:4px 8px;font-size:11px}.sidebar-content .btn.btn-primary[data-v-3c0cf310]{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.sidebar-content .btn.btn-primary[data-v-3c0cf310]:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 2px 8px #667eea4d}.sidebar-content .btn.btn-secondary[data-v-3c0cf310]{background:#ffffff1a;color:#fffc;border:1px solid rgba(255,255,255,.2)}.sidebar-content .btn.btn-secondary[data-v-3c0cf310]:hover:not(:disabled){background:#fff3;color:#fff}.sidebar-content .btn[data-v-3c0cf310]:disabled{opacity:.5;cursor:not-allowed;transform:none!important;box-shadow:none!important}.sidebar-content .btn .spinning[data-v-3c0cf310]{animation:spin-3c0cf310 1s linear infinite}.sidebar-content .new-task-section[data-v-3c0cf310]{margin-bottom:16px;padding-right:12px}.sidebar-content .new-task-section .new-task-btn[data-v-3c0cf310]{width:100%;padding:12px 16px;background:linear-gradient(135deg,#667eea,#764ba2);border:none;border-radius:8px;color:#fff;font-size:14px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:all .2s ease}.sidebar-content .new-task-section .new-task-btn[data-v-3c0cf310]:hover{transform:translateY(-1px);box-shadow:0 4px 12px #667eea4d}.sidebar-content .new-task-section .new-task-btn .shortcut[data-v-3c0cf310]{font-size:12px;opacity:.8;margin-left:auto}.sidebar-content .sidebar-content-list[data-v-3c0cf310]{display:flex;flex-direction:column;flex:1;overflow-y:auto;padding-right:12px}.sidebar-content .sidebar-content-list .loading-state[data-v-3c0cf310],.sidebar-content .sidebar-content-list .error-state[data-v-3c0cf310],.sidebar-content .sidebar-content-list .empty-state[data-v-3c0cf310]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 16px;color:#fff9;font-size:14px;text-align:center;gap:12px}.sidebar-content .sidebar-content-list .loading-state .spinning[data-v-3c0cf310],.sidebar-content .sidebar-content-list .error-state .spinning[data-v-3c0cf310],.sidebar-content .sidebar-content-list .empty-state .spinning[data-v-3c0cf310]{animation:spin-3c0cf310 1s linear infinite}.sidebar-content .sidebar-content-list .loading-state .retry-btn[data-v-3c0cf310],.sidebar-content .sidebar-content-list .error-state .retry-btn[data-v-3c0cf310],.sidebar-content .sidebar-content-list .empty-state .retry-btn[data-v-3c0cf310]{padding:8px 16px;background:#ffffff1a;border:1px solid rgba(255,255,255,.2);border-radius:4px;color:#fff;cursor:pointer;font-size:12px;transition:background-color .2s ease}.sidebar-content .sidebar-content-list .loading-state .retry-btn[data-v-3c0cf310]:hover,.sidebar-content .sidebar-content-list .error-state .retry-btn[data-v-3c0cf310]:hover,.sidebar-content .sidebar-content-list .empty-state .retry-btn[data-v-3c0cf310]:hover{background:#fff3}.sidebar-content .sidebar-content-list .sidebar-content-list-item[data-v-3c0cf310]{display:flex;align-items:flex-start;padding:12px;margin-bottom:8px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;cursor:pointer;transition:all .2s ease;position:relative}.sidebar-content .sidebar-content-list .sidebar-content-list-item[data-v-3c0cf310]:hover{background:#ffffff1a;border-color:#fff3;transform:translateY(-1px)}.sidebar-content .sidebar-content-list .sidebar-content-list-item.sidebar-content-list-item-active[data-v-3c0cf310]{border:2px solid #667eea;background:#667eea1a}.sidebar-content .sidebar-content-list .sidebar-content-list-item .task-icon[data-v-3c0cf310]{margin-right:12px;color:#667eea;flex-shrink:0;margin-top:2px}.sidebar-content .sidebar-content-list .sidebar-content-list-item .task-details[data-v-3c0cf310]{flex:1;min-width:0}.sidebar-content .sidebar-content-list .sidebar-content-list-item .task-details .task-title[data-v-3c0cf310]{font-size:14px;font-weight:600;color:#fff;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-content .sidebar-content-list .sidebar-content-list-item .task-details .task-preview[data-v-3c0cf310]{font-size:12px;color:#ffffffb3;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-content .sidebar-content-list .sidebar-content-list-item .task-time[data-v-3c0cf310]{font-size:11px;color:#ffffff80;margin-left:8px;flex-shrink:0;position:absolute;top:12px;right:40px}.sidebar-content .sidebar-content-list .sidebar-content-list-item .task-actions[data-v-3c0cf310]{display:flex;align-items:center;margin-left:8px;flex-shrink:0}.sidebar-content .sidebar-content-list .sidebar-content-list-item .task-actions .delete-task-btn[data-v-3c0cf310]{width:24px;height:24px;background:transparent;border:none;border-radius:4px;color:#ffffff80;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease;position:absolute;top:12px;right:12px}.sidebar-content .sidebar-content-list .sidebar-content-list-item .task-actions .delete-task-btn[data-v-3c0cf310]:hover{background:#f003;color:#ff6b6b}@keyframes spin-3c0cf310{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.right-panel[data-v-3c3758b3]{width:50%;display:flex;flex-direction:column}.preview-header[data-v-3c3758b3]{padding:20px 24px;border-bottom:1px solid #1a1a1a;background:#ffffff05}.preview-header .tab-button[data-v-3c3758b3]{padding:8px 16px;border:1px solid rgba(255,255,255,.1);border-radius:6px;background:linear-gradient(135deg,#667eea33,#764ba233);border-color:#667eea;color:#667eea;cursor:default;display:flex;align-items:center;gap:6px;font-size:14px}.preview-content[data-v-3c3758b3]{flex:1;display:flex;flex-direction:column;min-height:0}.step-details[data-v-3c3758b3]{flex:1;position:relative;display:flex;flex-direction:column;min-height:0}.step-info-fixed[data-v-3c3758b3]{position:sticky;top:0;z-index:10;background:#292a2df2;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-bottom:1px solid rgba(255,255,255,.1);padding:20px;margin:0 20px;border-radius:8px 8px 0 0}.step-info-fixed h3[data-v-3c3758b3]{color:#fff;margin:0 0 16px;font-size:18px;font-weight:600;padding-bottom:8px;border-bottom:2px solid #667eea}.step-details-scroll-container[data-v-3c3758b3]{flex:1;overflow-y:auto;overflow-x:hidden;padding:0 20px 20px;margin:0 20px 20px;background:#ffffff03;border-radius:0 0 8px 8px}.step-details-scroll-container[data-v-3c3758b3]::-webkit-scrollbar{width:6px}.step-details-scroll-container[data-v-3c3758b3]::-webkit-scrollbar-track{background:#ffffff1a;border-radius:3px}.step-details-scroll-container[data-v-3c3758b3]::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:3px}.step-details-scroll-container[data-v-3c3758b3]::-webkit-scrollbar-thumb:hover{background:#ffffff80}.agent-info[data-v-3c3758b3]{margin-bottom:16px}.agent-info .info-item[data-v-3c3758b3]{display:flex;margin-bottom:8px;font-size:14px;line-height:1.4}.agent-info .info-item .label[data-v-3c3758b3]{min-width:100px;font-weight:600;color:#888;flex-shrink:0}.agent-info .info-item .value[data-v-3c3758b3]{flex:1;color:#ccc;word-break:break-word}.agent-info .info-item .value.success[data-v-3c3758b3]{color:#27ae60}.execution-status[data-v-3c3758b3]{margin-top:16px;padding-top:16px;border-top:1px solid rgba(255,255,255,.1)}.execution-status .status-item[data-v-3c3758b3]{display:flex;align-items:center;gap:8px}.execution-status .status-item .status-icon[data-v-3c3758b3]{font-size:16px}.execution-status .status-item .status-icon.success[data-v-3c3758b3]{color:#27ae60}.execution-status .status-item .status-icon.progress[data-v-3c3758b3]{color:#3498db}.execution-status .status-item .status-icon.pending[data-v-3c3758b3]{color:#f39c12}.execution-status .status-item .status-text[data-v-3c3758b3]{color:#ccc;font-weight:500}.no-steps-message[data-v-3c3758b3]{text-align:center;color:#666;font-style:italic;margin-top:16px}.no-steps-message p[data-v-3c3758b3]{margin:0}.no-execution-message[data-v-3c3758b3]{padding:20px;background:#f8f9fa;border:1px solid #e9ecef;border-radius:8px;margin-top:16px}.no-execution-message .info-icon[data-v-3c3758b3]{color:#6c757d;font-size:20px;margin-bottom:8px}.no-execution-message h4[data-v-3c3758b3]{margin:0 0 16px;color:#495057;font-size:16px;font-weight:500}.no-execution-message .step-basic-info .info-item[data-v-3c3758b3]{display:flex;margin-bottom:8px;font-size:14px}.no-execution-message .step-basic-info .info-item .label[data-v-3c3758b3]{font-weight:500;color:#6c757d;min-width:80px;margin-right:8px}.no-execution-message .step-basic-info .info-item .value[data-v-3c3758b3]{color:#333;flex:1}.no-execution-message .step-basic-info .info-item .value.status-completed[data-v-3c3758b3]{color:#28a745;font-weight:500}.no-execution-message .step-basic-info .info-item .value.status-current[data-v-3c3758b3]{color:#007bff;font-weight:500}.no-execution-message .step-basic-info .info-item .value.status-pending[data-v-3c3758b3]{color:#6c757d}.no-execution-message .no-execution-hint[data-v-3c3758b3]{margin:16px 0 0;color:#6c757d;font-style:italic;font-size:13px;text-align:center}.execution-indicator[data-v-3c3758b3]{margin-top:20px;padding:20px;background:#4a90e21a;border:1px solid rgba(74,144,226,.3);border-radius:8px;text-align:center;position:relative;overflow:hidden}.execution-waves[data-v-3c3758b3]{position:relative;height:4px;margin-bottom:16px;background:#4a90e233;border-radius:2px;overflow:hidden}.wave[data-v-3c3758b3]{position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(74,144,226,.6),transparent);border-radius:2px}.wave-1[data-v-3c3758b3]{animation:wave-animation-3c3758b3 2s ease-in-out infinite}.wave-2[data-v-3c3758b3]{animation:wave-animation-3c3758b3 2s ease-in-out infinite .6s}.wave-3[data-v-3c3758b3]{animation:wave-animation-3c3758b3 2s ease-in-out infinite 1.2s}@keyframes wave-animation-3c3758b3{0%{left:-100%}50%{left:100%}to{left:100%}}.execution-text[data-v-3c3758b3]{color:#4a90e2;font-size:14px;margin:0;display:flex;align-items:center;justify-content:center;gap:8px}.rotating-icon[data-v-3c3758b3]{animation:rotate-animation-3c3758b3 1s linear infinite}@keyframes rotate-animation-3c3758b3{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.step-info h3[data-v-3c3758b3]{color:#fff;margin:0 0 20px;font-size:18px;font-weight:600}.think-act-steps[data-v-3c3758b3]{margin-top:20px}.think-act-steps h4[data-v-3c3758b3]{color:#fff;margin:0 0 16px;font-size:16px;font-weight:600;padding-bottom:8px;border-bottom:1px solid rgba(255,255,255,.2)}.steps-container[data-v-3c3758b3]{display:flex;flex-direction:column;gap:12px}.think-act-step[data-v-3c3758b3]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:16px}.think-act-step .step-header[data-v-3c3758b3]{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.think-act-step .step-header .step-number[data-v-3c3758b3]{font-weight:600;color:#667eea;font-size:14px}.think-act-step .step-header .step-status[data-v-3c3758b3]{padding:4px 8px;border-radius:4px;font-size:12px;font-weight:500}.think-act-step .step-header .step-status.completed[data-v-3c3758b3]{background:#27ae6033;color:#27ae60}.think-act-step .step-header .step-status.running[data-v-3c3758b3]{background:#3498db33;color:#3498db}.think-act-step .step-header .step-status.pending[data-v-3c3758b3]{background:#f39c1233;color:#f39c12}.think-act-step .think-section[data-v-3c3758b3],.think-act-step .action-section[data-v-3c3758b3],.think-act-step .sub-plan-section[data-v-3c3758b3]{margin-bottom:16px}.think-act-step .think-section[data-v-3c3758b3]:last-child,.think-act-step .action-section[data-v-3c3758b3]:last-child,.think-act-step .sub-plan-section[data-v-3c3758b3]:last-child{margin-bottom:0}.think-act-step .think-section h5[data-v-3c3758b3],.think-act-step .action-section h5[data-v-3c3758b3],.think-act-step .sub-plan-section h5[data-v-3c3758b3]{display:flex;align-items:center;gap:6px;margin:0 0 12px;font-size:14px;font-weight:600;color:#fff}.think-act-step .think-content .input[data-v-3c3758b3],.think-act-step .action-content .input[data-v-3c3758b3],.think-act-step .think-content .output[data-v-3c3758b3],.think-act-step .action-content .output[data-v-3c3758b3],.think-act-step .think-content .tool-info[data-v-3c3758b3],.think-act-step .action-content .tool-info[data-v-3c3758b3]{margin-bottom:12px}.think-act-step .think-content .input[data-v-3c3758b3]:last-child,.think-act-step .action-content .input[data-v-3c3758b3]:last-child,.think-act-step .think-content .output[data-v-3c3758b3]:last-child,.think-act-step .action-content .output[data-v-3c3758b3]:last-child,.think-act-step .think-content .tool-info[data-v-3c3758b3]:last-child,.think-act-step .action-content .tool-info[data-v-3c3758b3]:last-child{margin-bottom:0}.think-act-step .think-content .input .label[data-v-3c3758b3],.think-act-step .action-content .input .label[data-v-3c3758b3],.think-act-step .think-content .output .label[data-v-3c3758b3],.think-act-step .action-content .output .label[data-v-3c3758b3],.think-act-step .think-content .tool-info .label[data-v-3c3758b3],.think-act-step .action-content .tool-info .label[data-v-3c3758b3]{display:block;font-weight:600;color:#888;margin-bottom:4px;font-size:12px}.think-act-step .think-content .input .value[data-v-3c3758b3],.think-act-step .action-content .input .value[data-v-3c3758b3],.think-act-step .think-content .output .value[data-v-3c3758b3],.think-act-step .action-content .output .value[data-v-3c3758b3],.think-act-step .think-content .tool-info .value[data-v-3c3758b3],.think-act-step .action-content .tool-info .value[data-v-3c3758b3]{color:#ccc;font-size:14px}.think-act-step .think-content .input pre[data-v-3c3758b3],.think-act-step .action-content .input pre[data-v-3c3758b3],.think-act-step .think-content .output pre[data-v-3c3758b3],.think-act-step .action-content .output pre[data-v-3c3758b3],.think-act-step .think-content .tool-info pre[data-v-3c3758b3],.think-act-step .action-content .tool-info pre[data-v-3c3758b3]{background:#0000004d;border:1px solid rgba(255,255,255,.1);border-radius:4px;padding:12px;color:#ccc;font-size:12px;overflow-x:auto;white-space:pre-wrap;margin:0;line-height:1.4;max-height:200px;overflow-y:auto}.think-act-step .sub-plan-content .sub-plan-header[data-v-3c3758b3]{background:#667eea1a;border:1px solid rgba(102,126,234,.3);border-radius:6px;padding:12px;margin-bottom:12px}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-info[data-v-3c3758b3]{display:flex;margin-bottom:8px;font-size:12px}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-info[data-v-3c3758b3]:last-child{margin-bottom:0}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-info .label[data-v-3c3758b3]{min-width:80px;font-weight:600;color:#888;flex-shrink:0}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-info .value[data-v-3c3758b3]{flex:1;color:#ccc;word-break:break-word}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-status[data-v-3c3758b3]{display:flex;align-items:center;gap:6px;padding-top:8px;border-top:1px solid rgba(255,255,255,.1)}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-status .status-icon[data-v-3c3758b3]{font-size:14px}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-status .status-icon.success[data-v-3c3758b3]{color:#27ae60}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-status .status-icon.progress[data-v-3c3758b3]{color:#3498db}.think-act-step .sub-plan-content .sub-plan-header .sub-plan-status .status-text[data-v-3c3758b3]{color:#ccc;font-size:12px;font-weight:500}.no-selection[data-v-3c3758b3]{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#666}.no-selection .empty-icon[data-v-3c3758b3]{font-size:48px;margin-bottom:16px;color:#444}.no-selection h3[data-v-3c3758b3]{margin:0 0 8px;font-size:18px;color:#888}.no-selection p[data-v-3c3758b3]{margin:0;font-size:14px;text-align:center;max-width:300px;line-height:1.5}.scroll-to-bottom-btn[data-v-3c3758b3]{position:fixed;bottom:40px;right:40px;width:40px;height:40px;border-radius:50%;background:#4a90e2e6;border:none;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:18px;box-shadow:0 4px 12px #0000004d;transition:all .3s ease;z-index:100}.scroll-to-bottom-btn[data-v-3c3758b3]:hover{background:#4a90e2;transform:translateY(-2px);box-shadow:0 6px 16px #0006}.scroll-to-bottom-btn[data-v-3c3758b3]:active{transform:translateY(0)}.scroll-button-enter-active[data-v-3c3758b3],.scroll-button-leave-active[data-v-3c3758b3]{transition:all .3s ease}.scroll-button-enter-from[data-v-3c3758b3],.scroll-button-leave-to[data-v-3c3758b3]{opacity:0;transform:translateY(20px) scale(.8)}.chat-container[data-v-717f23cf]{flex:1;display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.messages[data-v-717f23cf]{padding:24px;flex:1;display:flex;flex-direction:column;gap:16px;overflow-y:auto;min-height:0;scroll-behavior:smooth;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.3) transparent}.messages[data-v-717f23cf]::-webkit-scrollbar{width:8px}.messages[data-v-717f23cf]::-webkit-scrollbar-track{background:transparent}.messages[data-v-717f23cf]::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:4px}.messages[data-v-717f23cf]::-webkit-scrollbar-thumb:hover{background:#ffffff80}.message[data-v-717f23cf]{display:flex}.message.user[data-v-717f23cf]{justify-content:flex-end}.message.user .message-content[data-v-717f23cf]{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;max-width:80%}.message.assistant[data-v-717f23cf]{justify-content:flex-start}.message.assistant .message-content[data-v-717f23cf]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);color:#fff;max-width:85%}.message-content[data-v-717f23cf]{padding:16px 20px;border-radius:16px;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.user-message[data-v-717f23cf]{line-height:1.5}.assistant-message .thinking-section[data-v-717f23cf]{margin-bottom:16px;border:1px solid rgba(255,255,255,.1);border-radius:12px;background:#ffffff05;overflow:hidden}.assistant-message .thinking-section .thinking-header[data-v-717f23cf]{display:flex;align-items:center;gap:10px;padding:12px 16px;background:#667eea1a;border-bottom:1px solid rgba(255,255,255,.1)}.assistant-message .thinking-section .thinking-header .thinking-avatar[data-v-717f23cf]{display:flex;align-items:center;justify-content:center;width:28px;height:28px;background:linear-gradient(135deg,#f59e0b,#d97706);border-radius:50%}.assistant-message .thinking-section .thinking-header .thinking-avatar .thinking-icon[data-v-717f23cf]{font-size:16px;color:#fff;animation:pulse-717f23cf 2s infinite}.assistant-message .thinking-section .thinking-header .thinking-label[data-v-717f23cf]{font-weight:600;font-size:14px;color:#f59e0b;letter-spacing:.5px}.assistant-message .thinking-section .thinking-content[data-v-717f23cf]{padding:16px}.assistant-message .thinking-section .thinking[data-v-717f23cf]{display:flex;align-items:center;gap:8px;color:#ccc;font-size:14px;margin-bottom:12px;padding:12px;background:#0003;border-radius:8px;border-left:3px solid #f59e0b}.assistant-message .thinking-section .thinking .thinking-icon[data-v-717f23cf]{animation:pulse-717f23cf 2s infinite}.assistant-message .thinking-section .default-processing[data-v-717f23cf]{padding:16px;text-align:center}.assistant-message .thinking-section .default-processing .processing-indicator[data-v-717f23cf]{display:flex;align-items:center;justify-content:center;gap:12px;color:#ccc;font-size:14px}.assistant-message .response-section[data-v-717f23cf]{border:1px solid rgba(255,255,255,.2);border-radius:18px;background:linear-gradient(135deg,#ffffff1f,#ffffff0f);overflow:hidden;box-shadow:0 6px 20px #00000026;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);margin-top:16px;transition:all .3s ease}.assistant-message .response-section[data-v-717f23cf]:hover{transform:translateY(-1px);box-shadow:0 8px 25px #0003}.assistant-message .response-section .response-header[data-v-717f23cf]{display:flex;align-items:center;gap:14px;padding:18px 24px 14px;background:linear-gradient(135deg,#667eea2e,#764ba21f);border-bottom:1px solid rgba(255,255,255,.15)}.assistant-message .response-section .response-header .response-avatar[data-v-717f23cf]{display:flex;align-items:center;justify-content:center;width:36px;height:36px;background:linear-gradient(135deg,#667eea,#764ba2);border-radius:50%;box-shadow:0 3px 12px #667eea66;transition:transform .2s ease}.assistant-message .response-section .response-header .response-avatar[data-v-717f23cf]:hover{transform:scale(1.05)}.assistant-message .response-section .response-header .response-avatar .bot-icon[data-v-717f23cf]{font-size:20px;color:#fff}.assistant-message .response-section .response-header .response-name[data-v-717f23cf]{font-weight:700;font-size:17px;color:#667eea;letter-spacing:.8px;text-shadow:0 2px 4px rgba(0,0,0,.1);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif}.assistant-message .response-section .response-content[data-v-717f23cf]{padding:24px}.assistant-message .response-section .response-content .final-response .response-text[data-v-717f23cf]{word-break:break-all;line-height:1.8;color:#fff;font-size:15px;font-weight:400;text-shadow:0 1px 3px rgba(0,0,0,.1);letter-spacing:.4px;word-spacing:1.2px;text-align:left;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif}.assistant-message .response-section .response-content .final-response .response-text p[data-v-717f23cf]{margin:0 0 12px}.assistant-message .response-section .response-content .final-response .response-text p[data-v-717f23cf]:last-child{margin-bottom:0}.assistant-message .response-section .response-content .final-response .response-text strong[data-v-717f23cf]{color:#f8fafc;font-weight:600}.assistant-message .response-section .response-content .final-response .response-text em[data-v-717f23cf]{color:#e2e8f0;font-style:italic}.assistant-message .response-section .response-content .response-placeholder[data-v-717f23cf]{display:flex;align-items:center;justify-content:center;min-height:90px}.assistant-message .response-section .response-content .response-placeholder .typing-indicator[data-v-717f23cf]{display:flex;align-items:center;gap:14px}.assistant-message .response-section .response-content .response-placeholder .typing-indicator .typing-text[data-v-717f23cf]{color:#cbd5e0;font-style:italic;font-size:14px;opacity:.9;letter-spacing:.3px}.assistant-message .assistant-header[data-v-717f23cf]{display:flex;align-items:center;gap:10px;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid rgba(255,255,255,.1)}.assistant-message .assistant-header .assistant-avatar[data-v-717f23cf]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;background:linear-gradient(135deg,#667eea,#764ba2);border-radius:50%}.assistant-message .assistant-header .assistant-avatar .bot-icon[data-v-717f23cf]{font-size:18px;color:#fff}.assistant-message .assistant-header .assistant-name[data-v-717f23cf]{font-weight:600;font-size:14px;color:#667eea;letter-spacing:.5px}.assistant-message .response[data-v-717f23cf]{line-height:1.5;white-space:pre-line}.assistant-message .progress[data-v-717f23cf]{margin-top:12px}.assistant-message .progress .progress-bar[data-v-717f23cf]{width:100%;height:4px;background:#ffffff1a;border-radius:2px;overflow:hidden;margin-bottom:8px}.assistant-message .progress .progress-bar .progress-fill[data-v-717f23cf]{height:100%;background:linear-gradient(90deg,#667eea,#764ba2);transition:width .3s ease}.assistant-message .progress .progress-text[data-v-717f23cf]{font-size:12px;color:#888}.assistant-message .steps-container[data-v-717f23cf]{margin-top:16px;border:1px solid rgba(255,255,255,.1);border-radius:8px;overflow:hidden}.assistant-message .steps-container .steps-title[data-v-717f23cf]{margin:0;padding:10px 16px;font-size:14px;font-weight:600;color:#fff;background:#667eea26;border-bottom:1px solid rgba(255,255,255,.08)}.assistant-message .steps-container .ai-section[data-v-717f23cf]{border-bottom:1px solid rgba(255,255,255,.05);cursor:pointer;transition:all .2s ease}.assistant-message .steps-container .ai-section[data-v-717f23cf]:last-child{border-bottom:none}.assistant-message .steps-container .ai-section[data-v-717f23cf]:hover{background:#ffffff0d}.assistant-message .steps-container .ai-section.running[data-v-717f23cf]{background:#667eea1a;border-left:3px solid #667eea}.assistant-message .steps-container .ai-section.completed[data-v-717f23cf]{border-left:3px solid rgba(34,197,94,.6)}.assistant-message .steps-container .ai-section.pending[data-v-717f23cf]{opacity:.7}.assistant-message .steps-container .ai-section .section-header[data-v-717f23cf]{display:flex;align-items:center;gap:12px;padding:12px 16px;background:#ffffff05}.assistant-message .steps-container .ai-section .section-header .step-icon[data-v-717f23cf]{display:flex;align-items:center;justify-content:center;width:24px;height:24px;background:#667eea33;border-radius:50%;font-size:12px;font-weight:700;color:#667eea}.assistant-message .steps-container .ai-section .section-header .step-title[data-v-717f23cf]{flex:1;font-weight:500;color:#fff}.assistant-message .steps-container .ai-section .section-header .step-status[data-v-717f23cf]{font-size:12px;padding:4px 8px;border-radius:12px}.assistant-message .steps-container .ai-section .section-header .step-status.completed[data-v-717f23cf]{background:#22c55e33;color:#22c55e}.assistant-message .steps-container .ai-section .section-header .step-status.running[data-v-717f23cf]{background:#667eea33;color:#667eea}.assistant-message .steps-container .ai-section .section-header .step-status.pending[data-v-717f23cf]{background:#9ca3af33;color:#9ca3af}.assistant-message .steps-container .ai-section .action-info[data-v-717f23cf]{padding:12px 16px;background:#0003;border-top:1px dashed rgba(255,255,255,.1)}.assistant-message .steps-container .ai-section .action-info .action-description[data-v-717f23cf]{display:flex;align-items:center;gap:8px;margin-bottom:8px}.assistant-message .steps-container .ai-section .action-info .action-description .action-icon[data-v-717f23cf]{font-size:16px}.assistant-message .steps-container .ai-section .action-info .tool-params[data-v-717f23cf]{display:flex;align-items:flex-start;gap:8px;margin-bottom:8px;font-size:13px}.assistant-message .steps-container .ai-section .action-info .tool-params .tool-icon[data-v-717f23cf]{margin-top:2px}.assistant-message .steps-container .ai-section .action-info .tool-params .param-label[data-v-717f23cf]{color:#aaa;margin-right:4px}.assistant-message .steps-container .ai-section .action-info .tool-params .param-content[data-v-717f23cf]{margin:0;padding:6px;background:#0003;border-radius:4px;font-family:monospace;font-size:12px;white-space:pre-wrap;max-height:100px;overflow-y:auto}.assistant-message .steps-container .ai-section .action-info .think-details[data-v-717f23cf]{margin-top:10px;padding-top:8px;border-top:1px dashed rgba(255,255,255,.1)}.assistant-message .steps-container .ai-section .action-info .think-details .think-header[data-v-717f23cf]{display:flex;align-items:center;gap:8px;margin-bottom:6px}.assistant-message .steps-container .ai-section .action-info .think-details .think-header .think-icon[data-v-717f23cf]{font-size:14px}.assistant-message .steps-container .ai-section .action-info .think-details .think-header .think-label[data-v-717f23cf]{color:#aaa;font-size:13px}.assistant-message .steps-container .ai-section .action-info .think-details .think-output .think-content[data-v-717f23cf]{margin:0;padding:8px;background:#00000026;border-radius:4px;font-family:monospace;font-size:12px;white-space:pre-wrap;max-height:120px;overflow-y:auto;color:#bbb}.assistant-message .steps-container .ai-section .sub-plan-steps[data-v-717f23cf]{margin-top:8px;padding:8px 16px;background:#667eea0d;border-top:1px solid rgba(102,126,234,.2)}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-header[data-v-717f23cf]{display:flex;align-items:center;gap:6px;margin-bottom:8px}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-header .sub-plan-icon[data-v-717f23cf]{font-size:14px;color:#667eea}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-header .sub-plan-title[data-v-717f23cf]{font-size:13px;font-weight:600;color:#667eea}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-list[data-v-717f23cf]{display:flex;flex-direction:column;gap:4px}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item[data-v-717f23cf]{display:flex;align-items:center;gap:8px;padding:6px 8px;background:#ffffff05;border:1px solid rgba(255,255,255,.05);border-radius:4px;cursor:pointer;transition:all .2s ease;margin-left:20px}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item[data-v-717f23cf]:hover{background:#ffffff0d;border-color:#667eea4d}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item.completed[data-v-717f23cf]{background:#22c55e0d;border-color:#22c55e33}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item.running[data-v-717f23cf]{background:#667eea0d;border-color:#667eea4d;box-shadow:0 0 4px #667eea33}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item.pending[data-v-717f23cf]{opacity:.6}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item .sub-step-indicator[data-v-717f23cf]{display:flex;align-items:center;gap:4px;flex-shrink:0}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item .sub-step-indicator .sub-step-icon[data-v-717f23cf]{display:flex;align-items:center;justify-content:center;width:16px;height:16px;background:#667eea1a;border-radius:50%;font-size:10px;font-weight:700;color:#667eea}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item .sub-step-indicator .sub-step-number[data-v-717f23cf]{font-size:10px;color:#888;font-weight:500;min-width:12px;text-align:center}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item .sub-step-content[data-v-717f23cf]{flex:1;display:flex;align-items:center;justify-content:space-between;min-width:0}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item .sub-step-content .sub-step-title[data-v-717f23cf]{color:#ccc;font-size:12px;line-height:1.3;word-break:break-word;flex:1}.assistant-message .steps-container .ai-section .sub-plan-steps .sub-plan-step-item .sub-step-content .sub-step-badge[data-v-717f23cf]{background:#667eea26;color:#667eea;font-size:9px;padding:1px 4px;border-radius:8px;font-weight:500;flex-shrink:0;margin-left:6px}.thinking-dots[data-v-717f23cf]{display:flex;gap:4px}.thinking-dots span[data-v-717f23cf]{width:4px;height:4px;background:#667eea;border-radius:50%;animation:thinking-717f23cf 1.4s infinite ease-in-out}.thinking-dots span[data-v-717f23cf]:nth-child(1){animation-delay:-.32s}.thinking-dots span[data-v-717f23cf]:nth-child(2){animation-delay:-.16s}.thinking-dots span[data-v-717f23cf]:nth-child(3){animation-delay:0s}.typing-dots[data-v-717f23cf]{display:flex;gap:3px}.typing-dots span[data-v-717f23cf]{width:6px;height:6px;background:#667eea;border-radius:50%;animation:typing-717f23cf 1.2s infinite ease-in-out}.typing-dots span[data-v-717f23cf]:nth-child(1){animation-delay:0s}.typing-dots span[data-v-717f23cf]:nth-child(2){animation-delay:.2s}.typing-dots span[data-v-717f23cf]:nth-child(3){animation-delay:.4s}@keyframes thinking-717f23cf{0%,80%,to{transform:scale(.8);opacity:.5}40%{transform:scale(1);opacity:1}}@keyframes typing-717f23cf{0%,60%,to{transform:translateY(0);opacity:.4}30%{transform:translateY(-8px);opacity:1}}@keyframes pulse-717f23cf{0%,to{opacity:1}50%{opacity:.5}}.user-input-form-container[data-v-717f23cf]{margin-top:12px;padding:16px;background:#667eea1a;border:1px solid rgba(102,126,234,.2);border-radius:8px}.user-input-form-container .user-input-message[data-v-717f23cf]{margin-bottom:12px;font-weight:500;color:#fff;font-size:14px}.user-input-form-container .form-description[data-v-717f23cf]{margin-bottom:16px;color:#aaa;font-size:13px;line-height:1.4}.user-input-form-container .user-input-form .form-group[data-v-717f23cf]{margin-bottom:16px}.user-input-form-container .user-input-form .form-group label[data-v-717f23cf]{display:block;margin-bottom:6px;font-size:13px;font-weight:500;color:#fff}.user-input-form-container .user-input-form .form-group .form-input[data-v-717f23cf]{width:100%;padding:8px 12px;background:#0000004d;border:1px solid rgba(255,255,255,.2);border-radius:6px;color:#fff;font-size:14px;transition:border-color .2s ease}.user-input-form-container .user-input-form .form-group .form-input[data-v-717f23cf]:focus{outline:none;border-color:#667eea;box-shadow:0 0 0 2px #667eea33}.user-input-form-container .user-input-form .form-group .form-input[data-v-717f23cf]::placeholder{color:#888}.user-input-form-container .user-input-form .submit-user-input-btn[data-v-717f23cf]{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;padding:10px 20px;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s ease}.user-input-form-container .user-input-form .submit-user-input-btn[data-v-717f23cf]:hover{transform:translateY(-1px);box-shadow:0 4px 12px #667eea4d}.user-input-form-container .user-input-form .submit-user-input-btn[data-v-717f23cf]:active{transform:translateY(0)}.scroll-to-bottom-btn[data-v-717f23cf]{position:absolute;bottom:120px;right:24px;width:48px;height:48px;background:linear-gradient(135deg,#667eea,#764ba2);border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:15;box-shadow:0 6px 16px #667eea66;transition:all .3s ease;animation:pulse-glow-717f23cf 2s infinite}.scroll-to-bottom-btn[data-v-717f23cf]:hover{transform:translateY(-2px);box-shadow:0 8px 20px #667eea80}.scroll-to-bottom-btn[data-v-717f23cf]:active{transform:translateY(0)}.scroll-to-bottom-btn svg[data-v-717f23cf]{font-size:20px;color:#fff}@keyframes pulse-glow-717f23cf{0%,to{box-shadow:0 6px 16px #667eea66}50%{box-shadow:0 6px 20px #667eea99}}.input-area[data-v-4b2cba42]{min-height:112px;padding:20px 24px;border-top:1px solid #1a1a1a;background:#ffffff05;flex-shrink:0;position:sticky;bottom:0;z-index:100;box-shadow:0 -4px 12px #0000001a;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.input-container[data-v-4b2cba42]{display:flex;align-items:center;gap:8px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:12px 16px}.input-container[data-v-4b2cba42]:focus-within{border-color:#667eea}.attach-btn[data-v-4b2cba42]{flex-shrink:0;width:32px;height:32px;border:none;border-radius:6px;background:#ffffff0d;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.attach-btn[data-v-4b2cba42]:hover{background:#ffffff1a;transform:translateY(-1px)}.chat-input[data-v-4b2cba42]{flex:1;background:transparent;border:none;outline:none;color:#fff;font-size:14px;line-height:1.5;resize:none;min-height:20px;max-height:120px}.chat-input[data-v-4b2cba42]::placeholder{color:#666}.chat-input[data-v-4b2cba42]:disabled{opacity:.5;cursor:not-allowed}.chat-input[data-v-4b2cba42]:disabled::placeholder{color:#444}.plan-mode-btn[data-v-4b2cba42]{flex-shrink:0;display:flex;align-items:center;gap:4px;padding:6px 12px;border:1px solid rgba(255,255,255,.2);border-radius:6px;background:#ffffff0d;color:#fff;font-size:12px;cursor:pointer;transition:all .2s ease}.plan-mode-btn[data-v-4b2cba42]:hover{background:#ffffff1a;border-color:#667eea;transform:translateY(-1px)}.send-button[data-v-4b2cba42]{flex-shrink:0;display:flex;align-items:center;gap:4px;padding:6px 12px;border:none;border-radius:6px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;font-size:12px;cursor:pointer;transition:all .2s ease}.send-button[data-v-4b2cba42]:hover:not(:disabled){transform:translateY(-1px)}.send-button[data-v-4b2cba42]:disabled{opacity:.5;cursor:not-allowed}.modal-overlay[data-v-5b32448e]{position:fixed;top:0;left:0;width:100%;height:100%;background:#000000b3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:1001}.modal-container[data-v-5b32448e]{background:linear-gradient(135deg,#667eea1a,#764ba226);border:1px solid rgba(255,255,255,.1);border-radius:16px;width:90%;max-width:600px;max-height:90vh;overflow-y:auto;box-shadow:0 8px 32px #0006}.modal-header[data-v-5b32448e]{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid rgba(255,255,255,.1)}.modal-header h3[data-v-5b32448e]{margin:0;font-size:18px;font-weight:500;color:#ffffffe6}.header-actions[data-v-5b32448e]{display:flex;align-items:center;gap:16px}.status-switch[data-v-5b32448e]{display:flex;align-items:center;gap:8px}.status-label[data-v-5b32448e]{font-size:14px;color:#ffffffb3}.close-btn[data-v-5b32448e]{background:none;border:none;color:#fff9;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;transition:all .3s}.close-btn[data-v-5b32448e]:hover{color:#ffffffe6}.modal-content[data-v-5b32448e]{padding:24px}.task-form[data-v-5b32448e]{display:flex;flex-direction:column;gap:20px}.form-group[data-v-5b32448e]{display:flex;flex-direction:column;gap:8px}.form-label[data-v-5b32448e]{font-size:14px;font-weight:500;color:#ffffffe6}.form-input[data-v-5b32448e],.form-textarea[data-v-5b32448e],.form-select[data-v-5b32448e]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:12px;color:#ffffffe6;font-size:14px;transition:all .3s}.form-input[data-v-5b32448e]:focus,.form-textarea[data-v-5b32448e]:focus,.form-select[data-v-5b32448e]:focus{outline:none;border-color:#667eea80;box-shadow:0 0 0 2px #667eea1a}.form-input[data-v-5b32448e]::placeholder,.form-textarea[data-v-5b32448e]::placeholder{color:#fff6}.form-textarea[data-v-5b32448e]{resize:vertical;min-height:80px}.form-help[data-v-5b32448e]{font-size:12px;color:#ffffff80;margin-top:4px}.time-info[data-v-5b32448e]{display:flex;align-items:center;gap:8px;padding:8px 0}.time-label[data-v-5b32448e]{font-size:14px;font-weight:500;color:#ffffffb3}.time-value[data-v-5b32448e]{font-size:14px;color:#ffffffe6}.template-toggle[data-v-5b32448e]{display:flex;gap:8px}.template-btn[data-v-5b32448e]{display:flex;align-items:center;gap:6px;padding:8px 16px;border-radius:6px;font-size:14px;cursor:pointer;transition:all .3s;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);color:#ffffffb3}.template-btn.active[data-v-5b32448e]{background:#667eea33;border-color:#667eea4d;color:#667eea}.template-btn[data-v-5b32448e]:hover{background:#ffffff1a}.template-btn.active[data-v-5b32448e]:hover{background:#667eea4d}.template-selector[data-v-5b32448e]{margin-top:8px}.form-select[data-v-5b32448e]{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:36px}.modal-footer[data-v-5b32448e]{padding:20px 24px;border-top:1px solid rgba(255,255,255,.1);display:flex;justify-content:flex-end;gap:12px}.cancel-btn[data-v-5b32448e],.save-btn[data-v-5b32448e]{padding:10px 20px;border-radius:8px;font-size:14px;cursor:pointer;transition:all .3s;display:flex;align-items:center;gap:6px}.cancel-btn[data-v-5b32448e]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);color:#fffc}.cancel-btn[data-v-5b32448e]:hover{background:#ffffff1a}.save-btn[data-v-5b32448e]{background:#667eea33;border:1px solid rgba(102,126,234,.3);color:#667eea}.save-btn[data-v-5b32448e]:hover:not(:disabled){background:#667eea4d}.save-btn[data-v-5b32448e]:disabled{opacity:.5;cursor:not-allowed}.loading-icon[data-v-5b32448e]{animation:spin-5b32448e 1s linear infinite}@keyframes spin-5b32448e{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.modal-enter-active[data-v-5b32448e],.modal-leave-active[data-v-5b32448e]{transition:opacity .3s ease}.modal-enter-from[data-v-5b32448e],.modal-leave-to[data-v-5b32448e]{opacity:0}.toggle-switch[data-v-5b32448e]{position:relative;display:inline-block;width:50px;height:24px}.toggle-switch input[data-v-5b32448e]{opacity:0;width:0;height:0}.toggle-slider[data-v-5b32448e]{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#fff3;transition:.4s;border-radius:24px}.toggle-slider[data-v-5b32448e]:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;transition:.4s;border-radius:50%}input:checked+.toggle-slider[data-v-5b32448e]{background-color:#667eea99}input:focus+.toggle-slider[data-v-5b32448e]{box-shadow:0 0 1px #667eea99}input:checked+.toggle-slider[data-v-5b32448e]:before{transform:translate(26px)}.modal-overlay[data-v-837947df]{position:fixed;top:0;left:0;width:100%;height:100%;background:#000000b3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:1000}.modal-container[data-v-837947df]{background:linear-gradient(135deg,#667eea1a,#764ba226);border:1px solid rgba(255,255,255,.1);border-radius:16px;width:90%;max-width:800px;max-height:90vh;overflow-y:auto;box-shadow:0 8px 32px #0006}.modal-header[data-v-837947df]{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid rgba(255,255,255,.1)}.modal-header h3[data-v-837947df]{margin:0;font-size:18px;font-weight:500;color:#ffffffe6}.header-actions[data-v-837947df]{display:flex;align-items:center;gap:12px}.add-task-btn[data-v-837947df]{display:flex;align-items:center;gap:6px;padding:8px 16px;background:#22c55e1a;border:1px solid rgba(34,197,94,.2);border-radius:8px;color:#22c55e;font-size:14px;font-weight:500;cursor:pointer;transition:all .3s}.add-task-btn[data-v-837947df]:hover{background:#22c55e33;border-color:#22c55e4d;transform:translateY(-1px)}.close-btn[data-v-837947df]{background:none;border:none;color:#fff9;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;transition:all .3s}.close-btn[data-v-837947df]:hover{color:#ffffffe6}.modal-content[data-v-837947df]{padding:24px;min-height:300px}.loading-container[data-v-837947df],.empty-container[data-v-837947df]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:200px;color:#fff9;gap:12px}.loading-icon[data-v-837947df]{font-size:24px;animation:spin-837947df 1s linear infinite}.empty-icon[data-v-837947df]{font-size:48px;opacity:.5}@keyframes spin-837947df{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.task-list[data-v-837947df]{display:flex;flex-direction:column;gap:16px}.task-item[data-v-837947df]{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:24px;display:flex;justify-content:space-between;align-items:flex-start;transition:all .3s ease;gap:20px;cursor:pointer}.task-item[data-v-837947df]:hover{background:#667eea26;border-color:#667eea66;transform:translateY(-3px);box-shadow:0 8px 32px #667eea33}.task-main[data-v-837947df]{flex:1;display:flex;flex-direction:column;gap:16px}.task-info[data-v-837947df]{display:flex;flex-direction:column;gap:10px}.task-header[data-v-837947df]{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.task-name[data-v-837947df]{font-size:20px;font-weight:700;color:#fffffff2;line-height:1.3;background:linear-gradient(135deg,#fffffff2,#fffc);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.task-status-badge[data-v-837947df]{display:flex;align-items:center;gap:4px;padding:4px 8px;border-radius:12px;font-size:12px;font-weight:500;border:1px solid transparent;white-space:nowrap}.task-status-badge.active[data-v-837947df]{background:#3b82f61a;border-color:#3b82f633;color:#3b82f6}.task-status-badge.inactive[data-v-837947df]{background:#9ca3af1a;border-color:#9ca3af33;color:#9ca3af}.task-description[data-v-837947df]{font-size:14px;color:#ffffffb3;line-height:1.5;margin:4px 0;max-width:80%;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.task-time[data-v-837947df]{display:flex;align-items:center;gap:8px;color:#fff9;font-size:13px;padding:6px 10px;background:#ffffff08;border-radius:8px;border:1px solid rgba(255,255,255,.05);transition:all .2s ease}.task-time[data-v-837947df]:hover{background:#ffffff0f;border-color:#ffffff1a}.cron-readable[data-v-837947df]{color:#ffffffd9;font-weight:600;font-family:SF Mono,Monaco,Inconsolata,Roboto Mono,monospace}.task-actions[data-v-837947df]{display:flex;flex-direction:row;gap:8px;min-width:200px;align-items:flex-start;margin-left:auto;justify-content:flex-end}.action-btn[data-v-837947df]{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:all .3s;white-space:nowrap;border:1px solid transparent}.execute-btn[data-v-837947df]{background:#3b82f61a;border-color:#3b82f633;color:#3b82f6}.execute-btn[data-v-837947df]:hover:not(:disabled){background:#3b82f633;border-color:#3b82f64d}.execute-btn[data-v-837947df]:disabled{opacity:.5;cursor:not-allowed}.delete-btn[data-v-837947df]{background:#ef44441a;border-color:#ef444433;color:#ef4444}.delete-btn[data-v-837947df]:hover:not(:disabled){background:#ef444433;border-color:#ef44444d}.delete-btn[data-v-837947df]:disabled{opacity:.5;cursor:not-allowed}.dropdown-btn[data-v-837947df]{background:#9ca3af1a;border-color:#9ca3af33;color:#9ca3af}.dropdown-btn[data-v-837947df]:hover{background:#9ca3af33;border-color:#9ca3af4d}.action-dropdown[data-v-837947df]{position:relative}.dropdown-menu[data-v-837947df]{position:absolute;top:100%;right:0;background:#1e1e1ef2;border:1px solid rgba(255,255,255,.1);border-radius:8px;box-shadow:0 8px 32px #0006;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);z-index:100;min-width:140px;margin-top:4px}.dropdown-item[data-v-837947df]{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;background:none;border:none;color:#fffc;font-size:13px;cursor:pointer;transition:all .2s;text-align:left}.dropdown-item[data-v-837947df]:first-child{border-radius:8px 8px 0 0}.dropdown-item[data-v-837947df]:last-child{border-radius:0 0 8px 8px}.dropdown-item[data-v-837947df]:hover:not(:disabled){background:#ffffff1a;color:#fffffff2}.dropdown-item.edit-btn[data-v-837947df]:hover:not(:disabled){background:#3b82f61a;color:#3b82f6}.dropdown-item.toggle-btn[data-v-837947df]:hover:not(:disabled){background:#f973161a;color:#f97316}.dropdown-item.delete-btn[data-v-837947df]:hover:not(:disabled){background:#ef44441a;color:#ef4444}.dropdown-item[data-v-837947df]:disabled{opacity:.5;cursor:not-allowed}.modal-enter-active[data-v-837947df],.modal-leave-active[data-v-837947df]{transition:opacity .3s ease}.modal-enter-from[data-v-837947df],.modal-leave-to[data-v-837947df]{opacity:0}.confirm-modal[data-v-837947df]{background:linear-gradient(135deg,#667eea1a,#764ba226);border:1px solid rgba(255,255,255,.1);border-radius:16px;width:90%;max-width:480px;box-shadow:0 8px 32px #0006;overflow:hidden}.confirm-header[data-v-837947df]{display:flex;align-items:center;gap:12px;padding:24px 24px 16px;border-bottom:1px solid rgba(255,255,255,.1)}.warning-icon[data-v-837947df]{font-size:24px;color:#f59e0b}.confirm-header h3[data-v-837947df]{margin:0;font-size:18px;font-weight:600;color:#ffffffe6}.confirm-content[data-v-837947df]{padding:20px 24px}.confirm-content p[data-v-837947df]{margin:0;color:#fffc;line-height:1.6;font-size:14px}.confirm-actions[data-v-837947df]{display:flex;gap:12px;padding:16px 24px 24px;justify-content:flex-end}.confirm-btn[data-v-837947df]{display:flex;align-items:center;gap:6px;padding:10px 16px;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:all .3s;border:1px solid transparent;min-width:80px;justify-content:center}.confirm-btn.cancel-btn[data-v-837947df]{background:#9ca3af1a;border-color:#9ca3af33;color:#9ca3af}.confirm-btn.cancel-btn[data-v-837947df]:hover{background:#9ca3af33;border-color:#9ca3af4d}.confirm-btn.delete-btn[data-v-837947df]{background:#ef44441a;border-color:#ef444433;color:#ef4444}.confirm-btn.delete-btn[data-v-837947df]:hover:not(:disabled){background:#ef444433;border-color:#ef44444d}.confirm-btn.delete-btn[data-v-837947df]:disabled{opacity:.5;cursor:not-allowed}.create-options-modal[data-v-837947df]{max-width:520px}.create-icon[data-v-837947df]{font-size:24px;color:#3b82f6}.create-options[data-v-837947df]{display:flex;flex-direction:column;gap:16px;margin-top:20px}.create-option-btn[data-v-837947df]{display:flex;align-items:center;gap:16px;padding:16px;border-radius:12px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);cursor:pointer;transition:all .3s;text-align:left}.create-option-btn[data-v-837947df]:hover{transform:translateY(-2px);box-shadow:0 8px 24px #0003}.create-option-btn .iconify[data-v-837947df]{font-size:24px}.jmanus-btn[data-v-837947df]{color:#3b82f6}.jmanus-btn[data-v-837947df]:hover{background:#3b82f61a;border-color:#3b82f64d}.jmanus-btn .iconify[data-v-837947df]{color:#3b82f6}.manual-btn[data-v-837947df]{color:#10b981}.manual-btn[data-v-837947df]:hover{background:#10b9811a;border-color:#10b9814d}.manual-btn .iconify[data-v-837947df]{color:#10b981}.option-content[data-v-837947df]{display:flex;flex-direction:column;gap:4px}.option-title[data-v-837947df]{font-size:16px;font-weight:600}.option-desc[data-v-837947df]{font-size:13px;color:#fff9}.direct-page[data-v-eab98c50]{width:100%;display:flex;position:relative}.direct-chat[data-v-eab98c50]{height:100vh;width:100%;background:#0a0a0a;display:flex}.left-panel[data-v-eab98c50]{position:relative;border-right:none;display:flex;flex-direction:column;height:100vh;overflow:hidden;transition:width .1s ease}.panel-resizer[data-v-eab98c50]{width:6px;height:100vh;background:#1a1a1a;cursor:col-resize;position:relative;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease;flex-shrink:0}.panel-resizer[data-v-eab98c50]:hover{background:#2a2a2a}.panel-resizer:hover .resizer-line[data-v-eab98c50]{background:#4a90e2;width:2px}.panel-resizer[data-v-eab98c50]:active{background:#3a3a3a}.resizer-line[data-v-eab98c50]{width:1px;height:40px;background:#3a3a3a;border-radius:1px;transition:all .2s ease}[data-v-eab98c50] .right-panel{transition:width .1s ease}.chat-header[data-v-eab98c50]{padding:20px 24px;border-bottom:1px solid #1a1a1a;display:flex;align-items:center;gap:16px;background:#ffffff05;flex-shrink:0;position:sticky;top:0;z-index:100}.chat-header h2[data-v-eab98c50]{flex:1;margin:0;font-size:18px;font-weight:600;color:#fff}.chat-content[data-v-eab98c50]{flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden}.header-actions[data-v-eab98c50]{display:flex;align-items:center;gap:12px}.back-button[data-v-eab98c50]{padding:8px 12px;border:1px solid rgba(255,255,255,.1);border-radius:6px;background:#ffffff0d;color:#fff;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:6px;font-size:14px}.back-button[data-v-eab98c50]:hover{background:#ffffff1a;border-color:#fff3}.config-button[data-v-eab98c50]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid rgba(255,255,255,.1);border-radius:6px;background:#ffffff0d;color:#fff;cursor:pointer;transition:all .2s ease}.config-button[data-v-eab98c50]:hover{background:#ffffff1a;border-color:#fff3}.cron-task-btn[data-v-eab98c50]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid rgba(255,255,255,.1);border-radius:6px;background:#ffffff0d;color:#fff;cursor:pointer;transition:all .2s ease}.cron-task-btn[data-v-eab98c50]:hover{background:#ffffff1a;border-color:#fff3}.loading-prompt[data-v-eab98c50]{flex:1;display:flex;align-items:center;justify-content:center;color:#888;font-size:16px;padding:50px}.message-toast[data-v-eab98c50]{position:fixed;top:80px;right:24px;z-index:9999;min-width:320px;max-width:480px;padding:16px 20px;border-radius:8px;box-shadow:0 4px 20px #00000026;display:flex;align-items:center;justify-content:space-between;animation:slideInRight .3s ease-out;font-size:14px;font-weight:500}.message-toast.error[data-v-eab98c50]{color:#fff2f0;background-color:#ff4d4f}.message-content[data-v-eab98c50]{display:flex;align-items:center;gap:8px;flex:1;word-break:break-all}.message-content i[data-v-eab98c50]{font-size:16px} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-TjSmldwt.css b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-TjSmldwt.css deleted file mode 100644 index 935e86e320..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-TjSmldwt.css +++ /dev/null @@ -1 +0,0 @@ -.language-switcher[data-v-8dd61fe2]{position:relative;display:inline-block}.language-btn[data-v-8dd61fe2]{display:flex;align-items:center;gap:6px;padding:8px 12px;background:transparent;border:1.5px solid #667eea;border-radius:8px;color:#8da2fb;cursor:pointer;transition:all .2s ease;font-size:14px;font-weight:600;outline:none}.language-btn[data-v-8dd61fe2]:hover{background:#667eea26;border-color:#7c9eff;color:#a3bffa;box-shadow:0 0 15px #667eea33}.language-btn[data-v-8dd61fe2]:focus{box-shadow:0 0 0 3px #667eea80}.current-lang[data-v-8dd61fe2]{color:inherit;font-weight:600;min-width:40px;text-align:left;text-shadow:none}.chevron[data-v-8dd61fe2]{transition:transform .3s cubic-bezier(.4,0,.2,1);opacity:.9;filter:none}.language-dropdown[data-v-8dd61fe2]{position:absolute;top:100%;right:0;z-index:9999;margin-top:4px;background:linear-gradient(135deg,#282832f2,#1e1e28f2);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid rgba(102,126,234,.3);border-radius:8px;box-shadow:0 8px 32px #0006,0 0 0 1px #667eea33;min-width:200px;animation:slideDown-8dd61fe2 .2s ease}.dropdown-header[data-v-8dd61fe2]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid rgba(102,126,234,.2);font-size:14px;font-weight:600;color:#fff;background:linear-gradient(135deg,#667eea1a,#667eea0d)}.close-btn[data-v-8dd61fe2]{background:none;border:none;color:#fff9;cursor:pointer;padding:4px;border-radius:4px;transition:all .2s ease}.close-btn[data-v-8dd61fe2]:hover{background:#ffffff1a;color:#fffc}.language-options[data-v-8dd61fe2]{padding:8px 0}.language-option[data-v-8dd61fe2]{display:flex;align-items:center;gap:12px;width:100%;padding:10px 16px;background:none;border:none;color:#ffffffb3;cursor:pointer;transition:all .2s ease;text-align:left}.language-option[data-v-8dd61fe2]:hover{background:#ffffff0d;color:#ffffffe6}.language-option.active[data-v-8dd61fe2]{background:linear-gradient(135deg,#667eea33,#667eea1a);color:#7c9eff;border-left:3px solid #667eea;padding-left:13px}.language-option.loading[data-v-8dd61fe2]{opacity:.6;cursor:not-allowed}.language-option[data-v-8dd61fe2]:disabled{cursor:not-allowed;opacity:.6}.lang-code[data-v-8dd61fe2]{display:inline-block;min-width:24px;font-size:12px;font-weight:600;text-transform:uppercase;opacity:.8}.lang-name[data-v-8dd61fe2]{flex:1;font-size:14px;font-weight:500}.check-icon[data-v-8dd61fe2]{color:#667eea;opacity:.8}.loading-icon[data-v-8dd61fe2]{color:#667eea;opacity:.8;animation:spin-8dd61fe2 1s linear infinite}@keyframes spin-8dd61fe2{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.backdrop[data-v-8dd61fe2]{position:fixed;top:0;left:0;right:0;bottom:0;z-index:9998;background:transparent}@keyframes slideDown-8dd61fe2{0%{opacity:0;transform:translateY(-8px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}@media (max-width: 768px){.language-dropdown[data-v-8dd61fe2]{right:-8px;left:-8px;width:auto;min-width:auto}.language-btn[data-v-8dd61fe2]{padding:6px 10px;font-size:13px}.current-lang[data-v-8dd61fe2]{min-width:35px}}@media (prefers-color-scheme: light){.language-dropdown[data-v-8dd61fe2]{background:#fffffff2;border-color:#0000001a;box-shadow:0 8px 32px #0000001a}.dropdown-header[data-v-8dd61fe2]{color:#000c;border-bottom-color:#0000001a}.close-btn[data-v-8dd61fe2]{color:#0009}.close-btn[data-v-8dd61fe2]:hover{background:#0000001a;color:#000c}.language-option[data-v-8dd61fe2]{color:#000000b3}.language-option[data-v-8dd61fe2]:hover{background:#0000000d;color:#000000e6}} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-SarmArA2.js b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-W4k7xcj8.js similarity index 89% rename from spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-SarmArA2.js rename to spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-W4k7xcj8.js index f97bf97ed8..86a9a5a211 100644 --- a/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-SarmArA2.js +++ b/spring-ai-alibaba-jmanus/src/main/resources/static/ui/assets/index-W4k7xcj8.js @@ -1,28 +1,28 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Clz_zCtn.js","assets/llm-check-D2idVWhZ.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/index-tAPEJSyF.css","assets/index-Da6ed0Wm.js","assets/Java-AI-BYpq8IxI.js","assets/iconify-B5kZhuXP.js","assets/index-BPwnW1su.js","assets/index-TjSmldwt.css","assets/sidebar-EjrN4Sj7.js","assets/index-CXUcGEY4.css","assets/index-BijJLnMN.js","assets/useMessage-BDFqrfR1.js","assets/useMessage-B772OobR.css","assets/index-D55Gujbf.css","assets/index-H3fwLZKf.js","assets/index-BSRSmj5D.css","assets/notFound-C8IvAV_5.js","assets/notFound-Ocgq36M9.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CAOqiiSi.js","assets/llm-check-BVkAKrj3.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/index-DfXlok8T.css","assets/index-CZriWw3M.js","assets/Java-AI-BYpq8IxI.js","assets/iconify-bZOkqtWv.js","assets/index-0-ztzQqN.js","assets/index-CxnUfhp1.css","assets/sidebar-Cklmpi9w.js","assets/index-Bve_wuYa.css","assets/index-BxnqWDJP.js","assets/useMessage-QCjbpgZx.js","assets/useMessage-B772OobR.css","assets/index-DjttYkrg.css","assets/index-DOvRfojN.js","assets/index-Bve1G_0I.css","assets/notFound-BRvp1baV.js","assets/notFound-Ocgq36M9.css"])))=>i.map(i=>d[i]); (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&o(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();/** * @vue/shared v3.5.17 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function sS(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ft={},Ys=[],ci=()=>{},gL=()=>!1,Yh=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cS=e=>e.startsWith("onUpdate:"),Rn=Object.assign,uS=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},hL=Object.prototype.hasOwnProperty,Rt=(e,t)=>hL.call(e,t),ct=Array.isArray,qs=e=>lf(e)==="[object Map]",qh=e=>lf(e)==="[object Set]",Mw=e=>lf(e)==="[object Date]",gt=e=>typeof e=="function",en=e=>typeof e=="string",jr=e=>typeof e=="symbol",kt=e=>e!==null&&typeof e=="object",d_=e=>(kt(e)||gt(e))&>(e.then)&>(e.catch),f_=Object.prototype.toString,lf=e=>f_.call(e),vL=e=>lf(e).slice(8,-1),p_=e=>lf(e)==="[object Object]",dS=e=>en(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,zu=sS(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Jh=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},mL=/-(\w)/g,mr=Jh(e=>e.replace(mL,(t,n)=>n?n.toUpperCase():"")),bL=/\B([A-Z])/g,es=Jh(e=>e.replace(bL,"-$1").toLowerCase()),Zh=Jh(e=>e.charAt(0).toUpperCase()+e.slice(1)),qm=Jh(e=>e?`on${Zh(e)}`:""),Aa=(e,t)=>!Object.is(e,t),Rp=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},Og=e=>{const t=parseFloat(e);return isNaN(t)?e:t},yL=e=>{const t=en(e)?Number(e):NaN;return isNaN(t)?e:t};let Aw;const Qh=()=>Aw||(Aw=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function wn(e){if(ct(e)){const t={};for(let n=0;n{if(n){const o=n.split(CL);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function _n(e){let t="";if(en(e))t=e;else if(ct(e))for(let n=0;ngc(n,t))}const h_=e=>!!(e&&e.__v_isRef===!0),yd=e=>en(e)?e:e==null?"":ct(e)||kt(e)&&(e.toString===f_||!gt(e.toString))?h_(e)?yd(e.value):JSON.stringify(e,v_,2):String(e),v_=(e,t)=>h_(t)?v_(e,t.value):qs(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r],i)=>(n[Jm(o,i)+" =>"]=r,n),{})}:qh(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Jm(n))}:jr(t)?Jm(t):kt(t)&&!ct(t)&&!p_(t)?String(t):t,Jm=(e,t="")=>{var n;return jr(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +**//*! #__NO_SIDE_EFFECTS__ */function sS(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ft={},Ys=[],ci=()=>{},gL=()=>!1,Xh=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cS=e=>e.startsWith("onUpdate:"),Rn=Object.assign,uS=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},hL=Object.prototype.hasOwnProperty,Rt=(e,t)=>hL.call(e,t),ct=Array.isArray,qs=e=>lf(e)==="[object Map]",Yh=e=>lf(e)==="[object Set]",Mw=e=>lf(e)==="[object Date]",gt=e=>typeof e=="function",en=e=>typeof e=="string",jr=e=>typeof e=="symbol",kt=e=>e!==null&&typeof e=="object",d_=e=>(kt(e)||gt(e))&>(e.then)&>(e.catch),f_=Object.prototype.toString,lf=e=>f_.call(e),vL=e=>lf(e).slice(8,-1),p_=e=>lf(e)==="[object Object]",dS=e=>en(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,zu=sS(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),qh=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},mL=/-(\w)/g,mr=qh(e=>e.replace(mL,(t,n)=>n?n.toUpperCase():"")),bL=/\B([A-Z])/g,es=qh(e=>e.replace(bL,"-$1").toLowerCase()),Jh=qh(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ym=qh(e=>e?`on${Jh(e)}`:""),Aa=(e,t)=>!Object.is(e,t),Rp=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},Pg=e=>{const t=parseFloat(e);return isNaN(t)?e:t},yL=e=>{const t=en(e)?Number(e):NaN;return isNaN(t)?e:t};let Aw;const Zh=()=>Aw||(Aw=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function wn(e){if(ct(e)){const t={};for(let n=0;n{if(n){const o=n.split(CL);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function _n(e){let t="";if(en(e))t=e;else if(ct(e))for(let n=0;ngc(n,t))}const h_=e=>!!(e&&e.__v_isRef===!0),yd=e=>en(e)?e:e==null?"":ct(e)||kt(e)&&(e.toString===f_||!gt(e.toString))?h_(e)?yd(e.value):JSON.stringify(e,v_,2):String(e),v_=(e,t)=>h_(t)?v_(e,t.value):qs(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r],i)=>(n[qm(o,i)+" =>"]=r,n),{})}:Yh(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>qm(n))}:jr(t)?qm(t):kt(t)&&!ct(t)&&!p_(t)?String(t):t,qm=(e,t="")=>{var n;return jr(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** * @vue/reactivity v3.5.17 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let to;class m_{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=to,!t&&to&&(this.index=(to.scopes||(to.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0&&(to=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n0)return;if(Wu){let t=Wu;for(Wu=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ju;){let t=ju;for(ju=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function C_(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function x_(e){let t,n=e.depsTail,o=n;for(;o;){const r=o.prevDep;o.version===-1?(o===n&&(n=r),vS(o),TL(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=r}e.deps=t,e.depsTail=n}function Yb(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&($_(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function $_(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Sd)||(e.globalVersion=Sd,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Yb(e))))return;e.flags|=2;const t=e.dep,n=Vt,o=Lr;Vt=e,Lr=!0;try{C_(e);const r=e.fn(e._value);(t.version===0||Aa(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Vt=n,Lr=o,x_(e),e.flags&=-3}}function vS(e,t=!1){const{dep:n,prevSub:o,nextSub:r}=e;if(o&&(o.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)vS(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function TL(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Lr=!0;const w_=[];function Xi(){w_.push(Lr),Lr=!1}function Yi(){const e=w_.pop();Lr=e===void 0?!0:e}function Rw(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Vt;Vt=void 0;try{t()}finally{Vt=n}}}let Sd=0,EL=class{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}};class mS{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Vt||!Lr||Vt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Vt)n=this.activeLink=new EL(Vt,this),Vt.deps?(n.prevDep=Vt.depsTail,Vt.depsTail.nextDep=n,Vt.depsTail=n):Vt.deps=Vt.depsTail=n,P_(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=Vt.depsTail,n.nextDep=void 0,Vt.depsTail.nextDep=n,Vt.depsTail=n,Vt.deps===n&&(Vt.deps=o)}return n}trigger(t){this.version++,Sd++,this.notify(t)}notify(t){gS();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{hS()}}}function P_(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)P_(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ig=new WeakMap,Tl=Symbol(""),qb=Symbol(""),Cd=Symbol("");function oo(e,t,n){if(Lr&&Vt){let o=Ig.get(e);o||Ig.set(e,o=new Map);let r=o.get(n);r||(o.set(n,r=new mS),r.map=o,r.key=n),r.track()}}function Di(e,t,n,o,r,i){const a=Ig.get(e);if(!a){Sd++;return}const l=s=>{s&&s.trigger()};if(gS(),t==="clear")a.forEach(l);else{const s=ct(e),u=s&&dS(n);if(s&&n==="length"){const c=Number(o);a.forEach((d,f)=>{(f==="length"||f===Cd||!jr(f)&&f>=c)&&l(d)})}else switch((n!==void 0||a.has(void 0))&&l(a.get(n)),u&&l(a.get(Cd)),t){case"add":s?u&&l(a.get("length")):(l(a.get(Tl)),qs(e)&&l(a.get(qb)));break;case"delete":s||(l(a.get(Tl)),qs(e)&&l(a.get(qb)));break;case"set":qs(e)&&l(a.get(Tl));break}}hS()}function _L(e,t){const n=Ig.get(e);return n&&n.get(t)}function Ss(e){const t=nt(e);return t===e?t:(oo(t,"iterate",Cd),fr(e)?t:t.map(Gn))}function tv(e){return oo(e=nt(e),"iterate",Cd),e}const ML={__proto__:null,[Symbol.iterator](){return Qm(this,Symbol.iterator,Gn)},concat(...e){return Ss(this).concat(...e.map(t=>ct(t)?Ss(t):t))},entries(){return Qm(this,"entries",e=>(e[1]=Gn(e[1]),e))},every(e,t){return Ci(this,"every",e,t,void 0,arguments)},filter(e,t){return Ci(this,"filter",e,t,n=>n.map(Gn),arguments)},find(e,t){return Ci(this,"find",e,t,Gn,arguments)},findIndex(e,t){return Ci(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ci(this,"findLast",e,t,Gn,arguments)},findLastIndex(e,t){return Ci(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ci(this,"forEach",e,t,void 0,arguments)},includes(...e){return e0(this,"includes",e)},indexOf(...e){return e0(this,"indexOf",e)},join(e){return Ss(this).join(e)},lastIndexOf(...e){return e0(this,"lastIndexOf",e)},map(e,t){return Ci(this,"map",e,t,void 0,arguments)},pop(){return hu(this,"pop")},push(...e){return hu(this,"push",e)},reduce(e,...t){return Dw(this,"reduce",e,t)},reduceRight(e,...t){return Dw(this,"reduceRight",e,t)},shift(){return hu(this,"shift")},some(e,t){return Ci(this,"some",e,t,void 0,arguments)},splice(...e){return hu(this,"splice",e)},toReversed(){return Ss(this).toReversed()},toSorted(e){return Ss(this).toSorted(e)},toSpliced(...e){return Ss(this).toSpliced(...e)},unshift(...e){return hu(this,"unshift",e)},values(){return Qm(this,"values",Gn)}};function Qm(e,t,n){const o=tv(e),r=o[t]();return o!==e&&!fr(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.value&&(i.value=n(i.value)),i}),r}const AL=Array.prototype;function Ci(e,t,n,o,r,i){const a=tv(e),l=a!==e&&!fr(e),s=a[t];if(s!==AL[t]){const d=s.apply(e,i);return l?Gn(d):d}let u=n;a!==e&&(l?u=function(d,f){return n.call(this,Gn(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=s.call(a,u,o);return l&&r?r(c):c}function Dw(e,t,n,o){const r=tv(e);let i=n;return r!==e&&(fr(e)?n.length>3&&(i=function(a,l,s){return n.call(this,a,l,s,e)}):i=function(a,l,s){return n.call(this,a,Gn(l),s,e)}),r[t](i,...o)}function e0(e,t,n){const o=nt(e);oo(o,"iterate",Cd);const r=o[t](...n);return(r===-1||r===!1)&&SS(n[0])?(n[0]=nt(n[0]),o[t](...n)):r}function hu(e,t,n=[]){Xi(),gS();const o=nt(e)[t].apply(e,n);return hS(),Yi(),o}const RL=sS("__proto__,__v_isRef,__isVue"),O_=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(jr));function DL(e){jr(e)||(e=String(e));const t=nt(this);return oo(t,"has",e),t.hasOwnProperty(e)}class I_{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(r?i?VL:M_:i?__:E_).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const a=ct(t);if(!r){let s;if(a&&(s=ML[n]))return s;if(n==="hasOwnProperty")return DL}const l=Reflect.get(t,n,Ut(t)?t:o);return(jr(n)?O_.has(n):RL(n))||(r||oo(t,"get",n),i)?l:Ut(l)?a&&dS(n)?l:l.value:kt(l)?r?nv(l):rt(l):l}}class T_ extends I_{constructor(t=!1){super(!1,t)}set(t,n,o,r){let i=t[n];if(!this._isShallow){const s=La(i);if(!fr(o)&&!La(o)&&(i=nt(i),o=nt(o)),!ct(t)&&Ut(i)&&!Ut(o))return s?!1:(i.value=o,!0)}const a=ct(t)&&dS(n)?Number(n)e,Bf=e=>Reflect.getPrototypeOf(e);function BL(e,t,n){return function(...o){const r=this.__v_raw,i=nt(r),a=qs(i),l=e==="entries"||e===Symbol.iterator&&a,s=e==="keys"&&a,u=r[e](...o),c=n?Jb:t?Tg:Gn;return!t&&oo(i,"iterate",s?qb:Tl),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:l?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Hf(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function HL(e,t){const n={get(r){const i=this.__v_raw,a=nt(i),l=nt(r);e||(Aa(r,l)&&oo(a,"get",r),oo(a,"get",l));const{has:s}=Bf(a),u=t?Jb:e?Tg:Gn;if(s.call(a,r))return u(i.get(r));if(s.call(a,l))return u(i.get(l));i!==a&&i.get(r)},get size(){const r=this.__v_raw;return!e&&oo(nt(r),"iterate",Tl),Reflect.get(r,"size",r)},has(r){const i=this.__v_raw,a=nt(i),l=nt(r);return e||(Aa(r,l)&&oo(a,"has",r),oo(a,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const a=this,l=a.__v_raw,s=nt(l),u=t?Jb:e?Tg:Gn;return!e&&oo(s,"iterate",Tl),l.forEach((c,d)=>r.call(i,u(c),u(d),a))}};return Rn(n,e?{add:Hf("add"),set:Hf("set"),delete:Hf("delete"),clear:Hf("clear")}:{add(r){!t&&!fr(r)&&!La(r)&&(r=nt(r));const i=nt(this);return Bf(i).has.call(i,r)||(i.add(r),Di(i,"add",r,r)),this},set(r,i){!t&&!fr(i)&&!La(i)&&(i=nt(i));const a=nt(this),{has:l,get:s}=Bf(a);let u=l.call(a,r);u||(r=nt(r),u=l.call(a,r));const c=s.call(a,r);return a.set(r,i),u?Aa(i,c)&&Di(a,"set",r,i):Di(a,"add",r,i),this},delete(r){const i=nt(this),{has:a,get:l}=Bf(i);let s=a.call(i,r);s||(r=nt(r),s=a.call(i,r)),l&&l.call(i,r);const u=i.delete(r);return s&&Di(i,"delete",r,void 0),u},clear(){const r=nt(this),i=r.size!==0,a=r.clear();return i&&Di(r,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=BL(r,e,t)}),n}function bS(e,t){const n=HL(e,t);return(o,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?o:Reflect.get(Rt(n,r)&&r in o?n:o,r,i)}const zL={get:bS(!1,!1)},jL={get:bS(!1,!0)},WL={get:bS(!0,!1)};const E_=new WeakMap,__=new WeakMap,M_=new WeakMap,VL=new WeakMap;function KL(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function UL(e){return e.__v_skip||!Object.isExtensible(e)?0:KL(vL(e))}function rt(e){return La(e)?e:yS(e,!1,kL,zL,E_)}function A_(e){return yS(e,!1,FL,jL,__)}function nv(e){return yS(e,!0,LL,WL,M_)}function yS(e,t,n,o,r){if(!kt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=UL(e);if(i===0)return e;const a=r.get(e);if(a)return a;const l=new Proxy(e,i===2?o:n);return r.set(e,l),l}function Wi(e){return La(e)?Wi(e.__v_raw):!!(e&&e.__v_isReactive)}function La(e){return!!(e&&e.__v_isReadonly)}function fr(e){return!!(e&&e.__v_isShallow)}function SS(e){return e?!!e.__v_raw:!1}function nt(e){const t=e&&e.__v_raw;return t?nt(t):e}function CS(e){return!Rt(e,"__v_skip")&&Object.isExtensible(e)&&Xb(e,"__v_skip",!0),e}const Gn=e=>kt(e)?rt(e):e,Tg=e=>kt(e)?nv(e):e;function Ut(e){return e?e.__v_isRef===!0:!1}function ae(e){return R_(e,!1)}function se(e){return R_(e,!0)}function R_(e,t){return Ut(e)?e:new GL(e,t)}class GL{constructor(t,n){this.dep=new mS,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:nt(t),this._value=n?t:Gn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||fr(t)||La(t);t=o?t:nt(t),Aa(t,n)&&(this._rawValue=t,this._value=o?t:Gn(t),this.dep.trigger())}}function D_(e){e.dep&&e.dep.trigger()}function Bt(e){return Ut(e)?e.value:e}const XL={get:(e,t,n)=>t==="__v_raw"?e:Bt(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Ut(r)&&!Ut(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function N_(e){return Wi(e)?e:new Proxy(e,XL)}function Fr(e){const t=ct(e)?new Array(e.length):{};for(const n in e)t[n]=k_(e,n);return t}class YL{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return _L(nt(this._object),this._key)}}class qL{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function We(e,t,n){return Ut(e)?e:gt(e)?new qL(e):kt(e)&&arguments.length>1?k_(e,t,n):ae(e)}function k_(e,t,n){const o=e[t];return Ut(o)?o:new YL(e,t,n)}class JL{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new mS(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Sd-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&Vt!==this)return S_(this,!0),!0}get value(){const t=this.dep.track();return $_(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ZL(e,t,n=!1){let o,r;return gt(e)?o=e:(o=e.get,r=e.set),new JL(o,r,n)}const zf={},Eg=new WeakMap;let hl;function QL(e,t=!1,n=hl){if(n){let o=Eg.get(n);o||Eg.set(n,o=[]),o.push(e)}}function eF(e,t,n=Ft){const{immediate:o,deep:r,once:i,scheduler:a,augmentJob:l,call:s}=n,u=$=>r?$:fr($)||r===!1||r===0?Ni($,1):Ni($);let c,d,f,p,v=!1,h=!1;if(Ut(e)?(d=()=>e.value,v=fr(e)):Wi(e)?(d=()=>u(e),v=!0):ct(e)?(h=!0,v=e.some($=>Wi($)||fr($)),d=()=>e.map($=>{if(Ut($))return $.value;if(Wi($))return u($);if(gt($))return s?s($,2):$()})):gt(e)?t?d=s?()=>s(e,2):e:d=()=>{if(f){Xi();try{f()}finally{Yi()}}const $=hl;hl=c;try{return s?s(e,3,[p]):e(p)}finally{hl=$}}:d=ci,t&&r){const $=d,x=r===!0?1/0:r;d=()=>Ni($(),x)}const m=ev(),b=()=>{c.stop(),m&&m.active&&uS(m.effects,c)};if(i&&t){const $=t;t=(...x)=>{$(...x),b()}}let S=h?new Array(e.length).fill(zf):zf;const C=$=>{if(!(!(c.flags&1)||!c.dirty&&!$))if(t){const x=c.run();if(r||v||(h?x.some((P,w)=>Aa(P,S[w])):Aa(x,S))){f&&f();const P=hl;hl=c;try{const w=[x,S===zf?void 0:h&&S[0]===zf?[]:S,p];S=x,s?s(t,3,w):t(...w)}finally{hl=P}}}else c.run()};return l&&l(C),c=new b_(d),c.scheduler=a?()=>a(C,!1):C,p=$=>QL($,!1,c),f=c.onStop=()=>{const $=Eg.get(c);if($){if(s)s($,4);else for(const x of $)x();Eg.delete(c)}},t?o?C(!0):S=c.run():a?a(C.bind(null,!0),!0):c.run(),b.pause=c.pause.bind(c),b.resume=c.resume.bind(c),b.stop=b,b}function Ni(e,t=1/0,n){if(t<=0||!kt(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Ut(e))Ni(e.value,t,n);else if(ct(e))for(let o=0;o{Ni(o,t,n)});else if(p_(e)){for(const o in e)Ni(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Ni(e[o],t,n)}return e}/** +**/let to;class m_{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=to,!t&&to&&(this.index=(to.scopes||(to.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0&&(to=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n0)return;if(Wu){let t=Wu;for(Wu=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ju;){let t=ju;for(ju=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function C_(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function x_(e){let t,n=e.depsTail,o=n;for(;o;){const r=o.prevDep;o.version===-1?(o===n&&(n=r),vS(o),TL(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=r}e.deps=t,e.depsTail=n}function Yb(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&($_(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function $_(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Sd)||(e.globalVersion=Sd,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Yb(e))))return;e.flags|=2;const t=e.dep,n=Vt,o=Lr;Vt=e,Lr=!0;try{C_(e);const r=e.fn(e._value);(t.version===0||Aa(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Vt=n,Lr=o,x_(e),e.flags&=-3}}function vS(e,t=!1){const{dep:n,prevSub:o,nextSub:r}=e;if(o&&(o.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)vS(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function TL(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Lr=!0;const w_=[];function Xi(){w_.push(Lr),Lr=!1}function Yi(){const e=w_.pop();Lr=e===void 0?!0:e}function Rw(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Vt;Vt=void 0;try{t()}finally{Vt=n}}}let Sd=0,EL=class{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}};class mS{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Vt||!Lr||Vt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Vt)n=this.activeLink=new EL(Vt,this),Vt.deps?(n.prevDep=Vt.depsTail,Vt.depsTail.nextDep=n,Vt.depsTail=n):Vt.deps=Vt.depsTail=n,P_(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=Vt.depsTail,n.nextDep=void 0,Vt.depsTail.nextDep=n,Vt.depsTail=n,Vt.deps===n&&(Vt.deps=o)}return n}trigger(t){this.version++,Sd++,this.notify(t)}notify(t){gS();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{hS()}}}function P_(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)P_(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Og=new WeakMap,Tl=Symbol(""),qb=Symbol(""),Cd=Symbol("");function oo(e,t,n){if(Lr&&Vt){let o=Og.get(e);o||Og.set(e,o=new Map);let r=o.get(n);r||(o.set(n,r=new mS),r.map=o,r.key=n),r.track()}}function Di(e,t,n,o,r,i){const a=Og.get(e);if(!a){Sd++;return}const l=s=>{s&&s.trigger()};if(gS(),t==="clear")a.forEach(l);else{const s=ct(e),u=s&&dS(n);if(s&&n==="length"){const c=Number(o);a.forEach((d,f)=>{(f==="length"||f===Cd||!jr(f)&&f>=c)&&l(d)})}else switch((n!==void 0||a.has(void 0))&&l(a.get(n)),u&&l(a.get(Cd)),t){case"add":s?u&&l(a.get("length")):(l(a.get(Tl)),qs(e)&&l(a.get(qb)));break;case"delete":s||(l(a.get(Tl)),qs(e)&&l(a.get(qb)));break;case"set":qs(e)&&l(a.get(Tl));break}}hS()}function _L(e,t){const n=Og.get(e);return n&&n.get(t)}function Ss(e){const t=nt(e);return t===e?t:(oo(t,"iterate",Cd),fr(e)?t:t.map(Gn))}function ev(e){return oo(e=nt(e),"iterate",Cd),e}const ML={__proto__:null,[Symbol.iterator](){return Zm(this,Symbol.iterator,Gn)},concat(...e){return Ss(this).concat(...e.map(t=>ct(t)?Ss(t):t))},entries(){return Zm(this,"entries",e=>(e[1]=Gn(e[1]),e))},every(e,t){return Ci(this,"every",e,t,void 0,arguments)},filter(e,t){return Ci(this,"filter",e,t,n=>n.map(Gn),arguments)},find(e,t){return Ci(this,"find",e,t,Gn,arguments)},findIndex(e,t){return Ci(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ci(this,"findLast",e,t,Gn,arguments)},findLastIndex(e,t){return Ci(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ci(this,"forEach",e,t,void 0,arguments)},includes(...e){return Qm(this,"includes",e)},indexOf(...e){return Qm(this,"indexOf",e)},join(e){return Ss(this).join(e)},lastIndexOf(...e){return Qm(this,"lastIndexOf",e)},map(e,t){return Ci(this,"map",e,t,void 0,arguments)},pop(){return hu(this,"pop")},push(...e){return hu(this,"push",e)},reduce(e,...t){return Dw(this,"reduce",e,t)},reduceRight(e,...t){return Dw(this,"reduceRight",e,t)},shift(){return hu(this,"shift")},some(e,t){return Ci(this,"some",e,t,void 0,arguments)},splice(...e){return hu(this,"splice",e)},toReversed(){return Ss(this).toReversed()},toSorted(e){return Ss(this).toSorted(e)},toSpliced(...e){return Ss(this).toSpliced(...e)},unshift(...e){return hu(this,"unshift",e)},values(){return Zm(this,"values",Gn)}};function Zm(e,t,n){const o=ev(e),r=o[t]();return o!==e&&!fr(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.value&&(i.value=n(i.value)),i}),r}const AL=Array.prototype;function Ci(e,t,n,o,r,i){const a=ev(e),l=a!==e&&!fr(e),s=a[t];if(s!==AL[t]){const d=s.apply(e,i);return l?Gn(d):d}let u=n;a!==e&&(l?u=function(d,f){return n.call(this,Gn(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=s.call(a,u,o);return l&&r?r(c):c}function Dw(e,t,n,o){const r=ev(e);let i=n;return r!==e&&(fr(e)?n.length>3&&(i=function(a,l,s){return n.call(this,a,l,s,e)}):i=function(a,l,s){return n.call(this,a,Gn(l),s,e)}),r[t](i,...o)}function Qm(e,t,n){const o=nt(e);oo(o,"iterate",Cd);const r=o[t](...n);return(r===-1||r===!1)&&SS(n[0])?(n[0]=nt(n[0]),o[t](...n)):r}function hu(e,t,n=[]){Xi(),gS();const o=nt(e)[t].apply(e,n);return hS(),Yi(),o}const RL=sS("__proto__,__v_isRef,__isVue"),O_=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(jr));function DL(e){jr(e)||(e=String(e));const t=nt(this);return oo(t,"has",e),t.hasOwnProperty(e)}class I_{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(r?i?VL:M_:i?__:E_).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const a=ct(t);if(!r){let s;if(a&&(s=ML[n]))return s;if(n==="hasOwnProperty")return DL}const l=Reflect.get(t,n,Ut(t)?t:o);return(jr(n)?O_.has(n):RL(n))||(r||oo(t,"get",n),i)?l:Ut(l)?a&&dS(n)?l:l.value:kt(l)?r?tv(l):rt(l):l}}class T_ extends I_{constructor(t=!1){super(!1,t)}set(t,n,o,r){let i=t[n];if(!this._isShallow){const s=La(i);if(!fr(o)&&!La(o)&&(i=nt(i),o=nt(o)),!ct(t)&&Ut(i)&&!Ut(o))return s?!1:(i.value=o,!0)}const a=ct(t)&&dS(n)?Number(n)e,Bf=e=>Reflect.getPrototypeOf(e);function BL(e,t,n){return function(...o){const r=this.__v_raw,i=nt(r),a=qs(i),l=e==="entries"||e===Symbol.iterator&&a,s=e==="keys"&&a,u=r[e](...o),c=n?Jb:t?Ig:Gn;return!t&&oo(i,"iterate",s?qb:Tl),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:l?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Hf(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function HL(e,t){const n={get(r){const i=this.__v_raw,a=nt(i),l=nt(r);e||(Aa(r,l)&&oo(a,"get",r),oo(a,"get",l));const{has:s}=Bf(a),u=t?Jb:e?Ig:Gn;if(s.call(a,r))return u(i.get(r));if(s.call(a,l))return u(i.get(l));i!==a&&i.get(r)},get size(){const r=this.__v_raw;return!e&&oo(nt(r),"iterate",Tl),Reflect.get(r,"size",r)},has(r){const i=this.__v_raw,a=nt(i),l=nt(r);return e||(Aa(r,l)&&oo(a,"has",r),oo(a,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const a=this,l=a.__v_raw,s=nt(l),u=t?Jb:e?Ig:Gn;return!e&&oo(s,"iterate",Tl),l.forEach((c,d)=>r.call(i,u(c),u(d),a))}};return Rn(n,e?{add:Hf("add"),set:Hf("set"),delete:Hf("delete"),clear:Hf("clear")}:{add(r){!t&&!fr(r)&&!La(r)&&(r=nt(r));const i=nt(this);return Bf(i).has.call(i,r)||(i.add(r),Di(i,"add",r,r)),this},set(r,i){!t&&!fr(i)&&!La(i)&&(i=nt(i));const a=nt(this),{has:l,get:s}=Bf(a);let u=l.call(a,r);u||(r=nt(r),u=l.call(a,r));const c=s.call(a,r);return a.set(r,i),u?Aa(i,c)&&Di(a,"set",r,i):Di(a,"add",r,i),this},delete(r){const i=nt(this),{has:a,get:l}=Bf(i);let s=a.call(i,r);s||(r=nt(r),s=a.call(i,r)),l&&l.call(i,r);const u=i.delete(r);return s&&Di(i,"delete",r,void 0),u},clear(){const r=nt(this),i=r.size!==0,a=r.clear();return i&&Di(r,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=BL(r,e,t)}),n}function bS(e,t){const n=HL(e,t);return(o,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?o:Reflect.get(Rt(n,r)&&r in o?n:o,r,i)}const zL={get:bS(!1,!1)},jL={get:bS(!1,!0)},WL={get:bS(!0,!1)};const E_=new WeakMap,__=new WeakMap,M_=new WeakMap,VL=new WeakMap;function KL(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function UL(e){return e.__v_skip||!Object.isExtensible(e)?0:KL(vL(e))}function rt(e){return La(e)?e:yS(e,!1,kL,zL,E_)}function A_(e){return yS(e,!1,FL,jL,__)}function tv(e){return yS(e,!0,LL,WL,M_)}function yS(e,t,n,o,r){if(!kt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=UL(e);if(i===0)return e;const a=r.get(e);if(a)return a;const l=new Proxy(e,i===2?o:n);return r.set(e,l),l}function Wi(e){return La(e)?Wi(e.__v_raw):!!(e&&e.__v_isReactive)}function La(e){return!!(e&&e.__v_isReadonly)}function fr(e){return!!(e&&e.__v_isShallow)}function SS(e){return e?!!e.__v_raw:!1}function nt(e){const t=e&&e.__v_raw;return t?nt(t):e}function CS(e){return!Rt(e,"__v_skip")&&Object.isExtensible(e)&&Xb(e,"__v_skip",!0),e}const Gn=e=>kt(e)?rt(e):e,Ig=e=>kt(e)?tv(e):e;function Ut(e){return e?e.__v_isRef===!0:!1}function ae(e){return R_(e,!1)}function se(e){return R_(e,!0)}function R_(e,t){return Ut(e)?e:new GL(e,t)}class GL{constructor(t,n){this.dep=new mS,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:nt(t),this._value=n?t:Gn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||fr(t)||La(t);t=o?t:nt(t),Aa(t,n)&&(this._rawValue=t,this._value=o?t:Gn(t),this.dep.trigger())}}function D_(e){e.dep&&e.dep.trigger()}function Bt(e){return Ut(e)?e.value:e}const XL={get:(e,t,n)=>t==="__v_raw"?e:Bt(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Ut(r)&&!Ut(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function N_(e){return Wi(e)?e:new Proxy(e,XL)}function Fr(e){const t=ct(e)?new Array(e.length):{};for(const n in e)t[n]=k_(e,n);return t}class YL{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return _L(nt(this._object),this._key)}}class qL{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function We(e,t,n){return Ut(e)?e:gt(e)?new qL(e):kt(e)&&arguments.length>1?k_(e,t,n):ae(e)}function k_(e,t,n){const o=e[t];return Ut(o)?o:new YL(e,t,n)}class JL{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new mS(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Sd-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&Vt!==this)return S_(this,!0),!0}get value(){const t=this.dep.track();return $_(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ZL(e,t,n=!1){let o,r;return gt(e)?o=e:(o=e.get,r=e.set),new JL(o,r,n)}const zf={},Tg=new WeakMap;let hl;function QL(e,t=!1,n=hl){if(n){let o=Tg.get(n);o||Tg.set(n,o=[]),o.push(e)}}function eF(e,t,n=Ft){const{immediate:o,deep:r,once:i,scheduler:a,augmentJob:l,call:s}=n,u=$=>r?$:fr($)||r===!1||r===0?Ni($,1):Ni($);let c,d,f,p,v=!1,h=!1;if(Ut(e)?(d=()=>e.value,v=fr(e)):Wi(e)?(d=()=>u(e),v=!0):ct(e)?(h=!0,v=e.some($=>Wi($)||fr($)),d=()=>e.map($=>{if(Ut($))return $.value;if(Wi($))return u($);if(gt($))return s?s($,2):$()})):gt(e)?t?d=s?()=>s(e,2):e:d=()=>{if(f){Xi();try{f()}finally{Yi()}}const $=hl;hl=c;try{return s?s(e,3,[p]):e(p)}finally{hl=$}}:d=ci,t&&r){const $=d,x=r===!0?1/0:r;d=()=>Ni($(),x)}const m=Qh(),b=()=>{c.stop(),m&&m.active&&uS(m.effects,c)};if(i&&t){const $=t;t=(...x)=>{$(...x),b()}}let S=h?new Array(e.length).fill(zf):zf;const C=$=>{if(!(!(c.flags&1)||!c.dirty&&!$))if(t){const x=c.run();if(r||v||(h?x.some((P,w)=>Aa(P,S[w])):Aa(x,S))){f&&f();const P=hl;hl=c;try{const w=[x,S===zf?void 0:h&&S[0]===zf?[]:S,p];S=x,s?s(t,3,w):t(...w)}finally{hl=P}}}else c.run()};return l&&l(C),c=new b_(d),c.scheduler=a?()=>a(C,!1):C,p=$=>QL($,!1,c),f=c.onStop=()=>{const $=Tg.get(c);if($){if(s)s($,4);else for(const x of $)x();Tg.delete(c)}},t?o?C(!0):S=c.run():a?a(C.bind(null,!0),!0):c.run(),b.pause=c.pause.bind(c),b.resume=c.resume.bind(c),b.stop=b,b}function Ni(e,t=1/0,n){if(t<=0||!kt(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Ut(e))Ni(e.value,t,n);else if(ct(e))for(let o=0;o{Ni(o,t,n)});else if(p_(e)){for(const o in e)Ni(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Ni(e[o],t,n)}return e}/** * @vue/runtime-core v3.5.17 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function sf(e,t,n,o){try{return o?e(...o):e()}catch(r){ov(r,t,n)}}function Wr(e,t,n,o){if(gt(e)){const r=sf(e,t,n,o);return r&&d_(r)&&r.catch(i=>{ov(i,t,n)}),r}if(ct(e)){const r=[];for(let i=0;i>>1,r=yo[o],i=xd(r);i=xd(n)?yo.push(e):yo.splice(nF(t),0,e),e.flags|=1,F_()}}function F_(){_g||(_g=L_.then(H_))}function oF(e){ct(e)?Js.push(...e):ya&&e.id===-1?ya.splice(Ns+1,0,e):e.flags&1||(Js.push(e),e.flags|=1),F_()}function Nw(e,t,n=oi+1){for(;nxd(n)-xd(o));if(Js.length=0,ya){ya.push(...t);return}for(ya=t,Ns=0;Nse.id==null?e.flags&2?-1:1/0:e.id;function H_(e){try{for(oi=0;oi{o._d&&qw(-1);const i=Mg(t);let a;try{a=e(...r)}finally{Mg(i),o._d&&qw(1)}return a};return o._n=!0,o._c=!0,o._d=!0,o}function Pn(e,t){if(En===null)return e;const n=dv(En),o=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,Vu=e=>e&&(e.disabled||e.disabled===""),kw=e=>e&&(e.defer||e.defer===""),Lw=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Fw=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Qb=(e,t)=>{const n=e&&e.to;return en(n)?t?t(n):null:n},W_={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,i,a,l,s,u){const{mc:c,pc:d,pbc:f,o:{insert:p,querySelector:v,createText:h,createComment:m}}=u,b=Vu(t.props);let{shapeFlag:S,children:C,dynamicChildren:$}=t;if(e==null){const x=t.el=h(""),P=t.anchor=h("");p(x,n,o),p(P,n,o);const w=(I,_)=>{S&16&&(r&&r.isCE&&(r.ce._teleportTarget=I),c(C,I,_,r,i,a,l,s))},O=()=>{const I=t.target=Qb(t.props,v),_=V_(I,t,h,p);I&&(a!=="svg"&&Lw(I)?a="svg":a!=="mathml"&&Fw(I)&&(a="mathml"),b||(w(I,_),Dp(t,!1)))};b&&(w(n,P),Dp(t,!0)),kw(t.props)?(t.el.__isMounted=!1,mo(()=>{O(),delete t.el.__isMounted},i)):O()}else{if(kw(t.props)&&e.el.__isMounted===!1){mo(()=>{W_.process(e,t,n,o,r,i,a,l,s,u)},i);return}t.el=e.el,t.targetStart=e.targetStart;const x=t.anchor=e.anchor,P=t.target=e.target,w=t.targetAnchor=e.targetAnchor,O=Vu(e.props),I=O?n:P,_=O?x:w;if(a==="svg"||Lw(P)?a="svg":(a==="mathml"||Fw(P))&&(a="mathml"),$?(f(e.dynamicChildren,$,I,r,i,a,l),TS(e,t,!0)):s||d(e,t,I,_,r,i,a,l,!1),b)O?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):jf(t,n,x,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const T=t.target=Qb(t.props,v);T&&jf(t,T,null,u,0)}else O&&jf(t,P,w,u,1);Dp(t,b)}},remove(e,t,n,{um:o,o:{remove:r}},i){const{shapeFlag:a,children:l,anchor:s,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(r(u),r(c)),i&&r(s),a&16){const p=i||!Vu(f);for(let v=0;v{e.isMounted=!0}),tt(()=>{e.isUnmounting=!0}),e}const or=[Function,Array],U_={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:or,onEnter:or,onAfterEnter:or,onEnterCancelled:or,onBeforeLeave:or,onLeave:or,onAfterLeave:or,onLeaveCancelled:or,onBeforeAppear:or,onAppear:or,onAfterAppear:or,onAppearCancelled:or},G_=e=>{const t=e.subTree;return t.component?G_(t.component):t},iF={name:"BaseTransition",props:U_,setup(e,{slots:t}){const n=Jt(),o=K_();return()=>{const r=t.default&&$S(t.default(),!0);if(!r||!r.length)return;const i=X_(r),a=nt(e),{mode:l}=a;if(o.isLeaving)return t0(i);const s=Bw(i);if(!s)return t0(i);let u=$d(s,a,o,n,d=>u=d);s.type!==Bn&&Hl(s,u);let c=n.subTree&&Bw(n.subTree);if(c&&c.type!==Bn&&!bl(s,c)&&G_(n).type!==Bn){let d=$d(c,a,o,n);if(Hl(c,d),l==="out-in"&&s.type!==Bn)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},t0(i);l==="in-out"&&s.type!==Bn?d.delayLeave=(f,p,v)=>{const h=Y_(o,c);h[String(c.key)]=c,f[Sa]=()=>{p(),f[Sa]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{v(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function X_(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Bn){t=n;break}}return t}const aF=iF;function Y_(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function $d(e,t,n,o,r){const{appear:i,mode:a,persisted:l=!1,onBeforeEnter:s,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:v,onLeaveCancelled:h,onBeforeAppear:m,onAppear:b,onAfterAppear:S,onAppearCancelled:C}=t,$=String(e.key),x=Y_(n,e),P=(I,_)=>{I&&Wr(I,o,9,_)},w=(I,_)=>{const T=_[1];P(I,_),ct(I)?I.every(A=>A.length<=1)&&T():I.length<=1&&T()},O={mode:a,persisted:l,beforeEnter(I){let _=s;if(!n.isMounted)if(i)_=m||s;else return;I[Sa]&&I[Sa](!0);const T=x[$];T&&bl(e,T)&&T.el[Sa]&&T.el[Sa](),P(_,[I])},enter(I){let _=u,T=c,A=d;if(!n.isMounted)if(i)_=b||u,T=S||c,A=C||d;else return;let R=!1;const H=I[Wf]=M=>{R||(R=!0,M?P(A,[I]):P(T,[I]),O.delayedLeave&&O.delayedLeave(),I[Wf]=void 0)};_?w(_,[I,H]):H()},leave(I,_){const T=String(e.key);if(I[Wf]&&I[Wf](!0),n.isUnmounting)return _();P(f,[I]);let A=!1;const R=I[Sa]=H=>{A||(A=!0,_(),H?P(h,[I]):P(v,[I]),I[Sa]=void 0,x[T]===e&&delete x[T])};x[T]=e,p?w(p,[I,R]):R()},clone(I){const _=$d(I,t,n,o,r);return r&&r(_),_}};return O}function t0(e){if(av(e))return e=Dn(e),e.children=null,e}function Bw(e){if(!av(e))return j_(e.type)&&e.children?X_(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&>(n.default))return n.default()}}function Hl(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Hl(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function $S(e,t=!1,n){let o=[],r=0;for(let i=0;i1)for(let i=0;iKu(v,t&&(ct(t)?t[h]:t),n,o,r));return}if(Zs(o)&&!r){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Ku(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?dv(o.component):o.el,a=r?null:i,{i:l,r:s}=e,u=t&&t.r,c=l.refs===Ft?l.refs={}:l.refs,d=l.setupState,f=nt(d),p=d===Ft?()=>!1:v=>Rt(f,v);if(u!=null&&u!==s&&(en(u)?(c[u]=null,p(u)&&(d[u]=null)):Ut(u)&&(u.value=null)),gt(s))sf(s,l,12,[a,c]);else{const v=en(s),h=Ut(s);if(v||h){const m=()=>{if(e.f){const b=v?p(s)?d[s]:c[s]:s.value;r?ct(b)&&uS(b,i):ct(b)?b.includes(i)||b.push(i):v?(c[s]=[i],p(s)&&(d[s]=c[s])):(s.value=[i],e.k&&(c[e.k]=s.value))}else v?(c[s]=a,p(s)&&(d[s]=a)):h&&(s.value=a,e.k&&(c[e.k]=a))};a?(m.id=-1,mo(m,n)):m()}}}Qh().requestIdleCallback;Qh().cancelIdleCallback;const Zs=e=>!!e.type.__asyncLoader,av=e=>e.type.__isKeepAlive;function lv(e,t){Z_(e,"a",t)}function J_(e,t){Z_(e,"da",t)}function Z_(e,t,n=Hn){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(sv(t,o,n),n){let r=n.parent;for(;r&&r.parent;)av(r.parent.vnode)&&lF(o,t,n,r),r=r.parent}}function lF(e,t,n,o){const r=sv(t,e,o,!0);Zn(()=>{uS(o[t],r)},n)}function sv(e,t,n=Hn,o=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...a)=>{Xi();const l=uf(n),s=Wr(t,n,e,a);return l(),Yi(),s});return o?r.unshift(i):r.push(i),i}}const ea=e=>(t,n=Hn)=>{(!Od||e==="sp")&&sv(e,(...o)=>t(...o),n)},cf=ea("bm"),Ke=ea("m"),cv=ea("bu"),uo=ea("u"),tt=ea("bum"),Zn=ea("um"),sF=ea("sp"),cF=ea("rtg"),uF=ea("rtc");function dF(e,t=Hn){sv("ec",e,t)}const wS="components",fF="directives";function gn(e,t){return PS(wS,e,!0,t)||e}const Q_=Symbol.for("v-ndc");function Hw(e){return en(e)?PS(wS,e,!1)||e:e||Q_}function pF(e){return PS(fF,e)}function PS(e,t,n=!0,o=!1){const r=En||Hn;if(r){const i=r.type;if(e===wS){const l=e9(i,!1);if(l&&(l===t||l===mr(t)||l===Zh(mr(t))))return i}const a=zw(r[e]||i[e],t)||zw(r.appContext[e],t);return!a&&o?i:a}}function zw(e,t){return e&&(e[t]||e[mr(t)]||e[Zh(mr(t))])}function wd(e,t,n,o){let r;const i=n,a=ct(e);if(a||en(e)){const l=a&&Wi(e);let s=!1,u=!1;l&&(s=!fr(e),u=La(e),e=tv(e)),r=new Array(e.length);for(let c=0,d=e.length;ct(l,s,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let s=0,u=l.length;sln(t)?!(t.type===Bn||t.type===Le&&!eM(t.children)):!0)?e:null}const ty=e=>e?yM(e)?dv(e):ty(e.parent):null,Uu=Rn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ty(e.parent),$root:e=>ty(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>oM(e),$forceUpdate:e=>e.f||(e.f=()=>{xS(e.update)}),$nextTick:e=>e.n||(e.n=ot.bind(e.proxy)),$watch:e=>LF.bind(e)}),n0=(e,t)=>e!==Ft&&!e.__isScriptSetup&&Rt(e,t),gF={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:r,props:i,accessCache:a,type:l,appContext:s}=e;let u;if(t[0]!=="$"){const p=a[t];if(p!==void 0)switch(p){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(n0(o,t))return a[t]=1,o[t];if(r!==Ft&&Rt(r,t))return a[t]=2,r[t];if((u=e.propsOptions[0])&&Rt(u,t))return a[t]=3,i[t];if(n!==Ft&&Rt(n,t))return a[t]=4,n[t];ny&&(a[t]=0)}}const c=Uu[t];let d,f;if(c)return t==="$attrs"&&oo(e.attrs,"get",""),c(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==Ft&&Rt(n,t))return a[t]=4,n[t];if(f=s.config.globalProperties,Rt(f,t))return f[t]},set({_:e},t,n){const{data:o,setupState:r,ctx:i}=e;return n0(r,t)?(r[t]=n,!0):o!==Ft&&Rt(o,t)?(o[t]=n,!0):Rt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:i}},a){let l;return!!n[a]||e!==Ft&&Rt(e,a)||n0(t,a)||(l=i[0])&&Rt(l,a)||Rt(o,a)||Rt(Uu,a)||Rt(r.config.globalProperties,a)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Rt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function hF(){return tM().slots}function vF(){return tM().attrs}function tM(){const e=Jt();return e.setupContext||(e.setupContext=CM(e))}function jw(e){return ct(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let ny=!0;function mF(e){const t=oM(e),n=e.proxy,o=e.ctx;ny=!1,t.beforeCreate&&Ww(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:a,watch:l,provide:s,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:p,updated:v,activated:h,deactivated:m,beforeDestroy:b,beforeUnmount:S,destroyed:C,unmounted:$,render:x,renderTracked:P,renderTriggered:w,errorCaptured:O,serverPrefetch:I,expose:_,inheritAttrs:T,components:A,directives:R,filters:H}=t;if(u&&bF(u,o,null),a)for(const N in a){const L=a[N];gt(L)&&(o[N]=L.bind(n))}if(r){const N=r.call(n,n);kt(N)&&(e.data=rt(N))}if(ny=!0,i)for(const N in i){const L=i[N],F=gt(L)?L.bind(n,n):gt(L.get)?L.get.bind(n,n):ci,B=!gt(L)&>(L.set)?L.set.bind(n):ci,j=E({get:F,set:B});Object.defineProperty(o,N,{enumerable:!0,configurable:!0,get:()=>j.value,set:z=>j.value=z})}if(l)for(const N in l)nM(l[N],o,n,N);if(s){const N=gt(s)?s.call(n):s;Reflect.ownKeys(N).forEach(L=>{Xe(L,N[L])})}c&&Ww(c,e,"c");function D(N,L){ct(L)?L.forEach(F=>N(F.bind(n))):L&&N(L.bind(n))}if(D(cf,d),D(Ke,f),D(cv,p),D(uo,v),D(lv,h),D(J_,m),D(dF,O),D(uF,P),D(cF,w),D(tt,S),D(Zn,$),D(sF,I),ct(_))if(_.length){const N=e.exposed||(e.exposed={});_.forEach(L=>{Object.defineProperty(N,L,{get:()=>n[L],set:F=>n[L]=F})})}else e.exposed||(e.exposed={});x&&e.render===ci&&(e.render=x),T!=null&&(e.inheritAttrs=T),A&&(e.components=A),R&&(e.directives=R),I&&q_(e)}function bF(e,t,n=ci){ct(e)&&(e=oy(e));for(const o in e){const r=e[o];let i;kt(r)?"default"in r?i=ze(r.from||o,r.default,!0):i=ze(r.from||o):i=ze(r),Ut(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:a=>i.value=a}):t[o]=i}}function Ww(e,t,n){Wr(ct(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function nM(e,t,n,o){let r=o.includes(".")?gM(n,o):()=>n[o];if(en(e)){const i=t[e];gt(i)&&be(r,i)}else if(gt(e))be(r,e.bind(n));else if(kt(e))if(ct(e))e.forEach(i=>nM(i,t,n,o));else{const i=gt(e.handler)?e.handler.bind(n):t[e.handler];gt(i)&&be(r,i,e)}}function oM(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:a}}=e.appContext,l=i.get(t);let s;return l?s=l:!r.length&&!n&&!o?s=t:(s={},r.length&&r.forEach(u=>Ag(s,u,a,!0)),Ag(s,t,a)),kt(t)&&i.set(t,s),s}function Ag(e,t,n,o=!1){const{mixins:r,extends:i}=t;i&&Ag(e,i,n,!0),r&&r.forEach(a=>Ag(e,a,n,!0));for(const a in t)if(!(o&&a==="expose")){const l=yF[a]||n&&n[a];e[a]=l?l(e[a],t[a]):t[a]}return e}const yF={data:Vw,props:Kw,emits:Kw,methods:Au,computed:Au,beforeCreate:ho,created:ho,beforeMount:ho,mounted:ho,beforeUpdate:ho,updated:ho,beforeDestroy:ho,beforeUnmount:ho,destroyed:ho,unmounted:ho,activated:ho,deactivated:ho,errorCaptured:ho,serverPrefetch:ho,components:Au,directives:Au,watch:CF,provide:Vw,inject:SF};function Vw(e,t){return t?e?function(){return Rn(gt(e)?e.call(this,this):e,gt(t)?t.call(this,this):t)}:t:e}function SF(e,t){return Au(oy(e),oy(t))}function oy(e){if(ct(e)){const t={};for(let n=0;n1)return n&>(t)?t.call(o&&o.proxy):t}}function wF(){return!!(Hn||En||El)}const iM={},aM=()=>Object.create(iM),lM=e=>Object.getPrototypeOf(e)===iM;function PF(e,t,n,o=!1){const r={},i=aM();e.propsDefaults=Object.create(null),sM(e,t,r,i);for(const a in e.propsOptions[0])a in r||(r[a]=void 0);n?e.props=o?r:A_(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function OF(e,t,n,o){const{props:r,attrs:i,vnode:{patchFlag:a}}=e,l=nt(r),[s]=e.propsOptions;let u=!1;if((o||a>0)&&!(a&16)){if(a&8){const c=e.vnode.dynamicProps;for(let d=0;d{s=!0;const[f,p]=cM(d,t,!0);Rn(a,f),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!s)return kt(e)&&o.set(e,Ys),Ys;if(ct(i))for(let c=0;ce[0]==="_"||e==="$stable",IS=e=>ct(e)?e.map(ai):[ai(e)],TF=(e,t,n)=>{if(t._n)return t;const o=Zb((...r)=>IS(t(...r)),n);return o._c=!1,o},uM=(e,t,n)=>{const o=e._ctx;for(const r in e){if(OS(r))continue;const i=e[r];if(gt(i))t[r]=TF(r,i,o);else if(i!=null){const a=IS(i);t[r]=()=>a}}},dM=(e,t)=>{const n=IS(t);e.slots.default=()=>n},fM=(e,t,n)=>{for(const o in t)(n||!OS(o))&&(e[o]=t[o])},EF=(e,t,n)=>{const o=e.slots=aM();if(e.vnode.shapeFlag&32){const r=t.__;r&&Xb(o,"__",r,!0);const i=t._;i?(fM(o,t,n),n&&Xb(o,"_",i,!0)):uM(t,o)}else t&&dM(e,t)},_F=(e,t,n)=>{const{vnode:o,slots:r}=e;let i=!0,a=Ft;if(o.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:fM(r,t,n):(i=!t.$stable,uM(t,r)),a=t}else t&&(dM(e,t),a={default:1});if(i)for(const l in r)!OS(l)&&a[l]==null&&delete r[l]},mo=VF;function MF(e){return AF(e)}function AF(e,t){const n=Qh();n.__VUE__=!0;const{insert:o,remove:r,patchProp:i,createElement:a,createText:l,createComment:s,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:p=ci,insertStaticContent:v}=e,h=(W,U,J,de=null,fe=null,pe=null,ve=void 0,he=null,V=!!U.dynamicChildren)=>{if(W===U)return;W&&!bl(W,U)&&(de=Z(W),z(W,fe,pe,!0),W=null),U.patchFlag===-2&&(V=!1,U.dynamicChildren=null);const{type:q,ref:ie,shapeFlag:me}=U;switch(q){case ta:m(W,U,J,de);break;case Bn:b(W,U,J,de);break;case Np:W==null&&S(U,J,de,ve);break;case Le:A(W,U,J,de,fe,pe,ve,he,V);break;default:me&1?x(W,U,J,de,fe,pe,ve,he,V):me&6?R(W,U,J,de,fe,pe,ve,he,V):(me&64||me&128)&&q.process(W,U,J,de,fe,pe,ve,he,V,X)}ie!=null&&fe?Ku(ie,W&&W.ref,pe,U||W,!U):ie==null&&W&&W.ref!=null&&Ku(W.ref,null,pe,W,!0)},m=(W,U,J,de)=>{if(W==null)o(U.el=l(U.children),J,de);else{const fe=U.el=W.el;U.children!==W.children&&u(fe,U.children)}},b=(W,U,J,de)=>{W==null?o(U.el=s(U.children||""),J,de):U.el=W.el},S=(W,U,J,de)=>{[W.el,W.anchor]=v(W.children,U,J,de,W.el,W.anchor)},C=({el:W,anchor:U},J,de)=>{let fe;for(;W&&W!==U;)fe=f(W),o(W,J,de),W=fe;o(U,J,de)},$=({el:W,anchor:U})=>{let J;for(;W&&W!==U;)J=f(W),r(W),W=J;r(U)},x=(W,U,J,de,fe,pe,ve,he,V)=>{U.type==="svg"?ve="svg":U.type==="math"&&(ve="mathml"),W==null?P(U,J,de,fe,pe,ve,he,V):I(W,U,fe,pe,ve,he,V)},P=(W,U,J,de,fe,pe,ve,he)=>{let V,q;const{props:ie,shapeFlag:me,transition:Se,dirs:ce}=W;if(V=W.el=a(W.type,pe,ie&&ie.is,ie),me&8?c(V,W.children):me&16&&O(W.children,V,null,de,fe,o0(W,pe),ve,he),ce&&rl(W,null,de,"created"),w(V,W,W.scopeId,ve,de),ie){for(const ue in ie)ue!=="value"&&!zu(ue)&&i(V,ue,null,ie[ue],pe,de);"value"in ie&&i(V,"value",null,ie.value,pe),(q=ie.onVnodeBeforeMount)&&Qr(q,de,W)}ce&&rl(W,null,de,"beforeMount");const ee=RF(fe,Se);ee&&Se.beforeEnter(V),o(V,U,J),((q=ie&&ie.onVnodeMounted)||ee||ce)&&mo(()=>{q&&Qr(q,de,W),ee&&Se.enter(V),ce&&rl(W,null,de,"mounted")},fe)},w=(W,U,J,de,fe)=>{if(J&&p(W,J),de)for(let pe=0;pe{for(let q=V;q{const he=U.el=W.el;let{patchFlag:V,dynamicChildren:q,dirs:ie}=U;V|=W.patchFlag&16;const me=W.props||Ft,Se=U.props||Ft;let ce;if(J&&il(J,!1),(ce=Se.onVnodeBeforeUpdate)&&Qr(ce,J,U,W),ie&&rl(U,W,J,"beforeUpdate"),J&&il(J,!0),(me.innerHTML&&Se.innerHTML==null||me.textContent&&Se.textContent==null)&&c(he,""),q?_(W.dynamicChildren,q,he,J,de,o0(U,fe),pe):ve||L(W,U,he,null,J,de,o0(U,fe),pe,!1),V>0){if(V&16)T(he,me,Se,J,fe);else if(V&2&&me.class!==Se.class&&i(he,"class",null,Se.class,fe),V&4&&i(he,"style",me.style,Se.style,fe),V&8){const ee=U.dynamicProps;for(let ue=0;ue{ce&&Qr(ce,J,U,W),ie&&rl(U,W,J,"updated")},de)},_=(W,U,J,de,fe,pe,ve)=>{for(let he=0;he{if(U!==J){if(U!==Ft)for(const pe in U)!zu(pe)&&!(pe in J)&&i(W,pe,U[pe],null,fe,de);for(const pe in J){if(zu(pe))continue;const ve=J[pe],he=U[pe];ve!==he&&pe!=="value"&&i(W,pe,he,ve,fe,de)}"value"in J&&i(W,"value",U.value,J.value,fe)}},A=(W,U,J,de,fe,pe,ve,he,V)=>{const q=U.el=W?W.el:l(""),ie=U.anchor=W?W.anchor:l("");let{patchFlag:me,dynamicChildren:Se,slotScopeIds:ce}=U;ce&&(he=he?he.concat(ce):ce),W==null?(o(q,J,de),o(ie,J,de),O(U.children||[],J,ie,fe,pe,ve,he,V)):me>0&&me&64&&Se&&W.dynamicChildren?(_(W.dynamicChildren,Se,J,fe,pe,ve,he),(U.key!=null||fe&&U===fe.subTree)&&TS(W,U,!0)):L(W,U,J,ie,fe,pe,ve,he,V)},R=(W,U,J,de,fe,pe,ve,he,V)=>{U.slotScopeIds=he,W==null?U.shapeFlag&512?fe.ctx.activate(U,J,de,ve,V):H(U,J,de,fe,pe,ve,V):M(W,U,V)},H=(W,U,J,de,fe,pe,ve)=>{const he=W.component=qF(W,de,fe);if(av(W)&&(he.ctx.renderer=X),JF(he,!1,ve),he.asyncDep){if(fe&&fe.registerDep(he,D,ve),!W.el){const V=he.subTree=g(Bn);b(null,V,U,J)}}else D(he,W,U,J,fe,pe,ve)},M=(W,U,J)=>{const de=U.component=W.component;if(jF(W,U,J))if(de.asyncDep&&!de.asyncResolved){N(de,U,J);return}else de.next=U,de.update();else U.el=W.el,de.vnode=U},D=(W,U,J,de,fe,pe,ve)=>{const he=()=>{if(W.isMounted){let{next:me,bu:Se,u:ce,parent:ee,vnode:ue}=W;{const we=pM(W);if(we){me&&(me.el=ue.el,N(W,me,ve)),we.asyncDep.then(()=>{W.isUnmounted||he()});return}}let xe=me,Pe;il(W,!1),me?(me.el=ue.el,N(W,me,ve)):me=ue,Se&&Rp(Se),(Pe=me.props&&me.props.onVnodeBeforeUpdate)&&Qr(Pe,ee,me,ue),il(W,!0);const _e=Xw(W),Ce=W.subTree;W.subTree=_e,h(Ce,_e,d(Ce.el),Z(Ce),W,fe,pe),me.el=_e.el,xe===null&&WF(W,_e.el),ce&&mo(ce,fe),(Pe=me.props&&me.props.onVnodeUpdated)&&mo(()=>Qr(Pe,ee,me,ue),fe)}else{let me;const{el:Se,props:ce}=U,{bm:ee,m:ue,parent:xe,root:Pe,type:_e}=W,Ce=Zs(U);il(W,!1),ee&&Rp(ee),!Ce&&(me=ce&&ce.onVnodeBeforeMount)&&Qr(me,xe,U),il(W,!0);{Pe.ce&&Pe.ce._def.shadowRoot!==!1&&Pe.ce._injectChildStyle(_e);const we=W.subTree=Xw(W);h(null,we,J,de,W,fe,pe),U.el=we.el}if(ue&&mo(ue,fe),!Ce&&(me=ce&&ce.onVnodeMounted)){const we=U;mo(()=>Qr(me,xe,we),fe)}(U.shapeFlag&256||xe&&Zs(xe.vnode)&&xe.vnode.shapeFlag&256)&&W.a&&mo(W.a,fe),W.isMounted=!0,U=J=de=null}};W.scope.on();const V=W.effect=new b_(he);W.scope.off();const q=W.update=V.run.bind(V),ie=W.job=V.runIfDirty.bind(V);ie.i=W,ie.id=W.uid,V.scheduler=()=>xS(ie),il(W,!0),q()},N=(W,U,J)=>{U.component=W;const de=W.vnode.props;W.vnode=U,W.next=null,OF(W,U.props,de,J),_F(W,U.children,J),Xi(),Nw(W),Yi()},L=(W,U,J,de,fe,pe,ve,he,V=!1)=>{const q=W&&W.children,ie=W?W.shapeFlag:0,me=U.children,{patchFlag:Se,shapeFlag:ce}=U;if(Se>0){if(Se&128){B(q,me,J,de,fe,pe,ve,he,V);return}else if(Se&256){F(q,me,J,de,fe,pe,ve,he,V);return}}ce&8?(ie&16&&oe(q,fe,pe),me!==q&&c(J,me)):ie&16?ce&16?B(q,me,J,de,fe,pe,ve,he,V):oe(q,fe,pe,!0):(ie&8&&c(J,""),ce&16&&O(me,J,de,fe,pe,ve,he,V))},F=(W,U,J,de,fe,pe,ve,he,V)=>{W=W||Ys,U=U||Ys;const q=W.length,ie=U.length,me=Math.min(q,ie);let Se;for(Se=0;Seie?oe(W,fe,pe,!0,!1,me):O(U,J,de,fe,pe,ve,he,V,me)},B=(W,U,J,de,fe,pe,ve,he,V)=>{let q=0;const ie=U.length;let me=W.length-1,Se=ie-1;for(;q<=me&&q<=Se;){const ce=W[q],ee=U[q]=V?Ca(U[q]):ai(U[q]);if(bl(ce,ee))h(ce,ee,J,null,fe,pe,ve,he,V);else break;q++}for(;q<=me&&q<=Se;){const ce=W[me],ee=U[Se]=V?Ca(U[Se]):ai(U[Se]);if(bl(ce,ee))h(ce,ee,J,null,fe,pe,ve,he,V);else break;me--,Se--}if(q>me){if(q<=Se){const ce=Se+1,ee=ceSe)for(;q<=me;)z(W[q],fe,pe,!0),q++;else{const ce=q,ee=q,ue=new Map;for(q=ee;q<=Se;q++){const Re=U[q]=V?Ca(U[q]):ai(U[q]);Re.key!=null&&ue.set(Re.key,q)}let xe,Pe=0;const _e=Se-ee+1;let Ce=!1,we=0;const Oe=new Array(_e);for(q=0;q<_e;q++)Oe[q]=0;for(q=ce;q<=me;q++){const Re=W[q];if(Pe>=_e){z(Re,fe,pe,!0);continue}let Ae;if(Re.key!=null)Ae=ue.get(Re.key);else for(xe=ee;xe<=Se;xe++)if(Oe[xe-ee]===0&&bl(Re,U[xe])){Ae=xe;break}Ae===void 0?z(Re,fe,pe,!0):(Oe[Ae-ee]=q+1,Ae>=we?we=Ae:Ce=!0,h(Re,U[Ae],J,null,fe,pe,ve,he,V),Pe++)}const Me=Ce?DF(Oe):Ys;for(xe=Me.length-1,q=_e-1;q>=0;q--){const Re=ee+q,Ae=U[Re],Fe=Re+1{const{el:pe,type:ve,transition:he,children:V,shapeFlag:q}=W;if(q&6){j(W.component.subTree,U,J,de);return}if(q&128){W.suspense.move(U,J,de);return}if(q&64){ve.move(W,U,J,X);return}if(ve===Le){o(pe,U,J);for(let me=0;mehe.enter(pe),fe);else{const{leave:me,delayLeave:Se,afterLeave:ce}=he,ee=()=>{W.ctx.isUnmounted?r(pe):o(pe,U,J)},ue=()=>{me(pe,()=>{ee(),ce&&ce()})};Se?Se(pe,ee,ue):ue()}else o(pe,U,J)},z=(W,U,J,de=!1,fe=!1)=>{const{type:pe,props:ve,ref:he,children:V,dynamicChildren:q,shapeFlag:ie,patchFlag:me,dirs:Se,cacheIndex:ce}=W;if(me===-2&&(fe=!1),he!=null&&(Xi(),Ku(he,null,J,W,!0),Yi()),ce!=null&&(U.renderCache[ce]=void 0),ie&256){U.ctx.deactivate(W);return}const ee=ie&1&&Se,ue=!Zs(W);let xe;if(ue&&(xe=ve&&ve.onVnodeBeforeUnmount)&&Qr(xe,U,W),ie&6)Y(W.component,J,de);else{if(ie&128){W.suspense.unmount(J,de);return}ee&&rl(W,null,U,"beforeUnmount"),ie&64?W.type.remove(W,U,J,X,de):q&&!q.hasOnce&&(pe!==Le||me>0&&me&64)?oe(q,U,J,!1,!0):(pe===Le&&me&384||!fe&&ie&16)&&oe(V,U,J),de&&G(W)}(ue&&(xe=ve&&ve.onVnodeUnmounted)||ee)&&mo(()=>{xe&&Qr(xe,U,W),ee&&rl(W,null,U,"unmounted")},J)},G=W=>{const{type:U,el:J,anchor:de,transition:fe}=W;if(U===Le){Q(J,de);return}if(U===Np){$(W);return}const pe=()=>{r(J),fe&&!fe.persisted&&fe.afterLeave&&fe.afterLeave()};if(W.shapeFlag&1&&fe&&!fe.persisted){const{leave:ve,delayLeave:he}=fe,V=()=>ve(J,pe);he?he(W.el,pe,V):V()}else pe()},Q=(W,U)=>{let J;for(;W!==U;)J=f(W),r(W),W=J;r(U)},Y=(W,U,J)=>{const{bum:de,scope:fe,job:pe,subTree:ve,um:he,m:V,a:q,parent:ie,slots:{__:me}}=W;Gw(V),Gw(q),de&&Rp(de),ie&&ct(me)&&me.forEach(Se=>{ie.renderCache[Se]=void 0}),fe.stop(),pe&&(pe.flags|=8,z(ve,W,U,J)),he&&mo(he,U),mo(()=>{W.isUnmounted=!0},U),U&&U.pendingBranch&&!U.isUnmounted&&W.asyncDep&&!W.asyncResolved&&W.suspenseId===U.pendingId&&(U.deps--,U.deps===0&&U.resolve())},oe=(W,U,J,de=!1,fe=!1,pe=0)=>{for(let ve=pe;ve{if(W.shapeFlag&6)return Z(W.component.subTree);if(W.shapeFlag&128)return W.suspense.next();const U=f(W.anchor||W.el),J=U&&U[z_];return J?f(J):U};let re=!1;const ne=(W,U,J)=>{W==null?U._vnode&&z(U._vnode,null,null,!0):h(U._vnode||null,W,U,null,null,null,J),U._vnode=W,re||(re=!0,Nw(),B_(),re=!1)},X={p:h,um:z,m:j,r:G,mt:H,mc:O,pc:L,pbc:_,n:Z,o:e};return{render:ne,hydrate:void 0,createApp:$F(ne)}}function o0({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function il({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function RF(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function TS(e,t,n=!1){const o=e.children,r=t.children;if(ct(o)&&ct(r))for(let i=0;i>1,e[n[l]]0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,a=n[i-1];i-- >0;)n[i]=a,a=t[a];return n}function pM(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:pM(t)}function Gw(e){if(e)for(let t=0;tze(NF);function Ve(e,t){return ES(e,null,t)}function be(e,t,n){return ES(e,t,n)}function ES(e,t,n=Ft){const{immediate:o,deep:r,flush:i,once:a}=n,l=Rn({},n),s=t&&o||!t&&i!=="post";let u;if(Od){if(i==="sync"){const p=kF();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!s){const p=()=>{};return p.stop=ci,p.resume=ci,p.pause=ci,p}}const c=Hn;l.call=(p,v,h)=>Wr(p,c,v,h);let d=!1;i==="post"?l.scheduler=p=>{mo(p,c&&c.suspense)}:i!=="sync"&&(d=!0,l.scheduler=(p,v)=>{v?p():xS(p)}),l.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=eF(e,t,l);return Od&&(u?u.push(f):s&&f()),f}function LF(e,t,n){const o=this.proxy,r=en(e)?e.includes(".")?gM(o,e):()=>o[e]:e.bind(o,o);let i;gt(t)?i=t:(i=t.handler,n=t);const a=uf(this),l=ES(r,i.bind(o),n);return a(),l}function gM(e,t){const n=t.split(".");return()=>{let o=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${mr(t)}Modifiers`]||e[`${es(t)}Modifiers`];function BF(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||Ft;let r=n;const i=t.startsWith("update:"),a=i&&FF(o,t.slice(7));a&&(a.trim&&(r=n.map(c=>en(c)?c.trim():c)),a.number&&(r=n.map(Og)));let l,s=o[l=qm(t)]||o[l=qm(mr(t))];!s&&i&&(s=o[l=qm(es(t))]),s&&Wr(s,e,6,r);const u=o[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Wr(u,e,6,r)}}function hM(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(r!==void 0)return r;const i=e.emits;let a={},l=!1;if(!gt(e)){const s=u=>{const c=hM(u,t,!0);c&&(l=!0,Rn(a,c))};!n&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return!i&&!l?(kt(e)&&o.set(e,null),null):(ct(i)?i.forEach(s=>a[s]=null):Rn(a,i),kt(e)&&o.set(e,a),a)}function uv(e,t){return!e||!Yh(t)?!1:(t=t.slice(2).replace(/Once$/,""),Rt(e,t[0].toLowerCase()+t.slice(1))||Rt(e,es(t))||Rt(e,t))}function Xw(e){const{type:t,vnode:n,proxy:o,withProxy:r,propsOptions:[i],slots:a,attrs:l,emit:s,render:u,renderCache:c,props:d,data:f,setupState:p,ctx:v,inheritAttrs:h}=e,m=Mg(e);let b,S;try{if(n.shapeFlag&4){const $=r||o,x=$;b=ai(u.call(x,$,c,d,p,f,v)),S=l}else{const $=t;b=ai($.length>1?$(d,{attrs:l,slots:a,emit:s}):$(d,null)),S=t.props?l:HF(l)}}catch($){Gu.length=0,ov($,e,1),b=g(Bn)}let C=b;if(S&&h!==!1){const $=Object.keys(S),{shapeFlag:x}=C;$.length&&x&7&&(i&&$.some(cS)&&(S=zF(S,i)),C=Dn(C,S,!1,!0))}return n.dirs&&(C=Dn(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(n.dirs):n.dirs),n.transition&&Hl(C,n.transition),b=C,Mg(m),b}const HF=e=>{let t;for(const n in e)(n==="class"||n==="style"||Yh(n))&&((t||(t={}))[n]=e[n]);return t},zF=(e,t)=>{const n={};for(const o in e)(!cS(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function jF(e,t,n){const{props:o,children:r,component:i}=e,{props:a,children:l,patchFlag:s}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&s>=0){if(s&1024)return!0;if(s&16)return o?Yw(o,a,u):!!a;if(s&8){const c=t.dynamicProps;for(let d=0;de.__isSuspense;function VF(e,t){t&&t.pendingBranch?ct(e)?t.effects.push(...e):t.effects.push(e):oF(e)}const Le=Symbol.for("v-fgt"),ta=Symbol.for("v-txt"),Bn=Symbol.for("v-cmt"),Np=Symbol.for("v-stc"),Gu=[];let Ko=null;function st(e=!1){Gu.push(Ko=e?null:[])}function KF(){Gu.pop(),Ko=Gu[Gu.length-1]||null}let Pd=1;function qw(e,t=!1){Pd+=e,e<0&&Ko&&t&&(Ko.hasOnce=!0)}function mM(e){return e.dynamicChildren=Pd>0?Ko||Ys:null,KF(),Pd>0&&Ko&&Ko.push(e),e}function _t(e,t,n,o,r,i){return mM(Ye(e,t,n,o,r,i,!0))}function rn(e,t,n,o,r){return mM(g(e,t,n,o,r,!0))}function ln(e){return e?e.__v_isVNode===!0:!1}function bl(e,t){return e.type===t.type&&e.key===t.key}const bM=({key:e})=>e??null,kp=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?en(e)||Ut(e)||gt(e)?{i:En,r:e,k:t,f:!!n}:e:null);function Ye(e,t=null,n=null,o=0,r=null,i=e===Le?0:1,a=!1,l=!1){const s={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&bM(t),ref:t&&kp(t),scopeId:rv,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:En};return l?(_S(s,n),i&128&&e.normalize(s)):n&&(s.shapeFlag|=en(n)?8:16),Pd>0&&!a&&Ko&&(s.patchFlag>0||i&6)&&s.patchFlag!==32&&Ko.push(s),s}const g=UF;function UF(e,t=null,n=null,o=0,r=null,i=!1){if((!e||e===Q_)&&(e=Bn),ln(e)){const l=Dn(e,t,!0);return n&&_S(l,n),Pd>0&&!i&&Ko&&(l.shapeFlag&6?Ko[Ko.indexOf(e)]=l:Ko.push(l)),l.patchFlag=-2,l}if(t9(e)&&(e=e.__vccOpts),t){t=GF(t);let{class:l,style:s}=t;l&&!en(l)&&(t.class=_n(l)),kt(s)&&(SS(s)&&!ct(s)&&(s=Rn({},s)),t.style=wn(s))}const a=en(e)?1:vM(e)?128:j_(e)?64:kt(e)?4:gt(e)?2:0;return Ye(e,t,n,o,r,a,i,!0)}function GF(e){return e?SS(e)||lM(e)?Rn({},e):e:null}function Dn(e,t,n=!1,o=!1){const{props:r,ref:i,patchFlag:a,children:l,transition:s}=e,u=t?iy(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&bM(u),ref:t&&t.ref?n&&i?ct(i)?i.concat(kp(t)):[i,kp(t)]:kp(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Le?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:s,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Dn(e.ssContent),ssFallback:e.ssFallback&&Dn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return s&&o&&Hl(c,s.clone(c)),c}function zn(e=" ",t=0){return g(ta,null,e,t)}function tOe(e,t){const n=g(Np,null,e);return n.staticCount=t,n}function Xt(e="",t=!1){return t?(st(),rn(Bn,null,e)):g(Bn,null,e)}function ai(e){return e==null||typeof e=="boolean"?g(Bn):ct(e)?g(Le,null,e.slice()):ln(e)?Ca(e):g(ta,null,String(e))}function Ca(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Dn(e)}function _S(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(ct(t))n=16;else if(typeof t=="object")if(o&65){const r=t.default;r&&(r._c&&(r._d=!1),_S(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!lM(t)?t._ctx=En:r===3&&En&&(En.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else gt(t)?(t={default:t,_ctx:En},n=32):(t=String(t),o&64?(n=16,t=[zn(t)]):n=8);e.children=t,e.shapeFlag|=n}function iy(...e){const t={};for(let n=0;nHn||En;let Rg,ay;{const e=Qh(),t=(n,o)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(o),i=>{r.length>1?r.forEach(a=>a(i)):r[0](i)}};Rg=t("__VUE_INSTANCE_SETTERS__",n=>Hn=n),ay=t("__VUE_SSR_SETTERS__",n=>Od=n)}const uf=e=>{const t=Hn;return Rg(e),e.scope.on(),()=>{e.scope.off(),Rg(t)}},Jw=()=>{Hn&&Hn.scope.off(),Rg(null)};function yM(e){return e.vnode.shapeFlag&4}let Od=!1;function JF(e,t=!1,n=!1){t&&ay(t);const{props:o,children:r}=e.vnode,i=yM(e);PF(e,o,i,t),EF(e,r,n||t);const a=i?ZF(e,t):void 0;return t&&ay(!1),a}function ZF(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,gF);const{setup:o}=n;if(o){Xi();const r=e.setupContext=o.length>1?CM(e):null,i=uf(e),a=sf(o,e,0,[e.props,r]),l=d_(a);if(Yi(),i(),(l||e.sp)&&!Zs(e)&&q_(e),l){if(a.then(Jw,Jw),t)return a.then(s=>{Zw(e,s)}).catch(s=>{ov(s,e,0)});e.asyncDep=a}else Zw(e,a)}else SM(e)}function Zw(e,t,n){gt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:kt(t)&&(e.setupState=N_(t)),SM(e)}function SM(e,t,n){const o=e.type;e.render||(e.render=o.render||ci);{const r=uf(e);Xi();try{mF(e)}finally{Yi(),r()}}}const QF={get(e,t){return oo(e,"get",""),e[t]}};function CM(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,QF),slots:e.slots,emit:e.emit,expose:t}}function dv(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(N_(CS(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Uu)return Uu[n](e)},has(t,n){return n in t||n in Uu}})):e.proxy}function e9(e,t=!0){return gt(e)?e.displayName||e.name:e.name||t&&e.__name}function t9(e){return gt(e)&&"__vccOpts"in e}const E=(e,t)=>ZL(e,t,Od);function Vr(e,t,n){const o=arguments.length;return o===2?kt(t)&&!ct(t)?ln(t)?g(e,null,[t]):g(e,t):g(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&ln(n)&&(n=[n]),g(e,t,n))}const n9="3.5.17";/** +**/function sf(e,t,n,o){try{return o?e(...o):e()}catch(r){nv(r,t,n)}}function Wr(e,t,n,o){if(gt(e)){const r=sf(e,t,n,o);return r&&d_(r)&&r.catch(i=>{nv(i,t,n)}),r}if(ct(e)){const r=[];for(let i=0;i>>1,r=yo[o],i=xd(r);i=xd(n)?yo.push(e):yo.splice(nF(t),0,e),e.flags|=1,F_()}}function F_(){Eg||(Eg=L_.then(H_))}function oF(e){ct(e)?Js.push(...e):ya&&e.id===-1?ya.splice(Ns+1,0,e):e.flags&1||(Js.push(e),e.flags|=1),F_()}function Nw(e,t,n=oi+1){for(;nxd(n)-xd(o));if(Js.length=0,ya){ya.push(...t);return}for(ya=t,Ns=0;Nse.id==null?e.flags&2?-1:1/0:e.id;function H_(e){try{for(oi=0;oi{o._d&&qw(-1);const i=_g(t);let a;try{a=e(...r)}finally{_g(i),o._d&&qw(1)}return a};return o._n=!0,o._c=!0,o._d=!0,o}function Pn(e,t){if(En===null)return e;const n=uv(En),o=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,Vu=e=>e&&(e.disabled||e.disabled===""),kw=e=>e&&(e.defer||e.defer===""),Lw=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Fw=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Qb=(e,t)=>{const n=e&&e.to;return en(n)?t?t(n):null:n},W_={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,i,a,l,s,u){const{mc:c,pc:d,pbc:f,o:{insert:p,querySelector:v,createText:h,createComment:m}}=u,b=Vu(t.props);let{shapeFlag:S,children:C,dynamicChildren:$}=t;if(e==null){const x=t.el=h(""),P=t.anchor=h("");p(x,n,o),p(P,n,o);const w=(I,_)=>{S&16&&(r&&r.isCE&&(r.ce._teleportTarget=I),c(C,I,_,r,i,a,l,s))},O=()=>{const I=t.target=Qb(t.props,v),_=V_(I,t,h,p);I&&(a!=="svg"&&Lw(I)?a="svg":a!=="mathml"&&Fw(I)&&(a="mathml"),b||(w(I,_),Dp(t,!1)))};b&&(w(n,P),Dp(t,!0)),kw(t.props)?(t.el.__isMounted=!1,mo(()=>{O(),delete t.el.__isMounted},i)):O()}else{if(kw(t.props)&&e.el.__isMounted===!1){mo(()=>{W_.process(e,t,n,o,r,i,a,l,s,u)},i);return}t.el=e.el,t.targetStart=e.targetStart;const x=t.anchor=e.anchor,P=t.target=e.target,w=t.targetAnchor=e.targetAnchor,O=Vu(e.props),I=O?n:P,_=O?x:w;if(a==="svg"||Lw(P)?a="svg":(a==="mathml"||Fw(P))&&(a="mathml"),$?(f(e.dynamicChildren,$,I,r,i,a,l),TS(e,t,!0)):s||d(e,t,I,_,r,i,a,l,!1),b)O?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):jf(t,n,x,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const T=t.target=Qb(t.props,v);T&&jf(t,T,null,u,0)}else O&&jf(t,P,w,u,1);Dp(t,b)}},remove(e,t,n,{um:o,o:{remove:r}},i){const{shapeFlag:a,children:l,anchor:s,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(r(u),r(c)),i&&r(s),a&16){const p=i||!Vu(f);for(let v=0;v{e.isMounted=!0}),tt(()=>{e.isUnmounting=!0}),e}const or=[Function,Array],U_={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:or,onEnter:or,onAfterEnter:or,onEnterCancelled:or,onBeforeLeave:or,onLeave:or,onAfterLeave:or,onLeaveCancelled:or,onBeforeAppear:or,onAppear:or,onAfterAppear:or,onAppearCancelled:or},G_=e=>{const t=e.subTree;return t.component?G_(t.component):t},iF={name:"BaseTransition",props:U_,setup(e,{slots:t}){const n=Jt(),o=K_();return()=>{const r=t.default&&$S(t.default(),!0);if(!r||!r.length)return;const i=X_(r),a=nt(e),{mode:l}=a;if(o.isLeaving)return e0(i);const s=Bw(i);if(!s)return e0(i);let u=$d(s,a,o,n,d=>u=d);s.type!==Bn&&Hl(s,u);let c=n.subTree&&Bw(n.subTree);if(c&&c.type!==Bn&&!bl(s,c)&&G_(n).type!==Bn){let d=$d(c,a,o,n);if(Hl(c,d),l==="out-in"&&s.type!==Bn)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},e0(i);l==="in-out"&&s.type!==Bn?d.delayLeave=(f,p,v)=>{const h=Y_(o,c);h[String(c.key)]=c,f[Sa]=()=>{p(),f[Sa]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{v(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function X_(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Bn){t=n;break}}return t}const aF=iF;function Y_(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function $d(e,t,n,o,r){const{appear:i,mode:a,persisted:l=!1,onBeforeEnter:s,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:v,onLeaveCancelled:h,onBeforeAppear:m,onAppear:b,onAfterAppear:S,onAppearCancelled:C}=t,$=String(e.key),x=Y_(n,e),P=(I,_)=>{I&&Wr(I,o,9,_)},w=(I,_)=>{const T=_[1];P(I,_),ct(I)?I.every(A=>A.length<=1)&&T():I.length<=1&&T()},O={mode:a,persisted:l,beforeEnter(I){let _=s;if(!n.isMounted)if(i)_=m||s;else return;I[Sa]&&I[Sa](!0);const T=x[$];T&&bl(e,T)&&T.el[Sa]&&T.el[Sa](),P(_,[I])},enter(I){let _=u,T=c,A=d;if(!n.isMounted)if(i)_=b||u,T=S||c,A=C||d;else return;let R=!1;const H=I[Wf]=M=>{R||(R=!0,M?P(A,[I]):P(T,[I]),O.delayedLeave&&O.delayedLeave(),I[Wf]=void 0)};_?w(_,[I,H]):H()},leave(I,_){const T=String(e.key);if(I[Wf]&&I[Wf](!0),n.isUnmounting)return _();P(f,[I]);let A=!1;const R=I[Sa]=H=>{A||(A=!0,_(),H?P(h,[I]):P(v,[I]),I[Sa]=void 0,x[T]===e&&delete x[T])};x[T]=e,p?w(p,[I,R]):R()},clone(I){const _=$d(I,t,n,o,r);return r&&r(_),_}};return O}function e0(e){if(iv(e))return e=Dn(e),e.children=null,e}function Bw(e){if(!iv(e))return j_(e.type)&&e.children?X_(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&>(n.default))return n.default()}}function Hl(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Hl(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function $S(e,t=!1,n){let o=[],r=0;for(let i=0;i1)for(let i=0;iKu(v,t&&(ct(t)?t[h]:t),n,o,r));return}if(Zs(o)&&!r){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Ku(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?uv(o.component):o.el,a=r?null:i,{i:l,r:s}=e,u=t&&t.r,c=l.refs===Ft?l.refs={}:l.refs,d=l.setupState,f=nt(d),p=d===Ft?()=>!1:v=>Rt(f,v);if(u!=null&&u!==s&&(en(u)?(c[u]=null,p(u)&&(d[u]=null)):Ut(u)&&(u.value=null)),gt(s))sf(s,l,12,[a,c]);else{const v=en(s),h=Ut(s);if(v||h){const m=()=>{if(e.f){const b=v?p(s)?d[s]:c[s]:s.value;r?ct(b)&&uS(b,i):ct(b)?b.includes(i)||b.push(i):v?(c[s]=[i],p(s)&&(d[s]=c[s])):(s.value=[i],e.k&&(c[e.k]=s.value))}else v?(c[s]=a,p(s)&&(d[s]=a)):h&&(s.value=a,e.k&&(c[e.k]=a))};a?(m.id=-1,mo(m,n)):m()}}}Zh().requestIdleCallback;Zh().cancelIdleCallback;const Zs=e=>!!e.type.__asyncLoader,iv=e=>e.type.__isKeepAlive;function av(e,t){Z_(e,"a",t)}function J_(e,t){Z_(e,"da",t)}function Z_(e,t,n=Hn){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(lv(t,o,n),n){let r=n.parent;for(;r&&r.parent;)iv(r.parent.vnode)&&lF(o,t,n,r),r=r.parent}}function lF(e,t,n,o){const r=lv(t,e,o,!0);Zn(()=>{uS(o[t],r)},n)}function lv(e,t,n=Hn,o=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...a)=>{Xi();const l=uf(n),s=Wr(t,n,e,a);return l(),Yi(),s});return o?r.unshift(i):r.push(i),i}}const ea=e=>(t,n=Hn)=>{(!Od||e==="sp")&&lv(e,(...o)=>t(...o),n)},cf=ea("bm"),Ke=ea("m"),sv=ea("bu"),uo=ea("u"),tt=ea("bum"),Zn=ea("um"),sF=ea("sp"),cF=ea("rtg"),uF=ea("rtc");function dF(e,t=Hn){lv("ec",e,t)}const wS="components",fF="directives";function gn(e,t){return PS(wS,e,!0,t)||e}const Q_=Symbol.for("v-ndc");function Hw(e){return en(e)?PS(wS,e,!1)||e:e||Q_}function pF(e){return PS(fF,e)}function PS(e,t,n=!0,o=!1){const r=En||Hn;if(r){const i=r.type;if(e===wS){const l=e9(i,!1);if(l&&(l===t||l===mr(t)||l===Jh(mr(t))))return i}const a=zw(r[e]||i[e],t)||zw(r.appContext[e],t);return!a&&o?i:a}}function zw(e,t){return e&&(e[t]||e[mr(t)]||e[Jh(mr(t))])}function wd(e,t,n,o){let r;const i=n,a=ct(e);if(a||en(e)){const l=a&&Wi(e);let s=!1,u=!1;l&&(s=!fr(e),u=La(e),e=ev(e)),r=new Array(e.length);for(let c=0,d=e.length;ct(l,s,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let s=0,u=l.length;sln(t)?!(t.type===Bn||t.type===Le&&!eM(t.children)):!0)?e:null}const ty=e=>e?yM(e)?uv(e):ty(e.parent):null,Uu=Rn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ty(e.parent),$root:e=>ty(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>oM(e),$forceUpdate:e=>e.f||(e.f=()=>{xS(e.update)}),$nextTick:e=>e.n||(e.n=ot.bind(e.proxy)),$watch:e=>LF.bind(e)}),t0=(e,t)=>e!==Ft&&!e.__isScriptSetup&&Rt(e,t),gF={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:r,props:i,accessCache:a,type:l,appContext:s}=e;let u;if(t[0]!=="$"){const p=a[t];if(p!==void 0)switch(p){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(t0(o,t))return a[t]=1,o[t];if(r!==Ft&&Rt(r,t))return a[t]=2,r[t];if((u=e.propsOptions[0])&&Rt(u,t))return a[t]=3,i[t];if(n!==Ft&&Rt(n,t))return a[t]=4,n[t];ny&&(a[t]=0)}}const c=Uu[t];let d,f;if(c)return t==="$attrs"&&oo(e.attrs,"get",""),c(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==Ft&&Rt(n,t))return a[t]=4,n[t];if(f=s.config.globalProperties,Rt(f,t))return f[t]},set({_:e},t,n){const{data:o,setupState:r,ctx:i}=e;return t0(r,t)?(r[t]=n,!0):o!==Ft&&Rt(o,t)?(o[t]=n,!0):Rt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:i}},a){let l;return!!n[a]||e!==Ft&&Rt(e,a)||t0(t,a)||(l=i[0])&&Rt(l,a)||Rt(o,a)||Rt(Uu,a)||Rt(r.config.globalProperties,a)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Rt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function hF(){return tM().slots}function vF(){return tM().attrs}function tM(){const e=Jt();return e.setupContext||(e.setupContext=CM(e))}function jw(e){return ct(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let ny=!0;function mF(e){const t=oM(e),n=e.proxy,o=e.ctx;ny=!1,t.beforeCreate&&Ww(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:a,watch:l,provide:s,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:p,updated:v,activated:h,deactivated:m,beforeDestroy:b,beforeUnmount:S,destroyed:C,unmounted:$,render:x,renderTracked:P,renderTriggered:w,errorCaptured:O,serverPrefetch:I,expose:_,inheritAttrs:T,components:A,directives:R,filters:H}=t;if(u&&bF(u,o,null),a)for(const N in a){const L=a[N];gt(L)&&(o[N]=L.bind(n))}if(r){const N=r.call(n,n);kt(N)&&(e.data=rt(N))}if(ny=!0,i)for(const N in i){const L=i[N],F=gt(L)?L.bind(n,n):gt(L.get)?L.get.bind(n,n):ci,B=!gt(L)&>(L.set)?L.set.bind(n):ci,j=E({get:F,set:B});Object.defineProperty(o,N,{enumerable:!0,configurable:!0,get:()=>j.value,set:z=>j.value=z})}if(l)for(const N in l)nM(l[N],o,n,N);if(s){const N=gt(s)?s.call(n):s;Reflect.ownKeys(N).forEach(L=>{Xe(L,N[L])})}c&&Ww(c,e,"c");function D(N,L){ct(L)?L.forEach(F=>N(F.bind(n))):L&&N(L.bind(n))}if(D(cf,d),D(Ke,f),D(sv,p),D(uo,v),D(av,h),D(J_,m),D(dF,O),D(uF,P),D(cF,w),D(tt,S),D(Zn,$),D(sF,I),ct(_))if(_.length){const N=e.exposed||(e.exposed={});_.forEach(L=>{Object.defineProperty(N,L,{get:()=>n[L],set:F=>n[L]=F})})}else e.exposed||(e.exposed={});x&&e.render===ci&&(e.render=x),T!=null&&(e.inheritAttrs=T),A&&(e.components=A),R&&(e.directives=R),I&&q_(e)}function bF(e,t,n=ci){ct(e)&&(e=oy(e));for(const o in e){const r=e[o];let i;kt(r)?"default"in r?i=ze(r.from||o,r.default,!0):i=ze(r.from||o):i=ze(r),Ut(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:a=>i.value=a}):t[o]=i}}function Ww(e,t,n){Wr(ct(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function nM(e,t,n,o){let r=o.includes(".")?gM(n,o):()=>n[o];if(en(e)){const i=t[e];gt(i)&&be(r,i)}else if(gt(e))be(r,e.bind(n));else if(kt(e))if(ct(e))e.forEach(i=>nM(i,t,n,o));else{const i=gt(e.handler)?e.handler.bind(n):t[e.handler];gt(i)&&be(r,i,e)}}function oM(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:a}}=e.appContext,l=i.get(t);let s;return l?s=l:!r.length&&!n&&!o?s=t:(s={},r.length&&r.forEach(u=>Mg(s,u,a,!0)),Mg(s,t,a)),kt(t)&&i.set(t,s),s}function Mg(e,t,n,o=!1){const{mixins:r,extends:i}=t;i&&Mg(e,i,n,!0),r&&r.forEach(a=>Mg(e,a,n,!0));for(const a in t)if(!(o&&a==="expose")){const l=yF[a]||n&&n[a];e[a]=l?l(e[a],t[a]):t[a]}return e}const yF={data:Vw,props:Kw,emits:Kw,methods:Au,computed:Au,beforeCreate:ho,created:ho,beforeMount:ho,mounted:ho,beforeUpdate:ho,updated:ho,beforeDestroy:ho,beforeUnmount:ho,destroyed:ho,unmounted:ho,activated:ho,deactivated:ho,errorCaptured:ho,serverPrefetch:ho,components:Au,directives:Au,watch:CF,provide:Vw,inject:SF};function Vw(e,t){return t?e?function(){return Rn(gt(e)?e.call(this,this):e,gt(t)?t.call(this,this):t)}:t:e}function SF(e,t){return Au(oy(e),oy(t))}function oy(e){if(ct(e)){const t={};for(let n=0;n1)return n&>(t)?t.call(o&&o.proxy):t}}function wF(){return!!(Hn||En||El)}const iM={},aM=()=>Object.create(iM),lM=e=>Object.getPrototypeOf(e)===iM;function PF(e,t,n,o=!1){const r={},i=aM();e.propsDefaults=Object.create(null),sM(e,t,r,i);for(const a in e.propsOptions[0])a in r||(r[a]=void 0);n?e.props=o?r:A_(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function OF(e,t,n,o){const{props:r,attrs:i,vnode:{patchFlag:a}}=e,l=nt(r),[s]=e.propsOptions;let u=!1;if((o||a>0)&&!(a&16)){if(a&8){const c=e.vnode.dynamicProps;for(let d=0;d{s=!0;const[f,p]=cM(d,t,!0);Rn(a,f),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!s)return kt(e)&&o.set(e,Ys),Ys;if(ct(i))for(let c=0;ce[0]==="_"||e==="$stable",IS=e=>ct(e)?e.map(ai):[ai(e)],TF=(e,t,n)=>{if(t._n)return t;const o=Zb((...r)=>IS(t(...r)),n);return o._c=!1,o},uM=(e,t,n)=>{const o=e._ctx;for(const r in e){if(OS(r))continue;const i=e[r];if(gt(i))t[r]=TF(r,i,o);else if(i!=null){const a=IS(i);t[r]=()=>a}}},dM=(e,t)=>{const n=IS(t);e.slots.default=()=>n},fM=(e,t,n)=>{for(const o in t)(n||!OS(o))&&(e[o]=t[o])},EF=(e,t,n)=>{const o=e.slots=aM();if(e.vnode.shapeFlag&32){const r=t.__;r&&Xb(o,"__",r,!0);const i=t._;i?(fM(o,t,n),n&&Xb(o,"_",i,!0)):uM(t,o)}else t&&dM(e,t)},_F=(e,t,n)=>{const{vnode:o,slots:r}=e;let i=!0,a=Ft;if(o.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:fM(r,t,n):(i=!t.$stable,uM(t,r)),a=t}else t&&(dM(e,t),a={default:1});if(i)for(const l in r)!OS(l)&&a[l]==null&&delete r[l]},mo=VF;function MF(e){return AF(e)}function AF(e,t){const n=Zh();n.__VUE__=!0;const{insert:o,remove:r,patchProp:i,createElement:a,createText:l,createComment:s,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:p=ci,insertStaticContent:v}=e,h=(W,U,J,de=null,fe=null,pe=null,ve=void 0,he=null,V=!!U.dynamicChildren)=>{if(W===U)return;W&&!bl(W,U)&&(de=Z(W),z(W,fe,pe,!0),W=null),U.patchFlag===-2&&(V=!1,U.dynamicChildren=null);const{type:q,ref:ie,shapeFlag:me}=U;switch(q){case ta:m(W,U,J,de);break;case Bn:b(W,U,J,de);break;case o0:W==null&&S(U,J,de,ve);break;case Le:A(W,U,J,de,fe,pe,ve,he,V);break;default:me&1?x(W,U,J,de,fe,pe,ve,he,V):me&6?R(W,U,J,de,fe,pe,ve,he,V):(me&64||me&128)&&q.process(W,U,J,de,fe,pe,ve,he,V,X)}ie!=null&&fe?Ku(ie,W&&W.ref,pe,U||W,!U):ie==null&&W&&W.ref!=null&&Ku(W.ref,null,pe,W,!0)},m=(W,U,J,de)=>{if(W==null)o(U.el=l(U.children),J,de);else{const fe=U.el=W.el;U.children!==W.children&&u(fe,U.children)}},b=(W,U,J,de)=>{W==null?o(U.el=s(U.children||""),J,de):U.el=W.el},S=(W,U,J,de)=>{[W.el,W.anchor]=v(W.children,U,J,de,W.el,W.anchor)},C=({el:W,anchor:U},J,de)=>{let fe;for(;W&&W!==U;)fe=f(W),o(W,J,de),W=fe;o(U,J,de)},$=({el:W,anchor:U})=>{let J;for(;W&&W!==U;)J=f(W),r(W),W=J;r(U)},x=(W,U,J,de,fe,pe,ve,he,V)=>{U.type==="svg"?ve="svg":U.type==="math"&&(ve="mathml"),W==null?P(U,J,de,fe,pe,ve,he,V):I(W,U,fe,pe,ve,he,V)},P=(W,U,J,de,fe,pe,ve,he)=>{let V,q;const{props:ie,shapeFlag:me,transition:Se,dirs:ce}=W;if(V=W.el=a(W.type,pe,ie&&ie.is,ie),me&8?c(V,W.children):me&16&&O(W.children,V,null,de,fe,n0(W,pe),ve,he),ce&&rl(W,null,de,"created"),w(V,W,W.scopeId,ve,de),ie){for(const ue in ie)ue!=="value"&&!zu(ue)&&i(V,ue,null,ie[ue],pe,de);"value"in ie&&i(V,"value",null,ie.value,pe),(q=ie.onVnodeBeforeMount)&&Qr(q,de,W)}ce&&rl(W,null,de,"beforeMount");const ee=RF(fe,Se);ee&&Se.beforeEnter(V),o(V,U,J),((q=ie&&ie.onVnodeMounted)||ee||ce)&&mo(()=>{q&&Qr(q,de,W),ee&&Se.enter(V),ce&&rl(W,null,de,"mounted")},fe)},w=(W,U,J,de,fe)=>{if(J&&p(W,J),de)for(let pe=0;pe{for(let q=V;q{const he=U.el=W.el;let{patchFlag:V,dynamicChildren:q,dirs:ie}=U;V|=W.patchFlag&16;const me=W.props||Ft,Se=U.props||Ft;let ce;if(J&&il(J,!1),(ce=Se.onVnodeBeforeUpdate)&&Qr(ce,J,U,W),ie&&rl(U,W,J,"beforeUpdate"),J&&il(J,!0),(me.innerHTML&&Se.innerHTML==null||me.textContent&&Se.textContent==null)&&c(he,""),q?_(W.dynamicChildren,q,he,J,de,n0(U,fe),pe):ve||L(W,U,he,null,J,de,n0(U,fe),pe,!1),V>0){if(V&16)T(he,me,Se,J,fe);else if(V&2&&me.class!==Se.class&&i(he,"class",null,Se.class,fe),V&4&&i(he,"style",me.style,Se.style,fe),V&8){const ee=U.dynamicProps;for(let ue=0;ue{ce&&Qr(ce,J,U,W),ie&&rl(U,W,J,"updated")},de)},_=(W,U,J,de,fe,pe,ve)=>{for(let he=0;he{if(U!==J){if(U!==Ft)for(const pe in U)!zu(pe)&&!(pe in J)&&i(W,pe,U[pe],null,fe,de);for(const pe in J){if(zu(pe))continue;const ve=J[pe],he=U[pe];ve!==he&&pe!=="value"&&i(W,pe,he,ve,fe,de)}"value"in J&&i(W,"value",U.value,J.value,fe)}},A=(W,U,J,de,fe,pe,ve,he,V)=>{const q=U.el=W?W.el:l(""),ie=U.anchor=W?W.anchor:l("");let{patchFlag:me,dynamicChildren:Se,slotScopeIds:ce}=U;ce&&(he=he?he.concat(ce):ce),W==null?(o(q,J,de),o(ie,J,de),O(U.children||[],J,ie,fe,pe,ve,he,V)):me>0&&me&64&&Se&&W.dynamicChildren?(_(W.dynamicChildren,Se,J,fe,pe,ve,he),(U.key!=null||fe&&U===fe.subTree)&&TS(W,U,!0)):L(W,U,J,ie,fe,pe,ve,he,V)},R=(W,U,J,de,fe,pe,ve,he,V)=>{U.slotScopeIds=he,W==null?U.shapeFlag&512?fe.ctx.activate(U,J,de,ve,V):H(U,J,de,fe,pe,ve,V):M(W,U,V)},H=(W,U,J,de,fe,pe,ve)=>{const he=W.component=qF(W,de,fe);if(iv(W)&&(he.ctx.renderer=X),JF(he,!1,ve),he.asyncDep){if(fe&&fe.registerDep(he,D,ve),!W.el){const V=he.subTree=g(Bn);b(null,V,U,J)}}else D(he,W,U,J,fe,pe,ve)},M=(W,U,J)=>{const de=U.component=W.component;if(jF(W,U,J))if(de.asyncDep&&!de.asyncResolved){N(de,U,J);return}else de.next=U,de.update();else U.el=W.el,de.vnode=U},D=(W,U,J,de,fe,pe,ve)=>{const he=()=>{if(W.isMounted){let{next:me,bu:Se,u:ce,parent:ee,vnode:ue}=W;{const we=pM(W);if(we){me&&(me.el=ue.el,N(W,me,ve)),we.asyncDep.then(()=>{W.isUnmounted||he()});return}}let xe=me,Pe;il(W,!1),me?(me.el=ue.el,N(W,me,ve)):me=ue,Se&&Rp(Se),(Pe=me.props&&me.props.onVnodeBeforeUpdate)&&Qr(Pe,ee,me,ue),il(W,!0);const _e=Xw(W),Ce=W.subTree;W.subTree=_e,h(Ce,_e,d(Ce.el),Z(Ce),W,fe,pe),me.el=_e.el,xe===null&&WF(W,_e.el),ce&&mo(ce,fe),(Pe=me.props&&me.props.onVnodeUpdated)&&mo(()=>Qr(Pe,ee,me,ue),fe)}else{let me;const{el:Se,props:ce}=U,{bm:ee,m:ue,parent:xe,root:Pe,type:_e}=W,Ce=Zs(U);il(W,!1),ee&&Rp(ee),!Ce&&(me=ce&&ce.onVnodeBeforeMount)&&Qr(me,xe,U),il(W,!0);{Pe.ce&&Pe.ce._def.shadowRoot!==!1&&Pe.ce._injectChildStyle(_e);const we=W.subTree=Xw(W);h(null,we,J,de,W,fe,pe),U.el=we.el}if(ue&&mo(ue,fe),!Ce&&(me=ce&&ce.onVnodeMounted)){const we=U;mo(()=>Qr(me,xe,we),fe)}(U.shapeFlag&256||xe&&Zs(xe.vnode)&&xe.vnode.shapeFlag&256)&&W.a&&mo(W.a,fe),W.isMounted=!0,U=J=de=null}};W.scope.on();const V=W.effect=new b_(he);W.scope.off();const q=W.update=V.run.bind(V),ie=W.job=V.runIfDirty.bind(V);ie.i=W,ie.id=W.uid,V.scheduler=()=>xS(ie),il(W,!0),q()},N=(W,U,J)=>{U.component=W;const de=W.vnode.props;W.vnode=U,W.next=null,OF(W,U.props,de,J),_F(W,U.children,J),Xi(),Nw(W),Yi()},L=(W,U,J,de,fe,pe,ve,he,V=!1)=>{const q=W&&W.children,ie=W?W.shapeFlag:0,me=U.children,{patchFlag:Se,shapeFlag:ce}=U;if(Se>0){if(Se&128){B(q,me,J,de,fe,pe,ve,he,V);return}else if(Se&256){F(q,me,J,de,fe,pe,ve,he,V);return}}ce&8?(ie&16&&oe(q,fe,pe),me!==q&&c(J,me)):ie&16?ce&16?B(q,me,J,de,fe,pe,ve,he,V):oe(q,fe,pe,!0):(ie&8&&c(J,""),ce&16&&O(me,J,de,fe,pe,ve,he,V))},F=(W,U,J,de,fe,pe,ve,he,V)=>{W=W||Ys,U=U||Ys;const q=W.length,ie=U.length,me=Math.min(q,ie);let Se;for(Se=0;Seie?oe(W,fe,pe,!0,!1,me):O(U,J,de,fe,pe,ve,he,V,me)},B=(W,U,J,de,fe,pe,ve,he,V)=>{let q=0;const ie=U.length;let me=W.length-1,Se=ie-1;for(;q<=me&&q<=Se;){const ce=W[q],ee=U[q]=V?Ca(U[q]):ai(U[q]);if(bl(ce,ee))h(ce,ee,J,null,fe,pe,ve,he,V);else break;q++}for(;q<=me&&q<=Se;){const ce=W[me],ee=U[Se]=V?Ca(U[Se]):ai(U[Se]);if(bl(ce,ee))h(ce,ee,J,null,fe,pe,ve,he,V);else break;me--,Se--}if(q>me){if(q<=Se){const ce=Se+1,ee=ceSe)for(;q<=me;)z(W[q],fe,pe,!0),q++;else{const ce=q,ee=q,ue=new Map;for(q=ee;q<=Se;q++){const Re=U[q]=V?Ca(U[q]):ai(U[q]);Re.key!=null&&ue.set(Re.key,q)}let xe,Pe=0;const _e=Se-ee+1;let Ce=!1,we=0;const Oe=new Array(_e);for(q=0;q<_e;q++)Oe[q]=0;for(q=ce;q<=me;q++){const Re=W[q];if(Pe>=_e){z(Re,fe,pe,!0);continue}let Ae;if(Re.key!=null)Ae=ue.get(Re.key);else for(xe=ee;xe<=Se;xe++)if(Oe[xe-ee]===0&&bl(Re,U[xe])){Ae=xe;break}Ae===void 0?z(Re,fe,pe,!0):(Oe[Ae-ee]=q+1,Ae>=we?we=Ae:Ce=!0,h(Re,U[Ae],J,null,fe,pe,ve,he,V),Pe++)}const Me=Ce?DF(Oe):Ys;for(xe=Me.length-1,q=_e-1;q>=0;q--){const Re=ee+q,Ae=U[Re],Fe=Re+1{const{el:pe,type:ve,transition:he,children:V,shapeFlag:q}=W;if(q&6){j(W.component.subTree,U,J,de);return}if(q&128){W.suspense.move(U,J,de);return}if(q&64){ve.move(W,U,J,X);return}if(ve===Le){o(pe,U,J);for(let me=0;mehe.enter(pe),fe);else{const{leave:me,delayLeave:Se,afterLeave:ce}=he,ee=()=>{W.ctx.isUnmounted?r(pe):o(pe,U,J)},ue=()=>{me(pe,()=>{ee(),ce&&ce()})};Se?Se(pe,ee,ue):ue()}else o(pe,U,J)},z=(W,U,J,de=!1,fe=!1)=>{const{type:pe,props:ve,ref:he,children:V,dynamicChildren:q,shapeFlag:ie,patchFlag:me,dirs:Se,cacheIndex:ce}=W;if(me===-2&&(fe=!1),he!=null&&(Xi(),Ku(he,null,J,W,!0),Yi()),ce!=null&&(U.renderCache[ce]=void 0),ie&256){U.ctx.deactivate(W);return}const ee=ie&1&&Se,ue=!Zs(W);let xe;if(ue&&(xe=ve&&ve.onVnodeBeforeUnmount)&&Qr(xe,U,W),ie&6)Y(W.component,J,de);else{if(ie&128){W.suspense.unmount(J,de);return}ee&&rl(W,null,U,"beforeUnmount"),ie&64?W.type.remove(W,U,J,X,de):q&&!q.hasOnce&&(pe!==Le||me>0&&me&64)?oe(q,U,J,!1,!0):(pe===Le&&me&384||!fe&&ie&16)&&oe(V,U,J),de&&G(W)}(ue&&(xe=ve&&ve.onVnodeUnmounted)||ee)&&mo(()=>{xe&&Qr(xe,U,W),ee&&rl(W,null,U,"unmounted")},J)},G=W=>{const{type:U,el:J,anchor:de,transition:fe}=W;if(U===Le){Q(J,de);return}if(U===o0){$(W);return}const pe=()=>{r(J),fe&&!fe.persisted&&fe.afterLeave&&fe.afterLeave()};if(W.shapeFlag&1&&fe&&!fe.persisted){const{leave:ve,delayLeave:he}=fe,V=()=>ve(J,pe);he?he(W.el,pe,V):V()}else pe()},Q=(W,U)=>{let J;for(;W!==U;)J=f(W),r(W),W=J;r(U)},Y=(W,U,J)=>{const{bum:de,scope:fe,job:pe,subTree:ve,um:he,m:V,a:q,parent:ie,slots:{__:me}}=W;Gw(V),Gw(q),de&&Rp(de),ie&&ct(me)&&me.forEach(Se=>{ie.renderCache[Se]=void 0}),fe.stop(),pe&&(pe.flags|=8,z(ve,W,U,J)),he&&mo(he,U),mo(()=>{W.isUnmounted=!0},U),U&&U.pendingBranch&&!U.isUnmounted&&W.asyncDep&&!W.asyncResolved&&W.suspenseId===U.pendingId&&(U.deps--,U.deps===0&&U.resolve())},oe=(W,U,J,de=!1,fe=!1,pe=0)=>{for(let ve=pe;ve{if(W.shapeFlag&6)return Z(W.component.subTree);if(W.shapeFlag&128)return W.suspense.next();const U=f(W.anchor||W.el),J=U&&U[z_];return J?f(J):U};let re=!1;const ne=(W,U,J)=>{W==null?U._vnode&&z(U._vnode,null,null,!0):h(U._vnode||null,W,U,null,null,null,J),U._vnode=W,re||(re=!0,Nw(),B_(),re=!1)},X={p:h,um:z,m:j,r:G,mt:H,mc:O,pc:L,pbc:_,n:Z,o:e};return{render:ne,hydrate:void 0,createApp:$F(ne)}}function n0({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function il({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function RF(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function TS(e,t,n=!1){const o=e.children,r=t.children;if(ct(o)&&ct(r))for(let i=0;i>1,e[n[l]]0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,a=n[i-1];i-- >0;)n[i]=a,a=t[a];return n}function pM(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:pM(t)}function Gw(e){if(e)for(let t=0;tze(NF);function Ve(e,t){return ES(e,null,t)}function be(e,t,n){return ES(e,t,n)}function ES(e,t,n=Ft){const{immediate:o,deep:r,flush:i,once:a}=n,l=Rn({},n),s=t&&o||!t&&i!=="post";let u;if(Od){if(i==="sync"){const p=kF();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!s){const p=()=>{};return p.stop=ci,p.resume=ci,p.pause=ci,p}}const c=Hn;l.call=(p,v,h)=>Wr(p,c,v,h);let d=!1;i==="post"?l.scheduler=p=>{mo(p,c&&c.suspense)}:i!=="sync"&&(d=!0,l.scheduler=(p,v)=>{v?p():xS(p)}),l.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=eF(e,t,l);return Od&&(u?u.push(f):s&&f()),f}function LF(e,t,n){const o=this.proxy,r=en(e)?e.includes(".")?gM(o,e):()=>o[e]:e.bind(o,o);let i;gt(t)?i=t:(i=t.handler,n=t);const a=uf(this),l=ES(r,i.bind(o),n);return a(),l}function gM(e,t){const n=t.split(".");return()=>{let o=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${mr(t)}Modifiers`]||e[`${es(t)}Modifiers`];function BF(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||Ft;let r=n;const i=t.startsWith("update:"),a=i&&FF(o,t.slice(7));a&&(a.trim&&(r=n.map(c=>en(c)?c.trim():c)),a.number&&(r=n.map(Pg)));let l,s=o[l=Ym(t)]||o[l=Ym(mr(t))];!s&&i&&(s=o[l=Ym(es(t))]),s&&Wr(s,e,6,r);const u=o[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Wr(u,e,6,r)}}function hM(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(r!==void 0)return r;const i=e.emits;let a={},l=!1;if(!gt(e)){const s=u=>{const c=hM(u,t,!0);c&&(l=!0,Rn(a,c))};!n&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return!i&&!l?(kt(e)&&o.set(e,null),null):(ct(i)?i.forEach(s=>a[s]=null):Rn(a,i),kt(e)&&o.set(e,a),a)}function cv(e,t){return!e||!Xh(t)?!1:(t=t.slice(2).replace(/Once$/,""),Rt(e,t[0].toLowerCase()+t.slice(1))||Rt(e,es(t))||Rt(e,t))}function Xw(e){const{type:t,vnode:n,proxy:o,withProxy:r,propsOptions:[i],slots:a,attrs:l,emit:s,render:u,renderCache:c,props:d,data:f,setupState:p,ctx:v,inheritAttrs:h}=e,m=_g(e);let b,S;try{if(n.shapeFlag&4){const $=r||o,x=$;b=ai(u.call(x,$,c,d,p,f,v)),S=l}else{const $=t;b=ai($.length>1?$(d,{attrs:l,slots:a,emit:s}):$(d,null)),S=t.props?l:HF(l)}}catch($){Gu.length=0,nv($,e,1),b=g(Bn)}let C=b;if(S&&h!==!1){const $=Object.keys(S),{shapeFlag:x}=C;$.length&&x&7&&(i&&$.some(cS)&&(S=zF(S,i)),C=Dn(C,S,!1,!0))}return n.dirs&&(C=Dn(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(n.dirs):n.dirs),n.transition&&Hl(C,n.transition),b=C,_g(m),b}const HF=e=>{let t;for(const n in e)(n==="class"||n==="style"||Xh(n))&&((t||(t={}))[n]=e[n]);return t},zF=(e,t)=>{const n={};for(const o in e)(!cS(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function jF(e,t,n){const{props:o,children:r,component:i}=e,{props:a,children:l,patchFlag:s}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&s>=0){if(s&1024)return!0;if(s&16)return o?Yw(o,a,u):!!a;if(s&8){const c=t.dynamicProps;for(let d=0;de.__isSuspense;function VF(e,t){t&&t.pendingBranch?ct(e)?t.effects.push(...e):t.effects.push(e):oF(e)}const Le=Symbol.for("v-fgt"),ta=Symbol.for("v-txt"),Bn=Symbol.for("v-cmt"),o0=Symbol.for("v-stc"),Gu=[];let Ko=null;function st(e=!1){Gu.push(Ko=e?null:[])}function KF(){Gu.pop(),Ko=Gu[Gu.length-1]||null}let Pd=1;function qw(e,t=!1){Pd+=e,e<0&&Ko&&t&&(Ko.hasOnce=!0)}function mM(e){return e.dynamicChildren=Pd>0?Ko||Ys:null,KF(),Pd>0&&Ko&&Ko.push(e),e}function _t(e,t,n,o,r,i){return mM(Ye(e,t,n,o,r,i,!0))}function rn(e,t,n,o,r){return mM(g(e,t,n,o,r,!0))}function ln(e){return e?e.__v_isVNode===!0:!1}function bl(e,t){return e.type===t.type&&e.key===t.key}const bM=({key:e})=>e??null,Np=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?en(e)||Ut(e)||gt(e)?{i:En,r:e,k:t,f:!!n}:e:null);function Ye(e,t=null,n=null,o=0,r=null,i=e===Le?0:1,a=!1,l=!1){const s={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&bM(t),ref:t&&Np(t),scopeId:ov,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:En};return l?(_S(s,n),i&128&&e.normalize(s)):n&&(s.shapeFlag|=en(n)?8:16),Pd>0&&!a&&Ko&&(s.patchFlag>0||i&6)&&s.patchFlag!==32&&Ko.push(s),s}const g=UF;function UF(e,t=null,n=null,o=0,r=null,i=!1){if((!e||e===Q_)&&(e=Bn),ln(e)){const l=Dn(e,t,!0);return n&&_S(l,n),Pd>0&&!i&&Ko&&(l.shapeFlag&6?Ko[Ko.indexOf(e)]=l:Ko.push(l)),l.patchFlag=-2,l}if(t9(e)&&(e=e.__vccOpts),t){t=GF(t);let{class:l,style:s}=t;l&&!en(l)&&(t.class=_n(l)),kt(s)&&(SS(s)&&!ct(s)&&(s=Rn({},s)),t.style=wn(s))}const a=en(e)?1:vM(e)?128:j_(e)?64:kt(e)?4:gt(e)?2:0;return Ye(e,t,n,o,r,a,i,!0)}function GF(e){return e?SS(e)||lM(e)?Rn({},e):e:null}function Dn(e,t,n=!1,o=!1){const{props:r,ref:i,patchFlag:a,children:l,transition:s}=e,u=t?iy(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&bM(u),ref:t&&t.ref?n&&i?ct(i)?i.concat(Np(t)):[i,Np(t)]:Np(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Le?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:s,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Dn(e.ssContent),ssFallback:e.ssFallback&&Dn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return s&&o&&Hl(c,s.clone(c)),c}function zn(e=" ",t=0){return g(ta,null,e,t)}function Xt(e="",t=!1){return t?(st(),rn(Bn,null,e)):g(Bn,null,e)}function ai(e){return e==null||typeof e=="boolean"?g(Bn):ct(e)?g(Le,null,e.slice()):ln(e)?Ca(e):g(ta,null,String(e))}function Ca(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Dn(e)}function _S(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(ct(t))n=16;else if(typeof t=="object")if(o&65){const r=t.default;r&&(r._c&&(r._d=!1),_S(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!lM(t)?t._ctx=En:r===3&&En&&(En.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else gt(t)?(t={default:t,_ctx:En},n=32):(t=String(t),o&64?(n=16,t=[zn(t)]):n=8);e.children=t,e.shapeFlag|=n}function iy(...e){const t={};for(let n=0;nHn||En;let Ag,ay;{const e=Zh(),t=(n,o)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(o),i=>{r.length>1?r.forEach(a=>a(i)):r[0](i)}};Ag=t("__VUE_INSTANCE_SETTERS__",n=>Hn=n),ay=t("__VUE_SSR_SETTERS__",n=>Od=n)}const uf=e=>{const t=Hn;return Ag(e),e.scope.on(),()=>{e.scope.off(),Ag(t)}},Jw=()=>{Hn&&Hn.scope.off(),Ag(null)};function yM(e){return e.vnode.shapeFlag&4}let Od=!1;function JF(e,t=!1,n=!1){t&&ay(t);const{props:o,children:r}=e.vnode,i=yM(e);PF(e,o,i,t),EF(e,r,n||t);const a=i?ZF(e,t):void 0;return t&&ay(!1),a}function ZF(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,gF);const{setup:o}=n;if(o){Xi();const r=e.setupContext=o.length>1?CM(e):null,i=uf(e),a=sf(o,e,0,[e.props,r]),l=d_(a);if(Yi(),i(),(l||e.sp)&&!Zs(e)&&q_(e),l){if(a.then(Jw,Jw),t)return a.then(s=>{Zw(e,s)}).catch(s=>{nv(s,e,0)});e.asyncDep=a}else Zw(e,a)}else SM(e)}function Zw(e,t,n){gt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:kt(t)&&(e.setupState=N_(t)),SM(e)}function SM(e,t,n){const o=e.type;e.render||(e.render=o.render||ci);{const r=uf(e);Xi();try{mF(e)}finally{Yi(),r()}}}const QF={get(e,t){return oo(e,"get",""),e[t]}};function CM(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,QF),slots:e.slots,emit:e.emit,expose:t}}function uv(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(N_(CS(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Uu)return Uu[n](e)},has(t,n){return n in t||n in Uu}})):e.proxy}function e9(e,t=!0){return gt(e)?e.displayName||e.name:e.name||t&&e.__name}function t9(e){return gt(e)&&"__vccOpts"in e}const E=(e,t)=>ZL(e,t,Od);function Vr(e,t,n){const o=arguments.length;return o===2?kt(t)&&!ct(t)?ln(t)?g(e,null,[t]):g(e,t):g(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&ln(n)&&(n=[n]),g(e,t,n))}const n9="3.5.17";/** * @vue/runtime-dom v3.5.17 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let ly;const Qw=typeof window<"u"&&window.trustedTypes;if(Qw)try{ly=Qw.createPolicy("vue",{createHTML:e=>e})}catch{}const xM=ly?e=>ly.createHTML(e):e=>e,o9="http://www.w3.org/2000/svg",r9="http://www.w3.org/1998/Math/MathML",Mi=typeof document<"u"?document:null,e2=Mi&&Mi.createElement("template"),i9={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t==="svg"?Mi.createElementNS(o9,e):t==="mathml"?Mi.createElementNS(r9,e):n?Mi.createElement(e,{is:n}):Mi.createElement(e);return e==="select"&&o&&o.multiple!=null&&r.setAttribute("multiple",o.multiple),r},createText:e=>Mi.createTextNode(e),createComment:e=>Mi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Mi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,i){const a=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{e2.innerHTML=xM(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const l=e2.content;if(o==="svg"||o==="mathml"){const s=l.firstChild;for(;s.firstChild;)l.appendChild(s.firstChild);l.removeChild(s)}t.insertBefore(l,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},fa="transition",vu="animation",hc=Symbol("_vtc"),$M={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},wM=Rn({},U_,$M),a9=e=>(e.displayName="Transition",e.props=wM,e),Nn=a9((e,{slots:t})=>Vr(aF,PM(e),t)),al=(e,t=[])=>{ct(e)?e.forEach(n=>n(...t)):e&&e(...t)},t2=e=>e?ct(e)?e.some(t=>t.length>1):e.length>1:!1;function PM(e){const t={};for(const A in e)A in $M||(t[A]=e[A]);if(e.css===!1)return t;const{name:n="v",type:o,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:s=i,appearActiveClass:u=a,appearToClass:c=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,v=l9(r),h=v&&v[0],m=v&&v[1],{onBeforeEnter:b,onEnter:S,onEnterCancelled:C,onLeave:$,onLeaveCancelled:x,onBeforeAppear:P=b,onAppear:w=S,onAppearCancelled:O=C}=t,I=(A,R,H,M)=>{A._enterCancelled=M,va(A,R?c:l),va(A,R?u:a),H&&H()},_=(A,R)=>{A._isLeaving=!1,va(A,d),va(A,p),va(A,f),R&&R()},T=A=>(R,H)=>{const M=A?w:S,D=()=>I(R,A,H);al(M,[R,D]),n2(()=>{va(R,A?s:i),ei(R,A?c:l),t2(M)||o2(R,o,h,D)})};return Rn(t,{onBeforeEnter(A){al(b,[A]),ei(A,i),ei(A,a)},onBeforeAppear(A){al(P,[A]),ei(A,s),ei(A,u)},onEnter:T(!1),onAppear:T(!0),onLeave(A,R){A._isLeaving=!0;const H=()=>_(A,R);ei(A,d),A._enterCancelled?(ei(A,f),sy()):(sy(),ei(A,f)),n2(()=>{A._isLeaving&&(va(A,d),ei(A,p),t2($)||o2(A,o,m,H))}),al($,[A,H])},onEnterCancelled(A){I(A,!1,void 0,!0),al(C,[A])},onAppearCancelled(A){I(A,!0,void 0,!0),al(O,[A])},onLeaveCancelled(A){_(A),al(x,[A])}})}function l9(e){if(e==null)return null;if(kt(e))return[r0(e.enter),r0(e.leave)];{const t=r0(e);return[t,t]}}function r0(e){return yL(e)}function ei(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[hc]||(e[hc]=new Set)).add(t)}function va(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[hc];n&&(n.delete(t),n.size||(e[hc]=void 0))}function n2(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let s9=0;function o2(e,t,n,o){const r=e._endId=++s9,i=()=>{r===e._endId&&o()};if(n!=null)return setTimeout(i,n);const{type:a,timeout:l,propCount:s}=OM(e,t);if(!a)return o();const u=a+"end";let c=0;const d=()=>{e.removeEventListener(u,f),i()},f=p=>{p.target===e&&++c>=s&&d()};setTimeout(()=>{c(n[v]||"").split(", "),r=o(`${fa}Delay`),i=o(`${fa}Duration`),a=r2(r,i),l=o(`${vu}Delay`),s=o(`${vu}Duration`),u=r2(l,s);let c=null,d=0,f=0;t===fa?a>0&&(c=fa,d=a,f=i.length):t===vu?u>0&&(c=vu,d=u,f=s.length):(d=Math.max(a,u),c=d>0?a>u?fa:vu:null,f=c?c===fa?i.length:s.length:0);const p=c===fa&&/\b(transform|all)(,|$)/.test(o(`${fa}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function r2(e,t){for(;e.lengthi2(n)+i2(e[o])))}function i2(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function sy(){return document.body.offsetHeight}function c9(e,t,n){const o=e[hc];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Dg=Symbol("_vod"),IM=Symbol("_vsh"),Vn={beforeMount(e,{value:t},{transition:n}){e[Dg]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):mu(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),mu(e,!0),o.enter(e)):o.leave(e,()=>{mu(e,!1)}):mu(e,t))},beforeUnmount(e,{value:t}){mu(e,t)}};function mu(e,t){e.style.display=t?e[Dg]:"none",e[IM]=!t}const u9=Symbol(""),d9=/(^|;)\s*display\s*:/;function f9(e,t,n){const o=e.style,r=en(n);let i=!1;if(n&&!r){if(t)if(en(t))for(const a of t.split(";")){const l=a.slice(0,a.indexOf(":")).trim();n[l]==null&&Lp(o,l,"")}else for(const a in t)n[a]==null&&Lp(o,a,"");for(const a in n)a==="display"&&(i=!0),Lp(o,a,n[a])}else if(r){if(t!==n){const a=o[u9];a&&(n+=";"+a),o.cssText=n,i=d9.test(n)}}else t&&e.removeAttribute("style");Dg in e&&(e[Dg]=i?o.display:"",e[IM]&&(o.display="none"))}const a2=/\s*!important$/;function Lp(e,t,n){if(ct(n))n.forEach(o=>Lp(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=p9(e,t);a2.test(n)?e.setProperty(es(o),n.replace(a2,""),"important"):e[o]=n}}const l2=["Webkit","Moz","ms"],i0={};function p9(e,t){const n=i0[t];if(n)return n;let o=mr(t);if(o!=="filter"&&o in e)return i0[t]=o;o=Zh(o);for(let r=0;ra0||(m9.then(()=>a0=0),a0=Date.now());function y9(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;Wr(S9(o,n.value),t,5,[o])};return n.value=e,n.attached=b9(),n}function S9(e,t){if(ct(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>r=>!r._stopped&&o&&o(r))}else return t}const p2=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,C9=(e,t,n,o,r,i)=>{const a=r==="svg";t==="class"?c9(e,o,a):t==="style"?f9(e,n,o):Yh(t)?cS(t)||h9(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):x9(e,t,o,a))?(u2(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&c2(e,t,o,a,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!en(o))?u2(e,mr(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),c2(e,t,o,a))};function x9(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&p2(t)&>(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return p2(t)&&en(n)?!1:t in e}const TM=new WeakMap,EM=new WeakMap,Ng=Symbol("_moveCb"),g2=Symbol("_enterCb"),$9=e=>(delete e.props.mode,e),w9=$9({name:"TransitionGroup",props:Rn({},wM,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Jt(),o=K_();let r,i;return uo(()=>{if(!r.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!T9(r[0].el,n.vnode.el,a)){r=[];return}r.forEach(P9),r.forEach(O9);const l=r.filter(I9);sy(),l.forEach(s=>{const u=s.el,c=u.style;ei(u,a),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Ng]=f=>{f&&f.target!==u||(!f||/transform$/.test(f.propertyName))&&(u.removeEventListener("transitionend",d),u[Ng]=null,va(u,a))};u.addEventListener("transitionend",d)}),r=[]}),()=>{const a=nt(e),l=PM(a);let s=a.tag||Le;if(r=[],i)for(let u=0;u{l.split(/\s+/).forEach(s=>s&&o.classList.remove(s))}),n.split(/\s+/).forEach(l=>l&&o.classList.add(l)),o.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(o);const{hasTransform:a}=OM(o);return i.removeChild(o),a}const vc=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ct(t)?n=>Rp(t,n):t};function E9(e){e.target.composing=!0}function h2(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Vi=Symbol("_assign"),_9={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e[Vi]=vc(r);const i=o||r.props&&r.props.type==="number";wa(e,t?"change":"input",a=>{if(a.target.composing)return;let l=e.value;n&&(l=l.trim()),i&&(l=Og(l)),e[Vi](l)}),n&&wa(e,"change",()=>{e.value=e.value.trim()}),t||(wa(e,"compositionstart",E9),wa(e,"compositionend",h2),wa(e,"change",h2))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:r,number:i}},a){if(e[Vi]=vc(a),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?Og(e.value):e.value,s=t??"";l!==s&&(document.activeElement===e&&e.type!=="range"&&(o&&t===n||r&&e.value.trim()===s)||(e.value=s))}},nOe={created(e,{value:t},n){e.checked=gc(t,n.props.value),e[Vi]=vc(n),wa(e,"change",()=>{e[Vi](Id(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[Vi]=vc(o),t!==n&&(e.checked=gc(t,o.props.value))}},oOe={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=qh(t);wa(e,"change",()=>{const i=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?Og(Id(a)):Id(a));e[Vi](e.multiple?r?new Set(i):i:i[0]),e._assigning=!0,ot(()=>{e._assigning=!1})}),e[Vi]=vc(o)},mounted(e,{value:t}){v2(e,t)},beforeUpdate(e,t,n){e[Vi]=vc(n)},updated(e,{value:t}){e._assigning||v2(e,t)}};function v2(e,t){const n=e.multiple,o=ct(t);if(!(n&&!o&&!qh(t))){for(let r=0,i=e.options.length;rString(u)===String(l)):a.selected=IL(t,l)>-1}else a.selected=t.has(l);else if(gc(Id(a),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Id(e){return"_value"in e?e._value:e.value}const M9=["ctrl","shift","alt","meta"],A9={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>M9.some(n=>e[`${n}Key`]&&!t.includes(n))},m2=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(r,...i)=>{for(let a=0;a{_M().render(...e)},MM=(...e)=>{const t=_M().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=N9(o);if(!r)return;const i=t._component;!gt(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const a=n(r,!1,D9(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),a},t};function D9(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function N9(e){return en(e)?document.querySelector(e):e}/*! +**/let ly;const Qw=typeof window<"u"&&window.trustedTypes;if(Qw)try{ly=Qw.createPolicy("vue",{createHTML:e=>e})}catch{}const xM=ly?e=>ly.createHTML(e):e=>e,o9="http://www.w3.org/2000/svg",r9="http://www.w3.org/1998/Math/MathML",Mi=typeof document<"u"?document:null,e2=Mi&&Mi.createElement("template"),i9={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t==="svg"?Mi.createElementNS(o9,e):t==="mathml"?Mi.createElementNS(r9,e):n?Mi.createElement(e,{is:n}):Mi.createElement(e);return e==="select"&&o&&o.multiple!=null&&r.setAttribute("multiple",o.multiple),r},createText:e=>Mi.createTextNode(e),createComment:e=>Mi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Mi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,i){const a=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{e2.innerHTML=xM(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const l=e2.content;if(o==="svg"||o==="mathml"){const s=l.firstChild;for(;s.firstChild;)l.appendChild(s.firstChild);l.removeChild(s)}t.insertBefore(l,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},fa="transition",vu="animation",hc=Symbol("_vtc"),$M={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},wM=Rn({},U_,$M),a9=e=>(e.displayName="Transition",e.props=wM,e),Nn=a9((e,{slots:t})=>Vr(aF,PM(e),t)),al=(e,t=[])=>{ct(e)?e.forEach(n=>n(...t)):e&&e(...t)},t2=e=>e?ct(e)?e.some(t=>t.length>1):e.length>1:!1;function PM(e){const t={};for(const A in e)A in $M||(t[A]=e[A]);if(e.css===!1)return t;const{name:n="v",type:o,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:s=i,appearActiveClass:u=a,appearToClass:c=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,v=l9(r),h=v&&v[0],m=v&&v[1],{onBeforeEnter:b,onEnter:S,onEnterCancelled:C,onLeave:$,onLeaveCancelled:x,onBeforeAppear:P=b,onAppear:w=S,onAppearCancelled:O=C}=t,I=(A,R,H,M)=>{A._enterCancelled=M,va(A,R?c:l),va(A,R?u:a),H&&H()},_=(A,R)=>{A._isLeaving=!1,va(A,d),va(A,p),va(A,f),R&&R()},T=A=>(R,H)=>{const M=A?w:S,D=()=>I(R,A,H);al(M,[R,D]),n2(()=>{va(R,A?s:i),ei(R,A?c:l),t2(M)||o2(R,o,h,D)})};return Rn(t,{onBeforeEnter(A){al(b,[A]),ei(A,i),ei(A,a)},onBeforeAppear(A){al(P,[A]),ei(A,s),ei(A,u)},onEnter:T(!1),onAppear:T(!0),onLeave(A,R){A._isLeaving=!0;const H=()=>_(A,R);ei(A,d),A._enterCancelled?(ei(A,f),sy()):(sy(),ei(A,f)),n2(()=>{A._isLeaving&&(va(A,d),ei(A,p),t2($)||o2(A,o,m,H))}),al($,[A,H])},onEnterCancelled(A){I(A,!1,void 0,!0),al(C,[A])},onAppearCancelled(A){I(A,!0,void 0,!0),al(O,[A])},onLeaveCancelled(A){_(A),al(x,[A])}})}function l9(e){if(e==null)return null;if(kt(e))return[r0(e.enter),r0(e.leave)];{const t=r0(e);return[t,t]}}function r0(e){return yL(e)}function ei(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[hc]||(e[hc]=new Set)).add(t)}function va(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[hc];n&&(n.delete(t),n.size||(e[hc]=void 0))}function n2(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let s9=0;function o2(e,t,n,o){const r=e._endId=++s9,i=()=>{r===e._endId&&o()};if(n!=null)return setTimeout(i,n);const{type:a,timeout:l,propCount:s}=OM(e,t);if(!a)return o();const u=a+"end";let c=0;const d=()=>{e.removeEventListener(u,f),i()},f=p=>{p.target===e&&++c>=s&&d()};setTimeout(()=>{c(n[v]||"").split(", "),r=o(`${fa}Delay`),i=o(`${fa}Duration`),a=r2(r,i),l=o(`${vu}Delay`),s=o(`${vu}Duration`),u=r2(l,s);let c=null,d=0,f=0;t===fa?a>0&&(c=fa,d=a,f=i.length):t===vu?u>0&&(c=vu,d=u,f=s.length):(d=Math.max(a,u),c=d>0?a>u?fa:vu:null,f=c?c===fa?i.length:s.length:0);const p=c===fa&&/\b(transform|all)(,|$)/.test(o(`${fa}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function r2(e,t){for(;e.lengthi2(n)+i2(e[o])))}function i2(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function sy(){return document.body.offsetHeight}function c9(e,t,n){const o=e[hc];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Rg=Symbol("_vod"),IM=Symbol("_vsh"),Vn={beforeMount(e,{value:t},{transition:n}){e[Rg]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):mu(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),mu(e,!0),o.enter(e)):o.leave(e,()=>{mu(e,!1)}):mu(e,t))},beforeUnmount(e,{value:t}){mu(e,t)}};function mu(e,t){e.style.display=t?e[Rg]:"none",e[IM]=!t}const u9=Symbol(""),d9=/(^|;)\s*display\s*:/;function f9(e,t,n){const o=e.style,r=en(n);let i=!1;if(n&&!r){if(t)if(en(t))for(const a of t.split(";")){const l=a.slice(0,a.indexOf(":")).trim();n[l]==null&&kp(o,l,"")}else for(const a in t)n[a]==null&&kp(o,a,"");for(const a in n)a==="display"&&(i=!0),kp(o,a,n[a])}else if(r){if(t!==n){const a=o[u9];a&&(n+=";"+a),o.cssText=n,i=d9.test(n)}}else t&&e.removeAttribute("style");Rg in e&&(e[Rg]=i?o.display:"",e[IM]&&(o.display="none"))}const a2=/\s*!important$/;function kp(e,t,n){if(ct(n))n.forEach(o=>kp(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=p9(e,t);a2.test(n)?e.setProperty(es(o),n.replace(a2,""),"important"):e[o]=n}}const l2=["Webkit","Moz","ms"],i0={};function p9(e,t){const n=i0[t];if(n)return n;let o=mr(t);if(o!=="filter"&&o in e)return i0[t]=o;o=Jh(o);for(let r=0;ra0||(m9.then(()=>a0=0),a0=Date.now());function y9(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;Wr(S9(o,n.value),t,5,[o])};return n.value=e,n.attached=b9(),n}function S9(e,t){if(ct(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>r=>!r._stopped&&o&&o(r))}else return t}const p2=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,C9=(e,t,n,o,r,i)=>{const a=r==="svg";t==="class"?c9(e,o,a):t==="style"?f9(e,n,o):Xh(t)?cS(t)||h9(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):x9(e,t,o,a))?(u2(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&c2(e,t,o,a,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!en(o))?u2(e,mr(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),c2(e,t,o,a))};function x9(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&p2(t)&>(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return p2(t)&&en(n)?!1:t in e}const TM=new WeakMap,EM=new WeakMap,Dg=Symbol("_moveCb"),g2=Symbol("_enterCb"),$9=e=>(delete e.props.mode,e),w9=$9({name:"TransitionGroup",props:Rn({},wM,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Jt(),o=K_();let r,i;return uo(()=>{if(!r.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!T9(r[0].el,n.vnode.el,a)){r=[];return}r.forEach(P9),r.forEach(O9);const l=r.filter(I9);sy(),l.forEach(s=>{const u=s.el,c=u.style;ei(u,a),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Dg]=f=>{f&&f.target!==u||(!f||/transform$/.test(f.propertyName))&&(u.removeEventListener("transitionend",d),u[Dg]=null,va(u,a))};u.addEventListener("transitionend",d)}),r=[]}),()=>{const a=nt(e),l=PM(a);let s=a.tag||Le;if(r=[],i)for(let u=0;u{l.split(/\s+/).forEach(s=>s&&o.classList.remove(s))}),n.split(/\s+/).forEach(l=>l&&o.classList.add(l)),o.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(o);const{hasTransform:a}=OM(o);return i.removeChild(o),a}const vc=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ct(t)?n=>Rp(t,n):t};function E9(e){e.target.composing=!0}function h2(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Vi=Symbol("_assign"),_9={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e[Vi]=vc(r);const i=o||r.props&&r.props.type==="number";wa(e,t?"change":"input",a=>{if(a.target.composing)return;let l=e.value;n&&(l=l.trim()),i&&(l=Pg(l)),e[Vi](l)}),n&&wa(e,"change",()=>{e.value=e.value.trim()}),t||(wa(e,"compositionstart",E9),wa(e,"compositionend",h2),wa(e,"change",h2))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:r,number:i}},a){if(e[Vi]=vc(a),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?Pg(e.value):e.value,s=t??"";l!==s&&(document.activeElement===e&&e.type!=="range"&&(o&&t===n||r&&e.value.trim()===s)||(e.value=s))}},tOe={created(e,{value:t},n){e.checked=gc(t,n.props.value),e[Vi]=vc(n),wa(e,"change",()=>{e[Vi](Id(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[Vi]=vc(o),t!==n&&(e.checked=gc(t,o.props.value))}},nOe={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=Yh(t);wa(e,"change",()=>{const i=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?Pg(Id(a)):Id(a));e[Vi](e.multiple?r?new Set(i):i:i[0]),e._assigning=!0,ot(()=>{e._assigning=!1})}),e[Vi]=vc(o)},mounted(e,{value:t}){v2(e,t)},beforeUpdate(e,t,n){e[Vi]=vc(n)},updated(e,{value:t}){e._assigning||v2(e,t)}};function v2(e,t){const n=e.multiple,o=ct(t);if(!(n&&!o&&!Yh(t))){for(let r=0,i=e.options.length;rString(u)===String(l)):a.selected=IL(t,l)>-1}else a.selected=t.has(l);else if(gc(Id(a),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Id(e){return"_value"in e?e._value:e.value}const M9=["ctrl","shift","alt","meta"],A9={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>M9.some(n=>e[`${n}Key`]&&!t.includes(n))},m2=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(r,...i)=>{for(let a=0;a{_M().render(...e)},MM=(...e)=>{const t=_M().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=N9(o);if(!r)return;const i=t._component;!gt(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const a=n(r,!1,D9(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),a},t};function D9(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function N9(e){return en(e)?document.querySelector(e):e}/*! * pinia v2.3.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let AM;const pv=e=>AM=e,RM=Symbol();function cy(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Xu;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Xu||(Xu={}));function k9(){const e=fS(!0),t=e.run(()=>ae({}));let n=[],o=[];const r=CS({install(i){pv(r),r._a=i,i.provide(RM,r),i.config.globalProperties.$pinia=r,o.forEach(a=>n.push(a)),o=[]},use(i){return this._a?n.push(i):o.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const DM=()=>{};function y2(e,t,n,o=DM){e.push(t);const r=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),o())};return!n&&ev()&&pS(r),r}function Cs(e,...t){e.slice().forEach(n=>{n(...t)})}const L9=e=>e(),S2=Symbol(),l0=Symbol();function uy(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,o)=>e.set(o,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],r=e[n];cy(r)&&cy(o)&&e.hasOwnProperty(n)&&!Ut(o)&&!Wi(o)?e[n]=uy(r,o):e[n]=o}return e}const F9=Symbol();function B9(e){return!cy(e)||!e.hasOwnProperty(F9)}const{assign:ma}=Object;function H9(e){return!!(Ut(e)&&e.effect)}function z9(e,t,n,o){const{state:r,actions:i,getters:a}=t,l=n.state.value[e];let s;function u(){l||(n.state.value[e]=r?r():{});const c=Fr(n.state.value[e]);return ma(c,i,Object.keys(a||{}).reduce((d,f)=>(d[f]=CS(E(()=>{pv(n);const p=n._s.get(e);return a[f].call(p,p)})),d),{}))}return s=NM(e,u,t,n,o,!0),s}function NM(e,t,n={},o,r,i){let a;const l=ma({actions:{}},n),s={deep:!0};let u,c,d=[],f=[],p;const v=o.state.value[e];!i&&!v&&(o.state.value[e]={}),ae({});let h;function m(O){let I;u=c=!1,typeof O=="function"?(O(o.state.value[e]),I={type:Xu.patchFunction,storeId:e,events:p}):(uy(o.state.value[e],O),I={type:Xu.patchObject,payload:O,storeId:e,events:p});const _=h=Symbol();ot().then(()=>{h===_&&(u=!0)}),c=!0,Cs(d,I,o.state.value[e])}const b=i?function(){const{state:I}=n,_=I?I():{};this.$patch(T=>{ma(T,_)})}:DM;function S(){a.stop(),d=[],f=[],o._s.delete(e)}const C=(O,I="")=>{if(S2 in O)return O[l0]=I,O;const _=function(){pv(o);const T=Array.from(arguments),A=[],R=[];function H(N){A.push(N)}function M(N){R.push(N)}Cs(f,{args:T,name:_[l0],store:x,after:H,onError:M});let D;try{D=O.apply(this&&this.$id===e?this:x,T)}catch(N){throw Cs(R,N),N}return D instanceof Promise?D.then(N=>(Cs(A,N),N)).catch(N=>(Cs(R,N),Promise.reject(N))):(Cs(A,D),D)};return _[S2]=!0,_[l0]=I,_},$={_p:o,$id:e,$onAction:y2.bind(null,f),$patch:m,$reset:b,$subscribe(O,I={}){const _=y2(d,O,I.detached,()=>T()),T=a.run(()=>be(()=>o.state.value[e],A=>{(I.flush==="sync"?c:u)&&O({storeId:e,type:Xu.direct,events:p},A)},ma({},s,I)));return _},$dispose:S},x=rt($);o._s.set(e,x);const w=(o._a&&o._a.runWithContext||L9)(()=>o._e.run(()=>(a=fS()).run(()=>t({action:C}))));for(const O in w){const I=w[O];if(Ut(I)&&!H9(I)||Wi(I))i||(v&&B9(I)&&(Ut(I)?I.value=v[O]:uy(I,v[O])),o.state.value[e][O]=I);else if(typeof I=="function"){const _=C(I,O);w[O]=_,l.actions[O]=I}}return ma(x,w),ma(nt(x),w),Object.defineProperty(x,"$state",{get:()=>o.state.value[e],set:O=>{m(I=>{ma(I,O)})}}),o._p.forEach(O=>{ma(x,a.run(()=>O({store:x,app:o._a,pinia:o,options:l})))}),v&&i&&n.hydrate&&n.hydrate(x.$state,v),u=!0,c=!0,x}/*! #__NO_SIDE_EFFECTS__ */function rOe(e,t,n){let o,r;const i=typeof t=="function";typeof e=="string"?(o=e,r=i?n:t):(r=e,o=e.id);function a(l,s){const u=wF();return l=l||(u?ze(RM,null):null),l&&pv(l),l=AM,l._s.has(o)||(i?NM(o,t,r,l):z9(o,r,l)),l._s.get(o)}return a.$id=o,a}function iOe(e){{const t=nt(e),n={};for(const o in t){const r=t[o];r.effect?n[o]=E({get:()=>e[o],set(i){e[o]=i}}):(Ut(r)||Wi(r))&&(n[o]=We(e,o))}return n}}function Td(e){"@babel/helpers - typeof";return Td=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Td(e)}function j9(e,t){if(Td(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t);if(Td(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function W9(e){var t=j9(e,"string");return Td(t)=="symbol"?t:t+""}function V9(e,t,n){return(t=W9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function k(e){for(var t=1;ttypeof e=="function",K9=Array.isArray,U9=e=>typeof e=="string",G9=e=>e!==null&&typeof e=="object",X9=/^on[^a-z]/,Y9=e=>X9.test(e),MS=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},q9=/-(\w)/g,Kc=MS(e=>e.replace(q9,(t,n)=>n?n.toUpperCase():"")),J9=/\B([A-Z])/g,Z9=MS(e=>e.replace(J9,"-$1").toLowerCase()),Q9=MS(e=>e.charAt(0).toUpperCase()+e.slice(1)),eB=Object.prototype.hasOwnProperty,x2=(e,t)=>eB.call(e,t);function tB(e,t,n,o){const r=e[n];if(r!=null){const i=x2(r,"default");if(i&&o===void 0){const a=r.default;o=r.type!==Function&&dy(a)?a():a}r.type===Boolean&&(!x2(t,n)&&!i?o=!1:o===""&&(o=!0))}return o}function nB(e){return Object.keys(e).reduce((t,n)=>((n.startsWith("data-")||n.startsWith("aria-"))&&(t[n]=e[n]),t),{})}function yl(e){return typeof e=="number"?`${e}px`:e}function js(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return typeof e=="function"?e(t):e??n}function oB(e){let t;const n=new Promise(r=>{t=e(()=>{r(!0)})}),o=()=>{t==null||t()};return o.then=(r,i)=>n.then(r,i),o.promise=n,o}function ge(){const e=[];for(let t=0;t0},e.prototype.connect_=function(){!fy||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),cB?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!fy||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,o=n===void 0?"":n,r=sB.some(function(i){return!!~o.indexOf(i)});r&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),LM=function(e,t){for(var n=0,o=Object.keys(t);n"u"||!(Element instanceof Object))){if(!(t instanceof mc(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new bB(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof mc(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(o){return new yB(o.target,o.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),BM=typeof WeakMap<"u"?new WeakMap:new kM,HM=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=uB.getInstance(),o=new SB(t,n,this);BM.set(this,o)}return e}();["observe","unobserve","disconnect"].forEach(function(e){HM.prototype[e]=function(){var t;return(t=BM.get(this))[e].apply(t,arguments)}});var AS=function(){return typeof kg.ResizeObserver<"u"?kg.ResizeObserver:HM}();const py=e=>e!=null&&e!=="",Qe=(e,t)=>{const n=y({},e);return Object.keys(t).forEach(o=>{const r=n[o];if(r)r.type||r.default?r.default=t[o]:r.def?r.def(t[o]):n[o]={type:r,default:t[o]};else throw new Error(`not have ${o} prop`)}),n},RS=e=>{const t=Object.keys(e),n={},o={},r={};for(let i=0,a=t.length;i0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n={},o=/;(?![^(]*\))/g,r=/:(.+)/;return typeof e=="object"?e:(e.split(o).forEach(function(i){if(i){const a=i.split(r);if(a.length>1){const l=t?Kc(a[0].trim()):a[0].trim();n[l]=a[1].trim()}}}),n)},ki=(e,t)=>e[t]!==void 0,zM=Symbol("skipFlatten"),Ot=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=Array.isArray(e)?e:[e],o=[];return n.forEach(r=>{Array.isArray(r)?o.push(...Ot(r,t)):r&&r.type===Le?r.key===zM?o.push(r):o.push(...Ot(r.children,t)):r&&ln(r)?t&&!df(r)?o.push(r):t||o.push(r):py(r)&&o.push(r)}),o},hv=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(ln(e))return e.type===Le?t==="default"?Ot(e.children):[]:e.children&&e.children[t]?Ot(e.children[t](n)):[];{const o=e.$slots[t]&&e.$slots[t](n);return Ot(o)}},Co=e=>{var t;let n=((t=e==null?void 0:e.vnode)===null||t===void 0?void 0:t.el)||e&&(e.$el||e);for(;n&&!n.tagName;)n=n.nextSibling;return n},jM=e=>{const t={};if(e.$&&e.$.vnode){const n=e.$.vnode.props||{};Object.keys(e.$props).forEach(o=>{const r=e.$props[o],i=Z9(o);(r!==void 0||i in n)&&(t[o]=r)})}else if(ln(e)&&typeof e.type=="object"){const n=e.props||{},o={};Object.keys(n).forEach(i=>{o[Kc(i)]=n[i]});const r=e.type.props||{};Object.keys(r).forEach(i=>{const a=tB(r,o,i,o[i]);(a!==void 0||i in o)&&(t[i]=a)})}return t},WM=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,r;if(e.$){const i=e[t];if(i!==void 0)return typeof i=="function"&&o?i(n):i;r=e.$slots[t],r=o&&r?r(n):r}else if(ln(e)){const i=e.props&&e.props[t];if(i!==void 0&&e.props!==null)return typeof i=="function"&&o?i(n):i;e.type===Le?r=e.children:e.children&&e.children[t]&&(r=e.children[t],r=o&&r?r(n):r)}return Array.isArray(r)&&(r=Ot(r),r=r.length===1?r[0]:r,r=r.length===0?void 0:r),r};function w2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n={};return e.$?n=y(y({},n),e.$attrs):n=y(y({},n),e.props),RS(n)[t?"onEvents":"events"]}function xB(e){const n=((ln(e)?e.props:e.$attrs)||{}).class||{};let o={};return typeof n=="string"?n.split(" ").forEach(r=>{o[r.trim()]=!0}):Array.isArray(n)?ge(n).split(" ").forEach(r=>{o[r.trim()]=!0}):o=y(y({},o),n),o}function VM(e,t){let o=((ln(e)?e.props:e.$attrs)||{}).style||{};return typeof o=="string"&&(o=CB(o,t)),o}function $B(e){return e.length===1&&e[0].type===Le}function wB(e){return e==null||e===""||Array.isArray(e)&&e.length===0}function df(e){return e&&(e.type===Bn||e.type===Le&&e.children.length===0||e.type===ta&&e.children.trim()==="")}function PB(e){return e&&e.type===ta}function zt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const t=[];return e.forEach(n=>{Array.isArray(n)?t.push(...n):(n==null?void 0:n.type)===Le?t.push(...zt(n.children)):t.push(n)}),t.filter(n=>!df(n))}function bu(e){if(e){const t=zt(e);return t.length?t:void 0}else return e}function sn(e){return Array.isArray(e)&&e.length===1&&(e=e[0]),e&&e.__v_isVNode&&typeof e.type!="symbol"}function mn(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"default";var o,r;return(o=t[n])!==null&&o!==void 0?o:(r=e[n])===null||r===void 0?void 0:r.call(e)}const br=le({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup(e,t){let{slots:n}=t;const o=rt({width:0,height:0,offsetHeight:0,offsetWidth:0});let r=null,i=null;const a=()=>{i&&(i.disconnect(),i=null)},l=c=>{const{onResize:d}=e,f=c[0].target,{width:p,height:v}=f.getBoundingClientRect(),{offsetWidth:h,offsetHeight:m}=f,b=Math.floor(p),S=Math.floor(v);if(o.width!==b||o.height!==S||o.offsetWidth!==h||o.offsetHeight!==m){const C={width:b,height:S,offsetWidth:h,offsetHeight:m};y(o,C),d&&Promise.resolve().then(()=>{d(y(y({},C),{offsetWidth:h,offsetHeight:m}),f)})}},s=Jt(),u=()=>{const{disabled:c}=e;if(c){a();return}const d=Co(s);d!==r&&(a(),r=d),!i&&d&&(i=new AS(l),i.observe(d))};return Ke(()=>{u()}),uo(()=>{u()}),Zn(()=>{a()}),be(()=>e.disabled,()=>{u()},{flush:"post"}),()=>{var c;return(c=n.default)===null||c===void 0?void 0:c.call(n)[0]}}});let KM=e=>setTimeout(e,16),UM=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(KM=e=>window.requestAnimationFrame(e),UM=e=>window.cancelAnimationFrame(e));let P2=0;const DS=new Map;function GM(e){DS.delete(e)}function Ze(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;P2+=1;const n=P2;function o(r){if(r===0)GM(n),e();else{const i=KM(()=>{o(r-1)});DS.set(n,i)}}return o(t),n}Ze.cancel=e=>{const t=DS.get(e);return GM(t),UM(t)};function gy(e){let t;const n=r=>()=>{t=null,e(...r)},o=function(){if(t==null){for(var r=arguments.length,i=new Array(r),a=0;a{Ze.cancel(t),t=null},o}const Jn=function(){for(var e=arguments.length,t=new Array(e),n=0;n{const t=e;return t.install=function(n){n.component(t.displayName||t.name,e)},e};function zl(){return{type:[Function,Array]}}function De(e){return{type:Object,default:e}}function $e(e){return{type:Boolean,default:e}}function ye(e){return{type:Function,default:e}}function It(e,t){return{validator:()=>!0,default:e}}function ro(){return{validator:()=>!0}}function pt(e){return{type:Array,default:e}}function Ne(e){return{type:String,default:e}}function He(e,t){return e?{type:e,default:t}:It(t)}let hn=!1;try{const e=Object.defineProperty({},"passive",{get(){hn=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch{}function Ht(e,t,n,o){if(e&&e.addEventListener){let r=o;r===void 0&&hn&&(t==="touchstart"||t==="touchmove"||t==="wheel")&&(r={passive:!1}),e.addEventListener(t,n,r)}return{remove:()=>{e&&e.removeEventListener&&e.removeEventListener(t,n)}}}function Vf(e){return e!==window?e.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function O2(e,t,n){if(n!==void 0&&t.top>e.top-n)return`${n+t.top}px`}function I2(e,t,n){if(n!==void 0&&t.bottomo.target===e);n?n.affixList.push(t):(n={target:e,affixList:[t],eventHandlers:{}},Yu.push(n),XM.forEach(o=>{n.eventHandlers[o]=Ht(e,o,()=>{n.affixList.forEach(r=>{const{lazyUpdatePosition:i}=r.exposed;i()},(o==="touchstart"||o==="touchmove")&&hn?{passive:!0}:!1)})}))}function E2(e){const t=Yu.find(n=>{const o=n.affixList.some(r=>r===e);return o&&(n.affixList=n.affixList.filter(r=>r!==e)),o});t&&t.affixList.length===0&&(Yu=Yu.filter(n=>n!==t),XM.forEach(n=>{const o=t.eventHandlers[n];o&&o.remove&&o.remove()}))}const NS="anticon",YM=Symbol("GlobalFormContextKey"),IB=e=>{Xe(YM,e)},TB=()=>ze(YM,{validateMessages:E(()=>{})}),EB=()=>({iconPrefixCls:String,getTargetContainer:{type:Function},getPopupContainer:{type:Function},prefixCls:String,getPrefixCls:{type:Function},renderEmpty:{type:Function},transformCellText:{type:Function},csp:De(),input:De(),autoInsertSpaceInButton:{type:Boolean,default:void 0},locale:De(),pageHeader:De(),componentSize:{type:String},componentDisabled:{type:Boolean,default:void 0},direction:{type:String,default:"ltr"},space:De(),virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},form:De(),pagination:De(),theme:De(),select:De(),wave:De()}),kS=Symbol("configProvider"),qM={getPrefixCls:(e,t)=>t||(e?`ant-${e}`:"ant"),iconPrefixCls:E(()=>NS),getPopupContainer:E(()=>()=>document.body),direction:E(()=>"ltr")},vv=()=>ze(kS,qM),_B=e=>Xe(kS,e),JM=Symbol("DisabledContextKey"),ko=()=>ze(JM,ae(void 0)),ZM=e=>{const t=ko();return Xe(JM,E(()=>{var n;return(n=e.value)!==null&&n!==void 0?n:t.value})),e},QM={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages"},MB={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},e6={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},Ed={lang:y({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},MB),timePickerLocale:y({},e6)},Bo="${label} is not a valid ${type}",$o={locale:"en",Pagination:QM,DatePicker:Ed,TimePicker:e6,Calendar:Ed,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:Bo,method:Bo,array:Bo,object:Bo,number:Bo,date:Bo,boolean:Bo,integer:Bo,float:Bo,regexp:Bo,email:Bo,url:Bo,hex:Bo},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"}},ts=le({compatConfig:{MODE:3},name:"LocaleReceiver",props:{componentName:String,defaultLocale:{type:[Object,Function]},children:{type:Function}},setup(e,t){let{slots:n}=t;const o=ze("localeData",{}),r=E(()=>{const{componentName:a="global",defaultLocale:l}=e,s=l||$o[a||"global"],{antLocale:u}=o,c=a&&u?u[a]:{};return y(y({},typeof s=="function"?s():s),c||{})}),i=E(()=>{const{antLocale:a}=o,l=a&&a.locale;return a&&a.exist&&!l?$o.locale:l});return()=>{const a=e.children||n.default,{antLocale:l}=o;return a==null?void 0:a(r.value,i.value,l)}}});function wr(e,t,n){const o=ze("localeData",{});return[E(()=>{const{antLocale:i}=o,a=Bt(t)||$o[e||"global"],l=e&&i?i[e]:{};return y(y(y({},typeof a=="function"?a():a),l||{}),Bt(n)||{})})]}function LS(e){for(var t=0,n,o=0,r=e.length;r>=4;++o,r-=4)n=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}const _2="%";class AB{constructor(t){this.cache=new Map,this.instanceId=t}get(t){return this.cache.get(Array.isArray(t)?t.join(_2):t)||null}update(t,n){const o=Array.isArray(t)?t.join(_2):t,r=this.cache.get(o),i=n(r);i===null?this.cache.delete(o):this.cache.set(o,i)}}const t6="data-token-hash",_l="data-css-hash",Ws="__cssinjs_instance__";function _d(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${_l}]`)||[],{firstChild:n}=document.head;Array.from(t).forEach(r=>{r[Ws]=r[Ws]||e,r[Ws]===e&&document.head.insertBefore(r,n)});const o={};Array.from(document.querySelectorAll(`style[${_l}]`)).forEach(r=>{var i;const a=r.getAttribute(_l);o[a]?r[Ws]===e&&((i=r.parentNode)===null||i===void 0||i.removeChild(r)):o[a]=!0})}return new AB(e)}const n6=Symbol("StyleContextKey"),RB=()=>{var e,t,n;const o=Jt();let r;if(o&&o.appContext){const i=(n=(t=(e=o.appContext)===null||e===void 0?void 0:e.config)===null||t===void 0?void 0:t.globalProperties)===null||n===void 0?void 0:n.__ANTDV_CSSINJS_CACHE__;i?r=i:(r=_d(),o.appContext.config.globalProperties&&(o.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=r))}else r=_d();return r},o6={cache:_d(),defaultCache:!0,hashPriority:"low"},mv=()=>{const e=RB();return ze(n6,se(y(y({},o6),{cache:e})))},DB=e=>{const t=mv(),n=se(y(y({},o6),{cache:_d()}));return be([()=>Bt(e),t],()=>{const o=y({},t.value),r=Bt(e);Object.keys(r).forEach(a=>{const l=r[a];r[a]!==void 0&&(o[a]=l)});const{cache:i}=r;o.cache=o.cache||_d(),o.defaultCache=!i&&t.value.defaultCache,n.value=o},{immediate:!0}),Xe(n6,n),n},NB=()=>({autoClear:$e(),mock:Ne(),cache:De(),defaultCache:$e(),hashPriority:Ne(),container:He(),ssrInline:$e(),transformers:pt(),linters:pt()}),kB=Lt(le({name:"AStyleProvider",inheritAttrs:!1,props:NB(),setup(e,t){let{slots:n}=t;return DB(e),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}));function r6(e,t,n,o){const r=mv(),i=se(""),a=se();Ve(()=>{i.value=[e,...t.value].join("%")});const l=s=>{r.value.cache.update(s,u=>{const[c=0,d]=u||[];return c-1===0?(o==null||o(d,!1),null):[c-1,d]})};return be(i,(s,u)=>{u&&l(u),r.value.cache.update(s,c=>{const[d=0,f]=c||[],v=f||n();return[d+1,v]}),a.value=r.value.cache.get(i.value)[1]},{immediate:!0}),tt(()=>{l(i.value)}),a}function so(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Pa(e,t){return e&&e.contains?e.contains(t):!1}const M2="data-vc-order",LB="vc-util-key",hy=new Map;function i6(){let{mark:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e?e.startsWith("data-")?e:`data-${e}`:LB}function bv(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function FB(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function a6(e){return Array.from((hy.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function l6(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!so())return null;const{csp:n,prepend:o}=t,r=document.createElement("style");r.setAttribute(M2,FB(o)),n!=null&&n.nonce&&(r.nonce=n==null?void 0:n.nonce),r.innerHTML=e;const i=bv(t),{firstChild:a}=i;if(o){if(o==="queue"){const l=a6(i).filter(s=>["prepend","prependQueue"].includes(s.getAttribute(M2)));if(l.length)return i.insertBefore(r,l[l.length-1].nextSibling),r}i.insertBefore(r,a)}else i.appendChild(r);return r}function s6(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=bv(t);return a6(n).find(o=>o.getAttribute(i6(t))===e)}function Fg(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=s6(e,t);n&&bv(t).removeChild(n)}function BB(e,t){const n=hy.get(e);if(!n||!Pa(document,n)){const o=l6("",t),{parentNode:r}=o;hy.set(e,r),e.removeChild(o)}}function Md(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var o,r,i;const a=bv(n);BB(a,n);const l=s6(t,n);if(l)return!((o=n.csp)===null||o===void 0)&&o.nonce&&l.nonce!==((r=n.csp)===null||r===void 0?void 0:r.nonce)&&(l.nonce=(i=n.csp)===null||i===void 0?void 0:i.nonce),l.innerHTML!==e&&(l.innerHTML=e),l;const s=l6(e,n);return s.setAttribute(i6(n),t),s}function HB(e,t){if(e.length!==t.length)return!1;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!1,o={map:this.cache};return t.forEach(r=>{var i;o?o=(i=o==null?void 0:o.map)===null||i===void 0?void 0:i.get(r):o=void 0}),o!=null&&o.value&&n&&(o.value[1]=this.cacheCallTimes++),o==null?void 0:o.value}get(t){var n;return(n=this.internalGet(t,!0))===null||n===void 0?void 0:n[0]}has(t){return!!this.internalGet(t)}set(t,n){if(!this.has(t)){if(this.size()+1>bc.MAX_CACHE_SIZE+bc.MAX_CACHE_OFFSET){const[r]=this.keys.reduce((i,a)=>{const[,l]=i;return this.internalGet(a)[1]{if(i===t.length-1)o.set(r,{value:[n,this.cacheCallTimes++]});else{const a=o.get(r);a?a.map||(a.map=new Map):o.set(r,{map:new Map}),o=o.get(r).map}})}deleteByPath(t,n){var o;const r=t.get(n[0]);if(n.length===1)return r.map?t.set(n[0],{map:r.map}):t.delete(n[0]),(o=r.value)===null||o===void 0?void 0:o[0];const i=this.deleteByPath(r.map,n.slice(1));return(!r.map||r.map.size===0)&&!r.value&&t.delete(n[0]),i}delete(t){if(this.has(t))return this.keys=this.keys.filter(n=>!HB(n,t)),this.deleteByPath(this.cache,t)}}bc.MAX_CACHE_SIZE=20;bc.MAX_CACHE_OFFSET=5;let A2={};function zB(e,t){}function jB(e,t){}function c6(e,t,n){!t&&!A2[n]&&(e(!1,n),A2[n]=!0)}function FS(e,t){c6(zB,e,t)}function WB(e,t){c6(jB,e,t)}function VB(){}let Yo=VB,R2=0;class u6{constructor(t){this.derivatives=Array.isArray(t)?t:[t],this.id=R2,t.length===0&&Yo(t.length>0),R2+=1}getDerivativeToken(t){return this.derivatives.reduce((n,o)=>o(t,n),void 0)}}const s0=new bc;function d6(e){const t=Array.isArray(e)?e:[e];return s0.has(t)||s0.set(t,new u6(t)),s0.get(t)}const D2=new WeakMap;function Bg(e){let t=D2.get(e)||"";return t||(Object.keys(e).forEach(n=>{const o=e[n];t+=n,o instanceof u6?t+=o.id:o&&typeof o=="object"?t+=Bg(o):t+=o}),D2.set(e,t)),t}function KB(e,t){return LS(`${t}_${Bg(e)}`)}const qu=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),f6="_bAmBoO_";function UB(e,t,n){var o,r;if(so()){Md(e,qu);const i=document.createElement("div");i.style.position="fixed",i.style.left="0",i.style.top="0",t==null||t(i),document.body.appendChild(i);const a=n?n(i):(o=getComputedStyle(i).content)===null||o===void 0?void 0:o.includes(f6);return(r=i.parentNode)===null||r===void 0||r.removeChild(i),Fg(qu),a}return!1}let c0;function GB(){return c0===void 0&&(c0=UB(`@layer ${qu} { .${qu} { content: "${f6}"!important; } }`,e=>{e.className=qu})),c0}const N2={},XB="css",Sl=new Map;function YB(e){Sl.set(e,(Sl.get(e)||0)+1)}function qB(e,t){typeof document<"u"&&document.querySelectorAll(`style[${t6}="${e}"]`).forEach(o=>{var r;o[Ws]===t&&((r=o.parentNode)===null||r===void 0||r.removeChild(o))})}const JB=0;function ZB(e,t){Sl.set(e,(Sl.get(e)||0)-1);const n=Array.from(Sl.keys()),o=n.filter(r=>(Sl.get(r)||0)<=0);n.length-o.length>JB&&o.forEach(r=>{qB(r,t),Sl.delete(r)})}const QB=(e,t,n,o)=>{const r=n.getDerivativeToken(e);let i=y(y({},r),t);return o&&(i=o(i)),i};function eH(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ae({});const o=mv(),r=E(()=>y({},...t.value)),i=E(()=>Bg(r.value)),a=E(()=>Bg(n.value.override||N2));return r6("token",E(()=>[n.value.salt||"",e.value.id,i.value,a.value]),()=>{const{salt:s="",override:u=N2,formatToken:c,getComputedToken:d}=n.value,f=d?d(r.value,u,e.value):QB(r.value,u,e.value,c),p=KB(f,s);f._tokenKey=p,YB(p);const v=`${XB}-${LS(p)}`;return f._hashId=v,[f,v]},s=>{var u;ZB(s[0]._tokenKey,(u=o.value)===null||u===void 0?void 0:u.cache.instanceId)})}var tH={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},p6="comm",g6="rule",h6="decl",nH="@import",oH="@namespace",rH="@keyframes",iH="@layer",v6=Math.abs,BS=String.fromCharCode;function m6(e){return e.trim()}function Fp(e,t,n){return e.replace(t,n)}function aH(e,t,n){return e.indexOf(t,n)}function Qs(e,t){return e.charCodeAt(t)|0}function yc(e,t,n){return e.slice(t,n)}function ii(e){return e.length}function lH(e){return e.length}function Kf(e,t){return t.push(e),e}var yv=1,Sc=1,b6=0,yr=0,xn=0,Uc="";function HS(e,t,n,o,r,i,a,l){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:yv,column:Sc,length:a,return:"",siblings:l}}function sH(){return xn}function cH(){return xn=yr>0?Qs(Uc,--yr):0,Sc--,xn===10&&(Sc=1,yv--),xn}function Br(){return xn=yr2||Ad(xn)>3?"":" "}function pH(e,t){for(;--t&&Br()&&!(xn<48||xn>102||xn>57&&xn<65||xn>70&&xn<97););return Sv(e,Bp()+(t<6&&Ta()==32&&Br()==32))}function vy(e){for(;Br();)switch(xn){case e:return yr;case 34:case 39:e!==34&&e!==39&&vy(xn);break;case 40:e===41&&vy(e);break;case 92:Br();break}return yr}function gH(e,t){for(;Br()&&e+xn!==57;)if(e+xn===84&&Ta()===47)break;return"/*"+Sv(t,yr-1)+"*"+BS(e===47?e:Br())}function hH(e){for(;!Ad(Ta());)Br();return Sv(e,yr)}function vH(e){return dH(Hp("",null,null,null,[""],e=uH(e),0,[0],e))}function Hp(e,t,n,o,r,i,a,l,s){for(var u=0,c=0,d=a,f=0,p=0,v=0,h=1,m=1,b=1,S=0,C="",$=r,x=i,P=o,w=C;m;)switch(v=S,S=Br()){case 40:if(v!=108&&Qs(w,d-1)==58){aH(w+=Fp(u0(S),"&","&\f"),"&\f",v6(u?l[u-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:w+=u0(S);break;case 9:case 10:case 13:case 32:w+=fH(v);break;case 92:w+=pH(Bp()-1,7);continue;case 47:switch(Ta()){case 42:case 47:Kf(mH(gH(Br(),Bp()),t,n,s),s),(Ad(v||1)==5||Ad(Ta()||1)==5)&&ii(w)&&yc(w,-1,void 0)!==" "&&(w+=" ");break;default:w+="/"}break;case 123*h:l[u++]=ii(w)*b;case 125*h:case 59:case 0:switch(S){case 0:case 125:m=0;case 59+c:b==-1&&(w=Fp(w,/\f/g,"")),p>0&&(ii(w)-d||h===0&&v===47)&&Kf(p>32?L2(w+";",o,n,d-1,s):L2(Fp(w," ","")+";",o,n,d-2,s),s);break;case 59:w+=";";default:if(Kf(P=k2(w,t,n,u,c,r,l,C,$=[],x=[],d,i),i),S===123)if(c===0)Hp(w,t,P,P,$,i,d,l,x);else{switch(f){case 99:if(Qs(w,3)===110)break;case 108:if(Qs(w,2)===97)break;default:c=0;case 100:case 109:case 115:}c?Hp(e,P,P,o&&Kf(k2(e,P,P,0,0,r,l,C,r,$=[],d,x),x),r,x,d,l,o?$:x):Hp(w,P,P,P,[""],x,0,l,x)}}u=c=p=0,h=b=1,C=w="",d=a;break;case 58:d=1+ii(w),p=v;default:if(h<1){if(S==123)--h;else if(S==125&&h++==0&&cH()==125)continue}switch(w+=BS(S),S*h){case 38:b=c>0?1:(w+="\f",-1);break;case 44:l[u++]=(ii(w)-1)*b,b=1;break;case 64:Ta()===45&&(w+=u0(Br())),f=Ta(),c=d=ii(C=w+=hH(Bp())),S++;break;case 45:v===45&&ii(w)==2&&(h=0)}}return i}function k2(e,t,n,o,r,i,a,l,s,u,c,d){for(var f=r-1,p=r===0?i:[""],v=lH(p),h=0,m=0,b=0;h0?p[S]+" "+C:Fp(C,/&\f/g,p[S])))&&(s[b++]=$);return HS(e,t,n,r===0?g6:l,s,u,c,d)}function mH(e,t,n,o){return HS(e,t,n,p6,BS(sH()),yc(e,2,-2),0,o)}function L2(e,t,n,o,r){return HS(e,t,n,h6,yc(e,0,o),yc(e,o+1,-1),o,r)}function my(e,t){for(var n="",o=0;o{const[i,a]=r.split(":");Ml[i]=a});const o=document.querySelector(`style[${F2}]`);o&&(y6=!1,(e=o.parentNode)===null||e===void 0||e.removeChild(o)),document.body.removeChild(t)}}function CH(e){return SH(),!!Ml[e]}function xH(e){const t=Ml[e];let n=null;if(t&&so())if(y6)n=yH;else{const o=document.querySelector(`style[${_l}="${Ml[e]}"]`);o?n=o.innerHTML:delete Ml[e]}return[n,t]}const B2=so(),$H="_skip_check_",S6="_multi_value_";function H2(e){return my(vH(e),bH).replace(/\{%%%\:[^;];}/g,";")}function wH(e){return typeof e=="object"&&e&&($H in e||S6 in e)}function PH(e,t,n){if(!t)return e;const o=`.${t}`,r=n==="low"?`:where(${o})`:o;return e.split(",").map(a=>{var l;const s=a.trim().split(/\s+/);let u=s[0]||"";const c=((l=u.match(/^\w+/))===null||l===void 0?void 0:l[0])||"";return u=`${c}${r}${u.slice(c.length)}`,[u,...s.slice(1)].join(" ")}).join(",")}const z2=new Set,by=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{root:n,injectHash:o,parentSelectors:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]};const{hashId:i,layer:a,path:l,hashPriority:s,transformers:u=[],linters:c=[]}=t;let d="",f={};function p(m){const b=m.getName(i);if(!f[b]){const[S]=by(m.style,t,{root:!1,parentSelectors:r});f[b]=`@keyframes ${m.getName(i)}${S}`}}function v(m){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return m.forEach(S=>{Array.isArray(S)?v(S,b):S&&b.push(S)}),b}if(v(Array.isArray(e)?e:[e]).forEach(m=>{const b=typeof m=="string"&&!n?{}:m;if(typeof b=="string")d+=`${b} -`;else if(b._keyframe)p(b);else{const S=u.reduce((C,$)=>{var x;return((x=$==null?void 0:$.visit)===null||x===void 0?void 0:x.call($,C))||C},b);Object.keys(S).forEach(C=>{var $;const x=S[C];if(typeof x=="object"&&x&&(C!=="animationName"||!x._keyframe)&&!wH(x)){let P=!1,w=C.trim(),O=!1;(n||o)&&i?w.startsWith("@")?P=!0:w=PH(C,i,s):n&&!i&&(w==="&"||w==="")&&(w="",O=!0);const[I,_]=by(x,t,{root:O,injectHash:P,parentSelectors:[...r,w]});f=y(y({},f),_),d+=`${w}${I}`}else{let P=function(O,I){const _=O.replace(/[A-Z]/g,A=>`-${A.toLowerCase()}`);let T=I;!tH[O]&&typeof T=="number"&&T!==0&&(T=`${T}px`),O==="animationName"&&(I!=null&&I._keyframe)&&(p(I),T=I.getName(i)),d+=`${_}:${T};`};const w=($=x==null?void 0:x.value)!==null&&$!==void 0?$:x;typeof x=="object"&&(x!=null&&x[S6])&&Array.isArray(w)?w.forEach(O=>{P(C,O)}):P(C,w)}})}}),!n)d=`{${d}}`;else if(a&&GB()){const m=a.split(",");d=`@layer ${m[m.length-1].trim()} {${d}}`,m.length>1&&(d=`@layer ${a}{%%%:%}${d}`)}return[d,f]};function OH(e,t){return LS(`${e.join("%")}${t}`)}function yy(e,t){const n=mv(),o=E(()=>e.value.token._tokenKey),r=E(()=>[o.value,...e.value.path]);let i=B2;return r6("style",r,()=>{const{path:a,hashId:l,layer:s,nonce:u,clientOnly:c,order:d=0}=e.value,f=r.value.join("|");if(CH(f)){const[w,O]=xH(f);if(w)return[w,o.value,O,{},c,d]}const p=t(),{hashPriority:v,container:h,transformers:m,linters:b,cache:S}=n.value,[C,$]=by(p,{hashId:l,hashPriority:v,layer:s,path:a.join("-"),transformers:m,linters:b}),x=H2(C),P=OH(r.value,x);if(i){const w={mark:_l,prepend:"queue",attachTo:h,priority:d},O=typeof u=="function"?u():u;O&&(w.csp={nonce:O});const I=Md(x,P,w);I[Ws]=S.instanceId,I.setAttribute(t6,o.value),Object.keys($).forEach(_=>{z2.has(_)||(z2.add(_),Md(H2($[_]),`_effect-${_}`,{mark:_l,prepend:"queue",attachTo:h}))})}return[x,o.value,P,$,c,d]},(a,l)=>{let[,,s]=a;(l||n.value.autoClear)&&B2&&Fg(s,{mark:_l})}),a=>a}class at{constructor(t,n){this._keyframe=!0,this.name=t,this.style=n}getName(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t?`${t}-${this.name}`:this.name}}const IH={StyleProvider:kB},C6="4.2.6",Rd=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Yn(e,t){TH(e)&&(e="100%");var n=EH(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Uf(e){return Math.min(1,Math.max(0,e))}function TH(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function EH(e){return typeof e=="string"&&e.indexOf("%")!==-1}function x6(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Gf(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Pl(e){return e.length===1?"0"+e:String(e)}function _H(e,t,n){return{r:Yn(e,255)*255,g:Yn(t,255)*255,b:Yn(n,255)*255}}function j2(e,t,n){e=Yn(e,255),t=Yn(t,255),n=Yn(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i=0,a=0,l=(o+r)/2;if(o===r)a=0,i=0;else{var s=o-r;switch(a=l>.5?s/(2-o-r):s/(o+r),o){case e:i=(t-n)/s+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function MH(e,t,n){var o,r,i;if(e=Yn(e,360),t=Yn(t,100),n=Yn(n,100),t===0)r=n,i=n,o=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=d0(l,a,e+1/3),r=d0(l,a,e),i=d0(l,a,e-1/3)}return{r:o*255,g:r*255,b:i*255}}function Sy(e,t,n){e=Yn(e,255),t=Yn(t,255),n=Yn(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i=0,a=o,l=o-r,s=o===0?0:l/o;if(o===r)i=0;else{switch(o){case e:i=(t-n)/l+(t>16,g:(e&65280)>>8,b:e&255}}var xy={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ks(e){var t={r:0,g:0,b:0},n=1,o=null,r=null,i=null,a=!1,l=!1;return typeof e=="string"&&(e=FH(e)),typeof e=="object"&&(xi(e.r)&&xi(e.g)&&xi(e.b)?(t=_H(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):xi(e.h)&&xi(e.s)&&xi(e.v)?(o=Gf(e.s),r=Gf(e.v),t=AH(e.h,o,r),a=!0,l="hsv"):xi(e.h)&&xi(e.s)&&xi(e.l)&&(o=Gf(e.s),i=Gf(e.l),t=MH(e.h,o,i),a=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=x6(n),{ok:a,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var kH="[-\\+]?\\d+%?",LH="[-\\+]?\\d*\\.\\d+%?",Ea="(?:".concat(LH,")|(?:").concat(kH,")"),f0="[\\s|\\(]+(".concat(Ea,")[,|\\s]+(").concat(Ea,")[,|\\s]+(").concat(Ea,")\\s*\\)?"),p0="[\\s|\\(]+(".concat(Ea,")[,|\\s]+(").concat(Ea,")[,|\\s]+(").concat(Ea,")[,|\\s]+(").concat(Ea,")\\s*\\)?"),Mr={CSS_UNIT:new RegExp(Ea),rgb:new RegExp("rgb"+f0),rgba:new RegExp("rgba"+p0),hsl:new RegExp("hsl"+f0),hsla:new RegExp("hsla"+p0),hsv:new RegExp("hsv"+f0),hsva:new RegExp("hsva"+p0),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function FH(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(xy[e])e=xy[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Mr.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Mr.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Mr.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Mr.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Mr.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Mr.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Mr.hex8.exec(e),n?{r:jo(n[1]),g:jo(n[2]),b:jo(n[3]),a:W2(n[4]),format:t?"name":"hex8"}:(n=Mr.hex6.exec(e),n?{r:jo(n[1]),g:jo(n[2]),b:jo(n[3]),format:t?"name":"hex"}:(n=Mr.hex4.exec(e),n?{r:jo(n[1]+n[1]),g:jo(n[2]+n[2]),b:jo(n[3]+n[3]),a:W2(n[4]+n[4]),format:t?"name":"hex8"}:(n=Mr.hex3.exec(e),n?{r:jo(n[1]+n[1]),g:jo(n[2]+n[2]),b:jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function xi(e){return!!Mr.CSS_UNIT.exec(String(e))}var St=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var o;if(t instanceof e)return t;typeof t=="number"&&(t=NH(t)),this.originalInput=t;var r=ks(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(o=n.format)!==null&&o!==void 0?o:r.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,o,r,i=t.r/255,a=t.g/255,l=t.b/255;return i<=.03928?n=i/12.92:n=Math.pow((i+.055)/1.055,2.4),a<=.03928?o=a/12.92:o=Math.pow((a+.055)/1.055,2.4),l<=.03928?r=l/12.92:r=Math.pow((l+.055)/1.055,2.4),.2126*n+.7152*o+.0722*r},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=x6(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Sy(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Sy(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(o,"%, ").concat(r,"%)"):"hsva(".concat(n,", ").concat(o,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=j2(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=j2(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(o,"%, ").concat(r,"%)"):"hsla(".concat(n,", ").concat(o,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Cy(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),RH(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),o=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(o,")"):"rgba(".concat(t,", ").concat(n,", ").concat(o,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Yn(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Yn(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+Cy(this.r,this.g,this.b,!1),n=0,o=Object.entries(xy);n=0,i=!n&&r&&(t.startsWith("hex")||t==="name");return i?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(o=this.toRgbString()),t==="prgb"&&(o=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(o=this.toHexString()),t==="hex3"&&(o=this.toHexString(!0)),t==="hex4"&&(o=this.toHex8String(!0)),t==="hex8"&&(o=this.toHex8String()),t==="name"&&(o=this.toName()),t==="hsl"&&(o=this.toHslString()),t==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Uf(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Uf(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Uf(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Uf(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var o=this.toRgb(),r=new e(t).toRgb(),i=n/100,a={r:(r.r-o.r)*i+o.r,g:(r.g-o.g)*i+o.g,b:(r.b-o.b)*i+o.b,a:(r.a-o.a)*i+o.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var o=this.toHsl(),r=360/n,i=[this];for(o.h=(o.h-(r*t>>1)+720)%360;--t;)o.h=(o.h+r)%360,i.push(new e(o));return i},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),o=n.h,r=n.s,i=n.v,a=[],l=1/t;t--;)a.push(new e({h:o,s:r,v:i})),i=(i+l)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),o=new e(t).toRgb(),r=n.a+o.a*(1-n.a);return new e({r:(n.r*n.a+o.r*o.a*(1-n.a))/r,g:(n.g*n.a+o.g*o.a*(1-n.a))/r,b:(n.b*n.a+o.b*o.a*(1-n.a))/r,a:r})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),o=n.h,r=[this],i=360/t,a=1;a=60&&Math.round(e.h)<=240?o=n?Math.round(e.h)-Xf*t:Math.round(e.h)+Xf*t:o=n?Math.round(e.h)+Xf*t:Math.round(e.h)-Xf*t,o<0?o+=360:o>=360&&(o-=360),o}function G2(e,t,n){if(e.h===0&&e.s===0)return e.s;var o;return n?o=e.s-V2*t:t===w6?o=e.s+V2:o=e.s+BH*t,o>1&&(o=1),n&&t===$6&&o>.1&&(o=.1),o<.06&&(o=.06),Number(o.toFixed(2))}function X2(e,t,n){var o;return n?o=e.v+HH*t:o=e.v-zH*t,o>1&&(o=1),Number(o.toFixed(2))}function jl(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],o=ks(e),r=$6;r>0;r-=1){var i=K2(o),a=Yf(ks({h:U2(i,r,!0),s:G2(i,r,!0),v:X2(i,r,!0)}));n.push(a)}n.push(Yf(o));for(var l=1;l<=w6;l+=1){var s=K2(o),u=Yf(ks({h:U2(s,l),s:G2(s,l),v:X2(s,l)}));n.push(u)}return t.theme==="dark"?jH.map(function(c){var d=c.index,f=c.opacity,p=Yf(WH(ks(t.backgroundColor||"#141414"),ks(n[d]),f*100));return p}):n}var ec={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Ju={},g0={};Object.keys(ec).forEach(function(e){Ju[e]=jl(ec[e]),Ju[e].primary=Ju[e][5],g0[e]=jl(ec[e],{theme:"dark",backgroundColor:"#141414"}),g0[e].primary=g0[e][5]});var VH=Ju.gold,KH=Ju.blue;const UH=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function GH(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const P6={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Cv=y(y({},P6),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, + */let AM;const fv=e=>AM=e,RM=Symbol();function cy(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Xu;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Xu||(Xu={}));function k9(){const e=fS(!0),t=e.run(()=>ae({}));let n=[],o=[];const r=CS({install(i){fv(r),r._a=i,i.provide(RM,r),i.config.globalProperties.$pinia=r,o.forEach(a=>n.push(a)),o=[]},use(i){return this._a?n.push(i):o.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const DM=()=>{};function y2(e,t,n,o=DM){e.push(t);const r=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),o())};return!n&&Qh()&&pS(r),r}function Cs(e,...t){e.slice().forEach(n=>{n(...t)})}const L9=e=>e(),S2=Symbol(),l0=Symbol();function uy(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,o)=>e.set(o,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],r=e[n];cy(r)&&cy(o)&&e.hasOwnProperty(n)&&!Ut(o)&&!Wi(o)?e[n]=uy(r,o):e[n]=o}return e}const F9=Symbol();function B9(e){return!cy(e)||!e.hasOwnProperty(F9)}const{assign:ma}=Object;function H9(e){return!!(Ut(e)&&e.effect)}function z9(e,t,n,o){const{state:r,actions:i,getters:a}=t,l=n.state.value[e];let s;function u(){l||(n.state.value[e]=r?r():{});const c=Fr(n.state.value[e]);return ma(c,i,Object.keys(a||{}).reduce((d,f)=>(d[f]=CS(E(()=>{fv(n);const p=n._s.get(e);return a[f].call(p,p)})),d),{}))}return s=NM(e,u,t,n,o,!0),s}function NM(e,t,n={},o,r,i){let a;const l=ma({actions:{}},n),s={deep:!0};let u,c,d=[],f=[],p;const v=o.state.value[e];!i&&!v&&(o.state.value[e]={}),ae({});let h;function m(O){let I;u=c=!1,typeof O=="function"?(O(o.state.value[e]),I={type:Xu.patchFunction,storeId:e,events:p}):(uy(o.state.value[e],O),I={type:Xu.patchObject,payload:O,storeId:e,events:p});const _=h=Symbol();ot().then(()=>{h===_&&(u=!0)}),c=!0,Cs(d,I,o.state.value[e])}const b=i?function(){const{state:I}=n,_=I?I():{};this.$patch(T=>{ma(T,_)})}:DM;function S(){a.stop(),d=[],f=[],o._s.delete(e)}const C=(O,I="")=>{if(S2 in O)return O[l0]=I,O;const _=function(){fv(o);const T=Array.from(arguments),A=[],R=[];function H(N){A.push(N)}function M(N){R.push(N)}Cs(f,{args:T,name:_[l0],store:x,after:H,onError:M});let D;try{D=O.apply(this&&this.$id===e?this:x,T)}catch(N){throw Cs(R,N),N}return D instanceof Promise?D.then(N=>(Cs(A,N),N)).catch(N=>(Cs(R,N),Promise.reject(N))):(Cs(A,D),D)};return _[S2]=!0,_[l0]=I,_},$={_p:o,$id:e,$onAction:y2.bind(null,f),$patch:m,$reset:b,$subscribe(O,I={}){const _=y2(d,O,I.detached,()=>T()),T=a.run(()=>be(()=>o.state.value[e],A=>{(I.flush==="sync"?c:u)&&O({storeId:e,type:Xu.direct,events:p},A)},ma({},s,I)));return _},$dispose:S},x=rt($);o._s.set(e,x);const w=(o._a&&o._a.runWithContext||L9)(()=>o._e.run(()=>(a=fS()).run(()=>t({action:C}))));for(const O in w){const I=w[O];if(Ut(I)&&!H9(I)||Wi(I))i||(v&&B9(I)&&(Ut(I)?I.value=v[O]:uy(I,v[O])),o.state.value[e][O]=I);else if(typeof I=="function"){const _=C(I,O);w[O]=_,l.actions[O]=I}}return ma(x,w),ma(nt(x),w),Object.defineProperty(x,"$state",{get:()=>o.state.value[e],set:O=>{m(I=>{ma(I,O)})}}),o._p.forEach(O=>{ma(x,a.run(()=>O({store:x,app:o._a,pinia:o,options:l})))}),v&&i&&n.hydrate&&n.hydrate(x.$state,v),u=!0,c=!0,x}/*! #__NO_SIDE_EFFECTS__ */function oOe(e,t,n){let o,r;const i=typeof t=="function";typeof e=="string"?(o=e,r=i?n:t):(r=e,o=e.id);function a(l,s){const u=wF();return l=l||(u?ze(RM,null):null),l&&fv(l),l=AM,l._s.has(o)||(i?NM(o,t,r,l):z9(o,r,l)),l._s.get(o)}return a.$id=o,a}function rOe(e){{const t=nt(e),n={};for(const o in t){const r=t[o];r.effect?n[o]=E({get:()=>e[o],set(i){e[o]=i}}):(Ut(r)||Wi(r))&&(n[o]=We(e,o))}return n}}function Td(e){"@babel/helpers - typeof";return Td=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Td(e)}function j9(e,t){if(Td(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t);if(Td(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function W9(e){var t=j9(e,"string");return Td(t)=="symbol"?t:t+""}function V9(e,t,n){return(t=W9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function k(e){for(var t=1;ttypeof e=="function",K9=Array.isArray,U9=e=>typeof e=="string",G9=e=>e!==null&&typeof e=="object",X9=/^on[^a-z]/,Y9=e=>X9.test(e),MS=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},q9=/-(\w)/g,Kc=MS(e=>e.replace(q9,(t,n)=>n?n.toUpperCase():"")),J9=/\B([A-Z])/g,Z9=MS(e=>e.replace(J9,"-$1").toLowerCase()),Q9=MS(e=>e.charAt(0).toUpperCase()+e.slice(1)),eB=Object.prototype.hasOwnProperty,x2=(e,t)=>eB.call(e,t);function tB(e,t,n,o){const r=e[n];if(r!=null){const i=x2(r,"default");if(i&&o===void 0){const a=r.default;o=r.type!==Function&&dy(a)?a():a}r.type===Boolean&&(!x2(t,n)&&!i?o=!1:o===""&&(o=!0))}return o}function nB(e){return Object.keys(e).reduce((t,n)=>((n.startsWith("data-")||n.startsWith("aria-"))&&(t[n]=e[n]),t),{})}function yl(e){return typeof e=="number"?`${e}px`:e}function js(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return typeof e=="function"?e(t):e??n}function oB(e){let t;const n=new Promise(r=>{t=e(()=>{r(!0)})}),o=()=>{t==null||t()};return o.then=(r,i)=>n.then(r,i),o.promise=n,o}function ge(){const e=[];for(let t=0;t0},e.prototype.connect_=function(){!fy||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),cB?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!fy||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,o=n===void 0?"":n,r=sB.some(function(i){return!!~o.indexOf(i)});r&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),LM=function(e,t){for(var n=0,o=Object.keys(t);n"u"||!(Element instanceof Object))){if(!(t instanceof mc(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new bB(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof mc(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(o){return new yB(o.target,o.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),BM=typeof WeakMap<"u"?new WeakMap:new kM,HM=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=uB.getInstance(),o=new SB(t,n,this);BM.set(this,o)}return e}();["observe","unobserve","disconnect"].forEach(function(e){HM.prototype[e]=function(){var t;return(t=BM.get(this))[e].apply(t,arguments)}});var AS=function(){return typeof Ng.ResizeObserver<"u"?Ng.ResizeObserver:HM}();const py=e=>e!=null&&e!=="",Qe=(e,t)=>{const n=y({},e);return Object.keys(t).forEach(o=>{const r=n[o];if(r)r.type||r.default?r.default=t[o]:r.def?r.def(t[o]):n[o]={type:r,default:t[o]};else throw new Error(`not have ${o} prop`)}),n},RS=e=>{const t=Object.keys(e),n={},o={},r={};for(let i=0,a=t.length;i0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n={},o=/;(?![^(]*\))/g,r=/:(.+)/;return typeof e=="object"?e:(e.split(o).forEach(function(i){if(i){const a=i.split(r);if(a.length>1){const l=t?Kc(a[0].trim()):a[0].trim();n[l]=a[1].trim()}}}),n)},ki=(e,t)=>e[t]!==void 0,zM=Symbol("skipFlatten"),Ot=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=Array.isArray(e)?e:[e],o=[];return n.forEach(r=>{Array.isArray(r)?o.push(...Ot(r,t)):r&&r.type===Le?r.key===zM?o.push(r):o.push(...Ot(r.children,t)):r&&ln(r)?t&&!df(r)?o.push(r):t||o.push(r):py(r)&&o.push(r)}),o},gv=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(ln(e))return e.type===Le?t==="default"?Ot(e.children):[]:e.children&&e.children[t]?Ot(e.children[t](n)):[];{const o=e.$slots[t]&&e.$slots[t](n);return Ot(o)}},Co=e=>{var t;let n=((t=e==null?void 0:e.vnode)===null||t===void 0?void 0:t.el)||e&&(e.$el||e);for(;n&&!n.tagName;)n=n.nextSibling;return n},jM=e=>{const t={};if(e.$&&e.$.vnode){const n=e.$.vnode.props||{};Object.keys(e.$props).forEach(o=>{const r=e.$props[o],i=Z9(o);(r!==void 0||i in n)&&(t[o]=r)})}else if(ln(e)&&typeof e.type=="object"){const n=e.props||{},o={};Object.keys(n).forEach(i=>{o[Kc(i)]=n[i]});const r=e.type.props||{};Object.keys(r).forEach(i=>{const a=tB(r,o,i,o[i]);(a!==void 0||i in o)&&(t[i]=a)})}return t},WM=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,r;if(e.$){const i=e[t];if(i!==void 0)return typeof i=="function"&&o?i(n):i;r=e.$slots[t],r=o&&r?r(n):r}else if(ln(e)){const i=e.props&&e.props[t];if(i!==void 0&&e.props!==null)return typeof i=="function"&&o?i(n):i;e.type===Le?r=e.children:e.children&&e.children[t]&&(r=e.children[t],r=o&&r?r(n):r)}return Array.isArray(r)&&(r=Ot(r),r=r.length===1?r[0]:r,r=r.length===0?void 0:r),r};function w2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n={};return e.$?n=y(y({},n),e.$attrs):n=y(y({},n),e.props),RS(n)[t?"onEvents":"events"]}function xB(e){const n=((ln(e)?e.props:e.$attrs)||{}).class||{};let o={};return typeof n=="string"?n.split(" ").forEach(r=>{o[r.trim()]=!0}):Array.isArray(n)?ge(n).split(" ").forEach(r=>{o[r.trim()]=!0}):o=y(y({},o),n),o}function VM(e,t){let o=((ln(e)?e.props:e.$attrs)||{}).style||{};return typeof o=="string"&&(o=CB(o,t)),o}function $B(e){return e.length===1&&e[0].type===Le}function wB(e){return e==null||e===""||Array.isArray(e)&&e.length===0}function df(e){return e&&(e.type===Bn||e.type===Le&&e.children.length===0||e.type===ta&&e.children.trim()==="")}function PB(e){return e&&e.type===ta}function zt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const t=[];return e.forEach(n=>{Array.isArray(n)?t.push(...n):(n==null?void 0:n.type)===Le?t.push(...zt(n.children)):t.push(n)}),t.filter(n=>!df(n))}function bu(e){if(e){const t=zt(e);return t.length?t:void 0}else return e}function sn(e){return Array.isArray(e)&&e.length===1&&(e=e[0]),e&&e.__v_isVNode&&typeof e.type!="symbol"}function mn(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"default";var o,r;return(o=t[n])!==null&&o!==void 0?o:(r=e[n])===null||r===void 0?void 0:r.call(e)}const br=le({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup(e,t){let{slots:n}=t;const o=rt({width:0,height:0,offsetHeight:0,offsetWidth:0});let r=null,i=null;const a=()=>{i&&(i.disconnect(),i=null)},l=c=>{const{onResize:d}=e,f=c[0].target,{width:p,height:v}=f.getBoundingClientRect(),{offsetWidth:h,offsetHeight:m}=f,b=Math.floor(p),S=Math.floor(v);if(o.width!==b||o.height!==S||o.offsetWidth!==h||o.offsetHeight!==m){const C={width:b,height:S,offsetWidth:h,offsetHeight:m};y(o,C),d&&Promise.resolve().then(()=>{d(y(y({},C),{offsetWidth:h,offsetHeight:m}),f)})}},s=Jt(),u=()=>{const{disabled:c}=e;if(c){a();return}const d=Co(s);d!==r&&(a(),r=d),!i&&d&&(i=new AS(l),i.observe(d))};return Ke(()=>{u()}),uo(()=>{u()}),Zn(()=>{a()}),be(()=>e.disabled,()=>{u()},{flush:"post"}),()=>{var c;return(c=n.default)===null||c===void 0?void 0:c.call(n)[0]}}});let KM=e=>setTimeout(e,16),UM=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(KM=e=>window.requestAnimationFrame(e),UM=e=>window.cancelAnimationFrame(e));let P2=0;const DS=new Map;function GM(e){DS.delete(e)}function Ze(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;P2+=1;const n=P2;function o(r){if(r===0)GM(n),e();else{const i=KM(()=>{o(r-1)});DS.set(n,i)}}return o(t),n}Ze.cancel=e=>{const t=DS.get(e);return GM(t),UM(t)};function gy(e){let t;const n=r=>()=>{t=null,e(...r)},o=function(){if(t==null){for(var r=arguments.length,i=new Array(r),a=0;a{Ze.cancel(t),t=null},o}const Jn=function(){for(var e=arguments.length,t=new Array(e),n=0;n{const t=e;return t.install=function(n){n.component(t.displayName||t.name,e)},e};function zl(){return{type:[Function,Array]}}function De(e){return{type:Object,default:e}}function $e(e){return{type:Boolean,default:e}}function ye(e){return{type:Function,default:e}}function It(e,t){return{validator:()=>!0,default:e}}function ro(){return{validator:()=>!0}}function pt(e){return{type:Array,default:e}}function Ne(e){return{type:String,default:e}}function He(e,t){return e?{type:e,default:t}:It(t)}let hn=!1;try{const e=Object.defineProperty({},"passive",{get(){hn=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch{}function Ht(e,t,n,o){if(e&&e.addEventListener){let r=o;r===void 0&&hn&&(t==="touchstart"||t==="touchmove"||t==="wheel")&&(r={passive:!1}),e.addEventListener(t,n,r)}return{remove:()=>{e&&e.removeEventListener&&e.removeEventListener(t,n)}}}function Vf(e){return e!==window?e.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function O2(e,t,n){if(n!==void 0&&t.top>e.top-n)return`${n+t.top}px`}function I2(e,t,n){if(n!==void 0&&t.bottomo.target===e);n?n.affixList.push(t):(n={target:e,affixList:[t],eventHandlers:{}},Yu.push(n),XM.forEach(o=>{n.eventHandlers[o]=Ht(e,o,()=>{n.affixList.forEach(r=>{const{lazyUpdatePosition:i}=r.exposed;i()},(o==="touchstart"||o==="touchmove")&&hn?{passive:!0}:!1)})}))}function E2(e){const t=Yu.find(n=>{const o=n.affixList.some(r=>r===e);return o&&(n.affixList=n.affixList.filter(r=>r!==e)),o});t&&t.affixList.length===0&&(Yu=Yu.filter(n=>n!==t),XM.forEach(n=>{const o=t.eventHandlers[n];o&&o.remove&&o.remove()}))}const NS="anticon",YM=Symbol("GlobalFormContextKey"),IB=e=>{Xe(YM,e)},TB=()=>ze(YM,{validateMessages:E(()=>{})}),EB=()=>({iconPrefixCls:String,getTargetContainer:{type:Function},getPopupContainer:{type:Function},prefixCls:String,getPrefixCls:{type:Function},renderEmpty:{type:Function},transformCellText:{type:Function},csp:De(),input:De(),autoInsertSpaceInButton:{type:Boolean,default:void 0},locale:De(),pageHeader:De(),componentSize:{type:String},componentDisabled:{type:Boolean,default:void 0},direction:{type:String,default:"ltr"},space:De(),virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},form:De(),pagination:De(),theme:De(),select:De(),wave:De()}),kS=Symbol("configProvider"),qM={getPrefixCls:(e,t)=>t||(e?`ant-${e}`:"ant"),iconPrefixCls:E(()=>NS),getPopupContainer:E(()=>()=>document.body),direction:E(()=>"ltr")},hv=()=>ze(kS,qM),_B=e=>Xe(kS,e),JM=Symbol("DisabledContextKey"),ko=()=>ze(JM,ae(void 0)),ZM=e=>{const t=ko();return Xe(JM,E(()=>{var n;return(n=e.value)!==null&&n!==void 0?n:t.value})),e},QM={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages"},MB={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},e6={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},Ed={lang:y({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},MB),timePickerLocale:y({},e6)},Bo="${label} is not a valid ${type}",$o={locale:"en",Pagination:QM,DatePicker:Ed,TimePicker:e6,Calendar:Ed,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:Bo,method:Bo,array:Bo,object:Bo,number:Bo,date:Bo,boolean:Bo,integer:Bo,float:Bo,regexp:Bo,email:Bo,url:Bo,hex:Bo},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"}},ts=le({compatConfig:{MODE:3},name:"LocaleReceiver",props:{componentName:String,defaultLocale:{type:[Object,Function]},children:{type:Function}},setup(e,t){let{slots:n}=t;const o=ze("localeData",{}),r=E(()=>{const{componentName:a="global",defaultLocale:l}=e,s=l||$o[a||"global"],{antLocale:u}=o,c=a&&u?u[a]:{};return y(y({},typeof s=="function"?s():s),c||{})}),i=E(()=>{const{antLocale:a}=o,l=a&&a.locale;return a&&a.exist&&!l?$o.locale:l});return()=>{const a=e.children||n.default,{antLocale:l}=o;return a==null?void 0:a(r.value,i.value,l)}}});function wr(e,t,n){const o=ze("localeData",{});return[E(()=>{const{antLocale:i}=o,a=Bt(t)||$o[e||"global"],l=e&&i?i[e]:{};return y(y(y({},typeof a=="function"?a():a),l||{}),Bt(n)||{})})]}function LS(e){for(var t=0,n,o=0,r=e.length;r>=4;++o,r-=4)n=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}const _2="%";class AB{constructor(t){this.cache=new Map,this.instanceId=t}get(t){return this.cache.get(Array.isArray(t)?t.join(_2):t)||null}update(t,n){const o=Array.isArray(t)?t.join(_2):t,r=this.cache.get(o),i=n(r);i===null?this.cache.delete(o):this.cache.set(o,i)}}const t6="data-token-hash",_l="data-css-hash",Ws="__cssinjs_instance__";function _d(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${_l}]`)||[],{firstChild:n}=document.head;Array.from(t).forEach(r=>{r[Ws]=r[Ws]||e,r[Ws]===e&&document.head.insertBefore(r,n)});const o={};Array.from(document.querySelectorAll(`style[${_l}]`)).forEach(r=>{var i;const a=r.getAttribute(_l);o[a]?r[Ws]===e&&((i=r.parentNode)===null||i===void 0||i.removeChild(r)):o[a]=!0})}return new AB(e)}const n6=Symbol("StyleContextKey"),RB=()=>{var e,t,n;const o=Jt();let r;if(o&&o.appContext){const i=(n=(t=(e=o.appContext)===null||e===void 0?void 0:e.config)===null||t===void 0?void 0:t.globalProperties)===null||n===void 0?void 0:n.__ANTDV_CSSINJS_CACHE__;i?r=i:(r=_d(),o.appContext.config.globalProperties&&(o.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=r))}else r=_d();return r},o6={cache:_d(),defaultCache:!0,hashPriority:"low"},vv=()=>{const e=RB();return ze(n6,se(y(y({},o6),{cache:e})))},DB=e=>{const t=vv(),n=se(y(y({},o6),{cache:_d()}));return be([()=>Bt(e),t],()=>{const o=y({},t.value),r=Bt(e);Object.keys(r).forEach(a=>{const l=r[a];r[a]!==void 0&&(o[a]=l)});const{cache:i}=r;o.cache=o.cache||_d(),o.defaultCache=!i&&t.value.defaultCache,n.value=o},{immediate:!0}),Xe(n6,n),n},NB=()=>({autoClear:$e(),mock:Ne(),cache:De(),defaultCache:$e(),hashPriority:Ne(),container:He(),ssrInline:$e(),transformers:pt(),linters:pt()}),kB=Lt(le({name:"AStyleProvider",inheritAttrs:!1,props:NB(),setup(e,t){let{slots:n}=t;return DB(e),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}));function r6(e,t,n,o){const r=vv(),i=se(""),a=se();Ve(()=>{i.value=[e,...t.value].join("%")});const l=s=>{r.value.cache.update(s,u=>{const[c=0,d]=u||[];return c-1===0?(o==null||o(d,!1),null):[c-1,d]})};return be(i,(s,u)=>{u&&l(u),r.value.cache.update(s,c=>{const[d=0,f]=c||[],v=f||n();return[d+1,v]}),a.value=r.value.cache.get(i.value)[1]},{immediate:!0}),tt(()=>{l(i.value)}),a}function so(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Pa(e,t){return e&&e.contains?e.contains(t):!1}const M2="data-vc-order",LB="vc-util-key",hy=new Map;function i6(){let{mark:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e?e.startsWith("data-")?e:`data-${e}`:LB}function mv(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function FB(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function a6(e){return Array.from((hy.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function l6(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!so())return null;const{csp:n,prepend:o}=t,r=document.createElement("style");r.setAttribute(M2,FB(o)),n!=null&&n.nonce&&(r.nonce=n==null?void 0:n.nonce),r.innerHTML=e;const i=mv(t),{firstChild:a}=i;if(o){if(o==="queue"){const l=a6(i).filter(s=>["prepend","prependQueue"].includes(s.getAttribute(M2)));if(l.length)return i.insertBefore(r,l[l.length-1].nextSibling),r}i.insertBefore(r,a)}else i.appendChild(r);return r}function s6(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=mv(t);return a6(n).find(o=>o.getAttribute(i6(t))===e)}function Lg(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=s6(e,t);n&&mv(t).removeChild(n)}function BB(e,t){const n=hy.get(e);if(!n||!Pa(document,n)){const o=l6("",t),{parentNode:r}=o;hy.set(e,r),e.removeChild(o)}}function Md(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var o,r,i;const a=mv(n);BB(a,n);const l=s6(t,n);if(l)return!((o=n.csp)===null||o===void 0)&&o.nonce&&l.nonce!==((r=n.csp)===null||r===void 0?void 0:r.nonce)&&(l.nonce=(i=n.csp)===null||i===void 0?void 0:i.nonce),l.innerHTML!==e&&(l.innerHTML=e),l;const s=l6(e,n);return s.setAttribute(i6(n),t),s}function HB(e,t){if(e.length!==t.length)return!1;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!1,o={map:this.cache};return t.forEach(r=>{var i;o?o=(i=o==null?void 0:o.map)===null||i===void 0?void 0:i.get(r):o=void 0}),o!=null&&o.value&&n&&(o.value[1]=this.cacheCallTimes++),o==null?void 0:o.value}get(t){var n;return(n=this.internalGet(t,!0))===null||n===void 0?void 0:n[0]}has(t){return!!this.internalGet(t)}set(t,n){if(!this.has(t)){if(this.size()+1>bc.MAX_CACHE_SIZE+bc.MAX_CACHE_OFFSET){const[r]=this.keys.reduce((i,a)=>{const[,l]=i;return this.internalGet(a)[1]{if(i===t.length-1)o.set(r,{value:[n,this.cacheCallTimes++]});else{const a=o.get(r);a?a.map||(a.map=new Map):o.set(r,{map:new Map}),o=o.get(r).map}})}deleteByPath(t,n){var o;const r=t.get(n[0]);if(n.length===1)return r.map?t.set(n[0],{map:r.map}):t.delete(n[0]),(o=r.value)===null||o===void 0?void 0:o[0];const i=this.deleteByPath(r.map,n.slice(1));return(!r.map||r.map.size===0)&&!r.value&&t.delete(n[0]),i}delete(t){if(this.has(t))return this.keys=this.keys.filter(n=>!HB(n,t)),this.deleteByPath(this.cache,t)}}bc.MAX_CACHE_SIZE=20;bc.MAX_CACHE_OFFSET=5;let A2={};function zB(e,t){}function jB(e,t){}function c6(e,t,n){!t&&!A2[n]&&(e(!1,n),A2[n]=!0)}function FS(e,t){c6(zB,e,t)}function WB(e,t){c6(jB,e,t)}function VB(){}let Yo=VB,R2=0;class u6{constructor(t){this.derivatives=Array.isArray(t)?t:[t],this.id=R2,t.length===0&&Yo(t.length>0),R2+=1}getDerivativeToken(t){return this.derivatives.reduce((n,o)=>o(t,n),void 0)}}const s0=new bc;function d6(e){const t=Array.isArray(e)?e:[e];return s0.has(t)||s0.set(t,new u6(t)),s0.get(t)}const D2=new WeakMap;function Fg(e){let t=D2.get(e)||"";return t||(Object.keys(e).forEach(n=>{const o=e[n];t+=n,o instanceof u6?t+=o.id:o&&typeof o=="object"?t+=Fg(o):t+=o}),D2.set(e,t)),t}function KB(e,t){return LS(`${t}_${Fg(e)}`)}const qu=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),f6="_bAmBoO_";function UB(e,t,n){var o,r;if(so()){Md(e,qu);const i=document.createElement("div");i.style.position="fixed",i.style.left="0",i.style.top="0",t==null||t(i),document.body.appendChild(i);const a=n?n(i):(o=getComputedStyle(i).content)===null||o===void 0?void 0:o.includes(f6);return(r=i.parentNode)===null||r===void 0||r.removeChild(i),Lg(qu),a}return!1}let c0;function GB(){return c0===void 0&&(c0=UB(`@layer ${qu} { .${qu} { content: "${f6}"!important; } }`,e=>{e.className=qu})),c0}const N2={},XB="css",Sl=new Map;function YB(e){Sl.set(e,(Sl.get(e)||0)+1)}function qB(e,t){typeof document<"u"&&document.querySelectorAll(`style[${t6}="${e}"]`).forEach(o=>{var r;o[Ws]===t&&((r=o.parentNode)===null||r===void 0||r.removeChild(o))})}const JB=0;function ZB(e,t){Sl.set(e,(Sl.get(e)||0)-1);const n=Array.from(Sl.keys()),o=n.filter(r=>(Sl.get(r)||0)<=0);n.length-o.length>JB&&o.forEach(r=>{qB(r,t),Sl.delete(r)})}const QB=(e,t,n,o)=>{const r=n.getDerivativeToken(e);let i=y(y({},r),t);return o&&(i=o(i)),i};function eH(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ae({});const o=vv(),r=E(()=>y({},...t.value)),i=E(()=>Fg(r.value)),a=E(()=>Fg(n.value.override||N2));return r6("token",E(()=>[n.value.salt||"",e.value.id,i.value,a.value]),()=>{const{salt:s="",override:u=N2,formatToken:c,getComputedToken:d}=n.value,f=d?d(r.value,u,e.value):QB(r.value,u,e.value,c),p=KB(f,s);f._tokenKey=p,YB(p);const v=`${XB}-${LS(p)}`;return f._hashId=v,[f,v]},s=>{var u;ZB(s[0]._tokenKey,(u=o.value)===null||u===void 0?void 0:u.cache.instanceId)})}var tH={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},p6="comm",g6="rule",h6="decl",nH="@import",oH="@namespace",rH="@keyframes",iH="@layer",v6=Math.abs,BS=String.fromCharCode;function m6(e){return e.trim()}function Lp(e,t,n){return e.replace(t,n)}function aH(e,t,n){return e.indexOf(t,n)}function Qs(e,t){return e.charCodeAt(t)|0}function yc(e,t,n){return e.slice(t,n)}function ii(e){return e.length}function lH(e){return e.length}function Kf(e,t){return t.push(e),e}var bv=1,Sc=1,b6=0,yr=0,xn=0,Uc="";function HS(e,t,n,o,r,i,a,l){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:bv,column:Sc,length:a,return:"",siblings:l}}function sH(){return xn}function cH(){return xn=yr>0?Qs(Uc,--yr):0,Sc--,xn===10&&(Sc=1,bv--),xn}function Br(){return xn=yr2||Ad(xn)>3?"":" "}function pH(e,t){for(;--t&&Br()&&!(xn<48||xn>102||xn>57&&xn<65||xn>70&&xn<97););return yv(e,Fp()+(t<6&&Ta()==32&&Br()==32))}function vy(e){for(;Br();)switch(xn){case e:return yr;case 34:case 39:e!==34&&e!==39&&vy(xn);break;case 40:e===41&&vy(e);break;case 92:Br();break}return yr}function gH(e,t){for(;Br()&&e+xn!==57;)if(e+xn===84&&Ta()===47)break;return"/*"+yv(t,yr-1)+"*"+BS(e===47?e:Br())}function hH(e){for(;!Ad(Ta());)Br();return yv(e,yr)}function vH(e){return dH(Bp("",null,null,null,[""],e=uH(e),0,[0],e))}function Bp(e,t,n,o,r,i,a,l,s){for(var u=0,c=0,d=a,f=0,p=0,v=0,h=1,m=1,b=1,S=0,C="",$=r,x=i,P=o,w=C;m;)switch(v=S,S=Br()){case 40:if(v!=108&&Qs(w,d-1)==58){aH(w+=Lp(u0(S),"&","&\f"),"&\f",v6(u?l[u-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:w+=u0(S);break;case 9:case 10:case 13:case 32:w+=fH(v);break;case 92:w+=pH(Fp()-1,7);continue;case 47:switch(Ta()){case 42:case 47:Kf(mH(gH(Br(),Fp()),t,n,s),s),(Ad(v||1)==5||Ad(Ta()||1)==5)&&ii(w)&&yc(w,-1,void 0)!==" "&&(w+=" ");break;default:w+="/"}break;case 123*h:l[u++]=ii(w)*b;case 125*h:case 59:case 0:switch(S){case 0:case 125:m=0;case 59+c:b==-1&&(w=Lp(w,/\f/g,"")),p>0&&(ii(w)-d||h===0&&v===47)&&Kf(p>32?L2(w+";",o,n,d-1,s):L2(Lp(w," ","")+";",o,n,d-2,s),s);break;case 59:w+=";";default:if(Kf(P=k2(w,t,n,u,c,r,l,C,$=[],x=[],d,i),i),S===123)if(c===0)Bp(w,t,P,P,$,i,d,l,x);else{switch(f){case 99:if(Qs(w,3)===110)break;case 108:if(Qs(w,2)===97)break;default:c=0;case 100:case 109:case 115:}c?Bp(e,P,P,o&&Kf(k2(e,P,P,0,0,r,l,C,r,$=[],d,x),x),r,x,d,l,o?$:x):Bp(w,P,P,P,[""],x,0,l,x)}}u=c=p=0,h=b=1,C=w="",d=a;break;case 58:d=1+ii(w),p=v;default:if(h<1){if(S==123)--h;else if(S==125&&h++==0&&cH()==125)continue}switch(w+=BS(S),S*h){case 38:b=c>0?1:(w+="\f",-1);break;case 44:l[u++]=(ii(w)-1)*b,b=1;break;case 64:Ta()===45&&(w+=u0(Br())),f=Ta(),c=d=ii(C=w+=hH(Fp())),S++;break;case 45:v===45&&ii(w)==2&&(h=0)}}return i}function k2(e,t,n,o,r,i,a,l,s,u,c,d){for(var f=r-1,p=r===0?i:[""],v=lH(p),h=0,m=0,b=0;h0?p[S]+" "+C:Lp(C,/&\f/g,p[S])))&&(s[b++]=$);return HS(e,t,n,r===0?g6:l,s,u,c,d)}function mH(e,t,n,o){return HS(e,t,n,p6,BS(sH()),yc(e,2,-2),0,o)}function L2(e,t,n,o,r){return HS(e,t,n,h6,yc(e,0,o),yc(e,o+1,-1),o,r)}function my(e,t){for(var n="",o=0;o{const[i,a]=r.split(":");Ml[i]=a});const o=document.querySelector(`style[${F2}]`);o&&(y6=!1,(e=o.parentNode)===null||e===void 0||e.removeChild(o)),document.body.removeChild(t)}}function CH(e){return SH(),!!Ml[e]}function xH(e){const t=Ml[e];let n=null;if(t&&so())if(y6)n=yH;else{const o=document.querySelector(`style[${_l}="${Ml[e]}"]`);o?n=o.innerHTML:delete Ml[e]}return[n,t]}const B2=so(),$H="_skip_check_",S6="_multi_value_";function H2(e){return my(vH(e),bH).replace(/\{%%%\:[^;];}/g,";")}function wH(e){return typeof e=="object"&&e&&($H in e||S6 in e)}function PH(e,t,n){if(!t)return e;const o=`.${t}`,r=n==="low"?`:where(${o})`:o;return e.split(",").map(a=>{var l;const s=a.trim().split(/\s+/);let u=s[0]||"";const c=((l=u.match(/^\w+/))===null||l===void 0?void 0:l[0])||"";return u=`${c}${r}${u.slice(c.length)}`,[u,...s.slice(1)].join(" ")}).join(",")}const z2=new Set,by=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{root:n,injectHash:o,parentSelectors:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]};const{hashId:i,layer:a,path:l,hashPriority:s,transformers:u=[],linters:c=[]}=t;let d="",f={};function p(m){const b=m.getName(i);if(!f[b]){const[S]=by(m.style,t,{root:!1,parentSelectors:r});f[b]=`@keyframes ${m.getName(i)}${S}`}}function v(m){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return m.forEach(S=>{Array.isArray(S)?v(S,b):S&&b.push(S)}),b}if(v(Array.isArray(e)?e:[e]).forEach(m=>{const b=typeof m=="string"&&!n?{}:m;if(typeof b=="string")d+=`${b} +`;else if(b._keyframe)p(b);else{const S=u.reduce((C,$)=>{var x;return((x=$==null?void 0:$.visit)===null||x===void 0?void 0:x.call($,C))||C},b);Object.keys(S).forEach(C=>{var $;const x=S[C];if(typeof x=="object"&&x&&(C!=="animationName"||!x._keyframe)&&!wH(x)){let P=!1,w=C.trim(),O=!1;(n||o)&&i?w.startsWith("@")?P=!0:w=PH(C,i,s):n&&!i&&(w==="&"||w==="")&&(w="",O=!0);const[I,_]=by(x,t,{root:O,injectHash:P,parentSelectors:[...r,w]});f=y(y({},f),_),d+=`${w}${I}`}else{let P=function(O,I){const _=O.replace(/[A-Z]/g,A=>`-${A.toLowerCase()}`);let T=I;!tH[O]&&typeof T=="number"&&T!==0&&(T=`${T}px`),O==="animationName"&&(I!=null&&I._keyframe)&&(p(I),T=I.getName(i)),d+=`${_}:${T};`};const w=($=x==null?void 0:x.value)!==null&&$!==void 0?$:x;typeof x=="object"&&(x!=null&&x[S6])&&Array.isArray(w)?w.forEach(O=>{P(C,O)}):P(C,w)}})}}),!n)d=`{${d}}`;else if(a&&GB()){const m=a.split(",");d=`@layer ${m[m.length-1].trim()} {${d}}`,m.length>1&&(d=`@layer ${a}{%%%:%}${d}`)}return[d,f]};function OH(e,t){return LS(`${e.join("%")}${t}`)}function yy(e,t){const n=vv(),o=E(()=>e.value.token._tokenKey),r=E(()=>[o.value,...e.value.path]);let i=B2;return r6("style",r,()=>{const{path:a,hashId:l,layer:s,nonce:u,clientOnly:c,order:d=0}=e.value,f=r.value.join("|");if(CH(f)){const[w,O]=xH(f);if(w)return[w,o.value,O,{},c,d]}const p=t(),{hashPriority:v,container:h,transformers:m,linters:b,cache:S}=n.value,[C,$]=by(p,{hashId:l,hashPriority:v,layer:s,path:a.join("-"),transformers:m,linters:b}),x=H2(C),P=OH(r.value,x);if(i){const w={mark:_l,prepend:"queue",attachTo:h,priority:d},O=typeof u=="function"?u():u;O&&(w.csp={nonce:O});const I=Md(x,P,w);I[Ws]=S.instanceId,I.setAttribute(t6,o.value),Object.keys($).forEach(_=>{z2.has(_)||(z2.add(_),Md(H2($[_]),`_effect-${_}`,{mark:_l,prepend:"queue",attachTo:h}))})}return[x,o.value,P,$,c,d]},(a,l)=>{let[,,s]=a;(l||n.value.autoClear)&&B2&&Lg(s,{mark:_l})}),a=>a}class at{constructor(t,n){this._keyframe=!0,this.name=t,this.style=n}getName(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t?`${t}-${this.name}`:this.name}}const IH={StyleProvider:kB},C6="4.2.6",Rd=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Yn(e,t){TH(e)&&(e="100%");var n=EH(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Uf(e){return Math.min(1,Math.max(0,e))}function TH(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function EH(e){return typeof e=="string"&&e.indexOf("%")!==-1}function x6(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Gf(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Pl(e){return e.length===1?"0"+e:String(e)}function _H(e,t,n){return{r:Yn(e,255)*255,g:Yn(t,255)*255,b:Yn(n,255)*255}}function j2(e,t,n){e=Yn(e,255),t=Yn(t,255),n=Yn(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i=0,a=0,l=(o+r)/2;if(o===r)a=0,i=0;else{var s=o-r;switch(a=l>.5?s/(2-o-r):s/(o+r),o){case e:i=(t-n)/s+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function MH(e,t,n){var o,r,i;if(e=Yn(e,360),t=Yn(t,100),n=Yn(n,100),t===0)r=n,i=n,o=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=d0(l,a,e+1/3),r=d0(l,a,e),i=d0(l,a,e-1/3)}return{r:o*255,g:r*255,b:i*255}}function Sy(e,t,n){e=Yn(e,255),t=Yn(t,255),n=Yn(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i=0,a=o,l=o-r,s=o===0?0:l/o;if(o===r)i=0;else{switch(o){case e:i=(t-n)/l+(t>16,g:(e&65280)>>8,b:e&255}}var xy={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ks(e){var t={r:0,g:0,b:0},n=1,o=null,r=null,i=null,a=!1,l=!1;return typeof e=="string"&&(e=FH(e)),typeof e=="object"&&(xi(e.r)&&xi(e.g)&&xi(e.b)?(t=_H(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):xi(e.h)&&xi(e.s)&&xi(e.v)?(o=Gf(e.s),r=Gf(e.v),t=AH(e.h,o,r),a=!0,l="hsv"):xi(e.h)&&xi(e.s)&&xi(e.l)&&(o=Gf(e.s),i=Gf(e.l),t=MH(e.h,o,i),a=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=x6(n),{ok:a,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var kH="[-\\+]?\\d+%?",LH="[-\\+]?\\d*\\.\\d+%?",Ea="(?:".concat(LH,")|(?:").concat(kH,")"),f0="[\\s|\\(]+(".concat(Ea,")[,|\\s]+(").concat(Ea,")[,|\\s]+(").concat(Ea,")\\s*\\)?"),p0="[\\s|\\(]+(".concat(Ea,")[,|\\s]+(").concat(Ea,")[,|\\s]+(").concat(Ea,")[,|\\s]+(").concat(Ea,")\\s*\\)?"),Mr={CSS_UNIT:new RegExp(Ea),rgb:new RegExp("rgb"+f0),rgba:new RegExp("rgba"+p0),hsl:new RegExp("hsl"+f0),hsla:new RegExp("hsla"+p0),hsv:new RegExp("hsv"+f0),hsva:new RegExp("hsva"+p0),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function FH(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(xy[e])e=xy[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Mr.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Mr.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Mr.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Mr.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Mr.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Mr.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Mr.hex8.exec(e),n?{r:jo(n[1]),g:jo(n[2]),b:jo(n[3]),a:W2(n[4]),format:t?"name":"hex8"}:(n=Mr.hex6.exec(e),n?{r:jo(n[1]),g:jo(n[2]),b:jo(n[3]),format:t?"name":"hex"}:(n=Mr.hex4.exec(e),n?{r:jo(n[1]+n[1]),g:jo(n[2]+n[2]),b:jo(n[3]+n[3]),a:W2(n[4]+n[4]),format:t?"name":"hex8"}:(n=Mr.hex3.exec(e),n?{r:jo(n[1]+n[1]),g:jo(n[2]+n[2]),b:jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function xi(e){return!!Mr.CSS_UNIT.exec(String(e))}var St=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var o;if(t instanceof e)return t;typeof t=="number"&&(t=NH(t)),this.originalInput=t;var r=ks(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(o=n.format)!==null&&o!==void 0?o:r.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,o,r,i=t.r/255,a=t.g/255,l=t.b/255;return i<=.03928?n=i/12.92:n=Math.pow((i+.055)/1.055,2.4),a<=.03928?o=a/12.92:o=Math.pow((a+.055)/1.055,2.4),l<=.03928?r=l/12.92:r=Math.pow((l+.055)/1.055,2.4),.2126*n+.7152*o+.0722*r},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=x6(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Sy(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Sy(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(o,"%, ").concat(r,"%)"):"hsva(".concat(n,", ").concat(o,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=j2(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=j2(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(o,"%, ").concat(r,"%)"):"hsla(".concat(n,", ").concat(o,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Cy(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),RH(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),o=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(o,")"):"rgba(".concat(t,", ").concat(n,", ").concat(o,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Yn(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Yn(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+Cy(this.r,this.g,this.b,!1),n=0,o=Object.entries(xy);n=0,i=!n&&r&&(t.startsWith("hex")||t==="name");return i?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(o=this.toRgbString()),t==="prgb"&&(o=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(o=this.toHexString()),t==="hex3"&&(o=this.toHexString(!0)),t==="hex4"&&(o=this.toHex8String(!0)),t==="hex8"&&(o=this.toHex8String()),t==="name"&&(o=this.toName()),t==="hsl"&&(o=this.toHslString()),t==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Uf(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Uf(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Uf(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Uf(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var o=this.toRgb(),r=new e(t).toRgb(),i=n/100,a={r:(r.r-o.r)*i+o.r,g:(r.g-o.g)*i+o.g,b:(r.b-o.b)*i+o.b,a:(r.a-o.a)*i+o.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var o=this.toHsl(),r=360/n,i=[this];for(o.h=(o.h-(r*t>>1)+720)%360;--t;)o.h=(o.h+r)%360,i.push(new e(o));return i},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),o=n.h,r=n.s,i=n.v,a=[],l=1/t;t--;)a.push(new e({h:o,s:r,v:i})),i=(i+l)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),o=new e(t).toRgb(),r=n.a+o.a*(1-n.a);return new e({r:(n.r*n.a+o.r*o.a*(1-n.a))/r,g:(n.g*n.a+o.g*o.a*(1-n.a))/r,b:(n.b*n.a+o.b*o.a*(1-n.a))/r,a:r})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),o=n.h,r=[this],i=360/t,a=1;a=60&&Math.round(e.h)<=240?o=n?Math.round(e.h)-Xf*t:Math.round(e.h)+Xf*t:o=n?Math.round(e.h)+Xf*t:Math.round(e.h)-Xf*t,o<0?o+=360:o>=360&&(o-=360),o}function G2(e,t,n){if(e.h===0&&e.s===0)return e.s;var o;return n?o=e.s-V2*t:t===w6?o=e.s+V2:o=e.s+BH*t,o>1&&(o=1),n&&t===$6&&o>.1&&(o=.1),o<.06&&(o=.06),Number(o.toFixed(2))}function X2(e,t,n){var o;return n?o=e.v+HH*t:o=e.v-zH*t,o>1&&(o=1),Number(o.toFixed(2))}function jl(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],o=ks(e),r=$6;r>0;r-=1){var i=K2(o),a=Yf(ks({h:U2(i,r,!0),s:G2(i,r,!0),v:X2(i,r,!0)}));n.push(a)}n.push(Yf(o));for(var l=1;l<=w6;l+=1){var s=K2(o),u=Yf(ks({h:U2(s,l),s:G2(s,l),v:X2(s,l)}));n.push(u)}return t.theme==="dark"?jH.map(function(c){var d=c.index,f=c.opacity,p=Yf(WH(ks(t.backgroundColor||"#141414"),ks(n[d]),f*100));return p}):n}var ec={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Ju={},g0={};Object.keys(ec).forEach(function(e){Ju[e]=jl(ec[e]),Ju[e].primary=Ju[e][5],g0[e]=jl(ec[e],{theme:"dark",backgroundColor:"#141414"}),g0[e].primary=g0[e][5]});var VH=Ju.gold,KH=Ju.blue;const UH=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function GH(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const P6={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Sv=y(y({},P6),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', -'Noto Color Emoji'`,fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1});function XH(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:o}=t;const{colorSuccess:r,colorWarning:i,colorError:a,colorInfo:l,colorPrimary:s,colorBgBase:u,colorTextBase:c}=e,d=n(s),f=n(r),p=n(i),v=n(a),h=n(l),m=o(u,c);return y(y({},m),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:v[1],colorErrorBgHover:v[2],colorErrorBorder:v[3],colorErrorBorderHover:v[4],colorErrorHover:v[5],colorError:v[6],colorErrorActive:v[7],colorErrorTextHover:v[8],colorErrorText:v[9],colorErrorTextActive:v[10],colorWarningBg:p[1],colorWarningBgHover:p[2],colorWarningBorder:p[3],colorWarningBorderHover:p[4],colorWarningHover:p[4],colorWarning:p[6],colorWarningActive:p[7],colorWarningTextHover:p[8],colorWarningText:p[9],colorWarningTextActive:p[10],colorInfoBg:h[1],colorInfoBgHover:h[2],colorInfoBorder:h[3],colorInfoBorderHover:h[4],colorInfoHover:h[4],colorInfo:h[6],colorInfoActive:h[7],colorInfoTextHover:h[8],colorInfoText:h[9],colorInfoTextActive:h[10],colorBgMask:new St("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const YH=e=>{let t=e,n=e,o=e,r=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?o=1:e>=6&&(o=2),e>4&&e<8?r=4:e>=8&&(r=6),{borderRadius:e>16?16:e,borderRadiusXS:o,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:r}};function qH(e){const{motionUnit:t,motionBase:n,borderRadius:o,lineWidth:r}=e;return y({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:r+1},YH(o))}const $i=(e,t)=>new St(e).setAlpha(t).toRgbString(),yu=(e,t)=>new St(e).darken(t).toHexString(),JH=e=>{const t=jl(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},ZH=(e,t)=>{const n=e||"#fff",o=t||"#000";return{colorBgBase:n,colorTextBase:o,colorText:$i(o,.88),colorTextSecondary:$i(o,.65),colorTextTertiary:$i(o,.45),colorTextQuaternary:$i(o,.25),colorFill:$i(o,.15),colorFillSecondary:$i(o,.06),colorFillTertiary:$i(o,.04),colorFillQuaternary:$i(o,.02),colorBgLayout:yu(n,4),colorBgContainer:yu(n,0),colorBgElevated:yu(n,0),colorBgSpotlight:$i(o,.85),colorBorder:yu(n,15),colorBorderSecondary:yu(n,6)}};function QH(e){const t=new Array(10).fill(null).map((n,o)=>{const r=o-1,i=e*Math.pow(2.71828,r/5),a=o>1?Math.floor(i):Math.ceil(i);return Math.floor(a/2)*2});return t[1]=e,t.map(n=>{const o=n+8;return{size:n,lineHeight:o/n}})}const ez=e=>{const t=QH(e),n=t.map(r=>r.size),o=t.map(r=>r.lineHeight);return{fontSizeSM:n[0],fontSize:n[1],fontSizeLG:n[2],fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:o[1],lineHeightLG:o[2],lineHeightSM:o[0],lineHeightHeading1:o[6],lineHeightHeading2:o[5],lineHeightHeading3:o[4],lineHeightHeading4:o[3],lineHeightHeading5:o[2]}};function tz(e){const t=Object.keys(P6).map(n=>{const o=jl(e[n]);return new Array(10).fill(1).reduce((r,i,a)=>(r[`${n}-${a+1}`]=o[a],r),{})}).reduce((n,o)=>(n=y(y({},n),o),n),{});return y(y(y(y(y(y(y({},e),t),XH(e,{generateColorPalettes:JH,generateNeutralColorPalettes:ZH})),ez(e.fontSize)),GH(e)),UH(e)),qH(e))}function h0(e){return e>=0&&e<=255}function qf(e,t){const{r:n,g:o,b:r,a:i}=new St(e).toRgb();if(i<1)return e;const{r:a,g:l,b:s}=new St(t).toRgb();for(let u=.01;u<=1;u+=.01){const c=Math.round((n-a*(1-u))/u),d=Math.round((o-l*(1-u))/u),f=Math.round((r-s*(1-u))/u);if(h0(c)&&h0(d)&&h0(f))return new St({r:c,g:d,b:f,a:Math.round(u*100)/100}).toRgbString()}return new St({r:n,g:o,b:r,a:1}).toRgbString()}var nz=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{delete o[p]});const r=y(y({},n),o),i=480,a=576,l=768,s=992,u=1200,c=1600,d=2e3;return y(y(y({},r),{colorLink:r.colorInfoText,colorLinkHover:r.colorInfoHover,colorLinkActive:r.colorInfoActive,colorFillContent:r.colorFillSecondary,colorFillContentHover:r.colorFill,colorFillAlter:r.colorFillQuaternary,colorBgContainerDisabled:r.colorFillTertiary,colorBorderBg:r.colorBgContainer,colorSplit:qf(r.colorBorderSecondary,r.colorBgContainer),colorTextPlaceholder:r.colorTextQuaternary,colorTextDisabled:r.colorTextQuaternary,colorTextHeading:r.colorText,colorTextLabel:r.colorTextSecondary,colorTextDescription:r.colorTextTertiary,colorTextLightSolid:r.colorWhite,colorHighlight:r.colorError,colorBgTextHover:r.colorFillSecondary,colorBgTextActive:r.colorFill,colorIcon:r.colorTextTertiary,colorIconHover:r.colorText,colorErrorOutline:qf(r.colorErrorBg,r.colorBgContainer),colorWarningOutline:qf(r.colorWarningBg,r.colorBgContainer),fontSizeIcon:r.fontSizeSM,lineWidth:r.lineWidth,controlOutlineWidth:r.lineWidth*2,controlInteractiveSize:r.controlHeight/2,controlItemBgHover:r.colorFillTertiary,controlItemBgActive:r.colorPrimaryBg,controlItemBgActiveHover:r.colorPrimaryBgHover,controlItemBgActiveDisabled:r.colorFill,controlTmpOutline:r.colorFillQuaternary,controlOutline:qf(r.colorPrimaryBg,r.colorBgContainer),lineType:r.lineType,borderRadius:r.borderRadius,borderRadiusXS:r.borderRadiusXS,borderRadiusSM:r.borderRadiusSM,borderRadiusLG:r.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:r.sizeXXS,paddingXS:r.sizeXS,paddingSM:r.sizeSM,padding:r.size,paddingMD:r.sizeMD,paddingLG:r.sizeLG,paddingXL:r.sizeXL,paddingContentHorizontalLG:r.sizeLG,paddingContentVerticalLG:r.sizeMS,paddingContentHorizontal:r.sizeMS,paddingContentVertical:r.sizeSM,paddingContentHorizontalSM:r.size,paddingContentVerticalSM:r.sizeXS,marginXXS:r.sizeXXS,marginXS:r.sizeXS,marginSM:r.sizeSM,margin:r.size,marginMD:r.sizeMD,marginLG:r.sizeLG,marginXL:r.sizeXL,marginXXL:r.sizeXXL,boxShadow:` +'Noto Color Emoji'`,fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1});function XH(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:o}=t;const{colorSuccess:r,colorWarning:i,colorError:a,colorInfo:l,colorPrimary:s,colorBgBase:u,colorTextBase:c}=e,d=n(s),f=n(r),p=n(i),v=n(a),h=n(l),m=o(u,c);return y(y({},m),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:v[1],colorErrorBgHover:v[2],colorErrorBorder:v[3],colorErrorBorderHover:v[4],colorErrorHover:v[5],colorError:v[6],colorErrorActive:v[7],colorErrorTextHover:v[8],colorErrorText:v[9],colorErrorTextActive:v[10],colorWarningBg:p[1],colorWarningBgHover:p[2],colorWarningBorder:p[3],colorWarningBorderHover:p[4],colorWarningHover:p[4],colorWarning:p[6],colorWarningActive:p[7],colorWarningTextHover:p[8],colorWarningText:p[9],colorWarningTextActive:p[10],colorInfoBg:h[1],colorInfoBgHover:h[2],colorInfoBorder:h[3],colorInfoBorderHover:h[4],colorInfoHover:h[4],colorInfo:h[6],colorInfoActive:h[7],colorInfoTextHover:h[8],colorInfoText:h[9],colorInfoTextActive:h[10],colorBgMask:new St("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const YH=e=>{let t=e,n=e,o=e,r=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?o=1:e>=6&&(o=2),e>4&&e<8?r=4:e>=8&&(r=6),{borderRadius:e>16?16:e,borderRadiusXS:o,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:r}};function qH(e){const{motionUnit:t,motionBase:n,borderRadius:o,lineWidth:r}=e;return y({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:r+1},YH(o))}const $i=(e,t)=>new St(e).setAlpha(t).toRgbString(),yu=(e,t)=>new St(e).darken(t).toHexString(),JH=e=>{const t=jl(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},ZH=(e,t)=>{const n=e||"#fff",o=t||"#000";return{colorBgBase:n,colorTextBase:o,colorText:$i(o,.88),colorTextSecondary:$i(o,.65),colorTextTertiary:$i(o,.45),colorTextQuaternary:$i(o,.25),colorFill:$i(o,.15),colorFillSecondary:$i(o,.06),colorFillTertiary:$i(o,.04),colorFillQuaternary:$i(o,.02),colorBgLayout:yu(n,4),colorBgContainer:yu(n,0),colorBgElevated:yu(n,0),colorBgSpotlight:$i(o,.85),colorBorder:yu(n,15),colorBorderSecondary:yu(n,6)}};function QH(e){const t=new Array(10).fill(null).map((n,o)=>{const r=o-1,i=e*Math.pow(2.71828,r/5),a=o>1?Math.floor(i):Math.ceil(i);return Math.floor(a/2)*2});return t[1]=e,t.map(n=>{const o=n+8;return{size:n,lineHeight:o/n}})}const ez=e=>{const t=QH(e),n=t.map(r=>r.size),o=t.map(r=>r.lineHeight);return{fontSizeSM:n[0],fontSize:n[1],fontSizeLG:n[2],fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:o[1],lineHeightLG:o[2],lineHeightSM:o[0],lineHeightHeading1:o[6],lineHeightHeading2:o[5],lineHeightHeading3:o[4],lineHeightHeading4:o[3],lineHeightHeading5:o[2]}};function tz(e){const t=Object.keys(P6).map(n=>{const o=jl(e[n]);return new Array(10).fill(1).reduce((r,i,a)=>(r[`${n}-${a+1}`]=o[a],r),{})}).reduce((n,o)=>(n=y(y({},n),o),n),{});return y(y(y(y(y(y(y({},e),t),XH(e,{generateColorPalettes:JH,generateNeutralColorPalettes:ZH})),ez(e.fontSize)),GH(e)),UH(e)),qH(e))}function h0(e){return e>=0&&e<=255}function qf(e,t){const{r:n,g:o,b:r,a:i}=new St(e).toRgb();if(i<1)return e;const{r:a,g:l,b:s}=new St(t).toRgb();for(let u=.01;u<=1;u+=.01){const c=Math.round((n-a*(1-u))/u),d=Math.round((o-l*(1-u))/u),f=Math.round((r-s*(1-u))/u);if(h0(c)&&h0(d)&&h0(f))return new St({r:c,g:d,b:f,a:Math.round(u*100)/100}).toRgbString()}return new St({r:n,g:o,b:r,a:1}).toRgbString()}var nz=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{delete o[p]});const r=y(y({},n),o),i=480,a=576,l=768,s=992,u=1200,c=1600,d=2e3;return y(y(y({},r),{colorLink:r.colorInfoText,colorLinkHover:r.colorInfoHover,colorLinkActive:r.colorInfoActive,colorFillContent:r.colorFillSecondary,colorFillContentHover:r.colorFill,colorFillAlter:r.colorFillQuaternary,colorBgContainerDisabled:r.colorFillTertiary,colorBorderBg:r.colorBgContainer,colorSplit:qf(r.colorBorderSecondary,r.colorBgContainer),colorTextPlaceholder:r.colorTextQuaternary,colorTextDisabled:r.colorTextQuaternary,colorTextHeading:r.colorText,colorTextLabel:r.colorTextSecondary,colorTextDescription:r.colorTextTertiary,colorTextLightSolid:r.colorWhite,colorHighlight:r.colorError,colorBgTextHover:r.colorFillSecondary,colorBgTextActive:r.colorFill,colorIcon:r.colorTextTertiary,colorIconHover:r.colorText,colorErrorOutline:qf(r.colorErrorBg,r.colorBgContainer),colorWarningOutline:qf(r.colorWarningBg,r.colorBgContainer),fontSizeIcon:r.fontSizeSM,lineWidth:r.lineWidth,controlOutlineWidth:r.lineWidth*2,controlInteractiveSize:r.controlHeight/2,controlItemBgHover:r.colorFillTertiary,controlItemBgActive:r.colorPrimaryBg,controlItemBgActiveHover:r.colorPrimaryBgHover,controlItemBgActiveDisabled:r.colorFill,controlTmpOutline:r.colorFillQuaternary,controlOutline:qf(r.colorPrimaryBg,r.colorBgContainer),lineType:r.lineType,borderRadius:r.borderRadius,borderRadiusXS:r.borderRadiusXS,borderRadiusSM:r.borderRadiusSM,borderRadiusLG:r.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:r.sizeXXS,paddingXS:r.sizeXS,paddingSM:r.sizeSM,padding:r.size,paddingMD:r.sizeMD,paddingLG:r.sizeLG,paddingXL:r.sizeXL,paddingContentHorizontalLG:r.sizeLG,paddingContentVerticalLG:r.sizeMS,paddingContentHorizontal:r.sizeMS,paddingContentVertical:r.sizeSM,paddingContentHorizontalSM:r.size,paddingContentVerticalSM:r.sizeXS,marginXXS:r.sizeXXS,marginXS:r.sizeXS,marginSM:r.sizeSM,margin:r.size,marginMD:r.sizeMD,marginLG:r.sizeLG,marginXL:r.sizeXL,marginXXL:r.sizeXXL,boxShadow:` 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02) @@ -54,18 +54,18 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Clz_zCtn. 0 -6px 16px 0 rgba(0, 0, 0, 0.08), 0 -3px 6px -4px rgba(0, 0, 0, 0.12), 0 -9px 28px 8px rgba(0, 0, 0, 0.05) - `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),o)}const xv=e=>({color:e.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"&:focus, &:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive}}),zS=(e,t,n,o,r)=>{const i=e/2,a=0,l=i,s=n*1/Math.sqrt(2),u=i-n*(1-1/Math.sqrt(2)),c=i-t*(1/Math.sqrt(2)),d=n*(Math.sqrt(2)-1)+t*(1/Math.sqrt(2)),f=2*i-c,p=d,v=2*i-s,h=u,m=2*i-a,b=l,S=i*Math.sqrt(2)+n*(Math.sqrt(2)-2),C=n*(Math.sqrt(2)-1);return{pointerEvents:"none",width:e,height:e,overflow:"hidden","&::after":{content:'""',position:"absolute",width:S,height:S,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${t}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:r,zIndex:0,background:"transparent"},"&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:e,height:e/2,background:o,clipPath:{_multi_value_:!0,value:[`polygon(${C}px 100%, 50% ${C}px, ${2*i-C}px 100%, ${C}px 100%)`,`path('M ${a} ${l} A ${n} ${n} 0 0 0 ${s} ${u} L ${c} ${d} A ${t} ${t} 0 0 1 ${f} ${p} L ${v} ${h} A ${n} ${n} 0 0 0 ${m} ${b} Z')`]},content:'""'}}};function Hg(e,t){return Rd.reduce((n,o)=>{const r=e[`${o}-1`],i=e[`${o}-3`],a=e[`${o}-6`],l=e[`${o}-7`];return y(y({},n),t(o,{lightColor:r,lightBorderColor:i,darkColor:a,textColor:l}))},{})}const cn={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},qe=e=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:e.fontFamily}),ns=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),Kr=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),rz=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active,\n &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),iz=(e,t)=>{const{fontFamily:n,fontSize:o}=e,r=`[class^="${t}"], [class*=" ${t}"]`;return{[r]:{fontFamily:n,fontSize:o,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[r]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},qi=e=>({outline:`${e.lineWidthBold}px solid ${e.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),Ji=e=>({"&:focus-visible":y({},qi(e))});function Ue(e,t,n){return o=>{const r=E(()=>o==null?void 0:o.value),[i,a,l]=na(),{getPrefixCls:s,iconPrefixCls:u}=vv(),c=E(()=>s()),d=E(()=>({theme:i.value,token:a.value,hashId:l.value,path:["Shared",c.value]}));yy(d,()=>[{"&":rz(a.value)}]);const f=E(()=>({theme:i.value,token:a.value,hashId:l.value,path:[e,r.value,u.value]}));return[yy(f,()=>{const{token:p,flush:v}=lz(a.value),h=typeof n=="function"?n(p):n,m=y(y({},h),a.value[e]),b=`.${r.value}`,S=Be(p,{componentCls:b,prefixCls:r.value,iconCls:`.${u.value}`,antCls:`.${c.value}`},m),C=t(S,{hashId:l.value,prefixCls:r.value,rootPrefixCls:c.value,iconPrefixCls:u.value,overrideComponentToken:a.value[e]});return v(e,m),[iz(a.value,r.value),C]}),l]}}const O6=typeof CSSINJS_STATISTIC<"u";let $y=!0;function Be(){for(var e=arguments.length,t=new Array(e),n=0;n{Object.keys(r).forEach(a=>{Object.defineProperty(o,a,{configurable:!0,enumerable:!0,get:()=>r[a]})})}),$y=!0,o}function az(){}function lz(e){let t,n=e,o=az;return O6&&(t=new Set,n=new Proxy(e,{get(r,i){return $y&&t.add(i),r[i]}}),o=(r,i)=>{Array.from(t)}),{token:n,keys:t,flush:o}}const sz=d6(tz),I6={token:Cv,hashed:!0},T6=Symbol("DesignTokenContext"),wy=se(),cz=e=>{Xe(T6,e),be(e,()=>{wy.value=Bt(e),D_(wy)},{immediate:!0,deep:!0})},uz=le({props:{value:De()},setup(e,t){let{slots:n}=t;return cz(E(()=>e.value)),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});function na(){const e=ze(T6,E(()=>wy.value||I6)),t=E(()=>`${C6}-${e.value.hashed||""}`),n=E(()=>e.value.theme||sz),o=eH(n,E(()=>[Cv,e.value.token]),E(()=>({salt:t.value,override:y({override:e.value.token},e.value.components),formatToken:oz})));return[n,E(()=>o.value[0]),E(()=>e.value.hashed?o.value[1]:"")]}const jS=le({compatConfig:{MODE:3},setup(){const[,e]=na(),t=E(()=>new St(e.value.colorBgBase).toHsl().l<.5?{opacity:.65}:{});return()=>g("svg",{style:t.value,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},[g("g",{fill:"none","fill-rule":"evenodd"},[g("g",{transform:"translate(24 31.67)"},[g("ellipse",{"fill-opacity":".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"},null),g("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"},null),g("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"},null),g("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"},null),g("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"},null)]),g("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"},null),g("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},[g("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"},null),g("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"},null)])])])}});jS.PRESENTED_IMAGE_DEFAULT=!0;const E6=le({compatConfig:{MODE:3},setup(){const[,e]=na(),t=E(()=>{const{colorFill:n,colorFillTertiary:o,colorFillQuaternary:r,colorBgContainer:i}=e.value;return{borderColor:new St(n).onBackground(i).toHexString(),shadowColor:new St(o).onBackground(i).toHexString(),contentColor:new St(r).onBackground(i).toHexString()}});return()=>g("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},[g("g",{transform:"translate(0 1)",fill:"none","fill-rule":"evenodd"},[g("ellipse",{fill:t.value.shadowColor,cx:"32",cy:"33",rx:"32",ry:"7"},null),g("g",{"fill-rule":"nonzero",stroke:t.value.borderColor},[g("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"},null),g("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:t.value.contentColor},null)])])])}});E6.PRESENTED_IMAGE_SIMPLE=!0;const dz=e=>{const{componentCls:t,margin:n,marginXS:o,marginXL:r,fontSize:i,lineHeight:a}=e;return{[t]:{marginInline:o,fontSize:i,lineHeight:a,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:o,opacity:e.opacityImage,img:{height:"100%"},svg:{height:"100%",margin:"auto"}},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:r,color:e.colorTextDisabled,[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:o,color:e.colorTextDisabled,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},fz=Ue("Empty",e=>{const{componentCls:t,controlHeightLG:n}=e,o=Be(e,{emptyImgCls:`${t}-img`,emptyImgHeight:n*2.5,emptyImgHeightMD:n,emptyImgHeightSM:n*.875});return[dz(o)]});var pz=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,imageStyle:De(),image:It(),description:It()}),WS=le({name:"AEmpty",compatConfig:{MODE:3},inheritAttrs:!1,props:gz(),setup(e,t){let{slots:n={},attrs:o}=t;const{direction:r,prefixCls:i}=Te("empty",e),[a,l]=fz(i);return()=>{var s,u;const c=i.value,d=y(y({},e),o),{image:f=((s=n.image)===null||s===void 0?void 0:s.call(n))||Vr(jS),description:p=((u=n.description)===null||u===void 0?void 0:u.call(n))||void 0,imageStyle:v,class:h=""}=d,m=pz(d,["image","description","imageStyle","class"]),b=typeof f=="function"?f():f,S=typeof b=="object"&&"type"in b&&b.type.PRESENTED_IMAGE_SIMPLE;return a(g(ts,{componentName:"Empty",children:C=>{const $=typeof p<"u"?p:C.description,x=typeof $=="string"?$:"empty";let P=null;return typeof b=="string"?P=g("img",{alt:x,src:b},null):P=b,g("div",k({class:ge(c,h,l.value,{[`${c}-normal`]:S,[`${c}-rtl`]:r.value==="rtl"})},m),[g("div",{class:`${c}-image`,style:v},[P]),$&&g("p",{class:`${c}-description`},[$]),n.default&&g("div",{class:`${c}-footer`},[zt(n.default())])])}},null))}}});WS.PRESENTED_IMAGE_DEFAULT=()=>Vr(jS);WS.PRESENTED_IMAGE_SIMPLE=()=>Vr(E6);const Oa=Lt(WS),VS=e=>{const{prefixCls:t}=Te("empty",e);return(o=>{switch(o){case"Table":case"List":return g(Oa,{image:Oa.PRESENTED_IMAGE_SIMPLE},null);case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return g(Oa,{image:Oa.PRESENTED_IMAGE_SIMPLE,class:`${t.value}-small`},null);default:return g(Oa,null,null)}})(e.componentName)};function hz(e){return g(VS,{componentName:e},null)}const _6=Symbol("SizeContextKey"),M6=()=>ze(_6,ae(void 0)),A6=e=>{const t=M6();return Xe(_6,E(()=>e.value||t.value)),e},Te=(e,t)=>{const n=M6(),o=ko(),r=ze(kS,y(y({},qM),{renderEmpty:w=>Vr(VS,{componentName:w})})),i=E(()=>r.getPrefixCls(e,t.prefixCls)),a=E(()=>{var w,O;return(w=t.direction)!==null&&w!==void 0?w:(O=r.direction)===null||O===void 0?void 0:O.value}),l=E(()=>{var w;return(w=t.iconPrefixCls)!==null&&w!==void 0?w:r.iconPrefixCls.value}),s=E(()=>r.getPrefixCls()),u=E(()=>{var w;return(w=r.autoInsertSpaceInButton)===null||w===void 0?void 0:w.value}),c=r.renderEmpty,d=r.space,f=r.pageHeader,p=r.form,v=E(()=>{var w,O;return(w=t.getTargetContainer)!==null&&w!==void 0?w:(O=r.getTargetContainer)===null||O===void 0?void 0:O.value}),h=E(()=>{var w,O,I;return(O=(w=t.getContainer)!==null&&w!==void 0?w:t.getPopupContainer)!==null&&O!==void 0?O:(I=r.getPopupContainer)===null||I===void 0?void 0:I.value}),m=E(()=>{var w,O;return(w=t.dropdownMatchSelectWidth)!==null&&w!==void 0?w:(O=r.dropdownMatchSelectWidth)===null||O===void 0?void 0:O.value}),b=E(()=>{var w;return(t.virtual===void 0?((w=r.virtual)===null||w===void 0?void 0:w.value)!==!1:t.virtual!==!1)&&m.value!==!1}),S=E(()=>t.size||n.value),C=E(()=>{var w,O,I;return(w=t.autocomplete)!==null&&w!==void 0?w:(I=(O=r.input)===null||O===void 0?void 0:O.value)===null||I===void 0?void 0:I.autocomplete}),$=E(()=>{var w;return(w=t.disabled)!==null&&w!==void 0?w:o.value}),x=E(()=>{var w;return(w=t.csp)!==null&&w!==void 0?w:r.csp}),P=E(()=>{var w,O;return(w=t.wave)!==null&&w!==void 0?w:(O=r.wave)===null||O===void 0?void 0:O.value});return{configProvider:r,prefixCls:i,direction:a,size:S,getTargetContainer:v,getPopupContainer:h,space:d,pageHeader:f,form:p,autoInsertSpaceInButton:u,renderEmpty:c,virtual:b,dropdownMatchSelectWidth:m,rootPrefixCls:s,getPrefixCls:r.getPrefixCls,autocomplete:C,csp:x,iconPrefixCls:l,disabled:$,select:r.select,wave:P}};function it(e,t){const n=y({},e);for(let o=0;o{const{componentCls:t}=e;return{[t]:{position:"fixed",zIndex:e.zIndexPopup}}},mz=Ue("Affix",e=>{const t=Be(e,{zIndexPopup:e.zIndexBase+10});return[vz(t)]});function bz(){return typeof window<"u"?window:null}var Vs;(function(e){e[e.None=0]="None",e[e.Prepare=1]="Prepare"})(Vs||(Vs={}));const yz=()=>({offsetTop:Number,offsetBottom:Number,target:{type:Function,default:bz},prefixCls:String,onChange:Function,onTestUpdatePosition:Function}),Sz=le({compatConfig:{MODE:3},name:"AAffix",inheritAttrs:!1,props:yz(),setup(e,t){let{slots:n,emit:o,expose:r,attrs:i}=t;const a=se(),l=se(),s=rt({affixStyle:void 0,placeholderStyle:void 0,status:Vs.None,lastAffix:!1,prevTarget:null,timeout:null}),u=Jt(),c=E(()=>e.offsetBottom===void 0&&e.offsetTop===void 0?0:e.offsetTop),d=E(()=>e.offsetBottom),f=()=>{const{status:C,lastAffix:$}=s,{target:x}=e;if(C!==Vs.Prepare||!l.value||!a.value||!x)return;const P=x();if(!P)return;const w={status:Vs.None},O=Vf(a.value);if(O.top===0&&O.left===0&&O.width===0&&O.height===0)return;const I=Vf(P),_=O2(O,I,c.value),T=I2(O,I,d.value);if(!(O.top===0&&O.left===0&&O.width===0&&O.height===0)){if(_!==void 0){const A=`${O.width}px`,R=`${O.height}px`;w.affixStyle={position:"fixed",top:_,width:A,height:R},w.placeholderStyle={width:A,height:R}}else if(T!==void 0){const A=`${O.width}px`,R=`${O.height}px`;w.affixStyle={position:"fixed",bottom:T,width:A,height:R},w.placeholderStyle={width:A,height:R}}w.lastAffix=!!w.affixStyle,$!==w.lastAffix&&o("change",w.lastAffix),y(s,w)}},p=()=>{y(s,{status:Vs.Prepare,affixStyle:void 0,placeholderStyle:void 0})},v=gy(()=>{p()}),h=gy(()=>{const{target:C}=e,{affixStyle:$}=s;if(C&&$){const x=C();if(x&&a.value){const P=Vf(x),w=Vf(a.value),O=O2(w,P,c.value),I=I2(w,P,d.value);if(O!==void 0&&$.top===O||I!==void 0&&$.bottom===I)return}}p()});r({updatePosition:v,lazyUpdatePosition:h}),be(()=>e.target,C=>{const $=(C==null?void 0:C())||null;s.prevTarget!==$&&(E2(u),$&&(T2($,u),v()),s.prevTarget=$)}),be(()=>[e.offsetTop,e.offsetBottom],v),Ke(()=>{const{target:C}=e;C&&(s.timeout=setTimeout(()=>{T2(C(),u),v()}))}),uo(()=>{f()}),Zn(()=>{clearTimeout(s.timeout),E2(u),v.cancel(),h.cancel()});const{prefixCls:m}=Te("affix",e),[b,S]=mz(m);return()=>{var C;const{affixStyle:$,placeholderStyle:x,status:P}=s,w=ge({[m.value]:$,[S.value]:!0}),O=it(e,["prefixCls","offsetTop","offsetBottom","target","onChange","onTestUpdatePosition"]);return b(g(br,{onResize:v},{default:()=>[g("div",k(k(k({},O),i),{},{ref:a,"data-measure-status":P}),[$&&g("div",{style:x,"aria-hidden":"true"},null),g("div",{class:w,ref:l,style:$},[(C=n.default)===null||C===void 0?void 0:C.call(n)])])]}))}}}),R6=Lt(Sz);function Y2(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function q2(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function v0(e,t){if(e.clientHeightt||i>e&&a=t&&l>=n?i-e-o:a>t&&ln?a-t+r:0}var J2=function(e,t){var n=window,o=t.scrollMode,r=t.block,i=t.inline,a=t.boundary,l=t.skipOverflowHiddenElements,s=typeof a=="function"?a:function(J){return J!==a};if(!Y2(e))throw new TypeError("Invalid target");for(var u,c,d=document.scrollingElement||document.documentElement,f=[],p=e;Y2(p)&&s(p);){if((p=(c=(u=p).parentElement)==null?u.getRootNode().host||null:c)===d){f.push(p);break}p!=null&&p===document.body&&v0(p)&&!v0(document.documentElement)||p!=null&&v0(p,l)&&f.push(p)}for(var v=n.visualViewport?n.visualViewport.width:innerWidth,h=n.visualViewport?n.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,S=e.getBoundingClientRect(),C=S.height,$=S.width,x=S.top,P=S.right,w=S.bottom,O=S.left,I=r==="start"||r==="nearest"?x:r==="end"?w:x+C/2,_=i==="center"?O+$/2:i==="end"?P:O,T=[],A=0;A=0&&O>=0&&w<=h&&P<=v&&x>=N&&w<=F&&O>=B&&P<=L)return T;var j=getComputedStyle(R),z=parseInt(j.borderLeftWidth,10),G=parseInt(j.borderTopWidth,10),Q=parseInt(j.borderRightWidth,10),Y=parseInt(j.borderBottomWidth,10),oe=0,Z=0,re="offsetWidth"in R?R.offsetWidth-R.clientWidth-z-Q:0,ne="offsetHeight"in R?R.offsetHeight-R.clientHeight-G-Y:0,X="offsetWidth"in R?R.offsetWidth===0?0:D/R.offsetWidth:0,te="offsetHeight"in R?R.offsetHeight===0?0:M/R.offsetHeight:0;if(d===R)oe=r==="start"?I:r==="end"?I-h:r==="nearest"?Jf(b,b+h,h,G,Y,b+I,b+I+C,C):I-h/2,Z=i==="start"?_:i==="center"?_-v/2:i==="end"?_-v:Jf(m,m+v,v,z,Q,m+_,m+_+$,$),oe=Math.max(0,oe+b),Z=Math.max(0,Z+m);else{oe=r==="start"?I-N-G:r==="end"?I-F+Y+ne:r==="nearest"?Jf(N,F,M,G,Y+ne,I,I+C,C):I-(N+M/2)+ne/2,Z=i==="start"?_-B-z:i==="center"?_-(B+D/2)+re/2:i==="end"?_-L+Q+re:Jf(B,L,D,z,Q+re,_,_+$,$);var W=R.scrollLeft,U=R.scrollTop;I+=U-(oe=Math.max(0,Math.min(U+oe/te,R.scrollHeight-M/te+ne))),_+=W-(Z=Math.max(0,Math.min(W+Z/X,R.scrollWidth-D/X+re)))}T.push({el:R,top:oe,left:Z})}return T};function D6(e){return e===Object(e)&&Object.keys(e).length!==0}function Cz(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(o){var r=o.el,i=o.top,a=o.left;r.scroll&&n?r.scroll({top:i,left:a,behavior:t}):(r.scrollTop=i,r.scrollLeft=a)})}function xz(e){return e===!1?{block:"end",inline:"nearest"}:D6(e)?e:{block:"start",inline:"nearest"}}function N6(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(D6(t)&&typeof t.behavior=="function")return t.behavior(n?J2(e,t):[]);if(n){var o=xz(t);return Cz(J2(e,o),o.behavior)}}function $z(e,t,n,o){const r=n-t;return e/=o/2,e<1?r/2*e*e*e+t:r/2*((e-=2)*e*e+2)+t}function Py(e){return e!=null&&e===e.window}function KS(e,t){var n,o;if(typeof window>"u")return 0;const r="scrollTop";let i=0;return Py(e)?i=e.scrollY:e instanceof Document?i=e.documentElement[r]:(e instanceof HTMLElement||e)&&(i=e[r]),e&&!Py(e)&&typeof i!="number"&&(i=(o=((n=e.ownerDocument)!==null&&n!==void 0?n:e).documentElement)===null||o===void 0?void 0:o[r]),i}function US(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:n=()=>window,callback:o,duration:r=450}=t,i=n(),a=KS(i),l=Date.now(),s=()=>{const c=Date.now()-l,d=$z(c>r?r:c,a,e,r);Py(i)?i.scrollTo(window.scrollX,d):i instanceof Document?i.documentElement.scrollTop=d:i.scrollTop=d,c{Xe(k6,e)},Pz=()=>ze(k6,{registerLink:Zf,unregisterLink:Zf,scrollTo:Zf,activeLink:E(()=>""),handleClick:Zf,direction:E(()=>"vertical")}),Oz=e=>{const{componentCls:t,holderOffsetBlock:n,motionDurationSlow:o,lineWidthBold:r,colorPrimary:i,lineType:a,colorSplit:l}=e;return{[`${t}-wrapper`]:{marginBlockStart:-n,paddingBlockStart:n,backgroundColor:"transparent",[t]:y(y({},qe(e)),{position:"relative",paddingInlineStart:r,[`${t}-link`]:{paddingBlock:e.anchorPaddingBlock,paddingInline:`${e.anchorPaddingInline}px 0`,"&-title":y(y({},cn),{position:"relative",display:"block",marginBlockEnd:e.anchorTitleBlock,color:e.colorText,transition:`all ${e.motionDurationSlow}`,"&:only-child":{marginBlockEnd:0}}),[`&-active > ${t}-link-title`]:{color:e.colorPrimary},[`${t}-link`]:{paddingBlock:e.anchorPaddingBlockSecondary}}}),[`&:not(${t}-wrapper-horizontal)`]:{[t]:{"&::before":{position:"absolute",left:{_skip_check_:!0,value:0},top:0,height:"100%",borderInlineStart:`${r}px ${a} ${l}`,content:'" "'},[`${t}-ink`]:{position:"absolute",left:{_skip_check_:!0,value:0},display:"none",transform:"translateY(-50%)",transition:`top ${o} ease-in-out`,width:r,backgroundColor:i,[`&${t}-ink-visible`]:{display:"inline-block"}}}},[`${t}-fixed ${t}-ink ${t}-ink`]:{display:"none"}}}},Iz=e=>{const{componentCls:t,motionDurationSlow:n,lineWidthBold:o,colorPrimary:r}=e;return{[`${t}-wrapper-horizontal`]:{position:"relative","&::before":{position:"absolute",left:{_skip_check_:!0,value:0},right:{_skip_check_:!0,value:0},bottom:0,borderBottom:`1px ${e.lineType} ${e.colorSplit}`,content:'" "'},[t]:{overflowX:"scroll",position:"relative",display:"flex",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},[`${t}-link:first-of-type`]:{paddingInline:0},[`${t}-ink`]:{position:"absolute",bottom:0,transition:`left ${n} ease-in-out, width ${n} ease-in-out`,height:o,backgroundColor:r}}}}},Tz=Ue("Anchor",e=>{const{fontSize:t,fontSizeLG:n,padding:o,paddingXXS:r}=e,i=Be(e,{holderOffsetBlock:r,anchorPaddingBlock:r,anchorPaddingBlockSecondary:r/2,anchorPaddingInline:o,anchorTitleBlock:t/14*3,anchorBallSize:n/2});return[Oz(i),Iz(i)]}),Ez=()=>({prefixCls:String,href:String,title:It(),target:String,customTitleProps:De()}),GS=le({compatConfig:{MODE:3},name:"AAnchorLink",inheritAttrs:!1,props:Qe(Ez(),{href:"#"}),slots:Object,setup(e,t){let{slots:n,attrs:o}=t,r=null;const{handleClick:i,scrollTo:a,unregisterLink:l,registerLink:s,activeLink:u}=Pz(),{prefixCls:c}=Te("anchor",e),d=f=>{const{href:p}=e;i(f,{title:r,href:p}),a(p)};return be(()=>e.href,(f,p)=>{ot(()=>{l(p),s(f)})}),Ke(()=>{s(e.href)}),tt(()=>{l(e.href)}),()=>{var f;const{href:p,target:v,title:h=n.title,customTitleProps:m={}}=e,b=c.value;r=typeof h=="function"?h(m):h;const S=u.value===p,C=ge(`${b}-link`,{[`${b}-link-active`]:S},o.class),$=ge(`${b}-link-title`,{[`${b}-link-title-active`]:S});return g("div",k(k({},o),{},{class:C}),[g("a",{class:$,href:p,title:typeof r=="string"?r:"",target:v,onClick:d},[n.customTitle?n.customTitle(m):r]),(f=n.default)===null||f===void 0?void 0:f.call(n)])}}});function _z(e,t){for(var n=0;n=0||(r[n]=e[n]);return r}function Z2(e){return((t=e)!=null&&typeof t=="object"&&Array.isArray(t)===!1)==1&&Object.prototype.toString.call(e)==="[object Object]";var t}var H6=Object.prototype,z6=H6.toString,Mz=H6.hasOwnProperty,j6=/^\s*function (\w+)/;function Q2(e){var t,n=(t=e==null?void 0:e.type)!==null&&t!==void 0?t:e;if(n){var o=n.toString().match(j6);return o?o[1]:""}return""}var Wl=function(e){var t,n;return Z2(e)!==!1&&typeof(t=e.constructor)=="function"&&Z2(n=t.prototype)!==!1&&n.hasOwnProperty("isPrototypeOf")!==!1},Az=function(e){return e},Go=Az,Dd=function(e,t){return Mz.call(e,t)},Rz=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},Cc=Array.isArray||function(e){return z6.call(e)==="[object Array]"},xc=function(e){return z6.call(e)==="[object Function]"},zg=function(e){return Wl(e)&&Dd(e,"_vueTypes_name")},W6=function(e){return Wl(e)&&(Dd(e,"type")||["_vueTypes_name","validator","default","required"].some(function(t){return Dd(e,t)}))};function XS(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function os(e,t,n){var o,r=!0,i="";o=Wl(e)?e:{type:e};var a=zg(o)?o._vueTypes_name+" - ":"";if(W6(o)&&o.type!==null){if(o.type===void 0||o.type===!0||!o.required&&t===void 0)return r;Cc(o.type)?(r=o.type.some(function(d){return os(d,t)===!0}),i=o.type.map(function(d){return Q2(d)}).join(" or ")):r=(i=Q2(o))==="Array"?Cc(t):i==="Object"?Wl(t):i==="String"||i==="Number"||i==="Boolean"||i==="Function"?function(d){if(d==null)return"";var f=d.constructor.toString().match(j6);return f?f[1]:""}(t)===i:t instanceof o.type}if(!r){var l=a+'value "'+t+'" should be of type "'+i+'"';return l}if(Dd(o,"validator")&&xc(o.validator)){var s=Go,u=[];if(Go=function(d){u.push(d)},r=o.validator(t),Go=s,!r){var c=(u.length>1?"* ":"")+u.join(` + `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),o)}const Cv=e=>({color:e.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"&:focus, &:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive}}),zS=(e,t,n,o,r)=>{const i=e/2,a=0,l=i,s=n*1/Math.sqrt(2),u=i-n*(1-1/Math.sqrt(2)),c=i-t*(1/Math.sqrt(2)),d=n*(Math.sqrt(2)-1)+t*(1/Math.sqrt(2)),f=2*i-c,p=d,v=2*i-s,h=u,m=2*i-a,b=l,S=i*Math.sqrt(2)+n*(Math.sqrt(2)-2),C=n*(Math.sqrt(2)-1);return{pointerEvents:"none",width:e,height:e,overflow:"hidden","&::after":{content:'""',position:"absolute",width:S,height:S,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${t}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:r,zIndex:0,background:"transparent"},"&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:e,height:e/2,background:o,clipPath:{_multi_value_:!0,value:[`polygon(${C}px 100%, 50% ${C}px, ${2*i-C}px 100%, ${C}px 100%)`,`path('M ${a} ${l} A ${n} ${n} 0 0 0 ${s} ${u} L ${c} ${d} A ${t} ${t} 0 0 1 ${f} ${p} L ${v} ${h} A ${n} ${n} 0 0 0 ${m} ${b} Z')`]},content:'""'}}};function Bg(e,t){return Rd.reduce((n,o)=>{const r=e[`${o}-1`],i=e[`${o}-3`],a=e[`${o}-6`],l=e[`${o}-7`];return y(y({},n),t(o,{lightColor:r,lightBorderColor:i,darkColor:a,textColor:l}))},{})}const cn={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},qe=e=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:e.fontFamily}),ns=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),Kr=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),rz=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active,\n &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),iz=(e,t)=>{const{fontFamily:n,fontSize:o}=e,r=`[class^="${t}"], [class*=" ${t}"]`;return{[r]:{fontFamily:n,fontSize:o,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[r]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},qi=e=>({outline:`${e.lineWidthBold}px solid ${e.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),Ji=e=>({"&:focus-visible":y({},qi(e))});function Ue(e,t,n){return o=>{const r=E(()=>o==null?void 0:o.value),[i,a,l]=na(),{getPrefixCls:s,iconPrefixCls:u}=hv(),c=E(()=>s()),d=E(()=>({theme:i.value,token:a.value,hashId:l.value,path:["Shared",c.value]}));yy(d,()=>[{"&":rz(a.value)}]);const f=E(()=>({theme:i.value,token:a.value,hashId:l.value,path:[e,r.value,u.value]}));return[yy(f,()=>{const{token:p,flush:v}=lz(a.value),h=typeof n=="function"?n(p):n,m=y(y({},h),a.value[e]),b=`.${r.value}`,S=Be(p,{componentCls:b,prefixCls:r.value,iconCls:`.${u.value}`,antCls:`.${c.value}`},m),C=t(S,{hashId:l.value,prefixCls:r.value,rootPrefixCls:c.value,iconPrefixCls:u.value,overrideComponentToken:a.value[e]});return v(e,m),[iz(a.value,r.value),C]}),l]}}const O6=typeof CSSINJS_STATISTIC<"u";let $y=!0;function Be(){for(var e=arguments.length,t=new Array(e),n=0;n{Object.keys(r).forEach(a=>{Object.defineProperty(o,a,{configurable:!0,enumerable:!0,get:()=>r[a]})})}),$y=!0,o}function az(){}function lz(e){let t,n=e,o=az;return O6&&(t=new Set,n=new Proxy(e,{get(r,i){return $y&&t.add(i),r[i]}}),o=(r,i)=>{Array.from(t)}),{token:n,keys:t,flush:o}}const sz=d6(tz),I6={token:Sv,hashed:!0},T6=Symbol("DesignTokenContext"),wy=se(),cz=e=>{Xe(T6,e),be(e,()=>{wy.value=Bt(e),D_(wy)},{immediate:!0,deep:!0})},uz=le({props:{value:De()},setup(e,t){let{slots:n}=t;return cz(E(()=>e.value)),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});function na(){const e=ze(T6,E(()=>wy.value||I6)),t=E(()=>`${C6}-${e.value.hashed||""}`),n=E(()=>e.value.theme||sz),o=eH(n,E(()=>[Sv,e.value.token]),E(()=>({salt:t.value,override:y({override:e.value.token},e.value.components),formatToken:oz})));return[n,E(()=>o.value[0]),E(()=>e.value.hashed?o.value[1]:"")]}const jS=le({compatConfig:{MODE:3},setup(){const[,e]=na(),t=E(()=>new St(e.value.colorBgBase).toHsl().l<.5?{opacity:.65}:{});return()=>g("svg",{style:t.value,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},[g("g",{fill:"none","fill-rule":"evenodd"},[g("g",{transform:"translate(24 31.67)"},[g("ellipse",{"fill-opacity":".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"},null),g("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"},null),g("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"},null),g("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"},null),g("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"},null)]),g("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"},null),g("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},[g("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"},null),g("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"},null)])])])}});jS.PRESENTED_IMAGE_DEFAULT=!0;const E6=le({compatConfig:{MODE:3},setup(){const[,e]=na(),t=E(()=>{const{colorFill:n,colorFillTertiary:o,colorFillQuaternary:r,colorBgContainer:i}=e.value;return{borderColor:new St(n).onBackground(i).toHexString(),shadowColor:new St(o).onBackground(i).toHexString(),contentColor:new St(r).onBackground(i).toHexString()}});return()=>g("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},[g("g",{transform:"translate(0 1)",fill:"none","fill-rule":"evenodd"},[g("ellipse",{fill:t.value.shadowColor,cx:"32",cy:"33",rx:"32",ry:"7"},null),g("g",{"fill-rule":"nonzero",stroke:t.value.borderColor},[g("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"},null),g("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:t.value.contentColor},null)])])])}});E6.PRESENTED_IMAGE_SIMPLE=!0;const dz=e=>{const{componentCls:t,margin:n,marginXS:o,marginXL:r,fontSize:i,lineHeight:a}=e;return{[t]:{marginInline:o,fontSize:i,lineHeight:a,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:o,opacity:e.opacityImage,img:{height:"100%"},svg:{height:"100%",margin:"auto"}},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:r,color:e.colorTextDisabled,[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:o,color:e.colorTextDisabled,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},fz=Ue("Empty",e=>{const{componentCls:t,controlHeightLG:n}=e,o=Be(e,{emptyImgCls:`${t}-img`,emptyImgHeight:n*2.5,emptyImgHeightMD:n,emptyImgHeightSM:n*.875});return[dz(o)]});var pz=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,imageStyle:De(),image:It(),description:It()}),WS=le({name:"AEmpty",compatConfig:{MODE:3},inheritAttrs:!1,props:gz(),setup(e,t){let{slots:n={},attrs:o}=t;const{direction:r,prefixCls:i}=Te("empty",e),[a,l]=fz(i);return()=>{var s,u;const c=i.value,d=y(y({},e),o),{image:f=((s=n.image)===null||s===void 0?void 0:s.call(n))||Vr(jS),description:p=((u=n.description)===null||u===void 0?void 0:u.call(n))||void 0,imageStyle:v,class:h=""}=d,m=pz(d,["image","description","imageStyle","class"]),b=typeof f=="function"?f():f,S=typeof b=="object"&&"type"in b&&b.type.PRESENTED_IMAGE_SIMPLE;return a(g(ts,{componentName:"Empty",children:C=>{const $=typeof p<"u"?p:C.description,x=typeof $=="string"?$:"empty";let P=null;return typeof b=="string"?P=g("img",{alt:x,src:b},null):P=b,g("div",k({class:ge(c,h,l.value,{[`${c}-normal`]:S,[`${c}-rtl`]:r.value==="rtl"})},m),[g("div",{class:`${c}-image`,style:v},[P]),$&&g("p",{class:`${c}-description`},[$]),n.default&&g("div",{class:`${c}-footer`},[zt(n.default())])])}},null))}}});WS.PRESENTED_IMAGE_DEFAULT=()=>Vr(jS);WS.PRESENTED_IMAGE_SIMPLE=()=>Vr(E6);const Oa=Lt(WS),VS=e=>{const{prefixCls:t}=Te("empty",e);return(o=>{switch(o){case"Table":case"List":return g(Oa,{image:Oa.PRESENTED_IMAGE_SIMPLE},null);case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return g(Oa,{image:Oa.PRESENTED_IMAGE_SIMPLE,class:`${t.value}-small`},null);default:return g(Oa,null,null)}})(e.componentName)};function hz(e){return g(VS,{componentName:e},null)}const _6=Symbol("SizeContextKey"),M6=()=>ze(_6,ae(void 0)),A6=e=>{const t=M6();return Xe(_6,E(()=>e.value||t.value)),e},Te=(e,t)=>{const n=M6(),o=ko(),r=ze(kS,y(y({},qM),{renderEmpty:w=>Vr(VS,{componentName:w})})),i=E(()=>r.getPrefixCls(e,t.prefixCls)),a=E(()=>{var w,O;return(w=t.direction)!==null&&w!==void 0?w:(O=r.direction)===null||O===void 0?void 0:O.value}),l=E(()=>{var w;return(w=t.iconPrefixCls)!==null&&w!==void 0?w:r.iconPrefixCls.value}),s=E(()=>r.getPrefixCls()),u=E(()=>{var w;return(w=r.autoInsertSpaceInButton)===null||w===void 0?void 0:w.value}),c=r.renderEmpty,d=r.space,f=r.pageHeader,p=r.form,v=E(()=>{var w,O;return(w=t.getTargetContainer)!==null&&w!==void 0?w:(O=r.getTargetContainer)===null||O===void 0?void 0:O.value}),h=E(()=>{var w,O,I;return(O=(w=t.getContainer)!==null&&w!==void 0?w:t.getPopupContainer)!==null&&O!==void 0?O:(I=r.getPopupContainer)===null||I===void 0?void 0:I.value}),m=E(()=>{var w,O;return(w=t.dropdownMatchSelectWidth)!==null&&w!==void 0?w:(O=r.dropdownMatchSelectWidth)===null||O===void 0?void 0:O.value}),b=E(()=>{var w;return(t.virtual===void 0?((w=r.virtual)===null||w===void 0?void 0:w.value)!==!1:t.virtual!==!1)&&m.value!==!1}),S=E(()=>t.size||n.value),C=E(()=>{var w,O,I;return(w=t.autocomplete)!==null&&w!==void 0?w:(I=(O=r.input)===null||O===void 0?void 0:O.value)===null||I===void 0?void 0:I.autocomplete}),$=E(()=>{var w;return(w=t.disabled)!==null&&w!==void 0?w:o.value}),x=E(()=>{var w;return(w=t.csp)!==null&&w!==void 0?w:r.csp}),P=E(()=>{var w,O;return(w=t.wave)!==null&&w!==void 0?w:(O=r.wave)===null||O===void 0?void 0:O.value});return{configProvider:r,prefixCls:i,direction:a,size:S,getTargetContainer:v,getPopupContainer:h,space:d,pageHeader:f,form:p,autoInsertSpaceInButton:u,renderEmpty:c,virtual:b,dropdownMatchSelectWidth:m,rootPrefixCls:s,getPrefixCls:r.getPrefixCls,autocomplete:C,csp:x,iconPrefixCls:l,disabled:$,select:r.select,wave:P}};function it(e,t){const n=y({},e);for(let o=0;o{const{componentCls:t}=e;return{[t]:{position:"fixed",zIndex:e.zIndexPopup}}},mz=Ue("Affix",e=>{const t=Be(e,{zIndexPopup:e.zIndexBase+10});return[vz(t)]});function bz(){return typeof window<"u"?window:null}var Vs;(function(e){e[e.None=0]="None",e[e.Prepare=1]="Prepare"})(Vs||(Vs={}));const yz=()=>({offsetTop:Number,offsetBottom:Number,target:{type:Function,default:bz},prefixCls:String,onChange:Function,onTestUpdatePosition:Function}),Sz=le({compatConfig:{MODE:3},name:"AAffix",inheritAttrs:!1,props:yz(),setup(e,t){let{slots:n,emit:o,expose:r,attrs:i}=t;const a=se(),l=se(),s=rt({affixStyle:void 0,placeholderStyle:void 0,status:Vs.None,lastAffix:!1,prevTarget:null,timeout:null}),u=Jt(),c=E(()=>e.offsetBottom===void 0&&e.offsetTop===void 0?0:e.offsetTop),d=E(()=>e.offsetBottom),f=()=>{const{status:C,lastAffix:$}=s,{target:x}=e;if(C!==Vs.Prepare||!l.value||!a.value||!x)return;const P=x();if(!P)return;const w={status:Vs.None},O=Vf(a.value);if(O.top===0&&O.left===0&&O.width===0&&O.height===0)return;const I=Vf(P),_=O2(O,I,c.value),T=I2(O,I,d.value);if(!(O.top===0&&O.left===0&&O.width===0&&O.height===0)){if(_!==void 0){const A=`${O.width}px`,R=`${O.height}px`;w.affixStyle={position:"fixed",top:_,width:A,height:R},w.placeholderStyle={width:A,height:R}}else if(T!==void 0){const A=`${O.width}px`,R=`${O.height}px`;w.affixStyle={position:"fixed",bottom:T,width:A,height:R},w.placeholderStyle={width:A,height:R}}w.lastAffix=!!w.affixStyle,$!==w.lastAffix&&o("change",w.lastAffix),y(s,w)}},p=()=>{y(s,{status:Vs.Prepare,affixStyle:void 0,placeholderStyle:void 0})},v=gy(()=>{p()}),h=gy(()=>{const{target:C}=e,{affixStyle:$}=s;if(C&&$){const x=C();if(x&&a.value){const P=Vf(x),w=Vf(a.value),O=O2(w,P,c.value),I=I2(w,P,d.value);if(O!==void 0&&$.top===O||I!==void 0&&$.bottom===I)return}}p()});r({updatePosition:v,lazyUpdatePosition:h}),be(()=>e.target,C=>{const $=(C==null?void 0:C())||null;s.prevTarget!==$&&(E2(u),$&&(T2($,u),v()),s.prevTarget=$)}),be(()=>[e.offsetTop,e.offsetBottom],v),Ke(()=>{const{target:C}=e;C&&(s.timeout=setTimeout(()=>{T2(C(),u),v()}))}),uo(()=>{f()}),Zn(()=>{clearTimeout(s.timeout),E2(u),v.cancel(),h.cancel()});const{prefixCls:m}=Te("affix",e),[b,S]=mz(m);return()=>{var C;const{affixStyle:$,placeholderStyle:x,status:P}=s,w=ge({[m.value]:$,[S.value]:!0}),O=it(e,["prefixCls","offsetTop","offsetBottom","target","onChange","onTestUpdatePosition"]);return b(g(br,{onResize:v},{default:()=>[g("div",k(k(k({},O),i),{},{ref:a,"data-measure-status":P}),[$&&g("div",{style:x,"aria-hidden":"true"},null),g("div",{class:w,ref:l,style:$},[(C=n.default)===null||C===void 0?void 0:C.call(n)])])]}))}}}),R6=Lt(Sz);function Y2(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function q2(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function v0(e,t){if(e.clientHeightt||i>e&&a=t&&l>=n?i-e-o:a>t&&ln?a-t+r:0}var J2=function(e,t){var n=window,o=t.scrollMode,r=t.block,i=t.inline,a=t.boundary,l=t.skipOverflowHiddenElements,s=typeof a=="function"?a:function(J){return J!==a};if(!Y2(e))throw new TypeError("Invalid target");for(var u,c,d=document.scrollingElement||document.documentElement,f=[],p=e;Y2(p)&&s(p);){if((p=(c=(u=p).parentElement)==null?u.getRootNode().host||null:c)===d){f.push(p);break}p!=null&&p===document.body&&v0(p)&&!v0(document.documentElement)||p!=null&&v0(p,l)&&f.push(p)}for(var v=n.visualViewport?n.visualViewport.width:innerWidth,h=n.visualViewport?n.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,S=e.getBoundingClientRect(),C=S.height,$=S.width,x=S.top,P=S.right,w=S.bottom,O=S.left,I=r==="start"||r==="nearest"?x:r==="end"?w:x+C/2,_=i==="center"?O+$/2:i==="end"?P:O,T=[],A=0;A=0&&O>=0&&w<=h&&P<=v&&x>=N&&w<=F&&O>=B&&P<=L)return T;var j=getComputedStyle(R),z=parseInt(j.borderLeftWidth,10),G=parseInt(j.borderTopWidth,10),Q=parseInt(j.borderRightWidth,10),Y=parseInt(j.borderBottomWidth,10),oe=0,Z=0,re="offsetWidth"in R?R.offsetWidth-R.clientWidth-z-Q:0,ne="offsetHeight"in R?R.offsetHeight-R.clientHeight-G-Y:0,X="offsetWidth"in R?R.offsetWidth===0?0:D/R.offsetWidth:0,te="offsetHeight"in R?R.offsetHeight===0?0:M/R.offsetHeight:0;if(d===R)oe=r==="start"?I:r==="end"?I-h:r==="nearest"?Jf(b,b+h,h,G,Y,b+I,b+I+C,C):I-h/2,Z=i==="start"?_:i==="center"?_-v/2:i==="end"?_-v:Jf(m,m+v,v,z,Q,m+_,m+_+$,$),oe=Math.max(0,oe+b),Z=Math.max(0,Z+m);else{oe=r==="start"?I-N-G:r==="end"?I-F+Y+ne:r==="nearest"?Jf(N,F,M,G,Y+ne,I,I+C,C):I-(N+M/2)+ne/2,Z=i==="start"?_-B-z:i==="center"?_-(B+D/2)+re/2:i==="end"?_-L+Q+re:Jf(B,L,D,z,Q+re,_,_+$,$);var W=R.scrollLeft,U=R.scrollTop;I+=U-(oe=Math.max(0,Math.min(U+oe/te,R.scrollHeight-M/te+ne))),_+=W-(Z=Math.max(0,Math.min(W+Z/X,R.scrollWidth-D/X+re)))}T.push({el:R,top:oe,left:Z})}return T};function D6(e){return e===Object(e)&&Object.keys(e).length!==0}function Cz(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(o){var r=o.el,i=o.top,a=o.left;r.scroll&&n?r.scroll({top:i,left:a,behavior:t}):(r.scrollTop=i,r.scrollLeft=a)})}function xz(e){return e===!1?{block:"end",inline:"nearest"}:D6(e)?e:{block:"start",inline:"nearest"}}function N6(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(D6(t)&&typeof t.behavior=="function")return t.behavior(n?J2(e,t):[]);if(n){var o=xz(t);return Cz(J2(e,o),o.behavior)}}function $z(e,t,n,o){const r=n-t;return e/=o/2,e<1?r/2*e*e*e+t:r/2*((e-=2)*e*e+2)+t}function Py(e){return e!=null&&e===e.window}function KS(e,t){var n,o;if(typeof window>"u")return 0;const r="scrollTop";let i=0;return Py(e)?i=e.scrollY:e instanceof Document?i=e.documentElement[r]:(e instanceof HTMLElement||e)&&(i=e[r]),e&&!Py(e)&&typeof i!="number"&&(i=(o=((n=e.ownerDocument)!==null&&n!==void 0?n:e).documentElement)===null||o===void 0?void 0:o[r]),i}function US(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:n=()=>window,callback:o,duration:r=450}=t,i=n(),a=KS(i),l=Date.now(),s=()=>{const c=Date.now()-l,d=$z(c>r?r:c,a,e,r);Py(i)?i.scrollTo(window.scrollX,d):i instanceof Document?i.documentElement.scrollTop=d:i.scrollTop=d,c{Xe(k6,e)},Pz=()=>ze(k6,{registerLink:Zf,unregisterLink:Zf,scrollTo:Zf,activeLink:E(()=>""),handleClick:Zf,direction:E(()=>"vertical")}),Oz=e=>{const{componentCls:t,holderOffsetBlock:n,motionDurationSlow:o,lineWidthBold:r,colorPrimary:i,lineType:a,colorSplit:l}=e;return{[`${t}-wrapper`]:{marginBlockStart:-n,paddingBlockStart:n,backgroundColor:"transparent",[t]:y(y({},qe(e)),{position:"relative",paddingInlineStart:r,[`${t}-link`]:{paddingBlock:e.anchorPaddingBlock,paddingInline:`${e.anchorPaddingInline}px 0`,"&-title":y(y({},cn),{position:"relative",display:"block",marginBlockEnd:e.anchorTitleBlock,color:e.colorText,transition:`all ${e.motionDurationSlow}`,"&:only-child":{marginBlockEnd:0}}),[`&-active > ${t}-link-title`]:{color:e.colorPrimary},[`${t}-link`]:{paddingBlock:e.anchorPaddingBlockSecondary}}}),[`&:not(${t}-wrapper-horizontal)`]:{[t]:{"&::before":{position:"absolute",left:{_skip_check_:!0,value:0},top:0,height:"100%",borderInlineStart:`${r}px ${a} ${l}`,content:'" "'},[`${t}-ink`]:{position:"absolute",left:{_skip_check_:!0,value:0},display:"none",transform:"translateY(-50%)",transition:`top ${o} ease-in-out`,width:r,backgroundColor:i,[`&${t}-ink-visible`]:{display:"inline-block"}}}},[`${t}-fixed ${t}-ink ${t}-ink`]:{display:"none"}}}},Iz=e=>{const{componentCls:t,motionDurationSlow:n,lineWidthBold:o,colorPrimary:r}=e;return{[`${t}-wrapper-horizontal`]:{position:"relative","&::before":{position:"absolute",left:{_skip_check_:!0,value:0},right:{_skip_check_:!0,value:0},bottom:0,borderBottom:`1px ${e.lineType} ${e.colorSplit}`,content:'" "'},[t]:{overflowX:"scroll",position:"relative",display:"flex",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},[`${t}-link:first-of-type`]:{paddingInline:0},[`${t}-ink`]:{position:"absolute",bottom:0,transition:`left ${n} ease-in-out, width ${n} ease-in-out`,height:o,backgroundColor:r}}}}},Tz=Ue("Anchor",e=>{const{fontSize:t,fontSizeLG:n,padding:o,paddingXXS:r}=e,i=Be(e,{holderOffsetBlock:r,anchorPaddingBlock:r,anchorPaddingBlockSecondary:r/2,anchorPaddingInline:o,anchorTitleBlock:t/14*3,anchorBallSize:n/2});return[Oz(i),Iz(i)]}),Ez=()=>({prefixCls:String,href:String,title:It(),target:String,customTitleProps:De()}),GS=le({compatConfig:{MODE:3},name:"AAnchorLink",inheritAttrs:!1,props:Qe(Ez(),{href:"#"}),slots:Object,setup(e,t){let{slots:n,attrs:o}=t,r=null;const{handleClick:i,scrollTo:a,unregisterLink:l,registerLink:s,activeLink:u}=Pz(),{prefixCls:c}=Te("anchor",e),d=f=>{const{href:p}=e;i(f,{title:r,href:p}),a(p)};return be(()=>e.href,(f,p)=>{ot(()=>{l(p),s(f)})}),Ke(()=>{s(e.href)}),tt(()=>{l(e.href)}),()=>{var f;const{href:p,target:v,title:h=n.title,customTitleProps:m={}}=e,b=c.value;r=typeof h=="function"?h(m):h;const S=u.value===p,C=ge(`${b}-link`,{[`${b}-link-active`]:S},o.class),$=ge(`${b}-link-title`,{[`${b}-link-title-active`]:S});return g("div",k(k({},o),{},{class:C}),[g("a",{class:$,href:p,title:typeof r=="string"?r:"",target:v,onClick:d},[n.customTitle?n.customTitle(m):r]),(f=n.default)===null||f===void 0?void 0:f.call(n)])}}});function _z(e,t){for(var n=0;n=0||(r[n]=e[n]);return r}function Z2(e){return((t=e)!=null&&typeof t=="object"&&Array.isArray(t)===!1)==1&&Object.prototype.toString.call(e)==="[object Object]";var t}var H6=Object.prototype,z6=H6.toString,Mz=H6.hasOwnProperty,j6=/^\s*function (\w+)/;function Q2(e){var t,n=(t=e==null?void 0:e.type)!==null&&t!==void 0?t:e;if(n){var o=n.toString().match(j6);return o?o[1]:""}return""}var Wl=function(e){var t,n;return Z2(e)!==!1&&typeof(t=e.constructor)=="function"&&Z2(n=t.prototype)!==!1&&n.hasOwnProperty("isPrototypeOf")!==!1},Az=function(e){return e},Go=Az,Dd=function(e,t){return Mz.call(e,t)},Rz=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},Cc=Array.isArray||function(e){return z6.call(e)==="[object Array]"},xc=function(e){return z6.call(e)==="[object Function]"},Hg=function(e){return Wl(e)&&Dd(e,"_vueTypes_name")},W6=function(e){return Wl(e)&&(Dd(e,"type")||["_vueTypes_name","validator","default","required"].some(function(t){return Dd(e,t)}))};function XS(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function os(e,t,n){var o,r=!0,i="";o=Wl(e)?e:{type:e};var a=Hg(o)?o._vueTypes_name+" - ":"";if(W6(o)&&o.type!==null){if(o.type===void 0||o.type===!0||!o.required&&t===void 0)return r;Cc(o.type)?(r=o.type.some(function(d){return os(d,t)===!0}),i=o.type.map(function(d){return Q2(d)}).join(" or ")):r=(i=Q2(o))==="Array"?Cc(t):i==="Object"?Wl(t):i==="String"||i==="Number"||i==="Boolean"||i==="Function"?function(d){if(d==null)return"";var f=d.constructor.toString().match(j6);return f?f[1]:""}(t)===i:t instanceof o.type}if(!r){var l=a+'value "'+t+'" should be of type "'+i+'"';return l}if(Dd(o,"validator")&&xc(o.validator)){var s=Go,u=[];if(Go=function(d){u.push(d)},r=o.validator(t),Go=s,!r){var c=(u.length>1?"* ":"")+u.join(` * `);return u.length=0,c}}return r}function qo(e,t){var n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get:function(){return this.required=!0,this}},def:{value:function(r){return r!==void 0||this.default?xc(r)||os(this,r)===!0?(this.default=Cc(r)?function(){return[].concat(r)}:Wl(r)?function(){return Object.assign({},r)}:r,this):(Go(this._vueTypes_name+' - invalid default value: "'+r+'"'),this):this}}}),o=n.validator;return xc(o)&&(n.validator=XS(o,n)),n}function hi(e,t){var n=qo(e,t);return Object.defineProperty(n,"validate",{value:function(o){return xc(this.validator)&&Go(this._vueTypes_name+` - calling .validate() will overwrite the current custom validator function. Validator info: -`+JSON.stringify(this)),this.validator=XS(o,this),this}})}function eP(e,t,n){var o,r,i=(o=t,r={},Object.getOwnPropertyNames(o).forEach(function(d){r[d]=Object.getOwnPropertyDescriptor(o,d)}),Object.defineProperties({},r));if(i._vueTypes_name=e,!Wl(n))return i;var a,l,s=n.validator,u=B6(n,["validator"]);if(xc(s)){var c=i.validator;c&&(c=(l=(a=c).__original)!==null&&l!==void 0?l:a),i.validator=XS(c?function(d){return c.call(this,d)&&s.call(this,d)}:s,i)}return Object.assign(i,u)}function $v(e){return e.replace(/^(?!\s*$)/gm," ")}var Dz=function(){return hi("any",{})},Nz=function(){return hi("function",{type:Function})},kz=function(){return hi("boolean",{type:Boolean})},Lz=function(){return hi("string",{type:String})},Fz=function(){return hi("number",{type:Number})},Bz=function(){return hi("array",{type:Array})},Hz=function(){return hi("object",{type:Object})},zz=function(){return qo("integer",{type:Number,validator:function(e){return Rz(e)}})},jz=function(){return qo("symbol",{validator:function(e){return typeof e=="symbol"}})};function Wz(e,t){if(t===void 0&&(t="custom validation failed"),typeof e!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return qo(e.name||"<>",{validator:function(n){var o=e(n);return o||Go(this._vueTypes_name+" - "+t),o}})}function Vz(e){if(!Cc(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");var t='oneOf - value should be one of "'+e.join('", "')+'".',n=e.reduce(function(o,r){if(r!=null){var i=r.constructor;o.indexOf(i)===-1&&o.push(i)}return o},[]);return qo("oneOf",{type:n.length>0?n:void 0,validator:function(o){var r=e.indexOf(o)!==-1;return r||Go(t),r}})}function Kz(e){if(!Cc(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");for(var t=!1,n=[],o=0;o>",{validator:function(n){var o=e(n);return o||Go(this._vueTypes_name+" - "+t),o}})}function Vz(e){if(!Cc(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");var t='oneOf - value should be one of "'+e.join('", "')+'".',n=e.reduce(function(o,r){if(r!=null){var i=r.constructor;o.indexOf(i)===-1&&o.push(i)}return o},[]);return qo("oneOf",{type:n.length>0?n:void 0,validator:function(o){var r=e.indexOf(o)!==-1;return r||Go(t),r}})}function Kz(e){if(!Cc(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");for(var t=!1,n=[],o=0;o0&&n.some(function(s){return a.indexOf(s)===-1})){var l=n.filter(function(s){return a.indexOf(s)===-1});return Go(l.length===1?'shape - required property "'+l[0]+'" is not defined.':'shape - required properties "'+l.join('", "')+'" are not defined.'),!1}return a.every(function(s){if(t.indexOf(s)===-1)return i._vueTypes_isLoose===!0||(Go('shape - shape definition does not include a "'+s+'" property. Allowed keys: "'+t.join('", "')+'".'),!1);var u=os(e[s],r[s]);return typeof u=="string"&&Go('shape - "'+s+`" property validation error: - `+$v(u)),u===!0})}});return Object.defineProperty(o,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(o,"loose",{get:function(){return this._vueTypes_isLoose=!0,this}}),o}var ti=function(){function e(){}return e.extend=function(t){var n=this;if(Cc(t))return t.forEach(function(d){return n.extend(d)}),this;var o=t.name,r=t.validate,i=r!==void 0&&r,a=t.getter,l=a!==void 0&&a,s=B6(t,["name","validate","getter"]);if(Dd(this,o))throw new TypeError('[VueTypes error]: Type "'+o+'" already defined');var u,c=s.type;return zg(c)?(delete s.type,Object.defineProperty(this,o,l?{get:function(){return eP(o,c,s)}}:{value:function(){var d,f=eP(o,c,s);return f.validator&&(f.validator=(d=f.validator).bind.apply(d,[f].concat([].slice.call(arguments)))),f}})):(u=l?{get:function(){var d=Object.assign({},s);return i?hi(o,d):qo(o,d)},enumerable:!0}:{value:function(){var d,f,p=Object.assign({},s);return d=i?hi(o,p):qo(o,p),p.validator&&(d.validator=(f=p.validator).bind.apply(f,[d].concat([].slice.call(arguments)))),d},enumerable:!0},Object.defineProperty(this,o,u))},L6(e,null,[{key:"any",get:function(){return Dz()}},{key:"func",get:function(){return Nz().def(this.defaults.func)}},{key:"bool",get:function(){return kz().def(this.defaults.bool)}},{key:"string",get:function(){return Lz().def(this.defaults.string)}},{key:"number",get:function(){return Fz().def(this.defaults.number)}},{key:"array",get:function(){return Bz().def(this.defaults.array)}},{key:"object",get:function(){return Hz().def(this.defaults.object)}},{key:"integer",get:function(){return zz().def(this.defaults.integer)}},{key:"symbol",get:function(){return jz()}}]),e}();function V6(e){var t;return e===void 0&&(e={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),(t=function(n){function o(){return n.apply(this,arguments)||this}return F6(o,n),L6(o,null,[{key:"sensibleDefaults",get:function(){return zp({},this.defaults)},set:function(r){this.defaults=r!==!1?zp({},r!==!0?r:e):{}}}]),o}(ti)).defaults=zp({},e),t}ti.defaults={},ti.custom=Wz,ti.oneOf=Vz,ti.instanceOf=Gz,ti.oneOfType=Kz,ti.arrayOf=Uz,ti.objectOf=Xz,ti.shape=Yz,ti.utils={validate:function(e,t){return os(t,e)===!0},toType:function(e,t,n){return n===void 0&&(n=!1),n?hi(e,t):qo(e,t)}};(function(e){function t(){return e.apply(this,arguments)||this}return F6(t,e),t})(V6());const K=V6({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});K.extend([{name:"looseBool",getter:!0,type:Boolean,default:void 0},{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VueNode",getter:!0,type:null}]);function K6(e){return e.default=void 0,e}const Mt=(e,t,n)=>{FS(e,`[ant-design-vue: ${t}] ${n}`)};function qz(){return window}function tP(e,t){if(!e.getClientRects().length)return 0;const n=e.getBoundingClientRect();return n.width||n.height?t===window?(t=e.ownerDocument.documentElement,n.top-t.clientTop):n.top-t.getBoundingClientRect().top:n.top}const nP=/#([\S ]+)$/,Jz=()=>({prefixCls:String,offsetTop:Number,bounds:Number,affix:{type:Boolean,default:!0},showInkInFixed:{type:Boolean,default:!1},getContainer:Function,wrapperClass:String,wrapperStyle:{type:Object,default:void 0},getCurrentAnchor:Function,targetOffset:Number,items:pt(),direction:K.oneOf(["vertical","horizontal"]).def("vertical"),onChange:Function,onClick:Function}),Cl=le({compatConfig:{MODE:3},name:"AAnchor",inheritAttrs:!1,props:Jz(),setup(e,t){let{emit:n,attrs:o,slots:r,expose:i}=t;const{prefixCls:a,getTargetContainer:l,direction:s}=Te("anchor",e),u=E(()=>{var w;return(w=e.direction)!==null&&w!==void 0?w:"vertical"}),c=ae(null),d=ae(),f=rt({links:[],scrollContainer:null,scrollEvent:null,animating:!1}),p=ae(null),v=E(()=>{const{getContainer:w}=e;return w||(l==null?void 0:l.value)||qz}),h=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5;const I=[],_=v.value();return f.links.forEach(T=>{const A=nP.exec(T.toString());if(!A)return;const R=document.getElementById(A[1]);if(R){const H=tP(R,_);HR.top>A.top?R:A).link:""},m=w=>{const{getCurrentAnchor:O}=e;p.value!==w&&(p.value=typeof O=="function"?O(w):w,n("change",w))},b=w=>{const{offsetTop:O,targetOffset:I}=e;m(w);const _=nP.exec(w);if(!_)return;const T=document.getElementById(_[1]);if(!T)return;const A=v.value(),R=KS(A),H=tP(T,A);let M=R+H;M-=I!==void 0?I:O||0,f.animating=!0,US(M,{callback:()=>{f.animating=!1},getContainer:v.value})};i({scrollTo:b});const S=()=>{if(f.animating)return;const{offsetTop:w,bounds:O,targetOffset:I}=e,_=h(I!==void 0?I:w||0,O);m(_)},C=()=>{const w=d.value.querySelector(`.${a.value}-link-title-active`);if(w&&c.value){const O=u.value==="horizontal";c.value.style.top=O?"":`${w.offsetTop+w.clientHeight/2}px`,c.value.style.height=O?"":`${w.clientHeight}px`,c.value.style.left=O?`${w.offsetLeft}px`:"",c.value.style.width=O?`${w.clientWidth}px`:"",O&&N6(w,{scrollMode:"if-needed",block:"nearest"})}};wz({registerLink:w=>{f.links.includes(w)||f.links.push(w)},unregisterLink:w=>{const O=f.links.indexOf(w);O!==-1&&f.links.splice(O,1)},activeLink:p,scrollTo:b,handleClick:(w,O)=>{n("click",w,O)},direction:u}),Ke(()=>{ot(()=>{const w=v.value();f.scrollContainer=w,f.scrollEvent=Ht(f.scrollContainer,"scroll",S),S()})}),tt(()=>{f.scrollEvent&&f.scrollEvent.remove()}),uo(()=>{if(f.scrollEvent){const w=v.value();f.scrollContainer!==w&&(f.scrollContainer=w,f.scrollEvent.remove(),f.scrollEvent=Ht(f.scrollContainer,"scroll",S),S())}C()});const $=w=>Array.isArray(w)?w.map(O=>{const{children:I,key:_,href:T,target:A,class:R,style:H,title:M}=O;return g(GS,{key:_,href:T,target:A,class:R,style:H,title:M,customTitleProps:O},{default:()=>[u.value==="vertical"?$(I):null],customTitle:r.customTitle})}):null,[x,P]=Tz(a);return()=>{var w;const{offsetTop:O,affix:I,showInkInFixed:_}=e,T=a.value,A=ge(`${T}-ink`,{[`${T}-ink-visible`]:p.value}),R=ge(P.value,e.wrapperClass,`${T}-wrapper`,{[`${T}-wrapper-horizontal`]:u.value==="horizontal",[`${T}-rtl`]:s.value==="rtl"}),H=ge(T,{[`${T}-fixed`]:!I&&!_}),M=y({maxHeight:O?`calc(100vh - ${O}px)`:"100vh"},e.wrapperStyle),D=g("div",{class:R,style:M,ref:d},[g("div",{class:H},[g("span",{class:A,ref:c},null),Array.isArray(e.items)?$(e.items):(w=r.default)===null||w===void 0?void 0:w.call(r)])]);return x(I?g(R6,k(k({},o),{},{offsetTop:O,target:v.value}),{default:()=>[D]}):D)}}});Cl.Link=GS;Cl.install=function(e){return e.component(Cl.name,Cl),e.component(Cl.Link.name,Cl.Link),e};function oP(e,t){const{key:n}=e;let o;return"value"in e&&({value:o}=e),n??(o!==void 0?o:`rc-index-key-${t}`)}function U6(e,t){const{label:n,value:o,options:r}=e||{};return{label:n||(t?"children":"label"),value:o||"value",options:r||"options"}}function Zz(e){let{fieldNames:t,childrenAsData:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=[],{label:r,value:i,options:a}=U6(t,!1);function l(s,u){s.forEach(c=>{const d=c[r];if(u||!(a in c)){const f=c[i];o.push({key:oP(c,o.length),groupOption:u,data:c,label:d,value:f})}else{let f=d;f===void 0&&n&&(f=c.label),o.push({key:oP(c,o.length),group:!0,data:c,label:f}),l(c[a],!0)}})}return l(e,!1),o}function Oy(e){const t=y({},e);return"props"in t||Object.defineProperty(t,"props",{get(){return t}}),t}function Qz(e,t){if(!t||!t.length)return null;let n=!1;function o(i,a){let[l,...s]=a;if(!l)return[i];const u=i.split(l);return n=n||u.length>1,u.reduce((c,d)=>[...c,...o(d,s)],[]).filter(c=>c)}const r=o(e,t);return n?r:null}function ej(){return""}function tj(e){return e?e.ownerDocument:window.document}function G6(){}const X6=()=>({action:K.oneOfType([K.string,K.arrayOf(K.string)]).def([]),showAction:K.any.def([]),hideAction:K.any.def([]),getPopupClassNameFromAlign:K.any.def(ej),onPopupVisibleChange:Function,afterPopupVisibleChange:K.func.def(G6),popup:K.any,arrow:K.bool.def(!0),popupStyle:{type:Object,default:void 0},prefixCls:K.string.def("rc-trigger-popup"),popupClassName:K.string.def(""),popupPlacement:String,builtinPlacements:K.object,popupTransitionName:String,popupAnimation:K.any,mouseEnterDelay:K.number.def(0),mouseLeaveDelay:K.number.def(.1),zIndex:Number,focusDelay:K.number.def(0),blurDelay:K.number.def(.15),getPopupContainer:Function,getDocument:K.func.def(tj),forceRender:{type:Boolean,default:void 0},destroyPopupOnHide:{type:Boolean,default:!1},mask:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},popupAlign:K.object.def(()=>({})),popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},maskTransitionName:String,maskAnimation:String,stretch:String,alignPoint:{type:Boolean,default:void 0},autoDestroy:{type:Boolean,default:!1},mobile:Object,getTriggerDOMNode:Function}),YS={visible:Boolean,prefixCls:String,zIndex:Number,destroyPopupOnHide:Boolean,forceRender:Boolean,arrow:{type:Boolean,default:!0},animation:[String,Object],transitionName:String,stretch:{type:String},align:{type:Object},point:{type:Object},getRootDomNode:{type:Function},getClassNameFromAlign:{type:Function},onAlign:{type:Function},onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function},onTouchstart:{type:Function}},nj=y(y({},YS),{mobile:{type:Object}}),oj=y(y({},YS),{mask:Boolean,mobile:{type:Object},maskAnimation:String,maskTransitionName:String});function qS(e){let{prefixCls:t,animation:n,transitionName:o}=e;return n?{name:`${t}-${n}`}:o?{name:o}:{}}function Y6(e){const{prefixCls:t,visible:n,zIndex:o,mask:r,maskAnimation:i,maskTransitionName:a}=e;if(!r)return null;let l={};return(a||i)&&(l=qS({prefixCls:t,transitionName:a,animation:i})),g(Nn,k({appear:!0},l),{default:()=>[Pn(g("div",{style:{zIndex:o},class:`${t}-mask`},null),[[pF("if"),n]])]})}Y6.displayName="Mask";const rj=le({compatConfig:{MODE:3},name:"MobilePopupInner",inheritAttrs:!1,props:nj,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup(e,t){let{expose:n,slots:o}=t;const r=ae();return n({forceAlign:()=>{},getElement:()=>r.value}),()=>{var i;const{zIndex:a,visible:l,prefixCls:s,mobile:{popupClassName:u,popupStyle:c,popupMotion:d={},popupRender:f}={}}=e,p=y({zIndex:a},c);let v=Ot((i=o.default)===null||i===void 0?void 0:i.call(o));v.length>1&&(v=g("div",{class:`${s}-content`},[v])),f&&(v=f(v));const h=ge(s,u);return g(Nn,k({ref:r},d),{default:()=>[l?g("div",{class:h,style:p},[v]):null]})}}});var ij=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function l(c){try{u(o.next(c))}catch(d){a(d)}}function s(c){try{u(o.throw(c))}catch(d){a(d)}}function u(c){c.done?i(c.value):r(c.value).then(l,s)}u((o=o.apply(e,t||[])).next())})};const rP=["measure","align",null,"motion"],aj=(e,t)=>{const n=se(null),o=se(),r=se(!1);function i(s){r.value||(n.value=s)}function a(){Ze.cancel(o.value)}function l(s){a(),o.value=Ze(()=>{let u=n.value;switch(n.value){case"align":u="motion";break;case"motion":u="stable";break}i(u),s==null||s()})}return be(e,()=>{i("measure")},{immediate:!0,flush:"post"}),Ke(()=>{be(n,()=>{switch(n.value){case"measure":t();break}n.value&&(o.value=Ze(()=>ij(void 0,void 0,void 0,function*(){const s=rP.indexOf(n.value),u=rP[s+1];u&&s!==-1&&i(u)})))},{immediate:!0,flush:"post"})}),tt(()=>{r.value=!0,a()}),[n,l]},lj=e=>{const t=se({width:0,height:0});function n(r){t.value={width:r.offsetWidth,height:r.offsetHeight}}return[E(()=>{const r={};if(e.value){const{width:i,height:a}=t.value;e.value.indexOf("height")!==-1&&a?r.height=`${a}px`:e.value.indexOf("minHeight")!==-1&&a&&(r.minHeight=`${a}px`),e.value.indexOf("width")!==-1&&i?r.width=`${i}px`:e.value.indexOf("minWidth")!==-1&&i&&(r.minWidth=`${i}px`)}return r}),n]};function iP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function aP(e){for(var t=1;t=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function _j(e,t,n,o){var r=vt.clone(e),i={width:t.width,height:t.height};return o.adjustX&&r.left=n.left&&r.left+i.width>n.right&&(i.width-=r.left+i.width-n.right),o.adjustX&&r.left+i.width>n.right&&(r.left=Math.max(n.right-i.width,n.left)),o.adjustY&&r.top=n.top&&r.top+i.height>n.bottom&&(i.height-=r.top+i.height-n.bottom),o.adjustY&&r.top+i.height>n.bottom&&(r.top=Math.max(n.bottom-i.height,n.top)),vt.mix(r,i)}function eC(e){var t,n,o;if(!vt.isWindow(e)&&e.nodeType!==9)t=vt.offset(e),n=vt.outerWidth(e),o=vt.outerHeight(e);else{var r=vt.getWindow(e);t={left:vt.getWindowScrollLeft(r),top:vt.getWindowScrollTop(r)},n=vt.viewportWidth(r),o=vt.viewportHeight(r)}return t.width=n,t.height=o,t}function gP(e,t){var n=t.charAt(0),o=t.charAt(1),r=e.width,i=e.height,a=e.left,l=e.top;return n==="c"?l+=i/2:n==="b"&&(l+=i),o==="c"?a+=r/2:o==="r"&&(a+=r),{left:a,top:l}}function ep(e,t,n,o,r){var i=gP(t,n[1]),a=gP(e,n[0]),l=[a.left-i.left,a.top-i.top];return{left:Math.round(e.left-l[0]+o[0]-r[0]),top:Math.round(e.top-l[1]+o[1]-r[1])}}function hP(e,t,n){return e.leftn.right}function vP(e,t,n){return e.topn.bottom}function Mj(e,t,n){return e.left>n.right||e.left+t.widthn.bottom||e.top+t.height=n.right||o.top>=n.bottom}function tC(e,t,n){var o=n.target||t,r=eC(o),i=!Rj(o,n.overflow&&n.overflow.alwaysByViewport);return o8(e,r,n,i)}tC.__getOffsetParent=_y;tC.__getVisibleRectForElement=QS;function Dj(e,t,n){var o,r,i=vt.getDocument(e),a=i.defaultView||i.parentWindow,l=vt.getWindowScrollLeft(a),s=vt.getWindowScrollTop(a),u=vt.viewportWidth(a),c=vt.viewportHeight(a);"pageX"in t?o=t.pageX:o=l+t.clientX,"pageY"in t?r=t.pageY:r=s+t.clientY;var d={left:o,top:r,width:0,height:0},f=o>=0&&o<=l+u&&r>=0&&r<=s+c,p=[n.points[0],"cc"];return o8(e,d,aP(aP({},n),{},{points:p}),f)}function mt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,r=e;if(Array.isArray(e)&&(r=zt(e)[0]),!r)return null;const i=Dn(r,t,o);return i.props=n?y(y({},i.props),t):i.props,Yo(typeof i.props.class!="object"),i}function Nj(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e.map(o=>mt(o,t,n))}function Zu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Array.isArray(e))return e.map(r=>Zu(r,t,n,o));{if(!ln(e))return e;const r=mt(e,t,n,o);return Array.isArray(r.children)&&(r.children=Zu(r.children)),r}}function kj(e,t,n){Fa(Dn(e,y({},t)),n)}const r8=e=>(e||[]).some(t=>ln(t)?!(t.type===Bn||t.type===Le&&!r8(t.children)):!0)?e:null;function Pv(e,t,n,o){var r;const i=(r=e[t])===null||r===void 0?void 0:r.call(e,n);return r8(i)?i:o==null?void 0:o()}const Ov=e=>{if(!e)return!1;if(e.offsetParent)return!0;if(e.getBBox){const t=e.getBBox();if(t.width||t.height)return!0}if(e.getBoundingClientRect){const t=e.getBoundingClientRect();if(t.width||t.height)return!0}return!1};function Lj(e,t){return e===t?!0:!e||!t?!1:"pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t?e.clientX===t.clientX&&e.clientY===t.clientY:!1}function Fj(e,t){e!==document.activeElement&&Pa(t,e)&&typeof e.focus=="function"&&e.focus()}function yP(e,t){let n=null,o=null;function r(a){let[{target:l}]=a;if(!document.documentElement.contains(l))return;const{width:s,height:u}=l.getBoundingClientRect(),c=Math.floor(s),d=Math.floor(u);(n!==c||o!==d)&&Promise.resolve().then(()=>{t({width:c,height:d})}),n=c,o=d}const i=new AS(r);return e&&i.observe(e),()=>{i.disconnect()}}const Bj=(e,t)=>{let n=!1,o=null;function r(){clearTimeout(o)}function i(a){if(!n||a===!0){if(e()===!1)return;n=!0,r(),o=setTimeout(()=>{n=!1},t.value)}else r(),o=setTimeout(()=>{n=!1,i()},t.value)}return[i,()=>{n=!1,r()}]};function Hj(){this.__data__=[],this.size=0}function pf(e,t){return e===t||e!==e&&t!==t}function Iv(e,t){for(var n=e.length;n--;)if(pf(e[n][0],t))return n;return-1}var zj=Array.prototype,jj=zj.splice;function Wj(e){var t=this.__data__,n=Iv(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():jj.call(t,n,1),--this.size,!0}function Vj(e){var t=this.__data__,n=Iv(t,e);return n<0?void 0:t[n][1]}function Kj(e){return Iv(this.__data__,e)>-1}function Uj(e,t){var n=this.__data__,o=Iv(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}function oa(e){var t=-1,n=e==null?0:e.length;for(this.clear();++tl))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=n&UW?new $c:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=SV}var CV="[object Arguments]",xV="[object Array]",$V="[object Boolean]",wV="[object Date]",PV="[object Error]",OV="[object Function]",IV="[object Map]",TV="[object Number]",EV="[object Object]",_V="[object RegExp]",MV="[object Set]",AV="[object String]",RV="[object WeakMap]",DV="[object ArrayBuffer]",NV="[object DataView]",kV="[object Float32Array]",LV="[object Float64Array]",FV="[object Int8Array]",BV="[object Int16Array]",HV="[object Int32Array]",zV="[object Uint8Array]",jV="[object Uint8ClampedArray]",WV="[object Uint16Array]",VV="[object Uint32Array]",Gt={};Gt[kV]=Gt[LV]=Gt[FV]=Gt[BV]=Gt[HV]=Gt[zV]=Gt[jV]=Gt[WV]=Gt[VV]=!0;Gt[CV]=Gt[xV]=Gt[DV]=Gt[$V]=Gt[NV]=Gt[wV]=Gt[PV]=Gt[OV]=Gt[IV]=Gt[TV]=Gt[EV]=Gt[_V]=Gt[MV]=Gt[AV]=Gt[RV]=!1;function KV(e){return Ur(e)&&aC(e.length)&&!!Gt[Ka(e)]}function lC(e){return function(t){return e(t)}}var f8=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Qu=f8&&typeof module=="object"&&module&&!module.nodeType&&module,UV=Qu&&Qu.exports===f8,$0=UV&&i8.process,Oc=function(){try{var e=Qu&&Qu.require&&Qu.require("util").types;return e||$0&&$0.binding&&$0.binding("util")}catch{}}(),IP=Oc&&Oc.isTypedArray,_v=IP?lC(IP):KV,GV=Object.prototype,XV=GV.hasOwnProperty;function p8(e,t){var n=wo(e),o=!n&&wc(e),r=!n&&!o&&Pc(e),i=!n&&!o&&!r&&_v(e),a=n||o||r||i,l=a?dV(e.length,String):[],s=l.length;for(var u in e)(t||XV.call(e,u))&&!(a&&(u=="length"||r&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Ev(u,s)))&&l.push(u);return l}var YV=Object.prototype;function Mv(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||YV;return e===n}function g8(e,t){return function(n){return e(t(n))}}var qV=g8(Object.keys,Object),JV=Object.prototype,ZV=JV.hasOwnProperty;function h8(e){if(!Mv(e))return qV(e);var t=[];for(var n in Object(e))ZV.call(e,n)&&n!="constructor"&&t.push(n);return t}function as(e){return e!=null&&aC(e.length)&&!nC(e)}function Gc(e){return as(e)?p8(e):h8(e)}function My(e){return s8(e,Gc,iC)}var QV=1,eK=Object.prototype,tK=eK.hasOwnProperty;function nK(e,t,n,o,r,i){var a=n&QV,l=My(e),s=l.length,u=My(t),c=u.length;if(s!=c&&!a)return!1;for(var d=s;d--;){var f=l[d];if(!(a?f in t:tK.call(t,f)))return!1}var p=i.get(e),v=i.get(t);if(p&&v)return p==t&&v==e;var h=!0;i.set(e,t),i.set(t,e);for(var m=a;++d{const{disabled:f,target:p,align:v,onAlign:h}=e;if(!f&&p&&i.value){const m=i.value;let b;const S=kP(p),C=LP(p);r.value.element=S,r.value.point=C,r.value.align=v;const{activeElement:$}=document;return S&&Ov(S)?b=tC(m,S,v):C&&(b=Dj(m,C,v)),Fj($,m),h&&b&&h(m,b),!0}return!1},E(()=>e.monitorBufferTime)),s=ae({cancel:()=>{}}),u=ae({cancel:()=>{}}),c=()=>{const f=e.target,p=kP(f),v=LP(f);i.value!==u.value.element&&(u.value.cancel(),u.value.element=i.value,u.value.cancel=yP(i.value,a)),(r.value.element!==p||!Lj(r.value.point,v)||!sC(r.value.align,e.align))&&(a(),s.value.element!==p&&(s.value.cancel(),s.value.element=p,s.value.cancel=yP(p,a)))};Ke(()=>{ot(()=>{c()})}),uo(()=>{ot(()=>{c()})}),be(()=>e.disabled,f=>{f?l():a()},{immediate:!0,flush:"post"});const d=ae(null);return be(()=>e.monitorWindowResize,f=>{f?d.value||(d.value=Ht(window,"resize",a)):d.value&&(d.value.remove(),d.value=null)},{flush:"post"}),Zn(()=>{s.value.cancel(),u.value.cancel(),d.value&&d.value.remove(),l()}),n({forceAlign:()=>a(!0)}),()=>{const f=o==null?void 0:o.default();return f?mt(f[0],{ref:i},!0,!0):null}}});Jn("bottomLeft","bottomRight","topLeft","topRight");const cC=e=>e!==void 0&&(e==="topLeft"||e==="topRight")?"slide-down":"slide-up",Cr=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return y(e?{name:e,appear:!0,enterFromClass:`${e}-enter ${e}-enter-prepare ${e}-enter-start`,enterActiveClass:`${e}-enter ${e}-enter-prepare`,enterToClass:`${e}-enter ${e}-enter-active`,leaveFromClass:` ${e}-leave`,leaveActiveClass:`${e}-leave ${e}-leave-active`,leaveToClass:`${e}-leave ${e}-leave-active`}:{css:!1},t)},Rv=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return y(e?{name:e,appear:!0,appearActiveClass:`${e}`,appearToClass:`${e}-appear ${e}-appear-active`,enterFromClass:`${e}-appear ${e}-enter ${e}-appear-prepare ${e}-enter-prepare`,enterActiveClass:`${e}`,enterToClass:`${e}-enter ${e}-appear ${e}-appear-active ${e}-enter-active`,leaveActiveClass:`${e} ${e}-leave`,leaveToClass:`${e}-leave-active`}:{css:!1},t)},co=(e,t,n)=>n!==void 0?n:`${e}-${t}`,gK=le({compatConfig:{MODE:3},name:"PopupInner",inheritAttrs:!1,props:YS,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup(e,t){let{expose:n,attrs:o,slots:r}=t;const i=se(),a=se(),l=se(),[s,u]=lj(We(e,"stretch")),c=()=>{e.stretch&&u(e.getRootDomNode())},d=se(!1);let f;be(()=>e.visible,P=>{clearTimeout(f),P?f=setTimeout(()=>{d.value=e.visible}):d.value=!1},{immediate:!0});const[p,v]=aj(d,c),h=se(),m=()=>e.point?e.point:e.getRootDomNode,b=()=>{var P;(P=i.value)===null||P===void 0||P.forceAlign()},S=(P,w)=>{var O;const I=e.getClassNameFromAlign(w),_=l.value;l.value!==I&&(l.value=I),p.value==="align"&&(_!==I?Promise.resolve().then(()=>{b()}):v(()=>{var T;(T=h.value)===null||T===void 0||T.call(h)}),(O=e.onAlign)===null||O===void 0||O.call(e,P,w))},C=E(()=>{const P=typeof e.animation=="object"?e.animation:qS(e);return["onAfterEnter","onAfterLeave"].forEach(w=>{const O=P[w];P[w]=I=>{v(),p.value="stable",O==null||O(I)}}),P}),$=()=>new Promise(P=>{h.value=P});be([C,p],()=>{!C.value&&p.value==="motion"&&v()},{immediate:!0}),n({forceAlign:b,getElement:()=>a.value.$el||a.value});const x=E(()=>{var P;return!(!((P=e.align)===null||P===void 0)&&P.points&&(p.value==="align"||p.value==="stable"))});return()=>{var P;const{zIndex:w,align:O,prefixCls:I,destroyPopupOnHide:_,onMouseenter:T,onMouseleave:A,onTouchstart:R=()=>{},onMousedown:H}=e,M=p.value,D=[y(y({},s.value),{zIndex:w,opacity:M==="motion"||M==="stable"||!d.value?null:0,pointerEvents:!d.value&&M!=="stable"?"none":null}),o.style];let N=Ot((P=r.default)===null||P===void 0?void 0:P.call(r,{visible:e.visible}));N.length>1&&(N=g("div",{class:`${I}-content`},[N]));const L=ge(I,o.class,l.value,!e.arrow&&`${I}-arrow-hidden`),B=d.value||!e.visible?Cr(C.value.name,C.value):{};return g(Nn,k(k({ref:a},B),{},{onBeforeEnter:$}),{default:()=>!_||e.visible?Pn(g(pK,{target:m(),key:"popup",ref:i,monitorWindowResize:!0,disabled:x.value,align:O,onAlign:S},{default:()=>g("div",{class:L,onMouseenter:T,onMouseleave:A,onMousedown:m2(H,["capture"]),[hn?"onTouchstartPassive":"onTouchstart"]:m2(R,["capture"]),style:D},[N])}),[[Vn,d.value]]):null})}}}),hK=le({compatConfig:{MODE:3},name:"Popup",inheritAttrs:!1,props:oj,setup(e,t){let{attrs:n,slots:o,expose:r}=t;const i=se(!1),a=se(!1),l=se(),s=se();return be([()=>e.visible,()=>e.mobile],()=>{i.value=e.visible,e.visible&&e.mobile&&(a.value=!0)},{immediate:!0,flush:"post"}),r({forceAlign:()=>{var u;(u=l.value)===null||u===void 0||u.forceAlign()},getElement:()=>{var u;return(u=l.value)===null||u===void 0?void 0:u.getElement()}}),()=>{const u=y(y(y({},e),n),{visible:i.value}),c=a.value?g(rj,k(k({},u),{},{mobile:e.mobile,ref:l}),{default:o.default}):g(gK,k(k({},u),{},{ref:l}),{default:o.default});return g("div",{ref:s},[g(Y6,u,null),c])}}});function vK(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function FP(e,t,n){const o=e[t]||{};return y(y({},o),n)}function mK(e,t,n,o){const{points:r}=n,i=Object.keys(e);for(let a=0;a0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=typeof e=="function"?e(this.$data,this.$props):e;if(this.getDerivedStateFromProps){const o=this.getDerivedStateFromProps(jM(this),y(y({},this.$data),n));if(o===null)return;n=y(y({},n),o||{})}y(this.$data,n),this._.isMounted&&this.$forceUpdate(),ot(()=>{t&&t()})},__emit(){const e=[].slice.call(arguments,0);let t=e[0];t=`on${t[0].toUpperCase()}${t.substring(1)}`;const n=this.$props[t]||this.$attrs[t];if(e.length&&n)if(Array.isArray(n))for(let o=0,r=n.length;o1&&arguments[1]!==void 0?arguments[1]:{inTriggerContext:!0};Xe(v8,{inTriggerContext:t.inTriggerContext,shouldRender:E(()=>{const{sPopupVisible:n,popupRef:o,forceRender:r,autoDestroy:i}=e||{};let a=!1;return(n||o||r)&&(a=!0),!n&&i&&(a=!1),a})})},bK=()=>{uC({},{inTriggerContext:!1});const e=ze(v8,{shouldRender:E(()=>!1),inTriggerContext:!1});return{shouldRender:E(()=>e.shouldRender.value||e.inTriggerContext===!1)}},m8=le({compatConfig:{MODE:3},name:"Portal",inheritAttrs:!1,props:{getContainer:K.func.isRequired,didUpdate:Function},setup(e,t){let{slots:n}=t,o=!0,r;const{shouldRender:i}=bK();function a(){i.value&&(r=e.getContainer())}cf(()=>{o=!1,a()}),Ke(()=>{r||a()});const l=be(i,()=>{i.value&&!r&&(r=e.getContainer()),r&&l()});return uo(()=>{ot(()=>{var s;i.value&&((s=e.didUpdate)===null||s===void 0||s.call(e,e))})}),()=>{var s;return i.value?o?(s=n.default)===null||s===void 0?void 0:s.call(n):r?g(iv,{to:r},n):null:null}}});let w0;function Kg(e){if(typeof document>"u")return 0;if(w0===void 0){const t=document.createElement("div");t.style.width="100%",t.style.height="200px";const n=document.createElement("div"),o=n.style;o.position="absolute",o.top="0",o.left="0",o.pointerEvents="none",o.visibility="hidden",o.width="200px",o.height="150px",o.overflow="hidden",n.appendChild(t),document.body.appendChild(n);const r=t.offsetWidth;n.style.overflow="scroll";let i=t.offsetWidth;r===i&&(i=n.clientWidth),document.body.removeChild(n),w0=r-i}return w0}function BP(e){const t=e.match(/^(.*)px$/),n=Number(t==null?void 0:t[1]);return Number.isNaN(n)?Kg():n}function yK(e){if(typeof document>"u"||!e||!(e instanceof Element))return{width:0,height:0};const{width:t,height:n}=getComputedStyle(e,"::-webkit-scrollbar");return{width:BP(t),height:BP(n)}}const SK=`vc-util-locker-${Date.now()}`;let HP=0;function CK(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}function xK(e){const t=E(()=>!!e&&!!e.value);HP+=1;const n=`${SK}_${HP}`;Ve(o=>{if(so()){if(t.value){const r=Kg(),i=CK();Md(` +`+xv(n)),o}})}function Gz(e){return qo("instanceOf",{type:e})}function Xz(e){return qo("objectOf",{type:Object,validator:function(t){var n,o=Object.keys(t).every(function(r){return(n=os(e,t[r]))===!0});return o||Go(`objectOf - value validation error: +`+xv(n)),o}})}function Yz(e){var t=Object.keys(e),n=t.filter(function(r){var i;return!!(!((i=e[r])===null||i===void 0)&&i.required)}),o=qo("shape",{type:Object,validator:function(r){var i=this;if(!Wl(r))return!1;var a=Object.keys(r);if(n.length>0&&n.some(function(s){return a.indexOf(s)===-1})){var l=n.filter(function(s){return a.indexOf(s)===-1});return Go(l.length===1?'shape - required property "'+l[0]+'" is not defined.':'shape - required properties "'+l.join('", "')+'" are not defined.'),!1}return a.every(function(s){if(t.indexOf(s)===-1)return i._vueTypes_isLoose===!0||(Go('shape - shape definition does not include a "'+s+'" property. Allowed keys: "'+t.join('", "')+'".'),!1);var u=os(e[s],r[s]);return typeof u=="string"&&Go('shape - "'+s+`" property validation error: + `+xv(u)),u===!0})}});return Object.defineProperty(o,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(o,"loose",{get:function(){return this._vueTypes_isLoose=!0,this}}),o}var ti=function(){function e(){}return e.extend=function(t){var n=this;if(Cc(t))return t.forEach(function(d){return n.extend(d)}),this;var o=t.name,r=t.validate,i=r!==void 0&&r,a=t.getter,l=a!==void 0&&a,s=B6(t,["name","validate","getter"]);if(Dd(this,o))throw new TypeError('[VueTypes error]: Type "'+o+'" already defined');var u,c=s.type;return Hg(c)?(delete s.type,Object.defineProperty(this,o,l?{get:function(){return eP(o,c,s)}}:{value:function(){var d,f=eP(o,c,s);return f.validator&&(f.validator=(d=f.validator).bind.apply(d,[f].concat([].slice.call(arguments)))),f}})):(u=l?{get:function(){var d=Object.assign({},s);return i?hi(o,d):qo(o,d)},enumerable:!0}:{value:function(){var d,f,p=Object.assign({},s);return d=i?hi(o,p):qo(o,p),p.validator&&(d.validator=(f=p.validator).bind.apply(f,[d].concat([].slice.call(arguments)))),d},enumerable:!0},Object.defineProperty(this,o,u))},L6(e,null,[{key:"any",get:function(){return Dz()}},{key:"func",get:function(){return Nz().def(this.defaults.func)}},{key:"bool",get:function(){return kz().def(this.defaults.bool)}},{key:"string",get:function(){return Lz().def(this.defaults.string)}},{key:"number",get:function(){return Fz().def(this.defaults.number)}},{key:"array",get:function(){return Bz().def(this.defaults.array)}},{key:"object",get:function(){return Hz().def(this.defaults.object)}},{key:"integer",get:function(){return zz().def(this.defaults.integer)}},{key:"symbol",get:function(){return jz()}}]),e}();function V6(e){var t;return e===void 0&&(e={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),(t=function(n){function o(){return n.apply(this,arguments)||this}return F6(o,n),L6(o,null,[{key:"sensibleDefaults",get:function(){return Hp({},this.defaults)},set:function(r){this.defaults=r!==!1?Hp({},r!==!0?r:e):{}}}]),o}(ti)).defaults=Hp({},e),t}ti.defaults={},ti.custom=Wz,ti.oneOf=Vz,ti.instanceOf=Gz,ti.oneOfType=Kz,ti.arrayOf=Uz,ti.objectOf=Xz,ti.shape=Yz,ti.utils={validate:function(e,t){return os(t,e)===!0},toType:function(e,t,n){return n===void 0&&(n=!1),n?hi(e,t):qo(e,t)}};(function(e){function t(){return e.apply(this,arguments)||this}return F6(t,e),t})(V6());const K=V6({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});K.extend([{name:"looseBool",getter:!0,type:Boolean,default:void 0},{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VueNode",getter:!0,type:null}]);function K6(e){return e.default=void 0,e}const Mt=(e,t,n)=>{FS(e,`[ant-design-vue: ${t}] ${n}`)};function qz(){return window}function tP(e,t){if(!e.getClientRects().length)return 0;const n=e.getBoundingClientRect();return n.width||n.height?t===window?(t=e.ownerDocument.documentElement,n.top-t.clientTop):n.top-t.getBoundingClientRect().top:n.top}const nP=/#([\S ]+)$/,Jz=()=>({prefixCls:String,offsetTop:Number,bounds:Number,affix:{type:Boolean,default:!0},showInkInFixed:{type:Boolean,default:!1},getContainer:Function,wrapperClass:String,wrapperStyle:{type:Object,default:void 0},getCurrentAnchor:Function,targetOffset:Number,items:pt(),direction:K.oneOf(["vertical","horizontal"]).def("vertical"),onChange:Function,onClick:Function}),Cl=le({compatConfig:{MODE:3},name:"AAnchor",inheritAttrs:!1,props:Jz(),setup(e,t){let{emit:n,attrs:o,slots:r,expose:i}=t;const{prefixCls:a,getTargetContainer:l,direction:s}=Te("anchor",e),u=E(()=>{var w;return(w=e.direction)!==null&&w!==void 0?w:"vertical"}),c=ae(null),d=ae(),f=rt({links:[],scrollContainer:null,scrollEvent:null,animating:!1}),p=ae(null),v=E(()=>{const{getContainer:w}=e;return w||(l==null?void 0:l.value)||qz}),h=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5;const I=[],_=v.value();return f.links.forEach(T=>{const A=nP.exec(T.toString());if(!A)return;const R=document.getElementById(A[1]);if(R){const H=tP(R,_);HR.top>A.top?R:A).link:""},m=w=>{const{getCurrentAnchor:O}=e;p.value!==w&&(p.value=typeof O=="function"?O(w):w,n("change",w))},b=w=>{const{offsetTop:O,targetOffset:I}=e;m(w);const _=nP.exec(w);if(!_)return;const T=document.getElementById(_[1]);if(!T)return;const A=v.value(),R=KS(A),H=tP(T,A);let M=R+H;M-=I!==void 0?I:O||0,f.animating=!0,US(M,{callback:()=>{f.animating=!1},getContainer:v.value})};i({scrollTo:b});const S=()=>{if(f.animating)return;const{offsetTop:w,bounds:O,targetOffset:I}=e,_=h(I!==void 0?I:w||0,O);m(_)},C=()=>{const w=d.value.querySelector(`.${a.value}-link-title-active`);if(w&&c.value){const O=u.value==="horizontal";c.value.style.top=O?"":`${w.offsetTop+w.clientHeight/2}px`,c.value.style.height=O?"":`${w.clientHeight}px`,c.value.style.left=O?`${w.offsetLeft}px`:"",c.value.style.width=O?`${w.clientWidth}px`:"",O&&N6(w,{scrollMode:"if-needed",block:"nearest"})}};wz({registerLink:w=>{f.links.includes(w)||f.links.push(w)},unregisterLink:w=>{const O=f.links.indexOf(w);O!==-1&&f.links.splice(O,1)},activeLink:p,scrollTo:b,handleClick:(w,O)=>{n("click",w,O)},direction:u}),Ke(()=>{ot(()=>{const w=v.value();f.scrollContainer=w,f.scrollEvent=Ht(f.scrollContainer,"scroll",S),S()})}),tt(()=>{f.scrollEvent&&f.scrollEvent.remove()}),uo(()=>{if(f.scrollEvent){const w=v.value();f.scrollContainer!==w&&(f.scrollContainer=w,f.scrollEvent.remove(),f.scrollEvent=Ht(f.scrollContainer,"scroll",S),S())}C()});const $=w=>Array.isArray(w)?w.map(O=>{const{children:I,key:_,href:T,target:A,class:R,style:H,title:M}=O;return g(GS,{key:_,href:T,target:A,class:R,style:H,title:M,customTitleProps:O},{default:()=>[u.value==="vertical"?$(I):null],customTitle:r.customTitle})}):null,[x,P]=Tz(a);return()=>{var w;const{offsetTop:O,affix:I,showInkInFixed:_}=e,T=a.value,A=ge(`${T}-ink`,{[`${T}-ink-visible`]:p.value}),R=ge(P.value,e.wrapperClass,`${T}-wrapper`,{[`${T}-wrapper-horizontal`]:u.value==="horizontal",[`${T}-rtl`]:s.value==="rtl"}),H=ge(T,{[`${T}-fixed`]:!I&&!_}),M=y({maxHeight:O?`calc(100vh - ${O}px)`:"100vh"},e.wrapperStyle),D=g("div",{class:R,style:M,ref:d},[g("div",{class:H},[g("span",{class:A,ref:c},null),Array.isArray(e.items)?$(e.items):(w=r.default)===null||w===void 0?void 0:w.call(r)])]);return x(I?g(R6,k(k({},o),{},{offsetTop:O,target:v.value}),{default:()=>[D]}):D)}}});Cl.Link=GS;Cl.install=function(e){return e.component(Cl.name,Cl),e.component(Cl.Link.name,Cl.Link),e};function oP(e,t){const{key:n}=e;let o;return"value"in e&&({value:o}=e),n??(o!==void 0?o:`rc-index-key-${t}`)}function U6(e,t){const{label:n,value:o,options:r}=e||{};return{label:n||(t?"children":"label"),value:o||"value",options:r||"options"}}function Zz(e){let{fieldNames:t,childrenAsData:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=[],{label:r,value:i,options:a}=U6(t,!1);function l(s,u){s.forEach(c=>{const d=c[r];if(u||!(a in c)){const f=c[i];o.push({key:oP(c,o.length),groupOption:u,data:c,label:d,value:f})}else{let f=d;f===void 0&&n&&(f=c.label),o.push({key:oP(c,o.length),group:!0,data:c,label:f}),l(c[a],!0)}})}return l(e,!1),o}function Oy(e){const t=y({},e);return"props"in t||Object.defineProperty(t,"props",{get(){return t}}),t}function Qz(e,t){if(!t||!t.length)return null;let n=!1;function o(i,a){let[l,...s]=a;if(!l)return[i];const u=i.split(l);return n=n||u.length>1,u.reduce((c,d)=>[...c,...o(d,s)],[]).filter(c=>c)}const r=o(e,t);return n?r:null}function ej(){return""}function tj(e){return e?e.ownerDocument:window.document}function G6(){}const X6=()=>({action:K.oneOfType([K.string,K.arrayOf(K.string)]).def([]),showAction:K.any.def([]),hideAction:K.any.def([]),getPopupClassNameFromAlign:K.any.def(ej),onPopupVisibleChange:Function,afterPopupVisibleChange:K.func.def(G6),popup:K.any,arrow:K.bool.def(!0),popupStyle:{type:Object,default:void 0},prefixCls:K.string.def("rc-trigger-popup"),popupClassName:K.string.def(""),popupPlacement:String,builtinPlacements:K.object,popupTransitionName:String,popupAnimation:K.any,mouseEnterDelay:K.number.def(0),mouseLeaveDelay:K.number.def(.1),zIndex:Number,focusDelay:K.number.def(0),blurDelay:K.number.def(.15),getPopupContainer:Function,getDocument:K.func.def(tj),forceRender:{type:Boolean,default:void 0},destroyPopupOnHide:{type:Boolean,default:!1},mask:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},popupAlign:K.object.def(()=>({})),popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},maskTransitionName:String,maskAnimation:String,stretch:String,alignPoint:{type:Boolean,default:void 0},autoDestroy:{type:Boolean,default:!1},mobile:Object,getTriggerDOMNode:Function}),YS={visible:Boolean,prefixCls:String,zIndex:Number,destroyPopupOnHide:Boolean,forceRender:Boolean,arrow:{type:Boolean,default:!0},animation:[String,Object],transitionName:String,stretch:{type:String},align:{type:Object},point:{type:Object},getRootDomNode:{type:Function},getClassNameFromAlign:{type:Function},onAlign:{type:Function},onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function},onTouchstart:{type:Function}},nj=y(y({},YS),{mobile:{type:Object}}),oj=y(y({},YS),{mask:Boolean,mobile:{type:Object},maskAnimation:String,maskTransitionName:String});function qS(e){let{prefixCls:t,animation:n,transitionName:o}=e;return n?{name:`${t}-${n}`}:o?{name:o}:{}}function Y6(e){const{prefixCls:t,visible:n,zIndex:o,mask:r,maskAnimation:i,maskTransitionName:a}=e;if(!r)return null;let l={};return(a||i)&&(l=qS({prefixCls:t,transitionName:a,animation:i})),g(Nn,k({appear:!0},l),{default:()=>[Pn(g("div",{style:{zIndex:o},class:`${t}-mask`},null),[[pF("if"),n]])]})}Y6.displayName="Mask";const rj=le({compatConfig:{MODE:3},name:"MobilePopupInner",inheritAttrs:!1,props:nj,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup(e,t){let{expose:n,slots:o}=t;const r=ae();return n({forceAlign:()=>{},getElement:()=>r.value}),()=>{var i;const{zIndex:a,visible:l,prefixCls:s,mobile:{popupClassName:u,popupStyle:c,popupMotion:d={},popupRender:f}={}}=e,p=y({zIndex:a},c);let v=Ot((i=o.default)===null||i===void 0?void 0:i.call(o));v.length>1&&(v=g("div",{class:`${s}-content`},[v])),f&&(v=f(v));const h=ge(s,u);return g(Nn,k({ref:r},d),{default:()=>[l?g("div",{class:h,style:p},[v]):null]})}}});var ij=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function l(c){try{u(o.next(c))}catch(d){a(d)}}function s(c){try{u(o.throw(c))}catch(d){a(d)}}function u(c){c.done?i(c.value):r(c.value).then(l,s)}u((o=o.apply(e,t||[])).next())})};const rP=["measure","align",null,"motion"],aj=(e,t)=>{const n=se(null),o=se(),r=se(!1);function i(s){r.value||(n.value=s)}function a(){Ze.cancel(o.value)}function l(s){a(),o.value=Ze(()=>{let u=n.value;switch(n.value){case"align":u="motion";break;case"motion":u="stable";break}i(u),s==null||s()})}return be(e,()=>{i("measure")},{immediate:!0,flush:"post"}),Ke(()=>{be(n,()=>{switch(n.value){case"measure":t();break}n.value&&(o.value=Ze(()=>ij(void 0,void 0,void 0,function*(){const s=rP.indexOf(n.value),u=rP[s+1];u&&s!==-1&&i(u)})))},{immediate:!0,flush:"post"})}),tt(()=>{r.value=!0,a()}),[n,l]},lj=e=>{const t=se({width:0,height:0});function n(r){t.value={width:r.offsetWidth,height:r.offsetHeight}}return[E(()=>{const r={};if(e.value){const{width:i,height:a}=t.value;e.value.indexOf("height")!==-1&&a?r.height=`${a}px`:e.value.indexOf("minHeight")!==-1&&a&&(r.minHeight=`${a}px`),e.value.indexOf("width")!==-1&&i?r.width=`${i}px`:e.value.indexOf("minWidth")!==-1&&i&&(r.minWidth=`${i}px`)}return r}),n]};function iP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function aP(e){for(var t=1;t=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function _j(e,t,n,o){var r=vt.clone(e),i={width:t.width,height:t.height};return o.adjustX&&r.left=n.left&&r.left+i.width>n.right&&(i.width-=r.left+i.width-n.right),o.adjustX&&r.left+i.width>n.right&&(r.left=Math.max(n.right-i.width,n.left)),o.adjustY&&r.top=n.top&&r.top+i.height>n.bottom&&(i.height-=r.top+i.height-n.bottom),o.adjustY&&r.top+i.height>n.bottom&&(r.top=Math.max(n.bottom-i.height,n.top)),vt.mix(r,i)}function eC(e){var t,n,o;if(!vt.isWindow(e)&&e.nodeType!==9)t=vt.offset(e),n=vt.outerWidth(e),o=vt.outerHeight(e);else{var r=vt.getWindow(e);t={left:vt.getWindowScrollLeft(r),top:vt.getWindowScrollTop(r)},n=vt.viewportWidth(r),o=vt.viewportHeight(r)}return t.width=n,t.height=o,t}function gP(e,t){var n=t.charAt(0),o=t.charAt(1),r=e.width,i=e.height,a=e.left,l=e.top;return n==="c"?l+=i/2:n==="b"&&(l+=i),o==="c"?a+=r/2:o==="r"&&(a+=r),{left:a,top:l}}function ep(e,t,n,o,r){var i=gP(t,n[1]),a=gP(e,n[0]),l=[a.left-i.left,a.top-i.top];return{left:Math.round(e.left-l[0]+o[0]-r[0]),top:Math.round(e.top-l[1]+o[1]-r[1])}}function hP(e,t,n){return e.leftn.right}function vP(e,t,n){return e.topn.bottom}function Mj(e,t,n){return e.left>n.right||e.left+t.widthn.bottom||e.top+t.height=n.right||o.top>=n.bottom}function tC(e,t,n){var o=n.target||t,r=eC(o),i=!Rj(o,n.overflow&&n.overflow.alwaysByViewport);return oA(e,r,n,i)}tC.__getOffsetParent=_y;tC.__getVisibleRectForElement=QS;function Dj(e,t,n){var o,r,i=vt.getDocument(e),a=i.defaultView||i.parentWindow,l=vt.getWindowScrollLeft(a),s=vt.getWindowScrollTop(a),u=vt.viewportWidth(a),c=vt.viewportHeight(a);"pageX"in t?o=t.pageX:o=l+t.clientX,"pageY"in t?r=t.pageY:r=s+t.clientY;var d={left:o,top:r,width:0,height:0},f=o>=0&&o<=l+u&&r>=0&&r<=s+c,p=[n.points[0],"cc"];return oA(e,d,aP(aP({},n),{},{points:p}),f)}function mt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,r=e;if(Array.isArray(e)&&(r=zt(e)[0]),!r)return null;const i=Dn(r,t,o);return i.props=n?y(y({},i.props),t):i.props,Yo(typeof i.props.class!="object"),i}function Nj(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e.map(o=>mt(o,t,n))}function Zu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Array.isArray(e))return e.map(r=>Zu(r,t,n,o));{if(!ln(e))return e;const r=mt(e,t,n,o);return Array.isArray(r.children)&&(r.children=Zu(r.children)),r}}function kj(e,t,n){Fa(Dn(e,y({},t)),n)}const rA=e=>(e||[]).some(t=>ln(t)?!(t.type===Bn||t.type===Le&&!rA(t.children)):!0)?e:null;function wv(e,t,n,o){var r;const i=(r=e[t])===null||r===void 0?void 0:r.call(e,n);return rA(i)?i:o==null?void 0:o()}const Pv=e=>{if(!e)return!1;if(e.offsetParent)return!0;if(e.getBBox){const t=e.getBBox();if(t.width||t.height)return!0}if(e.getBoundingClientRect){const t=e.getBoundingClientRect();if(t.width||t.height)return!0}return!1};function Lj(e,t){return e===t?!0:!e||!t?!1:"pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t?e.clientX===t.clientX&&e.clientY===t.clientY:!1}function Fj(e,t){e!==document.activeElement&&Pa(t,e)&&typeof e.focus=="function"&&e.focus()}function yP(e,t){let n=null,o=null;function r(a){let[{target:l}]=a;if(!document.documentElement.contains(l))return;const{width:s,height:u}=l.getBoundingClientRect(),c=Math.floor(s),d=Math.floor(u);(n!==c||o!==d)&&Promise.resolve().then(()=>{t({width:c,height:d})}),n=c,o=d}const i=new AS(r);return e&&i.observe(e),()=>{i.disconnect()}}const Bj=(e,t)=>{let n=!1,o=null;function r(){clearTimeout(o)}function i(a){if(!n||a===!0){if(e()===!1)return;n=!0,r(),o=setTimeout(()=>{n=!1},t.value)}else r(),o=setTimeout(()=>{n=!1,i()},t.value)}return[i,()=>{n=!1,r()}]};function Hj(){this.__data__=[],this.size=0}function pf(e,t){return e===t||e!==e&&t!==t}function Ov(e,t){for(var n=e.length;n--;)if(pf(e[n][0],t))return n;return-1}var zj=Array.prototype,jj=zj.splice;function Wj(e){var t=this.__data__,n=Ov(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():jj.call(t,n,1),--this.size,!0}function Vj(e){var t=this.__data__,n=Ov(t,e);return n<0?void 0:t[n][1]}function Kj(e){return Ov(this.__data__,e)>-1}function Uj(e,t){var n=this.__data__,o=Ov(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}function oa(e){var t=-1,n=e==null?0:e.length;for(this.clear();++tl))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=n&UW?new $c:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=SV}var CV="[object Arguments]",xV="[object Array]",$V="[object Boolean]",wV="[object Date]",PV="[object Error]",OV="[object Function]",IV="[object Map]",TV="[object Number]",EV="[object Object]",_V="[object RegExp]",MV="[object Set]",AV="[object String]",RV="[object WeakMap]",DV="[object ArrayBuffer]",NV="[object DataView]",kV="[object Float32Array]",LV="[object Float64Array]",FV="[object Int8Array]",BV="[object Int16Array]",HV="[object Int32Array]",zV="[object Uint8Array]",jV="[object Uint8ClampedArray]",WV="[object Uint16Array]",VV="[object Uint32Array]",Gt={};Gt[kV]=Gt[LV]=Gt[FV]=Gt[BV]=Gt[HV]=Gt[zV]=Gt[jV]=Gt[WV]=Gt[VV]=!0;Gt[CV]=Gt[xV]=Gt[DV]=Gt[$V]=Gt[NV]=Gt[wV]=Gt[PV]=Gt[OV]=Gt[IV]=Gt[TV]=Gt[EV]=Gt[_V]=Gt[MV]=Gt[AV]=Gt[RV]=!1;function KV(e){return Ur(e)&&aC(e.length)&&!!Gt[Ka(e)]}function lC(e){return function(t){return e(t)}}var fA=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Qu=fA&&typeof module=="object"&&module&&!module.nodeType&&module,UV=Qu&&Qu.exports===fA,$0=UV&&iA.process,Oc=function(){try{var e=Qu&&Qu.require&&Qu.require("util").types;return e||$0&&$0.binding&&$0.binding("util")}catch{}}(),IP=Oc&&Oc.isTypedArray,Ev=IP?lC(IP):KV,GV=Object.prototype,XV=GV.hasOwnProperty;function pA(e,t){var n=wo(e),o=!n&&wc(e),r=!n&&!o&&Pc(e),i=!n&&!o&&!r&&Ev(e),a=n||o||r||i,l=a?dV(e.length,String):[],s=l.length;for(var u in e)(t||XV.call(e,u))&&!(a&&(u=="length"||r&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Tv(u,s)))&&l.push(u);return l}var YV=Object.prototype;function _v(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||YV;return e===n}function gA(e,t){return function(n){return e(t(n))}}var qV=gA(Object.keys,Object),JV=Object.prototype,ZV=JV.hasOwnProperty;function hA(e){if(!_v(e))return qV(e);var t=[];for(var n in Object(e))ZV.call(e,n)&&n!="constructor"&&t.push(n);return t}function as(e){return e!=null&&aC(e.length)&&!nC(e)}function Gc(e){return as(e)?pA(e):hA(e)}function My(e){return sA(e,Gc,iC)}var QV=1,eK=Object.prototype,tK=eK.hasOwnProperty;function nK(e,t,n,o,r,i){var a=n&QV,l=My(e),s=l.length,u=My(t),c=u.length;if(s!=c&&!a)return!1;for(var d=s;d--;){var f=l[d];if(!(a?f in t:tK.call(t,f)))return!1}var p=i.get(e),v=i.get(t);if(p&&v)return p==t&&v==e;var h=!0;i.set(e,t),i.set(t,e);for(var m=a;++d{const{disabled:f,target:p,align:v,onAlign:h}=e;if(!f&&p&&i.value){const m=i.value;let b;const S=kP(p),C=LP(p);r.value.element=S,r.value.point=C,r.value.align=v;const{activeElement:$}=document;return S&&Pv(S)?b=tC(m,S,v):C&&(b=Dj(m,C,v)),Fj($,m),h&&b&&h(m,b),!0}return!1},E(()=>e.monitorBufferTime)),s=ae({cancel:()=>{}}),u=ae({cancel:()=>{}}),c=()=>{const f=e.target,p=kP(f),v=LP(f);i.value!==u.value.element&&(u.value.cancel(),u.value.element=i.value,u.value.cancel=yP(i.value,a)),(r.value.element!==p||!Lj(r.value.point,v)||!sC(r.value.align,e.align))&&(a(),s.value.element!==p&&(s.value.cancel(),s.value.element=p,s.value.cancel=yP(p,a)))};Ke(()=>{ot(()=>{c()})}),uo(()=>{ot(()=>{c()})}),be(()=>e.disabled,f=>{f?l():a()},{immediate:!0,flush:"post"});const d=ae(null);return be(()=>e.monitorWindowResize,f=>{f?d.value||(d.value=Ht(window,"resize",a)):d.value&&(d.value.remove(),d.value=null)},{flush:"post"}),Zn(()=>{s.value.cancel(),u.value.cancel(),d.value&&d.value.remove(),l()}),n({forceAlign:()=>a(!0)}),()=>{const f=o==null?void 0:o.default();return f?mt(f[0],{ref:i},!0,!0):null}}});Jn("bottomLeft","bottomRight","topLeft","topRight");const cC=e=>e!==void 0&&(e==="topLeft"||e==="topRight")?"slide-down":"slide-up",Cr=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return y(e?{name:e,appear:!0,enterFromClass:`${e}-enter ${e}-enter-prepare ${e}-enter-start`,enterActiveClass:`${e}-enter ${e}-enter-prepare`,enterToClass:`${e}-enter ${e}-enter-active`,leaveFromClass:` ${e}-leave`,leaveActiveClass:`${e}-leave ${e}-leave-active`,leaveToClass:`${e}-leave ${e}-leave-active`}:{css:!1},t)},Av=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return y(e?{name:e,appear:!0,appearActiveClass:`${e}`,appearToClass:`${e}-appear ${e}-appear-active`,enterFromClass:`${e}-appear ${e}-enter ${e}-appear-prepare ${e}-enter-prepare`,enterActiveClass:`${e}`,enterToClass:`${e}-enter ${e}-appear ${e}-appear-active ${e}-enter-active`,leaveActiveClass:`${e} ${e}-leave`,leaveToClass:`${e}-leave-active`}:{css:!1},t)},co=(e,t,n)=>n!==void 0?n:`${e}-${t}`,gK=le({compatConfig:{MODE:3},name:"PopupInner",inheritAttrs:!1,props:YS,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup(e,t){let{expose:n,attrs:o,slots:r}=t;const i=se(),a=se(),l=se(),[s,u]=lj(We(e,"stretch")),c=()=>{e.stretch&&u(e.getRootDomNode())},d=se(!1);let f;be(()=>e.visible,P=>{clearTimeout(f),P?f=setTimeout(()=>{d.value=e.visible}):d.value=!1},{immediate:!0});const[p,v]=aj(d,c),h=se(),m=()=>e.point?e.point:e.getRootDomNode,b=()=>{var P;(P=i.value)===null||P===void 0||P.forceAlign()},S=(P,w)=>{var O;const I=e.getClassNameFromAlign(w),_=l.value;l.value!==I&&(l.value=I),p.value==="align"&&(_!==I?Promise.resolve().then(()=>{b()}):v(()=>{var T;(T=h.value)===null||T===void 0||T.call(h)}),(O=e.onAlign)===null||O===void 0||O.call(e,P,w))},C=E(()=>{const P=typeof e.animation=="object"?e.animation:qS(e);return["onAfterEnter","onAfterLeave"].forEach(w=>{const O=P[w];P[w]=I=>{v(),p.value="stable",O==null||O(I)}}),P}),$=()=>new Promise(P=>{h.value=P});be([C,p],()=>{!C.value&&p.value==="motion"&&v()},{immediate:!0}),n({forceAlign:b,getElement:()=>a.value.$el||a.value});const x=E(()=>{var P;return!(!((P=e.align)===null||P===void 0)&&P.points&&(p.value==="align"||p.value==="stable"))});return()=>{var P;const{zIndex:w,align:O,prefixCls:I,destroyPopupOnHide:_,onMouseenter:T,onMouseleave:A,onTouchstart:R=()=>{},onMousedown:H}=e,M=p.value,D=[y(y({},s.value),{zIndex:w,opacity:M==="motion"||M==="stable"||!d.value?null:0,pointerEvents:!d.value&&M!=="stable"?"none":null}),o.style];let N=Ot((P=r.default)===null||P===void 0?void 0:P.call(r,{visible:e.visible}));N.length>1&&(N=g("div",{class:`${I}-content`},[N]));const L=ge(I,o.class,l.value,!e.arrow&&`${I}-arrow-hidden`),B=d.value||!e.visible?Cr(C.value.name,C.value):{};return g(Nn,k(k({ref:a},B),{},{onBeforeEnter:$}),{default:()=>!_||e.visible?Pn(g(pK,{target:m(),key:"popup",ref:i,monitorWindowResize:!0,disabled:x.value,align:O,onAlign:S},{default:()=>g("div",{class:L,onMouseenter:T,onMouseleave:A,onMousedown:m2(H,["capture"]),[hn?"onTouchstartPassive":"onTouchstart"]:m2(R,["capture"]),style:D},[N])}),[[Vn,d.value]]):null})}}}),hK=le({compatConfig:{MODE:3},name:"Popup",inheritAttrs:!1,props:oj,setup(e,t){let{attrs:n,slots:o,expose:r}=t;const i=se(!1),a=se(!1),l=se(),s=se();return be([()=>e.visible,()=>e.mobile],()=>{i.value=e.visible,e.visible&&e.mobile&&(a.value=!0)},{immediate:!0,flush:"post"}),r({forceAlign:()=>{var u;(u=l.value)===null||u===void 0||u.forceAlign()},getElement:()=>{var u;return(u=l.value)===null||u===void 0?void 0:u.getElement()}}),()=>{const u=y(y(y({},e),n),{visible:i.value}),c=a.value?g(rj,k(k({},u),{},{mobile:e.mobile,ref:l}),{default:o.default}):g(gK,k(k({},u),{},{ref:l}),{default:o.default});return g("div",{ref:s},[g(Y6,u,null),c])}}});function vK(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function FP(e,t,n){const o=e[t]||{};return y(y({},o),n)}function mK(e,t,n,o){const{points:r}=n,i=Object.keys(e);for(let a=0;a0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=typeof e=="function"?e(this.$data,this.$props):e;if(this.getDerivedStateFromProps){const o=this.getDerivedStateFromProps(jM(this),y(y({},this.$data),n));if(o===null)return;n=y(y({},n),o||{})}y(this.$data,n),this._.isMounted&&this.$forceUpdate(),ot(()=>{t&&t()})},__emit(){const e=[].slice.call(arguments,0);let t=e[0];t=`on${t[0].toUpperCase()}${t.substring(1)}`;const n=this.$props[t]||this.$attrs[t];if(e.length&&n)if(Array.isArray(n))for(let o=0,r=n.length;o1&&arguments[1]!==void 0?arguments[1]:{inTriggerContext:!0};Xe(vA,{inTriggerContext:t.inTriggerContext,shouldRender:E(()=>{const{sPopupVisible:n,popupRef:o,forceRender:r,autoDestroy:i}=e||{};let a=!1;return(n||o||r)&&(a=!0),!n&&i&&(a=!1),a})})},bK=()=>{uC({},{inTriggerContext:!1});const e=ze(vA,{shouldRender:E(()=>!1),inTriggerContext:!1});return{shouldRender:E(()=>e.shouldRender.value||e.inTriggerContext===!1)}},mA=le({compatConfig:{MODE:3},name:"Portal",inheritAttrs:!1,props:{getContainer:K.func.isRequired,didUpdate:Function},setup(e,t){let{slots:n}=t,o=!0,r;const{shouldRender:i}=bK();function a(){i.value&&(r=e.getContainer())}cf(()=>{o=!1,a()}),Ke(()=>{r||a()});const l=be(i,()=>{i.value&&!r&&(r=e.getContainer()),r&&l()});return uo(()=>{ot(()=>{var s;i.value&&((s=e.didUpdate)===null||s===void 0||s.call(e,e))})}),()=>{var s;return i.value?o?(s=n.default)===null||s===void 0?void 0:s.call(n):r?g(rv,{to:r},n):null:null}}});let w0;function Vg(e){if(typeof document>"u")return 0;if(w0===void 0){const t=document.createElement("div");t.style.width="100%",t.style.height="200px";const n=document.createElement("div"),o=n.style;o.position="absolute",o.top="0",o.left="0",o.pointerEvents="none",o.visibility="hidden",o.width="200px",o.height="150px",o.overflow="hidden",n.appendChild(t),document.body.appendChild(n);const r=t.offsetWidth;n.style.overflow="scroll";let i=t.offsetWidth;r===i&&(i=n.clientWidth),document.body.removeChild(n),w0=r-i}return w0}function BP(e){const t=e.match(/^(.*)px$/),n=Number(t==null?void 0:t[1]);return Number.isNaN(n)?Vg():n}function yK(e){if(typeof document>"u"||!e||!(e instanceof Element))return{width:0,height:0};const{width:t,height:n}=getComputedStyle(e,"::-webkit-scrollbar");return{width:BP(t),height:BP(n)}}const SK=`vc-util-locker-${Date.now()}`;let HP=0;function CK(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}function xK(e){const t=E(()=>!!e&&!!e.value);HP+=1;const n=`${SK}_${HP}`;Ve(o=>{if(so()){if(t.value){const r=Vg(),i=CK();Md(` html body { overflow-y: hidden; ${i?`width: calc(100% - ${r}px);`:""} -}`,n)}else Fg(n);o(()=>{Fg(n)})}},{flush:"post"})}let sl=0;const jp=so(),zP=e=>{if(!jp)return null;if(e){if(typeof e=="string")return document.querySelectorAll(e)[0];if(typeof e=="function")return e();if(typeof e=="object"&&e instanceof window.HTMLElement)return e}return document.body},gf=le({compatConfig:{MODE:3},name:"PortalWrapper",inheritAttrs:!1,props:{wrapperClassName:String,forceRender:{type:Boolean,default:void 0},getContainer:K.any,visible:{type:Boolean,default:void 0},autoLock:$e(),didUpdate:Function},setup(e,t){let{slots:n}=t;const o=se(),r=se(),i=se(),a=se(1),l=so()&&document.createElement("div"),s=()=>{var p,v;o.value===l&&((v=(p=o.value)===null||p===void 0?void 0:p.parentNode)===null||v===void 0||v.removeChild(o.value)),o.value=null};let u=null;const c=function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)||o.value&&!o.value.parentNode?(u=zP(e.getContainer),u?(u.appendChild(o.value),!0):!1):!0},d=()=>jp?(o.value||(o.value=l,c(!0)),f(),o.value):null,f=()=>{const{wrapperClassName:p}=e;o.value&&p&&p!==o.value.className&&(o.value.className=p)};return uo(()=>{f(),c()}),xK(E(()=>e.autoLock&&e.visible&&so()&&(o.value===document.body||o.value===l))),Ke(()=>{let p=!1;be([()=>e.visible,()=>e.getContainer],(v,h)=>{let[m,b]=v,[S,C]=h;jp&&(u=zP(e.getContainer),u===document.body&&(m&&!S?sl+=1:p&&(sl-=1))),p&&(typeof b=="function"&&typeof C=="function"?b.toString()!==C.toString():b!==C)&&s(),p=!0},{immediate:!0,flush:"post"}),ot(()=>{c()||(i.value=Ze(()=>{a.value+=1}))})}),tt(()=>{const{visible:p}=e;jp&&u===document.body&&(sl=p&&sl?sl-1:sl),s(),Ze.cancel(i.value)}),()=>{const{forceRender:p,visible:v}=e;let h=null;const m={getOpenCount:()=>sl,getContainer:d};return a.value&&(p||v||r.value)&&(h=g(m8,{getContainer:d,ref:r,didUpdate:e.didUpdate},{default:()=>{var b;return(b=n.default)===null||b===void 0?void 0:b.call(n,m)}})),h}}}),$K=["onClick","onMousedown","onTouchstart","onMouseenter","onMouseleave","onFocus","onBlur","onContextmenu"],ss=le({compatConfig:{MODE:3},name:"Trigger",mixins:[ls],inheritAttrs:!1,props:X6(),setup(e){const t=E(()=>{const{popupPlacement:r,popupAlign:i,builtinPlacements:a}=e;return r&&a?FP(a,r,i):i}),n=se(null),o=r=>{n.value=r};return{vcTriggerContext:ze("vcTriggerContext",{}),popupRef:n,setPopupRef:o,triggerRef:se(null),align:t,focusTime:null,clickOutsideHandler:null,contextmenuOutsideHandler1:null,contextmenuOutsideHandler2:null,touchOutsideHandler:null,attachId:null,delayTimer:null,hasPopupMouseDown:!1,preClickTime:null,preTouchTime:null,mouseDownTimeout:null,childOriginEvents:{}}},data(){const e=this.$props;let t;return this.popupVisible!==void 0?t=!!e.popupVisible:t=!!e.defaultPopupVisible,$K.forEach(n=>{this[`fire${n}`]=o=>{this.fireEvents(n,o)}}),{prevPopupVisible:t,sPopupVisible:t,point:null}},watch:{popupVisible(e){e!==void 0&&(this.prevPopupVisible=this.sPopupVisible,this.sPopupVisible=e)}},created(){Xe("vcTriggerContext",{onPopupMouseDown:this.onPopupMouseDown,onPopupMouseenter:this.onPopupMouseenter,onPopupMouseleave:this.onPopupMouseleave}),uC(this)},deactivated(){this.setPopupVisible(!1)},mounted(){this.$nextTick(()=>{this.updatedCal()})},updated(){this.$nextTick(()=>{this.updatedCal()})},beforeUnmount(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Ze.cancel(this.attachId)},methods:{updatedCal(){const e=this.$props;if(this.$data.sPopupVisible){let n;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextmenuToShow())&&(n=e.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Ht(n,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(n=n||e.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Ht(n,"touchstart",this.onDocumentClick,hn?{passive:!1}:!1)),!this.contextmenuOutsideHandler1&&this.isContextmenuToShow()&&(n=n||e.getDocument(this.getRootDomNode()),this.contextmenuOutsideHandler1=Ht(n,"scroll",this.onContextmenuClose)),!this.contextmenuOutsideHandler2&&this.isContextmenuToShow()&&(this.contextmenuOutsideHandler2=Ht(window,"blur",this.onContextmenuClose))}else this.clearOutsideHandler()},onMouseenter(e){const{mouseEnterDelay:t}=this.$props;this.fireEvents("onMouseenter",e),this.delaySetPopupVisible(!0,t,t?null:e)},onMouseMove(e){this.fireEvents("onMousemove",e),this.setPoint(e)},onMouseleave(e){this.fireEvents("onMouseleave",e),this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay)},onPopupMouseenter(){const{vcTriggerContext:e={}}=this;e.onPopupMouseenter&&e.onPopupMouseenter(),this.clearDelayTimer()},onPopupMouseleave(e){var t;if(e&&e.relatedTarget&&!e.relatedTarget.setTimeout&&Pa((t=this.popupRef)===null||t===void 0?void 0:t.getElement(),e.relatedTarget))return;this.isMouseLeaveToHide()&&this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay);const{vcTriggerContext:n={}}=this;n.onPopupMouseleave&&n.onPopupMouseleave(e)},onFocus(e){this.fireEvents("onFocus",e),this.clearDelayTimer(),this.isFocusToShow()&&(this.focusTime=Date.now(),this.delaySetPopupVisible(!0,this.$props.focusDelay))},onMousedown(e){this.fireEvents("onMousedown",e),this.preClickTime=Date.now()},onTouchstart(e){this.fireEvents("onTouchstart",e),this.preTouchTime=Date.now()},onBlur(e){Pa(e.target,e.relatedTarget||document.activeElement)||(this.fireEvents("onBlur",e),this.clearDelayTimer(),this.isBlurToHide()&&this.delaySetPopupVisible(!1,this.$props.blurDelay))},onContextmenu(e){e.preventDefault(),this.fireEvents("onContextmenu",e),this.setPopupVisible(!0,e)},onContextmenuClose(){this.isContextmenuToShow()&&this.close()},onClick(e){if(this.fireEvents("onClick",e),this.focusTime){let n;if(this.preClickTime&&this.preTouchTime?n=Math.min(this.preClickTime,this.preTouchTime):this.preClickTime?n=this.preClickTime:this.preTouchTime&&(n=this.preTouchTime),Math.abs(n-this.focusTime)<20)return;this.focusTime=0}this.preClickTime=0,this.preTouchTime=0,this.isClickToShow()&&(this.isClickToHide()||this.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault(),e&&e.domEvent&&e.domEvent.preventDefault();const t=!this.$data.sPopupVisible;(this.isClickToHide()&&!t||t&&this.isClickToShow())&&this.setPopupVisible(!this.$data.sPopupVisible,e)},onPopupMouseDown(){const{vcTriggerContext:e={}}=this;this.hasPopupMouseDown=!0,clearTimeout(this.mouseDownTimeout),this.mouseDownTimeout=setTimeout(()=>{this.hasPopupMouseDown=!1},0),e.onPopupMouseDown&&e.onPopupMouseDown(...arguments)},onDocumentClick(e){if(this.$props.mask&&!this.$props.maskClosable)return;const t=e.target,n=this.getRootDomNode(),o=this.getPopupDomNode();(!Pa(n,t)||this.isContextMenuOnly())&&!Pa(o,t)&&!this.hasPopupMouseDown&&this.delaySetPopupVisible(!1,.1)},getPopupDomNode(){var e;return((e=this.popupRef)===null||e===void 0?void 0:e.getElement())||null},getRootDomNode(){var e,t,n,o;const{getTriggerDOMNode:r}=this.$props;if(r){const i=((t=(e=this.triggerRef)===null||e===void 0?void 0:e.$el)===null||t===void 0?void 0:t.nodeName)==="#comment"?null:Co(this.triggerRef);return Co(r(i))}try{const i=((o=(n=this.triggerRef)===null||n===void 0?void 0:n.$el)===null||o===void 0?void 0:o.nodeName)==="#comment"?null:Co(this.triggerRef);if(i)return i}catch{}return Co(this)},handleGetPopupClassFromAlign(e){const t=[],n=this.$props,{popupPlacement:o,builtinPlacements:r,prefixCls:i,alignPoint:a,getPopupClassNameFromAlign:l}=n;return o&&r&&t.push(mK(r,i,e,a)),l&&t.push(l(e)),t.join(" ")},getPopupAlign(){const e=this.$props,{popupPlacement:t,popupAlign:n,builtinPlacements:o}=e;return t&&o?FP(o,t,n):n},getComponent(){const e={};this.isMouseEnterToShow()&&(e.onMouseenter=this.onPopupMouseenter),this.isMouseLeaveToHide()&&(e.onMouseleave=this.onPopupMouseleave),e.onMousedown=this.onPopupMouseDown,e[hn?"onTouchstartPassive":"onTouchstart"]=this.onPopupMouseDown;const{handleGetPopupClassFromAlign:t,getRootDomNode:n,$attrs:o}=this,{prefixCls:r,destroyPopupOnHide:i,popupClassName:a,popupAnimation:l,popupTransitionName:s,popupStyle:u,mask:c,maskAnimation:d,maskTransitionName:f,zIndex:p,stretch:v,alignPoint:h,mobile:m,arrow:b,forceRender:S}=this.$props,{sPopupVisible:C,point:$}=this.$data,x=y(y({prefixCls:r,arrow:b,destroyPopupOnHide:i,visible:C,point:h?$:null,align:this.align,animation:l,getClassNameFromAlign:t,stretch:v,getRootDomNode:n,mask:c,zIndex:p,transitionName:s,maskAnimation:d,maskTransitionName:f,class:a,style:u,onAlign:o.onPopupAlign||G6},e),{ref:this.setPopupRef,mobile:m,forceRender:S});return g(hK,x,{default:this.$slots.popup||(()=>WM(this,"popup"))})},attachParent(e){Ze.cancel(this.attachId);const{getPopupContainer:t,getDocument:n}=this.$props,o=this.getRootDomNode();let r;t?(o||t.length===0)&&(r=t(o)):r=n(this.getRootDomNode()).body,r?r.appendChild(e):this.attachId=Ze(()=>{this.attachParent(e)})},getContainer(){const{$props:e}=this,{getDocument:t}=e,n=t(this.getRootDomNode()).createElement("div");return n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%",this.attachParent(n),n},setPopupVisible(e,t){const{alignPoint:n,sPopupVisible:o,onPopupVisibleChange:r}=this;this.clearDelayTimer(),o!==e&&(ki(this,"popupVisible")||this.setState({sPopupVisible:e,prevPopupVisible:o}),r&&r(e)),n&&t&&e&&this.setPoint(t)},setPoint(e){const{alignPoint:t}=this.$props;!t||!e||this.setState({point:{pageX:e.pageX,pageY:e.pageY}})},handlePortalUpdate(){this.prevPopupVisible!==this.sPopupVisible&&this.afterPopupVisibleChange(this.sPopupVisible)},delaySetPopupVisible(e,t,n){const o=t*1e3;if(this.clearDelayTimer(),o){const r=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=setTimeout(()=>{this.setPopupVisible(e,r),this.clearDelayTimer()},o)}else this.setPopupVisible(e,n)},clearDelayTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)},clearOutsideHandler(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextmenuOutsideHandler1&&(this.contextmenuOutsideHandler1.remove(),this.contextmenuOutsideHandler1=null),this.contextmenuOutsideHandler2&&(this.contextmenuOutsideHandler2.remove(),this.contextmenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)},createTwoChains(e){let t=()=>{};const n=w2(this);return this.childOriginEvents[e]&&n[e]?this[`fire${e}`]:(t=this.childOriginEvents[e]||n[e]||t,t)},isClickToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("click")!==-1||t.indexOf("click")!==-1},isContextMenuOnly(){const{action:e}=this.$props;return e==="contextmenu"||e.length===1&&e[0]==="contextmenu"},isContextmenuToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("contextmenu")!==-1||t.indexOf("contextmenu")!==-1},isClickToHide(){const{action:e,hideAction:t}=this.$props;return e.indexOf("click")!==-1||t.indexOf("click")!==-1},isMouseEnterToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("hover")!==-1||t.indexOf("mouseenter")!==-1},isMouseLeaveToHide(){const{action:e,hideAction:t}=this.$props;return e.indexOf("hover")!==-1||t.indexOf("mouseleave")!==-1},isFocusToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("focus")!==-1||t.indexOf("focus")!==-1},isBlurToHide(){const{action:e,hideAction:t}=this.$props;return e.indexOf("focus")!==-1||t.indexOf("blur")!==-1},forcePopupAlign(){var e;this.$data.sPopupVisible&&((e=this.popupRef)===null||e===void 0||e.forceAlign())},fireEvents(e,t){this.childOriginEvents[e]&&this.childOriginEvents[e](t);const n=this.$props[e]||this.$attrs[e];n&&n(t)},close(){this.setPopupVisible(!1)}},render(){const{$attrs:e}=this,t=zt(hv(this)),{alignPoint:n,getPopupContainer:o}=this.$props,r=t[0];this.childOriginEvents=w2(r);const i={key:"trigger"};this.isContextmenuToShow()?i.onContextmenu=this.onContextmenu:i.onContextmenu=this.createTwoChains("onContextmenu"),this.isClickToHide()||this.isClickToShow()?(i.onClick=this.onClick,i.onMousedown=this.onMousedown,i[hn?"onTouchstartPassive":"onTouchstart"]=this.onTouchstart):(i.onClick=this.createTwoChains("onClick"),i.onMousedown=this.createTwoChains("onMousedown"),i[hn?"onTouchstartPassive":"onTouchstart"]=this.createTwoChains("onTouchstart")),this.isMouseEnterToShow()?(i.onMouseenter=this.onMouseenter,n&&(i.onMousemove=this.onMouseMove)):i.onMouseenter=this.createTwoChains("onMouseenter"),this.isMouseLeaveToHide()?i.onMouseleave=this.onMouseleave:i.onMouseleave=this.createTwoChains("onMouseleave"),this.isFocusToShow()||this.isBlurToHide()?(i.onFocus=this.onFocus,i.onBlur=this.onBlur):(i.onFocus=this.createTwoChains("onFocus"),i.onBlur=u=>{u&&(!u.relatedTarget||!Pa(u.target,u.relatedTarget))&&this.createTwoChains("onBlur")(u)});const a=ge(r&&r.props&&r.props.class,e.class);a&&(i.class=a);const l=mt(r,y(y({},i),{ref:"triggerRef"}),!0,!0),s=g(gf,{key:"portal",getContainer:o&&(()=>o(this.getRootDomNode())),didUpdate:this.handlePortalUpdate,visible:this.$data.sPopupVisible},{default:this.getComponent});return g(Le,null,[l,s])}});var wK=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}},OK=le({name:"SelectTrigger",inheritAttrs:!1,props:{dropdownAlign:Object,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},dropdownClassName:String,dropdownStyle:K.object,placement:String,empty:{type:Boolean,default:void 0},prefixCls:String,popupClassName:String,animation:String,transitionName:String,getPopupContainer:Function,dropdownRender:Function,containerWidth:Number,dropdownMatchSelectWidth:K.oneOfType([Number,Boolean]).def(!0),popupElement:K.any,direction:String,getTriggerDOMNode:Function,onPopupVisibleChange:Function,onPopupMouseEnter:Function,onPopupFocusin:Function,onPopupFocusout:Function},setup(e,t){let{slots:n,attrs:o,expose:r}=t;const i=E(()=>{const{dropdownMatchSelectWidth:l}=e;return PK(l)}),a=ae();return r({getPopupElement:()=>a.value}),()=>{const l=y(y({},e),o),{empty:s=!1}=l,u=wK(l,["empty"]),{visible:c,dropdownAlign:d,prefixCls:f,popupElement:p,dropdownClassName:v,dropdownStyle:h,direction:m="ltr",placement:b,dropdownMatchSelectWidth:S,containerWidth:C,dropdownRender:$,animation:x,transitionName:P,getPopupContainer:w,getTriggerDOMNode:O,onPopupVisibleChange:I,onPopupMouseEnter:_,onPopupFocusin:T,onPopupFocusout:A}=u,R=`${f}-dropdown`;let H=p;$&&(H=$({menuNode:p,props:e}));const M=x?`${R}-${x}`:P,D=y({minWidth:`${C}px`},h);return typeof S=="number"?D.width=`${S}px`:S&&(D.width=`${C}px`),g(ss,k(k({},e),{},{showAction:I?["click"]:[],hideAction:I?["click"]:[],popupPlacement:b||(m==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:i.value,prefixCls:R,popupTransitionName:M,popupAlign:d,popupVisible:c,getPopupContainer:w,popupClassName:ge(v,{[`${R}-empty`]:s}),popupStyle:D,getTriggerDOMNode:O,onPopupVisibleChange:I}),{default:n.default,popup:()=>g("div",{ref:a,onMouseenter:_,onFocusin:T,onFocusout:A},[H])})}}}),Ie={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},Kl=(e,t)=>{let{slots:n}=t;var o;const{class:r,customizeIcon:i,customizeIconProps:a,onMousedown:l,onClick:s}=e;let u;return typeof i=="function"?u=i(a):u=ln(i)?Dn(i):i,g("span",{class:r,onMousedown:c=>{c.preventDefault(),l&&l(c)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},[u!==void 0?u:g("span",{class:r.split(/\s+/).map(c=>`${c}-icon`)},[(o=n.default)===null||o===void 0?void 0:o.call(n)])])};Kl.inheritAttrs=!1;Kl.displayName="TransBtn";Kl.props={class:String,customizeIcon:K.any,customizeIconProps:K.any,onMousedown:Function,onClick:Function};var IK=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{o.value&&o.value.focus()},blur:()=>{o.value&&o.value.blur()},input:o,setSelectionRange:(s,u,c)=>{var d;(d=o.value)===null||d===void 0||d.setSelectionRange(s,u,c)},select:()=>{var s;(s=o.value)===null||s===void 0||s.select()},getSelectionStart:()=>{var s;return(s=o.value)===null||s===void 0?void 0:s.selectionStart},getSelectionEnd:()=>{var s;return(s=o.value)===null||s===void 0?void 0:s.selectionEnd},getScrollTop:()=>{var s;return(s=o.value)===null||s===void 0?void 0:s.scrollTop}}),()=>{const{tag:s,value:u}=e,c=IK(e,["tag","value"]);return g(s,k(k({},c),{},{ref:o,value:u}),null)}}});function EK(){const e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function Ug(e){const t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.scrollX||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.scrollY||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}function _K(e){return Array.prototype.slice.apply(e).map(n=>`${n}: ${e.getPropertyValue(n)};`).join("")}function MK(e){return Object.keys(e).reduce((t,n)=>{const o=e[n];return typeof o>"u"||o===null||(t+=`${n}: ${e[n]};`),t},"")}var AK=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.value,l],()=>{l.value||(a.value=e.value)},{immediate:!0});const s=w=>{n("change",w)},u=w=>{l.value=!0,w.target.composing=!0,n("compositionstart",w)},c=w=>{l.value=!1,w.target.composing=!1,n("compositionend",w);const O=document.createEvent("HTMLEvents");O.initEvent("input",!0,!0),w.target.dispatchEvent(O),s(w)},d=w=>{if(l.value&&e.lazy){a.value=w.target.value;return}n("input",w)},f=w=>{n("blur",w)},p=w=>{n("focus",w)},v=()=>{i.value&&i.value.focus()},h=()=>{i.value&&i.value.blur()},m=w=>{n("keydown",w)},b=w=>{n("keyup",w)},S=(w,O,I)=>{var _;(_=i.value)===null||_===void 0||_.setSelectionRange(w,O,I)},C=()=>{var w;(w=i.value)===null||w===void 0||w.select()};r({focus:v,blur:h,input:E(()=>{var w;return(w=i.value)===null||w===void 0?void 0:w.input}),setSelectionRange:S,select:C,getSelectionStart:()=>{var w;return(w=i.value)===null||w===void 0?void 0:w.getSelectionStart()},getSelectionEnd:()=>{var w;return(w=i.value)===null||w===void 0?void 0:w.getSelectionEnd()},getScrollTop:()=>{var w;return(w=i.value)===null||w===void 0?void 0:w.getScrollTop()}});const $=w=>{n("mousedown",w)},x=w=>{n("paste",w)},P=E(()=>e.style&&typeof e.style!="string"?MK(e.style):e.style);return()=>{const{style:w,lazy:O}=e,I=AK(e,["style","lazy"]);return g(TK,k(k(k({},I),o),{},{style:P.value,onInput:d,onChange:s,onBlur:f,onFocus:p,ref:i,value:a.value,onCompositionstart:u,onCompositionend:c,onKeyup:b,onKeydown:m,onPaste:x,onMousedown:$}),null)}}}),RK={inputRef:K.any,prefixCls:String,id:String,inputElement:K.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:K.oneOfType([K.number,K.string]),attrs:K.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},b8=le({compatConfig:{MODE:3},name:"SelectInput",inheritAttrs:!1,props:RK,setup(e){let t=null;const n=ze("VCSelectContainerEvent");return()=>{var o;const{prefixCls:r,id:i,inputElement:a,disabled:l,tabindex:s,autofocus:u,autocomplete:c,editable:d,activeDescendantId:f,value:p,onKeydown:v,onMousedown:h,onChange:m,onPaste:b,onCompositionstart:S,onCompositionend:C,onFocus:$,onBlur:x,open:P,inputRef:w,attrs:O}=e;let I=a||g(Xc,null,null);const _=I.props||{},{onKeydown:T,onInput:A,onFocus:R,onBlur:H,onMousedown:M,onCompositionstart:D,onCompositionend:N,style:L}=_;return I=mt(I,y(y(y(y(y({type:"search"},_),{id:i,ref:w,disabled:l,tabindex:s,lazy:!1,autocomplete:c||"off",autofocus:u,class:ge(`${r}-selection-search-input`,(o=I==null?void 0:I.props)===null||o===void 0?void 0:o.class),role:"combobox","aria-expanded":P,"aria-haspopup":"listbox","aria-owns":`${i}_list`,"aria-autocomplete":"list","aria-controls":`${i}_list`,"aria-activedescendant":f}),O),{value:d?p:"",readonly:!d,unselectable:d?null:"on",style:y(y({},L),{opacity:d?null:0}),onKeydown:F=>{v(F),T&&T(F)},onMousedown:F=>{h(F),M&&M(F)},onInput:F=>{m(F),A&&A(F)},onCompositionstart(F){S(F),D&&D(F)},onCompositionend(F){C(F),N&&N(F)},onPaste:b,onFocus:function(){clearTimeout(t),R&&R(arguments.length<=0?void 0:arguments[0]),$&&$(arguments.length<=0?void 0:arguments[0]),n==null||n.focus(arguments.length<=0?void 0:arguments[0])},onBlur:function(){for(var F=arguments.length,B=new Array(F),j=0;j{H&&H(B[0]),x&&x(B[0]),n==null||n.blur(B[0])},100)}}),I.type==="textarea"?{}:{type:"search"}),!0,!0),I}}}),DK=`accept acceptcharset accesskey action allowfullscreen allowtransparency +}`,n)}else Lg(n);o(()=>{Lg(n)})}},{flush:"post"})}let sl=0;const zp=so(),zP=e=>{if(!zp)return null;if(e){if(typeof e=="string")return document.querySelectorAll(e)[0];if(typeof e=="function")return e();if(typeof e=="object"&&e instanceof window.HTMLElement)return e}return document.body},gf=le({compatConfig:{MODE:3},name:"PortalWrapper",inheritAttrs:!1,props:{wrapperClassName:String,forceRender:{type:Boolean,default:void 0},getContainer:K.any,visible:{type:Boolean,default:void 0},autoLock:$e(),didUpdate:Function},setup(e,t){let{slots:n}=t;const o=se(),r=se(),i=se(),a=se(1),l=so()&&document.createElement("div"),s=()=>{var p,v;o.value===l&&((v=(p=o.value)===null||p===void 0?void 0:p.parentNode)===null||v===void 0||v.removeChild(o.value)),o.value=null};let u=null;const c=function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)||o.value&&!o.value.parentNode?(u=zP(e.getContainer),u?(u.appendChild(o.value),!0):!1):!0},d=()=>zp?(o.value||(o.value=l,c(!0)),f(),o.value):null,f=()=>{const{wrapperClassName:p}=e;o.value&&p&&p!==o.value.className&&(o.value.className=p)};return uo(()=>{f(),c()}),xK(E(()=>e.autoLock&&e.visible&&so()&&(o.value===document.body||o.value===l))),Ke(()=>{let p=!1;be([()=>e.visible,()=>e.getContainer],(v,h)=>{let[m,b]=v,[S,C]=h;zp&&(u=zP(e.getContainer),u===document.body&&(m&&!S?sl+=1:p&&(sl-=1))),p&&(typeof b=="function"&&typeof C=="function"?b.toString()!==C.toString():b!==C)&&s(),p=!0},{immediate:!0,flush:"post"}),ot(()=>{c()||(i.value=Ze(()=>{a.value+=1}))})}),tt(()=>{const{visible:p}=e;zp&&u===document.body&&(sl=p&&sl?sl-1:sl),s(),Ze.cancel(i.value)}),()=>{const{forceRender:p,visible:v}=e;let h=null;const m={getOpenCount:()=>sl,getContainer:d};return a.value&&(p||v||r.value)&&(h=g(mA,{getContainer:d,ref:r,didUpdate:e.didUpdate},{default:()=>{var b;return(b=n.default)===null||b===void 0?void 0:b.call(n,m)}})),h}}}),$K=["onClick","onMousedown","onTouchstart","onMouseenter","onMouseleave","onFocus","onBlur","onContextmenu"],ss=le({compatConfig:{MODE:3},name:"Trigger",mixins:[ls],inheritAttrs:!1,props:X6(),setup(e){const t=E(()=>{const{popupPlacement:r,popupAlign:i,builtinPlacements:a}=e;return r&&a?FP(a,r,i):i}),n=se(null),o=r=>{n.value=r};return{vcTriggerContext:ze("vcTriggerContext",{}),popupRef:n,setPopupRef:o,triggerRef:se(null),align:t,focusTime:null,clickOutsideHandler:null,contextmenuOutsideHandler1:null,contextmenuOutsideHandler2:null,touchOutsideHandler:null,attachId:null,delayTimer:null,hasPopupMouseDown:!1,preClickTime:null,preTouchTime:null,mouseDownTimeout:null,childOriginEvents:{}}},data(){const e=this.$props;let t;return this.popupVisible!==void 0?t=!!e.popupVisible:t=!!e.defaultPopupVisible,$K.forEach(n=>{this[`fire${n}`]=o=>{this.fireEvents(n,o)}}),{prevPopupVisible:t,sPopupVisible:t,point:null}},watch:{popupVisible(e){e!==void 0&&(this.prevPopupVisible=this.sPopupVisible,this.sPopupVisible=e)}},created(){Xe("vcTriggerContext",{onPopupMouseDown:this.onPopupMouseDown,onPopupMouseenter:this.onPopupMouseenter,onPopupMouseleave:this.onPopupMouseleave}),uC(this)},deactivated(){this.setPopupVisible(!1)},mounted(){this.$nextTick(()=>{this.updatedCal()})},updated(){this.$nextTick(()=>{this.updatedCal()})},beforeUnmount(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Ze.cancel(this.attachId)},methods:{updatedCal(){const e=this.$props;if(this.$data.sPopupVisible){let n;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextmenuToShow())&&(n=e.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Ht(n,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(n=n||e.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Ht(n,"touchstart",this.onDocumentClick,hn?{passive:!1}:!1)),!this.contextmenuOutsideHandler1&&this.isContextmenuToShow()&&(n=n||e.getDocument(this.getRootDomNode()),this.contextmenuOutsideHandler1=Ht(n,"scroll",this.onContextmenuClose)),!this.contextmenuOutsideHandler2&&this.isContextmenuToShow()&&(this.contextmenuOutsideHandler2=Ht(window,"blur",this.onContextmenuClose))}else this.clearOutsideHandler()},onMouseenter(e){const{mouseEnterDelay:t}=this.$props;this.fireEvents("onMouseenter",e),this.delaySetPopupVisible(!0,t,t?null:e)},onMouseMove(e){this.fireEvents("onMousemove",e),this.setPoint(e)},onMouseleave(e){this.fireEvents("onMouseleave",e),this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay)},onPopupMouseenter(){const{vcTriggerContext:e={}}=this;e.onPopupMouseenter&&e.onPopupMouseenter(),this.clearDelayTimer()},onPopupMouseleave(e){var t;if(e&&e.relatedTarget&&!e.relatedTarget.setTimeout&&Pa((t=this.popupRef)===null||t===void 0?void 0:t.getElement(),e.relatedTarget))return;this.isMouseLeaveToHide()&&this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay);const{vcTriggerContext:n={}}=this;n.onPopupMouseleave&&n.onPopupMouseleave(e)},onFocus(e){this.fireEvents("onFocus",e),this.clearDelayTimer(),this.isFocusToShow()&&(this.focusTime=Date.now(),this.delaySetPopupVisible(!0,this.$props.focusDelay))},onMousedown(e){this.fireEvents("onMousedown",e),this.preClickTime=Date.now()},onTouchstart(e){this.fireEvents("onTouchstart",e),this.preTouchTime=Date.now()},onBlur(e){Pa(e.target,e.relatedTarget||document.activeElement)||(this.fireEvents("onBlur",e),this.clearDelayTimer(),this.isBlurToHide()&&this.delaySetPopupVisible(!1,this.$props.blurDelay))},onContextmenu(e){e.preventDefault(),this.fireEvents("onContextmenu",e),this.setPopupVisible(!0,e)},onContextmenuClose(){this.isContextmenuToShow()&&this.close()},onClick(e){if(this.fireEvents("onClick",e),this.focusTime){let n;if(this.preClickTime&&this.preTouchTime?n=Math.min(this.preClickTime,this.preTouchTime):this.preClickTime?n=this.preClickTime:this.preTouchTime&&(n=this.preTouchTime),Math.abs(n-this.focusTime)<20)return;this.focusTime=0}this.preClickTime=0,this.preTouchTime=0,this.isClickToShow()&&(this.isClickToHide()||this.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault(),e&&e.domEvent&&e.domEvent.preventDefault();const t=!this.$data.sPopupVisible;(this.isClickToHide()&&!t||t&&this.isClickToShow())&&this.setPopupVisible(!this.$data.sPopupVisible,e)},onPopupMouseDown(){const{vcTriggerContext:e={}}=this;this.hasPopupMouseDown=!0,clearTimeout(this.mouseDownTimeout),this.mouseDownTimeout=setTimeout(()=>{this.hasPopupMouseDown=!1},0),e.onPopupMouseDown&&e.onPopupMouseDown(...arguments)},onDocumentClick(e){if(this.$props.mask&&!this.$props.maskClosable)return;const t=e.target,n=this.getRootDomNode(),o=this.getPopupDomNode();(!Pa(n,t)||this.isContextMenuOnly())&&!Pa(o,t)&&!this.hasPopupMouseDown&&this.delaySetPopupVisible(!1,.1)},getPopupDomNode(){var e;return((e=this.popupRef)===null||e===void 0?void 0:e.getElement())||null},getRootDomNode(){var e,t,n,o;const{getTriggerDOMNode:r}=this.$props;if(r){const i=((t=(e=this.triggerRef)===null||e===void 0?void 0:e.$el)===null||t===void 0?void 0:t.nodeName)==="#comment"?null:Co(this.triggerRef);return Co(r(i))}try{const i=((o=(n=this.triggerRef)===null||n===void 0?void 0:n.$el)===null||o===void 0?void 0:o.nodeName)==="#comment"?null:Co(this.triggerRef);if(i)return i}catch{}return Co(this)},handleGetPopupClassFromAlign(e){const t=[],n=this.$props,{popupPlacement:o,builtinPlacements:r,prefixCls:i,alignPoint:a,getPopupClassNameFromAlign:l}=n;return o&&r&&t.push(mK(r,i,e,a)),l&&t.push(l(e)),t.join(" ")},getPopupAlign(){const e=this.$props,{popupPlacement:t,popupAlign:n,builtinPlacements:o}=e;return t&&o?FP(o,t,n):n},getComponent(){const e={};this.isMouseEnterToShow()&&(e.onMouseenter=this.onPopupMouseenter),this.isMouseLeaveToHide()&&(e.onMouseleave=this.onPopupMouseleave),e.onMousedown=this.onPopupMouseDown,e[hn?"onTouchstartPassive":"onTouchstart"]=this.onPopupMouseDown;const{handleGetPopupClassFromAlign:t,getRootDomNode:n,$attrs:o}=this,{prefixCls:r,destroyPopupOnHide:i,popupClassName:a,popupAnimation:l,popupTransitionName:s,popupStyle:u,mask:c,maskAnimation:d,maskTransitionName:f,zIndex:p,stretch:v,alignPoint:h,mobile:m,arrow:b,forceRender:S}=this.$props,{sPopupVisible:C,point:$}=this.$data,x=y(y({prefixCls:r,arrow:b,destroyPopupOnHide:i,visible:C,point:h?$:null,align:this.align,animation:l,getClassNameFromAlign:t,stretch:v,getRootDomNode:n,mask:c,zIndex:p,transitionName:s,maskAnimation:d,maskTransitionName:f,class:a,style:u,onAlign:o.onPopupAlign||G6},e),{ref:this.setPopupRef,mobile:m,forceRender:S});return g(hK,x,{default:this.$slots.popup||(()=>WM(this,"popup"))})},attachParent(e){Ze.cancel(this.attachId);const{getPopupContainer:t,getDocument:n}=this.$props,o=this.getRootDomNode();let r;t?(o||t.length===0)&&(r=t(o)):r=n(this.getRootDomNode()).body,r?r.appendChild(e):this.attachId=Ze(()=>{this.attachParent(e)})},getContainer(){const{$props:e}=this,{getDocument:t}=e,n=t(this.getRootDomNode()).createElement("div");return n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%",this.attachParent(n),n},setPopupVisible(e,t){const{alignPoint:n,sPopupVisible:o,onPopupVisibleChange:r}=this;this.clearDelayTimer(),o!==e&&(ki(this,"popupVisible")||this.setState({sPopupVisible:e,prevPopupVisible:o}),r&&r(e)),n&&t&&e&&this.setPoint(t)},setPoint(e){const{alignPoint:t}=this.$props;!t||!e||this.setState({point:{pageX:e.pageX,pageY:e.pageY}})},handlePortalUpdate(){this.prevPopupVisible!==this.sPopupVisible&&this.afterPopupVisibleChange(this.sPopupVisible)},delaySetPopupVisible(e,t,n){const o=t*1e3;if(this.clearDelayTimer(),o){const r=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=setTimeout(()=>{this.setPopupVisible(e,r),this.clearDelayTimer()},o)}else this.setPopupVisible(e,n)},clearDelayTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)},clearOutsideHandler(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextmenuOutsideHandler1&&(this.contextmenuOutsideHandler1.remove(),this.contextmenuOutsideHandler1=null),this.contextmenuOutsideHandler2&&(this.contextmenuOutsideHandler2.remove(),this.contextmenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)},createTwoChains(e){let t=()=>{};const n=w2(this);return this.childOriginEvents[e]&&n[e]?this[`fire${e}`]:(t=this.childOriginEvents[e]||n[e]||t,t)},isClickToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("click")!==-1||t.indexOf("click")!==-1},isContextMenuOnly(){const{action:e}=this.$props;return e==="contextmenu"||e.length===1&&e[0]==="contextmenu"},isContextmenuToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("contextmenu")!==-1||t.indexOf("contextmenu")!==-1},isClickToHide(){const{action:e,hideAction:t}=this.$props;return e.indexOf("click")!==-1||t.indexOf("click")!==-1},isMouseEnterToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("hover")!==-1||t.indexOf("mouseenter")!==-1},isMouseLeaveToHide(){const{action:e,hideAction:t}=this.$props;return e.indexOf("hover")!==-1||t.indexOf("mouseleave")!==-1},isFocusToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("focus")!==-1||t.indexOf("focus")!==-1},isBlurToHide(){const{action:e,hideAction:t}=this.$props;return e.indexOf("focus")!==-1||t.indexOf("blur")!==-1},forcePopupAlign(){var e;this.$data.sPopupVisible&&((e=this.popupRef)===null||e===void 0||e.forceAlign())},fireEvents(e,t){this.childOriginEvents[e]&&this.childOriginEvents[e](t);const n=this.$props[e]||this.$attrs[e];n&&n(t)},close(){this.setPopupVisible(!1)}},render(){const{$attrs:e}=this,t=zt(gv(this)),{alignPoint:n,getPopupContainer:o}=this.$props,r=t[0];this.childOriginEvents=w2(r);const i={key:"trigger"};this.isContextmenuToShow()?i.onContextmenu=this.onContextmenu:i.onContextmenu=this.createTwoChains("onContextmenu"),this.isClickToHide()||this.isClickToShow()?(i.onClick=this.onClick,i.onMousedown=this.onMousedown,i[hn?"onTouchstartPassive":"onTouchstart"]=this.onTouchstart):(i.onClick=this.createTwoChains("onClick"),i.onMousedown=this.createTwoChains("onMousedown"),i[hn?"onTouchstartPassive":"onTouchstart"]=this.createTwoChains("onTouchstart")),this.isMouseEnterToShow()?(i.onMouseenter=this.onMouseenter,n&&(i.onMousemove=this.onMouseMove)):i.onMouseenter=this.createTwoChains("onMouseenter"),this.isMouseLeaveToHide()?i.onMouseleave=this.onMouseleave:i.onMouseleave=this.createTwoChains("onMouseleave"),this.isFocusToShow()||this.isBlurToHide()?(i.onFocus=this.onFocus,i.onBlur=this.onBlur):(i.onFocus=this.createTwoChains("onFocus"),i.onBlur=u=>{u&&(!u.relatedTarget||!Pa(u.target,u.relatedTarget))&&this.createTwoChains("onBlur")(u)});const a=ge(r&&r.props&&r.props.class,e.class);a&&(i.class=a);const l=mt(r,y(y({},i),{ref:"triggerRef"}),!0,!0),s=g(gf,{key:"portal",getContainer:o&&(()=>o(this.getRootDomNode())),didUpdate:this.handlePortalUpdate,visible:this.$data.sPopupVisible},{default:this.getComponent});return g(Le,null,[l,s])}});var wK=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}},OK=le({name:"SelectTrigger",inheritAttrs:!1,props:{dropdownAlign:Object,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},dropdownClassName:String,dropdownStyle:K.object,placement:String,empty:{type:Boolean,default:void 0},prefixCls:String,popupClassName:String,animation:String,transitionName:String,getPopupContainer:Function,dropdownRender:Function,containerWidth:Number,dropdownMatchSelectWidth:K.oneOfType([Number,Boolean]).def(!0),popupElement:K.any,direction:String,getTriggerDOMNode:Function,onPopupVisibleChange:Function,onPopupMouseEnter:Function,onPopupFocusin:Function,onPopupFocusout:Function},setup(e,t){let{slots:n,attrs:o,expose:r}=t;const i=E(()=>{const{dropdownMatchSelectWidth:l}=e;return PK(l)}),a=ae();return r({getPopupElement:()=>a.value}),()=>{const l=y(y({},e),o),{empty:s=!1}=l,u=wK(l,["empty"]),{visible:c,dropdownAlign:d,prefixCls:f,popupElement:p,dropdownClassName:v,dropdownStyle:h,direction:m="ltr",placement:b,dropdownMatchSelectWidth:S,containerWidth:C,dropdownRender:$,animation:x,transitionName:P,getPopupContainer:w,getTriggerDOMNode:O,onPopupVisibleChange:I,onPopupMouseEnter:_,onPopupFocusin:T,onPopupFocusout:A}=u,R=`${f}-dropdown`;let H=p;$&&(H=$({menuNode:p,props:e}));const M=x?`${R}-${x}`:P,D=y({minWidth:`${C}px`},h);return typeof S=="number"?D.width=`${S}px`:S&&(D.width=`${C}px`),g(ss,k(k({},e),{},{showAction:I?["click"]:[],hideAction:I?["click"]:[],popupPlacement:b||(m==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:i.value,prefixCls:R,popupTransitionName:M,popupAlign:d,popupVisible:c,getPopupContainer:w,popupClassName:ge(v,{[`${R}-empty`]:s}),popupStyle:D,getTriggerDOMNode:O,onPopupVisibleChange:I}),{default:n.default,popup:()=>g("div",{ref:a,onMouseenter:_,onFocusin:T,onFocusout:A},[H])})}}}),Ie={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},Kl=(e,t)=>{let{slots:n}=t;var o;const{class:r,customizeIcon:i,customizeIconProps:a,onMousedown:l,onClick:s}=e;let u;return typeof i=="function"?u=i(a):u=ln(i)?Dn(i):i,g("span",{class:r,onMousedown:c=>{c.preventDefault(),l&&l(c)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},[u!==void 0?u:g("span",{class:r.split(/\s+/).map(c=>`${c}-icon`)},[(o=n.default)===null||o===void 0?void 0:o.call(n)])])};Kl.inheritAttrs=!1;Kl.displayName="TransBtn";Kl.props={class:String,customizeIcon:K.any,customizeIconProps:K.any,onMousedown:Function,onClick:Function};var IK=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{o.value&&o.value.focus()},blur:()=>{o.value&&o.value.blur()},input:o,setSelectionRange:(s,u,c)=>{var d;(d=o.value)===null||d===void 0||d.setSelectionRange(s,u,c)},select:()=>{var s;(s=o.value)===null||s===void 0||s.select()},getSelectionStart:()=>{var s;return(s=o.value)===null||s===void 0?void 0:s.selectionStart},getSelectionEnd:()=>{var s;return(s=o.value)===null||s===void 0?void 0:s.selectionEnd},getScrollTop:()=>{var s;return(s=o.value)===null||s===void 0?void 0:s.scrollTop}}),()=>{const{tag:s,value:u}=e,c=IK(e,["tag","value"]);return g(s,k(k({},c),{},{ref:o,value:u}),null)}}});function EK(){const e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function Kg(e){const t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.scrollX||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.scrollY||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}function _K(e){return Array.prototype.slice.apply(e).map(n=>`${n}: ${e.getPropertyValue(n)};`).join("")}function MK(e){return Object.keys(e).reduce((t,n)=>{const o=e[n];return typeof o>"u"||o===null||(t+=`${n}: ${e[n]};`),t},"")}var AK=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.value,l],()=>{l.value||(a.value=e.value)},{immediate:!0});const s=w=>{n("change",w)},u=w=>{l.value=!0,w.target.composing=!0,n("compositionstart",w)},c=w=>{l.value=!1,w.target.composing=!1,n("compositionend",w);const O=document.createEvent("HTMLEvents");O.initEvent("input",!0,!0),w.target.dispatchEvent(O),s(w)},d=w=>{if(l.value&&e.lazy){a.value=w.target.value;return}n("input",w)},f=w=>{n("blur",w)},p=w=>{n("focus",w)},v=()=>{i.value&&i.value.focus()},h=()=>{i.value&&i.value.blur()},m=w=>{n("keydown",w)},b=w=>{n("keyup",w)},S=(w,O,I)=>{var _;(_=i.value)===null||_===void 0||_.setSelectionRange(w,O,I)},C=()=>{var w;(w=i.value)===null||w===void 0||w.select()};r({focus:v,blur:h,input:E(()=>{var w;return(w=i.value)===null||w===void 0?void 0:w.input}),setSelectionRange:S,select:C,getSelectionStart:()=>{var w;return(w=i.value)===null||w===void 0?void 0:w.getSelectionStart()},getSelectionEnd:()=>{var w;return(w=i.value)===null||w===void 0?void 0:w.getSelectionEnd()},getScrollTop:()=>{var w;return(w=i.value)===null||w===void 0?void 0:w.getScrollTop()}});const $=w=>{n("mousedown",w)},x=w=>{n("paste",w)},P=E(()=>e.style&&typeof e.style!="string"?MK(e.style):e.style);return()=>{const{style:w,lazy:O}=e,I=AK(e,["style","lazy"]);return g(TK,k(k(k({},I),o),{},{style:P.value,onInput:d,onChange:s,onBlur:f,onFocus:p,ref:i,value:a.value,onCompositionstart:u,onCompositionend:c,onKeyup:b,onKeydown:m,onPaste:x,onMousedown:$}),null)}}}),RK={inputRef:K.any,prefixCls:String,id:String,inputElement:K.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:K.oneOfType([K.number,K.string]),attrs:K.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},bA=le({compatConfig:{MODE:3},name:"SelectInput",inheritAttrs:!1,props:RK,setup(e){let t=null;const n=ze("VCSelectContainerEvent");return()=>{var o;const{prefixCls:r,id:i,inputElement:a,disabled:l,tabindex:s,autofocus:u,autocomplete:c,editable:d,activeDescendantId:f,value:p,onKeydown:v,onMousedown:h,onChange:m,onPaste:b,onCompositionstart:S,onCompositionend:C,onFocus:$,onBlur:x,open:P,inputRef:w,attrs:O}=e;let I=a||g(Xc,null,null);const _=I.props||{},{onKeydown:T,onInput:A,onFocus:R,onBlur:H,onMousedown:M,onCompositionstart:D,onCompositionend:N,style:L}=_;return I=mt(I,y(y(y(y(y({type:"search"},_),{id:i,ref:w,disabled:l,tabindex:s,lazy:!1,autocomplete:c||"off",autofocus:u,class:ge(`${r}-selection-search-input`,(o=I==null?void 0:I.props)===null||o===void 0?void 0:o.class),role:"combobox","aria-expanded":P,"aria-haspopup":"listbox","aria-owns":`${i}_list`,"aria-autocomplete":"list","aria-controls":`${i}_list`,"aria-activedescendant":f}),O),{value:d?p:"",readonly:!d,unselectable:d?null:"on",style:y(y({},L),{opacity:d?null:0}),onKeydown:F=>{v(F),T&&T(F)},onMousedown:F=>{h(F),M&&M(F)},onInput:F=>{m(F),A&&A(F)},onCompositionstart(F){S(F),D&&D(F)},onCompositionend(F){C(F),N&&N(F)},onPaste:b,onFocus:function(){clearTimeout(t),R&&R(arguments.length<=0?void 0:arguments[0]),$&&$(arguments.length<=0?void 0:arguments[0]),n==null||n.focus(arguments.length<=0?void 0:arguments[0])},onBlur:function(){for(var F=arguments.length,B=new Array(F),j=0;j{H&&H(B[0]),x&&x(B[0]),n==null||n.blur(B[0])},100)}}),I.type==="textarea"?{}:{type:"search"}),!0,!0),I}}}),DK=`accept acceptcharset accesskey action allowfullscreen allowtransparency alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge charset checked classid classname colspan cols content contenteditable contextmenu controls coords crossorigin data datetime default defer dir disabled download draggable @@ -82,9 +82,9 @@ summary tabindex target title type usemap value width wmode wrap`,NK=`onCopy onC onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata - onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`,jP=`${DK} ${NK}`.split(/[\s\n]+/),kK="aria-",LK="data-";function WP(e,t){return e.indexOf(t)===0}function Ua(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n=y({},t);const o={};return Object.keys(e).forEach(r=>{(n.aria&&(r==="role"||WP(r,kK))||n.data&&WP(r,LK)||n.attr&&(jP.includes(r)||jP.includes(r.toLowerCase())))&&(o[r]=e[r])}),o}const y8=Symbol("OverflowContextProviderKey"),Ny=le({compatConfig:{MODE:3},name:"OverflowContextProvider",inheritAttrs:!1,props:{value:{type:Object}},setup(e,t){let{slots:n}=t;return Xe(y8,E(()=>e.value)),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),FK=()=>ze(y8,E(()=>null));var BK=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.responsive&&!e.display),i=ae();o({itemNodeRef:i});function a(l){e.registerSize(e.itemKey,l)}return Zn(()=>{a(null)}),()=>{var l;const{prefixCls:s,invalidate:u,item:c,renderItem:d,responsive:f,registerSize:p,itemKey:v,display:h,order:m,component:b="div"}=e,S=BK(e,["prefixCls","invalidate","item","renderItem","responsive","registerSize","itemKey","display","order","component"]),C=(l=n.default)===null||l===void 0?void 0:l.call(n),$=d&&c!==xs?d(c):C;let x;u||(x={opacity:r.value?0:1,height:r.value?0:xs,overflowY:r.value?"hidden":xs,order:f?m:xs,pointerEvents:r.value?"none":xs,position:r.value?"absolute":xs});const P={};return r.value&&(P["aria-hidden"]=!0),g(br,{disabled:!f,onResize:w=>{let{offsetWidth:O}=w;a(O)}},{default:()=>g(b,k(k(k({class:ge(!u&&s),style:x},P),S),{},{ref:i}),{default:()=>[$]})})}}});var P0=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var i;if(!r.value){const{component:d="div"}=e,f=P0(e,["component"]);return g(d,k(k({},f),o),{default:()=>[(i=n.default)===null||i===void 0?void 0:i.call(n)]})}const a=r.value,{className:l}=a,s=P0(a,["className"]),{class:u}=o,c=P0(o,["class"]);return g(Ny,{value:null},{default:()=>[g(Wp,k(k(k({class:ge(l,u)},s),c),e),n)]})}}});var zK=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({id:String,prefixCls:String,data:Array,itemKey:[String,Number,Function],itemWidth:{type:Number,default:10},renderItem:Function,renderRawItem:Function,maxCount:[Number,String],renderRest:Function,renderRawRest:Function,suffix:K.any,component:String,itemComponent:K.any,onVisibleChange:Function,ssr:String,onMousedown:Function,role:String}),Ki=le({name:"Overflow",inheritAttrs:!1,props:WK(),emits:["visibleChange"],setup(e,t){let{attrs:n,emit:o,slots:r}=t;const i=E(()=>e.ssr==="full"),a=se(null),l=E(()=>a.value||0),s=se(new Map),u=se(0),c=se(0),d=se(0),f=se(null),p=se(null),v=E(()=>p.value===null&&i.value?Number.MAX_SAFE_INTEGER:p.value||0),h=se(!1),m=E(()=>`${e.prefixCls}-item`),b=E(()=>Math.max(u.value,c.value)),S=E(()=>!!(e.data.length&&e.maxCount===S8)),C=E(()=>e.maxCount===C8),$=E(()=>S.value||typeof e.maxCount=="number"&&e.data.length>e.maxCount),x=E(()=>{let M=e.data;return S.value?a.value===null&&i.value?M=e.data:M=e.data.slice(0,Math.min(e.data.length,l.value/e.itemWidth)):typeof e.maxCount=="number"&&(M=e.data.slice(0,e.maxCount)),M}),P=E(()=>S.value?e.data.slice(v.value+1):e.data.slice(x.value.length)),w=(M,D)=>{var N;return typeof e.itemKey=="function"?e.itemKey(M):(N=e.itemKey&&(M==null?void 0:M[e.itemKey]))!==null&&N!==void 0?N:D},O=E(()=>e.renderItem||(M=>M)),I=(M,D)=>{p.value=M,D||(h.value=M{a.value=D.clientWidth},T=(M,D)=>{const N=new Map(s.value);D===null?N.delete(M):N.set(M,D),s.value=N},A=(M,D)=>{u.value=c.value,c.value=D},R=(M,D)=>{d.value=D},H=M=>s.value.get(w(x.value[M],M));return be([l,s,c,d,()=>e.itemKey,x],()=>{if(l.value&&b.value&&x.value){let M=d.value;const D=x.value.length,N=D-1;if(!D){I(0),f.value=null;return}for(let L=0;Ll.value){I(L-1),f.value=M-F-d.value+c.value;break}}e.suffix&&H(0)+d.value>l.value&&(f.value=null)}}),()=>{const M=h.value&&!!P.value.length,{itemComponent:D,renderRawItem:N,renderRawRest:L,renderRest:F,prefixCls:B="rc-overflow",suffix:j,component:z="div",id:G,onMousedown:Q}=e,{class:Y,style:oe}=n,Z=zK(n,["class","style"]);let re={};f.value!==null&&S.value&&(re={position:"absolute",left:`${f.value}px`,top:0});const ne={prefixCls:m.value,responsive:S.value,component:D,invalidate:C.value},X=N?(J,de)=>{const fe=w(J,de);return g(Ny,{key:fe,value:y(y({},ne),{order:de,item:J,itemKey:fe,registerSize:T,display:de<=v.value})},{default:()=>[N(J,de)]})}:(J,de)=>{const fe=w(J,de);return g(Wp,k(k({},ne),{},{order:de,key:fe,item:J,renderItem:O.value,itemKey:fe,registerSize:T,display:de<=v.value}),null)};let te=()=>null;const W={order:M?v.value:Number.MAX_SAFE_INTEGER,className:`${m.value} ${m.value}-rest`,registerSize:A,display:M};if(L)L&&(te=()=>g(Ny,{value:y(y({},ne),W)},{default:()=>[L(P.value)]}));else{const J=F||jK;te=()=>g(Wp,k(k({},ne),W),{default:()=>typeof J=="function"?J(P.value):J})}const U=()=>{var J;return g(z,k({id:G,class:ge(!C.value&&B,Y),style:oe,onMousedown:Q,role:e.role},Z),{default:()=>[x.value.map(X),$.value?te():null,j&&g(Wp,k(k({},ne),{},{order:v.value,class:`${m.value}-suffix`,registerSize:R,display:!0,style:re}),{default:()=>j}),(J=r.default)===null||J===void 0?void 0:J.call(r)]})};return g(br,{disabled:!S.value,onResize:_},{default:U})}}});Ki.Item=HK;Ki.RESPONSIVE=S8;Ki.INVALIDATE=C8;const x8=Symbol("TreeSelectLegacyContextPropsKey");function VK(e){return Xe(x8,e)}function Dv(){return ze(x8,{})}const KK={id:String,prefixCls:String,values:K.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:K.any,placeholder:K.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:K.oneOfType([K.number,K.string]),compositionStatus:Boolean,removeIcon:K.any,choiceTransitionName:String,maxTagCount:K.oneOfType([K.number,K.string]),maxTagTextLength:Number,maxTagPlaceholder:K.any.def(()=>e=>`+ ${e.length} ...`),tagRender:Function,onToggleOpen:{type:Function},onRemove:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},VP=e=>{e.preventDefault(),e.stopPropagation()},UK=le({name:"MultipleSelectSelector",inheritAttrs:!1,props:KK,setup(e){const t=se(),n=se(0),o=se(!1),r=Dv(),i=E(()=>`${e.prefixCls}-selection`),a=E(()=>e.open||e.mode==="tags"?e.searchValue:""),l=E(()=>e.mode==="tags"||e.showSearch&&(e.open||o.value)),s=ae("");Ve(()=>{s.value=a.value}),Ke(()=>{be(s,()=>{n.value=t.value.scrollWidth},{flush:"post",immediate:!0})});function u(v,h,m,b,S){return g("span",{class:ge(`${i.value}-item`,{[`${i.value}-item-disabled`]:m}),title:typeof v=="string"||typeof v=="number"?v.toString():void 0},[g("span",{class:`${i.value}-item-content`},[h]),b&&g(Kl,{class:`${i.value}-item-remove`,onMousedown:VP,onClick:S,customizeIcon:e.removeIcon},{default:()=>[zn("×")]})])}function c(v,h,m,b,S,C){var $;const x=w=>{VP(w),e.onToggleOpen(!open)};let P=C;return r.keyEntities&&(P=(($=r.keyEntities[v])===null||$===void 0?void 0:$.node)||{}),g("span",{key:v,onMousedown:x},[e.tagRender({label:h,value:v,disabled:m,closable:b,onClose:S,option:P})])}function d(v){const{disabled:h,label:m,value:b,option:S}=v,C=!e.disabled&&!h;let $=m;if(typeof e.maxTagTextLength=="number"&&(typeof m=="string"||typeof m=="number")){const P=String($);P.length>e.maxTagTextLength&&($=`${P.slice(0,e.maxTagTextLength)}...`)}const x=P=>{var w;P&&P.stopPropagation(),(w=e.onRemove)===null||w===void 0||w.call(e,v)};return typeof e.tagRender=="function"?c(b,$,h,C,x,S):u(m,$,h,C,x)}function f(v){const{maxTagPlaceholder:h=b=>`+ ${b.length} ...`}=e,m=typeof h=="function"?h(v):h;return u(m,m,!1)}const p=v=>{const h=v.target.composing;s.value=v.target.value,h||e.onInputChange(v)};return()=>{const{id:v,prefixCls:h,values:m,open:b,inputRef:S,placeholder:C,disabled:$,autofocus:x,autocomplete:P,activeDescendantId:w,tabindex:O,compositionStatus:I,onInputPaste:_,onInputKeyDown:T,onInputMouseDown:A,onInputCompositionStart:R,onInputCompositionEnd:H}=e,M=g("div",{class:`${i.value}-search`,style:{width:n.value+"px"},key:"input"},[g(b8,{inputRef:S,open:b,prefixCls:h,id:v,inputElement:null,disabled:$,autofocus:x,autocomplete:P,editable:l.value,activeDescendantId:w,value:s.value,onKeydown:T,onMousedown:A,onChange:p,onPaste:_,onCompositionstart:R,onCompositionend:H,tabindex:O,attrs:Ua(e,!0),onFocus:()=>o.value=!0,onBlur:()=>o.value=!1},null),g("span",{ref:t,class:`${i.value}-search-mirror`,"aria-hidden":!0},[s.value,zn(" ")])]),D=g(Ki,{prefixCls:`${i.value}-overflow`,data:m,renderItem:d,renderRest:f,suffix:M,itemKey:"key",maxCount:e.maxTagCount,key:"overflow"},null);return g(Le,null,[D,!m.length&&!a.value&&!I&&g("span",{class:`${i.value}-placeholder`},[C])])}}}),GK={inputElement:K.any,id:String,prefixCls:String,values:K.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:K.any,placeholder:K.any,compositionStatus:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:K.oneOfType([K.number,K.string]),activeValue:String,backfill:{type:Boolean,default:void 0},optionLabelRender:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},dC=le({name:"SingleSelector",setup(e){const t=se(!1),n=E(()=>e.mode==="combobox"),o=E(()=>n.value||e.showSearch),r=E(()=>{let c=e.searchValue||"";return n.value&&e.activeValue&&!t.value&&(c=e.activeValue),c}),i=Dv();be([n,()=>e.activeValue],()=>{n.value&&(t.value=!1)},{immediate:!0});const a=E(()=>e.mode!=="combobox"&&!e.open&&!e.showSearch?!1:!!r.value||e.compositionStatus),l=E(()=>{const c=e.values[0];return c&&(typeof c.label=="string"||typeof c.label=="number")?c.label.toString():void 0}),s=()=>{if(e.values[0])return null;const c=a.value?{visibility:"hidden"}:void 0;return g("span",{class:`${e.prefixCls}-selection-placeholder`,style:c},[e.placeholder])},u=c=>{c.target.composing||(t.value=!0,e.onInputChange(c))};return()=>{var c,d,f,p;const{inputElement:v,prefixCls:h,id:m,values:b,inputRef:S,disabled:C,autofocus:$,autocomplete:x,activeDescendantId:P,open:w,tabindex:O,optionLabelRender:I,onInputKeyDown:_,onInputMouseDown:T,onInputPaste:A,onInputCompositionStart:R,onInputCompositionEnd:H}=e,M=b[0];let D=null;if(M&&i.customSlots){const N=(c=M.key)!==null&&c!==void 0?c:M.value,L=((d=i.keyEntities[N])===null||d===void 0?void 0:d.node)||{};D=i.customSlots[(f=L.slots)===null||f===void 0?void 0:f.title]||i.customSlots.title||M.label,typeof D=="function"&&(D=D(L))}else D=I&&M?I(M.option):M==null?void 0:M.label;return g(Le,null,[g("span",{class:`${h}-selection-search`},[g(b8,{inputRef:S,prefixCls:h,id:m,open:w,inputElement:v,disabled:C,autofocus:$,autocomplete:x,editable:o.value,activeDescendantId:P,value:r.value,onKeydown:_,onMousedown:T,onChange:u,onPaste:A,onCompositionstart:R,onCompositionend:H,tabindex:O,attrs:Ua(e,!0)},null)]),!n.value&&M&&!a.value&&g("span",{class:`${h}-selection-item`,title:l.value},[g(Le,{key:(p=M.key)!==null&&p!==void 0?p:M.value},[D])]),s()])}}});dC.props=GK;dC.inheritAttrs=!1;function XK(e){return![Ie.ESC,Ie.SHIFT,Ie.BACKSPACE,Ie.TAB,Ie.WIN_KEY,Ie.ALT,Ie.META,Ie.WIN_KEY_RIGHT,Ie.CTRL,Ie.SEMICOLON,Ie.EQUALS,Ie.CAPS_LOCK,Ie.CONTEXT_MENU,Ie.F1,Ie.F2,Ie.F3,Ie.F4,Ie.F5,Ie.F6,Ie.F7,Ie.F8,Ie.F9,Ie.F10,Ie.F11,Ie.F12].includes(e)}function $8(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=null,n;tt(()=>{clearTimeout(n)});function o(r){(r||t===null)&&(t=r),clearTimeout(n),n=setTimeout(()=>{t=null},e)}return[()=>t,o]}function Fd(){const e=t=>{e.current=t};return e}const YK=le({name:"Selector",inheritAttrs:!1,props:{id:String,prefixCls:String,showSearch:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},values:K.array,multiple:{type:Boolean,default:void 0},mode:String,searchValue:String,activeValue:String,inputElement:K.any,autofocus:{type:Boolean,default:void 0},activeDescendantId:String,tabindex:K.oneOfType([K.number,K.string]),disabled:{type:Boolean,default:void 0},placeholder:K.any,removeIcon:K.any,maxTagCount:K.oneOfType([K.number,K.string]),maxTagTextLength:Number,maxTagPlaceholder:K.any,tagRender:Function,optionLabelRender:Function,tokenWithEnter:{type:Boolean,default:void 0},choiceTransitionName:String,onToggleOpen:{type:Function},onSearch:Function,onSearchSubmit:Function,onRemove:Function,onInputKeyDown:{type:Function},domRef:Function},setup(e,t){let{expose:n}=t;const o=Fd(),r=ae(!1),[i,a]=$8(0),l=b=>{const{which:S}=b;(S===Ie.UP||S===Ie.DOWN)&&b.preventDefault(),e.onInputKeyDown&&e.onInputKeyDown(b),S===Ie.ENTER&&e.mode==="tags"&&!r.value&&!e.open&&e.onSearchSubmit(b.target.value),XK(S)&&e.onToggleOpen(!0)},s=()=>{a(!0)};let u=null;const c=b=>{e.onSearch(b,!0,r.value)!==!1&&e.onToggleOpen(!0)},d=()=>{r.value=!0},f=b=>{r.value=!1,e.mode!=="combobox"&&c(b.target.value)},p=b=>{let{target:{value:S}}=b;if(e.tokenWithEnter&&u&&/[\r\n]/.test(u)){const C=u.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");S=S.replace(C,u)}u=null,c(S)},v=b=>{const{clipboardData:S}=b;u=S.getData("text")},h=b=>{let{target:S}=b;S!==o.current&&(document.body.style.msTouchAction!==void 0?setTimeout(()=>{o.current.focus()}):o.current.focus())},m=b=>{const S=i();b.target!==o.current&&!S&&b.preventDefault(),(e.mode!=="combobox"&&(!e.showSearch||!S)||!e.open)&&(e.open&&e.onSearch("",!0,!1),e.onToggleOpen())};return n({focus:()=>{o.current.focus()},blur:()=>{o.current.blur()}}),()=>{const{prefixCls:b,domRef:S,mode:C}=e,$={inputRef:o,onInputKeyDown:l,onInputMouseDown:s,onInputChange:p,onInputPaste:v,compositionStatus:r.value,onInputCompositionStart:d,onInputCompositionEnd:f},x=C==="multiple"||C==="tags"?g(UK,k(k({},e),$),null):g(dC,k(k({},e),$),null);return g("div",{ref:S,class:`${b}-selector`,onClick:h,onMousedown:m},[x])}}});function qK(e,t,n){function o(r){var i,a,l;let s=r.target;s.shadowRoot&&r.composed&&(s=r.composedPath()[0]||s);const u=[(i=e[0])===null||i===void 0?void 0:i.value,(l=(a=e[1])===null||a===void 0?void 0:a.value)===null||l===void 0?void 0:l.getPopupElement()];t.value&&u.every(c=>c&&!c.contains(s)&&c!==s)&&n(!1)}Ke(()=>{window.addEventListener("mousedown",o)}),tt(()=>{window.removeEventListener("mousedown",o)})}function JK(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;const t=se(!1);let n;const o=()=>{clearTimeout(n)};return Ke(()=>{o()}),[t,(i,a)=>{o(),n=setTimeout(()=>{t.value=i,a&&a()},e)},o]}const w8=Symbol("BaseSelectContextKey");function ZK(e){return Xe(w8,e)}function hf(){return ze(w8,{})}const fC=()=>{if(typeof navigator>"u"||typeof window>"u")return!1;const e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e==null?void 0:e.substring(0,4))};function Gg(e){if(!Ut(e))return rt(e);const t=new Proxy({},{get(n,o,r){return Reflect.get(e.value,o,r)},set(n,o,r){return e.value[o]=r,!0},deleteProperty(n,o){return Reflect.deleteProperty(e.value,o)},has(n,o){return Reflect.has(e.value,o)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return rt(t)}var QK=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,id:String,omitDomProps:Array,displayValues:Array,onDisplayValuesChange:Function,activeValue:String,activeDescendantId:String,onActiveValueChange:Function,searchValue:String,onSearch:Function,onSearchSplit:Function,maxLength:Number,OptionList:K.any,emptyOptions:Boolean}),Nv=()=>({showSearch:{type:Boolean,default:void 0},tagRender:{type:Function},optionLabelRender:{type:Function},direction:{type:String},tabindex:Number,autofocus:Boolean,notFoundContent:K.any,placeholder:K.any,onClear:Function,choiceTransitionName:String,mode:String,disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{type:Function},getInputElement:{type:Function},getRawInputElement:{type:Function},maxTagTextLength:Number,maxTagCount:{type:[String,Number]},maxTagPlaceholder:K.any,tokenSeparators:{type:Array},allowClear:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},inputIcon:K.any,clearIcon:K.any,removeIcon:K.any,animation:String,transitionName:String,dropdownStyle:{type:Object},dropdownClassName:String,dropdownMatchSelectWidth:{type:[Boolean,Number],default:void 0},dropdownRender:{type:Function},dropdownAlign:Object,placement:{type:String},getPopupContainer:{type:Function},showAction:{type:Array},onBlur:{type:Function},onFocus:{type:Function},onKeyup:Function,onKeydown:Function,onMousedown:Function,onPopupScroll:Function,onInputKeyDown:Function,onMouseenter:Function,onMouseleave:Function,onClick:Function}),nU=()=>y(y({},tU()),Nv());function P8(e){return e==="tags"||e==="multiple"}const pC=le({compatConfig:{MODE:3},name:"BaseSelect",inheritAttrs:!1,props:Qe(nU(),{showAction:[],notFoundContent:"Not Found"}),setup(e,t){let{attrs:n,expose:o,slots:r}=t;const i=E(()=>P8(e.mode)),a=E(()=>e.showSearch!==void 0?e.showSearch:i.value||e.mode==="combobox"),l=se(!1);Ke(()=>{l.value=fC()});const s=Dv(),u=se(null),c=Fd(),d=se(null),f=se(null),p=se(null),v=ae(!1),[h,m,b]=JK();o({focus:()=>{var X;(X=f.value)===null||X===void 0||X.focus()},blur:()=>{var X;(X=f.value)===null||X===void 0||X.blur()},scrollTo:X=>{var te;return(te=p.value)===null||te===void 0?void 0:te.scrollTo(X)}});const $=E(()=>{var X;if(e.mode!=="combobox")return e.searchValue;const te=(X=e.displayValues[0])===null||X===void 0?void 0:X.value;return typeof te=="string"||typeof te=="number"?String(te):""}),x=e.open!==void 0?e.open:e.defaultOpen,P=se(x),w=se(x),O=X=>{P.value=e.open!==void 0?e.open:X,w.value=P.value};be(()=>e.open,()=>{O(e.open)});const I=E(()=>!e.notFoundContent&&e.emptyOptions);Ve(()=>{w.value=P.value,(e.disabled||I.value&&w.value&&e.mode==="combobox")&&(w.value=!1)});const _=E(()=>I.value?!1:w.value),T=X=>{const te=X!==void 0?X:!w.value;w.value!==te&&!e.disabled&&(O(te),e.onDropdownVisibleChange&&e.onDropdownVisibleChange(te),!te&&z.value&&(z.value=!1,m(!1,()=>{B.value=!1,v.value=!1})))},A=E(()=>(e.tokenSeparators||[]).some(X=>[` + onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`,jP=`${DK} ${NK}`.split(/[\s\n]+/),kK="aria-",LK="data-";function WP(e,t){return e.indexOf(t)===0}function Ua(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n=y({},t);const o={};return Object.keys(e).forEach(r=>{(n.aria&&(r==="role"||WP(r,kK))||n.data&&WP(r,LK)||n.attr&&(jP.includes(r)||jP.includes(r.toLowerCase())))&&(o[r]=e[r])}),o}const yA=Symbol("OverflowContextProviderKey"),Ny=le({compatConfig:{MODE:3},name:"OverflowContextProvider",inheritAttrs:!1,props:{value:{type:Object}},setup(e,t){let{slots:n}=t;return Xe(yA,E(()=>e.value)),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),FK=()=>ze(yA,E(()=>null));var BK=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.responsive&&!e.display),i=ae();o({itemNodeRef:i});function a(l){e.registerSize(e.itemKey,l)}return Zn(()=>{a(null)}),()=>{var l;const{prefixCls:s,invalidate:u,item:c,renderItem:d,responsive:f,registerSize:p,itemKey:v,display:h,order:m,component:b="div"}=e,S=BK(e,["prefixCls","invalidate","item","renderItem","responsive","registerSize","itemKey","display","order","component"]),C=(l=n.default)===null||l===void 0?void 0:l.call(n),$=d&&c!==xs?d(c):C;let x;u||(x={opacity:r.value?0:1,height:r.value?0:xs,overflowY:r.value?"hidden":xs,order:f?m:xs,pointerEvents:r.value?"none":xs,position:r.value?"absolute":xs});const P={};return r.value&&(P["aria-hidden"]=!0),g(br,{disabled:!f,onResize:w=>{let{offsetWidth:O}=w;a(O)}},{default:()=>g(b,k(k(k({class:ge(!u&&s),style:x},P),S),{},{ref:i}),{default:()=>[$]})})}}});var P0=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var i;if(!r.value){const{component:d="div"}=e,f=P0(e,["component"]);return g(d,k(k({},f),o),{default:()=>[(i=n.default)===null||i===void 0?void 0:i.call(n)]})}const a=r.value,{className:l}=a,s=P0(a,["className"]),{class:u}=o,c=P0(o,["class"]);return g(Ny,{value:null},{default:()=>[g(jp,k(k(k({class:ge(l,u)},s),c),e),n)]})}}});var zK=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({id:String,prefixCls:String,data:Array,itemKey:[String,Number,Function],itemWidth:{type:Number,default:10},renderItem:Function,renderRawItem:Function,maxCount:[Number,String],renderRest:Function,renderRawRest:Function,suffix:K.any,component:String,itemComponent:K.any,onVisibleChange:Function,ssr:String,onMousedown:Function,role:String}),Ki=le({name:"Overflow",inheritAttrs:!1,props:WK(),emits:["visibleChange"],setup(e,t){let{attrs:n,emit:o,slots:r}=t;const i=E(()=>e.ssr==="full"),a=se(null),l=E(()=>a.value||0),s=se(new Map),u=se(0),c=se(0),d=se(0),f=se(null),p=se(null),v=E(()=>p.value===null&&i.value?Number.MAX_SAFE_INTEGER:p.value||0),h=se(!1),m=E(()=>`${e.prefixCls}-item`),b=E(()=>Math.max(u.value,c.value)),S=E(()=>!!(e.data.length&&e.maxCount===SA)),C=E(()=>e.maxCount===CA),$=E(()=>S.value||typeof e.maxCount=="number"&&e.data.length>e.maxCount),x=E(()=>{let M=e.data;return S.value?a.value===null&&i.value?M=e.data:M=e.data.slice(0,Math.min(e.data.length,l.value/e.itemWidth)):typeof e.maxCount=="number"&&(M=e.data.slice(0,e.maxCount)),M}),P=E(()=>S.value?e.data.slice(v.value+1):e.data.slice(x.value.length)),w=(M,D)=>{var N;return typeof e.itemKey=="function"?e.itemKey(M):(N=e.itemKey&&(M==null?void 0:M[e.itemKey]))!==null&&N!==void 0?N:D},O=E(()=>e.renderItem||(M=>M)),I=(M,D)=>{p.value=M,D||(h.value=M{a.value=D.clientWidth},T=(M,D)=>{const N=new Map(s.value);D===null?N.delete(M):N.set(M,D),s.value=N},A=(M,D)=>{u.value=c.value,c.value=D},R=(M,D)=>{d.value=D},H=M=>s.value.get(w(x.value[M],M));return be([l,s,c,d,()=>e.itemKey,x],()=>{if(l.value&&b.value&&x.value){let M=d.value;const D=x.value.length,N=D-1;if(!D){I(0),f.value=null;return}for(let L=0;Ll.value){I(L-1),f.value=M-F-d.value+c.value;break}}e.suffix&&H(0)+d.value>l.value&&(f.value=null)}}),()=>{const M=h.value&&!!P.value.length,{itemComponent:D,renderRawItem:N,renderRawRest:L,renderRest:F,prefixCls:B="rc-overflow",suffix:j,component:z="div",id:G,onMousedown:Q}=e,{class:Y,style:oe}=n,Z=zK(n,["class","style"]);let re={};f.value!==null&&S.value&&(re={position:"absolute",left:`${f.value}px`,top:0});const ne={prefixCls:m.value,responsive:S.value,component:D,invalidate:C.value},X=N?(J,de)=>{const fe=w(J,de);return g(Ny,{key:fe,value:y(y({},ne),{order:de,item:J,itemKey:fe,registerSize:T,display:de<=v.value})},{default:()=>[N(J,de)]})}:(J,de)=>{const fe=w(J,de);return g(jp,k(k({},ne),{},{order:de,key:fe,item:J,renderItem:O.value,itemKey:fe,registerSize:T,display:de<=v.value}),null)};let te=()=>null;const W={order:M?v.value:Number.MAX_SAFE_INTEGER,className:`${m.value} ${m.value}-rest`,registerSize:A,display:M};if(L)L&&(te=()=>g(Ny,{value:y(y({},ne),W)},{default:()=>[L(P.value)]}));else{const J=F||jK;te=()=>g(jp,k(k({},ne),W),{default:()=>typeof J=="function"?J(P.value):J})}const U=()=>{var J;return g(z,k({id:G,class:ge(!C.value&&B,Y),style:oe,onMousedown:Q,role:e.role},Z),{default:()=>[x.value.map(X),$.value?te():null,j&&g(jp,k(k({},ne),{},{order:v.value,class:`${m.value}-suffix`,registerSize:R,display:!0,style:re}),{default:()=>j}),(J=r.default)===null||J===void 0?void 0:J.call(r)]})};return g(br,{disabled:!S.value,onResize:_},{default:U})}}});Ki.Item=HK;Ki.RESPONSIVE=SA;Ki.INVALIDATE=CA;const xA=Symbol("TreeSelectLegacyContextPropsKey");function VK(e){return Xe(xA,e)}function Rv(){return ze(xA,{})}const KK={id:String,prefixCls:String,values:K.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:K.any,placeholder:K.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:K.oneOfType([K.number,K.string]),compositionStatus:Boolean,removeIcon:K.any,choiceTransitionName:String,maxTagCount:K.oneOfType([K.number,K.string]),maxTagTextLength:Number,maxTagPlaceholder:K.any.def(()=>e=>`+ ${e.length} ...`),tagRender:Function,onToggleOpen:{type:Function},onRemove:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},VP=e=>{e.preventDefault(),e.stopPropagation()},UK=le({name:"MultipleSelectSelector",inheritAttrs:!1,props:KK,setup(e){const t=se(),n=se(0),o=se(!1),r=Rv(),i=E(()=>`${e.prefixCls}-selection`),a=E(()=>e.open||e.mode==="tags"?e.searchValue:""),l=E(()=>e.mode==="tags"||e.showSearch&&(e.open||o.value)),s=ae("");Ve(()=>{s.value=a.value}),Ke(()=>{be(s,()=>{n.value=t.value.scrollWidth},{flush:"post",immediate:!0})});function u(v,h,m,b,S){return g("span",{class:ge(`${i.value}-item`,{[`${i.value}-item-disabled`]:m}),title:typeof v=="string"||typeof v=="number"?v.toString():void 0},[g("span",{class:`${i.value}-item-content`},[h]),b&&g(Kl,{class:`${i.value}-item-remove`,onMousedown:VP,onClick:S,customizeIcon:e.removeIcon},{default:()=>[zn("×")]})])}function c(v,h,m,b,S,C){var $;const x=w=>{VP(w),e.onToggleOpen(!open)};let P=C;return r.keyEntities&&(P=(($=r.keyEntities[v])===null||$===void 0?void 0:$.node)||{}),g("span",{key:v,onMousedown:x},[e.tagRender({label:h,value:v,disabled:m,closable:b,onClose:S,option:P})])}function d(v){const{disabled:h,label:m,value:b,option:S}=v,C=!e.disabled&&!h;let $=m;if(typeof e.maxTagTextLength=="number"&&(typeof m=="string"||typeof m=="number")){const P=String($);P.length>e.maxTagTextLength&&($=`${P.slice(0,e.maxTagTextLength)}...`)}const x=P=>{var w;P&&P.stopPropagation(),(w=e.onRemove)===null||w===void 0||w.call(e,v)};return typeof e.tagRender=="function"?c(b,$,h,C,x,S):u(m,$,h,C,x)}function f(v){const{maxTagPlaceholder:h=b=>`+ ${b.length} ...`}=e,m=typeof h=="function"?h(v):h;return u(m,m,!1)}const p=v=>{const h=v.target.composing;s.value=v.target.value,h||e.onInputChange(v)};return()=>{const{id:v,prefixCls:h,values:m,open:b,inputRef:S,placeholder:C,disabled:$,autofocus:x,autocomplete:P,activeDescendantId:w,tabindex:O,compositionStatus:I,onInputPaste:_,onInputKeyDown:T,onInputMouseDown:A,onInputCompositionStart:R,onInputCompositionEnd:H}=e,M=g("div",{class:`${i.value}-search`,style:{width:n.value+"px"},key:"input"},[g(bA,{inputRef:S,open:b,prefixCls:h,id:v,inputElement:null,disabled:$,autofocus:x,autocomplete:P,editable:l.value,activeDescendantId:w,value:s.value,onKeydown:T,onMousedown:A,onChange:p,onPaste:_,onCompositionstart:R,onCompositionend:H,tabindex:O,attrs:Ua(e,!0),onFocus:()=>o.value=!0,onBlur:()=>o.value=!1},null),g("span",{ref:t,class:`${i.value}-search-mirror`,"aria-hidden":!0},[s.value,zn(" ")])]),D=g(Ki,{prefixCls:`${i.value}-overflow`,data:m,renderItem:d,renderRest:f,suffix:M,itemKey:"key",maxCount:e.maxTagCount,key:"overflow"},null);return g(Le,null,[D,!m.length&&!a.value&&!I&&g("span",{class:`${i.value}-placeholder`},[C])])}}}),GK={inputElement:K.any,id:String,prefixCls:String,values:K.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:K.any,placeholder:K.any,compositionStatus:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:K.oneOfType([K.number,K.string]),activeValue:String,backfill:{type:Boolean,default:void 0},optionLabelRender:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},dC=le({name:"SingleSelector",setup(e){const t=se(!1),n=E(()=>e.mode==="combobox"),o=E(()=>n.value||e.showSearch),r=E(()=>{let c=e.searchValue||"";return n.value&&e.activeValue&&!t.value&&(c=e.activeValue),c}),i=Rv();be([n,()=>e.activeValue],()=>{n.value&&(t.value=!1)},{immediate:!0});const a=E(()=>e.mode!=="combobox"&&!e.open&&!e.showSearch?!1:!!r.value||e.compositionStatus),l=E(()=>{const c=e.values[0];return c&&(typeof c.label=="string"||typeof c.label=="number")?c.label.toString():void 0}),s=()=>{if(e.values[0])return null;const c=a.value?{visibility:"hidden"}:void 0;return g("span",{class:`${e.prefixCls}-selection-placeholder`,style:c},[e.placeholder])},u=c=>{c.target.composing||(t.value=!0,e.onInputChange(c))};return()=>{var c,d,f,p;const{inputElement:v,prefixCls:h,id:m,values:b,inputRef:S,disabled:C,autofocus:$,autocomplete:x,activeDescendantId:P,open:w,tabindex:O,optionLabelRender:I,onInputKeyDown:_,onInputMouseDown:T,onInputPaste:A,onInputCompositionStart:R,onInputCompositionEnd:H}=e,M=b[0];let D=null;if(M&&i.customSlots){const N=(c=M.key)!==null&&c!==void 0?c:M.value,L=((d=i.keyEntities[N])===null||d===void 0?void 0:d.node)||{};D=i.customSlots[(f=L.slots)===null||f===void 0?void 0:f.title]||i.customSlots.title||M.label,typeof D=="function"&&(D=D(L))}else D=I&&M?I(M.option):M==null?void 0:M.label;return g(Le,null,[g("span",{class:`${h}-selection-search`},[g(bA,{inputRef:S,prefixCls:h,id:m,open:w,inputElement:v,disabled:C,autofocus:$,autocomplete:x,editable:o.value,activeDescendantId:P,value:r.value,onKeydown:_,onMousedown:T,onChange:u,onPaste:A,onCompositionstart:R,onCompositionend:H,tabindex:O,attrs:Ua(e,!0)},null)]),!n.value&&M&&!a.value&&g("span",{class:`${h}-selection-item`,title:l.value},[g(Le,{key:(p=M.key)!==null&&p!==void 0?p:M.value},[D])]),s()])}}});dC.props=GK;dC.inheritAttrs=!1;function XK(e){return![Ie.ESC,Ie.SHIFT,Ie.BACKSPACE,Ie.TAB,Ie.WIN_KEY,Ie.ALT,Ie.META,Ie.WIN_KEY_RIGHT,Ie.CTRL,Ie.SEMICOLON,Ie.EQUALS,Ie.CAPS_LOCK,Ie.CONTEXT_MENU,Ie.F1,Ie.F2,Ie.F3,Ie.F4,Ie.F5,Ie.F6,Ie.F7,Ie.F8,Ie.F9,Ie.F10,Ie.F11,Ie.F12].includes(e)}function $A(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=null,n;tt(()=>{clearTimeout(n)});function o(r){(r||t===null)&&(t=r),clearTimeout(n),n=setTimeout(()=>{t=null},e)}return[()=>t,o]}function Fd(){const e=t=>{e.current=t};return e}const YK=le({name:"Selector",inheritAttrs:!1,props:{id:String,prefixCls:String,showSearch:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},values:K.array,multiple:{type:Boolean,default:void 0},mode:String,searchValue:String,activeValue:String,inputElement:K.any,autofocus:{type:Boolean,default:void 0},activeDescendantId:String,tabindex:K.oneOfType([K.number,K.string]),disabled:{type:Boolean,default:void 0},placeholder:K.any,removeIcon:K.any,maxTagCount:K.oneOfType([K.number,K.string]),maxTagTextLength:Number,maxTagPlaceholder:K.any,tagRender:Function,optionLabelRender:Function,tokenWithEnter:{type:Boolean,default:void 0},choiceTransitionName:String,onToggleOpen:{type:Function},onSearch:Function,onSearchSubmit:Function,onRemove:Function,onInputKeyDown:{type:Function},domRef:Function},setup(e,t){let{expose:n}=t;const o=Fd(),r=ae(!1),[i,a]=$A(0),l=b=>{const{which:S}=b;(S===Ie.UP||S===Ie.DOWN)&&b.preventDefault(),e.onInputKeyDown&&e.onInputKeyDown(b),S===Ie.ENTER&&e.mode==="tags"&&!r.value&&!e.open&&e.onSearchSubmit(b.target.value),XK(S)&&e.onToggleOpen(!0)},s=()=>{a(!0)};let u=null;const c=b=>{e.onSearch(b,!0,r.value)!==!1&&e.onToggleOpen(!0)},d=()=>{r.value=!0},f=b=>{r.value=!1,e.mode!=="combobox"&&c(b.target.value)},p=b=>{let{target:{value:S}}=b;if(e.tokenWithEnter&&u&&/[\r\n]/.test(u)){const C=u.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");S=S.replace(C,u)}u=null,c(S)},v=b=>{const{clipboardData:S}=b;u=S.getData("text")},h=b=>{let{target:S}=b;S!==o.current&&(document.body.style.msTouchAction!==void 0?setTimeout(()=>{o.current.focus()}):o.current.focus())},m=b=>{const S=i();b.target!==o.current&&!S&&b.preventDefault(),(e.mode!=="combobox"&&(!e.showSearch||!S)||!e.open)&&(e.open&&e.onSearch("",!0,!1),e.onToggleOpen())};return n({focus:()=>{o.current.focus()},blur:()=>{o.current.blur()}}),()=>{const{prefixCls:b,domRef:S,mode:C}=e,$={inputRef:o,onInputKeyDown:l,onInputMouseDown:s,onInputChange:p,onInputPaste:v,compositionStatus:r.value,onInputCompositionStart:d,onInputCompositionEnd:f},x=C==="multiple"||C==="tags"?g(UK,k(k({},e),$),null):g(dC,k(k({},e),$),null);return g("div",{ref:S,class:`${b}-selector`,onClick:h,onMousedown:m},[x])}}});function qK(e,t,n){function o(r){var i,a,l;let s=r.target;s.shadowRoot&&r.composed&&(s=r.composedPath()[0]||s);const u=[(i=e[0])===null||i===void 0?void 0:i.value,(l=(a=e[1])===null||a===void 0?void 0:a.value)===null||l===void 0?void 0:l.getPopupElement()];t.value&&u.every(c=>c&&!c.contains(s)&&c!==s)&&n(!1)}Ke(()=>{window.addEventListener("mousedown",o)}),tt(()=>{window.removeEventListener("mousedown",o)})}function JK(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;const t=se(!1);let n;const o=()=>{clearTimeout(n)};return Ke(()=>{o()}),[t,(i,a)=>{o(),n=setTimeout(()=>{t.value=i,a&&a()},e)},o]}const wA=Symbol("BaseSelectContextKey");function ZK(e){return Xe(wA,e)}function hf(){return ze(wA,{})}const fC=()=>{if(typeof navigator>"u"||typeof window>"u")return!1;const e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e==null?void 0:e.substring(0,4))};function Ug(e){if(!Ut(e))return rt(e);const t=new Proxy({},{get(n,o,r){return Reflect.get(e.value,o,r)},set(n,o,r){return e.value[o]=r,!0},deleteProperty(n,o){return Reflect.deleteProperty(e.value,o)},has(n,o){return Reflect.has(e.value,o)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return rt(t)}var QK=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,id:String,omitDomProps:Array,displayValues:Array,onDisplayValuesChange:Function,activeValue:String,activeDescendantId:String,onActiveValueChange:Function,searchValue:String,onSearch:Function,onSearchSplit:Function,maxLength:Number,OptionList:K.any,emptyOptions:Boolean}),Dv=()=>({showSearch:{type:Boolean,default:void 0},tagRender:{type:Function},optionLabelRender:{type:Function},direction:{type:String},tabindex:Number,autofocus:Boolean,notFoundContent:K.any,placeholder:K.any,onClear:Function,choiceTransitionName:String,mode:String,disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{type:Function},getInputElement:{type:Function},getRawInputElement:{type:Function},maxTagTextLength:Number,maxTagCount:{type:[String,Number]},maxTagPlaceholder:K.any,tokenSeparators:{type:Array},allowClear:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},inputIcon:K.any,clearIcon:K.any,removeIcon:K.any,animation:String,transitionName:String,dropdownStyle:{type:Object},dropdownClassName:String,dropdownMatchSelectWidth:{type:[Boolean,Number],default:void 0},dropdownRender:{type:Function},dropdownAlign:Object,placement:{type:String},getPopupContainer:{type:Function},showAction:{type:Array},onBlur:{type:Function},onFocus:{type:Function},onKeyup:Function,onKeydown:Function,onMousedown:Function,onPopupScroll:Function,onInputKeyDown:Function,onMouseenter:Function,onMouseleave:Function,onClick:Function}),nU=()=>y(y({},tU()),Dv());function PA(e){return e==="tags"||e==="multiple"}const pC=le({compatConfig:{MODE:3},name:"BaseSelect",inheritAttrs:!1,props:Qe(nU(),{showAction:[],notFoundContent:"Not Found"}),setup(e,t){let{attrs:n,expose:o,slots:r}=t;const i=E(()=>PA(e.mode)),a=E(()=>e.showSearch!==void 0?e.showSearch:i.value||e.mode==="combobox"),l=se(!1);Ke(()=>{l.value=fC()});const s=Rv(),u=se(null),c=Fd(),d=se(null),f=se(null),p=se(null),v=ae(!1),[h,m,b]=JK();o({focus:()=>{var X;(X=f.value)===null||X===void 0||X.focus()},blur:()=>{var X;(X=f.value)===null||X===void 0||X.blur()},scrollTo:X=>{var te;return(te=p.value)===null||te===void 0?void 0:te.scrollTo(X)}});const $=E(()=>{var X;if(e.mode!=="combobox")return e.searchValue;const te=(X=e.displayValues[0])===null||X===void 0?void 0:X.value;return typeof te=="string"||typeof te=="number"?String(te):""}),x=e.open!==void 0?e.open:e.defaultOpen,P=se(x),w=se(x),O=X=>{P.value=e.open!==void 0?e.open:X,w.value=P.value};be(()=>e.open,()=>{O(e.open)});const I=E(()=>!e.notFoundContent&&e.emptyOptions);Ve(()=>{w.value=P.value,(e.disabled||I.value&&w.value&&e.mode==="combobox")&&(w.value=!1)});const _=E(()=>I.value?!1:w.value),T=X=>{const te=X!==void 0?X:!w.value;w.value!==te&&!e.disabled&&(O(te),e.onDropdownVisibleChange&&e.onDropdownVisibleChange(te),!te&&z.value&&(z.value=!1,m(!1,()=>{B.value=!1,v.value=!1})))},A=E(()=>(e.tokenSeparators||[]).some(X=>[` `,`\r -`].includes(X))),R=(X,te,W)=>{var U,J;let de=!0,fe=X;(U=e.onActiveValueChange)===null||U===void 0||U.call(e,null);const pe=W?null:Qz(X,e.tokenSeparators);return e.mode!=="combobox"&&pe&&(fe="",(J=e.onSearchSplit)===null||J===void 0||J.call(e,pe),T(!1),de=!1),e.onSearch&&$.value!==fe&&e.onSearch(fe,{source:te?"typing":"effect"}),de},H=X=>{var te;!X||!X.trim()||(te=e.onSearch)===null||te===void 0||te.call(e,X,{source:"submit"})};be(w,()=>{!w.value&&!i.value&&e.mode!=="combobox"&&R("",!1,!1)},{immediate:!0,flush:"post"}),be(()=>e.disabled,()=>{P.value&&e.disabled&&O(!1),e.disabled&&!v.value&&m(!1)},{immediate:!0});const[M,D]=$8(),N=function(X){var te;const W=M(),{which:U}=X;if(U===Ie.ENTER&&(e.mode!=="combobox"&&X.preventDefault(),w.value||T(!0)),D(!!$.value),U===Ie.BACKSPACE&&!W&&i.value&&!$.value&&e.displayValues.length){const pe=[...e.displayValues];let ve=null;for(let he=pe.length-1;he>=0;he-=1){const V=pe[he];if(!V.disabled){pe.splice(he,1),ve=V;break}}ve&&e.onDisplayValuesChange(pe,{type:"remove",values:[ve]})}for(var J=arguments.length,de=new Array(J>1?J-1:0),fe=1;fe1?te-1:0),U=1;U{const te=e.displayValues.filter(W=>W!==X);e.onDisplayValuesChange(te,{type:"remove",values:[X]})},B=se(!1),j=function(){m(!0),e.disabled||(e.onFocus&&!B.value&&e.onFocus(...arguments),e.showAction&&e.showAction.includes("focus")&&T(!0)),B.value=!0},z=ae(!1),G=function(){if(z.value||(v.value=!0,m(!1,()=>{B.value=!1,v.value=!1,T(!1)}),e.disabled))return;const X=$.value;X&&(e.mode==="tags"?e.onSearch(X,{source:"submit"}):e.mode==="multiple"&&e.onSearch("",{source:"blur"})),e.onBlur&&e.onBlur(...arguments)},Q=()=>{z.value=!0},Y=()=>{z.value=!1};Xe("VCSelectContainerEvent",{focus:j,blur:G});const oe=[];Ke(()=>{oe.forEach(X=>clearTimeout(X)),oe.splice(0,oe.length)}),tt(()=>{oe.forEach(X=>clearTimeout(X)),oe.splice(0,oe.length)});const Z=function(X){var te,W;const{target:U}=X,J=(te=d.value)===null||te===void 0?void 0:te.getPopupElement();if(J&&J.contains(U)){const ve=setTimeout(()=>{var he;const V=oe.indexOf(ve);V!==-1&&oe.splice(V,1),b(),!l.value&&!J.contains(document.activeElement)&&((he=f.value)===null||he===void 0||he.focus())});oe.push(ve)}for(var de=arguments.length,fe=new Array(de>1?de-1:0),pe=1;pe{};return Ke(()=>{be(_,()=>{var X;if(_.value){const te=Math.ceil((X=u.value)===null||X===void 0?void 0:X.offsetWidth);re.value!==te&&!Number.isNaN(te)&&(re.value=te)}},{immediate:!0,flush:"post"})}),qK([u,d],_,T),ZK(Gg(y(y({},Fr(e)),{open:w,triggerOpen:_,showSearch:a,multiple:i,toggleOpen:T}))),()=>{const X=y(y({},e),n),{prefixCls:te,id:W,open:U,defaultOpen:J,mode:de,showSearch:fe,searchValue:pe,onSearch:ve,allowClear:he,clearIcon:V,showArrow:q,inputIcon:ie,disabled:me,loading:Se,getInputElement:ce,getPopupContainer:ee,placement:ue,animation:xe,transitionName:Pe,dropdownStyle:_e,dropdownClassName:Ce,dropdownMatchSelectWidth:we,dropdownRender:Oe,dropdownAlign:Me,showAction:Re,direction:Ae,tokenSeparators:Fe,tagRender:lt,optionLabelRender:bt,onPopupScroll:ft,onDropdownVisibleChange:yt,onFocus:Ct,onBlur:fn,onKeyup:yn,onKeydown:On,onMousedown:tn,onClear:Qn,omitDomProps:Oo,getRawInputElement:er,displayValues:Or,onDisplayValuesChange:Io,emptyOptions:ol,activeDescendantId:Ee,activeValue:Je,OptionList:Ge}=X,Tt=QK(X,["prefixCls","id","open","defaultOpen","mode","showSearch","searchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","disabled","loading","getInputElement","getPopupContainer","placement","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","optionLabelRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyup","onKeydown","onMousedown","onClear","omitDomProps","getRawInputElement","displayValues","onDisplayValuesChange","emptyOptions","activeDescendantId","activeValue","OptionList"]),Sn=de==="combobox"&&ce&&ce()||null,nn=typeof er=="function"&&er(),To=y({},Tt);let Kn;nn&&(Kn=Tr=>{T(Tr)}),eU.forEach(Tr=>{delete To[Tr]}),Oo==null||Oo.forEach(Tr=>{delete To[Tr]});const Zr=q!==void 0?q:Se||!i.value&&de!=="combobox";let Fo;Zr&&(Fo=g(Kl,{class:ge(`${te}-arrow`,{[`${te}-arrow-loading`]:Se}),customizeIcon:ie,customizeIconProps:{loading:Se,searchValue:$.value,open:w.value,focused:h.value,showSearch:a.value}},null));let tr;const jt=()=>{Qn==null||Qn(),Io([],{type:"clear",values:Or}),R("",!1,!1)};!me&&he&&(Or.length||$.value)&&(tr=g(Kl,{class:`${te}-clear`,onMousedown:jt,customizeIcon:V},{default:()=>[zn("×")]}));const Ir=g(Ge,{ref:p},y(y({},s.customSlots),{option:r.option})),nr=ge(te,n.class,{[`${te}-focused`]:h.value,[`${te}-multiple`]:i.value,[`${te}-single`]:!i.value,[`${te}-allow-clear`]:he,[`${te}-show-arrow`]:Zr,[`${te}-disabled`]:me,[`${te}-loading`]:Se,[`${te}-open`]:w.value,[`${te}-customize-input`]:Sn,[`${te}-show-search`]:a.value}),sa=g(OK,{ref:d,disabled:me,prefixCls:te,visible:_.value,popupElement:Ir,containerWidth:re.value,animation:xe,transitionName:Pe,dropdownStyle:_e,dropdownClassName:Ce,direction:Ae,dropdownMatchSelectWidth:we,dropdownRender:Oe,dropdownAlign:Me,placement:ue,getPopupContainer:ee,empty:ol,getTriggerDOMNode:()=>c.current,onPopupVisibleChange:Kn,onPopupMouseEnter:ne,onPopupFocusin:Q,onPopupFocusout:Y},{default:()=>nn?sn(nn)&&mt(nn,{ref:c},!1,!0):g(YK,k(k({},e),{},{domRef:c,prefixCls:te,inputElement:Sn,ref:f,id:W,showSearch:a.value,mode:de,activeDescendantId:Ee,tagRender:lt,optionLabelRender:bt,values:Or,open:w.value,onToggleOpen:T,activeValue:Je,searchValue:$.value,onSearch:R,onSearchSubmit:H,onRemove:F,tokenWithEnter:A.value}),null)});let ca;return nn?ca=sa:ca=g("div",k(k({},To),{},{class:nr,ref:u,onMousedown:Z,onKeydown:N,onKeyup:L}),[h.value&&!w.value&&g("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},[`${Or.map(Tr=>{let{label:ys,value:Er}=Tr;return["number","string"].includes(typeof ys)?ys:Er}).join(", ")}`]),sa,Fo,tr]),ca}}}),kv=(e,t)=>{let{height:n,offset:o,prefixCls:r,onInnerResize:i}=e,{slots:a}=t;var l;let s={},u={display:"flex",flexDirection:"column"};return o!==void 0&&(s={height:`${n}px`,position:"relative",overflow:"hidden"},u=y(y({},u),{transform:`translateY(${o}px)`,position:"absolute",left:0,right:0,top:0})),g("div",{style:s},[g(br,{onResize:c=>{let{offsetHeight:d}=c;d&&i&&i()}},{default:()=>[g("div",{style:u,class:ge({[`${r}-holder-inner`]:r})},[(l=a.default)===null||l===void 0?void 0:l.call(a)])]})])};kv.displayName="Filter";kv.inheritAttrs=!1;kv.props={prefixCls:String,height:Number,offset:Number,onInnerResize:Function};const O8=(e,t)=>{let{setRef:n}=e,{slots:o}=t;var r;const i=Ot((r=o.default)===null||r===void 0?void 0:r.call(o));return i&&i.length?Dn(i[0],{ref:n}):i};O8.props={setRef:{type:Function,default:()=>{}}};const oU=20;function KP(e){return"touches"in e?e.touches[0].pageY:e.pageY}const rU=le({compatConfig:{MODE:3},name:"ScrollBar",inheritAttrs:!1,props:{prefixCls:String,scrollTop:Number,scrollHeight:Number,height:Number,count:Number,onScroll:{type:Function},onStartMove:{type:Function},onStopMove:{type:Function}},setup(){return{moveRaf:null,scrollbarRef:Fd(),thumbRef:Fd(),visibleTimeout:null,state:rt({dragging:!1,pageY:null,startTop:null,visible:!1})}},watch:{scrollTop:{handler(){this.delayHidden()},flush:"post"}},mounted(){var e,t;(e=this.scrollbarRef.current)===null||e===void 0||e.addEventListener("touchstart",this.onScrollbarTouchStart,hn?{passive:!1}:!1),(t=this.thumbRef.current)===null||t===void 0||t.addEventListener("touchstart",this.onMouseDown,hn?{passive:!1}:!1)},beforeUnmount(){this.removeEvents(),clearTimeout(this.visibleTimeout)},methods:{delayHidden(){clearTimeout(this.visibleTimeout),this.state.visible=!0,this.visibleTimeout=setTimeout(()=>{this.state.visible=!1},2e3)},onScrollbarTouchStart(e){e.preventDefault()},onContainerMouseDown(e){e.stopPropagation(),e.preventDefault()},patchEvents(){window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),this.thumbRef.current.addEventListener("touchmove",this.onMouseMove,hn?{passive:!1}:!1),this.thumbRef.current.addEventListener("touchend",this.onMouseUp)},removeEvents(){window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),this.scrollbarRef.current.removeEventListener("touchstart",this.onScrollbarTouchStart,hn?{passive:!1}:!1),this.thumbRef.current&&(this.thumbRef.current.removeEventListener("touchstart",this.onMouseDown,hn?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchmove",this.onMouseMove,hn?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchend",this.onMouseUp)),Ze.cancel(this.moveRaf)},onMouseDown(e){const{onStartMove:t}=this.$props;y(this.state,{dragging:!0,pageY:KP(e),startTop:this.getTop()}),t(),this.patchEvents(),e.stopPropagation(),e.preventDefault()},onMouseMove(e){const{dragging:t,pageY:n,startTop:o}=this.state,{onScroll:r}=this.$props;if(Ze.cancel(this.moveRaf),t){const i=KP(e)-n,a=o+i,l=this.getEnableScrollRange(),s=this.getEnableHeightRange(),u=s?a/s:0,c=Math.ceil(u*l);this.moveRaf=Ze(()=>{r(c)})}},onMouseUp(){const{onStopMove:e}=this.$props;this.state.dragging=!1,e(),this.removeEvents()},getSpinHeight(){const{height:e,scrollHeight:t}=this.$props;let n=e/t*100;return n=Math.max(n,oU),n=Math.min(n,e/2),Math.floor(n)},getEnableScrollRange(){const{scrollHeight:e,height:t}=this.$props;return e-t||0},getEnableHeightRange(){const{height:e}=this.$props,t=this.getSpinHeight();return e-t||0},getTop(){const{scrollTop:e}=this.$props,t=this.getEnableScrollRange(),n=this.getEnableHeightRange();return e===0||t===0?0:e/t*n},showScroll(){const{height:e,scrollHeight:t}=this.$props;return t>e}},render(){const{dragging:e,visible:t}=this.state,{prefixCls:n}=this.$props,o=this.getSpinHeight()+"px",r=this.getTop()+"px",i=this.showScroll(),a=i&&t;return g("div",{ref:this.scrollbarRef,class:ge(`${n}-scrollbar`,{[`${n}-scrollbar-show`]:i}),style:{width:"8px",top:0,bottom:0,right:0,position:"absolute",display:a?void 0:"none"},onMousedown:this.onContainerMouseDown,onMousemove:this.delayHidden},[g("div",{ref:this.thumbRef,class:ge(`${n}-scrollbar-thumb`,{[`${n}-scrollbar-thumb-moving`]:e}),style:{width:"100%",height:o,top:r,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:"99px",cursor:"pointer",userSelect:"none"},onMousedown:this.onMouseDown},null)])}});function iU(e,t,n,o){const r=new Map,i=new Map,a=ae(Symbol("update"));be(e,()=>{a.value=Symbol("update")});let l;function s(){Ze.cancel(l)}function u(){s(),l=Ze(()=>{r.forEach((d,f)=>{if(d&&d.offsetParent){const{offsetHeight:p}=d;i.get(f)!==p&&(a.value=Symbol("update"),i.set(f,d.offsetHeight))}})})}function c(d,f){const p=t(d);r.get(p),f?(r.set(p,f.$el||f),u()):r.delete(p)}return Zn(()=>{s()}),[c,u,i,a]}function aU(e,t,n,o,r,i,a,l){let s;return u=>{if(u==null){l();return}Ze.cancel(s);const c=t.value,d=o.itemHeight;if(typeof u=="number")a(u);else if(u&&typeof u=="object"){let f;const{align:p}=u;"index"in u?{index:f}=u:f=c.findIndex(m=>r(m)===u.key);const{offset:v=0}=u,h=(m,b)=>{if(m<0||!e.value)return;const S=e.value.clientHeight;let C=!1,$=b;if(S){const x=b||p;let P=0,w=0,O=0;const I=Math.min(c.length,f);for(let A=0;A<=I;A+=1){const R=r(c[A]);w=P;const H=n.get(R);O=w+(H===void 0?d:H),P=O,A===f&&H===void 0&&(C=!0)}const _=e.value.scrollTop;let T=null;switch(x){case"top":T=w-v;break;case"bottom":T=O-S+v;break;default:{const A=_+S;w<_?$="top":O>A&&($="bottom")}}T!==null&&T!==_&&a(T)}s=Ze(()=>{C&&i(),h(m-1,$)},2)};h(5)}}}const lU=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),I8=(e,t)=>{let n=!1,o=null;function r(){clearTimeout(o),n=!0,o=setTimeout(()=>{n=!1},50)}return function(i){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const l=i<0&&e.value||i>0&&t.value;return a&&l?(clearTimeout(o),n=!1):(!l||n)&&r(),!n&&l}};function sU(e,t,n,o){let r=0,i=null,a=null,l=!1;const s=I8(t,n);function u(d){if(!e.value)return;Ze.cancel(i);const{deltaY:f}=d;r+=f,a=f,!s(f)&&(lU||d.preventDefault(),i=Ze(()=>{o(r*(l?10:1)),r=0}))}function c(d){e.value&&(l=d.detail===a)}return[u,c]}const cU=14/15;function uU(e,t,n){let o=!1,r=0,i=null,a=null;const l=()=>{i&&(i.removeEventListener("touchmove",s),i.removeEventListener("touchend",u))},s=f=>{if(o){const p=Math.ceil(f.touches[0].pageY);let v=r-p;r=p,n(v)&&f.preventDefault(),clearInterval(a),a=setInterval(()=>{v*=cU,(!n(v,!0)||Math.abs(v)<=.1)&&clearInterval(a)},16)}},u=()=>{o=!1,l()},c=f=>{l(),f.touches.length===1&&!o&&(o=!0,r=Math.ceil(f.touches[0].pageY),i=f.target,i.addEventListener("touchmove",s,{passive:!1}),i.addEventListener("touchend",u))},d=()=>{};Ke(()=>{document.addEventListener("touchmove",d,{passive:!1}),be(e,f=>{t.value.removeEventListener("touchstart",c),l(),clearInterval(a),f&&t.value.addEventListener("touchstart",c,{passive:!1})},{immediate:!0})}),tt(()=>{document.removeEventListener("touchmove",d)})}var dU=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const u=t+s,c=r(l,u,{}),d=a(l);return g(O8,{key:d,setRef:f=>o(l,f)},{default:()=>[c]})})}const T8=le({compatConfig:{MODE:3},name:"List",inheritAttrs:!1,props:{prefixCls:String,data:K.array,height:Number,itemHeight:Number,fullHeight:{type:Boolean,default:void 0},itemKey:{type:[String,Number,Function],required:!0},component:{type:[String,Object]},virtual:{type:Boolean,default:void 0},children:Function,onScroll:Function,onMousedown:Function,onMouseenter:Function,onVisibleChange:Function},setup(e,t){let{expose:n}=t;const o=E(()=>{const{height:F,itemHeight:B,virtual:j}=e;return!!(j!==!1&&F&&B)}),r=E(()=>{const{height:F,itemHeight:B,data:j}=e;return o.value&&j&&B*j.length>F}),i=rt({scrollTop:0,scrollMoving:!1}),a=E(()=>e.data||fU),l=se([]);be(a,()=>{l.value=nt(a.value).slice()},{immediate:!0});const s=se(F=>{});be(()=>e.itemKey,F=>{typeof F=="function"?s.value=F:s.value=B=>B==null?void 0:B[F]},{immediate:!0});const u=se(),c=se(),d=se(),f=F=>s.value(F),p={getKey:f};function v(F){let B;typeof F=="function"?B=F(i.scrollTop):B=F;const j=P(B);u.value&&(u.value.scrollTop=j),i.scrollTop=j}const[h,m,b,S]=iU(l,f),C=rt({scrollHeight:void 0,start:0,end:0,offset:void 0}),$=se(0);Ke(()=>{ot(()=>{var F;$.value=((F=c.value)===null||F===void 0?void 0:F.offsetHeight)||0})}),uo(()=>{ot(()=>{var F;$.value=((F=c.value)===null||F===void 0?void 0:F.offsetHeight)||0})}),be([o,l],()=>{o.value||y(C,{scrollHeight:void 0,start:0,end:l.value.length-1,offset:void 0})},{immediate:!0}),be([o,l,$,r],()=>{o.value&&!r.value&&y(C,{scrollHeight:$.value,start:0,end:l.value.length-1,offset:void 0}),u.value&&(i.scrollTop=u.value.scrollTop)},{immediate:!0}),be([r,o,()=>i.scrollTop,l,S,()=>e.height,$],()=>{if(!o.value||!r.value)return;let F=0,B,j,z;const G=l.value.length,Q=l.value,Y=i.scrollTop,{itemHeight:oe,height:Z}=e,re=Y+Z;for(let ne=0;ne=Y&&(B=ne,j=F),z===void 0&&U>re&&(z=ne),F=U}B===void 0&&(B=0,j=0,z=Math.ceil(Z/oe)),z===void 0&&(z=G-1),z=Math.min(z+1,G),y(C,{scrollHeight:F,start:B,end:z,offset:j})},{immediate:!0});const x=E(()=>C.scrollHeight-e.height);function P(F){let B=F;return Number.isNaN(x.value)||(B=Math.min(B,x.value)),B=Math.max(B,0),B}const w=E(()=>i.scrollTop<=0),O=E(()=>i.scrollTop>=x.value),I=I8(w,O);function _(F){v(F)}function T(F){var B;const{scrollTop:j}=F.currentTarget;j!==i.scrollTop&&v(j),(B=e.onScroll)===null||B===void 0||B.call(e,F)}const[A,R]=sU(o,w,O,F=>{v(B=>B+F)});uU(o,u,(F,B)=>I(F,B)?!1:(A({preventDefault(){},deltaY:F}),!0));function H(F){o.value&&F.preventDefault()}const M=()=>{u.value&&(u.value.removeEventListener("wheel",A,hn?{passive:!1}:!1),u.value.removeEventListener("DOMMouseScroll",R),u.value.removeEventListener("MozMousePixelScroll",H))};Ve(()=>{ot(()=>{u.value&&(M(),u.value.addEventListener("wheel",A,hn?{passive:!1}:!1),u.value.addEventListener("DOMMouseScroll",R),u.value.addEventListener("MozMousePixelScroll",H))})}),tt(()=>{M()});const D=aU(u,l,b,e,f,m,v,()=>{var F;(F=d.value)===null||F===void 0||F.delayHidden()});n({scrollTo:D});const N=E(()=>{let F=null;return e.height&&(F=y({[e.fullHeight?"height":"maxHeight"]:e.height+"px"},pU),o.value&&(F.overflowY="hidden",i.scrollMoving&&(F.pointerEvents="none"))),F});return be([()=>C.start,()=>C.end,l],()=>{if(e.onVisibleChange){const F=l.value.slice(C.start,C.end+1);e.onVisibleChange(F,l.value)}},{flush:"post"}),{state:i,mergedData:l,componentStyle:N,onFallbackScroll:T,onScrollBar:_,componentRef:u,useVirtual:o,calRes:C,collectHeight:m,setInstance:h,sharedConfig:p,scrollBarRef:d,fillerInnerRef:c,delayHideScrollBar:()=>{var F;(F=d.value)===null||F===void 0||F.delayHidden()}}},render(){const e=y(y({},this.$props),this.$attrs),{prefixCls:t="rc-virtual-list",height:n,itemHeight:o,fullHeight:r,data:i,itemKey:a,virtual:l,component:s="div",onScroll:u,children:c=this.$slots.default,style:d,class:f}=e,p=dU(e,["prefixCls","height","itemHeight","fullHeight","data","itemKey","virtual","component","onScroll","children","style","class"]),v=ge(t,f),{scrollTop:h}=this.state,{scrollHeight:m,offset:b,start:S,end:C}=this.calRes,{componentStyle:$,onFallbackScroll:x,onScrollBar:P,useVirtual:w,collectHeight:O,sharedConfig:I,setInstance:_,mergedData:T,delayHideScrollBar:A}=this;return g("div",k({style:y(y({},d),{position:"relative"}),class:v},p),[g(s,{class:`${t}-holder`,style:$,ref:"componentRef",onScroll:x,onMouseenter:A},{default:()=>[g(kv,{prefixCls:t,height:m,offset:b,onInnerResize:O,ref:"fillerInnerRef"},{default:()=>gU(T,S,C,_,c,I)})]}),w&&g(rU,{ref:"scrollBarRef",prefixCls:t,scrollTop:h,height:n,scrollHeight:m,count:T.length,onScroll:P,onStartMove:()=>{this.state.scrollMoving=!0},onStopMove:()=>{this.state.scrollMoving=!1}},null)])}});function gC(e,t,n){const o=ae(e());return be(t,(r,i)=>{n?n(r,i)&&(o.value=e()):o.value=e()}),o}function hU(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}const E8=Symbol("SelectContextKey");function vU(e){return Xe(E8,e)}function mU(){return ze(E8,{})}var bU=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r`${r.prefixCls}-item`),l=gC(()=>i.flattenOptions,[()=>r.open,()=>i.flattenOptions],x=>x[0]),s=Fd(),u=x=>{x.preventDefault()},c=x=>{s.current&&s.current.scrollTo(typeof x=="number"?{index:x}:x)},d=function(x){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const w=l.value.length;for(let O=0;O1&&arguments[1]!==void 0?arguments[1]:!1;f.activeIndex=x;const w={source:P?"keyboard":"mouse"},O=l.value[x];if(!O){i.onActiveValue(null,-1,w);return}i.onActiveValue(O.value,x,w)};be([()=>l.value.length,()=>r.searchValue],()=>{p(i.defaultActiveFirstOption!==!1?d(0):-1)},{immediate:!0});const v=x=>i.rawValues.has(x)&&r.mode!=="combobox";be([()=>r.open,()=>r.searchValue],()=>{if(!r.multiple&&r.open&&i.rawValues.size===1){const x=Array.from(i.rawValues)[0],P=nt(l.value).findIndex(w=>{let{data:O}=w;return O[i.fieldNames.value]===x});P!==-1&&(p(P),ot(()=>{c(P)}))}r.open&&ot(()=>{var x;(x=s.current)===null||x===void 0||x.scrollTo(void 0)})},{immediate:!0,flush:"post"});const h=x=>{x!==void 0&&i.onSelect(x,{selected:!i.rawValues.has(x)}),r.multiple||r.toggleOpen(!1)},m=x=>typeof x.label=="function"?x.label():x.label;function b(x){const P=l.value[x];if(!P)return null;const w=P.data||{},{value:O}=w,{group:I}=P,_=Ua(w,!0),T=m(P);return P?g("div",k(k({"aria-label":typeof T=="string"&&!I?T:null},_),{},{key:x,role:I?"presentation":"option",id:`${r.id}_list_${x}`,"aria-selected":v(O)}),[O]):null}return n({onKeydown:x=>{const{which:P,ctrlKey:w}=x;switch(P){case Ie.N:case Ie.P:case Ie.UP:case Ie.DOWN:{let O=0;if(P===Ie.UP?O=-1:P===Ie.DOWN?O=1:hU()&&w&&(P===Ie.N?O=1:P===Ie.P&&(O=-1)),O!==0){const I=d(f.activeIndex+O,O);c(I),p(I,!0)}break}case Ie.ENTER:{const O=l.value[f.activeIndex];O&&!O.data.disabled?h(O.value):h(void 0),r.open&&x.preventDefault();break}case Ie.ESC:r.toggleOpen(!1),r.open&&x.stopPropagation()}},onKeyup:()=>{},scrollTo:x=>{c(x)}}),()=>{const{id:x,notFoundContent:P,onPopupScroll:w}=r,{menuItemSelectedIcon:O,fieldNames:I,virtual:_,listHeight:T,listItemHeight:A}=i,R=o.option,{activeIndex:H}=f,M=Object.keys(I).map(D=>I[D]);return l.value.length===0?g("div",{role:"listbox",id:`${x}_list`,class:`${a.value}-empty`,onMousedown:u},[P]):g(Le,null,[g("div",{role:"listbox",id:`${x}_list`,style:{height:0,width:0,overflow:"hidden"}},[b(H-1),b(H),b(H+1)]),g(T8,{itemKey:"key",ref:s,data:l.value,height:T,itemHeight:A,fullHeight:!1,onMousedown:u,onScroll:w,virtual:_},{default:(D,N)=>{var L;const{group:F,groupOption:B,data:j,value:z}=D,{key:G}=j,Q=typeof D.label=="function"?D.label():D.label;if(F){const V=(L=j.title)!==null&&L!==void 0?L:UP(Q)&&Q;return g("div",{class:ge(a.value,`${a.value}-group`),title:V},[R?R(j):Q!==void 0?Q:G])}const{disabled:Y,title:oe,children:Z,style:re,class:ne,className:X}=j,te=bU(j,["disabled","title","children","style","class","className"]),W=it(te,M),U=v(z),J=`${a.value}-option`,de=ge(a.value,J,ne,X,{[`${J}-grouped`]:B,[`${J}-active`]:H===N&&!Y,[`${J}-disabled`]:Y,[`${J}-selected`]:U}),fe=m(D),pe=!O||typeof O=="function"||U,ve=typeof fe=="number"?fe:fe||z;let he=UP(ve)?ve.toString():void 0;return oe!==void 0&&(he=oe),g("div",k(k({},W),{},{"aria-selected":U,class:de,title:he,onMousemove:V=>{te.onMousemove&&te.onMousemove(V),!(H===N||Y)&&p(N)},onClick:V=>{Y||h(z),te.onClick&&te.onClick(V)},style:re}),[g("div",{class:`${J}-content`},[R?R(j):ve]),sn(O)||U,pe&&g(Kl,{class:`${a.value}-option-state`,customizeIcon:O,customizeIconProps:{isSelected:U}},{default:()=>[U?"✓":null]})])}})])}}});var SU=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r1&&arguments[1]!==void 0?arguments[1]:!1;return Ot(e).map((o,r)=>{var i;if(!sn(o)||!o.type)return null;const{type:{isSelectOptGroup:a},key:l,children:s,props:u}=o;if(t||!a)return CU(o);const c=s&&s.default?s.default():void 0,d=(u==null?void 0:u.label)||((i=s.label)===null||i===void 0?void 0:i.call(s))||l;return y(y({key:`__RC_SELECT_GRP__${l===null?r:String(l)}__`},u),{label:d,options:_8(c||[])})}).filter(o=>o)}function xU(e,t,n){const o=se(),r=se(),i=se(),a=se([]);return be([e,t],()=>{e.value?a.value=nt(e.value).slice():a.value=_8(t.value)},{immediate:!0,deep:!0}),Ve(()=>{const l=a.value,s=new Map,u=new Map,c=n.value;function d(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(let v=0;v0&&arguments[0]!==void 0?arguments[0]:ae("");const t=`rc_select_${wU()}`;return e.value||t}function M8(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function O0(e,t){return M8(e).join("").toUpperCase().includes(t)}const PU=(e,t,n,o,r)=>E(()=>{const i=n.value,a=r==null?void 0:r.value,l=o==null?void 0:o.value;if(!i||l===!1)return e.value;const{options:s,label:u,value:c}=t.value,d=[],f=typeof l=="function",p=i.toUpperCase(),v=f?l:(m,b)=>a?O0(b[a],p):b[s]?O0(b[u!=="children"?u:"label"],p):O0(b[c],p),h=f?m=>Oy(m):m=>m;return e.value.forEach(m=>{if(m[s]){if(v(i,h(m)))d.push(m);else{const S=m[s].filter(C=>v(i,h(C)));S.length&&d.push(y(y({},m),{[s]:S}))}return}v(i,h(m))&&d.push(m)}),d}),OU=(e,t)=>{const n=se({values:new Map,options:new Map});return[E(()=>{const{values:i,options:a}=n.value,l=e.value.map(c=>{var d;return c.label===void 0?y(y({},c),{label:(d=i.get(c.value))===null||d===void 0?void 0:d.label}):c}),s=new Map,u=new Map;return l.forEach(c=>{s.set(c.value,c),u.set(c.value,t.value.get(c.value)||a.get(c.value))}),n.value.values=s,n.value.options=u,l}),i=>t.value.get(i)||n.value.options.get(i)]};function Dt(e,t){const{defaultValue:n,value:o=ae()}=t||{};let r=typeof e=="function"?e():e;o.value!==void 0&&(r=Bt(o)),n!==void 0&&(r=typeof n=="function"?n():n);const i=ae(r),a=ae(r);Ve(()=>{let s=o.value!==void 0?o.value:i.value;t.postState&&(s=t.postState(s)),a.value=s});function l(s){const u=a.value;i.value=s,nt(a.value)!==s&&t.onChange&&t.onChange(s,u)}return be(o,()=>{i.value=o.value}),[a,l]}function $t(e){const t=typeof e=="function"?e():e,n=ae(t);function o(r){n.value=r}return[n,o]}const IU=["inputValue"];function A8(){return y(y({},Nv()),{prefixCls:String,id:String,backfill:{type:Boolean,default:void 0},fieldNames:Object,inputValue:String,searchValue:String,onSearch:Function,autoClearSearchValue:{type:Boolean,default:void 0},onSelect:Function,onDeselect:Function,filterOption:{type:[Boolean,Function],default:void 0},filterSort:Function,optionFilterProp:String,optionLabelProp:String,options:Array,defaultActiveFirstOption:{type:Boolean,default:void 0},virtual:{type:Boolean,default:void 0},listHeight:Number,listItemHeight:Number,menuItemSelectedIcon:K.any,mode:String,labelInValue:{type:Boolean,default:void 0},value:K.any,defaultValue:K.any,onChange:Function,children:Array})}function TU(e){return!e||typeof e!="object"}const EU=le({compatConfig:{MODE:3},name:"VcSelect",inheritAttrs:!1,props:Qe(A8(),{prefixCls:"vc-select",autoClearSearchValue:!0,listHeight:200,listItemHeight:20,dropdownMatchSelectWidth:!0}),setup(e,t){let{expose:n,attrs:o,slots:r}=t;const i=hC(We(e,"id")),a=E(()=>P8(e.mode)),l=E(()=>!!(!e.options&&e.children)),s=E(()=>e.filterOption===void 0&&e.mode==="combobox"?!1:e.filterOption),u=E(()=>U6(e.fieldNames,l.value)),[c,d]=Dt("",{value:E(()=>e.searchValue!==void 0?e.searchValue:e.inputValue),postState:ne=>ne||""}),f=xU(We(e,"options"),We(e,"children"),u),{valueOptions:p,labelOptions:v,options:h}=f,m=ne=>M8(ne).map(te=>{var W,U;let J,de,fe,pe;TU(te)?J=te:(fe=te.key,de=te.label,J=(W=te.value)!==null&&W!==void 0?W:fe);const ve=p.value.get(J);return ve&&(de===void 0&&(de=ve==null?void 0:ve[e.optionLabelProp||u.value.label]),fe===void 0&&(fe=(U=ve==null?void 0:ve.key)!==null&&U!==void 0?U:J),pe=ve==null?void 0:ve.disabled),{label:de,value:J,key:fe,disabled:pe,option:ve}}),[b,S]=Dt(e.defaultValue,{value:We(e,"value")}),C=E(()=>{var ne;const X=m(b.value);return e.mode==="combobox"&&!(!((ne=X[0])===null||ne===void 0)&&ne.value)?[]:X}),[$,x]=OU(C,p),P=E(()=>{if(!e.mode&&$.value.length===1){const ne=$.value[0];if(ne.value===null&&(ne.label===null||ne.label===void 0))return[]}return $.value.map(ne=>{var X;return y(y({},ne),{label:(X=typeof ne.label=="function"?ne.label():ne.label)!==null&&X!==void 0?X:ne.value})})}),w=E(()=>new Set($.value.map(ne=>ne.value)));Ve(()=>{var ne;if(e.mode==="combobox"){const X=(ne=$.value[0])===null||ne===void 0?void 0:ne.value;X!=null&&d(String(X))}},{flush:"post"});const O=(ne,X)=>{const te=X??ne;return{[u.value.value]:ne,[u.value.label]:te}},I=se();Ve(()=>{if(e.mode!=="tags"){I.value=h.value;return}const ne=h.value.slice(),X=te=>p.value.has(te);[...$.value].sort((te,W)=>te.value{const W=te.value;X(W)||ne.push(O(W,te.label))}),I.value=ne});const _=PU(I,u,c,s,We(e,"optionFilterProp")),T=E(()=>e.mode!=="tags"||!c.value||_.value.some(ne=>ne[e.optionFilterProp||"value"]===c.value)?_.value:[O(c.value),..._.value]),A=E(()=>e.filterSort?[...T.value].sort((ne,X)=>e.filterSort(ne,X)):T.value),R=E(()=>Zz(A.value,{fieldNames:u.value,childrenAsData:l.value})),H=ne=>{const X=m(ne);if(S(X),e.onChange&&(X.length!==$.value.length||X.some((te,W)=>{var U;return((U=$.value[W])===null||U===void 0?void 0:U.value)!==(te==null?void 0:te.value)}))){const te=e.labelInValue?X.map(U=>y(y({},U),{originLabel:U.label,label:typeof U.label=="function"?U.label():U.label})):X.map(U=>U.value),W=X.map(U=>Oy(x(U.value)));e.onChange(a.value?te:te[0],a.value?W:W[0])}},[M,D]=$t(null),[N,L]=$t(0),F=E(()=>e.defaultActiveFirstOption!==void 0?e.defaultActiveFirstOption:e.mode!=="combobox"),B=function(ne,X){let{source:te="keyboard"}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};L(X),e.backfill&&e.mode==="combobox"&&ne!==null&&te==="keyboard"&&D(String(ne))},j=(ne,X)=>{const te=()=>{var W;const U=x(ne),J=U==null?void 0:U[u.value.label];return[e.labelInValue?{label:typeof J=="function"?J():J,originLabel:J,value:ne,key:(W=U==null?void 0:U.key)!==null&&W!==void 0?W:ne}:ne,Oy(U)]};if(X&&e.onSelect){const[W,U]=te();e.onSelect(W,U)}else if(!X&&e.onDeselect){const[W,U]=te();e.onDeselect(W,U)}},z=(ne,X)=>{let te;const W=a.value?X.selected:!0;W?te=a.value?[...$.value,ne]:[ne]:te=$.value.filter(U=>U.value!==ne),H(te),j(ne,W),e.mode==="combobox"?D(""):(!a.value||e.autoClearSearchValue)&&(d(""),D(""))},G=(ne,X)=>{H(ne),(X.type==="remove"||X.type==="clear")&&X.values.forEach(te=>{j(te.value,!1)})},Q=(ne,X)=>{var te;if(d(ne),D(null),X.source==="submit"){const W=(ne||"").trim();if(W){const U=Array.from(new Set([...w.value,W]));H(U),j(W,!0),d("")}return}X.source!=="blur"&&(e.mode==="combobox"&&H(ne),(te=e.onSearch)===null||te===void 0||te.call(e,ne))},Y=ne=>{let X=ne;e.mode!=="tags"&&(X=ne.map(W=>{const U=v.value.get(W);return U==null?void 0:U.value}).filter(W=>W!==void 0));const te=Array.from(new Set([...w.value,...X]));H(te),te.forEach(W=>{j(W,!0)})},oe=E(()=>e.virtual!==!1&&e.dropdownMatchSelectWidth!==!1);vU(Gg(y(y({},f),{flattenOptions:R,onActiveValue:B,defaultActiveFirstOption:F,onSelect:z,menuItemSelectedIcon:We(e,"menuItemSelectedIcon"),rawValues:w,fieldNames:u,virtual:oe,listHeight:We(e,"listHeight"),listItemHeight:We(e,"listItemHeight"),childrenAsData:l})));const Z=ae();n({focus(){var ne;(ne=Z.value)===null||ne===void 0||ne.focus()},blur(){var ne;(ne=Z.value)===null||ne===void 0||ne.blur()},scrollTo(ne){var X;(X=Z.value)===null||X===void 0||X.scrollTo(ne)}});const re=E(()=>it(e,["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"]));return()=>g(pC,k(k(k({},re.value),o),{},{id:i,prefixCls:e.prefixCls,ref:Z,omitDomProps:IU,mode:e.mode,displayValues:P.value,onDisplayValuesChange:G,searchValue:c.value,onSearch:Q,onSearchSplit:Y,dropdownMatchSelectWidth:e.dropdownMatchSelectWidth,OptionList:yU,emptyOptions:!R.value.length,activeValue:M.value,activeDescendantId:`${i}_list_${N.value}`}),r)}}),vC=()=>null;vC.isSelectOption=!0;vC.displayName="ASelectOption";const mC=()=>null;mC.isSelectOptGroup=!0;mC.displayName="ASelectOptGroup";var _U={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},MU=Symbol("iconContext"),R8=function(){return ze(MU,{prefixCls:ae("anticon"),rootClassName:ae(""),csp:ae()})};function bC(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function AU(e,t){return e&&e.contains?e.contains(t):!1}var XP="data-vc-order",RU="vc-icon-key",ky=new Map;function D8(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):RU}function yC(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function DU(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function N8(e){return Array.from((ky.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function k8(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!bC())return null;var n=t.csp,o=t.prepend,r=document.createElement("style");r.setAttribute(XP,DU(o)),n&&n.nonce&&(r.nonce=n.nonce),r.innerHTML=e;var i=yC(t),a=i.firstChild;if(o){if(o==="queue"){var l=N8(i).filter(function(s){return["prepend","prependQueue"].includes(s.getAttribute(XP))});if(l.length)return i.insertBefore(r,l[l.length-1].nextSibling),r}i.insertBefore(r,a)}else i.appendChild(r);return r}function NU(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=yC(t);return N8(n).find(function(o){return o.getAttribute(D8(t))===e})}function kU(e,t){var n=ky.get(e);if(!n||!AU(document,n)){var o=k8("",t),r=o.parentNode;ky.set(e,r),e.removeChild(o)}}function LU(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=yC(n);kU(o,n);var r=NU(t,n);if(r)return n.csp&&n.csp.nonce&&r.nonce!==n.csp.nonce&&(r.nonce=n.csp.nonce),r.innerHTML!==e&&(r.innerHTML=e),r;var i=k8(e,n);return i.setAttribute(D8(n),t),i}function YP(e){for(var t=1;t{var U,J;let de=!0,fe=X;(U=e.onActiveValueChange)===null||U===void 0||U.call(e,null);const pe=W?null:Qz(X,e.tokenSeparators);return e.mode!=="combobox"&&pe&&(fe="",(J=e.onSearchSplit)===null||J===void 0||J.call(e,pe),T(!1),de=!1),e.onSearch&&$.value!==fe&&e.onSearch(fe,{source:te?"typing":"effect"}),de},H=X=>{var te;!X||!X.trim()||(te=e.onSearch)===null||te===void 0||te.call(e,X,{source:"submit"})};be(w,()=>{!w.value&&!i.value&&e.mode!=="combobox"&&R("",!1,!1)},{immediate:!0,flush:"post"}),be(()=>e.disabled,()=>{P.value&&e.disabled&&O(!1),e.disabled&&!v.value&&m(!1)},{immediate:!0});const[M,D]=$A(),N=function(X){var te;const W=M(),{which:U}=X;if(U===Ie.ENTER&&(e.mode!=="combobox"&&X.preventDefault(),w.value||T(!0)),D(!!$.value),U===Ie.BACKSPACE&&!W&&i.value&&!$.value&&e.displayValues.length){const pe=[...e.displayValues];let ve=null;for(let he=pe.length-1;he>=0;he-=1){const V=pe[he];if(!V.disabled){pe.splice(he,1),ve=V;break}}ve&&e.onDisplayValuesChange(pe,{type:"remove",values:[ve]})}for(var J=arguments.length,de=new Array(J>1?J-1:0),fe=1;fe1?te-1:0),U=1;U{const te=e.displayValues.filter(W=>W!==X);e.onDisplayValuesChange(te,{type:"remove",values:[X]})},B=se(!1),j=function(){m(!0),e.disabled||(e.onFocus&&!B.value&&e.onFocus(...arguments),e.showAction&&e.showAction.includes("focus")&&T(!0)),B.value=!0},z=ae(!1),G=function(){if(z.value||(v.value=!0,m(!1,()=>{B.value=!1,v.value=!1,T(!1)}),e.disabled))return;const X=$.value;X&&(e.mode==="tags"?e.onSearch(X,{source:"submit"}):e.mode==="multiple"&&e.onSearch("",{source:"blur"})),e.onBlur&&e.onBlur(...arguments)},Q=()=>{z.value=!0},Y=()=>{z.value=!1};Xe("VCSelectContainerEvent",{focus:j,blur:G});const oe=[];Ke(()=>{oe.forEach(X=>clearTimeout(X)),oe.splice(0,oe.length)}),tt(()=>{oe.forEach(X=>clearTimeout(X)),oe.splice(0,oe.length)});const Z=function(X){var te,W;const{target:U}=X,J=(te=d.value)===null||te===void 0?void 0:te.getPopupElement();if(J&&J.contains(U)){const ve=setTimeout(()=>{var he;const V=oe.indexOf(ve);V!==-1&&oe.splice(V,1),b(),!l.value&&!J.contains(document.activeElement)&&((he=f.value)===null||he===void 0||he.focus())});oe.push(ve)}for(var de=arguments.length,fe=new Array(de>1?de-1:0),pe=1;pe{};return Ke(()=>{be(_,()=>{var X;if(_.value){const te=Math.ceil((X=u.value)===null||X===void 0?void 0:X.offsetWidth);re.value!==te&&!Number.isNaN(te)&&(re.value=te)}},{immediate:!0,flush:"post"})}),qK([u,d],_,T),ZK(Ug(y(y({},Fr(e)),{open:w,triggerOpen:_,showSearch:a,multiple:i,toggleOpen:T}))),()=>{const X=y(y({},e),n),{prefixCls:te,id:W,open:U,defaultOpen:J,mode:de,showSearch:fe,searchValue:pe,onSearch:ve,allowClear:he,clearIcon:V,showArrow:q,inputIcon:ie,disabled:me,loading:Se,getInputElement:ce,getPopupContainer:ee,placement:ue,animation:xe,transitionName:Pe,dropdownStyle:_e,dropdownClassName:Ce,dropdownMatchSelectWidth:we,dropdownRender:Oe,dropdownAlign:Me,showAction:Re,direction:Ae,tokenSeparators:Fe,tagRender:lt,optionLabelRender:bt,onPopupScroll:ft,onDropdownVisibleChange:yt,onFocus:Ct,onBlur:fn,onKeyup:yn,onKeydown:On,onMousedown:tn,onClear:Qn,omitDomProps:Oo,getRawInputElement:er,displayValues:Or,onDisplayValuesChange:Io,emptyOptions:ol,activeDescendantId:Ee,activeValue:Je,OptionList:Ge}=X,Tt=QK(X,["prefixCls","id","open","defaultOpen","mode","showSearch","searchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","disabled","loading","getInputElement","getPopupContainer","placement","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","optionLabelRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyup","onKeydown","onMousedown","onClear","omitDomProps","getRawInputElement","displayValues","onDisplayValuesChange","emptyOptions","activeDescendantId","activeValue","OptionList"]),Sn=de==="combobox"&&ce&&ce()||null,nn=typeof er=="function"&&er(),To=y({},Tt);let Kn;nn&&(Kn=Tr=>{T(Tr)}),eU.forEach(Tr=>{delete To[Tr]}),Oo==null||Oo.forEach(Tr=>{delete To[Tr]});const Zr=q!==void 0?q:Se||!i.value&&de!=="combobox";let Fo;Zr&&(Fo=g(Kl,{class:ge(`${te}-arrow`,{[`${te}-arrow-loading`]:Se}),customizeIcon:ie,customizeIconProps:{loading:Se,searchValue:$.value,open:w.value,focused:h.value,showSearch:a.value}},null));let tr;const jt=()=>{Qn==null||Qn(),Io([],{type:"clear",values:Or}),R("",!1,!1)};!me&&he&&(Or.length||$.value)&&(tr=g(Kl,{class:`${te}-clear`,onMousedown:jt,customizeIcon:V},{default:()=>[zn("×")]}));const Ir=g(Ge,{ref:p},y(y({},s.customSlots),{option:r.option})),nr=ge(te,n.class,{[`${te}-focused`]:h.value,[`${te}-multiple`]:i.value,[`${te}-single`]:!i.value,[`${te}-allow-clear`]:he,[`${te}-show-arrow`]:Zr,[`${te}-disabled`]:me,[`${te}-loading`]:Se,[`${te}-open`]:w.value,[`${te}-customize-input`]:Sn,[`${te}-show-search`]:a.value}),sa=g(OK,{ref:d,disabled:me,prefixCls:te,visible:_.value,popupElement:Ir,containerWidth:re.value,animation:xe,transitionName:Pe,dropdownStyle:_e,dropdownClassName:Ce,direction:Ae,dropdownMatchSelectWidth:we,dropdownRender:Oe,dropdownAlign:Me,placement:ue,getPopupContainer:ee,empty:ol,getTriggerDOMNode:()=>c.current,onPopupVisibleChange:Kn,onPopupMouseEnter:ne,onPopupFocusin:Q,onPopupFocusout:Y},{default:()=>nn?sn(nn)&&mt(nn,{ref:c},!1,!0):g(YK,k(k({},e),{},{domRef:c,prefixCls:te,inputElement:Sn,ref:f,id:W,showSearch:a.value,mode:de,activeDescendantId:Ee,tagRender:lt,optionLabelRender:bt,values:Or,open:w.value,onToggleOpen:T,activeValue:Je,searchValue:$.value,onSearch:R,onSearchSubmit:H,onRemove:F,tokenWithEnter:A.value}),null)});let ca;return nn?ca=sa:ca=g("div",k(k({},To),{},{class:nr,ref:u,onMousedown:Z,onKeydown:N,onKeyup:L}),[h.value&&!w.value&&g("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},[`${Or.map(Tr=>{let{label:ys,value:Er}=Tr;return["number","string"].includes(typeof ys)?ys:Er}).join(", ")}`]),sa,Fo,tr]),ca}}}),Nv=(e,t)=>{let{height:n,offset:o,prefixCls:r,onInnerResize:i}=e,{slots:a}=t;var l;let s={},u={display:"flex",flexDirection:"column"};return o!==void 0&&(s={height:`${n}px`,position:"relative",overflow:"hidden"},u=y(y({},u),{transform:`translateY(${o}px)`,position:"absolute",left:0,right:0,top:0})),g("div",{style:s},[g(br,{onResize:c=>{let{offsetHeight:d}=c;d&&i&&i()}},{default:()=>[g("div",{style:u,class:ge({[`${r}-holder-inner`]:r})},[(l=a.default)===null||l===void 0?void 0:l.call(a)])]})])};Nv.displayName="Filter";Nv.inheritAttrs=!1;Nv.props={prefixCls:String,height:Number,offset:Number,onInnerResize:Function};const OA=(e,t)=>{let{setRef:n}=e,{slots:o}=t;var r;const i=Ot((r=o.default)===null||r===void 0?void 0:r.call(o));return i&&i.length?Dn(i[0],{ref:n}):i};OA.props={setRef:{type:Function,default:()=>{}}};const oU=20;function KP(e){return"touches"in e?e.touches[0].pageY:e.pageY}const rU=le({compatConfig:{MODE:3},name:"ScrollBar",inheritAttrs:!1,props:{prefixCls:String,scrollTop:Number,scrollHeight:Number,height:Number,count:Number,onScroll:{type:Function},onStartMove:{type:Function},onStopMove:{type:Function}},setup(){return{moveRaf:null,scrollbarRef:Fd(),thumbRef:Fd(),visibleTimeout:null,state:rt({dragging:!1,pageY:null,startTop:null,visible:!1})}},watch:{scrollTop:{handler(){this.delayHidden()},flush:"post"}},mounted(){var e,t;(e=this.scrollbarRef.current)===null||e===void 0||e.addEventListener("touchstart",this.onScrollbarTouchStart,hn?{passive:!1}:!1),(t=this.thumbRef.current)===null||t===void 0||t.addEventListener("touchstart",this.onMouseDown,hn?{passive:!1}:!1)},beforeUnmount(){this.removeEvents(),clearTimeout(this.visibleTimeout)},methods:{delayHidden(){clearTimeout(this.visibleTimeout),this.state.visible=!0,this.visibleTimeout=setTimeout(()=>{this.state.visible=!1},2e3)},onScrollbarTouchStart(e){e.preventDefault()},onContainerMouseDown(e){e.stopPropagation(),e.preventDefault()},patchEvents(){window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),this.thumbRef.current.addEventListener("touchmove",this.onMouseMove,hn?{passive:!1}:!1),this.thumbRef.current.addEventListener("touchend",this.onMouseUp)},removeEvents(){window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),this.scrollbarRef.current.removeEventListener("touchstart",this.onScrollbarTouchStart,hn?{passive:!1}:!1),this.thumbRef.current&&(this.thumbRef.current.removeEventListener("touchstart",this.onMouseDown,hn?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchmove",this.onMouseMove,hn?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchend",this.onMouseUp)),Ze.cancel(this.moveRaf)},onMouseDown(e){const{onStartMove:t}=this.$props;y(this.state,{dragging:!0,pageY:KP(e),startTop:this.getTop()}),t(),this.patchEvents(),e.stopPropagation(),e.preventDefault()},onMouseMove(e){const{dragging:t,pageY:n,startTop:o}=this.state,{onScroll:r}=this.$props;if(Ze.cancel(this.moveRaf),t){const i=KP(e)-n,a=o+i,l=this.getEnableScrollRange(),s=this.getEnableHeightRange(),u=s?a/s:0,c=Math.ceil(u*l);this.moveRaf=Ze(()=>{r(c)})}},onMouseUp(){const{onStopMove:e}=this.$props;this.state.dragging=!1,e(),this.removeEvents()},getSpinHeight(){const{height:e,scrollHeight:t}=this.$props;let n=e/t*100;return n=Math.max(n,oU),n=Math.min(n,e/2),Math.floor(n)},getEnableScrollRange(){const{scrollHeight:e,height:t}=this.$props;return e-t||0},getEnableHeightRange(){const{height:e}=this.$props,t=this.getSpinHeight();return e-t||0},getTop(){const{scrollTop:e}=this.$props,t=this.getEnableScrollRange(),n=this.getEnableHeightRange();return e===0||t===0?0:e/t*n},showScroll(){const{height:e,scrollHeight:t}=this.$props;return t>e}},render(){const{dragging:e,visible:t}=this.state,{prefixCls:n}=this.$props,o=this.getSpinHeight()+"px",r=this.getTop()+"px",i=this.showScroll(),a=i&&t;return g("div",{ref:this.scrollbarRef,class:ge(`${n}-scrollbar`,{[`${n}-scrollbar-show`]:i}),style:{width:"8px",top:0,bottom:0,right:0,position:"absolute",display:a?void 0:"none"},onMousedown:this.onContainerMouseDown,onMousemove:this.delayHidden},[g("div",{ref:this.thumbRef,class:ge(`${n}-scrollbar-thumb`,{[`${n}-scrollbar-thumb-moving`]:e}),style:{width:"100%",height:o,top:r,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:"99px",cursor:"pointer",userSelect:"none"},onMousedown:this.onMouseDown},null)])}});function iU(e,t,n,o){const r=new Map,i=new Map,a=ae(Symbol("update"));be(e,()=>{a.value=Symbol("update")});let l;function s(){Ze.cancel(l)}function u(){s(),l=Ze(()=>{r.forEach((d,f)=>{if(d&&d.offsetParent){const{offsetHeight:p}=d;i.get(f)!==p&&(a.value=Symbol("update"),i.set(f,d.offsetHeight))}})})}function c(d,f){const p=t(d);r.get(p),f?(r.set(p,f.$el||f),u()):r.delete(p)}return Zn(()=>{s()}),[c,u,i,a]}function aU(e,t,n,o,r,i,a,l){let s;return u=>{if(u==null){l();return}Ze.cancel(s);const c=t.value,d=o.itemHeight;if(typeof u=="number")a(u);else if(u&&typeof u=="object"){let f;const{align:p}=u;"index"in u?{index:f}=u:f=c.findIndex(m=>r(m)===u.key);const{offset:v=0}=u,h=(m,b)=>{if(m<0||!e.value)return;const S=e.value.clientHeight;let C=!1,$=b;if(S){const x=b||p;let P=0,w=0,O=0;const I=Math.min(c.length,f);for(let A=0;A<=I;A+=1){const R=r(c[A]);w=P;const H=n.get(R);O=w+(H===void 0?d:H),P=O,A===f&&H===void 0&&(C=!0)}const _=e.value.scrollTop;let T=null;switch(x){case"top":T=w-v;break;case"bottom":T=O-S+v;break;default:{const A=_+S;w<_?$="top":O>A&&($="bottom")}}T!==null&&T!==_&&a(T)}s=Ze(()=>{C&&i(),h(m-1,$)},2)};h(5)}}}const lU=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),IA=(e,t)=>{let n=!1,o=null;function r(){clearTimeout(o),n=!0,o=setTimeout(()=>{n=!1},50)}return function(i){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const l=i<0&&e.value||i>0&&t.value;return a&&l?(clearTimeout(o),n=!1):(!l||n)&&r(),!n&&l}};function sU(e,t,n,o){let r=0,i=null,a=null,l=!1;const s=IA(t,n);function u(d){if(!e.value)return;Ze.cancel(i);const{deltaY:f}=d;r+=f,a=f,!s(f)&&(lU||d.preventDefault(),i=Ze(()=>{o(r*(l?10:1)),r=0}))}function c(d){e.value&&(l=d.detail===a)}return[u,c]}const cU=14/15;function uU(e,t,n){let o=!1,r=0,i=null,a=null;const l=()=>{i&&(i.removeEventListener("touchmove",s),i.removeEventListener("touchend",u))},s=f=>{if(o){const p=Math.ceil(f.touches[0].pageY);let v=r-p;r=p,n(v)&&f.preventDefault(),clearInterval(a),a=setInterval(()=>{v*=cU,(!n(v,!0)||Math.abs(v)<=.1)&&clearInterval(a)},16)}},u=()=>{o=!1,l()},c=f=>{l(),f.touches.length===1&&!o&&(o=!0,r=Math.ceil(f.touches[0].pageY),i=f.target,i.addEventListener("touchmove",s,{passive:!1}),i.addEventListener("touchend",u))},d=()=>{};Ke(()=>{document.addEventListener("touchmove",d,{passive:!1}),be(e,f=>{t.value.removeEventListener("touchstart",c),l(),clearInterval(a),f&&t.value.addEventListener("touchstart",c,{passive:!1})},{immediate:!0})}),tt(()=>{document.removeEventListener("touchmove",d)})}var dU=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const u=t+s,c=r(l,u,{}),d=a(l);return g(OA,{key:d,setRef:f=>o(l,f)},{default:()=>[c]})})}const TA=le({compatConfig:{MODE:3},name:"List",inheritAttrs:!1,props:{prefixCls:String,data:K.array,height:Number,itemHeight:Number,fullHeight:{type:Boolean,default:void 0},itemKey:{type:[String,Number,Function],required:!0},component:{type:[String,Object]},virtual:{type:Boolean,default:void 0},children:Function,onScroll:Function,onMousedown:Function,onMouseenter:Function,onVisibleChange:Function},setup(e,t){let{expose:n}=t;const o=E(()=>{const{height:F,itemHeight:B,virtual:j}=e;return!!(j!==!1&&F&&B)}),r=E(()=>{const{height:F,itemHeight:B,data:j}=e;return o.value&&j&&B*j.length>F}),i=rt({scrollTop:0,scrollMoving:!1}),a=E(()=>e.data||fU),l=se([]);be(a,()=>{l.value=nt(a.value).slice()},{immediate:!0});const s=se(F=>{});be(()=>e.itemKey,F=>{typeof F=="function"?s.value=F:s.value=B=>B==null?void 0:B[F]},{immediate:!0});const u=se(),c=se(),d=se(),f=F=>s.value(F),p={getKey:f};function v(F){let B;typeof F=="function"?B=F(i.scrollTop):B=F;const j=P(B);u.value&&(u.value.scrollTop=j),i.scrollTop=j}const[h,m,b,S]=iU(l,f),C=rt({scrollHeight:void 0,start:0,end:0,offset:void 0}),$=se(0);Ke(()=>{ot(()=>{var F;$.value=((F=c.value)===null||F===void 0?void 0:F.offsetHeight)||0})}),uo(()=>{ot(()=>{var F;$.value=((F=c.value)===null||F===void 0?void 0:F.offsetHeight)||0})}),be([o,l],()=>{o.value||y(C,{scrollHeight:void 0,start:0,end:l.value.length-1,offset:void 0})},{immediate:!0}),be([o,l,$,r],()=>{o.value&&!r.value&&y(C,{scrollHeight:$.value,start:0,end:l.value.length-1,offset:void 0}),u.value&&(i.scrollTop=u.value.scrollTop)},{immediate:!0}),be([r,o,()=>i.scrollTop,l,S,()=>e.height,$],()=>{if(!o.value||!r.value)return;let F=0,B,j,z;const G=l.value.length,Q=l.value,Y=i.scrollTop,{itemHeight:oe,height:Z}=e,re=Y+Z;for(let ne=0;ne=Y&&(B=ne,j=F),z===void 0&&U>re&&(z=ne),F=U}B===void 0&&(B=0,j=0,z=Math.ceil(Z/oe)),z===void 0&&(z=G-1),z=Math.min(z+1,G),y(C,{scrollHeight:F,start:B,end:z,offset:j})},{immediate:!0});const x=E(()=>C.scrollHeight-e.height);function P(F){let B=F;return Number.isNaN(x.value)||(B=Math.min(B,x.value)),B=Math.max(B,0),B}const w=E(()=>i.scrollTop<=0),O=E(()=>i.scrollTop>=x.value),I=IA(w,O);function _(F){v(F)}function T(F){var B;const{scrollTop:j}=F.currentTarget;j!==i.scrollTop&&v(j),(B=e.onScroll)===null||B===void 0||B.call(e,F)}const[A,R]=sU(o,w,O,F=>{v(B=>B+F)});uU(o,u,(F,B)=>I(F,B)?!1:(A({preventDefault(){},deltaY:F}),!0));function H(F){o.value&&F.preventDefault()}const M=()=>{u.value&&(u.value.removeEventListener("wheel",A,hn?{passive:!1}:!1),u.value.removeEventListener("DOMMouseScroll",R),u.value.removeEventListener("MozMousePixelScroll",H))};Ve(()=>{ot(()=>{u.value&&(M(),u.value.addEventListener("wheel",A,hn?{passive:!1}:!1),u.value.addEventListener("DOMMouseScroll",R),u.value.addEventListener("MozMousePixelScroll",H))})}),tt(()=>{M()});const D=aU(u,l,b,e,f,m,v,()=>{var F;(F=d.value)===null||F===void 0||F.delayHidden()});n({scrollTo:D});const N=E(()=>{let F=null;return e.height&&(F=y({[e.fullHeight?"height":"maxHeight"]:e.height+"px"},pU),o.value&&(F.overflowY="hidden",i.scrollMoving&&(F.pointerEvents="none"))),F});return be([()=>C.start,()=>C.end,l],()=>{if(e.onVisibleChange){const F=l.value.slice(C.start,C.end+1);e.onVisibleChange(F,l.value)}},{flush:"post"}),{state:i,mergedData:l,componentStyle:N,onFallbackScroll:T,onScrollBar:_,componentRef:u,useVirtual:o,calRes:C,collectHeight:m,setInstance:h,sharedConfig:p,scrollBarRef:d,fillerInnerRef:c,delayHideScrollBar:()=>{var F;(F=d.value)===null||F===void 0||F.delayHidden()}}},render(){const e=y(y({},this.$props),this.$attrs),{prefixCls:t="rc-virtual-list",height:n,itemHeight:o,fullHeight:r,data:i,itemKey:a,virtual:l,component:s="div",onScroll:u,children:c=this.$slots.default,style:d,class:f}=e,p=dU(e,["prefixCls","height","itemHeight","fullHeight","data","itemKey","virtual","component","onScroll","children","style","class"]),v=ge(t,f),{scrollTop:h}=this.state,{scrollHeight:m,offset:b,start:S,end:C}=this.calRes,{componentStyle:$,onFallbackScroll:x,onScrollBar:P,useVirtual:w,collectHeight:O,sharedConfig:I,setInstance:_,mergedData:T,delayHideScrollBar:A}=this;return g("div",k({style:y(y({},d),{position:"relative"}),class:v},p),[g(s,{class:`${t}-holder`,style:$,ref:"componentRef",onScroll:x,onMouseenter:A},{default:()=>[g(Nv,{prefixCls:t,height:m,offset:b,onInnerResize:O,ref:"fillerInnerRef"},{default:()=>gU(T,S,C,_,c,I)})]}),w&&g(rU,{ref:"scrollBarRef",prefixCls:t,scrollTop:h,height:n,scrollHeight:m,count:T.length,onScroll:P,onStartMove:()=>{this.state.scrollMoving=!0},onStopMove:()=>{this.state.scrollMoving=!1}},null)])}});function gC(e,t,n){const o=ae(e());return be(t,(r,i)=>{n?n(r,i)&&(o.value=e()):o.value=e()}),o}function hU(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}const EA=Symbol("SelectContextKey");function vU(e){return Xe(EA,e)}function mU(){return ze(EA,{})}var bU=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r`${r.prefixCls}-item`),l=gC(()=>i.flattenOptions,[()=>r.open,()=>i.flattenOptions],x=>x[0]),s=Fd(),u=x=>{x.preventDefault()},c=x=>{s.current&&s.current.scrollTo(typeof x=="number"?{index:x}:x)},d=function(x){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const w=l.value.length;for(let O=0;O1&&arguments[1]!==void 0?arguments[1]:!1;f.activeIndex=x;const w={source:P?"keyboard":"mouse"},O=l.value[x];if(!O){i.onActiveValue(null,-1,w);return}i.onActiveValue(O.value,x,w)};be([()=>l.value.length,()=>r.searchValue],()=>{p(i.defaultActiveFirstOption!==!1?d(0):-1)},{immediate:!0});const v=x=>i.rawValues.has(x)&&r.mode!=="combobox";be([()=>r.open,()=>r.searchValue],()=>{if(!r.multiple&&r.open&&i.rawValues.size===1){const x=Array.from(i.rawValues)[0],P=nt(l.value).findIndex(w=>{let{data:O}=w;return O[i.fieldNames.value]===x});P!==-1&&(p(P),ot(()=>{c(P)}))}r.open&&ot(()=>{var x;(x=s.current)===null||x===void 0||x.scrollTo(void 0)})},{immediate:!0,flush:"post"});const h=x=>{x!==void 0&&i.onSelect(x,{selected:!i.rawValues.has(x)}),r.multiple||r.toggleOpen(!1)},m=x=>typeof x.label=="function"?x.label():x.label;function b(x){const P=l.value[x];if(!P)return null;const w=P.data||{},{value:O}=w,{group:I}=P,_=Ua(w,!0),T=m(P);return P?g("div",k(k({"aria-label":typeof T=="string"&&!I?T:null},_),{},{key:x,role:I?"presentation":"option",id:`${r.id}_list_${x}`,"aria-selected":v(O)}),[O]):null}return n({onKeydown:x=>{const{which:P,ctrlKey:w}=x;switch(P){case Ie.N:case Ie.P:case Ie.UP:case Ie.DOWN:{let O=0;if(P===Ie.UP?O=-1:P===Ie.DOWN?O=1:hU()&&w&&(P===Ie.N?O=1:P===Ie.P&&(O=-1)),O!==0){const I=d(f.activeIndex+O,O);c(I),p(I,!0)}break}case Ie.ENTER:{const O=l.value[f.activeIndex];O&&!O.data.disabled?h(O.value):h(void 0),r.open&&x.preventDefault();break}case Ie.ESC:r.toggleOpen(!1),r.open&&x.stopPropagation()}},onKeyup:()=>{},scrollTo:x=>{c(x)}}),()=>{const{id:x,notFoundContent:P,onPopupScroll:w}=r,{menuItemSelectedIcon:O,fieldNames:I,virtual:_,listHeight:T,listItemHeight:A}=i,R=o.option,{activeIndex:H}=f,M=Object.keys(I).map(D=>I[D]);return l.value.length===0?g("div",{role:"listbox",id:`${x}_list`,class:`${a.value}-empty`,onMousedown:u},[P]):g(Le,null,[g("div",{role:"listbox",id:`${x}_list`,style:{height:0,width:0,overflow:"hidden"}},[b(H-1),b(H),b(H+1)]),g(TA,{itemKey:"key",ref:s,data:l.value,height:T,itemHeight:A,fullHeight:!1,onMousedown:u,onScroll:w,virtual:_},{default:(D,N)=>{var L;const{group:F,groupOption:B,data:j,value:z}=D,{key:G}=j,Q=typeof D.label=="function"?D.label():D.label;if(F){const V=(L=j.title)!==null&&L!==void 0?L:UP(Q)&&Q;return g("div",{class:ge(a.value,`${a.value}-group`),title:V},[R?R(j):Q!==void 0?Q:G])}const{disabled:Y,title:oe,children:Z,style:re,class:ne,className:X}=j,te=bU(j,["disabled","title","children","style","class","className"]),W=it(te,M),U=v(z),J=`${a.value}-option`,de=ge(a.value,J,ne,X,{[`${J}-grouped`]:B,[`${J}-active`]:H===N&&!Y,[`${J}-disabled`]:Y,[`${J}-selected`]:U}),fe=m(D),pe=!O||typeof O=="function"||U,ve=typeof fe=="number"?fe:fe||z;let he=UP(ve)?ve.toString():void 0;return oe!==void 0&&(he=oe),g("div",k(k({},W),{},{"aria-selected":U,class:de,title:he,onMousemove:V=>{te.onMousemove&&te.onMousemove(V),!(H===N||Y)&&p(N)},onClick:V=>{Y||h(z),te.onClick&&te.onClick(V)},style:re}),[g("div",{class:`${J}-content`},[R?R(j):ve]),sn(O)||U,pe&&g(Kl,{class:`${a.value}-option-state`,customizeIcon:O,customizeIconProps:{isSelected:U}},{default:()=>[U?"✓":null]})])}})])}}});var SU=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r1&&arguments[1]!==void 0?arguments[1]:!1;return Ot(e).map((o,r)=>{var i;if(!sn(o)||!o.type)return null;const{type:{isSelectOptGroup:a},key:l,children:s,props:u}=o;if(t||!a)return CU(o);const c=s&&s.default?s.default():void 0,d=(u==null?void 0:u.label)||((i=s.label)===null||i===void 0?void 0:i.call(s))||l;return y(y({key:`__RC_SELECT_GRP__${l===null?r:String(l)}__`},u),{label:d,options:_A(c||[])})}).filter(o=>o)}function xU(e,t,n){const o=se(),r=se(),i=se(),a=se([]);return be([e,t],()=>{e.value?a.value=nt(e.value).slice():a.value=_A(t.value)},{immediate:!0,deep:!0}),Ve(()=>{const l=a.value,s=new Map,u=new Map,c=n.value;function d(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(let v=0;v0&&arguments[0]!==void 0?arguments[0]:ae("");const t=`rc_select_${wU()}`;return e.value||t}function MA(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function O0(e,t){return MA(e).join("").toUpperCase().includes(t)}const PU=(e,t,n,o,r)=>E(()=>{const i=n.value,a=r==null?void 0:r.value,l=o==null?void 0:o.value;if(!i||l===!1)return e.value;const{options:s,label:u,value:c}=t.value,d=[],f=typeof l=="function",p=i.toUpperCase(),v=f?l:(m,b)=>a?O0(b[a],p):b[s]?O0(b[u!=="children"?u:"label"],p):O0(b[c],p),h=f?m=>Oy(m):m=>m;return e.value.forEach(m=>{if(m[s]){if(v(i,h(m)))d.push(m);else{const S=m[s].filter(C=>v(i,h(C)));S.length&&d.push(y(y({},m),{[s]:S}))}return}v(i,h(m))&&d.push(m)}),d}),OU=(e,t)=>{const n=se({values:new Map,options:new Map});return[E(()=>{const{values:i,options:a}=n.value,l=e.value.map(c=>{var d;return c.label===void 0?y(y({},c),{label:(d=i.get(c.value))===null||d===void 0?void 0:d.label}):c}),s=new Map,u=new Map;return l.forEach(c=>{s.set(c.value,c),u.set(c.value,t.value.get(c.value)||a.get(c.value))}),n.value.values=s,n.value.options=u,l}),i=>t.value.get(i)||n.value.options.get(i)]};function Dt(e,t){const{defaultValue:n,value:o=ae()}=t||{};let r=typeof e=="function"?e():e;o.value!==void 0&&(r=Bt(o)),n!==void 0&&(r=typeof n=="function"?n():n);const i=ae(r),a=ae(r);Ve(()=>{let s=o.value!==void 0?o.value:i.value;t.postState&&(s=t.postState(s)),a.value=s});function l(s){const u=a.value;i.value=s,nt(a.value)!==s&&t.onChange&&t.onChange(s,u)}return be(o,()=>{i.value=o.value}),[a,l]}function $t(e){const t=typeof e=="function"?e():e,n=ae(t);function o(r){n.value=r}return[n,o]}const IU=["inputValue"];function AA(){return y(y({},Dv()),{prefixCls:String,id:String,backfill:{type:Boolean,default:void 0},fieldNames:Object,inputValue:String,searchValue:String,onSearch:Function,autoClearSearchValue:{type:Boolean,default:void 0},onSelect:Function,onDeselect:Function,filterOption:{type:[Boolean,Function],default:void 0},filterSort:Function,optionFilterProp:String,optionLabelProp:String,options:Array,defaultActiveFirstOption:{type:Boolean,default:void 0},virtual:{type:Boolean,default:void 0},listHeight:Number,listItemHeight:Number,menuItemSelectedIcon:K.any,mode:String,labelInValue:{type:Boolean,default:void 0},value:K.any,defaultValue:K.any,onChange:Function,children:Array})}function TU(e){return!e||typeof e!="object"}const EU=le({compatConfig:{MODE:3},name:"VcSelect",inheritAttrs:!1,props:Qe(AA(),{prefixCls:"vc-select",autoClearSearchValue:!0,listHeight:200,listItemHeight:20,dropdownMatchSelectWidth:!0}),setup(e,t){let{expose:n,attrs:o,slots:r}=t;const i=hC(We(e,"id")),a=E(()=>PA(e.mode)),l=E(()=>!!(!e.options&&e.children)),s=E(()=>e.filterOption===void 0&&e.mode==="combobox"?!1:e.filterOption),u=E(()=>U6(e.fieldNames,l.value)),[c,d]=Dt("",{value:E(()=>e.searchValue!==void 0?e.searchValue:e.inputValue),postState:ne=>ne||""}),f=xU(We(e,"options"),We(e,"children"),u),{valueOptions:p,labelOptions:v,options:h}=f,m=ne=>MA(ne).map(te=>{var W,U;let J,de,fe,pe;TU(te)?J=te:(fe=te.key,de=te.label,J=(W=te.value)!==null&&W!==void 0?W:fe);const ve=p.value.get(J);return ve&&(de===void 0&&(de=ve==null?void 0:ve[e.optionLabelProp||u.value.label]),fe===void 0&&(fe=(U=ve==null?void 0:ve.key)!==null&&U!==void 0?U:J),pe=ve==null?void 0:ve.disabled),{label:de,value:J,key:fe,disabled:pe,option:ve}}),[b,S]=Dt(e.defaultValue,{value:We(e,"value")}),C=E(()=>{var ne;const X=m(b.value);return e.mode==="combobox"&&!(!((ne=X[0])===null||ne===void 0)&&ne.value)?[]:X}),[$,x]=OU(C,p),P=E(()=>{if(!e.mode&&$.value.length===1){const ne=$.value[0];if(ne.value===null&&(ne.label===null||ne.label===void 0))return[]}return $.value.map(ne=>{var X;return y(y({},ne),{label:(X=typeof ne.label=="function"?ne.label():ne.label)!==null&&X!==void 0?X:ne.value})})}),w=E(()=>new Set($.value.map(ne=>ne.value)));Ve(()=>{var ne;if(e.mode==="combobox"){const X=(ne=$.value[0])===null||ne===void 0?void 0:ne.value;X!=null&&d(String(X))}},{flush:"post"});const O=(ne,X)=>{const te=X??ne;return{[u.value.value]:ne,[u.value.label]:te}},I=se();Ve(()=>{if(e.mode!=="tags"){I.value=h.value;return}const ne=h.value.slice(),X=te=>p.value.has(te);[...$.value].sort((te,W)=>te.value{const W=te.value;X(W)||ne.push(O(W,te.label))}),I.value=ne});const _=PU(I,u,c,s,We(e,"optionFilterProp")),T=E(()=>e.mode!=="tags"||!c.value||_.value.some(ne=>ne[e.optionFilterProp||"value"]===c.value)?_.value:[O(c.value),..._.value]),A=E(()=>e.filterSort?[...T.value].sort((ne,X)=>e.filterSort(ne,X)):T.value),R=E(()=>Zz(A.value,{fieldNames:u.value,childrenAsData:l.value})),H=ne=>{const X=m(ne);if(S(X),e.onChange&&(X.length!==$.value.length||X.some((te,W)=>{var U;return((U=$.value[W])===null||U===void 0?void 0:U.value)!==(te==null?void 0:te.value)}))){const te=e.labelInValue?X.map(U=>y(y({},U),{originLabel:U.label,label:typeof U.label=="function"?U.label():U.label})):X.map(U=>U.value),W=X.map(U=>Oy(x(U.value)));e.onChange(a.value?te:te[0],a.value?W:W[0])}},[M,D]=$t(null),[N,L]=$t(0),F=E(()=>e.defaultActiveFirstOption!==void 0?e.defaultActiveFirstOption:e.mode!=="combobox"),B=function(ne,X){let{source:te="keyboard"}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};L(X),e.backfill&&e.mode==="combobox"&&ne!==null&&te==="keyboard"&&D(String(ne))},j=(ne,X)=>{const te=()=>{var W;const U=x(ne),J=U==null?void 0:U[u.value.label];return[e.labelInValue?{label:typeof J=="function"?J():J,originLabel:J,value:ne,key:(W=U==null?void 0:U.key)!==null&&W!==void 0?W:ne}:ne,Oy(U)]};if(X&&e.onSelect){const[W,U]=te();e.onSelect(W,U)}else if(!X&&e.onDeselect){const[W,U]=te();e.onDeselect(W,U)}},z=(ne,X)=>{let te;const W=a.value?X.selected:!0;W?te=a.value?[...$.value,ne]:[ne]:te=$.value.filter(U=>U.value!==ne),H(te),j(ne,W),e.mode==="combobox"?D(""):(!a.value||e.autoClearSearchValue)&&(d(""),D(""))},G=(ne,X)=>{H(ne),(X.type==="remove"||X.type==="clear")&&X.values.forEach(te=>{j(te.value,!1)})},Q=(ne,X)=>{var te;if(d(ne),D(null),X.source==="submit"){const W=(ne||"").trim();if(W){const U=Array.from(new Set([...w.value,W]));H(U),j(W,!0),d("")}return}X.source!=="blur"&&(e.mode==="combobox"&&H(ne),(te=e.onSearch)===null||te===void 0||te.call(e,ne))},Y=ne=>{let X=ne;e.mode!=="tags"&&(X=ne.map(W=>{const U=v.value.get(W);return U==null?void 0:U.value}).filter(W=>W!==void 0));const te=Array.from(new Set([...w.value,...X]));H(te),te.forEach(W=>{j(W,!0)})},oe=E(()=>e.virtual!==!1&&e.dropdownMatchSelectWidth!==!1);vU(Ug(y(y({},f),{flattenOptions:R,onActiveValue:B,defaultActiveFirstOption:F,onSelect:z,menuItemSelectedIcon:We(e,"menuItemSelectedIcon"),rawValues:w,fieldNames:u,virtual:oe,listHeight:We(e,"listHeight"),listItemHeight:We(e,"listItemHeight"),childrenAsData:l})));const Z=ae();n({focus(){var ne;(ne=Z.value)===null||ne===void 0||ne.focus()},blur(){var ne;(ne=Z.value)===null||ne===void 0||ne.blur()},scrollTo(ne){var X;(X=Z.value)===null||X===void 0||X.scrollTo(ne)}});const re=E(()=>it(e,["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"]));return()=>g(pC,k(k(k({},re.value),o),{},{id:i,prefixCls:e.prefixCls,ref:Z,omitDomProps:IU,mode:e.mode,displayValues:P.value,onDisplayValuesChange:G,searchValue:c.value,onSearch:Q,onSearchSplit:Y,dropdownMatchSelectWidth:e.dropdownMatchSelectWidth,OptionList:yU,emptyOptions:!R.value.length,activeValue:M.value,activeDescendantId:`${i}_list_${N.value}`}),r)}}),vC=()=>null;vC.isSelectOption=!0;vC.displayName="ASelectOption";const mC=()=>null;mC.isSelectOptGroup=!0;mC.displayName="ASelectOptGroup";var _U={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},MU=Symbol("iconContext"),RA=function(){return ze(MU,{prefixCls:ae("anticon"),rootClassName:ae(""),csp:ae()})};function bC(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function AU(e,t){return e&&e.contains?e.contains(t):!1}var XP="data-vc-order",RU="vc-icon-key",ky=new Map;function DA(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):RU}function yC(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function DU(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function NA(e){return Array.from((ky.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function kA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!bC())return null;var n=t.csp,o=t.prepend,r=document.createElement("style");r.setAttribute(XP,DU(o)),n&&n.nonce&&(r.nonce=n.nonce),r.innerHTML=e;var i=yC(t),a=i.firstChild;if(o){if(o==="queue"){var l=NA(i).filter(function(s){return["prepend","prependQueue"].includes(s.getAttribute(XP))});if(l.length)return i.insertBefore(r,l[l.length-1].nextSibling),r}i.insertBefore(r,a)}else i.appendChild(r);return r}function NU(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=yC(t);return NA(n).find(function(o){return o.getAttribute(DA(t))===e})}function kU(e,t){var n=ky.get(e);if(!n||!AU(document,n)){var o=kA("",t),r=o.parentNode;ky.set(e,r),e.removeChild(o)}}function LU(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=yC(n);kU(o,n);var r=NU(t,n);if(r)return n.csp&&n.csp.nonce&&r.nonce!==n.csp.nonce&&(r.nonce=n.csp.nonce),r.innerHTML!==e&&(r.innerHTML=e),r;var i=kA(e,n);return i.setAttribute(DA(n),t),i}function YP(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function KU(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,i;for(i=0;i=0)&&(n[r]=e[r]);return n}function Vp(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=new Array(t);ne.length)&&(t=e.length);for(var n=0,o=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function cG(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,i;for(i=0;i=0)&&(n[r]=e[r]);return n}H8(KH.primary);var et=function(t,n){var o,r=QP({},t,n.attrs),i=r.class,a=r.icon,l=r.spin,s=r.rotate,u=r.tabindex,c=r.twoToneColor,d=r.onClick,f=sG(r,nG),p=R8(),v=p.prefixCls,h=p.rootClassName,m=(o={},Du(o,h.value,!!h.value),Du(o,v.value,!0),Du(o,"".concat(v.value,"-").concat(a.name),!!a.name),Du(o,"".concat(v.value,"-spin"),!!l||a.name==="loading"),o),b=u;b===void 0&&d&&(b=-1);var S=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,C=F8(c),$=oG(C,2),x=$[0],P=$[1];return g("span",QP({role:"img","aria-label":a.name},f,{onClick:d,class:[m,i],tabindex:b}),[g(Ga,{icon:a,primaryColor:x,secondaryColor:P,style:S},null),g(tG,null,null)])};et.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:[String,Array]};et.displayName="AntdIcon";et.inheritAttrs=!1;et.getTwoToneColor=eG;et.setTwoToneColor=H8;function eO(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};const{loading:n,multiple:o,prefixCls:r,hasFeedback:i,feedbackIcon:a,showArrow:l}=e,s=e.suffixIcon||t.suffixIcon&&t.suffixIcon(),u=e.clearIcon||t.clearIcon&&t.clearIcon(),c=e.menuItemSelectedIcon||t.menuItemSelectedIcon&&t.menuItemSelectedIcon(),d=e.removeIcon||t.removeIcon&&t.removeIcon(),f=u??g(po,null,null),p=b=>g(Le,null,[l!==!1&&b,i&&a]);let v=null;if(s!==void 0)v=p(s);else if(n)v=p(g(Po,{spin:!0},null));else{const b=`${r}-suffix`;v=S=>{let{open:C,showSearch:$}=S;return p(C&&$?g(qc,{class:b},null):g(cs,{class:b},null))}}let h=null;c!==void 0?h=c:o?h=g(Yc,null,null):h=null;let m=null;return d!==void 0?m=d:m=g(fo,null,null),{clearIcon:f,suffixIcon:v,itemIcon:h,removeIcon:m}}function CC(e){const t=Symbol("contextKey");return{useProvide:(r,i)=>{const a=rt({});return Xe(t,a),Ve(()=>{y(a,r,i||{})}),a},useInject:()=>ze(t,e)||{}}}const Xg=Symbol("ContextProps"),Yg=Symbol("InternalContextProps"),CG=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E(()=>!0);const n=ae(new Map),o=(i,a)=>{n.value.set(i,a),n.value=new Map(n.value)},r=i=>{n.value.delete(i),n.value=new Map(n.value)};be([t,n],()=>{}),Xe(Xg,e),Xe(Yg,{addFormItemField:o,removeFormItemField:r})},Fy={id:E(()=>{}),onFieldBlur:()=>{},onFieldChange:()=>{},clearValidate:()=>{}},By={addFormItemField:()=>{},removeFormItemField:()=>{}},bn=()=>{const e=ze(Yg,By),t=Symbol("FormItemFieldKey"),n=Jt();return e.addFormItemField(t,n.type),tt(()=>{e.removeFormItemField(t)}),Xe(Yg,By),Xe(Xg,Fy),ze(Xg,Fy)},qg=le({compatConfig:{MODE:3},name:"AFormItemRest",setup(e,t){let{slots:n}=t;return Xe(Yg,By),Xe(Xg,Fy),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),kn=CC({}),Jg=le({name:"NoFormStatus",setup(e,t){let{slots:n}=t;return kn.useProvide({}),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});function lo(e,t,n){return ge({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n})}const Yr=(e,t)=>t||e,xG=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},$G=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item`]:{"&:empty":{display:"none"}}}}},z8=Ue("Space",e=>[$G(e),xG(e)]);var wG="[object Symbol]";function Lv(e){return typeof e=="symbol"||Ur(e)&&Ka(e)==wG}function xC(e,t){for(var n=-1,o=e==null?0:e.length,r=Array(o);++n0){if(++t>=BG)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function WG(e){return function(){return e}}var Zg=function(){try{var e=is(Object,"defineProperty");return e({},"",{}),e}catch{}}(),VG=Zg?function(e,t){return Zg(e,"toString",{configurable:!0,enumerable:!1,value:WG(t),writable:!0})}:$C,V8=jG(VG);function KG(e,t){for(var n=-1,o=e==null?0:e.length;++n-1}function wC(e,t,n){t=="__proto__"&&Zg?Zg(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var YG=Object.prototype,qG=YG.hasOwnProperty;function PC(e,t,n){var o=e[t];(!(qG.call(e,t)&&pf(o,n))||n===void 0&&!(t in e))&&wC(e,t,n)}function Jc(e,t,n,o){var r=!n;n||(n={});for(var i=-1,a=t.length;++i1?n[r-1]:void 0,a=r>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(r--,i):void 0,a&&JG(n[0],n[1],a)&&(i=r<3?void 0:i,r=1),t=Object(t);++or?0:r+t),n=n>r?r:n,n<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(r);++o=t||w<0||d&&O>=i}function b(){var P=I0();if(m(P))return S(P);l=setTimeout(b,h(P))}function S(P){return l=void 0,f&&o?p(P):(o=r=void 0,a)}function C(){l!==void 0&&clearTimeout(l),u=0,o=s=r=l=void 0}function $(){return l===void 0?a:S(I0())}function x(){var P=I0(),w=m(P);if(o=arguments,r=this,s=P,w){if(l===void 0)return v(s);if(d)return clearTimeout(l),l=setTimeout(b,t),p(s)}return l===void 0&&(l=setTimeout(b,t)),a}return x.cancel=C,x.flush=$,x}function zy(e,t,n){(n!==void 0&&!pf(e[t],n)||n===void 0&&!(t in e))&&wC(e,t,n)}function uA(e){return Ur(e)&&as(e)}function jy(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function rq(e){return Jc(e,vf(e))}function iq(e,t,n,o,r,i,a){var l=jy(e,n),s=jy(t,n),u=a.get(s);if(u){zy(e,n,u);return}var c=i?i(l,s,n+"",e,t,a):void 0,d=c===void 0;if(d){var f=wo(s),p=!f&&Pc(s),v=!f&&!p&&_v(s);c=s,f||p||v?wo(l)?c=l:uA(l)?c=W8(l):p?(d=!1,c=Z8(s,!0)):v?(d=!1,c=tA(s,!0)):c=[]:Bv(s)||wc(s)?(c=l,wc(l)?c=rq(l):(!Lo(l)||nC(l))&&(c=nA(s))):d=!1}d&&(a.set(s,c),r(c,s,o,i,a),a.delete(s)),zy(e,n,c)}function dA(e,t,n,o,r){e!==t&&cA(t,function(i,a){if(r||(r=new Hr),Lo(i))iq(e,t,a,n,dA,o,r);else{var l=o?o(jy(e,a),i,a+"",e,t,r):void 0;l===void 0&&(l=i),zy(e,a,l)}},vf)}function aq(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function lq(e){return function(t,n,o){var r=Object(t);if(!as(t)){var i=_C(n);t=Gc(t),n=function(l){return i(r[l],l,r)}}var a=e(t,n,o);return a>-1?r[i?t[a]:a]:void 0}}var sq=Math.max;function cq(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var r=n==null?0:NG(n);return r<0&&(r=sq(o+r,0)),K8(e,_C(t),r)}var uq=lq(cq);function dq(e){for(var t=-1,n=e==null?0:e.length,o={};++t=120&&c.length>=120?new $c(a&&c):void 0}c=e[0];var d=-1,f=l[0];e:for(;++d1),i}),Jc(e,eA(e),n),o&&(n=td(n,Pq|Oq|Iq,wq));for(var r=t.length;r--;)$q(n,t[r]);return n});function Eq(e,t,n,o){if(!Lo(e))return e;t=Zc(t,e);for(var r=-1,i=t.length,a=i-1,l=e;l!=null&&++r=Nq){var u=Dq(e);if(u)return oC(u);a=!1,r=Wg,s=new $c}else s=l;e:for(;++o({compactSize:String,compactDirection:K.oneOf(Jn("horizontal","vertical")).def("horizontal"),isFirstItem:$e(),isLastItem:$e()}),zv=CC(null),Xa=(e,t)=>{const n=zv.useInject(),o=E(()=>{if(!n||fA(n))return"";const{compactDirection:r,isFirstItem:i,isLastItem:a}=n,l=r==="vertical"?"-vertical-":"-";return ge({[`${e.value}-compact${l}item`]:!0,[`${e.value}-compact${l}first-item`]:i,[`${e.value}-compact${l}last-item`]:a,[`${e.value}-compact${l}item-rtl`]:t.value==="rtl"})});return{compactSize:E(()=>n==null?void 0:n.compactSize),compactDirection:E(()=>n==null?void 0:n.compactDirection),compactItemClassnames:o}},Bd=le({name:"NoCompactStyle",setup(e,t){let{slots:n}=t;return zv.useProvide(null),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),Fq=()=>({prefixCls:String,size:{type:String},direction:K.oneOf(Jn("horizontal","vertical")).def("horizontal"),align:K.oneOf(Jn("start","end","center","baseline")),block:{type:Boolean,default:void 0}}),Bq=le({name:"CompactItem",props:Lq(),setup(e,t){let{slots:n}=t;return zv.useProvide(e),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),Qg=le({name:"ASpaceCompact",inheritAttrs:!1,props:Fq(),setup(e,t){let{attrs:n,slots:o}=t;const{prefixCls:r,direction:i}=Te("space-compact",e),a=zv.useInject(),[l,s]=z8(r),u=E(()=>ge(r.value,s.value,{[`${r.value}-rtl`]:i.value==="rtl",[`${r.value}-block`]:e.block,[`${r.value}-vertical`]:e.direction==="vertical"}));return()=>{var c;const d=Ot(((c=o.default)===null||c===void 0?void 0:c.call(o))||[]);return d.length===0?null:l(g("div",k(k({},n),{},{class:[u.value,n.class]}),[d.map((f,p)=>{var v;const h=f&&f.key||`${r.value}-item-${p}`,m=!a||fA(a);return g(Bq,{key:h,compactSize:(v=e.size)!==null&&v!==void 0?v:"middle",compactDirection:e.direction,isFirstItem:p===0&&(m||(a==null?void 0:a.isFirstItem)),isLastItem:p===d.length-1&&(m||(a==null?void 0:a.isLastItem))},{default:()=>[f]})})]))}}}),Hq=e=>({animationDuration:e,animationFillMode:"both"}),zq=e=>({animationDuration:e,animationFillMode:"both"}),mf=function(e,t,n,o){const i=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[` +`;function BA(e){return e&&e.getRootNode&&e.getRootNode()}function HU(e){return bC()?BA(e)instanceof ShadowRoot:!1}function zU(e){return HU(e)?BA(e):null}var jU=function(){var t=RA(),n=t.prefixCls,o=t.csp,r=Jt(),i=BU;n&&(i=i.replace(/anticon/g,n.value)),ot(function(){if(bC()){var a=r.vnode.el,l=zU(a);LU(i,"@ant-design-vue-icons",{prepend:!0,csp:o.value,attachTo:l})}})},WU=["icon","primaryColor","secondaryColor"];function VU(e,t){if(e==null)return{};var n=KU(e,t),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function KU(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,i;for(i=0;i=0)&&(n[r]=e[r]);return n}function Wp(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=new Array(t);ne.length)&&(t=e.length);for(var n=0,o=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function cG(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,i;for(i=0;i=0)&&(n[r]=e[r]);return n}HA(KH.primary);var et=function(t,n){var o,r=QP({},t,n.attrs),i=r.class,a=r.icon,l=r.spin,s=r.rotate,u=r.tabindex,c=r.twoToneColor,d=r.onClick,f=sG(r,nG),p=RA(),v=p.prefixCls,h=p.rootClassName,m=(o={},Du(o,h.value,!!h.value),Du(o,v.value,!0),Du(o,"".concat(v.value,"-").concat(a.name),!!a.name),Du(o,"".concat(v.value,"-spin"),!!l||a.name==="loading"),o),b=u;b===void 0&&d&&(b=-1);var S=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,C=FA(c),$=oG(C,2),x=$[0],P=$[1];return g("span",QP({role:"img","aria-label":a.name},f,{onClick:d,class:[m,i],tabindex:b}),[g(Ga,{icon:a,primaryColor:x,secondaryColor:P,style:S},null),g(tG,null,null)])};et.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:[String,Array]};et.displayName="AntdIcon";et.inheritAttrs=!1;et.getTwoToneColor=eG;et.setTwoToneColor=HA;function eO(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};const{loading:n,multiple:o,prefixCls:r,hasFeedback:i,feedbackIcon:a,showArrow:l}=e,s=e.suffixIcon||t.suffixIcon&&t.suffixIcon(),u=e.clearIcon||t.clearIcon&&t.clearIcon(),c=e.menuItemSelectedIcon||t.menuItemSelectedIcon&&t.menuItemSelectedIcon(),d=e.removeIcon||t.removeIcon&&t.removeIcon(),f=u??g(po,null,null),p=b=>g(Le,null,[l!==!1&&b,i&&a]);let v=null;if(s!==void 0)v=p(s);else if(n)v=p(g(Po,{spin:!0},null));else{const b=`${r}-suffix`;v=S=>{let{open:C,showSearch:$}=S;return p(C&&$?g(qc,{class:b},null):g(cs,{class:b},null))}}let h=null;c!==void 0?h=c:o?h=g(Yc,null,null):h=null;let m=null;return d!==void 0?m=d:m=g(fo,null,null),{clearIcon:f,suffixIcon:v,itemIcon:h,removeIcon:m}}function CC(e){const t=Symbol("contextKey");return{useProvide:(r,i)=>{const a=rt({});return Xe(t,a),Ve(()=>{y(a,r,i||{})}),a},useInject:()=>ze(t,e)||{}}}const Gg=Symbol("ContextProps"),Xg=Symbol("InternalContextProps"),CG=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E(()=>!0);const n=ae(new Map),o=(i,a)=>{n.value.set(i,a),n.value=new Map(n.value)},r=i=>{n.value.delete(i),n.value=new Map(n.value)};be([t,n],()=>{}),Xe(Gg,e),Xe(Xg,{addFormItemField:o,removeFormItemField:r})},Fy={id:E(()=>{}),onFieldBlur:()=>{},onFieldChange:()=>{},clearValidate:()=>{}},By={addFormItemField:()=>{},removeFormItemField:()=>{}},bn=()=>{const e=ze(Xg,By),t=Symbol("FormItemFieldKey"),n=Jt();return e.addFormItemField(t,n.type),tt(()=>{e.removeFormItemField(t)}),Xe(Xg,By),Xe(Gg,Fy),ze(Gg,Fy)},Yg=le({compatConfig:{MODE:3},name:"AFormItemRest",setup(e,t){let{slots:n}=t;return Xe(Xg,By),Xe(Gg,Fy),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),kn=CC({}),qg=le({name:"NoFormStatus",setup(e,t){let{slots:n}=t;return kn.useProvide({}),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});function lo(e,t,n){return ge({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n})}const Yr=(e,t)=>t||e,xG=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},$G=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item`]:{"&:empty":{display:"none"}}}}},zA=Ue("Space",e=>[$G(e),xG(e)]);var wG="[object Symbol]";function kv(e){return typeof e=="symbol"||Ur(e)&&Ka(e)==wG}function xC(e,t){for(var n=-1,o=e==null?0:e.length,r=Array(o);++n0){if(++t>=BG)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function WG(e){return function(){return e}}var Jg=function(){try{var e=is(Object,"defineProperty");return e({},"",{}),e}catch{}}(),VG=Jg?function(e,t){return Jg(e,"toString",{configurable:!0,enumerable:!1,value:WG(t),writable:!0})}:$C,VA=jG(VG);function KG(e,t){for(var n=-1,o=e==null?0:e.length;++n-1}function wC(e,t,n){t=="__proto__"&&Jg?Jg(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var YG=Object.prototype,qG=YG.hasOwnProperty;function PC(e,t,n){var o=e[t];(!(qG.call(e,t)&&pf(o,n))||n===void 0&&!(t in e))&&wC(e,t,n)}function Jc(e,t,n,o){var r=!n;n||(n={});for(var i=-1,a=t.length;++i1?n[r-1]:void 0,a=r>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(r--,i):void 0,a&&JG(n[0],n[1],a)&&(i=r<3?void 0:i,r=1),t=Object(t);++or?0:r+t),n=n>r?r:n,n<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(r);++o=t||w<0||d&&O>=i}function b(){var P=I0();if(m(P))return S(P);l=setTimeout(b,h(P))}function S(P){return l=void 0,f&&o?p(P):(o=r=void 0,a)}function C(){l!==void 0&&clearTimeout(l),u=0,o=s=r=l=void 0}function $(){return l===void 0?a:S(I0())}function x(){var P=I0(),w=m(P);if(o=arguments,r=this,s=P,w){if(l===void 0)return v(s);if(d)return clearTimeout(l),l=setTimeout(b,t),p(s)}return l===void 0&&(l=setTimeout(b,t)),a}return x.cancel=C,x.flush=$,x}function zy(e,t,n){(n!==void 0&&!pf(e[t],n)||n===void 0&&!(t in e))&&wC(e,t,n)}function u8(e){return Ur(e)&&as(e)}function jy(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function rq(e){return Jc(e,vf(e))}function iq(e,t,n,o,r,i,a){var l=jy(e,n),s=jy(t,n),u=a.get(s);if(u){zy(e,n,u);return}var c=i?i(l,s,n+"",e,t,a):void 0,d=c===void 0;if(d){var f=wo(s),p=!f&&Pc(s),v=!f&&!p&&Ev(s);c=s,f||p||v?wo(l)?c=l:u8(l)?c=WA(l):p?(d=!1,c=ZA(s,!0)):v?(d=!1,c=t8(s,!0)):c=[]:Fv(s)||wc(s)?(c=l,wc(l)?c=rq(l):(!Lo(l)||nC(l))&&(c=n8(s))):d=!1}d&&(a.set(s,c),r(c,s,o,i,a),a.delete(s)),zy(e,n,c)}function d8(e,t,n,o,r){e!==t&&c8(t,function(i,a){if(r||(r=new Hr),Lo(i))iq(e,t,a,n,d8,o,r);else{var l=o?o(jy(e,a),i,a+"",e,t,r):void 0;l===void 0&&(l=i),zy(e,a,l)}},vf)}function aq(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function lq(e){return function(t,n,o){var r=Object(t);if(!as(t)){var i=_C(n);t=Gc(t),n=function(l){return i(r[l],l,r)}}var a=e(t,n,o);return a>-1?r[i?t[a]:a]:void 0}}var sq=Math.max;function cq(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var r=n==null?0:NG(n);return r<0&&(r=sq(o+r,0)),KA(e,_C(t),r)}var uq=lq(cq);function dq(e){for(var t=-1,n=e==null?0:e.length,o={};++t=120&&c.length>=120?new $c(a&&c):void 0}c=e[0];var d=-1,f=l[0];e:for(;++d1),i}),Jc(e,e8(e),n),o&&(n=td(n,Pq|Oq|Iq,wq));for(var r=t.length;r--;)$q(n,t[r]);return n});function Eq(e,t,n,o){if(!Lo(e))return e;t=Zc(t,e);for(var r=-1,i=t.length,a=i-1,l=e;l!=null&&++r=Nq){var u=Dq(e);if(u)return oC(u);a=!1,r=jg,s=new $c}else s=l;e:for(;++o({compactSize:String,compactDirection:K.oneOf(Jn("horizontal","vertical")).def("horizontal"),isFirstItem:$e(),isLastItem:$e()}),Hv=CC(null),Xa=(e,t)=>{const n=Hv.useInject(),o=E(()=>{if(!n||f8(n))return"";const{compactDirection:r,isFirstItem:i,isLastItem:a}=n,l=r==="vertical"?"-vertical-":"-";return ge({[`${e.value}-compact${l}item`]:!0,[`${e.value}-compact${l}first-item`]:i,[`${e.value}-compact${l}last-item`]:a,[`${e.value}-compact${l}item-rtl`]:t.value==="rtl"})});return{compactSize:E(()=>n==null?void 0:n.compactSize),compactDirection:E(()=>n==null?void 0:n.compactDirection),compactItemClassnames:o}},Bd=le({name:"NoCompactStyle",setup(e,t){let{slots:n}=t;return Hv.useProvide(null),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),Fq=()=>({prefixCls:String,size:{type:String},direction:K.oneOf(Jn("horizontal","vertical")).def("horizontal"),align:K.oneOf(Jn("start","end","center","baseline")),block:{type:Boolean,default:void 0}}),Bq=le({name:"CompactItem",props:Lq(),setup(e,t){let{slots:n}=t;return Hv.useProvide(e),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),Zg=le({name:"ASpaceCompact",inheritAttrs:!1,props:Fq(),setup(e,t){let{attrs:n,slots:o}=t;const{prefixCls:r,direction:i}=Te("space-compact",e),a=Hv.useInject(),[l,s]=zA(r),u=E(()=>ge(r.value,s.value,{[`${r.value}-rtl`]:i.value==="rtl",[`${r.value}-block`]:e.block,[`${r.value}-vertical`]:e.direction==="vertical"}));return()=>{var c;const d=Ot(((c=o.default)===null||c===void 0?void 0:c.call(o))||[]);return d.length===0?null:l(g("div",k(k({},n),{},{class:[u.value,n.class]}),[d.map((f,p)=>{var v;const h=f&&f.key||`${r.value}-item-${p}`,m=!a||f8(a);return g(Bq,{key:h,compactSize:(v=e.size)!==null&&v!==void 0?v:"middle",compactDirection:e.direction,isFirstItem:p===0&&(m||(a==null?void 0:a.isFirstItem)),isLastItem:p===d.length-1&&(m||(a==null?void 0:a.isLastItem))},{default:()=>[f]})})]))}}}),Hq=e=>({animationDuration:e,animationFillMode:"both"}),zq=e=>({animationDuration:e,animationFillMode:"both"}),mf=function(e,t,n,o){const i=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[` ${i}${e}-enter, ${i}${e}-appear `]:y(y({},Hq(o)),{animationPlayState:"paused"}),[`${i}${e}-leave`]:y(y({},zq(o)),{animationPlayState:"paused"}),[` @@ -152,7 +152,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `]:{opacity:0,animationTimingFunction:"linear"},[`${r}${o}-leave`]:{animationTimingFunction:"linear"}}]},Vq=new at("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Kq=new at("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),Uq=new at("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Gq=new at("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Xq=new at("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Yq=new at("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),qq=new at("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Jq=new at("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Zq={"move-up":{inKeyframes:qq,outKeyframes:Jq},"move-down":{inKeyframes:Vq,outKeyframes:Kq},"move-left":{inKeyframes:Uq,outKeyframes:Gq},"move-right":{inKeyframes:Xq,outKeyframes:Yq}},Ic=(e,t)=>{const{antCls:n}=e,o=`${n}-${t}`,{inKeyframes:r,outKeyframes:i}=Zq[t];return[mf(o,r,i,e.motionDurationMid),{[` ${o}-enter, ${o}-appear - `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${o}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},jv=new at("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Wv=new at("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Vv=new at("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Kv=new at("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),Qq=new at("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),eJ=new at("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),tJ=new at("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),nJ=new at("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),oJ={"slide-up":{inKeyframes:jv,outKeyframes:Wv},"slide-down":{inKeyframes:Vv,outKeyframes:Kv},"slide-left":{inKeyframes:Qq,outKeyframes:eJ},"slide-right":{inKeyframes:tJ,outKeyframes:nJ}},vi=(e,t)=>{const{antCls:n}=e,o=`${n}-${t}`,{inKeyframes:r,outKeyframes:i}=oJ[t];return[mf(o,r,i,e.motionDurationMid),{[` + `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${o}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},zv=new at("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),jv=new at("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Wv=new at("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Vv=new at("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),Qq=new at("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),eJ=new at("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),tJ=new at("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),nJ=new at("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),oJ={"slide-up":{inKeyframes:zv,outKeyframes:jv},"slide-down":{inKeyframes:Wv,outKeyframes:Vv},"slide-left":{inKeyframes:Qq,outKeyframes:eJ},"slide-right":{inKeyframes:tJ,outKeyframes:nJ}},vi=(e,t)=>{const{antCls:n}=e,o=`${n}-${t}`,{inKeyframes:r,outKeyframes:i}=oJ[t];return[mf(o,r,i,e.motionDurationMid),{[` ${o}-enter, ${o}-appear `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint},[`${o}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},RC=new at("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),rJ=new at("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),SO=new at("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),CO=new at("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),iJ=new at("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),aJ=new at("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),lJ=new at("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),sJ=new at("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),cJ=new at("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),uJ=new at("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),dJ=new at("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),fJ=new at("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),pJ={zoom:{inKeyframes:RC,outKeyframes:rJ},"zoom-big":{inKeyframes:SO,outKeyframes:CO},"zoom-big-fast":{inKeyframes:SO,outKeyframes:CO},"zoom-left":{inKeyframes:lJ,outKeyframes:sJ},"zoom-right":{inKeyframes:cJ,outKeyframes:uJ},"zoom-up":{inKeyframes:iJ,outKeyframes:aJ},"zoom-down":{inKeyframes:dJ,outKeyframes:fJ}},eu=(e,t)=>{const{antCls:n}=e,o=`${n}-${t}`,{inKeyframes:r,outKeyframes:i}=pJ[t];return[mf(o,r,i,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[` @@ -163,13 +163,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),xO=e=>{const{controlPaddingHorizontal:t}=e;return{position:"relative",display:"block",minHeight:e.controlHeight,padding:`${(e.controlHeight-e.fontSize*e.lineHeight)/2}px ${t}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,boxSizing:"border-box"}},gJ=e=>{const{antCls:t,componentCls:n}=e,o=`${n}-item`;return[{[`${n}-dropdown`]:y(y({},qe(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[` &${t}-slide-up-enter${t}-slide-up-enter-active${n}-dropdown-placement-bottomLeft, &${t}-slide-up-appear${t}-slide-up-appear-active${n}-dropdown-placement-bottomLeft - `]:{animationName:jv},[` + `]:{animationName:zv},[` &${t}-slide-up-enter${t}-slide-up-enter-active${n}-dropdown-placement-topLeft, &${t}-slide-up-appear${t}-slide-up-appear-active${n}-dropdown-placement-topLeft - `]:{animationName:Vv},[`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-bottomLeft`]:{animationName:Wv},[`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-topLeft`]:{animationName:Kv},"&-hidden":{display:"none"},"&-empty":{color:e.colorTextDisabled},[`${o}-empty`]:y(y({},xO(e)),{color:e.colorTextDisabled}),[`${o}`]:y(y({},xO(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":y({flex:"auto"},cn),"&-state":{flex:"none"},[`&-active:not(${o}-option-disabled)`]:{backgroundColor:e.controlItemBgHover},[`&-selected:not(${o}-option-disabled)`]:{color:e.colorText,fontWeight:e.fontWeightStrong,backgroundColor:e.controlItemBgActive,[`${o}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${o}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},vi(e,"slide-up"),vi(e,"slide-down"),Ic(e,"move-up"),Ic(e,"move-down")]},$s=2;function gA(e){let{controlHeightSM:t,controlHeight:n,lineWidth:o}=e;const r=(n-t)/2-o,i=Math.ceil(r/2);return[r,i]}function E0(e,t){const{componentCls:n,iconCls:o}=e,r=`${n}-selection-overflow`,i=e.controlHeightSM,[a]=gA(e),l=t?`${n}-${t}`:"";return{[`${n}-multiple${l}`]:{fontSize:e.fontSize,[r]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${n}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${a-$s}px ${$s*2}px`,borderRadius:e.borderRadius,[`${n}-show-search&`]:{cursor:"text"},[`${n}-disabled&`]:{background:e.colorBgContainerDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${$s}px 0`,lineHeight:`${i}px`,content:'"\\a0"'}},[` + `]:{animationName:Wv},[`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-bottomLeft`]:{animationName:jv},[`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-topLeft`]:{animationName:Vv},"&-hidden":{display:"none"},"&-empty":{color:e.colorTextDisabled},[`${o}-empty`]:y(y({},xO(e)),{color:e.colorTextDisabled}),[`${o}`]:y(y({},xO(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":y({flex:"auto"},cn),"&-state":{flex:"none"},[`&-active:not(${o}-option-disabled)`]:{backgroundColor:e.controlItemBgHover},[`&-selected:not(${o}-option-disabled)`]:{color:e.colorText,fontWeight:e.fontWeightStrong,backgroundColor:e.controlItemBgActive,[`${o}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${o}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},vi(e,"slide-up"),vi(e,"slide-down"),Ic(e,"move-up"),Ic(e,"move-down")]},$s=2;function g8(e){let{controlHeightSM:t,controlHeight:n,lineWidth:o}=e;const r=(n-t)/2-o,i=Math.ceil(r/2);return[r,i]}function E0(e,t){const{componentCls:n,iconCls:o}=e,r=`${n}-selection-overflow`,i=e.controlHeightSM,[a]=g8(e),l=t?`${n}-${t}`:"";return{[`${n}-multiple${l}`]:{fontSize:e.fontSize,[r]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${n}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${a-$s}px ${$s*2}px`,borderRadius:e.borderRadius,[`${n}-show-search&`]:{cursor:"text"},[`${n}-disabled&`]:{background:e.colorBgContainerDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${$s}px 0`,lineHeight:`${i}px`,content:'"\\a0"'}},[` &${n}-show-arrow ${n}-selector, &${n}-allow-clear ${n}-selector - `]:{paddingInlineEnd:e.fontSizeIcon+e.controlPaddingHorizontal},[`${n}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:i,marginTop:$s,marginBottom:$s,lineHeight:`${i-e.lineWidth*2}px`,background:e.colorFillSecondary,border:`${e.lineWidth}px solid ${e.colorSplit}`,borderRadius:e.borderRadiusSM,cursor:"default",transition:`font-size ${e.motionDurationSlow}, line-height ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,userSelect:"none",marginInlineEnd:$s*2,paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS/2,[`${n}-disabled&`]:{color:e.colorTextDisabled,borderColor:e.colorBorder,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":y(y({},ns()),{display:"inline-block",color:e.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${o}`]:{verticalAlign:"-0.2em"},"&:hover":{color:e.colorIconHover}})},[`${r}-item + ${r}-item`]:{[`${n}-selection-search`]:{marginInlineStart:0}},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.inputPaddingHorizontalBase-a,"\n &-input,\n &-mirror\n ":{height:i,fontFamily:e.fontFamily,lineHeight:`${i}px`,transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}}}}function hJ(e){const{componentCls:t}=e,n=Be(e,{controlHeight:e.controlHeightSM,controlHeightSM:e.controlHeightXS,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),[,o]=gA(e);return[E0(e),E0(n,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInlineStart:e.controlPaddingHorizontalSM-e.lineWidth,insetInlineEnd:"auto"},[`${t}-selection-search`]:{marginInlineStart:o}}},E0(Be(e,{fontSize:e.fontSizeLG,controlHeight:e.controlHeightLG,controlHeightSM:e.controlHeight,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius}),"lg")]}function _0(e,t){const{componentCls:n,inputPaddingHorizontalBase:o,borderRadius:r}=e,i=e.controlHeight-e.lineWidth*2,a=Math.ceil(e.fontSize*1.25),l=t?`${n}-${t}`:"";return{[`${n}-single${l}`]:{fontSize:e.fontSize,[`${n}-selector`]:y(y({},qe(e)),{display:"flex",borderRadius:r,[`${n}-selection-search`]:{position:"absolute",top:0,insetInlineStart:o,insetInlineEnd:o,bottom:0,"&-input":{width:"100%"}},[` + `]:{paddingInlineEnd:e.fontSizeIcon+e.controlPaddingHorizontal},[`${n}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:i,marginTop:$s,marginBottom:$s,lineHeight:`${i-e.lineWidth*2}px`,background:e.colorFillSecondary,border:`${e.lineWidth}px solid ${e.colorSplit}`,borderRadius:e.borderRadiusSM,cursor:"default",transition:`font-size ${e.motionDurationSlow}, line-height ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,userSelect:"none",marginInlineEnd:$s*2,paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS/2,[`${n}-disabled&`]:{color:e.colorTextDisabled,borderColor:e.colorBorder,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":y(y({},ns()),{display:"inline-block",color:e.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${o}`]:{verticalAlign:"-0.2em"},"&:hover":{color:e.colorIconHover}})},[`${r}-item + ${r}-item`]:{[`${n}-selection-search`]:{marginInlineStart:0}},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.inputPaddingHorizontalBase-a,"\n &-input,\n &-mirror\n ":{height:i,fontFamily:e.fontFamily,lineHeight:`${i}px`,transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}}}}function hJ(e){const{componentCls:t}=e,n=Be(e,{controlHeight:e.controlHeightSM,controlHeightSM:e.controlHeightXS,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),[,o]=g8(e);return[E0(e),E0(n,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInlineStart:e.controlPaddingHorizontalSM-e.lineWidth,insetInlineEnd:"auto"},[`${t}-selection-search`]:{marginInlineStart:o}}},E0(Be(e,{fontSize:e.fontSizeLG,controlHeight:e.controlHeightLG,controlHeightSM:e.controlHeight,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius}),"lg")]}function _0(e,t){const{componentCls:n,inputPaddingHorizontalBase:o,borderRadius:r}=e,i=e.controlHeight-e.lineWidth*2,a=Math.ceil(e.fontSize*1.25),l=t?`${n}-${t}`:"";return{[`${n}-single${l}`]:{fontSize:e.fontSize,[`${n}-selector`]:y(y({},qe(e)),{display:"flex",borderRadius:r,[`${n}-selection-search`]:{position:"absolute",top:0,insetInlineStart:o,insetInlineEnd:o,bottom:0,"&-input":{width:"100%"}},[` ${n}-selection-item, ${n}-selection-placeholder `]:{padding:0,lineHeight:`${i}px`,transition:`all ${e.motionDurationSlow}`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${i}px`}},[`${n}-selection-item`]:{position:"relative",userSelect:"none"},[`${n}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${n}-selection-item:after`,`${n}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[` @@ -178,9 +178,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `]:{paddingInlineEnd:a},[`&${n}-open ${n}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:e.controlHeight,padding:`0 ${o}px`,[`${n}-selection-search-input`]:{height:i},"&:after":{lineHeight:`${i}px`}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${o}px`,"&:after":{display:"none"}}}}}}}function vJ(e){const{componentCls:t}=e,n=e.controlPaddingHorizontalSM-e.lineWidth;return[_0(e),_0(Be(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selection-search`]:{insetInlineStart:n,insetInlineEnd:n},[`${t}-selector`]:{padding:`0 ${n}px`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:n+e.fontSize*1.5},[` &${t}-show-arrow ${t}-selection-item, &${t}-show-arrow ${t}-selection-placeholder - `]:{paddingInlineEnd:e.fontSize*1.5}}}},_0(Be(e,{controlHeight:e.controlHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}function mJ(e,t,n){const{focusElCls:o,focus:r,borderElCls:i}=n,a=i?"> *":"",l=["hover",r?"focus":null,"active"].filter(Boolean).map(s=>`&:${s} ${a}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:-e.lineWidth},"&-item":y(y({[l]:{zIndex:2}},o?{[`&${o}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function bJ(e,t,n){const{borderElCls:o}=n,r=o?`> ${o}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${r}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${r}, &${e}-sm ${r}, &${e}-lg ${r}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${r}, &${e}-sm ${r}, &${e}-lg ${r}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function tu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:n}=e,o=`${n}-compact`;return{[o]:y(y({},mJ(e,o,t)),bJ(n,o,t))}}const yJ=e=>{const{componentCls:t}=e;return{position:"relative",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${t}-disabled&`]:{color:e.colorTextDisabled,background:e.colorBgContainerDisabled,cursor:"not-allowed",[`${t}-multiple&`]:{background:e.colorBgContainerDisabled},input:{cursor:"not-allowed"}}}},M0=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:o,borderHoverColor:r,outlineColor:i,antCls:a}=t,l=n?{[`${o}-selector`]:{borderColor:r}}:{};return{[e]:{[`&:not(${o}-disabled):not(${o}-customize-input):not(${a}-pagination-size-changer)`]:y(y({},l),{[`${o}-focused& ${o}-selector`]:{borderColor:r,boxShadow:`0 0 0 ${t.controlOutlineWidth}px ${i}`,borderInlineEndWidth:`${t.controlLineWidth}px !important`,outline:0},[`&:hover ${o}-selector`]:{borderColor:r,borderInlineEndWidth:`${t.controlLineWidth}px !important`}})}}},SJ=e=>{const{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},CJ=e=>{const{componentCls:t,inputPaddingHorizontalBase:n,iconCls:o}=e;return{[t]:y(y({},qe(e)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${t}-customize-input) ${t}-selector`]:y(y({},yJ(e)),SJ(e)),[`${t}-selection-item`]:y({flex:1,fontWeight:"normal"},cn),[`${t}-selection-placeholder`]:y(y({},cn),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${t}-arrow`]:y(y({},ns()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,height:e.fontSizeIcon,marginTop:-e.fontSizeIcon/2,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[o]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${t}-suffix)`]:{pointerEvents:"auto"}},[`${t}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${t}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:-e.fontSizeIcon/2,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:e.colorBgContainer,cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorTextTertiary}},"&:hover":{[`${t}-clear`]:{opacity:1}}}),[`${t}-has-feedback`]:{[`${t}-clear`]:{insetInlineEnd:n+e.fontSize+e.paddingXXS}}}},xJ=e=>{const{componentCls:t}=e;return[{[t]:{[`&-borderless ${t}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${t}-in-form-item`]:{width:"100%"}}},CJ(e),vJ(e),hJ(e),gJ(e),{[`${t}-rtl`]:{direction:"rtl"}},M0(t,Be(e,{borderHoverColor:e.colorPrimaryHover,outlineColor:e.controlOutline})),M0(`${t}-status-error`,Be(e,{borderHoverColor:e.colorErrorHover,outlineColor:e.colorErrorOutline}),!0),M0(`${t}-status-warning`,Be(e,{borderHoverColor:e.colorWarningHover,outlineColor:e.colorWarningOutline}),!0),tu(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},DC=Ue("Select",(e,t)=>{let{rootPrefixCls:n}=t;const o=Be(e,{rootPrefixCls:n,inputPaddingHorizontalBase:e.paddingSM-1});return[xJ(o)]},e=>({zIndexPopup:e.zIndexPopupBase+50})),Uv=()=>y(y({},it(A8(),["inputIcon","mode","getInputElement","getRawInputElement","backfill"])),{value:He([Array,Object,String,Number]),defaultValue:He([Array,Object,String,Number]),notFoundContent:K.any,suffixIcon:K.any,itemIcon:K.any,size:Ne(),mode:Ne(),bordered:$e(!0),transitionName:String,choiceTransitionName:Ne(""),popupClassName:String,dropdownClassName:String,placement:Ne(),status:Ne(),"onUpdate:value":ye()}),$O="SECRET_COMBOBOX_MODE_DO_NOT_USE",Fn=le({compatConfig:{MODE:3},name:"ASelect",Option:vC,OptGroup:mC,inheritAttrs:!1,props:Qe(Uv(),{listHeight:256,listItemHeight:24}),SECRET_COMBOBOX_MODE_DO_NOT_USE:$O,slots:Object,setup(e,t){let{attrs:n,emit:o,slots:r,expose:i}=t;const a=ae(),l=bn(),s=kn.useInject(),u=E(()=>Yr(s.status,e.status)),c=()=>{var j;(j=a.value)===null||j===void 0||j.focus()},d=()=>{var j;(j=a.value)===null||j===void 0||j.blur()},f=j=>{var z;(z=a.value)===null||z===void 0||z.scrollTo(j)},p=E(()=>{const{mode:j}=e;if(j!=="combobox")return j===$O?"combobox":j}),{prefixCls:v,direction:h,renderEmpty:m,size:b,getPrefixCls:S,getPopupContainer:C,disabled:$,select:x}=Te("select",e),{compactSize:P,compactItemClassnames:w}=Xa(v,h),O=E(()=>P.value||b.value),I=ko(),_=E(()=>{var j;return(j=$.value)!==null&&j!==void 0?j:I.value}),[T,A]=DC(v),R=E(()=>S()),H=E(()=>e.placement!==void 0?e.placement:h.value==="rtl"?"bottomRight":"bottomLeft"),M=E(()=>co(R.value,cC(H.value),e.transitionName)),D=E(()=>ge({[`${v.value}-lg`]:O.value==="large",[`${v.value}-sm`]:O.value==="small",[`${v.value}-rtl`]:h.value==="rtl",[`${v.value}-borderless`]:!e.bordered,[`${v.value}-in-form-item`]:s.isFormItemInput},lo(v.value,u.value,s.hasFeedback),w.value,A.value)),N=function(){for(var j=arguments.length,z=new Array(j),G=0;G{o("blur",j),l.onFieldBlur()};i({blur:d,focus:c,scrollTo:f});const F=E(()=>p.value==="multiple"||p.value==="tags"),B=E(()=>e.showArrow!==void 0?e.showArrow:e.loading||!(F.value||p.value==="combobox"));return()=>{var j,z,G,Q;const{notFoundContent:Y,listHeight:oe=256,listItemHeight:Z=24,popupClassName:re,dropdownClassName:ne,virtual:X,dropdownMatchSelectWidth:te,id:W=l.id.value,placeholder:U=(j=r.placeholder)===null||j===void 0?void 0:j.call(r),showArrow:J}=e,{hasFeedback:de,feedbackIcon:fe}=s;let pe;Y!==void 0?pe=Y:r.notFoundContent?pe=r.notFoundContent():p.value==="combobox"?pe=null:pe=(m==null?void 0:m("Select"))||g(VS,{componentName:"Select"},null);const{suffixIcon:ve,itemIcon:he,removeIcon:V,clearIcon:q}=SC(y(y({},e),{multiple:F.value,prefixCls:v.value,hasFeedback:de,feedbackIcon:fe,showArrow:B.value}),r),ie=it(e,["prefixCls","suffixIcon","itemIcon","removeIcon","clearIcon","size","bordered","status"]),me=ge(re||ne,{[`${v.value}-dropdown-${h.value}`]:h.value==="rtl"},A.value);return T(g(EU,k(k(k({ref:a,virtual:X,dropdownMatchSelectWidth:te},ie),n),{},{showSearch:(z=e.showSearch)!==null&&z!==void 0?z:(G=x==null?void 0:x.value)===null||G===void 0?void 0:G.showSearch,placeholder:U,listHeight:oe,listItemHeight:Z,mode:p.value,prefixCls:v.value,direction:h.value,inputIcon:ve,menuItemSelectedIcon:he,removeIcon:V,clearIcon:q,notFoundContent:pe,class:[D.value,n.class],getPopupContainer:C==null?void 0:C.value,dropdownClassName:me,onChange:N,onBlur:L,id:W,dropdownRender:ie.dropdownRender||r.dropdownRender,transitionName:M.value,children:(Q=r.default)===null||Q===void 0?void 0:Q.call(r),tagRender:e.tagRender||r.tagRender,optionLabelRender:r.optionLabel,maxTagPlaceholder:e.maxTagPlaceholder||r.maxTagPlaceholder,showArrow:de||J,disabled:_.value}),{option:r.option}))}}});Fn.install=function(e){return e.component(Fn.name,Fn),e.component(Fn.Option.displayName,Fn.Option),e.component(Fn.OptGroup.displayName,Fn.OptGroup),e};const $J=Fn.Option,wJ=Fn.OptGroup,Ra=()=>null;Ra.isSelectOption=!0;Ra.displayName="AAutoCompleteOption";const oc=()=>null;oc.isSelectOptGroup=!0;oc.displayName="AAutoCompleteOptGroup";function PJ(e){var t,n;return((t=e==null?void 0:e.type)===null||t===void 0?void 0:t.isSelectOption)||((n=e==null?void 0:e.type)===null||n===void 0?void 0:n.isSelectOptGroup)}const OJ=()=>y(y({},it(Uv(),["loading","mode","optionLabelProp","labelInValue"])),{dataSource:Array,dropdownMenuStyle:{type:Object,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},prefixCls:String,showSearch:{type:Boolean,default:void 0},transitionName:String,choiceTransitionName:{type:String,default:"zoom"},autofocus:{type:Boolean,default:void 0},backfill:{type:Boolean,default:void 0},filterOption:{type:[Boolean,Function],default:!1},defaultActiveFirstOption:{type:Boolean,default:!0},status:String}),IJ=Ra,TJ=oc,A0=le({compatConfig:{MODE:3},name:"AAutoComplete",inheritAttrs:!1,props:OJ(),slots:Object,setup(e,t){let{slots:n,attrs:o,expose:r}=t;Yo(!e.dropdownClassName);const i=ae(),a=()=>{var c;const d=Ot((c=n.default)===null||c===void 0?void 0:c.call(n));return d.length?d[0]:void 0};r({focus:()=>{var c;(c=i.value)===null||c===void 0||c.focus()},blur:()=>{var c;(c=i.value)===null||c===void 0||c.blur()}});const{prefixCls:u}=Te("select",e);return()=>{var c,d,f;const{size:p,dataSource:v,notFoundContent:h=(c=n.notFoundContent)===null||c===void 0?void 0:c.call(n)}=e;let m;const{class:b}=o,S={[b]:!!b,[`${u.value}-lg`]:p==="large",[`${u.value}-sm`]:p==="small",[`${u.value}-show-search`]:!0,[`${u.value}-auto-complete`]:!0};if(e.options===void 0){const $=((d=n.dataSource)===null||d===void 0?void 0:d.call(n))||((f=n.options)===null||f===void 0?void 0:f.call(n))||[];$.length&&PJ($[0])?m=$:m=v?v.map(x=>{if(sn(x))return x;switch(typeof x){case"string":return g(Ra,{key:x,value:x},{default:()=>[x]});case"object":return g(Ra,{key:x.value,value:x.value},{default:()=>[x.text]});default:throw new Error("AutoComplete[dataSource] only supports type `string[] | Object[]`.")}}):[]}const C=it(y(y(y({},e),o),{mode:Fn.SECRET_COMBOBOX_MODE_DO_NOT_USE,getInputElement:a,notFoundContent:h,class:S,popupClassName:e.popupClassName||e.dropdownClassName,ref:i}),["dataSource","loading"]);return g(Fn,C,k({default:()=>[m]},it(n,["default","dataSource","options"])))}}}),EJ=y(A0,{Option:Ra,OptGroup:oc,install(e){return e.component(A0.name,A0),e.component(Ra.displayName,Ra),e.component(oc.displayName,oc),e}});var _J={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};function wO(e){for(var t=1;t({backgroundColor:e,border:`${o.lineWidth}px ${o.lineType} ${t}`,[`${r}-icon`]:{color:n}}),VJ=e=>{const{componentCls:t,motionDurationSlow:n,marginXS:o,marginSM:r,fontSize:i,fontSizeLG:a,lineHeight:l,borderRadiusLG:s,motionEaseInOutCirc:u,alertIconSizeLG:c,colorText:d,paddingContentVerticalSM:f,alertPaddingHorizontal:p,paddingMD:v,paddingContentHorizontalLG:h}=e;return{[t]:y(y({},qe(e)),{position:"relative",display:"flex",alignItems:"center",padding:`${f}px ${p}px`,wordWrap:"break-word",borderRadius:s,[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:o,lineHeight:0},"&-description":{display:"none",fontSize:i,lineHeight:l},"&-message":{color:d},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${u}, opacity ${n} ${u}, + `]:{paddingInlineEnd:e.fontSize*1.5}}}},_0(Be(e,{controlHeight:e.controlHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}function mJ(e,t,n){const{focusElCls:o,focus:r,borderElCls:i}=n,a=i?"> *":"",l=["hover",r?"focus":null,"active"].filter(Boolean).map(s=>`&:${s} ${a}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:-e.lineWidth},"&-item":y(y({[l]:{zIndex:2}},o?{[`&${o}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function bJ(e,t,n){const{borderElCls:o}=n,r=o?`> ${o}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${r}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${r}, &${e}-sm ${r}, &${e}-lg ${r}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${r}, &${e}-sm ${r}, &${e}-lg ${r}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function tu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:n}=e,o=`${n}-compact`;return{[o]:y(y({},mJ(e,o,t)),bJ(n,o,t))}}const yJ=e=>{const{componentCls:t}=e;return{position:"relative",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${t}-disabled&`]:{color:e.colorTextDisabled,background:e.colorBgContainerDisabled,cursor:"not-allowed",[`${t}-multiple&`]:{background:e.colorBgContainerDisabled},input:{cursor:"not-allowed"}}}},M0=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:o,borderHoverColor:r,outlineColor:i,antCls:a}=t,l=n?{[`${o}-selector`]:{borderColor:r}}:{};return{[e]:{[`&:not(${o}-disabled):not(${o}-customize-input):not(${a}-pagination-size-changer)`]:y(y({},l),{[`${o}-focused& ${o}-selector`]:{borderColor:r,boxShadow:`0 0 0 ${t.controlOutlineWidth}px ${i}`,borderInlineEndWidth:`${t.controlLineWidth}px !important`,outline:0},[`&:hover ${o}-selector`]:{borderColor:r,borderInlineEndWidth:`${t.controlLineWidth}px !important`}})}}},SJ=e=>{const{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},CJ=e=>{const{componentCls:t,inputPaddingHorizontalBase:n,iconCls:o}=e;return{[t]:y(y({},qe(e)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${t}-customize-input) ${t}-selector`]:y(y({},yJ(e)),SJ(e)),[`${t}-selection-item`]:y({flex:1,fontWeight:"normal"},cn),[`${t}-selection-placeholder`]:y(y({},cn),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${t}-arrow`]:y(y({},ns()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,height:e.fontSizeIcon,marginTop:-e.fontSizeIcon/2,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[o]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${t}-suffix)`]:{pointerEvents:"auto"}},[`${t}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${t}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:-e.fontSizeIcon/2,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:e.colorBgContainer,cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorTextTertiary}},"&:hover":{[`${t}-clear`]:{opacity:1}}}),[`${t}-has-feedback`]:{[`${t}-clear`]:{insetInlineEnd:n+e.fontSize+e.paddingXXS}}}},xJ=e=>{const{componentCls:t}=e;return[{[t]:{[`&-borderless ${t}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${t}-in-form-item`]:{width:"100%"}}},CJ(e),vJ(e),hJ(e),gJ(e),{[`${t}-rtl`]:{direction:"rtl"}},M0(t,Be(e,{borderHoverColor:e.colorPrimaryHover,outlineColor:e.controlOutline})),M0(`${t}-status-error`,Be(e,{borderHoverColor:e.colorErrorHover,outlineColor:e.colorErrorOutline}),!0),M0(`${t}-status-warning`,Be(e,{borderHoverColor:e.colorWarningHover,outlineColor:e.colorWarningOutline}),!0),tu(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},DC=Ue("Select",(e,t)=>{let{rootPrefixCls:n}=t;const o=Be(e,{rootPrefixCls:n,inputPaddingHorizontalBase:e.paddingSM-1});return[xJ(o)]},e=>({zIndexPopup:e.zIndexPopupBase+50})),Kv=()=>y(y({},it(AA(),["inputIcon","mode","getInputElement","getRawInputElement","backfill"])),{value:He([Array,Object,String,Number]),defaultValue:He([Array,Object,String,Number]),notFoundContent:K.any,suffixIcon:K.any,itemIcon:K.any,size:Ne(),mode:Ne(),bordered:$e(!0),transitionName:String,choiceTransitionName:Ne(""),popupClassName:String,dropdownClassName:String,placement:Ne(),status:Ne(),"onUpdate:value":ye()}),$O="SECRET_COMBOBOX_MODE_DO_NOT_USE",Fn=le({compatConfig:{MODE:3},name:"ASelect",Option:vC,OptGroup:mC,inheritAttrs:!1,props:Qe(Kv(),{listHeight:256,listItemHeight:24}),SECRET_COMBOBOX_MODE_DO_NOT_USE:$O,slots:Object,setup(e,t){let{attrs:n,emit:o,slots:r,expose:i}=t;const a=ae(),l=bn(),s=kn.useInject(),u=E(()=>Yr(s.status,e.status)),c=()=>{var j;(j=a.value)===null||j===void 0||j.focus()},d=()=>{var j;(j=a.value)===null||j===void 0||j.blur()},f=j=>{var z;(z=a.value)===null||z===void 0||z.scrollTo(j)},p=E(()=>{const{mode:j}=e;if(j!=="combobox")return j===$O?"combobox":j}),{prefixCls:v,direction:h,renderEmpty:m,size:b,getPrefixCls:S,getPopupContainer:C,disabled:$,select:x}=Te("select",e),{compactSize:P,compactItemClassnames:w}=Xa(v,h),O=E(()=>P.value||b.value),I=ko(),_=E(()=>{var j;return(j=$.value)!==null&&j!==void 0?j:I.value}),[T,A]=DC(v),R=E(()=>S()),H=E(()=>e.placement!==void 0?e.placement:h.value==="rtl"?"bottomRight":"bottomLeft"),M=E(()=>co(R.value,cC(H.value),e.transitionName)),D=E(()=>ge({[`${v.value}-lg`]:O.value==="large",[`${v.value}-sm`]:O.value==="small",[`${v.value}-rtl`]:h.value==="rtl",[`${v.value}-borderless`]:!e.bordered,[`${v.value}-in-form-item`]:s.isFormItemInput},lo(v.value,u.value,s.hasFeedback),w.value,A.value)),N=function(){for(var j=arguments.length,z=new Array(j),G=0;G{o("blur",j),l.onFieldBlur()};i({blur:d,focus:c,scrollTo:f});const F=E(()=>p.value==="multiple"||p.value==="tags"),B=E(()=>e.showArrow!==void 0?e.showArrow:e.loading||!(F.value||p.value==="combobox"));return()=>{var j,z,G,Q;const{notFoundContent:Y,listHeight:oe=256,listItemHeight:Z=24,popupClassName:re,dropdownClassName:ne,virtual:X,dropdownMatchSelectWidth:te,id:W=l.id.value,placeholder:U=(j=r.placeholder)===null||j===void 0?void 0:j.call(r),showArrow:J}=e,{hasFeedback:de,feedbackIcon:fe}=s;let pe;Y!==void 0?pe=Y:r.notFoundContent?pe=r.notFoundContent():p.value==="combobox"?pe=null:pe=(m==null?void 0:m("Select"))||g(VS,{componentName:"Select"},null);const{suffixIcon:ve,itemIcon:he,removeIcon:V,clearIcon:q}=SC(y(y({},e),{multiple:F.value,prefixCls:v.value,hasFeedback:de,feedbackIcon:fe,showArrow:B.value}),r),ie=it(e,["prefixCls","suffixIcon","itemIcon","removeIcon","clearIcon","size","bordered","status"]),me=ge(re||ne,{[`${v.value}-dropdown-${h.value}`]:h.value==="rtl"},A.value);return T(g(EU,k(k(k({ref:a,virtual:X,dropdownMatchSelectWidth:te},ie),n),{},{showSearch:(z=e.showSearch)!==null&&z!==void 0?z:(G=x==null?void 0:x.value)===null||G===void 0?void 0:G.showSearch,placeholder:U,listHeight:oe,listItemHeight:Z,mode:p.value,prefixCls:v.value,direction:h.value,inputIcon:ve,menuItemSelectedIcon:he,removeIcon:V,clearIcon:q,notFoundContent:pe,class:[D.value,n.class],getPopupContainer:C==null?void 0:C.value,dropdownClassName:me,onChange:N,onBlur:L,id:W,dropdownRender:ie.dropdownRender||r.dropdownRender,transitionName:M.value,children:(Q=r.default)===null||Q===void 0?void 0:Q.call(r),tagRender:e.tagRender||r.tagRender,optionLabelRender:r.optionLabel,maxTagPlaceholder:e.maxTagPlaceholder||r.maxTagPlaceholder,showArrow:de||J,disabled:_.value}),{option:r.option}))}}});Fn.install=function(e){return e.component(Fn.name,Fn),e.component(Fn.Option.displayName,Fn.Option),e.component(Fn.OptGroup.displayName,Fn.OptGroup),e};const $J=Fn.Option,wJ=Fn.OptGroup,Ra=()=>null;Ra.isSelectOption=!0;Ra.displayName="AAutoCompleteOption";const oc=()=>null;oc.isSelectOptGroup=!0;oc.displayName="AAutoCompleteOptGroup";function PJ(e){var t,n;return((t=e==null?void 0:e.type)===null||t===void 0?void 0:t.isSelectOption)||((n=e==null?void 0:e.type)===null||n===void 0?void 0:n.isSelectOptGroup)}const OJ=()=>y(y({},it(Kv(),["loading","mode","optionLabelProp","labelInValue"])),{dataSource:Array,dropdownMenuStyle:{type:Object,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},prefixCls:String,showSearch:{type:Boolean,default:void 0},transitionName:String,choiceTransitionName:{type:String,default:"zoom"},autofocus:{type:Boolean,default:void 0},backfill:{type:Boolean,default:void 0},filterOption:{type:[Boolean,Function],default:!1},defaultActiveFirstOption:{type:Boolean,default:!0},status:String}),IJ=Ra,TJ=oc,A0=le({compatConfig:{MODE:3},name:"AAutoComplete",inheritAttrs:!1,props:OJ(),slots:Object,setup(e,t){let{slots:n,attrs:o,expose:r}=t;Yo(!e.dropdownClassName);const i=ae(),a=()=>{var c;const d=Ot((c=n.default)===null||c===void 0?void 0:c.call(n));return d.length?d[0]:void 0};r({focus:()=>{var c;(c=i.value)===null||c===void 0||c.focus()},blur:()=>{var c;(c=i.value)===null||c===void 0||c.blur()}});const{prefixCls:u}=Te("select",e);return()=>{var c,d,f;const{size:p,dataSource:v,notFoundContent:h=(c=n.notFoundContent)===null||c===void 0?void 0:c.call(n)}=e;let m;const{class:b}=o,S={[b]:!!b,[`${u.value}-lg`]:p==="large",[`${u.value}-sm`]:p==="small",[`${u.value}-show-search`]:!0,[`${u.value}-auto-complete`]:!0};if(e.options===void 0){const $=((d=n.dataSource)===null||d===void 0?void 0:d.call(n))||((f=n.options)===null||f===void 0?void 0:f.call(n))||[];$.length&&PJ($[0])?m=$:m=v?v.map(x=>{if(sn(x))return x;switch(typeof x){case"string":return g(Ra,{key:x,value:x},{default:()=>[x]});case"object":return g(Ra,{key:x.value,value:x.value},{default:()=>[x.text]});default:throw new Error("AutoComplete[dataSource] only supports type `string[] | Object[]`.")}}):[]}const C=it(y(y(y({},e),o),{mode:Fn.SECRET_COMBOBOX_MODE_DO_NOT_USE,getInputElement:a,notFoundContent:h,class:S,popupClassName:e.popupClassName||e.dropdownClassName,ref:i}),["dataSource","loading"]);return g(Fn,C,k({default:()=>[m]},it(n,["default","dataSource","options"])))}}}),EJ=y(A0,{Option:Ra,OptGroup:oc,install(e){return e.component(A0.name,A0),e.component(Ra.displayName,Ra),e.component(oc.displayName,oc),e}});var _J={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};function wO(e){for(var t=1;t({backgroundColor:e,border:`${o.lineWidth}px ${o.lineType} ${t}`,[`${r}-icon`]:{color:n}}),VJ=e=>{const{componentCls:t,motionDurationSlow:n,marginXS:o,marginSM:r,fontSize:i,fontSizeLG:a,lineHeight:l,borderRadiusLG:s,motionEaseInOutCirc:u,alertIconSizeLG:c,colorText:d,paddingContentVerticalSM:f,alertPaddingHorizontal:p,paddingMD:v,paddingContentHorizontalLG:h}=e;return{[t]:y(y({},qe(e)),{position:"relative",display:"flex",alignItems:"center",padding:`${f}px ${p}px`,wordWrap:"break-word",borderRadius:s,[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:o,lineHeight:0},"&-description":{display:"none",fontSize:i,lineHeight:l},"&-message":{color:d},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${u}, opacity ${n} ${u}, padding-top ${n} ${u}, padding-bottom ${n} ${u}, - margin-bottom ${n} ${u}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:"flex-start",paddingInline:h,paddingBlock:v,[`${t}-icon`]:{marginInlineEnd:r,fontSize:c,lineHeight:0},[`${t}-message`]:{display:"block",marginBottom:o,color:d,fontSize:a},[`${t}-description`]:{display:"block"}},[`${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},KJ=e=>{const{componentCls:t,colorSuccess:n,colorSuccessBorder:o,colorSuccessBg:r,colorWarning:i,colorWarningBorder:a,colorWarningBg:l,colorError:s,colorErrorBorder:u,colorErrorBg:c,colorInfo:d,colorInfoBorder:f,colorInfoBg:p}=e;return{[t]:{"&-success":rp(r,o,n,e,t),"&-info":rp(p,f,d,e,t),"&-warning":rp(l,a,i,e,t),"&-error":y(y({},rp(c,u,s,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}},UJ=e=>{const{componentCls:t,iconCls:n,motionDurationMid:o,marginXS:r,fontSizeIcon:i,colorIcon:a,colorIconHover:l}=e;return{[t]:{"&-action":{marginInlineStart:r},[`${t}-close-icon`]:{marginInlineStart:r,padding:0,overflow:"hidden",fontSize:i,lineHeight:`${i}px`,backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:a,transition:`color ${o}`,"&:hover":{color:l}}},"&-close-text":{color:a,transition:`color ${o}`,"&:hover":{color:l}}}}},GJ=e=>[VJ(e),KJ(e),UJ(e)],XJ=Ue("Alert",e=>{const{fontSizeHeading3:t}=e,n=Be(e,{alertIconSizeLG:t,alertPaddingHorizontal:12});return[GJ(n)]}),YJ={success:qr,info:Ya,error:po,warning:Jr},qJ={success:Gv,info:Yv,error:qv,warning:Xv},JJ=Jn("success","info","warning","error"),ZJ=()=>({type:K.oneOf(JJ),closable:{type:Boolean,default:void 0},closeText:K.any,message:K.any,description:K.any,afterClose:Function,showIcon:{type:Boolean,default:void 0},prefixCls:String,banner:{type:Boolean,default:void 0},icon:K.any,closeIcon:K.any,onClose:Function}),QJ=le({compatConfig:{MODE:3},name:"AAlert",inheritAttrs:!1,props:ZJ(),setup(e,t){let{slots:n,emit:o,attrs:r,expose:i}=t;const{prefixCls:a,direction:l}=Te("alert",e),[s,u]=XJ(a),c=se(!1),d=se(!1),f=se(),p=b=>{b.preventDefault();const S=f.value;S.style.height=`${S.offsetHeight}px`,S.style.height=`${S.offsetHeight}px`,c.value=!0,o("close",b)},v=()=>{var b;c.value=!1,d.value=!0,(b=e.afterClose)===null||b===void 0||b.call(e)},h=E(()=>{const{type:b}=e;return b!==void 0?b:e.banner?"warning":"info"});i({animationEnd:v});const m=se({});return()=>{var b,S,C,$,x,P,w,O,I,_;const{banner:T,closeIcon:A=(b=n.closeIcon)===null||b===void 0?void 0:b.call(n)}=e;let{closable:R,showIcon:H}=e;const M=(S=e.closeText)!==null&&S!==void 0?S:(C=n.closeText)===null||C===void 0?void 0:C.call(n),D=($=e.description)!==null&&$!==void 0?$:(x=n.description)===null||x===void 0?void 0:x.call(n),N=(P=e.message)!==null&&P!==void 0?P:(w=n.message)===null||w===void 0?void 0:w.call(n),L=(O=e.icon)!==null&&O!==void 0?O:(I=n.icon)===null||I===void 0?void 0:I.call(n),F=(_=n.action)===null||_===void 0?void 0:_.call(n);H=T&&H===void 0?!0:H;const B=(D?qJ:YJ)[h.value]||null;M&&(R=!0);const j=a.value,z=ge(j,{[`${j}-${h.value}`]:!0,[`${j}-closing`]:c.value,[`${j}-with-description`]:!!D,[`${j}-no-icon`]:!H,[`${j}-banner`]:!!T,[`${j}-closable`]:R,[`${j}-rtl`]:l.value==="rtl",[u.value]:!0}),G=R?g("button",{type:"button",onClick:p,class:`${j}-close-icon`,tabindex:0},[M?g("span",{class:`${j}-close-text`},[M]):A===void 0?g(fo,null,null):A]):null,Q=L&&(sn(L)?mt(L,{class:`${j}-icon`}):g("span",{class:`${j}-icon`},[L]))||g(B,{class:`${j}-icon`},null),Y=Cr(`${j}-motion`,{appear:!1,css:!0,onAfterLeave:v,onBeforeLeave:oe=>{oe.style.maxHeight=`${oe.offsetHeight}px`},onLeave:oe=>{oe.style.maxHeight="0px"}});return s(d.value?null:g(Nn,Y,{default:()=>[Pn(g("div",k(k({role:"alert"},r),{},{style:[r.style,m.value],class:[r.class,z],"data-show":!c.value,ref:f}),[H?Q:null,g("div",{class:`${j}-content`},[N?g("div",{class:`${j}-message`},[N]):null,D?g("div",{class:`${j}-description`},[D]):null]),F?g("div",{class:`${j}-action`},[F]):null,G]),[[Vn,!c.value]])]}))}}}),eZ=Lt(QJ),Bi=["xxxl","xxl","xl","lg","md","sm","xs"],tZ=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`{min-width: ${e.screenXXXL}px}`});function NC(){const[,e]=na();return E(()=>{const t=tZ(e.value),n=new Map;let o=-1,r={};return{matchHandlers:{},dispatch(i){return r=i,n.forEach(a=>a(r)),n.size>=1},subscribe(i){return n.size||this.register(),o+=1,n.set(o,i),i(r),o},unsubscribe(i){n.delete(i),n.size||this.unregister()},unregister(){Object.keys(t).forEach(i=>{const a=t[i],l=this.matchHandlers[a];l==null||l.mql.removeListener(l==null?void 0:l.listener)}),n.clear()},register(){Object.keys(t).forEach(i=>{const a=t[i],l=u=>{let{matches:c}=u;this.dispatch(y(y({},r),{[i]:c}))},s=window.matchMedia(a);s.addListener(l),this.matchHandlers[a]={mql:s,listener:l},l(s)})},responsiveMap:t}})}function nu(){const e=se({});let t=null;const n=NC();return Ke(()=>{t=n.value.subscribe(o=>{e.value=o})}),Zn(()=>{n.value.unsubscribe(t)}),e}function Vo(e){const t=se();return Ve(()=>{t.value=e()},{flush:"sync"}),t}const nZ=e=>{const{antCls:t,componentCls:n,iconCls:o,avatarBg:r,avatarColor:i,containerSize:a,containerSizeLG:l,containerSizeSM:s,textFontSize:u,textFontSizeLG:c,textFontSizeSM:d,borderRadius:f,borderRadiusLG:p,borderRadiusSM:v,lineWidth:h,lineType:m}=e,b=(S,C,$)=>({width:S,height:S,lineHeight:`${S-h*2}px`,borderRadius:"50%",[`&${n}-square`]:{borderRadius:$},[`${n}-string`]:{position:"absolute",left:{_skip_check_:!0,value:"50%"},transformOrigin:"0 center"},[`&${n}-icon`]:{fontSize:C,[`> ${o}`]:{margin:0}}});return{[n]:y(y(y(y({},qe(e)),{position:"relative",display:"inline-block",overflow:"hidden",color:i,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:r,border:`${h}px ${m} transparent`,"&-image":{background:"transparent"},[`${t}-image-img`]:{display:"block"}}),b(a,u,f)),{"&-lg":y({},b(l,c,p)),"&-sm":y({},b(s,d,v)),"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}},oZ=e=>{const{componentCls:t,groupBorderColor:n,groupOverlapping:o,groupSpace:r}=e;return{[`${t}-group`]:{display:"inline-flex",[`${t}`]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:o}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:r}}}},hA=Ue("Avatar",e=>{const{colorTextLightSolid:t,colorTextPlaceholder:n}=e,o=Be(e,{avatarBg:n,avatarColor:t});return[nZ(o),oZ(o)]},e=>{const{controlHeight:t,controlHeightLG:n,controlHeightSM:o,fontSize:r,fontSizeLG:i,fontSizeXL:a,fontSizeHeading3:l,marginXS:s,marginXXS:u,colorBorderBg:c}=e;return{containerSize:t,containerSizeLG:n,containerSizeSM:o,textFontSize:Math.round((i+a)/2),textFontSizeLG:l,textFontSizeSM:r,groupSpace:u,groupOverlapping:-s,groupBorderColor:c}}),vA=Symbol("AvatarContextKey"),rZ=()=>ze(vA,{}),iZ=e=>Xe(vA,e),aZ=()=>({prefixCls:String,shape:{type:String,default:"circle"},size:{type:[Number,String,Object],default:()=>"default"},src:String,srcset:String,icon:K.any,alt:String,gap:Number,draggable:{type:Boolean,default:void 0},crossOrigin:String,loadError:{type:Function}}),Al=le({compatConfig:{MODE:3},name:"AAvatar",inheritAttrs:!1,props:aZ(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const r=se(!0),i=se(!1),a=se(1),l=se(null),s=se(null),{prefixCls:u}=Te("avatar",e),[c,d]=hA(u),f=rZ(),p=E(()=>e.size==="default"?f.size:e.size),v=nu(),h=Vo(()=>{if(typeof e.size!="object")return;const C=Bi.find(x=>v.value[x]);return e.size[C]}),m=C=>h.value?{width:`${h.value}px`,height:`${h.value}px`,lineHeight:`${h.value}px`,fontSize:`${C?h.value/2:18}px`}:{},b=()=>{if(!l.value||!s.value)return;const C=l.value.offsetWidth,$=s.value.offsetWidth;if(C!==0&&$!==0){const{gap:x=4}=e;x*2<$&&(a.value=$-x*2{const{loadError:C}=e;(C==null?void 0:C())!==!1&&(r.value=!1)};return be(()=>e.src,()=>{ot(()=>{r.value=!0,a.value=1})}),be(()=>e.gap,()=>{ot(()=>{b()})}),Ke(()=>{ot(()=>{b(),i.value=!0})}),()=>{var C,$;const{shape:x,src:P,alt:w,srcset:O,draggable:I,crossOrigin:_}=e,T=(C=f.shape)!==null&&C!==void 0?C:x,A=mn(n,e,"icon"),R=u.value,H={[`${o.class}`]:!!o.class,[R]:!0,[`${R}-lg`]:p.value==="large",[`${R}-sm`]:p.value==="small",[`${R}-${T}`]:!0,[`${R}-image`]:P&&r.value,[`${R}-icon`]:A,[d.value]:!0},M=typeof p.value=="number"?{width:`${p.value}px`,height:`${p.value}px`,lineHeight:`${p.value}px`,fontSize:A?`${p.value/2}px`:"18px"}:{},D=($=n.default)===null||$===void 0?void 0:$.call(n);let N;if(P&&r.value)N=g("img",{draggable:I,src:P,srcset:O,onError:S,alt:w,crossorigin:_},null);else if(A)N=A;else if(i.value||a.value!==1){const L=`scale(${a.value}) translateX(-50%)`,F={msTransform:L,WebkitTransform:L,transform:L},B=typeof p.value=="number"?{lineHeight:`${p.value}px`}:{};N=g(br,{onResize:b},{default:()=>[g("span",{class:`${R}-string`,ref:l,style:y(y({},B),F)},[D])]})}else N=g("span",{class:`${R}-string`,ref:l,style:{opacity:0}},[D]);return c(g("span",k(k({},o),{},{ref:s,class:H,style:[M,m(!!A),o.style]}),[N]))}}}),rr={adjustX:1,adjustY:1},ir=[0,0],mA={left:{points:["cr","cl"],overflow:rr,offset:[-4,0],targetOffset:ir},right:{points:["cl","cr"],overflow:rr,offset:[4,0],targetOffset:ir},top:{points:["bc","tc"],overflow:rr,offset:[0,-4],targetOffset:ir},bottom:{points:["tc","bc"],overflow:rr,offset:[0,4],targetOffset:ir},topLeft:{points:["bl","tl"],overflow:rr,offset:[0,-4],targetOffset:ir},leftTop:{points:["tr","tl"],overflow:rr,offset:[-4,0],targetOffset:ir},topRight:{points:["br","tr"],overflow:rr,offset:[0,-4],targetOffset:ir},rightTop:{points:["tl","tr"],overflow:rr,offset:[4,0],targetOffset:ir},bottomRight:{points:["tr","br"],overflow:rr,offset:[0,4],targetOffset:ir},rightBottom:{points:["bl","br"],overflow:rr,offset:[4,0],targetOffset:ir},bottomLeft:{points:["tl","bl"],overflow:rr,offset:[0,4],targetOffset:ir},leftBottom:{points:["br","bl"],overflow:rr,offset:[-4,0],targetOffset:ir}},lZ={prefixCls:String,id:String,overlayInnerStyle:K.any},sZ=le({compatConfig:{MODE:3},name:"TooltipContent",props:lZ,setup(e,t){let{slots:n}=t;return()=>{var o;return g("div",{class:`${e.prefixCls}-inner`,id:e.id,role:"tooltip",style:e.overlayInnerStyle},[(o=n.overlay)===null||o===void 0?void 0:o.call(n)])}}});var cZ=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{}),overlayStyle:{type:Object,default:void 0},overlayClassName:String,prefixCls:K.string.def("rc-tooltip"),mouseEnterDelay:K.number.def(.1),mouseLeaveDelay:K.number.def(.1),getPopupContainer:Function,destroyTooltipOnHide:{type:Boolean,default:!1},align:K.object.def(()=>({})),arrowContent:K.any.def(null),tipId:String,builtinPlacements:K.object,overlayInnerStyle:{type:Object,default:void 0},popupVisible:{type:Boolean,default:void 0},onVisibleChange:Function,onPopupAlign:Function,arrow:{type:Boolean,default:!0}},setup(e,t){let{slots:n,attrs:o,expose:r}=t;const i=se(),a=()=>{const{prefixCls:c,tipId:d,overlayInnerStyle:f}=e;return[e.arrow?g("div",{class:`${c}-arrow`,key:"arrow"},[mn(n,e,"arrowContent")]):null,g(sZ,{key:"content",prefixCls:c,id:d,overlayInnerStyle:f},{overlay:n.overlay})]};r({getPopupDomNode:()=>i.value.getPopupDomNode(),triggerDOM:i,forcePopupAlign:()=>{var c;return(c=i.value)===null||c===void 0?void 0:c.forcePopupAlign()}});const s=se(!1),u=se(!1);return Ve(()=>{const{destroyTooltipOnHide:c}=e;if(typeof c=="boolean")s.value=c;else if(c&&typeof c=="object"){const{keepParent:d}=c;s.value=d===!0,u.value=d===!1}}),()=>{const{overlayClassName:c,trigger:d,mouseEnterDelay:f,mouseLeaveDelay:p,overlayStyle:v,prefixCls:h,afterVisibleChange:m,transitionName:b,animation:S,placement:C,align:$,destroyTooltipOnHide:x,defaultVisible:P}=e,w=cZ(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible"]),O=y({},w);e.visible!==void 0&&(O.popupVisible=e.visible);const I=y(y(y({popupClassName:c,prefixCls:h,action:d,builtinPlacements:mA,popupPlacement:C,popupAlign:$,afterPopupVisibleChange:m,popupTransitionName:b,popupAnimation:S,defaultPopupVisible:P,destroyPopupOnHide:s.value,autoDestroy:u.value,mouseLeaveDelay:p,popupStyle:v,mouseEnterDelay:f},O),o),{onPopupVisibleChange:e.onVisibleChange||MO,onPopupAlign:e.onPopupAlign||MO,ref:i,arrow:!!e.arrow,popup:a()});return g(ss,I,{default:n.default})}}}),kC=()=>({trigger:[String,Array],open:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},placement:String,color:String,transitionName:String,overlayStyle:De(),overlayInnerStyle:De(),overlayClassName:String,openClassName:String,prefixCls:String,mouseEnterDelay:Number,mouseLeaveDelay:Number,getPopupContainer:Function,arrowPointAtCenter:{type:Boolean,default:void 0},arrow:{type:[Boolean,Object],default:!0},autoAdjustOverflow:{type:[Boolean,Object],default:void 0},destroyTooltipOnHide:{type:Boolean,default:void 0},align:De(),builtinPlacements:De(),children:Array,onVisibleChange:Function,"onUpdate:visible":Function,onOpenChange:Function,"onUpdate:open":Function}),dZ={adjustX:1,adjustY:1},AO={adjustX:0,adjustY:0},fZ=[0,0];function RO(e){return typeof e=="boolean"?e?dZ:AO:y(y({},AO),e)}function LC(e){const{arrowWidth:t=4,horizontalArrowShift:n=16,verticalArrowShift:o=8,autoAdjustOverflow:r,arrowPointAtCenter:i}=e,a={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(n+t),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(o+t)]},topRight:{points:["br","tc"],offset:[n+t,-4]},rightTop:{points:["tl","cr"],offset:[4,-(o+t)]},bottomRight:{points:["tr","bc"],offset:[n+t,4]},rightBottom:{points:["bl","cr"],offset:[4,o+t]},bottomLeft:{points:["tl","bc"],offset:[-(n+t),4]},leftBottom:{points:["br","cl"],offset:[-4,o+t]}};return Object.keys(a).forEach(l=>{a[l]=i?y(y({},a[l]),{overflow:RO(r),targetOffset:fZ}):y(y({},mA[l]),{overflow:RO(r)}),a[l].ignoreShake=!0}),a}function eh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];for(let t=0,n=e.length;t`${e}-inverse`),gZ=["success","processing","error","default","warning"];function Jv(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[...pZ,...Rd].includes(e):Rd.includes(e)}function hZ(e){return gZ.includes(e)}function vZ(e,t){const n=Jv(t),o=ge({[`${e}-${t}`]:t&&n}),r={},i={};return t&&!n&&(r.background=t,i["--antd-arrow-background-color"]=t),{className:o,overlayStyle:r,arrowStyle:i}}function ip(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return e.map(n=>`${t}${n}`).join(",")}const FC=8;function bA(e){const t=FC,{sizePopupArrow:n,contentRadius:o,borderRadiusOuter:r,limitVerticalRadius:i}=e,a=n/2-Math.ceil(r*(Math.sqrt(2)-1)),l=(o>12?o+2:12)-a,s=i?t-a:l;return{dropdownArrowOffset:l,dropdownArrowOffsetVertical:s}}function BC(e,t){const{componentCls:n,sizePopupArrow:o,marginXXS:r,borderRadiusXS:i,borderRadiusOuter:a,boxShadowPopoverArrow:l}=e,{colorBg:s,showArrowCls:u,contentRadius:c=e.borderRadiusLG,limitVerticalRadius:d}=t,{dropdownArrowOffsetVertical:f,dropdownArrowOffset:p}=bA({sizePopupArrow:o,contentRadius:c,borderRadiusOuter:a,limitVerticalRadius:d}),v=o/2+r;return{[n]:{[`${n}-arrow`]:[y(y({position:"absolute",zIndex:1,display:"block"},zS(o,i,a,s,l)),{"&:before":{background:s}})],[[`&-placement-top ${n}-arrow`,`&-placement-topLeft ${n}-arrow`,`&-placement-topRight ${n}-arrow`].join(",")]:{bottom:0,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${n}-arrow`]:{left:{_skip_check_:!0,value:p}},[`&-placement-topRight ${n}-arrow`]:{right:{_skip_check_:!0,value:p}},[[`&-placement-bottom ${n}-arrow`,`&-placement-bottomLeft ${n}-arrow`,`&-placement-bottomRight ${n}-arrow`].join(",")]:{top:0,transform:"translateY(-100%)"},[`&-placement-bottom ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${n}-arrow`]:{left:{_skip_check_:!0,value:p}},[`&-placement-bottomRight ${n}-arrow`]:{right:{_skip_check_:!0,value:p}},[[`&-placement-left ${n}-arrow`,`&-placement-leftTop ${n}-arrow`,`&-placement-leftBottom ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:0},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${n}-arrow`]:{top:f},[`&-placement-leftBottom ${n}-arrow`]:{bottom:f},[[`&-placement-right ${n}-arrow`,`&-placement-rightTop ${n}-arrow`,`&-placement-rightBottom ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:0},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${n}-arrow`]:{top:f},[`&-placement-rightBottom ${n}-arrow`]:{bottom:f},[ip(["&-placement-topLeft","&-placement-top","&-placement-topRight"].map(h=>h+=":not(&-arrow-hidden)"),u)]:{paddingBottom:v},[ip(["&-placement-bottomLeft","&-placement-bottom","&-placement-bottomRight"].map(h=>h+=":not(&-arrow-hidden)"),u)]:{paddingTop:v},[ip(["&-placement-leftTop","&-placement-left","&-placement-leftBottom"].map(h=>h+=":not(&-arrow-hidden)"),u)]:{paddingRight:{_skip_check_:!0,value:v}},[ip(["&-placement-rightTop","&-placement-right","&-placement-rightBottom"].map(h=>h+=":not(&-arrow-hidden)"),u)]:{paddingLeft:{_skip_check_:!0,value:v}}}}}const mZ=e=>{const{componentCls:t,tooltipMaxWidth:n,tooltipColor:o,tooltipBg:r,tooltipBorderRadius:i,zIndexPopup:a,controlHeight:l,boxShadowSecondary:s,paddingSM:u,paddingXS:c,tooltipRadiusOuter:d}=e;return[{[t]:y(y(y(y({},qe(e)),{position:"absolute",zIndex:a,display:"block","&":[{width:"max-content"},{width:"intrinsic"}],maxWidth:n,visibility:"visible","&-hidden":{display:"none"},"--antd-arrow-background-color":r,[`${t}-inner`]:{minWidth:l,minHeight:l,padding:`${u/2}px ${c}px`,color:o,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:r,borderRadius:i,boxShadow:s},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:Math.min(i,FC)}},[`${t}-content`]:{position:"relative"}}),Hg(e,(f,p)=>{let{darkColor:v}=p;return{[`&${t}-${f}`]:{[`${t}-inner`]:{backgroundColor:v},[`${t}-arrow`]:{"--antd-arrow-background-color":v}}}})),{"&-rtl":{direction:"rtl"}})},BC(Be(e,{borderRadiusOuter:d}),{colorBg:"var(--antd-arrow-background-color)",showArrowCls:"",contentRadius:i,limitVerticalRadius:!0}),{[`${t}-pure`]:{position:"relative",maxWidth:"none"}}]},bZ=(e,t)=>Ue("Tooltip",o=>{if((t==null?void 0:t.value)===!1)return[];const{borderRadius:r,colorTextLightSolid:i,colorBgDefault:a,borderRadiusOuter:l}=o,s=Be(o,{tooltipMaxWidth:250,tooltipColor:i,tooltipBorderRadius:r,tooltipBg:a,tooltipRadiusOuter:l>4?4:l});return[mZ(s),eu(o,"zoom-big-fast")]},o=>{let{zIndexPopupBase:r,colorBgSpotlight:i}=o;return{zIndexPopup:r+70,colorBgDefault:i}})(e),yZ=(e,t)=>{const n={},o=y({},e);return t.forEach(r=>{e&&r in e&&(n[r]=e[r],delete o[r])}),{picked:n,omitted:o}},yA=()=>y(y({},kC()),{title:K.any}),SA=()=>({trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),SZ=le({compatConfig:{MODE:3},name:"ATooltip",inheritAttrs:!1,props:Qe(yA(),{trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r,expose:i}=t;const{prefixCls:a,getPopupContainer:l,direction:s,rootPrefixCls:u}=Te("tooltip",e),c=E(()=>{var _;return(_=e.open)!==null&&_!==void 0?_:e.visible}),d=ae(eh([e.open,e.visible])),f=ae();let p;be(c,_=>{Ze.cancel(p),p=Ze(()=>{d.value=!!_})});const v=()=>{var _;const T=(_=e.title)!==null&&_!==void 0?_:n.title;return!T&&T!==0},h=_=>{const T=v();c.value===void 0&&(d.value=T?!1:_),T||(o("update:visible",_),o("visibleChange",_),o("update:open",_),o("openChange",_))};i({getPopupDomNode:()=>f.value.getPopupDomNode(),open:d,forcePopupAlign:()=>{var _;return(_=f.value)===null||_===void 0?void 0:_.forcePopupAlign()}});const b=E(()=>{var _;const{builtinPlacements:T,autoAdjustOverflow:A,arrow:R,arrowPointAtCenter:H}=e;let M=H;return typeof R=="object"&&(M=(_=R.pointAtCenter)!==null&&_!==void 0?_:H),T||LC({arrowPointAtCenter:M,autoAdjustOverflow:A})}),S=_=>_||_==="",C=_=>{const T=_.type;if(typeof T=="object"&&_.props&&((T.__ANT_BUTTON===!0||T==="button")&&S(_.props.disabled)||T.__ANT_SWITCH===!0&&(S(_.props.disabled)||S(_.props.loading))||T.__ANT_RADIO===!0&&S(_.props.disabled))){const{picked:A,omitted:R}=yZ(VM(_),["position","left","right","top","bottom","float","display","zIndex"]),H=y(y({display:"inline-block"},A),{cursor:"not-allowed",lineHeight:1,width:_.props&&_.props.block?"100%":void 0}),M=y(y({},R),{pointerEvents:"none"}),D=mt(_,{style:M},!0);return g("span",{style:H,class:`${a.value}-disabled-compatible-wrapper`},[D])}return _},$=()=>{var _,T;return(_=e.title)!==null&&_!==void 0?_:(T=n.title)===null||T===void 0?void 0:T.call(n)},x=(_,T)=>{const A=b.value,R=Object.keys(A).find(H=>{var M,D;return A[H].points[0]===((M=T.points)===null||M===void 0?void 0:M[0])&&A[H].points[1]===((D=T.points)===null||D===void 0?void 0:D[1])});if(R){const H=_.getBoundingClientRect(),M={top:"50%",left:"50%"};R.indexOf("top")>=0||R.indexOf("Bottom")>=0?M.top=`${H.height-T.offset[1]}px`:(R.indexOf("Top")>=0||R.indexOf("bottom")>=0)&&(M.top=`${-T.offset[1]}px`),R.indexOf("left")>=0||R.indexOf("Right")>=0?M.left=`${H.width-T.offset[0]}px`:(R.indexOf("right")>=0||R.indexOf("Left")>=0)&&(M.left=`${-T.offset[0]}px`),_.style.transformOrigin=`${M.left} ${M.top}`}},P=E(()=>vZ(a.value,e.color)),w=E(()=>r["data-popover-inject"]),[O,I]=bZ(a,E(()=>!w.value));return()=>{var _,T;const{openClassName:A,overlayClassName:R,overlayStyle:H,overlayInnerStyle:M}=e;let D=(T=zt((_=n.default)===null||_===void 0?void 0:_.call(n)))!==null&&T!==void 0?T:null;D=D.length===1?D[0]:D;let N=d.value;if(c.value===void 0&&v()&&(N=!1),!D)return null;const L=C(sn(D)&&!$B(D)?D:g("span",null,[D])),F=ge({[A||`${a.value}-open`]:!0,[L.props&&L.props.class]:L.props&&L.props.class}),B=ge(R,{[`${a.value}-rtl`]:s.value==="rtl"},P.value.className,I.value),j=y(y({},P.value.overlayStyle),M),z=P.value.arrowStyle,G=y(y(y({},r),e),{prefixCls:a.value,arrow:!!e.arrow,getPopupContainer:l==null?void 0:l.value,builtinPlacements:b.value,visible:N,ref:f,overlayClassName:B,overlayStyle:y(y({},z),H),overlayInnerStyle:j,onVisibleChange:h,onPopupAlign:x,transitionName:co(u.value,"zoom-big-fast",e.transitionName)});return O(g(uZ,G,{default:()=>[d.value?mt(L,{class:F}):L],arrowContent:()=>g("span",{class:`${a.value}-arrow-content`},null),overlay:$}))}}}),Ro=Lt(SZ),CZ=e=>{const{componentCls:t,popoverBg:n,popoverColor:o,width:r,fontWeightStrong:i,popoverPadding:a,boxShadowSecondary:l,colorTextHeading:s,borderRadiusLG:u,zIndexPopup:c,marginXS:d,colorBgElevated:f}=e;return[{[t]:y(y({},qe(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--antd-arrow-background-color":f,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:n,backgroundClip:"padding-box",borderRadius:u,boxShadow:l,padding:a},[`${t}-title`]:{minWidth:r,marginBottom:d,color:s,fontWeight:i},[`${t}-inner-content`]:{color:o}})},BC(e,{colorBg:"var(--antd-arrow-background-color)"}),{[`${t}-pure`]:{position:"relative",maxWidth:"none",[`${t}-content`]:{display:"inline-block"}}}]},xZ=e=>{const{componentCls:t}=e;return{[t]:Rd.map(n=>{const o=e[`${n}-6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":o,[`${t}-inner`]:{backgroundColor:o},[`${t}-arrow`]:{background:"transparent"}}}})}},$Z=e=>{const{componentCls:t,lineWidth:n,lineType:o,colorSplit:r,paddingSM:i,controlHeight:a,fontSize:l,lineHeight:s,padding:u}=e,c=a-Math.round(l*s),d=c/2,f=c/2-n,p=u;return{[t]:{[`${t}-inner`]:{padding:0},[`${t}-title`]:{margin:0,padding:`${d}px ${p}px ${f}px`,borderBottom:`${n}px ${o} ${r}`},[`${t}-inner-content`]:{padding:`${i}px ${p}px`}}}},wZ=Ue("Popover",e=>{const{colorBgElevated:t,colorText:n,wireframe:o}=e,r=Be(e,{popoverBg:t,popoverColor:n,popoverPadding:12});return[CZ(r),xZ(r),o&&$Z(r),eu(r,"zoom-big")]},e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+30,width:177}}),PZ=()=>y(y({},kC()),{content:It(),title:It()}),OZ=le({compatConfig:{MODE:3},name:"APopover",inheritAttrs:!1,props:Qe(PZ(),y(y({},SA()),{trigger:"hover",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1})),setup(e,t){let{expose:n,slots:o,attrs:r}=t;const i=ae();Yo(e.visible===void 0),n({getPopupDomNode:()=>{var f,p;return(p=(f=i.value)===null||f===void 0?void 0:f.getPopupDomNode)===null||p===void 0?void 0:p.call(f)}});const{prefixCls:a,configProvider:l}=Te("popover",e),[s,u]=wZ(a),c=E(()=>l.getPrefixCls()),d=()=>{var f,p;const{title:v=zt((f=o.title)===null||f===void 0?void 0:f.call(o)),content:h=zt((p=o.content)===null||p===void 0?void 0:p.call(o))}=e,m=!!(Array.isArray(v)?v.length:v),b=!!(Array.isArray(h)?h.length:v);return!m&&!b?null:g(Le,null,[m&&g("div",{class:`${a.value}-title`},[v]),g("div",{class:`${a.value}-inner-content`},[h])])};return()=>{const f=ge(e.overlayClassName,u.value);return s(g(Ro,k(k(k({},it(e,["title","content"])),r),{},{prefixCls:a.value,ref:i,overlayClassName:f,transitionName:co(c.value,"zoom-big",e.transitionName),"data-popover-inject":!0}),{title:d,default:o.default}))}}}),HC=Lt(OZ),IZ=()=>({prefixCls:String,maxCount:Number,maxStyle:{type:Object,default:void 0},maxPopoverPlacement:{type:String,default:"top"},maxPopoverTrigger:String,size:{type:[Number,String,Object],default:"default"},shape:{type:String,default:"circle"}}),th=le({compatConfig:{MODE:3},name:"AAvatarGroup",inheritAttrs:!1,props:IZ(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("avatar",e),a=E(()=>`${r.value}-group`),[l,s]=hA(r);return Ve(()=>{const u={size:e.size,shape:e.shape};iZ(u)}),()=>{const{maxPopoverPlacement:u="top",maxCount:c,maxStyle:d,maxPopoverTrigger:f="hover",shape:p}=e,v={[a.value]:!0,[`${a.value}-rtl`]:i.value==="rtl",[`${o.class}`]:!!o.class,[s.value]:!0},h=mn(n,e),m=Ot(h).map((S,C)=>mt(S,{key:`avatar-key-${C}`})),b=m.length;if(c&&c[g(Al,{style:d,shape:p},{default:()=>[`+${b-c}`]})]})),l(g("div",k(k({},o),{},{class:v,style:o.style}),[S]))}return l(g("div",k(k({},o),{},{class:v,style:o.style}),[m]))}}});Al.Group=th;Al.install=function(e){return e.component(Al.name,Al),e.component(th.name,th),e};function DO(e){let{prefixCls:t,value:n,current:o,offset:r=0}=e,i;return r&&(i={position:"absolute",top:`${r}00%`,left:0}),g("p",{style:i,class:ge(`${t}-only-unit`,{current:o})},[n])}function TZ(e,t,n){let o=e,r=0;for(;(o+10)%10!==t;)o+=n,r+=n;return r}const EZ=le({compatConfig:{MODE:3},name:"SingleNumber",props:{prefixCls:String,value:String,count:Number},setup(e){const t=E(()=>Number(e.value)),n=E(()=>Math.abs(e.count)),o=rt({prevValue:t.value,prevCount:n.value}),r=()=>{o.prevValue=t.value,o.prevCount=n.value},i=ae();return be(t,()=>{clearTimeout(i.value),i.value=setTimeout(()=>{r()},1e3)},{flush:"post"}),Zn(()=>{clearTimeout(i.value)}),()=>{let a,l={};const s=t.value;if(o.prevValue===s||Number.isNaN(s)||Number.isNaN(o.prevValue))a=[DO(y(y({},e),{current:!0}))],l={transition:"none"};else{a=[];const u=s+10,c=[];for(let p=s;p<=u;p+=1)c.push(p);const d=c.findIndex(p=>p%10===o.prevValue);a=c.map((p,v)=>{const h=p%10;return DO(y(y({},e),{value:h,offset:v-d,current:v===d}))});const f=o.prevCountr()},[a])}}});var _Z=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var i;const a=y(y({},e),n),{prefixCls:l,count:s,title:u,show:c,component:d="sup",class:f,style:p}=a,v=_Z(a,["prefixCls","count","title","show","component","class","style"]),h=y(y({},v),{style:p,"data-show":e.show,class:ge(r.value,f),title:u});let m=s;if(s&&Number(s)%1===0){const S=String(s).split("");m=S.map((C,$)=>g(EZ,{prefixCls:r.value,count:Number(s),value:C,key:S.length-$},null))}p&&p.borderColor&&(h.style=y(y({},p),{boxShadow:`0 0 0 1px ${p.borderColor} inset`}));const b=zt((i=o.default)===null||i===void 0?void 0:i.call(o));return b&&b.length?mt(b,{class:ge(`${r.value}-custom-component`)},!1):g(d,h,{default:()=>[m]})}}}),RZ=new at("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),DZ=new at("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),NZ=new at("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),kZ=new at("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),LZ=new at("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),FZ=new at("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),BZ=e=>{const{componentCls:t,iconCls:n,antCls:o,badgeFontHeight:r,badgeShadowSize:i,badgeHeightSm:a,motionDurationSlow:l,badgeStatusSize:s,marginXS:u,badgeRibbonOffset:c}=e,d=`${o}-scroll-number`,f=`${o}-ribbon`,p=`${o}-ribbon-wrapper`,v=Hg(e,(m,b)=>{let{darkColor:S}=b;return{[`&${t} ${t}-color-${m}`]:{background:S,[`&:not(${t}-count)`]:{color:S}}}}),h=Hg(e,(m,b)=>{let{darkColor:S}=b;return{[`&${f}-color-${m}`]:{background:S,color:S}}});return{[t]:y(y(y(y({},qe(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{zIndex:e.badgeZIndex,minWidth:e.badgeHeight,height:e.badgeHeight,color:e.badgeTextColor,fontWeight:e.badgeFontWeight,fontSize:e.badgeFontSize,lineHeight:`${e.badgeHeight}px`,whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:e.badgeHeight/2,boxShadow:`0 0 0 ${i}px ${e.badgeShadowColor}`,transition:`background ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:a,height:a,fontSize:e.badgeFontSizeSm,lineHeight:`${a}px`,borderRadius:a/2},[`${t}-multiple-words`]:{padding:`0 ${e.paddingXS}px`},[`${t}-dot`]:{zIndex:e.badgeZIndex,width:e.badgeDotSize,minWidth:e.badgeDotSize,height:e.badgeDotSize,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${i}px ${e.badgeShadowColor}`},[`${t}-dot${d}`]:{transition:`background ${l}`},[`${t}-count, ${t}-dot, ${d}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${n}-spin`]:{animationName:FZ,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorPrimary,backgroundColor:e.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:i,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:RZ,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:u,color:e.colorText,fontSize:e.fontSize}}}),v),{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:DZ,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:NZ,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:kZ,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:LZ,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${d}-custom-component, ${t}-count`]:{transform:"none"},[`${d}-custom-component, ${d}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[`${d}`]:{overflow:"hidden",[`${d}-only`]:{position:"relative",display:"inline-block",height:e.badgeHeight,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${d}-only-unit`]:{height:e.badgeHeight,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${d}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${d}-custom-component`]:{transform:"translate(-50%, -50%)"}}}),[`${p}`]:{position:"relative"},[`${f}`]:y(y(y(y({},qe(e)),{position:"absolute",top:u,padding:`0 ${e.paddingXS}px`,color:e.colorPrimary,lineHeight:`${r}px`,whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${f}-text`]:{color:e.colorTextLightSolid},[`${f}-corner`]:{position:"absolute",top:"100%",width:c,height:c,color:"currentcolor",border:`${c/2}px solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),h),{[`&${f}-placement-end`]:{insetInlineEnd:-c,borderEndEndRadius:0,[`${f}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${f}-placement-start`]:{insetInlineStart:-c,borderEndStartRadius:0,[`${f}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},CA=Ue("Badge",e=>{const{fontSize:t,lineHeight:n,fontSizeSM:o,lineWidth:r,marginXS:i,colorBorderBg:a}=e,l=Math.round(t*n),s=r,u="auto",c=l-2*s,d=e.colorBgContainer,f="normal",p=o,v=e.colorError,h=e.colorErrorHover,m=t,b=o/2,S=o,C=o/2,$=Be(e,{badgeFontHeight:l,badgeShadowSize:s,badgeZIndex:u,badgeHeight:c,badgeTextColor:d,badgeFontWeight:f,badgeFontSize:p,badgeColor:v,badgeColorHover:h,badgeShadowColor:a,badgeHeightSm:m,badgeDotSize:b,badgeFontSizeSm:S,badgeStatusSize:C,badgeProcessingDuration:"1.2s",badgeRibbonOffset:i,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"});return[BZ($)]});var HZ=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefix:String,color:{type:String},text:K.any,placement:{type:String,default:"end"}}),nh=le({compatConfig:{MODE:3},name:"ABadgeRibbon",inheritAttrs:!1,props:zZ(),slots:Object,setup(e,t){let{attrs:n,slots:o}=t;const{prefixCls:r,direction:i}=Te("ribbon",e),[a,l]=CA(r),s=E(()=>Jv(e.color,!1)),u=E(()=>[r.value,`${r.value}-placement-${e.placement}`,{[`${r.value}-rtl`]:i.value==="rtl",[`${r.value}-color-${e.color}`]:s.value}]);return()=>{var c,d;const{class:f,style:p}=n,v=HZ(n,["class","style"]),h={},m={};return e.color&&!s.value&&(h.background=e.color,m.color=e.color),a(g("div",k({class:`${r.value}-wrapper ${l.value}`},v),[(c=o.default)===null||c===void 0?void 0:c.call(o),g("div",{class:[u.value,f,l.value],style:y(y({},h),p)},[g("span",{class:`${r.value}-text`},[e.text||((d=o.text)===null||d===void 0?void 0:d.call(o))]),g("div",{class:`${r.value}-corner`,style:m},null)])]))}}}),oh=e=>!isNaN(parseFloat(e))&&isFinite(e),jZ=()=>({count:K.any.def(null),showZero:{type:Boolean,default:void 0},overflowCount:{type:Number,default:99},dot:{type:Boolean,default:void 0},prefixCls:String,scrollNumberPrefixCls:String,status:{type:String},size:{type:String,default:"default"},color:String,text:K.any,offset:Array,numberStyle:{type:Object,default:void 0},title:String}),nd=le({compatConfig:{MODE:3},name:"ABadge",Ribbon:nh,inheritAttrs:!1,props:jZ(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("badge",e),[a,l]=CA(r),s=E(()=>e.count>e.overflowCount?`${e.overflowCount}+`:e.count),u=E(()=>s.value==="0"||s.value===0),c=E(()=>e.count===null||u.value&&!e.showZero),d=E(()=>(e.status!==null&&e.status!==void 0||e.color!==null&&e.color!==void 0)&&c.value),f=E(()=>e.dot&&!u.value),p=E(()=>f.value?"":s.value),v=E(()=>(p.value===null||p.value===void 0||p.value===""||u.value&&!e.showZero)&&!f.value),h=ae(e.count),m=ae(p.value),b=ae(f.value);be([()=>e.count,p,f],()=>{v.value||(h.value=e.count,m.value=p.value,b.value=f.value)},{immediate:!0});const S=E(()=>Jv(e.color,!1)),C=E(()=>({[`${r.value}-status-dot`]:d.value,[`${r.value}-status-${e.status}`]:!!e.status,[`${r.value}-color-${e.color}`]:S.value})),$=E(()=>e.color&&!S.value?{background:e.color,color:e.color}:{}),x=E(()=>({[`${r.value}-dot`]:b.value,[`${r.value}-count`]:!b.value,[`${r.value}-count-sm`]:e.size==="small",[`${r.value}-multiple-words`]:!b.value&&m.value&&m.value.toString().length>1,[`${r.value}-status-${e.status}`]:!!e.status,[`${r.value}-color-${e.color}`]:S.value}));return()=>{var P,w;const{offset:O,title:I,color:_}=e,T=o.style,A=mn(n,e,"text"),R=r.value,H=h.value;let M=Ot((P=n.default)===null||P===void 0?void 0:P.call(n));M=M.length?M:null;const D=!!(!v.value||n.count),N=(()=>{if(!O)return y({},T);const Q={marginTop:oh(O[1])?`${O[1]}px`:O[1]};return i.value==="rtl"?Q.left=`${parseInt(O[0],10)}px`:Q.right=`${-parseInt(O[0],10)}px`,y(y({},Q),T)})(),L=I??(typeof H=="string"||typeof H=="number"?H:void 0),F=D||!A?null:g("span",{class:`${R}-status-text`},[A]),B=typeof H=="object"||H===void 0&&n.count?mt(H??((w=n.count)===null||w===void 0?void 0:w.call(n)),{style:N},!1):null,j=ge(R,{[`${R}-status`]:d.value,[`${R}-not-a-wrapper`]:!M,[`${R}-rtl`]:i.value==="rtl"},o.class,l.value);if(!M&&d.value){const Q=N.color;return a(g("span",k(k({},o),{},{class:j,style:N}),[g("span",{class:C.value,style:$.value},null),g("span",{style:{color:Q},class:`${R}-status-text`},[A])]))}const z=Cr(M?`${R}-zoom`:"",{appear:!1});let G=y(y({},N),e.numberStyle);return _&&!S.value&&(G=G||{},G.background=_),a(g("span",k(k({},o),{},{class:j}),[M,g(Nn,z,{default:()=>[Pn(g(AZ,{prefixCls:e.scrollNumberPrefixCls,show:D,class:x.value,count:m.value,title:L,style:G,key:"scrollNumber"},{default:()=>[B]}),[[Vn,D]])]}),F]))}}});nd.install=function(e){return e.component(nd.name,nd),e.component(nh.name,nh),e};const ws={adjustX:1,adjustY:1},Ps=[0,0],WZ={topLeft:{points:["bl","tl"],overflow:ws,offset:[0,-4],targetOffset:Ps},topCenter:{points:["bc","tc"],overflow:ws,offset:[0,-4],targetOffset:Ps},topRight:{points:["br","tr"],overflow:ws,offset:[0,-4],targetOffset:Ps},bottomLeft:{points:["tl","bl"],overflow:ws,offset:[0,4],targetOffset:Ps},bottomCenter:{points:["tc","bc"],overflow:ws,offset:[0,4],targetOffset:Ps},bottomRight:{points:["tr","br"],overflow:ws,offset:[0,4],targetOffset:Ps}};var VZ=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.visible,p=>{p!==void 0&&(i.value=p)});const a=ae();r({triggerRef:a});const l=p=>{e.visible===void 0&&(i.value=!1),o("overlayClick",p)},s=p=>{e.visible===void 0&&(i.value=p),o("visibleChange",p)},u=()=>{var p;const v=(p=n.overlay)===null||p===void 0?void 0:p.call(n),h={prefixCls:`${e.prefixCls}-menu`,onClick:l};return g(Le,{key:zM},[e.arrow&&g("div",{class:`${e.prefixCls}-arrow`},null),mt(v,h,!1)])},c=E(()=>{const{minOverlayWidthMatchTrigger:p=!e.alignPoint}=e;return p}),d=()=>{var p;const v=(p=n.default)===null||p===void 0?void 0:p.call(n);return i.value&&v?mt(v[0],{class:e.openClassName||`${e.prefixCls}-open`},!1):v},f=E(()=>!e.hideAction&&e.trigger.indexOf("contextmenu")!==-1?["click"]:e.hideAction);return()=>{const{prefixCls:p,arrow:v,showAction:h,overlayStyle:m,trigger:b,placement:S,align:C,getPopupContainer:$,transitionName:x,animation:P,overlayClassName:w}=e,O=VZ(e,["prefixCls","arrow","showAction","overlayStyle","trigger","placement","align","getPopupContainer","transitionName","animation","overlayClassName"]);return g(ss,k(k({},O),{},{prefixCls:p,ref:a,popupClassName:ge(w,{[`${p}-show-arrow`]:v}),popupStyle:m,builtinPlacements:WZ,action:b,showAction:h,hideAction:f.value||[],popupPlacement:S,popupAlign:C,popupTransitionName:x,popupAnimation:P,popupVisible:i.value,stretch:c.value?"minWidth":"",onPopupVisibleChange:s,getPopupContainer:$}),{popup:u,default:d})}}}),KZ=e=>{const{componentCls:t,colorPrimary:n}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0}}}}},UZ=Ue("Wave",e=>[KZ(e)]);function GZ(e){const t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return t&&t[1]&&t[2]&&t[3]?!(t[1]===t[2]&&t[2]===t[3]):!0}function R0(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&GZ(e)&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"}function XZ(e){const{borderTopColor:t,borderColor:n,backgroundColor:o}=getComputedStyle(e);return R0(t)?t:R0(n)?n:R0(o)?o:null}function D0(e){return Number.isNaN(e)?0:e}const YZ=le({props:{target:De(),className:String},setup(e){const t=se(null),[n,o]=$t(null),[r,i]=$t([]),[a,l]=$t(0),[s,u]=$t(0),[c,d]=$t(0),[f,p]=$t(0),[v,h]=$t(!1);function m(){const{target:w}=e,O=getComputedStyle(w);o(XZ(w));const I=O.position==="static",{borderLeftWidth:_,borderTopWidth:T}=O;l(I?w.offsetLeft:D0(-parseFloat(_))),u(I?w.offsetTop:D0(-parseFloat(T))),d(w.offsetWidth),p(w.offsetHeight);const{borderTopLeftRadius:A,borderTopRightRadius:R,borderBottomLeftRadius:H,borderBottomRightRadius:M}=O;i([A,R,M,H].map(D=>D0(parseFloat(D))))}let b,S,C;const $=()=>{clearTimeout(C),Ze.cancel(S),b==null||b.disconnect()},x=()=>{var w;const O=(w=t.value)===null||w===void 0?void 0:w.parentElement;O&&(Fa(null,O),O.parentElement&&O.parentElement.removeChild(O))};Ke(()=>{$(),C=setTimeout(()=>{x()},5e3);const{target:w}=e;w&&(S=Ze(()=>{m(),h(!0)}),typeof ResizeObserver<"u"&&(b=new ResizeObserver(m),b.observe(w)))}),tt(()=>{$()});const P=w=>{w.propertyName==="opacity"&&x()};return()=>{if(!v.value)return null;const w={left:`${a.value}px`,top:`${s.value}px`,width:`${c.value}px`,height:`${f.value}px`,borderRadius:r.value.map(O=>`${O}px`).join(" ")};return n&&(w["--wave-color"]=n.value),g(Nn,{appear:!0,name:"wave-motion",appearFromClass:"wave-motion-appear",appearActiveClass:"wave-motion-appear",appearToClass:"wave-motion-appear wave-motion-appear-active"},{default:()=>[g("div",{ref:t,class:e.className,style:w,onTransitionend:P},null)]})}}});function qZ(e,t){const n=document.createElement("div");return n.style.position="absolute",n.style.left="0px",n.style.top="0px",e==null||e.insertBefore(n,e==null?void 0:e.firstChild),Fa(g(YZ,{target:e,className:t},null),n),()=>{Fa(null,n),n.parentElement&&n.parentElement.removeChild(n)}}function JZ(e,t){const n=Jt();let o;function r(){var i;const a=Co(n);o==null||o(),!(!((i=t==null?void 0:t.value)===null||i===void 0)&&i.disabled||!a)&&(o=qZ(a,e.value))}return tt(()=>{o==null||o()}),r}const zC=le({compatConfig:{MODE:3},name:"Wave",props:{disabled:Boolean},setup(e,t){let{slots:n}=t;const o=Jt(),{prefixCls:r,wave:i}=Te("wave",e),[,a]=UZ(r),l=JZ(E(()=>ge(r.value,a.value)),i);let s;const u=()=>{Co(o).removeEventListener("click",s,!0)};return Ke(()=>{be(()=>e.disabled,()=>{u(),ot(()=>{const c=Co(o);c==null||c.removeEventListener("click",s,!0),!(!c||c.nodeType!==1||e.disabled)&&(s=d=>{d.target.tagName==="INPUT"||!Ov(d.target)||!c.getAttribute||c.getAttribute("disabled")||c.disabled||c.className.includes("disabled")||c.className.includes("-leave")||l()},c.addEventListener("click",s,!0))})},{immediate:!0,flush:"post"})}),tt(()=>{u()}),()=>{var c;return(c=n.default)===null||c===void 0?void 0:c.call(n)[0]}}});function rh(e){return e==="danger"?{danger:!0}:{type:e}}const $A=()=>({prefixCls:String,type:String,htmlType:{type:String,default:"button"},shape:{type:String},size:{type:String},loading:{type:[Boolean,Object],default:()=>!1},disabled:{type:Boolean,default:void 0},ghost:{type:Boolean,default:void 0},block:{type:Boolean,default:void 0},danger:{type:Boolean,default:void 0},icon:K.any,href:String,target:String,title:String,onClick:zl(),onMousedown:zl()}),NO=e=>{e&&(e.style.width="0px",e.style.opacity="0",e.style.transform="scale(0)")},kO=e=>{ot(()=>{e&&(e.style.width=`${e.scrollWidth}px`,e.style.opacity="1",e.style.transform="scale(1)")})},LO=e=>{e&&e.style&&(e.style.width=null,e.style.opacity=null,e.style.transform=null)},ZZ=le({compatConfig:{MODE:3},name:"LoadingIcon",props:{prefixCls:String,loading:[Boolean,Object],existIcon:Boolean},setup(e){return()=>{const{existIcon:t,prefixCls:n,loading:o}=e;if(t)return g("span",{class:`${n}-loading-icon`},[g(Po,null,null)]);const r=!!o;return g(Nn,{name:`${n}-loading-icon-motion`,onBeforeEnter:NO,onEnter:kO,onAfterEnter:LO,onBeforeLeave:kO,onLeave:i=>{setTimeout(()=>{NO(i)})},onAfterLeave:LO},{default:()=>[r?g("span",{class:`${n}-loading-icon`},[g(Po,null,null)]):null]})}}}),FO=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),QZ=e=>{const{componentCls:t,fontSize:n,lineWidth:o,colorPrimaryHover:r,colorErrorHover:i}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:-o,[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},FO(`${t}-primary`,r),FO(`${t}-danger`,i)]}};function eQ(e,t){return{[`&-item:not(${t}-last-item)`]:{marginBottom:-e.lineWidth},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function tQ(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function nQ(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:y(y({},eQ(e,t)),tQ(e.componentCls,t))}}const oQ=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{outline:"none",position:"relative",display:"inline-block",fontWeight:400,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",lineHeight:e.lineHeight,color:e.colorText,"> span":{display:"inline-block"},[`> ${n} + span, > span + ${n}`]:{marginInlineStart:e.marginXS},"> a":{color:"currentColor"},"&:not(:disabled)":y({},Ji(e)),[`&-icon-only${t}-compact-item`]:{flex:"none"},[`&-compact-item${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-e.lineWidth,insetInlineStart:-e.lineWidth,display:"inline-block",width:e.lineWidth,height:`calc(100% + ${e.lineWidth*2}px)`,backgroundColor:e.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-vertical-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-e.lineWidth,insetInlineStart:-e.lineWidth,display:"inline-block",width:`calc(100% + ${e.lineWidth*2}px)`,height:e.lineWidth,backgroundColor:e.colorPrimaryHover,content:'""'}}}}}}},Zi=(e,t)=>({"&:not(:disabled)":{"&:hover":e,"&:active":t}}),rQ=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),iQ=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.controlHeight/2,paddingInlineEnd:e.controlHeight/2}),Wy=e=>({cursor:"not-allowed",borderColor:e.colorBorder,color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,boxShadow:"none"}),ih=(e,t,n,o,r,i,a)=>({[`&${e}-background-ghost`]:y(y({color:t||void 0,backgroundColor:"transparent",borderColor:n||void 0,boxShadow:"none"},Zi(y({backgroundColor:"transparent"},i),y({backgroundColor:"transparent"},a))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:r||void 0}})}),jC=e=>({"&:disabled":y({},Wy(e))}),wA=e=>y({},jC(e)),ah=e=>({"&:disabled":{cursor:"not-allowed",color:e.colorTextDisabled}}),PA=e=>y(y(y(y(y({},wA(e)),{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`}),Zi({color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),ih(e.componentCls,e.colorBgContainer,e.colorBgContainer,e.colorTextDisabled,e.colorBorder)),{[`&${e.componentCls}-dangerous`]:y(y(y({color:e.colorError,borderColor:e.colorError},Zi({color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),ih(e.componentCls,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder)),jC(e))}),aQ=e=>y(y(y(y(y({},wA(e)),{color:e.colorTextLightSolid,backgroundColor:e.colorPrimary,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`}),Zi({color:e.colorTextLightSolid,backgroundColor:e.colorPrimaryHover},{color:e.colorTextLightSolid,backgroundColor:e.colorPrimaryActive})),ih(e.componentCls,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),{[`&${e.componentCls}-dangerous`]:y(y(y({backgroundColor:e.colorError,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`},Zi({backgroundColor:e.colorErrorHover},{backgroundColor:e.colorErrorActive})),ih(e.componentCls,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),jC(e))}),lQ=e=>y(y({},PA(e)),{borderStyle:"dashed"}),sQ=e=>y(y(y({color:e.colorLink},Zi({color:e.colorLinkHover},{color:e.colorLinkActive})),ah(e)),{[`&${e.componentCls}-dangerous`]:y(y({color:e.colorError},Zi({color:e.colorErrorHover},{color:e.colorErrorActive})),ah(e))}),cQ=e=>y(y(y({},Zi({color:e.colorText,backgroundColor:e.colorBgTextHover},{color:e.colorText,backgroundColor:e.colorBgTextActive})),ah(e)),{[`&${e.componentCls}-dangerous`]:y(y({color:e.colorError},ah(e)),Zi({color:e.colorErrorHover,backgroundColor:e.colorErrorBg},{color:e.colorErrorHover,backgroundColor:e.colorErrorBg}))}),uQ=e=>y(y({},Wy(e)),{[`&${e.componentCls}:hover`]:y({},Wy(e))}),dQ=e=>{const{componentCls:t}=e;return{[`${t}-default`]:PA(e),[`${t}-primary`]:aQ(e),[`${t}-dashed`]:lQ(e),[`${t}-link`]:sQ(e),[`${t}-text`]:cQ(e),[`${t}-disabled`]:uQ(e)}},WC=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:n,iconCls:o,controlHeight:r,fontSize:i,lineHeight:a,lineWidth:l,borderRadius:s,buttonPaddingHorizontal:u}=e,c=Math.max(0,(r-i*a)/2-l),d=u-l,f=`${n}-icon-only`;return[{[`${n}${t}`]:{fontSize:i,height:r,padding:`${c}px ${d}px`,borderRadius:s,[`&${f}`]:{width:r,paddingInlineStart:0,paddingInlineEnd:0,[`&${n}-round`]:{width:"auto"},"> span":{transform:"scale(1.143)"}},[`&${n}-loading`]:{opacity:e.opacityLoading,cursor:"default"},[`${n}-loading-icon`]:{transition:`width ${e.motionDurationSlow} ${e.motionEaseInOut}, opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`&:not(${f}) ${n}-loading-icon > ${o}`]:{marginInlineEnd:e.marginXS}}},{[`${n}${n}-circle${t}`]:rQ(e)},{[`${n}${n}-round${t}`]:iQ(e)}]},fQ=e=>WC(e),pQ=e=>{const t=Be(e,{controlHeight:e.controlHeightSM,padding:e.paddingXS,buttonPaddingHorizontal:8,borderRadius:e.borderRadiusSM});return WC(t,`${e.componentCls}-sm`)},gQ=e=>{const t=Be(e,{controlHeight:e.controlHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG});return WC(t,`${e.componentCls}-lg`)},hQ=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},vQ=Ue("Button",e=>{const{controlTmpOutline:t,paddingContentHorizontal:n}=e,o=Be(e,{colorOutlineDefault:t,buttonPaddingHorizontal:n});return[oQ(o),pQ(o),fQ(o),gQ(o),hQ(o),dQ(o),QZ(o),tu(e,{focus:!1}),nQ(e)]}),mQ=()=>({prefixCls:String,size:{type:String}}),OA=CC(),lh=le({compatConfig:{MODE:3},name:"AButtonGroup",props:mQ(),setup(e,t){let{slots:n}=t;const{prefixCls:o,direction:r}=Te("btn-group",e),[,,i]=na();OA.useProvide(rt({size:E(()=>e.size)}));const a=E(()=>{const{size:l}=e;let s="";switch(l){case"large":s="lg";break;case"small":s="sm";break;case"middle":case void 0:break;default:Mt(!l,"Button.Group","Invalid prop `size`.")}return{[`${o.value}`]:!0,[`${o.value}-${s}`]:s,[`${o.value}-rtl`]:r.value==="rtl",[i.value]:!0}});return()=>{var l;return g("div",{class:a.value},[Ot((l=n.default)===null||l===void 0?void 0:l.call(n))])}}}),BO=/^[\u4e00-\u9fa5]{2}$/,HO=BO.test.bind(BO);function ap(e){return e==="text"||e==="link"}const Qt=le({compatConfig:{MODE:3},name:"AButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:Qe($A(),{type:"default"}),slots:Object,setup(e,t){let{slots:n,attrs:o,emit:r,expose:i}=t;const{prefixCls:a,autoInsertSpaceInButton:l,direction:s,size:u}=Te("btn",e),[c,d]=vQ(a),f=OA.useInject(),p=ko(),v=E(()=>{var M;return(M=e.disabled)!==null&&M!==void 0?M:p.value}),h=se(null),m=se(void 0);let b=!1;const S=se(!1),C=se(!1),$=E(()=>l.value!==!1),{compactSize:x,compactItemClassnames:P}=Xa(a,s),w=E(()=>typeof e.loading=="object"&&e.loading.delay?e.loading.delay||!0:!!e.loading);be(w,M=>{clearTimeout(m.value),typeof w.value=="number"?m.value=setTimeout(()=>{S.value=M},w.value):S.value=M},{immediate:!0});const O=E(()=>{const{type:M,shape:D="default",ghost:N,block:L,danger:F}=e,B=a.value,j={large:"lg",small:"sm",middle:void 0},z=x.value||(f==null?void 0:f.size)||u.value,G=z&&j[z]||"";return[P.value,{[d.value]:!0,[`${B}`]:!0,[`${B}-${D}`]:D!=="default"&&D,[`${B}-${M}`]:M,[`${B}-${G}`]:G,[`${B}-loading`]:S.value,[`${B}-background-ghost`]:N&&!ap(M),[`${B}-two-chinese-chars`]:C.value&&$.value,[`${B}-block`]:L,[`${B}-dangerous`]:!!F,[`${B}-rtl`]:s.value==="rtl"}]}),I=()=>{const M=h.value;if(!M||l.value===!1)return;const D=M.textContent;b&&HO(D)?C.value||(C.value=!0):C.value&&(C.value=!1)},_=M=>{if(S.value||v.value){M.preventDefault();return}r("click",M)},T=M=>{r("mousedown",M)},A=(M,D)=>{const N=D?" ":"";if(M.type===ta){let L=M.children.trim();return HO(L)&&(L=L.split("").join(N)),g("span",null,[L])}return M};return Ve(()=>{Mt(!(e.ghost&&ap(e.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),Ke(I),uo(I),tt(()=>{m.value&&clearTimeout(m.value)}),i({focus:()=>{var M;(M=h.value)===null||M===void 0||M.focus()},blur:()=>{var M;(M=h.value)===null||M===void 0||M.blur()}}),()=>{var M,D;const{icon:N=(M=n.icon)===null||M===void 0?void 0:M.call(n)}=e,L=Ot((D=n.default)===null||D===void 0?void 0:D.call(n));b=L.length===1&&!N&&!ap(e.type);const{type:F,htmlType:B,href:j,title:z,target:G}=e,Q=S.value?"loading":N,Y=y(y({},o),{title:z,disabled:v.value,class:[O.value,o.class,{[`${a.value}-icon-only`]:L.length===0&&!!Q}],onClick:_,onMousedown:T});v.value||delete Y.disabled;const oe=N&&!S.value?N:g(ZZ,{existIcon:!!N,prefixCls:a.value,loading:!!S.value},null),Z=L.map(ne=>A(ne,b&&$.value));if(j!==void 0)return c(g("a",k(k({},Y),{},{href:j,target:G,ref:h}),[oe,Z]));let re=g("button",k(k({},Y),{},{ref:h,type:B}),[oe,Z]);if(!ap(F)){const ne=function(){return re}();re=g(zC,{ref:"wave",disabled:!!S.value},{default:()=>[ne]})}return c(re)}}});Qt.Group=lh;Qt.install=function(e){return e.component(Qt.name,Qt),e.component(lh.name,lh),e};const IA=()=>({arrow:He([Boolean,Object]),trigger:{type:[Array,String]},menu:De(),overlay:K.any,visible:$e(),open:$e(),disabled:$e(),danger:$e(),autofocus:$e(),align:De(),getPopupContainer:Function,prefixCls:String,transitionName:String,placement:String,overlayClassName:String,overlayStyle:De(),forceRender:$e(),mouseEnterDelay:Number,mouseLeaveDelay:Number,openClassName:String,minOverlayWidthMatchTrigger:$e(),destroyPopupOnHide:$e(),onVisibleChange:{type:Function},"onUpdate:visible":{type:Function},onOpenChange:{type:Function},"onUpdate:open":{type:Function}}),N0=$A(),bQ=()=>y(y({},IA()),{type:N0.type,size:String,htmlType:N0.htmlType,href:String,disabled:$e(),prefixCls:String,icon:K.any,title:String,loading:N0.loading,onClick:zl()});var yQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};function zO(e){for(var t=1;t{const{componentCls:t,antCls:n,paddingXS:o,opacityLoading:r}=e;return{[`${t}-button`]:{whiteSpace:"nowrap",[`&${n}-btn-group > ${n}-btn`]:{[`&-loading, &-loading + ${n}-btn`]:{cursor:"default",pointerEvents:"none",opacity:r},[`&:last-child:not(:first-child):not(${n}-btn-icon-only)`]:{paddingInline:o}}}}},xQ=e=>{const{componentCls:t,menuCls:n,colorError:o,colorTextLightSolid:r}=e,i=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:o,"&:hover":{color:r,backgroundColor:o}}}}}},$Q=e=>{const{componentCls:t,menuCls:n,zIndexPopup:o,dropdownArrowDistance:r,dropdownArrowOffset:i,sizePopupArrow:a,antCls:l,iconCls:s,motionDurationMid:u,dropdownPaddingVertical:c,fontSize:d,dropdownEdgeChildPadding:f,colorTextDisabled:p,fontSizeIcon:v,controlPaddingHorizontal:h,colorBgElevated:m,boxShadowPopoverArrow:b}=e;return[{[t]:y(y({},qe(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:o,display:"block","&::before":{position:"absolute",insetBlock:-r+a/2,zIndex:-9999,opacity:1e-4,content:'""'},[`${t}-wrap`]:{position:"relative",[`${l}-btn > ${s}-down`]:{fontSize:v},[`${s}-down::before`]:{transition:`transform ${u}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[` + margin-bottom ${n} ${u}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:"flex-start",paddingInline:h,paddingBlock:v,[`${t}-icon`]:{marginInlineEnd:r,fontSize:c,lineHeight:0},[`${t}-message`]:{display:"block",marginBottom:o,color:d,fontSize:a},[`${t}-description`]:{display:"block"}},[`${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},KJ=e=>{const{componentCls:t,colorSuccess:n,colorSuccessBorder:o,colorSuccessBg:r,colorWarning:i,colorWarningBorder:a,colorWarningBg:l,colorError:s,colorErrorBorder:u,colorErrorBg:c,colorInfo:d,colorInfoBorder:f,colorInfoBg:p}=e;return{[t]:{"&-success":rp(r,o,n,e,t),"&-info":rp(p,f,d,e,t),"&-warning":rp(l,a,i,e,t),"&-error":y(y({},rp(c,u,s,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}},UJ=e=>{const{componentCls:t,iconCls:n,motionDurationMid:o,marginXS:r,fontSizeIcon:i,colorIcon:a,colorIconHover:l}=e;return{[t]:{"&-action":{marginInlineStart:r},[`${t}-close-icon`]:{marginInlineStart:r,padding:0,overflow:"hidden",fontSize:i,lineHeight:`${i}px`,backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:a,transition:`color ${o}`,"&:hover":{color:l}}},"&-close-text":{color:a,transition:`color ${o}`,"&:hover":{color:l}}}}},GJ=e=>[VJ(e),KJ(e),UJ(e)],XJ=Ue("Alert",e=>{const{fontSizeHeading3:t}=e,n=Be(e,{alertIconSizeLG:t,alertPaddingHorizontal:12});return[GJ(n)]}),YJ={success:qr,info:Ya,error:po,warning:Jr},qJ={success:Uv,info:Xv,error:Yv,warning:Gv},JJ=Jn("success","info","warning","error"),ZJ=()=>({type:K.oneOf(JJ),closable:{type:Boolean,default:void 0},closeText:K.any,message:K.any,description:K.any,afterClose:Function,showIcon:{type:Boolean,default:void 0},prefixCls:String,banner:{type:Boolean,default:void 0},icon:K.any,closeIcon:K.any,onClose:Function}),QJ=le({compatConfig:{MODE:3},name:"AAlert",inheritAttrs:!1,props:ZJ(),setup(e,t){let{slots:n,emit:o,attrs:r,expose:i}=t;const{prefixCls:a,direction:l}=Te("alert",e),[s,u]=XJ(a),c=se(!1),d=se(!1),f=se(),p=b=>{b.preventDefault();const S=f.value;S.style.height=`${S.offsetHeight}px`,S.style.height=`${S.offsetHeight}px`,c.value=!0,o("close",b)},v=()=>{var b;c.value=!1,d.value=!0,(b=e.afterClose)===null||b===void 0||b.call(e)},h=E(()=>{const{type:b}=e;return b!==void 0?b:e.banner?"warning":"info"});i({animationEnd:v});const m=se({});return()=>{var b,S,C,$,x,P,w,O,I,_;const{banner:T,closeIcon:A=(b=n.closeIcon)===null||b===void 0?void 0:b.call(n)}=e;let{closable:R,showIcon:H}=e;const M=(S=e.closeText)!==null&&S!==void 0?S:(C=n.closeText)===null||C===void 0?void 0:C.call(n),D=($=e.description)!==null&&$!==void 0?$:(x=n.description)===null||x===void 0?void 0:x.call(n),N=(P=e.message)!==null&&P!==void 0?P:(w=n.message)===null||w===void 0?void 0:w.call(n),L=(O=e.icon)!==null&&O!==void 0?O:(I=n.icon)===null||I===void 0?void 0:I.call(n),F=(_=n.action)===null||_===void 0?void 0:_.call(n);H=T&&H===void 0?!0:H;const B=(D?qJ:YJ)[h.value]||null;M&&(R=!0);const j=a.value,z=ge(j,{[`${j}-${h.value}`]:!0,[`${j}-closing`]:c.value,[`${j}-with-description`]:!!D,[`${j}-no-icon`]:!H,[`${j}-banner`]:!!T,[`${j}-closable`]:R,[`${j}-rtl`]:l.value==="rtl",[u.value]:!0}),G=R?g("button",{type:"button",onClick:p,class:`${j}-close-icon`,tabindex:0},[M?g("span",{class:`${j}-close-text`},[M]):A===void 0?g(fo,null,null):A]):null,Q=L&&(sn(L)?mt(L,{class:`${j}-icon`}):g("span",{class:`${j}-icon`},[L]))||g(B,{class:`${j}-icon`},null),Y=Cr(`${j}-motion`,{appear:!1,css:!0,onAfterLeave:v,onBeforeLeave:oe=>{oe.style.maxHeight=`${oe.offsetHeight}px`},onLeave:oe=>{oe.style.maxHeight="0px"}});return s(d.value?null:g(Nn,Y,{default:()=>[Pn(g("div",k(k({role:"alert"},r),{},{style:[r.style,m.value],class:[r.class,z],"data-show":!c.value,ref:f}),[H?Q:null,g("div",{class:`${j}-content`},[N?g("div",{class:`${j}-message`},[N]):null,D?g("div",{class:`${j}-description`},[D]):null]),F?g("div",{class:`${j}-action`},[F]):null,G]),[[Vn,!c.value]])]}))}}}),eZ=Lt(QJ),Bi=["xxxl","xxl","xl","lg","md","sm","xs"],tZ=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`{min-width: ${e.screenXXXL}px}`});function NC(){const[,e]=na();return E(()=>{const t=tZ(e.value),n=new Map;let o=-1,r={};return{matchHandlers:{},dispatch(i){return r=i,n.forEach(a=>a(r)),n.size>=1},subscribe(i){return n.size||this.register(),o+=1,n.set(o,i),i(r),o},unsubscribe(i){n.delete(i),n.size||this.unregister()},unregister(){Object.keys(t).forEach(i=>{const a=t[i],l=this.matchHandlers[a];l==null||l.mql.removeListener(l==null?void 0:l.listener)}),n.clear()},register(){Object.keys(t).forEach(i=>{const a=t[i],l=u=>{let{matches:c}=u;this.dispatch(y(y({},r),{[i]:c}))},s=window.matchMedia(a);s.addListener(l),this.matchHandlers[a]={mql:s,listener:l},l(s)})},responsiveMap:t}})}function nu(){const e=se({});let t=null;const n=NC();return Ke(()=>{t=n.value.subscribe(o=>{e.value=o})}),Zn(()=>{n.value.unsubscribe(t)}),e}function Vo(e){const t=se();return Ve(()=>{t.value=e()},{flush:"sync"}),t}const nZ=e=>{const{antCls:t,componentCls:n,iconCls:o,avatarBg:r,avatarColor:i,containerSize:a,containerSizeLG:l,containerSizeSM:s,textFontSize:u,textFontSizeLG:c,textFontSizeSM:d,borderRadius:f,borderRadiusLG:p,borderRadiusSM:v,lineWidth:h,lineType:m}=e,b=(S,C,$)=>({width:S,height:S,lineHeight:`${S-h*2}px`,borderRadius:"50%",[`&${n}-square`]:{borderRadius:$},[`${n}-string`]:{position:"absolute",left:{_skip_check_:!0,value:"50%"},transformOrigin:"0 center"},[`&${n}-icon`]:{fontSize:C,[`> ${o}`]:{margin:0}}});return{[n]:y(y(y(y({},qe(e)),{position:"relative",display:"inline-block",overflow:"hidden",color:i,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:r,border:`${h}px ${m} transparent`,"&-image":{background:"transparent"},[`${t}-image-img`]:{display:"block"}}),b(a,u,f)),{"&-lg":y({},b(l,c,p)),"&-sm":y({},b(s,d,v)),"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}},oZ=e=>{const{componentCls:t,groupBorderColor:n,groupOverlapping:o,groupSpace:r}=e;return{[`${t}-group`]:{display:"inline-flex",[`${t}`]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:o}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:r}}}},h8=Ue("Avatar",e=>{const{colorTextLightSolid:t,colorTextPlaceholder:n}=e,o=Be(e,{avatarBg:n,avatarColor:t});return[nZ(o),oZ(o)]},e=>{const{controlHeight:t,controlHeightLG:n,controlHeightSM:o,fontSize:r,fontSizeLG:i,fontSizeXL:a,fontSizeHeading3:l,marginXS:s,marginXXS:u,colorBorderBg:c}=e;return{containerSize:t,containerSizeLG:n,containerSizeSM:o,textFontSize:Math.round((i+a)/2),textFontSizeLG:l,textFontSizeSM:r,groupSpace:u,groupOverlapping:-s,groupBorderColor:c}}),v8=Symbol("AvatarContextKey"),rZ=()=>ze(v8,{}),iZ=e=>Xe(v8,e),aZ=()=>({prefixCls:String,shape:{type:String,default:"circle"},size:{type:[Number,String,Object],default:()=>"default"},src:String,srcset:String,icon:K.any,alt:String,gap:Number,draggable:{type:Boolean,default:void 0},crossOrigin:String,loadError:{type:Function}}),Al=le({compatConfig:{MODE:3},name:"AAvatar",inheritAttrs:!1,props:aZ(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const r=se(!0),i=se(!1),a=se(1),l=se(null),s=se(null),{prefixCls:u}=Te("avatar",e),[c,d]=h8(u),f=rZ(),p=E(()=>e.size==="default"?f.size:e.size),v=nu(),h=Vo(()=>{if(typeof e.size!="object")return;const C=Bi.find(x=>v.value[x]);return e.size[C]}),m=C=>h.value?{width:`${h.value}px`,height:`${h.value}px`,lineHeight:`${h.value}px`,fontSize:`${C?h.value/2:18}px`}:{},b=()=>{if(!l.value||!s.value)return;const C=l.value.offsetWidth,$=s.value.offsetWidth;if(C!==0&&$!==0){const{gap:x=4}=e;x*2<$&&(a.value=$-x*2{const{loadError:C}=e;(C==null?void 0:C())!==!1&&(r.value=!1)};return be(()=>e.src,()=>{ot(()=>{r.value=!0,a.value=1})}),be(()=>e.gap,()=>{ot(()=>{b()})}),Ke(()=>{ot(()=>{b(),i.value=!0})}),()=>{var C,$;const{shape:x,src:P,alt:w,srcset:O,draggable:I,crossOrigin:_}=e,T=(C=f.shape)!==null&&C!==void 0?C:x,A=mn(n,e,"icon"),R=u.value,H={[`${o.class}`]:!!o.class,[R]:!0,[`${R}-lg`]:p.value==="large",[`${R}-sm`]:p.value==="small",[`${R}-${T}`]:!0,[`${R}-image`]:P&&r.value,[`${R}-icon`]:A,[d.value]:!0},M=typeof p.value=="number"?{width:`${p.value}px`,height:`${p.value}px`,lineHeight:`${p.value}px`,fontSize:A?`${p.value/2}px`:"18px"}:{},D=($=n.default)===null||$===void 0?void 0:$.call(n);let N;if(P&&r.value)N=g("img",{draggable:I,src:P,srcset:O,onError:S,alt:w,crossorigin:_},null);else if(A)N=A;else if(i.value||a.value!==1){const L=`scale(${a.value}) translateX(-50%)`,F={msTransform:L,WebkitTransform:L,transform:L},B=typeof p.value=="number"?{lineHeight:`${p.value}px`}:{};N=g(br,{onResize:b},{default:()=>[g("span",{class:`${R}-string`,ref:l,style:y(y({},B),F)},[D])]})}else N=g("span",{class:`${R}-string`,ref:l,style:{opacity:0}},[D]);return c(g("span",k(k({},o),{},{ref:s,class:H,style:[M,m(!!A),o.style]}),[N]))}}}),rr={adjustX:1,adjustY:1},ir=[0,0],m8={left:{points:["cr","cl"],overflow:rr,offset:[-4,0],targetOffset:ir},right:{points:["cl","cr"],overflow:rr,offset:[4,0],targetOffset:ir},top:{points:["bc","tc"],overflow:rr,offset:[0,-4],targetOffset:ir},bottom:{points:["tc","bc"],overflow:rr,offset:[0,4],targetOffset:ir},topLeft:{points:["bl","tl"],overflow:rr,offset:[0,-4],targetOffset:ir},leftTop:{points:["tr","tl"],overflow:rr,offset:[-4,0],targetOffset:ir},topRight:{points:["br","tr"],overflow:rr,offset:[0,-4],targetOffset:ir},rightTop:{points:["tl","tr"],overflow:rr,offset:[4,0],targetOffset:ir},bottomRight:{points:["tr","br"],overflow:rr,offset:[0,4],targetOffset:ir},rightBottom:{points:["bl","br"],overflow:rr,offset:[4,0],targetOffset:ir},bottomLeft:{points:["tl","bl"],overflow:rr,offset:[0,4],targetOffset:ir},leftBottom:{points:["br","bl"],overflow:rr,offset:[-4,0],targetOffset:ir}},lZ={prefixCls:String,id:String,overlayInnerStyle:K.any},sZ=le({compatConfig:{MODE:3},name:"TooltipContent",props:lZ,setup(e,t){let{slots:n}=t;return()=>{var o;return g("div",{class:`${e.prefixCls}-inner`,id:e.id,role:"tooltip",style:e.overlayInnerStyle},[(o=n.overlay)===null||o===void 0?void 0:o.call(n)])}}});var cZ=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{}),overlayStyle:{type:Object,default:void 0},overlayClassName:String,prefixCls:K.string.def("rc-tooltip"),mouseEnterDelay:K.number.def(.1),mouseLeaveDelay:K.number.def(.1),getPopupContainer:Function,destroyTooltipOnHide:{type:Boolean,default:!1},align:K.object.def(()=>({})),arrowContent:K.any.def(null),tipId:String,builtinPlacements:K.object,overlayInnerStyle:{type:Object,default:void 0},popupVisible:{type:Boolean,default:void 0},onVisibleChange:Function,onPopupAlign:Function,arrow:{type:Boolean,default:!0}},setup(e,t){let{slots:n,attrs:o,expose:r}=t;const i=se(),a=()=>{const{prefixCls:c,tipId:d,overlayInnerStyle:f}=e;return[e.arrow?g("div",{class:`${c}-arrow`,key:"arrow"},[mn(n,e,"arrowContent")]):null,g(sZ,{key:"content",prefixCls:c,id:d,overlayInnerStyle:f},{overlay:n.overlay})]};r({getPopupDomNode:()=>i.value.getPopupDomNode(),triggerDOM:i,forcePopupAlign:()=>{var c;return(c=i.value)===null||c===void 0?void 0:c.forcePopupAlign()}});const s=se(!1),u=se(!1);return Ve(()=>{const{destroyTooltipOnHide:c}=e;if(typeof c=="boolean")s.value=c;else if(c&&typeof c=="object"){const{keepParent:d}=c;s.value=d===!0,u.value=d===!1}}),()=>{const{overlayClassName:c,trigger:d,mouseEnterDelay:f,mouseLeaveDelay:p,overlayStyle:v,prefixCls:h,afterVisibleChange:m,transitionName:b,animation:S,placement:C,align:$,destroyTooltipOnHide:x,defaultVisible:P}=e,w=cZ(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible"]),O=y({},w);e.visible!==void 0&&(O.popupVisible=e.visible);const I=y(y(y({popupClassName:c,prefixCls:h,action:d,builtinPlacements:m8,popupPlacement:C,popupAlign:$,afterPopupVisibleChange:m,popupTransitionName:b,popupAnimation:S,defaultPopupVisible:P,destroyPopupOnHide:s.value,autoDestroy:u.value,mouseLeaveDelay:p,popupStyle:v,mouseEnterDelay:f},O),o),{onPopupVisibleChange:e.onVisibleChange||MO,onPopupAlign:e.onPopupAlign||MO,ref:i,arrow:!!e.arrow,popup:a()});return g(ss,I,{default:n.default})}}}),kC=()=>({trigger:[String,Array],open:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},placement:String,color:String,transitionName:String,overlayStyle:De(),overlayInnerStyle:De(),overlayClassName:String,openClassName:String,prefixCls:String,mouseEnterDelay:Number,mouseLeaveDelay:Number,getPopupContainer:Function,arrowPointAtCenter:{type:Boolean,default:void 0},arrow:{type:[Boolean,Object],default:!0},autoAdjustOverflow:{type:[Boolean,Object],default:void 0},destroyTooltipOnHide:{type:Boolean,default:void 0},align:De(),builtinPlacements:De(),children:Array,onVisibleChange:Function,"onUpdate:visible":Function,onOpenChange:Function,"onUpdate:open":Function}),dZ={adjustX:1,adjustY:1},AO={adjustX:0,adjustY:0},fZ=[0,0];function RO(e){return typeof e=="boolean"?e?dZ:AO:y(y({},AO),e)}function LC(e){const{arrowWidth:t=4,horizontalArrowShift:n=16,verticalArrowShift:o=8,autoAdjustOverflow:r,arrowPointAtCenter:i}=e,a={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(n+t),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(o+t)]},topRight:{points:["br","tc"],offset:[n+t,-4]},rightTop:{points:["tl","cr"],offset:[4,-(o+t)]},bottomRight:{points:["tr","bc"],offset:[n+t,4]},rightBottom:{points:["bl","cr"],offset:[4,o+t]},bottomLeft:{points:["tl","bc"],offset:[-(n+t),4]},leftBottom:{points:["br","cl"],offset:[-4,o+t]}};return Object.keys(a).forEach(l=>{a[l]=i?y(y({},a[l]),{overflow:RO(r),targetOffset:fZ}):y(y({},m8[l]),{overflow:RO(r)}),a[l].ignoreShake=!0}),a}function Qg(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];for(let t=0,n=e.length;t`${e}-inverse`),gZ=["success","processing","error","default","warning"];function qv(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[...pZ,...Rd].includes(e):Rd.includes(e)}function hZ(e){return gZ.includes(e)}function vZ(e,t){const n=qv(t),o=ge({[`${e}-${t}`]:t&&n}),r={},i={};return t&&!n&&(r.background=t,i["--antd-arrow-background-color"]=t),{className:o,overlayStyle:r,arrowStyle:i}}function ip(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return e.map(n=>`${t}${n}`).join(",")}const FC=8;function b8(e){const t=FC,{sizePopupArrow:n,contentRadius:o,borderRadiusOuter:r,limitVerticalRadius:i}=e,a=n/2-Math.ceil(r*(Math.sqrt(2)-1)),l=(o>12?o+2:12)-a,s=i?t-a:l;return{dropdownArrowOffset:l,dropdownArrowOffsetVertical:s}}function BC(e,t){const{componentCls:n,sizePopupArrow:o,marginXXS:r,borderRadiusXS:i,borderRadiusOuter:a,boxShadowPopoverArrow:l}=e,{colorBg:s,showArrowCls:u,contentRadius:c=e.borderRadiusLG,limitVerticalRadius:d}=t,{dropdownArrowOffsetVertical:f,dropdownArrowOffset:p}=b8({sizePopupArrow:o,contentRadius:c,borderRadiusOuter:a,limitVerticalRadius:d}),v=o/2+r;return{[n]:{[`${n}-arrow`]:[y(y({position:"absolute",zIndex:1,display:"block"},zS(o,i,a,s,l)),{"&:before":{background:s}})],[[`&-placement-top ${n}-arrow`,`&-placement-topLeft ${n}-arrow`,`&-placement-topRight ${n}-arrow`].join(",")]:{bottom:0,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${n}-arrow`]:{left:{_skip_check_:!0,value:p}},[`&-placement-topRight ${n}-arrow`]:{right:{_skip_check_:!0,value:p}},[[`&-placement-bottom ${n}-arrow`,`&-placement-bottomLeft ${n}-arrow`,`&-placement-bottomRight ${n}-arrow`].join(",")]:{top:0,transform:"translateY(-100%)"},[`&-placement-bottom ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${n}-arrow`]:{left:{_skip_check_:!0,value:p}},[`&-placement-bottomRight ${n}-arrow`]:{right:{_skip_check_:!0,value:p}},[[`&-placement-left ${n}-arrow`,`&-placement-leftTop ${n}-arrow`,`&-placement-leftBottom ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:0},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${n}-arrow`]:{top:f},[`&-placement-leftBottom ${n}-arrow`]:{bottom:f},[[`&-placement-right ${n}-arrow`,`&-placement-rightTop ${n}-arrow`,`&-placement-rightBottom ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:0},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${n}-arrow`]:{top:f},[`&-placement-rightBottom ${n}-arrow`]:{bottom:f},[ip(["&-placement-topLeft","&-placement-top","&-placement-topRight"].map(h=>h+=":not(&-arrow-hidden)"),u)]:{paddingBottom:v},[ip(["&-placement-bottomLeft","&-placement-bottom","&-placement-bottomRight"].map(h=>h+=":not(&-arrow-hidden)"),u)]:{paddingTop:v},[ip(["&-placement-leftTop","&-placement-left","&-placement-leftBottom"].map(h=>h+=":not(&-arrow-hidden)"),u)]:{paddingRight:{_skip_check_:!0,value:v}},[ip(["&-placement-rightTop","&-placement-right","&-placement-rightBottom"].map(h=>h+=":not(&-arrow-hidden)"),u)]:{paddingLeft:{_skip_check_:!0,value:v}}}}}const mZ=e=>{const{componentCls:t,tooltipMaxWidth:n,tooltipColor:o,tooltipBg:r,tooltipBorderRadius:i,zIndexPopup:a,controlHeight:l,boxShadowSecondary:s,paddingSM:u,paddingXS:c,tooltipRadiusOuter:d}=e;return[{[t]:y(y(y(y({},qe(e)),{position:"absolute",zIndex:a,display:"block","&":[{width:"max-content"},{width:"intrinsic"}],maxWidth:n,visibility:"visible","&-hidden":{display:"none"},"--antd-arrow-background-color":r,[`${t}-inner`]:{minWidth:l,minHeight:l,padding:`${u/2}px ${c}px`,color:o,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:r,borderRadius:i,boxShadow:s},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:Math.min(i,FC)}},[`${t}-content`]:{position:"relative"}}),Bg(e,(f,p)=>{let{darkColor:v}=p;return{[`&${t}-${f}`]:{[`${t}-inner`]:{backgroundColor:v},[`${t}-arrow`]:{"--antd-arrow-background-color":v}}}})),{"&-rtl":{direction:"rtl"}})},BC(Be(e,{borderRadiusOuter:d}),{colorBg:"var(--antd-arrow-background-color)",showArrowCls:"",contentRadius:i,limitVerticalRadius:!0}),{[`${t}-pure`]:{position:"relative",maxWidth:"none"}}]},bZ=(e,t)=>Ue("Tooltip",o=>{if((t==null?void 0:t.value)===!1)return[];const{borderRadius:r,colorTextLightSolid:i,colorBgDefault:a,borderRadiusOuter:l}=o,s=Be(o,{tooltipMaxWidth:250,tooltipColor:i,tooltipBorderRadius:r,tooltipBg:a,tooltipRadiusOuter:l>4?4:l});return[mZ(s),eu(o,"zoom-big-fast")]},o=>{let{zIndexPopupBase:r,colorBgSpotlight:i}=o;return{zIndexPopup:r+70,colorBgDefault:i}})(e),yZ=(e,t)=>{const n={},o=y({},e);return t.forEach(r=>{e&&r in e&&(n[r]=e[r],delete o[r])}),{picked:n,omitted:o}},y8=()=>y(y({},kC()),{title:K.any}),S8=()=>({trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),SZ=le({compatConfig:{MODE:3},name:"ATooltip",inheritAttrs:!1,props:Qe(y8(),{trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r,expose:i}=t;const{prefixCls:a,getPopupContainer:l,direction:s,rootPrefixCls:u}=Te("tooltip",e),c=E(()=>{var _;return(_=e.open)!==null&&_!==void 0?_:e.visible}),d=ae(Qg([e.open,e.visible])),f=ae();let p;be(c,_=>{Ze.cancel(p),p=Ze(()=>{d.value=!!_})});const v=()=>{var _;const T=(_=e.title)!==null&&_!==void 0?_:n.title;return!T&&T!==0},h=_=>{const T=v();c.value===void 0&&(d.value=T?!1:_),T||(o("update:visible",_),o("visibleChange",_),o("update:open",_),o("openChange",_))};i({getPopupDomNode:()=>f.value.getPopupDomNode(),open:d,forcePopupAlign:()=>{var _;return(_=f.value)===null||_===void 0?void 0:_.forcePopupAlign()}});const b=E(()=>{var _;const{builtinPlacements:T,autoAdjustOverflow:A,arrow:R,arrowPointAtCenter:H}=e;let M=H;return typeof R=="object"&&(M=(_=R.pointAtCenter)!==null&&_!==void 0?_:H),T||LC({arrowPointAtCenter:M,autoAdjustOverflow:A})}),S=_=>_||_==="",C=_=>{const T=_.type;if(typeof T=="object"&&_.props&&((T.__ANT_BUTTON===!0||T==="button")&&S(_.props.disabled)||T.__ANT_SWITCH===!0&&(S(_.props.disabled)||S(_.props.loading))||T.__ANT_RADIO===!0&&S(_.props.disabled))){const{picked:A,omitted:R}=yZ(VM(_),["position","left","right","top","bottom","float","display","zIndex"]),H=y(y({display:"inline-block"},A),{cursor:"not-allowed",lineHeight:1,width:_.props&&_.props.block?"100%":void 0}),M=y(y({},R),{pointerEvents:"none"}),D=mt(_,{style:M},!0);return g("span",{style:H,class:`${a.value}-disabled-compatible-wrapper`},[D])}return _},$=()=>{var _,T;return(_=e.title)!==null&&_!==void 0?_:(T=n.title)===null||T===void 0?void 0:T.call(n)},x=(_,T)=>{const A=b.value,R=Object.keys(A).find(H=>{var M,D;return A[H].points[0]===((M=T.points)===null||M===void 0?void 0:M[0])&&A[H].points[1]===((D=T.points)===null||D===void 0?void 0:D[1])});if(R){const H=_.getBoundingClientRect(),M={top:"50%",left:"50%"};R.indexOf("top")>=0||R.indexOf("Bottom")>=0?M.top=`${H.height-T.offset[1]}px`:(R.indexOf("Top")>=0||R.indexOf("bottom")>=0)&&(M.top=`${-T.offset[1]}px`),R.indexOf("left")>=0||R.indexOf("Right")>=0?M.left=`${H.width-T.offset[0]}px`:(R.indexOf("right")>=0||R.indexOf("Left")>=0)&&(M.left=`${-T.offset[0]}px`),_.style.transformOrigin=`${M.left} ${M.top}`}},P=E(()=>vZ(a.value,e.color)),w=E(()=>r["data-popover-inject"]),[O,I]=bZ(a,E(()=>!w.value));return()=>{var _,T;const{openClassName:A,overlayClassName:R,overlayStyle:H,overlayInnerStyle:M}=e;let D=(T=zt((_=n.default)===null||_===void 0?void 0:_.call(n)))!==null&&T!==void 0?T:null;D=D.length===1?D[0]:D;let N=d.value;if(c.value===void 0&&v()&&(N=!1),!D)return null;const L=C(sn(D)&&!$B(D)?D:g("span",null,[D])),F=ge({[A||`${a.value}-open`]:!0,[L.props&&L.props.class]:L.props&&L.props.class}),B=ge(R,{[`${a.value}-rtl`]:s.value==="rtl"},P.value.className,I.value),j=y(y({},P.value.overlayStyle),M),z=P.value.arrowStyle,G=y(y(y({},r),e),{prefixCls:a.value,arrow:!!e.arrow,getPopupContainer:l==null?void 0:l.value,builtinPlacements:b.value,visible:N,ref:f,overlayClassName:B,overlayStyle:y(y({},z),H),overlayInnerStyle:j,onVisibleChange:h,onPopupAlign:x,transitionName:co(u.value,"zoom-big-fast",e.transitionName)});return O(g(uZ,G,{default:()=>[d.value?mt(L,{class:F}):L],arrowContent:()=>g("span",{class:`${a.value}-arrow-content`},null),overlay:$}))}}}),Ro=Lt(SZ),CZ=e=>{const{componentCls:t,popoverBg:n,popoverColor:o,width:r,fontWeightStrong:i,popoverPadding:a,boxShadowSecondary:l,colorTextHeading:s,borderRadiusLG:u,zIndexPopup:c,marginXS:d,colorBgElevated:f}=e;return[{[t]:y(y({},qe(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--antd-arrow-background-color":f,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:n,backgroundClip:"padding-box",borderRadius:u,boxShadow:l,padding:a},[`${t}-title`]:{minWidth:r,marginBottom:d,color:s,fontWeight:i},[`${t}-inner-content`]:{color:o}})},BC(e,{colorBg:"var(--antd-arrow-background-color)"}),{[`${t}-pure`]:{position:"relative",maxWidth:"none",[`${t}-content`]:{display:"inline-block"}}}]},xZ=e=>{const{componentCls:t}=e;return{[t]:Rd.map(n=>{const o=e[`${n}-6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":o,[`${t}-inner`]:{backgroundColor:o},[`${t}-arrow`]:{background:"transparent"}}}})}},$Z=e=>{const{componentCls:t,lineWidth:n,lineType:o,colorSplit:r,paddingSM:i,controlHeight:a,fontSize:l,lineHeight:s,padding:u}=e,c=a-Math.round(l*s),d=c/2,f=c/2-n,p=u;return{[t]:{[`${t}-inner`]:{padding:0},[`${t}-title`]:{margin:0,padding:`${d}px ${p}px ${f}px`,borderBottom:`${n}px ${o} ${r}`},[`${t}-inner-content`]:{padding:`${i}px ${p}px`}}}},wZ=Ue("Popover",e=>{const{colorBgElevated:t,colorText:n,wireframe:o}=e,r=Be(e,{popoverBg:t,popoverColor:n,popoverPadding:12});return[CZ(r),xZ(r),o&&$Z(r),eu(r,"zoom-big")]},e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+30,width:177}}),PZ=()=>y(y({},kC()),{content:It(),title:It()}),OZ=le({compatConfig:{MODE:3},name:"APopover",inheritAttrs:!1,props:Qe(PZ(),y(y({},S8()),{trigger:"hover",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1})),setup(e,t){let{expose:n,slots:o,attrs:r}=t;const i=ae();Yo(e.visible===void 0),n({getPopupDomNode:()=>{var f,p;return(p=(f=i.value)===null||f===void 0?void 0:f.getPopupDomNode)===null||p===void 0?void 0:p.call(f)}});const{prefixCls:a,configProvider:l}=Te("popover",e),[s,u]=wZ(a),c=E(()=>l.getPrefixCls()),d=()=>{var f,p;const{title:v=zt((f=o.title)===null||f===void 0?void 0:f.call(o)),content:h=zt((p=o.content)===null||p===void 0?void 0:p.call(o))}=e,m=!!(Array.isArray(v)?v.length:v),b=!!(Array.isArray(h)?h.length:v);return!m&&!b?null:g(Le,null,[m&&g("div",{class:`${a.value}-title`},[v]),g("div",{class:`${a.value}-inner-content`},[h])])};return()=>{const f=ge(e.overlayClassName,u.value);return s(g(Ro,k(k(k({},it(e,["title","content"])),r),{},{prefixCls:a.value,ref:i,overlayClassName:f,transitionName:co(c.value,"zoom-big",e.transitionName),"data-popover-inject":!0}),{title:d,default:o.default}))}}}),HC=Lt(OZ),IZ=()=>({prefixCls:String,maxCount:Number,maxStyle:{type:Object,default:void 0},maxPopoverPlacement:{type:String,default:"top"},maxPopoverTrigger:String,size:{type:[Number,String,Object],default:"default"},shape:{type:String,default:"circle"}}),eh=le({compatConfig:{MODE:3},name:"AAvatarGroup",inheritAttrs:!1,props:IZ(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("avatar",e),a=E(()=>`${r.value}-group`),[l,s]=h8(r);return Ve(()=>{const u={size:e.size,shape:e.shape};iZ(u)}),()=>{const{maxPopoverPlacement:u="top",maxCount:c,maxStyle:d,maxPopoverTrigger:f="hover",shape:p}=e,v={[a.value]:!0,[`${a.value}-rtl`]:i.value==="rtl",[`${o.class}`]:!!o.class,[s.value]:!0},h=mn(n,e),m=Ot(h).map((S,C)=>mt(S,{key:`avatar-key-${C}`})),b=m.length;if(c&&c[g(Al,{style:d,shape:p},{default:()=>[`+${b-c}`]})]})),l(g("div",k(k({},o),{},{class:v,style:o.style}),[S]))}return l(g("div",k(k({},o),{},{class:v,style:o.style}),[m]))}}});Al.Group=eh;Al.install=function(e){return e.component(Al.name,Al),e.component(eh.name,eh),e};function DO(e){let{prefixCls:t,value:n,current:o,offset:r=0}=e,i;return r&&(i={position:"absolute",top:`${r}00%`,left:0}),g("p",{style:i,class:ge(`${t}-only-unit`,{current:o})},[n])}function TZ(e,t,n){let o=e,r=0;for(;(o+10)%10!==t;)o+=n,r+=n;return r}const EZ=le({compatConfig:{MODE:3},name:"SingleNumber",props:{prefixCls:String,value:String,count:Number},setup(e){const t=E(()=>Number(e.value)),n=E(()=>Math.abs(e.count)),o=rt({prevValue:t.value,prevCount:n.value}),r=()=>{o.prevValue=t.value,o.prevCount=n.value},i=ae();return be(t,()=>{clearTimeout(i.value),i.value=setTimeout(()=>{r()},1e3)},{flush:"post"}),Zn(()=>{clearTimeout(i.value)}),()=>{let a,l={};const s=t.value;if(o.prevValue===s||Number.isNaN(s)||Number.isNaN(o.prevValue))a=[DO(y(y({},e),{current:!0}))],l={transition:"none"};else{a=[];const u=s+10,c=[];for(let p=s;p<=u;p+=1)c.push(p);const d=c.findIndex(p=>p%10===o.prevValue);a=c.map((p,v)=>{const h=p%10;return DO(y(y({},e),{value:h,offset:v-d,current:v===d}))});const f=o.prevCountr()},[a])}}});var _Z=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var i;const a=y(y({},e),n),{prefixCls:l,count:s,title:u,show:c,component:d="sup",class:f,style:p}=a,v=_Z(a,["prefixCls","count","title","show","component","class","style"]),h=y(y({},v),{style:p,"data-show":e.show,class:ge(r.value,f),title:u});let m=s;if(s&&Number(s)%1===0){const S=String(s).split("");m=S.map((C,$)=>g(EZ,{prefixCls:r.value,count:Number(s),value:C,key:S.length-$},null))}p&&p.borderColor&&(h.style=y(y({},p),{boxShadow:`0 0 0 1px ${p.borderColor} inset`}));const b=zt((i=o.default)===null||i===void 0?void 0:i.call(o));return b&&b.length?mt(b,{class:ge(`${r.value}-custom-component`)},!1):g(d,h,{default:()=>[m]})}}}),RZ=new at("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),DZ=new at("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),NZ=new at("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),kZ=new at("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),LZ=new at("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),FZ=new at("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),BZ=e=>{const{componentCls:t,iconCls:n,antCls:o,badgeFontHeight:r,badgeShadowSize:i,badgeHeightSm:a,motionDurationSlow:l,badgeStatusSize:s,marginXS:u,badgeRibbonOffset:c}=e,d=`${o}-scroll-number`,f=`${o}-ribbon`,p=`${o}-ribbon-wrapper`,v=Bg(e,(m,b)=>{let{darkColor:S}=b;return{[`&${t} ${t}-color-${m}`]:{background:S,[`&:not(${t}-count)`]:{color:S}}}}),h=Bg(e,(m,b)=>{let{darkColor:S}=b;return{[`&${f}-color-${m}`]:{background:S,color:S}}});return{[t]:y(y(y(y({},qe(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{zIndex:e.badgeZIndex,minWidth:e.badgeHeight,height:e.badgeHeight,color:e.badgeTextColor,fontWeight:e.badgeFontWeight,fontSize:e.badgeFontSize,lineHeight:`${e.badgeHeight}px`,whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:e.badgeHeight/2,boxShadow:`0 0 0 ${i}px ${e.badgeShadowColor}`,transition:`background ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:a,height:a,fontSize:e.badgeFontSizeSm,lineHeight:`${a}px`,borderRadius:a/2},[`${t}-multiple-words`]:{padding:`0 ${e.paddingXS}px`},[`${t}-dot`]:{zIndex:e.badgeZIndex,width:e.badgeDotSize,minWidth:e.badgeDotSize,height:e.badgeDotSize,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${i}px ${e.badgeShadowColor}`},[`${t}-dot${d}`]:{transition:`background ${l}`},[`${t}-count, ${t}-dot, ${d}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${n}-spin`]:{animationName:FZ,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorPrimary,backgroundColor:e.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:i,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:RZ,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:u,color:e.colorText,fontSize:e.fontSize}}}),v),{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:DZ,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:NZ,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:kZ,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:LZ,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${d}-custom-component, ${t}-count`]:{transform:"none"},[`${d}-custom-component, ${d}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[`${d}`]:{overflow:"hidden",[`${d}-only`]:{position:"relative",display:"inline-block",height:e.badgeHeight,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${d}-only-unit`]:{height:e.badgeHeight,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${d}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${d}-custom-component`]:{transform:"translate(-50%, -50%)"}}}),[`${p}`]:{position:"relative"},[`${f}`]:y(y(y(y({},qe(e)),{position:"absolute",top:u,padding:`0 ${e.paddingXS}px`,color:e.colorPrimary,lineHeight:`${r}px`,whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${f}-text`]:{color:e.colorTextLightSolid},[`${f}-corner`]:{position:"absolute",top:"100%",width:c,height:c,color:"currentcolor",border:`${c/2}px solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),h),{[`&${f}-placement-end`]:{insetInlineEnd:-c,borderEndEndRadius:0,[`${f}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${f}-placement-start`]:{insetInlineStart:-c,borderEndStartRadius:0,[`${f}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},C8=Ue("Badge",e=>{const{fontSize:t,lineHeight:n,fontSizeSM:o,lineWidth:r,marginXS:i,colorBorderBg:a}=e,l=Math.round(t*n),s=r,u="auto",c=l-2*s,d=e.colorBgContainer,f="normal",p=o,v=e.colorError,h=e.colorErrorHover,m=t,b=o/2,S=o,C=o/2,$=Be(e,{badgeFontHeight:l,badgeShadowSize:s,badgeZIndex:u,badgeHeight:c,badgeTextColor:d,badgeFontWeight:f,badgeFontSize:p,badgeColor:v,badgeColorHover:h,badgeShadowColor:a,badgeHeightSm:m,badgeDotSize:b,badgeFontSizeSm:S,badgeStatusSize:C,badgeProcessingDuration:"1.2s",badgeRibbonOffset:i,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"});return[BZ($)]});var HZ=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefix:String,color:{type:String},text:K.any,placement:{type:String,default:"end"}}),th=le({compatConfig:{MODE:3},name:"ABadgeRibbon",inheritAttrs:!1,props:zZ(),slots:Object,setup(e,t){let{attrs:n,slots:o}=t;const{prefixCls:r,direction:i}=Te("ribbon",e),[a,l]=C8(r),s=E(()=>qv(e.color,!1)),u=E(()=>[r.value,`${r.value}-placement-${e.placement}`,{[`${r.value}-rtl`]:i.value==="rtl",[`${r.value}-color-${e.color}`]:s.value}]);return()=>{var c,d;const{class:f,style:p}=n,v=HZ(n,["class","style"]),h={},m={};return e.color&&!s.value&&(h.background=e.color,m.color=e.color),a(g("div",k({class:`${r.value}-wrapper ${l.value}`},v),[(c=o.default)===null||c===void 0?void 0:c.call(o),g("div",{class:[u.value,f,l.value],style:y(y({},h),p)},[g("span",{class:`${r.value}-text`},[e.text||((d=o.text)===null||d===void 0?void 0:d.call(o))]),g("div",{class:`${r.value}-corner`,style:m},null)])]))}}}),nh=e=>!isNaN(parseFloat(e))&&isFinite(e),jZ=()=>({count:K.any.def(null),showZero:{type:Boolean,default:void 0},overflowCount:{type:Number,default:99},dot:{type:Boolean,default:void 0},prefixCls:String,scrollNumberPrefixCls:String,status:{type:String},size:{type:String,default:"default"},color:String,text:K.any,offset:Array,numberStyle:{type:Object,default:void 0},title:String}),nd=le({compatConfig:{MODE:3},name:"ABadge",Ribbon:th,inheritAttrs:!1,props:jZ(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("badge",e),[a,l]=C8(r),s=E(()=>e.count>e.overflowCount?`${e.overflowCount}+`:e.count),u=E(()=>s.value==="0"||s.value===0),c=E(()=>e.count===null||u.value&&!e.showZero),d=E(()=>(e.status!==null&&e.status!==void 0||e.color!==null&&e.color!==void 0)&&c.value),f=E(()=>e.dot&&!u.value),p=E(()=>f.value?"":s.value),v=E(()=>(p.value===null||p.value===void 0||p.value===""||u.value&&!e.showZero)&&!f.value),h=ae(e.count),m=ae(p.value),b=ae(f.value);be([()=>e.count,p,f],()=>{v.value||(h.value=e.count,m.value=p.value,b.value=f.value)},{immediate:!0});const S=E(()=>qv(e.color,!1)),C=E(()=>({[`${r.value}-status-dot`]:d.value,[`${r.value}-status-${e.status}`]:!!e.status,[`${r.value}-color-${e.color}`]:S.value})),$=E(()=>e.color&&!S.value?{background:e.color,color:e.color}:{}),x=E(()=>({[`${r.value}-dot`]:b.value,[`${r.value}-count`]:!b.value,[`${r.value}-count-sm`]:e.size==="small",[`${r.value}-multiple-words`]:!b.value&&m.value&&m.value.toString().length>1,[`${r.value}-status-${e.status}`]:!!e.status,[`${r.value}-color-${e.color}`]:S.value}));return()=>{var P,w;const{offset:O,title:I,color:_}=e,T=o.style,A=mn(n,e,"text"),R=r.value,H=h.value;let M=Ot((P=n.default)===null||P===void 0?void 0:P.call(n));M=M.length?M:null;const D=!!(!v.value||n.count),N=(()=>{if(!O)return y({},T);const Q={marginTop:nh(O[1])?`${O[1]}px`:O[1]};return i.value==="rtl"?Q.left=`${parseInt(O[0],10)}px`:Q.right=`${-parseInt(O[0],10)}px`,y(y({},Q),T)})(),L=I??(typeof H=="string"||typeof H=="number"?H:void 0),F=D||!A?null:g("span",{class:`${R}-status-text`},[A]),B=typeof H=="object"||H===void 0&&n.count?mt(H??((w=n.count)===null||w===void 0?void 0:w.call(n)),{style:N},!1):null,j=ge(R,{[`${R}-status`]:d.value,[`${R}-not-a-wrapper`]:!M,[`${R}-rtl`]:i.value==="rtl"},o.class,l.value);if(!M&&d.value){const Q=N.color;return a(g("span",k(k({},o),{},{class:j,style:N}),[g("span",{class:C.value,style:$.value},null),g("span",{style:{color:Q},class:`${R}-status-text`},[A])]))}const z=Cr(M?`${R}-zoom`:"",{appear:!1});let G=y(y({},N),e.numberStyle);return _&&!S.value&&(G=G||{},G.background=_),a(g("span",k(k({},o),{},{class:j}),[M,g(Nn,z,{default:()=>[Pn(g(AZ,{prefixCls:e.scrollNumberPrefixCls,show:D,class:x.value,count:m.value,title:L,style:G,key:"scrollNumber"},{default:()=>[B]}),[[Vn,D]])]}),F]))}}});nd.install=function(e){return e.component(nd.name,nd),e.component(th.name,th),e};const ws={adjustX:1,adjustY:1},Ps=[0,0],WZ={topLeft:{points:["bl","tl"],overflow:ws,offset:[0,-4],targetOffset:Ps},topCenter:{points:["bc","tc"],overflow:ws,offset:[0,-4],targetOffset:Ps},topRight:{points:["br","tr"],overflow:ws,offset:[0,-4],targetOffset:Ps},bottomLeft:{points:["tl","bl"],overflow:ws,offset:[0,4],targetOffset:Ps},bottomCenter:{points:["tc","bc"],overflow:ws,offset:[0,4],targetOffset:Ps},bottomRight:{points:["tr","br"],overflow:ws,offset:[0,4],targetOffset:Ps}};var VZ=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.visible,p=>{p!==void 0&&(i.value=p)});const a=ae();r({triggerRef:a});const l=p=>{e.visible===void 0&&(i.value=!1),o("overlayClick",p)},s=p=>{e.visible===void 0&&(i.value=p),o("visibleChange",p)},u=()=>{var p;const v=(p=n.overlay)===null||p===void 0?void 0:p.call(n),h={prefixCls:`${e.prefixCls}-menu`,onClick:l};return g(Le,{key:zM},[e.arrow&&g("div",{class:`${e.prefixCls}-arrow`},null),mt(v,h,!1)])},c=E(()=>{const{minOverlayWidthMatchTrigger:p=!e.alignPoint}=e;return p}),d=()=>{var p;const v=(p=n.default)===null||p===void 0?void 0:p.call(n);return i.value&&v?mt(v[0],{class:e.openClassName||`${e.prefixCls}-open`},!1):v},f=E(()=>!e.hideAction&&e.trigger.indexOf("contextmenu")!==-1?["click"]:e.hideAction);return()=>{const{prefixCls:p,arrow:v,showAction:h,overlayStyle:m,trigger:b,placement:S,align:C,getPopupContainer:$,transitionName:x,animation:P,overlayClassName:w}=e,O=VZ(e,["prefixCls","arrow","showAction","overlayStyle","trigger","placement","align","getPopupContainer","transitionName","animation","overlayClassName"]);return g(ss,k(k({},O),{},{prefixCls:p,ref:a,popupClassName:ge(w,{[`${p}-show-arrow`]:v}),popupStyle:m,builtinPlacements:WZ,action:b,showAction:h,hideAction:f.value||[],popupPlacement:S,popupAlign:C,popupTransitionName:x,popupAnimation:P,popupVisible:i.value,stretch:c.value?"minWidth":"",onPopupVisibleChange:s,getPopupContainer:$}),{popup:u,default:d})}}}),KZ=e=>{const{componentCls:t,colorPrimary:n}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0}}}}},UZ=Ue("Wave",e=>[KZ(e)]);function GZ(e){const t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return t&&t[1]&&t[2]&&t[3]?!(t[1]===t[2]&&t[2]===t[3]):!0}function R0(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&GZ(e)&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"}function XZ(e){const{borderTopColor:t,borderColor:n,backgroundColor:o}=getComputedStyle(e);return R0(t)?t:R0(n)?n:R0(o)?o:null}function D0(e){return Number.isNaN(e)?0:e}const YZ=le({props:{target:De(),className:String},setup(e){const t=se(null),[n,o]=$t(null),[r,i]=$t([]),[a,l]=$t(0),[s,u]=$t(0),[c,d]=$t(0),[f,p]=$t(0),[v,h]=$t(!1);function m(){const{target:w}=e,O=getComputedStyle(w);o(XZ(w));const I=O.position==="static",{borderLeftWidth:_,borderTopWidth:T}=O;l(I?w.offsetLeft:D0(-parseFloat(_))),u(I?w.offsetTop:D0(-parseFloat(T))),d(w.offsetWidth),p(w.offsetHeight);const{borderTopLeftRadius:A,borderTopRightRadius:R,borderBottomLeftRadius:H,borderBottomRightRadius:M}=O;i([A,R,M,H].map(D=>D0(parseFloat(D))))}let b,S,C;const $=()=>{clearTimeout(C),Ze.cancel(S),b==null||b.disconnect()},x=()=>{var w;const O=(w=t.value)===null||w===void 0?void 0:w.parentElement;O&&(Fa(null,O),O.parentElement&&O.parentElement.removeChild(O))};Ke(()=>{$(),C=setTimeout(()=>{x()},5e3);const{target:w}=e;w&&(S=Ze(()=>{m(),h(!0)}),typeof ResizeObserver<"u"&&(b=new ResizeObserver(m),b.observe(w)))}),tt(()=>{$()});const P=w=>{w.propertyName==="opacity"&&x()};return()=>{if(!v.value)return null;const w={left:`${a.value}px`,top:`${s.value}px`,width:`${c.value}px`,height:`${f.value}px`,borderRadius:r.value.map(O=>`${O}px`).join(" ")};return n&&(w["--wave-color"]=n.value),g(Nn,{appear:!0,name:"wave-motion",appearFromClass:"wave-motion-appear",appearActiveClass:"wave-motion-appear",appearToClass:"wave-motion-appear wave-motion-appear-active"},{default:()=>[g("div",{ref:t,class:e.className,style:w,onTransitionend:P},null)]})}}});function qZ(e,t){const n=document.createElement("div");return n.style.position="absolute",n.style.left="0px",n.style.top="0px",e==null||e.insertBefore(n,e==null?void 0:e.firstChild),Fa(g(YZ,{target:e,className:t},null),n),()=>{Fa(null,n),n.parentElement&&n.parentElement.removeChild(n)}}function JZ(e,t){const n=Jt();let o;function r(){var i;const a=Co(n);o==null||o(),!(!((i=t==null?void 0:t.value)===null||i===void 0)&&i.disabled||!a)&&(o=qZ(a,e.value))}return tt(()=>{o==null||o()}),r}const zC=le({compatConfig:{MODE:3},name:"Wave",props:{disabled:Boolean},setup(e,t){let{slots:n}=t;const o=Jt(),{prefixCls:r,wave:i}=Te("wave",e),[,a]=UZ(r),l=JZ(E(()=>ge(r.value,a.value)),i);let s;const u=()=>{Co(o).removeEventListener("click",s,!0)};return Ke(()=>{be(()=>e.disabled,()=>{u(),ot(()=>{const c=Co(o);c==null||c.removeEventListener("click",s,!0),!(!c||c.nodeType!==1||e.disabled)&&(s=d=>{d.target.tagName==="INPUT"||!Pv(d.target)||!c.getAttribute||c.getAttribute("disabled")||c.disabled||c.className.includes("disabled")||c.className.includes("-leave")||l()},c.addEventListener("click",s,!0))})},{immediate:!0,flush:"post"})}),tt(()=>{u()}),()=>{var c;return(c=n.default)===null||c===void 0?void 0:c.call(n)[0]}}});function oh(e){return e==="danger"?{danger:!0}:{type:e}}const $8=()=>({prefixCls:String,type:String,htmlType:{type:String,default:"button"},shape:{type:String},size:{type:String},loading:{type:[Boolean,Object],default:()=>!1},disabled:{type:Boolean,default:void 0},ghost:{type:Boolean,default:void 0},block:{type:Boolean,default:void 0},danger:{type:Boolean,default:void 0},icon:K.any,href:String,target:String,title:String,onClick:zl(),onMousedown:zl()}),NO=e=>{e&&(e.style.width="0px",e.style.opacity="0",e.style.transform="scale(0)")},kO=e=>{ot(()=>{e&&(e.style.width=`${e.scrollWidth}px`,e.style.opacity="1",e.style.transform="scale(1)")})},LO=e=>{e&&e.style&&(e.style.width=null,e.style.opacity=null,e.style.transform=null)},ZZ=le({compatConfig:{MODE:3},name:"LoadingIcon",props:{prefixCls:String,loading:[Boolean,Object],existIcon:Boolean},setup(e){return()=>{const{existIcon:t,prefixCls:n,loading:o}=e;if(t)return g("span",{class:`${n}-loading-icon`},[g(Po,null,null)]);const r=!!o;return g(Nn,{name:`${n}-loading-icon-motion`,onBeforeEnter:NO,onEnter:kO,onAfterEnter:LO,onBeforeLeave:kO,onLeave:i=>{setTimeout(()=>{NO(i)})},onAfterLeave:LO},{default:()=>[r?g("span",{class:`${n}-loading-icon`},[g(Po,null,null)]):null]})}}}),FO=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),QZ=e=>{const{componentCls:t,fontSize:n,lineWidth:o,colorPrimaryHover:r,colorErrorHover:i}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:-o,[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},FO(`${t}-primary`,r),FO(`${t}-danger`,i)]}};function eQ(e,t){return{[`&-item:not(${t}-last-item)`]:{marginBottom:-e.lineWidth},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function tQ(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function nQ(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:y(y({},eQ(e,t)),tQ(e.componentCls,t))}}const oQ=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{outline:"none",position:"relative",display:"inline-block",fontWeight:400,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",lineHeight:e.lineHeight,color:e.colorText,"> span":{display:"inline-block"},[`> ${n} + span, > span + ${n}`]:{marginInlineStart:e.marginXS},"> a":{color:"currentColor"},"&:not(:disabled)":y({},Ji(e)),[`&-icon-only${t}-compact-item`]:{flex:"none"},[`&-compact-item${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-e.lineWidth,insetInlineStart:-e.lineWidth,display:"inline-block",width:e.lineWidth,height:`calc(100% + ${e.lineWidth*2}px)`,backgroundColor:e.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-vertical-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-e.lineWidth,insetInlineStart:-e.lineWidth,display:"inline-block",width:`calc(100% + ${e.lineWidth*2}px)`,height:e.lineWidth,backgroundColor:e.colorPrimaryHover,content:'""'}}}}}}},Zi=(e,t)=>({"&:not(:disabled)":{"&:hover":e,"&:active":t}}),rQ=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),iQ=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.controlHeight/2,paddingInlineEnd:e.controlHeight/2}),Wy=e=>({cursor:"not-allowed",borderColor:e.colorBorder,color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,boxShadow:"none"}),rh=(e,t,n,o,r,i,a)=>({[`&${e}-background-ghost`]:y(y({color:t||void 0,backgroundColor:"transparent",borderColor:n||void 0,boxShadow:"none"},Zi(y({backgroundColor:"transparent"},i),y({backgroundColor:"transparent"},a))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:r||void 0}})}),jC=e=>({"&:disabled":y({},Wy(e))}),w8=e=>y({},jC(e)),ih=e=>({"&:disabled":{cursor:"not-allowed",color:e.colorTextDisabled}}),P8=e=>y(y(y(y(y({},w8(e)),{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`}),Zi({color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),rh(e.componentCls,e.colorBgContainer,e.colorBgContainer,e.colorTextDisabled,e.colorBorder)),{[`&${e.componentCls}-dangerous`]:y(y(y({color:e.colorError,borderColor:e.colorError},Zi({color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),rh(e.componentCls,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder)),jC(e))}),aQ=e=>y(y(y(y(y({},w8(e)),{color:e.colorTextLightSolid,backgroundColor:e.colorPrimary,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`}),Zi({color:e.colorTextLightSolid,backgroundColor:e.colorPrimaryHover},{color:e.colorTextLightSolid,backgroundColor:e.colorPrimaryActive})),rh(e.componentCls,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),{[`&${e.componentCls}-dangerous`]:y(y(y({backgroundColor:e.colorError,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`},Zi({backgroundColor:e.colorErrorHover},{backgroundColor:e.colorErrorActive})),rh(e.componentCls,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),jC(e))}),lQ=e=>y(y({},P8(e)),{borderStyle:"dashed"}),sQ=e=>y(y(y({color:e.colorLink},Zi({color:e.colorLinkHover},{color:e.colorLinkActive})),ih(e)),{[`&${e.componentCls}-dangerous`]:y(y({color:e.colorError},Zi({color:e.colorErrorHover},{color:e.colorErrorActive})),ih(e))}),cQ=e=>y(y(y({},Zi({color:e.colorText,backgroundColor:e.colorBgTextHover},{color:e.colorText,backgroundColor:e.colorBgTextActive})),ih(e)),{[`&${e.componentCls}-dangerous`]:y(y({color:e.colorError},ih(e)),Zi({color:e.colorErrorHover,backgroundColor:e.colorErrorBg},{color:e.colorErrorHover,backgroundColor:e.colorErrorBg}))}),uQ=e=>y(y({},Wy(e)),{[`&${e.componentCls}:hover`]:y({},Wy(e))}),dQ=e=>{const{componentCls:t}=e;return{[`${t}-default`]:P8(e),[`${t}-primary`]:aQ(e),[`${t}-dashed`]:lQ(e),[`${t}-link`]:sQ(e),[`${t}-text`]:cQ(e),[`${t}-disabled`]:uQ(e)}},WC=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:n,iconCls:o,controlHeight:r,fontSize:i,lineHeight:a,lineWidth:l,borderRadius:s,buttonPaddingHorizontal:u}=e,c=Math.max(0,(r-i*a)/2-l),d=u-l,f=`${n}-icon-only`;return[{[`${n}${t}`]:{fontSize:i,height:r,padding:`${c}px ${d}px`,borderRadius:s,[`&${f}`]:{width:r,paddingInlineStart:0,paddingInlineEnd:0,[`&${n}-round`]:{width:"auto"},"> span":{transform:"scale(1.143)"}},[`&${n}-loading`]:{opacity:e.opacityLoading,cursor:"default"},[`${n}-loading-icon`]:{transition:`width ${e.motionDurationSlow} ${e.motionEaseInOut}, opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`&:not(${f}) ${n}-loading-icon > ${o}`]:{marginInlineEnd:e.marginXS}}},{[`${n}${n}-circle${t}`]:rQ(e)},{[`${n}${n}-round${t}`]:iQ(e)}]},fQ=e=>WC(e),pQ=e=>{const t=Be(e,{controlHeight:e.controlHeightSM,padding:e.paddingXS,buttonPaddingHorizontal:8,borderRadius:e.borderRadiusSM});return WC(t,`${e.componentCls}-sm`)},gQ=e=>{const t=Be(e,{controlHeight:e.controlHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG});return WC(t,`${e.componentCls}-lg`)},hQ=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},vQ=Ue("Button",e=>{const{controlTmpOutline:t,paddingContentHorizontal:n}=e,o=Be(e,{colorOutlineDefault:t,buttonPaddingHorizontal:n});return[oQ(o),pQ(o),fQ(o),gQ(o),hQ(o),dQ(o),QZ(o),tu(e,{focus:!1}),nQ(e)]}),mQ=()=>({prefixCls:String,size:{type:String}}),O8=CC(),ah=le({compatConfig:{MODE:3},name:"AButtonGroup",props:mQ(),setup(e,t){let{slots:n}=t;const{prefixCls:o,direction:r}=Te("btn-group",e),[,,i]=na();O8.useProvide(rt({size:E(()=>e.size)}));const a=E(()=>{const{size:l}=e;let s="";switch(l){case"large":s="lg";break;case"small":s="sm";break;case"middle":case void 0:break;default:Mt(!l,"Button.Group","Invalid prop `size`.")}return{[`${o.value}`]:!0,[`${o.value}-${s}`]:s,[`${o.value}-rtl`]:r.value==="rtl",[i.value]:!0}});return()=>{var l;return g("div",{class:a.value},[Ot((l=n.default)===null||l===void 0?void 0:l.call(n))])}}}),BO=/^[\u4e00-\u9fa5]{2}$/,HO=BO.test.bind(BO);function ap(e){return e==="text"||e==="link"}const Qt=le({compatConfig:{MODE:3},name:"AButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:Qe($8(),{type:"default"}),slots:Object,setup(e,t){let{slots:n,attrs:o,emit:r,expose:i}=t;const{prefixCls:a,autoInsertSpaceInButton:l,direction:s,size:u}=Te("btn",e),[c,d]=vQ(a),f=O8.useInject(),p=ko(),v=E(()=>{var M;return(M=e.disabled)!==null&&M!==void 0?M:p.value}),h=se(null),m=se(void 0);let b=!1;const S=se(!1),C=se(!1),$=E(()=>l.value!==!1),{compactSize:x,compactItemClassnames:P}=Xa(a,s),w=E(()=>typeof e.loading=="object"&&e.loading.delay?e.loading.delay||!0:!!e.loading);be(w,M=>{clearTimeout(m.value),typeof w.value=="number"?m.value=setTimeout(()=>{S.value=M},w.value):S.value=M},{immediate:!0});const O=E(()=>{const{type:M,shape:D="default",ghost:N,block:L,danger:F}=e,B=a.value,j={large:"lg",small:"sm",middle:void 0},z=x.value||(f==null?void 0:f.size)||u.value,G=z&&j[z]||"";return[P.value,{[d.value]:!0,[`${B}`]:!0,[`${B}-${D}`]:D!=="default"&&D,[`${B}-${M}`]:M,[`${B}-${G}`]:G,[`${B}-loading`]:S.value,[`${B}-background-ghost`]:N&&!ap(M),[`${B}-two-chinese-chars`]:C.value&&$.value,[`${B}-block`]:L,[`${B}-dangerous`]:!!F,[`${B}-rtl`]:s.value==="rtl"}]}),I=()=>{const M=h.value;if(!M||l.value===!1)return;const D=M.textContent;b&&HO(D)?C.value||(C.value=!0):C.value&&(C.value=!1)},_=M=>{if(S.value||v.value){M.preventDefault();return}r("click",M)},T=M=>{r("mousedown",M)},A=(M,D)=>{const N=D?" ":"";if(M.type===ta){let L=M.children.trim();return HO(L)&&(L=L.split("").join(N)),g("span",null,[L])}return M};return Ve(()=>{Mt(!(e.ghost&&ap(e.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),Ke(I),uo(I),tt(()=>{m.value&&clearTimeout(m.value)}),i({focus:()=>{var M;(M=h.value)===null||M===void 0||M.focus()},blur:()=>{var M;(M=h.value)===null||M===void 0||M.blur()}}),()=>{var M,D;const{icon:N=(M=n.icon)===null||M===void 0?void 0:M.call(n)}=e,L=Ot((D=n.default)===null||D===void 0?void 0:D.call(n));b=L.length===1&&!N&&!ap(e.type);const{type:F,htmlType:B,href:j,title:z,target:G}=e,Q=S.value?"loading":N,Y=y(y({},o),{title:z,disabled:v.value,class:[O.value,o.class,{[`${a.value}-icon-only`]:L.length===0&&!!Q}],onClick:_,onMousedown:T});v.value||delete Y.disabled;const oe=N&&!S.value?N:g(ZZ,{existIcon:!!N,prefixCls:a.value,loading:!!S.value},null),Z=L.map(ne=>A(ne,b&&$.value));if(j!==void 0)return c(g("a",k(k({},Y),{},{href:j,target:G,ref:h}),[oe,Z]));let re=g("button",k(k({},Y),{},{ref:h,type:B}),[oe,Z]);if(!ap(F)){const ne=function(){return re}();re=g(zC,{ref:"wave",disabled:!!S.value},{default:()=>[ne]})}return c(re)}}});Qt.Group=ah;Qt.install=function(e){return e.component(Qt.name,Qt),e.component(ah.name,ah),e};const I8=()=>({arrow:He([Boolean,Object]),trigger:{type:[Array,String]},menu:De(),overlay:K.any,visible:$e(),open:$e(),disabled:$e(),danger:$e(),autofocus:$e(),align:De(),getPopupContainer:Function,prefixCls:String,transitionName:String,placement:String,overlayClassName:String,overlayStyle:De(),forceRender:$e(),mouseEnterDelay:Number,mouseLeaveDelay:Number,openClassName:String,minOverlayWidthMatchTrigger:$e(),destroyPopupOnHide:$e(),onVisibleChange:{type:Function},"onUpdate:visible":{type:Function},onOpenChange:{type:Function},"onUpdate:open":{type:Function}}),N0=$8(),bQ=()=>y(y({},I8()),{type:N0.type,size:String,htmlType:N0.htmlType,href:String,disabled:$e(),prefixCls:String,icon:K.any,title:String,loading:N0.loading,onClick:zl()});var yQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};function zO(e){for(var t=1;t{const{componentCls:t,antCls:n,paddingXS:o,opacityLoading:r}=e;return{[`${t}-button`]:{whiteSpace:"nowrap",[`&${n}-btn-group > ${n}-btn`]:{[`&-loading, &-loading + ${n}-btn`]:{cursor:"default",pointerEvents:"none",opacity:r},[`&:last-child:not(:first-child):not(${n}-btn-icon-only)`]:{paddingInline:o}}}}},xQ=e=>{const{componentCls:t,menuCls:n,colorError:o,colorTextLightSolid:r}=e,i=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:o,"&:hover":{color:r,backgroundColor:o}}}}}},$Q=e=>{const{componentCls:t,menuCls:n,zIndexPopup:o,dropdownArrowDistance:r,dropdownArrowOffset:i,sizePopupArrow:a,antCls:l,iconCls:s,motionDurationMid:u,dropdownPaddingVertical:c,fontSize:d,dropdownEdgeChildPadding:f,colorTextDisabled:p,fontSizeIcon:v,controlPaddingHorizontal:h,colorBgElevated:m,boxShadowPopoverArrow:b}=e;return[{[t]:y(y({},qe(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:o,display:"block","&::before":{position:"absolute",insetBlock:-r+a/2,zIndex:-9999,opacity:1e-4,content:'""'},[`${t}-wrap`]:{position:"relative",[`${l}-btn > ${s}-down`]:{fontSize:v},[`${s}-down::before`]:{transition:`transform ${u}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[` &-show-arrow${t}-placement-topLeft, &-show-arrow${t}-placement-top, &-show-arrow${t}-placement-topRight @@ -201,16 +201,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho &${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottom, &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottom, &${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomRight, - &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:jv},[`&${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topLeft, + &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:zv},[`&${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topLeft, &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topLeft, &${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-top, &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-top, &${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topRight, - &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Vv},[`&${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomLeft, + &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Wv},[`&${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomLeft, &${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottom, - &${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Wv},[`&${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topLeft, + &${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:jv},[`&${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topLeft, &${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-top, - &${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Kv}})},{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:o,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul,li":{listStyle:"none"},ul:{marginInline:"0.3em"}},[`${t}, ${t}-menu-submenu`]:{[n]:y(y({padding:f,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},Ji(e)),{[`${n}-item-group-title`]:{padding:`${c}px ${h}px`,color:e.colorTextDescription,transition:`all ${u}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center",borderRadius:e.borderRadiusSM},[`${n}-item-icon`]:{minWidth:d,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${u}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${n}-item, ${n}-submenu-title`]:y(y({clear:"both",margin:0,padding:`${c}px ${h}px`,color:e.colorText,fontWeight:"normal",fontSize:d,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${u}`,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},Ji(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:p,cursor:"not-allowed","&:hover":{color:p,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${e.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorTextDescription,fontSize:v,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${e.marginXS}px`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:h+e.fontSizeSM},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:p,backgroundColor:m,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})}},[vi(e,"slide-up"),vi(e,"slide-down"),Ic(e,"move-up"),Ic(e,"move-down"),eu(e,"zoom-big")]]},TA=Ue("Dropdown",(e,t)=>{let{rootPrefixCls:n}=t;const{marginXXS:o,sizePopupArrow:r,controlHeight:i,fontSize:a,lineHeight:l,paddingXXS:s,componentCls:u,borderRadiusOuter:c,borderRadiusLG:d}=e,f=(i-a*l)/2,{dropdownArrowOffset:p}=bA({sizePopupArrow:r,contentRadius:d,borderRadiusOuter:c}),v=Be(e,{menuCls:`${u}-menu`,rootPrefixCls:n,dropdownArrowDistance:r/2+o,dropdownArrowOffset:p,dropdownPaddingVertical:f,dropdownEdgeChildPadding:s});return[$Q(v),CQ(v),xQ(v)]},e=>({zIndexPopup:e.zIndexPopupBase+50}));var wQ=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{r("update:visible",f),r("visibleChange",f),r("update:open",f),r("openChange",f)},{prefixCls:a,direction:l,getPopupContainer:s}=Te("dropdown",e),u=E(()=>`${a.value}-button`),[c,d]=TA(a);return()=>{var f,p;const v=y(y({},e),o),{type:h="default",disabled:m,danger:b,loading:S,htmlType:C,class:$="",overlay:x=(f=n.overlay)===null||f===void 0?void 0:f.call(n),trigger:P,align:w,open:O,visible:I,onVisibleChange:_,placement:T=l.value==="rtl"?"bottomLeft":"bottomRight",href:A,title:R,icon:H=((p=n.icon)===null||p===void 0?void 0:p.call(n))||g(yf,null,null),mouseEnterDelay:M,mouseLeaveDelay:D,overlayClassName:N,overlayStyle:L,destroyPopupOnHide:F,onClick:B,"onUpdate:open":j}=v,z=wQ(v,["type","disabled","danger","loading","htmlType","class","overlay","trigger","align","open","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:open"]),G={align:w,disabled:m,trigger:m?[]:P,placement:T,getPopupContainer:s==null?void 0:s.value,onOpenChange:i,mouseEnterDelay:M,mouseLeaveDelay:D,open:O??I,overlayClassName:N,overlayStyle:L,destroyPopupOnHide:F},Q=g(Qt,{danger:b,type:h,disabled:m,loading:S,onClick:B,htmlType:C,href:A,title:R},{default:n.default}),Y=g(Qt,{danger:b,type:h,icon:H},null);return c(g(PQ,k(k({},z),{},{class:ge(u.value,$,d.value)}),{default:()=>[n.leftButton?n.leftButton({button:Q}):Q,g(zr,G,{default:()=>[n.rightButton?n.rightButton({button:Y}):Y],overlay:()=>x})]}))}}});var OQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};function jO(e){for(var t=1;tze(EA,void 0),VC=e=>{var t,n,o;const{prefixCls:r,mode:i,selectable:a,validator:l,onClick:s,expandIcon:u}=_A()||{};Xe(EA,{prefixCls:E(()=>{var c,d;return(d=(c=e.prefixCls)===null||c===void 0?void 0:c.value)!==null&&d!==void 0?d:r==null?void 0:r.value}),mode:E(()=>{var c,d;return(d=(c=e.mode)===null||c===void 0?void 0:c.value)!==null&&d!==void 0?d:i==null?void 0:i.value}),selectable:E(()=>{var c,d;return(d=(c=e.selectable)===null||c===void 0?void 0:c.value)!==null&&d!==void 0?d:a==null?void 0:a.value}),validator:(t=e.validator)!==null&&t!==void 0?t:l,onClick:(n=e.onClick)!==null&&n!==void 0?n:s,expandIcon:(o=e.expandIcon)!==null&&o!==void 0?o:u==null?void 0:u.value})},zr=le({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:Qe(IA(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:Object,setup(e,t){let{slots:n,attrs:o,emit:r}=t;const{prefixCls:i,rootPrefixCls:a,direction:l,getPopupContainer:s}=Te("dropdown",e),[u,c]=TA(i),d=E(()=>{const{placement:m="",transitionName:b}=e;return b!==void 0?b:m.includes("top")?`${a.value}-slide-down`:`${a.value}-slide-up`});VC({prefixCls:E(()=>`${i.value}-menu`),expandIcon:E(()=>g("span",{class:`${i.value}-menu-submenu-arrow`},[g(Jo,{class:`${i.value}-menu-submenu-arrow-icon`},null)])),mode:E(()=>"vertical"),selectable:E(()=>!1),onClick:()=>{},validator:m=>{let{mode:b}=m}});const f=()=>{var m,b,S;const C=e.overlay||((m=n.overlay)===null||m===void 0?void 0:m.call(n)),$=Array.isArray(C)?C[0]:C;if(!$)return null;const x=$.props||{};Mt(!x.mode||x.mode==="vertical","Dropdown",`mode="${x.mode}" is not supported for Dropdown's Menu.`);const{selectable:P=!1,expandIcon:w=(S=(b=$.children)===null||b===void 0?void 0:b.expandIcon)===null||S===void 0?void 0:S.call(b)}=x,O=typeof w<"u"&&sn(w)?w:g("span",{class:`${i.value}-menu-submenu-arrow`},[g(Jo,{class:`${i.value}-menu-submenu-arrow-icon`},null)]);return sn($)?mt($,{mode:"vertical",selectable:P,expandIcon:()=>O}):$},p=E(()=>{const m=e.placement;if(!m)return l.value==="rtl"?"bottomRight":"bottomLeft";if(m.includes("Center")){const b=m.slice(0,m.indexOf("Center"));return Mt(!m.includes("Center"),"Dropdown",`You are using '${m}' placement in Dropdown, which is deprecated. Try to use '${b}' instead.`),b}return m}),v=E(()=>typeof e.visible=="boolean"?e.visible:e.open),h=m=>{r("update:visible",m),r("visibleChange",m),r("update:open",m),r("openChange",m)};return()=>{var m,b;const{arrow:S,trigger:C,disabled:$,overlayClassName:x}=e,P=(m=n.default)===null||m===void 0?void 0:m.call(n)[0],w=mt(P,y({class:ge((b=P==null?void 0:P.props)===null||b===void 0?void 0:b.class,{[`${i.value}-rtl`]:l.value==="rtl"},`${i.value}-trigger`)},$?{disabled:$}:{})),O=ge(x,c.value,{[`${i.value}-rtl`]:l.value==="rtl"}),I=$?[]:C;let _;I&&I.includes("contextmenu")&&(_=!0);const T=LC({arrowPointAtCenter:typeof S=="object"&&S.pointAtCenter,autoAdjustOverflow:!0}),A=it(y(y(y({},e),o),{visible:v.value,builtinPlacements:T,overlayClassName:O,arrow:!!S,alignPoint:_,prefixCls:i.value,getPopupContainer:s==null?void 0:s.value,transitionName:d.value,trigger:I,onVisibleChange:h,placement:p.value}),["overlay","onUpdate:visible"]);return u(g(xA,A,{default:()=>[w],overlay:f}))}}});zr.Button=Hd;var TQ=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,href:String,separator:K.any,dropdownProps:De(),overlay:K.any,onClick:zl()}),zd=le({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:EQ(),slots:Object,setup(e,t){let{slots:n,attrs:o,emit:r}=t;const{prefixCls:i}=Te("breadcrumb",e),a=(s,u)=>{const c=mn(n,e,"overlay");return c?g(zr,k(k({},e.dropdownProps),{},{overlay:c,placement:"bottom"}),{default:()=>[g("span",{class:`${u}-overlay-link`},[s,g(cs,null,null)])]}):s},l=s=>{r("click",s)};return()=>{var s;const u=(s=mn(n,e,"separator"))!==null&&s!==void 0?s:"/",c=mn(n,e),{class:d,style:f}=o,p=TQ(o,["class","style"]);let v;return e.href!==void 0?v=g("a",k({class:`${i.value}-link`,onClick:l},p),[c]):v=g("span",k({class:`${i.value}-link`,onClick:l},p),[c]),v=a(v,i.value),c!=null?g("li",{class:d,style:f},[v,u&&g("span",{class:`${i.value}-separator`},[u])]):null}}});function _Q(e,t,n,o){let r;if(r!==void 0)return!!r;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;const l=Object.prototype.hasOwnProperty.bind(t);for(let s=0;s{Xe(MA,e)},ia=()=>ze(MA),RA=Symbol("ForceRenderKey"),MQ=e=>{Xe(RA,e)},DA=()=>ze(RA,!1),NA=Symbol("menuFirstLevelContextKey"),kA=e=>{Xe(NA,e)},AQ=()=>ze(NA,!0),sh=le({compatConfig:{MODE:3},name:"MenuContextProvider",inheritAttrs:!1,props:{mode:{type:String,default:void 0},overflowDisabled:{type:Boolean,default:void 0}},setup(e,t){let{slots:n}=t;const o=ia(),r=y({},o);return e.mode!==void 0&&(r.mode=We(e,"mode")),e.overflowDisabled!==void 0&&(r.overflowDisabled=We(e,"overflowDisabled")),AA(r),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),LA=Symbol("siderCollapsed"),FA=Symbol("siderHookProvider"),lp="$$__vc-menu-more__key",BA=Symbol("KeyPathContext"),KC=()=>ze(BA,{parentEventKeys:E(()=>[]),parentKeys:E(()=>[]),parentInfo:{}}),RQ=(e,t,n)=>{const{parentEventKeys:o,parentKeys:r}=KC(),i=E(()=>[...o.value,e]),a=E(()=>[...r.value,t]);return Xe(BA,{parentEventKeys:i,parentKeys:a,parentInfo:n}),a},HA=Symbol("measure"),WO=le({compatConfig:{MODE:3},setup(e,t){let{slots:n}=t;return Xe(HA,!0),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),UC=()=>ze(HA,!1);function zA(e){const{mode:t,rtl:n,inlineIndent:o}=ia();return E(()=>t.value!=="inline"?null:n.value?{paddingRight:`${e.value*o.value}px`}:{paddingLeft:`${e.value*o.value}px`})}let DQ=0;const NQ=()=>({id:String,role:String,disabled:Boolean,danger:Boolean,title:{type:[String,Boolean],default:void 0},icon:K.any,onMouseenter:Function,onMouseleave:Function,onClick:Function,onKeydown:Function,onFocus:Function,originItemValue:De()}),ui=le({compatConfig:{MODE:3},name:"AMenuItem",inheritAttrs:!1,props:NQ(),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r}=t;const i=Jt(),a=UC(),l=typeof i.vnode.key=="symbol"?String(i.vnode.key):i.vnode.key;Mt(typeof i.vnode.key!="symbol","MenuItem",`MenuItem \`:key="${String(l)}"\` not support Symbol type`);const s=`menu_item_${++DQ}_$$_${l}`,{parentEventKeys:u,parentKeys:c}=KC(),{prefixCls:d,activeKeys:f,disabled:p,changeActiveKeys:v,rtl:h,inlineCollapsed:m,siderCollapsed:b,onItemClick:S,selectedKeys:C,registerMenuInfo:$,unRegisterMenuInfo:x}=ia(),P=AQ(),w=se(!1),O=E(()=>[...c.value,l]);$(s,{eventKey:s,key:l,parentEventKeys:u,parentKeys:c,isLeaf:!0}),tt(()=>{x(s)}),be(f,()=>{w.value=!!f.value.find(j=>j===l)},{immediate:!0});const _=E(()=>p.value||e.disabled),T=E(()=>C.value.includes(l)),A=E(()=>{const j=`${d.value}-item`;return{[`${j}`]:!0,[`${j}-danger`]:e.danger,[`${j}-active`]:w.value,[`${j}-selected`]:T.value,[`${j}-disabled`]:_.value}}),R=j=>({key:l,eventKey:s,keyPath:O.value,eventKeyPath:[...u.value,s],domEvent:j,item:y(y({},e),r)}),H=j=>{if(_.value)return;const z=R(j);o("click",j),S(z)},M=j=>{_.value||(v(O.value),o("mouseenter",j))},D=j=>{_.value||(v([]),o("mouseleave",j))},N=j=>{if(o("keydown",j),j.which===Ie.ENTER){const z=R(j);o("click",j),S(z)}},L=j=>{v(O.value),o("focus",j)},F=(j,z)=>{const G=g("span",{class:`${d.value}-title-content`},[z]);return(!j||sn(z)&&z.type==="span")&&z&&m.value&&P&&typeof z=="string"?g("div",{class:`${d.value}-inline-collapsed-noicon`},[z.charAt(0)]):G},B=zA(E(()=>O.value.length));return()=>{var j,z,G,Q,Y;if(a)return null;const oe=(j=e.title)!==null&&j!==void 0?j:(z=n.title)===null||z===void 0?void 0:z.call(n),Z=Ot((G=n.default)===null||G===void 0?void 0:G.call(n)),re=Z.length;let ne=oe;typeof oe>"u"?ne=P&&re?Z:"":oe===!1&&(ne="");const X={title:ne};!b.value&&!m.value&&(X.title=null,X.open=!1);const te={};e.role==="option"&&(te["aria-selected"]=T.value);const W=(Q=e.icon)!==null&&Q!==void 0?Q:(Y=n.icon)===null||Y===void 0?void 0:Y.call(n,e);return g(Ro,k(k({},X),{},{placement:h.value?"left":"right",overlayClassName:`${d.value}-inline-collapsed-tooltip`}),{default:()=>[g(Ki.Item,k(k(k({component:"li"},r),{},{id:e.id,style:y(y({},r.style||{}),B.value),class:[A.value,{[`${r.class}`]:!!r.class,[`${d.value}-item-only-child`]:(W?re+1:re)===1}],role:e.role||"menuitem",tabindex:e.disabled?null:-1,"data-menu-id":l,"aria-disabled":e.disabled},te),{},{onMouseenter:M,onMouseleave:D,onClick:H,onKeydown:N,onFocus:L,title:typeof oe=="string"?oe:void 0}),{default:()=>[mt(typeof W=="function"?W(e.originItemValue):W,{class:`${d.value}-item-icon`},!1),F(W,Z)]})]})}}}),_a={adjustX:1,adjustY:1},kQ={topLeft:{points:["bl","tl"],overflow:_a,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:_a,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:_a,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:_a,offset:[4,0]}},LQ={topLeft:{points:["bl","tl"],overflow:_a,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:_a,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:_a,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:_a,offset:[4,0]}},FQ={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},VO=le({compatConfig:{MODE:3},name:"PopupTrigger",inheritAttrs:!1,props:{prefixCls:String,mode:String,visible:Boolean,popupClassName:String,popupOffset:Array,disabled:Boolean,onVisibleChange:Function},slots:Object,emits:["visibleChange"],setup(e,t){let{slots:n,emit:o}=t;const r=se(!1),{getPopupContainer:i,rtl:a,subMenuOpenDelay:l,subMenuCloseDelay:s,builtinPlacements:u,triggerSubMenuAction:c,forceSubMenuRender:d,motion:f,defaultMotions:p,rootClassName:v}=ia(),h=DA(),m=E(()=>a.value?y(y({},LQ),u.value):y(y({},kQ),u.value)),b=E(()=>FQ[e.mode]),S=se();be(()=>e.visible,x=>{Ze.cancel(S.value),S.value=Ze(()=>{r.value=x})},{immediate:!0}),tt(()=>{Ze.cancel(S.value)});const C=x=>{o("visibleChange",x)},$=E(()=>{var x,P;const w=f.value||((x=p.value)===null||x===void 0?void 0:x[e.mode])||((P=p.value)===null||P===void 0?void 0:P.other),O=typeof w=="function"?w():w;return O?Cr(O.name,{css:!0}):void 0});return()=>{const{prefixCls:x,popupClassName:P,mode:w,popupOffset:O,disabled:I}=e;return g(ss,{prefixCls:x,popupClassName:ge(`${x}-popup`,{[`${x}-rtl`]:a.value},P,v.value),stretch:w==="horizontal"?"minWidth":null,getPopupContainer:i.value,builtinPlacements:m.value,popupPlacement:b.value,popupVisible:r.value,popupAlign:O&&{offset:O},action:I?[]:[c.value],mouseEnterDelay:l.value,mouseLeaveDelay:s.value,onPopupVisibleChange:C,forceRender:h||d.value,popupAnimation:$.value},{popup:n.popup,default:n.default})}}}),GC=(e,t)=>{let{slots:n,attrs:o}=t;var r;const{prefixCls:i,mode:a}=ia();return g("ul",k(k({},o),{},{class:ge(i.value,`${i.value}-sub`,`${i.value}-${a.value==="inline"?"inline":"vertical"}`),"data-menu-list":!0}),[(r=n.default)===null||r===void 0?void 0:r.call(n)])};GC.displayName="SubMenuList";const BQ=le({compatConfig:{MODE:3},name:"InlineSubMenuList",inheritAttrs:!1,props:{id:String,open:Boolean,keyPath:Array},setup(e,t){let{slots:n}=t;const o=E(()=>"inline"),{motion:r,mode:i,defaultMotions:a}=ia(),l=E(()=>i.value===o.value),s=ae(!l.value),u=E(()=>l.value?e.open:!1);be(i,()=>{l.value&&(s.value=!1)},{flush:"post"});const c=E(()=>{var d,f;const p=r.value||((d=a.value)===null||d===void 0?void 0:d[o.value])||((f=a.value)===null||f===void 0?void 0:f.other),v=typeof p=="function"?p():p;return y(y({},v),{appear:e.keyPath.length<=1})});return()=>{var d;return s.value?null:g(sh,{mode:o.value},{default:()=>[g(Nn,c.value,{default:()=>[Pn(g(GC,{id:e.id},{default:()=>[(d=n.default)===null||d===void 0?void 0:d.call(n)]}),[[Vn,u.value]])]})]})}}});let KO=0;const HQ=()=>({icon:K.any,title:K.any,disabled:Boolean,level:Number,popupClassName:String,popupOffset:Array,internalPopupClose:Boolean,eventKey:String,expandIcon:Function,theme:String,onMouseenter:Function,onMouseleave:Function,onTitleClick:Function,originItemValue:De()}),Ul=le({compatConfig:{MODE:3},name:"ASubMenu",inheritAttrs:!1,props:HQ(),slots:Object,setup(e,t){let{slots:n,attrs:o,emit:r}=t;var i,a;kA(!1);const l=UC(),s=Jt(),u=typeof s.vnode.key=="symbol"?String(s.vnode.key):s.vnode.key;Mt(typeof s.vnode.key!="symbol","SubMenu",`SubMenu \`:key="${String(u)}"\` not support Symbol type`);const c=py(u)?u:`sub_menu_${++KO}_$$_not_set_key`,d=(i=e.eventKey)!==null&&i!==void 0?i:py(u)?`sub_menu_${++KO}_$$_${u}`:c,{parentEventKeys:f,parentInfo:p,parentKeys:v}=KC(),h=E(()=>[...v.value,c]),m=se([]),b={eventKey:d,key:c,parentEventKeys:f,childrenEventKeys:m,parentKeys:v};(a=p.childrenEventKeys)===null||a===void 0||a.value.push(d),tt(()=>{var he;p.childrenEventKeys&&(p.childrenEventKeys.value=(he=p.childrenEventKeys)===null||he===void 0?void 0:he.value.filter(V=>V!=d))}),RQ(d,c,b);const{prefixCls:S,activeKeys:C,disabled:$,changeActiveKeys:x,mode:P,inlineCollapsed:w,openKeys:O,overflowDisabled:I,onOpenChange:_,registerMenuInfo:T,unRegisterMenuInfo:A,selectedSubMenuKeys:R,expandIcon:H,theme:M}=ia(),D=u!=null,N=!l&&(DA()||!D);MQ(N),(l&&D||!l&&!D||N)&&(T(d,b),tt(()=>{A(d)}));const L=E(()=>`${S.value}-submenu`),F=E(()=>$.value||e.disabled),B=se(),j=se(),z=E(()=>O.value.includes(c)),G=E(()=>!I.value&&z.value),Q=E(()=>R.value.includes(c)),Y=se(!1);be(C,()=>{Y.value=!!C.value.find(he=>he===c)},{immediate:!0});const oe=he=>{F.value||(r("titleClick",he,c),P.value==="inline"&&_(c,!z.value))},Z=he=>{F.value||(x(h.value),r("mouseenter",he))},re=he=>{F.value||(x([]),r("mouseleave",he))},ne=zA(E(()=>h.value.length)),X=he=>{P.value!=="inline"&&_(c,he)},te=()=>{x(h.value)},W=d&&`${d}-popup`,U=E(()=>ge(S.value,`${S.value}-${e.theme||M.value}`,e.popupClassName)),J=(he,V)=>{if(!V)return w.value&&!v.value.length&&he&&typeof he=="string"?g("div",{class:`${S.value}-inline-collapsed-noicon`},[he.charAt(0)]):g("span",{class:`${S.value}-title-content`},[he]);const q=sn(he)&&he.type==="span";return g(Le,null,[mt(typeof V=="function"?V(e.originItemValue):V,{class:`${S.value}-item-icon`},!1),q?he:g("span",{class:`${S.value}-title-content`},[he])])},de=E(()=>P.value!=="inline"&&h.value.length>1?"vertical":P.value),fe=E(()=>P.value==="horizontal"?"vertical":P.value),pe=E(()=>de.value==="horizontal"?"vertical":de.value),ve=()=>{var he,V;const q=L.value,ie=(he=e.icon)!==null&&he!==void 0?he:(V=n.icon)===null||V===void 0?void 0:V.call(n,e),me=e.expandIcon||n.expandIcon||H.value,Se=J(mn(n,e,"title"),ie);return g("div",{style:ne.value,class:`${q}-title`,tabindex:F.value?null:-1,ref:B,title:typeof Se=="string"?Se:null,"data-menu-id":c,"aria-expanded":G.value,"aria-haspopup":!0,"aria-controls":W,"aria-disabled":F.value,onClick:oe,onFocus:te},[Se,P.value!=="horizontal"&&me?me(y(y({},e),{isOpen:G.value})):g("i",{class:`${q}-arrow`},null)])};return()=>{var he;if(l)return D?(he=n.default)===null||he===void 0?void 0:he.call(n):null;const V=L.value;let q=()=>null;if(!I.value&&P.value!=="inline"){const ie=P.value==="horizontal"?[0,8]:[10,0];q=()=>g(VO,{mode:de.value,prefixCls:V,visible:!e.internalPopupClose&&G.value,popupClassName:U.value,popupOffset:e.popupOffset||ie,disabled:F.value,onVisibleChange:X},{default:()=>[ve()],popup:()=>g(sh,{mode:pe.value},{default:()=>[g(GC,{id:W,ref:j},{default:n.default})]})})}else q=()=>g(VO,null,{default:ve});return g(sh,{mode:fe.value},{default:()=>[g(Ki.Item,k(k({component:"li"},o),{},{role:"none",class:ge(V,`${V}-${P.value}`,o.class,{[`${V}-open`]:G.value,[`${V}-active`]:Y.value,[`${V}-selected`]:Q.value,[`${V}-disabled`]:F.value}),onMouseenter:Z,onMouseleave:re,"data-submenu-id":c}),{default:()=>g(Le,null,[q(),!I.value&&g(BQ,{id:W,open:G.value,keyPath:h.value},{default:n.default})])})]})}}});function jA(e,t){return e.classList?e.classList.contains(t):` ${e.className} `.indexOf(` ${t} `)>-1}function ch(e,t){e.classList?e.classList.add(t):jA(e,t)||(e.className=`${e.className} ${t}`)}function uh(e,t){if(e.classList)e.classList.remove(t);else if(jA(e,t)){const n=e.className;e.className=` ${n} `.replace(` ${t} `," ")}}const Sf=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"ant-motion-collapse",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return{name:e,appear:t,css:!0,onBeforeEnter:n=>{n.style.height="0px",n.style.opacity="0",ch(n,e)},onEnter:n=>{ot(()=>{n.style.height=`${n.scrollHeight}px`,n.style.opacity="1"})},onAfterEnter:n=>{n&&(uh(n,e),n.style.height=null,n.style.opacity=null)},onBeforeLeave:n=>{ch(n,e),n.style.height=`${n.offsetHeight}px`,n.style.opacity=null},onLeave:n=>{setTimeout(()=>{n.style.height="0px",n.style.opacity="0"})},onAfterLeave:n=>{n&&(uh(n,e),n.style&&(n.style.height=null,n.style.opacity=null))}}},zQ=()=>({title:K.any,originItemValue:De()}),jd=le({compatConfig:{MODE:3},name:"AMenuItemGroup",inheritAttrs:!1,props:zQ(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r}=ia(),i=E(()=>`${r.value}-item-group`),a=UC();return()=>{var l,s;return a?(l=n.default)===null||l===void 0?void 0:l.call(n):g("li",k(k({},o),{},{onClick:u=>u.stopPropagation(),class:i.value}),[g("div",{title:typeof e.title=="string"?e.title:void 0,class:`${i.value}-title`},[mn(n,e,"title")]),g("ul",{class:`${i.value}-list`},[(s=n.default)===null||s===void 0?void 0:s.call(n)])])}}}),jQ=()=>({prefixCls:String,dashed:Boolean}),Wd=le({compatConfig:{MODE:3},name:"AMenuDivider",props:jQ(),setup(e){const{prefixCls:t}=ia(),n=E(()=>({[`${t.value}-item-divider`]:!0,[`${t.value}-item-divider-dashed`]:!!e.dashed}));return()=>g("li",{class:n.value},null)}});var WQ=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{if(o&&typeof o=="object"){const i=o,{label:a,children:l,key:s,type:u}=i,c=WQ(i,["label","children","key","type"]),d=s??`tmp-${r}`,f=n?n.parentKeys.slice():[],p=[],v={eventKey:d,key:d,parentEventKeys:ae(f),parentKeys:ae(f),childrenEventKeys:ae(p),isLeaf:!1};if(l||u==="group"){if(u==="group"){const m=Vy(l,t,n);return g(jd,k(k({key:d},c),{},{title:a,originItemValue:o}),{default:()=>[m]})}t.set(d,v),n&&n.childrenEventKeys.push(d);const h=Vy(l,t,{childrenEventKeys:p,parentKeys:[].concat(f,d)});return g(Ul,k(k({key:d},c),{},{title:a,originItemValue:o}),{default:()=>[h]})}return u==="divider"?g(Wd,k({key:d},c),null):(v.isLeaf=!0,t.set(d,v),g(ui,k(k({key:d},c),{},{originItemValue:o}),{default:()=>[a]}))}return null}).filter(o=>o)}function VQ(e){const t=se([]),n=se(!1),o=se(new Map);return be(()=>e.items,()=>{const r=new Map;n.value=!1,e.items?(n.value=!0,t.value=Vy(e.items,r)):t.value=void 0,o.value=r},{immediate:!0,deep:!0}),{itemsNodes:t,store:o,hasItmes:n}}const KQ=e=>{const{componentCls:t,motionDurationSlow:n,menuHorizontalHeight:o,colorSplit:r,lineWidth:i,lineType:a,menuItemPaddingInline:l}=e;return{[`${t}-horizontal`]:{lineHeight:`${o}px`,border:0,borderBottom:`${i}px ${a} ${r}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:l},[`> ${t}-item:hover, + &${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Vv}})},{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:o,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul,li":{listStyle:"none"},ul:{marginInline:"0.3em"}},[`${t}, ${t}-menu-submenu`]:{[n]:y(y({padding:f,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},Ji(e)),{[`${n}-item-group-title`]:{padding:`${c}px ${h}px`,color:e.colorTextDescription,transition:`all ${u}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center",borderRadius:e.borderRadiusSM},[`${n}-item-icon`]:{minWidth:d,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${u}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${n}-item, ${n}-submenu-title`]:y(y({clear:"both",margin:0,padding:`${c}px ${h}px`,color:e.colorText,fontWeight:"normal",fontSize:d,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${u}`,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},Ji(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:p,cursor:"not-allowed","&:hover":{color:p,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${e.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorTextDescription,fontSize:v,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${e.marginXS}px`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:h+e.fontSizeSM},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:p,backgroundColor:m,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})}},[vi(e,"slide-up"),vi(e,"slide-down"),Ic(e,"move-up"),Ic(e,"move-down"),eu(e,"zoom-big")]]},T8=Ue("Dropdown",(e,t)=>{let{rootPrefixCls:n}=t;const{marginXXS:o,sizePopupArrow:r,controlHeight:i,fontSize:a,lineHeight:l,paddingXXS:s,componentCls:u,borderRadiusOuter:c,borderRadiusLG:d}=e,f=(i-a*l)/2,{dropdownArrowOffset:p}=b8({sizePopupArrow:r,contentRadius:d,borderRadiusOuter:c}),v=Be(e,{menuCls:`${u}-menu`,rootPrefixCls:n,dropdownArrowDistance:r/2+o,dropdownArrowOffset:p,dropdownPaddingVertical:f,dropdownEdgeChildPadding:s});return[$Q(v),CQ(v),xQ(v)]},e=>({zIndexPopup:e.zIndexPopupBase+50}));var wQ=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{r("update:visible",f),r("visibleChange",f),r("update:open",f),r("openChange",f)},{prefixCls:a,direction:l,getPopupContainer:s}=Te("dropdown",e),u=E(()=>`${a.value}-button`),[c,d]=T8(a);return()=>{var f,p;const v=y(y({},e),o),{type:h="default",disabled:m,danger:b,loading:S,htmlType:C,class:$="",overlay:x=(f=n.overlay)===null||f===void 0?void 0:f.call(n),trigger:P,align:w,open:O,visible:I,onVisibleChange:_,placement:T=l.value==="rtl"?"bottomLeft":"bottomRight",href:A,title:R,icon:H=((p=n.icon)===null||p===void 0?void 0:p.call(n))||g(yf,null,null),mouseEnterDelay:M,mouseLeaveDelay:D,overlayClassName:N,overlayStyle:L,destroyPopupOnHide:F,onClick:B,"onUpdate:open":j}=v,z=wQ(v,["type","disabled","danger","loading","htmlType","class","overlay","trigger","align","open","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:open"]),G={align:w,disabled:m,trigger:m?[]:P,placement:T,getPopupContainer:s==null?void 0:s.value,onOpenChange:i,mouseEnterDelay:M,mouseLeaveDelay:D,open:O??I,overlayClassName:N,overlayStyle:L,destroyPopupOnHide:F},Q=g(Qt,{danger:b,type:h,disabled:m,loading:S,onClick:B,htmlType:C,href:A,title:R},{default:n.default}),Y=g(Qt,{danger:b,type:h,icon:H},null);return c(g(PQ,k(k({},z),{},{class:ge(u.value,$,d.value)}),{default:()=>[n.leftButton?n.leftButton({button:Q}):Q,g(zr,G,{default:()=>[n.rightButton?n.rightButton({button:Y}):Y],overlay:()=>x})]}))}}});var OQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};function jO(e){for(var t=1;tze(E8,void 0),VC=e=>{var t,n,o;const{prefixCls:r,mode:i,selectable:a,validator:l,onClick:s,expandIcon:u}=_8()||{};Xe(E8,{prefixCls:E(()=>{var c,d;return(d=(c=e.prefixCls)===null||c===void 0?void 0:c.value)!==null&&d!==void 0?d:r==null?void 0:r.value}),mode:E(()=>{var c,d;return(d=(c=e.mode)===null||c===void 0?void 0:c.value)!==null&&d!==void 0?d:i==null?void 0:i.value}),selectable:E(()=>{var c,d;return(d=(c=e.selectable)===null||c===void 0?void 0:c.value)!==null&&d!==void 0?d:a==null?void 0:a.value}),validator:(t=e.validator)!==null&&t!==void 0?t:l,onClick:(n=e.onClick)!==null&&n!==void 0?n:s,expandIcon:(o=e.expandIcon)!==null&&o!==void 0?o:u==null?void 0:u.value})},zr=le({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:Qe(I8(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:Object,setup(e,t){let{slots:n,attrs:o,emit:r}=t;const{prefixCls:i,rootPrefixCls:a,direction:l,getPopupContainer:s}=Te("dropdown",e),[u,c]=T8(i),d=E(()=>{const{placement:m="",transitionName:b}=e;return b!==void 0?b:m.includes("top")?`${a.value}-slide-down`:`${a.value}-slide-up`});VC({prefixCls:E(()=>`${i.value}-menu`),expandIcon:E(()=>g("span",{class:`${i.value}-menu-submenu-arrow`},[g(Jo,{class:`${i.value}-menu-submenu-arrow-icon`},null)])),mode:E(()=>"vertical"),selectable:E(()=>!1),onClick:()=>{},validator:m=>{let{mode:b}=m}});const f=()=>{var m,b,S;const C=e.overlay||((m=n.overlay)===null||m===void 0?void 0:m.call(n)),$=Array.isArray(C)?C[0]:C;if(!$)return null;const x=$.props||{};Mt(!x.mode||x.mode==="vertical","Dropdown",`mode="${x.mode}" is not supported for Dropdown's Menu.`);const{selectable:P=!1,expandIcon:w=(S=(b=$.children)===null||b===void 0?void 0:b.expandIcon)===null||S===void 0?void 0:S.call(b)}=x,O=typeof w<"u"&&sn(w)?w:g("span",{class:`${i.value}-menu-submenu-arrow`},[g(Jo,{class:`${i.value}-menu-submenu-arrow-icon`},null)]);return sn($)?mt($,{mode:"vertical",selectable:P,expandIcon:()=>O}):$},p=E(()=>{const m=e.placement;if(!m)return l.value==="rtl"?"bottomRight":"bottomLeft";if(m.includes("Center")){const b=m.slice(0,m.indexOf("Center"));return Mt(!m.includes("Center"),"Dropdown",`You are using '${m}' placement in Dropdown, which is deprecated. Try to use '${b}' instead.`),b}return m}),v=E(()=>typeof e.visible=="boolean"?e.visible:e.open),h=m=>{r("update:visible",m),r("visibleChange",m),r("update:open",m),r("openChange",m)};return()=>{var m,b;const{arrow:S,trigger:C,disabled:$,overlayClassName:x}=e,P=(m=n.default)===null||m===void 0?void 0:m.call(n)[0],w=mt(P,y({class:ge((b=P==null?void 0:P.props)===null||b===void 0?void 0:b.class,{[`${i.value}-rtl`]:l.value==="rtl"},`${i.value}-trigger`)},$?{disabled:$}:{})),O=ge(x,c.value,{[`${i.value}-rtl`]:l.value==="rtl"}),I=$?[]:C;let _;I&&I.includes("contextmenu")&&(_=!0);const T=LC({arrowPointAtCenter:typeof S=="object"&&S.pointAtCenter,autoAdjustOverflow:!0}),A=it(y(y(y({},e),o),{visible:v.value,builtinPlacements:T,overlayClassName:O,arrow:!!S,alignPoint:_,prefixCls:i.value,getPopupContainer:s==null?void 0:s.value,transitionName:d.value,trigger:I,onVisibleChange:h,placement:p.value}),["overlay","onUpdate:visible"]);return u(g(x8,A,{default:()=>[w],overlay:f}))}}});zr.Button=Hd;var TQ=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,href:String,separator:K.any,dropdownProps:De(),overlay:K.any,onClick:zl()}),zd=le({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:EQ(),slots:Object,setup(e,t){let{slots:n,attrs:o,emit:r}=t;const{prefixCls:i}=Te("breadcrumb",e),a=(s,u)=>{const c=mn(n,e,"overlay");return c?g(zr,k(k({},e.dropdownProps),{},{overlay:c,placement:"bottom"}),{default:()=>[g("span",{class:`${u}-overlay-link`},[s,g(cs,null,null)])]}):s},l=s=>{r("click",s)};return()=>{var s;const u=(s=mn(n,e,"separator"))!==null&&s!==void 0?s:"/",c=mn(n,e),{class:d,style:f}=o,p=TQ(o,["class","style"]);let v;return e.href!==void 0?v=g("a",k({class:`${i.value}-link`,onClick:l},p),[c]):v=g("span",k({class:`${i.value}-link`,onClick:l},p),[c]),v=a(v,i.value),c!=null?g("li",{class:d,style:f},[v,u&&g("span",{class:`${i.value}-separator`},[u])]):null}}});function _Q(e,t,n,o){let r;if(r!==void 0)return!!r;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;const l=Object.prototype.hasOwnProperty.bind(t);for(let s=0;s{Xe(M8,e)},ia=()=>ze(M8),R8=Symbol("ForceRenderKey"),MQ=e=>{Xe(R8,e)},D8=()=>ze(R8,!1),N8=Symbol("menuFirstLevelContextKey"),k8=e=>{Xe(N8,e)},AQ=()=>ze(N8,!0),lh=le({compatConfig:{MODE:3},name:"MenuContextProvider",inheritAttrs:!1,props:{mode:{type:String,default:void 0},overflowDisabled:{type:Boolean,default:void 0}},setup(e,t){let{slots:n}=t;const o=ia(),r=y({},o);return e.mode!==void 0&&(r.mode=We(e,"mode")),e.overflowDisabled!==void 0&&(r.overflowDisabled=We(e,"overflowDisabled")),A8(r),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),L8=Symbol("siderCollapsed"),F8=Symbol("siderHookProvider"),lp="$$__vc-menu-more__key",B8=Symbol("KeyPathContext"),KC=()=>ze(B8,{parentEventKeys:E(()=>[]),parentKeys:E(()=>[]),parentInfo:{}}),RQ=(e,t,n)=>{const{parentEventKeys:o,parentKeys:r}=KC(),i=E(()=>[...o.value,e]),a=E(()=>[...r.value,t]);return Xe(B8,{parentEventKeys:i,parentKeys:a,parentInfo:n}),a},H8=Symbol("measure"),WO=le({compatConfig:{MODE:3},setup(e,t){let{slots:n}=t;return Xe(H8,!0),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),UC=()=>ze(H8,!1);function z8(e){const{mode:t,rtl:n,inlineIndent:o}=ia();return E(()=>t.value!=="inline"?null:n.value?{paddingRight:`${e.value*o.value}px`}:{paddingLeft:`${e.value*o.value}px`})}let DQ=0;const NQ=()=>({id:String,role:String,disabled:Boolean,danger:Boolean,title:{type:[String,Boolean],default:void 0},icon:K.any,onMouseenter:Function,onMouseleave:Function,onClick:Function,onKeydown:Function,onFocus:Function,originItemValue:De()}),ui=le({compatConfig:{MODE:3},name:"AMenuItem",inheritAttrs:!1,props:NQ(),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r}=t;const i=Jt(),a=UC(),l=typeof i.vnode.key=="symbol"?String(i.vnode.key):i.vnode.key;Mt(typeof i.vnode.key!="symbol","MenuItem",`MenuItem \`:key="${String(l)}"\` not support Symbol type`);const s=`menu_item_${++DQ}_$$_${l}`,{parentEventKeys:u,parentKeys:c}=KC(),{prefixCls:d,activeKeys:f,disabled:p,changeActiveKeys:v,rtl:h,inlineCollapsed:m,siderCollapsed:b,onItemClick:S,selectedKeys:C,registerMenuInfo:$,unRegisterMenuInfo:x}=ia(),P=AQ(),w=se(!1),O=E(()=>[...c.value,l]);$(s,{eventKey:s,key:l,parentEventKeys:u,parentKeys:c,isLeaf:!0}),tt(()=>{x(s)}),be(f,()=>{w.value=!!f.value.find(j=>j===l)},{immediate:!0});const _=E(()=>p.value||e.disabled),T=E(()=>C.value.includes(l)),A=E(()=>{const j=`${d.value}-item`;return{[`${j}`]:!0,[`${j}-danger`]:e.danger,[`${j}-active`]:w.value,[`${j}-selected`]:T.value,[`${j}-disabled`]:_.value}}),R=j=>({key:l,eventKey:s,keyPath:O.value,eventKeyPath:[...u.value,s],domEvent:j,item:y(y({},e),r)}),H=j=>{if(_.value)return;const z=R(j);o("click",j),S(z)},M=j=>{_.value||(v(O.value),o("mouseenter",j))},D=j=>{_.value||(v([]),o("mouseleave",j))},N=j=>{if(o("keydown",j),j.which===Ie.ENTER){const z=R(j);o("click",j),S(z)}},L=j=>{v(O.value),o("focus",j)},F=(j,z)=>{const G=g("span",{class:`${d.value}-title-content`},[z]);return(!j||sn(z)&&z.type==="span")&&z&&m.value&&P&&typeof z=="string"?g("div",{class:`${d.value}-inline-collapsed-noicon`},[z.charAt(0)]):G},B=z8(E(()=>O.value.length));return()=>{var j,z,G,Q,Y;if(a)return null;const oe=(j=e.title)!==null&&j!==void 0?j:(z=n.title)===null||z===void 0?void 0:z.call(n),Z=Ot((G=n.default)===null||G===void 0?void 0:G.call(n)),re=Z.length;let ne=oe;typeof oe>"u"?ne=P&&re?Z:"":oe===!1&&(ne="");const X={title:ne};!b.value&&!m.value&&(X.title=null,X.open=!1);const te={};e.role==="option"&&(te["aria-selected"]=T.value);const W=(Q=e.icon)!==null&&Q!==void 0?Q:(Y=n.icon)===null||Y===void 0?void 0:Y.call(n,e);return g(Ro,k(k({},X),{},{placement:h.value?"left":"right",overlayClassName:`${d.value}-inline-collapsed-tooltip`}),{default:()=>[g(Ki.Item,k(k(k({component:"li"},r),{},{id:e.id,style:y(y({},r.style||{}),B.value),class:[A.value,{[`${r.class}`]:!!r.class,[`${d.value}-item-only-child`]:(W?re+1:re)===1}],role:e.role||"menuitem",tabindex:e.disabled?null:-1,"data-menu-id":l,"aria-disabled":e.disabled},te),{},{onMouseenter:M,onMouseleave:D,onClick:H,onKeydown:N,onFocus:L,title:typeof oe=="string"?oe:void 0}),{default:()=>[mt(typeof W=="function"?W(e.originItemValue):W,{class:`${d.value}-item-icon`},!1),F(W,Z)]})]})}}}),_a={adjustX:1,adjustY:1},kQ={topLeft:{points:["bl","tl"],overflow:_a,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:_a,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:_a,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:_a,offset:[4,0]}},LQ={topLeft:{points:["bl","tl"],overflow:_a,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:_a,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:_a,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:_a,offset:[4,0]}},FQ={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},VO=le({compatConfig:{MODE:3},name:"PopupTrigger",inheritAttrs:!1,props:{prefixCls:String,mode:String,visible:Boolean,popupClassName:String,popupOffset:Array,disabled:Boolean,onVisibleChange:Function},slots:Object,emits:["visibleChange"],setup(e,t){let{slots:n,emit:o}=t;const r=se(!1),{getPopupContainer:i,rtl:a,subMenuOpenDelay:l,subMenuCloseDelay:s,builtinPlacements:u,triggerSubMenuAction:c,forceSubMenuRender:d,motion:f,defaultMotions:p,rootClassName:v}=ia(),h=D8(),m=E(()=>a.value?y(y({},LQ),u.value):y(y({},kQ),u.value)),b=E(()=>FQ[e.mode]),S=se();be(()=>e.visible,x=>{Ze.cancel(S.value),S.value=Ze(()=>{r.value=x})},{immediate:!0}),tt(()=>{Ze.cancel(S.value)});const C=x=>{o("visibleChange",x)},$=E(()=>{var x,P;const w=f.value||((x=p.value)===null||x===void 0?void 0:x[e.mode])||((P=p.value)===null||P===void 0?void 0:P.other),O=typeof w=="function"?w():w;return O?Cr(O.name,{css:!0}):void 0});return()=>{const{prefixCls:x,popupClassName:P,mode:w,popupOffset:O,disabled:I}=e;return g(ss,{prefixCls:x,popupClassName:ge(`${x}-popup`,{[`${x}-rtl`]:a.value},P,v.value),stretch:w==="horizontal"?"minWidth":null,getPopupContainer:i.value,builtinPlacements:m.value,popupPlacement:b.value,popupVisible:r.value,popupAlign:O&&{offset:O},action:I?[]:[c.value],mouseEnterDelay:l.value,mouseLeaveDelay:s.value,onPopupVisibleChange:C,forceRender:h||d.value,popupAnimation:$.value},{popup:n.popup,default:n.default})}}}),GC=(e,t)=>{let{slots:n,attrs:o}=t;var r;const{prefixCls:i,mode:a}=ia();return g("ul",k(k({},o),{},{class:ge(i.value,`${i.value}-sub`,`${i.value}-${a.value==="inline"?"inline":"vertical"}`),"data-menu-list":!0}),[(r=n.default)===null||r===void 0?void 0:r.call(n)])};GC.displayName="SubMenuList";const BQ=le({compatConfig:{MODE:3},name:"InlineSubMenuList",inheritAttrs:!1,props:{id:String,open:Boolean,keyPath:Array},setup(e,t){let{slots:n}=t;const o=E(()=>"inline"),{motion:r,mode:i,defaultMotions:a}=ia(),l=E(()=>i.value===o.value),s=ae(!l.value),u=E(()=>l.value?e.open:!1);be(i,()=>{l.value&&(s.value=!1)},{flush:"post"});const c=E(()=>{var d,f;const p=r.value||((d=a.value)===null||d===void 0?void 0:d[o.value])||((f=a.value)===null||f===void 0?void 0:f.other),v=typeof p=="function"?p():p;return y(y({},v),{appear:e.keyPath.length<=1})});return()=>{var d;return s.value?null:g(lh,{mode:o.value},{default:()=>[g(Nn,c.value,{default:()=>[Pn(g(GC,{id:e.id},{default:()=>[(d=n.default)===null||d===void 0?void 0:d.call(n)]}),[[Vn,u.value]])]})]})}}});let KO=0;const HQ=()=>({icon:K.any,title:K.any,disabled:Boolean,level:Number,popupClassName:String,popupOffset:Array,internalPopupClose:Boolean,eventKey:String,expandIcon:Function,theme:String,onMouseenter:Function,onMouseleave:Function,onTitleClick:Function,originItemValue:De()}),Ul=le({compatConfig:{MODE:3},name:"ASubMenu",inheritAttrs:!1,props:HQ(),slots:Object,setup(e,t){let{slots:n,attrs:o,emit:r}=t;var i,a;k8(!1);const l=UC(),s=Jt(),u=typeof s.vnode.key=="symbol"?String(s.vnode.key):s.vnode.key;Mt(typeof s.vnode.key!="symbol","SubMenu",`SubMenu \`:key="${String(u)}"\` not support Symbol type`);const c=py(u)?u:`sub_menu_${++KO}_$$_not_set_key`,d=(i=e.eventKey)!==null&&i!==void 0?i:py(u)?`sub_menu_${++KO}_$$_${u}`:c,{parentEventKeys:f,parentInfo:p,parentKeys:v}=KC(),h=E(()=>[...v.value,c]),m=se([]),b={eventKey:d,key:c,parentEventKeys:f,childrenEventKeys:m,parentKeys:v};(a=p.childrenEventKeys)===null||a===void 0||a.value.push(d),tt(()=>{var he;p.childrenEventKeys&&(p.childrenEventKeys.value=(he=p.childrenEventKeys)===null||he===void 0?void 0:he.value.filter(V=>V!=d))}),RQ(d,c,b);const{prefixCls:S,activeKeys:C,disabled:$,changeActiveKeys:x,mode:P,inlineCollapsed:w,openKeys:O,overflowDisabled:I,onOpenChange:_,registerMenuInfo:T,unRegisterMenuInfo:A,selectedSubMenuKeys:R,expandIcon:H,theme:M}=ia(),D=u!=null,N=!l&&(D8()||!D);MQ(N),(l&&D||!l&&!D||N)&&(T(d,b),tt(()=>{A(d)}));const L=E(()=>`${S.value}-submenu`),F=E(()=>$.value||e.disabled),B=se(),j=se(),z=E(()=>O.value.includes(c)),G=E(()=>!I.value&&z.value),Q=E(()=>R.value.includes(c)),Y=se(!1);be(C,()=>{Y.value=!!C.value.find(he=>he===c)},{immediate:!0});const oe=he=>{F.value||(r("titleClick",he,c),P.value==="inline"&&_(c,!z.value))},Z=he=>{F.value||(x(h.value),r("mouseenter",he))},re=he=>{F.value||(x([]),r("mouseleave",he))},ne=z8(E(()=>h.value.length)),X=he=>{P.value!=="inline"&&_(c,he)},te=()=>{x(h.value)},W=d&&`${d}-popup`,U=E(()=>ge(S.value,`${S.value}-${e.theme||M.value}`,e.popupClassName)),J=(he,V)=>{if(!V)return w.value&&!v.value.length&&he&&typeof he=="string"?g("div",{class:`${S.value}-inline-collapsed-noicon`},[he.charAt(0)]):g("span",{class:`${S.value}-title-content`},[he]);const q=sn(he)&&he.type==="span";return g(Le,null,[mt(typeof V=="function"?V(e.originItemValue):V,{class:`${S.value}-item-icon`},!1),q?he:g("span",{class:`${S.value}-title-content`},[he])])},de=E(()=>P.value!=="inline"&&h.value.length>1?"vertical":P.value),fe=E(()=>P.value==="horizontal"?"vertical":P.value),pe=E(()=>de.value==="horizontal"?"vertical":de.value),ve=()=>{var he,V;const q=L.value,ie=(he=e.icon)!==null&&he!==void 0?he:(V=n.icon)===null||V===void 0?void 0:V.call(n,e),me=e.expandIcon||n.expandIcon||H.value,Se=J(mn(n,e,"title"),ie);return g("div",{style:ne.value,class:`${q}-title`,tabindex:F.value?null:-1,ref:B,title:typeof Se=="string"?Se:null,"data-menu-id":c,"aria-expanded":G.value,"aria-haspopup":!0,"aria-controls":W,"aria-disabled":F.value,onClick:oe,onFocus:te},[Se,P.value!=="horizontal"&&me?me(y(y({},e),{isOpen:G.value})):g("i",{class:`${q}-arrow`},null)])};return()=>{var he;if(l)return D?(he=n.default)===null||he===void 0?void 0:he.call(n):null;const V=L.value;let q=()=>null;if(!I.value&&P.value!=="inline"){const ie=P.value==="horizontal"?[0,8]:[10,0];q=()=>g(VO,{mode:de.value,prefixCls:V,visible:!e.internalPopupClose&&G.value,popupClassName:U.value,popupOffset:e.popupOffset||ie,disabled:F.value,onVisibleChange:X},{default:()=>[ve()],popup:()=>g(lh,{mode:pe.value},{default:()=>[g(GC,{id:W,ref:j},{default:n.default})]})})}else q=()=>g(VO,null,{default:ve});return g(lh,{mode:fe.value},{default:()=>[g(Ki.Item,k(k({component:"li"},o),{},{role:"none",class:ge(V,`${V}-${P.value}`,o.class,{[`${V}-open`]:G.value,[`${V}-active`]:Y.value,[`${V}-selected`]:Q.value,[`${V}-disabled`]:F.value}),onMouseenter:Z,onMouseleave:re,"data-submenu-id":c}),{default:()=>g(Le,null,[q(),!I.value&&g(BQ,{id:W,open:G.value,keyPath:h.value},{default:n.default})])})]})}}});function j8(e,t){return e.classList?e.classList.contains(t):` ${e.className} `.indexOf(` ${t} `)>-1}function sh(e,t){e.classList?e.classList.add(t):j8(e,t)||(e.className=`${e.className} ${t}`)}function ch(e,t){if(e.classList)e.classList.remove(t);else if(j8(e,t)){const n=e.className;e.className=` ${n} `.replace(` ${t} `," ")}}const Sf=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"ant-motion-collapse",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return{name:e,appear:t,css:!0,onBeforeEnter:n=>{n.style.height="0px",n.style.opacity="0",sh(n,e)},onEnter:n=>{ot(()=>{n.style.height=`${n.scrollHeight}px`,n.style.opacity="1"})},onAfterEnter:n=>{n&&(ch(n,e),n.style.height=null,n.style.opacity=null)},onBeforeLeave:n=>{sh(n,e),n.style.height=`${n.offsetHeight}px`,n.style.opacity=null},onLeave:n=>{setTimeout(()=>{n.style.height="0px",n.style.opacity="0"})},onAfterLeave:n=>{n&&(ch(n,e),n.style&&(n.style.height=null,n.style.opacity=null))}}},zQ=()=>({title:K.any,originItemValue:De()}),jd=le({compatConfig:{MODE:3},name:"AMenuItemGroup",inheritAttrs:!1,props:zQ(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r}=ia(),i=E(()=>`${r.value}-item-group`),a=UC();return()=>{var l,s;return a?(l=n.default)===null||l===void 0?void 0:l.call(n):g("li",k(k({},o),{},{onClick:u=>u.stopPropagation(),class:i.value}),[g("div",{title:typeof e.title=="string"?e.title:void 0,class:`${i.value}-title`},[mn(n,e,"title")]),g("ul",{class:`${i.value}-list`},[(s=n.default)===null||s===void 0?void 0:s.call(n)])])}}}),jQ=()=>({prefixCls:String,dashed:Boolean}),Wd=le({compatConfig:{MODE:3},name:"AMenuDivider",props:jQ(),setup(e){const{prefixCls:t}=ia(),n=E(()=>({[`${t.value}-item-divider`]:!0,[`${t.value}-item-divider-dashed`]:!!e.dashed}));return()=>g("li",{class:n.value},null)}});var WQ=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{if(o&&typeof o=="object"){const i=o,{label:a,children:l,key:s,type:u}=i,c=WQ(i,["label","children","key","type"]),d=s??`tmp-${r}`,f=n?n.parentKeys.slice():[],p=[],v={eventKey:d,key:d,parentEventKeys:ae(f),parentKeys:ae(f),childrenEventKeys:ae(p),isLeaf:!1};if(l||u==="group"){if(u==="group"){const m=Vy(l,t,n);return g(jd,k(k({key:d},c),{},{title:a,originItemValue:o}),{default:()=>[m]})}t.set(d,v),n&&n.childrenEventKeys.push(d);const h=Vy(l,t,{childrenEventKeys:p,parentKeys:[].concat(f,d)});return g(Ul,k(k({key:d},c),{},{title:a,originItemValue:o}),{default:()=>[h]})}return u==="divider"?g(Wd,k({key:d},c),null):(v.isLeaf=!0,t.set(d,v),g(ui,k(k({key:d},c),{},{originItemValue:o}),{default:()=>[a]}))}return null}).filter(o=>o)}function VQ(e){const t=se([]),n=se(!1),o=se(new Map);return be(()=>e.items,()=>{const r=new Map;n.value=!1,e.items?(n.value=!0,t.value=Vy(e.items,r)):t.value=void 0,o.value=r},{immediate:!0,deep:!0}),{itemsNodes:t,store:o,hasItmes:n}}const KQ=e=>{const{componentCls:t,motionDurationSlow:n,menuHorizontalHeight:o,colorSplit:r,lineWidth:i,lineType:a,menuItemPaddingInline:l}=e;return{[`${t}-horizontal`]:{lineHeight:`${o}px`,border:0,borderBottom:`${i}px ${a} ${r}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:l},[`> ${t}-item:hover, > ${t}-item-active, > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},UQ=e=>{let{componentCls:t,menuArrowOffset:n}=e;return{[`${t}-rtl`]:{direction:"rtl"},[`${t}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${t}-rtl${t}-vertical, ${t}-submenu-rtl ${t}-vertical`]:{[`${t}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${n})`},"&::after":{transform:`rotate(45deg) translateY(${n})`}}}}},UO=e=>y({},qi(e)),GO=(e,t)=>{const{componentCls:n,colorItemText:o,colorItemTextSelected:r,colorGroupTitle:i,colorItemBg:a,colorSubItemBg:l,colorItemBgSelected:s,colorActiveBarHeight:u,colorActiveBarWidth:c,colorActiveBarBorderSize:d,motionDurationSlow:f,motionEaseInOut:p,motionEaseOut:v,menuItemPaddingInline:h,motionDurationMid:m,colorItemTextHover:b,lineType:S,colorSplit:C,colorItemTextDisabled:$,colorDangerItemText:x,colorDangerItemTextHover:P,colorDangerItemTextSelected:w,colorDangerItemBgActive:O,colorDangerItemBgSelected:I,colorItemBgHover:_,menuSubMenuBg:T,colorItemTextSelectedHorizontal:A,colorItemBgSelectedHorizontal:R}=e;return{[`${n}-${t}`]:{color:o,background:a,[`&${n}-root:focus-visible`]:y({},UO(e)),[`${n}-item-group-title`]:{color:i},[`${n}-submenu-selected`]:{[`> ${n}-submenu-title`]:{color:r}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${$} !important`},[`${n}-item:hover, ${n}-submenu-title:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:b}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:_},"&:active":{backgroundColor:s}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:_},"&:active":{backgroundColor:s}}},[`${n}-item-danger`]:{color:x,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:P}},[`&${n}-item:active`]:{background:O}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:r,[`&${n}-item-danger`]:{color:w},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:s,[`&${n}-item-danger`]:{backgroundColor:I}},[`${n}-item, ${n}-submenu-title`]:{[`&:not(${n}-item-disabled):focus-visible`]:y({},UO(e))},[`&${n}-submenu > ${n}`]:{backgroundColor:T},[`&${n}-popup > ${n}`]:{backgroundColor:a},[`&${n}-horizontal`]:y(y({},t==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:d,marginTop:-d,marginBottom:0,borderRadius:0,"&::after":{position:"absolute",insetInline:h,bottom:0,borderBottom:`${u}px solid transparent`,transition:`border-color ${f} ${p}`,content:'""'},"&:hover, &-active, &-open":{"&::after":{borderBottomWidth:u,borderBottomColor:A}},"&-selected":{color:A,backgroundColor:R,"&::after":{borderBottomWidth:u,borderBottomColor:A}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${d}px ${S} ${C}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item, ${n}-submenu-title`]:d&&c?{width:`calc(100% + ${d}px)`}:{},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${c}px solid ${r}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${m} ${v}`,`opacity ${m} ${v}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:w}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${m} ${p}`,`opacity ${m} ${p}`].join(",")}}}}}},XO=e=>{const{componentCls:t,menuItemHeight:n,itemMarginInline:o,padding:r,menuArrowSize:i,marginXS:a,marginXXS:l}=e,s=r+i+a;return{[`${t}-item`]:{position:"relative"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:`${n}px`,paddingInline:r,overflow:"hidden",textOverflow:"ellipsis",marginInline:o,marginBlock:l,width:`calc(100% - ${o*2}px)`},[`${t}-submenu`]:{paddingBottom:.02},[`> ${t}-item, @@ -222,11 +222,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${t}-submenu-arrow, ${t}-submenu-expand-icon `]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:d,lineHeight:`${o}px`,"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:r}},[`${t}-item-group-title`]:y(y({},cn),{paddingInline:p})}}]},YO=e=>{const{componentCls:t,fontSize:n,motionDurationSlow:o,motionDurationMid:r,motionEaseInOut:i,motionEaseOut:a,iconCls:l,controlHeightSM:s}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${o}`,`background ${o}`,`padding ${o} ${i}`].join(","),[`${t}-item-icon, ${l}`]:{minWidth:n,fontSize:n,transition:[`font-size ${r} ${a}`,`margin ${o} ${i}`,`color ${o}`].join(","),"+ span":{marginInlineStart:s-n,opacity:1,transition:[`opacity ${o} ${i}`,`margin ${o}`,`color ${o}`].join(",")}},[`${t}-item-icon`]:y({},ns()),[`&${t}-item-only-child`]:{[`> ${l}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},qO=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:o,borderRadius:r,menuArrowSize:i,menuArrowOffset:a}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${o}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:i*.6,height:i*.15,backgroundColor:"currentcolor",borderRadius:r,transition:[`background ${n} ${o}`,`transform ${n} ${o}`,`top ${n} ${o}`,`color ${n} ${o}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${a})`},"&::after":{transform:`rotate(-45deg) translateY(${a})`}}}}},XQ=e=>{const{antCls:t,componentCls:n,fontSize:o,motionDurationSlow:r,motionDurationMid:i,motionEaseInOut:a,lineHeight:l,paddingXS:s,padding:u,colorSplit:c,lineWidth:d,zIndexPopup:f,borderRadiusLG:p,radiusSubMenuItem:v,menuArrowSize:h,menuArrowOffset:m,lineType:b,menuPanelMaskInset:S}=e;return[{"":{[`${n}`]:y(y({},Kr()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:y(y(y(y(y(y(y({},qe(e)),Kr()),{marginBottom:0,paddingInlineStart:0,fontSize:o,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${r} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.radiusItem},[`${n}-item-group-title`]:{padding:`${s}px ${u}px`,fontSize:o,lineHeight:l,transition:`all ${r}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${r} ${a}`,`background ${r} ${a}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${r} ${a}`,`background ${r} ${a}`,`padding ${i} ${a}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${r} ${a}`,`padding ${r} ${a}`].join(",")},[`${n}-title-content`]:{transition:`color ${r}`},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:b,borderWidth:0,borderTopWidth:d,marginBlock:d,padding:0,"&-dashed":{borderStyle:"dashed"}}}),YO(e)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${o*2}px ${u}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:f,background:"transparent",borderRadius:p,boxShadow:"none",transformOrigin:"0 0","&::before":{position:"absolute",inset:`${S}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:S},[`> ${n}`]:y(y(y({borderRadius:p},YO(e)),qO(e)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:v},[`${n}-submenu-title::after`]:{transition:`transform ${r} ${a}`}})}}),qO(e)),{[`&-inline-collapsed ${n}-submenu-arrow, - &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${m})`},"&::after":{transform:`rotate(45deg) translateX(-${m})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(-${h*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${m})`},"&::before":{transform:`rotate(45deg) translateX(${m})`}}})},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},YQ=(e,t)=>Ue("Menu",(o,r)=>{let{overrideComponentToken:i}=r;if((t==null?void 0:t.value)===!1)return[];const{colorBgElevated:a,colorPrimary:l,colorError:s,colorErrorHover:u,colorTextLightSolid:c}=o,{controlHeightLG:d,fontSize:f}=o,p=f/7*5,v=Be(o,{menuItemHeight:d,menuItemPaddingInline:o.margin,menuArrowSize:p,menuHorizontalHeight:d*1.15,menuArrowOffset:`${p*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:a}),h=new St(c).setAlpha(.65).toRgbString(),m=Be(v,{colorItemText:h,colorItemTextHover:c,colorGroupTitle:h,colorItemTextSelected:c,colorItemBg:"#001529",colorSubItemBg:"#000c17",colorItemBgActive:"transparent",colorItemBgSelected:l,colorActiveBarWidth:0,colorActiveBarHeight:0,colorActiveBarBorderSize:0,colorItemTextDisabled:new St(c).setAlpha(.25).toRgbString(),colorDangerItemText:s,colorDangerItemTextHover:u,colorDangerItemTextSelected:c,colorDangerItemBgActive:s,colorDangerItemBgSelected:s,menuSubMenuBg:"#001529",colorItemTextSelectedHorizontal:c,colorItemBgSelectedHorizontal:l},y({},i));return[XQ(v),KQ(v),GQ(v),GO(v,"light"),GO(m,"dark"),UQ(v),bf(v),vi(v,"slide-up"),vi(v,"slide-down"),eu(v,"zoom-big")]},o=>{const{colorPrimary:r,colorError:i,colorTextDisabled:a,colorErrorBg:l,colorText:s,colorTextDescription:u,colorBgContainer:c,colorFillAlter:d,colorFillContent:f,lineWidth:p,lineWidthBold:v,controlItemBgActive:h,colorBgTextHover:m}=o;return{dropdownWidth:160,zIndexPopup:o.zIndexPopupBase+50,radiusItem:o.borderRadiusLG,radiusSubMenuItem:o.borderRadiusSM,colorItemText:s,colorItemTextHover:s,colorItemTextHoverHorizontal:r,colorGroupTitle:u,colorItemTextSelected:r,colorItemTextSelectedHorizontal:r,colorItemBg:c,colorItemBgHover:m,colorItemBgActive:f,colorSubItemBg:d,colorItemBgSelected:h,colorItemBgSelectedHorizontal:"transparent",colorActiveBarWidth:0,colorActiveBarHeight:v,colorActiveBarBorderSize:p,colorItemTextDisabled:a,colorDangerItemText:i,colorDangerItemTextHover:i,colorDangerItemTextSelected:i,colorDangerItemBgActive:l,colorDangerItemBgSelected:l,itemMarginInline:o.marginXXS}})(e),qQ=()=>({id:String,prefixCls:String,items:Array,disabled:Boolean,inlineCollapsed:Boolean,disabledOverflow:Boolean,forceSubMenuRender:Boolean,openKeys:Array,selectedKeys:Array,activeKey:String,selectable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},tabindex:{type:[Number,String]},motion:Object,role:String,theme:{type:String,default:"light"},mode:{type:String,default:"vertical"},inlineIndent:{type:Number,default:24},subMenuOpenDelay:{type:Number,default:0},subMenuCloseDelay:{type:Number,default:.1},builtinPlacements:{type:Object},triggerSubMenuAction:{type:String,default:"hover"},getPopupContainer:Function,expandIcon:Function,onOpenChange:Function,onSelect:Function,onDeselect:Function,onClick:[Function,Array],onFocus:Function,onBlur:Function,onMousedown:Function,"onUpdate:openKeys":Function,"onUpdate:selectedKeys":Function,"onUpdate:activeKey":Function}),JO=[],on=le({compatConfig:{MODE:3},name:"AMenu",inheritAttrs:!1,props:qQ(),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r}=t;const{direction:i,getPrefixCls:a}=Te("menu",e),l=_A(),s=E(()=>{var Z;return a("menu",e.prefixCls||((Z=l==null?void 0:l.prefixCls)===null||Z===void 0?void 0:Z.value))}),[u,c]=YQ(s,E(()=>!l)),d=se(new Map),f=ze(LA,ae(void 0)),p=E(()=>f.value!==void 0?f.value:e.inlineCollapsed),{itemsNodes:v}=VQ(e),h=se(!1);Ke(()=>{h.value=!0}),Ve(()=>{Mt(!(e.inlineCollapsed===!0&&e.mode!=="inline"),"Menu","`inlineCollapsed` should only be used when `mode` is inline."),Mt(!(f.value!==void 0&&e.inlineCollapsed===!0),"Menu","`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.")});const m=ae([]),b=ae([]),S=ae({});be(d,()=>{const Z={};for(const re of d.value.values())Z[re.key]=re;S.value=Z},{flush:"post"}),Ve(()=>{if(e.activeKey!==void 0){let Z=[];const re=e.activeKey?S.value[e.activeKey]:void 0;re&&e.activeKey!==void 0?Z=T0([].concat(Bt(re.parentKeys),e.activeKey)):Z=[],Ls(m.value,Z)||(m.value=Z)}}),be(()=>e.selectedKeys,Z=>{Z&&(b.value=Z.slice())},{immediate:!0,deep:!0});const C=ae([]);be([S,b],()=>{let Z=[];b.value.forEach(re=>{const ne=S.value[re];ne&&(Z=Z.concat(Bt(ne.parentKeys)))}),Z=T0(Z),Ls(C.value,Z)||(C.value=Z)},{immediate:!0});const $=Z=>{if(e.selectable){const{key:re}=Z,ne=b.value.includes(re);let X;e.multiple?ne?X=b.value.filter(W=>W!==re):X=[...b.value,re]:X=[re];const te=y(y({},Z),{selectedKeys:X});Ls(X,b.value)||(e.selectedKeys===void 0&&(b.value=X),o("update:selectedKeys",X),ne&&e.multiple?o("deselect",te):o("select",te))}_.value!=="inline"&&!e.multiple&&x.value.length&&R(JO)},x=ae([]);be(()=>e.openKeys,function(){let Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x.value;Ls(x.value,Z)||(x.value=Z.slice())},{immediate:!0,deep:!0});let P;const w=Z=>{clearTimeout(P),P=setTimeout(()=>{e.activeKey===void 0&&(m.value=Z),o("update:activeKey",Z[Z.length-1])})},O=E(()=>!!e.disabled),I=E(()=>i.value==="rtl"),_=ae("vertical"),T=se(!1);Ve(()=>{var Z;(e.mode==="inline"||e.mode==="vertical")&&p.value?(_.value="vertical",T.value=p.value):(_.value=e.mode,T.value=!1),!((Z=l==null?void 0:l.mode)===null||Z===void 0)&&Z.value&&(_.value=l.mode.value)});const A=E(()=>_.value==="inline"),R=Z=>{x.value=Z,o("update:openKeys",Z),o("openChange",Z)},H=ae(x.value),M=se(!1);be(x,()=>{A.value&&(H.value=x.value)},{immediate:!0}),be(A,()=>{if(!M.value){M.value=!0;return}A.value?x.value=H.value:R(JO)},{immediate:!0});const D=E(()=>({[`${s.value}`]:!0,[`${s.value}-root`]:!0,[`${s.value}-${_.value}`]:!0,[`${s.value}-inline-collapsed`]:T.value,[`${s.value}-rtl`]:I.value,[`${s.value}-${e.theme}`]:!0})),N=E(()=>a()),L=E(()=>({horizontal:{name:`${N.value}-slide-up`},inline:Sf(`${N.value}-motion-collapse`),other:{name:`${N.value}-zoom-big`}}));kA(!0);const F=function(){let Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const re=[],ne=d.value;return Z.forEach(X=>{const{key:te,childrenEventKeys:W}=ne.get(X);re.push(te,...F(Bt(W)))}),re},B=Z=>{var re;o("click",Z),$(Z),(re=l==null?void 0:l.onClick)===null||re===void 0||re.call(l)},j=(Z,re)=>{var ne;const X=((ne=S.value[Z])===null||ne===void 0?void 0:ne.childrenEventKeys)||[];let te=x.value.filter(W=>W!==Z);if(re)te.push(Z);else if(_.value!=="inline"){const W=F(Bt(X));te=T0(te.filter(U=>!W.includes(U)))}Ls(x,te)||R(te)},z=(Z,re)=>{d.value.set(Z,re),d.value=new Map(d.value)},G=Z=>{d.value.delete(Z),d.value=new Map(d.value)},Q=ae(0),Y=E(()=>{var Z;return e.expandIcon||n.expandIcon||!((Z=l==null?void 0:l.expandIcon)===null||Z===void 0)&&Z.value?re=>{let ne=e.expandIcon||n.expandIcon;return ne=typeof ne=="function"?ne(re):ne,mt(ne,{class:`${s.value}-submenu-expand-icon`},!1)}:null});AA({prefixCls:s,activeKeys:m,openKeys:x,selectedKeys:b,changeActiveKeys:w,disabled:O,rtl:I,mode:_,inlineIndent:E(()=>e.inlineIndent),subMenuCloseDelay:E(()=>e.subMenuCloseDelay),subMenuOpenDelay:E(()=>e.subMenuOpenDelay),builtinPlacements:E(()=>e.builtinPlacements),triggerSubMenuAction:E(()=>e.triggerSubMenuAction),getPopupContainer:E(()=>e.getPopupContainer),inlineCollapsed:T,theme:E(()=>e.theme),siderCollapsed:f,defaultMotions:E(()=>h.value?L.value:null),motion:E(()=>h.value?e.motion:null),overflowDisabled:se(void 0),onOpenChange:j,onItemClick:B,registerMenuInfo:z,unRegisterMenuInfo:G,selectedSubMenuKeys:C,expandIcon:Y,forceSubMenuRender:E(()=>e.forceSubMenuRender),rootClassName:c});const oe=()=>{var Z;return v.value||Ot((Z=n.default)===null||Z===void 0?void 0:Z.call(n))};return()=>{var Z;const re=oe(),ne=Q.value>=re.length-1||_.value!=="horizontal"||e.disabledOverflow,X=W=>_.value!=="horizontal"||e.disabledOverflow?W:W.map((U,J)=>g(sh,{key:U.key,overflowDisabled:J>Q.value},{default:()=>U})),te=((Z=n.overflowedIndicator)===null||Z===void 0?void 0:Z.call(n))||g(yf,null,null);return u(g(Ki,k(k({},r),{},{onMousedown:e.onMousedown,prefixCls:`${s.value}-overflow`,component:"ul",itemComponent:ui,class:[D.value,r.class,c.value],role:"menu",id:e.id,data:X(re),renderRawItem:W=>W,renderRawRest:W=>{const U=W.length,J=U?re.slice(-U):null;return g(Le,null,[g(Ul,{eventKey:lp,key:lp,title:te,disabled:ne,internalPopupClose:U===0},{default:()=>J}),g(WO,null,{default:()=>[g(Ul,{eventKey:lp,key:lp,title:te,disabled:ne,internalPopupClose:U===0},{default:()=>J})]})])},maxCount:_.value!=="horizontal"||e.disabledOverflow?Ki.INVALIDATE:Ki.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:W=>{Q.value=W}}),{default:()=>[g(iv,{to:"body"},{default:()=>[g("div",{style:{display:"none"},"aria-hidden":!0},[g(WO,null,{default:()=>[X(oe())]})])]})]}))}}});on.install=function(e){return e.component(on.name,on),e.component(ui.name,ui),e.component(Ul.name,Ul),e.component(Wd.name,Wd),e.component(jd.name,jd),e};on.Item=ui;on.Divider=Wd;on.SubMenu=Ul;on.ItemGroup=jd;const JQ=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:y(y({},qe(e)),{color:e.breadcrumbBaseColor,fontSize:e.breadcrumbFontSize,[n]:{fontSize:e.breadcrumbIconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:y({color:e.breadcrumbLinkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${e.paddingXXS}px`,borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",marginInline:-e.marginXXS,"&:hover":{color:e.breadcrumbLinkColorHover,backgroundColor:e.colorBgTextHover}},Ji(e)),"li:last-child":{color:e.breadcrumbLastItemColor,[`& > ${t}-separator`]:{display:"none"}},[`${t}-separator`]:{marginInline:e.breadcrumbSeparatorMargin,color:e.breadcrumbSeparatorColor},[`${t}-link`]:{[` + &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${m})`},"&::after":{transform:`rotate(45deg) translateX(-${m})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(-${h*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${m})`},"&::before":{transform:`rotate(45deg) translateX(${m})`}}})},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},YQ=(e,t)=>Ue("Menu",(o,r)=>{let{overrideComponentToken:i}=r;if((t==null?void 0:t.value)===!1)return[];const{colorBgElevated:a,colorPrimary:l,colorError:s,colorErrorHover:u,colorTextLightSolid:c}=o,{controlHeightLG:d,fontSize:f}=o,p=f/7*5,v=Be(o,{menuItemHeight:d,menuItemPaddingInline:o.margin,menuArrowSize:p,menuHorizontalHeight:d*1.15,menuArrowOffset:`${p*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:a}),h=new St(c).setAlpha(.65).toRgbString(),m=Be(v,{colorItemText:h,colorItemTextHover:c,colorGroupTitle:h,colorItemTextSelected:c,colorItemBg:"#001529",colorSubItemBg:"#000c17",colorItemBgActive:"transparent",colorItemBgSelected:l,colorActiveBarWidth:0,colorActiveBarHeight:0,colorActiveBarBorderSize:0,colorItemTextDisabled:new St(c).setAlpha(.25).toRgbString(),colorDangerItemText:s,colorDangerItemTextHover:u,colorDangerItemTextSelected:c,colorDangerItemBgActive:s,colorDangerItemBgSelected:s,menuSubMenuBg:"#001529",colorItemTextSelectedHorizontal:c,colorItemBgSelectedHorizontal:l},y({},i));return[XQ(v),KQ(v),GQ(v),GO(v,"light"),GO(m,"dark"),UQ(v),bf(v),vi(v,"slide-up"),vi(v,"slide-down"),eu(v,"zoom-big")]},o=>{const{colorPrimary:r,colorError:i,colorTextDisabled:a,colorErrorBg:l,colorText:s,colorTextDescription:u,colorBgContainer:c,colorFillAlter:d,colorFillContent:f,lineWidth:p,lineWidthBold:v,controlItemBgActive:h,colorBgTextHover:m}=o;return{dropdownWidth:160,zIndexPopup:o.zIndexPopupBase+50,radiusItem:o.borderRadiusLG,radiusSubMenuItem:o.borderRadiusSM,colorItemText:s,colorItemTextHover:s,colorItemTextHoverHorizontal:r,colorGroupTitle:u,colorItemTextSelected:r,colorItemTextSelectedHorizontal:r,colorItemBg:c,colorItemBgHover:m,colorItemBgActive:f,colorSubItemBg:d,colorItemBgSelected:h,colorItemBgSelectedHorizontal:"transparent",colorActiveBarWidth:0,colorActiveBarHeight:v,colorActiveBarBorderSize:p,colorItemTextDisabled:a,colorDangerItemText:i,colorDangerItemTextHover:i,colorDangerItemTextSelected:i,colorDangerItemBgActive:l,colorDangerItemBgSelected:l,itemMarginInline:o.marginXXS}})(e),qQ=()=>({id:String,prefixCls:String,items:Array,disabled:Boolean,inlineCollapsed:Boolean,disabledOverflow:Boolean,forceSubMenuRender:Boolean,openKeys:Array,selectedKeys:Array,activeKey:String,selectable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},tabindex:{type:[Number,String]},motion:Object,role:String,theme:{type:String,default:"light"},mode:{type:String,default:"vertical"},inlineIndent:{type:Number,default:24},subMenuOpenDelay:{type:Number,default:0},subMenuCloseDelay:{type:Number,default:.1},builtinPlacements:{type:Object},triggerSubMenuAction:{type:String,default:"hover"},getPopupContainer:Function,expandIcon:Function,onOpenChange:Function,onSelect:Function,onDeselect:Function,onClick:[Function,Array],onFocus:Function,onBlur:Function,onMousedown:Function,"onUpdate:openKeys":Function,"onUpdate:selectedKeys":Function,"onUpdate:activeKey":Function}),JO=[],on=le({compatConfig:{MODE:3},name:"AMenu",inheritAttrs:!1,props:qQ(),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r}=t;const{direction:i,getPrefixCls:a}=Te("menu",e),l=_8(),s=E(()=>{var Z;return a("menu",e.prefixCls||((Z=l==null?void 0:l.prefixCls)===null||Z===void 0?void 0:Z.value))}),[u,c]=YQ(s,E(()=>!l)),d=se(new Map),f=ze(L8,ae(void 0)),p=E(()=>f.value!==void 0?f.value:e.inlineCollapsed),{itemsNodes:v}=VQ(e),h=se(!1);Ke(()=>{h.value=!0}),Ve(()=>{Mt(!(e.inlineCollapsed===!0&&e.mode!=="inline"),"Menu","`inlineCollapsed` should only be used when `mode` is inline."),Mt(!(f.value!==void 0&&e.inlineCollapsed===!0),"Menu","`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.")});const m=ae([]),b=ae([]),S=ae({});be(d,()=>{const Z={};for(const re of d.value.values())Z[re.key]=re;S.value=Z},{flush:"post"}),Ve(()=>{if(e.activeKey!==void 0){let Z=[];const re=e.activeKey?S.value[e.activeKey]:void 0;re&&e.activeKey!==void 0?Z=T0([].concat(Bt(re.parentKeys),e.activeKey)):Z=[],Ls(m.value,Z)||(m.value=Z)}}),be(()=>e.selectedKeys,Z=>{Z&&(b.value=Z.slice())},{immediate:!0,deep:!0});const C=ae([]);be([S,b],()=>{let Z=[];b.value.forEach(re=>{const ne=S.value[re];ne&&(Z=Z.concat(Bt(ne.parentKeys)))}),Z=T0(Z),Ls(C.value,Z)||(C.value=Z)},{immediate:!0});const $=Z=>{if(e.selectable){const{key:re}=Z,ne=b.value.includes(re);let X;e.multiple?ne?X=b.value.filter(W=>W!==re):X=[...b.value,re]:X=[re];const te=y(y({},Z),{selectedKeys:X});Ls(X,b.value)||(e.selectedKeys===void 0&&(b.value=X),o("update:selectedKeys",X),ne&&e.multiple?o("deselect",te):o("select",te))}_.value!=="inline"&&!e.multiple&&x.value.length&&R(JO)},x=ae([]);be(()=>e.openKeys,function(){let Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x.value;Ls(x.value,Z)||(x.value=Z.slice())},{immediate:!0,deep:!0});let P;const w=Z=>{clearTimeout(P),P=setTimeout(()=>{e.activeKey===void 0&&(m.value=Z),o("update:activeKey",Z[Z.length-1])})},O=E(()=>!!e.disabled),I=E(()=>i.value==="rtl"),_=ae("vertical"),T=se(!1);Ve(()=>{var Z;(e.mode==="inline"||e.mode==="vertical")&&p.value?(_.value="vertical",T.value=p.value):(_.value=e.mode,T.value=!1),!((Z=l==null?void 0:l.mode)===null||Z===void 0)&&Z.value&&(_.value=l.mode.value)});const A=E(()=>_.value==="inline"),R=Z=>{x.value=Z,o("update:openKeys",Z),o("openChange",Z)},H=ae(x.value),M=se(!1);be(x,()=>{A.value&&(H.value=x.value)},{immediate:!0}),be(A,()=>{if(!M.value){M.value=!0;return}A.value?x.value=H.value:R(JO)},{immediate:!0});const D=E(()=>({[`${s.value}`]:!0,[`${s.value}-root`]:!0,[`${s.value}-${_.value}`]:!0,[`${s.value}-inline-collapsed`]:T.value,[`${s.value}-rtl`]:I.value,[`${s.value}-${e.theme}`]:!0})),N=E(()=>a()),L=E(()=>({horizontal:{name:`${N.value}-slide-up`},inline:Sf(`${N.value}-motion-collapse`),other:{name:`${N.value}-zoom-big`}}));k8(!0);const F=function(){let Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const re=[],ne=d.value;return Z.forEach(X=>{const{key:te,childrenEventKeys:W}=ne.get(X);re.push(te,...F(Bt(W)))}),re},B=Z=>{var re;o("click",Z),$(Z),(re=l==null?void 0:l.onClick)===null||re===void 0||re.call(l)},j=(Z,re)=>{var ne;const X=((ne=S.value[Z])===null||ne===void 0?void 0:ne.childrenEventKeys)||[];let te=x.value.filter(W=>W!==Z);if(re)te.push(Z);else if(_.value!=="inline"){const W=F(Bt(X));te=T0(te.filter(U=>!W.includes(U)))}Ls(x,te)||R(te)},z=(Z,re)=>{d.value.set(Z,re),d.value=new Map(d.value)},G=Z=>{d.value.delete(Z),d.value=new Map(d.value)},Q=ae(0),Y=E(()=>{var Z;return e.expandIcon||n.expandIcon||!((Z=l==null?void 0:l.expandIcon)===null||Z===void 0)&&Z.value?re=>{let ne=e.expandIcon||n.expandIcon;return ne=typeof ne=="function"?ne(re):ne,mt(ne,{class:`${s.value}-submenu-expand-icon`},!1)}:null});A8({prefixCls:s,activeKeys:m,openKeys:x,selectedKeys:b,changeActiveKeys:w,disabled:O,rtl:I,mode:_,inlineIndent:E(()=>e.inlineIndent),subMenuCloseDelay:E(()=>e.subMenuCloseDelay),subMenuOpenDelay:E(()=>e.subMenuOpenDelay),builtinPlacements:E(()=>e.builtinPlacements),triggerSubMenuAction:E(()=>e.triggerSubMenuAction),getPopupContainer:E(()=>e.getPopupContainer),inlineCollapsed:T,theme:E(()=>e.theme),siderCollapsed:f,defaultMotions:E(()=>h.value?L.value:null),motion:E(()=>h.value?e.motion:null),overflowDisabled:se(void 0),onOpenChange:j,onItemClick:B,registerMenuInfo:z,unRegisterMenuInfo:G,selectedSubMenuKeys:C,expandIcon:Y,forceSubMenuRender:E(()=>e.forceSubMenuRender),rootClassName:c});const oe=()=>{var Z;return v.value||Ot((Z=n.default)===null||Z===void 0?void 0:Z.call(n))};return()=>{var Z;const re=oe(),ne=Q.value>=re.length-1||_.value!=="horizontal"||e.disabledOverflow,X=W=>_.value!=="horizontal"||e.disabledOverflow?W:W.map((U,J)=>g(lh,{key:U.key,overflowDisabled:J>Q.value},{default:()=>U})),te=((Z=n.overflowedIndicator)===null||Z===void 0?void 0:Z.call(n))||g(yf,null,null);return u(g(Ki,k(k({},r),{},{onMousedown:e.onMousedown,prefixCls:`${s.value}-overflow`,component:"ul",itemComponent:ui,class:[D.value,r.class,c.value],role:"menu",id:e.id,data:X(re),renderRawItem:W=>W,renderRawRest:W=>{const U=W.length,J=U?re.slice(-U):null;return g(Le,null,[g(Ul,{eventKey:lp,key:lp,title:te,disabled:ne,internalPopupClose:U===0},{default:()=>J}),g(WO,null,{default:()=>[g(Ul,{eventKey:lp,key:lp,title:te,disabled:ne,internalPopupClose:U===0},{default:()=>J})]})])},maxCount:_.value!=="horizontal"||e.disabledOverflow?Ki.INVALIDATE:Ki.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:W=>{Q.value=W}}),{default:()=>[g(rv,{to:"body"},{default:()=>[g("div",{style:{display:"none"},"aria-hidden":!0},[g(WO,null,{default:()=>[X(oe())]})])]})]}))}}});on.install=function(e){return e.component(on.name,on),e.component(ui.name,ui),e.component(Ul.name,Ul),e.component(Wd.name,Wd),e.component(jd.name,jd),e};on.Item=ui;on.Divider=Wd;on.SubMenu=Ul;on.ItemGroup=jd;const JQ=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:y(y({},qe(e)),{color:e.breadcrumbBaseColor,fontSize:e.breadcrumbFontSize,[n]:{fontSize:e.breadcrumbIconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:y({color:e.breadcrumbLinkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${e.paddingXXS}px`,borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",marginInline:-e.marginXXS,"&:hover":{color:e.breadcrumbLinkColorHover,backgroundColor:e.colorBgTextHover}},Ji(e)),"li:last-child":{color:e.breadcrumbLastItemColor,[`& > ${t}-separator`]:{display:"none"}},[`${t}-separator`]:{marginInline:e.breadcrumbSeparatorMargin,color:e.breadcrumbSeparatorColor},[`${t}-link`]:{[` > ${n} + span, > ${n} + a - `]:{marginInlineStart:e.marginXXS}},[`${t}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",padding:`0 ${e.paddingXXS}px`,marginInline:-e.marginXXS,[`> ${n}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.breadcrumbLinkColorHover,backgroundColor:e.colorBgTextHover,a:{color:e.breadcrumbLinkColorHover}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}},ZQ=Ue("Breadcrumb",e=>{const t=Be(e,{breadcrumbBaseColor:e.colorTextDescription,breadcrumbFontSize:e.fontSize,breadcrumbIconFontSize:e.fontSize,breadcrumbLinkColor:e.colorTextDescription,breadcrumbLinkColorHover:e.colorText,breadcrumbLastItemColor:e.colorText,breadcrumbSeparatorMargin:e.marginXS,breadcrumbSeparatorColor:e.colorTextDescription});return[JQ(t)]}),QQ=()=>({prefixCls:String,routes:{type:Array},params:K.any,separator:K.any,itemRender:{type:Function}});function eee(e,t){if(!e.breadcrumbName)return null;const n=Object.keys(t).join("|");return e.breadcrumbName.replace(new RegExp(`:(${n})`,"g"),(r,i)=>t[i]||r)}function ZO(e){const{route:t,params:n,routes:o,paths:r}=e,i=o.indexOf(t)===o.length-1,a=eee(t,n);return i?g("span",null,[a]):g("a",{href:`#/${r.join("/")}`},[a])}const Rl=le({compatConfig:{MODE:3},name:"ABreadcrumb",inheritAttrs:!1,props:QQ(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("breadcrumb",e),[a,l]=ZQ(r),s=(d,f)=>(d=(d||"").replace(/^\//,""),Object.keys(f).forEach(p=>{d=d.replace(`:${p}`,f[p])}),d),u=(d,f,p)=>{const v=[...d],h=s(f||"",p);return h&&v.push(h),v},c=d=>{let{routes:f=[],params:p={},separator:v,itemRender:h=ZO}=d;const m=[];return f.map(b=>{const S=s(b.path,p);S&&m.push(S);const C=[...m];let $=null;b.children&&b.children.length&&($=g(on,{items:b.children.map(P=>({key:P.path||P.breadcrumbName,label:h({route:P,params:p,routes:f,paths:u(C,P.path,p)})}))},null));const x={separator:v};return $&&(x.overlay=$),g(zd,k(k({},x),{},{key:S||b.breadcrumbName}),{default:()=>[h({route:b,params:p,routes:f,paths:C})]})})};return()=>{var d;let f;const{routes:p,params:v={}}=e,h=Ot(mn(n,e)),m=(d=mn(n,e,"separator"))!==null&&d!==void 0?d:"/",b=e.itemRender||n.itemRender||ZO;p&&p.length>0?f=c({routes:p,params:v,separator:m,itemRender:b}):h.length&&(f=h.map((C,$)=>(Yo(typeof C.type=="object"&&(C.type.__ANT_BREADCRUMB_ITEM||C.type.__ANT_BREADCRUMB_SEPARATOR)),Dn(C,{separator:m,key:$}))));const S={[r.value]:!0,[`${r.value}-rtl`]:i.value==="rtl",[`${o.class}`]:!!o.class,[l.value]:!0};return a(g("nav",k(k({},o),{},{class:S}),[g("ol",null,[f])]))}}});var tee=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String}),dh=le({compatConfig:{MODE:3},name:"ABreadcrumbSeparator",__ANT_BREADCRUMB_SEPARATOR:!0,inheritAttrs:!1,props:nee(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r}=Te("breadcrumb",e);return()=>{var i;const{separator:a,class:l}=o,s=tee(o,["separator","class"]),u=Ot((i=n.default)===null||i===void 0?void 0:i.call(n));return g("span",k({class:[`${r.value}-separator`,l]},s),[u.length>0?u:"/"])}}});Rl.Item=zd;Rl.Separator=dh;Rl.install=function(e){return e.component(Rl.name,Rl),e.component(zd.name,zd),e.component(dh.name,dh),e};var qa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ja(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var WA={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(qa,function(){var n=1e3,o=6e4,r=36e5,i="millisecond",a="second",l="minute",s="hour",u="day",c="week",d="month",f="quarter",p="year",v="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(H){var M=["th","st","nd","rd"],D=H%100;return"["+H+(M[(D-20)%10]||M[D]||M[0])+"]"}},C=function(H,M,D){var N=String(H);return!N||N.length>=M?H:""+Array(M+1-N.length).join(D)+H},$={s:C,z:function(H){var M=-H.utcOffset(),D=Math.abs(M),N=Math.floor(D/60),L=D%60;return(M<=0?"+":"-")+C(N,2,"0")+":"+C(L,2,"0")},m:function H(M,D){if(M.date()1)return H(B[0])}else{var j=M.name;P[j]=M,L=j}return!N&&L&&(x=L),L||!N&&x},_=function(H,M){if(O(H))return H.clone();var D=typeof M=="object"?M:{};return D.date=H,D.args=arguments,new A(D)},T=$;T.l=I,T.i=O,T.w=function(H,M){return _(H,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var A=function(){function H(D){this.$L=I(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[w]=!0}var M=H.prototype;return M.parse=function(D){this.$d=function(N){var L=N.date,F=N.utc;if(L===null)return new Date(NaN);if(T.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var B=L.match(m);if(B){var j=B[2]-1||0,z=(B[7]||"0").substring(0,3);return F?new Date(Date.UTC(B[1],j,B[3]||1,B[4]||0,B[5]||0,B[6]||0,z)):new Date(B[1],j,B[3]||1,B[4]||0,B[5]||0,B[6]||0,z)}}return new Date(L)}(D),this.init()},M.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},M.$utils=function(){return T},M.isValid=function(){return this.$d.toString()!==h},M.isSame=function(D,N){var L=_(D);return this.startOf(N)<=L&&L<=this.endOf(N)},M.isAfter=function(D,N){return _(D)25){var c=a(this).startOf(o).add(1,o).date(u),d=a(this).endOf(n);if(c.isBefore(d))return 1}var f=a(this).startOf(o).date(u).startOf(n).subtract(1,"millisecond"),p=this.diff(f,n,!0);return p<0?a(this).startOf("week").week():Math.ceil(p)},l.weeks=function(s){return s===void 0&&(s=null),this.week(s)}}})})(UA);var see=UA.exports;const cee=Ja(see);var GA={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(qa,function(){return function(n,o){o.prototype.weekYear=function(){var r=this.month(),i=this.week(),a=this.year();return i===1&&r===11?a+1:r===0&&i>=52?a-1:a}}})})(GA);var uee=GA.exports;const dee=Ja(uee);var XA={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(qa,function(){var n="month",o="quarter";return function(r,i){var a=i.prototype;a.quarter=function(u){return this.$utils().u(u)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(u-1))};var l=a.add;a.add=function(u,c){return u=Number(u),this.$utils().p(c)===o?this.add(3*u,n):l.bind(this)(u,c)};var s=a.startOf;a.startOf=function(u,c){var d=this.$utils(),f=!!d.u(c)||c;if(d.p(u)===o){var p=this.quarter()-1;return f?this.month(3*p).startOf(n).startOf("day"):this.month(3*p+2).endOf(n).endOf("day")}return s.bind(this)(u,c)}}})})(XA);var fee=XA.exports;const pee=Ja(fee);var YA={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(qa,function(){return function(n,o){var r=o.prototype,i=r.format;r.format=function(a){var l=this,s=this.$locale();if(!this.isValid())return i.bind(this)(a);var u=this.$utils(),c=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((l.$M+1)/3);case"Do":return s.ordinal(l.$D);case"gggg":return l.weekYear();case"GGGG":return l.isoWeekYear();case"wo":return s.ordinal(l.week(),"W");case"w":case"ww":return u.s(l.week(),d==="w"?1:2,"0");case"W":case"WW":return u.s(l.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return u.s(String(l.$H===0?24:l.$H),d==="k"?1:2,"0");case"X":return Math.floor(l.$d.getTime()/1e3);case"x":return l.$d.getTime();case"z":return"["+l.offsetName()+"]";case"zzz":return"["+l.offsetName("long")+"]";default:return d}});return i.bind(this)(c)}}})})(YA);var gee=YA.exports;const hee=Ja(gee);var qA={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(qa,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,i=/\d\d/,a=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,s={},u=function(m){return(m=+m)+(m>68?1900:2e3)},c=function(m){return function(b){this[m]=+b}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var S=b.match(/([+-]|\d\d)/g),C=60*S[1]+(+S[2]||0);return C===0?0:S[0]==="+"?-C:C}(m)}],f=function(m){var b=s[m];return b&&(b.indexOf?b:b.s.concat(b.f))},p=function(m,b){var S,C=s.meridiem;if(C){for(var $=1;$<=24;$+=1)if(m.indexOf(C($,0,b))>-1){S=$>12;break}}else S=m===(b?"pm":"PM");return S},v={A:[l,function(m){this.afternoon=p(m,!1)}],a:[l,function(m){this.afternoon=p(m,!0)}],Q:[r,function(m){this.month=3*(m-1)+1}],S:[r,function(m){this.milliseconds=100*+m}],SS:[i,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[a,c("seconds")],ss:[a,c("seconds")],m:[a,c("minutes")],mm:[a,c("minutes")],H:[a,c("hours")],h:[a,c("hours")],HH:[a,c("hours")],hh:[a,c("hours")],D:[a,c("day")],DD:[i,c("day")],Do:[l,function(m){var b=s.ordinal,S=m.match(/\d+/);if(this.day=S[0],b)for(var C=1;C<=31;C+=1)b(C).replace(/\[|\]/g,"")===m&&(this.day=C)}],w:[a,c("week")],ww:[i,c("week")],M:[a,c("month")],MM:[i,c("month")],MMM:[l,function(m){var b=f("months"),S=(f("monthsShort")||b.map(function(C){return C.slice(0,3)})).indexOf(m)+1;if(S<1)throw new Error;this.month=S%12||S}],MMMM:[l,function(m){var b=f("months").indexOf(m)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,c("year")],YY:[i,function(m){this.year=u(m)}],YYYY:[/\d{4}/,c("year")],Z:d,ZZ:d};function h(m){var b,S;b=m,S=s&&s.formats;for(var C=(m=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(_,T,A){var R=A&&A.toUpperCase();return T||S[A]||n[A]||S[R].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(H,M,D){return M||D.slice(1)})})).match(o),$=C.length,x=0;x<$;x+=1){var P=C[x],w=v[P],O=w&&w[0],I=w&&w[1];C[x]=I?{regex:O,parser:I}:P.replace(/^\[|\]$/g,"")}return function(_){for(var T={},A=0,R=0;A<$;A+=1){var H=C[A];if(typeof H=="string")R+=H.length;else{var M=H.regex,D=H.parser,N=_.slice(R),L=M.exec(N)[0];D.call(T,L),_=_.replace(L,"")}}return function(F){var B=F.afternoon;if(B!==void 0){var j=F.hours;B?j<12&&(F.hours+=12):j===12&&(F.hours=0),delete F.afternoon}}(T),T}}return function(m,b,S){S.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(u=m.parseTwoDigitYear);var C=b.prototype,$=C.parse;C.parse=function(x){var P=x.date,w=x.utc,O=x.args;this.$u=w;var I=O[1];if(typeof I=="string"){var _=O[2]===!0,T=O[3]===!0,A=_||T,R=O[2];T&&(R=O[2]),s=this.$locale(),!_&&R&&(s=S.Ls[R]),this.$d=function(N,L,F,B){try{if(["x","X"].indexOf(L)>-1)return new Date((L==="X"?1e3:1)*N);var j=h(L)(N),z=j.year,G=j.month,Q=j.day,Y=j.hours,oe=j.minutes,Z=j.seconds,re=j.milliseconds,ne=j.zone,X=j.week,te=new Date,W=Q||(z||G?1:te.getDate()),U=z||te.getFullYear(),J=0;z&&!G||(J=G>0?G-1:te.getMonth());var de,fe=Y||0,pe=oe||0,ve=Z||0,he=re||0;return ne?new Date(Date.UTC(U,J,W,fe,pe,ve,he+60*ne.offset*1e3)):F?new Date(Date.UTC(U,J,W,fe,pe,ve,he)):(de=new Date(U,J,W,fe,pe,ve,he),X&&(de=B(de).week(X).toDate()),de)}catch{return new Date("")}}(P,I,w,S),this.init(),R&&R!==!0&&(this.$L=this.locale(R).$L),A&&P!=this.format(I)&&(this.$d=new Date("")),s={}}else if(I instanceof Array)for(var H=I.length,M=1;M<=H;M+=1){O[1]=I[M-1];var D=S.apply(this,O);if(D.isValid()){this.$d=D.$d,this.$L=D.$L,this.init();break}M===H&&(this.$d=new Date(""))}else $.call(this,x)}}})})(qA);var vee=qA.exports;const mee=Ja(vee);In.extend(mee);In.extend(hee);In.extend(iee);In.extend(lee);In.extend(cee);In.extend(dee);In.extend(pee);In.extend((e,t)=>{const n=t.prototype,o=n.format;n.format=function(i){const a=(i||"").replace("Wo","wo");return o.bind(this)(a)}});const bee={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},cl=e=>bee[e]||e.split("_")[0],QO=()=>{WB(!1,"Not match any format. Please help to fire a issue about this.")},yee=/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|k{1,2}|S/g;function eI(e,t,n){const o=[...new Set(e.split(n))];let r=0;for(let i=0;it)return a;r+=n.length}}const tI=(e,t)=>{if(!e)return null;if(In.isDayjs(e))return e;const n=t.matchAll(yee);let o=In(e,t);if(n===null)return o;for(const r of n){const i=r[0],a=r.index;if(i==="Q"){const l=e.slice(a-1,a),s=eI(e,a,l).match(/\d+/)[0];o=o.quarter(parseInt(s))}if(i.toLowerCase()==="wo"){const l=e.slice(a-1,a),s=eI(e,a,l).match(/\d+/)[0];o=o.week(parseInt(s))}i.toLowerCase()==="ww"&&(o=o.week(parseInt(e.slice(a,a+i.length)))),i.toLowerCase()==="w"&&(o=o.week(parseInt(e.slice(a,a+i.length+1))))}return o},XC={getNow:()=>In(),getFixedDate:e=>In(e,["YYYY-M-DD","YYYY-MM-DD"]),getEndDate:e=>e.endOf("month"),getWeekDay:e=>{const t=e.locale("en");return t.weekday()+t.localeData().firstDayOfWeek()},getYear:e=>e.year(),getMonth:e=>e.month(),getDate:e=>e.date(),getHour:e=>e.hour(),getMinute:e=>e.minute(),getSecond:e=>e.second(),addYear:(e,t)=>e.add(t,"year"),addMonth:(e,t)=>e.add(t,"month"),addDate:(e,t)=>e.add(t,"day"),setYear:(e,t)=>e.year(t),setMonth:(e,t)=>e.month(t),setDate:(e,t)=>e.date(t),setHour:(e,t)=>e.hour(t),setMinute:(e,t)=>e.minute(t),setSecond:(e,t)=>e.second(t),isAfter:(e,t)=>e.isAfter(t),isValidate:e=>e.isValid(),locale:{getWeekFirstDay:e=>In().locale(cl(e)).localeData().firstDayOfWeek(),getWeekFirstDate:(e,t)=>t.locale(cl(e)).weekday(0),getWeek:(e,t)=>t.locale(cl(e)).week(),getShortWeekDays:e=>In().locale(cl(e)).localeData().weekdaysMin(),getShortMonths:e=>In().locale(cl(e)).localeData().monthsShort(),format:(e,t,n)=>t.locale(cl(e)).format(n),parse:(e,t,n)=>{const o=cl(e);for(let r=0;rArray.isArray(e)?e.map(n=>tI(n,t)):tI(e,t),toString:(e,t)=>Array.isArray(e)?e.map(n=>In.isDayjs(n)?n.format(t):n):In.isDayjs(e)?e.format(t):e};function un(e){const t=vF();return y(y({},e),t)}const JA=Symbol("PanelContextProps"),YC=e=>{Xe(JA,e)},yi=()=>ze(JA,{}),sp={visibility:"hidden"};function Za(e,t){let{slots:n}=t;var o;const r=un(e),{prefixCls:i,prevIcon:a="‹",nextIcon:l="›",superPrevIcon:s="«",superNextIcon:u="»",onSuperPrev:c,onSuperNext:d,onPrev:f,onNext:p}=r,{hideNextBtn:v,hidePrevBtn:h}=yi();return g("div",{class:i},[c&&g("button",{type:"button",onClick:c,tabindex:-1,class:`${i}-super-prev-btn`,style:h.value?sp:{}},[s]),f&&g("button",{type:"button",onClick:f,tabindex:-1,class:`${i}-prev-btn`,style:h.value?sp:{}},[a]),g("div",{class:`${i}-view`},[(o=n.default)===null||o===void 0?void 0:o.call(n)]),p&&g("button",{type:"button",onClick:p,tabindex:-1,class:`${i}-next-btn`,style:v.value?sp:{}},[l]),d&&g("button",{type:"button",onClick:d,tabindex:-1,class:`${i}-super-next-btn`,style:v.value?sp:{}},[u])])}Za.displayName="Header";Za.inheritAttrs=!1;function qC(e){const t=un(e),{prefixCls:n,generateConfig:o,viewDate:r,onPrevDecades:i,onNextDecades:a}=t,{hideHeader:l}=yi();if(l)return null;const s=`${n}-header`,u=o.getYear(r),c=Math.floor(u/Hi)*Hi,d=c+Hi-1;return g(Za,k(k({},t),{},{prefixCls:s,onSuperPrev:i,onSuperNext:a}),{default:()=>[c,zn("-"),d]})}qC.displayName="DecadeHeader";qC.inheritAttrs=!1;function ZA(e,t,n,o,r){let i=e.setHour(t,n);return i=e.setMinute(i,o),i=e.setSecond(i,r),i}function Up(e,t,n){if(!n)return t;let o=t;return o=e.setHour(o,e.getHour(n)),o=e.setMinute(o,e.getMinute(n)),o=e.setSecond(o,e.getSecond(n)),o}function See(e,t,n,o,r,i){const a=Math.floor(e/o)*o;if(a{H.stopPropagation(),A||o(T)},onMouseenter:()=>{!A&&b&&b(T)},onMouseleave:()=>{!A&&S&&S(T)}},[f?f(T):g("div",{class:`${$}-inner`},[d(T)])]))}x.push(g("tr",{key:P,class:s&&s(O)},[w]))}return g("div",{class:`${t}-body`},[g("table",{class:`${t}-content`},[m&&g("thead",null,[g("tr",null,[m])]),g("tbody",null,[x])])])}us.displayName="PanelBody";us.inheritAttrs=!1;const Ky=3,nI=4;function JC(e){const t=un(e),n=Rr-1,{prefixCls:o,viewDate:r,generateConfig:i}=t,a=`${o}-cell`,l=i.getYear(r),s=Math.floor(l/Rr)*Rr,u=Math.floor(l/Hi)*Hi,c=u+Hi-1,d=i.setYear(r,u-Math.ceil((Ky*nI*Rr-Hi)/2)),f=p=>{const v=i.getYear(p),h=v+n;return{[`${a}-in-view`]:u<=v&&h<=c,[`${a}-selected`]:v===s}};return g(us,k(k({},t),{},{rowNum:nI,colNum:Ky,baseDate:d,getCellText:p=>{const v=i.getYear(p);return`${v}-${v+n}`},getCellClassName:f,getCellDate:(p,v)=>i.addYear(p,v*Rr)}),null)}JC.displayName="DecadeBody";JC.inheritAttrs=!1;const cp=new Map;function xee(e,t){let n;function o(){Ov(e)?t():n=Ze(()=>{o()})}return o(),()=>{Ze.cancel(n)}}function Uy(e,t,n){if(cp.get(e)&&Ze.cancel(cp.get(e)),n<=0){cp.set(e,Ze(()=>{e.scrollTop=t}));return}const r=(t-e.scrollTop)/n*10;cp.set(e,Ze(()=>{e.scrollTop+=r,e.scrollTop!==t&&Uy(e,t,n-10)}))}function ou(e,t){let{onLeftRight:n,onCtrlLeftRight:o,onUpDown:r,onPageUpDown:i,onEnter:a}=t;const{which:l,ctrlKey:s,metaKey:u}=e;switch(l){case Ie.LEFT:if(s||u){if(o)return o(-1),!0}else if(n)return n(-1),!0;break;case Ie.RIGHT:if(s||u){if(o)return o(1),!0}else if(n)return n(1),!0;break;case Ie.UP:if(r)return r(-1),!0;break;case Ie.DOWN:if(r)return r(1),!0;break;case Ie.PAGE_UP:if(i)return i(-1),!0;break;case Ie.PAGE_DOWN:if(i)return i(1),!0;break;case Ie.ENTER:if(a)return a(),!0;break}return!1}function QA(e,t,n,o){let r=e;if(!r)switch(t){case"time":r=o?"hh:mm:ss a":"HH:mm:ss";break;case"week":r="gggg-wo";break;case"month":r="YYYY-MM";break;case"quarter":r="YYYY-[Q]Q";break;case"year":r="YYYY";break;default:r=n?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"}return r}function e5(e,t,n){const o=e==="time"?8:10,r=typeof t=="function"?t(n.getNow()).length:t.length;return Math.max(o,r)+2}let xu=null;const up=new Set;function $ee(e){return!xu&&typeof window<"u"&&window.addEventListener&&(xu=t=>{[...up].forEach(n=>{n(t)})},window.addEventListener("mousedown",xu)),up.add(e),()=>{up.delete(e),up.size===0&&(window.removeEventListener("mousedown",xu),xu=null)}}function wee(e){var t;const n=e.target;return e.composed&&n.shadowRoot&&((t=e.composedPath)===null||t===void 0?void 0:t.call(e)[0])||n}const Pee=e=>e==="month"||e==="date"?"year":e,Oee=e=>e==="date"?"month":e,Iee=e=>e==="month"||e==="date"?"quarter":e,Tee=e=>e==="date"?"week":e,Eee={year:Pee,month:Oee,quarter:Iee,week:Tee,time:null,date:null};function t5(e,t){return e.some(n=>n&&n.contains(t))}const Rr=10,Hi=Rr*10;function ZC(e){const t=un(e),{prefixCls:n,onViewDateChange:o,generateConfig:r,viewDate:i,operationRef:a,onSelect:l,onPanelChange:s}=t,u=`${n}-decade-panel`;a.value={onKeydown:f=>ou(f,{onLeftRight:p=>{l(r.addYear(i,p*Rr),"key")},onCtrlLeftRight:p=>{l(r.addYear(i,p*Hi),"key")},onUpDown:p=>{l(r.addYear(i,p*Rr*Ky),"key")},onEnter:()=>{s("year",i)}})};const c=f=>{const p=r.addYear(i,f*Hi);o(p),s(null,p)},d=f=>{l(f,"mouse"),s("year",f)};return g("div",{class:u},[g(qC,k(k({},t),{},{prefixCls:n,onPrevDecades:()=>{c(-1)},onNextDecades:()=>{c(1)}}),null),g(JC,k(k({},t),{},{prefixCls:n,onSelect:d}),null)])}ZC.displayName="DecadePanel";ZC.inheritAttrs=!1;const Gp=7;function ds(e,t){if(!e&&!t)return!0;if(!e||!t)return!1}function _ee(e,t,n){const o=ds(t,n);if(typeof o=="boolean")return o;const r=Math.floor(e.getYear(t)/10),i=Math.floor(e.getYear(n)/10);return r===i}function Zv(e,t,n){const o=ds(t,n);return typeof o=="boolean"?o:e.getYear(t)===e.getYear(n)}function Gy(e,t){return Math.floor(e.getMonth(t)/3)+1}function n5(e,t,n){const o=ds(t,n);return typeof o=="boolean"?o:Zv(e,t,n)&&Gy(e,t)===Gy(e,n)}function QC(e,t,n){const o=ds(t,n);return typeof o=="boolean"?o:Zv(e,t,n)&&e.getMonth(t)===e.getMonth(n)}function zi(e,t,n){const o=ds(t,n);return typeof o=="boolean"?o:e.getYear(t)===e.getYear(n)&&e.getMonth(t)===e.getMonth(n)&&e.getDate(t)===e.getDate(n)}function Mee(e,t,n){const o=ds(t,n);return typeof o=="boolean"?o:e.getHour(t)===e.getHour(n)&&e.getMinute(t)===e.getMinute(n)&&e.getSecond(t)===e.getSecond(n)}function o5(e,t,n,o){const r=ds(n,o);return typeof r=="boolean"?r:e.locale.getWeek(t,n)===e.locale.getWeek(t,o)}function rc(e,t,n){return zi(e,t,n)&&Mee(e,t,n)}function dp(e,t,n,o){return!t||!n||!o?!1:!zi(e,t,o)&&!zi(e,n,o)&&e.isAfter(o,t)&&e.isAfter(n,o)}function Aee(e,t,n){const o=t.locale.getWeekFirstDay(e),r=t.setDate(n,1),i=t.getWeekDay(r);let a=t.addDate(r,o-i);return t.getMonth(a)===t.getMonth(n)&&t.getDate(a)>1&&(a=t.addDate(a,-7)),a}function od(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;switch(t){case"year":return n.addYear(e,o*10);case"quarter":case"month":return n.addYear(e,o);default:return n.addMonth(e,o)}}function Xn(e,t){let{generateConfig:n,locale:o,format:r}=t;return typeof r=="function"?r(e):n.locale.format(o.locale,e,r)}function r5(e,t){let{generateConfig:n,locale:o,formatList:r}=t;return!e||typeof r[0]=="function"?null:n.locale.parse(o.locale,e,r)}function Xy(e){let{cellDate:t,mode:n,disabledDate:o,generateConfig:r}=e;if(!o)return!1;const i=(a,l,s)=>{let u=l;for(;u<=s;){let c;switch(a){case"date":{if(c=r.setDate(t,u),!o(c))return!1;break}case"month":{if(c=r.setMonth(t,u),!Xy({cellDate:c,mode:"month",generateConfig:r,disabledDate:o}))return!1;break}case"year":{if(c=r.setYear(t,u),!Xy({cellDate:c,mode:"year",generateConfig:r,disabledDate:o}))return!1;break}}u+=1}return!0};switch(n){case"date":case"week":return o(t);case"month":{const l=r.getDate(r.getEndDate(t));return i("date",1,l)}case"quarter":{const a=Math.floor(r.getMonth(t)/3)*3,l=a+2;return i("month",a,l)}case"year":return i("month",0,11);case"decade":{const a=r.getYear(t),l=Math.floor(a/Rr)*Rr,s=l+Rr-1;return i("year",l,s)}}}function ex(e){const t=un(e),{hideHeader:n}=yi();if(n.value)return null;const{prefixCls:o,generateConfig:r,locale:i,value:a,format:l}=t,s=`${o}-header`;return g(Za,{prefixCls:s},{default:()=>[a?Xn(a,{locale:i,format:l,generateConfig:r}):" "]})}ex.displayName="TimeHeader";ex.inheritAttrs=!1;const fp=le({name:"TimeUnitColumn",props:["prefixCls","units","onSelect","value","active","hideDisabledOptions"],setup(e){const{open:t}=yi(),n=se(null),o=ae(new Map),r=ae();return be(()=>e.value,()=>{const i=o.value.get(e.value);i&&t.value!==!1&&Uy(n.value,i.offsetTop,120)}),tt(()=>{var i;(i=r.value)===null||i===void 0||i.call(r)}),be(t,()=>{var i;(i=r.value)===null||i===void 0||i.call(r),ot(()=>{if(t.value){const a=o.value.get(e.value);a&&(r.value=xee(a,()=>{Uy(n.value,a.offsetTop,0)}))}})},{immediate:!0,flush:"post"}),()=>{const{prefixCls:i,units:a,onSelect:l,value:s,active:u,hideDisabledOptions:c}=e,d=`${i}-cell`;return g("ul",{class:ge(`${i}-column`,{[`${i}-column-active`]:u}),ref:n,style:{position:"relative"}},[a.map(f=>c&&f.disabled?null:g("li",{key:f.value,ref:p=>{o.value.set(f.value,p)},class:ge(d,{[`${d}-disabled`]:f.disabled,[`${d}-selected`]:s===f.value}),onClick:()=>{f.disabled||l(f.value)}},[g("div",{class:`${d}-inner`},[f.label])]))])}}});function i5(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0",o=String(e);for(;o.length{(n.startsWith("data-")||n.startsWith("aria-")||n==="role"||n==="name")&&!n.startsWith("data-__")&&(t[n]=e[n])}),t}function wt(e,t){return e?e[t]:null}function lr(e,t,n){const o=[wt(e,0),wt(e,1)];return o[n]=typeof t=="function"?t(o[n]):t,!o[0]&&!o[1]?null:o}function k0(e,t,n,o){const r=[];for(let i=e;i<=t;i+=n)r.push({label:i5(i,2),value:i,disabled:(o||[]).includes(i)});return r}const Dee=le({compatConfig:{MODE:3},name:"TimeBody",inheritAttrs:!1,props:["generateConfig","prefixCls","operationRef","activeColumnIndex","value","showHour","showMinute","showSecond","use12Hours","hourStep","minuteStep","secondStep","disabledHours","disabledMinutes","disabledSeconds","disabledTime","hideDisabledOptions","onSelect"],setup(e){const t=E(()=>e.value?e.generateConfig.getHour(e.value):-1),n=E(()=>e.use12Hours?t.value>=12:!1),o=E(()=>e.use12Hours?t.value%12:t.value),r=E(()=>e.value?e.generateConfig.getMinute(e.value):-1),i=E(()=>e.value?e.generateConfig.getSecond(e.value):-1),a=ae(e.generateConfig.getNow()),l=ae(),s=ae(),u=ae();cv(()=>{a.value=e.generateConfig.getNow()}),Ve(()=>{if(e.disabledTime){const m=e.disabledTime(a);[l.value,s.value,u.value]=[m.disabledHours,m.disabledMinutes,m.disabledSeconds]}else[l.value,s.value,u.value]=[e.disabledHours,e.disabledMinutes,e.disabledSeconds]});const c=(m,b,S,C)=>{let $=e.value||e.generateConfig.getNow();const x=Math.max(0,b),P=Math.max(0,S),w=Math.max(0,C);return $=ZA(e.generateConfig,$,!e.use12Hours||!m?x:x+12,P,w),$},d=E(()=>{var m;return k0(0,23,(m=e.hourStep)!==null&&m!==void 0?m:1,l.value&&l.value())}),f=E(()=>{if(!e.use12Hours)return[!1,!1];const m=[!0,!0];return d.value.forEach(b=>{let{disabled:S,value:C}=b;S||(C>=12?m[1]=!1:m[0]=!1)}),m}),p=E(()=>e.use12Hours?d.value.filter(n.value?m=>m.value>=12:m=>m.value<12).map(m=>{const b=m.value%12,S=b===0?"12":i5(b,2);return y(y({},m),{label:S,value:b})}):d.value),v=E(()=>{var m;return k0(0,59,(m=e.minuteStep)!==null&&m!==void 0?m:1,s.value&&s.value(t.value))}),h=E(()=>{var m;return k0(0,59,(m=e.secondStep)!==null&&m!==void 0?m:1,u.value&&u.value(t.value,r.value))});return()=>{const{prefixCls:m,operationRef:b,activeColumnIndex:S,showHour:C,showMinute:$,showSecond:x,use12Hours:P,hideDisabledOptions:w,onSelect:O}=e,I=[],_=`${m}-content`,T=`${m}-time-panel`;b.value={onUpDown:H=>{const M=I[S];if(M){const D=M.units.findIndex(L=>L.value===M.value),N=M.units.length;for(let L=1;L{O(c(n.value,H,r.value,i.value),"mouse")}),A($,g(fp,{key:"minute"},null),r.value,v.value,H=>{O(c(n.value,o.value,H,i.value),"mouse")}),A(x,g(fp,{key:"second"},null),i.value,h.value,H=>{O(c(n.value,o.value,r.value,H),"mouse")});let R=-1;return typeof n.value=="boolean"&&(R=n.value?1:0),A(P===!0,g(fp,{key:"12hours"},null),R,[{label:"AM",value:0,disabled:f.value[0]},{label:"PM",value:1,disabled:f.value[1]}],H=>{O(c(!!H,o.value,r.value,i.value),"mouse")}),g("div",{class:_},[I.map(H=>{let{node:M}=H;return M})])}}}),Nee=e=>e.filter(t=>t!==!1).length;function Qv(e){const t=un(e),{generateConfig:n,format:o="HH:mm:ss",prefixCls:r,active:i,operationRef:a,showHour:l,showMinute:s,showSecond:u,use12Hours:c=!1,onSelect:d,value:f}=t,p=`${r}-time-panel`,v=ae(),h=ae(-1),m=Nee([l,s,u,c]);return a.value={onKeydown:b=>ou(b,{onLeftRight:S=>{h.value=(h.value+S+m)%m},onUpDown:S=>{h.value===-1?h.value=0:v.value&&v.value.onUpDown(S)},onEnter:()=>{d(f||n.getNow(),"key"),h.value=-1}}),onBlur:()=>{h.value=-1}},g("div",{class:ge(p,{[`${p}-active`]:i})},[g(ex,k(k({},t),{},{format:o,prefixCls:r}),null),g(Dee,k(k({},t),{},{prefixCls:r,activeColumnIndex:h.value,operationRef:v}),null)])}Qv.displayName="TimePanel";Qv.inheritAttrs=!1;function em(e){let{cellPrefixCls:t,generateConfig:n,rangedValue:o,hoverRangedValue:r,isInView:i,isSameCell:a,offsetCell:l,today:s,value:u}=e;function c(d){const f=l(d,-1),p=l(d,1),v=wt(o,0),h=wt(o,1),m=wt(r,0),b=wt(r,1),S=dp(n,m,b,d);function C(I){return a(v,I)}function $(I){return a(h,I)}const x=a(m,d),P=a(b,d),w=(S||P)&&(!i(f)||$(f)),O=(S||x)&&(!i(p)||C(p));return{[`${t}-in-view`]:i(d),[`${t}-in-range`]:dp(n,v,h,d),[`${t}-range-start`]:C(d),[`${t}-range-end`]:$(d),[`${t}-range-start-single`]:C(d)&&!h,[`${t}-range-end-single`]:$(d)&&!v,[`${t}-range-start-near-hover`]:C(d)&&(a(f,m)||dp(n,m,b,f)),[`${t}-range-end-near-hover`]:$(d)&&(a(p,b)||dp(n,m,b,p)),[`${t}-range-hover`]:S,[`${t}-range-hover-start`]:x,[`${t}-range-hover-end`]:P,[`${t}-range-hover-edge-start`]:w,[`${t}-range-hover-edge-end`]:O,[`${t}-range-hover-edge-start-near-range`]:w&&a(f,h),[`${t}-range-hover-edge-end-near-range`]:O&&a(p,v),[`${t}-today`]:a(s,d),[`${t}-selected`]:a(u,d)}}return c}const s5=Symbol("RangeContextProps"),kee=e=>{Xe(s5,e)},Cf=()=>ze(s5,{rangedValue:ae(),hoverRangedValue:ae(),inRange:ae(),panelPosition:ae()}),Lee=le({compatConfig:{MODE:3},name:"PanelContextProvider",inheritAttrs:!1,props:{value:{type:Object,default:()=>({})}},setup(e,t){let{slots:n}=t;const o={rangedValue:ae(e.value.rangedValue),hoverRangedValue:ae(e.value.hoverRangedValue),inRange:ae(e.value.inRange),panelPosition:ae(e.value.panelPosition)};return kee(o),be(()=>e.value,()=>{Object.keys(e.value).forEach(r=>{o[r]&&(o[r].value=e.value[r])})}),()=>{var r;return(r=n.default)===null||r===void 0?void 0:r.call(n)}}});function tm(e){const t=un(e),{prefixCls:n,generateConfig:o,prefixColumn:r,locale:i,rowCount:a,viewDate:l,value:s,dateRender:u}=t,{rangedValue:c,hoverRangedValue:d}=Cf(),f=Aee(i.locale,o,l),p=`${n}-cell`,v=o.locale.getWeekFirstDay(i.locale),h=o.getNow(),m=[],b=i.shortWeekDays||(o.locale.getShortWeekDays?o.locale.getShortWeekDays(i.locale):[]);r&&m.push(g("th",{key:"empty","aria-label":"empty cell"},null));for(let $=0;$zi(o,$,x),isInView:$=>QC(o,$,l),offsetCell:($,x)=>o.addDate($,x)}),C=u?$=>u({current:$,today:h}):void 0;return g(us,k(k({},t),{},{rowNum:a,colNum:Gp,baseDate:f,getCellNode:C,getCellText:o.getDate,getCellClassName:S,getCellDate:o.addDate,titleCell:$=>Xn($,{locale:i,format:"YYYY-MM-DD",generateConfig:o}),headerCells:m}),null)}tm.displayName="DateBody";tm.inheritAttrs=!1;tm.props=["prefixCls","generateConfig","value?","viewDate","locale","rowCount","onSelect","dateRender?","disabledDate?","prefixColumn?","rowClassName?"];function tx(e){const t=un(e),{prefixCls:n,generateConfig:o,locale:r,viewDate:i,onNextMonth:a,onPrevMonth:l,onNextYear:s,onPrevYear:u,onYearClick:c,onMonthClick:d}=t,{hideHeader:f}=yi();if(f.value)return null;const p=`${n}-header`,v=r.shortMonths||(o.locale.getShortMonths?o.locale.getShortMonths(r.locale):[]),h=o.getMonth(i),m=g("button",{type:"button",key:"year",onClick:c,tabindex:-1,class:`${n}-year-btn`},[Xn(i,{locale:r,format:r.yearFormat,generateConfig:o})]),b=g("button",{type:"button",key:"month",onClick:d,tabindex:-1,class:`${n}-month-btn`},[r.monthFormat?Xn(i,{locale:r,format:r.monthFormat,generateConfig:o}):v[h]]),S=r.monthBeforeYear?[b,m]:[m,b];return g(Za,k(k({},t),{},{prefixCls:p,onSuperPrev:u,onPrev:l,onNext:a,onSuperNext:s}),{default:()=>[S]})}tx.displayName="DateHeader";tx.inheritAttrs=!1;const Fee=6;function xf(e){const t=un(e),{prefixCls:n,panelName:o="date",keyboardConfig:r,active:i,operationRef:a,generateConfig:l,value:s,viewDate:u,onViewDateChange:c,onPanelChange:d,onSelect:f}=t,p=`${n}-${o}-panel`;a.value={onKeydown:m=>ou(m,y({onLeftRight:b=>{f(l.addDate(s||u,b),"key")},onCtrlLeftRight:b=>{f(l.addYear(s||u,b),"key")},onUpDown:b=>{f(l.addDate(s||u,b*Gp),"key")},onPageUpDown:b=>{f(l.addMonth(s||u,b),"key")}},r))};const v=m=>{const b=l.addYear(u,m);c(b),d(null,b)},h=m=>{const b=l.addMonth(u,m);c(b),d(null,b)};return g("div",{class:ge(p,{[`${p}-active`]:i})},[g(tx,k(k({},t),{},{prefixCls:n,value:s,viewDate:u,onPrevYear:()=>{v(-1)},onNextYear:()=>{v(1)},onPrevMonth:()=>{h(-1)},onNextMonth:()=>{h(1)},onMonthClick:()=>{d("month",u)},onYearClick:()=>{d("year",u)}}),null),g(tm,k(k({},t),{},{onSelect:m=>f(m,"mouse"),prefixCls:n,value:s,viewDate:u,rowCount:Fee}),null)])}xf.displayName="DatePanel";xf.inheritAttrs=!1;const oI=Ree("date","time");function nx(e){const t=un(e),{prefixCls:n,operationRef:o,generateConfig:r,value:i,defaultValue:a,disabledTime:l,showTime:s,onSelect:u}=t,c=`${n}-datetime-panel`,d=ae(null),f=ae({}),p=ae({}),v=typeof s=="object"?y({},s):{};function h(C){const $=oI.indexOf(d.value)+C;return oI[$]||null}const m=C=>{p.value.onBlur&&p.value.onBlur(C),d.value=null};o.value={onKeydown:C=>{if(C.which===Ie.TAB){const $=h(C.shiftKey?-1:1);return d.value=$,$&&C.preventDefault(),!0}if(d.value){const $=d.value==="date"?f:p;return $.value&&$.value.onKeydown&&$.value.onKeydown(C),!0}return[Ie.LEFT,Ie.RIGHT,Ie.UP,Ie.DOWN].includes(C.which)?(d.value="date",!0):!1},onBlur:m,onClose:m};const b=(C,$)=>{let x=C;$==="date"&&!i&&v.defaultValue?(x=r.setHour(x,r.getHour(v.defaultValue)),x=r.setMinute(x,r.getMinute(v.defaultValue)),x=r.setSecond(x,r.getSecond(v.defaultValue))):$==="time"&&!i&&a&&(x=r.setYear(x,r.getYear(a)),x=r.setMonth(x,r.getMonth(a)),x=r.setDate(x,r.getDate(a))),u&&u(x,"mouse")},S=l?l(i||null):{};return g("div",{class:ge(c,{[`${c}-active`]:d.value})},[g(xf,k(k({},t),{},{operationRef:f,active:d.value==="date",onSelect:C=>{b(Up(r,C,!i&&typeof s=="object"?s.defaultValue:null),"date")}}),null),g(Qv,k(k(k(k({},t),{},{format:void 0},v),S),{},{disabledTime:null,defaultValue:void 0,operationRef:p,active:d.value==="time",onSelect:C=>{b(C,"time")}}),null)])}nx.displayName="DatetimePanel";nx.inheritAttrs=!1;function ox(e){const t=un(e),{prefixCls:n,generateConfig:o,locale:r,value:i}=t,a=`${n}-cell`,l=c=>g("td",{key:"week",class:ge(a,`${a}-week`)},[o.locale.getWeek(r.locale,c)]),s=`${n}-week-panel-row`,u=c=>ge(s,{[`${s}-selected`]:o5(o,r.locale,i,c)});return g(xf,k(k({},t),{},{panelName:"week",prefixColumn:l,rowClassName:u,keyboardConfig:{onLeftRight:null}}),null)}ox.displayName="WeekPanel";ox.inheritAttrs=!1;function rx(e){const t=un(e),{prefixCls:n,generateConfig:o,locale:r,viewDate:i,onNextYear:a,onPrevYear:l,onYearClick:s}=t,{hideHeader:u}=yi();if(u.value)return null;const c=`${n}-header`;return g(Za,k(k({},t),{},{prefixCls:c,onSuperPrev:l,onSuperNext:a}),{default:()=>[g("button",{type:"button",onClick:s,class:`${n}-year-btn`},[Xn(i,{locale:r,format:r.yearFormat,generateConfig:o})])]})}rx.displayName="MonthHeader";rx.inheritAttrs=!1;const c5=3,Bee=4;function ix(e){const t=un(e),{prefixCls:n,locale:o,value:r,viewDate:i,generateConfig:a,monthCellRender:l}=t,{rangedValue:s,hoverRangedValue:u}=Cf(),c=`${n}-cell`,d=em({cellPrefixCls:c,value:r,generateConfig:a,rangedValue:s.value,hoverRangedValue:u.value,isSameCell:(h,m)=>QC(a,h,m),isInView:()=>!0,offsetCell:(h,m)=>a.addMonth(h,m)}),f=o.shortMonths||(a.locale.getShortMonths?a.locale.getShortMonths(o.locale):[]),p=a.setMonth(i,0),v=l?h=>l({current:h,locale:o}):void 0;return g(us,k(k({},t),{},{rowNum:Bee,colNum:c5,baseDate:p,getCellNode:v,getCellText:h=>o.monthFormat?Xn(h,{locale:o,format:o.monthFormat,generateConfig:a}):f[a.getMonth(h)],getCellClassName:d,getCellDate:a.addMonth,titleCell:h=>Xn(h,{locale:o,format:"YYYY-MM",generateConfig:a})}),null)}ix.displayName="MonthBody";ix.inheritAttrs=!1;function ax(e){const t=un(e),{prefixCls:n,operationRef:o,onViewDateChange:r,generateConfig:i,value:a,viewDate:l,onPanelChange:s,onSelect:u}=t,c=`${n}-month-panel`;o.value={onKeydown:f=>ou(f,{onLeftRight:p=>{u(i.addMonth(a||l,p),"key")},onCtrlLeftRight:p=>{u(i.addYear(a||l,p),"key")},onUpDown:p=>{u(i.addMonth(a||l,p*c5),"key")},onEnter:()=>{s("date",a||l)}})};const d=f=>{const p=i.addYear(l,f);r(p),s(null,p)};return g("div",{class:c},[g(rx,k(k({},t),{},{prefixCls:n,onPrevYear:()=>{d(-1)},onNextYear:()=>{d(1)},onYearClick:()=>{s("year",l)}}),null),g(ix,k(k({},t),{},{prefixCls:n,onSelect:f=>{u(f,"mouse"),s("date",f)}}),null)])}ax.displayName="MonthPanel";ax.inheritAttrs=!1;function lx(e){const t=un(e),{prefixCls:n,generateConfig:o,locale:r,viewDate:i,onNextYear:a,onPrevYear:l,onYearClick:s}=t,{hideHeader:u}=yi();if(u.value)return null;const c=`${n}-header`;return g(Za,k(k({},t),{},{prefixCls:c,onSuperPrev:l,onSuperNext:a}),{default:()=>[g("button",{type:"button",onClick:s,class:`${n}-year-btn`},[Xn(i,{locale:r,format:r.yearFormat,generateConfig:o})])]})}lx.displayName="QuarterHeader";lx.inheritAttrs=!1;const Hee=4,zee=1;function sx(e){const t=un(e),{prefixCls:n,locale:o,value:r,viewDate:i,generateConfig:a}=t,{rangedValue:l,hoverRangedValue:s}=Cf(),u=`${n}-cell`,c=em({cellPrefixCls:u,value:r,generateConfig:a,rangedValue:l.value,hoverRangedValue:s.value,isSameCell:(f,p)=>n5(a,f,p),isInView:()=>!0,offsetCell:(f,p)=>a.addMonth(f,p*3)}),d=a.setDate(a.setMonth(i,0),1);return g(us,k(k({},t),{},{rowNum:zee,colNum:Hee,baseDate:d,getCellText:f=>Xn(f,{locale:o,format:o.quarterFormat||"[Q]Q",generateConfig:a}),getCellClassName:c,getCellDate:(f,p)=>a.addMonth(f,p*3),titleCell:f=>Xn(f,{locale:o,format:"YYYY-[Q]Q",generateConfig:a})}),null)}sx.displayName="QuarterBody";sx.inheritAttrs=!1;function cx(e){const t=un(e),{prefixCls:n,operationRef:o,onViewDateChange:r,generateConfig:i,value:a,viewDate:l,onPanelChange:s,onSelect:u}=t,c=`${n}-quarter-panel`;o.value={onKeydown:f=>ou(f,{onLeftRight:p=>{u(i.addMonth(a||l,p*3),"key")},onCtrlLeftRight:p=>{u(i.addYear(a||l,p),"key")},onUpDown:p=>{u(i.addYear(a||l,p),"key")}})};const d=f=>{const p=i.addYear(l,f);r(p),s(null,p)};return g("div",{class:c},[g(lx,k(k({},t),{},{prefixCls:n,onPrevYear:()=>{d(-1)},onNextYear:()=>{d(1)},onYearClick:()=>{s("year",l)}}),null),g(sx,k(k({},t),{},{prefixCls:n,onSelect:f=>{u(f,"mouse")}}),null)])}cx.displayName="QuarterPanel";cx.inheritAttrs=!1;function ux(e){const t=un(e),{prefixCls:n,generateConfig:o,viewDate:r,onPrevDecade:i,onNextDecade:a,onDecadeClick:l}=t,{hideHeader:s}=yi();if(s.value)return null;const u=`${n}-header`,c=o.getYear(r),d=Math.floor(c/Ma)*Ma,f=d+Ma-1;return g(Za,k(k({},t),{},{prefixCls:u,onSuperPrev:i,onSuperNext:a}),{default:()=>[g("button",{type:"button",onClick:l,class:`${n}-decade-btn`},[d,zn("-"),f])]})}ux.displayName="YearHeader";ux.inheritAttrs=!1;const Yy=3,rI=4;function dx(e){const t=un(e),{prefixCls:n,value:o,viewDate:r,locale:i,generateConfig:a}=t,{rangedValue:l,hoverRangedValue:s}=Cf(),u=`${n}-cell`,c=a.getYear(r),d=Math.floor(c/Ma)*Ma,f=d+Ma-1,p=a.setYear(r,d-Math.ceil((Yy*rI-Ma)/2)),v=m=>{const b=a.getYear(m);return d<=b&&b<=f},h=em({cellPrefixCls:u,value:o,generateConfig:a,rangedValue:l.value,hoverRangedValue:s.value,isSameCell:(m,b)=>Zv(a,m,b),isInView:v,offsetCell:(m,b)=>a.addYear(m,b)});return g(us,k(k({},t),{},{rowNum:rI,colNum:Yy,baseDate:p,getCellText:a.getYear,getCellClassName:h,getCellDate:a.addYear,titleCell:m=>Xn(m,{locale:i,format:"YYYY",generateConfig:a})}),null)}dx.displayName="YearBody";dx.inheritAttrs=!1;const Ma=10;function fx(e){const t=un(e),{prefixCls:n,operationRef:o,onViewDateChange:r,generateConfig:i,value:a,viewDate:l,sourceMode:s,onSelect:u,onPanelChange:c}=t,d=`${n}-year-panel`;o.value={onKeydown:p=>ou(p,{onLeftRight:v=>{u(i.addYear(a||l,v),"key")},onCtrlLeftRight:v=>{u(i.addYear(a||l,v*Ma),"key")},onUpDown:v=>{u(i.addYear(a||l,v*Yy),"key")},onEnter:()=>{c(s==="date"?"date":"month",a||l)}})};const f=p=>{const v=i.addYear(l,p*10);r(v),c(null,v)};return g("div",{class:d},[g(ux,k(k({},t),{},{prefixCls:n,onPrevDecade:()=>{f(-1)},onNextDecade:()=>{f(1)},onDecadeClick:()=>{c("decade",l)}}),null),g(dx,k(k({},t),{},{prefixCls:n,onSelect:p=>{c(s==="date"?"date":"month",p),u(p,"mouse")}}),null)])}fx.displayName="YearPanel";fx.inheritAttrs=!1;function u5(e,t,n){return n?g("div",{class:`${e}-footer-extra`},[n(t)]):null}function d5(e){let{prefixCls:t,components:n={},needConfirmButton:o,onNow:r,onOk:i,okDisabled:a,showNow:l,locale:s}=e,u,c;if(o){const d=n.button||"button";r&&l!==!1&&(u=g("li",{class:`${t}-now`},[g("a",{class:`${t}-now-btn`,onClick:r},[s.now])])),c=o&&g("li",{class:`${t}-ok`},[g(d,{disabled:a,onClick:f=>{f.stopPropagation(),i&&i()}},{default:()=>[s.ok]})])}return!u&&!c?null:g("ul",{class:`${t}-ranges`},[u,c])}function jee(){return le({name:"PickerPanel",inheritAttrs:!1,props:{prefixCls:String,locale:Object,generateConfig:Object,value:Object,defaultValue:Object,pickerValue:Object,defaultPickerValue:Object,disabledDate:Function,mode:String,picker:{type:String,default:"date"},tabindex:{type:[Number,String],default:0},showNow:{type:Boolean,default:void 0},showTime:[Boolean,Object],showToday:Boolean,renderExtraFooter:Function,dateRender:Function,hideHeader:{type:Boolean,default:void 0},onSelect:Function,onChange:Function,onPanelChange:Function,onMousedown:Function,onPickerValueChange:Function,onOk:Function,components:Object,direction:String,hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1}},setup(e,t){let{attrs:n}=t;const o=E(()=>e.picker==="date"&&!!e.showTime||e.picker==="time"),r=E(()=>24%e.hourStep===0),i=E(()=>60%e.minuteStep===0),a=E(()=>60%e.secondStep===0),l=yi(),{operationRef:s,onSelect:u,hideRanges:c,defaultOpenValue:d}=l,{inRange:f,panelPosition:p,rangedValue:v,hoverRangedValue:h}=Cf(),m=ae({}),[b,S]=Dt(null,{value:We(e,"value"),defaultValue:e.defaultValue,postState:N=>!N&&(d!=null&&d.value)&&e.picker==="time"?d.value:N}),[C,$]=Dt(null,{value:We(e,"pickerValue"),defaultValue:e.defaultPickerValue||b.value,postState:N=>{const{generateConfig:L,showTime:F,defaultValue:B}=e,j=L.getNow();return N?!b.value&&e.showTime?typeof F=="object"?Up(L,Array.isArray(N)?N[0]:N,F.defaultValue||j):B?Up(L,Array.isArray(N)?N[0]:N,B):Up(L,Array.isArray(N)?N[0]:N,j):N:j}}),x=N=>{$(N),e.onPickerValueChange&&e.onPickerValueChange(N)},P=N=>{const L=Eee[e.picker];return L?L(N):N},[w,O]=Dt(()=>e.picker==="time"?"time":P("date"),{value:We(e,"mode")});be(()=>e.picker,()=>{O(e.picker)});const I=ae(w.value),_=N=>{I.value=N},T=(N,L)=>{const{onPanelChange:F,generateConfig:B}=e,j=P(N||w.value);_(w.value),O(j),F&&(w.value!==j||rc(B,C.value,C.value))&&F(L,j)},A=function(N,L){let F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{picker:B,generateConfig:j,onSelect:z,onChange:G,disabledDate:Q}=e;(w.value===B||F)&&(S(N),z&&z(N),u&&u(N,L),G&&!rc(j,N,b.value)&&!(Q!=null&&Q(N))&&G(N))},R=N=>m.value&&m.value.onKeydown?([Ie.LEFT,Ie.RIGHT,Ie.UP,Ie.DOWN,Ie.PAGE_UP,Ie.PAGE_DOWN,Ie.ENTER].includes(N.which)&&N.preventDefault(),m.value.onKeydown(N)):!1,H=N=>{m.value&&m.value.onBlur&&m.value.onBlur(N)},M=()=>{const{generateConfig:N,hourStep:L,minuteStep:F,secondStep:B}=e,j=N.getNow(),z=See(N.getHour(j),N.getMinute(j),N.getSecond(j),r.value?L:1,i.value?F:1,a.value?B:1),G=ZA(N,j,z[0],z[1],z[2]);A(G,"submit")},D=E(()=>{const{prefixCls:N,direction:L}=e;return ge(`${N}-panel`,{[`${N}-panel-has-range`]:v&&v.value&&v.value[0]&&v.value[1],[`${N}-panel-has-range-hover`]:h&&h.value&&h.value[0]&&h.value[1],[`${N}-panel-rtl`]:L==="rtl"})});return YC(y(y({},l),{mode:w,hideHeader:E(()=>{var N;return e.hideHeader!==void 0?e.hideHeader:(N=l.hideHeader)===null||N===void 0?void 0:N.value}),hidePrevBtn:E(()=>f.value&&p.value==="right"),hideNextBtn:E(()=>f.value&&p.value==="left")})),be(()=>e.value,()=>{e.value&&$(e.value)}),()=>{const{prefixCls:N="ant-picker",locale:L,generateConfig:F,disabledDate:B,picker:j="date",tabindex:z=0,showNow:G,showTime:Q,showToday:Y,renderExtraFooter:oe,onMousedown:Z,onOk:re,components:ne}=e;s&&p.value!=="right"&&(s.value={onKeydown:R,onClose:()=>{m.value&&m.value.onClose&&m.value.onClose()}});let X;const te=y(y(y({},n),e),{operationRef:m,prefixCls:N,viewDate:C.value,value:b.value,onViewDateChange:x,sourceMode:I.value,onPanelChange:T,disabledDate:B});switch(delete te.onChange,delete te.onSelect,w.value){case"decade":X=g(ZC,k(k({},te),{},{onSelect:(de,fe)=>{x(de),A(de,fe)}}),null);break;case"year":X=g(fx,k(k({},te),{},{onSelect:(de,fe)=>{x(de),A(de,fe)}}),null);break;case"month":X=g(ax,k(k({},te),{},{onSelect:(de,fe)=>{x(de),A(de,fe)}}),null);break;case"quarter":X=g(cx,k(k({},te),{},{onSelect:(de,fe)=>{x(de),A(de,fe)}}),null);break;case"week":X=g(ox,k(k({},te),{},{onSelect:(de,fe)=>{x(de),A(de,fe)}}),null);break;case"time":delete te.showTime,X=g(Qv,k(k(k({},te),typeof Q=="object"?Q:null),{},{onSelect:(de,fe)=>{x(de),A(de,fe)}}),null);break;default:Q?X=g(nx,k(k({},te),{},{onSelect:(de,fe)=>{x(de),A(de,fe)}}),null):X=g(xf,k(k({},te),{},{onSelect:(de,fe)=>{x(de),A(de,fe)}}),null)}let W,U;c!=null&&c.value||(W=u5(N,w.value,oe),U=d5({prefixCls:N,components:ne,needConfirmButton:o.value,okDisabled:!b.value||B&&B(b.value),locale:L,showNow:G,onNow:o.value&&M,onOk:()=>{b.value&&(A(b.value,"submit",!0),re&&re(b.value))}}));let J;if(Y&&w.value==="date"&&j==="date"&&!Q){const de=F.getNow(),fe=`${N}-today-btn`,pe=B&&B(de);J=g("a",{class:ge(fe,pe&&`${fe}-disabled`),"aria-disabled":pe,onClick:()=>{pe||A(de,"mouse",!0)}},[L.today])}return g("div",{tabindex:z,class:ge(D.value,n.class),style:n.style,onKeydown:R,onBlur:H,onMousedown:Z},[X,W||U||J?g("div",{class:`${N}-footer`},[W,U,J]):null])}}})}const Wee=jee(),px=e=>g(Wee,e),Vee={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};function f5(e,t){let{slots:n}=t;const{prefixCls:o,popupStyle:r,visible:i,dropdownClassName:a,dropdownAlign:l,transitionName:s,getPopupContainer:u,range:c,popupPlacement:d,direction:f}=un(e),p=`${o}-dropdown`;return g(ss,{showAction:[],hideAction:[],popupPlacement:d!==void 0?d:f==="rtl"?"bottomRight":"bottomLeft",builtinPlacements:Vee,prefixCls:p,popupTransitionName:s,popupAlign:l,popupVisible:i,popupClassName:ge(a,{[`${p}-range`]:c,[`${p}-rtl`]:f==="rtl"}),popupStyle:r,getPopupContainer:u},{default:n.default,popup:n.popupElement})}const p5=le({name:"PresetPanel",props:{prefixCls:String,presets:{type:Array,default:()=>[]},onClick:Function,onHover:Function},setup(e){return()=>e.presets.length?g("div",{class:`${e.prefixCls}-presets`},[g("ul",null,[e.presets.map((t,n)=>{let{label:o,value:r}=t;return g("li",{key:n,onClick:i=>{i.stopPropagation(),e.onClick(r)},onMouseenter:()=>{var i;(i=e.onHover)===null||i===void 0||i.call(e,r)},onMouseleave:()=>{var i;(i=e.onHover)===null||i===void 0||i.call(e,null)}},[o])})])]):null}});function qy(e){let{open:t,value:n,isClickOutside:o,triggerOpen:r,forwardKeydown:i,onKeydown:a,blurToCancel:l,onSubmit:s,onCancel:u,onFocus:c,onBlur:d}=e;const f=se(!1),p=se(!1),v=se(!1),h=se(!1),m=se(!1),b=E(()=>({onMousedown:()=>{f.value=!0,r(!0)},onKeydown:C=>{if(a(C,()=>{m.value=!0}),!m.value){switch(C.which){case Ie.ENTER:{t.value?s()!==!1&&(f.value=!0):r(!0),C.preventDefault();return}case Ie.TAB:{f.value&&t.value&&!C.shiftKey?(f.value=!1,C.preventDefault()):!f.value&&t.value&&!i(C)&&C.shiftKey&&(f.value=!0,C.preventDefault());return}case Ie.ESC:{f.value=!0,u();return}}!t.value&&![Ie.SHIFT].includes(C.which)?r(!0):f.value||i(C)}},onFocus:C=>{f.value=!0,p.value=!0,c&&c(C)},onBlur:C=>{if(v.value||!o(document.activeElement)){v.value=!1;return}l.value?setTimeout(()=>{let{activeElement:$}=document;for(;$&&$.shadowRoot;)$=$.shadowRoot.activeElement;o($)&&u()},0):t.value&&(r(!1),h.value&&s()),p.value=!1,d&&d(C)}}));be(t,()=>{h.value=!1}),be(n,()=>{h.value=!0});const S=se();return Ke(()=>{S.value=$ee(C=>{const $=wee(C);if(t.value){const x=o($);x?(!p.value||x)&&r(!1):(v.value=!0,Ze(()=>{v.value=!1}))}})}),tt(()=>{S.value&&S.value()}),[b,{focused:p,typing:f}]}function Jy(e){let{valueTexts:t,onTextChange:n}=e;const o=ae("");function r(a){o.value=a,n(a)}function i(){o.value=t.value[0]}return be(()=>[...t.value],function(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];a.join("||")!==l.join("||")&&t.value.every(s=>s!==o.value)&&i()},{immediate:!0}),[o,r,i]}function fh(e,t){let{formatList:n,generateConfig:o,locale:r}=t;const i=gC(()=>{if(!e.value)return[[""],""];let s="";const u=[];for(let c=0;cu[0]!==s[0]||!Ls(u[1],s[1])),a=E(()=>i.value[0]),l=E(()=>i.value[1]);return[a,l]}function Zy(e,t){let{formatList:n,generateConfig:o,locale:r}=t;const i=ae(null);let a;function l(d){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Ze.cancel(a),f){i.value=d;return}a=Ze(()=>{i.value=d})}const[,s]=fh(i,{formatList:n,generateConfig:o,locale:r});function u(d){l(d)}function c(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;l(null,d)}return be(e,()=>{c(!0)}),tt(()=>{Ze.cancel(a)}),[s,u,c]}function g5(e,t){return E(()=>e!=null&&e.value?e.value:t!=null&&t.value?(FS(!1,"`ranges` is deprecated. Please use `presets` instead."),Object.keys(t.value).map(o=>{const r=t.value[o],i=typeof r=="function"?r():r;return{label:o,value:i}})):[])}function Kee(){return le({name:"Picker",inheritAttrs:!1,props:["prefixCls","id","tabindex","dropdownClassName","dropdownAlign","popupStyle","transitionName","generateConfig","locale","inputReadOnly","allowClear","autofocus","showTime","showNow","showHour","showMinute","showSecond","picker","format","use12Hours","value","defaultValue","open","defaultOpen","defaultOpenValue","suffixIcon","presets","clearIcon","disabled","disabledDate","placeholder","getPopupContainer","panelRender","inputRender","onChange","onOpenChange","onPanelChange","onFocus","onBlur","onMousedown","onMouseup","onMouseenter","onMouseleave","onContextmenu","onClick","onKeydown","onSelect","direction","autocomplete","showToday","renderExtraFooter","dateRender","minuteStep","hourStep","secondStep","hideDisabledOptions"],setup(e,t){let{attrs:n,expose:o}=t;const r=ae(null),i=E(()=>e.presets),a=g5(i),l=E(()=>{var B;return(B=e.picker)!==null&&B!==void 0?B:"date"}),s=E(()=>l.value==="date"&&!!e.showTime||l.value==="time"),u=E(()=>a5(QA(e.format,l.value,e.showTime,e.use12Hours))),c=ae(null),d=ae(null),f=ae(null),[p,v]=Dt(null,{value:We(e,"value"),defaultValue:e.defaultValue}),h=ae(p.value),m=B=>{h.value=B},b=ae(null),[S,C]=Dt(!1,{value:We(e,"open"),defaultValue:e.defaultOpen,postState:B=>e.disabled?!1:B,onChange:B=>{e.onOpenChange&&e.onOpenChange(B),!B&&b.value&&b.value.onClose&&b.value.onClose()}}),[$,x]=fh(h,{formatList:u,generateConfig:We(e,"generateConfig"),locale:We(e,"locale")}),[P,w,O]=Jy({valueTexts:$,onTextChange:B=>{const j=r5(B,{locale:e.locale,formatList:u.value,generateConfig:e.generateConfig});j&&(!e.disabledDate||!e.disabledDate(j))&&m(j)}}),I=B=>{const{onChange:j,generateConfig:z,locale:G}=e;m(B),v(B),j&&!rc(z,p.value,B)&&j(B,B?Xn(B,{generateConfig:z,locale:G,format:u.value[0]}):"")},_=B=>{e.disabled&&B||C(B)},T=B=>S.value&&b.value&&b.value.onKeydown?b.value.onKeydown(B):!1,A=function(){e.onMouseup&&e.onMouseup(...arguments),r.value&&(r.value.focus(),_(!0))},[R,{focused:H,typing:M}]=qy({blurToCancel:s,open:S,value:P,triggerOpen:_,forwardKeydown:T,isClickOutside:B=>!t5([c.value,d.value,f.value],B),onSubmit:()=>!h.value||e.disabledDate&&e.disabledDate(h.value)?!1:(I(h.value),_(!1),O(),!0),onCancel:()=>{_(!1),m(p.value),O()},onKeydown:(B,j)=>{var z;(z=e.onKeydown)===null||z===void 0||z.call(e,B,j)},onFocus:B=>{var j;(j=e.onFocus)===null||j===void 0||j.call(e,B)},onBlur:B=>{var j;(j=e.onBlur)===null||j===void 0||j.call(e,B)}});be([S,$],()=>{S.value||(m(p.value),!$.value.length||$.value[0]===""?w(""):x.value!==P.value&&O())}),be(l,()=>{S.value||O()}),be(p,()=>{m(p.value)});const[D,N,L]=Zy(P,{formatList:u,generateConfig:We(e,"generateConfig"),locale:We(e,"locale")}),F=(B,j)=>{(j==="submit"||j!=="key"&&!s.value)&&(I(B),_(!1))};return YC({operationRef:b,hideHeader:E(()=>l.value==="time"),onSelect:F,open:S,defaultOpenValue:We(e,"defaultOpenValue"),onDateMouseenter:N,onDateMouseleave:L}),o({focus:()=>{r.value&&r.value.focus()},blur:()=>{r.value&&r.value.blur()}}),()=>{const{prefixCls:B="rc-picker",id:j,tabindex:z,dropdownClassName:G,dropdownAlign:Q,popupStyle:Y,transitionName:oe,generateConfig:Z,locale:re,inputReadOnly:ne,allowClear:X,autofocus:te,picker:W="date",defaultOpenValue:U,suffixIcon:J,clearIcon:de,disabled:fe,placeholder:pe,getPopupContainer:ve,panelRender:he,onMousedown:V,onMouseenter:q,onMouseleave:ie,onContextmenu:me,onClick:Se,onSelect:ce,direction:ee,autocomplete:ue="off"}=e,xe=y(y(y({},e),n),{class:ge({[`${B}-panel-focused`]:!M.value}),style:void 0,pickerValue:void 0,onPickerValueChange:void 0,onChange:null});let Pe=g("div",{class:`${B}-panel-layout`},[g(p5,{prefixCls:B,presets:a.value,onClick:Ae=>{I(Ae),_(!1)}},null),g(px,k(k({},xe),{},{generateConfig:Z,value:h.value,locale:re,tabindex:-1,onSelect:Ae=>{ce==null||ce(Ae),m(Ae)},direction:ee,onPanelChange:(Ae,Fe)=>{const{onPanelChange:lt}=e;L(!0),lt==null||lt(Ae,Fe)}}),null)]);he&&(Pe=he(Pe));const _e=g("div",{class:`${B}-panel-container`,ref:c,onMousedown:Ae=>{Ae.preventDefault()}},[Pe]);let Ce;J&&(Ce=g("span",{class:`${B}-suffix`},[J]));let we;X&&p.value&&!fe&&(we=g("span",{onMousedown:Ae=>{Ae.preventDefault(),Ae.stopPropagation()},onMouseup:Ae=>{Ae.preventDefault(),Ae.stopPropagation(),I(null),_(!1)},class:`${B}-clear`,role:"button"},[de||g("span",{class:`${B}-clear-btn`},null)]));const Oe=y(y(y(y({id:j,tabindex:z,disabled:fe,readonly:ne||typeof u.value[0]=="function"||!M.value,value:D.value||P.value,onInput:Ae=>{w(Ae.target.value)},autofocus:te,placeholder:pe,ref:r,title:P.value},R.value),{size:e5(W,u.value[0],Z)}),l5(e)),{autocomplete:ue}),Me=e.inputRender?e.inputRender(Oe):g("input",Oe,null),Re=ee==="rtl"?"bottomRight":"bottomLeft";return g("div",{ref:f,class:ge(B,n.class,{[`${B}-disabled`]:fe,[`${B}-focused`]:H.value,[`${B}-rtl`]:ee==="rtl"}),style:n.style,onMousedown:V,onMouseup:A,onMouseenter:q,onMouseleave:ie,onContextmenu:me,onClick:Se},[g("div",{class:ge(`${B}-input`,{[`${B}-input-placeholder`]:!!D.value}),ref:d},[Me,Ce,we]),g(f5,{visible:S.value,popupStyle:Y,prefixCls:B,dropdownClassName:G,dropdownAlign:Q,getPopupContainer:ve,transitionName:oe,popupPlacement:Re,direction:ee},{default:()=>[g("div",{style:{pointerEvents:"none",position:"absolute",top:0,bottom:0,left:0,right:0}},null)],popupElement:()=>_e})])}}})}const Uee=Kee();function Gee(e,t){let{picker:n,locale:o,selectedValue:r,disabledDate:i,disabled:a,generateConfig:l}=e;const s=E(()=>wt(r.value,0)),u=E(()=>wt(r.value,1));function c(h){return l.value.locale.getWeekFirstDate(o.value.locale,h)}function d(h){const m=l.value.getYear(h),b=l.value.getMonth(h);return m*100+b}function f(h){const m=l.value.getYear(h),b=Gy(l.value,h);return m*10+b}return[h=>{var m;if(i&&(!((m=i==null?void 0:i.value)===null||m===void 0)&&m.call(i,h)))return!0;if(a[1]&&u)return!zi(l.value,h,u.value)&&l.value.isAfter(h,u.value);if(t.value[1]&&u.value)switch(n.value){case"quarter":return f(h)>f(u.value);case"month":return d(h)>d(u.value);case"week":return c(h)>c(u.value);default:return!zi(l.value,h,u.value)&&l.value.isAfter(h,u.value)}return!1},h=>{var m;if(!((m=i.value)===null||m===void 0)&&m.call(i,h))return!0;if(a[0]&&s)return!zi(l.value,h,u.value)&&l.value.isAfter(s.value,h);if(t.value[0]&&s.value)switch(n.value){case"quarter":return f(h)_ee(o,a,l));case"quarter":case"month":return i((a,l)=>Zv(o,a,l));default:return i((a,l)=>QC(o,a,l))}}function Yee(e,t,n,o){const r=wt(e,0),i=wt(e,1);if(t===0)return r;if(r&&i)switch(Xee(r,i,n,o)){case"same":return r;case"closing":return r;default:return od(i,n,o,-1)}return r}function qee(e){let{values:t,picker:n,defaultDates:o,generateConfig:r}=e;const i=ae([wt(o,0),wt(o,1)]),a=ae(null),l=E(()=>wt(t.value,0)),s=E(()=>wt(t.value,1)),u=p=>i.value[p]?i.value[p]:wt(a.value,p)||Yee(t.value,p,n.value,r.value)||l.value||s.value||r.value.getNow(),c=ae(null),d=ae(null);Ve(()=>{c.value=u(0),d.value=u(1)});function f(p,v){if(p){let h=lr(a.value,p,v);i.value=lr(i.value,null,v)||[null,null];const m=(v+1)%2;wt(t.value,m)||(h=lr(h,p,m)),a.value=h}else(l.value||s.value)&&(a.value=null)}return[c,d,f]}function h5(e){return ev()?(pS(e),!0):!1}function Jee(e){return typeof e=="function"?e():Bt(e)}function gx(e){var t;const n=Jee(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function Zee(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;Jt()?Ke(e):t?e():ot(e)}function v5(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=se(),o=()=>n.value=!!e();return o(),Zee(o,t),n}var L0;const m5=typeof window<"u";m5&&(!((L0=window==null?void 0:window.navigator)===null||L0===void 0)&&L0.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);const b5=m5?window:void 0;var Qee=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r2&&arguments[2]!==void 0?arguments[2]:{};const{window:o=b5}=n,r=Qee(n,["window"]);let i;const a=v5(()=>o&&"ResizeObserver"in o),l=()=>{i&&(i.disconnect(),i=void 0)},s=be(()=>gx(e),c=>{l(),a.value&&o&&c&&(i=new ResizeObserver(t),i.observe(c,r))},{immediate:!0,flush:"post"}),u=()=>{l(),s()};return h5(u),{isSupported:a,stop:u}}function $u(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{width:0,height:0},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{box:o="content-box"}=n,r=se(t.width),i=se(t.height);return ete(e,a=>{let[l]=a;const s=o==="border-box"?l.borderBoxSize:o==="content-box"?l.contentBoxSize:l.devicePixelContentBoxSize;s?(r.value=s.reduce((u,c)=>{let{inlineSize:d}=c;return u+d},0),i.value=s.reduce((u,c)=>{let{blockSize:d}=c;return u+d},0)):(r.value=l.contentRect.width,i.value=l.contentRect.height)},n),be(()=>gx(e),a=>{r.value=a?t.width:0,i.value=a?t.height:0}),{width:r,height:i}}function iI(e,t){return e&&e[0]&&e[1]&&t.isAfter(e[0],e[1])?[e[1],e[0]]:e}function aI(e,t,n,o){return!!(e||o&&o[t]||n[(t+1)%2])}function tte(){return le({name:"RangerPicker",inheritAttrs:!1,props:["prefixCls","id","popupStyle","dropdownClassName","transitionName","dropdownAlign","getPopupContainer","generateConfig","locale","placeholder","autofocus","disabled","format","picker","showTime","showNow","showHour","showMinute","showSecond","use12Hours","separator","value","defaultValue","defaultPickerValue","open","defaultOpen","disabledDate","disabledTime","dateRender","panelRender","ranges","allowEmpty","allowClear","suffixIcon","clearIcon","pickerRef","inputReadOnly","mode","renderExtraFooter","onChange","onOpenChange","onPanelChange","onCalendarChange","onFocus","onBlur","onMousedown","onMouseup","onMouseenter","onMouseleave","onClick","onOk","onKeydown","components","order","direction","activePickerIndex","autocomplete","minuteStep","hourStep","secondStep","hideDisabledOptions","disabledMinutes","presets","prevIcon","nextIcon","superPrevIcon","superNextIcon"],setup(e,t){let{attrs:n,expose:o}=t;const r=E(()=>e.picker==="date"&&!!e.showTime||e.picker==="time"),i=E(()=>e.presets),a=E(()=>e.ranges),l=g5(i,a),s=ae({}),u=ae(null),c=ae(null),d=ae(null),f=ae(null),p=ae(null),v=ae(null),h=ae(null),m=ae(null),b=E(()=>a5(QA(e.format,e.picker,e.showTime,e.use12Hours))),[S,C]=Dt(0,{value:We(e,"activePickerIndex")}),$=ae(null),x=E(()=>{const{disabled:Ee}=e;return Array.isArray(Ee)?Ee:[Ee||!1,Ee||!1]}),[P,w]=Dt(null,{value:We(e,"value"),defaultValue:e.defaultValue,postState:Ee=>e.picker==="time"&&!e.order?Ee:iI(Ee,e.generateConfig)}),[O,I,_]=qee({values:P,picker:We(e,"picker"),defaultDates:e.defaultPickerValue,generateConfig:We(e,"generateConfig")}),[T,A]=Dt(P.value,{postState:Ee=>{let Je=Ee;if(x.value[0]&&x.value[1])return Je;for(let Ge=0;Ge<2;Ge+=1)x.value[Ge]&&!wt(Je,Ge)&&!wt(e.allowEmpty,Ge)&&(Je=lr(Je,e.generateConfig.getNow(),Ge));return Je}}),[R,H]=Dt([e.picker,e.picker],{value:We(e,"mode")});be(()=>e.picker,()=>{H([e.picker,e.picker])});const M=(Ee,Je)=>{var Ge;H(Ee),(Ge=e.onPanelChange)===null||Ge===void 0||Ge.call(e,Je,Ee)},[D,N]=Gee({picker:We(e,"picker"),selectedValue:T,locale:We(e,"locale"),disabled:x,disabledDate:We(e,"disabledDate"),generateConfig:We(e,"generateConfig")},s),[L,F]=Dt(!1,{value:We(e,"open"),defaultValue:e.defaultOpen,postState:Ee=>x.value[S.value]?!1:Ee,onChange:Ee=>{var Je;(Je=e.onOpenChange)===null||Je===void 0||Je.call(e,Ee),!Ee&&$.value&&$.value.onClose&&$.value.onClose()}}),B=E(()=>L.value&&S.value===0),j=E(()=>L.value&&S.value===1),z=ae(0),G=ae(0),Q=ae(0),{width:Y}=$u(u);be([L,Y],()=>{!L.value&&u.value&&(Q.value=Y.value)});const{width:oe}=$u(c),{width:Z}=$u(m),{width:re}=$u(d),{width:ne}=$u(p);be([S,L,oe,Z,re,ne,()=>e.direction],()=>{G.value=0,S.value?d.value&&p.value&&(G.value=re.value+ne.value,oe.value&&Z.value&&G.value>oe.value-Z.value-(e.direction==="rtl"||m.value.offsetLeft>G.value?0:m.value.offsetLeft)&&(z.value=G.value)):S.value===0&&(z.value=0)},{immediate:!0});const X=ae();function te(Ee,Je){if(Ee)clearTimeout(X.value),s.value[Je]=!0,C(Je),F(Ee),L.value||_(null,Je);else if(S.value===Je){F(Ee);const Ge=s.value;X.value=setTimeout(()=>{Ge===s.value&&(s.value={})})}}function W(Ee){te(!0,Ee),setTimeout(()=>{const Je=[v,h][Ee];Je.value&&Je.value.focus()},0)}function U(Ee,Je){let Ge=Ee,Tt=wt(Ge,0),Sn=wt(Ge,1);const{generateConfig:nn,locale:To,picker:Kn,order:Zr,onCalendarChange:Fo,allowEmpty:tr,onChange:jt,showTime:Ir}=e;Tt&&Sn&&nn.isAfter(Tt,Sn)&&(Kn==="week"&&!o5(nn,To.locale,Tt,Sn)||Kn==="quarter"&&!n5(nn,Tt,Sn)||Kn!=="week"&&Kn!=="quarter"&&Kn!=="time"&&!(Ir?rc(nn,Tt,Sn):zi(nn,Tt,Sn))?(Je===0?(Ge=[Tt,null],Sn=null):(Tt=null,Ge=[null,Sn]),s.value={[Je]:!0}):(Kn!=="time"||Zr!==!1)&&(Ge=iI(Ge,nn))),A(Ge);const nr=Ge&&Ge[0]?Xn(Ge[0],{generateConfig:nn,locale:To,format:b.value[0]}):"",sa=Ge&&Ge[1]?Xn(Ge[1],{generateConfig:nn,locale:To,format:b.value[0]}):"";Fo&&Fo(Ge,[nr,sa],{range:Je===0?"start":"end"});const ca=aI(Tt,0,x.value,tr),Tr=aI(Sn,1,x.value,tr);(Ge===null||ca&&Tr)&&(w(Ge),jt&&(!rc(nn,wt(P.value,0),Tt)||!rc(nn,wt(P.value,1),Sn))&&jt(Ge,[nr,sa]));let Er=null;Je===0&&!x.value[1]?Er=1:Je===1&&!x.value[0]&&(Er=0),Er!==null&&Er!==S.value&&(!s.value[Er]||!wt(Ge,Er))&&wt(Ge,Je)?W(Er):te(!1,Je)}const J=Ee=>L&&$.value&&$.value.onKeydown?$.value.onKeydown(Ee):!1,de={formatList:b,generateConfig:We(e,"generateConfig"),locale:We(e,"locale")},[fe,pe]=fh(E(()=>wt(T.value,0)),de),[ve,he]=fh(E(()=>wt(T.value,1)),de),V=(Ee,Je)=>{const Ge=r5(Ee,{locale:e.locale,formatList:b.value,generateConfig:e.generateConfig});Ge&&!(Je===0?D:N)(Ge)&&(A(lr(T.value,Ge,Je)),_(Ge,Je))},[q,ie,me]=Jy({valueTexts:fe,onTextChange:Ee=>V(Ee,0)}),[Se,ce,ee]=Jy({valueTexts:ve,onTextChange:Ee=>V(Ee,1)}),[ue,xe]=$t(null),[Pe,_e]=$t(null),[Ce,we,Oe]=Zy(q,de),[Me,Re,Ae]=Zy(Se,de),Fe=Ee=>{_e(lr(T.value,Ee,S.value)),S.value===0?we(Ee):Re(Ee)},lt=()=>{_e(lr(T.value,null,S.value)),S.value===0?Oe():Ae()},bt=(Ee,Je)=>({forwardKeydown:J,onBlur:Ge=>{var Tt;(Tt=e.onBlur)===null||Tt===void 0||Tt.call(e,Ge)},isClickOutside:Ge=>!t5([c.value,d.value,f.value,u.value],Ge),onFocus:Ge=>{var Tt;C(Ee),(Tt=e.onFocus)===null||Tt===void 0||Tt.call(e,Ge)},triggerOpen:Ge=>{te(Ge,Ee)},onSubmit:()=>{if(!T.value||e.disabledDate&&e.disabledDate(T.value[Ee]))return!1;U(T.value,Ee),Je()},onCancel:()=>{te(!1,Ee),A(P.value),Je()}}),[ft,{focused:yt,typing:Ct}]=qy(y(y({},bt(0,me)),{blurToCancel:r,open:B,value:q,onKeydown:(Ee,Je)=>{var Ge;(Ge=e.onKeydown)===null||Ge===void 0||Ge.call(e,Ee,Je)}})),[fn,{focused:yn,typing:On}]=qy(y(y({},bt(1,ee)),{blurToCancel:r,open:j,value:Se,onKeydown:(Ee,Je)=>{var Ge;(Ge=e.onKeydown)===null||Ge===void 0||Ge.call(e,Ee,Je)}})),tn=Ee=>{var Je;(Je=e.onClick)===null||Je===void 0||Je.call(e,Ee),!L.value&&!v.value.contains(Ee.target)&&!h.value.contains(Ee.target)&&(x.value[0]?x.value[1]||W(1):W(0))},Qn=Ee=>{var Je;(Je=e.onMousedown)===null||Je===void 0||Je.call(e,Ee),L.value&&(yt.value||yn.value)&&!v.value.contains(Ee.target)&&!h.value.contains(Ee.target)&&Ee.preventDefault()},Oo=E(()=>{var Ee;return!((Ee=P.value)===null||Ee===void 0)&&Ee[0]?Xn(P.value[0],{locale:e.locale,format:"YYYYMMDDHHmmss",generateConfig:e.generateConfig}):""}),er=E(()=>{var Ee;return!((Ee=P.value)===null||Ee===void 0)&&Ee[1]?Xn(P.value[1],{locale:e.locale,format:"YYYYMMDDHHmmss",generateConfig:e.generateConfig}):""});be([L,fe,ve],()=>{L.value||(A(P.value),!fe.value.length||fe.value[0]===""?ie(""):pe.value!==q.value&&me(),!ve.value.length||ve.value[0]===""?ce(""):he.value!==Se.value&&ee())}),be([Oo,er],()=>{A(P.value)}),o({focus:()=>{v.value&&v.value.focus()},blur:()=>{v.value&&v.value.blur(),h.value&&h.value.blur()}});const Or=E(()=>L.value&&Pe.value&&Pe.value[0]&&Pe.value[1]&&e.generateConfig.isAfter(Pe.value[1],Pe.value[0])?Pe.value:null);function Io(){let Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{generateConfig:Ge,showTime:Tt,dateRender:Sn,direction:nn,disabledTime:To,prefixCls:Kn,locale:Zr}=e;let Fo=Tt;if(Tt&&typeof Tt=="object"&&Tt.defaultValue){const jt=Tt.defaultValue;Fo=y(y({},Tt),{defaultValue:wt(jt,S.value)||void 0})}let tr=null;return Sn&&(tr=jt=>{let{current:Ir,today:nr}=jt;return Sn({current:Ir,today:nr,info:{range:S.value?"end":"start"}})}),g(Lee,{value:{inRange:!0,panelPosition:Ee,rangedValue:ue.value||T.value,hoverRangedValue:Or.value}},{default:()=>[g(px,k(k(k({},e),Je),{},{dateRender:tr,showTime:Fo,mode:R.value[S.value],generateConfig:Ge,style:void 0,direction:nn,disabledDate:S.value===0?D:N,disabledTime:jt=>To?To(jt,S.value===0?"start":"end"):!1,class:ge({[`${Kn}-panel-focused`]:S.value===0?!Ct.value:!On.value}),value:wt(T.value,S.value),locale:Zr,tabIndex:-1,onPanelChange:(jt,Ir)=>{S.value===0&&Oe(!0),S.value===1&&Ae(!0),M(lr(R.value,Ir,S.value),lr(T.value,jt,S.value));let nr=jt;Ee==="right"&&R.value[S.value]===Ir&&(nr=od(nr,Ir,Ge,-1)),_(nr,S.value)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:S.value===0?wt(T.value,1):wt(T.value,0)}),null)]})}const ol=(Ee,Je)=>{const Ge=lr(T.value,Ee,S.value);Je==="submit"||Je!=="key"&&!r.value?(U(Ge,S.value),S.value===0?Oe():Ae()):A(Ge)};return YC({operationRef:$,hideHeader:E(()=>e.picker==="time"),onDateMouseenter:Fe,onDateMouseleave:lt,hideRanges:E(()=>!0),onSelect:ol,open:L}),()=>{const{prefixCls:Ee="rc-picker",id:Je,popupStyle:Ge,dropdownClassName:Tt,transitionName:Sn,dropdownAlign:nn,getPopupContainer:To,generateConfig:Kn,locale:Zr,placeholder:Fo,autofocus:tr,picker:jt="date",showTime:Ir,separator:nr="~",disabledDate:sa,panelRender:ca,allowClear:Tr,suffixIcon:ys,clearIcon:Er,inputReadOnly:Vm,renderExtraFooter:rL,onMouseenter:iL,onMouseleave:aL,onMouseup:lL,onOk:$w,components:sL,direction:gu,autocomplete:ww="off"}=e,cL=gu==="rtl"?{right:`${G.value}px`}:{left:`${G.value}px`};function uL(){let Eo;const ua=u5(Ee,R.value[S.value],rL),Tw=d5({prefixCls:Ee,components:sL,needConfirmButton:r.value,okDisabled:!wt(T.value,S.value)||sa&&sa(T.value[S.value]),locale:Zr,onOk:()=>{wt(T.value,S.value)&&(U(T.value,S.value),$w&&$w(T.value))}});if(jt!=="time"&&!Ir){const da=S.value===0?O.value:I.value,pL=od(da,jt,Kn),Xm=R.value[S.value]===jt,Ew=Io(Xm?"left":!1,{pickerValue:da,onPickerValueChange:Ym=>{_(Ym,S.value)}}),_w=Io("right",{pickerValue:pL,onPickerValueChange:Ym=>{_(od(Ym,jt,Kn,-1),S.value)}});gu==="rtl"?Eo=g(Le,null,[_w,Xm&&Ew]):Eo=g(Le,null,[Ew,Xm&&_w])}else Eo=Io();let Gm=g("div",{class:`${Ee}-panel-layout`},[g(p5,{prefixCls:Ee,presets:l.value,onClick:da=>{U(da,null),te(!1,S.value)},onHover:da=>{xe(da)}},null),g("div",null,[g("div",{class:`${Ee}-panels`},[Eo]),(ua||Tw)&&g("div",{class:`${Ee}-footer`},[ua,Tw])])]);return ca&&(Gm=ca(Gm)),g("div",{class:`${Ee}-panel-container`,style:{marginLeft:`${z.value}px`},ref:c,onMousedown:da=>{da.preventDefault()}},[Gm])}const dL=g("div",{class:ge(`${Ee}-range-wrapper`,`${Ee}-${jt}-range-wrapper`),style:{minWidth:`${Q.value}px`}},[g("div",{ref:m,class:`${Ee}-range-arrow`,style:cL},null),uL()]);let Pw;ys&&(Pw=g("span",{class:`${Ee}-suffix`},[ys]));let Ow;Tr&&(wt(P.value,0)&&!x.value[0]||wt(P.value,1)&&!x.value[1])&&(Ow=g("span",{onMousedown:Eo=>{Eo.preventDefault(),Eo.stopPropagation()},onMouseup:Eo=>{Eo.preventDefault(),Eo.stopPropagation();let ua=P.value;x.value[0]||(ua=lr(ua,null,0)),x.value[1]||(ua=lr(ua,null,1)),U(ua,null),te(!1,S.value)},class:`${Ee}-clear`},[Er||g("span",{class:`${Ee}-clear-btn`},null)]));const Iw={size:e5(jt,b.value[0],Kn)};let Km=0,Um=0;d.value&&f.value&&p.value&&(S.value===0?Um=d.value.offsetWidth:(Km=G.value,Um=f.value.offsetWidth));const fL=gu==="rtl"?{right:`${Km}px`}:{left:`${Km}px`};return g("div",k({ref:u,class:ge(Ee,`${Ee}-range`,n.class,{[`${Ee}-disabled`]:x.value[0]&&x.value[1],[`${Ee}-focused`]:S.value===0?yt.value:yn.value,[`${Ee}-rtl`]:gu==="rtl"}),style:n.style,onClick:tn,onMouseenter:iL,onMouseleave:aL,onMousedown:Qn,onMouseup:lL},l5(e)),[g("div",{class:ge(`${Ee}-input`,{[`${Ee}-input-active`]:S.value===0,[`${Ee}-input-placeholder`]:!!Ce.value}),ref:d},[g("input",k(k(k({id:Je,disabled:x.value[0],readonly:Vm||typeof b.value[0]=="function"||!Ct.value,value:Ce.value||q.value,onInput:Eo=>{ie(Eo.target.value)},autofocus:tr,placeholder:wt(Fo,0)||"",ref:v},ft.value),Iw),{},{autocomplete:ww}),null)]),g("div",{class:`${Ee}-range-separator`,ref:p},[nr]),g("div",{class:ge(`${Ee}-input`,{[`${Ee}-input-active`]:S.value===1,[`${Ee}-input-placeholder`]:!!Me.value}),ref:f},[g("input",k(k(k({disabled:x.value[1],readonly:Vm||typeof b.value[0]=="function"||!On.value,value:Me.value||Se.value,onInput:Eo=>{ce(Eo.target.value)},placeholder:wt(Fo,1)||"",ref:h},fn.value),Iw),{},{autocomplete:ww}),null)]),g("div",{class:`${Ee}-active-bar`,style:y(y({},fL),{width:`${Um}px`,position:"absolute"})},null),Pw,Ow,g(f5,{visible:L.value,popupStyle:Ge,prefixCls:Ee,dropdownClassName:Tt,dropdownAlign:nn,getPopupContainer:To,transitionName:Sn,range:!0,direction:gu},{default:()=>[g("div",{style:{pointerEvents:"none",position:"absolute",top:0,bottom:0,left:0,right:0}},null)],popupElement:()=>dL})])}}})}const nte=tte();var ote=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.checked,()=>{i.value=e.checked}),r({focus(){var c;(c=a.value)===null||c===void 0||c.focus()},blur(){var c;(c=a.value)===null||c===void 0||c.blur()}});const l=ae(),s=c=>{if(e.disabled)return;e.checked===void 0&&(i.value=c.target.checked),c.shiftKey=l.value;const d={target:y(y({},e),{checked:c.target.checked}),stopPropagation(){c.stopPropagation()},preventDefault(){c.preventDefault()},nativeEvent:c};e.checked!==void 0&&(a.value.checked=!!e.checked),o("change",d),l.value=!1},u=c=>{o("click",c),l.value=c.shiftKey};return()=>{const{prefixCls:c,name:d,id:f,type:p,disabled:v,readonly:h,tabindex:m,autofocus:b,value:S,required:C}=e,$=ote(e,["prefixCls","name","id","type","disabled","readonly","tabindex","autofocus","value","required"]),{class:x,onFocus:P,onBlur:w,onKeydown:O,onKeypress:I,onKeyup:_}=n,T=y(y({},$),n),A=Object.keys(T).reduce((M,D)=>((D.startsWith("data-")||D.startsWith("aria-")||D==="role")&&(M[D]=T[D]),M),{}),R=ge(c,x,{[`${c}-checked`]:i.value,[`${c}-disabled`]:v}),H=y(y({name:d,id:f,type:p,readonly:h,disabled:v,tabindex:m,class:`${c}-input`,checked:!!i.value,autofocus:b,value:S},A),{onChange:s,onClick:u,onFocus:P,onBlur:w,onKeydown:O,onKeypress:I,onKeyup:_,required:C});return g("span",{class:R},[g("input",k({ref:a},H),null),g("span",{class:`${c}-inner`},null)])}}}),S5=Symbol("radioGroupContextKey"),ite=e=>{Xe(S5,e)},ate=()=>ze(S5,void 0),C5=Symbol("radioOptionTypeContextKey"),lte=e=>{Xe(C5,e)},ste=()=>ze(C5,void 0),cte=new at("antRadioEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),ute=e=>{const{componentCls:t,antCls:n}=e,o=`${t}-group`;return{[o]:y(y({},qe(e)),{display:"inline-block",fontSize:0,[`&${o}-rtl`]:{direction:"rtl"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},dte=e=>{const{componentCls:t,radioWrapperMarginRight:n,radioCheckedColor:o,radioSize:r,motionDurationSlow:i,motionDurationMid:a,motionEaseInOut:l,motionEaseInOutCirc:s,radioButtonBg:u,colorBorder:c,lineWidth:d,radioDotSize:f,colorBgContainerDisabled:p,colorTextDisabled:v,paddingXS:h,radioDotDisabledColor:m,lineType:b,radioDotDisabledSize:S,wireframe:C,colorWhite:$}=e,x=`${t}-inner`;return{[`${t}-wrapper`]:y(y({},qe(e)),{position:"relative",display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer",[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${d}px ${b} ${o}`,borderRadius:"50%",visibility:"hidden",animationName:cte,animationDuration:i,animationTimingFunction:l,animationFillMode:"both",content:'""'},[t]:y(y({},qe(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center"}),[`${t}-wrapper:hover &, - &:hover ${x}`]:{borderColor:o},[`${t}-input:focus-visible + ${x}`]:y({},qi(e)),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:r,height:r,marginBlockStart:r/-2,marginInlineStart:r/-2,backgroundColor:C?o:$,borderBlockStart:0,borderInlineStart:0,borderRadius:r,transform:"scale(0)",opacity:0,transition:`all ${i} ${s}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:r,height:r,backgroundColor:u,borderColor:c,borderStyle:"solid",borderWidth:d,borderRadius:"50%",transition:`all ${a}`},[`${t}-input`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,insetBlockEnd:0,insetInlineStart:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[x]:{borderColor:o,backgroundColor:C?u:o,"&::after":{transform:`scale(${f/r})`,opacity:1,transition:`all ${i} ${s}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[x]:{backgroundColor:p,borderColor:c,cursor:"not-allowed","&::after":{backgroundColor:m}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:v,cursor:"not-allowed"},[`&${t}-checked`]:{[x]:{"&::after":{transform:`scale(${S/r})`}}}},[`span${t} + *`]:{paddingInlineStart:h,paddingInlineEnd:h}})}},fte=e=>{const{radioButtonColor:t,controlHeight:n,componentCls:o,lineWidth:r,lineType:i,colorBorder:a,motionDurationSlow:l,motionDurationMid:s,radioButtonPaddingHorizontal:u,fontSize:c,radioButtonBg:d,fontSizeLG:f,controlHeightLG:p,controlHeightSM:v,paddingXS:h,borderRadius:m,borderRadiusSM:b,borderRadiusLG:S,radioCheckedColor:C,radioButtonCheckedBg:$,radioButtonHoverColor:x,radioButtonActiveColor:P,radioSolidCheckedColor:w,colorTextDisabled:O,colorBgContainerDisabled:I,radioDisabledButtonCheckedColor:_,radioDisabledButtonCheckedBg:T}=e;return{[`${o}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:u,paddingBlock:0,color:t,fontSize:c,lineHeight:`${n-r*2}px`,background:d,border:`${r}px ${i} ${a}`,borderBlockStartWidth:r+.02,borderInlineStartWidth:0,borderInlineEndWidth:r,cursor:"pointer",transition:[`color ${s}`,`background ${s}`,`border-color ${s}`,`box-shadow ${s}`].join(","),a:{color:t},[`> ${o}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-r,insetInlineStart:-r,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:r,paddingInline:0,backgroundColor:a,transition:`background-color ${l}`,content:'""'}},"&:first-child":{borderInlineStart:`${r}px ${i} ${a}`,borderStartStartRadius:m,borderEndStartRadius:m},"&:last-child":{borderStartEndRadius:m,borderEndEndRadius:m},"&:first-child:last-child":{borderRadius:m},[`${o}-group-large &`]:{height:p,fontSize:f,lineHeight:`${p-r*2}px`,"&:first-child":{borderStartStartRadius:S,borderEndStartRadius:S},"&:last-child":{borderStartEndRadius:S,borderEndEndRadius:S}},[`${o}-group-small &`]:{height:v,paddingInline:h-r,paddingBlock:0,lineHeight:`${v-r*2}px`,"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},"&:hover":{position:"relative",color:C},"&:has(:focus-visible)":y({},qi(e)),[`${o}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${o}-button-wrapper-disabled)`]:{zIndex:1,color:C,background:$,borderColor:C,"&::before":{backgroundColor:C},"&:first-child":{borderColor:C},"&:hover":{color:x,borderColor:x,"&::before":{backgroundColor:x}},"&:active":{color:P,borderColor:P,"&::before":{backgroundColor:P}}},[`${o}-group-solid &-checked:not(${o}-button-wrapper-disabled)`]:{color:w,background:C,borderColor:C,"&:hover":{color:w,background:x,borderColor:x},"&:active":{color:w,background:P,borderColor:P}},"&-disabled":{color:O,backgroundColor:I,borderColor:a,cursor:"not-allowed","&:first-child, &:hover":{color:O,backgroundColor:I,borderColor:a}},[`&-disabled${o}-button-wrapper-checked`]:{color:_,backgroundColor:T,borderColor:a,boxShadow:"none"}}}},x5=Ue("Radio",e=>{const{padding:t,lineWidth:n,controlItemBgActiveDisabled:o,colorTextDisabled:r,colorBgContainer:i,fontSizeLG:a,controlOutline:l,colorPrimaryHover:s,colorPrimaryActive:u,colorText:c,colorPrimary:d,marginXS:f,controlOutlineWidth:p,colorTextLightSolid:v,wireframe:h}=e,m=`0 0 0 ${p}px ${l}`,b=m,S=a,C=4,$=S-C*2,x=h?$:S-(C+n)*2,P=d,w=c,O=s,I=u,_=t-n,R=Be(e,{radioFocusShadow:m,radioButtonFocusShadow:b,radioSize:S,radioDotSize:x,radioDotDisabledSize:$,radioCheckedColor:P,radioDotDisabledColor:r,radioSolidCheckedColor:v,radioButtonBg:i,radioButtonCheckedBg:i,radioButtonColor:w,radioButtonHoverColor:O,radioButtonActiveColor:I,radioButtonPaddingHorizontal:_,radioDisabledButtonCheckedBg:o,radioDisabledButtonCheckedColor:r,radioWrapperMarginRight:f});return[ute(R),dte(R),fte(R)]});var pte=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,checked:$e(),disabled:$e(),isGroup:$e(),value:K.any,name:String,id:String,autofocus:$e(),onChange:ye(),onFocus:ye(),onBlur:ye(),onClick:ye(),"onUpdate:checked":ye(),"onUpdate:value":ye()}),bo=le({compatConfig:{MODE:3},name:"ARadio",inheritAttrs:!1,props:$5(),setup(e,t){let{emit:n,expose:o,slots:r,attrs:i}=t;const a=bn(),l=kn.useInject(),s=ste(),u=ate(),c=ko(),d=E(()=>{var O;return(O=h.value)!==null&&O!==void 0?O:c.value}),f=ae(),{prefixCls:p,direction:v,disabled:h}=Te("radio",e),m=E(()=>(u==null?void 0:u.optionType.value)==="button"||s==="button"?`${p.value}-button`:p.value),b=ko(),[S,C]=x5(p);o({focus:()=>{f.value.focus()},blur:()=>{f.value.blur()}});const P=O=>{const I=O.target.checked;n("update:checked",I),n("update:value",I),n("change",O),a.onFieldChange()},w=O=>{n("change",O),u&&u.onChange&&u.onChange(O)};return()=>{var O;const I=u,{prefixCls:_,id:T=a.id.value}=e,A=pte(e,["prefixCls","id"]),R=y(y({prefixCls:m.value,id:T},it(A,["onUpdate:checked","onUpdate:value"])),{disabled:(O=h.value)!==null&&O!==void 0?O:b.value});I?(R.name=I.name.value,R.onChange=w,R.checked=e.value===I.value.value,R.disabled=d.value||I.disabled.value):R.onChange=P;const H=ge({[`${m.value}-wrapper`]:!0,[`${m.value}-wrapper-checked`]:R.checked,[`${m.value}-wrapper-disabled`]:R.disabled,[`${m.value}-wrapper-rtl`]:v.value==="rtl",[`${m.value}-wrapper-in-form-item`]:l.isFormItemInput},i.class,C.value);return S(g("label",k(k({},i),{},{class:H}),[g(y5,k(k({},R),{},{type:"radio",ref:f}),null),r.default&&g("span",null,[r.default()])]))}}}),gte=()=>({prefixCls:String,value:K.any,size:Ne(),options:pt(),disabled:$e(),name:String,buttonStyle:Ne("outline"),id:String,optionType:Ne("default"),onChange:ye(),"onUpdate:value":ye()}),hx=le({compatConfig:{MODE:3},name:"ARadioGroup",inheritAttrs:!1,props:gte(),setup(e,t){let{slots:n,emit:o,attrs:r}=t;const i=bn(),{prefixCls:a,direction:l,size:s}=Te("radio",e),[u,c]=x5(a),d=ae(e.value),f=ae(!1);return be(()=>e.value,v=>{d.value=v,f.value=!1}),ite({onChange:v=>{const h=d.value,{value:m}=v.target;"value"in e||(d.value=m),!f.value&&m!==h&&(f.value=!0,o("update:value",m),o("change",v),i.onFieldChange()),ot(()=>{f.value=!1})},value:d,disabled:E(()=>e.disabled),name:E(()=>e.name),optionType:E(()=>e.optionType)}),()=>{var v;const{options:h,buttonStyle:m,id:b=i.id.value}=e,S=`${a.value}-group`,C=ge(S,`${S}-${m}`,{[`${S}-${s.value}`]:s.value,[`${S}-rtl`]:l.value==="rtl"},r.class,c.value);let $=null;return h&&h.length>0?$=h.map(x=>{if(typeof x=="string"||typeof x=="number")return g(bo,{key:x,prefixCls:a.value,disabled:e.disabled,value:x,checked:d.value===x},{default:()=>[x]});const{value:P,disabled:w,label:O}=x;return g(bo,{key:`radio-group-value-options-${P}`,prefixCls:a.value,disabled:w||e.disabled,value:P,checked:d.value===P},{default:()=>[O]})}):$=(v=n.default)===null||v===void 0?void 0:v.call(n),u(g("div",k(k({},r),{},{class:C,id:b}),[$]))}}}),ph=le({compatConfig:{MODE:3},name:"ARadioButton",inheritAttrs:!1,props:$5(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r}=Te("radio",e);return lte("button"),()=>{var i;return g(bo,k(k(k({},o),e),{},{prefixCls:r.value}),{default:()=>[(i=n.default)===null||i===void 0?void 0:i.call(n)]})}}});bo.Group=hx;bo.Button=ph;bo.install=function(e){return e.component(bo.name,bo),e.component(bo.Group.name,bo.Group),e.component(bo.Button.name,bo.Button),e};const hte=10,vte=20;function w5(e){const{fullscreen:t,validRange:n,generateConfig:o,locale:r,prefixCls:i,value:a,onChange:l,divRef:s}=e,u=o.getYear(a||o.getNow());let c=u-hte,d=c+vte;n&&(c=o.getYear(n[0]),d=o.getYear(n[1])+1);const f=r&&r.year==="年"?"年":"",p=[];for(let v=c;v{let h=o.setYear(a,v);if(n){const[m,b]=n,S=o.getYear(h),C=o.getMonth(h);S===o.getYear(b)&&C>o.getMonth(b)&&(h=o.setMonth(h,o.getMonth(b))),S===o.getYear(m)&&Cs.value},null)}w5.inheritAttrs=!1;function P5(e){const{prefixCls:t,fullscreen:n,validRange:o,value:r,generateConfig:i,locale:a,onChange:l,divRef:s}=e,u=i.getMonth(r||i.getNow());let c=0,d=11;if(o){const[v,h]=o,m=i.getYear(r);i.getYear(h)===m&&(d=i.getMonth(h)),i.getYear(v)===m&&(c=i.getMonth(v))}const f=a.shortMonths||i.locale.getShortMonths(a.locale),p=[];for(let v=c;v<=d;v+=1)p.push({label:f[v],value:v});return g(Fn,{size:n?void 0:"small",class:`${t}-month-select`,value:u,options:p,onChange:v=>{l(i.setMonth(r,v))},getPopupContainer:()=>s.value},null)}P5.inheritAttrs=!1;function O5(e){const{prefixCls:t,locale:n,mode:o,fullscreen:r,onModeChange:i}=e;return g(hx,{onChange:a=>{let{target:{value:l}}=a;i(l)},value:o,size:r?void 0:"small",class:`${t}-mode-switch`},{default:()=>[g(ph,{value:"month"},{default:()=>[n.month]}),g(ph,{value:"year"},{default:()=>[n.year]})]})}O5.inheritAttrs=!1;const mte=le({name:"CalendarHeader",inheritAttrs:!1,props:["mode","prefixCls","value","validRange","generateConfig","locale","mode","fullscreen"],setup(e,t){let{attrs:n}=t;const o=ae(null),r=kn.useInject();return kn.useProvide(r,{isFormItemInput:!1}),()=>{const i=y(y({},e),n),{prefixCls:a,fullscreen:l,mode:s,onChange:u,onModeChange:c}=i,d=y(y({},i),{fullscreen:l,divRef:o});return g("div",{class:`${a}-header`,ref:o},[g(w5,k(k({},d),{},{onChange:f=>{u(f,"year")}}),null),s==="month"&&g(P5,k(k({},d),{},{onChange:f=>{u(f,"month")}}),null),g(O5,k(k({},d),{},{onModeChange:c}),null)])}}}),vx=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),ru=e=>({borderColor:e.inputBorderHoverColor,borderInlineEndWidth:e.lineWidth}),Ba=e=>({borderColor:e.inputBorderHoverColor,boxShadow:`0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`,borderInlineEndWidth:e.lineWidth,outline:0}),mx=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":y({},ru(Be(e,{inputBorderHoverColor:e.colorBorder})))}),I5=e=>{const{inputPaddingVerticalLG:t,fontSizeLG:n,lineHeightLG:o,borderRadiusLG:r,inputPaddingHorizontalLG:i}=e;return{padding:`${t}px ${i}px`,fontSize:n,lineHeight:o,borderRadius:r}},bx=e=>({padding:`${e.inputPaddingVerticalSM}px ${e.controlPaddingHorizontalSM-1}px`,borderRadius:e.borderRadiusSM}),$f=(e,t)=>{const{componentCls:n,colorError:o,colorWarning:r,colorErrorOutline:i,colorWarningOutline:a,colorErrorBorderHover:l,colorWarningBorderHover:s}=e;return{[`&-status-error:not(${t}-disabled):not(${t}-borderless)${t}`]:{borderColor:o,"&:hover":{borderColor:l},"&:focus, &-focused":y({},Ba(Be(e,{inputBorderActiveColor:o,inputBorderHoverColor:o,controlOutline:i}))),[`${n}-prefix`]:{color:o}},[`&-status-warning:not(${t}-disabled):not(${t}-borderless)${t}`]:{borderColor:r,"&:hover":{borderColor:s},"&:focus, &-focused":y({},Ba(Be(e,{inputBorderActiveColor:r,inputBorderHoverColor:r,controlOutline:a}))),[`${n}-prefix`]:{color:r}}}},fs=e=>y(y({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${e.inputPaddingVertical}px ${e.inputPaddingHorizontal}px`,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,backgroundColor:e.colorBgContainer,backgroundImage:"none",borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:e.colorBorder,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},vx(e.colorTextPlaceholder)),{"&:hover":y({},ru(e)),"&:focus, &-focused":y({},Ba(e)),"&-disabled, &[disabled]":y({},mx(e)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":y({},I5(e)),"&-sm":y({},bx(e)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),T5=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:y({},I5(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:y({},bx(e)),[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${e.inputPaddingHorizontal}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,textAlign:"center",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`-${e.inputPaddingVertical+1}px -${e.inputPaddingHorizontal}px`,[`&${n}-select-single:not(${n}-select-customize-input)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${e.lineWidth}px ${e.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${n}-select-selector`]:{color:e.colorPrimary}}},[`${n}-cascader-picker`]:{margin:`-9px -${e.inputPaddingHorizontal}px`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${t}`]:{float:"inline-start",width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:y(y({display:"block"},Kr()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`& > ${t}-affix-wrapper`]:{display:"inline-flex"},[`& > ${n}-picker-range`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-e.lineWidth,borderInlineEndWidth:e.lineWidth},[`${t}`]:{float:"none"},[`& > ${n}-select > ${n}-select-selector, + `]:{marginInlineStart:e.marginXXS}},[`${t}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",padding:`0 ${e.paddingXXS}px`,marginInline:-e.marginXXS,[`> ${n}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.breadcrumbLinkColorHover,backgroundColor:e.colorBgTextHover,a:{color:e.breadcrumbLinkColorHover}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}},ZQ=Ue("Breadcrumb",e=>{const t=Be(e,{breadcrumbBaseColor:e.colorTextDescription,breadcrumbFontSize:e.fontSize,breadcrumbIconFontSize:e.fontSize,breadcrumbLinkColor:e.colorTextDescription,breadcrumbLinkColorHover:e.colorText,breadcrumbLastItemColor:e.colorText,breadcrumbSeparatorMargin:e.marginXS,breadcrumbSeparatorColor:e.colorTextDescription});return[JQ(t)]}),QQ=()=>({prefixCls:String,routes:{type:Array},params:K.any,separator:K.any,itemRender:{type:Function}});function eee(e,t){if(!e.breadcrumbName)return null;const n=Object.keys(t).join("|");return e.breadcrumbName.replace(new RegExp(`:(${n})`,"g"),(r,i)=>t[i]||r)}function ZO(e){const{route:t,params:n,routes:o,paths:r}=e,i=o.indexOf(t)===o.length-1,a=eee(t,n);return i?g("span",null,[a]):g("a",{href:`#/${r.join("/")}`},[a])}const Rl=le({compatConfig:{MODE:3},name:"ABreadcrumb",inheritAttrs:!1,props:QQ(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("breadcrumb",e),[a,l]=ZQ(r),s=(d,f)=>(d=(d||"").replace(/^\//,""),Object.keys(f).forEach(p=>{d=d.replace(`:${p}`,f[p])}),d),u=(d,f,p)=>{const v=[...d],h=s(f||"",p);return h&&v.push(h),v},c=d=>{let{routes:f=[],params:p={},separator:v,itemRender:h=ZO}=d;const m=[];return f.map(b=>{const S=s(b.path,p);S&&m.push(S);const C=[...m];let $=null;b.children&&b.children.length&&($=g(on,{items:b.children.map(P=>({key:P.path||P.breadcrumbName,label:h({route:P,params:p,routes:f,paths:u(C,P.path,p)})}))},null));const x={separator:v};return $&&(x.overlay=$),g(zd,k(k({},x),{},{key:S||b.breadcrumbName}),{default:()=>[h({route:b,params:p,routes:f,paths:C})]})})};return()=>{var d;let f;const{routes:p,params:v={}}=e,h=Ot(mn(n,e)),m=(d=mn(n,e,"separator"))!==null&&d!==void 0?d:"/",b=e.itemRender||n.itemRender||ZO;p&&p.length>0?f=c({routes:p,params:v,separator:m,itemRender:b}):h.length&&(f=h.map((C,$)=>(Yo(typeof C.type=="object"&&(C.type.__ANT_BREADCRUMB_ITEM||C.type.__ANT_BREADCRUMB_SEPARATOR)),Dn(C,{separator:m,key:$}))));const S={[r.value]:!0,[`${r.value}-rtl`]:i.value==="rtl",[`${o.class}`]:!!o.class,[l.value]:!0};return a(g("nav",k(k({},o),{},{class:S}),[g("ol",null,[f])]))}}});var tee=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String}),uh=le({compatConfig:{MODE:3},name:"ABreadcrumbSeparator",__ANT_BREADCRUMB_SEPARATOR:!0,inheritAttrs:!1,props:nee(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r}=Te("breadcrumb",e);return()=>{var i;const{separator:a,class:l}=o,s=tee(o,["separator","class"]),u=Ot((i=n.default)===null||i===void 0?void 0:i.call(n));return g("span",k({class:[`${r.value}-separator`,l]},s),[u.length>0?u:"/"])}}});Rl.Item=zd;Rl.Separator=uh;Rl.install=function(e){return e.component(Rl.name,Rl),e.component(zd.name,zd),e.component(uh.name,uh),e};var qa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ja(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var W8={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(qa,function(){var n=1e3,o=6e4,r=36e5,i="millisecond",a="second",l="minute",s="hour",u="day",c="week",d="month",f="quarter",p="year",v="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(H){var M=["th","st","nd","rd"],D=H%100;return"["+H+(M[(D-20)%10]||M[D]||M[0])+"]"}},C=function(H,M,D){var N=String(H);return!N||N.length>=M?H:""+Array(M+1-N.length).join(D)+H},$={s:C,z:function(H){var M=-H.utcOffset(),D=Math.abs(M),N=Math.floor(D/60),L=D%60;return(M<=0?"+":"-")+C(N,2,"0")+":"+C(L,2,"0")},m:function H(M,D){if(M.date()1)return H(B[0])}else{var j=M.name;P[j]=M,L=j}return!N&&L&&(x=L),L||!N&&x},_=function(H,M){if(O(H))return H.clone();var D=typeof M=="object"?M:{};return D.date=H,D.args=arguments,new A(D)},T=$;T.l=I,T.i=O,T.w=function(H,M){return _(H,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var A=function(){function H(D){this.$L=I(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[w]=!0}var M=H.prototype;return M.parse=function(D){this.$d=function(N){var L=N.date,F=N.utc;if(L===null)return new Date(NaN);if(T.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var B=L.match(m);if(B){var j=B[2]-1||0,z=(B[7]||"0").substring(0,3);return F?new Date(Date.UTC(B[1],j,B[3]||1,B[4]||0,B[5]||0,B[6]||0,z)):new Date(B[1],j,B[3]||1,B[4]||0,B[5]||0,B[6]||0,z)}}return new Date(L)}(D),this.init()},M.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},M.$utils=function(){return T},M.isValid=function(){return this.$d.toString()!==h},M.isSame=function(D,N){var L=_(D);return this.startOf(N)<=L&&L<=this.endOf(N)},M.isAfter=function(D,N){return _(D)25){var c=a(this).startOf(o).add(1,o).date(u),d=a(this).endOf(n);if(c.isBefore(d))return 1}var f=a(this).startOf(o).date(u).startOf(n).subtract(1,"millisecond"),p=this.diff(f,n,!0);return p<0?a(this).startOf("week").week():Math.ceil(p)},l.weeks=function(s){return s===void 0&&(s=null),this.week(s)}}})})(U8);var see=U8.exports;const cee=Ja(see);var G8={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(qa,function(){return function(n,o){o.prototype.weekYear=function(){var r=this.month(),i=this.week(),a=this.year();return i===1&&r===11?a+1:r===0&&i>=52?a-1:a}}})})(G8);var uee=G8.exports;const dee=Ja(uee);var X8={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(qa,function(){var n="month",o="quarter";return function(r,i){var a=i.prototype;a.quarter=function(u){return this.$utils().u(u)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(u-1))};var l=a.add;a.add=function(u,c){return u=Number(u),this.$utils().p(c)===o?this.add(3*u,n):l.bind(this)(u,c)};var s=a.startOf;a.startOf=function(u,c){var d=this.$utils(),f=!!d.u(c)||c;if(d.p(u)===o){var p=this.quarter()-1;return f?this.month(3*p).startOf(n).startOf("day"):this.month(3*p+2).endOf(n).endOf("day")}return s.bind(this)(u,c)}}})})(X8);var fee=X8.exports;const pee=Ja(fee);var Y8={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(qa,function(){return function(n,o){var r=o.prototype,i=r.format;r.format=function(a){var l=this,s=this.$locale();if(!this.isValid())return i.bind(this)(a);var u=this.$utils(),c=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((l.$M+1)/3);case"Do":return s.ordinal(l.$D);case"gggg":return l.weekYear();case"GGGG":return l.isoWeekYear();case"wo":return s.ordinal(l.week(),"W");case"w":case"ww":return u.s(l.week(),d==="w"?1:2,"0");case"W":case"WW":return u.s(l.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return u.s(String(l.$H===0?24:l.$H),d==="k"?1:2,"0");case"X":return Math.floor(l.$d.getTime()/1e3);case"x":return l.$d.getTime();case"z":return"["+l.offsetName()+"]";case"zzz":return"["+l.offsetName("long")+"]";default:return d}});return i.bind(this)(c)}}})})(Y8);var gee=Y8.exports;const hee=Ja(gee);var q8={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(qa,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,i=/\d\d/,a=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,s={},u=function(m){return(m=+m)+(m>68?1900:2e3)},c=function(m){return function(b){this[m]=+b}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var S=b.match(/([+-]|\d\d)/g),C=60*S[1]+(+S[2]||0);return C===0?0:S[0]==="+"?-C:C}(m)}],f=function(m){var b=s[m];return b&&(b.indexOf?b:b.s.concat(b.f))},p=function(m,b){var S,C=s.meridiem;if(C){for(var $=1;$<=24;$+=1)if(m.indexOf(C($,0,b))>-1){S=$>12;break}}else S=m===(b?"pm":"PM");return S},v={A:[l,function(m){this.afternoon=p(m,!1)}],a:[l,function(m){this.afternoon=p(m,!0)}],Q:[r,function(m){this.month=3*(m-1)+1}],S:[r,function(m){this.milliseconds=100*+m}],SS:[i,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[a,c("seconds")],ss:[a,c("seconds")],m:[a,c("minutes")],mm:[a,c("minutes")],H:[a,c("hours")],h:[a,c("hours")],HH:[a,c("hours")],hh:[a,c("hours")],D:[a,c("day")],DD:[i,c("day")],Do:[l,function(m){var b=s.ordinal,S=m.match(/\d+/);if(this.day=S[0],b)for(var C=1;C<=31;C+=1)b(C).replace(/\[|\]/g,"")===m&&(this.day=C)}],w:[a,c("week")],ww:[i,c("week")],M:[a,c("month")],MM:[i,c("month")],MMM:[l,function(m){var b=f("months"),S=(f("monthsShort")||b.map(function(C){return C.slice(0,3)})).indexOf(m)+1;if(S<1)throw new Error;this.month=S%12||S}],MMMM:[l,function(m){var b=f("months").indexOf(m)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,c("year")],YY:[i,function(m){this.year=u(m)}],YYYY:[/\d{4}/,c("year")],Z:d,ZZ:d};function h(m){var b,S;b=m,S=s&&s.formats;for(var C=(m=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(_,T,A){var R=A&&A.toUpperCase();return T||S[A]||n[A]||S[R].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(H,M,D){return M||D.slice(1)})})).match(o),$=C.length,x=0;x<$;x+=1){var P=C[x],w=v[P],O=w&&w[0],I=w&&w[1];C[x]=I?{regex:O,parser:I}:P.replace(/^\[|\]$/g,"")}return function(_){for(var T={},A=0,R=0;A<$;A+=1){var H=C[A];if(typeof H=="string")R+=H.length;else{var M=H.regex,D=H.parser,N=_.slice(R),L=M.exec(N)[0];D.call(T,L),_=_.replace(L,"")}}return function(F){var B=F.afternoon;if(B!==void 0){var j=F.hours;B?j<12&&(F.hours+=12):j===12&&(F.hours=0),delete F.afternoon}}(T),T}}return function(m,b,S){S.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(u=m.parseTwoDigitYear);var C=b.prototype,$=C.parse;C.parse=function(x){var P=x.date,w=x.utc,O=x.args;this.$u=w;var I=O[1];if(typeof I=="string"){var _=O[2]===!0,T=O[3]===!0,A=_||T,R=O[2];T&&(R=O[2]),s=this.$locale(),!_&&R&&(s=S.Ls[R]),this.$d=function(N,L,F,B){try{if(["x","X"].indexOf(L)>-1)return new Date((L==="X"?1e3:1)*N);var j=h(L)(N),z=j.year,G=j.month,Q=j.day,Y=j.hours,oe=j.minutes,Z=j.seconds,re=j.milliseconds,ne=j.zone,X=j.week,te=new Date,W=Q||(z||G?1:te.getDate()),U=z||te.getFullYear(),J=0;z&&!G||(J=G>0?G-1:te.getMonth());var de,fe=Y||0,pe=oe||0,ve=Z||0,he=re||0;return ne?new Date(Date.UTC(U,J,W,fe,pe,ve,he+60*ne.offset*1e3)):F?new Date(Date.UTC(U,J,W,fe,pe,ve,he)):(de=new Date(U,J,W,fe,pe,ve,he),X&&(de=B(de).week(X).toDate()),de)}catch{return new Date("")}}(P,I,w,S),this.init(),R&&R!==!0&&(this.$L=this.locale(R).$L),A&&P!=this.format(I)&&(this.$d=new Date("")),s={}}else if(I instanceof Array)for(var H=I.length,M=1;M<=H;M+=1){O[1]=I[M-1];var D=S.apply(this,O);if(D.isValid()){this.$d=D.$d,this.$L=D.$L,this.init();break}M===H&&(this.$d=new Date(""))}else $.call(this,x)}}})})(q8);var vee=q8.exports;const mee=Ja(vee);In.extend(mee);In.extend(hee);In.extend(iee);In.extend(lee);In.extend(cee);In.extend(dee);In.extend(pee);In.extend((e,t)=>{const n=t.prototype,o=n.format;n.format=function(i){const a=(i||"").replace("Wo","wo");return o.bind(this)(a)}});const bee={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},cl=e=>bee[e]||e.split("_")[0],QO=()=>{WB(!1,"Not match any format. Please help to fire a issue about this.")},yee=/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|k{1,2}|S/g;function eI(e,t,n){const o=[...new Set(e.split(n))];let r=0;for(let i=0;it)return a;r+=n.length}}const tI=(e,t)=>{if(!e)return null;if(In.isDayjs(e))return e;const n=t.matchAll(yee);let o=In(e,t);if(n===null)return o;for(const r of n){const i=r[0],a=r.index;if(i==="Q"){const l=e.slice(a-1,a),s=eI(e,a,l).match(/\d+/)[0];o=o.quarter(parseInt(s))}if(i.toLowerCase()==="wo"){const l=e.slice(a-1,a),s=eI(e,a,l).match(/\d+/)[0];o=o.week(parseInt(s))}i.toLowerCase()==="ww"&&(o=o.week(parseInt(e.slice(a,a+i.length)))),i.toLowerCase()==="w"&&(o=o.week(parseInt(e.slice(a,a+i.length+1))))}return o},XC={getNow:()=>In(),getFixedDate:e=>In(e,["YYYY-M-DD","YYYY-MM-DD"]),getEndDate:e=>e.endOf("month"),getWeekDay:e=>{const t=e.locale("en");return t.weekday()+t.localeData().firstDayOfWeek()},getYear:e=>e.year(),getMonth:e=>e.month(),getDate:e=>e.date(),getHour:e=>e.hour(),getMinute:e=>e.minute(),getSecond:e=>e.second(),addYear:(e,t)=>e.add(t,"year"),addMonth:(e,t)=>e.add(t,"month"),addDate:(e,t)=>e.add(t,"day"),setYear:(e,t)=>e.year(t),setMonth:(e,t)=>e.month(t),setDate:(e,t)=>e.date(t),setHour:(e,t)=>e.hour(t),setMinute:(e,t)=>e.minute(t),setSecond:(e,t)=>e.second(t),isAfter:(e,t)=>e.isAfter(t),isValidate:e=>e.isValid(),locale:{getWeekFirstDay:e=>In().locale(cl(e)).localeData().firstDayOfWeek(),getWeekFirstDate:(e,t)=>t.locale(cl(e)).weekday(0),getWeek:(e,t)=>t.locale(cl(e)).week(),getShortWeekDays:e=>In().locale(cl(e)).localeData().weekdaysMin(),getShortMonths:e=>In().locale(cl(e)).localeData().monthsShort(),format:(e,t,n)=>t.locale(cl(e)).format(n),parse:(e,t,n)=>{const o=cl(e);for(let r=0;rArray.isArray(e)?e.map(n=>tI(n,t)):tI(e,t),toString:(e,t)=>Array.isArray(e)?e.map(n=>In.isDayjs(n)?n.format(t):n):In.isDayjs(e)?e.format(t):e};function un(e){const t=vF();return y(y({},e),t)}const J8=Symbol("PanelContextProps"),YC=e=>{Xe(J8,e)},yi=()=>ze(J8,{}),sp={visibility:"hidden"};function Za(e,t){let{slots:n}=t;var o;const r=un(e),{prefixCls:i,prevIcon:a="‹",nextIcon:l="›",superPrevIcon:s="«",superNextIcon:u="»",onSuperPrev:c,onSuperNext:d,onPrev:f,onNext:p}=r,{hideNextBtn:v,hidePrevBtn:h}=yi();return g("div",{class:i},[c&&g("button",{type:"button",onClick:c,tabindex:-1,class:`${i}-super-prev-btn`,style:h.value?sp:{}},[s]),f&&g("button",{type:"button",onClick:f,tabindex:-1,class:`${i}-prev-btn`,style:h.value?sp:{}},[a]),g("div",{class:`${i}-view`},[(o=n.default)===null||o===void 0?void 0:o.call(n)]),p&&g("button",{type:"button",onClick:p,tabindex:-1,class:`${i}-next-btn`,style:v.value?sp:{}},[l]),d&&g("button",{type:"button",onClick:d,tabindex:-1,class:`${i}-super-next-btn`,style:v.value?sp:{}},[u])])}Za.displayName="Header";Za.inheritAttrs=!1;function qC(e){const t=un(e),{prefixCls:n,generateConfig:o,viewDate:r,onPrevDecades:i,onNextDecades:a}=t,{hideHeader:l}=yi();if(l)return null;const s=`${n}-header`,u=o.getYear(r),c=Math.floor(u/Hi)*Hi,d=c+Hi-1;return g(Za,k(k({},t),{},{prefixCls:s,onSuperPrev:i,onSuperNext:a}),{default:()=>[c,zn("-"),d]})}qC.displayName="DecadeHeader";qC.inheritAttrs=!1;function Z8(e,t,n,o,r){let i=e.setHour(t,n);return i=e.setMinute(i,o),i=e.setSecond(i,r),i}function Kp(e,t,n){if(!n)return t;let o=t;return o=e.setHour(o,e.getHour(n)),o=e.setMinute(o,e.getMinute(n)),o=e.setSecond(o,e.getSecond(n)),o}function See(e,t,n,o,r,i){const a=Math.floor(e/o)*o;if(a{H.stopPropagation(),A||o(T)},onMouseenter:()=>{!A&&b&&b(T)},onMouseleave:()=>{!A&&S&&S(T)}},[f?f(T):g("div",{class:`${$}-inner`},[d(T)])]))}x.push(g("tr",{key:P,class:s&&s(O)},[w]))}return g("div",{class:`${t}-body`},[g("table",{class:`${t}-content`},[m&&g("thead",null,[g("tr",null,[m])]),g("tbody",null,[x])])])}us.displayName="PanelBody";us.inheritAttrs=!1;const Ky=3,nI=4;function JC(e){const t=un(e),n=Rr-1,{prefixCls:o,viewDate:r,generateConfig:i}=t,a=`${o}-cell`,l=i.getYear(r),s=Math.floor(l/Rr)*Rr,u=Math.floor(l/Hi)*Hi,c=u+Hi-1,d=i.setYear(r,u-Math.ceil((Ky*nI*Rr-Hi)/2)),f=p=>{const v=i.getYear(p),h=v+n;return{[`${a}-in-view`]:u<=v&&h<=c,[`${a}-selected`]:v===s}};return g(us,k(k({},t),{},{rowNum:nI,colNum:Ky,baseDate:d,getCellText:p=>{const v=i.getYear(p);return`${v}-${v+n}`},getCellClassName:f,getCellDate:(p,v)=>i.addYear(p,v*Rr)}),null)}JC.displayName="DecadeBody";JC.inheritAttrs=!1;const cp=new Map;function xee(e,t){let n;function o(){Pv(e)?t():n=Ze(()=>{o()})}return o(),()=>{Ze.cancel(n)}}function Uy(e,t,n){if(cp.get(e)&&Ze.cancel(cp.get(e)),n<=0){cp.set(e,Ze(()=>{e.scrollTop=t}));return}const r=(t-e.scrollTop)/n*10;cp.set(e,Ze(()=>{e.scrollTop+=r,e.scrollTop!==t&&Uy(e,t,n-10)}))}function ou(e,t){let{onLeftRight:n,onCtrlLeftRight:o,onUpDown:r,onPageUpDown:i,onEnter:a}=t;const{which:l,ctrlKey:s,metaKey:u}=e;switch(l){case Ie.LEFT:if(s||u){if(o)return o(-1),!0}else if(n)return n(-1),!0;break;case Ie.RIGHT:if(s||u){if(o)return o(1),!0}else if(n)return n(1),!0;break;case Ie.UP:if(r)return r(-1),!0;break;case Ie.DOWN:if(r)return r(1),!0;break;case Ie.PAGE_UP:if(i)return i(-1),!0;break;case Ie.PAGE_DOWN:if(i)return i(1),!0;break;case Ie.ENTER:if(a)return a(),!0;break}return!1}function Q8(e,t,n,o){let r=e;if(!r)switch(t){case"time":r=o?"hh:mm:ss a":"HH:mm:ss";break;case"week":r="gggg-wo";break;case"month":r="YYYY-MM";break;case"quarter":r="YYYY-[Q]Q";break;case"year":r="YYYY";break;default:r=n?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"}return r}function e5(e,t,n){const o=e==="time"?8:10,r=typeof t=="function"?t(n.getNow()).length:t.length;return Math.max(o,r)+2}let xu=null;const up=new Set;function $ee(e){return!xu&&typeof window<"u"&&window.addEventListener&&(xu=t=>{[...up].forEach(n=>{n(t)})},window.addEventListener("mousedown",xu)),up.add(e),()=>{up.delete(e),up.size===0&&(window.removeEventListener("mousedown",xu),xu=null)}}function wee(e){var t;const n=e.target;return e.composed&&n.shadowRoot&&((t=e.composedPath)===null||t===void 0?void 0:t.call(e)[0])||n}const Pee=e=>e==="month"||e==="date"?"year":e,Oee=e=>e==="date"?"month":e,Iee=e=>e==="month"||e==="date"?"quarter":e,Tee=e=>e==="date"?"week":e,Eee={year:Pee,month:Oee,quarter:Iee,week:Tee,time:null,date:null};function t5(e,t){return e.some(n=>n&&n.contains(t))}const Rr=10,Hi=Rr*10;function ZC(e){const t=un(e),{prefixCls:n,onViewDateChange:o,generateConfig:r,viewDate:i,operationRef:a,onSelect:l,onPanelChange:s}=t,u=`${n}-decade-panel`;a.value={onKeydown:f=>ou(f,{onLeftRight:p=>{l(r.addYear(i,p*Rr),"key")},onCtrlLeftRight:p=>{l(r.addYear(i,p*Hi),"key")},onUpDown:p=>{l(r.addYear(i,p*Rr*Ky),"key")},onEnter:()=>{s("year",i)}})};const c=f=>{const p=r.addYear(i,f*Hi);o(p),s(null,p)},d=f=>{l(f,"mouse"),s("year",f)};return g("div",{class:u},[g(qC,k(k({},t),{},{prefixCls:n,onPrevDecades:()=>{c(-1)},onNextDecades:()=>{c(1)}}),null),g(JC,k(k({},t),{},{prefixCls:n,onSelect:d}),null)])}ZC.displayName="DecadePanel";ZC.inheritAttrs=!1;const Up=7;function ds(e,t){if(!e&&!t)return!0;if(!e||!t)return!1}function _ee(e,t,n){const o=ds(t,n);if(typeof o=="boolean")return o;const r=Math.floor(e.getYear(t)/10),i=Math.floor(e.getYear(n)/10);return r===i}function Jv(e,t,n){const o=ds(t,n);return typeof o=="boolean"?o:e.getYear(t)===e.getYear(n)}function Gy(e,t){return Math.floor(e.getMonth(t)/3)+1}function n5(e,t,n){const o=ds(t,n);return typeof o=="boolean"?o:Jv(e,t,n)&&Gy(e,t)===Gy(e,n)}function QC(e,t,n){const o=ds(t,n);return typeof o=="boolean"?o:Jv(e,t,n)&&e.getMonth(t)===e.getMonth(n)}function zi(e,t,n){const o=ds(t,n);return typeof o=="boolean"?o:e.getYear(t)===e.getYear(n)&&e.getMonth(t)===e.getMonth(n)&&e.getDate(t)===e.getDate(n)}function Mee(e,t,n){const o=ds(t,n);return typeof o=="boolean"?o:e.getHour(t)===e.getHour(n)&&e.getMinute(t)===e.getMinute(n)&&e.getSecond(t)===e.getSecond(n)}function o5(e,t,n,o){const r=ds(n,o);return typeof r=="boolean"?r:e.locale.getWeek(t,n)===e.locale.getWeek(t,o)}function rc(e,t,n){return zi(e,t,n)&&Mee(e,t,n)}function dp(e,t,n,o){return!t||!n||!o?!1:!zi(e,t,o)&&!zi(e,n,o)&&e.isAfter(o,t)&&e.isAfter(n,o)}function Aee(e,t,n){const o=t.locale.getWeekFirstDay(e),r=t.setDate(n,1),i=t.getWeekDay(r);let a=t.addDate(r,o-i);return t.getMonth(a)===t.getMonth(n)&&t.getDate(a)>1&&(a=t.addDate(a,-7)),a}function od(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;switch(t){case"year":return n.addYear(e,o*10);case"quarter":case"month":return n.addYear(e,o);default:return n.addMonth(e,o)}}function Xn(e,t){let{generateConfig:n,locale:o,format:r}=t;return typeof r=="function"?r(e):n.locale.format(o.locale,e,r)}function r5(e,t){let{generateConfig:n,locale:o,formatList:r}=t;return!e||typeof r[0]=="function"?null:n.locale.parse(o.locale,e,r)}function Xy(e){let{cellDate:t,mode:n,disabledDate:o,generateConfig:r}=e;if(!o)return!1;const i=(a,l,s)=>{let u=l;for(;u<=s;){let c;switch(a){case"date":{if(c=r.setDate(t,u),!o(c))return!1;break}case"month":{if(c=r.setMonth(t,u),!Xy({cellDate:c,mode:"month",generateConfig:r,disabledDate:o}))return!1;break}case"year":{if(c=r.setYear(t,u),!Xy({cellDate:c,mode:"year",generateConfig:r,disabledDate:o}))return!1;break}}u+=1}return!0};switch(n){case"date":case"week":return o(t);case"month":{const l=r.getDate(r.getEndDate(t));return i("date",1,l)}case"quarter":{const a=Math.floor(r.getMonth(t)/3)*3,l=a+2;return i("month",a,l)}case"year":return i("month",0,11);case"decade":{const a=r.getYear(t),l=Math.floor(a/Rr)*Rr,s=l+Rr-1;return i("year",l,s)}}}function ex(e){const t=un(e),{hideHeader:n}=yi();if(n.value)return null;const{prefixCls:o,generateConfig:r,locale:i,value:a,format:l}=t,s=`${o}-header`;return g(Za,{prefixCls:s},{default:()=>[a?Xn(a,{locale:i,format:l,generateConfig:r}):" "]})}ex.displayName="TimeHeader";ex.inheritAttrs=!1;const fp=le({name:"TimeUnitColumn",props:["prefixCls","units","onSelect","value","active","hideDisabledOptions"],setup(e){const{open:t}=yi(),n=se(null),o=ae(new Map),r=ae();return be(()=>e.value,()=>{const i=o.value.get(e.value);i&&t.value!==!1&&Uy(n.value,i.offsetTop,120)}),tt(()=>{var i;(i=r.value)===null||i===void 0||i.call(r)}),be(t,()=>{var i;(i=r.value)===null||i===void 0||i.call(r),ot(()=>{if(t.value){const a=o.value.get(e.value);a&&(r.value=xee(a,()=>{Uy(n.value,a.offsetTop,0)}))}})},{immediate:!0,flush:"post"}),()=>{const{prefixCls:i,units:a,onSelect:l,value:s,active:u,hideDisabledOptions:c}=e,d=`${i}-cell`;return g("ul",{class:ge(`${i}-column`,{[`${i}-column-active`]:u}),ref:n,style:{position:"relative"}},[a.map(f=>c&&f.disabled?null:g("li",{key:f.value,ref:p=>{o.value.set(f.value,p)},class:ge(d,{[`${d}-disabled`]:f.disabled,[`${d}-selected`]:s===f.value}),onClick:()=>{f.disabled||l(f.value)}},[g("div",{class:`${d}-inner`},[f.label])]))])}}});function i5(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0",o=String(e);for(;o.length{(n.startsWith("data-")||n.startsWith("aria-")||n==="role"||n==="name")&&!n.startsWith("data-__")&&(t[n]=e[n])}),t}function wt(e,t){return e?e[t]:null}function lr(e,t,n){const o=[wt(e,0),wt(e,1)];return o[n]=typeof t=="function"?t(o[n]):t,!o[0]&&!o[1]?null:o}function k0(e,t,n,o){const r=[];for(let i=e;i<=t;i+=n)r.push({label:i5(i,2),value:i,disabled:(o||[]).includes(i)});return r}const Dee=le({compatConfig:{MODE:3},name:"TimeBody",inheritAttrs:!1,props:["generateConfig","prefixCls","operationRef","activeColumnIndex","value","showHour","showMinute","showSecond","use12Hours","hourStep","minuteStep","secondStep","disabledHours","disabledMinutes","disabledSeconds","disabledTime","hideDisabledOptions","onSelect"],setup(e){const t=E(()=>e.value?e.generateConfig.getHour(e.value):-1),n=E(()=>e.use12Hours?t.value>=12:!1),o=E(()=>e.use12Hours?t.value%12:t.value),r=E(()=>e.value?e.generateConfig.getMinute(e.value):-1),i=E(()=>e.value?e.generateConfig.getSecond(e.value):-1),a=ae(e.generateConfig.getNow()),l=ae(),s=ae(),u=ae();sv(()=>{a.value=e.generateConfig.getNow()}),Ve(()=>{if(e.disabledTime){const m=e.disabledTime(a);[l.value,s.value,u.value]=[m.disabledHours,m.disabledMinutes,m.disabledSeconds]}else[l.value,s.value,u.value]=[e.disabledHours,e.disabledMinutes,e.disabledSeconds]});const c=(m,b,S,C)=>{let $=e.value||e.generateConfig.getNow();const x=Math.max(0,b),P=Math.max(0,S),w=Math.max(0,C);return $=Z8(e.generateConfig,$,!e.use12Hours||!m?x:x+12,P,w),$},d=E(()=>{var m;return k0(0,23,(m=e.hourStep)!==null&&m!==void 0?m:1,l.value&&l.value())}),f=E(()=>{if(!e.use12Hours)return[!1,!1];const m=[!0,!0];return d.value.forEach(b=>{let{disabled:S,value:C}=b;S||(C>=12?m[1]=!1:m[0]=!1)}),m}),p=E(()=>e.use12Hours?d.value.filter(n.value?m=>m.value>=12:m=>m.value<12).map(m=>{const b=m.value%12,S=b===0?"12":i5(b,2);return y(y({},m),{label:S,value:b})}):d.value),v=E(()=>{var m;return k0(0,59,(m=e.minuteStep)!==null&&m!==void 0?m:1,s.value&&s.value(t.value))}),h=E(()=>{var m;return k0(0,59,(m=e.secondStep)!==null&&m!==void 0?m:1,u.value&&u.value(t.value,r.value))});return()=>{const{prefixCls:m,operationRef:b,activeColumnIndex:S,showHour:C,showMinute:$,showSecond:x,use12Hours:P,hideDisabledOptions:w,onSelect:O}=e,I=[],_=`${m}-content`,T=`${m}-time-panel`;b.value={onUpDown:H=>{const M=I[S];if(M){const D=M.units.findIndex(L=>L.value===M.value),N=M.units.length;for(let L=1;L{O(c(n.value,H,r.value,i.value),"mouse")}),A($,g(fp,{key:"minute"},null),r.value,v.value,H=>{O(c(n.value,o.value,H,i.value),"mouse")}),A(x,g(fp,{key:"second"},null),i.value,h.value,H=>{O(c(n.value,o.value,r.value,H),"mouse")});let R=-1;return typeof n.value=="boolean"&&(R=n.value?1:0),A(P===!0,g(fp,{key:"12hours"},null),R,[{label:"AM",value:0,disabled:f.value[0]},{label:"PM",value:1,disabled:f.value[1]}],H=>{O(c(!!H,o.value,r.value,i.value),"mouse")}),g("div",{class:_},[I.map(H=>{let{node:M}=H;return M})])}}}),Nee=e=>e.filter(t=>t!==!1).length;function Zv(e){const t=un(e),{generateConfig:n,format:o="HH:mm:ss",prefixCls:r,active:i,operationRef:a,showHour:l,showMinute:s,showSecond:u,use12Hours:c=!1,onSelect:d,value:f}=t,p=`${r}-time-panel`,v=ae(),h=ae(-1),m=Nee([l,s,u,c]);return a.value={onKeydown:b=>ou(b,{onLeftRight:S=>{h.value=(h.value+S+m)%m},onUpDown:S=>{h.value===-1?h.value=0:v.value&&v.value.onUpDown(S)},onEnter:()=>{d(f||n.getNow(),"key"),h.value=-1}}),onBlur:()=>{h.value=-1}},g("div",{class:ge(p,{[`${p}-active`]:i})},[g(ex,k(k({},t),{},{format:o,prefixCls:r}),null),g(Dee,k(k({},t),{},{prefixCls:r,activeColumnIndex:h.value,operationRef:v}),null)])}Zv.displayName="TimePanel";Zv.inheritAttrs=!1;function Qv(e){let{cellPrefixCls:t,generateConfig:n,rangedValue:o,hoverRangedValue:r,isInView:i,isSameCell:a,offsetCell:l,today:s,value:u}=e;function c(d){const f=l(d,-1),p=l(d,1),v=wt(o,0),h=wt(o,1),m=wt(r,0),b=wt(r,1),S=dp(n,m,b,d);function C(I){return a(v,I)}function $(I){return a(h,I)}const x=a(m,d),P=a(b,d),w=(S||P)&&(!i(f)||$(f)),O=(S||x)&&(!i(p)||C(p));return{[`${t}-in-view`]:i(d),[`${t}-in-range`]:dp(n,v,h,d),[`${t}-range-start`]:C(d),[`${t}-range-end`]:$(d),[`${t}-range-start-single`]:C(d)&&!h,[`${t}-range-end-single`]:$(d)&&!v,[`${t}-range-start-near-hover`]:C(d)&&(a(f,m)||dp(n,m,b,f)),[`${t}-range-end-near-hover`]:$(d)&&(a(p,b)||dp(n,m,b,p)),[`${t}-range-hover`]:S,[`${t}-range-hover-start`]:x,[`${t}-range-hover-end`]:P,[`${t}-range-hover-edge-start`]:w,[`${t}-range-hover-edge-end`]:O,[`${t}-range-hover-edge-start-near-range`]:w&&a(f,h),[`${t}-range-hover-edge-end-near-range`]:O&&a(p,v),[`${t}-today`]:a(s,d),[`${t}-selected`]:a(u,d)}}return c}const s5=Symbol("RangeContextProps"),kee=e=>{Xe(s5,e)},Cf=()=>ze(s5,{rangedValue:ae(),hoverRangedValue:ae(),inRange:ae(),panelPosition:ae()}),Lee=le({compatConfig:{MODE:3},name:"PanelContextProvider",inheritAttrs:!1,props:{value:{type:Object,default:()=>({})}},setup(e,t){let{slots:n}=t;const o={rangedValue:ae(e.value.rangedValue),hoverRangedValue:ae(e.value.hoverRangedValue),inRange:ae(e.value.inRange),panelPosition:ae(e.value.panelPosition)};return kee(o),be(()=>e.value,()=>{Object.keys(e.value).forEach(r=>{o[r]&&(o[r].value=e.value[r])})}),()=>{var r;return(r=n.default)===null||r===void 0?void 0:r.call(n)}}});function em(e){const t=un(e),{prefixCls:n,generateConfig:o,prefixColumn:r,locale:i,rowCount:a,viewDate:l,value:s,dateRender:u}=t,{rangedValue:c,hoverRangedValue:d}=Cf(),f=Aee(i.locale,o,l),p=`${n}-cell`,v=o.locale.getWeekFirstDay(i.locale),h=o.getNow(),m=[],b=i.shortWeekDays||(o.locale.getShortWeekDays?o.locale.getShortWeekDays(i.locale):[]);r&&m.push(g("th",{key:"empty","aria-label":"empty cell"},null));for(let $=0;$zi(o,$,x),isInView:$=>QC(o,$,l),offsetCell:($,x)=>o.addDate($,x)}),C=u?$=>u({current:$,today:h}):void 0;return g(us,k(k({},t),{},{rowNum:a,colNum:Up,baseDate:f,getCellNode:C,getCellText:o.getDate,getCellClassName:S,getCellDate:o.addDate,titleCell:$=>Xn($,{locale:i,format:"YYYY-MM-DD",generateConfig:o}),headerCells:m}),null)}em.displayName="DateBody";em.inheritAttrs=!1;em.props=["prefixCls","generateConfig","value?","viewDate","locale","rowCount","onSelect","dateRender?","disabledDate?","prefixColumn?","rowClassName?"];function tx(e){const t=un(e),{prefixCls:n,generateConfig:o,locale:r,viewDate:i,onNextMonth:a,onPrevMonth:l,onNextYear:s,onPrevYear:u,onYearClick:c,onMonthClick:d}=t,{hideHeader:f}=yi();if(f.value)return null;const p=`${n}-header`,v=r.shortMonths||(o.locale.getShortMonths?o.locale.getShortMonths(r.locale):[]),h=o.getMonth(i),m=g("button",{type:"button",key:"year",onClick:c,tabindex:-1,class:`${n}-year-btn`},[Xn(i,{locale:r,format:r.yearFormat,generateConfig:o})]),b=g("button",{type:"button",key:"month",onClick:d,tabindex:-1,class:`${n}-month-btn`},[r.monthFormat?Xn(i,{locale:r,format:r.monthFormat,generateConfig:o}):v[h]]),S=r.monthBeforeYear?[b,m]:[m,b];return g(Za,k(k({},t),{},{prefixCls:p,onSuperPrev:u,onPrev:l,onNext:a,onSuperNext:s}),{default:()=>[S]})}tx.displayName="DateHeader";tx.inheritAttrs=!1;const Fee=6;function xf(e){const t=un(e),{prefixCls:n,panelName:o="date",keyboardConfig:r,active:i,operationRef:a,generateConfig:l,value:s,viewDate:u,onViewDateChange:c,onPanelChange:d,onSelect:f}=t,p=`${n}-${o}-panel`;a.value={onKeydown:m=>ou(m,y({onLeftRight:b=>{f(l.addDate(s||u,b),"key")},onCtrlLeftRight:b=>{f(l.addYear(s||u,b),"key")},onUpDown:b=>{f(l.addDate(s||u,b*Up),"key")},onPageUpDown:b=>{f(l.addMonth(s||u,b),"key")}},r))};const v=m=>{const b=l.addYear(u,m);c(b),d(null,b)},h=m=>{const b=l.addMonth(u,m);c(b),d(null,b)};return g("div",{class:ge(p,{[`${p}-active`]:i})},[g(tx,k(k({},t),{},{prefixCls:n,value:s,viewDate:u,onPrevYear:()=>{v(-1)},onNextYear:()=>{v(1)},onPrevMonth:()=>{h(-1)},onNextMonth:()=>{h(1)},onMonthClick:()=>{d("month",u)},onYearClick:()=>{d("year",u)}}),null),g(em,k(k({},t),{},{onSelect:m=>f(m,"mouse"),prefixCls:n,value:s,viewDate:u,rowCount:Fee}),null)])}xf.displayName="DatePanel";xf.inheritAttrs=!1;const oI=Ree("date","time");function nx(e){const t=un(e),{prefixCls:n,operationRef:o,generateConfig:r,value:i,defaultValue:a,disabledTime:l,showTime:s,onSelect:u}=t,c=`${n}-datetime-panel`,d=ae(null),f=ae({}),p=ae({}),v=typeof s=="object"?y({},s):{};function h(C){const $=oI.indexOf(d.value)+C;return oI[$]||null}const m=C=>{p.value.onBlur&&p.value.onBlur(C),d.value=null};o.value={onKeydown:C=>{if(C.which===Ie.TAB){const $=h(C.shiftKey?-1:1);return d.value=$,$&&C.preventDefault(),!0}if(d.value){const $=d.value==="date"?f:p;return $.value&&$.value.onKeydown&&$.value.onKeydown(C),!0}return[Ie.LEFT,Ie.RIGHT,Ie.UP,Ie.DOWN].includes(C.which)?(d.value="date",!0):!1},onBlur:m,onClose:m};const b=(C,$)=>{let x=C;$==="date"&&!i&&v.defaultValue?(x=r.setHour(x,r.getHour(v.defaultValue)),x=r.setMinute(x,r.getMinute(v.defaultValue)),x=r.setSecond(x,r.getSecond(v.defaultValue))):$==="time"&&!i&&a&&(x=r.setYear(x,r.getYear(a)),x=r.setMonth(x,r.getMonth(a)),x=r.setDate(x,r.getDate(a))),u&&u(x,"mouse")},S=l?l(i||null):{};return g("div",{class:ge(c,{[`${c}-active`]:d.value})},[g(xf,k(k({},t),{},{operationRef:f,active:d.value==="date",onSelect:C=>{b(Kp(r,C,!i&&typeof s=="object"?s.defaultValue:null),"date")}}),null),g(Zv,k(k(k(k({},t),{},{format:void 0},v),S),{},{disabledTime:null,defaultValue:void 0,operationRef:p,active:d.value==="time",onSelect:C=>{b(C,"time")}}),null)])}nx.displayName="DatetimePanel";nx.inheritAttrs=!1;function ox(e){const t=un(e),{prefixCls:n,generateConfig:o,locale:r,value:i}=t,a=`${n}-cell`,l=c=>g("td",{key:"week",class:ge(a,`${a}-week`)},[o.locale.getWeek(r.locale,c)]),s=`${n}-week-panel-row`,u=c=>ge(s,{[`${s}-selected`]:o5(o,r.locale,i,c)});return g(xf,k(k({},t),{},{panelName:"week",prefixColumn:l,rowClassName:u,keyboardConfig:{onLeftRight:null}}),null)}ox.displayName="WeekPanel";ox.inheritAttrs=!1;function rx(e){const t=un(e),{prefixCls:n,generateConfig:o,locale:r,viewDate:i,onNextYear:a,onPrevYear:l,onYearClick:s}=t,{hideHeader:u}=yi();if(u.value)return null;const c=`${n}-header`;return g(Za,k(k({},t),{},{prefixCls:c,onSuperPrev:l,onSuperNext:a}),{default:()=>[g("button",{type:"button",onClick:s,class:`${n}-year-btn`},[Xn(i,{locale:r,format:r.yearFormat,generateConfig:o})])]})}rx.displayName="MonthHeader";rx.inheritAttrs=!1;const c5=3,Bee=4;function ix(e){const t=un(e),{prefixCls:n,locale:o,value:r,viewDate:i,generateConfig:a,monthCellRender:l}=t,{rangedValue:s,hoverRangedValue:u}=Cf(),c=`${n}-cell`,d=Qv({cellPrefixCls:c,value:r,generateConfig:a,rangedValue:s.value,hoverRangedValue:u.value,isSameCell:(h,m)=>QC(a,h,m),isInView:()=>!0,offsetCell:(h,m)=>a.addMonth(h,m)}),f=o.shortMonths||(a.locale.getShortMonths?a.locale.getShortMonths(o.locale):[]),p=a.setMonth(i,0),v=l?h=>l({current:h,locale:o}):void 0;return g(us,k(k({},t),{},{rowNum:Bee,colNum:c5,baseDate:p,getCellNode:v,getCellText:h=>o.monthFormat?Xn(h,{locale:o,format:o.monthFormat,generateConfig:a}):f[a.getMonth(h)],getCellClassName:d,getCellDate:a.addMonth,titleCell:h=>Xn(h,{locale:o,format:"YYYY-MM",generateConfig:a})}),null)}ix.displayName="MonthBody";ix.inheritAttrs=!1;function ax(e){const t=un(e),{prefixCls:n,operationRef:o,onViewDateChange:r,generateConfig:i,value:a,viewDate:l,onPanelChange:s,onSelect:u}=t,c=`${n}-month-panel`;o.value={onKeydown:f=>ou(f,{onLeftRight:p=>{u(i.addMonth(a||l,p),"key")},onCtrlLeftRight:p=>{u(i.addYear(a||l,p),"key")},onUpDown:p=>{u(i.addMonth(a||l,p*c5),"key")},onEnter:()=>{s("date",a||l)}})};const d=f=>{const p=i.addYear(l,f);r(p),s(null,p)};return g("div",{class:c},[g(rx,k(k({},t),{},{prefixCls:n,onPrevYear:()=>{d(-1)},onNextYear:()=>{d(1)},onYearClick:()=>{s("year",l)}}),null),g(ix,k(k({},t),{},{prefixCls:n,onSelect:f=>{u(f,"mouse"),s("date",f)}}),null)])}ax.displayName="MonthPanel";ax.inheritAttrs=!1;function lx(e){const t=un(e),{prefixCls:n,generateConfig:o,locale:r,viewDate:i,onNextYear:a,onPrevYear:l,onYearClick:s}=t,{hideHeader:u}=yi();if(u.value)return null;const c=`${n}-header`;return g(Za,k(k({},t),{},{prefixCls:c,onSuperPrev:l,onSuperNext:a}),{default:()=>[g("button",{type:"button",onClick:s,class:`${n}-year-btn`},[Xn(i,{locale:r,format:r.yearFormat,generateConfig:o})])]})}lx.displayName="QuarterHeader";lx.inheritAttrs=!1;const Hee=4,zee=1;function sx(e){const t=un(e),{prefixCls:n,locale:o,value:r,viewDate:i,generateConfig:a}=t,{rangedValue:l,hoverRangedValue:s}=Cf(),u=`${n}-cell`,c=Qv({cellPrefixCls:u,value:r,generateConfig:a,rangedValue:l.value,hoverRangedValue:s.value,isSameCell:(f,p)=>n5(a,f,p),isInView:()=>!0,offsetCell:(f,p)=>a.addMonth(f,p*3)}),d=a.setDate(a.setMonth(i,0),1);return g(us,k(k({},t),{},{rowNum:zee,colNum:Hee,baseDate:d,getCellText:f=>Xn(f,{locale:o,format:o.quarterFormat||"[Q]Q",generateConfig:a}),getCellClassName:c,getCellDate:(f,p)=>a.addMonth(f,p*3),titleCell:f=>Xn(f,{locale:o,format:"YYYY-[Q]Q",generateConfig:a})}),null)}sx.displayName="QuarterBody";sx.inheritAttrs=!1;function cx(e){const t=un(e),{prefixCls:n,operationRef:o,onViewDateChange:r,generateConfig:i,value:a,viewDate:l,onPanelChange:s,onSelect:u}=t,c=`${n}-quarter-panel`;o.value={onKeydown:f=>ou(f,{onLeftRight:p=>{u(i.addMonth(a||l,p*3),"key")},onCtrlLeftRight:p=>{u(i.addYear(a||l,p),"key")},onUpDown:p=>{u(i.addYear(a||l,p),"key")}})};const d=f=>{const p=i.addYear(l,f);r(p),s(null,p)};return g("div",{class:c},[g(lx,k(k({},t),{},{prefixCls:n,onPrevYear:()=>{d(-1)},onNextYear:()=>{d(1)},onYearClick:()=>{s("year",l)}}),null),g(sx,k(k({},t),{},{prefixCls:n,onSelect:f=>{u(f,"mouse")}}),null)])}cx.displayName="QuarterPanel";cx.inheritAttrs=!1;function ux(e){const t=un(e),{prefixCls:n,generateConfig:o,viewDate:r,onPrevDecade:i,onNextDecade:a,onDecadeClick:l}=t,{hideHeader:s}=yi();if(s.value)return null;const u=`${n}-header`,c=o.getYear(r),d=Math.floor(c/Ma)*Ma,f=d+Ma-1;return g(Za,k(k({},t),{},{prefixCls:u,onSuperPrev:i,onSuperNext:a}),{default:()=>[g("button",{type:"button",onClick:l,class:`${n}-decade-btn`},[d,zn("-"),f])]})}ux.displayName="YearHeader";ux.inheritAttrs=!1;const Yy=3,rI=4;function dx(e){const t=un(e),{prefixCls:n,value:o,viewDate:r,locale:i,generateConfig:a}=t,{rangedValue:l,hoverRangedValue:s}=Cf(),u=`${n}-cell`,c=a.getYear(r),d=Math.floor(c/Ma)*Ma,f=d+Ma-1,p=a.setYear(r,d-Math.ceil((Yy*rI-Ma)/2)),v=m=>{const b=a.getYear(m);return d<=b&&b<=f},h=Qv({cellPrefixCls:u,value:o,generateConfig:a,rangedValue:l.value,hoverRangedValue:s.value,isSameCell:(m,b)=>Jv(a,m,b),isInView:v,offsetCell:(m,b)=>a.addYear(m,b)});return g(us,k(k({},t),{},{rowNum:rI,colNum:Yy,baseDate:p,getCellText:a.getYear,getCellClassName:h,getCellDate:a.addYear,titleCell:m=>Xn(m,{locale:i,format:"YYYY",generateConfig:a})}),null)}dx.displayName="YearBody";dx.inheritAttrs=!1;const Ma=10;function fx(e){const t=un(e),{prefixCls:n,operationRef:o,onViewDateChange:r,generateConfig:i,value:a,viewDate:l,sourceMode:s,onSelect:u,onPanelChange:c}=t,d=`${n}-year-panel`;o.value={onKeydown:p=>ou(p,{onLeftRight:v=>{u(i.addYear(a||l,v),"key")},onCtrlLeftRight:v=>{u(i.addYear(a||l,v*Ma),"key")},onUpDown:v=>{u(i.addYear(a||l,v*Yy),"key")},onEnter:()=>{c(s==="date"?"date":"month",a||l)}})};const f=p=>{const v=i.addYear(l,p*10);r(v),c(null,v)};return g("div",{class:d},[g(ux,k(k({},t),{},{prefixCls:n,onPrevDecade:()=>{f(-1)},onNextDecade:()=>{f(1)},onDecadeClick:()=>{c("decade",l)}}),null),g(dx,k(k({},t),{},{prefixCls:n,onSelect:p=>{c(s==="date"?"date":"month",p),u(p,"mouse")}}),null)])}fx.displayName="YearPanel";fx.inheritAttrs=!1;function u5(e,t,n){return n?g("div",{class:`${e}-footer-extra`},[n(t)]):null}function d5(e){let{prefixCls:t,components:n={},needConfirmButton:o,onNow:r,onOk:i,okDisabled:a,showNow:l,locale:s}=e,u,c;if(o){const d=n.button||"button";r&&l!==!1&&(u=g("li",{class:`${t}-now`},[g("a",{class:`${t}-now-btn`,onClick:r},[s.now])])),c=o&&g("li",{class:`${t}-ok`},[g(d,{disabled:a,onClick:f=>{f.stopPropagation(),i&&i()}},{default:()=>[s.ok]})])}return!u&&!c?null:g("ul",{class:`${t}-ranges`},[u,c])}function jee(){return le({name:"PickerPanel",inheritAttrs:!1,props:{prefixCls:String,locale:Object,generateConfig:Object,value:Object,defaultValue:Object,pickerValue:Object,defaultPickerValue:Object,disabledDate:Function,mode:String,picker:{type:String,default:"date"},tabindex:{type:[Number,String],default:0},showNow:{type:Boolean,default:void 0},showTime:[Boolean,Object],showToday:Boolean,renderExtraFooter:Function,dateRender:Function,hideHeader:{type:Boolean,default:void 0},onSelect:Function,onChange:Function,onPanelChange:Function,onMousedown:Function,onPickerValueChange:Function,onOk:Function,components:Object,direction:String,hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1}},setup(e,t){let{attrs:n}=t;const o=E(()=>e.picker==="date"&&!!e.showTime||e.picker==="time"),r=E(()=>24%e.hourStep===0),i=E(()=>60%e.minuteStep===0),a=E(()=>60%e.secondStep===0),l=yi(),{operationRef:s,onSelect:u,hideRanges:c,defaultOpenValue:d}=l,{inRange:f,panelPosition:p,rangedValue:v,hoverRangedValue:h}=Cf(),m=ae({}),[b,S]=Dt(null,{value:We(e,"value"),defaultValue:e.defaultValue,postState:N=>!N&&(d!=null&&d.value)&&e.picker==="time"?d.value:N}),[C,$]=Dt(null,{value:We(e,"pickerValue"),defaultValue:e.defaultPickerValue||b.value,postState:N=>{const{generateConfig:L,showTime:F,defaultValue:B}=e,j=L.getNow();return N?!b.value&&e.showTime?typeof F=="object"?Kp(L,Array.isArray(N)?N[0]:N,F.defaultValue||j):B?Kp(L,Array.isArray(N)?N[0]:N,B):Kp(L,Array.isArray(N)?N[0]:N,j):N:j}}),x=N=>{$(N),e.onPickerValueChange&&e.onPickerValueChange(N)},P=N=>{const L=Eee[e.picker];return L?L(N):N},[w,O]=Dt(()=>e.picker==="time"?"time":P("date"),{value:We(e,"mode")});be(()=>e.picker,()=>{O(e.picker)});const I=ae(w.value),_=N=>{I.value=N},T=(N,L)=>{const{onPanelChange:F,generateConfig:B}=e,j=P(N||w.value);_(w.value),O(j),F&&(w.value!==j||rc(B,C.value,C.value))&&F(L,j)},A=function(N,L){let F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{picker:B,generateConfig:j,onSelect:z,onChange:G,disabledDate:Q}=e;(w.value===B||F)&&(S(N),z&&z(N),u&&u(N,L),G&&!rc(j,N,b.value)&&!(Q!=null&&Q(N))&&G(N))},R=N=>m.value&&m.value.onKeydown?([Ie.LEFT,Ie.RIGHT,Ie.UP,Ie.DOWN,Ie.PAGE_UP,Ie.PAGE_DOWN,Ie.ENTER].includes(N.which)&&N.preventDefault(),m.value.onKeydown(N)):!1,H=N=>{m.value&&m.value.onBlur&&m.value.onBlur(N)},M=()=>{const{generateConfig:N,hourStep:L,minuteStep:F,secondStep:B}=e,j=N.getNow(),z=See(N.getHour(j),N.getMinute(j),N.getSecond(j),r.value?L:1,i.value?F:1,a.value?B:1),G=Z8(N,j,z[0],z[1],z[2]);A(G,"submit")},D=E(()=>{const{prefixCls:N,direction:L}=e;return ge(`${N}-panel`,{[`${N}-panel-has-range`]:v&&v.value&&v.value[0]&&v.value[1],[`${N}-panel-has-range-hover`]:h&&h.value&&h.value[0]&&h.value[1],[`${N}-panel-rtl`]:L==="rtl"})});return YC(y(y({},l),{mode:w,hideHeader:E(()=>{var N;return e.hideHeader!==void 0?e.hideHeader:(N=l.hideHeader)===null||N===void 0?void 0:N.value}),hidePrevBtn:E(()=>f.value&&p.value==="right"),hideNextBtn:E(()=>f.value&&p.value==="left")})),be(()=>e.value,()=>{e.value&&$(e.value)}),()=>{const{prefixCls:N="ant-picker",locale:L,generateConfig:F,disabledDate:B,picker:j="date",tabindex:z=0,showNow:G,showTime:Q,showToday:Y,renderExtraFooter:oe,onMousedown:Z,onOk:re,components:ne}=e;s&&p.value!=="right"&&(s.value={onKeydown:R,onClose:()=>{m.value&&m.value.onClose&&m.value.onClose()}});let X;const te=y(y(y({},n),e),{operationRef:m,prefixCls:N,viewDate:C.value,value:b.value,onViewDateChange:x,sourceMode:I.value,onPanelChange:T,disabledDate:B});switch(delete te.onChange,delete te.onSelect,w.value){case"decade":X=g(ZC,k(k({},te),{},{onSelect:(de,fe)=>{x(de),A(de,fe)}}),null);break;case"year":X=g(fx,k(k({},te),{},{onSelect:(de,fe)=>{x(de),A(de,fe)}}),null);break;case"month":X=g(ax,k(k({},te),{},{onSelect:(de,fe)=>{x(de),A(de,fe)}}),null);break;case"quarter":X=g(cx,k(k({},te),{},{onSelect:(de,fe)=>{x(de),A(de,fe)}}),null);break;case"week":X=g(ox,k(k({},te),{},{onSelect:(de,fe)=>{x(de),A(de,fe)}}),null);break;case"time":delete te.showTime,X=g(Zv,k(k(k({},te),typeof Q=="object"?Q:null),{},{onSelect:(de,fe)=>{x(de),A(de,fe)}}),null);break;default:Q?X=g(nx,k(k({},te),{},{onSelect:(de,fe)=>{x(de),A(de,fe)}}),null):X=g(xf,k(k({},te),{},{onSelect:(de,fe)=>{x(de),A(de,fe)}}),null)}let W,U;c!=null&&c.value||(W=u5(N,w.value,oe),U=d5({prefixCls:N,components:ne,needConfirmButton:o.value,okDisabled:!b.value||B&&B(b.value),locale:L,showNow:G,onNow:o.value&&M,onOk:()=>{b.value&&(A(b.value,"submit",!0),re&&re(b.value))}}));let J;if(Y&&w.value==="date"&&j==="date"&&!Q){const de=F.getNow(),fe=`${N}-today-btn`,pe=B&&B(de);J=g("a",{class:ge(fe,pe&&`${fe}-disabled`),"aria-disabled":pe,onClick:()=>{pe||A(de,"mouse",!0)}},[L.today])}return g("div",{tabindex:z,class:ge(D.value,n.class),style:n.style,onKeydown:R,onBlur:H,onMousedown:Z},[X,W||U||J?g("div",{class:`${N}-footer`},[W,U,J]):null])}}})}const Wee=jee(),px=e=>g(Wee,e),Vee={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};function f5(e,t){let{slots:n}=t;const{prefixCls:o,popupStyle:r,visible:i,dropdownClassName:a,dropdownAlign:l,transitionName:s,getPopupContainer:u,range:c,popupPlacement:d,direction:f}=un(e),p=`${o}-dropdown`;return g(ss,{showAction:[],hideAction:[],popupPlacement:d!==void 0?d:f==="rtl"?"bottomRight":"bottomLeft",builtinPlacements:Vee,prefixCls:p,popupTransitionName:s,popupAlign:l,popupVisible:i,popupClassName:ge(a,{[`${p}-range`]:c,[`${p}-rtl`]:f==="rtl"}),popupStyle:r,getPopupContainer:u},{default:n.default,popup:n.popupElement})}const p5=le({name:"PresetPanel",props:{prefixCls:String,presets:{type:Array,default:()=>[]},onClick:Function,onHover:Function},setup(e){return()=>e.presets.length?g("div",{class:`${e.prefixCls}-presets`},[g("ul",null,[e.presets.map((t,n)=>{let{label:o,value:r}=t;return g("li",{key:n,onClick:i=>{i.stopPropagation(),e.onClick(r)},onMouseenter:()=>{var i;(i=e.onHover)===null||i===void 0||i.call(e,r)},onMouseleave:()=>{var i;(i=e.onHover)===null||i===void 0||i.call(e,null)}},[o])})])]):null}});function qy(e){let{open:t,value:n,isClickOutside:o,triggerOpen:r,forwardKeydown:i,onKeydown:a,blurToCancel:l,onSubmit:s,onCancel:u,onFocus:c,onBlur:d}=e;const f=se(!1),p=se(!1),v=se(!1),h=se(!1),m=se(!1),b=E(()=>({onMousedown:()=>{f.value=!0,r(!0)},onKeydown:C=>{if(a(C,()=>{m.value=!0}),!m.value){switch(C.which){case Ie.ENTER:{t.value?s()!==!1&&(f.value=!0):r(!0),C.preventDefault();return}case Ie.TAB:{f.value&&t.value&&!C.shiftKey?(f.value=!1,C.preventDefault()):!f.value&&t.value&&!i(C)&&C.shiftKey&&(f.value=!0,C.preventDefault());return}case Ie.ESC:{f.value=!0,u();return}}!t.value&&![Ie.SHIFT].includes(C.which)?r(!0):f.value||i(C)}},onFocus:C=>{f.value=!0,p.value=!0,c&&c(C)},onBlur:C=>{if(v.value||!o(document.activeElement)){v.value=!1;return}l.value?setTimeout(()=>{let{activeElement:$}=document;for(;$&&$.shadowRoot;)$=$.shadowRoot.activeElement;o($)&&u()},0):t.value&&(r(!1),h.value&&s()),p.value=!1,d&&d(C)}}));be(t,()=>{h.value=!1}),be(n,()=>{h.value=!0});const S=se();return Ke(()=>{S.value=$ee(C=>{const $=wee(C);if(t.value){const x=o($);x?(!p.value||x)&&r(!1):(v.value=!0,Ze(()=>{v.value=!1}))}})}),tt(()=>{S.value&&S.value()}),[b,{focused:p,typing:f}]}function Jy(e){let{valueTexts:t,onTextChange:n}=e;const o=ae("");function r(a){o.value=a,n(a)}function i(){o.value=t.value[0]}return be(()=>[...t.value],function(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];a.join("||")!==l.join("||")&&t.value.every(s=>s!==o.value)&&i()},{immediate:!0}),[o,r,i]}function dh(e,t){let{formatList:n,generateConfig:o,locale:r}=t;const i=gC(()=>{if(!e.value)return[[""],""];let s="";const u=[];for(let c=0;cu[0]!==s[0]||!Ls(u[1],s[1])),a=E(()=>i.value[0]),l=E(()=>i.value[1]);return[a,l]}function Zy(e,t){let{formatList:n,generateConfig:o,locale:r}=t;const i=ae(null);let a;function l(d){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Ze.cancel(a),f){i.value=d;return}a=Ze(()=>{i.value=d})}const[,s]=dh(i,{formatList:n,generateConfig:o,locale:r});function u(d){l(d)}function c(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;l(null,d)}return be(e,()=>{c(!0)}),tt(()=>{Ze.cancel(a)}),[s,u,c]}function g5(e,t){return E(()=>e!=null&&e.value?e.value:t!=null&&t.value?(FS(!1,"`ranges` is deprecated. Please use `presets` instead."),Object.keys(t.value).map(o=>{const r=t.value[o],i=typeof r=="function"?r():r;return{label:o,value:i}})):[])}function Kee(){return le({name:"Picker",inheritAttrs:!1,props:["prefixCls","id","tabindex","dropdownClassName","dropdownAlign","popupStyle","transitionName","generateConfig","locale","inputReadOnly","allowClear","autofocus","showTime","showNow","showHour","showMinute","showSecond","picker","format","use12Hours","value","defaultValue","open","defaultOpen","defaultOpenValue","suffixIcon","presets","clearIcon","disabled","disabledDate","placeholder","getPopupContainer","panelRender","inputRender","onChange","onOpenChange","onPanelChange","onFocus","onBlur","onMousedown","onMouseup","onMouseenter","onMouseleave","onContextmenu","onClick","onKeydown","onSelect","direction","autocomplete","showToday","renderExtraFooter","dateRender","minuteStep","hourStep","secondStep","hideDisabledOptions"],setup(e,t){let{attrs:n,expose:o}=t;const r=ae(null),i=E(()=>e.presets),a=g5(i),l=E(()=>{var B;return(B=e.picker)!==null&&B!==void 0?B:"date"}),s=E(()=>l.value==="date"&&!!e.showTime||l.value==="time"),u=E(()=>a5(Q8(e.format,l.value,e.showTime,e.use12Hours))),c=ae(null),d=ae(null),f=ae(null),[p,v]=Dt(null,{value:We(e,"value"),defaultValue:e.defaultValue}),h=ae(p.value),m=B=>{h.value=B},b=ae(null),[S,C]=Dt(!1,{value:We(e,"open"),defaultValue:e.defaultOpen,postState:B=>e.disabled?!1:B,onChange:B=>{e.onOpenChange&&e.onOpenChange(B),!B&&b.value&&b.value.onClose&&b.value.onClose()}}),[$,x]=dh(h,{formatList:u,generateConfig:We(e,"generateConfig"),locale:We(e,"locale")}),[P,w,O]=Jy({valueTexts:$,onTextChange:B=>{const j=r5(B,{locale:e.locale,formatList:u.value,generateConfig:e.generateConfig});j&&(!e.disabledDate||!e.disabledDate(j))&&m(j)}}),I=B=>{const{onChange:j,generateConfig:z,locale:G}=e;m(B),v(B),j&&!rc(z,p.value,B)&&j(B,B?Xn(B,{generateConfig:z,locale:G,format:u.value[0]}):"")},_=B=>{e.disabled&&B||C(B)},T=B=>S.value&&b.value&&b.value.onKeydown?b.value.onKeydown(B):!1,A=function(){e.onMouseup&&e.onMouseup(...arguments),r.value&&(r.value.focus(),_(!0))},[R,{focused:H,typing:M}]=qy({blurToCancel:s,open:S,value:P,triggerOpen:_,forwardKeydown:T,isClickOutside:B=>!t5([c.value,d.value,f.value],B),onSubmit:()=>!h.value||e.disabledDate&&e.disabledDate(h.value)?!1:(I(h.value),_(!1),O(),!0),onCancel:()=>{_(!1),m(p.value),O()},onKeydown:(B,j)=>{var z;(z=e.onKeydown)===null||z===void 0||z.call(e,B,j)},onFocus:B=>{var j;(j=e.onFocus)===null||j===void 0||j.call(e,B)},onBlur:B=>{var j;(j=e.onBlur)===null||j===void 0||j.call(e,B)}});be([S,$],()=>{S.value||(m(p.value),!$.value.length||$.value[0]===""?w(""):x.value!==P.value&&O())}),be(l,()=>{S.value||O()}),be(p,()=>{m(p.value)});const[D,N,L]=Zy(P,{formatList:u,generateConfig:We(e,"generateConfig"),locale:We(e,"locale")}),F=(B,j)=>{(j==="submit"||j!=="key"&&!s.value)&&(I(B),_(!1))};return YC({operationRef:b,hideHeader:E(()=>l.value==="time"),onSelect:F,open:S,defaultOpenValue:We(e,"defaultOpenValue"),onDateMouseenter:N,onDateMouseleave:L}),o({focus:()=>{r.value&&r.value.focus()},blur:()=>{r.value&&r.value.blur()}}),()=>{const{prefixCls:B="rc-picker",id:j,tabindex:z,dropdownClassName:G,dropdownAlign:Q,popupStyle:Y,transitionName:oe,generateConfig:Z,locale:re,inputReadOnly:ne,allowClear:X,autofocus:te,picker:W="date",defaultOpenValue:U,suffixIcon:J,clearIcon:de,disabled:fe,placeholder:pe,getPopupContainer:ve,panelRender:he,onMousedown:V,onMouseenter:q,onMouseleave:ie,onContextmenu:me,onClick:Se,onSelect:ce,direction:ee,autocomplete:ue="off"}=e,xe=y(y(y({},e),n),{class:ge({[`${B}-panel-focused`]:!M.value}),style:void 0,pickerValue:void 0,onPickerValueChange:void 0,onChange:null});let Pe=g("div",{class:`${B}-panel-layout`},[g(p5,{prefixCls:B,presets:a.value,onClick:Ae=>{I(Ae),_(!1)}},null),g(px,k(k({},xe),{},{generateConfig:Z,value:h.value,locale:re,tabindex:-1,onSelect:Ae=>{ce==null||ce(Ae),m(Ae)},direction:ee,onPanelChange:(Ae,Fe)=>{const{onPanelChange:lt}=e;L(!0),lt==null||lt(Ae,Fe)}}),null)]);he&&(Pe=he(Pe));const _e=g("div",{class:`${B}-panel-container`,ref:c,onMousedown:Ae=>{Ae.preventDefault()}},[Pe]);let Ce;J&&(Ce=g("span",{class:`${B}-suffix`},[J]));let we;X&&p.value&&!fe&&(we=g("span",{onMousedown:Ae=>{Ae.preventDefault(),Ae.stopPropagation()},onMouseup:Ae=>{Ae.preventDefault(),Ae.stopPropagation(),I(null),_(!1)},class:`${B}-clear`,role:"button"},[de||g("span",{class:`${B}-clear-btn`},null)]));const Oe=y(y(y(y({id:j,tabindex:z,disabled:fe,readonly:ne||typeof u.value[0]=="function"||!M.value,value:D.value||P.value,onInput:Ae=>{w(Ae.target.value)},autofocus:te,placeholder:pe,ref:r,title:P.value},R.value),{size:e5(W,u.value[0],Z)}),l5(e)),{autocomplete:ue}),Me=e.inputRender?e.inputRender(Oe):g("input",Oe,null),Re=ee==="rtl"?"bottomRight":"bottomLeft";return g("div",{ref:f,class:ge(B,n.class,{[`${B}-disabled`]:fe,[`${B}-focused`]:H.value,[`${B}-rtl`]:ee==="rtl"}),style:n.style,onMousedown:V,onMouseup:A,onMouseenter:q,onMouseleave:ie,onContextmenu:me,onClick:Se},[g("div",{class:ge(`${B}-input`,{[`${B}-input-placeholder`]:!!D.value}),ref:d},[Me,Ce,we]),g(f5,{visible:S.value,popupStyle:Y,prefixCls:B,dropdownClassName:G,dropdownAlign:Q,getPopupContainer:ve,transitionName:oe,popupPlacement:Re,direction:ee},{default:()=>[g("div",{style:{pointerEvents:"none",position:"absolute",top:0,bottom:0,left:0,right:0}},null)],popupElement:()=>_e})])}}})}const Uee=Kee();function Gee(e,t){let{picker:n,locale:o,selectedValue:r,disabledDate:i,disabled:a,generateConfig:l}=e;const s=E(()=>wt(r.value,0)),u=E(()=>wt(r.value,1));function c(h){return l.value.locale.getWeekFirstDate(o.value.locale,h)}function d(h){const m=l.value.getYear(h),b=l.value.getMonth(h);return m*100+b}function f(h){const m=l.value.getYear(h),b=Gy(l.value,h);return m*10+b}return[h=>{var m;if(i&&(!((m=i==null?void 0:i.value)===null||m===void 0)&&m.call(i,h)))return!0;if(a[1]&&u)return!zi(l.value,h,u.value)&&l.value.isAfter(h,u.value);if(t.value[1]&&u.value)switch(n.value){case"quarter":return f(h)>f(u.value);case"month":return d(h)>d(u.value);case"week":return c(h)>c(u.value);default:return!zi(l.value,h,u.value)&&l.value.isAfter(h,u.value)}return!1},h=>{var m;if(!((m=i.value)===null||m===void 0)&&m.call(i,h))return!0;if(a[0]&&s)return!zi(l.value,h,u.value)&&l.value.isAfter(s.value,h);if(t.value[0]&&s.value)switch(n.value){case"quarter":return f(h)_ee(o,a,l));case"quarter":case"month":return i((a,l)=>Jv(o,a,l));default:return i((a,l)=>QC(o,a,l))}}function Yee(e,t,n,o){const r=wt(e,0),i=wt(e,1);if(t===0)return r;if(r&&i)switch(Xee(r,i,n,o)){case"same":return r;case"closing":return r;default:return od(i,n,o,-1)}return r}function qee(e){let{values:t,picker:n,defaultDates:o,generateConfig:r}=e;const i=ae([wt(o,0),wt(o,1)]),a=ae(null),l=E(()=>wt(t.value,0)),s=E(()=>wt(t.value,1)),u=p=>i.value[p]?i.value[p]:wt(a.value,p)||Yee(t.value,p,n.value,r.value)||l.value||s.value||r.value.getNow(),c=ae(null),d=ae(null);Ve(()=>{c.value=u(0),d.value=u(1)});function f(p,v){if(p){let h=lr(a.value,p,v);i.value=lr(i.value,null,v)||[null,null];const m=(v+1)%2;wt(t.value,m)||(h=lr(h,p,m)),a.value=h}else(l.value||s.value)&&(a.value=null)}return[c,d,f]}function h5(e){return Qh()?(pS(e),!0):!1}function Jee(e){return typeof e=="function"?e():Bt(e)}function gx(e){var t;const n=Jee(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function Zee(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;Jt()?Ke(e):t?e():ot(e)}function v5(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=se(),o=()=>n.value=!!e();return o(),Zee(o,t),n}var L0;const m5=typeof window<"u";m5&&(!((L0=window==null?void 0:window.navigator)===null||L0===void 0)&&L0.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);const b5=m5?window:void 0;var Qee=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r2&&arguments[2]!==void 0?arguments[2]:{};const{window:o=b5}=n,r=Qee(n,["window"]);let i;const a=v5(()=>o&&"ResizeObserver"in o),l=()=>{i&&(i.disconnect(),i=void 0)},s=be(()=>gx(e),c=>{l(),a.value&&o&&c&&(i=new ResizeObserver(t),i.observe(c,r))},{immediate:!0,flush:"post"}),u=()=>{l(),s()};return h5(u),{isSupported:a,stop:u}}function $u(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{width:0,height:0},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{box:o="content-box"}=n,r=se(t.width),i=se(t.height);return ete(e,a=>{let[l]=a;const s=o==="border-box"?l.borderBoxSize:o==="content-box"?l.contentBoxSize:l.devicePixelContentBoxSize;s?(r.value=s.reduce((u,c)=>{let{inlineSize:d}=c;return u+d},0),i.value=s.reduce((u,c)=>{let{blockSize:d}=c;return u+d},0)):(r.value=l.contentRect.width,i.value=l.contentRect.height)},n),be(()=>gx(e),a=>{r.value=a?t.width:0,i.value=a?t.height:0}),{width:r,height:i}}function iI(e,t){return e&&e[0]&&e[1]&&t.isAfter(e[0],e[1])?[e[1],e[0]]:e}function aI(e,t,n,o){return!!(e||o&&o[t]||n[(t+1)%2])}function tte(){return le({name:"RangerPicker",inheritAttrs:!1,props:["prefixCls","id","popupStyle","dropdownClassName","transitionName","dropdownAlign","getPopupContainer","generateConfig","locale","placeholder","autofocus","disabled","format","picker","showTime","showNow","showHour","showMinute","showSecond","use12Hours","separator","value","defaultValue","defaultPickerValue","open","defaultOpen","disabledDate","disabledTime","dateRender","panelRender","ranges","allowEmpty","allowClear","suffixIcon","clearIcon","pickerRef","inputReadOnly","mode","renderExtraFooter","onChange","onOpenChange","onPanelChange","onCalendarChange","onFocus","onBlur","onMousedown","onMouseup","onMouseenter","onMouseleave","onClick","onOk","onKeydown","components","order","direction","activePickerIndex","autocomplete","minuteStep","hourStep","secondStep","hideDisabledOptions","disabledMinutes","presets","prevIcon","nextIcon","superPrevIcon","superNextIcon"],setup(e,t){let{attrs:n,expose:o}=t;const r=E(()=>e.picker==="date"&&!!e.showTime||e.picker==="time"),i=E(()=>e.presets),a=E(()=>e.ranges),l=g5(i,a),s=ae({}),u=ae(null),c=ae(null),d=ae(null),f=ae(null),p=ae(null),v=ae(null),h=ae(null),m=ae(null),b=E(()=>a5(Q8(e.format,e.picker,e.showTime,e.use12Hours))),[S,C]=Dt(0,{value:We(e,"activePickerIndex")}),$=ae(null),x=E(()=>{const{disabled:Ee}=e;return Array.isArray(Ee)?Ee:[Ee||!1,Ee||!1]}),[P,w]=Dt(null,{value:We(e,"value"),defaultValue:e.defaultValue,postState:Ee=>e.picker==="time"&&!e.order?Ee:iI(Ee,e.generateConfig)}),[O,I,_]=qee({values:P,picker:We(e,"picker"),defaultDates:e.defaultPickerValue,generateConfig:We(e,"generateConfig")}),[T,A]=Dt(P.value,{postState:Ee=>{let Je=Ee;if(x.value[0]&&x.value[1])return Je;for(let Ge=0;Ge<2;Ge+=1)x.value[Ge]&&!wt(Je,Ge)&&!wt(e.allowEmpty,Ge)&&(Je=lr(Je,e.generateConfig.getNow(),Ge));return Je}}),[R,H]=Dt([e.picker,e.picker],{value:We(e,"mode")});be(()=>e.picker,()=>{H([e.picker,e.picker])});const M=(Ee,Je)=>{var Ge;H(Ee),(Ge=e.onPanelChange)===null||Ge===void 0||Ge.call(e,Je,Ee)},[D,N]=Gee({picker:We(e,"picker"),selectedValue:T,locale:We(e,"locale"),disabled:x,disabledDate:We(e,"disabledDate"),generateConfig:We(e,"generateConfig")},s),[L,F]=Dt(!1,{value:We(e,"open"),defaultValue:e.defaultOpen,postState:Ee=>x.value[S.value]?!1:Ee,onChange:Ee=>{var Je;(Je=e.onOpenChange)===null||Je===void 0||Je.call(e,Ee),!Ee&&$.value&&$.value.onClose&&$.value.onClose()}}),B=E(()=>L.value&&S.value===0),j=E(()=>L.value&&S.value===1),z=ae(0),G=ae(0),Q=ae(0),{width:Y}=$u(u);be([L,Y],()=>{!L.value&&u.value&&(Q.value=Y.value)});const{width:oe}=$u(c),{width:Z}=$u(m),{width:re}=$u(d),{width:ne}=$u(p);be([S,L,oe,Z,re,ne,()=>e.direction],()=>{G.value=0,S.value?d.value&&p.value&&(G.value=re.value+ne.value,oe.value&&Z.value&&G.value>oe.value-Z.value-(e.direction==="rtl"||m.value.offsetLeft>G.value?0:m.value.offsetLeft)&&(z.value=G.value)):S.value===0&&(z.value=0)},{immediate:!0});const X=ae();function te(Ee,Je){if(Ee)clearTimeout(X.value),s.value[Je]=!0,C(Je),F(Ee),L.value||_(null,Je);else if(S.value===Je){F(Ee);const Ge=s.value;X.value=setTimeout(()=>{Ge===s.value&&(s.value={})})}}function W(Ee){te(!0,Ee),setTimeout(()=>{const Je=[v,h][Ee];Je.value&&Je.value.focus()},0)}function U(Ee,Je){let Ge=Ee,Tt=wt(Ge,0),Sn=wt(Ge,1);const{generateConfig:nn,locale:To,picker:Kn,order:Zr,onCalendarChange:Fo,allowEmpty:tr,onChange:jt,showTime:Ir}=e;Tt&&Sn&&nn.isAfter(Tt,Sn)&&(Kn==="week"&&!o5(nn,To.locale,Tt,Sn)||Kn==="quarter"&&!n5(nn,Tt,Sn)||Kn!=="week"&&Kn!=="quarter"&&Kn!=="time"&&!(Ir?rc(nn,Tt,Sn):zi(nn,Tt,Sn))?(Je===0?(Ge=[Tt,null],Sn=null):(Tt=null,Ge=[null,Sn]),s.value={[Je]:!0}):(Kn!=="time"||Zr!==!1)&&(Ge=iI(Ge,nn))),A(Ge);const nr=Ge&&Ge[0]?Xn(Ge[0],{generateConfig:nn,locale:To,format:b.value[0]}):"",sa=Ge&&Ge[1]?Xn(Ge[1],{generateConfig:nn,locale:To,format:b.value[0]}):"";Fo&&Fo(Ge,[nr,sa],{range:Je===0?"start":"end"});const ca=aI(Tt,0,x.value,tr),Tr=aI(Sn,1,x.value,tr);(Ge===null||ca&&Tr)&&(w(Ge),jt&&(!rc(nn,wt(P.value,0),Tt)||!rc(nn,wt(P.value,1),Sn))&&jt(Ge,[nr,sa]));let Er=null;Je===0&&!x.value[1]?Er=1:Je===1&&!x.value[0]&&(Er=0),Er!==null&&Er!==S.value&&(!s.value[Er]||!wt(Ge,Er))&&wt(Ge,Je)?W(Er):te(!1,Je)}const J=Ee=>L&&$.value&&$.value.onKeydown?$.value.onKeydown(Ee):!1,de={formatList:b,generateConfig:We(e,"generateConfig"),locale:We(e,"locale")},[fe,pe]=dh(E(()=>wt(T.value,0)),de),[ve,he]=dh(E(()=>wt(T.value,1)),de),V=(Ee,Je)=>{const Ge=r5(Ee,{locale:e.locale,formatList:b.value,generateConfig:e.generateConfig});Ge&&!(Je===0?D:N)(Ge)&&(A(lr(T.value,Ge,Je)),_(Ge,Je))},[q,ie,me]=Jy({valueTexts:fe,onTextChange:Ee=>V(Ee,0)}),[Se,ce,ee]=Jy({valueTexts:ve,onTextChange:Ee=>V(Ee,1)}),[ue,xe]=$t(null),[Pe,_e]=$t(null),[Ce,we,Oe]=Zy(q,de),[Me,Re,Ae]=Zy(Se,de),Fe=Ee=>{_e(lr(T.value,Ee,S.value)),S.value===0?we(Ee):Re(Ee)},lt=()=>{_e(lr(T.value,null,S.value)),S.value===0?Oe():Ae()},bt=(Ee,Je)=>({forwardKeydown:J,onBlur:Ge=>{var Tt;(Tt=e.onBlur)===null||Tt===void 0||Tt.call(e,Ge)},isClickOutside:Ge=>!t5([c.value,d.value,f.value,u.value],Ge),onFocus:Ge=>{var Tt;C(Ee),(Tt=e.onFocus)===null||Tt===void 0||Tt.call(e,Ge)},triggerOpen:Ge=>{te(Ge,Ee)},onSubmit:()=>{if(!T.value||e.disabledDate&&e.disabledDate(T.value[Ee]))return!1;U(T.value,Ee),Je()},onCancel:()=>{te(!1,Ee),A(P.value),Je()}}),[ft,{focused:yt,typing:Ct}]=qy(y(y({},bt(0,me)),{blurToCancel:r,open:B,value:q,onKeydown:(Ee,Je)=>{var Ge;(Ge=e.onKeydown)===null||Ge===void 0||Ge.call(e,Ee,Je)}})),[fn,{focused:yn,typing:On}]=qy(y(y({},bt(1,ee)),{blurToCancel:r,open:j,value:Se,onKeydown:(Ee,Je)=>{var Ge;(Ge=e.onKeydown)===null||Ge===void 0||Ge.call(e,Ee,Je)}})),tn=Ee=>{var Je;(Je=e.onClick)===null||Je===void 0||Je.call(e,Ee),!L.value&&!v.value.contains(Ee.target)&&!h.value.contains(Ee.target)&&(x.value[0]?x.value[1]||W(1):W(0))},Qn=Ee=>{var Je;(Je=e.onMousedown)===null||Je===void 0||Je.call(e,Ee),L.value&&(yt.value||yn.value)&&!v.value.contains(Ee.target)&&!h.value.contains(Ee.target)&&Ee.preventDefault()},Oo=E(()=>{var Ee;return!((Ee=P.value)===null||Ee===void 0)&&Ee[0]?Xn(P.value[0],{locale:e.locale,format:"YYYYMMDDHHmmss",generateConfig:e.generateConfig}):""}),er=E(()=>{var Ee;return!((Ee=P.value)===null||Ee===void 0)&&Ee[1]?Xn(P.value[1],{locale:e.locale,format:"YYYYMMDDHHmmss",generateConfig:e.generateConfig}):""});be([L,fe,ve],()=>{L.value||(A(P.value),!fe.value.length||fe.value[0]===""?ie(""):pe.value!==q.value&&me(),!ve.value.length||ve.value[0]===""?ce(""):he.value!==Se.value&&ee())}),be([Oo,er],()=>{A(P.value)}),o({focus:()=>{v.value&&v.value.focus()},blur:()=>{v.value&&v.value.blur(),h.value&&h.value.blur()}});const Or=E(()=>L.value&&Pe.value&&Pe.value[0]&&Pe.value[1]&&e.generateConfig.isAfter(Pe.value[1],Pe.value[0])?Pe.value:null);function Io(){let Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{generateConfig:Ge,showTime:Tt,dateRender:Sn,direction:nn,disabledTime:To,prefixCls:Kn,locale:Zr}=e;let Fo=Tt;if(Tt&&typeof Tt=="object"&&Tt.defaultValue){const jt=Tt.defaultValue;Fo=y(y({},Tt),{defaultValue:wt(jt,S.value)||void 0})}let tr=null;return Sn&&(tr=jt=>{let{current:Ir,today:nr}=jt;return Sn({current:Ir,today:nr,info:{range:S.value?"end":"start"}})}),g(Lee,{value:{inRange:!0,panelPosition:Ee,rangedValue:ue.value||T.value,hoverRangedValue:Or.value}},{default:()=>[g(px,k(k(k({},e),Je),{},{dateRender:tr,showTime:Fo,mode:R.value[S.value],generateConfig:Ge,style:void 0,direction:nn,disabledDate:S.value===0?D:N,disabledTime:jt=>To?To(jt,S.value===0?"start":"end"):!1,class:ge({[`${Kn}-panel-focused`]:S.value===0?!Ct.value:!On.value}),value:wt(T.value,S.value),locale:Zr,tabIndex:-1,onPanelChange:(jt,Ir)=>{S.value===0&&Oe(!0),S.value===1&&Ae(!0),M(lr(R.value,Ir,S.value),lr(T.value,jt,S.value));let nr=jt;Ee==="right"&&R.value[S.value]===Ir&&(nr=od(nr,Ir,Ge,-1)),_(nr,S.value)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:S.value===0?wt(T.value,1):wt(T.value,0)}),null)]})}const ol=(Ee,Je)=>{const Ge=lr(T.value,Ee,S.value);Je==="submit"||Je!=="key"&&!r.value?(U(Ge,S.value),S.value===0?Oe():Ae()):A(Ge)};return YC({operationRef:$,hideHeader:E(()=>e.picker==="time"),onDateMouseenter:Fe,onDateMouseleave:lt,hideRanges:E(()=>!0),onSelect:ol,open:L}),()=>{const{prefixCls:Ee="rc-picker",id:Je,popupStyle:Ge,dropdownClassName:Tt,transitionName:Sn,dropdownAlign:nn,getPopupContainer:To,generateConfig:Kn,locale:Zr,placeholder:Fo,autofocus:tr,picker:jt="date",showTime:Ir,separator:nr="~",disabledDate:sa,panelRender:ca,allowClear:Tr,suffixIcon:ys,clearIcon:Er,inputReadOnly:Wm,renderExtraFooter:rL,onMouseenter:iL,onMouseleave:aL,onMouseup:lL,onOk:$w,components:sL,direction:gu,autocomplete:ww="off"}=e,cL=gu==="rtl"?{right:`${G.value}px`}:{left:`${G.value}px`};function uL(){let Eo;const ua=u5(Ee,R.value[S.value],rL),Tw=d5({prefixCls:Ee,components:sL,needConfirmButton:r.value,okDisabled:!wt(T.value,S.value)||sa&&sa(T.value[S.value]),locale:Zr,onOk:()=>{wt(T.value,S.value)&&(U(T.value,S.value),$w&&$w(T.value))}});if(jt!=="time"&&!Ir){const da=S.value===0?O.value:I.value,pL=od(da,jt,Kn),Gm=R.value[S.value]===jt,Ew=Io(Gm?"left":!1,{pickerValue:da,onPickerValueChange:Xm=>{_(Xm,S.value)}}),_w=Io("right",{pickerValue:pL,onPickerValueChange:Xm=>{_(od(Xm,jt,Kn,-1),S.value)}});gu==="rtl"?Eo=g(Le,null,[_w,Gm&&Ew]):Eo=g(Le,null,[Ew,Gm&&_w])}else Eo=Io();let Um=g("div",{class:`${Ee}-panel-layout`},[g(p5,{prefixCls:Ee,presets:l.value,onClick:da=>{U(da,null),te(!1,S.value)},onHover:da=>{xe(da)}},null),g("div",null,[g("div",{class:`${Ee}-panels`},[Eo]),(ua||Tw)&&g("div",{class:`${Ee}-footer`},[ua,Tw])])]);return ca&&(Um=ca(Um)),g("div",{class:`${Ee}-panel-container`,style:{marginLeft:`${z.value}px`},ref:c,onMousedown:da=>{da.preventDefault()}},[Um])}const dL=g("div",{class:ge(`${Ee}-range-wrapper`,`${Ee}-${jt}-range-wrapper`),style:{minWidth:`${Q.value}px`}},[g("div",{ref:m,class:`${Ee}-range-arrow`,style:cL},null),uL()]);let Pw;ys&&(Pw=g("span",{class:`${Ee}-suffix`},[ys]));let Ow;Tr&&(wt(P.value,0)&&!x.value[0]||wt(P.value,1)&&!x.value[1])&&(Ow=g("span",{onMousedown:Eo=>{Eo.preventDefault(),Eo.stopPropagation()},onMouseup:Eo=>{Eo.preventDefault(),Eo.stopPropagation();let ua=P.value;x.value[0]||(ua=lr(ua,null,0)),x.value[1]||(ua=lr(ua,null,1)),U(ua,null),te(!1,S.value)},class:`${Ee}-clear`},[Er||g("span",{class:`${Ee}-clear-btn`},null)]));const Iw={size:e5(jt,b.value[0],Kn)};let Vm=0,Km=0;d.value&&f.value&&p.value&&(S.value===0?Km=d.value.offsetWidth:(Vm=G.value,Km=f.value.offsetWidth));const fL=gu==="rtl"?{right:`${Vm}px`}:{left:`${Vm}px`};return g("div",k({ref:u,class:ge(Ee,`${Ee}-range`,n.class,{[`${Ee}-disabled`]:x.value[0]&&x.value[1],[`${Ee}-focused`]:S.value===0?yt.value:yn.value,[`${Ee}-rtl`]:gu==="rtl"}),style:n.style,onClick:tn,onMouseenter:iL,onMouseleave:aL,onMousedown:Qn,onMouseup:lL},l5(e)),[g("div",{class:ge(`${Ee}-input`,{[`${Ee}-input-active`]:S.value===0,[`${Ee}-input-placeholder`]:!!Ce.value}),ref:d},[g("input",k(k(k({id:Je,disabled:x.value[0],readonly:Wm||typeof b.value[0]=="function"||!Ct.value,value:Ce.value||q.value,onInput:Eo=>{ie(Eo.target.value)},autofocus:tr,placeholder:wt(Fo,0)||"",ref:v},ft.value),Iw),{},{autocomplete:ww}),null)]),g("div",{class:`${Ee}-range-separator`,ref:p},[nr]),g("div",{class:ge(`${Ee}-input`,{[`${Ee}-input-active`]:S.value===1,[`${Ee}-input-placeholder`]:!!Me.value}),ref:f},[g("input",k(k(k({disabled:x.value[1],readonly:Wm||typeof b.value[0]=="function"||!On.value,value:Me.value||Se.value,onInput:Eo=>{ce(Eo.target.value)},placeholder:wt(Fo,1)||"",ref:h},fn.value),Iw),{},{autocomplete:ww}),null)]),g("div",{class:`${Ee}-active-bar`,style:y(y({},fL),{width:`${Km}px`,position:"absolute"})},null),Pw,Ow,g(f5,{visible:L.value,popupStyle:Ge,prefixCls:Ee,dropdownClassName:Tt,dropdownAlign:nn,getPopupContainer:To,transitionName:Sn,range:!0,direction:gu},{default:()=>[g("div",{style:{pointerEvents:"none",position:"absolute",top:0,bottom:0,left:0,right:0}},null)],popupElement:()=>dL})])}}})}const nte=tte();var ote=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.checked,()=>{i.value=e.checked}),r({focus(){var c;(c=a.value)===null||c===void 0||c.focus()},blur(){var c;(c=a.value)===null||c===void 0||c.blur()}});const l=ae(),s=c=>{if(e.disabled)return;e.checked===void 0&&(i.value=c.target.checked),c.shiftKey=l.value;const d={target:y(y({},e),{checked:c.target.checked}),stopPropagation(){c.stopPropagation()},preventDefault(){c.preventDefault()},nativeEvent:c};e.checked!==void 0&&(a.value.checked=!!e.checked),o("change",d),l.value=!1},u=c=>{o("click",c),l.value=c.shiftKey};return()=>{const{prefixCls:c,name:d,id:f,type:p,disabled:v,readonly:h,tabindex:m,autofocus:b,value:S,required:C}=e,$=ote(e,["prefixCls","name","id","type","disabled","readonly","tabindex","autofocus","value","required"]),{class:x,onFocus:P,onBlur:w,onKeydown:O,onKeypress:I,onKeyup:_}=n,T=y(y({},$),n),A=Object.keys(T).reduce((M,D)=>((D.startsWith("data-")||D.startsWith("aria-")||D==="role")&&(M[D]=T[D]),M),{}),R=ge(c,x,{[`${c}-checked`]:i.value,[`${c}-disabled`]:v}),H=y(y({name:d,id:f,type:p,readonly:h,disabled:v,tabindex:m,class:`${c}-input`,checked:!!i.value,autofocus:b,value:S},A),{onChange:s,onClick:u,onFocus:P,onBlur:w,onKeydown:O,onKeypress:I,onKeyup:_,required:C});return g("span",{class:R},[g("input",k({ref:a},H),null),g("span",{class:`${c}-inner`},null)])}}}),S5=Symbol("radioGroupContextKey"),ite=e=>{Xe(S5,e)},ate=()=>ze(S5,void 0),C5=Symbol("radioOptionTypeContextKey"),lte=e=>{Xe(C5,e)},ste=()=>ze(C5,void 0),cte=new at("antRadioEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),ute=e=>{const{componentCls:t,antCls:n}=e,o=`${t}-group`;return{[o]:y(y({},qe(e)),{display:"inline-block",fontSize:0,[`&${o}-rtl`]:{direction:"rtl"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},dte=e=>{const{componentCls:t,radioWrapperMarginRight:n,radioCheckedColor:o,radioSize:r,motionDurationSlow:i,motionDurationMid:a,motionEaseInOut:l,motionEaseInOutCirc:s,radioButtonBg:u,colorBorder:c,lineWidth:d,radioDotSize:f,colorBgContainerDisabled:p,colorTextDisabled:v,paddingXS:h,radioDotDisabledColor:m,lineType:b,radioDotDisabledSize:S,wireframe:C,colorWhite:$}=e,x=`${t}-inner`;return{[`${t}-wrapper`]:y(y({},qe(e)),{position:"relative",display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer",[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${d}px ${b} ${o}`,borderRadius:"50%",visibility:"hidden",animationName:cte,animationDuration:i,animationTimingFunction:l,animationFillMode:"both",content:'""'},[t]:y(y({},qe(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center"}),[`${t}-wrapper:hover &, + &:hover ${x}`]:{borderColor:o},[`${t}-input:focus-visible + ${x}`]:y({},qi(e)),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:r,height:r,marginBlockStart:r/-2,marginInlineStart:r/-2,backgroundColor:C?o:$,borderBlockStart:0,borderInlineStart:0,borderRadius:r,transform:"scale(0)",opacity:0,transition:`all ${i} ${s}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:r,height:r,backgroundColor:u,borderColor:c,borderStyle:"solid",borderWidth:d,borderRadius:"50%",transition:`all ${a}`},[`${t}-input`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,insetBlockEnd:0,insetInlineStart:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[x]:{borderColor:o,backgroundColor:C?u:o,"&::after":{transform:`scale(${f/r})`,opacity:1,transition:`all ${i} ${s}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[x]:{backgroundColor:p,borderColor:c,cursor:"not-allowed","&::after":{backgroundColor:m}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:v,cursor:"not-allowed"},[`&${t}-checked`]:{[x]:{"&::after":{transform:`scale(${S/r})`}}}},[`span${t} + *`]:{paddingInlineStart:h,paddingInlineEnd:h}})}},fte=e=>{const{radioButtonColor:t,controlHeight:n,componentCls:o,lineWidth:r,lineType:i,colorBorder:a,motionDurationSlow:l,motionDurationMid:s,radioButtonPaddingHorizontal:u,fontSize:c,radioButtonBg:d,fontSizeLG:f,controlHeightLG:p,controlHeightSM:v,paddingXS:h,borderRadius:m,borderRadiusSM:b,borderRadiusLG:S,radioCheckedColor:C,radioButtonCheckedBg:$,radioButtonHoverColor:x,radioButtonActiveColor:P,radioSolidCheckedColor:w,colorTextDisabled:O,colorBgContainerDisabled:I,radioDisabledButtonCheckedColor:_,radioDisabledButtonCheckedBg:T}=e;return{[`${o}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:u,paddingBlock:0,color:t,fontSize:c,lineHeight:`${n-r*2}px`,background:d,border:`${r}px ${i} ${a}`,borderBlockStartWidth:r+.02,borderInlineStartWidth:0,borderInlineEndWidth:r,cursor:"pointer",transition:[`color ${s}`,`background ${s}`,`border-color ${s}`,`box-shadow ${s}`].join(","),a:{color:t},[`> ${o}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-r,insetInlineStart:-r,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:r,paddingInline:0,backgroundColor:a,transition:`background-color ${l}`,content:'""'}},"&:first-child":{borderInlineStart:`${r}px ${i} ${a}`,borderStartStartRadius:m,borderEndStartRadius:m},"&:last-child":{borderStartEndRadius:m,borderEndEndRadius:m},"&:first-child:last-child":{borderRadius:m},[`${o}-group-large &`]:{height:p,fontSize:f,lineHeight:`${p-r*2}px`,"&:first-child":{borderStartStartRadius:S,borderEndStartRadius:S},"&:last-child":{borderStartEndRadius:S,borderEndEndRadius:S}},[`${o}-group-small &`]:{height:v,paddingInline:h-r,paddingBlock:0,lineHeight:`${v-r*2}px`,"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},"&:hover":{position:"relative",color:C},"&:has(:focus-visible)":y({},qi(e)),[`${o}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${o}-button-wrapper-disabled)`]:{zIndex:1,color:C,background:$,borderColor:C,"&::before":{backgroundColor:C},"&:first-child":{borderColor:C},"&:hover":{color:x,borderColor:x,"&::before":{backgroundColor:x}},"&:active":{color:P,borderColor:P,"&::before":{backgroundColor:P}}},[`${o}-group-solid &-checked:not(${o}-button-wrapper-disabled)`]:{color:w,background:C,borderColor:C,"&:hover":{color:w,background:x,borderColor:x},"&:active":{color:w,background:P,borderColor:P}},"&-disabled":{color:O,backgroundColor:I,borderColor:a,cursor:"not-allowed","&:first-child, &:hover":{color:O,backgroundColor:I,borderColor:a}},[`&-disabled${o}-button-wrapper-checked`]:{color:_,backgroundColor:T,borderColor:a,boxShadow:"none"}}}},x5=Ue("Radio",e=>{const{padding:t,lineWidth:n,controlItemBgActiveDisabled:o,colorTextDisabled:r,colorBgContainer:i,fontSizeLG:a,controlOutline:l,colorPrimaryHover:s,colorPrimaryActive:u,colorText:c,colorPrimary:d,marginXS:f,controlOutlineWidth:p,colorTextLightSolid:v,wireframe:h}=e,m=`0 0 0 ${p}px ${l}`,b=m,S=a,C=4,$=S-C*2,x=h?$:S-(C+n)*2,P=d,w=c,O=s,I=u,_=t-n,R=Be(e,{radioFocusShadow:m,radioButtonFocusShadow:b,radioSize:S,radioDotSize:x,radioDotDisabledSize:$,radioCheckedColor:P,radioDotDisabledColor:r,radioSolidCheckedColor:v,radioButtonBg:i,radioButtonCheckedBg:i,radioButtonColor:w,radioButtonHoverColor:O,radioButtonActiveColor:I,radioButtonPaddingHorizontal:_,radioDisabledButtonCheckedBg:o,radioDisabledButtonCheckedColor:r,radioWrapperMarginRight:f});return[ute(R),dte(R),fte(R)]});var pte=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,checked:$e(),disabled:$e(),isGroup:$e(),value:K.any,name:String,id:String,autofocus:$e(),onChange:ye(),onFocus:ye(),onBlur:ye(),onClick:ye(),"onUpdate:checked":ye(),"onUpdate:value":ye()}),bo=le({compatConfig:{MODE:3},name:"ARadio",inheritAttrs:!1,props:$5(),setup(e,t){let{emit:n,expose:o,slots:r,attrs:i}=t;const a=bn(),l=kn.useInject(),s=ste(),u=ate(),c=ko(),d=E(()=>{var O;return(O=h.value)!==null&&O!==void 0?O:c.value}),f=ae(),{prefixCls:p,direction:v,disabled:h}=Te("radio",e),m=E(()=>(u==null?void 0:u.optionType.value)==="button"||s==="button"?`${p.value}-button`:p.value),b=ko(),[S,C]=x5(p);o({focus:()=>{f.value.focus()},blur:()=>{f.value.blur()}});const P=O=>{const I=O.target.checked;n("update:checked",I),n("update:value",I),n("change",O),a.onFieldChange()},w=O=>{n("change",O),u&&u.onChange&&u.onChange(O)};return()=>{var O;const I=u,{prefixCls:_,id:T=a.id.value}=e,A=pte(e,["prefixCls","id"]),R=y(y({prefixCls:m.value,id:T},it(A,["onUpdate:checked","onUpdate:value"])),{disabled:(O=h.value)!==null&&O!==void 0?O:b.value});I?(R.name=I.name.value,R.onChange=w,R.checked=e.value===I.value.value,R.disabled=d.value||I.disabled.value):R.onChange=P;const H=ge({[`${m.value}-wrapper`]:!0,[`${m.value}-wrapper-checked`]:R.checked,[`${m.value}-wrapper-disabled`]:R.disabled,[`${m.value}-wrapper-rtl`]:v.value==="rtl",[`${m.value}-wrapper-in-form-item`]:l.isFormItemInput},i.class,C.value);return S(g("label",k(k({},i),{},{class:H}),[g(y5,k(k({},R),{},{type:"radio",ref:f}),null),r.default&&g("span",null,[r.default()])]))}}}),gte=()=>({prefixCls:String,value:K.any,size:Ne(),options:pt(),disabled:$e(),name:String,buttonStyle:Ne("outline"),id:String,optionType:Ne("default"),onChange:ye(),"onUpdate:value":ye()}),hx=le({compatConfig:{MODE:3},name:"ARadioGroup",inheritAttrs:!1,props:gte(),setup(e,t){let{slots:n,emit:o,attrs:r}=t;const i=bn(),{prefixCls:a,direction:l,size:s}=Te("radio",e),[u,c]=x5(a),d=ae(e.value),f=ae(!1);return be(()=>e.value,v=>{d.value=v,f.value=!1}),ite({onChange:v=>{const h=d.value,{value:m}=v.target;"value"in e||(d.value=m),!f.value&&m!==h&&(f.value=!0,o("update:value",m),o("change",v),i.onFieldChange()),ot(()=>{f.value=!1})},value:d,disabled:E(()=>e.disabled),name:E(()=>e.name),optionType:E(()=>e.optionType)}),()=>{var v;const{options:h,buttonStyle:m,id:b=i.id.value}=e,S=`${a.value}-group`,C=ge(S,`${S}-${m}`,{[`${S}-${s.value}`]:s.value,[`${S}-rtl`]:l.value==="rtl"},r.class,c.value);let $=null;return h&&h.length>0?$=h.map(x=>{if(typeof x=="string"||typeof x=="number")return g(bo,{key:x,prefixCls:a.value,disabled:e.disabled,value:x,checked:d.value===x},{default:()=>[x]});const{value:P,disabled:w,label:O}=x;return g(bo,{key:`radio-group-value-options-${P}`,prefixCls:a.value,disabled:w||e.disabled,value:P,checked:d.value===P},{default:()=>[O]})}):$=(v=n.default)===null||v===void 0?void 0:v.call(n),u(g("div",k(k({},r),{},{class:C,id:b}),[$]))}}}),fh=le({compatConfig:{MODE:3},name:"ARadioButton",inheritAttrs:!1,props:$5(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r}=Te("radio",e);return lte("button"),()=>{var i;return g(bo,k(k(k({},o),e),{},{prefixCls:r.value}),{default:()=>[(i=n.default)===null||i===void 0?void 0:i.call(n)]})}}});bo.Group=hx;bo.Button=fh;bo.install=function(e){return e.component(bo.name,bo),e.component(bo.Group.name,bo.Group),e.component(bo.Button.name,bo.Button),e};const hte=10,vte=20;function w5(e){const{fullscreen:t,validRange:n,generateConfig:o,locale:r,prefixCls:i,value:a,onChange:l,divRef:s}=e,u=o.getYear(a||o.getNow());let c=u-hte,d=c+vte;n&&(c=o.getYear(n[0]),d=o.getYear(n[1])+1);const f=r&&r.year==="年"?"年":"",p=[];for(let v=c;v{let h=o.setYear(a,v);if(n){const[m,b]=n,S=o.getYear(h),C=o.getMonth(h);S===o.getYear(b)&&C>o.getMonth(b)&&(h=o.setMonth(h,o.getMonth(b))),S===o.getYear(m)&&Cs.value},null)}w5.inheritAttrs=!1;function P5(e){const{prefixCls:t,fullscreen:n,validRange:o,value:r,generateConfig:i,locale:a,onChange:l,divRef:s}=e,u=i.getMonth(r||i.getNow());let c=0,d=11;if(o){const[v,h]=o,m=i.getYear(r);i.getYear(h)===m&&(d=i.getMonth(h)),i.getYear(v)===m&&(c=i.getMonth(v))}const f=a.shortMonths||i.locale.getShortMonths(a.locale),p=[];for(let v=c;v<=d;v+=1)p.push({label:f[v],value:v});return g(Fn,{size:n?void 0:"small",class:`${t}-month-select`,value:u,options:p,onChange:v=>{l(i.setMonth(r,v))},getPopupContainer:()=>s.value},null)}P5.inheritAttrs=!1;function O5(e){const{prefixCls:t,locale:n,mode:o,fullscreen:r,onModeChange:i}=e;return g(hx,{onChange:a=>{let{target:{value:l}}=a;i(l)},value:o,size:r?void 0:"small",class:`${t}-mode-switch`},{default:()=>[g(fh,{value:"month"},{default:()=>[n.month]}),g(fh,{value:"year"},{default:()=>[n.year]})]})}O5.inheritAttrs=!1;const mte=le({name:"CalendarHeader",inheritAttrs:!1,props:["mode","prefixCls","value","validRange","generateConfig","locale","mode","fullscreen"],setup(e,t){let{attrs:n}=t;const o=ae(null),r=kn.useInject();return kn.useProvide(r,{isFormItemInput:!1}),()=>{const i=y(y({},e),n),{prefixCls:a,fullscreen:l,mode:s,onChange:u,onModeChange:c}=i,d=y(y({},i),{fullscreen:l,divRef:o});return g("div",{class:`${a}-header`,ref:o},[g(w5,k(k({},d),{},{onChange:f=>{u(f,"year")}}),null),s==="month"&&g(P5,k(k({},d),{},{onChange:f=>{u(f,"month")}}),null),g(O5,k(k({},d),{},{onModeChange:c}),null)])}}}),vx=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),ru=e=>({borderColor:e.inputBorderHoverColor,borderInlineEndWidth:e.lineWidth}),Ba=e=>({borderColor:e.inputBorderHoverColor,boxShadow:`0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`,borderInlineEndWidth:e.lineWidth,outline:0}),mx=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":y({},ru(Be(e,{inputBorderHoverColor:e.colorBorder})))}),I5=e=>{const{inputPaddingVerticalLG:t,fontSizeLG:n,lineHeightLG:o,borderRadiusLG:r,inputPaddingHorizontalLG:i}=e;return{padding:`${t}px ${i}px`,fontSize:n,lineHeight:o,borderRadius:r}},bx=e=>({padding:`${e.inputPaddingVerticalSM}px ${e.controlPaddingHorizontalSM-1}px`,borderRadius:e.borderRadiusSM}),$f=(e,t)=>{const{componentCls:n,colorError:o,colorWarning:r,colorErrorOutline:i,colorWarningOutline:a,colorErrorBorderHover:l,colorWarningBorderHover:s}=e;return{[`&-status-error:not(${t}-disabled):not(${t}-borderless)${t}`]:{borderColor:o,"&:hover":{borderColor:l},"&:focus, &-focused":y({},Ba(Be(e,{inputBorderActiveColor:o,inputBorderHoverColor:o,controlOutline:i}))),[`${n}-prefix`]:{color:o}},[`&-status-warning:not(${t}-disabled):not(${t}-borderless)${t}`]:{borderColor:r,"&:hover":{borderColor:s},"&:focus, &-focused":y({},Ba(Be(e,{inputBorderActiveColor:r,inputBorderHoverColor:r,controlOutline:a}))),[`${n}-prefix`]:{color:r}}}},fs=e=>y(y({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${e.inputPaddingVertical}px ${e.inputPaddingHorizontal}px`,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,backgroundColor:e.colorBgContainer,backgroundImage:"none",borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:e.colorBorder,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},vx(e.colorTextPlaceholder)),{"&:hover":y({},ru(e)),"&:focus, &-focused":y({},Ba(e)),"&-disabled, &[disabled]":y({},mx(e)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":y({},I5(e)),"&-sm":y({},bx(e)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),T5=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:y({},I5(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:y({},bx(e)),[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${e.inputPaddingHorizontal}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,textAlign:"center",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`-${e.inputPaddingVertical+1}px -${e.inputPaddingHorizontal}px`,[`&${n}-select-single:not(${n}-select-customize-input)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${e.lineWidth}px ${e.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${n}-select-selector`]:{color:e.colorPrimary}}},[`${n}-cascader-picker`]:{margin:`-9px -${e.inputPaddingHorizontal}px`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${t}`]:{float:"inline-start",width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:y(y({display:"block"},Kr()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`& > ${t}-affix-wrapper`]:{display:"inline-flex"},[`& > ${n}-picker-range`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-e.lineWidth,borderInlineEndWidth:e.lineWidth},[`${t}`]:{float:"none"},[`& > ${n}-select > ${n}-select-selector, & > ${n}-select-auto-complete ${t}, & > ${n}-cascader-picker ${t}, & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child, @@ -277,15 +277,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${t}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:"auto",minWidth:"auto",direction:"ltr",[`${t}-content`]:{display:"flex",flex:"auto",height:G},"&-column":{flex:"1 0 auto",width:Q,margin:`${s}px 0`,padding:0,overflowY:"hidden",textAlign:"start",listStyle:"none",transition:`background ${C}`,overflowX:"hidden","&::after":{display:"block",height:G-Y,content:'""'},"&:not(:first-child)":{borderInlineStart:`${c}px ${d} ${h}`},"&-active":{background:new St(oe).setAlpha(.2).toHexString()},"&:hover":{overflowY:"auto"},"> li":{margin:0,padding:0,[`&${t}-time-panel-cell`]:{marginInline:Z,[`${t}-time-panel-cell-inner`]:{display:"block",width:Q-2*Z,height:Y,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:(Q-Y)/2,color:I,lineHeight:`${Y}px`,borderRadius:F,cursor:"pointer",transition:`background ${C}`,"&:hover":{background:z}},"&-selected":{[`${t}-time-panel-cell-inner`]:{background:oe}},"&-disabled":{[`${t}-time-panel-cell-inner`]:{color:O,background:"transparent",cursor:"not-allowed"}}}}}},[`&-datetime-panel ${t}-time-panel-column:after`]:{height:G-Y+s*2}}}},Pte=e=>{const{componentCls:t,colorBgContainer:n,colorError:o,colorErrorOutline:r,colorWarning:i,colorWarningOutline:a}=e;return{[t]:{[`&-status-error${t}`]:{"&, &:not([disabled]):hover":{backgroundColor:n,borderColor:o},"&-focused, &:focus":y({},Ba(Be(e,{inputBorderActiveColor:o,inputBorderHoverColor:o,controlOutline:r}))),[`${t}-active-bar`]:{background:o}},[`&-status-warning${t}`]:{"&, &:not([disabled]):hover":{backgroundColor:n,borderColor:i},"&-focused, &:focus":y({},Ba(Be(e,{inputBorderActiveColor:i,inputBorderHoverColor:i,controlOutline:a}))),[`${t}-active-bar`]:{background:i}}}}},Ote=e=>{const{componentCls:t,antCls:n,boxShadowPopoverArrow:o,controlHeight:r,fontSize:i,inputPaddingHorizontal:a,colorBgContainer:l,lineWidth:s,lineType:u,colorBorder:c,borderRadius:d,motionDurationMid:f,colorBgContainerDisabled:p,colorTextDisabled:v,colorTextPlaceholder:h,controlHeightLG:m,fontSizeLG:b,controlHeightSM:S,inputPaddingHorizontalSM:C,paddingXS:$,marginXS:x,colorTextDescription:P,lineWidthBold:w,lineHeight:O,colorPrimary:I,motionDurationSlow:_,zIndexPopup:T,paddingXXS:A,paddingSM:R,pickerTextHeight:H,controlItemBgActive:M,colorPrimaryBorder:D,sizePopupArrow:N,borderRadiusXS:L,borderRadiusOuter:F,colorBgElevated:B,borderRadiusLG:j,boxShadowSecondary:z,borderRadiusSM:G,colorSplit:Q,controlItemBgHover:Y,presetsWidth:oe,presetsMaxWidth:Z}=e;return[{[t]:y(y(y({},qe(e)),F0(e,r,i,a)),{position:"relative",display:"inline-flex",alignItems:"center",background:l,lineHeight:1,border:`${s}px ${u} ${c}`,borderRadius:d,transition:`border ${f}, box-shadow ${f}`,"&:hover, &-focused":y({},ru(e)),"&-focused":y({},Ba(e)),[`&${t}-disabled`]:{background:p,borderColor:c,cursor:"not-allowed",[`${t}-suffix`]:{color:v}},[`&${t}-borderless`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`${t}-input`]:{position:"relative",display:"inline-flex",alignItems:"center",width:"100%","> input":y(y({},fs(e)),{flex:"auto",minWidth:1,height:"auto",padding:0,background:"transparent",border:0,"&:focus":{boxShadow:"none"},"&[disabled]":{background:"transparent"}}),"&:hover":{[`${t}-clear`]:{opacity:1}},"&-placeholder":{"> input":{color:h}}},"&-large":y(y({},F0(e,m,b,a)),{[`${t}-input > input`]:{fontSize:b}}),"&-small":y({},F0(e,S,i,C)),[`${t}-suffix`]:{display:"flex",flex:"none",alignSelf:"center",marginInlineStart:$/2,color:v,lineHeight:1,pointerEvents:"none","> *":{verticalAlign:"top","&:not(:last-child)":{marginInlineEnd:x}}},[`${t}-clear`]:{position:"absolute",top:"50%",insetInlineEnd:0,color:v,lineHeight:1,background:l,transform:"translateY(-50%)",cursor:"pointer",opacity:0,transition:`opacity ${f}, color ${f}`,"> *":{verticalAlign:"top"},"&:hover":{color:P}},[`${t}-separator`]:{position:"relative",display:"inline-block",width:"1em",height:b,color:v,fontSize:b,verticalAlign:"top",cursor:"default",[`${t}-focused &`]:{color:P},[`${t}-range-separator &`]:{[`${t}-disabled &`]:{cursor:"not-allowed"}}},"&-range":{position:"relative",display:"inline-flex",[`${t}-clear`]:{insetInlineEnd:a},"&:hover":{[`${t}-clear`]:{opacity:1}},[`${t}-active-bar`]:{bottom:-s,height:w,marginInlineStart:a,background:I,opacity:0,transition:`all ${_} ease-out`,pointerEvents:"none"},[`&${t}-focused`]:{[`${t}-active-bar`]:{opacity:1}},[`${t}-range-separator`]:{alignItems:"center",padding:`0 ${$}px`,lineHeight:1},[`&${t}-small`]:{[`${t}-clear`]:{insetInlineEnd:C},[`${t}-active-bar`]:{marginInlineStart:C}}},"&-dropdown":y(y(y({},qe(e)),E5(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:T,[`&${t}-dropdown-hidden`]:{display:"none"},[`&${t}-dropdown-placement-bottomLeft`]:{[`${t}-range-arrow`]:{top:0,display:"block",transform:"translateY(-100%)"}},[`&${t}-dropdown-placement-topLeft`]:{[`${t}-range-arrow`]:{bottom:0,display:"block",transform:"translateY(100%) rotate(180deg)"}},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topLeft, &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topRight, &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topLeft, - &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topRight`]:{animationName:Vv},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomLeft, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topRight`]:{animationName:Wv},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomLeft, &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomRight, &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomLeft, - &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomRight`]:{animationName:jv},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topLeft, - &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topRight`]:{animationName:Kv},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomLeft, - &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomRight`]:{animationName:Wv},[`${t}-panel > ${t}-time-panel`]:{paddingTop:A},[`${t}-ranges`]:{marginBottom:0,padding:`${A}px ${R}px`,overflow:"hidden",lineHeight:`${H-2*s-$/2}px`,textAlign:"start",listStyle:"none",display:"flex",justifyContent:"space-between","> li":{display:"inline-block"},[`${t}-preset > ${n}-tag-blue`]:{color:I,background:M,borderColor:D,cursor:"pointer"},[`${t}-ok`]:{marginInlineStart:"auto"}},[`${t}-range-wrapper`]:{display:"flex",position:"relative"},[`${t}-range-arrow`]:y({position:"absolute",zIndex:1,display:"none",marginInlineStart:a*1.5,transition:`left ${_} ease-out`},zS(N,L,F,B,o)),[`${t}-panel-container`]:{overflow:"hidden",verticalAlign:"top",background:B,borderRadius:j,boxShadow:z,transition:`margin ${_}`,[`${t}-panel-layout`]:{display:"flex",flexWrap:"nowrap",alignItems:"stretch"},[`${t}-presets`]:{display:"flex",flexDirection:"column",minWidth:oe,maxWidth:Z,ul:{height:0,flex:"auto",listStyle:"none",overflow:"auto",margin:0,padding:$,borderInlineEnd:`${s}px ${u} ${Q}`,li:y(y({},cn),{borderRadius:G,paddingInline:$,paddingBlock:(S-Math.round(i*O))/2,cursor:"pointer",transition:`all ${_}`,"+ li":{marginTop:x},"&:hover":{background:Y}})}},[`${t}-panels`]:{display:"inline-flex",flexWrap:"nowrap",direction:"ltr",[`${t}-panel`]:{borderWidth:`0 0 ${s}px`},"&:last-child":{[`${t}-panel`]:{borderWidth:0}}},[`${t}-panel`]:{verticalAlign:"top",background:"transparent",borderRadius:0,borderWidth:0,[`${t}-content, - table`]:{textAlign:"center"},"&-focused":{borderColor:c}}}}),"&-dropdown-range":{padding:`${N*2/3}px 0`,"&-hidden":{display:"none"}},"&-rtl":{direction:"rtl",[`${t}-separator`]:{transform:"rotate(180deg)"},[`${t}-footer`]:{"&-extra":{direction:"rtl"}}}})},vi(e,"slide-up"),vi(e,"slide-down"),Ic(e,"move-up"),Ic(e,"move-down")]},_5=e=>{const{componentCls:n,controlHeightLG:o,controlHeightSM:r,colorPrimary:i,paddingXXS:a}=e;return{pickerCellCls:`${n}-cell`,pickerCellInnerCls:`${n}-cell-inner`,pickerTextHeight:o,pickerPanelCellWidth:r*1.5,pickerPanelCellHeight:r,pickerDateHoverRangeBorderColor:new St(i).lighten(20).toHexString(),pickerBasicCellHoverWithRangeColor:new St(i).lighten(35).toHexString(),pickerPanelWithoutTimeCellHeight:o*1.65,pickerYearMonthCellWidth:o*1.5,pickerTimePanelColumnHeight:28*8,pickerTimePanelColumnWidth:o*1.4,pickerTimePanelCellHeight:28,pickerQuarterPanelContentHeight:o*1.4,pickerCellPaddingVertical:a,pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconBorderWidth:1.5}},M5=Ue("DatePicker",e=>{const t=Be(ps(e),_5(e));return[Ote(t),Pte(t),tu(e,{focusElCls:`${e.componentCls}-focused`})]},e=>({presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50})),Ite=e=>{const{calendarCls:t,componentCls:n,calendarFullBg:o,calendarFullPanelBg:r,calendarItemActiveBg:i}=e;return{[t]:y(y(y({},E5(e)),qe(e)),{background:o,"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",justifyContent:"flex-end",padding:`${e.paddingSM}px 0`,[`${t}-year-select`]:{minWidth:e.yearControlWidth},[`${t}-month-select`]:{minWidth:e.monthControlWidth,marginInlineStart:e.marginXS},[`${t}-mode-switch`]:{marginInlineStart:e.marginXS}}}),[`${t} ${n}-panel`]:{background:r,border:0,borderTop:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,borderRadius:0,[`${n}-month-panel, ${n}-date-panel`]:{width:"auto"},[`${n}-body`]:{padding:`${e.paddingXS}px 0`},[`${n}-content`]:{width:"100%"}},[`${t}-mini`]:{borderRadius:e.borderRadiusLG,[`${t}-header`]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS},[`${n}-panel`]:{borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},[`${n}-content`]:{height:e.miniContentHeight,th:{height:"auto",padding:0,lineHeight:`${e.weekHeight}px`}},[`${n}-cell::before`]:{pointerEvents:"none"}},[`${t}${t}-full`]:{[`${n}-panel`]:{display:"block",width:"100%",textAlign:"end",background:o,border:0,[`${n}-body`]:{"th, td":{padding:0},th:{height:"auto",paddingInlineEnd:e.paddingSM,paddingBottom:e.paddingXXS,lineHeight:`${e.weekHeight}px`}}},[`${n}-cell`]:{"&::before":{display:"none"},"&:hover":{[`${t}-date`]:{background:e.controlItemBgHover}},[`${t}-date-today::before`]:{display:"none"},[`&-in-view${n}-cell-selected`]:{[`${t}-date, ${t}-date-today`]:{background:i}},"&-selected, &-selected:hover":{[`${t}-date, ${t}-date-today`]:{[`${t}-date-value`]:{color:e.colorPrimary}}}},[`${t}-date`]:{display:"block",width:"auto",height:"auto",margin:`0 ${e.marginXS/2}px`,padding:`${e.paddingXS/2}px ${e.paddingXS}px 0`,border:0,borderTop:`${e.lineWidthBold}px ${e.lineType} ${e.colorSplit}`,borderRadius:0,transition:`background ${e.motionDurationSlow}`,"&-value":{lineHeight:`${e.dateValueHeight}px`,transition:`color ${e.motionDurationSlow}`},"&-content":{position:"static",width:"auto",height:e.dateContentHeight,overflowY:"auto",color:e.colorText,lineHeight:e.lineHeight,textAlign:"start"},"&-today":{borderColor:e.colorPrimary,[`${t}-date-value`]:{color:e.colorText}}}},[`@media only screen and (max-width: ${e.screenXS}px) `]:{[`${t}`]:{[`${t}-header`]:{display:"block",[`${t}-year-select`]:{width:"50%"},[`${t}-month-select`]:{width:`calc(50% - ${e.paddingXS}px)`},[`${t}-mode-switch`]:{width:"100%",marginTop:e.marginXS,marginInlineStart:0,"> label":{width:"50%",textAlign:"center"}}}}}}},Tte=Ue("Calendar",e=>{const t=`${e.componentCls}-calendar`,n=Be(ps(e),_5(e),{calendarCls:t,pickerCellInnerCls:`${e.componentCls}-cell-inner`,calendarFullBg:e.colorBgContainer,calendarFullPanelBg:e.colorBgContainer,calendarItemActiveBg:e.controlItemBgActive,dateValueHeight:e.controlHeightSM,weekHeight:e.controlHeightSM*.75,dateContentHeight:(e.fontSizeSM*e.lineHeightSM+e.marginXS)*3+e.lineWidth*2});return[Ite(n)]},{yearControlWidth:80,monthControlWidth:70,miniContentHeight:256});function Ete(e){function t(i,a){return i&&a&&e.getYear(i)===e.getYear(a)}function n(i,a){return t(i,a)&&e.getMonth(i)===e.getMonth(a)}function o(i,a){return n(i,a)&&e.getDate(i)===e.getDate(a)}const r=le({name:"ACalendar",inheritAttrs:!1,props:{prefixCls:String,locale:{type:Object,default:void 0},validRange:{type:Array,default:void 0},disabledDate:{type:Function,default:void 0},dateFullCellRender:{type:Function,default:void 0},dateCellRender:{type:Function,default:void 0},monthFullCellRender:{type:Function,default:void 0},monthCellRender:{type:Function,default:void 0},headerRender:{type:Function,default:void 0},value:{type:[Object,String],default:void 0},defaultValue:{type:[Object,String],default:void 0},mode:{type:String,default:void 0},fullscreen:{type:Boolean,default:void 0},onChange:{type:Function,default:void 0},"onUpdate:value":{type:Function,default:void 0},onPanelChange:{type:Function,default:void 0},onSelect:{type:Function,default:void 0},valueFormat:{type:String,default:void 0}},slots:Object,setup(i,a){let{emit:l,slots:s,attrs:u}=a;const c=i,{prefixCls:d,direction:f}=Te("picker",c),[p,v]=Tte(d),h=E(()=>`${d.value}-calendar`),m=M=>c.valueFormat?e.toString(M,c.valueFormat):M,b=E(()=>c.value?c.valueFormat?e.toDate(c.value,c.valueFormat):c.value:c.value===""?void 0:c.value),S=E(()=>c.defaultValue?c.valueFormat?e.toDate(c.defaultValue,c.valueFormat):c.defaultValue:c.defaultValue===""?void 0:c.defaultValue),[C,$]=Dt(()=>b.value||e.getNow(),{defaultValue:S.value,value:b}),[x,P]=Dt("month",{value:We(c,"mode")}),w=E(()=>x.value==="year"?"month":"date"),O=E(()=>M=>{var D;return(c.validRange?e.isAfter(c.validRange[0],M)||e.isAfter(M,c.validRange[1]):!1)||!!(!((D=c.disabledDate)===null||D===void 0)&&D.call(c,M))}),I=(M,D)=>{l("panelChange",m(M),D)},_=M=>{if($(M),!o(M,C.value)){(w.value==="date"&&!n(M,C.value)||w.value==="month"&&!t(M,C.value))&&I(M,x.value);const D=m(M);l("update:value",D),l("change",D)}},T=M=>{P(M),I(C.value,M)},A=(M,D)=>{_(M),l("select",m(M),{source:D})},R=E(()=>{const{locale:M}=c,D=y(y({},Ed),M);return D.lang=y(y({},D.lang),(M||{}).lang),D}),[H]=wr("Calendar",R);return()=>{const M=e.getNow(),{dateFullCellRender:D=s==null?void 0:s.dateFullCellRender,dateCellRender:N=s==null?void 0:s.dateCellRender,monthFullCellRender:L=s==null?void 0:s.monthFullCellRender,monthCellRender:F=s==null?void 0:s.monthCellRender,headerRender:B=s==null?void 0:s.headerRender,fullscreen:j=!0,validRange:z}=c,G=Y=>{let{current:oe}=Y;return D?D({current:oe}):g("div",{class:ge(`${d.value}-cell-inner`,`${h.value}-date`,{[`${h.value}-date-today`]:o(M,oe)})},[g("div",{class:`${h.value}-date-value`},[String(e.getDate(oe)).padStart(2,"0")]),g("div",{class:`${h.value}-date-content`},[N&&N({current:oe})])])},Q=(Y,oe)=>{let{current:Z}=Y;if(L)return L({current:Z});const re=oe.shortMonths||e.locale.getShortMonths(oe.locale);return g("div",{class:ge(`${d.value}-cell-inner`,`${h.value}-date`,{[`${h.value}-date-today`]:n(M,Z)})},[g("div",{class:`${h.value}-date-value`},[re[e.getMonth(Z)]]),g("div",{class:`${h.value}-date-content`},[F&&F({current:Z})])])};return p(g("div",k(k({},u),{},{class:ge(h.value,{[`${h.value}-full`]:j,[`${h.value}-mini`]:!j,[`${h.value}-rtl`]:f.value==="rtl"},u.class,v.value)}),[B?B({value:C.value,type:x.value,onChange:Y=>{A(Y,"customize")},onTypeChange:T}):g(mte,{prefixCls:h.value,value:C.value,generateConfig:e,mode:x.value,fullscreen:j,locale:H.value.lang,validRange:z,onChange:A,onModeChange:T},null),g(px,{value:C.value,prefixCls:d.value,locale:H.value.lang,generateConfig:e,dateRender:G,monthCellRender:Y=>Q(Y,H.value.lang),onSelect:Y=>{A(Y,w.value)},mode:w.value,picker:w.value,disabledDate:O.value,hideHeader:!0},null)]))}}});return r.install=function(i){return i.component(r.name,r),i},r}const _te=Ete(XC),Mte=Lt(_te);function Ate(e){const t=se(),n=se(!1);function o(){for(var r=arguments.length,i=new Array(r),a=0;a{e(...i)}))}return tt(()=>{n.value=!0,Ze.cancel(t.value)}),o}function Rte(e){const t=se([]),n=se(typeof e=="function"?e():e),o=Ate(()=>{let i=n.value;t.value.forEach(a=>{i=a(i)}),t.value=[],n.value=i});function r(i){t.value.push(i),o()}return[n,r]}const Dte=le({compatConfig:{MODE:3},name:"TabNode",props:{id:{type:String},prefixCls:{type:String},tab:{type:Object},active:{type:Boolean},closable:{type:Boolean},editable:{type:Object},onClick:{type:Function},onResize:{type:Function},renderWrapper:{type:Function},removeAriaLabel:{type:String},onFocus:{type:Function}},emits:["click","resize","remove","focus"],setup(e,t){let{expose:n,attrs:o}=t;const r=ae();function i(s){var u;!((u=e.tab)===null||u===void 0)&&u.disabled||e.onClick(s)}n({domRef:r});function a(s){var u;s.preventDefault(),s.stopPropagation(),e.editable.onEdit("remove",{key:(u=e.tab)===null||u===void 0?void 0:u.key,event:s})}const l=E(()=>{var s;return e.editable&&e.closable!==!1&&!(!((s=e.tab)===null||s===void 0)&&s.disabled)});return()=>{var s;const{prefixCls:u,id:c,active:d,tab:{key:f,tab:p,disabled:v,closeIcon:h},renderWrapper:m,removeAriaLabel:b,editable:S,onFocus:C}=e,$=`${u}-tab`,x=g("div",{key:f,ref:r,class:ge($,{[`${$}-with-remove`]:l.value,[`${$}-active`]:d,[`${$}-disabled`]:v}),style:o.style,onClick:i},[g("div",{role:"tab","aria-selected":d,id:c&&`${c}-tab-${f}`,class:`${$}-btn`,"aria-controls":c&&`${c}-panel-${f}`,"aria-disabled":v,tabindex:v?null:0,onClick:P=>{P.stopPropagation(),i(P)},onKeydown:P=>{[Ie.SPACE,Ie.ENTER].includes(P.which)&&(P.preventDefault(),i(P))},onFocus:C},[typeof p=="function"?p():p]),l.value&&g("button",{type:"button","aria-label":b||"remove",tabindex:0,class:`${$}-remove`,onClick:P=>{P.stopPropagation(),a(P)}},[(h==null?void 0:h())||((s=S.removeIcon)===null||s===void 0?void 0:s.call(S))||"×"])]);return m?m(x):x}}}),lI={width:0,height:0,left:0,top:0};function Nte(e,t){const n=ae(new Map);return Ve(()=>{var o,r;const i=new Map,a=e.value,l=t.value.get((o=a[0])===null||o===void 0?void 0:o.key)||lI,s=l.left+l.width;for(let u=0;u{const{prefixCls:i,editable:a,locale:l}=e;return!a||a.showAdd===!1?null:g("button",{ref:r,type:"button",class:`${i}-nav-add`,style:o.style,"aria-label":(l==null?void 0:l.addAriaLabel)||"Add tab",onClick:s=>{a.onEdit("add",{event:s})}},[a.addIcon?a.addIcon():"+"])}}}),kte={prefixCls:{type:String},id:{type:String},tabs:{type:Object},rtl:{type:Boolean},tabBarGutter:{type:Number},activeKey:{type:[String,Number]},mobile:{type:Boolean},moreIcon:K.any,moreTransitionName:{type:String},editable:{type:Object},locale:{type:Object,default:void 0},removeAriaLabel:String,onTabClick:{type:Function},popupClassName:String,getPopupContainer:ye()},Lte=le({compatConfig:{MODE:3},name:"OperationNode",inheritAttrs:!1,props:kte,emits:["tabClick"],slots:Object,setup(e,t){let{attrs:n,slots:o}=t;const[r,i]=$t(!1),[a,l]=$t(null),s=p=>{const v=e.tabs.filter(b=>!b.disabled);let h=v.findIndex(b=>b.key===a.value)||0;const m=v.length;for(let b=0;b{const{which:v}=p;if(!r.value){[Ie.DOWN,Ie.SPACE,Ie.ENTER].includes(v)&&(i(!0),p.preventDefault());return}switch(v){case Ie.UP:s(-1),p.preventDefault();break;case Ie.DOWN:s(1),p.preventDefault();break;case Ie.ESC:i(!1);break;case Ie.SPACE:case Ie.ENTER:a.value!==null&&e.onTabClick(a.value,p);break}},c=E(()=>`${e.id}-more-popup`),d=E(()=>a.value!==null?`${c.value}-${a.value}`:null),f=(p,v)=>{p.preventDefault(),p.stopPropagation(),e.editable.onEdit("remove",{key:v,event:p})};return Ke(()=>{be(a,()=>{const p=document.getElementById(d.value);p&&p.scrollIntoView&&p.scrollIntoView(!1)},{flush:"post",immediate:!0})}),be(r,()=>{r.value||l(null)}),VC({}),()=>{var p;const{prefixCls:v,id:h,tabs:m,locale:b,mobile:S,moreIcon:C=((p=o.moreIcon)===null||p===void 0?void 0:p.call(o))||g(yf,null,null),moreTransitionName:$,editable:x,tabBarGutter:P,rtl:w,onTabClick:O,popupClassName:I}=e;if(!m.length)return null;const _=`${v}-dropdown`,T=b==null?void 0:b.dropdownAriaLabel,A={[w?"marginRight":"marginLeft"]:P};m.length||(A.visibility="hidden",A.order=1);const R=ge({[`${_}-rtl`]:w,[`${I}`]:!0}),H=S?null:g(xA,{prefixCls:_,trigger:["hover"],visible:r.value,transitionName:$,onVisibleChange:i,overlayClassName:R,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:e.getPopupContainer},{overlay:()=>g(on,{onClick:M=>{let{key:D,domEvent:N}=M;O(D,N),i(!1)},id:c.value,tabindex:-1,role:"listbox","aria-activedescendant":d.value,selectedKeys:[a.value],"aria-label":T!==void 0?T:"expanded dropdown"},{default:()=>[m.map(M=>{var D,N;const L=x&&M.closable!==!1&&!M.disabled;return g(ui,{key:M.key,id:`${c.value}-${M.key}`,role:"option","aria-controls":h&&`${h}-panel-${M.key}`,disabled:M.disabled},{default:()=>[g("span",null,[typeof M.tab=="function"?M.tab():M.tab]),L&&g("button",{type:"button","aria-label":e.removeAriaLabel||"remove",tabindex:0,class:`${_}-menu-item-remove`,onClick:F=>{F.stopPropagation(),f(F,M.key)}},[((D=M.closeIcon)===null||D===void 0?void 0:D.call(M))||((N=x.removeIcon)===null||N===void 0?void 0:N.call(x))||"×"])]})})]}),default:()=>g("button",{type:"button",class:`${v}-nav-more`,style:A,tabindex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":c.value,id:`${h}-more`,"aria-expanded":r.value,onKeydown:u},[C])});return g("div",{class:ge(`${v}-nav-operations`,n.class),style:n.style},[H,g(A5,{prefixCls:v,locale:b,editable:x},null)])}}}),R5=Symbol("tabsContextKey"),Fte=e=>{Xe(R5,e)},D5=()=>ze(R5,{tabs:ae([]),prefixCls:ae()}),Bte=.1,sI=.01,Xp=20,cI=Math.pow(.995,Xp);function Hte(e,t){const[n,o]=$t(),[r,i]=$t(0),[a,l]=$t(0),[s,u]=$t(),c=ae();function d(x){const{screenX:P,screenY:w}=x.touches[0];o({x:P,y:w}),clearInterval(c.value)}function f(x){if(!n.value)return;x.preventDefault();const{screenX:P,screenY:w}=x.touches[0],O=P-n.value.x,I=w-n.value.y;t(O,I),o({x:P,y:w});const _=Date.now();l(_-r.value),i(_),u({x:O,y:I})}function p(){if(!n.value)return;const x=s.value;if(o(null),u(null),x){const P=x.x/a.value,w=x.y/a.value,O=Math.abs(P),I=Math.abs(w);if(Math.max(O,I){if(Math.abs(_)_?(O=P,v.value="x"):(O=w,v.value="y"),t(-O,-O)&&x.preventDefault()}const m=ae({onTouchStart:d,onTouchMove:f,onTouchEnd:p,onWheel:h});function b(x){m.value.onTouchStart(x)}function S(x){m.value.onTouchMove(x)}function C(x){m.value.onTouchEnd(x)}function $(x){m.value.onWheel(x)}Ke(()=>{var x,P;document.addEventListener("touchmove",S,{passive:!1}),document.addEventListener("touchend",C,{passive:!1}),(x=e.value)===null||x===void 0||x.addEventListener("touchstart",b,{passive:!1}),(P=e.value)===null||P===void 0||P.addEventListener("wheel",$,{passive:!1})}),tt(()=>{document.removeEventListener("touchmove",S),document.removeEventListener("touchend",C)})}function uI(e,t){const n=ae(e);function o(r){const i=typeof r=="function"?r(n.value):r;i!==n.value&&t(i,n.value),n.value=i}return[n,o]}const Sx=()=>{const e=ae(new Map),t=n=>o=>{e.value.set(n,o)};return cv(()=>{e.value=new Map}),[t,e]},dI={width:0,height:0,left:0,top:0,right:0},zte=()=>({id:{type:String},tabPosition:{type:String},activeKey:{type:[String,Number]},rtl:{type:Boolean},animated:De(),editable:De(),moreIcon:K.any,moreTransitionName:{type:String},mobile:{type:Boolean},tabBarGutter:{type:Number},renderTabBar:{type:Function},locale:De(),popupClassName:String,getPopupContainer:ye(),onTabClick:{type:Function},onTabScroll:{type:Function}}),jte=(e,t)=>{const{offsetWidth:n,offsetHeight:o,offsetTop:r,offsetLeft:i}=e,{width:a,height:l,x:s,y:u}=e.getBoundingClientRect();return Math.abs(a-n)<1?[a,l,s-t.x,u-t.y]:[n,o,i,r]},fI=le({compatConfig:{MODE:3},name:"TabNavList",inheritAttrs:!1,props:zte(),slots:Object,emits:["tabClick","tabScroll"],setup(e,t){let{attrs:n,slots:o}=t;const{tabs:r,prefixCls:i}=D5(),a=se(),l=se(),s=se(),u=se(),[c,d]=Sx(),f=E(()=>e.tabPosition==="top"||e.tabPosition==="bottom"),[p,v]=uI(0,(ve,he)=>{f.value&&e.onTabScroll&&e.onTabScroll({direction:ve>he?"left":"right"})}),[h,m]=uI(0,(ve,he)=>{!f.value&&e.onTabScroll&&e.onTabScroll({direction:ve>he?"top":"bottom"})}),[b,S]=$t(0),[C,$]=$t(0),[x,P]=$t(null),[w,O]=$t(null),[I,_]=$t(0),[T,A]=$t(0),[R,H]=Rte(new Map),M=Nte(r,R),D=E(()=>`${i.value}-nav-operations-hidden`),N=se(0),L=se(0);Ve(()=>{f.value?e.rtl?(N.value=0,L.value=Math.max(0,b.value-x.value)):(N.value=Math.min(0,x.value-b.value),L.value=0):(N.value=Math.min(0,w.value-C.value),L.value=0)});const F=ve=>veL.value?L.value:ve,B=se(),[j,z]=$t(),G=()=>{z(Date.now())},Q=()=>{clearTimeout(B.value)},Y=(ve,he)=>{ve(V=>F(V+he))};Hte(a,(ve,he)=>{if(f.value){if(x.value>=b.value)return!1;Y(v,ve)}else{if(w.value>=C.value)return!1;Y(m,he)}return Q(),G(),!0}),be(j,()=>{Q(),j.value&&(B.value=setTimeout(()=>{z(0)},100))});const oe=function(){let ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activeKey;const he=M.value.get(ve)||{width:0,height:0,left:0,right:0,top:0};if(f.value){let V=p.value;e.rtl?he.rightp.value+x.value&&(V=he.right+he.width-x.value):he.left<-p.value?V=-he.left:he.left+he.width>-p.value+x.value&&(V=-(he.left+he.width-x.value)),m(0),v(F(V))}else{let V=h.value;he.top<-h.value?V=-he.top:he.top+he.height>-h.value+w.value&&(V=-(he.top+he.height-w.value)),v(0),m(F(V))}},Z=se(0),re=se(0);Ve(()=>{let ve,he,V,q,ie,me;const Se=M.value;["top","bottom"].includes(e.tabPosition)?(ve="width",q=x.value,ie=b.value,me=I.value,he=e.rtl?"right":"left",V=Math.abs(p.value)):(ve="height",q=w.value,ie=b.value,me=T.value,he="top",V=-h.value);let ce=q;ie+me>q&&ieV+ce){xe=_e-1;break}}let Pe=0;for(let _e=ue-1;_e>=0;_e-=1)if((Se.get(ee[_e].key)||dI)[he]{H(()=>{var ve;const he=new Map,V=(ve=l.value)===null||ve===void 0?void 0:ve.getBoundingClientRect();return r.value.forEach(q=>{let{key:ie}=q;const me=d.value.get(ie),Se=(me==null?void 0:me.$el)||me;if(Se){const[ce,ee,ue,xe]=jte(Se,V);he.set(ie,{width:ce,height:ee,left:ue,top:xe})}}),he})};be(()=>r.value.map(ve=>ve.key).join("%%"),()=>{ne()},{flush:"post"});const X=()=>{var ve,he,V,q,ie;const me=((ve=a.value)===null||ve===void 0?void 0:ve.offsetWidth)||0,Se=((he=a.value)===null||he===void 0?void 0:he.offsetHeight)||0,ce=((V=u.value)===null||V===void 0?void 0:V.$el)||{},ee=ce.offsetWidth||0,ue=ce.offsetHeight||0;P(me),O(Se),_(ee),A(ue);const xe=(((q=l.value)===null||q===void 0?void 0:q.offsetWidth)||0)-ee,Pe=(((ie=l.value)===null||ie===void 0?void 0:ie.offsetHeight)||0)-ue;S(xe),$(Pe),ne()},te=E(()=>[...r.value.slice(0,Z.value),...r.value.slice(re.value+1)]),[W,U]=$t(),J=E(()=>M.value.get(e.activeKey)),de=se(),fe=()=>{Ze.cancel(de.value)};be([J,f,()=>e.rtl],()=>{const ve={};J.value&&(f.value?(e.rtl?ve.right=yl(J.value.right):ve.left=yl(J.value.left),ve.width=yl(J.value.width)):(ve.top=yl(J.value.top),ve.height=yl(J.value.height))),fe(),de.value=Ze(()=>{U(ve)})}),be([()=>e.activeKey,J,M,f],()=>{oe()},{flush:"post"}),be([()=>e.rtl,()=>e.tabBarGutter,()=>e.activeKey,()=>r.value],()=>{X()},{flush:"post"});const pe=ve=>{let{position:he,prefixCls:V,extra:q}=ve;if(!q)return null;const ie=q==null?void 0:q({position:he});return ie?g("div",{class:`${V}-extra-content`},[ie]):null};return tt(()=>{Q(),fe()}),()=>{const{id:ve,animated:he,activeKey:V,rtl:q,editable:ie,locale:me,tabPosition:Se,tabBarGutter:ce,onTabClick:ee}=e,{class:ue,style:xe}=n,Pe=i.value,_e=!!te.value.length,Ce=`${Pe}-nav-wrap`;let we,Oe,Me,Re;f.value?q?(Oe=p.value>0,we=p.value+x.value{const{key:ft}=lt;return g(Dte,{id:ve,prefixCls:Pe,key:ft,tab:lt,style:bt===0?void 0:Ae,closable:lt.closable,editable:ie,active:ft===V,removeAriaLabel:me==null?void 0:me.removeAriaLabel,ref:c(ft),onClick:yt=>{ee(ft,yt)},onFocus:()=>{oe(ft),G(),a.value&&(q||(a.value.scrollLeft=0),a.value.scrollTop=0)}},o)});return g("div",{role:"tablist",class:ge(`${Pe}-nav`,ue),style:xe,onKeydown:()=>{G()}},[g(pe,{position:"left",prefixCls:Pe,extra:o.leftExtra},null),g(br,{onResize:X},{default:()=>[g("div",{class:ge(Ce,{[`${Ce}-ping-left`]:we,[`${Ce}-ping-right`]:Oe,[`${Ce}-ping-top`]:Me,[`${Ce}-ping-bottom`]:Re}),ref:a},[g(br,{onResize:X},{default:()=>[g("div",{ref:l,class:`${Pe}-nav-list`,style:{transform:`translate(${p.value}px, ${h.value}px)`,transition:j.value?"none":void 0}},[Fe,g(A5,{ref:u,prefixCls:Pe,locale:me,editable:ie,style:y(y({},Fe.length===0?void 0:Ae),{visibility:_e?"hidden":null})},null),g("div",{class:ge(`${Pe}-ink-bar`,{[`${Pe}-ink-bar-animated`]:he.inkBar}),style:W.value},null)])]})])]}),g(Lte,k(k({},e),{},{removeAriaLabel:me==null?void 0:me.removeAriaLabel,ref:s,prefixCls:Pe,tabs:te.value,class:!_e&&D.value}),pA(o,["moreIcon"])),g(pe,{position:"right",prefixCls:Pe,extra:o.rightExtra},null),g(pe,{position:"right",prefixCls:Pe,extra:o.tabBarExtraContent},null)])}}}),Wte=le({compatConfig:{MODE:3},name:"TabPanelList",inheritAttrs:!1,props:{activeKey:{type:[String,Number]},id:{type:String},rtl:{type:Boolean},animated:{type:Object,default:void 0},tabPosition:{type:String},destroyInactiveTabPane:{type:Boolean}},setup(e){const{tabs:t,prefixCls:n}=D5();return()=>{const{id:o,activeKey:r,animated:i,tabPosition:a,rtl:l,destroyInactiveTabPane:s}=e,u=i.tabPane,c=n.value,d=t.value.findIndex(f=>f.key===r);return g("div",{class:`${c}-content-holder`},[g("div",{class:[`${c}-content`,`${c}-content-${a}`,{[`${c}-content-animated`]:u}],style:d&&u?{[l?"marginRight":"marginLeft"]:`-${d}00%`}:null},[t.value.map(f=>mt(f.node,{key:f.key,prefixCls:c,tabKey:f.key,id:o,animated:u,active:f.key===r,destroyInactiveTabPane:s}))])])}}});var Vte={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};function pI(e){for(var t=1;t{const{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[vi(e,"slide-up"),vi(e,"slide-down")]]},Gte=e=>{const{componentCls:t,tabsCardHorizontalPadding:n,tabsCardHeadBackground:o,tabsCardGutter:r,colorSplit:i}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:o,border:`${e.lineWidth}px ${e.lineType} ${i}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:e.colorPrimary,background:e.colorBgContainer},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:`${r}px`}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:`${r}px`}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${e.borderRadiusLG}px 0 0 ${e.borderRadiusLG}px`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},Xte=e=>{const{componentCls:t,tabsHoverColor:n,dropdownEdgeChildVerticalPadding:o}=e;return{[`${t}-dropdown`]:y(y({},qe(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${o}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":y(y({},cn),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${e.paddingXXS}px ${e.paddingSM}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},Yte=e=>{const{componentCls:t,margin:n,colorSplit:o}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:`0 0 ${n}px 0`,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${e.lineWidth}px ${e.lineType} ${o}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow}, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomRight`]:{animationName:zv},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topLeft, + &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topRight`]:{animationName:Vv},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomLeft, + &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomRight`]:{animationName:jv},[`${t}-panel > ${t}-time-panel`]:{paddingTop:A},[`${t}-ranges`]:{marginBottom:0,padding:`${A}px ${R}px`,overflow:"hidden",lineHeight:`${H-2*s-$/2}px`,textAlign:"start",listStyle:"none",display:"flex",justifyContent:"space-between","> li":{display:"inline-block"},[`${t}-preset > ${n}-tag-blue`]:{color:I,background:M,borderColor:D,cursor:"pointer"},[`${t}-ok`]:{marginInlineStart:"auto"}},[`${t}-range-wrapper`]:{display:"flex",position:"relative"},[`${t}-range-arrow`]:y({position:"absolute",zIndex:1,display:"none",marginInlineStart:a*1.5,transition:`left ${_} ease-out`},zS(N,L,F,B,o)),[`${t}-panel-container`]:{overflow:"hidden",verticalAlign:"top",background:B,borderRadius:j,boxShadow:z,transition:`margin ${_}`,[`${t}-panel-layout`]:{display:"flex",flexWrap:"nowrap",alignItems:"stretch"},[`${t}-presets`]:{display:"flex",flexDirection:"column",minWidth:oe,maxWidth:Z,ul:{height:0,flex:"auto",listStyle:"none",overflow:"auto",margin:0,padding:$,borderInlineEnd:`${s}px ${u} ${Q}`,li:y(y({},cn),{borderRadius:G,paddingInline:$,paddingBlock:(S-Math.round(i*O))/2,cursor:"pointer",transition:`all ${_}`,"+ li":{marginTop:x},"&:hover":{background:Y}})}},[`${t}-panels`]:{display:"inline-flex",flexWrap:"nowrap",direction:"ltr",[`${t}-panel`]:{borderWidth:`0 0 ${s}px`},"&:last-child":{[`${t}-panel`]:{borderWidth:0}}},[`${t}-panel`]:{verticalAlign:"top",background:"transparent",borderRadius:0,borderWidth:0,[`${t}-content, + table`]:{textAlign:"center"},"&-focused":{borderColor:c}}}}),"&-dropdown-range":{padding:`${N*2/3}px 0`,"&-hidden":{display:"none"}},"&-rtl":{direction:"rtl",[`${t}-separator`]:{transform:"rotate(180deg)"},[`${t}-footer`]:{"&-extra":{direction:"rtl"}}}})},vi(e,"slide-up"),vi(e,"slide-down"),Ic(e,"move-up"),Ic(e,"move-down")]},_5=e=>{const{componentCls:n,controlHeightLG:o,controlHeightSM:r,colorPrimary:i,paddingXXS:a}=e;return{pickerCellCls:`${n}-cell`,pickerCellInnerCls:`${n}-cell-inner`,pickerTextHeight:o,pickerPanelCellWidth:r*1.5,pickerPanelCellHeight:r,pickerDateHoverRangeBorderColor:new St(i).lighten(20).toHexString(),pickerBasicCellHoverWithRangeColor:new St(i).lighten(35).toHexString(),pickerPanelWithoutTimeCellHeight:o*1.65,pickerYearMonthCellWidth:o*1.5,pickerTimePanelColumnHeight:28*8,pickerTimePanelColumnWidth:o*1.4,pickerTimePanelCellHeight:28,pickerQuarterPanelContentHeight:o*1.4,pickerCellPaddingVertical:a,pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconBorderWidth:1.5}},M5=Ue("DatePicker",e=>{const t=Be(ps(e),_5(e));return[Ote(t),Pte(t),tu(e,{focusElCls:`${e.componentCls}-focused`})]},e=>({presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50})),Ite=e=>{const{calendarCls:t,componentCls:n,calendarFullBg:o,calendarFullPanelBg:r,calendarItemActiveBg:i}=e;return{[t]:y(y(y({},E5(e)),qe(e)),{background:o,"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",justifyContent:"flex-end",padding:`${e.paddingSM}px 0`,[`${t}-year-select`]:{minWidth:e.yearControlWidth},[`${t}-month-select`]:{minWidth:e.monthControlWidth,marginInlineStart:e.marginXS},[`${t}-mode-switch`]:{marginInlineStart:e.marginXS}}}),[`${t} ${n}-panel`]:{background:r,border:0,borderTop:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,borderRadius:0,[`${n}-month-panel, ${n}-date-panel`]:{width:"auto"},[`${n}-body`]:{padding:`${e.paddingXS}px 0`},[`${n}-content`]:{width:"100%"}},[`${t}-mini`]:{borderRadius:e.borderRadiusLG,[`${t}-header`]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS},[`${n}-panel`]:{borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},[`${n}-content`]:{height:e.miniContentHeight,th:{height:"auto",padding:0,lineHeight:`${e.weekHeight}px`}},[`${n}-cell::before`]:{pointerEvents:"none"}},[`${t}${t}-full`]:{[`${n}-panel`]:{display:"block",width:"100%",textAlign:"end",background:o,border:0,[`${n}-body`]:{"th, td":{padding:0},th:{height:"auto",paddingInlineEnd:e.paddingSM,paddingBottom:e.paddingXXS,lineHeight:`${e.weekHeight}px`}}},[`${n}-cell`]:{"&::before":{display:"none"},"&:hover":{[`${t}-date`]:{background:e.controlItemBgHover}},[`${t}-date-today::before`]:{display:"none"},[`&-in-view${n}-cell-selected`]:{[`${t}-date, ${t}-date-today`]:{background:i}},"&-selected, &-selected:hover":{[`${t}-date, ${t}-date-today`]:{[`${t}-date-value`]:{color:e.colorPrimary}}}},[`${t}-date`]:{display:"block",width:"auto",height:"auto",margin:`0 ${e.marginXS/2}px`,padding:`${e.paddingXS/2}px ${e.paddingXS}px 0`,border:0,borderTop:`${e.lineWidthBold}px ${e.lineType} ${e.colorSplit}`,borderRadius:0,transition:`background ${e.motionDurationSlow}`,"&-value":{lineHeight:`${e.dateValueHeight}px`,transition:`color ${e.motionDurationSlow}`},"&-content":{position:"static",width:"auto",height:e.dateContentHeight,overflowY:"auto",color:e.colorText,lineHeight:e.lineHeight,textAlign:"start"},"&-today":{borderColor:e.colorPrimary,[`${t}-date-value`]:{color:e.colorText}}}},[`@media only screen and (max-width: ${e.screenXS}px) `]:{[`${t}`]:{[`${t}-header`]:{display:"block",[`${t}-year-select`]:{width:"50%"},[`${t}-month-select`]:{width:`calc(50% - ${e.paddingXS}px)`},[`${t}-mode-switch`]:{width:"100%",marginTop:e.marginXS,marginInlineStart:0,"> label":{width:"50%",textAlign:"center"}}}}}}},Tte=Ue("Calendar",e=>{const t=`${e.componentCls}-calendar`,n=Be(ps(e),_5(e),{calendarCls:t,pickerCellInnerCls:`${e.componentCls}-cell-inner`,calendarFullBg:e.colorBgContainer,calendarFullPanelBg:e.colorBgContainer,calendarItemActiveBg:e.controlItemBgActive,dateValueHeight:e.controlHeightSM,weekHeight:e.controlHeightSM*.75,dateContentHeight:(e.fontSizeSM*e.lineHeightSM+e.marginXS)*3+e.lineWidth*2});return[Ite(n)]},{yearControlWidth:80,monthControlWidth:70,miniContentHeight:256});function Ete(e){function t(i,a){return i&&a&&e.getYear(i)===e.getYear(a)}function n(i,a){return t(i,a)&&e.getMonth(i)===e.getMonth(a)}function o(i,a){return n(i,a)&&e.getDate(i)===e.getDate(a)}const r=le({name:"ACalendar",inheritAttrs:!1,props:{prefixCls:String,locale:{type:Object,default:void 0},validRange:{type:Array,default:void 0},disabledDate:{type:Function,default:void 0},dateFullCellRender:{type:Function,default:void 0},dateCellRender:{type:Function,default:void 0},monthFullCellRender:{type:Function,default:void 0},monthCellRender:{type:Function,default:void 0},headerRender:{type:Function,default:void 0},value:{type:[Object,String],default:void 0},defaultValue:{type:[Object,String],default:void 0},mode:{type:String,default:void 0},fullscreen:{type:Boolean,default:void 0},onChange:{type:Function,default:void 0},"onUpdate:value":{type:Function,default:void 0},onPanelChange:{type:Function,default:void 0},onSelect:{type:Function,default:void 0},valueFormat:{type:String,default:void 0}},slots:Object,setup(i,a){let{emit:l,slots:s,attrs:u}=a;const c=i,{prefixCls:d,direction:f}=Te("picker",c),[p,v]=Tte(d),h=E(()=>`${d.value}-calendar`),m=M=>c.valueFormat?e.toString(M,c.valueFormat):M,b=E(()=>c.value?c.valueFormat?e.toDate(c.value,c.valueFormat):c.value:c.value===""?void 0:c.value),S=E(()=>c.defaultValue?c.valueFormat?e.toDate(c.defaultValue,c.valueFormat):c.defaultValue:c.defaultValue===""?void 0:c.defaultValue),[C,$]=Dt(()=>b.value||e.getNow(),{defaultValue:S.value,value:b}),[x,P]=Dt("month",{value:We(c,"mode")}),w=E(()=>x.value==="year"?"month":"date"),O=E(()=>M=>{var D;return(c.validRange?e.isAfter(c.validRange[0],M)||e.isAfter(M,c.validRange[1]):!1)||!!(!((D=c.disabledDate)===null||D===void 0)&&D.call(c,M))}),I=(M,D)=>{l("panelChange",m(M),D)},_=M=>{if($(M),!o(M,C.value)){(w.value==="date"&&!n(M,C.value)||w.value==="month"&&!t(M,C.value))&&I(M,x.value);const D=m(M);l("update:value",D),l("change",D)}},T=M=>{P(M),I(C.value,M)},A=(M,D)=>{_(M),l("select",m(M),{source:D})},R=E(()=>{const{locale:M}=c,D=y(y({},Ed),M);return D.lang=y(y({},D.lang),(M||{}).lang),D}),[H]=wr("Calendar",R);return()=>{const M=e.getNow(),{dateFullCellRender:D=s==null?void 0:s.dateFullCellRender,dateCellRender:N=s==null?void 0:s.dateCellRender,monthFullCellRender:L=s==null?void 0:s.monthFullCellRender,monthCellRender:F=s==null?void 0:s.monthCellRender,headerRender:B=s==null?void 0:s.headerRender,fullscreen:j=!0,validRange:z}=c,G=Y=>{let{current:oe}=Y;return D?D({current:oe}):g("div",{class:ge(`${d.value}-cell-inner`,`${h.value}-date`,{[`${h.value}-date-today`]:o(M,oe)})},[g("div",{class:`${h.value}-date-value`},[String(e.getDate(oe)).padStart(2,"0")]),g("div",{class:`${h.value}-date-content`},[N&&N({current:oe})])])},Q=(Y,oe)=>{let{current:Z}=Y;if(L)return L({current:Z});const re=oe.shortMonths||e.locale.getShortMonths(oe.locale);return g("div",{class:ge(`${d.value}-cell-inner`,`${h.value}-date`,{[`${h.value}-date-today`]:n(M,Z)})},[g("div",{class:`${h.value}-date-value`},[re[e.getMonth(Z)]]),g("div",{class:`${h.value}-date-content`},[F&&F({current:Z})])])};return p(g("div",k(k({},u),{},{class:ge(h.value,{[`${h.value}-full`]:j,[`${h.value}-mini`]:!j,[`${h.value}-rtl`]:f.value==="rtl"},u.class,v.value)}),[B?B({value:C.value,type:x.value,onChange:Y=>{A(Y,"customize")},onTypeChange:T}):g(mte,{prefixCls:h.value,value:C.value,generateConfig:e,mode:x.value,fullscreen:j,locale:H.value.lang,validRange:z,onChange:A,onModeChange:T},null),g(px,{value:C.value,prefixCls:d.value,locale:H.value.lang,generateConfig:e,dateRender:G,monthCellRender:Y=>Q(Y,H.value.lang),onSelect:Y=>{A(Y,w.value)},mode:w.value,picker:w.value,disabledDate:O.value,hideHeader:!0},null)]))}}});return r.install=function(i){return i.component(r.name,r),i},r}const _te=Ete(XC),Mte=Lt(_te);function Ate(e){const t=se(),n=se(!1);function o(){for(var r=arguments.length,i=new Array(r),a=0;a{e(...i)}))}return tt(()=>{n.value=!0,Ze.cancel(t.value)}),o}function Rte(e){const t=se([]),n=se(typeof e=="function"?e():e),o=Ate(()=>{let i=n.value;t.value.forEach(a=>{i=a(i)}),t.value=[],n.value=i});function r(i){t.value.push(i),o()}return[n,r]}const Dte=le({compatConfig:{MODE:3},name:"TabNode",props:{id:{type:String},prefixCls:{type:String},tab:{type:Object},active:{type:Boolean},closable:{type:Boolean},editable:{type:Object},onClick:{type:Function},onResize:{type:Function},renderWrapper:{type:Function},removeAriaLabel:{type:String},onFocus:{type:Function}},emits:["click","resize","remove","focus"],setup(e,t){let{expose:n,attrs:o}=t;const r=ae();function i(s){var u;!((u=e.tab)===null||u===void 0)&&u.disabled||e.onClick(s)}n({domRef:r});function a(s){var u;s.preventDefault(),s.stopPropagation(),e.editable.onEdit("remove",{key:(u=e.tab)===null||u===void 0?void 0:u.key,event:s})}const l=E(()=>{var s;return e.editable&&e.closable!==!1&&!(!((s=e.tab)===null||s===void 0)&&s.disabled)});return()=>{var s;const{prefixCls:u,id:c,active:d,tab:{key:f,tab:p,disabled:v,closeIcon:h},renderWrapper:m,removeAriaLabel:b,editable:S,onFocus:C}=e,$=`${u}-tab`,x=g("div",{key:f,ref:r,class:ge($,{[`${$}-with-remove`]:l.value,[`${$}-active`]:d,[`${$}-disabled`]:v}),style:o.style,onClick:i},[g("div",{role:"tab","aria-selected":d,id:c&&`${c}-tab-${f}`,class:`${$}-btn`,"aria-controls":c&&`${c}-panel-${f}`,"aria-disabled":v,tabindex:v?null:0,onClick:P=>{P.stopPropagation(),i(P)},onKeydown:P=>{[Ie.SPACE,Ie.ENTER].includes(P.which)&&(P.preventDefault(),i(P))},onFocus:C},[typeof p=="function"?p():p]),l.value&&g("button",{type:"button","aria-label":b||"remove",tabindex:0,class:`${$}-remove`,onClick:P=>{P.stopPropagation(),a(P)}},[(h==null?void 0:h())||((s=S.removeIcon)===null||s===void 0?void 0:s.call(S))||"×"])]);return m?m(x):x}}}),lI={width:0,height:0,left:0,top:0};function Nte(e,t){const n=ae(new Map);return Ve(()=>{var o,r;const i=new Map,a=e.value,l=t.value.get((o=a[0])===null||o===void 0?void 0:o.key)||lI,s=l.left+l.width;for(let u=0;u{const{prefixCls:i,editable:a,locale:l}=e;return!a||a.showAdd===!1?null:g("button",{ref:r,type:"button",class:`${i}-nav-add`,style:o.style,"aria-label":(l==null?void 0:l.addAriaLabel)||"Add tab",onClick:s=>{a.onEdit("add",{event:s})}},[a.addIcon?a.addIcon():"+"])}}}),kte={prefixCls:{type:String},id:{type:String},tabs:{type:Object},rtl:{type:Boolean},tabBarGutter:{type:Number},activeKey:{type:[String,Number]},mobile:{type:Boolean},moreIcon:K.any,moreTransitionName:{type:String},editable:{type:Object},locale:{type:Object,default:void 0},removeAriaLabel:String,onTabClick:{type:Function},popupClassName:String,getPopupContainer:ye()},Lte=le({compatConfig:{MODE:3},name:"OperationNode",inheritAttrs:!1,props:kte,emits:["tabClick"],slots:Object,setup(e,t){let{attrs:n,slots:o}=t;const[r,i]=$t(!1),[a,l]=$t(null),s=p=>{const v=e.tabs.filter(b=>!b.disabled);let h=v.findIndex(b=>b.key===a.value)||0;const m=v.length;for(let b=0;b{const{which:v}=p;if(!r.value){[Ie.DOWN,Ie.SPACE,Ie.ENTER].includes(v)&&(i(!0),p.preventDefault());return}switch(v){case Ie.UP:s(-1),p.preventDefault();break;case Ie.DOWN:s(1),p.preventDefault();break;case Ie.ESC:i(!1);break;case Ie.SPACE:case Ie.ENTER:a.value!==null&&e.onTabClick(a.value,p);break}},c=E(()=>`${e.id}-more-popup`),d=E(()=>a.value!==null?`${c.value}-${a.value}`:null),f=(p,v)=>{p.preventDefault(),p.stopPropagation(),e.editable.onEdit("remove",{key:v,event:p})};return Ke(()=>{be(a,()=>{const p=document.getElementById(d.value);p&&p.scrollIntoView&&p.scrollIntoView(!1)},{flush:"post",immediate:!0})}),be(r,()=>{r.value||l(null)}),VC({}),()=>{var p;const{prefixCls:v,id:h,tabs:m,locale:b,mobile:S,moreIcon:C=((p=o.moreIcon)===null||p===void 0?void 0:p.call(o))||g(yf,null,null),moreTransitionName:$,editable:x,tabBarGutter:P,rtl:w,onTabClick:O,popupClassName:I}=e;if(!m.length)return null;const _=`${v}-dropdown`,T=b==null?void 0:b.dropdownAriaLabel,A={[w?"marginRight":"marginLeft"]:P};m.length||(A.visibility="hidden",A.order=1);const R=ge({[`${_}-rtl`]:w,[`${I}`]:!0}),H=S?null:g(x8,{prefixCls:_,trigger:["hover"],visible:r.value,transitionName:$,onVisibleChange:i,overlayClassName:R,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:e.getPopupContainer},{overlay:()=>g(on,{onClick:M=>{let{key:D,domEvent:N}=M;O(D,N),i(!1)},id:c.value,tabindex:-1,role:"listbox","aria-activedescendant":d.value,selectedKeys:[a.value],"aria-label":T!==void 0?T:"expanded dropdown"},{default:()=>[m.map(M=>{var D,N;const L=x&&M.closable!==!1&&!M.disabled;return g(ui,{key:M.key,id:`${c.value}-${M.key}`,role:"option","aria-controls":h&&`${h}-panel-${M.key}`,disabled:M.disabled},{default:()=>[g("span",null,[typeof M.tab=="function"?M.tab():M.tab]),L&&g("button",{type:"button","aria-label":e.removeAriaLabel||"remove",tabindex:0,class:`${_}-menu-item-remove`,onClick:F=>{F.stopPropagation(),f(F,M.key)}},[((D=M.closeIcon)===null||D===void 0?void 0:D.call(M))||((N=x.removeIcon)===null||N===void 0?void 0:N.call(x))||"×"])]})})]}),default:()=>g("button",{type:"button",class:`${v}-nav-more`,style:A,tabindex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":c.value,id:`${h}-more`,"aria-expanded":r.value,onKeydown:u},[C])});return g("div",{class:ge(`${v}-nav-operations`,n.class),style:n.style},[H,g(A5,{prefixCls:v,locale:b,editable:x},null)])}}}),R5=Symbol("tabsContextKey"),Fte=e=>{Xe(R5,e)},D5=()=>ze(R5,{tabs:ae([]),prefixCls:ae()}),Bte=.1,sI=.01,Gp=20,cI=Math.pow(.995,Gp);function Hte(e,t){const[n,o]=$t(),[r,i]=$t(0),[a,l]=$t(0),[s,u]=$t(),c=ae();function d(x){const{screenX:P,screenY:w}=x.touches[0];o({x:P,y:w}),clearInterval(c.value)}function f(x){if(!n.value)return;x.preventDefault();const{screenX:P,screenY:w}=x.touches[0],O=P-n.value.x,I=w-n.value.y;t(O,I),o({x:P,y:w});const _=Date.now();l(_-r.value),i(_),u({x:O,y:I})}function p(){if(!n.value)return;const x=s.value;if(o(null),u(null),x){const P=x.x/a.value,w=x.y/a.value,O=Math.abs(P),I=Math.abs(w);if(Math.max(O,I){if(Math.abs(_)_?(O=P,v.value="x"):(O=w,v.value="y"),t(-O,-O)&&x.preventDefault()}const m=ae({onTouchStart:d,onTouchMove:f,onTouchEnd:p,onWheel:h});function b(x){m.value.onTouchStart(x)}function S(x){m.value.onTouchMove(x)}function C(x){m.value.onTouchEnd(x)}function $(x){m.value.onWheel(x)}Ke(()=>{var x,P;document.addEventListener("touchmove",S,{passive:!1}),document.addEventListener("touchend",C,{passive:!1}),(x=e.value)===null||x===void 0||x.addEventListener("touchstart",b,{passive:!1}),(P=e.value)===null||P===void 0||P.addEventListener("wheel",$,{passive:!1})}),tt(()=>{document.removeEventListener("touchmove",S),document.removeEventListener("touchend",C)})}function uI(e,t){const n=ae(e);function o(r){const i=typeof r=="function"?r(n.value):r;i!==n.value&&t(i,n.value),n.value=i}return[n,o]}const Sx=()=>{const e=ae(new Map),t=n=>o=>{e.value.set(n,o)};return sv(()=>{e.value=new Map}),[t,e]},dI={width:0,height:0,left:0,top:0,right:0},zte=()=>({id:{type:String},tabPosition:{type:String},activeKey:{type:[String,Number]},rtl:{type:Boolean},animated:De(),editable:De(),moreIcon:K.any,moreTransitionName:{type:String},mobile:{type:Boolean},tabBarGutter:{type:Number},renderTabBar:{type:Function},locale:De(),popupClassName:String,getPopupContainer:ye(),onTabClick:{type:Function},onTabScroll:{type:Function}}),jte=(e,t)=>{const{offsetWidth:n,offsetHeight:o,offsetTop:r,offsetLeft:i}=e,{width:a,height:l,x:s,y:u}=e.getBoundingClientRect();return Math.abs(a-n)<1?[a,l,s-t.x,u-t.y]:[n,o,i,r]},fI=le({compatConfig:{MODE:3},name:"TabNavList",inheritAttrs:!1,props:zte(),slots:Object,emits:["tabClick","tabScroll"],setup(e,t){let{attrs:n,slots:o}=t;const{tabs:r,prefixCls:i}=D5(),a=se(),l=se(),s=se(),u=se(),[c,d]=Sx(),f=E(()=>e.tabPosition==="top"||e.tabPosition==="bottom"),[p,v]=uI(0,(ve,he)=>{f.value&&e.onTabScroll&&e.onTabScroll({direction:ve>he?"left":"right"})}),[h,m]=uI(0,(ve,he)=>{!f.value&&e.onTabScroll&&e.onTabScroll({direction:ve>he?"top":"bottom"})}),[b,S]=$t(0),[C,$]=$t(0),[x,P]=$t(null),[w,O]=$t(null),[I,_]=$t(0),[T,A]=$t(0),[R,H]=Rte(new Map),M=Nte(r,R),D=E(()=>`${i.value}-nav-operations-hidden`),N=se(0),L=se(0);Ve(()=>{f.value?e.rtl?(N.value=0,L.value=Math.max(0,b.value-x.value)):(N.value=Math.min(0,x.value-b.value),L.value=0):(N.value=Math.min(0,w.value-C.value),L.value=0)});const F=ve=>veL.value?L.value:ve,B=se(),[j,z]=$t(),G=()=>{z(Date.now())},Q=()=>{clearTimeout(B.value)},Y=(ve,he)=>{ve(V=>F(V+he))};Hte(a,(ve,he)=>{if(f.value){if(x.value>=b.value)return!1;Y(v,ve)}else{if(w.value>=C.value)return!1;Y(m,he)}return Q(),G(),!0}),be(j,()=>{Q(),j.value&&(B.value=setTimeout(()=>{z(0)},100))});const oe=function(){let ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activeKey;const he=M.value.get(ve)||{width:0,height:0,left:0,right:0,top:0};if(f.value){let V=p.value;e.rtl?he.rightp.value+x.value&&(V=he.right+he.width-x.value):he.left<-p.value?V=-he.left:he.left+he.width>-p.value+x.value&&(V=-(he.left+he.width-x.value)),m(0),v(F(V))}else{let V=h.value;he.top<-h.value?V=-he.top:he.top+he.height>-h.value+w.value&&(V=-(he.top+he.height-w.value)),v(0),m(F(V))}},Z=se(0),re=se(0);Ve(()=>{let ve,he,V,q,ie,me;const Se=M.value;["top","bottom"].includes(e.tabPosition)?(ve="width",q=x.value,ie=b.value,me=I.value,he=e.rtl?"right":"left",V=Math.abs(p.value)):(ve="height",q=w.value,ie=b.value,me=T.value,he="top",V=-h.value);let ce=q;ie+me>q&&ieV+ce){xe=_e-1;break}}let Pe=0;for(let _e=ue-1;_e>=0;_e-=1)if((Se.get(ee[_e].key)||dI)[he]{H(()=>{var ve;const he=new Map,V=(ve=l.value)===null||ve===void 0?void 0:ve.getBoundingClientRect();return r.value.forEach(q=>{let{key:ie}=q;const me=d.value.get(ie),Se=(me==null?void 0:me.$el)||me;if(Se){const[ce,ee,ue,xe]=jte(Se,V);he.set(ie,{width:ce,height:ee,left:ue,top:xe})}}),he})};be(()=>r.value.map(ve=>ve.key).join("%%"),()=>{ne()},{flush:"post"});const X=()=>{var ve,he,V,q,ie;const me=((ve=a.value)===null||ve===void 0?void 0:ve.offsetWidth)||0,Se=((he=a.value)===null||he===void 0?void 0:he.offsetHeight)||0,ce=((V=u.value)===null||V===void 0?void 0:V.$el)||{},ee=ce.offsetWidth||0,ue=ce.offsetHeight||0;P(me),O(Se),_(ee),A(ue);const xe=(((q=l.value)===null||q===void 0?void 0:q.offsetWidth)||0)-ee,Pe=(((ie=l.value)===null||ie===void 0?void 0:ie.offsetHeight)||0)-ue;S(xe),$(Pe),ne()},te=E(()=>[...r.value.slice(0,Z.value),...r.value.slice(re.value+1)]),[W,U]=$t(),J=E(()=>M.value.get(e.activeKey)),de=se(),fe=()=>{Ze.cancel(de.value)};be([J,f,()=>e.rtl],()=>{const ve={};J.value&&(f.value?(e.rtl?ve.right=yl(J.value.right):ve.left=yl(J.value.left),ve.width=yl(J.value.width)):(ve.top=yl(J.value.top),ve.height=yl(J.value.height))),fe(),de.value=Ze(()=>{U(ve)})}),be([()=>e.activeKey,J,M,f],()=>{oe()},{flush:"post"}),be([()=>e.rtl,()=>e.tabBarGutter,()=>e.activeKey,()=>r.value],()=>{X()},{flush:"post"});const pe=ve=>{let{position:he,prefixCls:V,extra:q}=ve;if(!q)return null;const ie=q==null?void 0:q({position:he});return ie?g("div",{class:`${V}-extra-content`},[ie]):null};return tt(()=>{Q(),fe()}),()=>{const{id:ve,animated:he,activeKey:V,rtl:q,editable:ie,locale:me,tabPosition:Se,tabBarGutter:ce,onTabClick:ee}=e,{class:ue,style:xe}=n,Pe=i.value,_e=!!te.value.length,Ce=`${Pe}-nav-wrap`;let we,Oe,Me,Re;f.value?q?(Oe=p.value>0,we=p.value+x.value{const{key:ft}=lt;return g(Dte,{id:ve,prefixCls:Pe,key:ft,tab:lt,style:bt===0?void 0:Ae,closable:lt.closable,editable:ie,active:ft===V,removeAriaLabel:me==null?void 0:me.removeAriaLabel,ref:c(ft),onClick:yt=>{ee(ft,yt)},onFocus:()=>{oe(ft),G(),a.value&&(q||(a.value.scrollLeft=0),a.value.scrollTop=0)}},o)});return g("div",{role:"tablist",class:ge(`${Pe}-nav`,ue),style:xe,onKeydown:()=>{G()}},[g(pe,{position:"left",prefixCls:Pe,extra:o.leftExtra},null),g(br,{onResize:X},{default:()=>[g("div",{class:ge(Ce,{[`${Ce}-ping-left`]:we,[`${Ce}-ping-right`]:Oe,[`${Ce}-ping-top`]:Me,[`${Ce}-ping-bottom`]:Re}),ref:a},[g(br,{onResize:X},{default:()=>[g("div",{ref:l,class:`${Pe}-nav-list`,style:{transform:`translate(${p.value}px, ${h.value}px)`,transition:j.value?"none":void 0}},[Fe,g(A5,{ref:u,prefixCls:Pe,locale:me,editable:ie,style:y(y({},Fe.length===0?void 0:Ae),{visibility:_e?"hidden":null})},null),g("div",{class:ge(`${Pe}-ink-bar`,{[`${Pe}-ink-bar-animated`]:he.inkBar}),style:W.value},null)])]})])]}),g(Lte,k(k({},e),{},{removeAriaLabel:me==null?void 0:me.removeAriaLabel,ref:s,prefixCls:Pe,tabs:te.value,class:!_e&&D.value}),p8(o,["moreIcon"])),g(pe,{position:"right",prefixCls:Pe,extra:o.rightExtra},null),g(pe,{position:"right",prefixCls:Pe,extra:o.tabBarExtraContent},null)])}}}),Wte=le({compatConfig:{MODE:3},name:"TabPanelList",inheritAttrs:!1,props:{activeKey:{type:[String,Number]},id:{type:String},rtl:{type:Boolean},animated:{type:Object,default:void 0},tabPosition:{type:String},destroyInactiveTabPane:{type:Boolean}},setup(e){const{tabs:t,prefixCls:n}=D5();return()=>{const{id:o,activeKey:r,animated:i,tabPosition:a,rtl:l,destroyInactiveTabPane:s}=e,u=i.tabPane,c=n.value,d=t.value.findIndex(f=>f.key===r);return g("div",{class:`${c}-content-holder`},[g("div",{class:[`${c}-content`,`${c}-content-${a}`,{[`${c}-content-animated`]:u}],style:d&&u?{[l?"marginRight":"marginLeft"]:`-${d}00%`}:null},[t.value.map(f=>mt(f.node,{key:f.key,prefixCls:c,tabKey:f.key,id:o,animated:u,active:f.key===r,destroyInactiveTabPane:s}))])])}}});var Vte={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};function pI(e){for(var t=1;t{const{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[vi(e,"slide-up"),vi(e,"slide-down")]]},Gte=e=>{const{componentCls:t,tabsCardHorizontalPadding:n,tabsCardHeadBackground:o,tabsCardGutter:r,colorSplit:i}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:o,border:`${e.lineWidth}px ${e.lineType} ${i}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:e.colorPrimary,background:e.colorBgContainer},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:`${r}px`}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:`${r}px`}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${e.borderRadiusLG}px 0 0 ${e.borderRadiusLG}px`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},Xte=e=>{const{componentCls:t,tabsHoverColor:n,dropdownEdgeChildVerticalPadding:o}=e;return{[`${t}-dropdown`]:y(y({},qe(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${o}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":y(y({},cn),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${e.paddingXXS}px ${e.paddingSM}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},Yte=e=>{const{componentCls:t,margin:n,colorSplit:o}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:`0 0 ${n}px 0`,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${e.lineWidth}px ${e.lineType} ${o}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow}, right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav, - > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:`${n}px`,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:e.controlHeight*1.25,[`${t}-tab`]:{padding:`${e.paddingXS}px ${e.paddingLG}px`,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:`${e.margin}px 0 0 0`},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${e.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-e.lineWidth},borderRight:{_skip_check_:!0,value:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},qte=e=>{const{componentCls:t,padding:n}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXS}px 0`,fontSize:e.fontSize}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${n}px 0`,fontSize:e.fontSizeLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXXS*1.5}px ${n}px`}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${e.borderRadius}px ${e.borderRadius}px`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${e.borderRadius}px ${e.borderRadius}px 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${e.borderRadius}px ${e.borderRadius}px 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${e.borderRadius}px 0 0 ${e.borderRadius}px`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXS}px ${n}px ${e.paddingXXS*1.5}px`}}}}}},Jte=e=>{const{componentCls:t,tabsActiveColor:n,tabsHoverColor:o,iconCls:r,tabsHorizontalGutter:i}=e,a=`${t}-tab`;return{[a]:{position:"relative",display:"inline-flex",alignItems:"center",padding:`${e.paddingSM}px 0`,fontSize:`${e.fontSize}px`,background:"transparent",border:0,outline:"none",cursor:"pointer","&-btn, &-remove":y({"&:focus:not(:focus-visible), &:active":{color:n}},Ji(e)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-e.marginXXS},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},"&:hover":{color:o},[`&${a}-active ${a}-btn`]:{color:e.colorPrimary,textShadow:e.tabsActiveTextShadow},[`&${a}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${a}-disabled ${a}-btn, &${a}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${a}-remove ${r}`]:{margin:0},[r]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${a} + ${a}`]:{margin:{_skip_check_:!0,value:`0 0 0 ${i}px`}}}},Zte=e=>{const{componentCls:t,tabsHorizontalGutter:n,iconCls:o,tabsCardGutter:r}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:`0 0 0 ${n}px`},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[o]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${e.marginSM}px`}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${e.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${e.marginXXS}px`},[o]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:`${r}px`},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},Qte=e=>{const{componentCls:t,tabsCardHorizontalPadding:n,tabsCardHeight:o,tabsCardGutter:r,tabsHoverColor:i,tabsActiveColor:a,colorSplit:l}=e;return{[t]:y(y(y(y({},qe(e)),{display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:y({minWidth:`${o}px`,marginLeft:{_skip_check_:!0,value:`${r}px`},padding:`0 ${e.paddingXS}px`,background:"transparent",border:`${e.lineWidth}px ${e.lineType} ${l}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:i},"&:active, &:focus:not(:focus-visible)":{color:a}},Ji(e))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.colorPrimary,pointerEvents:"none"}}),Jte(e)),{[`${t}-content`]:{position:"relative",display:"flex",width:"100%","&-animated":{transition:"margin 0.3s"}},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:{outline:"none",flex:"none",width:"100%"}}),[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}},ene=Ue("Tabs",e=>{const t=e.controlHeightLG,n=Be(e,{tabsHoverColor:e.colorPrimaryHover,tabsActiveColor:e.colorPrimaryActive,tabsCardHorizontalPadding:`${(t-Math.round(e.fontSize*e.lineHeight))/2-e.lineWidth}px ${e.padding}px`,tabsCardHeight:t,tabsCardGutter:e.marginXXS/2,tabsHorizontalGutter:32,tabsCardHeadBackground:e.colorFillAlter,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120});return[qte(n),Zte(n),Yte(n),Xte(n),Gte(n),Qte(n),Ute(n)]},e=>({zIndexPopup:e.zIndexPopupBase+50}));let gI=0;const N5=()=>({prefixCls:{type:String},id:{type:String},popupClassName:String,getPopupContainer:ye(),activeKey:{type:[String,Number]},defaultActiveKey:{type:[String,Number]},direction:Ne(),animated:He([Boolean,Object]),renderTabBar:ye(),tabBarGutter:{type:Number},tabBarStyle:De(),tabPosition:Ne(),destroyInactiveTabPane:$e(),hideAdd:Boolean,type:Ne(),size:Ne(),centered:Boolean,onEdit:ye(),onChange:ye(),onTabClick:ye(),onTabScroll:ye(),"onUpdate:activeKey":ye(),locale:De(),onPrevClick:ye(),onNextClick:ye(),tabBarExtraContent:K.any});function tne(e){return e.map(t=>{if(sn(t)){const n=y({},t.props||{});for(const[f,p]of Object.entries(n))delete n[f],n[Kc(f)]=p;const o=t.children||{},r=t.key!==void 0?t.key:void 0,{tab:i=o.tab,disabled:a,forceRender:l,closable:s,animated:u,active:c,destroyInactiveTabPane:d}=n;return y(y({key:r},n),{node:t,closeIcon:o.closeIcon,tab:i,disabled:a===""||a,forceRender:l===""||l,closable:s===""||s,animated:u===""||u,active:c===""||c,destroyInactiveTabPane:d===""||d})}return null}).filter(t=>t)}const nne=le({compatConfig:{MODE:3},name:"InternalTabs",inheritAttrs:!1,props:y(y({},Qe(N5(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}})),{tabs:pt()}),slots:Object,setup(e,t){let{attrs:n,slots:o}=t;Mt(e.onPrevClick===void 0&&e.onNextClick===void 0,"Tabs","`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."),Mt(e.tabBarExtraContent===void 0,"Tabs","`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."),Mt(o.tabBarExtraContent===void 0,"Tabs","`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");const{prefixCls:r,direction:i,size:a,rootPrefixCls:l,getPopupContainer:s}=Te("tabs",e),[u,c]=ene(r),d=E(()=>i.value==="rtl"),f=E(()=>{const{animated:w,tabPosition:O}=e;return w===!1||["left","right"].includes(O)?{inkBar:!1,tabPane:!1}:w===!0?{inkBar:!0,tabPane:!0}:y({inkBar:!0,tabPane:!1},typeof w=="object"?w:{})}),[p,v]=$t(!1);Ke(()=>{v(fC())});const[h,m]=Dt(()=>{var w;return(w=e.tabs[0])===null||w===void 0?void 0:w.key},{value:E(()=>e.activeKey),defaultValue:e.defaultActiveKey}),[b,S]=$t(()=>e.tabs.findIndex(w=>w.key===h.value));Ve(()=>{var w;let O=e.tabs.findIndex(I=>I.key===h.value);O===-1&&(O=Math.max(0,Math.min(b.value,e.tabs.length-1)),m((w=e.tabs[O])===null||w===void 0?void 0:w.key)),S(O)});const[C,$]=Dt(null,{value:E(()=>e.id)}),x=E(()=>p.value&&!["left","right"].includes(e.tabPosition)?"top":e.tabPosition);Ke(()=>{e.id||($(`rc-tabs-${gI}`),gI+=1)});const P=(w,O)=>{var I,_;(I=e.onTabClick)===null||I===void 0||I.call(e,w,O);const T=w!==h.value;m(w),T&&((_=e.onChange)===null||_===void 0||_.call(e,w))};return Fte({tabs:E(()=>e.tabs),prefixCls:r}),()=>{const{id:w,type:O,tabBarGutter:I,tabBarStyle:_,locale:T,destroyInactiveTabPane:A,renderTabBar:R=o.renderTabBar,onTabScroll:H,hideAdd:M,centered:D}=e,N={id:C.value,activeKey:h.value,animated:f.value,tabPosition:x.value,rtl:d.value,mobile:p.value};let L;O==="editable-card"&&(L={onEdit:(z,G)=>{let{key:Q,event:Y}=G;var oe;(oe=e.onEdit)===null||oe===void 0||oe.call(e,z==="add"?Y:Q,z)},removeIcon:()=>g(fo,null,null),addIcon:o.addIcon?o.addIcon:()=>g(Cx,null,null),showAdd:M!==!0});let F;const B=y(y({},N),{moreTransitionName:`${l.value}-slide-up`,editable:L,locale:T,tabBarGutter:I,onTabClick:P,onTabScroll:H,style:_,getPopupContainer:s.value,popupClassName:ge(e.popupClassName,c.value)});R?F=R(y(y({},B),{DefaultTabBar:fI})):F=g(fI,B,pA(o,["moreIcon","leftExtra","rightExtra","tabBarExtraContent"]));const j=r.value;return u(g("div",k(k({},n),{},{id:w,class:ge(j,`${j}-${x.value}`,{[c.value]:!0,[`${j}-${a.value}`]:a.value,[`${j}-card`]:["card","editable-card"].includes(O),[`${j}-editable-card`]:O==="editable-card",[`${j}-centered`]:D,[`${j}-mobile`]:p.value,[`${j}-editable`]:O==="editable-card",[`${j}-rtl`]:d.value},n.class)}),[F,g(Wte,k(k({destroyInactiveTabPane:A},N),{},{animated:f.value}),null)]))}}}),Dl=le({compatConfig:{MODE:3},name:"ATabs",inheritAttrs:!1,props:Qe(N5(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r}=t;const i=a=>{r("update:activeKey",a),r("change",a)};return()=>{var a;const l=tne(Ot((a=o.default)===null||a===void 0?void 0:a.call(o)));return g(nne,k(k(k({},it(e,["onUpdate:activeKey"])),n),{},{onChange:i,tabs:l}),o)}}}),one=()=>({tab:K.any,disabled:{type:Boolean},forceRender:{type:Boolean},closable:{type:Boolean},animated:{type:Boolean},active:{type:Boolean},destroyInactiveTabPane:{type:Boolean},prefixCls:{type:String},tabKey:{type:[String,Number]},id:{type:String}}),gh=le({compatConfig:{MODE:3},name:"ATabPane",inheritAttrs:!1,__ANT_TAB_PANE:!0,props:one(),slots:Object,setup(e,t){let{attrs:n,slots:o}=t;const r=ae(e.forceRender);be([()=>e.active,()=>e.destroyInactiveTabPane],()=>{e.active?r.value=!0:e.destroyInactiveTabPane&&(r.value=!1)},{immediate:!0});const i=E(()=>e.active?{}:e.animated?{visibility:"hidden",height:0,overflowY:"hidden"}:{display:"none"});return()=>{var a;const{prefixCls:l,forceRender:s,id:u,active:c,tabKey:d}=e;return g("div",{id:u&&`${u}-panel-${d}`,role:"tabpanel",tabindex:c?0:-1,"aria-labelledby":u&&`${u}-tab-${d}`,"aria-hidden":!c,style:[i.value,n.style],class:[`${l}-tabpane`,c&&`${l}-tabpane-active`,n.class]},[(c||r.value||s)&&((a=o.default)===null||a===void 0?void 0:a.call(o))])}}});Dl.TabPane=gh;Dl.install=function(e){return e.component(Dl.name,Dl),e.component(gh.name,gh),e};const rne=e=>{const{antCls:t,componentCls:n,cardHeadHeight:o,cardPaddingBase:r,cardHeadTabsMarginBottom:i}=e;return y(y({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:o,marginBottom:-1,padding:`0 ${r}px`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,background:"transparent",borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},Kr()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":y(y({display:"inline-block",flex:1},cn),{[` + > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:`${n}px`,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:e.controlHeight*1.25,[`${t}-tab`]:{padding:`${e.paddingXS}px ${e.paddingLG}px`,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:`${e.margin}px 0 0 0`},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${e.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-e.lineWidth},borderRight:{_skip_check_:!0,value:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},qte=e=>{const{componentCls:t,padding:n}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXS}px 0`,fontSize:e.fontSize}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${n}px 0`,fontSize:e.fontSizeLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXXS*1.5}px ${n}px`}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${e.borderRadius}px ${e.borderRadius}px`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${e.borderRadius}px ${e.borderRadius}px 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${e.borderRadius}px ${e.borderRadius}px 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${e.borderRadius}px 0 0 ${e.borderRadius}px`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXS}px ${n}px ${e.paddingXXS*1.5}px`}}}}}},Jte=e=>{const{componentCls:t,tabsActiveColor:n,tabsHoverColor:o,iconCls:r,tabsHorizontalGutter:i}=e,a=`${t}-tab`;return{[a]:{position:"relative",display:"inline-flex",alignItems:"center",padding:`${e.paddingSM}px 0`,fontSize:`${e.fontSize}px`,background:"transparent",border:0,outline:"none",cursor:"pointer","&-btn, &-remove":y({"&:focus:not(:focus-visible), &:active":{color:n}},Ji(e)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-e.marginXXS},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},"&:hover":{color:o},[`&${a}-active ${a}-btn`]:{color:e.colorPrimary,textShadow:e.tabsActiveTextShadow},[`&${a}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${a}-disabled ${a}-btn, &${a}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${a}-remove ${r}`]:{margin:0},[r]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${a} + ${a}`]:{margin:{_skip_check_:!0,value:`0 0 0 ${i}px`}}}},Zte=e=>{const{componentCls:t,tabsHorizontalGutter:n,iconCls:o,tabsCardGutter:r}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:`0 0 0 ${n}px`},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[o]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${e.marginSM}px`}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${e.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${e.marginXXS}px`},[o]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:`${r}px`},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},Qte=e=>{const{componentCls:t,tabsCardHorizontalPadding:n,tabsCardHeight:o,tabsCardGutter:r,tabsHoverColor:i,tabsActiveColor:a,colorSplit:l}=e;return{[t]:y(y(y(y({},qe(e)),{display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:y({minWidth:`${o}px`,marginLeft:{_skip_check_:!0,value:`${r}px`},padding:`0 ${e.paddingXS}px`,background:"transparent",border:`${e.lineWidth}px ${e.lineType} ${l}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:i},"&:active, &:focus:not(:focus-visible)":{color:a}},Ji(e))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.colorPrimary,pointerEvents:"none"}}),Jte(e)),{[`${t}-content`]:{position:"relative",display:"flex",width:"100%","&-animated":{transition:"margin 0.3s"}},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:{outline:"none",flex:"none",width:"100%"}}),[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}},ene=Ue("Tabs",e=>{const t=e.controlHeightLG,n=Be(e,{tabsHoverColor:e.colorPrimaryHover,tabsActiveColor:e.colorPrimaryActive,tabsCardHorizontalPadding:`${(t-Math.round(e.fontSize*e.lineHeight))/2-e.lineWidth}px ${e.padding}px`,tabsCardHeight:t,tabsCardGutter:e.marginXXS/2,tabsHorizontalGutter:32,tabsCardHeadBackground:e.colorFillAlter,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120});return[qte(n),Zte(n),Yte(n),Xte(n),Gte(n),Qte(n),Ute(n)]},e=>({zIndexPopup:e.zIndexPopupBase+50}));let gI=0;const N5=()=>({prefixCls:{type:String},id:{type:String},popupClassName:String,getPopupContainer:ye(),activeKey:{type:[String,Number]},defaultActiveKey:{type:[String,Number]},direction:Ne(),animated:He([Boolean,Object]),renderTabBar:ye(),tabBarGutter:{type:Number},tabBarStyle:De(),tabPosition:Ne(),destroyInactiveTabPane:$e(),hideAdd:Boolean,type:Ne(),size:Ne(),centered:Boolean,onEdit:ye(),onChange:ye(),onTabClick:ye(),onTabScroll:ye(),"onUpdate:activeKey":ye(),locale:De(),onPrevClick:ye(),onNextClick:ye(),tabBarExtraContent:K.any});function tne(e){return e.map(t=>{if(sn(t)){const n=y({},t.props||{});for(const[f,p]of Object.entries(n))delete n[f],n[Kc(f)]=p;const o=t.children||{},r=t.key!==void 0?t.key:void 0,{tab:i=o.tab,disabled:a,forceRender:l,closable:s,animated:u,active:c,destroyInactiveTabPane:d}=n;return y(y({key:r},n),{node:t,closeIcon:o.closeIcon,tab:i,disabled:a===""||a,forceRender:l===""||l,closable:s===""||s,animated:u===""||u,active:c===""||c,destroyInactiveTabPane:d===""||d})}return null}).filter(t=>t)}const nne=le({compatConfig:{MODE:3},name:"InternalTabs",inheritAttrs:!1,props:y(y({},Qe(N5(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}})),{tabs:pt()}),slots:Object,setup(e,t){let{attrs:n,slots:o}=t;Mt(e.onPrevClick===void 0&&e.onNextClick===void 0,"Tabs","`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."),Mt(e.tabBarExtraContent===void 0,"Tabs","`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."),Mt(o.tabBarExtraContent===void 0,"Tabs","`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");const{prefixCls:r,direction:i,size:a,rootPrefixCls:l,getPopupContainer:s}=Te("tabs",e),[u,c]=ene(r),d=E(()=>i.value==="rtl"),f=E(()=>{const{animated:w,tabPosition:O}=e;return w===!1||["left","right"].includes(O)?{inkBar:!1,tabPane:!1}:w===!0?{inkBar:!0,tabPane:!0}:y({inkBar:!0,tabPane:!1},typeof w=="object"?w:{})}),[p,v]=$t(!1);Ke(()=>{v(fC())});const[h,m]=Dt(()=>{var w;return(w=e.tabs[0])===null||w===void 0?void 0:w.key},{value:E(()=>e.activeKey),defaultValue:e.defaultActiveKey}),[b,S]=$t(()=>e.tabs.findIndex(w=>w.key===h.value));Ve(()=>{var w;let O=e.tabs.findIndex(I=>I.key===h.value);O===-1&&(O=Math.max(0,Math.min(b.value,e.tabs.length-1)),m((w=e.tabs[O])===null||w===void 0?void 0:w.key)),S(O)});const[C,$]=Dt(null,{value:E(()=>e.id)}),x=E(()=>p.value&&!["left","right"].includes(e.tabPosition)?"top":e.tabPosition);Ke(()=>{e.id||($(`rc-tabs-${gI}`),gI+=1)});const P=(w,O)=>{var I,_;(I=e.onTabClick)===null||I===void 0||I.call(e,w,O);const T=w!==h.value;m(w),T&&((_=e.onChange)===null||_===void 0||_.call(e,w))};return Fte({tabs:E(()=>e.tabs),prefixCls:r}),()=>{const{id:w,type:O,tabBarGutter:I,tabBarStyle:_,locale:T,destroyInactiveTabPane:A,renderTabBar:R=o.renderTabBar,onTabScroll:H,hideAdd:M,centered:D}=e,N={id:C.value,activeKey:h.value,animated:f.value,tabPosition:x.value,rtl:d.value,mobile:p.value};let L;O==="editable-card"&&(L={onEdit:(z,G)=>{let{key:Q,event:Y}=G;var oe;(oe=e.onEdit)===null||oe===void 0||oe.call(e,z==="add"?Y:Q,z)},removeIcon:()=>g(fo,null,null),addIcon:o.addIcon?o.addIcon:()=>g(Cx,null,null),showAdd:M!==!0});let F;const B=y(y({},N),{moreTransitionName:`${l.value}-slide-up`,editable:L,locale:T,tabBarGutter:I,onTabClick:P,onTabScroll:H,style:_,getPopupContainer:s.value,popupClassName:ge(e.popupClassName,c.value)});R?F=R(y(y({},B),{DefaultTabBar:fI})):F=g(fI,B,p8(o,["moreIcon","leftExtra","rightExtra","tabBarExtraContent"]));const j=r.value;return u(g("div",k(k({},n),{},{id:w,class:ge(j,`${j}-${x.value}`,{[c.value]:!0,[`${j}-${a.value}`]:a.value,[`${j}-card`]:["card","editable-card"].includes(O),[`${j}-editable-card`]:O==="editable-card",[`${j}-centered`]:D,[`${j}-mobile`]:p.value,[`${j}-editable`]:O==="editable-card",[`${j}-rtl`]:d.value},n.class)}),[F,g(Wte,k(k({destroyInactiveTabPane:A},N),{},{animated:f.value}),null)]))}}}),Dl=le({compatConfig:{MODE:3},name:"ATabs",inheritAttrs:!1,props:Qe(N5(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r}=t;const i=a=>{r("update:activeKey",a),r("change",a)};return()=>{var a;const l=tne(Ot((a=o.default)===null||a===void 0?void 0:a.call(o)));return g(nne,k(k(k({},it(e,["onUpdate:activeKey"])),n),{},{onChange:i,tabs:l}),o)}}}),one=()=>({tab:K.any,disabled:{type:Boolean},forceRender:{type:Boolean},closable:{type:Boolean},animated:{type:Boolean},active:{type:Boolean},destroyInactiveTabPane:{type:Boolean},prefixCls:{type:String},tabKey:{type:[String,Number]},id:{type:String}}),ph=le({compatConfig:{MODE:3},name:"ATabPane",inheritAttrs:!1,__ANT_TAB_PANE:!0,props:one(),slots:Object,setup(e,t){let{attrs:n,slots:o}=t;const r=ae(e.forceRender);be([()=>e.active,()=>e.destroyInactiveTabPane],()=>{e.active?r.value=!0:e.destroyInactiveTabPane&&(r.value=!1)},{immediate:!0});const i=E(()=>e.active?{}:e.animated?{visibility:"hidden",height:0,overflowY:"hidden"}:{display:"none"});return()=>{var a;const{prefixCls:l,forceRender:s,id:u,active:c,tabKey:d}=e;return g("div",{id:u&&`${u}-panel-${d}`,role:"tabpanel",tabindex:c?0:-1,"aria-labelledby":u&&`${u}-tab-${d}`,"aria-hidden":!c,style:[i.value,n.style],class:[`${l}-tabpane`,c&&`${l}-tabpane-active`,n.class]},[(c||r.value||s)&&((a=o.default)===null||a===void 0?void 0:a.call(o))])}}});Dl.TabPane=ph;Dl.install=function(e){return e.component(Dl.name,Dl),e.component(ph.name,ph),e};const rne=e=>{const{antCls:t,componentCls:n,cardHeadHeight:o,cardPaddingBase:r,cardHeadTabsMarginBottom:i}=e;return y(y({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:o,marginBottom:-1,padding:`0 ${r}px`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,background:"transparent",borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},Kr()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":y(y({display:"inline-block",flex:1},cn),{[` > ${n}-typography, > ${n}-typography-edit-content `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:i,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`}}})},ine=e=>{const{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:o,lineWidth:r}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` @@ -294,19 +294,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${r}px ${r}px 0 0 ${n}, ${r}px 0 0 0 ${n} inset, 0 ${r}px 0 0 ${n} inset; - `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:o}}},ane=e=>{const{componentCls:t,iconCls:n,cardActionsLiMargin:o,cardActionsIconSize:r,colorBorderSecondary:i}=e;return y(y({margin:0,padding:0,listStyle:"none",background:e.colorBgContainer,borderTop:`${e.lineWidth}px ${e.lineType} ${i}`,display:"flex",borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px `},Kr()),{"& > li":{margin:o,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.cardActionsIconSize*2,fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorTextDescription,lineHeight:`${e.fontSize*e.lineHeight}px`,transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:r,lineHeight:`${r*e.lineHeight}px`}},"&:not(:last-child)":{borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${i}`}}})},lne=e=>y(y({margin:`-${e.marginXXS}px 0`,display:"flex"},Kr()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":y({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},cn),"&-description":{color:e.colorTextDescription}}),sne=e=>{const{componentCls:t,cardPaddingBase:n,colorFillAlter:o}=e;return{[`${t}-head`]:{padding:`0 ${n}px`,background:o,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${e.padding}px ${n}px`}}},cne=e=>{const{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}},une=e=>{const{componentCls:t,cardShadow:n,cardHeadPadding:o,colorBorderSecondary:r,boxShadow:i,cardPaddingBase:a}=e;return{[t]:y(y({},qe(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:i},[`${t}-head`]:rne(e),[`${t}-extra`]:{marginInlineStart:"auto",color:"",fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:y({padding:a,borderRadius:` 0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},Kr()),[`${t}-grid`]:ine(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%"},img:{borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`}},[`${t}-actions`]:ane(e),[`${t}-meta`]:lne(e)}),[`${t}-bordered`]:{border:`${e.lineWidth}px ${e.lineType} ${r}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:-e.lineWidth,marginInlineStart:-e.lineWidth,padding:0}},[`${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:o}}},[`${t}-type-inner`]:sne(e),[`${t}-loading`]:cne(e),[`${t}-rtl`]:{direction:"rtl"}}},dne=e=>{const{componentCls:t,cardPaddingSM:n,cardHeadHeightSM:o}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:o,padding:`0 ${n}px`,fontSize:e.fontSize,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{minHeight:o,paddingTop:0,display:"flex",alignItems:"center"}}}}},fne=Ue("Card",e=>{const t=Be(e,{cardShadow:e.boxShadowCard,cardHeadHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,cardHeadHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardHeadTabsMarginBottom:-e.padding-e.lineWidth,cardActionsLiMargin:`${e.paddingSM}px 0`,cardActionsIconSize:e.fontSize,cardPaddingSM:12});return[une(t),dne(t)]}),pne=()=>({prefixCls:String,width:{type:[Number,String]}}),nm=le({compatConfig:{MODE:3},name:"SkeletonTitle",props:pne(),setup(e){return()=>{const{prefixCls:t,width:n}=e,o=typeof n=="number"?`${n}px`:n;return g("h3",{class:t,style:{width:o}},null)}}}),gne=()=>({prefixCls:String,width:{type:[Number,String,Array]},rows:Number}),hne=le({compatConfig:{MODE:3},name:"SkeletonParagraph",props:gne(),setup(e){const t=n=>{const{width:o,rows:r=2}=e;if(Array.isArray(o))return o[n];if(r-1===n)return o};return()=>{const{prefixCls:n,rows:o}=e,r=[...Array(o)].map((i,a)=>{const l=t(a);return g("li",{key:a,style:{width:typeof l=="number"?`${l}px`:l}},null)});return g("ul",{class:n},[r])}}}),om=()=>({prefixCls:String,size:[String,Number],shape:String,active:{type:Boolean,default:void 0}}),wf=e=>{const{prefixCls:t,size:n,shape:o}=e,r=ge({[`${t}-lg`]:n==="large",[`${t}-sm`]:n==="small"}),i=ge({[`${t}-circle`]:o==="circle",[`${t}-square`]:o==="square",[`${t}-round`]:o==="round"}),a=typeof n=="number"?{width:`${n}px`,height:`${n}px`,lineHeight:`${n}px`}:{};return g("span",{class:ge(t,r,i),style:a},null)};wf.displayName="SkeletonElement";const vne=new at("ant-skeleton-loading",{"0%":{transform:"translateX(-37.5%)"},"100%":{transform:"translateX(37.5%)"}}),rm=e=>({height:e,lineHeight:`${e}px`}),ic=e=>y({width:e},rm(e)),mne=e=>({position:"relative",zIndex:0,overflow:"hidden",background:"transparent","&::after":{position:"absolute",top:0,insetInlineEnd:"-150%",bottom:0,insetInlineStart:"-150%",background:e.skeletonLoadingBackground,animationName:vne,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite",content:'""'}}),B0=e=>y({width:e*5,minWidth:e*5},rm(e)),bne=e=>{const{skeletonAvatarCls:t,color:n,controlHeight:o,controlHeightLG:r,controlHeightSM:i}=e;return{[`${t}`]:y({display:"inline-block",verticalAlign:"top",background:n},ic(o)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:y({},ic(r)),[`${t}${t}-sm`]:y({},ic(i))}},yne=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:o,controlHeightLG:r,controlHeightSM:i,color:a}=e;return{[`${o}`]:y({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},B0(t)),[`${o}-lg`]:y({},B0(r)),[`${o}-sm`]:y({},B0(i))}},hI=e=>y({width:e},rm(e)),Sne=e=>{const{skeletonImageCls:t,imageSizeBase:n,color:o,borderRadiusSM:r}=e;return{[`${t}`]:y(y({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:o,borderRadius:r},hI(n*2)),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:y(y({},hI(n)),{maxWidth:n*4,maxHeight:n*4}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},H0=(e,t,n)=>{const{skeletonButtonCls:o}=e;return{[`${n}${o}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${o}-round`]:{borderRadius:t}}},z0=e=>y({width:e*2,minWidth:e*2},rm(e)),Cne=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:o,controlHeightLG:r,controlHeightSM:i,color:a}=e;return y(y(y(y(y({[`${n}`]:y({display:"inline-block",verticalAlign:"top",background:a,borderRadius:t,width:o*2,minWidth:o*2},z0(o))},H0(e,o,n)),{[`${n}-lg`]:y({},z0(r))}),H0(e,r,`${n}-lg`)),{[`${n}-sm`]:y({},z0(i))}),H0(e,i,`${n}-sm`))},xne=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:o,skeletonParagraphCls:r,skeletonButtonCls:i,skeletonInputCls:a,skeletonImageCls:l,controlHeight:s,controlHeightLG:u,controlHeightSM:c,color:d,padding:f,marginSM:p,borderRadius:v,skeletonTitleHeight:h,skeletonBlockRadius:m,skeletonParagraphLineHeight:b,controlHeightXS:S,skeletonParagraphMarginTop:C}=e;return{[`${t}`]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",[`${n}`]:y({display:"inline-block",verticalAlign:"top",background:d},ic(s)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:y({},ic(u)),[`${n}-sm`]:y({},ic(c))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${o}`]:{width:"100%",height:h,background:d,borderRadius:m,[`+ ${r}`]:{marginBlockStart:c}},[`${r}`]:{padding:0,"> li":{width:"100%",height:b,listStyle:"none",background:d,borderRadius:m,"+ li":{marginBlockStart:S}}},[`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${o}, ${r} > li`]:{borderRadius:v}}},[`${t}-with-avatar ${t}-content`]:{[`${o}`]:{marginBlockStart:p,[`+ ${r}`]:{marginBlockStart:C}}},[`${t}${t}-element`]:y(y(y(y({display:"inline-block",width:"auto"},Cne(e)),bne(e)),yne(e)),Sne(e)),[`${t}${t}-block`]:{width:"100%",[`${i}`]:{width:"100%"},[`${a}`]:{width:"100%"}},[`${t}${t}-active`]:{[` + `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:o}}},ane=e=>{const{componentCls:t,iconCls:n,cardActionsLiMargin:o,cardActionsIconSize:r,colorBorderSecondary:i}=e;return y(y({margin:0,padding:0,listStyle:"none",background:e.colorBgContainer,borderTop:`${e.lineWidth}px ${e.lineType} ${i}`,display:"flex",borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px `},Kr()),{"& > li":{margin:o,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.cardActionsIconSize*2,fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorTextDescription,lineHeight:`${e.fontSize*e.lineHeight}px`,transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:r,lineHeight:`${r*e.lineHeight}px`}},"&:not(:last-child)":{borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${i}`}}})},lne=e=>y(y({margin:`-${e.marginXXS}px 0`,display:"flex"},Kr()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":y({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},cn),"&-description":{color:e.colorTextDescription}}),sne=e=>{const{componentCls:t,cardPaddingBase:n,colorFillAlter:o}=e;return{[`${t}-head`]:{padding:`0 ${n}px`,background:o,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${e.padding}px ${n}px`}}},cne=e=>{const{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}},une=e=>{const{componentCls:t,cardShadow:n,cardHeadPadding:o,colorBorderSecondary:r,boxShadow:i,cardPaddingBase:a}=e;return{[t]:y(y({},qe(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:i},[`${t}-head`]:rne(e),[`${t}-extra`]:{marginInlineStart:"auto",color:"",fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:y({padding:a,borderRadius:` 0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},Kr()),[`${t}-grid`]:ine(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%"},img:{borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`}},[`${t}-actions`]:ane(e),[`${t}-meta`]:lne(e)}),[`${t}-bordered`]:{border:`${e.lineWidth}px ${e.lineType} ${r}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:-e.lineWidth,marginInlineStart:-e.lineWidth,padding:0}},[`${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:o}}},[`${t}-type-inner`]:sne(e),[`${t}-loading`]:cne(e),[`${t}-rtl`]:{direction:"rtl"}}},dne=e=>{const{componentCls:t,cardPaddingSM:n,cardHeadHeightSM:o}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:o,padding:`0 ${n}px`,fontSize:e.fontSize,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{minHeight:o,paddingTop:0,display:"flex",alignItems:"center"}}}}},fne=Ue("Card",e=>{const t=Be(e,{cardShadow:e.boxShadowCard,cardHeadHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,cardHeadHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardHeadTabsMarginBottom:-e.padding-e.lineWidth,cardActionsLiMargin:`${e.paddingSM}px 0`,cardActionsIconSize:e.fontSize,cardPaddingSM:12});return[une(t),dne(t)]}),pne=()=>({prefixCls:String,width:{type:[Number,String]}}),tm=le({compatConfig:{MODE:3},name:"SkeletonTitle",props:pne(),setup(e){return()=>{const{prefixCls:t,width:n}=e,o=typeof n=="number"?`${n}px`:n;return g("h3",{class:t,style:{width:o}},null)}}}),gne=()=>({prefixCls:String,width:{type:[Number,String,Array]},rows:Number}),hne=le({compatConfig:{MODE:3},name:"SkeletonParagraph",props:gne(),setup(e){const t=n=>{const{width:o,rows:r=2}=e;if(Array.isArray(o))return o[n];if(r-1===n)return o};return()=>{const{prefixCls:n,rows:o}=e,r=[...Array(o)].map((i,a)=>{const l=t(a);return g("li",{key:a,style:{width:typeof l=="number"?`${l}px`:l}},null)});return g("ul",{class:n},[r])}}}),nm=()=>({prefixCls:String,size:[String,Number],shape:String,active:{type:Boolean,default:void 0}}),wf=e=>{const{prefixCls:t,size:n,shape:o}=e,r=ge({[`${t}-lg`]:n==="large",[`${t}-sm`]:n==="small"}),i=ge({[`${t}-circle`]:o==="circle",[`${t}-square`]:o==="square",[`${t}-round`]:o==="round"}),a=typeof n=="number"?{width:`${n}px`,height:`${n}px`,lineHeight:`${n}px`}:{};return g("span",{class:ge(t,r,i),style:a},null)};wf.displayName="SkeletonElement";const vne=new at("ant-skeleton-loading",{"0%":{transform:"translateX(-37.5%)"},"100%":{transform:"translateX(37.5%)"}}),om=e=>({height:e,lineHeight:`${e}px`}),ic=e=>y({width:e},om(e)),mne=e=>({position:"relative",zIndex:0,overflow:"hidden",background:"transparent","&::after":{position:"absolute",top:0,insetInlineEnd:"-150%",bottom:0,insetInlineStart:"-150%",background:e.skeletonLoadingBackground,animationName:vne,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite",content:'""'}}),B0=e=>y({width:e*5,minWidth:e*5},om(e)),bne=e=>{const{skeletonAvatarCls:t,color:n,controlHeight:o,controlHeightLG:r,controlHeightSM:i}=e;return{[`${t}`]:y({display:"inline-block",verticalAlign:"top",background:n},ic(o)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:y({},ic(r)),[`${t}${t}-sm`]:y({},ic(i))}},yne=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:o,controlHeightLG:r,controlHeightSM:i,color:a}=e;return{[`${o}`]:y({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},B0(t)),[`${o}-lg`]:y({},B0(r)),[`${o}-sm`]:y({},B0(i))}},hI=e=>y({width:e},om(e)),Sne=e=>{const{skeletonImageCls:t,imageSizeBase:n,color:o,borderRadiusSM:r}=e;return{[`${t}`]:y(y({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:o,borderRadius:r},hI(n*2)),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:y(y({},hI(n)),{maxWidth:n*4,maxHeight:n*4}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},H0=(e,t,n)=>{const{skeletonButtonCls:o}=e;return{[`${n}${o}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${o}-round`]:{borderRadius:t}}},z0=e=>y({width:e*2,minWidth:e*2},om(e)),Cne=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:o,controlHeightLG:r,controlHeightSM:i,color:a}=e;return y(y(y(y(y({[`${n}`]:y({display:"inline-block",verticalAlign:"top",background:a,borderRadius:t,width:o*2,minWidth:o*2},z0(o))},H0(e,o,n)),{[`${n}-lg`]:y({},z0(r))}),H0(e,r,`${n}-lg`)),{[`${n}-sm`]:y({},z0(i))}),H0(e,i,`${n}-sm`))},xne=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:o,skeletonParagraphCls:r,skeletonButtonCls:i,skeletonInputCls:a,skeletonImageCls:l,controlHeight:s,controlHeightLG:u,controlHeightSM:c,color:d,padding:f,marginSM:p,borderRadius:v,skeletonTitleHeight:h,skeletonBlockRadius:m,skeletonParagraphLineHeight:b,controlHeightXS:S,skeletonParagraphMarginTop:C}=e;return{[`${t}`]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",[`${n}`]:y({display:"inline-block",verticalAlign:"top",background:d},ic(s)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:y({},ic(u)),[`${n}-sm`]:y({},ic(c))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${o}`]:{width:"100%",height:h,background:d,borderRadius:m,[`+ ${r}`]:{marginBlockStart:c}},[`${r}`]:{padding:0,"> li":{width:"100%",height:b,listStyle:"none",background:d,borderRadius:m,"+ li":{marginBlockStart:S}}},[`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${o}, ${r} > li`]:{borderRadius:v}}},[`${t}-with-avatar ${t}-content`]:{[`${o}`]:{marginBlockStart:p,[`+ ${r}`]:{marginBlockStart:C}}},[`${t}${t}-element`]:y(y(y(y({display:"inline-block",width:"auto"},Cne(e)),bne(e)),yne(e)),Sne(e)),[`${t}${t}-block`]:{width:"100%",[`${i}`]:{width:"100%"},[`${a}`]:{width:"100%"}},[`${t}${t}-active`]:{[` ${o}, ${r} > li, ${n}, ${i}, ${a}, ${l} - `]:y({},mne(e))}}},Pf=Ue("Skeleton",e=>{const{componentCls:t}=e,n=Be(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:e.controlHeight*1.5,skeletonTitleHeight:e.controlHeight/2,skeletonBlockRadius:e.borderRadiusSM,skeletonParagraphLineHeight:e.controlHeight/2,skeletonParagraphMarginTop:e.marginLG+e.marginXXS,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.color} 25%, ${e.colorGradientEnd} 37%, ${e.color} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[xne(n)]},e=>{const{colorFillContent:t,colorFill:n}=e;return{color:t,colorGradientEnd:n}}),$ne=()=>({active:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},prefixCls:String,avatar:{type:[Boolean,Object],default:void 0},title:{type:[Boolean,Object],default:void 0},paragraph:{type:[Boolean,Object],default:void 0},round:{type:Boolean,default:void 0}});function j0(e){return e&&typeof e=="object"?e:{}}function wne(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Pne(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function One(e,t){const n={};return(!e||!t)&&(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}const no=le({compatConfig:{MODE:3},name:"ASkeleton",props:Qe($ne(),{avatar:!1,title:!0,paragraph:!0}),setup(e,t){let{slots:n}=t;const{prefixCls:o,direction:r}=Te("skeleton",e),[i,a]=Pf(o);return()=>{var l;const{loading:s,avatar:u,title:c,paragraph:d,active:f,round:p}=e,v=o.value;if(s||e.loading===void 0){const h=!!u||u==="",m=!!c||c==="",b=!!d||d==="";let S;if(h){const x=y(y({prefixCls:`${v}-avatar`},wne(m,b)),j0(u));S=g("div",{class:`${v}-header`},[g(wf,x,null)])}let C;if(m||b){let x;if(m){const w=y(y({prefixCls:`${v}-title`},Pne(h,b)),j0(c));x=g(nm,w,null)}let P;if(b){const w=y(y({prefixCls:`${v}-paragraph`},One(h,m)),j0(d));P=g(hne,w,null)}C=g("div",{class:`${v}-content`},[x,P])}const $=ge(v,{[`${v}-with-avatar`]:h,[`${v}-active`]:f,[`${v}-rtl`]:r.value==="rtl",[`${v}-round`]:p,[a.value]:!0});return i(g("div",{class:$},[S,C]))}return(l=n.default)===null||l===void 0?void 0:l.call(n)}}}),Ine=()=>y(y({},om()),{size:String,block:Boolean}),xx=le({compatConfig:{MODE:3},name:"ASkeletonButton",props:Qe(Ine(),{size:"default"}),setup(e){const{prefixCls:t}=Te("skeleton",e),[n,o]=Pf(t),r=E(()=>ge(t.value,`${t.value}-element`,{[`${t.value}-active`]:e.active,[`${t.value}-block`]:e.block},o.value));return()=>n(g("div",{class:r.value},[g(wf,k(k({},e),{},{prefixCls:`${t.value}-button`}),null)]))}}),$x=le({compatConfig:{MODE:3},name:"ASkeletonInput",props:y(y({},it(om(),["shape"])),{size:String,block:Boolean}),setup(e){const{prefixCls:t}=Te("skeleton",e),[n,o]=Pf(t),r=E(()=>ge(t.value,`${t.value}-element`,{[`${t.value}-active`]:e.active,[`${t.value}-block`]:e.block},o.value));return()=>n(g("div",{class:r.value},[g(wf,k(k({},e),{},{prefixCls:`${t.value}-input`}),null)]))}}),Tne="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",wx=le({compatConfig:{MODE:3},name:"ASkeletonImage",props:it(om(),["size","shape","active"]),setup(e){const{prefixCls:t}=Te("skeleton",e),[n,o]=Pf(t),r=E(()=>ge(t.value,`${t.value}-element`,o.value));return()=>n(g("div",{class:r.value},[g("div",{class:`${t.value}-image`},[g("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",class:`${t.value}-image-svg`},[g("path",{d:Tne,class:`${t.value}-image-path`},null)])])]))}}),Ene=()=>y(y({},om()),{shape:String}),Px=le({compatConfig:{MODE:3},name:"ASkeletonAvatar",props:Qe(Ene(),{size:"default",shape:"circle"}),setup(e){const{prefixCls:t}=Te("skeleton",e),[n,o]=Pf(t),r=E(()=>ge(t.value,`${t.value}-element`,{[`${t.value}-active`]:e.active},o.value));return()=>n(g("div",{class:r.value},[g(wf,k(k({},e),{},{prefixCls:`${t.value}-avatar`}),null)]))}});no.Button=xx;no.Avatar=Px;no.Input=$x;no.Image=wx;no.Title=nm;no.install=function(e){return e.component(no.name,no),e.component(no.Button.name,xx),e.component(no.Avatar.name,Px),e.component(no.Input.name,$x),e.component(no.Image.name,wx),e.component(no.Title.name,nm),e};const{TabPane:_ne}=Dl,Mne=()=>({prefixCls:String,title:K.any,extra:K.any,bordered:{type:Boolean,default:!0},bodyStyle:{type:Object,default:void 0},headStyle:{type:Object,default:void 0},loading:{type:Boolean,default:!1},hoverable:{type:Boolean,default:!1},type:{type:String},size:{type:String},actions:K.any,tabList:{type:Array},tabBarExtraContent:K.any,activeTabKey:String,defaultActiveTabKey:String,cover:K.any,onTabChange:{type:Function}}),ac=le({compatConfig:{MODE:3},name:"ACard",inheritAttrs:!1,props:Mne(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i,size:a}=Te("card",e),[l,s]=fne(r),u=f=>f.map((v,h)=>ln(v)&&!df(v)||!ln(v)?g("li",{style:{width:`${100/f.length}%`},key:`action-${h}`},[g("span",null,[v])]):null),c=f=>{var p;(p=e.onTabChange)===null||p===void 0||p.call(e,f)},d=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],p;return f.forEach(v=>{v&&Bv(v.type)&&v.type.__ANT_CARD_GRID&&(p=!0)}),p};return()=>{var f,p,v,h,m,b;const{headStyle:S={},bodyStyle:C={},loading:$,bordered:x=!0,type:P,tabList:w,hoverable:O,activeTabKey:I,defaultActiveTabKey:_,tabBarExtraContent:T=bu((f=n.tabBarExtraContent)===null||f===void 0?void 0:f.call(n)),title:A=bu((p=n.title)===null||p===void 0?void 0:p.call(n)),extra:R=bu((v=n.extra)===null||v===void 0?void 0:v.call(n)),actions:H=bu((h=n.actions)===null||h===void 0?void 0:h.call(n)),cover:M=bu((m=n.cover)===null||m===void 0?void 0:m.call(n))}=e,D=Ot((b=n.default)===null||b===void 0?void 0:b.call(n)),N=r.value,L={[`${N}`]:!0,[s.value]:!0,[`${N}-loading`]:$,[`${N}-bordered`]:x,[`${N}-hoverable`]:!!O,[`${N}-contain-grid`]:d(D),[`${N}-contain-tabs`]:w&&w.length,[`${N}-${a.value}`]:a.value,[`${N}-type-${P}`]:!!P,[`${N}-rtl`]:i.value==="rtl"},F=g(no,{loading:!0,active:!0,paragraph:{rows:4},title:!1},{default:()=>[D]}),B=I!==void 0,j={size:"large",[B?"activeKey":"defaultActiveKey"]:B?I:_,onChange:c,class:`${N}-head-tabs`};let z;const G=w&&w.length?g(Dl,j,{default:()=>[w.map(Z=>{const{tab:re,slots:ne}=Z,X=ne==null?void 0:ne.tab;Mt(!ne,"Card","tabList slots is deprecated, Please use `customTab` instead.");let te=re!==void 0?re:n[X]?n[X](Z):null;return te=Pv(n,"customTab",Z,()=>[te]),g(_ne,{tab:te,key:Z.key,disabled:Z.disabled},null)})],rightExtra:T?()=>T:null}):null;(A||R||G)&&(z=g("div",{class:`${N}-head`,style:S},[g("div",{class:`${N}-head-wrapper`},[A&&g("div",{class:`${N}-head-title`},[A]),R&&g("div",{class:`${N}-extra`},[R])]),G]));const Q=M?g("div",{class:`${N}-cover`},[M]):null,Y=g("div",{class:`${N}-body`,style:C},[$?F:D]),oe=H&&H.length?g("ul",{class:`${N}-actions`},[u(H)]):null;return l(g("div",k(k({ref:"cardContainerRef"},o),{},{class:[L,o.class]}),[z,Q,D&&D.length?Y:null,oe]))}}}),Ane=()=>({prefixCls:String,title:ro(),description:ro(),avatar:ro()}),hh=le({compatConfig:{MODE:3},name:"ACardMeta",props:Ane(),slots:Object,setup(e,t){let{slots:n}=t;const{prefixCls:o}=Te("card",e);return()=>{const r={[`${o.value}-meta`]:!0},i=mn(n,e,"avatar"),a=mn(n,e,"title"),l=mn(n,e,"description"),s=i?g("div",{class:`${o.value}-meta-avatar`},[i]):null,u=a?g("div",{class:`${o.value}-meta-title`},[a]):null,c=l?g("div",{class:`${o.value}-meta-description`},[l]):null,d=u||c?g("div",{class:`${o.value}-meta-detail`},[u,c]):null;return g("div",{class:r},[s,d])}}}),Rne=()=>({prefixCls:String,hoverable:{type:Boolean,default:!0}}),vh=le({compatConfig:{MODE:3},name:"ACardGrid",__ANT_CARD_GRID:!0,props:Rne(),setup(e,t){let{slots:n}=t;const{prefixCls:o}=Te("card",e),r=E(()=>({[`${o.value}-grid`]:!0,[`${o.value}-grid-hoverable`]:e.hoverable}));return()=>{var i;return g("div",{class:r.value},[(i=n.default)===null||i===void 0?void 0:i.call(n)])}}});ac.Meta=hh;ac.Grid=vh;ac.install=function(e){return e.component(ac.name,ac),e.component(hh.name,hh),e.component(vh.name,vh),e};const Dne=()=>({prefixCls:String,activeKey:He([Array,Number,String]),defaultActiveKey:He([Array,Number,String]),accordion:$e(),destroyInactivePanel:$e(),bordered:$e(),expandIcon:ye(),openAnimation:K.object,expandIconPosition:Ne(),collapsible:Ne(),ghost:$e(),onChange:ye(),"onUpdate:activeKey":ye()}),k5=()=>({openAnimation:K.object,prefixCls:String,header:K.any,headerClass:String,showArrow:$e(),isActive:$e(),destroyInactivePanel:$e(),disabled:$e(),accordion:$e(),forceRender:$e(),expandIcon:ye(),extra:K.any,panelKey:He(),collapsible:Ne(),role:String,onItemClick:ye()}),Nne=e=>{const{componentCls:t,collapseContentBg:n,padding:o,collapseContentPaddingHorizontal:r,collapseHeaderBg:i,collapseHeaderPadding:a,collapsePanelBorderRadius:l,lineWidth:s,lineType:u,colorBorder:c,colorText:d,colorTextHeading:f,colorTextDisabled:p,fontSize:v,lineHeight:h,marginSM:m,paddingSM:b,motionDurationSlow:S,fontSizeIcon:C}=e,$=`${s}px ${u} ${c}`;return{[t]:y(y({},qe(e)),{backgroundColor:i,border:$,borderBottom:0,borderRadius:`${l}px`,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:$,"&:last-child":{[` + `]:y({},mne(e))}}},Pf=Ue("Skeleton",e=>{const{componentCls:t}=e,n=Be(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:e.controlHeight*1.5,skeletonTitleHeight:e.controlHeight/2,skeletonBlockRadius:e.borderRadiusSM,skeletonParagraphLineHeight:e.controlHeight/2,skeletonParagraphMarginTop:e.marginLG+e.marginXXS,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.color} 25%, ${e.colorGradientEnd} 37%, ${e.color} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[xne(n)]},e=>{const{colorFillContent:t,colorFill:n}=e;return{color:t,colorGradientEnd:n}}),$ne=()=>({active:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},prefixCls:String,avatar:{type:[Boolean,Object],default:void 0},title:{type:[Boolean,Object],default:void 0},paragraph:{type:[Boolean,Object],default:void 0},round:{type:Boolean,default:void 0}});function j0(e){return e&&typeof e=="object"?e:{}}function wne(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Pne(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function One(e,t){const n={};return(!e||!t)&&(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}const no=le({compatConfig:{MODE:3},name:"ASkeleton",props:Qe($ne(),{avatar:!1,title:!0,paragraph:!0}),setup(e,t){let{slots:n}=t;const{prefixCls:o,direction:r}=Te("skeleton",e),[i,a]=Pf(o);return()=>{var l;const{loading:s,avatar:u,title:c,paragraph:d,active:f,round:p}=e,v=o.value;if(s||e.loading===void 0){const h=!!u||u==="",m=!!c||c==="",b=!!d||d==="";let S;if(h){const x=y(y({prefixCls:`${v}-avatar`},wne(m,b)),j0(u));S=g("div",{class:`${v}-header`},[g(wf,x,null)])}let C;if(m||b){let x;if(m){const w=y(y({prefixCls:`${v}-title`},Pne(h,b)),j0(c));x=g(tm,w,null)}let P;if(b){const w=y(y({prefixCls:`${v}-paragraph`},One(h,m)),j0(d));P=g(hne,w,null)}C=g("div",{class:`${v}-content`},[x,P])}const $=ge(v,{[`${v}-with-avatar`]:h,[`${v}-active`]:f,[`${v}-rtl`]:r.value==="rtl",[`${v}-round`]:p,[a.value]:!0});return i(g("div",{class:$},[S,C]))}return(l=n.default)===null||l===void 0?void 0:l.call(n)}}}),Ine=()=>y(y({},nm()),{size:String,block:Boolean}),xx=le({compatConfig:{MODE:3},name:"ASkeletonButton",props:Qe(Ine(),{size:"default"}),setup(e){const{prefixCls:t}=Te("skeleton",e),[n,o]=Pf(t),r=E(()=>ge(t.value,`${t.value}-element`,{[`${t.value}-active`]:e.active,[`${t.value}-block`]:e.block},o.value));return()=>n(g("div",{class:r.value},[g(wf,k(k({},e),{},{prefixCls:`${t.value}-button`}),null)]))}}),$x=le({compatConfig:{MODE:3},name:"ASkeletonInput",props:y(y({},it(nm(),["shape"])),{size:String,block:Boolean}),setup(e){const{prefixCls:t}=Te("skeleton",e),[n,o]=Pf(t),r=E(()=>ge(t.value,`${t.value}-element`,{[`${t.value}-active`]:e.active,[`${t.value}-block`]:e.block},o.value));return()=>n(g("div",{class:r.value},[g(wf,k(k({},e),{},{prefixCls:`${t.value}-input`}),null)]))}}),Tne="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",wx=le({compatConfig:{MODE:3},name:"ASkeletonImage",props:it(nm(),["size","shape","active"]),setup(e){const{prefixCls:t}=Te("skeleton",e),[n,o]=Pf(t),r=E(()=>ge(t.value,`${t.value}-element`,o.value));return()=>n(g("div",{class:r.value},[g("div",{class:`${t.value}-image`},[g("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",class:`${t.value}-image-svg`},[g("path",{d:Tne,class:`${t.value}-image-path`},null)])])]))}}),Ene=()=>y(y({},nm()),{shape:String}),Px=le({compatConfig:{MODE:3},name:"ASkeletonAvatar",props:Qe(Ene(),{size:"default",shape:"circle"}),setup(e){const{prefixCls:t}=Te("skeleton",e),[n,o]=Pf(t),r=E(()=>ge(t.value,`${t.value}-element`,{[`${t.value}-active`]:e.active},o.value));return()=>n(g("div",{class:r.value},[g(wf,k(k({},e),{},{prefixCls:`${t.value}-avatar`}),null)]))}});no.Button=xx;no.Avatar=Px;no.Input=$x;no.Image=wx;no.Title=tm;no.install=function(e){return e.component(no.name,no),e.component(no.Button.name,xx),e.component(no.Avatar.name,Px),e.component(no.Input.name,$x),e.component(no.Image.name,wx),e.component(no.Title.name,tm),e};const{TabPane:_ne}=Dl,Mne=()=>({prefixCls:String,title:K.any,extra:K.any,bordered:{type:Boolean,default:!0},bodyStyle:{type:Object,default:void 0},headStyle:{type:Object,default:void 0},loading:{type:Boolean,default:!1},hoverable:{type:Boolean,default:!1},type:{type:String},size:{type:String},actions:K.any,tabList:{type:Array},tabBarExtraContent:K.any,activeTabKey:String,defaultActiveTabKey:String,cover:K.any,onTabChange:{type:Function}}),ac=le({compatConfig:{MODE:3},name:"ACard",inheritAttrs:!1,props:Mne(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i,size:a}=Te("card",e),[l,s]=fne(r),u=f=>f.map((v,h)=>ln(v)&&!df(v)||!ln(v)?g("li",{style:{width:`${100/f.length}%`},key:`action-${h}`},[g("span",null,[v])]):null),c=f=>{var p;(p=e.onTabChange)===null||p===void 0||p.call(e,f)},d=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],p;return f.forEach(v=>{v&&Fv(v.type)&&v.type.__ANT_CARD_GRID&&(p=!0)}),p};return()=>{var f,p,v,h,m,b;const{headStyle:S={},bodyStyle:C={},loading:$,bordered:x=!0,type:P,tabList:w,hoverable:O,activeTabKey:I,defaultActiveTabKey:_,tabBarExtraContent:T=bu((f=n.tabBarExtraContent)===null||f===void 0?void 0:f.call(n)),title:A=bu((p=n.title)===null||p===void 0?void 0:p.call(n)),extra:R=bu((v=n.extra)===null||v===void 0?void 0:v.call(n)),actions:H=bu((h=n.actions)===null||h===void 0?void 0:h.call(n)),cover:M=bu((m=n.cover)===null||m===void 0?void 0:m.call(n))}=e,D=Ot((b=n.default)===null||b===void 0?void 0:b.call(n)),N=r.value,L={[`${N}`]:!0,[s.value]:!0,[`${N}-loading`]:$,[`${N}-bordered`]:x,[`${N}-hoverable`]:!!O,[`${N}-contain-grid`]:d(D),[`${N}-contain-tabs`]:w&&w.length,[`${N}-${a.value}`]:a.value,[`${N}-type-${P}`]:!!P,[`${N}-rtl`]:i.value==="rtl"},F=g(no,{loading:!0,active:!0,paragraph:{rows:4},title:!1},{default:()=>[D]}),B=I!==void 0,j={size:"large",[B?"activeKey":"defaultActiveKey"]:B?I:_,onChange:c,class:`${N}-head-tabs`};let z;const G=w&&w.length?g(Dl,j,{default:()=>[w.map(Z=>{const{tab:re,slots:ne}=Z,X=ne==null?void 0:ne.tab;Mt(!ne,"Card","tabList slots is deprecated, Please use `customTab` instead.");let te=re!==void 0?re:n[X]?n[X](Z):null;return te=wv(n,"customTab",Z,()=>[te]),g(_ne,{tab:te,key:Z.key,disabled:Z.disabled},null)})],rightExtra:T?()=>T:null}):null;(A||R||G)&&(z=g("div",{class:`${N}-head`,style:S},[g("div",{class:`${N}-head-wrapper`},[A&&g("div",{class:`${N}-head-title`},[A]),R&&g("div",{class:`${N}-extra`},[R])]),G]));const Q=M?g("div",{class:`${N}-cover`},[M]):null,Y=g("div",{class:`${N}-body`,style:C},[$?F:D]),oe=H&&H.length?g("ul",{class:`${N}-actions`},[u(H)]):null;return l(g("div",k(k({ref:"cardContainerRef"},o),{},{class:[L,o.class]}),[z,Q,D&&D.length?Y:null,oe]))}}}),Ane=()=>({prefixCls:String,title:ro(),description:ro(),avatar:ro()}),gh=le({compatConfig:{MODE:3},name:"ACardMeta",props:Ane(),slots:Object,setup(e,t){let{slots:n}=t;const{prefixCls:o}=Te("card",e);return()=>{const r={[`${o.value}-meta`]:!0},i=mn(n,e,"avatar"),a=mn(n,e,"title"),l=mn(n,e,"description"),s=i?g("div",{class:`${o.value}-meta-avatar`},[i]):null,u=a?g("div",{class:`${o.value}-meta-title`},[a]):null,c=l?g("div",{class:`${o.value}-meta-description`},[l]):null,d=u||c?g("div",{class:`${o.value}-meta-detail`},[u,c]):null;return g("div",{class:r},[s,d])}}}),Rne=()=>({prefixCls:String,hoverable:{type:Boolean,default:!0}}),hh=le({compatConfig:{MODE:3},name:"ACardGrid",__ANT_CARD_GRID:!0,props:Rne(),setup(e,t){let{slots:n}=t;const{prefixCls:o}=Te("card",e),r=E(()=>({[`${o.value}-grid`]:!0,[`${o.value}-grid-hoverable`]:e.hoverable}));return()=>{var i;return g("div",{class:r.value},[(i=n.default)===null||i===void 0?void 0:i.call(n)])}}});ac.Meta=gh;ac.Grid=hh;ac.install=function(e){return e.component(ac.name,ac),e.component(gh.name,gh),e.component(hh.name,hh),e};const Dne=()=>({prefixCls:String,activeKey:He([Array,Number,String]),defaultActiveKey:He([Array,Number,String]),accordion:$e(),destroyInactivePanel:$e(),bordered:$e(),expandIcon:ye(),openAnimation:K.object,expandIconPosition:Ne(),collapsible:Ne(),ghost:$e(),onChange:ye(),"onUpdate:activeKey":ye()}),k5=()=>({openAnimation:K.object,prefixCls:String,header:K.any,headerClass:String,showArrow:$e(),isActive:$e(),destroyInactivePanel:$e(),disabled:$e(),accordion:$e(),forceRender:$e(),expandIcon:ye(),extra:K.any,panelKey:He(),collapsible:Ne(),role:String,onItemClick:ye()}),Nne=e=>{const{componentCls:t,collapseContentBg:n,padding:o,collapseContentPaddingHorizontal:r,collapseHeaderBg:i,collapseHeaderPadding:a,collapsePanelBorderRadius:l,lineWidth:s,lineType:u,colorBorder:c,colorText:d,colorTextHeading:f,colorTextDisabled:p,fontSize:v,lineHeight:h,marginSM:m,paddingSM:b,motionDurationSlow:S,fontSizeIcon:C}=e,$=`${s}px ${u} ${c}`;return{[t]:y(y({},qe(e)),{backgroundColor:i,border:$,borderBottom:0,borderRadius:`${l}px`,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:$,"&:last-child":{[` &, & > ${t}-header`]:{borderRadius:`0 0 ${l}px ${l}px`}},[`> ${t}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:a,color:f,lineHeight:h,cursor:"pointer",transition:`all ${S}, visibility 0s`,[`> ${t}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${t}-expand-icon`]:{height:v*h,display:"flex",alignItems:"center",paddingInlineEnd:m},[`${t}-arrow`]:y(y({},ns()),{fontSize:C,svg:{transition:`transform ${S}`}}),[`${t}-header-text`]:{marginInlineEnd:"auto"}},[`${t}-header-collapsible-only`]:{cursor:"default",[`${t}-header-text`]:{flex:"none",cursor:"pointer"},[`${t}-expand-icon`]:{cursor:"pointer"}},[`${t}-icon-collapsible-only`]:{cursor:"default",[`${t}-expand-icon`]:{cursor:"pointer"}},[`&${t}-no-arrow`]:{[`> ${t}-header`]:{paddingInlineStart:b}}},[`${t}-content`]:{color:d,backgroundColor:n,borderTop:$,[`& > ${t}-content-box`]:{padding:`${o}px ${r}px`},"&-hidden":{display:"none"}},[`${t}-item:last-child`]:{[`> ${t}-content`]:{borderRadius:`0 0 ${l}px ${l}px`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:p,cursor:"not-allowed"}},[`&${t}-icon-position-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:m}}}}})}},kne=e=>{const{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow svg`;return{[`${t}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},Lne=e=>{const{componentCls:t,collapseHeaderBg:n,paddingXXS:o,colorBorder:r}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${r}`},[` > ${t}-item:last-child, > ${t}-item:last-child ${t}-header - `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${t}-item > ${t}-content > ${t}-content-box`]:{paddingTop:o}}}},Fne=e=>{const{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-content`]:{backgroundColor:"transparent",border:0,[`> ${t}-content-box`]:{paddingBlock:n}}}}}},Bne=Ue("Collapse",e=>{const t=Be(e,{collapseContentBg:e.colorBgContainer,collapseHeaderBg:e.colorFillAlter,collapseHeaderPadding:`${e.paddingSM}px ${e.padding}px`,collapsePanelBorderRadius:e.borderRadiusLG,collapseContentPaddingHorizontal:16});return[Nne(t),Lne(t),Fne(t),kne(t),bf(t)]});function vI(e){let t=e;if(!Array.isArray(t)){const n=typeof t;t=n==="number"||n==="string"?[t]:[]}return t.map(n=>String(n))}const rd=le({compatConfig:{MODE:3},name:"ACollapse",inheritAttrs:!1,props:Qe(Dne(),{accordion:!1,destroyInactivePanel:!1,bordered:!0,expandIconPosition:"start"}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r}=t;const i=ae(vI(eh([e.activeKey,e.defaultActiveKey])));be(()=>e.activeKey,()=>{i.value=vI(e.activeKey)},{deep:!0});const{prefixCls:a,direction:l,rootPrefixCls:s}=Te("collapse",e),[u,c]=Bne(a),d=E(()=>{const{expandIconPosition:b}=e;return b!==void 0?b:l.value==="rtl"?"end":"start"}),f=b=>{const{expandIcon:S=o.expandIcon}=e,C=S?S(b):g(Jo,{rotate:b.isActive?90:void 0},null);return g("div",{class:[`${a.value}-expand-icon`,c.value],onClick:()=>["header","icon"].includes(e.collapsible)&&v(b.panelKey)},[sn(Array.isArray(S)?C[0]:C)?mt(C,{class:`${a.value}-arrow`},!1):C])},p=b=>{e.activeKey===void 0&&(i.value=b);const S=e.accordion?b[0]:b;r("update:activeKey",S),r("change",S)},v=b=>{let S=i.value;if(e.accordion)S=S[0]===b?[]:[b];else{S=[...S];const C=S.indexOf(b);C>-1?S.splice(C,1):S.push(b)}p(S)},h=(b,S)=>{var C,$,x;if(df(b))return;const P=i.value,{accordion:w,destroyInactivePanel:O,collapsible:I,openAnimation:_}=e,T=_||Sf(`${s.value}-motion-collapse`),A=String((C=b.key)!==null&&C!==void 0?C:S),{header:R=(x=($=b.children)===null||$===void 0?void 0:$.header)===null||x===void 0?void 0:x.call($),headerClass:H,collapsible:M,disabled:D}=b.props||{};let N=!1;w?N=P[0]===A:N=P.indexOf(A)>-1;let L=M??I;(D||D==="")&&(L="disabled");const F={key:A,panelKey:A,header:R,headerClass:H,isActive:N,prefixCls:a.value,destroyInactivePanel:O,openAnimation:T,accordion:w,onItemClick:L==="disabled"?null:v,expandIcon:f,collapsible:L};return mt(b,F)},m=()=>{var b;return Ot((b=o.default)===null||b===void 0?void 0:b.call(o)).map(h)};return()=>{const{accordion:b,bordered:S,ghost:C}=e,$=ge(a.value,{[`${a.value}-borderless`]:!S,[`${a.value}-icon-position-${d.value}`]:!0,[`${a.value}-rtl`]:l.value==="rtl",[`${a.value}-ghost`]:!!C,[n.class]:!!n.class},c.value);return u(g("div",k(k({class:$},nB(n)),{},{style:n.style,role:b?"tablist":null}),[m()]))}}}),Hne=le({compatConfig:{MODE:3},name:"PanelContent",props:k5(),setup(e,t){let{slots:n}=t;const o=se(!1);return Ve(()=>{(e.isActive||e.forceRender)&&(o.value=!0)}),()=>{var r;if(!o.value)return null;const{prefixCls:i,isActive:a,role:l}=e;return g("div",{class:ge(`${i}-content`,{[`${i}-content-active`]:a,[`${i}-content-inactive`]:!a}),role:l},[g("div",{class:`${i}-content-box`},[(r=n.default)===null||r===void 0?void 0:r.call(n)])])}}}),mh=le({compatConfig:{MODE:3},name:"ACollapsePanel",inheritAttrs:!1,props:Qe(k5(),{showArrow:!0,isActive:!1,onItemClick(){},headerClass:"",forceRender:!1}),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r}=t;Mt(e.disabled===void 0,"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');const{prefixCls:i}=Te("collapse",e),a=()=>{o("itemClick",e.panelKey)},l=s=>{(s.key==="Enter"||s.keyCode===13||s.which===13)&&a()};return()=>{var s,u;const{header:c=(s=n.header)===null||s===void 0?void 0:s.call(n),headerClass:d,isActive:f,showArrow:p,destroyInactivePanel:v,accordion:h,forceRender:m,openAnimation:b,expandIcon:S=n.expandIcon,extra:C=(u=n.extra)===null||u===void 0?void 0:u.call(n),collapsible:$}=e,x=$==="disabled",P=i.value,w=ge(`${P}-header`,{[d]:d,[`${P}-header-collapsible-only`]:$==="header",[`${P}-icon-collapsible-only`]:$==="icon"}),O=ge({[`${P}-item`]:!0,[`${P}-item-active`]:f,[`${P}-item-disabled`]:x,[`${P}-no-arrow`]:!p,[`${r.class}`]:!!r.class});let I=g("i",{class:"arrow"},null);p&&typeof S=="function"&&(I=S(e));const _=Pn(g(Hne,{prefixCls:P,isActive:f,forceRender:m,role:h?"tabpanel":null},{default:n.default}),[[Vn,f]]),T=y({appear:!1,css:!1},b);return g("div",k(k({},r),{},{class:O}),[g("div",{class:w,onClick:()=>!["header","icon"].includes($)&&a(),role:h?"tab":"button",tabindex:x?-1:0,"aria-expanded":f,onKeypress:l},[p&&I,g("span",{onClick:()=>$==="header"&&a(),class:`${P}-header-text`},[c]),C&&g("div",{class:`${P}-extra`},[C])]),g(Nn,T,{default:()=>[!v||f?_:null]})])}}});rd.Panel=mh;rd.install=function(e){return e.component(rd.name,rd),e.component(mh.name,mh),e};const zne=function(e){return e.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()}).toLowerCase()},jne=function(e){return/[height|width]$/.test(e)},mI=function(e){let t="";const n=Object.keys(e);return n.forEach(function(o,r){let i=e[o];o=zne(o),jne(o)&&typeof i=="number"&&(i=i+"px"),i===!0?t+=o:i===!1?t+="not "+o:t+="("+o+": "+i+")",r{["touchstart","touchmove","wheel"].includes(e.type)||e.preventDefault()},bh=e=>{const t=[],n=F5(e),o=B5(e);for(let r=n;re.currentSlide-Vne(e),B5=e=>e.currentSlide+Kne(e),Vne=e=>e.centerMode?Math.floor(e.slidesToShow/2)+(parseInt(e.centerPadding)>0?1:0):0,Kne=e=>e.centerMode?Math.floor((e.slidesToShow-1)/2)+1+(parseInt(e.centerPadding)>0?1:0):e.slidesToShow,e1=e=>e&&e.offsetWidth||0,Ox=e=>e&&e.offsetHeight||0,H5=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;const o=e.startX-e.curX,r=e.startY-e.curY,i=Math.atan2(r,o);return n=Math.round(i*180/Math.PI),n<0&&(n=360-Math.abs(n)),n<=45&&n>=0||n<=360&&n>=315?"left":n>=135&&n<=225?"right":t===!0?n>=35&&n<=135?"up":"down":"vertical"},im=e=>{let t=!0;return e.infinite||(e.centerMode&&e.currentSlide>=e.slideCount-1||e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(t=!1),t},V0=(e,t)=>{const n={};return t.forEach(o=>n[o]=e[o]),n},Une=e=>{const t=e.children.length,n=e.listRef,o=Math.ceil(e1(n)),r=e.trackRef,i=Math.ceil(e1(r));let a;if(e.vertical)a=o;else{let p=e.centerMode&&parseInt(e.centerPadding)*2;typeof e.centerPadding=="string"&&e.centerPadding.slice(-1)==="%"&&(p*=o/100),a=Math.ceil((o-p)/e.slidesToShow)}const l=n&&Ox(n.querySelector('[data-index="0"]')),s=l*e.slidesToShow;let u=e.currentSlide===void 0?e.initialSlide:e.currentSlide;e.rtl&&e.currentSlide===void 0&&(u=t-1-e.initialSlide);let c=e.lazyLoadedList||[];const d=bh(y(y({},e),{currentSlide:u,lazyLoadedList:c}));c=c.concat(d);const f={slideCount:t,slideWidth:a,listWidth:o,trackWidth:i,currentSlide:u,slideHeight:l,listHeight:s,lazyLoadedList:c};return e.autoplaying===null&&e.autoplay&&(f.autoplaying="playing"),f},Gne=e=>{const{waitForAnimate:t,animating:n,fade:o,infinite:r,index:i,slideCount:a,lazyLoad:l,currentSlide:s,centerMode:u,slidesToScroll:c,slidesToShow:d,useCSS:f}=e;let{lazyLoadedList:p}=e;if(t&&n)return{};let v=i,h,m,b,S={},C={};const $=r?i:Qy(i,0,a-1);if(o){if(!r&&(i<0||i>=a))return{};i<0?v=i+a:i>=a&&(v=i-a),l&&p.indexOf(v)<0&&(p=p.concat(v)),S={animating:!0,currentSlide:v,lazyLoadedList:p,targetSlide:v},C={animating:!1,targetSlide:v}}else h=v,v<0?(h=v+a,r?a%c!==0&&(h=a-a%c):h=0):!im(e)&&v>s?v=h=s:u&&v>=a?(v=r?a:a-1,h=r?0:a-1):v>=a&&(h=v-a,r?a%c!==0&&(h=0):h=a-d),!r&&v+d>=a&&(h=a-d),m=Kd(y(y({},e),{slideIndex:v})),b=Kd(y(y({},e),{slideIndex:h})),r||(m===b&&(v=h),m=b),l&&(p=p.concat(bh(y(y({},e),{currentSlide:v})))),f?(S={animating:!0,currentSlide:h,trackStyle:z5(y(y({},e),{left:m})),lazyLoadedList:p,targetSlide:$},C={animating:!1,currentSlide:h,trackStyle:Vd(y(y({},e),{left:b})),swipeLeft:null,targetSlide:$}):S={currentSlide:h,trackStyle:Vd(y(y({},e),{left:b})),lazyLoadedList:p,targetSlide:$};return{state:S,nextState:C}},Xne=(e,t)=>{let n,o,r;const{slidesToScroll:i,slidesToShow:a,slideCount:l,currentSlide:s,targetSlide:u,lazyLoad:c,infinite:d}=e,p=l%i!==0?0:(l-s)%i;if(t.message==="previous")o=p===0?i:a-p,r=s-o,c&&!d&&(n=s-o,r=n===-1?l-1:n),d||(r=u-i);else if(t.message==="next")o=p===0?i:p,r=s+o,c&&!d&&(r=(s+i)%l+p),d||(r=u+i);else if(t.message==="dots")r=t.index*t.slidesToScroll;else if(t.message==="children"){if(r=t.index,d){const v=toe(y(y({},e),{targetSlide:r}));r>t.currentSlide&&v==="left"?r=r-l:re.target.tagName.match("TEXTAREA|INPUT|SELECT")||!t?"":e.keyCode===37?n?"next":"previous":e.keyCode===39?n?"previous":"next":"",qne=(e,t,n)=>(e.target.tagName==="IMG"&&lc(e),!t||!n&&e.type.indexOf("mouse")!==-1?"":{dragging:!0,touchObject:{startX:e.touches?e.touches[0].pageX:e.clientX,startY:e.touches?e.touches[0].pageY:e.clientY,curX:e.touches?e.touches[0].pageX:e.clientX,curY:e.touches?e.touches[0].pageY:e.clientY}}),Jne=(e,t)=>{const{scrolling:n,animating:o,vertical:r,swipeToSlide:i,verticalSwiping:a,rtl:l,currentSlide:s,edgeFriction:u,edgeDragged:c,onEdge:d,swiped:f,swiping:p,slideCount:v,slidesToScroll:h,infinite:m,touchObject:b,swipeEvent:S,listHeight:C,listWidth:$}=t;if(n)return;if(o)return lc(e);r&&i&&a&&lc(e);let x,P={};const w=Kd(t);b.curX=e.touches?e.touches[0].pageX:e.clientX,b.curY=e.touches?e.touches[0].pageY:e.clientY,b.swipeLength=Math.round(Math.sqrt(Math.pow(b.curX-b.startX,2)));const O=Math.round(Math.sqrt(Math.pow(b.curY-b.startY,2)));if(!a&&!p&&O>10)return{scrolling:!0};a&&(b.swipeLength=O);let I=(l?-1:1)*(b.curX>b.startX?1:-1);a&&(I=b.curY>b.startY?1:-1);const _=Math.ceil(v/h),T=H5(t.touchObject,a);let A=b.swipeLength;return m||(s===0&&(T==="right"||T==="down")||s+1>=_&&(T==="left"||T==="up")||!im(t)&&(T==="left"||T==="up"))&&(A=b.swipeLength*u,c===!1&&d&&(d(T),P.edgeDragged=!0)),!f&&S&&(S(T),P.swiped=!0),r?x=w+A*(C/$)*I:l?x=w-A*I:x=w+A*I,a&&(x=w+A*I),P=y(y({},P),{touchObject:b,swipeLeft:x,trackStyle:Vd(y(y({},t),{left:x}))}),Math.abs(b.curX-b.startX)10&&(P.swiping=!0,lc(e)),P},Zne=(e,t)=>{const{dragging:n,swipe:o,touchObject:r,listWidth:i,touchThreshold:a,verticalSwiping:l,listHeight:s,swipeToSlide:u,scrolling:c,onSwipe:d,targetSlide:f,currentSlide:p,infinite:v}=t;if(!n)return o&&lc(e),{};const h=l?s/a:i/a,m=H5(r,l),b={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(c||!r.swipeLength)return b;if(r.swipeLength>h){lc(e),d&&d(m);let S,C;const $=v?p:f;switch(m){case"left":case"up":C=$+yI(t),S=u?bI(t,C):C,b.currentDirection=0;break;case"right":case"down":C=$-yI(t),S=u?bI(t,C):C,b.currentDirection=1;break;default:S=$}b.triggerSlideHandler=S}else{const S=Kd(t);b.trackStyle=z5(y(y({},t),{left:S}))}return b},Qne=e=>{const t=e.infinite?e.slideCount*2:e.slideCount;let n=e.infinite?e.slidesToShow*-1:0,o=e.infinite?e.slidesToShow*-1:0;const r=[];for(;n{const n=Qne(e);let o=0;if(t>n[n.length-1])t=n[n.length-1];else for(const r in n){if(t{const t=e.centerMode?e.slideWidth*Math.floor(e.slidesToShow/2):0;if(e.swipeToSlide){let n;const o=e.listRef,r=o.querySelectorAll&&o.querySelectorAll(".slick-slide")||[];if(Array.from(r).every(l=>{if(e.vertical){if(l.offsetTop+Ox(l)/2>e.swipeLeft*-1)return n=l,!1}else if(l.offsetLeft-t+e1(l)/2>e.swipeLeft*-1)return n=l,!1;return!0}),!n)return 0;const i=e.rtl===!0?e.slideCount-e.currentSlide:e.currentSlide;return Math.abs(n.dataset.index-i)||1}else return e.slidesToScroll},Ix=(e,t)=>t.reduce((n,o)=>n&&e.hasOwnProperty(o),!0)?null:console.error("Keys Missing:",e),Vd=e=>{Ix(e,["left","variableWidth","slideCount","slidesToShow","slideWidth"]);let t,n;const o=e.slideCount+2*e.slidesToShow;e.vertical?n=o*e.slideHeight:t=eoe(e)*e.slideWidth;let r={opacity:1,transition:"",WebkitTransition:""};if(e.useTransform){const i=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",a=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",l=e.vertical?"translateY("+e.left+"px)":"translateX("+e.left+"px)";r=y(y({},r),{WebkitTransform:i,transform:a,msTransform:l})}else e.vertical?r.top=e.left:r.left=e.left;return e.fade&&(r={opacity:1}),t&&(r.width=t+"px"),n&&(r.height=n+"px"),window&&!window.addEventListener&&window.attachEvent&&(e.vertical?r.marginTop=e.left+"px":r.marginLeft=e.left+"px"),r},z5=e=>{Ix(e,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);const t=Vd(e);return e.useTransform?(t.WebkitTransition="-webkit-transform "+e.speed+"ms "+e.cssEase,t.transition="transform "+e.speed+"ms "+e.cssEase):e.vertical?t.transition="top "+e.speed+"ms "+e.cssEase:t.transition="left "+e.speed+"ms "+e.cssEase,t},Kd=e=>{if(e.unslick)return 0;Ix(e,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);const{slideIndex:t,trackRef:n,infinite:o,centerMode:r,slideCount:i,slidesToShow:a,slidesToScroll:l,slideWidth:s,listWidth:u,variableWidth:c,slideHeight:d,fade:f,vertical:p}=e;let v=0,h,m,b=0;if(f||e.slideCount===1)return 0;let S=0;if(o?(S=-ji(e),i%l!==0&&t+l>i&&(S=-(t>i?a-(t-i):i%l)),r&&(S+=parseInt(a/2))):(i%l!==0&&t+l>i&&(S=a-i%l),r&&(S=parseInt(a/2))),v=S*s,b=S*d,p?h=t*d*-1+b:h=t*s*-1+v,c===!0){let C;const $=n;if(C=t+ji(e),m=$&&$.childNodes[C],h=m?m.offsetLeft*-1:0,r===!0){C=o?t+ji(e):t,m=$&&$.children[C],h=0;for(let x=0;xe.unslick||!e.infinite?0:e.variableWidth?e.slideCount:e.slidesToShow+(e.centerMode?1:0),Yp=e=>e.unslick||!e.infinite?0:e.slideCount,eoe=e=>e.slideCount===1?1:ji(e)+e.slideCount+Yp(e),toe=e=>e.targetSlide>e.currentSlide?e.targetSlide>e.currentSlide+noe(e)?"left":"right":e.targetSlide{let{slidesToShow:t,centerMode:n,rtl:o,centerPadding:r}=e;if(n){let i=(t-1)/2+1;return parseInt(r)>0&&(i+=1),o&&t%2===0&&(i+=1),i}return o?0:t-1},ooe=e=>{let{slidesToShow:t,centerMode:n,rtl:o,centerPadding:r}=e;if(n){let i=(t-1)/2+1;return parseInt(r)>0&&(i+=1),!o&&t%2===0&&(i+=1),i}return o?t-1:0},SI=()=>!!(typeof window<"u"&&window.document&&window.document.createElement),K0=e=>{let t,n,o,r;e.rtl?r=e.slideCount-1-e.index:r=e.index;const i=r<0||r>=e.slideCount;e.centerMode?(o=Math.floor(e.slidesToShow/2),n=(r-e.currentSlide)%e.slideCount===0,r>e.currentSlide-o-1&&r<=e.currentSlide+o&&(t=!0)):t=e.currentSlide<=r&&r=e.slideCount?a=e.targetSlide-e.slideCount:a=e.targetSlide,{"slick-slide":!0,"slick-active":t,"slick-center":n,"slick-cloned":i,"slick-current":r===a}},roe=function(e){const t={};return(e.variableWidth===void 0||e.variableWidth===!1)&&(t.width=e.slideWidth+(typeof e.slideWidth=="number"?"px":"")),e.fade&&(t.position="relative",e.vertical?t.top=-e.index*parseInt(e.slideHeight)+"px":t.left=-e.index*parseInt(e.slideWidth)+"px",t.opacity=e.currentSlide===e.index?1:0,e.useCSS&&(t.transition="opacity "+e.speed+"ms "+e.cssEase+", visibility "+e.speed+"ms "+e.cssEase)),t},U0=(e,t)=>e.key+"-"+t,ioe=function(e,t){let n;const o=[],r=[],i=[],a=t.length,l=F5(e),s=B5(e);return t.forEach((u,c)=>{let d;const f={message:"children",index:c,slidesToScroll:e.slidesToScroll,currentSlide:e.currentSlide};!e.lazyLoad||e.lazyLoad&&e.lazyLoadedList.indexOf(c)>=0?d=u:d=g("div");const p=roe(y(y({},e),{index:c})),v=d.props.class||"";let h=K0(y(y({},e),{index:c}));if(o.push(Zu(d,{key:"original"+U0(d,c),tabindex:"-1","data-index":c,"aria-hidden":!h["slick-active"],class:ge(h,v),style:y(y({outline:"none"},d.props.style||{}),p),onClick:()=>{e.focusOnSelect&&e.focusOnSelect(f)}})),e.infinite&&e.fade===!1){const m=a-c;m<=ji(e)&&a!==e.slidesToShow&&(n=-m,n>=l&&(d=u),h=K0(y(y({},e),{index:n})),r.push(Zu(d,{key:"precloned"+U0(d,n),class:ge(h,v),tabindex:"-1","data-index":n,"aria-hidden":!h["slick-active"],style:y(y({},d.props.style||{}),p),onClick:()=>{e.focusOnSelect&&e.focusOnSelect(f)}}))),a!==e.slidesToShow&&(n=a+c,n{e.focusOnSelect&&e.focusOnSelect(f)}})))}}),e.rtl?r.concat(o,i).reverse():r.concat(o,i)},j5=(e,t)=>{let{attrs:n,slots:o}=t;const r=ioe(n,Ot(o==null?void 0:o.default())),{onMouseenter:i,onMouseover:a,onMouseleave:l}=n,s={onMouseenter:i,onMouseover:a,onMouseleave:l},u=y({class:"slick-track",style:n.trackStyle},s);return g("div",u,[r])};j5.inheritAttrs=!1;const aoe=function(e){let t;return e.infinite?t=Math.ceil(e.slideCount/e.slidesToScroll):t=Math.ceil((e.slideCount-e.slidesToShow)/e.slidesToScroll)+1,t},W5=(e,t)=>{let{attrs:n}=t;const{slideCount:o,slidesToScroll:r,slidesToShow:i,infinite:a,currentSlide:l,appendDots:s,customPaging:u,clickHandler:c,dotsClass:d,onMouseenter:f,onMouseover:p,onMouseleave:v}=n,h=aoe({slideCount:o,slidesToScroll:r,slidesToShow:i,infinite:a}),m={onMouseenter:f,onMouseover:p,onMouseleave:v};let b=[];for(let S=0;S=P&&l<=$:l===P}),O={message:"dots",index:S,slidesToScroll:r,currentSlide:l};b=b.concat(g("li",{key:S,class:w},[mt(u({i:S}),{onClick:I})]))}return mt(s({dots:b}),y({class:d},m))};W5.inheritAttrs=!1;function V5(){}function K5(e,t,n){n&&n.preventDefault(),t(e,n)}const U5=(e,t)=>{let{attrs:n}=t;const{clickHandler:o,infinite:r,currentSlide:i,slideCount:a,slidesToShow:l}=n,s={"slick-arrow":!0,"slick-prev":!0};let u=function(p){K5({message:"previous"},o,p)};!r&&(i===0||a<=l)&&(s["slick-disabled"]=!0,u=V5);const c={key:"0","data-role":"none",class:s,style:{display:"block"},onClick:u},d={currentSlide:i,slideCount:a};let f;return n.prevArrow?f=mt(n.prevArrow(y(y({},c),d)),{key:"0",class:s,style:{display:"block"},onClick:u},!1):f=g("button",k({key:"0",type:"button"},c),[" ",zn("Previous")]),f};U5.inheritAttrs=!1;const G5=(e,t)=>{let{attrs:n}=t;const{clickHandler:o,currentSlide:r,slideCount:i}=n,a={"slick-arrow":!0,"slick-next":!0};let l=function(d){K5({message:"next"},o,d)};im(n)||(a["slick-disabled"]=!0,l=V5);const s={key:"1","data-role":"none",class:ge(a),style:{display:"block"},onClick:l},u={currentSlide:r,slideCount:i};let c;return n.nextArrow?c=mt(n.nextArrow(y(y({},s),u)),{key:"1",class:ge(a),style:{display:"block"},onClick:l},!1):c=g("button",k({key:"1",type:"button"},s),[" ",zn("Next")]),c};G5.inheritAttrs=!1;var loe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{this.currentSlide>=e.children.length&&this.changeSlide({message:"index",index:e.children.length-e.slidesToShow,currentSlide:this.currentSlide}),!this.preProps.autoplay&&e.autoplay?this.handleAutoPlay("playing"):e.autoplay?this.handleAutoPlay("update"):this.pause("paused")}),this.preProps=y({},e)}},mounted(){if(this.__emit("init"),this.lazyLoad){const e=bh(y(y({},this.$props),this.$data));e.length>0&&(this.setState(t=>({lazyLoadedList:t.lazyLoadedList.concat(e)})),this.__emit("lazyLoad",e))}this.$nextTick(()=>{const e=y({listRef:this.list,trackRef:this.track,children:this.children},this.$props);this.updateState(e,!0,()=>{this.adaptHeight(),this.autoplay&&this.handleAutoPlay("playing")}),this.lazyLoad==="progressive"&&(this.lazyLoadTimer=setInterval(this.progressiveLazyLoad,1e3)),this.ro=new AS(()=>{this.animating?(this.onWindowResized(!1),this.callbackTimers.push(setTimeout(()=>this.onWindowResized(),this.speed))):this.onWindowResized()}),this.ro.observe(this.list),document.querySelectorAll&&Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"),t=>{t.onfocus=this.$props.pauseOnFocus?this.onSlideFocus:null,t.onblur=this.$props.pauseOnFocus?this.onSlideBlur:null}),window.addEventListener?window.addEventListener("resize",this.onWindowResized):window.attachEvent("onresize",this.onWindowResized)})},beforeUnmount(){var e;this.animationEndCallback&&clearTimeout(this.animationEndCallback),this.lazyLoadTimer&&clearInterval(this.lazyLoadTimer),this.callbackTimers.length&&(this.callbackTimers.forEach(t=>clearTimeout(t)),this.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",this.onWindowResized):window.detachEvent("onresize",this.onWindowResized),this.autoplayTimer&&clearInterval(this.autoplayTimer),(e=this.ro)===null||e===void 0||e.disconnect()},updated(){if(this.checkImagesLoad(),this.__emit("reInit"),this.lazyLoad){const e=bh(y(y({},this.$props),this.$data));e.length>0&&(this.setState(t=>({lazyLoadedList:t.lazyLoadedList.concat(e)})),this.__emit("lazyLoad"))}this.adaptHeight()},methods:{listRefHandler(e){this.list=e},trackRefHandler(e){this.track=e},adaptHeight(){if(this.adaptiveHeight&&this.list){const e=this.list.querySelector(`[data-index="${this.currentSlide}"]`);this.list.style.height=Ox(e)+"px"}},onWindowResized(e){this.debouncedResize&&this.debouncedResize.cancel(),this.debouncedResize=MC(()=>this.resizeWindow(e),50),this.debouncedResize()},resizeWindow(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(!!!this.track)return;const n=y(y({listRef:this.list,trackRef:this.track,children:this.children},this.$props),this.$data);this.updateState(n,e,()=>{this.autoplay?this.handleAutoPlay("update"):this.pause("paused")}),this.setState({animating:!1}),clearTimeout(this.animationEndCallback),delete this.animationEndCallback},updateState(e,t,n){const o=Une(e);e=y(y(y({},e),o),{slideIndex:o.currentSlide});const r=Kd(e);e=y(y({},e),{left:r});const i=Vd(e);(t||this.children.length!==e.children.length)&&(o.trackStyle=i),this.setState(o,n)},ssrInit(){const e=this.children;if(this.variableWidth){let s=0,u=0;const c=[],d=ji(y(y(y({},this.$props),this.$data),{slideCount:e.length})),f=Yp(y(y(y({},this.$props),this.$data),{slideCount:e.length}));e.forEach(v=>{var h,m;const b=((m=(h=v.props.style)===null||h===void 0?void 0:h.width)===null||m===void 0?void 0:m.split("px")[0])||0;c.push(b),s+=b});for(let v=0;v{const r=()=>++n&&n>=t&&this.onWindowResized();if(!o.onclick)o.onclick=()=>o.parentNode.focus();else{const i=o.onclick;o.onclick=()=>{i(),o.parentNode.focus()}}o.onload||(this.$props.lazyLoad?o.onload=()=>{this.adaptHeight(),this.callbackTimers.push(setTimeout(this.onWindowResized,this.speed))}:(o.onload=r,o.onerror=()=>{r(),this.__emit("lazyLoadError")}))})},progressiveLazyLoad(){const e=[],t=y(y({},this.$props),this.$data);for(let n=this.currentSlide;n=-ji(t);n--)if(this.lazyLoadedList.indexOf(n)<0){e.push(n);break}e.length>0?(this.setState(n=>({lazyLoadedList:n.lazyLoadedList.concat(e)})),this.__emit("lazyLoad",e)):this.lazyLoadTimer&&(clearInterval(this.lazyLoadTimer),delete this.lazyLoadTimer)},slideHandler(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{asNavFor:n,beforeChange:o,speed:r,afterChange:i}=this.$props,{state:a,nextState:l}=Gne(y(y(y({index:e},this.$props),this.$data),{trackRef:this.track,useCSS:this.useCSS&&!t}));if(!a)return;o&&o(this.currentSlide,a.currentSlide);const s=a.lazyLoadedList.filter(u=>this.lazyLoadedList.indexOf(u)<0);this.$attrs.onLazyLoad&&s.length>0&&this.__emit("lazyLoad",s),!this.$props.waitForAnimate&&this.animationEndCallback&&(clearTimeout(this.animationEndCallback),i&&i(this.currentSlide),delete this.animationEndCallback),this.setState(a,()=>{n&&this.asNavForIndex!==e&&(this.asNavForIndex=e,n.innerSlider.slideHandler(e)),l&&(this.animationEndCallback=setTimeout(()=>{const{animating:u}=l,c=loe(l,["animating"]);this.setState(c,()=>{this.callbackTimers.push(setTimeout(()=>this.setState({animating:u}),10)),i&&i(a.currentSlide),delete this.animationEndCallback})},r))})},changeSlide(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=y(y({},this.$props),this.$data),o=Xne(n,e);if(!(o!==0&&!o)&&(t===!0?this.slideHandler(o,t):this.slideHandler(o),this.$props.autoplay&&this.handleAutoPlay("update"),this.$props.focusOnSelect)){const r=this.list.querySelectorAll(".slick-current");r[0]&&r[0].focus()}},clickHandler(e){this.clickable===!1&&(e.stopPropagation(),e.preventDefault()),this.clickable=!0},keyHandler(e){const t=Yne(e,this.accessibility,this.rtl);t!==""&&this.changeSlide({message:t})},selectHandler(e){this.changeSlide(e)},disableBodyScroll(){const e=t=>{t=t||window.event,t.preventDefault&&t.preventDefault(),t.returnValue=!1};window.ontouchmove=e},enableBodyScroll(){window.ontouchmove=null},swipeStart(e){this.verticalSwiping&&this.disableBodyScroll();const t=qne(e,this.swipe,this.draggable);t!==""&&this.setState(t)},swipeMove(e){const t=Jne(e,y(y(y({},this.$props),this.$data),{trackRef:this.track,listRef:this.list,slideIndex:this.currentSlide}));t&&(t.swiping&&(this.clickable=!1),this.setState(t))},swipeEnd(e){const t=Zne(e,y(y(y({},this.$props),this.$data),{trackRef:this.track,listRef:this.list,slideIndex:this.currentSlide}));if(!t)return;const n=t.triggerSlideHandler;delete t.triggerSlideHandler,this.setState(t),n!==void 0&&(this.slideHandler(n),this.$props.verticalSwiping&&this.enableBodyScroll())},touchEnd(e){this.swipeEnd(e),this.clickable=!0},slickPrev(){this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"previous"}),0))},slickNext(){this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"next"}),0))},slickGoTo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e=Number(e),isNaN(e))return"";this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"index",index:e,currentSlide:this.currentSlide},t),0))},play(){let e;if(this.rtl)e=this.currentSlide-this.slidesToScroll;else if(im(y(y({},this.$props),this.$data)))e=this.currentSlide+this.slidesToScroll;else return!1;this.slideHandler(e)},handleAutoPlay(e){this.autoplayTimer&&clearInterval(this.autoplayTimer);const t=this.autoplaying;if(e==="update"){if(t==="hovered"||t==="focused"||t==="paused")return}else if(e==="leave"){if(t==="paused"||t==="focused")return}else if(e==="blur"&&(t==="paused"||t==="hovered"))return;this.autoplayTimer=setInterval(this.play,this.autoplaySpeed+50),this.setState({autoplaying:"playing"})},pause(e){this.autoplayTimer&&(clearInterval(this.autoplayTimer),this.autoplayTimer=null);const t=this.autoplaying;e==="paused"?this.setState({autoplaying:"paused"}):e==="focused"?(t==="hovered"||t==="playing")&&this.setState({autoplaying:"focused"}):t==="playing"&&this.setState({autoplaying:"hovered"})},onDotsOver(){this.autoplay&&this.pause("hovered")},onDotsLeave(){this.autoplay&&this.autoplaying==="hovered"&&this.handleAutoPlay("leave")},onTrackOver(){this.autoplay&&this.pause("hovered")},onTrackLeave(){this.autoplay&&this.autoplaying==="hovered"&&this.handleAutoPlay("leave")},onSlideFocus(){this.autoplay&&this.pause("focused")},onSlideBlur(){this.autoplay&&this.autoplaying==="focused"&&this.handleAutoPlay("blur")},customPaging(e){let{i:t}=e;return g("button",null,[t+1])},appendDots(e){let{dots:t}=e;return g("ul",{style:{display:"block"}},[t])}},render(){const e=ge("slick-slider",this.$attrs.class,{"slick-vertical":this.vertical,"slick-initialized":!0}),t=y(y({},this.$props),this.$data);let n=V0(t,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding","targetSlide","useCSS"]);const{pauseOnHover:o}=this.$props;n=y(y({},n),{focusOnSelect:this.focusOnSelect&&this.clickable?this.selectHandler:null,ref:this.trackRefHandler,onMouseleave:o?this.onTrackLeave:Ho,onMouseover:o?this.onTrackOver:Ho});let r;if(this.dots===!0&&this.slideCount>=this.slidesToShow){let m=V0(t,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","infinite","appendDots"]);m.customPaging=this.customPaging,m.appendDots=this.appendDots;const{customPaging:b,appendDots:S}=this.$slots;b&&(m.customPaging=b),S&&(m.appendDots=S);const{pauseOnDotsHover:C}=this.$props;m=y(y({},m),{clickHandler:this.changeSlide,onMouseover:C?this.onDotsOver:Ho,onMouseleave:C?this.onDotsLeave:Ho}),r=g(W5,m,null)}let i,a;const l=V0(t,["infinite","centerMode","currentSlide","slideCount","slidesToShow"]);l.clickHandler=this.changeSlide;const{prevArrow:s,nextArrow:u}=this.$slots;s&&(l.prevArrow=s),u&&(l.nextArrow=u),this.arrows&&(i=g(U5,l,null),a=g(G5,l,null));let c=null;this.vertical&&(c={height:typeof this.listHeight=="number"?`${this.listHeight}px`:this.listHeight});let d=null;this.vertical===!1?this.centerMode===!0&&(d={padding:"0px "+this.centerPadding}):this.centerMode===!0&&(d={padding:this.centerPadding+" 0px"});const f=y(y({},c),d),p=this.touchMove;let v={ref:this.listRefHandler,class:"slick-list",style:f,onClick:this.clickHandler,onMousedown:p?this.swipeStart:Ho,onMousemove:this.dragging&&p?this.swipeMove:Ho,onMouseup:p?this.swipeEnd:Ho,onMouseleave:this.dragging&&p?this.swipeEnd:Ho,[hn?"onTouchstartPassive":"onTouchstart"]:p?this.swipeStart:Ho,[hn?"onTouchmovePassive":"onTouchmove"]:this.dragging&&p?this.swipeMove:Ho,onTouchend:p?this.touchEnd:Ho,onTouchcancel:this.dragging&&p?this.swipeEnd:Ho,onKeydown:this.accessibility?this.keyHandler:Ho},h={class:e,dir:"ltr",style:this.$attrs.style};return this.unslick&&(v={class:"slick-list",ref:this.listRefHandler},h={class:e}),g("div",h,[this.unslick?"":i,g("div",v,[g(j5,n,{default:()=>[this.children]})]),this.unslick?"":a,this.unslick?"":r])}},coe=le({name:"Slider",mixins:[ls],inheritAttrs:!1,props:y({},L5),data(){return this._responsiveMediaHandlers=[],{breakpoint:null}},mounted(){if(this.responsive){const e=this.responsive.map(n=>n.breakpoint);e.sort((n,o)=>n-o),e.forEach((n,o)=>{let r;o===0?r=W0({minWidth:0,maxWidth:n}):r=W0({minWidth:e[o-1]+1,maxWidth:n}),SI()&&this.media(r,()=>{this.setState({breakpoint:n})})});const t=W0({minWidth:e.slice(-1)[0]});SI()&&this.media(t,()=>{this.setState({breakpoint:null})})}},beforeUnmount(){this._responsiveMediaHandlers.forEach(function(e){e.mql.removeListener(e.listener)})},methods:{innerSliderRefHandler(e){this.innerSlider=e},media(e,t){const n=window.matchMedia(e),o=r=>{let{matches:i}=r;i&&t()};n.addListener(o),o(n),this._responsiveMediaHandlers.push({mql:n,query:e,listener:o})},slickPrev(){var e;(e=this.innerSlider)===null||e===void 0||e.slickPrev()},slickNext(){var e;(e=this.innerSlider)===null||e===void 0||e.slickNext()},slickGoTo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var n;(n=this.innerSlider)===null||n===void 0||n.slickGoTo(e,t)},slickPause(){var e;(e=this.innerSlider)===null||e===void 0||e.pause("paused")},slickPlay(){var e;(e=this.innerSlider)===null||e===void 0||e.handleAutoPlay("play")}},render(){var e;let t,n;this.breakpoint?(n=this.responsive.filter(l=>l.breakpoint===this.breakpoint),t=n[0].settings==="unslick"?"unslick":y(y({},this.$props),n[0].settings)):t=y({},this.$props),t.centerMode&&(t.slidesToScroll>1,t.slidesToScroll=1),t.fade&&(t.slidesToShow>1,t.slidesToScroll>1,t.slidesToShow=1,t.slidesToScroll=1);let o=hv(this)||[];o=o.filter(l=>typeof l=="string"?!!l.trim():!!l),t.variableWidth&&(t.rows>1||t.slidesPerRow>1)&&(console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"),t.variableWidth=!1);const r=[];let i=null;for(let l=0;l=o.length));d+=1)c.push(mt(o[d],{key:100*l+10*u+d,tabindex:-1,style:{width:`${100/t.slidesPerRow}%`,display:"inline-block"}}));s.push(g("div",{key:10*l+u},[c]))}t.variableWidth?r.push(g("div",{key:l,style:{width:i}},[s])):r.push(g("div",{key:l},[s]))}if(t==="unslick"){const l="regular slider "+(this.className||"");return g("div",{class:l},[o])}else r.length<=t.slidesToShow&&(t.unslick=!0);const a=y(y(y({},this.$attrs),t),{children:r,ref:this.innerSliderRefHandler});return g(soe,k(k({},a),{},{__propsSymbol__:[]}),this.$slots)}}),uoe=e=>{const{componentCls:t,antCls:n,carouselArrowSize:o,carouselDotOffset:r,marginXXS:i}=e,a=-o*1.25,l=i;return{[t]:y(y({},qe(e)),{".slick-slider":{position:"relative",display:"block",boxSizing:"border-box",touchAction:"pan-y",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",".slick-track, .slick-list":{transform:"translate3d(0, 0, 0)",touchAction:"pan-y"}},".slick-list":{position:"relative",display:"block",margin:0,padding:0,overflow:"hidden","&:focus":{outline:"none"},"&.dragging":{cursor:"pointer"},".slick-slide":{pointerEvents:"none",[`input${n}-radio-input, input${n}-checkbox-input`]:{visibility:"hidden"},"&.slick-active":{pointerEvents:"auto",[`input${n}-radio-input, input${n}-checkbox-input`]:{visibility:"visible"}},"> div > div":{verticalAlign:"bottom"}}},".slick-track":{position:"relative",top:0,insetInlineStart:0,display:"block","&::before, &::after":{display:"table",content:'""'},"&::after":{clear:"both"}},".slick-slide":{display:"none",float:"left",height:"100%",minHeight:1,img:{display:"block"},"&.dragging img":{pointerEvents:"none"}},".slick-initialized .slick-slide":{display:"block"},".slick-vertical .slick-slide":{display:"block",height:"auto"},".slick-arrow.slick-hidden":{display:"none"},".slick-prev, .slick-next":{position:"absolute",top:"50%",display:"block",width:o,height:o,marginTop:-o/2,padding:0,color:"transparent",fontSize:0,lineHeight:0,background:"transparent",border:0,outline:"none",cursor:"pointer","&:hover, &:focus":{color:"transparent",background:"transparent",outline:"none","&::before":{opacity:1}},"&.slick-disabled::before":{opacity:.25}},".slick-prev":{insetInlineStart:a,"&::before":{content:'"←"'}},".slick-next":{insetInlineEnd:a,"&::before":{content:'"→"'}},".slick-dots":{position:"absolute",insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:15,display:"flex !important",justifyContent:"center",paddingInlineStart:0,listStyle:"none","&-bottom":{bottom:r},"&-top":{top:r,bottom:"auto"},li:{position:"relative",display:"inline-block",flex:"0 1 auto",boxSizing:"content-box",width:e.dotWidth,height:e.dotHeight,marginInline:l,padding:0,textAlign:"center",textIndent:-999,verticalAlign:"top",transition:`all ${e.motionDurationSlow}`,button:{position:"relative",display:"block",width:"100%",height:e.dotHeight,padding:0,color:"transparent",fontSize:0,background:e.colorBgContainer,border:0,borderRadius:1,outline:"none",cursor:"pointer",opacity:.3,transition:`all ${e.motionDurationSlow}`,"&: hover, &:focus":{opacity:.75},"&::after":{position:"absolute",inset:-l,content:'""'}},"&.slick-active":{width:e.dotWidthActive,"& button":{background:e.colorBgContainer,opacity:1},"&: hover, &:focus":{opacity:1}}}}})}},doe=e=>{const{componentCls:t,carouselDotOffset:n,marginXXS:o}=e,r={width:e.dotHeight,height:e.dotWidth};return{[`${t}-vertical`]:{".slick-dots":{top:"50%",bottom:"auto",flexDirection:"column",width:e.dotHeight,height:"auto",margin:0,transform:"translateY(-50%)","&-left":{insetInlineEnd:"auto",insetInlineStart:n},"&-right":{insetInlineEnd:n,insetInlineStart:"auto"},li:y(y({},r),{margin:`${o}px 0`,verticalAlign:"baseline",button:r,"&.slick-active":y(y({},r),{button:r})})}}}},foe=e=>{const{componentCls:t}=e;return[{[`${t}-rtl`]:{direction:"rtl",".slick-dots":{[`${t}-rtl&`]:{flexDirection:"row-reverse"}}}},{[`${t}-vertical`]:{".slick-dots":{[`${t}-rtl&`]:{flexDirection:"column"}}}}]},poe=Ue("Carousel",e=>{const{controlHeightLG:t,controlHeightSM:n}=e,o=Be(e,{carouselArrowSize:t/2,carouselDotOffset:n/2});return[uoe(o),doe(o),foe(o)]},{dotWidth:16,dotHeight:3,dotWidthActive:24});var goe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({effect:Ne(),dots:$e(!0),vertical:$e(),autoplay:$e(),easing:String,beforeChange:ye(),afterChange:ye(),prefixCls:String,accessibility:$e(),nextArrow:K.any,prevArrow:K.any,pauseOnHover:$e(),adaptiveHeight:$e(),arrows:$e(!1),autoplaySpeed:Number,centerMode:$e(),centerPadding:String,cssEase:String,dotsClass:String,draggable:$e(!1),fade:$e(),focusOnSelect:$e(),infinite:$e(),initialSlide:Number,lazyLoad:Ne(),rtl:$e(),slide:String,slidesToShow:Number,slidesToScroll:Number,speed:Number,swipe:$e(),swipeToSlide:$e(),swipeEvent:ye(),touchMove:$e(),touchThreshold:Number,variableWidth:$e(),useCSS:$e(),slickGoTo:Number,responsive:Array,dotPosition:Ne(),verticalSwiping:$e(!1)}),voe=le({compatConfig:{MODE:3},name:"ACarousel",inheritAttrs:!1,props:hoe(),setup(e,t){let{slots:n,attrs:o,expose:r}=t;const i=ae();r({goTo:function(v){let h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var m;(m=i.value)===null||m===void 0||m.slickGoTo(v,h)},autoplay:v=>{var h,m;(m=(h=i.value)===null||h===void 0?void 0:h.innerSlider)===null||m===void 0||m.handleAutoPlay(v)},prev:()=>{var v;(v=i.value)===null||v===void 0||v.slickPrev()},next:()=>{var v;(v=i.value)===null||v===void 0||v.slickNext()},innerSlider:E(()=>{var v;return(v=i.value)===null||v===void 0?void 0:v.innerSlider})}),Ve(()=>{Yo(e.vertical===void 0)});const{prefixCls:l,direction:s}=Te("carousel",e),[u,c]=poe(l),d=E(()=>e.dotPosition?e.dotPosition:e.vertical!==void 0&&e.vertical?"right":"bottom"),f=E(()=>d.value==="left"||d.value==="right"),p=E(()=>{const v="slick-dots";return ge({[v]:!0,[`${v}-${d.value}`]:!0,[`${e.dotsClass}`]:!!e.dotsClass})});return()=>{const{dots:v,arrows:h,draggable:m,effect:b}=e,{class:S,style:C}=o,$=goe(o,["class","style"]),x=b==="fade"?!0:e.fade,P=ge(l.value,{[`${l.value}-rtl`]:s.value==="rtl",[`${l.value}-vertical`]:f.value,[`${S}`]:!!S},c.value);return u(g("div",{class:P,style:C},[g(coe,k(k(k({ref:i},e),$),{},{dots:!!v,dotsClass:p.value,arrows:h,draggable:m,fade:x,vertical:f.value}),n)]))}}}),moe=Lt(voe),Tx="__RC_CASCADER_SPLIT__",X5="SHOW_PARENT",Y5="SHOW_CHILD";function Da(e){return e.join(Tx)}function Ks(e){return e.map(Da)}function boe(e){return e.split(Tx)}function yoe(e){const{label:t,value:n,children:o}=e||{},r=n||"value";return{label:t||"label",value:r,key:r,children:o||"children"}}function Nu(e,t){var n,o;return(n=e.isLeaf)!==null&&n!==void 0?n:!(!((o=e[t.children])===null||o===void 0)&&o.length)}function Soe(e){const t=e.parentElement;if(!t)return;const n=e.offsetTop-t.offsetTop;n-t.scrollTop<0?t.scrollTo({top:n}):n+e.offsetHeight-t.scrollTop>t.offsetHeight&&t.scrollTo({top:n+e.offsetHeight-t.offsetHeight})}const q5=Symbol("TreeContextKey"),Coe=le({compatConfig:{MODE:3},name:"TreeContext",props:{value:{type:Object}},setup(e,t){let{slots:n}=t;return Xe(q5,E(()=>e.value)),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),Ex=()=>ze(q5,E(()=>({}))),J5=Symbol("KeysStateKey"),xoe=e=>{Xe(J5,e)},Z5=()=>ze(J5,{expandedKeys:se([]),selectedKeys:se([]),loadedKeys:se([]),loadingKeys:se([]),checkedKeys:se([]),halfCheckedKeys:se([]),expandedKeysSet:E(()=>new Set),selectedKeysSet:E(()=>new Set),loadedKeysSet:E(()=>new Set),loadingKeysSet:E(()=>new Set),checkedKeysSet:E(()=>new Set),halfCheckedKeysSet:E(()=>new Set),flattenNodes:se([])}),$oe=e=>{let{prefixCls:t,level:n,isStart:o,isEnd:r}=e;const i=`${t}-indent-unit`,a=[];for(let l=0;l({prefixCls:String,focusable:{type:Boolean,default:void 0},activeKey:[Number,String],tabindex:Number,children:K.any,treeData:{type:Array},fieldNames:{type:Object},showLine:{type:[Boolean,Object],default:void 0},showIcon:{type:Boolean,default:void 0},icon:K.any,selectable:{type:Boolean,default:void 0},expandAction:[String,Boolean],disabled:{type:Boolean,default:void 0},multiple:{type:Boolean,default:void 0},checkable:{type:Boolean,default:void 0},checkStrictly:{type:Boolean,default:void 0},draggable:{type:[Function,Boolean]},defaultExpandParent:{type:Boolean,default:void 0},autoExpandParent:{type:Boolean,default:void 0},defaultExpandAll:{type:Boolean,default:void 0},defaultExpandedKeys:{type:Array},expandedKeys:{type:Array},defaultCheckedKeys:{type:Array},checkedKeys:{type:[Object,Array]},defaultSelectedKeys:{type:Array},selectedKeys:{type:Array},allowDrop:{type:Function},dropIndicatorRender:{type:Function},onFocus:{type:Function},onBlur:{type:Function},onKeydown:{type:Function},onContextmenu:{type:Function},onClick:{type:Function},onDblclick:{type:Function},onScroll:{type:Function},onExpand:{type:Function},onCheck:{type:Function},onSelect:{type:Function},onLoad:{type:Function},loadData:{type:Function},loadedKeys:{type:Array},onMouseenter:{type:Function},onMouseleave:{type:Function},onRightClick:{type:Function},onDragstart:{type:Function},onDragenter:{type:Function},onDragover:{type:Function},onDragleave:{type:Function},onDragend:{type:Function},onDrop:{type:Function},onActiveChange:{type:Function},filterTreeNode:{type:Function},motion:K.any,switcherIcon:K.any,height:Number,itemHeight:Number,virtual:{type:Boolean,default:void 0},direction:{type:String},rootClassName:String,rootStyle:Object});var Poe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r"`v-slot:"+ce+"` ")}`;const i=se(!1),a=Ex(),{expandedKeysSet:l,selectedKeysSet:s,loadedKeysSet:u,loadingKeysSet:c,checkedKeysSet:d,halfCheckedKeysSet:f}=Z5(),{dragOverNodeKey:p,dropPosition:v,keyEntities:h}=a.value,m=E(()=>qp(e.eventKey,{expandedKeysSet:l.value,selectedKeysSet:s.value,loadedKeysSet:u.value,loadingKeysSet:c.value,checkedKeysSet:d.value,halfCheckedKeysSet:f.value,dragOverNodeKey:p,dropPosition:v,keyEntities:h})),b=Vo(()=>m.value.expanded),S=Vo(()=>m.value.selected),C=Vo(()=>m.value.checked),$=Vo(()=>m.value.loaded),x=Vo(()=>m.value.loading),P=Vo(()=>m.value.halfChecked),w=Vo(()=>m.value.dragOver),O=Vo(()=>m.value.dragOverGapTop),I=Vo(()=>m.value.dragOverGapBottom),_=Vo(()=>m.value.pos),T=se(),A=E(()=>{const{eventKey:ce}=e,{keyEntities:ee}=a.value,{children:ue}=ee[ce]||{};return!!(ue||[]).length}),R=E(()=>{const{isLeaf:ce}=e,{loadData:ee}=a.value,ue=A.value;return ce===!1?!1:ce||!ee&&!ue||ee&&$.value&&!ue}),H=E(()=>R.value?null:b.value?CI:xI),M=E(()=>{const{disabled:ce}=e,{disabled:ee}=a.value;return!!(ee||ce)}),D=E(()=>{const{checkable:ce}=e,{checkable:ee}=a.value;return!ee||ce===!1?!1:ee}),N=E(()=>{const{selectable:ce}=e,{selectable:ee}=a.value;return typeof ce=="boolean"?ce:ee}),L=E(()=>{const{data:ce,active:ee,checkable:ue,disableCheckbox:xe,disabled:Pe,selectable:_e}=e;return y(y({active:ee,checkable:ue,disableCheckbox:xe,disabled:Pe,selectable:_e},ce),{dataRef:ce,data:ce,isLeaf:R.value,checked:C.value,expanded:b.value,loading:x.value,selected:S.value,halfChecked:P.value})}),F=Jt(),B=E(()=>{const{eventKey:ce}=e,{keyEntities:ee}=a.value,{parent:ue}=ee[ce]||{};return y(y({},Jp(y({},e,m.value))),{parent:ue})}),j=rt({eventData:B,eventKey:E(()=>e.eventKey),selectHandle:T,pos:_,key:F.vnode.key});r(j);const z=ce=>{const{onNodeDoubleClick:ee}=a.value;ee(ce,B.value)},G=ce=>{if(M.value)return;const{onNodeSelect:ee}=a.value;ce.preventDefault(),ee(ce,B.value)},Q=ce=>{if(M.value)return;const{disableCheckbox:ee}=e,{onNodeCheck:ue}=a.value;if(!D.value||ee)return;ce.preventDefault();const xe=!C.value;ue(ce,B.value,xe)},Y=ce=>{const{onNodeClick:ee}=a.value;ee(ce,B.value),N.value?G(ce):Q(ce)},oe=ce=>{const{onNodeMouseEnter:ee}=a.value;ee(ce,B.value)},Z=ce=>{const{onNodeMouseLeave:ee}=a.value;ee(ce,B.value)},re=ce=>{const{onNodeContextMenu:ee}=a.value;ee(ce,B.value)},ne=ce=>{const{onNodeDragStart:ee}=a.value;ce.stopPropagation(),i.value=!0,ee(ce,j);try{ce.dataTransfer.setData("text/plain","")}catch{}},X=ce=>{const{onNodeDragEnter:ee}=a.value;ce.preventDefault(),ce.stopPropagation(),ee(ce,j)},te=ce=>{const{onNodeDragOver:ee}=a.value;ce.preventDefault(),ce.stopPropagation(),ee(ce,j)},W=ce=>{const{onNodeDragLeave:ee}=a.value;ce.stopPropagation(),ee(ce,j)},U=ce=>{const{onNodeDragEnd:ee}=a.value;ce.stopPropagation(),i.value=!1,ee(ce,j)},J=ce=>{const{onNodeDrop:ee}=a.value;ce.preventDefault(),ce.stopPropagation(),i.value=!1,ee(ce,j)},de=ce=>{const{onNodeExpand:ee}=a.value;x.value||ee(ce,B.value)},fe=()=>{const{data:ce}=e,{draggable:ee}=a.value;return!!(ee&&(!ee.nodeDraggable||ee.nodeDraggable(ce)))},pe=()=>{const{draggable:ce,prefixCls:ee}=a.value;return ce&&(ce!=null&&ce.icon)?g("span",{class:`${ee}-draggable-icon`},[ce.icon]):null},ve=()=>{var ce,ee,ue;const{switcherIcon:xe=o.switcherIcon||((ce=a.value.slots)===null||ce===void 0?void 0:ce[(ue=(ee=e.data)===null||ee===void 0?void 0:ee.slots)===null||ue===void 0?void 0:ue.switcherIcon])}=e,{switcherIcon:Pe}=a.value,_e=xe||Pe;return typeof _e=="function"?_e(L.value):_e},he=()=>{const{loadData:ce,onNodeLoad:ee}=a.value;x.value||ce&&b.value&&!R.value&&!A.value&&!$.value&&ee(B.value)};Ke(()=>{he()}),uo(()=>{he()});const V=()=>{const{prefixCls:ce}=a.value,ee=ve();if(R.value)return ee!==!1?g("span",{class:ge(`${ce}-switcher`,`${ce}-switcher-noop`)},[ee]):null;const ue=ge(`${ce}-switcher`,`${ce}-switcher_${b.value?CI:xI}`);return ee!==!1?g("span",{onClick:de,class:ue},[ee]):null},q=()=>{var ce,ee;const{disableCheckbox:ue}=e,{prefixCls:xe}=a.value,Pe=M.value;return D.value?g("span",{class:ge(`${xe}-checkbox`,C.value&&`${xe}-checkbox-checked`,!C.value&&P.value&&`${xe}-checkbox-indeterminate`,(Pe||ue)&&`${xe}-checkbox-disabled`),onClick:Q},[(ee=(ce=a.value).customCheckable)===null||ee===void 0?void 0:ee.call(ce)]):null},ie=()=>{const{prefixCls:ce}=a.value;return g("span",{class:ge(`${ce}-iconEle`,`${ce}-icon__${H.value||"docu"}`,x.value&&`${ce}-icon_loading`)},null)},me=()=>{const{disabled:ce,eventKey:ee}=e,{draggable:ue,dropLevelOffset:xe,dropPosition:Pe,prefixCls:_e,indent:Ce,dropIndicatorRender:we,dragOverNodeKey:Oe,direction:Me}=a.value;return!ce&&ue!==!1&&Oe===ee?we({dropPosition:Pe,dropLevelOffset:xe,indent:Ce,prefixCls:_e,direction:Me}):null},Se=()=>{var ce,ee,ue,xe,Pe,_e;const{icon:Ce=o.icon,data:we}=e,Oe=o.title||((ce=a.value.slots)===null||ce===void 0?void 0:ce[(ue=(ee=e.data)===null||ee===void 0?void 0:ee.slots)===null||ue===void 0?void 0:ue.title])||((xe=a.value.slots)===null||xe===void 0?void 0:xe.title)||e.title,{prefixCls:Me,showIcon:Re,icon:Ae,loadData:Fe}=a.value,lt=M.value,bt=`${Me}-node-content-wrapper`;let ft;if(Re){const fn=Ce||((Pe=a.value.slots)===null||Pe===void 0?void 0:Pe[(_e=we==null?void 0:we.slots)===null||_e===void 0?void 0:_e.icon])||Ae;ft=fn?g("span",{class:ge(`${Me}-iconEle`,`${Me}-icon__customize`)},[typeof fn=="function"?fn(L.value):fn]):ie()}else Fe&&x.value&&(ft=ie());let yt;typeof Oe=="function"?yt=Oe(L.value):yt=Oe,yt=yt===void 0?Ooe:yt;const Ct=g("span",{class:`${Me}-title`},[yt]);return g("span",{ref:T,title:typeof Oe=="string"?Oe:"",class:ge(`${bt}`,`${bt}-${H.value||"normal"}`,!lt&&(S.value||i.value)&&`${Me}-node-selected`),onMouseenter:oe,onMouseleave:Z,onContextmenu:re,onClick:Y,onDblclick:z},[ft,Ct,me()])};return()=>{const ce=y(y({},e),n),{eventKey:ee,isLeaf:ue,isStart:xe,isEnd:Pe,domRef:_e,active:Ce,data:we,onMousemove:Oe,selectable:Me}=ce,Re=Poe(ce,["eventKey","isLeaf","isStart","isEnd","domRef","active","data","onMousemove","selectable"]),{prefixCls:Ae,filterTreeNode:Fe,keyEntities:lt,dropContainerKey:bt,dropTargetKey:ft,draggingNodeKey:yt}=a.value,Ct=M.value,fn=Ua(Re,{aria:!0,data:!0}),{level:yn}=lt[ee]||{},On=Pe[Pe.length-1],tn=fe(),Qn=!Ct&&tn,Oo=yt===ee,er=Me!==void 0?{"aria-selected":!!Me}:void 0;return g("div",k(k({ref:_e,class:ge(n.class,`${Ae}-treenode`,{[`${Ae}-treenode-disabled`]:Ct,[`${Ae}-treenode-switcher-${b.value?"open":"close"}`]:!ue,[`${Ae}-treenode-checkbox-checked`]:C.value,[`${Ae}-treenode-checkbox-indeterminate`]:P.value,[`${Ae}-treenode-selected`]:S.value,[`${Ae}-treenode-loading`]:x.value,[`${Ae}-treenode-active`]:Ce,[`${Ae}-treenode-leaf-last`]:On,[`${Ae}-treenode-draggable`]:Qn,dragging:Oo,"drop-target":ft===ee,"drop-container":bt===ee,"drag-over":!Ct&&w.value,"drag-over-gap-top":!Ct&&O.value,"drag-over-gap-bottom":!Ct&&I.value,"filter-node":Fe&&Fe(B.value)}),style:n.style,draggable:Qn,"aria-grabbed":Oo,onDragstart:Qn?ne:void 0,onDragenter:tn?X:void 0,onDragover:tn?te:void 0,onDragleave:tn?W:void 0,onDrop:tn?J:void 0,onDragend:tn?U:void 0,onMousemove:Oe},er),fn),[g($oe,{prefixCls:Ae,level:yn,isStart:xe,isEnd:Pe},null),pe(),V(),q(),Se()])}}});function ni(e,t){if(!e)return[];const n=e.slice(),o=n.indexOf(t);return o>=0&&n.splice(o,1),n}function _i(e,t){const n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function _x(e){return e.split("-")}function tR(e,t){return`${e}-${t}`}function Ioe(e){return e&&e.type&&e.type.isTreeNode}function Toe(e,t){const n=[],o=t[e];function r(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).forEach(a=>{let{key:l,children:s}=a;n.push(l),r(s)})}return r(o.children),n}function Eoe(e){if(e.parent){const t=_x(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function _oe(e){const t=_x(e.pos);return Number(t[t.length-1])===0}function $I(e,t,n,o,r,i,a,l,s,u){var c;const{clientX:d,clientY:f}=e,{top:p,height:v}=e.target.getBoundingClientRect(),m=((u==="rtl"?-1:1)*(((r==null?void 0:r.x)||0)-d)-12)/o;let b=l[n.eventKey];if(fR.key===b.key),T=_<=0?0:_-1,A=a[T].key;b=l[A]}const S=b.key,C=b,$=b.key;let x=0,P=0;if(!s.has(S))for(let _=0;_-1.5?i({dragNode:w,dropNode:O,dropPosition:1})?x=1:I=!1:i({dragNode:w,dropNode:O,dropPosition:0})?x=0:i({dragNode:w,dropNode:O,dropPosition:1})?x=1:I=!1:i({dragNode:w,dropNode:O,dropPosition:1})?x=1:I=!1,{dropPosition:x,dropLevelOffset:P,dropTargetKey:b.key,dropTargetPos:b.pos,dragOverNodeKey:$,dropContainerKey:x===0?null:((c=b.parent)===null||c===void 0?void 0:c.key)||null,dropAllowed:I}}function wI(e,t){if(!e)return;const{multiple:n}=t;return n?e.slice():e.length?[e[0]]:e}function G0(e){if(!e)return null;let t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(typeof e=="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return null;return t}function n1(e,t){const n=new Set;function o(r){if(n.has(r))return;const i=t[r];if(!i)return;n.add(r);const{parent:a,node:l}=i;l.disabled||a&&o(a.key)}return(e||[]).forEach(r=>{o(r)}),[...n]}var Moe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r0&&arguments[0]!==void 0?arguments[0]:[];return zt(n).map(r=>{var i,a,l,s;if(!Ioe(r))return null;const u=r.children||{},c=r.key,d={};for(const[_,T]of Object.entries(r.props))d[Kc(_)]=T;const{isLeaf:f,checkable:p,selectable:v,disabled:h,disableCheckbox:m}=d,b={isLeaf:f||f===""||void 0,checkable:p||p===""||void 0,selectable:v||v===""||void 0,disabled:h||h===""||void 0,disableCheckbox:m||m===""||void 0},S=y(y({},d),b),{title:C=(i=u.title)===null||i===void 0?void 0:i.call(u,S),icon:$=(a=u.icon)===null||a===void 0?void 0:a.call(u,S),switcherIcon:x=(l=u.switcherIcon)===null||l===void 0?void 0:l.call(u,S)}=d,P=Moe(d,["title","icon","switcherIcon"]),w=(s=u.default)===null||s===void 0?void 0:s.call(u),O=y(y(y({},P),{title:C,icon:$,switcherIcon:x,key:c,isLeaf:f}),b),I=t(w);return I.length&&(O.children=I),O})}return t(e)}function Aoe(e,t,n){const{_title:o,key:r,children:i}=am(n),a=new Set(t===!0?[]:t),l=[];function s(u){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return u.map((d,f)=>{const p=tR(c?c.pos:"0",f),v=Of(d[r],p);let h;for(let b=0;bf[i]:typeof i=="function"&&(c=f=>i(f)):c=(f,p)=>Of(f[l],p);function d(f,p,v,h){const m=f?f[u]:e,b=f?tR(v.pos,p):"0",S=f?[...h,f]:[];if(f){const C=c(f,b),$={node:f,index:p,pos:b,key:C,parentPos:v.node?v.pos:null,level:v.level+1,nodes:S};t($)}m&&m.forEach((C,$)=>{d(C,$,{node:f,pos:b,level:v?v.level+1:-1},S)})}d(null)}function If(e){let{initWrapper:t,processEntity:n,onProcessFinished:o,externalGetKey:r,childrenPropName:i,fieldNames:a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=arguments.length>2?arguments[2]:void 0;const s=r||l,u={},c={};let d={posEntities:u,keyEntities:c};return t&&(d=t(d)||d),Roe(e,f=>{const{node:p,index:v,pos:h,key:m,parentPos:b,level:S,nodes:C}=f,$={node:p,nodes:C,index:v,key:m,pos:h,level:S},x=Of(m,h);u[h]=$,c[x]=$,$.parent=u[b],$.parent&&($.parent.children=$.parent.children||[],$.parent.children.push($)),n&&n($,d)},{externalGetKey:s,childrenPropName:i,fieldNames:a}),o&&o(d),d}function qp(e,t){let{expandedKeysSet:n,selectedKeysSet:o,loadedKeysSet:r,loadingKeysSet:i,checkedKeysSet:a,halfCheckedKeysSet:l,dragOverNodeKey:s,dropPosition:u,keyEntities:c}=t;const d=c[e];return{eventKey:e,expanded:n.has(e),selected:o.has(e),loaded:r.has(e),loading:i.has(e),checked:a.has(e),halfChecked:l.has(e),pos:String(d?d.pos:""),parent:d.parent,dragOver:s===e&&u===0,dragOverGapTop:s===e&&u===-1,dragOverGapBottom:s===e&&u===1}}function Jp(e){const{data:t,expanded:n,selected:o,checked:r,loaded:i,loading:a,halfChecked:l,dragOver:s,dragOverGapTop:u,dragOverGapBottom:c,pos:d,active:f,eventKey:p}=e,v=y(y({dataRef:t},t),{expanded:n,selected:o,checked:r,loaded:i,loading:a,halfChecked:l,dragOver:s,dragOverGapTop:u,dragOverGapBottom:c,pos:d,active:f,eventKey:p,key:p});return"props"in v||Object.defineProperty(v,"props",{get(){return e}}),v}const Doe=(e,t)=>E(()=>If(e.value,{fieldNames:t.value,initWrapper:o=>y(y({},o),{pathKeyEntities:{}}),processEntity:(o,r)=>{const i=o.nodes.map(a=>a[t.value.value]).join(Tx);r.pathKeyEntities[i]=o,o.key=i}}).pathKeyEntities);function Noe(e){const t=se(!1),n=ae({});return Ve(()=>{if(!e.value){t.value=!1,n.value={};return}let o={matchInputWidth:!0,limit:50};e.value&&typeof e.value=="object"&&(o=y(y({},o),e.value)),o.limit<=0&&delete o.limit,t.value=!0,n.value=o}),{showSearch:t,searchConfig:n}}const id="__rc_cascader_search_mark__",koe=(e,t,n)=>{let{label:o}=n;return t.some(r=>String(r[o]).toLowerCase().includes(e.toLowerCase()))},Loe=e=>{let{path:t,fieldNames:n}=e;return t.map(o=>o[n.label]).join(" / ")},Foe=(e,t,n,o,r,i)=>E(()=>{const{filter:a=koe,render:l=Loe,limit:s=50,sort:u}=r.value,c=[];if(!e.value)return[];function d(f,p){f.forEach(v=>{if(!u&&s>0&&c.length>=s)return;const h=[...p,v],m=v[n.value.children];(!m||m.length===0||i.value)&&a(e.value,h,{label:n.value.label})&&c.push(y(y({},v),{[n.value.label]:l({inputValue:e.value,path:h,prefixCls:o.value,fieldNames:n.value}),[id]:h})),m&&d(v[n.value.children],h)})}return d(t.value,[]),u&&c.sort((f,p)=>u(f[id],p[id],e.value,n.value)),s>0?c.slice(0,s):c});function PI(e,t,n){const o=new Set(e);return e.filter(r=>{const i=t[r],a=i?i.parent:null,l=i?i.children:null;return n===Y5?!(l&&l.some(s=>s.key&&o.has(s.key))):!(a&&!a.node.disabled&&o.has(a.key))})}function Ud(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;var r;let i=t;const a=[];for(let l=0;l{const f=d[n.value];return o?String(f)===String(s):f===s}),c=u!==-1?i==null?void 0:i[u]:null;a.push({value:(r=c==null?void 0:c[n.value])!==null&&r!==void 0?r:s,index:u,option:c}),i=c==null?void 0:c[n.children]}return a}const Boe=(e,t,n)=>E(()=>{const o=[],r=[];return n.value.forEach(i=>{Ud(i,e.value,t.value).every(l=>l.option)?r.push(i):o.push(i)}),[r,o]});function nR(e,t){const n=new Set;return e.forEach(o=>{t.has(o)||n.add(o)}),n}function Hoe(e){const{disabled:t,disableCheckbox:n,checkable:o}=e||{};return!!(t||n)||o===!1}function zoe(e,t,n,o){const r=new Set(e),i=new Set;for(let l=0;l<=n;l+=1)(t.get(l)||new Set).forEach(u=>{const{key:c,node:d,children:f=[]}=u;r.has(c)&&!o(d)&&f.filter(p=>!o(p.node)).forEach(p=>{r.add(p.key)})});const a=new Set;for(let l=n;l>=0;l-=1)(t.get(l)||new Set).forEach(u=>{const{parent:c,node:d}=u;if(o(d)||!u.parent||a.has(u.parent.key))return;if(o(u.parent.node)){a.add(c.key);return}let f=!0,p=!1;(c.children||[]).filter(v=>!o(v.node)).forEach(v=>{let{key:h}=v;const m=r.has(h);f&&!m&&(f=!1),!p&&(m||i.has(h))&&(p=!0)}),f&&r.add(c.key),p&&i.add(c.key),a.add(c.key)});return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(nR(i,r))}}function joe(e,t,n,o,r){const i=new Set(e);let a=new Set(t);for(let s=0;s<=o;s+=1)(n.get(s)||new Set).forEach(c=>{const{key:d,node:f,children:p=[]}=c;!i.has(d)&&!a.has(d)&&!r(f)&&p.filter(v=>!r(v.node)).forEach(v=>{i.delete(v.key)})});a=new Set;const l=new Set;for(let s=o;s>=0;s-=1)(n.get(s)||new Set).forEach(c=>{const{parent:d,node:f}=c;if(r(f)||!c.parent||l.has(c.parent.key))return;if(r(c.parent.node)){l.add(d.key);return}let p=!0,v=!1;(d.children||[]).filter(h=>!r(h.node)).forEach(h=>{let{key:m}=h;const b=i.has(m);p&&!b&&(p=!1),!v&&(b||a.has(m))&&(v=!0)}),p||i.delete(d.key),v&&a.add(d.key),l.add(d.key)});return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(nR(a,i))}}function pr(e,t,n,o,r,i){let a;i?a=i:a=Hoe;const l=new Set(e.filter(u=>!!n[u]));let s;return t===!0?s=zoe(l,r,o,a):s=joe(l,t.halfCheckedKeys,r,o,a),s}const Woe=(e,t,n,o,r)=>E(()=>{const i=r.value||(a=>{let{labels:l}=a;const s=o.value?l.slice(-1):l,u=" / ";return s.every(c=>["string","number"].includes(typeof c))?s.join(u):s.reduce((c,d,f)=>{const p=sn(d)?mt(d,{key:f}):d;return f===0?[p]:[...c,u,p]},[])});return e.value.map(a=>{const l=Ud(a,t.value,n.value),s=i({labels:l.map(c=>{let{option:d,value:f}=c;var p;return(p=d==null?void 0:d[n.value.label])!==null&&p!==void 0?p:f}),selectedOptions:l.map(c=>{let{option:d}=c;return d})}),u=Da(a);return{label:s,value:u,key:u,valueCells:a}})}),oR=Symbol("CascaderContextKey"),Voe=e=>{Xe(oR,e)},lm=()=>ze(oR),Koe=()=>{const e=hf(),{values:t}=lm(),[n,o]=$t([]);return be(()=>e.open,()=>{if(e.open&&!e.multiple){const r=t.value[0];o(r||[])}},{immediate:!0}),[n,o]},Uoe=(e,t,n,o,r,i)=>{const a=hf(),l=E(()=>a.direction==="rtl"),[s,u,c]=[ae([]),ae(),ae([])];Ve(()=>{let h=-1,m=t.value;const b=[],S=[],C=o.value.length;for(let x=0;xw[n.value.value]===o.value[x]);if(P===-1)break;h=P,b.push(h),S.push(o.value[x]),m=m[h][n.value.children]}let $=t.value;for(let x=0;x{r(h)},f=h=>{const m=c.value.length;let b=u.value;b===-1&&h<0&&(b=m);for(let S=0;S{if(s.value.length>1){const h=s.value.slice(0,-1);d(h)}else a.toggleOpen(!1)},v=()=>{var h;const b=(((h=c.value[u.value])===null||h===void 0?void 0:h[n.value.children])||[]).find(S=>!S.disabled);if(b){const S=[...s.value,b[n.value.value]];d(S)}};e.expose({onKeydown:h=>{const{which:m}=h;switch(m){case Ie.UP:case Ie.DOWN:{let b=0;m===Ie.UP?b=-1:m===Ie.DOWN&&(b=1),b!==0&&f(b);break}case Ie.LEFT:{l.value?v():p();break}case Ie.RIGHT:{l.value?p():v();break}case Ie.BACKSPACE:{a.searchValue||p();break}case Ie.ENTER:{if(s.value.length){const b=c.value[u.value],S=(b==null?void 0:b[id])||[];S.length?i(S.map(C=>C[n.value.value]),S[S.length-1]):i(s.value,b)}break}case Ie.ESC:a.toggleOpen(!1),open&&h.stopPropagation()}},onKeyup:()=>{}})};function sm(e){let{prefixCls:t,checked:n,halfChecked:o,disabled:r,onClick:i}=e;const{customSlots:a,checkable:l}=lm(),s=l.value!==!1?a.value.checkable:l.value,u=typeof s=="function"?s():typeof s=="boolean"?null:s;return g("span",{class:{[t]:!0,[`${t}-checked`]:n,[`${t}-indeterminate`]:!n&&o,[`${t}-disabled`]:r},onClick:i},[u])}sm.props=["prefixCls","checked","halfChecked","disabled","onClick"];sm.displayName="Checkbox";sm.inheritAttrs=!1;const rR="__cascader_fix_label__";function cm(e){let{prefixCls:t,multiple:n,options:o,activeValue:r,prevValuePath:i,onToggleOpen:a,onSelect:l,onActive:s,checkedSet:u,halfCheckedSet:c,loadingKeys:d,isSelectable:f}=e;var p,v,h,m,b,S;const C=`${t}-menu`,$=`${t}-menu-item`,{fieldNames:x,changeOnSelect:P,expandTrigger:w,expandIcon:O,loadingIcon:I,dropdownMenuColumnStyle:_,customSlots:T}=lm(),A=(p=O.value)!==null&&p!==void 0?p:(h=(v=T.value).expandIcon)===null||h===void 0?void 0:h.call(v),R=(m=I.value)!==null&&m!==void 0?m:(S=(b=T.value).loadingIcon)===null||S===void 0?void 0:S.call(b),H=w.value==="hover";return g("ul",{class:C,role:"menu"},[o.map(M=>{var D;const{disabled:N}=M,L=M[id],F=(D=M[rR])!==null&&D!==void 0?D:M[x.value.label],B=M[x.value.value],j=Nu(M,x.value),z=L?L.map(X=>X[x.value.value]):[...i,B],G=Da(z),Q=d.includes(G),Y=u.has(G),oe=c.has(G),Z=()=>{!N&&(!H||!j)&&s(z)},re=()=>{f(M)&&l(z,j)};let ne;return typeof M.title=="string"?ne=M.title:typeof F=="string"&&(ne=F),g("li",{key:G,class:[$,{[`${$}-expand`]:!j,[`${$}-active`]:r===B,[`${$}-disabled`]:N,[`${$}-loading`]:Q}],style:_.value,role:"menuitemcheckbox",title:ne,"aria-checked":Y,"data-path-key":G,onClick:()=>{Z(),(!n||j)&&re()},onDblclick:()=>{P.value&&a(!1)},onMouseenter:()=>{H&&Z()},onMousedown:X=>{X.preventDefault()}},[n&&g(sm,{prefixCls:`${t}-checkbox`,checked:Y,halfChecked:oe,disabled:N,onClick:X=>{X.stopPropagation(),re()}},null),g("div",{class:`${$}-content`},[F]),!Q&&A&&!j&&g("div",{class:`${$}-expand-icon`},[mt(A)]),Q&&R&&g("div",{class:`${$}-loading-icon`},[mt(R)])])})])}cm.props=["prefixCls","multiple","options","activeValue","prevValuePath","onToggleOpen","onSelect","onActive","checkedSet","halfCheckedSet","loadingKeys","isSelectable"];cm.displayName="Column";cm.inheritAttrs=!1;const Goe=le({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,setup(e,t){const{attrs:n,slots:o}=t,r=hf(),i=ae(),a=E(()=>r.direction==="rtl"),{options:l,values:s,halfValues:u,fieldNames:c,changeOnSelect:d,onSelect:f,searchOptions:p,dropdownPrefixCls:v,loadData:h,expandTrigger:m,customSlots:b}=lm(),S=E(()=>v.value||r.prefixCls),C=se([]),$=D=>{if(!h.value||r.searchValue)return;const L=Ud(D,l.value,c.value).map(B=>{let{option:j}=B;return j}),F=L[L.length-1];if(F&&!Nu(F,c.value)){const B=Da(D);C.value=[...C.value,B],h.value(L)}};Ve(()=>{C.value.length&&C.value.forEach(D=>{const N=boe(D),L=Ud(N,l.value,c.value,!0).map(B=>{let{option:j}=B;return j}),F=L[L.length-1];(!F||F[c.value.children]||Nu(F,c.value))&&(C.value=C.value.filter(B=>B!==D))})});const x=E(()=>new Set(Ks(s.value))),P=E(()=>new Set(Ks(u.value))),[w,O]=Koe(),I=D=>{O(D),$(D)},_=D=>{const{disabled:N}=D,L=Nu(D,c.value);return!N&&(L||d.value||r.multiple)},T=function(D,N){let L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;f(D),!r.multiple&&(N||d.value&&(m.value==="hover"||L))&&r.toggleOpen(!1)},A=E(()=>r.searchValue?p.value:l.value),R=E(()=>{const D=[{options:A.value}];let N=A.value;for(let L=0;Lz[c.value.value]===F),j=B==null?void 0:B[c.value.children];if(!(j!=null&&j.length))break;N=j,D.push({options:j})}return D});Uoe(t,A,c,w,I,(D,N)=>{_(N)&&T(D,Nu(N,c.value),!0)});const M=D=>{D.preventDefault()};return Ke(()=>{be(w,D=>{var N;for(let L=0;L{var D,N,L,F,B;const{notFoundContent:j=((D=o.notFoundContent)===null||D===void 0?void 0:D.call(o))||((L=(N=b.value).notFoundContent)===null||L===void 0?void 0:L.call(N)),multiple:z,toggleOpen:G}=r,Q=!(!((B=(F=R.value[0])===null||F===void 0?void 0:F.options)===null||B===void 0)&&B.length),Y=[{[c.value.value]:"__EMPTY__",[rR]:j,disabled:!0}],oe=y(y({},n),{multiple:!Q&&z,onSelect:T,onActive:I,onToggleOpen:G,checkedSet:x.value,halfCheckedSet:P.value,loadingKeys:C.value,isSelectable:_}),re=(Q?[{options:Y}]:R.value).map((ne,X)=>{const te=w.value.slice(0,X),W=w.value[X];return g(cm,k(k({key:X},oe),{},{prefixCls:S.value,options:ne.options,prevValuePath:te,activeValue:W}),null)});return g("div",{class:[`${S.value}-menus`,{[`${S.value}-menu-empty`]:Q,[`${S.value}-rtl`]:a.value}],onMousedown:M,ref:i},[re])}}});function um(e){const t=ae(0),n=se();return Ve(()=>{const o=new Map;let r=0;const i=e.value||{};for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)){const l=i[a],{level:s}=l;let u=o.get(s);u||(u=new Set,o.set(s,u)),u.add(l),r=Math.max(r,s)}t.value=r,n.value=o}),{maxLevel:t,levelEntities:n}}function Xoe(){return y(y({},it(Nv(),["tokenSeparators","mode","showSearch"])),{id:String,prefixCls:String,fieldNames:De(),children:Array,value:{type:[String,Number,Array]},defaultValue:{type:[String,Number,Array]},changeOnSelect:{type:Boolean,default:void 0},displayRender:Function,checkable:{type:Boolean,default:void 0},showCheckedStrategy:{type:String,default:X5},showSearch:{type:[Boolean,Object],default:void 0},searchValue:String,onSearch:Function,expandTrigger:String,options:Array,dropdownPrefixCls:String,loadData:Function,popupVisible:{type:Boolean,default:void 0},dropdownClassName:String,dropdownMenuColumnStyle:{type:Object,default:void 0},popupStyle:{type:Object,default:void 0},dropdownStyle:{type:Object,default:void 0},popupPlacement:String,placement:String,onPopupVisibleChange:Function,onDropdownVisibleChange:Function,expandIcon:K.any,loadingIcon:K.any})}function iR(){return y(y({},Xoe()),{onChange:Function,customSlots:Object})}function Yoe(e){return Array.isArray(e)&&Array.isArray(e[0])}function OI(e){return e?Yoe(e)?e:(e.length===0?[]:[e]).map(t=>Array.isArray(t)?t:[t]):[]}const qoe=le({compatConfig:{MODE:3},name:"Cascader",inheritAttrs:!1,props:Qe(iR(),{}),setup(e,t){let{attrs:n,expose:o,slots:r}=t;const i=hC(We(e,"id")),a=E(()=>!!e.checkable),[l,s]=Dt(e.defaultValue,{value:E(()=>e.value),postState:OI}),u=E(()=>yoe(e.fieldNames)),c=E(()=>e.options||[]),d=Doe(c,u),f=X=>{const te=d.value;return X.map(W=>{const{nodes:U}=te[W];return U.map(J=>J[u.value.value])})},[p,v]=Dt("",{value:E(()=>e.searchValue),postState:X=>X||""}),h=(X,te)=>{v(X),te.source!=="blur"&&e.onSearch&&e.onSearch(X)},{showSearch:m,searchConfig:b}=Noe(We(e,"showSearch")),S=Foe(p,c,u,E(()=>e.dropdownPrefixCls||e.prefixCls),b,We(e,"changeOnSelect")),C=Boe(c,u,l),[$,x,P]=[ae([]),ae([]),ae([])],{maxLevel:w,levelEntities:O}=um(d);Ve(()=>{const[X,te]=C.value;if(!a.value||!l.value.length){[$.value,x.value,P.value]=[X,[],te];return}const W=Ks(X),U=d.value,{checkedKeys:J,halfCheckedKeys:de}=pr(W,!0,U,w.value,O.value);[$.value,x.value,P.value]=[f(J),f(de),te]});const I=E(()=>{const X=Ks($.value),te=PI(X,d.value,e.showCheckedStrategy);return[...P.value,...f(te)]}),_=Woe(I,c,u,a,We(e,"displayRender")),T=X=>{if(s(X),e.onChange){const te=OI(X),W=te.map(de=>Ud(de,c.value,u.value).map(fe=>fe.option)),U=a.value?te:te[0],J=a.value?W:W[0];e.onChange(U,J)}},A=X=>{if(v(""),!a.value)T(X);else{const te=Da(X),W=Ks($.value),U=Ks(x.value),J=W.includes(te),de=P.value.some(ve=>Da(ve)===te);let fe=$.value,pe=P.value;if(de&&!J)pe=P.value.filter(ve=>Da(ve)!==te);else{const ve=J?W.filter(q=>q!==te):[...W,te];let he;J?{checkedKeys:he}=pr(ve,{halfCheckedKeys:U},d.value,w.value,O.value):{checkedKeys:he}=pr(ve,!0,d.value,w.value,O.value);const V=PI(he,d.value,e.showCheckedStrategy);fe=f(V)}T([...pe,...fe])}},R=(X,te)=>{if(te.type==="clear"){T([]);return}const{valueCells:W}=te.values[0];A(W)},H=E(()=>e.open!==void 0?e.open:e.popupVisible),M=E(()=>e.dropdownStyle||e.popupStyle||{}),D=E(()=>e.placement||e.popupPlacement),N=X=>{var te,W;(te=e.onDropdownVisibleChange)===null||te===void 0||te.call(e,X),(W=e.onPopupVisibleChange)===null||W===void 0||W.call(e,X)},{changeOnSelect:L,checkable:F,dropdownPrefixCls:B,loadData:j,expandTrigger:z,expandIcon:G,loadingIcon:Q,dropdownMenuColumnStyle:Y,customSlots:oe,dropdownClassName:Z}=Fr(e);Voe({options:c,fieldNames:u,values:$,halfValues:x,changeOnSelect:L,onSelect:A,checkable:F,searchOptions:S,dropdownPrefixCls:B,loadData:j,expandTrigger:z,expandIcon:G,loadingIcon:Q,dropdownMenuColumnStyle:Y,customSlots:oe});const re=ae();o({focus(){var X;(X=re.value)===null||X===void 0||X.focus()},blur(){var X;(X=re.value)===null||X===void 0||X.blur()},scrollTo(X){var te;(te=re.value)===null||te===void 0||te.scrollTo(X)}});const ne=E(()=>it(e,["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","dropdownClassName","dropdownMenuColumnStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","customSlots","showCheckedStrategy","children"]));return()=>{const X=!(p.value?S.value:c.value).length,{dropdownMatchSelectWidth:te=!1}=e,W=p.value&&b.value.matchInputWidth||X?{}:{minWidth:"auto"};return g(pC,k(k(k({},ne.value),n),{},{ref:re,id:i,prefixCls:e.prefixCls,dropdownMatchSelectWidth:te,dropdownStyle:y(y({},M.value),W),displayValues:_.value,onDisplayValuesChange:R,mode:a.value?"multiple":void 0,searchValue:p.value,onSearch:h,showSearch:m.value,OptionList:Goe,emptyOptions:X,open:H.value,dropdownClassName:Z.value,placement:D.value,onDropdownVisibleChange:N,getRawInputElement:()=>{var U;return(U=r.default)===null||U===void 0?void 0:U.call(r)}}),r)}}});var Joe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};function II(e){for(var t=1;tso()&&window.document.documentElement,lR=e=>{if(so()&&window.document.documentElement){const t=Array.isArray(e)?e:[e],{documentElement:n}=window.document;return t.some(o=>o in n.style)}return!1},Qoe=(e,t)=>{if(!lR(e))return!1;const n=document.createElement("div"),o=n.style[e];return n.style[e]=t,n.style[e]!==o};function Mx(e,t){return!Array.isArray(e)&&t!==void 0?Qoe(e,t):lR(e)}let pp;const ere=()=>{if(!aR())return!1;if(pp!==void 0)return pp;const e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),pp=e.scrollHeight===1,document.body.removeChild(e),pp},sR=()=>{const e=se(!1);return Ke(()=>{e.value=ere()}),e},cR=Symbol("rowContextKey"),tre=e=>{Xe(cR,e)},nre=()=>ze(cR,{gutter:E(()=>{}),wrap:E(()=>{}),supportFlexGap:E(()=>{})}),ore=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around ":{justifyContent:"space-around"},"&-space-evenly ":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},rre=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},ire=(e,t)=>{const{componentCls:n,gridColumns:o}=e,r={};for(let i=o;i>=0;i--)i===0?(r[`${n}${t}-${i}`]={display:"none"},r[`${n}-push-${i}`]={insetInlineStart:"auto"},r[`${n}-pull-${i}`]={insetInlineEnd:"auto"},r[`${n}${t}-push-${i}`]={insetInlineStart:"auto"},r[`${n}${t}-pull-${i}`]={insetInlineEnd:"auto"},r[`${n}${t}-offset-${i}`]={marginInlineEnd:0},r[`${n}${t}-order-${i}`]={order:0}):(r[`${n}${t}-${i}`]={display:"block",flex:`0 0 ${i/o*100}%`,maxWidth:`${i/o*100}%`},r[`${n}${t}-push-${i}`]={insetInlineStart:`${i/o*100}%`},r[`${n}${t}-pull-${i}`]={insetInlineEnd:`${i/o*100}%`},r[`${n}${t}-offset-${i}`]={marginInlineStart:`${i/o*100}%`},r[`${n}${t}-order-${i}`]={order:i});return r},r1=(e,t)=>ire(e,t),are=(e,t,n)=>({[`@media (min-width: ${t}px)`]:y({},r1(e,n))}),lre=Ue("Grid",e=>[ore(e)]),sre=Ue("Grid",e=>{const t=Be(e,{gridColumns:24}),n={"-sm":t.screenSMMin,"-md":t.screenMDMin,"-lg":t.screenLGMin,"-xl":t.screenXLMin,"-xxl":t.screenXXLMin};return[rre(t),r1(t,""),r1(t,"-xs"),Object.keys(n).map(o=>are(t,n[o],o)).reduce((o,r)=>y(y({},o),r),{})]}),cre=()=>({align:He([String,Object]),justify:He([String,Object]),prefixCls:String,gutter:He([Number,Array,Object],0),wrap:{type:Boolean,default:void 0}}),Ax=le({compatConfig:{MODE:3},name:"ARow",inheritAttrs:!1,props:cre(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("row",e),[a,l]=lre(r);let s;const u=NC(),c=ae({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),d=ae({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),f=C=>E(()=>{if(typeof e[C]=="string")return e[C];if(typeof e[C]!="object")return"";for(let $=0;${s=u.value.subscribe(C=>{d.value=C;const $=e.gutter||0;(!Array.isArray($)&&typeof $=="object"||Array.isArray($)&&(typeof $[0]=="object"||typeof $[1]=="object"))&&(c.value=C)})}),tt(()=>{u.value.unsubscribe(s)});const m=E(()=>{const C=[void 0,void 0],{gutter:$=0}=e;return(Array.isArray($)?$:[$,void 0]).forEach((P,w)=>{if(typeof P=="object")for(let O=0;Oe.wrap)});const b=E(()=>ge(r.value,{[`${r.value}-no-wrap`]:e.wrap===!1,[`${r.value}-${v.value}`]:v.value,[`${r.value}-${p.value}`]:p.value,[`${r.value}-rtl`]:i.value==="rtl"},o.class,l.value)),S=E(()=>{const C=m.value,$={},x=C[0]!=null&&C[0]>0?`${C[0]/-2}px`:void 0,P=C[1]!=null&&C[1]>0?`${C[1]/-2}px`:void 0;return x&&($.marginLeft=x,$.marginRight=x),h.value?$.rowGap=`${C[1]}px`:P&&($.marginTop=P,$.marginBottom=P),$});return()=>{var C;return a(g("div",k(k({},o),{},{class:b.value,style:y(y({},S.value),o.style)}),[(C=n.default)===null||C===void 0?void 0:C.call(n)]))}}});function Ol(){return Ol=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zp(e,t,n){return dre()?Zp=Reflect.construct.bind():Zp=function(r,i,a){var l=[null];l.push.apply(l,i);var s=Function.bind.apply(r,l),u=new s;return a&&Gd(u,a.prototype),u},Zp.apply(null,arguments)}function fre(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function a1(e){var t=typeof Map=="function"?new Map:void 0;return a1=function(o){if(o===null||!fre(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(o))return t.get(o);t.set(o,r)}function r(){return Zp(o,arguments,i1(this).constructor)}return r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Gd(r,o)},a1(e)}var pre=/%[sdj%]/g,gre=function(){};function l1(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var o=n.field;t[o]=t[o]||[],t[o].push(n)}),t}function Uo(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o=i)return l;switch(l){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}break;default:return l}});return a}return e}function hre(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Ln(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||hre(t)&&typeof e=="string"&&!e)}function vre(e,t,n){var o=[],r=0,i=e.length;function a(l){o.push.apply(o,l||[]),r++,r===i&&n(o)}e.forEach(function(l){t(l,a)})}function TI(e,t,n){var o=0,r=e.length;function i(a){if(a&&a.length){n(a);return}var l=o;o=o+1,l ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${t}-item > ${t}-content > ${t}-content-box`]:{paddingTop:o}}}},Fne=e=>{const{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-content`]:{backgroundColor:"transparent",border:0,[`> ${t}-content-box`]:{paddingBlock:n}}}}}},Bne=Ue("Collapse",e=>{const t=Be(e,{collapseContentBg:e.colorBgContainer,collapseHeaderBg:e.colorFillAlter,collapseHeaderPadding:`${e.paddingSM}px ${e.padding}px`,collapsePanelBorderRadius:e.borderRadiusLG,collapseContentPaddingHorizontal:16});return[Nne(t),Lne(t),Fne(t),kne(t),bf(t)]});function vI(e){let t=e;if(!Array.isArray(t)){const n=typeof t;t=n==="number"||n==="string"?[t]:[]}return t.map(n=>String(n))}const rd=le({compatConfig:{MODE:3},name:"ACollapse",inheritAttrs:!1,props:Qe(Dne(),{accordion:!1,destroyInactivePanel:!1,bordered:!0,expandIconPosition:"start"}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r}=t;const i=ae(vI(Qg([e.activeKey,e.defaultActiveKey])));be(()=>e.activeKey,()=>{i.value=vI(e.activeKey)},{deep:!0});const{prefixCls:a,direction:l,rootPrefixCls:s}=Te("collapse",e),[u,c]=Bne(a),d=E(()=>{const{expandIconPosition:b}=e;return b!==void 0?b:l.value==="rtl"?"end":"start"}),f=b=>{const{expandIcon:S=o.expandIcon}=e,C=S?S(b):g(Jo,{rotate:b.isActive?90:void 0},null);return g("div",{class:[`${a.value}-expand-icon`,c.value],onClick:()=>["header","icon"].includes(e.collapsible)&&v(b.panelKey)},[sn(Array.isArray(S)?C[0]:C)?mt(C,{class:`${a.value}-arrow`},!1):C])},p=b=>{e.activeKey===void 0&&(i.value=b);const S=e.accordion?b[0]:b;r("update:activeKey",S),r("change",S)},v=b=>{let S=i.value;if(e.accordion)S=S[0]===b?[]:[b];else{S=[...S];const C=S.indexOf(b);C>-1?S.splice(C,1):S.push(b)}p(S)},h=(b,S)=>{var C,$,x;if(df(b))return;const P=i.value,{accordion:w,destroyInactivePanel:O,collapsible:I,openAnimation:_}=e,T=_||Sf(`${s.value}-motion-collapse`),A=String((C=b.key)!==null&&C!==void 0?C:S),{header:R=(x=($=b.children)===null||$===void 0?void 0:$.header)===null||x===void 0?void 0:x.call($),headerClass:H,collapsible:M,disabled:D}=b.props||{};let N=!1;w?N=P[0]===A:N=P.indexOf(A)>-1;let L=M??I;(D||D==="")&&(L="disabled");const F={key:A,panelKey:A,header:R,headerClass:H,isActive:N,prefixCls:a.value,destroyInactivePanel:O,openAnimation:T,accordion:w,onItemClick:L==="disabled"?null:v,expandIcon:f,collapsible:L};return mt(b,F)},m=()=>{var b;return Ot((b=o.default)===null||b===void 0?void 0:b.call(o)).map(h)};return()=>{const{accordion:b,bordered:S,ghost:C}=e,$=ge(a.value,{[`${a.value}-borderless`]:!S,[`${a.value}-icon-position-${d.value}`]:!0,[`${a.value}-rtl`]:l.value==="rtl",[`${a.value}-ghost`]:!!C,[n.class]:!!n.class},c.value);return u(g("div",k(k({class:$},nB(n)),{},{style:n.style,role:b?"tablist":null}),[m()]))}}}),Hne=le({compatConfig:{MODE:3},name:"PanelContent",props:k5(),setup(e,t){let{slots:n}=t;const o=se(!1);return Ve(()=>{(e.isActive||e.forceRender)&&(o.value=!0)}),()=>{var r;if(!o.value)return null;const{prefixCls:i,isActive:a,role:l}=e;return g("div",{class:ge(`${i}-content`,{[`${i}-content-active`]:a,[`${i}-content-inactive`]:!a}),role:l},[g("div",{class:`${i}-content-box`},[(r=n.default)===null||r===void 0?void 0:r.call(n)])])}}}),vh=le({compatConfig:{MODE:3},name:"ACollapsePanel",inheritAttrs:!1,props:Qe(k5(),{showArrow:!0,isActive:!1,onItemClick(){},headerClass:"",forceRender:!1}),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r}=t;Mt(e.disabled===void 0,"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');const{prefixCls:i}=Te("collapse",e),a=()=>{o("itemClick",e.panelKey)},l=s=>{(s.key==="Enter"||s.keyCode===13||s.which===13)&&a()};return()=>{var s,u;const{header:c=(s=n.header)===null||s===void 0?void 0:s.call(n),headerClass:d,isActive:f,showArrow:p,destroyInactivePanel:v,accordion:h,forceRender:m,openAnimation:b,expandIcon:S=n.expandIcon,extra:C=(u=n.extra)===null||u===void 0?void 0:u.call(n),collapsible:$}=e,x=$==="disabled",P=i.value,w=ge(`${P}-header`,{[d]:d,[`${P}-header-collapsible-only`]:$==="header",[`${P}-icon-collapsible-only`]:$==="icon"}),O=ge({[`${P}-item`]:!0,[`${P}-item-active`]:f,[`${P}-item-disabled`]:x,[`${P}-no-arrow`]:!p,[`${r.class}`]:!!r.class});let I=g("i",{class:"arrow"},null);p&&typeof S=="function"&&(I=S(e));const _=Pn(g(Hne,{prefixCls:P,isActive:f,forceRender:m,role:h?"tabpanel":null},{default:n.default}),[[Vn,f]]),T=y({appear:!1,css:!1},b);return g("div",k(k({},r),{},{class:O}),[g("div",{class:w,onClick:()=>!["header","icon"].includes($)&&a(),role:h?"tab":"button",tabindex:x?-1:0,"aria-expanded":f,onKeypress:l},[p&&I,g("span",{onClick:()=>$==="header"&&a(),class:`${P}-header-text`},[c]),C&&g("div",{class:`${P}-extra`},[C])]),g(Nn,T,{default:()=>[!v||f?_:null]})])}}});rd.Panel=vh;rd.install=function(e){return e.component(rd.name,rd),e.component(vh.name,vh),e};const zne=function(e){return e.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()}).toLowerCase()},jne=function(e){return/[height|width]$/.test(e)},mI=function(e){let t="";const n=Object.keys(e);return n.forEach(function(o,r){let i=e[o];o=zne(o),jne(o)&&typeof i=="number"&&(i=i+"px"),i===!0?t+=o:i===!1?t+="not "+o:t+="("+o+": "+i+")",r{["touchstart","touchmove","wheel"].includes(e.type)||e.preventDefault()},mh=e=>{const t=[],n=F5(e),o=B5(e);for(let r=n;re.currentSlide-Vne(e),B5=e=>e.currentSlide+Kne(e),Vne=e=>e.centerMode?Math.floor(e.slidesToShow/2)+(parseInt(e.centerPadding)>0?1:0):0,Kne=e=>e.centerMode?Math.floor((e.slidesToShow-1)/2)+1+(parseInt(e.centerPadding)>0?1:0):e.slidesToShow,e1=e=>e&&e.offsetWidth||0,Ox=e=>e&&e.offsetHeight||0,H5=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;const o=e.startX-e.curX,r=e.startY-e.curY,i=Math.atan2(r,o);return n=Math.round(i*180/Math.PI),n<0&&(n=360-Math.abs(n)),n<=45&&n>=0||n<=360&&n>=315?"left":n>=135&&n<=225?"right":t===!0?n>=35&&n<=135?"up":"down":"vertical"},rm=e=>{let t=!0;return e.infinite||(e.centerMode&&e.currentSlide>=e.slideCount-1||e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(t=!1),t},V0=(e,t)=>{const n={};return t.forEach(o=>n[o]=e[o]),n},Une=e=>{const t=e.children.length,n=e.listRef,o=Math.ceil(e1(n)),r=e.trackRef,i=Math.ceil(e1(r));let a;if(e.vertical)a=o;else{let p=e.centerMode&&parseInt(e.centerPadding)*2;typeof e.centerPadding=="string"&&e.centerPadding.slice(-1)==="%"&&(p*=o/100),a=Math.ceil((o-p)/e.slidesToShow)}const l=n&&Ox(n.querySelector('[data-index="0"]')),s=l*e.slidesToShow;let u=e.currentSlide===void 0?e.initialSlide:e.currentSlide;e.rtl&&e.currentSlide===void 0&&(u=t-1-e.initialSlide);let c=e.lazyLoadedList||[];const d=mh(y(y({},e),{currentSlide:u,lazyLoadedList:c}));c=c.concat(d);const f={slideCount:t,slideWidth:a,listWidth:o,trackWidth:i,currentSlide:u,slideHeight:l,listHeight:s,lazyLoadedList:c};return e.autoplaying===null&&e.autoplay&&(f.autoplaying="playing"),f},Gne=e=>{const{waitForAnimate:t,animating:n,fade:o,infinite:r,index:i,slideCount:a,lazyLoad:l,currentSlide:s,centerMode:u,slidesToScroll:c,slidesToShow:d,useCSS:f}=e;let{lazyLoadedList:p}=e;if(t&&n)return{};let v=i,h,m,b,S={},C={};const $=r?i:Qy(i,0,a-1);if(o){if(!r&&(i<0||i>=a))return{};i<0?v=i+a:i>=a&&(v=i-a),l&&p.indexOf(v)<0&&(p=p.concat(v)),S={animating:!0,currentSlide:v,lazyLoadedList:p,targetSlide:v},C={animating:!1,targetSlide:v}}else h=v,v<0?(h=v+a,r?a%c!==0&&(h=a-a%c):h=0):!rm(e)&&v>s?v=h=s:u&&v>=a?(v=r?a:a-1,h=r?0:a-1):v>=a&&(h=v-a,r?a%c!==0&&(h=0):h=a-d),!r&&v+d>=a&&(h=a-d),m=Kd(y(y({},e),{slideIndex:v})),b=Kd(y(y({},e),{slideIndex:h})),r||(m===b&&(v=h),m=b),l&&(p=p.concat(mh(y(y({},e),{currentSlide:v})))),f?(S={animating:!0,currentSlide:h,trackStyle:z5(y(y({},e),{left:m})),lazyLoadedList:p,targetSlide:$},C={animating:!1,currentSlide:h,trackStyle:Vd(y(y({},e),{left:b})),swipeLeft:null,targetSlide:$}):S={currentSlide:h,trackStyle:Vd(y(y({},e),{left:b})),lazyLoadedList:p,targetSlide:$};return{state:S,nextState:C}},Xne=(e,t)=>{let n,o,r;const{slidesToScroll:i,slidesToShow:a,slideCount:l,currentSlide:s,targetSlide:u,lazyLoad:c,infinite:d}=e,p=l%i!==0?0:(l-s)%i;if(t.message==="previous")o=p===0?i:a-p,r=s-o,c&&!d&&(n=s-o,r=n===-1?l-1:n),d||(r=u-i);else if(t.message==="next")o=p===0?i:p,r=s+o,c&&!d&&(r=(s+i)%l+p),d||(r=u+i);else if(t.message==="dots")r=t.index*t.slidesToScroll;else if(t.message==="children"){if(r=t.index,d){const v=toe(y(y({},e),{targetSlide:r}));r>t.currentSlide&&v==="left"?r=r-l:re.target.tagName.match("TEXTAREA|INPUT|SELECT")||!t?"":e.keyCode===37?n?"next":"previous":e.keyCode===39?n?"previous":"next":"",qne=(e,t,n)=>(e.target.tagName==="IMG"&&lc(e),!t||!n&&e.type.indexOf("mouse")!==-1?"":{dragging:!0,touchObject:{startX:e.touches?e.touches[0].pageX:e.clientX,startY:e.touches?e.touches[0].pageY:e.clientY,curX:e.touches?e.touches[0].pageX:e.clientX,curY:e.touches?e.touches[0].pageY:e.clientY}}),Jne=(e,t)=>{const{scrolling:n,animating:o,vertical:r,swipeToSlide:i,verticalSwiping:a,rtl:l,currentSlide:s,edgeFriction:u,edgeDragged:c,onEdge:d,swiped:f,swiping:p,slideCount:v,slidesToScroll:h,infinite:m,touchObject:b,swipeEvent:S,listHeight:C,listWidth:$}=t;if(n)return;if(o)return lc(e);r&&i&&a&&lc(e);let x,P={};const w=Kd(t);b.curX=e.touches?e.touches[0].pageX:e.clientX,b.curY=e.touches?e.touches[0].pageY:e.clientY,b.swipeLength=Math.round(Math.sqrt(Math.pow(b.curX-b.startX,2)));const O=Math.round(Math.sqrt(Math.pow(b.curY-b.startY,2)));if(!a&&!p&&O>10)return{scrolling:!0};a&&(b.swipeLength=O);let I=(l?-1:1)*(b.curX>b.startX?1:-1);a&&(I=b.curY>b.startY?1:-1);const _=Math.ceil(v/h),T=H5(t.touchObject,a);let A=b.swipeLength;return m||(s===0&&(T==="right"||T==="down")||s+1>=_&&(T==="left"||T==="up")||!rm(t)&&(T==="left"||T==="up"))&&(A=b.swipeLength*u,c===!1&&d&&(d(T),P.edgeDragged=!0)),!f&&S&&(S(T),P.swiped=!0),r?x=w+A*(C/$)*I:l?x=w-A*I:x=w+A*I,a&&(x=w+A*I),P=y(y({},P),{touchObject:b,swipeLeft:x,trackStyle:Vd(y(y({},t),{left:x}))}),Math.abs(b.curX-b.startX)10&&(P.swiping=!0,lc(e)),P},Zne=(e,t)=>{const{dragging:n,swipe:o,touchObject:r,listWidth:i,touchThreshold:a,verticalSwiping:l,listHeight:s,swipeToSlide:u,scrolling:c,onSwipe:d,targetSlide:f,currentSlide:p,infinite:v}=t;if(!n)return o&&lc(e),{};const h=l?s/a:i/a,m=H5(r,l),b={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(c||!r.swipeLength)return b;if(r.swipeLength>h){lc(e),d&&d(m);let S,C;const $=v?p:f;switch(m){case"left":case"up":C=$+yI(t),S=u?bI(t,C):C,b.currentDirection=0;break;case"right":case"down":C=$-yI(t),S=u?bI(t,C):C,b.currentDirection=1;break;default:S=$}b.triggerSlideHandler=S}else{const S=Kd(t);b.trackStyle=z5(y(y({},t),{left:S}))}return b},Qne=e=>{const t=e.infinite?e.slideCount*2:e.slideCount;let n=e.infinite?e.slidesToShow*-1:0,o=e.infinite?e.slidesToShow*-1:0;const r=[];for(;n{const n=Qne(e);let o=0;if(t>n[n.length-1])t=n[n.length-1];else for(const r in n){if(t{const t=e.centerMode?e.slideWidth*Math.floor(e.slidesToShow/2):0;if(e.swipeToSlide){let n;const o=e.listRef,r=o.querySelectorAll&&o.querySelectorAll(".slick-slide")||[];if(Array.from(r).every(l=>{if(e.vertical){if(l.offsetTop+Ox(l)/2>e.swipeLeft*-1)return n=l,!1}else if(l.offsetLeft-t+e1(l)/2>e.swipeLeft*-1)return n=l,!1;return!0}),!n)return 0;const i=e.rtl===!0?e.slideCount-e.currentSlide:e.currentSlide;return Math.abs(n.dataset.index-i)||1}else return e.slidesToScroll},Ix=(e,t)=>t.reduce((n,o)=>n&&e.hasOwnProperty(o),!0)?null:console.error("Keys Missing:",e),Vd=e=>{Ix(e,["left","variableWidth","slideCount","slidesToShow","slideWidth"]);let t,n;const o=e.slideCount+2*e.slidesToShow;e.vertical?n=o*e.slideHeight:t=eoe(e)*e.slideWidth;let r={opacity:1,transition:"",WebkitTransition:""};if(e.useTransform){const i=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",a=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",l=e.vertical?"translateY("+e.left+"px)":"translateX("+e.left+"px)";r=y(y({},r),{WebkitTransform:i,transform:a,msTransform:l})}else e.vertical?r.top=e.left:r.left=e.left;return e.fade&&(r={opacity:1}),t&&(r.width=t+"px"),n&&(r.height=n+"px"),window&&!window.addEventListener&&window.attachEvent&&(e.vertical?r.marginTop=e.left+"px":r.marginLeft=e.left+"px"),r},z5=e=>{Ix(e,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);const t=Vd(e);return e.useTransform?(t.WebkitTransition="-webkit-transform "+e.speed+"ms "+e.cssEase,t.transition="transform "+e.speed+"ms "+e.cssEase):e.vertical?t.transition="top "+e.speed+"ms "+e.cssEase:t.transition="left "+e.speed+"ms "+e.cssEase,t},Kd=e=>{if(e.unslick)return 0;Ix(e,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);const{slideIndex:t,trackRef:n,infinite:o,centerMode:r,slideCount:i,slidesToShow:a,slidesToScroll:l,slideWidth:s,listWidth:u,variableWidth:c,slideHeight:d,fade:f,vertical:p}=e;let v=0,h,m,b=0;if(f||e.slideCount===1)return 0;let S=0;if(o?(S=-ji(e),i%l!==0&&t+l>i&&(S=-(t>i?a-(t-i):i%l)),r&&(S+=parseInt(a/2))):(i%l!==0&&t+l>i&&(S=a-i%l),r&&(S=parseInt(a/2))),v=S*s,b=S*d,p?h=t*d*-1+b:h=t*s*-1+v,c===!0){let C;const $=n;if(C=t+ji(e),m=$&&$.childNodes[C],h=m?m.offsetLeft*-1:0,r===!0){C=o?t+ji(e):t,m=$&&$.children[C],h=0;for(let x=0;xe.unslick||!e.infinite?0:e.variableWidth?e.slideCount:e.slidesToShow+(e.centerMode?1:0),Xp=e=>e.unslick||!e.infinite?0:e.slideCount,eoe=e=>e.slideCount===1?1:ji(e)+e.slideCount+Xp(e),toe=e=>e.targetSlide>e.currentSlide?e.targetSlide>e.currentSlide+noe(e)?"left":"right":e.targetSlide{let{slidesToShow:t,centerMode:n,rtl:o,centerPadding:r}=e;if(n){let i=(t-1)/2+1;return parseInt(r)>0&&(i+=1),o&&t%2===0&&(i+=1),i}return o?0:t-1},ooe=e=>{let{slidesToShow:t,centerMode:n,rtl:o,centerPadding:r}=e;if(n){let i=(t-1)/2+1;return parseInt(r)>0&&(i+=1),!o&&t%2===0&&(i+=1),i}return o?t-1:0},SI=()=>!!(typeof window<"u"&&window.document&&window.document.createElement),K0=e=>{let t,n,o,r;e.rtl?r=e.slideCount-1-e.index:r=e.index;const i=r<0||r>=e.slideCount;e.centerMode?(o=Math.floor(e.slidesToShow/2),n=(r-e.currentSlide)%e.slideCount===0,r>e.currentSlide-o-1&&r<=e.currentSlide+o&&(t=!0)):t=e.currentSlide<=r&&r=e.slideCount?a=e.targetSlide-e.slideCount:a=e.targetSlide,{"slick-slide":!0,"slick-active":t,"slick-center":n,"slick-cloned":i,"slick-current":r===a}},roe=function(e){const t={};return(e.variableWidth===void 0||e.variableWidth===!1)&&(t.width=e.slideWidth+(typeof e.slideWidth=="number"?"px":"")),e.fade&&(t.position="relative",e.vertical?t.top=-e.index*parseInt(e.slideHeight)+"px":t.left=-e.index*parseInt(e.slideWidth)+"px",t.opacity=e.currentSlide===e.index?1:0,e.useCSS&&(t.transition="opacity "+e.speed+"ms "+e.cssEase+", visibility "+e.speed+"ms "+e.cssEase)),t},U0=(e,t)=>e.key+"-"+t,ioe=function(e,t){let n;const o=[],r=[],i=[],a=t.length,l=F5(e),s=B5(e);return t.forEach((u,c)=>{let d;const f={message:"children",index:c,slidesToScroll:e.slidesToScroll,currentSlide:e.currentSlide};!e.lazyLoad||e.lazyLoad&&e.lazyLoadedList.indexOf(c)>=0?d=u:d=g("div");const p=roe(y(y({},e),{index:c})),v=d.props.class||"";let h=K0(y(y({},e),{index:c}));if(o.push(Zu(d,{key:"original"+U0(d,c),tabindex:"-1","data-index":c,"aria-hidden":!h["slick-active"],class:ge(h,v),style:y(y({outline:"none"},d.props.style||{}),p),onClick:()=>{e.focusOnSelect&&e.focusOnSelect(f)}})),e.infinite&&e.fade===!1){const m=a-c;m<=ji(e)&&a!==e.slidesToShow&&(n=-m,n>=l&&(d=u),h=K0(y(y({},e),{index:n})),r.push(Zu(d,{key:"precloned"+U0(d,n),class:ge(h,v),tabindex:"-1","data-index":n,"aria-hidden":!h["slick-active"],style:y(y({},d.props.style||{}),p),onClick:()=>{e.focusOnSelect&&e.focusOnSelect(f)}}))),a!==e.slidesToShow&&(n=a+c,n{e.focusOnSelect&&e.focusOnSelect(f)}})))}}),e.rtl?r.concat(o,i).reverse():r.concat(o,i)},j5=(e,t)=>{let{attrs:n,slots:o}=t;const r=ioe(n,Ot(o==null?void 0:o.default())),{onMouseenter:i,onMouseover:a,onMouseleave:l}=n,s={onMouseenter:i,onMouseover:a,onMouseleave:l},u=y({class:"slick-track",style:n.trackStyle},s);return g("div",u,[r])};j5.inheritAttrs=!1;const aoe=function(e){let t;return e.infinite?t=Math.ceil(e.slideCount/e.slidesToScroll):t=Math.ceil((e.slideCount-e.slidesToShow)/e.slidesToScroll)+1,t},W5=(e,t)=>{let{attrs:n}=t;const{slideCount:o,slidesToScroll:r,slidesToShow:i,infinite:a,currentSlide:l,appendDots:s,customPaging:u,clickHandler:c,dotsClass:d,onMouseenter:f,onMouseover:p,onMouseleave:v}=n,h=aoe({slideCount:o,slidesToScroll:r,slidesToShow:i,infinite:a}),m={onMouseenter:f,onMouseover:p,onMouseleave:v};let b=[];for(let S=0;S=P&&l<=$:l===P}),O={message:"dots",index:S,slidesToScroll:r,currentSlide:l};b=b.concat(g("li",{key:S,class:w},[mt(u({i:S}),{onClick:I})]))}return mt(s({dots:b}),y({class:d},m))};W5.inheritAttrs=!1;function V5(){}function K5(e,t,n){n&&n.preventDefault(),t(e,n)}const U5=(e,t)=>{let{attrs:n}=t;const{clickHandler:o,infinite:r,currentSlide:i,slideCount:a,slidesToShow:l}=n,s={"slick-arrow":!0,"slick-prev":!0};let u=function(p){K5({message:"previous"},o,p)};!r&&(i===0||a<=l)&&(s["slick-disabled"]=!0,u=V5);const c={key:"0","data-role":"none",class:s,style:{display:"block"},onClick:u},d={currentSlide:i,slideCount:a};let f;return n.prevArrow?f=mt(n.prevArrow(y(y({},c),d)),{key:"0",class:s,style:{display:"block"},onClick:u},!1):f=g("button",k({key:"0",type:"button"},c),[" ",zn("Previous")]),f};U5.inheritAttrs=!1;const G5=(e,t)=>{let{attrs:n}=t;const{clickHandler:o,currentSlide:r,slideCount:i}=n,a={"slick-arrow":!0,"slick-next":!0};let l=function(d){K5({message:"next"},o,d)};rm(n)||(a["slick-disabled"]=!0,l=V5);const s={key:"1","data-role":"none",class:ge(a),style:{display:"block"},onClick:l},u={currentSlide:r,slideCount:i};let c;return n.nextArrow?c=mt(n.nextArrow(y(y({},s),u)),{key:"1",class:ge(a),style:{display:"block"},onClick:l},!1):c=g("button",k({key:"1",type:"button"},s),[" ",zn("Next")]),c};G5.inheritAttrs=!1;var loe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{this.currentSlide>=e.children.length&&this.changeSlide({message:"index",index:e.children.length-e.slidesToShow,currentSlide:this.currentSlide}),!this.preProps.autoplay&&e.autoplay?this.handleAutoPlay("playing"):e.autoplay?this.handleAutoPlay("update"):this.pause("paused")}),this.preProps=y({},e)}},mounted(){if(this.__emit("init"),this.lazyLoad){const e=mh(y(y({},this.$props),this.$data));e.length>0&&(this.setState(t=>({lazyLoadedList:t.lazyLoadedList.concat(e)})),this.__emit("lazyLoad",e))}this.$nextTick(()=>{const e=y({listRef:this.list,trackRef:this.track,children:this.children},this.$props);this.updateState(e,!0,()=>{this.adaptHeight(),this.autoplay&&this.handleAutoPlay("playing")}),this.lazyLoad==="progressive"&&(this.lazyLoadTimer=setInterval(this.progressiveLazyLoad,1e3)),this.ro=new AS(()=>{this.animating?(this.onWindowResized(!1),this.callbackTimers.push(setTimeout(()=>this.onWindowResized(),this.speed))):this.onWindowResized()}),this.ro.observe(this.list),document.querySelectorAll&&Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"),t=>{t.onfocus=this.$props.pauseOnFocus?this.onSlideFocus:null,t.onblur=this.$props.pauseOnFocus?this.onSlideBlur:null}),window.addEventListener?window.addEventListener("resize",this.onWindowResized):window.attachEvent("onresize",this.onWindowResized)})},beforeUnmount(){var e;this.animationEndCallback&&clearTimeout(this.animationEndCallback),this.lazyLoadTimer&&clearInterval(this.lazyLoadTimer),this.callbackTimers.length&&(this.callbackTimers.forEach(t=>clearTimeout(t)),this.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",this.onWindowResized):window.detachEvent("onresize",this.onWindowResized),this.autoplayTimer&&clearInterval(this.autoplayTimer),(e=this.ro)===null||e===void 0||e.disconnect()},updated(){if(this.checkImagesLoad(),this.__emit("reInit"),this.lazyLoad){const e=mh(y(y({},this.$props),this.$data));e.length>0&&(this.setState(t=>({lazyLoadedList:t.lazyLoadedList.concat(e)})),this.__emit("lazyLoad"))}this.adaptHeight()},methods:{listRefHandler(e){this.list=e},trackRefHandler(e){this.track=e},adaptHeight(){if(this.adaptiveHeight&&this.list){const e=this.list.querySelector(`[data-index="${this.currentSlide}"]`);this.list.style.height=Ox(e)+"px"}},onWindowResized(e){this.debouncedResize&&this.debouncedResize.cancel(),this.debouncedResize=MC(()=>this.resizeWindow(e),50),this.debouncedResize()},resizeWindow(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(!!!this.track)return;const n=y(y({listRef:this.list,trackRef:this.track,children:this.children},this.$props),this.$data);this.updateState(n,e,()=>{this.autoplay?this.handleAutoPlay("update"):this.pause("paused")}),this.setState({animating:!1}),clearTimeout(this.animationEndCallback),delete this.animationEndCallback},updateState(e,t,n){const o=Une(e);e=y(y(y({},e),o),{slideIndex:o.currentSlide});const r=Kd(e);e=y(y({},e),{left:r});const i=Vd(e);(t||this.children.length!==e.children.length)&&(o.trackStyle=i),this.setState(o,n)},ssrInit(){const e=this.children;if(this.variableWidth){let s=0,u=0;const c=[],d=ji(y(y(y({},this.$props),this.$data),{slideCount:e.length})),f=Xp(y(y(y({},this.$props),this.$data),{slideCount:e.length}));e.forEach(v=>{var h,m;const b=((m=(h=v.props.style)===null||h===void 0?void 0:h.width)===null||m===void 0?void 0:m.split("px")[0])||0;c.push(b),s+=b});for(let v=0;v{const r=()=>++n&&n>=t&&this.onWindowResized();if(!o.onclick)o.onclick=()=>o.parentNode.focus();else{const i=o.onclick;o.onclick=()=>{i(),o.parentNode.focus()}}o.onload||(this.$props.lazyLoad?o.onload=()=>{this.adaptHeight(),this.callbackTimers.push(setTimeout(this.onWindowResized,this.speed))}:(o.onload=r,o.onerror=()=>{r(),this.__emit("lazyLoadError")}))})},progressiveLazyLoad(){const e=[],t=y(y({},this.$props),this.$data);for(let n=this.currentSlide;n=-ji(t);n--)if(this.lazyLoadedList.indexOf(n)<0){e.push(n);break}e.length>0?(this.setState(n=>({lazyLoadedList:n.lazyLoadedList.concat(e)})),this.__emit("lazyLoad",e)):this.lazyLoadTimer&&(clearInterval(this.lazyLoadTimer),delete this.lazyLoadTimer)},slideHandler(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{asNavFor:n,beforeChange:o,speed:r,afterChange:i}=this.$props,{state:a,nextState:l}=Gne(y(y(y({index:e},this.$props),this.$data),{trackRef:this.track,useCSS:this.useCSS&&!t}));if(!a)return;o&&o(this.currentSlide,a.currentSlide);const s=a.lazyLoadedList.filter(u=>this.lazyLoadedList.indexOf(u)<0);this.$attrs.onLazyLoad&&s.length>0&&this.__emit("lazyLoad",s),!this.$props.waitForAnimate&&this.animationEndCallback&&(clearTimeout(this.animationEndCallback),i&&i(this.currentSlide),delete this.animationEndCallback),this.setState(a,()=>{n&&this.asNavForIndex!==e&&(this.asNavForIndex=e,n.innerSlider.slideHandler(e)),l&&(this.animationEndCallback=setTimeout(()=>{const{animating:u}=l,c=loe(l,["animating"]);this.setState(c,()=>{this.callbackTimers.push(setTimeout(()=>this.setState({animating:u}),10)),i&&i(a.currentSlide),delete this.animationEndCallback})},r))})},changeSlide(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=y(y({},this.$props),this.$data),o=Xne(n,e);if(!(o!==0&&!o)&&(t===!0?this.slideHandler(o,t):this.slideHandler(o),this.$props.autoplay&&this.handleAutoPlay("update"),this.$props.focusOnSelect)){const r=this.list.querySelectorAll(".slick-current");r[0]&&r[0].focus()}},clickHandler(e){this.clickable===!1&&(e.stopPropagation(),e.preventDefault()),this.clickable=!0},keyHandler(e){const t=Yne(e,this.accessibility,this.rtl);t!==""&&this.changeSlide({message:t})},selectHandler(e){this.changeSlide(e)},disableBodyScroll(){const e=t=>{t=t||window.event,t.preventDefault&&t.preventDefault(),t.returnValue=!1};window.ontouchmove=e},enableBodyScroll(){window.ontouchmove=null},swipeStart(e){this.verticalSwiping&&this.disableBodyScroll();const t=qne(e,this.swipe,this.draggable);t!==""&&this.setState(t)},swipeMove(e){const t=Jne(e,y(y(y({},this.$props),this.$data),{trackRef:this.track,listRef:this.list,slideIndex:this.currentSlide}));t&&(t.swiping&&(this.clickable=!1),this.setState(t))},swipeEnd(e){const t=Zne(e,y(y(y({},this.$props),this.$data),{trackRef:this.track,listRef:this.list,slideIndex:this.currentSlide}));if(!t)return;const n=t.triggerSlideHandler;delete t.triggerSlideHandler,this.setState(t),n!==void 0&&(this.slideHandler(n),this.$props.verticalSwiping&&this.enableBodyScroll())},touchEnd(e){this.swipeEnd(e),this.clickable=!0},slickPrev(){this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"previous"}),0))},slickNext(){this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"next"}),0))},slickGoTo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e=Number(e),isNaN(e))return"";this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"index",index:e,currentSlide:this.currentSlide},t),0))},play(){let e;if(this.rtl)e=this.currentSlide-this.slidesToScroll;else if(rm(y(y({},this.$props),this.$data)))e=this.currentSlide+this.slidesToScroll;else return!1;this.slideHandler(e)},handleAutoPlay(e){this.autoplayTimer&&clearInterval(this.autoplayTimer);const t=this.autoplaying;if(e==="update"){if(t==="hovered"||t==="focused"||t==="paused")return}else if(e==="leave"){if(t==="paused"||t==="focused")return}else if(e==="blur"&&(t==="paused"||t==="hovered"))return;this.autoplayTimer=setInterval(this.play,this.autoplaySpeed+50),this.setState({autoplaying:"playing"})},pause(e){this.autoplayTimer&&(clearInterval(this.autoplayTimer),this.autoplayTimer=null);const t=this.autoplaying;e==="paused"?this.setState({autoplaying:"paused"}):e==="focused"?(t==="hovered"||t==="playing")&&this.setState({autoplaying:"focused"}):t==="playing"&&this.setState({autoplaying:"hovered"})},onDotsOver(){this.autoplay&&this.pause("hovered")},onDotsLeave(){this.autoplay&&this.autoplaying==="hovered"&&this.handleAutoPlay("leave")},onTrackOver(){this.autoplay&&this.pause("hovered")},onTrackLeave(){this.autoplay&&this.autoplaying==="hovered"&&this.handleAutoPlay("leave")},onSlideFocus(){this.autoplay&&this.pause("focused")},onSlideBlur(){this.autoplay&&this.autoplaying==="focused"&&this.handleAutoPlay("blur")},customPaging(e){let{i:t}=e;return g("button",null,[t+1])},appendDots(e){let{dots:t}=e;return g("ul",{style:{display:"block"}},[t])}},render(){const e=ge("slick-slider",this.$attrs.class,{"slick-vertical":this.vertical,"slick-initialized":!0}),t=y(y({},this.$props),this.$data);let n=V0(t,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding","targetSlide","useCSS"]);const{pauseOnHover:o}=this.$props;n=y(y({},n),{focusOnSelect:this.focusOnSelect&&this.clickable?this.selectHandler:null,ref:this.trackRefHandler,onMouseleave:o?this.onTrackLeave:Ho,onMouseover:o?this.onTrackOver:Ho});let r;if(this.dots===!0&&this.slideCount>=this.slidesToShow){let m=V0(t,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","infinite","appendDots"]);m.customPaging=this.customPaging,m.appendDots=this.appendDots;const{customPaging:b,appendDots:S}=this.$slots;b&&(m.customPaging=b),S&&(m.appendDots=S);const{pauseOnDotsHover:C}=this.$props;m=y(y({},m),{clickHandler:this.changeSlide,onMouseover:C?this.onDotsOver:Ho,onMouseleave:C?this.onDotsLeave:Ho}),r=g(W5,m,null)}let i,a;const l=V0(t,["infinite","centerMode","currentSlide","slideCount","slidesToShow"]);l.clickHandler=this.changeSlide;const{prevArrow:s,nextArrow:u}=this.$slots;s&&(l.prevArrow=s),u&&(l.nextArrow=u),this.arrows&&(i=g(U5,l,null),a=g(G5,l,null));let c=null;this.vertical&&(c={height:typeof this.listHeight=="number"?`${this.listHeight}px`:this.listHeight});let d=null;this.vertical===!1?this.centerMode===!0&&(d={padding:"0px "+this.centerPadding}):this.centerMode===!0&&(d={padding:this.centerPadding+" 0px"});const f=y(y({},c),d),p=this.touchMove;let v={ref:this.listRefHandler,class:"slick-list",style:f,onClick:this.clickHandler,onMousedown:p?this.swipeStart:Ho,onMousemove:this.dragging&&p?this.swipeMove:Ho,onMouseup:p?this.swipeEnd:Ho,onMouseleave:this.dragging&&p?this.swipeEnd:Ho,[hn?"onTouchstartPassive":"onTouchstart"]:p?this.swipeStart:Ho,[hn?"onTouchmovePassive":"onTouchmove"]:this.dragging&&p?this.swipeMove:Ho,onTouchend:p?this.touchEnd:Ho,onTouchcancel:this.dragging&&p?this.swipeEnd:Ho,onKeydown:this.accessibility?this.keyHandler:Ho},h={class:e,dir:"ltr",style:this.$attrs.style};return this.unslick&&(v={class:"slick-list",ref:this.listRefHandler},h={class:e}),g("div",h,[this.unslick?"":i,g("div",v,[g(j5,n,{default:()=>[this.children]})]),this.unslick?"":a,this.unslick?"":r])}},coe=le({name:"Slider",mixins:[ls],inheritAttrs:!1,props:y({},L5),data(){return this._responsiveMediaHandlers=[],{breakpoint:null}},mounted(){if(this.responsive){const e=this.responsive.map(n=>n.breakpoint);e.sort((n,o)=>n-o),e.forEach((n,o)=>{let r;o===0?r=W0({minWidth:0,maxWidth:n}):r=W0({minWidth:e[o-1]+1,maxWidth:n}),SI()&&this.media(r,()=>{this.setState({breakpoint:n})})});const t=W0({minWidth:e.slice(-1)[0]});SI()&&this.media(t,()=>{this.setState({breakpoint:null})})}},beforeUnmount(){this._responsiveMediaHandlers.forEach(function(e){e.mql.removeListener(e.listener)})},methods:{innerSliderRefHandler(e){this.innerSlider=e},media(e,t){const n=window.matchMedia(e),o=r=>{let{matches:i}=r;i&&t()};n.addListener(o),o(n),this._responsiveMediaHandlers.push({mql:n,query:e,listener:o})},slickPrev(){var e;(e=this.innerSlider)===null||e===void 0||e.slickPrev()},slickNext(){var e;(e=this.innerSlider)===null||e===void 0||e.slickNext()},slickGoTo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var n;(n=this.innerSlider)===null||n===void 0||n.slickGoTo(e,t)},slickPause(){var e;(e=this.innerSlider)===null||e===void 0||e.pause("paused")},slickPlay(){var e;(e=this.innerSlider)===null||e===void 0||e.handleAutoPlay("play")}},render(){var e;let t,n;this.breakpoint?(n=this.responsive.filter(l=>l.breakpoint===this.breakpoint),t=n[0].settings==="unslick"?"unslick":y(y({},this.$props),n[0].settings)):t=y({},this.$props),t.centerMode&&(t.slidesToScroll>1,t.slidesToScroll=1),t.fade&&(t.slidesToShow>1,t.slidesToScroll>1,t.slidesToShow=1,t.slidesToScroll=1);let o=gv(this)||[];o=o.filter(l=>typeof l=="string"?!!l.trim():!!l),t.variableWidth&&(t.rows>1||t.slidesPerRow>1)&&(console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"),t.variableWidth=!1);const r=[];let i=null;for(let l=0;l=o.length));d+=1)c.push(mt(o[d],{key:100*l+10*u+d,tabindex:-1,style:{width:`${100/t.slidesPerRow}%`,display:"inline-block"}}));s.push(g("div",{key:10*l+u},[c]))}t.variableWidth?r.push(g("div",{key:l,style:{width:i}},[s])):r.push(g("div",{key:l},[s]))}if(t==="unslick"){const l="regular slider "+(this.className||"");return g("div",{class:l},[o])}else r.length<=t.slidesToShow&&(t.unslick=!0);const a=y(y(y({},this.$attrs),t),{children:r,ref:this.innerSliderRefHandler});return g(soe,k(k({},a),{},{__propsSymbol__:[]}),this.$slots)}}),uoe=e=>{const{componentCls:t,antCls:n,carouselArrowSize:o,carouselDotOffset:r,marginXXS:i}=e,a=-o*1.25,l=i;return{[t]:y(y({},qe(e)),{".slick-slider":{position:"relative",display:"block",boxSizing:"border-box",touchAction:"pan-y",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",".slick-track, .slick-list":{transform:"translate3d(0, 0, 0)",touchAction:"pan-y"}},".slick-list":{position:"relative",display:"block",margin:0,padding:0,overflow:"hidden","&:focus":{outline:"none"},"&.dragging":{cursor:"pointer"},".slick-slide":{pointerEvents:"none",[`input${n}-radio-input, input${n}-checkbox-input`]:{visibility:"hidden"},"&.slick-active":{pointerEvents:"auto",[`input${n}-radio-input, input${n}-checkbox-input`]:{visibility:"visible"}},"> div > div":{verticalAlign:"bottom"}}},".slick-track":{position:"relative",top:0,insetInlineStart:0,display:"block","&::before, &::after":{display:"table",content:'""'},"&::after":{clear:"both"}},".slick-slide":{display:"none",float:"left",height:"100%",minHeight:1,img:{display:"block"},"&.dragging img":{pointerEvents:"none"}},".slick-initialized .slick-slide":{display:"block"},".slick-vertical .slick-slide":{display:"block",height:"auto"},".slick-arrow.slick-hidden":{display:"none"},".slick-prev, .slick-next":{position:"absolute",top:"50%",display:"block",width:o,height:o,marginTop:-o/2,padding:0,color:"transparent",fontSize:0,lineHeight:0,background:"transparent",border:0,outline:"none",cursor:"pointer","&:hover, &:focus":{color:"transparent",background:"transparent",outline:"none","&::before":{opacity:1}},"&.slick-disabled::before":{opacity:.25}},".slick-prev":{insetInlineStart:a,"&::before":{content:'"←"'}},".slick-next":{insetInlineEnd:a,"&::before":{content:'"→"'}},".slick-dots":{position:"absolute",insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:15,display:"flex !important",justifyContent:"center",paddingInlineStart:0,listStyle:"none","&-bottom":{bottom:r},"&-top":{top:r,bottom:"auto"},li:{position:"relative",display:"inline-block",flex:"0 1 auto",boxSizing:"content-box",width:e.dotWidth,height:e.dotHeight,marginInline:l,padding:0,textAlign:"center",textIndent:-999,verticalAlign:"top",transition:`all ${e.motionDurationSlow}`,button:{position:"relative",display:"block",width:"100%",height:e.dotHeight,padding:0,color:"transparent",fontSize:0,background:e.colorBgContainer,border:0,borderRadius:1,outline:"none",cursor:"pointer",opacity:.3,transition:`all ${e.motionDurationSlow}`,"&: hover, &:focus":{opacity:.75},"&::after":{position:"absolute",inset:-l,content:'""'}},"&.slick-active":{width:e.dotWidthActive,"& button":{background:e.colorBgContainer,opacity:1},"&: hover, &:focus":{opacity:1}}}}})}},doe=e=>{const{componentCls:t,carouselDotOffset:n,marginXXS:o}=e,r={width:e.dotHeight,height:e.dotWidth};return{[`${t}-vertical`]:{".slick-dots":{top:"50%",bottom:"auto",flexDirection:"column",width:e.dotHeight,height:"auto",margin:0,transform:"translateY(-50%)","&-left":{insetInlineEnd:"auto",insetInlineStart:n},"&-right":{insetInlineEnd:n,insetInlineStart:"auto"},li:y(y({},r),{margin:`${o}px 0`,verticalAlign:"baseline",button:r,"&.slick-active":y(y({},r),{button:r})})}}}},foe=e=>{const{componentCls:t}=e;return[{[`${t}-rtl`]:{direction:"rtl",".slick-dots":{[`${t}-rtl&`]:{flexDirection:"row-reverse"}}}},{[`${t}-vertical`]:{".slick-dots":{[`${t}-rtl&`]:{flexDirection:"column"}}}}]},poe=Ue("Carousel",e=>{const{controlHeightLG:t,controlHeightSM:n}=e,o=Be(e,{carouselArrowSize:t/2,carouselDotOffset:n/2});return[uoe(o),doe(o),foe(o)]},{dotWidth:16,dotHeight:3,dotWidthActive:24});var goe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({effect:Ne(),dots:$e(!0),vertical:$e(),autoplay:$e(),easing:String,beforeChange:ye(),afterChange:ye(),prefixCls:String,accessibility:$e(),nextArrow:K.any,prevArrow:K.any,pauseOnHover:$e(),adaptiveHeight:$e(),arrows:$e(!1),autoplaySpeed:Number,centerMode:$e(),centerPadding:String,cssEase:String,dotsClass:String,draggable:$e(!1),fade:$e(),focusOnSelect:$e(),infinite:$e(),initialSlide:Number,lazyLoad:Ne(),rtl:$e(),slide:String,slidesToShow:Number,slidesToScroll:Number,speed:Number,swipe:$e(),swipeToSlide:$e(),swipeEvent:ye(),touchMove:$e(),touchThreshold:Number,variableWidth:$e(),useCSS:$e(),slickGoTo:Number,responsive:Array,dotPosition:Ne(),verticalSwiping:$e(!1)}),voe=le({compatConfig:{MODE:3},name:"ACarousel",inheritAttrs:!1,props:hoe(),setup(e,t){let{slots:n,attrs:o,expose:r}=t;const i=ae();r({goTo:function(v){let h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var m;(m=i.value)===null||m===void 0||m.slickGoTo(v,h)},autoplay:v=>{var h,m;(m=(h=i.value)===null||h===void 0?void 0:h.innerSlider)===null||m===void 0||m.handleAutoPlay(v)},prev:()=>{var v;(v=i.value)===null||v===void 0||v.slickPrev()},next:()=>{var v;(v=i.value)===null||v===void 0||v.slickNext()},innerSlider:E(()=>{var v;return(v=i.value)===null||v===void 0?void 0:v.innerSlider})}),Ve(()=>{Yo(e.vertical===void 0)});const{prefixCls:l,direction:s}=Te("carousel",e),[u,c]=poe(l),d=E(()=>e.dotPosition?e.dotPosition:e.vertical!==void 0&&e.vertical?"right":"bottom"),f=E(()=>d.value==="left"||d.value==="right"),p=E(()=>{const v="slick-dots";return ge({[v]:!0,[`${v}-${d.value}`]:!0,[`${e.dotsClass}`]:!!e.dotsClass})});return()=>{const{dots:v,arrows:h,draggable:m,effect:b}=e,{class:S,style:C}=o,$=goe(o,["class","style"]),x=b==="fade"?!0:e.fade,P=ge(l.value,{[`${l.value}-rtl`]:s.value==="rtl",[`${l.value}-vertical`]:f.value,[`${S}`]:!!S},c.value);return u(g("div",{class:P,style:C},[g(coe,k(k(k({ref:i},e),$),{},{dots:!!v,dotsClass:p.value,arrows:h,draggable:m,fade:x,vertical:f.value}),n)]))}}}),moe=Lt(voe),Tx="__RC_CASCADER_SPLIT__",X5="SHOW_PARENT",Y5="SHOW_CHILD";function Da(e){return e.join(Tx)}function Ks(e){return e.map(Da)}function boe(e){return e.split(Tx)}function yoe(e){const{label:t,value:n,children:o}=e||{},r=n||"value";return{label:t||"label",value:r,key:r,children:o||"children"}}function Nu(e,t){var n,o;return(n=e.isLeaf)!==null&&n!==void 0?n:!(!((o=e[t.children])===null||o===void 0)&&o.length)}function Soe(e){const t=e.parentElement;if(!t)return;const n=e.offsetTop-t.offsetTop;n-t.scrollTop<0?t.scrollTo({top:n}):n+e.offsetHeight-t.scrollTop>t.offsetHeight&&t.scrollTo({top:n+e.offsetHeight-t.offsetHeight})}const q5=Symbol("TreeContextKey"),Coe=le({compatConfig:{MODE:3},name:"TreeContext",props:{value:{type:Object}},setup(e,t){let{slots:n}=t;return Xe(q5,E(()=>e.value)),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),Ex=()=>ze(q5,E(()=>({}))),J5=Symbol("KeysStateKey"),xoe=e=>{Xe(J5,e)},Z5=()=>ze(J5,{expandedKeys:se([]),selectedKeys:se([]),loadedKeys:se([]),loadingKeys:se([]),checkedKeys:se([]),halfCheckedKeys:se([]),expandedKeysSet:E(()=>new Set),selectedKeysSet:E(()=>new Set),loadedKeysSet:E(()=>new Set),loadingKeysSet:E(()=>new Set),checkedKeysSet:E(()=>new Set),halfCheckedKeysSet:E(()=>new Set),flattenNodes:se([])}),$oe=e=>{let{prefixCls:t,level:n,isStart:o,isEnd:r}=e;const i=`${t}-indent-unit`,a=[];for(let l=0;l({prefixCls:String,focusable:{type:Boolean,default:void 0},activeKey:[Number,String],tabindex:Number,children:K.any,treeData:{type:Array},fieldNames:{type:Object},showLine:{type:[Boolean,Object],default:void 0},showIcon:{type:Boolean,default:void 0},icon:K.any,selectable:{type:Boolean,default:void 0},expandAction:[String,Boolean],disabled:{type:Boolean,default:void 0},multiple:{type:Boolean,default:void 0},checkable:{type:Boolean,default:void 0},checkStrictly:{type:Boolean,default:void 0},draggable:{type:[Function,Boolean]},defaultExpandParent:{type:Boolean,default:void 0},autoExpandParent:{type:Boolean,default:void 0},defaultExpandAll:{type:Boolean,default:void 0},defaultExpandedKeys:{type:Array},expandedKeys:{type:Array},defaultCheckedKeys:{type:Array},checkedKeys:{type:[Object,Array]},defaultSelectedKeys:{type:Array},selectedKeys:{type:Array},allowDrop:{type:Function},dropIndicatorRender:{type:Function},onFocus:{type:Function},onBlur:{type:Function},onKeydown:{type:Function},onContextmenu:{type:Function},onClick:{type:Function},onDblclick:{type:Function},onScroll:{type:Function},onExpand:{type:Function},onCheck:{type:Function},onSelect:{type:Function},onLoad:{type:Function},loadData:{type:Function},loadedKeys:{type:Array},onMouseenter:{type:Function},onMouseleave:{type:Function},onRightClick:{type:Function},onDragstart:{type:Function},onDragenter:{type:Function},onDragover:{type:Function},onDragleave:{type:Function},onDragend:{type:Function},onDrop:{type:Function},onActiveChange:{type:Function},filterTreeNode:{type:Function},motion:K.any,switcherIcon:K.any,height:Number,itemHeight:Number,virtual:{type:Boolean,default:void 0},direction:{type:String},rootClassName:String,rootStyle:Object});var Poe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r"`v-slot:"+ce+"` ")}`;const i=se(!1),a=Ex(),{expandedKeysSet:l,selectedKeysSet:s,loadedKeysSet:u,loadingKeysSet:c,checkedKeysSet:d,halfCheckedKeysSet:f}=Z5(),{dragOverNodeKey:p,dropPosition:v,keyEntities:h}=a.value,m=E(()=>Yp(e.eventKey,{expandedKeysSet:l.value,selectedKeysSet:s.value,loadedKeysSet:u.value,loadingKeysSet:c.value,checkedKeysSet:d.value,halfCheckedKeysSet:f.value,dragOverNodeKey:p,dropPosition:v,keyEntities:h})),b=Vo(()=>m.value.expanded),S=Vo(()=>m.value.selected),C=Vo(()=>m.value.checked),$=Vo(()=>m.value.loaded),x=Vo(()=>m.value.loading),P=Vo(()=>m.value.halfChecked),w=Vo(()=>m.value.dragOver),O=Vo(()=>m.value.dragOverGapTop),I=Vo(()=>m.value.dragOverGapBottom),_=Vo(()=>m.value.pos),T=se(),A=E(()=>{const{eventKey:ce}=e,{keyEntities:ee}=a.value,{children:ue}=ee[ce]||{};return!!(ue||[]).length}),R=E(()=>{const{isLeaf:ce}=e,{loadData:ee}=a.value,ue=A.value;return ce===!1?!1:ce||!ee&&!ue||ee&&$.value&&!ue}),H=E(()=>R.value?null:b.value?CI:xI),M=E(()=>{const{disabled:ce}=e,{disabled:ee}=a.value;return!!(ee||ce)}),D=E(()=>{const{checkable:ce}=e,{checkable:ee}=a.value;return!ee||ce===!1?!1:ee}),N=E(()=>{const{selectable:ce}=e,{selectable:ee}=a.value;return typeof ce=="boolean"?ce:ee}),L=E(()=>{const{data:ce,active:ee,checkable:ue,disableCheckbox:xe,disabled:Pe,selectable:_e}=e;return y(y({active:ee,checkable:ue,disableCheckbox:xe,disabled:Pe,selectable:_e},ce),{dataRef:ce,data:ce,isLeaf:R.value,checked:C.value,expanded:b.value,loading:x.value,selected:S.value,halfChecked:P.value})}),F=Jt(),B=E(()=>{const{eventKey:ce}=e,{keyEntities:ee}=a.value,{parent:ue}=ee[ce]||{};return y(y({},qp(y({},e,m.value))),{parent:ue})}),j=rt({eventData:B,eventKey:E(()=>e.eventKey),selectHandle:T,pos:_,key:F.vnode.key});r(j);const z=ce=>{const{onNodeDoubleClick:ee}=a.value;ee(ce,B.value)},G=ce=>{if(M.value)return;const{onNodeSelect:ee}=a.value;ce.preventDefault(),ee(ce,B.value)},Q=ce=>{if(M.value)return;const{disableCheckbox:ee}=e,{onNodeCheck:ue}=a.value;if(!D.value||ee)return;ce.preventDefault();const xe=!C.value;ue(ce,B.value,xe)},Y=ce=>{const{onNodeClick:ee}=a.value;ee(ce,B.value),N.value?G(ce):Q(ce)},oe=ce=>{const{onNodeMouseEnter:ee}=a.value;ee(ce,B.value)},Z=ce=>{const{onNodeMouseLeave:ee}=a.value;ee(ce,B.value)},re=ce=>{const{onNodeContextMenu:ee}=a.value;ee(ce,B.value)},ne=ce=>{const{onNodeDragStart:ee}=a.value;ce.stopPropagation(),i.value=!0,ee(ce,j);try{ce.dataTransfer.setData("text/plain","")}catch{}},X=ce=>{const{onNodeDragEnter:ee}=a.value;ce.preventDefault(),ce.stopPropagation(),ee(ce,j)},te=ce=>{const{onNodeDragOver:ee}=a.value;ce.preventDefault(),ce.stopPropagation(),ee(ce,j)},W=ce=>{const{onNodeDragLeave:ee}=a.value;ce.stopPropagation(),ee(ce,j)},U=ce=>{const{onNodeDragEnd:ee}=a.value;ce.stopPropagation(),i.value=!1,ee(ce,j)},J=ce=>{const{onNodeDrop:ee}=a.value;ce.preventDefault(),ce.stopPropagation(),i.value=!1,ee(ce,j)},de=ce=>{const{onNodeExpand:ee}=a.value;x.value||ee(ce,B.value)},fe=()=>{const{data:ce}=e,{draggable:ee}=a.value;return!!(ee&&(!ee.nodeDraggable||ee.nodeDraggable(ce)))},pe=()=>{const{draggable:ce,prefixCls:ee}=a.value;return ce&&(ce!=null&&ce.icon)?g("span",{class:`${ee}-draggable-icon`},[ce.icon]):null},ve=()=>{var ce,ee,ue;const{switcherIcon:xe=o.switcherIcon||((ce=a.value.slots)===null||ce===void 0?void 0:ce[(ue=(ee=e.data)===null||ee===void 0?void 0:ee.slots)===null||ue===void 0?void 0:ue.switcherIcon])}=e,{switcherIcon:Pe}=a.value,_e=xe||Pe;return typeof _e=="function"?_e(L.value):_e},he=()=>{const{loadData:ce,onNodeLoad:ee}=a.value;x.value||ce&&b.value&&!R.value&&!A.value&&!$.value&&ee(B.value)};Ke(()=>{he()}),uo(()=>{he()});const V=()=>{const{prefixCls:ce}=a.value,ee=ve();if(R.value)return ee!==!1?g("span",{class:ge(`${ce}-switcher`,`${ce}-switcher-noop`)},[ee]):null;const ue=ge(`${ce}-switcher`,`${ce}-switcher_${b.value?CI:xI}`);return ee!==!1?g("span",{onClick:de,class:ue},[ee]):null},q=()=>{var ce,ee;const{disableCheckbox:ue}=e,{prefixCls:xe}=a.value,Pe=M.value;return D.value?g("span",{class:ge(`${xe}-checkbox`,C.value&&`${xe}-checkbox-checked`,!C.value&&P.value&&`${xe}-checkbox-indeterminate`,(Pe||ue)&&`${xe}-checkbox-disabled`),onClick:Q},[(ee=(ce=a.value).customCheckable)===null||ee===void 0?void 0:ee.call(ce)]):null},ie=()=>{const{prefixCls:ce}=a.value;return g("span",{class:ge(`${ce}-iconEle`,`${ce}-icon__${H.value||"docu"}`,x.value&&`${ce}-icon_loading`)},null)},me=()=>{const{disabled:ce,eventKey:ee}=e,{draggable:ue,dropLevelOffset:xe,dropPosition:Pe,prefixCls:_e,indent:Ce,dropIndicatorRender:we,dragOverNodeKey:Oe,direction:Me}=a.value;return!ce&&ue!==!1&&Oe===ee?we({dropPosition:Pe,dropLevelOffset:xe,indent:Ce,prefixCls:_e,direction:Me}):null},Se=()=>{var ce,ee,ue,xe,Pe,_e;const{icon:Ce=o.icon,data:we}=e,Oe=o.title||((ce=a.value.slots)===null||ce===void 0?void 0:ce[(ue=(ee=e.data)===null||ee===void 0?void 0:ee.slots)===null||ue===void 0?void 0:ue.title])||((xe=a.value.slots)===null||xe===void 0?void 0:xe.title)||e.title,{prefixCls:Me,showIcon:Re,icon:Ae,loadData:Fe}=a.value,lt=M.value,bt=`${Me}-node-content-wrapper`;let ft;if(Re){const fn=Ce||((Pe=a.value.slots)===null||Pe===void 0?void 0:Pe[(_e=we==null?void 0:we.slots)===null||_e===void 0?void 0:_e.icon])||Ae;ft=fn?g("span",{class:ge(`${Me}-iconEle`,`${Me}-icon__customize`)},[typeof fn=="function"?fn(L.value):fn]):ie()}else Fe&&x.value&&(ft=ie());let yt;typeof Oe=="function"?yt=Oe(L.value):yt=Oe,yt=yt===void 0?Ooe:yt;const Ct=g("span",{class:`${Me}-title`},[yt]);return g("span",{ref:T,title:typeof Oe=="string"?Oe:"",class:ge(`${bt}`,`${bt}-${H.value||"normal"}`,!lt&&(S.value||i.value)&&`${Me}-node-selected`),onMouseenter:oe,onMouseleave:Z,onContextmenu:re,onClick:Y,onDblclick:z},[ft,Ct,me()])};return()=>{const ce=y(y({},e),n),{eventKey:ee,isLeaf:ue,isStart:xe,isEnd:Pe,domRef:_e,active:Ce,data:we,onMousemove:Oe,selectable:Me}=ce,Re=Poe(ce,["eventKey","isLeaf","isStart","isEnd","domRef","active","data","onMousemove","selectable"]),{prefixCls:Ae,filterTreeNode:Fe,keyEntities:lt,dropContainerKey:bt,dropTargetKey:ft,draggingNodeKey:yt}=a.value,Ct=M.value,fn=Ua(Re,{aria:!0,data:!0}),{level:yn}=lt[ee]||{},On=Pe[Pe.length-1],tn=fe(),Qn=!Ct&&tn,Oo=yt===ee,er=Me!==void 0?{"aria-selected":!!Me}:void 0;return g("div",k(k({ref:_e,class:ge(n.class,`${Ae}-treenode`,{[`${Ae}-treenode-disabled`]:Ct,[`${Ae}-treenode-switcher-${b.value?"open":"close"}`]:!ue,[`${Ae}-treenode-checkbox-checked`]:C.value,[`${Ae}-treenode-checkbox-indeterminate`]:P.value,[`${Ae}-treenode-selected`]:S.value,[`${Ae}-treenode-loading`]:x.value,[`${Ae}-treenode-active`]:Ce,[`${Ae}-treenode-leaf-last`]:On,[`${Ae}-treenode-draggable`]:Qn,dragging:Oo,"drop-target":ft===ee,"drop-container":bt===ee,"drag-over":!Ct&&w.value,"drag-over-gap-top":!Ct&&O.value,"drag-over-gap-bottom":!Ct&&I.value,"filter-node":Fe&&Fe(B.value)}),style:n.style,draggable:Qn,"aria-grabbed":Oo,onDragstart:Qn?ne:void 0,onDragenter:tn?X:void 0,onDragover:tn?te:void 0,onDragleave:tn?W:void 0,onDrop:tn?J:void 0,onDragend:tn?U:void 0,onMousemove:Oe},er),fn),[g($oe,{prefixCls:Ae,level:yn,isStart:xe,isEnd:Pe},null),pe(),V(),q(),Se()])}}});function ni(e,t){if(!e)return[];const n=e.slice(),o=n.indexOf(t);return o>=0&&n.splice(o,1),n}function _i(e,t){const n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function _x(e){return e.split("-")}function tR(e,t){return`${e}-${t}`}function Ioe(e){return e&&e.type&&e.type.isTreeNode}function Toe(e,t){const n=[],o=t[e];function r(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).forEach(a=>{let{key:l,children:s}=a;n.push(l),r(s)})}return r(o.children),n}function Eoe(e){if(e.parent){const t=_x(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function _oe(e){const t=_x(e.pos);return Number(t[t.length-1])===0}function $I(e,t,n,o,r,i,a,l,s,u){var c;const{clientX:d,clientY:f}=e,{top:p,height:v}=e.target.getBoundingClientRect(),m=((u==="rtl"?-1:1)*(((r==null?void 0:r.x)||0)-d)-12)/o;let b=l[n.eventKey];if(fR.key===b.key),T=_<=0?0:_-1,A=a[T].key;b=l[A]}const S=b.key,C=b,$=b.key;let x=0,P=0;if(!s.has(S))for(let _=0;_-1.5?i({dragNode:w,dropNode:O,dropPosition:1})?x=1:I=!1:i({dragNode:w,dropNode:O,dropPosition:0})?x=0:i({dragNode:w,dropNode:O,dropPosition:1})?x=1:I=!1:i({dragNode:w,dropNode:O,dropPosition:1})?x=1:I=!1,{dropPosition:x,dropLevelOffset:P,dropTargetKey:b.key,dropTargetPos:b.pos,dragOverNodeKey:$,dropContainerKey:x===0?null:((c=b.parent)===null||c===void 0?void 0:c.key)||null,dropAllowed:I}}function wI(e,t){if(!e)return;const{multiple:n}=t;return n?e.slice():e.length?[e[0]]:e}function G0(e){if(!e)return null;let t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(typeof e=="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return null;return t}function n1(e,t){const n=new Set;function o(r){if(n.has(r))return;const i=t[r];if(!i)return;n.add(r);const{parent:a,node:l}=i;l.disabled||a&&o(a.key)}return(e||[]).forEach(r=>{o(r)}),[...n]}var Moe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r0&&arguments[0]!==void 0?arguments[0]:[];return zt(n).map(r=>{var i,a,l,s;if(!Ioe(r))return null;const u=r.children||{},c=r.key,d={};for(const[_,T]of Object.entries(r.props))d[Kc(_)]=T;const{isLeaf:f,checkable:p,selectable:v,disabled:h,disableCheckbox:m}=d,b={isLeaf:f||f===""||void 0,checkable:p||p===""||void 0,selectable:v||v===""||void 0,disabled:h||h===""||void 0,disableCheckbox:m||m===""||void 0},S=y(y({},d),b),{title:C=(i=u.title)===null||i===void 0?void 0:i.call(u,S),icon:$=(a=u.icon)===null||a===void 0?void 0:a.call(u,S),switcherIcon:x=(l=u.switcherIcon)===null||l===void 0?void 0:l.call(u,S)}=d,P=Moe(d,["title","icon","switcherIcon"]),w=(s=u.default)===null||s===void 0?void 0:s.call(u),O=y(y(y({},P),{title:C,icon:$,switcherIcon:x,key:c,isLeaf:f}),b),I=t(w);return I.length&&(O.children=I),O})}return t(e)}function Aoe(e,t,n){const{_title:o,key:r,children:i}=im(n),a=new Set(t===!0?[]:t),l=[];function s(u){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return u.map((d,f)=>{const p=tR(c?c.pos:"0",f),v=Of(d[r],p);let h;for(let b=0;bf[i]:typeof i=="function"&&(c=f=>i(f)):c=(f,p)=>Of(f[l],p);function d(f,p,v,h){const m=f?f[u]:e,b=f?tR(v.pos,p):"0",S=f?[...h,f]:[];if(f){const C=c(f,b),$={node:f,index:p,pos:b,key:C,parentPos:v.node?v.pos:null,level:v.level+1,nodes:S};t($)}m&&m.forEach((C,$)=>{d(C,$,{node:f,pos:b,level:v?v.level+1:-1},S)})}d(null)}function If(e){let{initWrapper:t,processEntity:n,onProcessFinished:o,externalGetKey:r,childrenPropName:i,fieldNames:a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=arguments.length>2?arguments[2]:void 0;const s=r||l,u={},c={};let d={posEntities:u,keyEntities:c};return t&&(d=t(d)||d),Roe(e,f=>{const{node:p,index:v,pos:h,key:m,parentPos:b,level:S,nodes:C}=f,$={node:p,nodes:C,index:v,key:m,pos:h,level:S},x=Of(m,h);u[h]=$,c[x]=$,$.parent=u[b],$.parent&&($.parent.children=$.parent.children||[],$.parent.children.push($)),n&&n($,d)},{externalGetKey:s,childrenPropName:i,fieldNames:a}),o&&o(d),d}function Yp(e,t){let{expandedKeysSet:n,selectedKeysSet:o,loadedKeysSet:r,loadingKeysSet:i,checkedKeysSet:a,halfCheckedKeysSet:l,dragOverNodeKey:s,dropPosition:u,keyEntities:c}=t;const d=c[e];return{eventKey:e,expanded:n.has(e),selected:o.has(e),loaded:r.has(e),loading:i.has(e),checked:a.has(e),halfChecked:l.has(e),pos:String(d?d.pos:""),parent:d.parent,dragOver:s===e&&u===0,dragOverGapTop:s===e&&u===-1,dragOverGapBottom:s===e&&u===1}}function qp(e){const{data:t,expanded:n,selected:o,checked:r,loaded:i,loading:a,halfChecked:l,dragOver:s,dragOverGapTop:u,dragOverGapBottom:c,pos:d,active:f,eventKey:p}=e,v=y(y({dataRef:t},t),{expanded:n,selected:o,checked:r,loaded:i,loading:a,halfChecked:l,dragOver:s,dragOverGapTop:u,dragOverGapBottom:c,pos:d,active:f,eventKey:p,key:p});return"props"in v||Object.defineProperty(v,"props",{get(){return e}}),v}const Doe=(e,t)=>E(()=>If(e.value,{fieldNames:t.value,initWrapper:o=>y(y({},o),{pathKeyEntities:{}}),processEntity:(o,r)=>{const i=o.nodes.map(a=>a[t.value.value]).join(Tx);r.pathKeyEntities[i]=o,o.key=i}}).pathKeyEntities);function Noe(e){const t=se(!1),n=ae({});return Ve(()=>{if(!e.value){t.value=!1,n.value={};return}let o={matchInputWidth:!0,limit:50};e.value&&typeof e.value=="object"&&(o=y(y({},o),e.value)),o.limit<=0&&delete o.limit,t.value=!0,n.value=o}),{showSearch:t,searchConfig:n}}const id="__rc_cascader_search_mark__",koe=(e,t,n)=>{let{label:o}=n;return t.some(r=>String(r[o]).toLowerCase().includes(e.toLowerCase()))},Loe=e=>{let{path:t,fieldNames:n}=e;return t.map(o=>o[n.label]).join(" / ")},Foe=(e,t,n,o,r,i)=>E(()=>{const{filter:a=koe,render:l=Loe,limit:s=50,sort:u}=r.value,c=[];if(!e.value)return[];function d(f,p){f.forEach(v=>{if(!u&&s>0&&c.length>=s)return;const h=[...p,v],m=v[n.value.children];(!m||m.length===0||i.value)&&a(e.value,h,{label:n.value.label})&&c.push(y(y({},v),{[n.value.label]:l({inputValue:e.value,path:h,prefixCls:o.value,fieldNames:n.value}),[id]:h})),m&&d(v[n.value.children],h)})}return d(t.value,[]),u&&c.sort((f,p)=>u(f[id],p[id],e.value,n.value)),s>0?c.slice(0,s):c});function PI(e,t,n){const o=new Set(e);return e.filter(r=>{const i=t[r],a=i?i.parent:null,l=i?i.children:null;return n===Y5?!(l&&l.some(s=>s.key&&o.has(s.key))):!(a&&!a.node.disabled&&o.has(a.key))})}function Ud(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;var r;let i=t;const a=[];for(let l=0;l{const f=d[n.value];return o?String(f)===String(s):f===s}),c=u!==-1?i==null?void 0:i[u]:null;a.push({value:(r=c==null?void 0:c[n.value])!==null&&r!==void 0?r:s,index:u,option:c}),i=c==null?void 0:c[n.children]}return a}const Boe=(e,t,n)=>E(()=>{const o=[],r=[];return n.value.forEach(i=>{Ud(i,e.value,t.value).every(l=>l.option)?r.push(i):o.push(i)}),[r,o]});function nR(e,t){const n=new Set;return e.forEach(o=>{t.has(o)||n.add(o)}),n}function Hoe(e){const{disabled:t,disableCheckbox:n,checkable:o}=e||{};return!!(t||n)||o===!1}function zoe(e,t,n,o){const r=new Set(e),i=new Set;for(let l=0;l<=n;l+=1)(t.get(l)||new Set).forEach(u=>{const{key:c,node:d,children:f=[]}=u;r.has(c)&&!o(d)&&f.filter(p=>!o(p.node)).forEach(p=>{r.add(p.key)})});const a=new Set;for(let l=n;l>=0;l-=1)(t.get(l)||new Set).forEach(u=>{const{parent:c,node:d}=u;if(o(d)||!u.parent||a.has(u.parent.key))return;if(o(u.parent.node)){a.add(c.key);return}let f=!0,p=!1;(c.children||[]).filter(v=>!o(v.node)).forEach(v=>{let{key:h}=v;const m=r.has(h);f&&!m&&(f=!1),!p&&(m||i.has(h))&&(p=!0)}),f&&r.add(c.key),p&&i.add(c.key),a.add(c.key)});return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(nR(i,r))}}function joe(e,t,n,o,r){const i=new Set(e);let a=new Set(t);for(let s=0;s<=o;s+=1)(n.get(s)||new Set).forEach(c=>{const{key:d,node:f,children:p=[]}=c;!i.has(d)&&!a.has(d)&&!r(f)&&p.filter(v=>!r(v.node)).forEach(v=>{i.delete(v.key)})});a=new Set;const l=new Set;for(let s=o;s>=0;s-=1)(n.get(s)||new Set).forEach(c=>{const{parent:d,node:f}=c;if(r(f)||!c.parent||l.has(c.parent.key))return;if(r(c.parent.node)){l.add(d.key);return}let p=!0,v=!1;(d.children||[]).filter(h=>!r(h.node)).forEach(h=>{let{key:m}=h;const b=i.has(m);p&&!b&&(p=!1),!v&&(b||a.has(m))&&(v=!0)}),p||i.delete(d.key),v&&a.add(d.key),l.add(d.key)});return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(nR(a,i))}}function pr(e,t,n,o,r,i){let a;i?a=i:a=Hoe;const l=new Set(e.filter(u=>!!n[u]));let s;return t===!0?s=zoe(l,r,o,a):s=joe(l,t.halfCheckedKeys,r,o,a),s}const Woe=(e,t,n,o,r)=>E(()=>{const i=r.value||(a=>{let{labels:l}=a;const s=o.value?l.slice(-1):l,u=" / ";return s.every(c=>["string","number"].includes(typeof c))?s.join(u):s.reduce((c,d,f)=>{const p=sn(d)?mt(d,{key:f}):d;return f===0?[p]:[...c,u,p]},[])});return e.value.map(a=>{const l=Ud(a,t.value,n.value),s=i({labels:l.map(c=>{let{option:d,value:f}=c;var p;return(p=d==null?void 0:d[n.value.label])!==null&&p!==void 0?p:f}),selectedOptions:l.map(c=>{let{option:d}=c;return d})}),u=Da(a);return{label:s,value:u,key:u,valueCells:a}})}),oR=Symbol("CascaderContextKey"),Voe=e=>{Xe(oR,e)},am=()=>ze(oR),Koe=()=>{const e=hf(),{values:t}=am(),[n,o]=$t([]);return be(()=>e.open,()=>{if(e.open&&!e.multiple){const r=t.value[0];o(r||[])}},{immediate:!0}),[n,o]},Uoe=(e,t,n,o,r,i)=>{const a=hf(),l=E(()=>a.direction==="rtl"),[s,u,c]=[ae([]),ae(),ae([])];Ve(()=>{let h=-1,m=t.value;const b=[],S=[],C=o.value.length;for(let x=0;xw[n.value.value]===o.value[x]);if(P===-1)break;h=P,b.push(h),S.push(o.value[x]),m=m[h][n.value.children]}let $=t.value;for(let x=0;x{r(h)},f=h=>{const m=c.value.length;let b=u.value;b===-1&&h<0&&(b=m);for(let S=0;S{if(s.value.length>1){const h=s.value.slice(0,-1);d(h)}else a.toggleOpen(!1)},v=()=>{var h;const b=(((h=c.value[u.value])===null||h===void 0?void 0:h[n.value.children])||[]).find(S=>!S.disabled);if(b){const S=[...s.value,b[n.value.value]];d(S)}};e.expose({onKeydown:h=>{const{which:m}=h;switch(m){case Ie.UP:case Ie.DOWN:{let b=0;m===Ie.UP?b=-1:m===Ie.DOWN&&(b=1),b!==0&&f(b);break}case Ie.LEFT:{l.value?v():p();break}case Ie.RIGHT:{l.value?p():v();break}case Ie.BACKSPACE:{a.searchValue||p();break}case Ie.ENTER:{if(s.value.length){const b=c.value[u.value],S=(b==null?void 0:b[id])||[];S.length?i(S.map(C=>C[n.value.value]),S[S.length-1]):i(s.value,b)}break}case Ie.ESC:a.toggleOpen(!1),open&&h.stopPropagation()}},onKeyup:()=>{}})};function lm(e){let{prefixCls:t,checked:n,halfChecked:o,disabled:r,onClick:i}=e;const{customSlots:a,checkable:l}=am(),s=l.value!==!1?a.value.checkable:l.value,u=typeof s=="function"?s():typeof s=="boolean"?null:s;return g("span",{class:{[t]:!0,[`${t}-checked`]:n,[`${t}-indeterminate`]:!n&&o,[`${t}-disabled`]:r},onClick:i},[u])}lm.props=["prefixCls","checked","halfChecked","disabled","onClick"];lm.displayName="Checkbox";lm.inheritAttrs=!1;const rR="__cascader_fix_label__";function sm(e){let{prefixCls:t,multiple:n,options:o,activeValue:r,prevValuePath:i,onToggleOpen:a,onSelect:l,onActive:s,checkedSet:u,halfCheckedSet:c,loadingKeys:d,isSelectable:f}=e;var p,v,h,m,b,S;const C=`${t}-menu`,$=`${t}-menu-item`,{fieldNames:x,changeOnSelect:P,expandTrigger:w,expandIcon:O,loadingIcon:I,dropdownMenuColumnStyle:_,customSlots:T}=am(),A=(p=O.value)!==null&&p!==void 0?p:(h=(v=T.value).expandIcon)===null||h===void 0?void 0:h.call(v),R=(m=I.value)!==null&&m!==void 0?m:(S=(b=T.value).loadingIcon)===null||S===void 0?void 0:S.call(b),H=w.value==="hover";return g("ul",{class:C,role:"menu"},[o.map(M=>{var D;const{disabled:N}=M,L=M[id],F=(D=M[rR])!==null&&D!==void 0?D:M[x.value.label],B=M[x.value.value],j=Nu(M,x.value),z=L?L.map(X=>X[x.value.value]):[...i,B],G=Da(z),Q=d.includes(G),Y=u.has(G),oe=c.has(G),Z=()=>{!N&&(!H||!j)&&s(z)},re=()=>{f(M)&&l(z,j)};let ne;return typeof M.title=="string"?ne=M.title:typeof F=="string"&&(ne=F),g("li",{key:G,class:[$,{[`${$}-expand`]:!j,[`${$}-active`]:r===B,[`${$}-disabled`]:N,[`${$}-loading`]:Q}],style:_.value,role:"menuitemcheckbox",title:ne,"aria-checked":Y,"data-path-key":G,onClick:()=>{Z(),(!n||j)&&re()},onDblclick:()=>{P.value&&a(!1)},onMouseenter:()=>{H&&Z()},onMousedown:X=>{X.preventDefault()}},[n&&g(lm,{prefixCls:`${t}-checkbox`,checked:Y,halfChecked:oe,disabled:N,onClick:X=>{X.stopPropagation(),re()}},null),g("div",{class:`${$}-content`},[F]),!Q&&A&&!j&&g("div",{class:`${$}-expand-icon`},[mt(A)]),Q&&R&&g("div",{class:`${$}-loading-icon`},[mt(R)])])})])}sm.props=["prefixCls","multiple","options","activeValue","prevValuePath","onToggleOpen","onSelect","onActive","checkedSet","halfCheckedSet","loadingKeys","isSelectable"];sm.displayName="Column";sm.inheritAttrs=!1;const Goe=le({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,setup(e,t){const{attrs:n,slots:o}=t,r=hf(),i=ae(),a=E(()=>r.direction==="rtl"),{options:l,values:s,halfValues:u,fieldNames:c,changeOnSelect:d,onSelect:f,searchOptions:p,dropdownPrefixCls:v,loadData:h,expandTrigger:m,customSlots:b}=am(),S=E(()=>v.value||r.prefixCls),C=se([]),$=D=>{if(!h.value||r.searchValue)return;const L=Ud(D,l.value,c.value).map(B=>{let{option:j}=B;return j}),F=L[L.length-1];if(F&&!Nu(F,c.value)){const B=Da(D);C.value=[...C.value,B],h.value(L)}};Ve(()=>{C.value.length&&C.value.forEach(D=>{const N=boe(D),L=Ud(N,l.value,c.value,!0).map(B=>{let{option:j}=B;return j}),F=L[L.length-1];(!F||F[c.value.children]||Nu(F,c.value))&&(C.value=C.value.filter(B=>B!==D))})});const x=E(()=>new Set(Ks(s.value))),P=E(()=>new Set(Ks(u.value))),[w,O]=Koe(),I=D=>{O(D),$(D)},_=D=>{const{disabled:N}=D,L=Nu(D,c.value);return!N&&(L||d.value||r.multiple)},T=function(D,N){let L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;f(D),!r.multiple&&(N||d.value&&(m.value==="hover"||L))&&r.toggleOpen(!1)},A=E(()=>r.searchValue?p.value:l.value),R=E(()=>{const D=[{options:A.value}];let N=A.value;for(let L=0;Lz[c.value.value]===F),j=B==null?void 0:B[c.value.children];if(!(j!=null&&j.length))break;N=j,D.push({options:j})}return D});Uoe(t,A,c,w,I,(D,N)=>{_(N)&&T(D,Nu(N,c.value),!0)});const M=D=>{D.preventDefault()};return Ke(()=>{be(w,D=>{var N;for(let L=0;L{var D,N,L,F,B;const{notFoundContent:j=((D=o.notFoundContent)===null||D===void 0?void 0:D.call(o))||((L=(N=b.value).notFoundContent)===null||L===void 0?void 0:L.call(N)),multiple:z,toggleOpen:G}=r,Q=!(!((B=(F=R.value[0])===null||F===void 0?void 0:F.options)===null||B===void 0)&&B.length),Y=[{[c.value.value]:"__EMPTY__",[rR]:j,disabled:!0}],oe=y(y({},n),{multiple:!Q&&z,onSelect:T,onActive:I,onToggleOpen:G,checkedSet:x.value,halfCheckedSet:P.value,loadingKeys:C.value,isSelectable:_}),re=(Q?[{options:Y}]:R.value).map((ne,X)=>{const te=w.value.slice(0,X),W=w.value[X];return g(sm,k(k({key:X},oe),{},{prefixCls:S.value,options:ne.options,prevValuePath:te,activeValue:W}),null)});return g("div",{class:[`${S.value}-menus`,{[`${S.value}-menu-empty`]:Q,[`${S.value}-rtl`]:a.value}],onMousedown:M,ref:i},[re])}}});function cm(e){const t=ae(0),n=se();return Ve(()=>{const o=new Map;let r=0;const i=e.value||{};for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)){const l=i[a],{level:s}=l;let u=o.get(s);u||(u=new Set,o.set(s,u)),u.add(l),r=Math.max(r,s)}t.value=r,n.value=o}),{maxLevel:t,levelEntities:n}}function Xoe(){return y(y({},it(Dv(),["tokenSeparators","mode","showSearch"])),{id:String,prefixCls:String,fieldNames:De(),children:Array,value:{type:[String,Number,Array]},defaultValue:{type:[String,Number,Array]},changeOnSelect:{type:Boolean,default:void 0},displayRender:Function,checkable:{type:Boolean,default:void 0},showCheckedStrategy:{type:String,default:X5},showSearch:{type:[Boolean,Object],default:void 0},searchValue:String,onSearch:Function,expandTrigger:String,options:Array,dropdownPrefixCls:String,loadData:Function,popupVisible:{type:Boolean,default:void 0},dropdownClassName:String,dropdownMenuColumnStyle:{type:Object,default:void 0},popupStyle:{type:Object,default:void 0},dropdownStyle:{type:Object,default:void 0},popupPlacement:String,placement:String,onPopupVisibleChange:Function,onDropdownVisibleChange:Function,expandIcon:K.any,loadingIcon:K.any})}function iR(){return y(y({},Xoe()),{onChange:Function,customSlots:Object})}function Yoe(e){return Array.isArray(e)&&Array.isArray(e[0])}function OI(e){return e?Yoe(e)?e:(e.length===0?[]:[e]).map(t=>Array.isArray(t)?t:[t]):[]}const qoe=le({compatConfig:{MODE:3},name:"Cascader",inheritAttrs:!1,props:Qe(iR(),{}),setup(e,t){let{attrs:n,expose:o,slots:r}=t;const i=hC(We(e,"id")),a=E(()=>!!e.checkable),[l,s]=Dt(e.defaultValue,{value:E(()=>e.value),postState:OI}),u=E(()=>yoe(e.fieldNames)),c=E(()=>e.options||[]),d=Doe(c,u),f=X=>{const te=d.value;return X.map(W=>{const{nodes:U}=te[W];return U.map(J=>J[u.value.value])})},[p,v]=Dt("",{value:E(()=>e.searchValue),postState:X=>X||""}),h=(X,te)=>{v(X),te.source!=="blur"&&e.onSearch&&e.onSearch(X)},{showSearch:m,searchConfig:b}=Noe(We(e,"showSearch")),S=Foe(p,c,u,E(()=>e.dropdownPrefixCls||e.prefixCls),b,We(e,"changeOnSelect")),C=Boe(c,u,l),[$,x,P]=[ae([]),ae([]),ae([])],{maxLevel:w,levelEntities:O}=cm(d);Ve(()=>{const[X,te]=C.value;if(!a.value||!l.value.length){[$.value,x.value,P.value]=[X,[],te];return}const W=Ks(X),U=d.value,{checkedKeys:J,halfCheckedKeys:de}=pr(W,!0,U,w.value,O.value);[$.value,x.value,P.value]=[f(J),f(de),te]});const I=E(()=>{const X=Ks($.value),te=PI(X,d.value,e.showCheckedStrategy);return[...P.value,...f(te)]}),_=Woe(I,c,u,a,We(e,"displayRender")),T=X=>{if(s(X),e.onChange){const te=OI(X),W=te.map(de=>Ud(de,c.value,u.value).map(fe=>fe.option)),U=a.value?te:te[0],J=a.value?W:W[0];e.onChange(U,J)}},A=X=>{if(v(""),!a.value)T(X);else{const te=Da(X),W=Ks($.value),U=Ks(x.value),J=W.includes(te),de=P.value.some(ve=>Da(ve)===te);let fe=$.value,pe=P.value;if(de&&!J)pe=P.value.filter(ve=>Da(ve)!==te);else{const ve=J?W.filter(q=>q!==te):[...W,te];let he;J?{checkedKeys:he}=pr(ve,{halfCheckedKeys:U},d.value,w.value,O.value):{checkedKeys:he}=pr(ve,!0,d.value,w.value,O.value);const V=PI(he,d.value,e.showCheckedStrategy);fe=f(V)}T([...pe,...fe])}},R=(X,te)=>{if(te.type==="clear"){T([]);return}const{valueCells:W}=te.values[0];A(W)},H=E(()=>e.open!==void 0?e.open:e.popupVisible),M=E(()=>e.dropdownStyle||e.popupStyle||{}),D=E(()=>e.placement||e.popupPlacement),N=X=>{var te,W;(te=e.onDropdownVisibleChange)===null||te===void 0||te.call(e,X),(W=e.onPopupVisibleChange)===null||W===void 0||W.call(e,X)},{changeOnSelect:L,checkable:F,dropdownPrefixCls:B,loadData:j,expandTrigger:z,expandIcon:G,loadingIcon:Q,dropdownMenuColumnStyle:Y,customSlots:oe,dropdownClassName:Z}=Fr(e);Voe({options:c,fieldNames:u,values:$,halfValues:x,changeOnSelect:L,onSelect:A,checkable:F,searchOptions:S,dropdownPrefixCls:B,loadData:j,expandTrigger:z,expandIcon:G,loadingIcon:Q,dropdownMenuColumnStyle:Y,customSlots:oe});const re=ae();o({focus(){var X;(X=re.value)===null||X===void 0||X.focus()},blur(){var X;(X=re.value)===null||X===void 0||X.blur()},scrollTo(X){var te;(te=re.value)===null||te===void 0||te.scrollTo(X)}});const ne=E(()=>it(e,["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","dropdownClassName","dropdownMenuColumnStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","customSlots","showCheckedStrategy","children"]));return()=>{const X=!(p.value?S.value:c.value).length,{dropdownMatchSelectWidth:te=!1}=e,W=p.value&&b.value.matchInputWidth||X?{}:{minWidth:"auto"};return g(pC,k(k(k({},ne.value),n),{},{ref:re,id:i,prefixCls:e.prefixCls,dropdownMatchSelectWidth:te,dropdownStyle:y(y({},M.value),W),displayValues:_.value,onDisplayValuesChange:R,mode:a.value?"multiple":void 0,searchValue:p.value,onSearch:h,showSearch:m.value,OptionList:Goe,emptyOptions:X,open:H.value,dropdownClassName:Z.value,placement:D.value,onDropdownVisibleChange:N,getRawInputElement:()=>{var U;return(U=r.default)===null||U===void 0?void 0:U.call(r)}}),r)}}});var Joe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};function II(e){for(var t=1;tso()&&window.document.documentElement,lR=e=>{if(so()&&window.document.documentElement){const t=Array.isArray(e)?e:[e],{documentElement:n}=window.document;return t.some(o=>o in n.style)}return!1},Qoe=(e,t)=>{if(!lR(e))return!1;const n=document.createElement("div"),o=n.style[e];return n.style[e]=t,n.style[e]!==o};function Mx(e,t){return!Array.isArray(e)&&t!==void 0?Qoe(e,t):lR(e)}let pp;const ere=()=>{if(!aR())return!1;if(pp!==void 0)return pp;const e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),pp=e.scrollHeight===1,document.body.removeChild(e),pp},sR=()=>{const e=se(!1);return Ke(()=>{e.value=ere()}),e},cR=Symbol("rowContextKey"),tre=e=>{Xe(cR,e)},nre=()=>ze(cR,{gutter:E(()=>{}),wrap:E(()=>{}),supportFlexGap:E(()=>{})}),ore=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around ":{justifyContent:"space-around"},"&-space-evenly ":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},rre=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},ire=(e,t)=>{const{componentCls:n,gridColumns:o}=e,r={};for(let i=o;i>=0;i--)i===0?(r[`${n}${t}-${i}`]={display:"none"},r[`${n}-push-${i}`]={insetInlineStart:"auto"},r[`${n}-pull-${i}`]={insetInlineEnd:"auto"},r[`${n}${t}-push-${i}`]={insetInlineStart:"auto"},r[`${n}${t}-pull-${i}`]={insetInlineEnd:"auto"},r[`${n}${t}-offset-${i}`]={marginInlineEnd:0},r[`${n}${t}-order-${i}`]={order:0}):(r[`${n}${t}-${i}`]={display:"block",flex:`0 0 ${i/o*100}%`,maxWidth:`${i/o*100}%`},r[`${n}${t}-push-${i}`]={insetInlineStart:`${i/o*100}%`},r[`${n}${t}-pull-${i}`]={insetInlineEnd:`${i/o*100}%`},r[`${n}${t}-offset-${i}`]={marginInlineStart:`${i/o*100}%`},r[`${n}${t}-order-${i}`]={order:i});return r},r1=(e,t)=>ire(e,t),are=(e,t,n)=>({[`@media (min-width: ${t}px)`]:y({},r1(e,n))}),lre=Ue("Grid",e=>[ore(e)]),sre=Ue("Grid",e=>{const t=Be(e,{gridColumns:24}),n={"-sm":t.screenSMMin,"-md":t.screenMDMin,"-lg":t.screenLGMin,"-xl":t.screenXLMin,"-xxl":t.screenXXLMin};return[rre(t),r1(t,""),r1(t,"-xs"),Object.keys(n).map(o=>are(t,n[o],o)).reduce((o,r)=>y(y({},o),r),{})]}),cre=()=>({align:He([String,Object]),justify:He([String,Object]),prefixCls:String,gutter:He([Number,Array,Object],0),wrap:{type:Boolean,default:void 0}}),Ax=le({compatConfig:{MODE:3},name:"ARow",inheritAttrs:!1,props:cre(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("row",e),[a,l]=lre(r);let s;const u=NC(),c=ae({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),d=ae({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),f=C=>E(()=>{if(typeof e[C]=="string")return e[C];if(typeof e[C]!="object")return"";for(let $=0;${s=u.value.subscribe(C=>{d.value=C;const $=e.gutter||0;(!Array.isArray($)&&typeof $=="object"||Array.isArray($)&&(typeof $[0]=="object"||typeof $[1]=="object"))&&(c.value=C)})}),tt(()=>{u.value.unsubscribe(s)});const m=E(()=>{const C=[void 0,void 0],{gutter:$=0}=e;return(Array.isArray($)?$:[$,void 0]).forEach((P,w)=>{if(typeof P=="object")for(let O=0;Oe.wrap)});const b=E(()=>ge(r.value,{[`${r.value}-no-wrap`]:e.wrap===!1,[`${r.value}-${v.value}`]:v.value,[`${r.value}-${p.value}`]:p.value,[`${r.value}-rtl`]:i.value==="rtl"},o.class,l.value)),S=E(()=>{const C=m.value,$={},x=C[0]!=null&&C[0]>0?`${C[0]/-2}px`:void 0,P=C[1]!=null&&C[1]>0?`${C[1]/-2}px`:void 0;return x&&($.marginLeft=x,$.marginRight=x),h.value?$.rowGap=`${C[1]}px`:P&&($.marginTop=P,$.marginBottom=P),$});return()=>{var C;return a(g("div",k(k({},o),{},{class:b.value,style:y(y({},S.value),o.style)}),[(C=n.default)===null||C===void 0?void 0:C.call(n)]))}}});function Ol(){return Ol=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Jp(e,t,n){return dre()?Jp=Reflect.construct.bind():Jp=function(r,i,a){var l=[null];l.push.apply(l,i);var s=Function.bind.apply(r,l),u=new s;return a&&Gd(u,a.prototype),u},Jp.apply(null,arguments)}function fre(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function a1(e){var t=typeof Map=="function"?new Map:void 0;return a1=function(o){if(o===null||!fre(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(o))return t.get(o);t.set(o,r)}function r(){return Jp(o,arguments,i1(this).constructor)}return r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Gd(r,o)},a1(e)}var pre=/%[sdj%]/g,gre=function(){};function l1(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var o=n.field;t[o]=t[o]||[],t[o].push(n)}),t}function Uo(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o=i)return l;switch(l){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}break;default:return l}});return a}return e}function hre(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Ln(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||hre(t)&&typeof e=="string"&&!e)}function vre(e,t,n){var o=[],r=0,i=e.length;function a(l){o.push.apply(o,l||[]),r++,r===i&&n(o)}e.forEach(function(l){t(l,a)})}function TI(e,t,n){var o=0,r=e.length;function i(a){if(a&&a.length){n(a);return}var l=o;o=o+1,l()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},ku={integer:function(t){return ku.number(t)&&parseInt(t,10)===t},float:function(t){return ku.number(t)&&!ku.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!ku.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(AI.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(xre())},hex:function(t){return typeof t=="string"&&!!t.match(AI.hex)}},$re=function(t,n,o,r,i){if(t.required&&n===void 0){uR(t,n,o,r,i);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],l=t.type;a.indexOf(l)>-1?ku[l](n)||r.push(Uo(i.messages.types[l],t.fullField,t.type)):l&&typeof n!==t.type&&r.push(Uo(i.messages.types[l],t.fullField,t.type))},wre=function(t,n,o,r,i){var a=typeof t.len=="number",l=typeof t.min=="number",s=typeof t.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=n,d=null,f=typeof n=="number",p=typeof n=="string",v=Array.isArray(n);if(f?d="number":p?d="string":v&&(d="array"),!d)return!1;v&&(c=n.length),p&&(c=n.replace(u,"_").length),a?c!==t.len&&r.push(Uo(i.messages[d].len,t.fullField,t.len)):l&&!s&&ct.max?r.push(Uo(i.messages[d].max,t.fullField,t.max)):l&&s&&(ct.max)&&r.push(Uo(i.messages[d].range,t.fullField,t.min,t.max))},Os="enum",Pre=function(t,n,o,r,i){t[Os]=Array.isArray(t[Os])?t[Os]:[],t[Os].indexOf(n)===-1&&r.push(Uo(i.messages[Os],t.fullField,t[Os].join(", ")))},Ore=function(t,n,o,r,i){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||r.push(Uo(i.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var a=new RegExp(t.pattern);a.test(n)||r.push(Uo(i.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},Pt={required:uR,whitespace:Cre,type:$re,range:wre,enum:Pre,pattern:Ore},Ire=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n,"string")&&!t.required)return o();Pt.required(t,n,r,a,i,"string"),Ln(n,"string")||(Pt.type(t,n,r,a,i),Pt.range(t,n,r,a,i),Pt.pattern(t,n,r,a,i),t.whitespace===!0&&Pt.whitespace(t,n,r,a,i))}o(a)},Tre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i),n!==void 0&&Pt.type(t,n,r,a,i)}o(a)},Ere=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(n===""&&(n=void 0),Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i),n!==void 0&&(Pt.type(t,n,r,a,i),Pt.range(t,n,r,a,i))}o(a)},_re=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i),n!==void 0&&Pt.type(t,n,r,a,i)}o(a)},Mre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i),Ln(n)||Pt.type(t,n,r,a,i)}o(a)},Are=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i),n!==void 0&&(Pt.type(t,n,r,a,i),Pt.range(t,n,r,a,i))}o(a)},Rre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i),n!==void 0&&(Pt.type(t,n,r,a,i),Pt.range(t,n,r,a,i))}o(a)},Dre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(n==null&&!t.required)return o();Pt.required(t,n,r,a,i,"array"),n!=null&&(Pt.type(t,n,r,a,i),Pt.range(t,n,r,a,i))}o(a)},Nre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i),n!==void 0&&Pt.type(t,n,r,a,i)}o(a)},kre="enum",Lre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i),n!==void 0&&Pt[kre](t,n,r,a,i)}o(a)},Fre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n,"string")&&!t.required)return o();Pt.required(t,n,r,a,i),Ln(n,"string")||Pt.pattern(t,n,r,a,i)}o(a)},Bre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n,"date")&&!t.required)return o();if(Pt.required(t,n,r,a,i),!Ln(n,"date")){var s;n instanceof Date?s=n:s=new Date(n),Pt.type(t,s,r,a,i),s&&Pt.range(t,s.getTime(),r,a,i)}}o(a)},Hre=function(t,n,o,r,i){var a=[],l=Array.isArray(n)?"array":typeof n;Pt.required(t,n,r,a,i,l),o(a)},X0=function(t,n,o,r,i){var a=t.type,l=[],s=t.required||!t.required&&r.hasOwnProperty(t.field);if(s){if(Ln(n,a)&&!t.required)return o();Pt.required(t,n,r,l,i,a),Ln(n,a)||Pt.type(t,n,r,l,i)}o(l)},zre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i)}o(a)},ad={string:Ire,method:Tre,number:Ere,boolean:_re,regexp:Mre,integer:Are,float:Rre,array:Dre,object:Nre,enum:Lre,pattern:Fre,date:Bre,url:X0,hex:X0,email:X0,required:Hre,any:zre};function s1(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var c1=s1(),Tf=function(){function e(n){this.rules=null,this._messages=c1,this.define(n)}var t=e.prototype;return t.define=function(o){var r=this;if(!o)throw new Error("Cannot configure a schema with no rules");if(typeof o!="object"||Array.isArray(o))throw new Error("Rules must be an object");this.rules={},Object.keys(o).forEach(function(i){var a=o[i];r.rules[i]=Array.isArray(a)?a:[a]})},t.messages=function(o){return o&&(this._messages=MI(s1(),o)),this._messages},t.validate=function(o,r,i){var a=this;r===void 0&&(r={}),i===void 0&&(i=function(){});var l=o,s=r,u=i;if(typeof s=="function"&&(u=s,s={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,l),Promise.resolve(l);function c(h){var m=[],b={};function S($){if(Array.isArray($)){var x;m=(x=m).concat.apply(x,$)}else m.push($)}for(var C=0;C3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&o&&n===void 0&&!dR(e,t.slice(0,-1))?e:fR(e,t,n,o)}function u1(e){return Na(e)}function Wre(e,t){return dR(e,t)}function Vre(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return jre(e,t,n,o)}function Kre(e,t){return e&&e.some(n=>Gre(n,t))}function RI(e){return typeof e=="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function pR(e,t){const n=Array.isArray(e)?[...e]:y({},e);return t&&Object.keys(t).forEach(o=>{const r=n[o],i=t[o],a=RI(r)&&RI(i);n[o]=a?pR(r,i||{}):i}),n}function Ure(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;opR(r,i),e)}function DI(e,t){let n={};return t.forEach(o=>{const r=Wre(e,o);n=Vre(n,o,r)}),n}function Gre(e,t){return!e||!t||e.length!==t.length?!1:e.every((n,o)=>t[o]===n)}const zo="'${name}' is not a valid ${type}",dm={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:zo,method:zo,array:zo,object:zo,number:zo,date:zo,boolean:zo,integer:zo,float:zo,regexp:zo,email:zo,url:zo,hex:zo},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}};var fm=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function l(c){try{u(o.next(c))}catch(d){a(d)}}function s(c){try{u(o.throw(c))}catch(d){a(d)}}function u(c){c.done?i(c.value):r(c.value).then(l,s)}u((o=o.apply(e,t||[])).next())})};const Xre=Tf;function Yre(e,t){return e.replace(/\$\{\w+\}/g,n=>{const o=n.slice(2,-1);return t[o]})}function d1(e,t,n,o,r){return fm(this,void 0,void 0,function*(){const i=y({},n);delete i.ruleIndex,delete i.trigger;let a=null;i&&i.type==="array"&&i.defaultField&&(a=i.defaultField,delete i.defaultField);const l=new Xre({[e]:[i]}),s=Ure({},dm,o.validateMessages);l.messages(s);let u=[];try{yield Promise.resolve(l.validate({[e]:t},y({},o)))}catch(f){f.errors?u=f.errors.map((p,v)=>{let{message:h}=p;return sn(h)?Dn(h,{key:`error_${v}`}):h}):(console.error(f),u=[s.default()])}if(!u.length&&a)return(yield Promise.all(t.map((p,v)=>d1(`${e}.${v}`,p,a,o,r)))).reduce((p,v)=>[...p,...v],[]);const c=y(y(y({},n),{name:e,enum:(n.enum||[]).join(", ")}),r);return u.map(f=>typeof f=="string"?Yre(f,c):f)})}function gR(e,t,n,o,r,i){const a=e.join("."),l=n.map((u,c)=>{const d=u.validator,f=y(y({},u),{ruleIndex:c});return d&&(f.validator=(p,v,h)=>{let m=!1;const S=d(p,v,function(){for(var C=arguments.length,$=new Array(C),x=0;x{m||h(...$)})});m=S&&typeof S.then=="function"&&typeof S.catch=="function",m&&S.then(()=>{h()}).catch(C=>{h(C||" ")})}),f}).sort((u,c)=>{let{warningOnly:d,ruleIndex:f}=u,{warningOnly:p,ruleIndex:v}=c;return!!d==!!p?f-v:d?1:-1});let s;if(r===!0)s=new Promise((u,c)=>fm(this,void 0,void 0,function*(){for(let d=0;dd1(a,t,c,o,i).then(d=>({errors:d,rule:c})));s=(r?Jre(u):qre(u)).then(c=>Promise.reject(c))}return s.catch(u=>u),s}function qre(e){return fm(this,void 0,void 0,function*(){return Promise.all(e).then(t=>[].concat(...t))})}function Jre(e){return fm(this,void 0,void 0,function*(){let t=0;return new Promise(n=>{e.forEach(o=>{o.then(r=>{r.errors.length&&n([r]),t+=1,t===e.length&&n([])})})})})}const hR=Symbol("formContextKey"),vR=e=>{Xe(hR,e)},Rx=()=>ze(hR,{name:E(()=>{}),labelAlign:E(()=>"right"),vertical:E(()=>!1),addField:(e,t)=>{},removeField:e=>{},model:E(()=>{}),rules:E(()=>{}),colon:E(()=>{}),labelWrap:E(()=>{}),labelCol:E(()=>{}),requiredMark:E(()=>!1),validateTrigger:E(()=>{}),onValidate:()=>{},validateMessages:E(()=>dm)}),mR=Symbol("formItemPrefixContextKey"),Zre=e=>{Xe(mR,e)},Qre=()=>ze(mR,{prefixCls:E(()=>"")});function eie(e){return typeof e=="number"?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}const tie=()=>({span:[String,Number],order:[String,Number],offset:[String,Number],push:[String,Number],pull:[String,Number],xs:{type:[String,Number,Object],default:void 0},sm:{type:[String,Number,Object],default:void 0},md:{type:[String,Number,Object],default:void 0},lg:{type:[String,Number,Object],default:void 0},xl:{type:[String,Number,Object],default:void 0},xxl:{type:[String,Number,Object],default:void 0},prefixCls:String,flex:[String,Number]}),nie=["xs","sm","md","lg","xl","xxl"],pm=le({compatConfig:{MODE:3},name:"ACol",inheritAttrs:!1,props:tie(),setup(e,t){let{slots:n,attrs:o}=t;const{gutter:r,supportFlexGap:i,wrap:a}=nre(),{prefixCls:l,direction:s}=Te("col",e),[u,c]=sre(l),d=E(()=>{const{span:p,order:v,offset:h,push:m,pull:b}=e,S=l.value;let C={};return nie.forEach($=>{let x={};const P=e[$];typeof P=="number"?x.span=P:typeof P=="object"&&(x=P||{}),C=y(y({},C),{[`${S}-${$}-${x.span}`]:x.span!==void 0,[`${S}-${$}-order-${x.order}`]:x.order||x.order===0,[`${S}-${$}-offset-${x.offset}`]:x.offset||x.offset===0,[`${S}-${$}-push-${x.push}`]:x.push||x.push===0,[`${S}-${$}-pull-${x.pull}`]:x.pull||x.pull===0,[`${S}-rtl`]:s.value==="rtl"})}),ge(S,{[`${S}-${p}`]:p!==void 0,[`${S}-order-${v}`]:v,[`${S}-offset-${h}`]:h,[`${S}-push-${m}`]:m,[`${S}-pull-${b}`]:b},C,o.class,c.value)}),f=E(()=>{const{flex:p}=e,v=r.value,h={};if(v&&v[0]>0){const m=`${v[0]/2}px`;h.paddingLeft=m,h.paddingRight=m}if(v&&v[1]>0&&!i.value){const m=`${v[1]/2}px`;h.paddingTop=m,h.paddingBottom=m}return p&&(h.flex=eie(p),a.value===!1&&!h.minWidth&&(h.minWidth=0)),h});return()=>{var p;return u(g("div",k(k({},o),{},{class:d.value,style:[f.value,o.style]}),[(p=n.default)===null||p===void 0?void 0:p.call(n)]))}}});var oie={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};function NI(e){for(var t=1;t{let{slots:n,emit:o,attrs:r}=t;var i,a,l,s,u;const{prefixCls:c,htmlFor:d,labelCol:f,labelAlign:p,colon:v,required:h,requiredMark:m}=y(y({},e),r),[b]=wr("Form"),S=(i=e.label)!==null&&i!==void 0?i:(a=n.label)===null||a===void 0?void 0:a.call(n);if(!S)return null;const{vertical:C,labelAlign:$,labelCol:x,labelWrap:P,colon:w}=Rx(),O=f||(x==null?void 0:x.value)||{},I=p||($==null?void 0:$.value),_=`${c}-item-label`,T=ge(_,I==="left"&&`${_}-left`,O.class,{[`${_}-wrap`]:!!P.value});let A=S;const R=v===!0||(w==null?void 0:w.value)!==!1&&v!==!1;if(R&&!C.value&&typeof S=="string"&&S.trim()!==""&&(A=S.replace(/[:|:]\s*$/,"")),e.tooltip||n.tooltip){const D=g("span",{class:`${c}-item-tooltip`},[g(Ro,{title:e.tooltip},{default:()=>[g(Dx,null,null)]})]);A=g(Le,null,[A,n.tooltip?(l=n.tooltip)===null||l===void 0?void 0:l.call(n,{class:`${c}-item-tooltip`}):D])}m==="optional"&&!h&&(A=g(Le,null,[A,g("span",{class:`${c}-item-optional`},[((s=b.value)===null||s===void 0?void 0:s.optional)||((u=$o.Form)===null||u===void 0?void 0:u.optional)])]));const M=ge({[`${c}-item-required`]:h,[`${c}-item-required-mark-optional`]:m==="optional",[`${c}-item-no-colon`]:!R});return g(pm,k(k({},O),{},{class:T}),{default:()=>[g("label",{for:d,class:M,title:typeof S=="string"?S:"",onClick:D=>o("click",D)},[A])]})};Nx.displayName="FormItemLabel";Nx.inheritAttrs=!1;const iie=e=>{const{componentCls:t}=e,n=`${t}-show-help`,o=`${t}-show-help-item`;return{[n]:{transition:`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[o]:{overflow:"hidden",transition:`height ${e.motionDurationSlow} ${e.motionEaseInOut}, +`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),i=new RegExp("(?:^"+n+"$)|(?:^"+r+"$)"),a=new RegExp("^"+n+"$"),l=new RegExp("^"+r+"$"),s=function($){return $&&$.exact?i:new RegExp("(?:"+t($)+n+t($)+")|(?:"+t($)+r+t($)+")","g")};s.v4=function(C){return C&&C.exact?a:new RegExp(""+t(C)+n+t(C),"g")},s.v6=function(C){return C&&C.exact?l:new RegExp(""+t(C)+r+t(C),"g")};var u="(?:(?:[a-z]+:)?//)",c="(?:\\S+(?::\\S*)?@)?",d=s.v4().source,f=s.v6().source,p="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",v="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",h="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",m="(?::\\d{2,5})?",b='(?:[/?#][^\\s"]*)?',S="(?:"+u+"|www\\.)"+c+"(?:localhost|"+d+"|"+f+"|"+p+v+h+")"+m+b;return gp=new RegExp("(?:^"+S+"$)","i"),gp},AI={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},ku={integer:function(t){return ku.number(t)&&parseInt(t,10)===t},float:function(t){return ku.number(t)&&!ku.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!ku.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(AI.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(xre())},hex:function(t){return typeof t=="string"&&!!t.match(AI.hex)}},$re=function(t,n,o,r,i){if(t.required&&n===void 0){uR(t,n,o,r,i);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],l=t.type;a.indexOf(l)>-1?ku[l](n)||r.push(Uo(i.messages.types[l],t.fullField,t.type)):l&&typeof n!==t.type&&r.push(Uo(i.messages.types[l],t.fullField,t.type))},wre=function(t,n,o,r,i){var a=typeof t.len=="number",l=typeof t.min=="number",s=typeof t.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=n,d=null,f=typeof n=="number",p=typeof n=="string",v=Array.isArray(n);if(f?d="number":p?d="string":v&&(d="array"),!d)return!1;v&&(c=n.length),p&&(c=n.replace(u,"_").length),a?c!==t.len&&r.push(Uo(i.messages[d].len,t.fullField,t.len)):l&&!s&&ct.max?r.push(Uo(i.messages[d].max,t.fullField,t.max)):l&&s&&(ct.max)&&r.push(Uo(i.messages[d].range,t.fullField,t.min,t.max))},Os="enum",Pre=function(t,n,o,r,i){t[Os]=Array.isArray(t[Os])?t[Os]:[],t[Os].indexOf(n)===-1&&r.push(Uo(i.messages[Os],t.fullField,t[Os].join(", ")))},Ore=function(t,n,o,r,i){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||r.push(Uo(i.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var a=new RegExp(t.pattern);a.test(n)||r.push(Uo(i.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},Pt={required:uR,whitespace:Cre,type:$re,range:wre,enum:Pre,pattern:Ore},Ire=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n,"string")&&!t.required)return o();Pt.required(t,n,r,a,i,"string"),Ln(n,"string")||(Pt.type(t,n,r,a,i),Pt.range(t,n,r,a,i),Pt.pattern(t,n,r,a,i),t.whitespace===!0&&Pt.whitespace(t,n,r,a,i))}o(a)},Tre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i),n!==void 0&&Pt.type(t,n,r,a,i)}o(a)},Ere=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(n===""&&(n=void 0),Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i),n!==void 0&&(Pt.type(t,n,r,a,i),Pt.range(t,n,r,a,i))}o(a)},_re=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i),n!==void 0&&Pt.type(t,n,r,a,i)}o(a)},Mre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i),Ln(n)||Pt.type(t,n,r,a,i)}o(a)},Are=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i),n!==void 0&&(Pt.type(t,n,r,a,i),Pt.range(t,n,r,a,i))}o(a)},Rre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i),n!==void 0&&(Pt.type(t,n,r,a,i),Pt.range(t,n,r,a,i))}o(a)},Dre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(n==null&&!t.required)return o();Pt.required(t,n,r,a,i,"array"),n!=null&&(Pt.type(t,n,r,a,i),Pt.range(t,n,r,a,i))}o(a)},Nre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i),n!==void 0&&Pt.type(t,n,r,a,i)}o(a)},kre="enum",Lre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i),n!==void 0&&Pt[kre](t,n,r,a,i)}o(a)},Fre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n,"string")&&!t.required)return o();Pt.required(t,n,r,a,i),Ln(n,"string")||Pt.pattern(t,n,r,a,i)}o(a)},Bre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n,"date")&&!t.required)return o();if(Pt.required(t,n,r,a,i),!Ln(n,"date")){var s;n instanceof Date?s=n:s=new Date(n),Pt.type(t,s,r,a,i),s&&Pt.range(t,s.getTime(),r,a,i)}}o(a)},Hre=function(t,n,o,r,i){var a=[],l=Array.isArray(n)?"array":typeof n;Pt.required(t,n,r,a,i,l),o(a)},X0=function(t,n,o,r,i){var a=t.type,l=[],s=t.required||!t.required&&r.hasOwnProperty(t.field);if(s){if(Ln(n,a)&&!t.required)return o();Pt.required(t,n,r,l,i,a),Ln(n,a)||Pt.type(t,n,r,l,i)}o(l)},zre=function(t,n,o,r,i){var a=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Ln(n)&&!t.required)return o();Pt.required(t,n,r,a,i)}o(a)},ad={string:Ire,method:Tre,number:Ere,boolean:_re,regexp:Mre,integer:Are,float:Rre,array:Dre,object:Nre,enum:Lre,pattern:Fre,date:Bre,url:X0,hex:X0,email:X0,required:Hre,any:zre};function s1(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var c1=s1(),Tf=function(){function e(n){this.rules=null,this._messages=c1,this.define(n)}var t=e.prototype;return t.define=function(o){var r=this;if(!o)throw new Error("Cannot configure a schema with no rules");if(typeof o!="object"||Array.isArray(o))throw new Error("Rules must be an object");this.rules={},Object.keys(o).forEach(function(i){var a=o[i];r.rules[i]=Array.isArray(a)?a:[a]})},t.messages=function(o){return o&&(this._messages=MI(s1(),o)),this._messages},t.validate=function(o,r,i){var a=this;r===void 0&&(r={}),i===void 0&&(i=function(){});var l=o,s=r,u=i;if(typeof s=="function"&&(u=s,s={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,l),Promise.resolve(l);function c(h){var m=[],b={};function S($){if(Array.isArray($)){var x;m=(x=m).concat.apply(x,$)}else m.push($)}for(var C=0;C3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&o&&n===void 0&&!dR(e,t.slice(0,-1))?e:fR(e,t,n,o)}function u1(e){return Na(e)}function Wre(e,t){return dR(e,t)}function Vre(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return jre(e,t,n,o)}function Kre(e,t){return e&&e.some(n=>Gre(n,t))}function RI(e){return typeof e=="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function pR(e,t){const n=Array.isArray(e)?[...e]:y({},e);return t&&Object.keys(t).forEach(o=>{const r=n[o],i=t[o],a=RI(r)&&RI(i);n[o]=a?pR(r,i||{}):i}),n}function Ure(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;opR(r,i),e)}function DI(e,t){let n={};return t.forEach(o=>{const r=Wre(e,o);n=Vre(n,o,r)}),n}function Gre(e,t){return!e||!t||e.length!==t.length?!1:e.every((n,o)=>t[o]===n)}const zo="'${name}' is not a valid ${type}",um={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:zo,method:zo,array:zo,object:zo,number:zo,date:zo,boolean:zo,integer:zo,float:zo,regexp:zo,email:zo,url:zo,hex:zo},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}};var dm=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function l(c){try{u(o.next(c))}catch(d){a(d)}}function s(c){try{u(o.throw(c))}catch(d){a(d)}}function u(c){c.done?i(c.value):r(c.value).then(l,s)}u((o=o.apply(e,t||[])).next())})};const Xre=Tf;function Yre(e,t){return e.replace(/\$\{\w+\}/g,n=>{const o=n.slice(2,-1);return t[o]})}function d1(e,t,n,o,r){return dm(this,void 0,void 0,function*(){const i=y({},n);delete i.ruleIndex,delete i.trigger;let a=null;i&&i.type==="array"&&i.defaultField&&(a=i.defaultField,delete i.defaultField);const l=new Xre({[e]:[i]}),s=Ure({},um,o.validateMessages);l.messages(s);let u=[];try{yield Promise.resolve(l.validate({[e]:t},y({},o)))}catch(f){f.errors?u=f.errors.map((p,v)=>{let{message:h}=p;return sn(h)?Dn(h,{key:`error_${v}`}):h}):(console.error(f),u=[s.default()])}if(!u.length&&a)return(yield Promise.all(t.map((p,v)=>d1(`${e}.${v}`,p,a,o,r)))).reduce((p,v)=>[...p,...v],[]);const c=y(y(y({},n),{name:e,enum:(n.enum||[]).join(", ")}),r);return u.map(f=>typeof f=="string"?Yre(f,c):f)})}function gR(e,t,n,o,r,i){const a=e.join("."),l=n.map((u,c)=>{const d=u.validator,f=y(y({},u),{ruleIndex:c});return d&&(f.validator=(p,v,h)=>{let m=!1;const S=d(p,v,function(){for(var C=arguments.length,$=new Array(C),x=0;x{m||h(...$)})});m=S&&typeof S.then=="function"&&typeof S.catch=="function",m&&S.then(()=>{h()}).catch(C=>{h(C||" ")})}),f}).sort((u,c)=>{let{warningOnly:d,ruleIndex:f}=u,{warningOnly:p,ruleIndex:v}=c;return!!d==!!p?f-v:d?1:-1});let s;if(r===!0)s=new Promise((u,c)=>dm(this,void 0,void 0,function*(){for(let d=0;dd1(a,t,c,o,i).then(d=>({errors:d,rule:c})));s=(r?Jre(u):qre(u)).then(c=>Promise.reject(c))}return s.catch(u=>u),s}function qre(e){return dm(this,void 0,void 0,function*(){return Promise.all(e).then(t=>[].concat(...t))})}function Jre(e){return dm(this,void 0,void 0,function*(){let t=0;return new Promise(n=>{e.forEach(o=>{o.then(r=>{r.errors.length&&n([r]),t+=1,t===e.length&&n([])})})})})}const hR=Symbol("formContextKey"),vR=e=>{Xe(hR,e)},Rx=()=>ze(hR,{name:E(()=>{}),labelAlign:E(()=>"right"),vertical:E(()=>!1),addField:(e,t)=>{},removeField:e=>{},model:E(()=>{}),rules:E(()=>{}),colon:E(()=>{}),labelWrap:E(()=>{}),labelCol:E(()=>{}),requiredMark:E(()=>!1),validateTrigger:E(()=>{}),onValidate:()=>{},validateMessages:E(()=>um)}),mR=Symbol("formItemPrefixContextKey"),Zre=e=>{Xe(mR,e)},Qre=()=>ze(mR,{prefixCls:E(()=>"")});function eie(e){return typeof e=="number"?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}const tie=()=>({span:[String,Number],order:[String,Number],offset:[String,Number],push:[String,Number],pull:[String,Number],xs:{type:[String,Number,Object],default:void 0},sm:{type:[String,Number,Object],default:void 0},md:{type:[String,Number,Object],default:void 0},lg:{type:[String,Number,Object],default:void 0},xl:{type:[String,Number,Object],default:void 0},xxl:{type:[String,Number,Object],default:void 0},prefixCls:String,flex:[String,Number]}),nie=["xs","sm","md","lg","xl","xxl"],fm=le({compatConfig:{MODE:3},name:"ACol",inheritAttrs:!1,props:tie(),setup(e,t){let{slots:n,attrs:o}=t;const{gutter:r,supportFlexGap:i,wrap:a}=nre(),{prefixCls:l,direction:s}=Te("col",e),[u,c]=sre(l),d=E(()=>{const{span:p,order:v,offset:h,push:m,pull:b}=e,S=l.value;let C={};return nie.forEach($=>{let x={};const P=e[$];typeof P=="number"?x.span=P:typeof P=="object"&&(x=P||{}),C=y(y({},C),{[`${S}-${$}-${x.span}`]:x.span!==void 0,[`${S}-${$}-order-${x.order}`]:x.order||x.order===0,[`${S}-${$}-offset-${x.offset}`]:x.offset||x.offset===0,[`${S}-${$}-push-${x.push}`]:x.push||x.push===0,[`${S}-${$}-pull-${x.pull}`]:x.pull||x.pull===0,[`${S}-rtl`]:s.value==="rtl"})}),ge(S,{[`${S}-${p}`]:p!==void 0,[`${S}-order-${v}`]:v,[`${S}-offset-${h}`]:h,[`${S}-push-${m}`]:m,[`${S}-pull-${b}`]:b},C,o.class,c.value)}),f=E(()=>{const{flex:p}=e,v=r.value,h={};if(v&&v[0]>0){const m=`${v[0]/2}px`;h.paddingLeft=m,h.paddingRight=m}if(v&&v[1]>0&&!i.value){const m=`${v[1]/2}px`;h.paddingTop=m,h.paddingBottom=m}return p&&(h.flex=eie(p),a.value===!1&&!h.minWidth&&(h.minWidth=0)),h});return()=>{var p;return u(g("div",k(k({},o),{},{class:d.value,style:[f.value,o.style]}),[(p=n.default)===null||p===void 0?void 0:p.call(n)]))}}});var oie={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};function NI(e){for(var t=1;t{let{slots:n,emit:o,attrs:r}=t;var i,a,l,s,u;const{prefixCls:c,htmlFor:d,labelCol:f,labelAlign:p,colon:v,required:h,requiredMark:m}=y(y({},e),r),[b]=wr("Form"),S=(i=e.label)!==null&&i!==void 0?i:(a=n.label)===null||a===void 0?void 0:a.call(n);if(!S)return null;const{vertical:C,labelAlign:$,labelCol:x,labelWrap:P,colon:w}=Rx(),O=f||(x==null?void 0:x.value)||{},I=p||($==null?void 0:$.value),_=`${c}-item-label`,T=ge(_,I==="left"&&`${_}-left`,O.class,{[`${_}-wrap`]:!!P.value});let A=S;const R=v===!0||(w==null?void 0:w.value)!==!1&&v!==!1;if(R&&!C.value&&typeof S=="string"&&S.trim()!==""&&(A=S.replace(/[:|:]\s*$/,"")),e.tooltip||n.tooltip){const D=g("span",{class:`${c}-item-tooltip`},[g(Ro,{title:e.tooltip},{default:()=>[g(Dx,null,null)]})]);A=g(Le,null,[A,n.tooltip?(l=n.tooltip)===null||l===void 0?void 0:l.call(n,{class:`${c}-item-tooltip`}):D])}m==="optional"&&!h&&(A=g(Le,null,[A,g("span",{class:`${c}-item-optional`},[((s=b.value)===null||s===void 0?void 0:s.optional)||((u=$o.Form)===null||u===void 0?void 0:u.optional)])]));const M=ge({[`${c}-item-required`]:h,[`${c}-item-required-mark-optional`]:m==="optional",[`${c}-item-no-colon`]:!R});return g(fm,k(k({},O),{},{class:T}),{default:()=>[g("label",{for:d,class:M,title:typeof S=="string"?S:"",onClick:D=>o("click",D)},[A])]})};Nx.displayName="FormItemLabel";Nx.inheritAttrs=!1;const iie=e=>{const{componentCls:t}=e,n=`${t}-show-help`,o=`${t}-show-help-item`;return{[n]:{transition:`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[o]:{overflow:"hidden",transition:`height ${e.motionDurationSlow} ${e.motionEaseInOut}, opacity ${e.motionDurationSlow} ${e.motionEaseInOut}, transform ${e.motionDurationSlow} ${e.motionEaseInOut} !important`,[`&${o}-appear, &${o}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${o}-leave-active`]:{transform:"translateY(-5px)"}}}}},aie=e=>({legend:{display:"block",width:"100%",marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},label:{fontSize:e.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`},output:{display:"block",paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),kI=(e,t)=>{const{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},lie=e=>{const{componentCls:t}=e;return{[e.componentCls]:y(y(y({},qe(e)),aie(e)),{[`${t}-text`]:{display:"inline-block",paddingInlineEnd:e.paddingSM},"&-small":y({},kI(e,e.controlHeightSM)),"&-large":y({},kI(e,e.controlHeightLG))})}},sie=e=>{const{formItemCls:t,iconCls:n,componentCls:o,rootPrefixCls:r}=e;return{[t]:y(y({},qe(e)),{marginBottom:e.marginLG,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden, &-hidden.${r}-row`]:{display:"none"},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{display:"inline-block",flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${e.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:e.controlHeight,color:e.colorTextHeading,fontSize:e.fontSize,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:"top"},[`&${t}-required:not(${t}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:e.marginXXS,color:e.colorError,fontSize:e.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${o}-hide-required-mark &`]:{display:"none"}},[`${t}-optional`]:{display:"inline-block",marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`${o}-hide-required-mark &`]:{display:"none"}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:e.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:e.marginXXS/2,marginInlineEnd:e.marginXS},[`&${t}-no-colon::after`]:{content:'" "'}}},[`${t}-control`]:{display:"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:e.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[t]:{"&-explain, &-extra":{clear:"both",color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:"auto",opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:"center",visibility:"visible",animationName:RC,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:"none","&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},cie=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:o}=e;return{[`${t}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:"1 1 0",minWidth:0},[`${n}-label.${o}-col-24 + ${n}-control`]:{minWidth:"unset"}}}},uie=e=>{const{componentCls:t,formItemCls:n}=e;return{[`${t}-inline`]:{display:"flex",flexWrap:"wrap",[n]:{flex:"none",flexWrap:"nowrap",marginInlineEnd:e.margin,marginBottom:0,"&-with-help":{marginBottom:e.marginLG},[`> ${n}-label, > ${n}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${n}-label`]:{flex:"none"},[`${t}-text`]:{display:"inline-block"},[`${n}-has-feedback`]:{display:"inline-block"}}}}},Fs=e=>({margin:0,padding:`0 0 ${e.paddingXS}px`,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{display:"none"}}}),die=e=>{const{componentCls:t,formItemCls:n}=e;return{[`${n} ${n}-label`]:Fs(e),[t]:{[n]:{flexWrap:"wrap",[`${n}-label, ${n}-control`]:{flex:"0 0 100%",maxWidth:"100%"}}}}},fie=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:o}=e;return{[`${t}-vertical`]:{[n]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${t}-item-control`]:{width:"100%"}}},[`${t}-vertical ${n}-label, .${o}-col-24${n}-label, - .${o}-col-xl-24${n}-label`]:Fs(e),[`@media (max-width: ${e.screenXSMax}px)`]:[die(e),{[t]:{[`.${o}-col-xs-24${n}-label`]:Fs(e)}}],[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{[`.${o}-col-sm-24${n}-label`]:Fs(e)}},[`@media (max-width: ${e.screenMDMax}px)`]:{[t]:{[`.${o}-col-md-24${n}-label`]:Fs(e)}},[`@media (max-width: ${e.screenLGMax}px)`]:{[t]:{[`.${o}-col-lg-24${n}-label`]:Fs(e)}}}},kx=Ue("Form",(e,t)=>{let{rootPrefixCls:n}=t;const o=Be(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:n});return[lie(o),sie(o),iie(o),cie(o),uie(o),fie(o),bf(o),RC]}),pie=le({compatConfig:{MODE:3},name:"ErrorList",inheritAttrs:!1,props:["errors","help","onErrorVisibleChanged","helpStatus","warnings"],setup(e,t){let{attrs:n}=t;const{prefixCls:o,status:r}=Qre(),i=E(()=>`${o.value}-item-explain`),a=E(()=>!!(e.errors&&e.errors.length)),l=ae(r.value),[,s]=kx(o);return be([a,r],()=>{a.value&&(l.value=r.value)}),()=>{var u,c;const d=Sf(`${o.value}-show-help-item`),f=Rv(`${o.value}-show-help-item`,d);return f.role="alert",f.class=[s.value,i.value,n.class,`${o.value}-show-help`],g(Nn,k(k({},Cr(`${o.value}-show-help`)),{},{onAfterEnter:()=>e.onErrorVisibleChanged(!0),onAfterLeave:()=>e.onErrorVisibleChanged(!1)}),{default:()=>[Pn(g(fv,k(k({},f),{},{tag:"div"}),{default:()=>[(c=e.errors)===null||c===void 0?void 0:c.map((p,v)=>g("div",{key:v,class:l.value?`${i.value}-${l.value}`:""},[p]))]}),[[Vn,!!(!((u=e.errors)===null||u===void 0)&&u.length)]])]})}}}),gie=le({compatConfig:{MODE:3},slots:Object,inheritAttrs:!1,props:["prefixCls","errors","hasFeedback","onDomErrorVisibleChange","wrapperCol","help","extra","status","marginBottom","onErrorVisibleChanged"],setup(e,t){let{slots:n}=t;const o=Rx(),{wrapperCol:r}=o,i=y({},o);return delete i.labelCol,delete i.wrapperCol,vR(i),Zre({prefixCls:E(()=>e.prefixCls),status:E(()=>e.status)}),()=>{var a,l,s;const{prefixCls:u,wrapperCol:c,marginBottom:d,onErrorVisibleChanged:f,help:p=(a=n.help)===null||a===void 0?void 0:a.call(n),errors:v=zt((l=n.errors)===null||l===void 0?void 0:l.call(n)),extra:h=(s=n.extra)===null||s===void 0?void 0:s.call(n)}=e,m=`${u}-item`,b=c||(r==null?void 0:r.value)||{},S=ge(`${m}-control`,b.class);return g(pm,k(k({},b),{},{class:S}),{default:()=>{var C;return g(Le,null,[g("div",{class:`${m}-control-input`},[g("div",{class:`${m}-control-input-content`},[(C=n.default)===null||C===void 0?void 0:C.call(n)])]),d!==null||v.length?g("div",{style:{display:"flex",flexWrap:"nowrap"}},[g(pie,{errors:v,help:p,class:`${m}-explain-connected`,onErrorVisibleChanged:f},null),!!d&&g("div",{style:{width:0,height:`${d}px`}},null)]):null,h?g("div",{class:`${m}-extra`},[h]):null])}})}}});function hie(e){const t=se(e.value.slice());let n=null;return Ve(()=>{clearTimeout(n),n=setTimeout(()=>{t.value=e.value},e.value.length?0:10)}),t}Jn("success","warning","error","validating","");const vie={success:qr,warning:Jr,error:po,validating:Po};function Y0(e,t,n){let o=e;const r=t;let i=0;try{for(let a=r.length;i({htmlFor:String,prefixCls:String,label:K.any,help:K.any,extra:K.any,labelCol:{type:Object},wrapperCol:{type:Object},hasFeedback:{type:Boolean,default:!1},colon:{type:Boolean,default:void 0},labelAlign:String,prop:{type:[String,Number,Array]},name:{type:[String,Number,Array]},rules:[Array,Object],autoLink:{type:Boolean,default:!0},required:{type:Boolean,default:void 0},validateFirst:{type:Boolean,default:void 0},validateStatus:K.oneOf(Jn("","success","warning","error","validating")),validateTrigger:{type:[String,Array]},messageVariables:{type:Object},hidden:Boolean,noStyle:Boolean,tooltip:String});let bie=0;const yie="form_item",bR=le({compatConfig:{MODE:3},name:"AFormItem",inheritAttrs:!1,__ANT_NEW_FORM_ITEM:!0,props:mie(),slots:Object,setup(e,t){let{slots:n,attrs:o,expose:r}=t;e.prop;const i=`form-item-${++bie}`,{prefixCls:a}=Te("form",e),[l,s]=kx(a),u=se(),c=Rx(),d=E(()=>e.name||e.prop),f=se([]),p=se(!1),v=se(),h=E(()=>{const Y=d.value;return u1(Y)}),m=E(()=>{if(h.value.length){const Y=c.name.value,oe=h.value.join("_");return Y?`${Y}_${oe}`:`${yie}_${oe}`}else return}),b=()=>{const Y=c.model.value;if(!(!Y||!d.value))return Y0(Y,h.value,!0).v},S=E(()=>b()),C=se(Kp(S.value)),$=E(()=>{let Y=e.validateTrigger!==void 0?e.validateTrigger:c.validateTrigger.value;return Y=Y===void 0?"change":Y,Na(Y)}),x=E(()=>{let Y=c.rules.value;const oe=e.rules,Z=e.required!==void 0?{required:!!e.required,trigger:$.value}:[],re=Y0(Y,h.value);Y=Y?re.o[re.k]||re.v:[];const ne=[].concat(oe||Y||[]);return uq(ne,X=>X.required)?ne:ne.concat(Z)}),P=E(()=>{const Y=x.value;let oe=!1;return Y&&Y.length&&Y.every(Z=>Z.required?(oe=!0,!1):!0),oe||e.required}),w=se();Ve(()=>{w.value=e.validateStatus});const O=E(()=>{let Y={};return typeof e.label=="string"?Y.label=e.label:e.name&&(Y.label=String(e.name)),e.messageVariables&&(Y=y(y({},Y),e.messageVariables)),Y}),I=Y=>{if(h.value.length===0)return;const{validateFirst:oe=!1}=e,{triggerName:Z}=Y||{};let re=x.value;if(Z&&(re=re.filter(X=>{const{trigger:te}=X;return!te&&!$.value.length?!0:Na(te||$.value).includes(Z)})),!re.length)return Promise.resolve();const ne=gR(h.value,S.value,re,y({validateMessages:c.validateMessages.value},Y),oe,O.value);return w.value="validating",f.value=[],ne.catch(X=>X).then(function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(w.value==="validating"){const te=X.filter(W=>W&&W.errors.length);w.value=te.length?"error":"success",f.value=te.map(W=>W.errors),c.onValidate(d.value,!f.value.length,f.value.length?nt(f.value[0]):null)}}),ne},_=()=>{I({triggerName:"blur"})},T=()=>{if(p.value){p.value=!1;return}I({triggerName:"change"})},A=()=>{w.value=e.validateStatus,p.value=!1,f.value=[]},R=()=>{var Y;w.value=e.validateStatus,p.value=!0,f.value=[];const oe=c.model.value||{},Z=S.value,re=Y0(oe,h.value,!0);Array.isArray(Z)?re.o[re.k]=[].concat((Y=C.value)!==null&&Y!==void 0?Y:[]):re.o[re.k]=C.value,ot(()=>{p.value=!1})},H=E(()=>e.htmlFor===void 0?m.value:e.htmlFor),M=()=>{const Y=H.value;if(!Y||!v.value)return;const oe=v.value.$el.querySelector(`[id="${Y}"]`);oe&&oe.focus&&oe.focus()};r({onFieldBlur:_,onFieldChange:T,clearValidate:A,resetField:R}),CG({id:m,onFieldBlur:()=>{e.autoLink&&_()},onFieldChange:()=>{e.autoLink&&T()},clearValidate:A},E(()=>!!(e.autoLink&&c.model.value&&d.value)));let D=!1;be(d,Y=>{Y?D||(D=!0,c.addField(i,{fieldValue:S,fieldId:m,fieldName:d,resetField:R,clearValidate:A,namePath:h,validateRules:I,rules:x})):(D=!1,c.removeField(i))},{immediate:!0}),tt(()=>{c.removeField(i)});const N=hie(f),L=E(()=>e.validateStatus!==void 0?e.validateStatus:N.value.length?"error":w.value),F=E(()=>({[`${a.value}-item`]:!0,[s.value]:!0,[`${a.value}-item-has-feedback`]:L.value&&e.hasFeedback,[`${a.value}-item-has-success`]:L.value==="success",[`${a.value}-item-has-warning`]:L.value==="warning",[`${a.value}-item-has-error`]:L.value==="error",[`${a.value}-item-is-validating`]:L.value==="validating",[`${a.value}-item-hidden`]:e.hidden})),B=rt({});kn.useProvide(B),Ve(()=>{let Y;if(e.hasFeedback){const oe=L.value&&vie[L.value];Y=oe?g("span",{class:ge(`${a.value}-item-feedback-icon`,`${a.value}-item-feedback-icon-${L.value}`)},[g(oe,null,null)]):null}y(B,{status:L.value,hasFeedback:e.hasFeedback,feedbackIcon:Y,isFormItemInput:!0})});const j=se(null),z=se(!1),G=()=>{if(u.value){const Y=getComputedStyle(u.value);j.value=parseInt(Y.marginBottom,10)}};Ke(()=>{be(z,()=>{z.value&&G()},{flush:"post",immediate:!0})});const Q=Y=>{Y||(j.value=null)};return()=>{var Y,oe;if(e.noStyle)return(Y=n.default)===null||Y===void 0?void 0:Y.call(n);const Z=(oe=e.help)!==null&&oe!==void 0?oe:n.help?zt(n.help()):null,re=!!(Z!=null&&Array.isArray(Z)&&Z.length||N.value.length);return z.value=re,l(g("div",{class:[F.value,re?`${a.value}-item-with-help`:"",o.class],ref:u},[g(Ax,k(k({},o),{},{class:`${a.value}-item-row`,key:"row"}),{default:()=>{var ne,X;return g(Le,null,[g(Nx,k(k({},e),{},{htmlFor:H.value,required:P.value,requiredMark:c.requiredMark.value,prefixCls:a.value,onClick:M,label:e.label}),{label:n.label,tooltip:n.tooltip}),g(gie,k(k({},e),{},{errors:Z!=null?Na(Z):N.value,marginBottom:j.value,prefixCls:a.value,status:L.value,ref:v,help:Z,extra:(ne=e.extra)!==null&&ne!==void 0?ne:(X=n.extra)===null||X===void 0?void 0:X.call(n),onErrorVisibleChanged:Q}),{default:n.default})])}}),!!j.value&&g("div",{class:`${a.value}-margin-offset`,style:{marginBottom:`-${j.value}px`}},null)]))}}});function yR(e){let t=!1,n=e.length;const o=[];return e.length?new Promise((r,i)=>{e.forEach((a,l)=>{a.catch(s=>(t=!0,s)).then(s=>{n-=1,o[l]=s,!(n>0)&&(t&&i(o),r(o))})})}):Promise.resolve([])}function LI(e){let t=!1;return e&&e.length&&e.every(n=>n.required?(t=!0,!1):!0),t}function FI(e){return e==null?[]:Array.isArray(e)?e:[e]}function q0(e,t,n){let o=e;t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,"");const r=t.split(".");let i=0;for(let a=r.length;i1&&arguments[1]!==void 0?arguments[1]:ae({}),n=arguments.length>2?arguments[2]:void 0;const o=Kp(Bt(e)),r=rt({}),i=se([]),a=C=>{y(Bt(e),y(y({},Kp(o)),C)),ot(()=>{Object.keys(r).forEach($=>{r[$]={autoLink:!1,required:LI(Bt(t)[$])}})})},l=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],$=arguments.length>1?arguments[1]:void 0;return $.length?C.filter(x=>{const P=FI(x.trigger||"change");return hq(P,$).length}):C};let s=null;const u=function(C){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=arguments.length>2?arguments[2]:void 0;const P=[],w={};for(let _=0;_({name:T,errors:[],warnings:[]})).catch(H=>{const M=[],D=[];return H.forEach(N=>{let{rule:{warningOnly:L},errors:F}=N;L?D.push(...F):M.push(...F)}),M.length?Promise.reject({name:T,errors:M,warnings:D}):{name:T,errors:M,warnings:D}}))}const O=yR(P);s=O;const I=O.then(()=>s===O?Promise.resolve(w):Promise.reject([])).catch(_=>{const T=_.filter(A=>A&&A.errors.length);return T.length?Promise.reject({values:w,errorFields:T,outOfDate:s!==O}):Promise.resolve(w)});return I.catch(_=>_),I},c=function(C,$,x){let P=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const w=gR([C],$,x,y({validateMessages:dm},P),!!P.validateFirst);return r[C]?(r[C].validateStatus="validating",w.catch(O=>O).then(function(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];var I;if(r[C].validateStatus==="validating"){const _=O.filter(T=>T&&T.errors.length);r[C].validateStatus=_.length?"error":"success",r[C].help=_.length?_.map(T=>T.errors):null,(I=n==null?void 0:n.onValidate)===null||I===void 0||I.call(n,C,!_.length,_.length?nt(r[C].help[0]):null)}}),w):w.catch(O=>O)},d=(C,$)=>{let x=[],P=!0;C?Array.isArray(C)?x=C:x=[C]:(P=!1,x=i.value);const w=u(x,$||{},P);return w.catch(O=>O),w},f=C=>{let $=[];C?Array.isArray(C)?$=C:$=[C]:$=i.value,$.forEach(x=>{r[x]&&y(r[x],{validateStatus:"",help:null})})},p=C=>{const $={autoLink:!1},x=[],P=Array.isArray(C)?C:[C];for(let w=0;w{const $=[];i.value.forEach(x=>{const P=q0(C,x,!1),w=q0(v,x,!1);(h&&(n==null?void 0:n.immediate)&&P.isValid||!sC(P.v,w.v))&&$.push(x)}),d($,{trigger:"change"}),h=!1,v=Kp(nt(C))},b=n==null?void 0:n.debounce;let S=!0;return be(t,()=>{i.value=t?Object.keys(Bt(t)):[],!S&&n&&n.validateOnRuleChange&&d(),S=!1},{deep:!0,immediate:!0}),be(i,()=>{const C={};i.value.forEach($=>{C[$]=y({},r[$],{autoLink:!1,required:LI(Bt(t)[$])}),delete r[$]});for(const $ in r)Object.prototype.hasOwnProperty.call(r,$)&&delete r[$];y(r,C)},{immediate:!0}),be(e,b&&b.wait?MC(m,b.wait,Tq(b,["wait"])):m,{immediate:n&&!!n.immediate,deep:!0}),{modelRef:e,rulesRef:t,initialModel:o,validateInfos:r,resetFields:a,validate:d,validateField:c,mergeValidateInfo:p,clearValidate:f}}const Cie=()=>({layout:K.oneOf(Jn("horizontal","inline","vertical")),labelCol:De(),wrapperCol:De(),colon:$e(),labelAlign:Ne(),labelWrap:$e(),prefixCls:String,requiredMark:He([String,Boolean]),hideRequiredMark:$e(),model:K.object,rules:De(),validateMessages:De(),validateOnRuleChange:$e(),scrollToFirstError:It(),onSubmit:ye(),name:String,validateTrigger:He([String,Array]),size:Ne(),disabled:$e(),onValuesChange:ye(),onFieldsChange:ye(),onFinish:ye(),onFinishFailed:ye(),onValidate:ye()});function xie(e,t){return sC(Na(e),Na(t))}const Ia=le({compatConfig:{MODE:3},name:"AForm",inheritAttrs:!1,props:Qe(Cie(),{layout:"horizontal",hideRequiredMark:!1,colon:!0}),Item:bR,useForm:Sie,setup(e,t){let{emit:n,slots:o,expose:r,attrs:i}=t;const{prefixCls:a,direction:l,form:s,size:u,disabled:c}=Te("form",e),d=E(()=>e.requiredMark===""||e.requiredMark),f=E(()=>{var N;return d.value!==void 0?d.value:s&&((N=s.value)===null||N===void 0?void 0:N.requiredMark)!==void 0?s.value.requiredMark:!e.hideRequiredMark});A6(u),ZM(c);const p=E(()=>{var N,L;return(N=e.colon)!==null&&N!==void 0?N:(L=s.value)===null||L===void 0?void 0:L.colon}),{validateMessages:v}=TB(),h=E(()=>y(y(y({},dm),v.value),e.validateMessages)),[m,b]=kx(a),S=E(()=>ge(a.value,{[`${a.value}-${e.layout}`]:!0,[`${a.value}-hide-required-mark`]:f.value===!1,[`${a.value}-rtl`]:l.value==="rtl",[`${a.value}-${u.value}`]:u.value},b.value)),C=ae(),$={},x=(N,L)=>{$[N]=L},P=N=>{delete $[N]},w=N=>{const L=!!N,F=L?Na(N).map(u1):[];return L?Object.values($).filter(B=>F.findIndex(j=>xie(j,B.fieldName.value))>-1):Object.values($)},O=N=>{e.model&&w(N).forEach(L=>{L.resetField()})},I=N=>{w(N).forEach(L=>{L.clearValidate()})},_=N=>{const{scrollToFirstError:L}=e;if(n("finishFailed",N),L&&N.errorFields.length){let F={};typeof L=="object"&&(F=L),A(N.errorFields[0].name,F)}},T=function(){return M(...arguments)},A=function(N){let L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const F=w(N?[N]:void 0);if(F.length){const B=F[0].fieldId.value,j=B?document.getElementById(B):null;j&&N6(j,y({scrollMode:"if-needed",block:"nearest"},L))}},R=function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(N===!0){const L=[];return Object.values($).forEach(F=>{let{namePath:B}=F;L.push(B.value)}),DI(e.model,L)}else return DI(e.model,N)},H=(N,L)=>{if(!e.model)return Promise.reject("Form `model` is required for validateFields to work.");const F=!!N,B=F?Na(N).map(u1):[],j=[];Object.values($).forEach(Q=>{var Y;if(F||B.push(Q.namePath.value),!(!((Y=Q.rules)===null||Y===void 0)&&Y.value.length))return;const oe=Q.namePath.value;if(!F||Kre(B,oe)){const Z=Q.validateRules(y({validateMessages:h.value},L));j.push(Z.then(()=>({name:oe,errors:[],warnings:[]})).catch(re=>{const ne=[],X=[];return re.forEach(te=>{let{rule:{warningOnly:W},errors:U}=te;W?X.push(...U):ne.push(...U)}),ne.length?Promise.reject({name:oe,errors:ne,warnings:X}):{name:oe,errors:ne,warnings:X}}))}});const z=yR(j);C.value=z;const G=z.then(()=>C.value===z?Promise.resolve(R(B)):Promise.reject([])).catch(Q=>{const Y=Q.filter(oe=>oe&&oe.errors.length);return Promise.reject({values:R(B),errorFields:Y,outOfDate:C.value!==z})});return G.catch(Q=>Q),G},M=function(){return H(...arguments)},D=N=>{N.preventDefault(),N.stopPropagation(),n("submit",N),e.model&&H().then(F=>{n("finish",F)}).catch(F=>{_(F)})};return r({resetFields:O,clearValidate:I,validateFields:H,getFieldsValue:R,validate:T,scrollToField:A}),vR({model:E(()=>e.model),name:E(()=>e.name),labelAlign:E(()=>e.labelAlign),labelCol:E(()=>e.labelCol),labelWrap:E(()=>e.labelWrap),wrapperCol:E(()=>e.wrapperCol),vertical:E(()=>e.layout==="vertical"),colon:p,requiredMark:f,validateTrigger:E(()=>e.validateTrigger),rules:E(()=>e.rules),addField:x,removeField:P,onValidate:(N,L,F)=>{n("validate",N,L,F)},validateMessages:h}),be(()=>e.rules,()=>{e.validateOnRuleChange&&H()}),()=>{var N;return m(g("form",k(k({},i),{},{onSubmit:D,class:[S.value,i.class]}),[(N=o.default)===null||N===void 0?void 0:N.call(o)]))}}});Ia.useInjectFormItemContext=bn;Ia.ItemRest=qg;Ia.install=function(e){return e.component(Ia.name,Ia),e.component(Ia.Item.name,Ia.Item),e.component(qg.name,qg),e};const $ie=new at("antCheckboxEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),wie=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return[{[`${t}-group`]:y(y({},qe(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:y(y({},qe(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:y(y({},qe(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:y({},qi(e))},[`${t}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.checkboxSize/14*5,height:e.checkboxSize/14*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[t]:{"&-indeterminate":{[`${t}-inner`]:{"&:after":{top:"50%",insetInlineStart:"50%",width:e.fontSizeLG/2,height:e.fontSizeLG/2,backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${n}:hover ${t}:after`]:{visibility:"visible"},[` + .${o}-col-xl-24${n}-label`]:Fs(e),[`@media (max-width: ${e.screenXSMax}px)`]:[die(e),{[t]:{[`.${o}-col-xs-24${n}-label`]:Fs(e)}}],[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{[`.${o}-col-sm-24${n}-label`]:Fs(e)}},[`@media (max-width: ${e.screenMDMax}px)`]:{[t]:{[`.${o}-col-md-24${n}-label`]:Fs(e)}},[`@media (max-width: ${e.screenLGMax}px)`]:{[t]:{[`.${o}-col-lg-24${n}-label`]:Fs(e)}}}},kx=Ue("Form",(e,t)=>{let{rootPrefixCls:n}=t;const o=Be(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:n});return[lie(o),sie(o),iie(o),cie(o),uie(o),fie(o),bf(o),RC]}),pie=le({compatConfig:{MODE:3},name:"ErrorList",inheritAttrs:!1,props:["errors","help","onErrorVisibleChanged","helpStatus","warnings"],setup(e,t){let{attrs:n}=t;const{prefixCls:o,status:r}=Qre(),i=E(()=>`${o.value}-item-explain`),a=E(()=>!!(e.errors&&e.errors.length)),l=ae(r.value),[,s]=kx(o);return be([a,r],()=>{a.value&&(l.value=r.value)}),()=>{var u,c;const d=Sf(`${o.value}-show-help-item`),f=Av(`${o.value}-show-help-item`,d);return f.role="alert",f.class=[s.value,i.value,n.class,`${o.value}-show-help`],g(Nn,k(k({},Cr(`${o.value}-show-help`)),{},{onAfterEnter:()=>e.onErrorVisibleChanged(!0),onAfterLeave:()=>e.onErrorVisibleChanged(!1)}),{default:()=>[Pn(g(dv,k(k({},f),{},{tag:"div"}),{default:()=>[(c=e.errors)===null||c===void 0?void 0:c.map((p,v)=>g("div",{key:v,class:l.value?`${i.value}-${l.value}`:""},[p]))]}),[[Vn,!!(!((u=e.errors)===null||u===void 0)&&u.length)]])]})}}}),gie=le({compatConfig:{MODE:3},slots:Object,inheritAttrs:!1,props:["prefixCls","errors","hasFeedback","onDomErrorVisibleChange","wrapperCol","help","extra","status","marginBottom","onErrorVisibleChanged"],setup(e,t){let{slots:n}=t;const o=Rx(),{wrapperCol:r}=o,i=y({},o);return delete i.labelCol,delete i.wrapperCol,vR(i),Zre({prefixCls:E(()=>e.prefixCls),status:E(()=>e.status)}),()=>{var a,l,s;const{prefixCls:u,wrapperCol:c,marginBottom:d,onErrorVisibleChanged:f,help:p=(a=n.help)===null||a===void 0?void 0:a.call(n),errors:v=zt((l=n.errors)===null||l===void 0?void 0:l.call(n)),extra:h=(s=n.extra)===null||s===void 0?void 0:s.call(n)}=e,m=`${u}-item`,b=c||(r==null?void 0:r.value)||{},S=ge(`${m}-control`,b.class);return g(fm,k(k({},b),{},{class:S}),{default:()=>{var C;return g(Le,null,[g("div",{class:`${m}-control-input`},[g("div",{class:`${m}-control-input-content`},[(C=n.default)===null||C===void 0?void 0:C.call(n)])]),d!==null||v.length?g("div",{style:{display:"flex",flexWrap:"nowrap"}},[g(pie,{errors:v,help:p,class:`${m}-explain-connected`,onErrorVisibleChanged:f},null),!!d&&g("div",{style:{width:0,height:`${d}px`}},null)]):null,h?g("div",{class:`${m}-extra`},[h]):null])}})}}});function hie(e){const t=se(e.value.slice());let n=null;return Ve(()=>{clearTimeout(n),n=setTimeout(()=>{t.value=e.value},e.value.length?0:10)}),t}Jn("success","warning","error","validating","");const vie={success:qr,warning:Jr,error:po,validating:Po};function Y0(e,t,n){let o=e;const r=t;let i=0;try{for(let a=r.length;i({htmlFor:String,prefixCls:String,label:K.any,help:K.any,extra:K.any,labelCol:{type:Object},wrapperCol:{type:Object},hasFeedback:{type:Boolean,default:!1},colon:{type:Boolean,default:void 0},labelAlign:String,prop:{type:[String,Number,Array]},name:{type:[String,Number,Array]},rules:[Array,Object],autoLink:{type:Boolean,default:!0},required:{type:Boolean,default:void 0},validateFirst:{type:Boolean,default:void 0},validateStatus:K.oneOf(Jn("","success","warning","error","validating")),validateTrigger:{type:[String,Array]},messageVariables:{type:Object},hidden:Boolean,noStyle:Boolean,tooltip:String});let bie=0;const yie="form_item",bR=le({compatConfig:{MODE:3},name:"AFormItem",inheritAttrs:!1,__ANT_NEW_FORM_ITEM:!0,props:mie(),slots:Object,setup(e,t){let{slots:n,attrs:o,expose:r}=t;e.prop;const i=`form-item-${++bie}`,{prefixCls:a}=Te("form",e),[l,s]=kx(a),u=se(),c=Rx(),d=E(()=>e.name||e.prop),f=se([]),p=se(!1),v=se(),h=E(()=>{const Y=d.value;return u1(Y)}),m=E(()=>{if(h.value.length){const Y=c.name.value,oe=h.value.join("_");return Y?`${Y}_${oe}`:`${yie}_${oe}`}else return}),b=()=>{const Y=c.model.value;if(!(!Y||!d.value))return Y0(Y,h.value,!0).v},S=E(()=>b()),C=se(Vp(S.value)),$=E(()=>{let Y=e.validateTrigger!==void 0?e.validateTrigger:c.validateTrigger.value;return Y=Y===void 0?"change":Y,Na(Y)}),x=E(()=>{let Y=c.rules.value;const oe=e.rules,Z=e.required!==void 0?{required:!!e.required,trigger:$.value}:[],re=Y0(Y,h.value);Y=Y?re.o[re.k]||re.v:[];const ne=[].concat(oe||Y||[]);return uq(ne,X=>X.required)?ne:ne.concat(Z)}),P=E(()=>{const Y=x.value;let oe=!1;return Y&&Y.length&&Y.every(Z=>Z.required?(oe=!0,!1):!0),oe||e.required}),w=se();Ve(()=>{w.value=e.validateStatus});const O=E(()=>{let Y={};return typeof e.label=="string"?Y.label=e.label:e.name&&(Y.label=String(e.name)),e.messageVariables&&(Y=y(y({},Y),e.messageVariables)),Y}),I=Y=>{if(h.value.length===0)return;const{validateFirst:oe=!1}=e,{triggerName:Z}=Y||{};let re=x.value;if(Z&&(re=re.filter(X=>{const{trigger:te}=X;return!te&&!$.value.length?!0:Na(te||$.value).includes(Z)})),!re.length)return Promise.resolve();const ne=gR(h.value,S.value,re,y({validateMessages:c.validateMessages.value},Y),oe,O.value);return w.value="validating",f.value=[],ne.catch(X=>X).then(function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(w.value==="validating"){const te=X.filter(W=>W&&W.errors.length);w.value=te.length?"error":"success",f.value=te.map(W=>W.errors),c.onValidate(d.value,!f.value.length,f.value.length?nt(f.value[0]):null)}}),ne},_=()=>{I({triggerName:"blur"})},T=()=>{if(p.value){p.value=!1;return}I({triggerName:"change"})},A=()=>{w.value=e.validateStatus,p.value=!1,f.value=[]},R=()=>{var Y;w.value=e.validateStatus,p.value=!0,f.value=[];const oe=c.model.value||{},Z=S.value,re=Y0(oe,h.value,!0);Array.isArray(Z)?re.o[re.k]=[].concat((Y=C.value)!==null&&Y!==void 0?Y:[]):re.o[re.k]=C.value,ot(()=>{p.value=!1})},H=E(()=>e.htmlFor===void 0?m.value:e.htmlFor),M=()=>{const Y=H.value;if(!Y||!v.value)return;const oe=v.value.$el.querySelector(`[id="${Y}"]`);oe&&oe.focus&&oe.focus()};r({onFieldBlur:_,onFieldChange:T,clearValidate:A,resetField:R}),CG({id:m,onFieldBlur:()=>{e.autoLink&&_()},onFieldChange:()=>{e.autoLink&&T()},clearValidate:A},E(()=>!!(e.autoLink&&c.model.value&&d.value)));let D=!1;be(d,Y=>{Y?D||(D=!0,c.addField(i,{fieldValue:S,fieldId:m,fieldName:d,resetField:R,clearValidate:A,namePath:h,validateRules:I,rules:x})):(D=!1,c.removeField(i))},{immediate:!0}),tt(()=>{c.removeField(i)});const N=hie(f),L=E(()=>e.validateStatus!==void 0?e.validateStatus:N.value.length?"error":w.value),F=E(()=>({[`${a.value}-item`]:!0,[s.value]:!0,[`${a.value}-item-has-feedback`]:L.value&&e.hasFeedback,[`${a.value}-item-has-success`]:L.value==="success",[`${a.value}-item-has-warning`]:L.value==="warning",[`${a.value}-item-has-error`]:L.value==="error",[`${a.value}-item-is-validating`]:L.value==="validating",[`${a.value}-item-hidden`]:e.hidden})),B=rt({});kn.useProvide(B),Ve(()=>{let Y;if(e.hasFeedback){const oe=L.value&&vie[L.value];Y=oe?g("span",{class:ge(`${a.value}-item-feedback-icon`,`${a.value}-item-feedback-icon-${L.value}`)},[g(oe,null,null)]):null}y(B,{status:L.value,hasFeedback:e.hasFeedback,feedbackIcon:Y,isFormItemInput:!0})});const j=se(null),z=se(!1),G=()=>{if(u.value){const Y=getComputedStyle(u.value);j.value=parseInt(Y.marginBottom,10)}};Ke(()=>{be(z,()=>{z.value&&G()},{flush:"post",immediate:!0})});const Q=Y=>{Y||(j.value=null)};return()=>{var Y,oe;if(e.noStyle)return(Y=n.default)===null||Y===void 0?void 0:Y.call(n);const Z=(oe=e.help)!==null&&oe!==void 0?oe:n.help?zt(n.help()):null,re=!!(Z!=null&&Array.isArray(Z)&&Z.length||N.value.length);return z.value=re,l(g("div",{class:[F.value,re?`${a.value}-item-with-help`:"",o.class],ref:u},[g(Ax,k(k({},o),{},{class:`${a.value}-item-row`,key:"row"}),{default:()=>{var ne,X;return g(Le,null,[g(Nx,k(k({},e),{},{htmlFor:H.value,required:P.value,requiredMark:c.requiredMark.value,prefixCls:a.value,onClick:M,label:e.label}),{label:n.label,tooltip:n.tooltip}),g(gie,k(k({},e),{},{errors:Z!=null?Na(Z):N.value,marginBottom:j.value,prefixCls:a.value,status:L.value,ref:v,help:Z,extra:(ne=e.extra)!==null&&ne!==void 0?ne:(X=n.extra)===null||X===void 0?void 0:X.call(n),onErrorVisibleChanged:Q}),{default:n.default})])}}),!!j.value&&g("div",{class:`${a.value}-margin-offset`,style:{marginBottom:`-${j.value}px`}},null)]))}}});function yR(e){let t=!1,n=e.length;const o=[];return e.length?new Promise((r,i)=>{e.forEach((a,l)=>{a.catch(s=>(t=!0,s)).then(s=>{n-=1,o[l]=s,!(n>0)&&(t&&i(o),r(o))})})}):Promise.resolve([])}function LI(e){let t=!1;return e&&e.length&&e.every(n=>n.required?(t=!0,!1):!0),t}function FI(e){return e==null?[]:Array.isArray(e)?e:[e]}function q0(e,t,n){let o=e;t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,"");const r=t.split(".");let i=0;for(let a=r.length;i1&&arguments[1]!==void 0?arguments[1]:ae({}),n=arguments.length>2?arguments[2]:void 0;const o=Vp(Bt(e)),r=rt({}),i=se([]),a=C=>{y(Bt(e),y(y({},Vp(o)),C)),ot(()=>{Object.keys(r).forEach($=>{r[$]={autoLink:!1,required:LI(Bt(t)[$])}})})},l=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],$=arguments.length>1?arguments[1]:void 0;return $.length?C.filter(x=>{const P=FI(x.trigger||"change");return hq(P,$).length}):C};let s=null;const u=function(C){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=arguments.length>2?arguments[2]:void 0;const P=[],w={};for(let _=0;_({name:T,errors:[],warnings:[]})).catch(H=>{const M=[],D=[];return H.forEach(N=>{let{rule:{warningOnly:L},errors:F}=N;L?D.push(...F):M.push(...F)}),M.length?Promise.reject({name:T,errors:M,warnings:D}):{name:T,errors:M,warnings:D}}))}const O=yR(P);s=O;const I=O.then(()=>s===O?Promise.resolve(w):Promise.reject([])).catch(_=>{const T=_.filter(A=>A&&A.errors.length);return T.length?Promise.reject({values:w,errorFields:T,outOfDate:s!==O}):Promise.resolve(w)});return I.catch(_=>_),I},c=function(C,$,x){let P=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const w=gR([C],$,x,y({validateMessages:um},P),!!P.validateFirst);return r[C]?(r[C].validateStatus="validating",w.catch(O=>O).then(function(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];var I;if(r[C].validateStatus==="validating"){const _=O.filter(T=>T&&T.errors.length);r[C].validateStatus=_.length?"error":"success",r[C].help=_.length?_.map(T=>T.errors):null,(I=n==null?void 0:n.onValidate)===null||I===void 0||I.call(n,C,!_.length,_.length?nt(r[C].help[0]):null)}}),w):w.catch(O=>O)},d=(C,$)=>{let x=[],P=!0;C?Array.isArray(C)?x=C:x=[C]:(P=!1,x=i.value);const w=u(x,$||{},P);return w.catch(O=>O),w},f=C=>{let $=[];C?Array.isArray(C)?$=C:$=[C]:$=i.value,$.forEach(x=>{r[x]&&y(r[x],{validateStatus:"",help:null})})},p=C=>{const $={autoLink:!1},x=[],P=Array.isArray(C)?C:[C];for(let w=0;w{const $=[];i.value.forEach(x=>{const P=q0(C,x,!1),w=q0(v,x,!1);(h&&(n==null?void 0:n.immediate)&&P.isValid||!sC(P.v,w.v))&&$.push(x)}),d($,{trigger:"change"}),h=!1,v=Vp(nt(C))},b=n==null?void 0:n.debounce;let S=!0;return be(t,()=>{i.value=t?Object.keys(Bt(t)):[],!S&&n&&n.validateOnRuleChange&&d(),S=!1},{deep:!0,immediate:!0}),be(i,()=>{const C={};i.value.forEach($=>{C[$]=y({},r[$],{autoLink:!1,required:LI(Bt(t)[$])}),delete r[$]});for(const $ in r)Object.prototype.hasOwnProperty.call(r,$)&&delete r[$];y(r,C)},{immediate:!0}),be(e,b&&b.wait?MC(m,b.wait,Tq(b,["wait"])):m,{immediate:n&&!!n.immediate,deep:!0}),{modelRef:e,rulesRef:t,initialModel:o,validateInfos:r,resetFields:a,validate:d,validateField:c,mergeValidateInfo:p,clearValidate:f}}const Cie=()=>({layout:K.oneOf(Jn("horizontal","inline","vertical")),labelCol:De(),wrapperCol:De(),colon:$e(),labelAlign:Ne(),labelWrap:$e(),prefixCls:String,requiredMark:He([String,Boolean]),hideRequiredMark:$e(),model:K.object,rules:De(),validateMessages:De(),validateOnRuleChange:$e(),scrollToFirstError:It(),onSubmit:ye(),name:String,validateTrigger:He([String,Array]),size:Ne(),disabled:$e(),onValuesChange:ye(),onFieldsChange:ye(),onFinish:ye(),onFinishFailed:ye(),onValidate:ye()});function xie(e,t){return sC(Na(e),Na(t))}const Ia=le({compatConfig:{MODE:3},name:"AForm",inheritAttrs:!1,props:Qe(Cie(),{layout:"horizontal",hideRequiredMark:!1,colon:!0}),Item:bR,useForm:Sie,setup(e,t){let{emit:n,slots:o,expose:r,attrs:i}=t;const{prefixCls:a,direction:l,form:s,size:u,disabled:c}=Te("form",e),d=E(()=>e.requiredMark===""||e.requiredMark),f=E(()=>{var N;return d.value!==void 0?d.value:s&&((N=s.value)===null||N===void 0?void 0:N.requiredMark)!==void 0?s.value.requiredMark:!e.hideRequiredMark});A6(u),ZM(c);const p=E(()=>{var N,L;return(N=e.colon)!==null&&N!==void 0?N:(L=s.value)===null||L===void 0?void 0:L.colon}),{validateMessages:v}=TB(),h=E(()=>y(y(y({},um),v.value),e.validateMessages)),[m,b]=kx(a),S=E(()=>ge(a.value,{[`${a.value}-${e.layout}`]:!0,[`${a.value}-hide-required-mark`]:f.value===!1,[`${a.value}-rtl`]:l.value==="rtl",[`${a.value}-${u.value}`]:u.value},b.value)),C=ae(),$={},x=(N,L)=>{$[N]=L},P=N=>{delete $[N]},w=N=>{const L=!!N,F=L?Na(N).map(u1):[];return L?Object.values($).filter(B=>F.findIndex(j=>xie(j,B.fieldName.value))>-1):Object.values($)},O=N=>{e.model&&w(N).forEach(L=>{L.resetField()})},I=N=>{w(N).forEach(L=>{L.clearValidate()})},_=N=>{const{scrollToFirstError:L}=e;if(n("finishFailed",N),L&&N.errorFields.length){let F={};typeof L=="object"&&(F=L),A(N.errorFields[0].name,F)}},T=function(){return M(...arguments)},A=function(N){let L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const F=w(N?[N]:void 0);if(F.length){const B=F[0].fieldId.value,j=B?document.getElementById(B):null;j&&N6(j,y({scrollMode:"if-needed",block:"nearest"},L))}},R=function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(N===!0){const L=[];return Object.values($).forEach(F=>{let{namePath:B}=F;L.push(B.value)}),DI(e.model,L)}else return DI(e.model,N)},H=(N,L)=>{if(!e.model)return Promise.reject("Form `model` is required for validateFields to work.");const F=!!N,B=F?Na(N).map(u1):[],j=[];Object.values($).forEach(Q=>{var Y;if(F||B.push(Q.namePath.value),!(!((Y=Q.rules)===null||Y===void 0)&&Y.value.length))return;const oe=Q.namePath.value;if(!F||Kre(B,oe)){const Z=Q.validateRules(y({validateMessages:h.value},L));j.push(Z.then(()=>({name:oe,errors:[],warnings:[]})).catch(re=>{const ne=[],X=[];return re.forEach(te=>{let{rule:{warningOnly:W},errors:U}=te;W?X.push(...U):ne.push(...U)}),ne.length?Promise.reject({name:oe,errors:ne,warnings:X}):{name:oe,errors:ne,warnings:X}}))}});const z=yR(j);C.value=z;const G=z.then(()=>C.value===z?Promise.resolve(R(B)):Promise.reject([])).catch(Q=>{const Y=Q.filter(oe=>oe&&oe.errors.length);return Promise.reject({values:R(B),errorFields:Y,outOfDate:C.value!==z})});return G.catch(Q=>Q),G},M=function(){return H(...arguments)},D=N=>{N.preventDefault(),N.stopPropagation(),n("submit",N),e.model&&H().then(F=>{n("finish",F)}).catch(F=>{_(F)})};return r({resetFields:O,clearValidate:I,validateFields:H,getFieldsValue:R,validate:T,scrollToField:A}),vR({model:E(()=>e.model),name:E(()=>e.name),labelAlign:E(()=>e.labelAlign),labelCol:E(()=>e.labelCol),labelWrap:E(()=>e.labelWrap),wrapperCol:E(()=>e.wrapperCol),vertical:E(()=>e.layout==="vertical"),colon:p,requiredMark:f,validateTrigger:E(()=>e.validateTrigger),rules:E(()=>e.rules),addField:x,removeField:P,onValidate:(N,L,F)=>{n("validate",N,L,F)},validateMessages:h}),be(()=>e.rules,()=>{e.validateOnRuleChange&&H()}),()=>{var N;return m(g("form",k(k({},i),{},{onSubmit:D,class:[S.value,i.class]}),[(N=o.default)===null||N===void 0?void 0:N.call(o)]))}}});Ia.useInjectFormItemContext=bn;Ia.ItemRest=Yg;Ia.install=function(e){return e.component(Ia.name,Ia),e.component(Ia.Item.name,Ia.Item),e.component(Yg.name,Yg),e};const $ie=new at("antCheckboxEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),wie=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return[{[`${t}-group`]:y(y({},qe(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:y(y({},qe(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:y(y({},qe(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:y({},qi(e))},[`${t}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.checkboxSize/14*5,height:e.checkboxSize/14*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[t]:{"&-indeterminate":{[`${t}-inner`]:{"&:after":{top:"50%",insetInlineStart:"50%",width:e.fontSizeLG/2,height:e.fontSizeLG/2,backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${n}:hover ${t}:after`]:{visibility:"visible"},[` ${n}:not(${n}-disabled), ${t}:not(${t}-disabled) `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}},"&:after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderRadius:e.borderRadiusSM,visibility:"hidden",border:`${e.lineWidthBold}px solid ${e.colorPrimary}`,animationName:$ie,animationDuration:e.motionDurationSlow,animationTimingFunction:"ease-in-out",animationFillMode:"backwards",content:'""',transition:`all ${e.motionDurationSlow}`}},[` ${n}-checked:not(${n}-disabled), ${t}-checked:not(${t}-disabled) - `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}:after`]:{borderColor:e.colorPrimaryHover}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function gm(e,t){const n=Be(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return[wie(n)]}const SR=Ue("Checkbox",(e,t)=>{let{prefixCls:n}=t;return[gm(n,e)]}),Pie=e=>{const{prefixCls:t,componentCls:n,antCls:o}=e,r=`${n}-menu-item`,i=` + `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}:after`]:{borderColor:e.colorPrimaryHover}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function pm(e,t){const n=Be(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return[wie(n)]}const SR=Ue("Checkbox",(e,t)=>{let{prefixCls:n}=t;return[pm(n,e)]}),Pie=e=>{const{prefixCls:t,componentCls:n,antCls:o}=e,r=`${n}-menu-item`,i=` &${r}-expand ${r}-expand-icon, ${r}-loading-icon - `,a=Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2);return[{[n]:{width:e.controlWidth}},{[`${n}-dropdown`]:[gm(`${t}-checkbox`,e),{[`&${o}-select-dropdown`]:{padding:0}},{[n]:{"&-checkbox":{top:0,marginInlineEnd:e.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${n}-menu-empty`]:{[`${n}-menu`]:{width:"100%",height:"auto",[r]:{color:e.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:e.controlItemWidth,height:e.dropdownHeight,margin:0,padding:e.paddingXXS,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},"&-item":y(y({},cn),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:`${a}px ${e.paddingSM}px`,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationMid}`,borderRadius:e.borderRadiusSM,"&:hover":{background:e.controlItemBgHover},"&-disabled":{color:e.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[i]:{color:e.colorTextDisabled}},[`&-active:not(${r}-disabled)`]:{"&, &:hover":{fontWeight:e.fontWeightStrong,backgroundColor:e.controlItemBgActive}},"&-content":{flex:"auto"},[i]:{marginInlineStart:e.paddingXXS,color:e.colorTextDescription,fontSize:e.fontSizeIcon},"&-keyword":{color:e.colorHighlight}})}}}]},{[`${n}-dropdown-rtl`]:{direction:"rtl"}},tu(e)]},Oie=Ue("Cascader",e=>[Pie(e)],{controlWidth:184,controlItemWidth:111,dropdownHeight:180});var Iie=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rs===0?[l]:[...a,t,l],[]),r=[];let i=0;return o.forEach((a,l)=>{const s=i+a.length;let u=e.slice(i,s);i=s,l%2===1&&(u=g("span",{class:`${n}-menu-item-keyword`,key:"seperator"},[u])),r.push(u)}),r}const Eie=e=>{let{inputValue:t,path:n,prefixCls:o,fieldNames:r}=e;const i=[],a=t.toLowerCase();return n.forEach((l,s)=>{s!==0&&i.push(" / ");let u=l[r.label];const c=typeof u;(c==="string"||c==="number")&&(u=Tie(String(u),a,o)),i.push(u)}),i};function _ie(){return y(y({},it(iR(),["customSlots","checkable","options"])),{multiple:{type:Boolean,default:void 0},size:String,bordered:{type:Boolean,default:void 0},placement:{type:String},suffixIcon:K.any,status:String,options:Array,popupClassName:String,dropdownClassName:String,"onUpdate:value":Function})}const Mie=le({compatConfig:{MODE:3},name:"ACascader",inheritAttrs:!1,props:Qe(_ie(),{bordered:!0,choiceTransitionName:"",allowClear:!0}),setup(e,t){let{attrs:n,expose:o,slots:r,emit:i}=t;const a=bn(),l=kn.useInject(),s=E(()=>Yr(l.status,e.status)),{prefixCls:u,rootPrefixCls:c,getPrefixCls:d,direction:f,getPopupContainer:p,renderEmpty:v,size:h,disabled:m}=Te("cascader",e),b=E(()=>d("select",e.prefixCls)),{compactSize:S,compactItemClassnames:C}=Xa(b,f),$=E(()=>S.value||h.value),x=ko(),P=E(()=>{var L;return(L=m.value)!==null&&L!==void 0?L:x.value}),[w,O]=DC(b),[I]=Oie(u),_=E(()=>f.value==="rtl"),T=E(()=>{if(!e.showSearch)return e.showSearch;let L={render:Eie};return typeof e.showSearch=="object"&&(L=y(y({},L),e.showSearch)),L}),A=E(()=>ge(e.popupClassName||e.dropdownClassName,`${u.value}-dropdown`,{[`${u.value}-dropdown-rtl`]:_.value},O.value)),R=ae();o({focus(){var L;(L=R.value)===null||L===void 0||L.focus()},blur(){var L;(L=R.value)===null||L===void 0||L.blur()}});const H=function(){for(var L=arguments.length,F=new Array(L),B=0;Be.showArrow!==void 0?e.showArrow:e.loading||!e.multiple),N=E(()=>e.placement!==void 0?e.placement:f.value==="rtl"?"bottomRight":"bottomLeft");return()=>{var L,F;const{notFoundContent:B=(L=r.notFoundContent)===null||L===void 0?void 0:L.call(r),expandIcon:j=(F=r.expandIcon)===null||F===void 0?void 0:F.call(r),multiple:z,bordered:G,allowClear:Q,choiceTransitionName:Y,transitionName:oe,id:Z=a.id.value}=e,re=Iie(e,["notFoundContent","expandIcon","multiple","bordered","allowClear","choiceTransitionName","transitionName","id"]),ne=B||v("Cascader");let X=j;j||(X=_.value?g(mi,null,null):g(Jo,null,null));const te=g("span",{class:`${b.value}-menu-item-loading-icon`},[g(Po,{spin:!0},null)]),{suffixIcon:W,removeIcon:U,clearIcon:J}=SC(y(y({},e),{hasFeedback:l.hasFeedback,feedbackIcon:l.feedbackIcon,multiple:z,prefixCls:b.value,showArrow:D.value}),r);return I(w(g(qoe,k(k(k({},re),n),{},{id:Z,prefixCls:b.value,class:[u.value,{[`${b.value}-lg`]:$.value==="large",[`${b.value}-sm`]:$.value==="small",[`${b.value}-rtl`]:_.value,[`${b.value}-borderless`]:!G,[`${b.value}-in-form-item`]:l.isFormItemInput},lo(b.value,s.value,l.hasFeedback),C.value,n.class,O.value],disabled:P.value,direction:f.value,placement:N.value,notFoundContent:ne,allowClear:Q,showSearch:T.value,expandIcon:X,inputIcon:W,removeIcon:U,clearIcon:J,loadingIcon:te,checkable:!!z,dropdownClassName:A.value,dropdownPrefixCls:u.value,choiceTransitionName:co(c.value,"",Y),transitionName:co(c.value,cC(N.value),oe),getPopupContainer:p==null?void 0:p.value,customSlots:y(y({},r),{checkable:()=>g("span",{class:`${u.value}-checkbox-inner`},null)}),tagRender:e.tagRender||r.tagRender,displayRender:e.displayRender||r.displayRender,maxTagPlaceholder:e.maxTagPlaceholder||r.maxTagPlaceholder,showArrow:l.hasFeedback||e.showArrow,onChange:H,onBlur:M,ref:R}),r)))}}}),Aie=Lt(y(Mie,{SHOW_CHILD:Y5,SHOW_PARENT:X5})),Rie=()=>({name:String,prefixCls:String,options:pt([]),disabled:Boolean,id:String}),Die=()=>y(y({},Rie()),{defaultValue:pt(),value:pt(),onChange:ye(),"onUpdate:value":ye()}),Nie=()=>({prefixCls:String,defaultChecked:$e(),checked:$e(),disabled:$e(),isGroup:$e(),value:K.any,name:String,id:String,indeterminate:$e(),type:Ne("checkbox"),autofocus:$e(),onChange:ye(),"onUpdate:checked":ye(),onClick:ye(),skipGroup:$e(!1)}),kie=()=>y(y({},Nie()),{indeterminate:$e(!1)}),CR=Symbol("CheckboxGroupContext");var BI=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r(v==null?void 0:v.disabled.value)||c.value);Ve(()=>{!e.skipGroup&&v&&v.registerValue(h,e.value)}),tt(()=>{v&&v.cancelValue(h)}),Ke(()=>{Yo(!!(e.checked!==void 0||v||e.value===void 0))});const b=x=>{const P=x.target.checked;n("update:checked",P),n("change",x),a.onFieldChange()},S=ae();return i({focus:()=>{var x;(x=S.value)===null||x===void 0||x.focus()},blur:()=>{var x;(x=S.value)===null||x===void 0||x.blur()}}),()=>{var x;const P=Ot((x=r.default)===null||x===void 0?void 0:x.call(r)),{indeterminate:w,skipGroup:O,id:I=a.id.value}=e,_=BI(e,["indeterminate","skipGroup","id"]),{onMouseenter:T,onMouseleave:A,onInput:R,class:H,style:M}=o,D=BI(o,["onMouseenter","onMouseleave","onInput","class","style"]),N=y(y(y(y({},_),{id:I,prefixCls:s.value}),D),{disabled:m.value});v&&!O?(N.onChange=function(){for(var j=arguments.length,z=new Array(j),G=0;G`${l.value}-group`),[c,d]=SR(u),f=ae((e.value===void 0?e.defaultValue:e.value)||[]);be(()=>e.value,()=>{f.value=e.value||[]});const p=E(()=>e.options.map($=>typeof $=="string"||typeof $=="number"?{label:$,value:$}:$)),v=ae(Symbol()),h=ae(new Map),m=$=>{h.value.delete($),v.value=Symbol()},b=($,x)=>{h.value.set($,x),v.value=Symbol()},S=ae(new Map);return be(v,()=>{const $=new Map;for(const x of h.value.values())$.set(x,!0);S.value=$}),Xe(CR,{cancelValue:m,registerValue:b,toggleOption:$=>{const x=f.value.indexOf($.value),P=[...f.value];x===-1?P.push($.value):P.splice(x,1),e.value===void 0&&(f.value=P);const w=P.filter(O=>S.value.has(O)).sort((O,I)=>{const _=p.value.findIndex(A=>A.value===O),T=p.value.findIndex(A=>A.value===I);return _-T});r("update:value",w),r("change",w),a.onFieldChange()},mergedValue:f,name:E(()=>e.name),disabled:E(()=>e.disabled)}),i({mergedValue:f}),()=>{var $;const{id:x=a.id.value}=e;let P=null;return p.value&&p.value.length>0&&(P=p.value.map(w=>{var O;return g(gr,{prefixCls:l.value,key:w.value.toString(),disabled:"disabled"in w?w.disabled:e.disabled,indeterminate:w.indeterminate,value:w.value,checked:f.value.indexOf(w.value)!==-1,onChange:w.onChange,class:`${u.value}-item`},{default:()=>[n.label!==void 0?(O=n.label)===null||O===void 0?void 0:O.call(n,w):w.label]})})),c(g("div",k(k({},o),{},{class:[u.value,{[`${u.value}-rtl`]:s.value==="rtl"},o.class,d.value],id:x}),[P||(($=n.default)===null||$===void 0?void 0:$.call(n))]))}}});gr.Group=yh;gr.install=function(e){return e.component(gr.name,gr),e.component(yh.name,yh),e};const Lie={useBreakpoint:nu},Fie=Lt(pm),Bie=e=>{const{componentCls:t,commentBg:n,commentPaddingBase:o,commentNestIndent:r,commentFontSizeBase:i,commentFontSizeSm:a,commentAuthorNameColor:l,commentAuthorTimeColor:s,commentActionColor:u,commentActionHoverColor:c,commentActionsMarginBottom:d,commentActionsMarginTop:f,commentContentDetailPMarginBottom:p}=e;return{[t]:{position:"relative",backgroundColor:n,[`${t}-inner`]:{display:"flex",padding:o},[`${t}-avatar`]:{position:"relative",flexShrink:0,marginRight:e.marginSM,cursor:"pointer",img:{width:"32px",height:"32px",borderRadius:"50%"}},[`${t}-content`]:{position:"relative",flex:"1 1 auto",minWidth:"1px",fontSize:i,wordWrap:"break-word","&-author":{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginBottom:e.marginXXS,fontSize:i,"& > a,& > span":{paddingRight:e.paddingXS,fontSize:a,lineHeight:"18px"},"&-name":{color:l,fontSize:i,transition:`color ${e.motionDurationSlow}`,"> *":{color:l,"&:hover":{color:l}}},"&-time":{color:s,whiteSpace:"nowrap",cursor:"auto"}},"&-detail p":{marginBottom:p,whiteSpace:"pre-wrap"}},[`${t}-actions`]:{marginTop:f,marginBottom:d,paddingLeft:0,"> li":{display:"inline-block",color:u,"> span":{marginRight:"10px",color:u,fontSize:a,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,userSelect:"none","&:hover":{color:c}}}},[`${t}-nested`]:{marginLeft:r},"&-rtl":{direction:"rtl"}}}},Hie=Ue("Comment",e=>{const t=Be(e,{commentBg:"inherit",commentPaddingBase:`${e.paddingMD}px 0`,commentNestIndent:"44px",commentFontSizeBase:e.fontSize,commentFontSizeSm:e.fontSizeSM,commentAuthorNameColor:e.colorTextTertiary,commentAuthorTimeColor:e.colorTextPlaceholder,commentActionColor:e.colorTextTertiary,commentActionHoverColor:e.colorTextSecondary,commentActionsMarginBottom:"inherit",commentActionsMarginTop:e.marginSM,commentContentDetailPMarginBottom:"inherit"});return[Bie(t)]}),zie=()=>({actions:Array,author:K.any,avatar:K.any,content:K.any,prefixCls:String,datetime:K.any}),jie=le({compatConfig:{MODE:3},name:"AComment",inheritAttrs:!1,props:zie(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("comment",e),[a,l]=Hie(r),s=(c,d)=>g("div",{class:`${c}-nested`},[d]),u=c=>!c||!c.length?null:c.map((f,p)=>g("li",{key:`action-${p}`},[f]));return()=>{var c,d,f,p,v,h,m,b,S,C,$;const x=r.value,P=(c=e.actions)!==null&&c!==void 0?c:(d=n.actions)===null||d===void 0?void 0:d.call(n),w=(f=e.author)!==null&&f!==void 0?f:(p=n.author)===null||p===void 0?void 0:p.call(n),O=(v=e.avatar)!==null&&v!==void 0?v:(h=n.avatar)===null||h===void 0?void 0:h.call(n),I=(m=e.content)!==null&&m!==void 0?m:(b=n.content)===null||b===void 0?void 0:b.call(n),_=(S=e.datetime)!==null&&S!==void 0?S:(C=n.datetime)===null||C===void 0?void 0:C.call(n),T=g("div",{class:`${x}-avatar`},[typeof O=="string"?g("img",{src:O,alt:"comment-avatar"},null):O]),A=P?g("ul",{class:`${x}-actions`},[u(Array.isArray(P)?P:[P])]):null,R=g("div",{class:`${x}-content-author`},[w&&g("span",{class:`${x}-content-author-name`},[w]),_&&g("span",{class:`${x}-content-author-time`},[_])]),H=g("div",{class:`${x}-content`},[R,g("div",{class:`${x}-content-detail`},[I]),A]),M=g("div",{class:`${x}-inner`},[T,H]),D=Ot(($=n.default)===null||$===void 0?void 0:$.call(n));return a(g("div",k(k({},o),{},{class:[x,{[`${x}-rtl`]:i.value==="rtl"},o.class,l.value]}),[M,D&&D.length?s(x,D):null]))}}}),Wie=Lt(jie);let Qp=y({},$o.Modal);function Vie(e){e?Qp=y(y({},Qp),e):Qp=y({},$o.Modal)}function Kie(){return Qp}const f1="internalMark",eg=le({compatConfig:{MODE:3},name:"ALocaleProvider",props:{locale:{type:Object},ANT_MARK__:String},setup(e,t){let{slots:n}=t;Yo(e.ANT_MARK__===f1);const o=rt({antLocale:y(y({},e.locale),{exist:!0}),ANT_MARK__:f1});return Xe("localeData",o),be(()=>e.locale,r=>{Vie(r&&r.Modal),o.antLocale=y(y({},r),{exist:!0})},{immediate:!0}),()=>{var r;return(r=n.default)===null||r===void 0?void 0:r.call(n)}}});eg.install=function(e){return e.component(eg.name,eg),e};const xR=Lt(eg),$R=le({name:"Notice",inheritAttrs:!1,props:["prefixCls","duration","updateMark","noticeKey","closeIcon","closable","props","onClick","onClose","holder","visible"],setup(e,t){let{attrs:n,slots:o}=t,r,i=!1;const a=E(()=>e.duration===void 0?4.5:e.duration),l=()=>{a.value&&!i&&(r=setTimeout(()=>{u()},a.value*1e3))},s=()=>{r&&(clearTimeout(r),r=null)},u=d=>{d&&d.stopPropagation(),s();const{onClose:f,noticeKey:p}=e;f&&f(p)},c=()=>{s(),l()};return Ke(()=>{l()}),Zn(()=>{i=!0,s()}),be([a,()=>e.updateMark,()=>e.visible],(d,f)=>{let[p,v,h]=d,[m,b,S]=f;(p!==m||v!==b||h!==S&&S)&&c()},{flush:"post"}),()=>{var d,f;const{prefixCls:p,closable:v,closeIcon:h=(d=o.closeIcon)===null||d===void 0?void 0:d.call(o),onClick:m,holder:b}=e,{class:S,style:C}=n,$=`${p}-notice`,x=Object.keys(n).reduce((w,O)=>((O.startsWith("data-")||O.startsWith("aria-")||O==="role")&&(w[O]=n[O]),w),{}),P=g("div",k({class:ge($,S,{[`${$}-closable`]:v}),style:C,onMouseenter:s,onMouseleave:l,onClick:m},x),[g("div",{class:`${$}-content`},[(f=o.default)===null||f===void 0?void 0:f.call(o)]),v?g("a",{tabindex:0,onClick:u,class:`${$}-close`},[h||g("span",{class:`${$}-close-x`},null)]):null]);return b?g(iv,{to:b},{default:()=>P}):P}}});var Uie=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{prefixCls:c,animation:d="fade"}=e;let f=e.transitionName;return!f&&d&&(f=`${c}-${d}`),Rv(f)}),s=(c,d)=>{const f=c.key||zI(),p=y(y({},c),{key:f}),{maxCount:v}=e,h=a.value.map(b=>b.notice.key).indexOf(f),m=a.value.concat();h!==-1?m.splice(h,1,{notice:p,holderCallback:d}):(v&&a.value.length>=v&&(p.key=m[0].notice.key,p.updateMark=zI(),p.userPassKey=f,m.shift()),m.push({notice:p,holderCallback:d})),a.value=m},u=c=>{a.value=nt(a.value).filter(d=>{let{notice:{key:f,userPassKey:p}}=d;return(p||f)!==c})};return o({add:s,remove:u,notices:a}),()=>{var c;const{prefixCls:d,closeIcon:f=(c=r.closeIcon)===null||c===void 0?void 0:c.call(r,{prefixCls:d})}=e,p=a.value.map((h,m)=>{let{notice:b,holderCallback:S}=h;const C=m===a.value.length-1?b.updateMark:void 0,{key:$,userPassKey:x}=b,{content:P}=b,w=y(y(y({prefixCls:d,closeIcon:typeof f=="function"?f({prefixCls:d}):f},b),b.props),{key:$,noticeKey:x||$,updateMark:C,onClose:O=>{var I;u(O),(I=b.onClose)===null||I===void 0||I.call(b)},onClick:b.onClick});return S?g("div",{key:$,class:`${d}-hook-holder`,ref:O=>{typeof $>"u"||(O?(i.set($,O),S(O,w)):i.delete($))}},null):g($R,k(k({},w),{},{class:ge(w.class,e.hashId)}),{default:()=>[typeof P=="function"?P({prefixCls:d}):P]})}),v={[d]:1,[n.class]:!!n.class,[e.hashId]:!0};return g("div",{class:v,style:n.style||{top:"65px",left:"50%"}},[g(fv,k({tag:"div"},l.value),{default:()=>[p]})])}}});Sh.newInstance=function(t,n){const o=t||{},{name:r="notification",getContainer:i,appContext:a,prefixCls:l,rootPrefixCls:s,transitionName:u,hasTransitionName:c,useStyle:d}=o,f=Uie(o,["name","getContainer","appContext","prefixCls","rootPrefixCls","transitionName","hasTransitionName","useStyle"]),p=document.createElement("div");i?i().appendChild(p):document.body.appendChild(p);const h=g(le({compatConfig:{MODE:3},name:"NotificationWrapper",setup(m,b){let{attrs:S}=b;const C=se(),$=E(()=>Un.getPrefixCls(r,l)),[,x]=d($);return Ke(()=>{n({notice(P){var w;(w=C.value)===null||w===void 0||w.add(P)},removeNotice(P){var w;(w=C.value)===null||w===void 0||w.remove(P)},destroy(){Fa(null,p),p.parentNode&&p.parentNode.removeChild(p)},component:C})}),()=>{const P=Un,w=P.getRootPrefixCls(s,$.value),O=c?u:`${$.value}-${u}`;return g(Nl,k(k({},P),{},{prefixCls:w}),{default:()=>[g(Sh,k(k({ref:C},S),{},{prefixCls:$.value,transitionName:O,hashId:x.value}),null)]})}}}),f);h.appContext=a||h.appContext,Fa(h,p)};let jI=0;const Xie=Date.now();function WI(){const e=jI;return jI+=1,`rcNotification_${Xie}_${e}`}const Yie=le({name:"HookNotification",inheritAttrs:!1,props:["prefixCls","transitionName","animation","maxCount","closeIcon","hashId","remove","notices","getStyles","getClassName","onAllRemoved","getContainer"],setup(e,t){let{attrs:n,slots:o}=t;const r=new Map,i=E(()=>e.notices),a=E(()=>{let c=e.transitionName;if(!c&&e.animation)switch(typeof e.animation){case"string":c=e.animation;break;case"function":c=e.animation().name;break;case"object":c=e.animation.name;break;default:c=`${e.prefixCls}-fade`;break}return Rv(c)}),l=c=>e.remove(c),s=ae({});be(i,()=>{const c={};Object.keys(s.value).forEach(d=>{c[d]=[]}),e.notices.forEach(d=>{const{placement:f="topRight"}=d.notice;f&&(c[f]=c[f]||[],c[f].push(d))}),s.value=c});const u=E(()=>Object.keys(s.value));return()=>{var c;const{prefixCls:d,closeIcon:f=(c=o.closeIcon)===null||c===void 0?void 0:c.call(o,{prefixCls:d})}=e,p=u.value.map(v=>{var h,m;const b=s.value[v],S=(h=e.getClassName)===null||h===void 0?void 0:h.call(e,v),C=(m=e.getStyles)===null||m===void 0?void 0:m.call(e,v),$=b.map((w,O)=>{let{notice:I,holderCallback:_}=w;const T=O===i.value.length-1?I.updateMark:void 0,{key:A,userPassKey:R}=I,{content:H}=I,M=y(y(y({prefixCls:d,closeIcon:typeof f=="function"?f({prefixCls:d}):f},I),I.props),{key:A,noticeKey:R||A,updateMark:T,onClose:D=>{var N;l(D),(N=I.onClose)===null||N===void 0||N.call(I)},onClick:I.onClick});return _?g("div",{key:A,class:`${d}-hook-holder`,ref:D=>{typeof A>"u"||(D?(r.set(A,D),_(D,M)):r.delete(A))}},null):g($R,k(k({},M),{},{class:ge(M.class,e.hashId)}),{default:()=>[typeof H=="function"?H({prefixCls:d}):H]})}),x={[d]:1,[`${d}-${v}`]:1,[n.class]:!!n.class,[e.hashId]:!0,[S]:!!S};function P(){var w;b.length>0||(Reflect.deleteProperty(s.value,v),(w=e.onAllRemoved)===null||w===void 0||w.call(e))}return g("div",{key:v,class:x,style:n.style||C||{top:"65px",left:"50%"}},[g(fv,k(k({tag:"div"},a.value),{},{onAfterLeave:P}),{default:()=>[$]})])});return g(m8,{getContainer:e.getContainer},{default:()=>[p]})}}});var qie=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rdocument.body;let VI=0;function Zie(){const e={};for(var t=arguments.length,n=new Array(t),o=0;o{r&&Object.keys(r).forEach(i=>{const a=r[i];a!==void 0&&(e[i]=a)})}),e}function wR(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{getContainer:t=Jie,motion:n,prefixCls:o,maxCount:r,getClassName:i,getStyles:a,onAllRemoved:l}=e,s=qie(e,["getContainer","motion","prefixCls","maxCount","getClassName","getStyles","onAllRemoved"]),u=se([]),c=se(),d=(b,S)=>{const C=b.key||WI(),$=y(y({},b),{key:C}),x=u.value.map(w=>w.notice.key).indexOf(C),P=u.value.concat();x!==-1?P.splice(x,1,{notice:$,holderCallback:S}):(r&&u.value.length>=r&&($.key=P[0].notice.key,$.updateMark=WI(),$.userPassKey=C,P.shift()),P.push({notice:$,holderCallback:S})),u.value=P},f=b=>{u.value=u.value.filter(S=>{let{notice:{key:C,userPassKey:$}}=S;return($||C)!==b})},p=()=>{u.value=[]},v=()=>g(Yie,{ref:c,prefixCls:o,maxCount:r,notices:u.value,remove:f,getClassName:i,getStyles:a,animation:n,hashId:e.hashId,onAllRemoved:l,getContainer:t},null),h=se([]),m={open:b=>{const S=Zie(s,b);(S.key===null||S.key===void 0)&&(S.key=`vc-notification-${VI}`,VI+=1),h.value=[...h.value,{type:"open",config:S}]},close:b=>{h.value=[...h.value,{type:"close",key:b}]},destroy:()=>{h.value=[...h.value,{type:"destroy"}]}};return be(h,()=>{h.value.length&&(h.value.forEach(b=>{switch(b.type){case"open":d(b.config);break;case"close":f(b.key);break;case"destroy":p();break}}),h.value=[])}),[m,v]}const Qie=e=>{const{componentCls:t,iconCls:n,boxShadowSecondary:o,colorBgElevated:r,colorSuccess:i,colorError:a,colorWarning:l,colorInfo:s,fontSizeLG:u,motionEaseInOutCirc:c,motionDurationSlow:d,marginXS:f,paddingXS:p,borderRadiusLG:v,zIndexPopup:h,messageNoticeContentPadding:m}=e,b=new at("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:p,transform:"translateY(0)",opacity:1}}),S=new at("MessageMoveOut",{"0%":{maxHeight:e.height,padding:p,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}});return[{[t]:y(y({},qe(e)),{position:"fixed",top:f,left:"50%",transform:"translateX(-50%)",width:"100%",pointerEvents:"none",zIndex:h,[`${t}-move-up`]:{animationFillMode:"forwards"},[` + `,a=Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2);return[{[n]:{width:e.controlWidth}},{[`${n}-dropdown`]:[pm(`${t}-checkbox`,e),{[`&${o}-select-dropdown`]:{padding:0}},{[n]:{"&-checkbox":{top:0,marginInlineEnd:e.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${n}-menu-empty`]:{[`${n}-menu`]:{width:"100%",height:"auto",[r]:{color:e.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:e.controlItemWidth,height:e.dropdownHeight,margin:0,padding:e.paddingXXS,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},"&-item":y(y({},cn),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:`${a}px ${e.paddingSM}px`,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationMid}`,borderRadius:e.borderRadiusSM,"&:hover":{background:e.controlItemBgHover},"&-disabled":{color:e.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[i]:{color:e.colorTextDisabled}},[`&-active:not(${r}-disabled)`]:{"&, &:hover":{fontWeight:e.fontWeightStrong,backgroundColor:e.controlItemBgActive}},"&-content":{flex:"auto"},[i]:{marginInlineStart:e.paddingXXS,color:e.colorTextDescription,fontSize:e.fontSizeIcon},"&-keyword":{color:e.colorHighlight}})}}}]},{[`${n}-dropdown-rtl`]:{direction:"rtl"}},tu(e)]},Oie=Ue("Cascader",e=>[Pie(e)],{controlWidth:184,controlItemWidth:111,dropdownHeight:180});var Iie=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rs===0?[l]:[...a,t,l],[]),r=[];let i=0;return o.forEach((a,l)=>{const s=i+a.length;let u=e.slice(i,s);i=s,l%2===1&&(u=g("span",{class:`${n}-menu-item-keyword`,key:"seperator"},[u])),r.push(u)}),r}const Eie=e=>{let{inputValue:t,path:n,prefixCls:o,fieldNames:r}=e;const i=[],a=t.toLowerCase();return n.forEach((l,s)=>{s!==0&&i.push(" / ");let u=l[r.label];const c=typeof u;(c==="string"||c==="number")&&(u=Tie(String(u),a,o)),i.push(u)}),i};function _ie(){return y(y({},it(iR(),["customSlots","checkable","options"])),{multiple:{type:Boolean,default:void 0},size:String,bordered:{type:Boolean,default:void 0},placement:{type:String},suffixIcon:K.any,status:String,options:Array,popupClassName:String,dropdownClassName:String,"onUpdate:value":Function})}const Mie=le({compatConfig:{MODE:3},name:"ACascader",inheritAttrs:!1,props:Qe(_ie(),{bordered:!0,choiceTransitionName:"",allowClear:!0}),setup(e,t){let{attrs:n,expose:o,slots:r,emit:i}=t;const a=bn(),l=kn.useInject(),s=E(()=>Yr(l.status,e.status)),{prefixCls:u,rootPrefixCls:c,getPrefixCls:d,direction:f,getPopupContainer:p,renderEmpty:v,size:h,disabled:m}=Te("cascader",e),b=E(()=>d("select",e.prefixCls)),{compactSize:S,compactItemClassnames:C}=Xa(b,f),$=E(()=>S.value||h.value),x=ko(),P=E(()=>{var L;return(L=m.value)!==null&&L!==void 0?L:x.value}),[w,O]=DC(b),[I]=Oie(u),_=E(()=>f.value==="rtl"),T=E(()=>{if(!e.showSearch)return e.showSearch;let L={render:Eie};return typeof e.showSearch=="object"&&(L=y(y({},L),e.showSearch)),L}),A=E(()=>ge(e.popupClassName||e.dropdownClassName,`${u.value}-dropdown`,{[`${u.value}-dropdown-rtl`]:_.value},O.value)),R=ae();o({focus(){var L;(L=R.value)===null||L===void 0||L.focus()},blur(){var L;(L=R.value)===null||L===void 0||L.blur()}});const H=function(){for(var L=arguments.length,F=new Array(L),B=0;Be.showArrow!==void 0?e.showArrow:e.loading||!e.multiple),N=E(()=>e.placement!==void 0?e.placement:f.value==="rtl"?"bottomRight":"bottomLeft");return()=>{var L,F;const{notFoundContent:B=(L=r.notFoundContent)===null||L===void 0?void 0:L.call(r),expandIcon:j=(F=r.expandIcon)===null||F===void 0?void 0:F.call(r),multiple:z,bordered:G,allowClear:Q,choiceTransitionName:Y,transitionName:oe,id:Z=a.id.value}=e,re=Iie(e,["notFoundContent","expandIcon","multiple","bordered","allowClear","choiceTransitionName","transitionName","id"]),ne=B||v("Cascader");let X=j;j||(X=_.value?g(mi,null,null):g(Jo,null,null));const te=g("span",{class:`${b.value}-menu-item-loading-icon`},[g(Po,{spin:!0},null)]),{suffixIcon:W,removeIcon:U,clearIcon:J}=SC(y(y({},e),{hasFeedback:l.hasFeedback,feedbackIcon:l.feedbackIcon,multiple:z,prefixCls:b.value,showArrow:D.value}),r);return I(w(g(qoe,k(k(k({},re),n),{},{id:Z,prefixCls:b.value,class:[u.value,{[`${b.value}-lg`]:$.value==="large",[`${b.value}-sm`]:$.value==="small",[`${b.value}-rtl`]:_.value,[`${b.value}-borderless`]:!G,[`${b.value}-in-form-item`]:l.isFormItemInput},lo(b.value,s.value,l.hasFeedback),C.value,n.class,O.value],disabled:P.value,direction:f.value,placement:N.value,notFoundContent:ne,allowClear:Q,showSearch:T.value,expandIcon:X,inputIcon:W,removeIcon:U,clearIcon:J,loadingIcon:te,checkable:!!z,dropdownClassName:A.value,dropdownPrefixCls:u.value,choiceTransitionName:co(c.value,"",Y),transitionName:co(c.value,cC(N.value),oe),getPopupContainer:p==null?void 0:p.value,customSlots:y(y({},r),{checkable:()=>g("span",{class:`${u.value}-checkbox-inner`},null)}),tagRender:e.tagRender||r.tagRender,displayRender:e.displayRender||r.displayRender,maxTagPlaceholder:e.maxTagPlaceholder||r.maxTagPlaceholder,showArrow:l.hasFeedback||e.showArrow,onChange:H,onBlur:M,ref:R}),r)))}}}),Aie=Lt(y(Mie,{SHOW_CHILD:Y5,SHOW_PARENT:X5})),Rie=()=>({name:String,prefixCls:String,options:pt([]),disabled:Boolean,id:String}),Die=()=>y(y({},Rie()),{defaultValue:pt(),value:pt(),onChange:ye(),"onUpdate:value":ye()}),Nie=()=>({prefixCls:String,defaultChecked:$e(),checked:$e(),disabled:$e(),isGroup:$e(),value:K.any,name:String,id:String,indeterminate:$e(),type:Ne("checkbox"),autofocus:$e(),onChange:ye(),"onUpdate:checked":ye(),onClick:ye(),skipGroup:$e(!1)}),kie=()=>y(y({},Nie()),{indeterminate:$e(!1)}),CR=Symbol("CheckboxGroupContext");var BI=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r(v==null?void 0:v.disabled.value)||c.value);Ve(()=>{!e.skipGroup&&v&&v.registerValue(h,e.value)}),tt(()=>{v&&v.cancelValue(h)}),Ke(()=>{Yo(!!(e.checked!==void 0||v||e.value===void 0))});const b=x=>{const P=x.target.checked;n("update:checked",P),n("change",x),a.onFieldChange()},S=ae();return i({focus:()=>{var x;(x=S.value)===null||x===void 0||x.focus()},blur:()=>{var x;(x=S.value)===null||x===void 0||x.blur()}}),()=>{var x;const P=Ot((x=r.default)===null||x===void 0?void 0:x.call(r)),{indeterminate:w,skipGroup:O,id:I=a.id.value}=e,_=BI(e,["indeterminate","skipGroup","id"]),{onMouseenter:T,onMouseleave:A,onInput:R,class:H,style:M}=o,D=BI(o,["onMouseenter","onMouseleave","onInput","class","style"]),N=y(y(y(y({},_),{id:I,prefixCls:s.value}),D),{disabled:m.value});v&&!O?(N.onChange=function(){for(var j=arguments.length,z=new Array(j),G=0;G`${l.value}-group`),[c,d]=SR(u),f=ae((e.value===void 0?e.defaultValue:e.value)||[]);be(()=>e.value,()=>{f.value=e.value||[]});const p=E(()=>e.options.map($=>typeof $=="string"||typeof $=="number"?{label:$,value:$}:$)),v=ae(Symbol()),h=ae(new Map),m=$=>{h.value.delete($),v.value=Symbol()},b=($,x)=>{h.value.set($,x),v.value=Symbol()},S=ae(new Map);return be(v,()=>{const $=new Map;for(const x of h.value.values())$.set(x,!0);S.value=$}),Xe(CR,{cancelValue:m,registerValue:b,toggleOption:$=>{const x=f.value.indexOf($.value),P=[...f.value];x===-1?P.push($.value):P.splice(x,1),e.value===void 0&&(f.value=P);const w=P.filter(O=>S.value.has(O)).sort((O,I)=>{const _=p.value.findIndex(A=>A.value===O),T=p.value.findIndex(A=>A.value===I);return _-T});r("update:value",w),r("change",w),a.onFieldChange()},mergedValue:f,name:E(()=>e.name),disabled:E(()=>e.disabled)}),i({mergedValue:f}),()=>{var $;const{id:x=a.id.value}=e;let P=null;return p.value&&p.value.length>0&&(P=p.value.map(w=>{var O;return g(gr,{prefixCls:l.value,key:w.value.toString(),disabled:"disabled"in w?w.disabled:e.disabled,indeterminate:w.indeterminate,value:w.value,checked:f.value.indexOf(w.value)!==-1,onChange:w.onChange,class:`${u.value}-item`},{default:()=>[n.label!==void 0?(O=n.label)===null||O===void 0?void 0:O.call(n,w):w.label]})})),c(g("div",k(k({},o),{},{class:[u.value,{[`${u.value}-rtl`]:s.value==="rtl"},o.class,d.value],id:x}),[P||(($=n.default)===null||$===void 0?void 0:$.call(n))]))}}});gr.Group=bh;gr.install=function(e){return e.component(gr.name,gr),e.component(bh.name,bh),e};const Lie={useBreakpoint:nu},Fie=Lt(fm),Bie=e=>{const{componentCls:t,commentBg:n,commentPaddingBase:o,commentNestIndent:r,commentFontSizeBase:i,commentFontSizeSm:a,commentAuthorNameColor:l,commentAuthorTimeColor:s,commentActionColor:u,commentActionHoverColor:c,commentActionsMarginBottom:d,commentActionsMarginTop:f,commentContentDetailPMarginBottom:p}=e;return{[t]:{position:"relative",backgroundColor:n,[`${t}-inner`]:{display:"flex",padding:o},[`${t}-avatar`]:{position:"relative",flexShrink:0,marginRight:e.marginSM,cursor:"pointer",img:{width:"32px",height:"32px",borderRadius:"50%"}},[`${t}-content`]:{position:"relative",flex:"1 1 auto",minWidth:"1px",fontSize:i,wordWrap:"break-word","&-author":{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginBottom:e.marginXXS,fontSize:i,"& > a,& > span":{paddingRight:e.paddingXS,fontSize:a,lineHeight:"18px"},"&-name":{color:l,fontSize:i,transition:`color ${e.motionDurationSlow}`,"> *":{color:l,"&:hover":{color:l}}},"&-time":{color:s,whiteSpace:"nowrap",cursor:"auto"}},"&-detail p":{marginBottom:p,whiteSpace:"pre-wrap"}},[`${t}-actions`]:{marginTop:f,marginBottom:d,paddingLeft:0,"> li":{display:"inline-block",color:u,"> span":{marginRight:"10px",color:u,fontSize:a,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,userSelect:"none","&:hover":{color:c}}}},[`${t}-nested`]:{marginLeft:r},"&-rtl":{direction:"rtl"}}}},Hie=Ue("Comment",e=>{const t=Be(e,{commentBg:"inherit",commentPaddingBase:`${e.paddingMD}px 0`,commentNestIndent:"44px",commentFontSizeBase:e.fontSize,commentFontSizeSm:e.fontSizeSM,commentAuthorNameColor:e.colorTextTertiary,commentAuthorTimeColor:e.colorTextPlaceholder,commentActionColor:e.colorTextTertiary,commentActionHoverColor:e.colorTextSecondary,commentActionsMarginBottom:"inherit",commentActionsMarginTop:e.marginSM,commentContentDetailPMarginBottom:"inherit"});return[Bie(t)]}),zie=()=>({actions:Array,author:K.any,avatar:K.any,content:K.any,prefixCls:String,datetime:K.any}),jie=le({compatConfig:{MODE:3},name:"AComment",inheritAttrs:!1,props:zie(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("comment",e),[a,l]=Hie(r),s=(c,d)=>g("div",{class:`${c}-nested`},[d]),u=c=>!c||!c.length?null:c.map((f,p)=>g("li",{key:`action-${p}`},[f]));return()=>{var c,d,f,p,v,h,m,b,S,C,$;const x=r.value,P=(c=e.actions)!==null&&c!==void 0?c:(d=n.actions)===null||d===void 0?void 0:d.call(n),w=(f=e.author)!==null&&f!==void 0?f:(p=n.author)===null||p===void 0?void 0:p.call(n),O=(v=e.avatar)!==null&&v!==void 0?v:(h=n.avatar)===null||h===void 0?void 0:h.call(n),I=(m=e.content)!==null&&m!==void 0?m:(b=n.content)===null||b===void 0?void 0:b.call(n),_=(S=e.datetime)!==null&&S!==void 0?S:(C=n.datetime)===null||C===void 0?void 0:C.call(n),T=g("div",{class:`${x}-avatar`},[typeof O=="string"?g("img",{src:O,alt:"comment-avatar"},null):O]),A=P?g("ul",{class:`${x}-actions`},[u(Array.isArray(P)?P:[P])]):null,R=g("div",{class:`${x}-content-author`},[w&&g("span",{class:`${x}-content-author-name`},[w]),_&&g("span",{class:`${x}-content-author-time`},[_])]),H=g("div",{class:`${x}-content`},[R,g("div",{class:`${x}-content-detail`},[I]),A]),M=g("div",{class:`${x}-inner`},[T,H]),D=Ot(($=n.default)===null||$===void 0?void 0:$.call(n));return a(g("div",k(k({},o),{},{class:[x,{[`${x}-rtl`]:i.value==="rtl"},o.class,l.value]}),[M,D&&D.length?s(x,D):null]))}}}),Wie=Lt(jie);let Zp=y({},$o.Modal);function Vie(e){e?Zp=y(y({},Zp),e):Zp=y({},$o.Modal)}function Kie(){return Zp}const f1="internalMark",Qp=le({compatConfig:{MODE:3},name:"ALocaleProvider",props:{locale:{type:Object},ANT_MARK__:String},setup(e,t){let{slots:n}=t;Yo(e.ANT_MARK__===f1);const o=rt({antLocale:y(y({},e.locale),{exist:!0}),ANT_MARK__:f1});return Xe("localeData",o),be(()=>e.locale,r=>{Vie(r&&r.Modal),o.antLocale=y(y({},r),{exist:!0})},{immediate:!0}),()=>{var r;return(r=n.default)===null||r===void 0?void 0:r.call(n)}}});Qp.install=function(e){return e.component(Qp.name,Qp),e};const xR=Lt(Qp),$R=le({name:"Notice",inheritAttrs:!1,props:["prefixCls","duration","updateMark","noticeKey","closeIcon","closable","props","onClick","onClose","holder","visible"],setup(e,t){let{attrs:n,slots:o}=t,r,i=!1;const a=E(()=>e.duration===void 0?4.5:e.duration),l=()=>{a.value&&!i&&(r=setTimeout(()=>{u()},a.value*1e3))},s=()=>{r&&(clearTimeout(r),r=null)},u=d=>{d&&d.stopPropagation(),s();const{onClose:f,noticeKey:p}=e;f&&f(p)},c=()=>{s(),l()};return Ke(()=>{l()}),Zn(()=>{i=!0,s()}),be([a,()=>e.updateMark,()=>e.visible],(d,f)=>{let[p,v,h]=d,[m,b,S]=f;(p!==m||v!==b||h!==S&&S)&&c()},{flush:"post"}),()=>{var d,f;const{prefixCls:p,closable:v,closeIcon:h=(d=o.closeIcon)===null||d===void 0?void 0:d.call(o),onClick:m,holder:b}=e,{class:S,style:C}=n,$=`${p}-notice`,x=Object.keys(n).reduce((w,O)=>((O.startsWith("data-")||O.startsWith("aria-")||O==="role")&&(w[O]=n[O]),w),{}),P=g("div",k({class:ge($,S,{[`${$}-closable`]:v}),style:C,onMouseenter:s,onMouseleave:l,onClick:m},x),[g("div",{class:`${$}-content`},[(f=o.default)===null||f===void 0?void 0:f.call(o)]),v?g("a",{tabindex:0,onClick:u,class:`${$}-close`},[h||g("span",{class:`${$}-close-x`},null)]):null]);return b?g(rv,{to:b},{default:()=>P}):P}}});var Uie=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{prefixCls:c,animation:d="fade"}=e;let f=e.transitionName;return!f&&d&&(f=`${c}-${d}`),Av(f)}),s=(c,d)=>{const f=c.key||zI(),p=y(y({},c),{key:f}),{maxCount:v}=e,h=a.value.map(b=>b.notice.key).indexOf(f),m=a.value.concat();h!==-1?m.splice(h,1,{notice:p,holderCallback:d}):(v&&a.value.length>=v&&(p.key=m[0].notice.key,p.updateMark=zI(),p.userPassKey=f,m.shift()),m.push({notice:p,holderCallback:d})),a.value=m},u=c=>{a.value=nt(a.value).filter(d=>{let{notice:{key:f,userPassKey:p}}=d;return(p||f)!==c})};return o({add:s,remove:u,notices:a}),()=>{var c;const{prefixCls:d,closeIcon:f=(c=r.closeIcon)===null||c===void 0?void 0:c.call(r,{prefixCls:d})}=e,p=a.value.map((h,m)=>{let{notice:b,holderCallback:S}=h;const C=m===a.value.length-1?b.updateMark:void 0,{key:$,userPassKey:x}=b,{content:P}=b,w=y(y(y({prefixCls:d,closeIcon:typeof f=="function"?f({prefixCls:d}):f},b),b.props),{key:$,noticeKey:x||$,updateMark:C,onClose:O=>{var I;u(O),(I=b.onClose)===null||I===void 0||I.call(b)},onClick:b.onClick});return S?g("div",{key:$,class:`${d}-hook-holder`,ref:O=>{typeof $>"u"||(O?(i.set($,O),S(O,w)):i.delete($))}},null):g($R,k(k({},w),{},{class:ge(w.class,e.hashId)}),{default:()=>[typeof P=="function"?P({prefixCls:d}):P]})}),v={[d]:1,[n.class]:!!n.class,[e.hashId]:!0};return g("div",{class:v,style:n.style||{top:"65px",left:"50%"}},[g(dv,k({tag:"div"},l.value),{default:()=>[p]})])}}});yh.newInstance=function(t,n){const o=t||{},{name:r="notification",getContainer:i,appContext:a,prefixCls:l,rootPrefixCls:s,transitionName:u,hasTransitionName:c,useStyle:d}=o,f=Uie(o,["name","getContainer","appContext","prefixCls","rootPrefixCls","transitionName","hasTransitionName","useStyle"]),p=document.createElement("div");i?i().appendChild(p):document.body.appendChild(p);const h=g(le({compatConfig:{MODE:3},name:"NotificationWrapper",setup(m,b){let{attrs:S}=b;const C=se(),$=E(()=>Un.getPrefixCls(r,l)),[,x]=d($);return Ke(()=>{n({notice(P){var w;(w=C.value)===null||w===void 0||w.add(P)},removeNotice(P){var w;(w=C.value)===null||w===void 0||w.remove(P)},destroy(){Fa(null,p),p.parentNode&&p.parentNode.removeChild(p)},component:C})}),()=>{const P=Un,w=P.getRootPrefixCls(s,$.value),O=c?u:`${$.value}-${u}`;return g(Nl,k(k({},P),{},{prefixCls:w}),{default:()=>[g(yh,k(k({ref:C},S),{},{prefixCls:$.value,transitionName:O,hashId:x.value}),null)]})}}}),f);h.appContext=a||h.appContext,Fa(h,p)};let jI=0;const Xie=Date.now();function WI(){const e=jI;return jI+=1,`rcNotification_${Xie}_${e}`}const Yie=le({name:"HookNotification",inheritAttrs:!1,props:["prefixCls","transitionName","animation","maxCount","closeIcon","hashId","remove","notices","getStyles","getClassName","onAllRemoved","getContainer"],setup(e,t){let{attrs:n,slots:o}=t;const r=new Map,i=E(()=>e.notices),a=E(()=>{let c=e.transitionName;if(!c&&e.animation)switch(typeof e.animation){case"string":c=e.animation;break;case"function":c=e.animation().name;break;case"object":c=e.animation.name;break;default:c=`${e.prefixCls}-fade`;break}return Av(c)}),l=c=>e.remove(c),s=ae({});be(i,()=>{const c={};Object.keys(s.value).forEach(d=>{c[d]=[]}),e.notices.forEach(d=>{const{placement:f="topRight"}=d.notice;f&&(c[f]=c[f]||[],c[f].push(d))}),s.value=c});const u=E(()=>Object.keys(s.value));return()=>{var c;const{prefixCls:d,closeIcon:f=(c=o.closeIcon)===null||c===void 0?void 0:c.call(o,{prefixCls:d})}=e,p=u.value.map(v=>{var h,m;const b=s.value[v],S=(h=e.getClassName)===null||h===void 0?void 0:h.call(e,v),C=(m=e.getStyles)===null||m===void 0?void 0:m.call(e,v),$=b.map((w,O)=>{let{notice:I,holderCallback:_}=w;const T=O===i.value.length-1?I.updateMark:void 0,{key:A,userPassKey:R}=I,{content:H}=I,M=y(y(y({prefixCls:d,closeIcon:typeof f=="function"?f({prefixCls:d}):f},I),I.props),{key:A,noticeKey:R||A,updateMark:T,onClose:D=>{var N;l(D),(N=I.onClose)===null||N===void 0||N.call(I)},onClick:I.onClick});return _?g("div",{key:A,class:`${d}-hook-holder`,ref:D=>{typeof A>"u"||(D?(r.set(A,D),_(D,M)):r.delete(A))}},null):g($R,k(k({},M),{},{class:ge(M.class,e.hashId)}),{default:()=>[typeof H=="function"?H({prefixCls:d}):H]})}),x={[d]:1,[`${d}-${v}`]:1,[n.class]:!!n.class,[e.hashId]:!0,[S]:!!S};function P(){var w;b.length>0||(Reflect.deleteProperty(s.value,v),(w=e.onAllRemoved)===null||w===void 0||w.call(e))}return g("div",{key:v,class:x,style:n.style||C||{top:"65px",left:"50%"}},[g(dv,k(k({tag:"div"},a.value),{},{onAfterLeave:P}),{default:()=>[$]})])});return g(mA,{getContainer:e.getContainer},{default:()=>[p]})}}});var qie=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rdocument.body;let VI=0;function Zie(){const e={};for(var t=arguments.length,n=new Array(t),o=0;o{r&&Object.keys(r).forEach(i=>{const a=r[i];a!==void 0&&(e[i]=a)})}),e}function wR(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{getContainer:t=Jie,motion:n,prefixCls:o,maxCount:r,getClassName:i,getStyles:a,onAllRemoved:l}=e,s=qie(e,["getContainer","motion","prefixCls","maxCount","getClassName","getStyles","onAllRemoved"]),u=se([]),c=se(),d=(b,S)=>{const C=b.key||WI(),$=y(y({},b),{key:C}),x=u.value.map(w=>w.notice.key).indexOf(C),P=u.value.concat();x!==-1?P.splice(x,1,{notice:$,holderCallback:S}):(r&&u.value.length>=r&&($.key=P[0].notice.key,$.updateMark=WI(),$.userPassKey=C,P.shift()),P.push({notice:$,holderCallback:S})),u.value=P},f=b=>{u.value=u.value.filter(S=>{let{notice:{key:C,userPassKey:$}}=S;return($||C)!==b})},p=()=>{u.value=[]},v=()=>g(Yie,{ref:c,prefixCls:o,maxCount:r,notices:u.value,remove:f,getClassName:i,getStyles:a,animation:n,hashId:e.hashId,onAllRemoved:l,getContainer:t},null),h=se([]),m={open:b=>{const S=Zie(s,b);(S.key===null||S.key===void 0)&&(S.key=`vc-notification-${VI}`,VI+=1),h.value=[...h.value,{type:"open",config:S}]},close:b=>{h.value=[...h.value,{type:"close",key:b}]},destroy:()=>{h.value=[...h.value,{type:"destroy"}]}};return be(h,()=>{h.value.length&&(h.value.forEach(b=>{switch(b.type){case"open":d(b.config);break;case"close":f(b.key);break;case"destroy":p();break}}),h.value=[])}),[m,v]}const Qie=e=>{const{componentCls:t,iconCls:n,boxShadowSecondary:o,colorBgElevated:r,colorSuccess:i,colorError:a,colorWarning:l,colorInfo:s,fontSizeLG:u,motionEaseInOutCirc:c,motionDurationSlow:d,marginXS:f,paddingXS:p,borderRadiusLG:v,zIndexPopup:h,messageNoticeContentPadding:m}=e,b=new at("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:p,transform:"translateY(0)",opacity:1}}),S=new at("MessageMoveOut",{"0%":{maxHeight:e.height,padding:p,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}});return[{[t]:y(y({},qe(e)),{position:"fixed",top:f,left:"50%",transform:"translateX(-50%)",width:"100%",pointerEvents:"none",zIndex:h,[`${t}-move-up`]:{animationFillMode:"forwards"},[` ${t}-move-up-appear, ${t}-move-up-enter `]:{animationName:b,animationDuration:d,animationPlayState:"paused",animationTimingFunction:c},[` @@ -341,15 +341,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${t}-move-up-enter${t}-move-up-enter-active `]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:S,animationDuration:d,animationPlayState:"paused",animationTimingFunction:c},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[`${t}-notice`]:{padding:p,textAlign:"center",[n]:{verticalAlign:"text-bottom",marginInlineEnd:f,fontSize:u},[`${t}-notice-content`]:{display:"inline-block",padding:m,background:r,borderRadius:v,boxShadow:o,pointerEvents:"all"},[`${t}-success ${n}`]:{color:i},[`${t}-error ${n}`]:{color:a},[`${t}-warning ${n}`]:{color:l},[` ${t}-info ${n}, - ${t}-loading ${n}`]:{color:s}}},{[`${t}-notice-pure-panel`]:{padding:0,textAlign:"start"}}]},PR=Ue("Message",e=>{const t=Be(e,{messageNoticeContentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`});return[Qie(t)]},e=>({height:150,zIndexPopup:e.zIndexPopupBase+10})),eae={info:g(Ya,null,null),success:g(qr,null,null),error:g(po,null,null),warning:g(Jr,null,null),loading:g(Po,null,null)},tae=le({name:"PureContent",inheritAttrs:!1,props:["prefixCls","type","icon"],setup(e,t){let{slots:n}=t;return()=>{var o;return g("div",{class:ge(`${e.prefixCls}-custom-content`,`${e.prefixCls}-${e.type}`)},[e.icon||eae[e.type],g("span",null,[(o=n.default)===null||o===void 0?void 0:o.call(n)])])}}});var nae=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);ri("message",e.prefixCls)),[,s]=PR(l),u=()=>{var h;const m=(h=e.top)!==null&&h!==void 0?h:oae;return{left:"50%",transform:"translateX(-50%)",top:typeof m=="number"?`${m}px`:m}},c=()=>ge(s.value,e.rtl?`${l.value}-rtl`:""),d=()=>{var h;return qS({prefixCls:l.value,animation:(h=e.animation)!==null&&h!==void 0?h:"move-up",transitionName:e.transitionName})},f=g("span",{class:`${l.value}-close-x`},[g(fo,{class:`${l.value}-close-icon`},null)]),[p,v]=wR({getStyles:u,prefixCls:l.value,getClassName:c,motion:d,closable:!1,closeIcon:f,duration:(o=e.duration)!==null&&o!==void 0?o:rae,getContainer:(r=e.staticGetContainer)!==null&&r!==void 0?r:a.value,maxCount:e.maxCount,onAllRemoved:e.onAllRemoved});return n(y(y({},p),{prefixCls:l,hashId:s})),v}});let KI=0;function aae(e){const t=se(null),n=Symbol("messageHolderKey"),o=s=>{var u;(u=t.value)===null||u===void 0||u.close(s)},r=s=>{if(!t.value){const x=()=>{};return x.then=()=>{},x}const{open:u,prefixCls:c,hashId:d}=t.value,f=`${c}-notice`,{content:p,icon:v,type:h,key:m,class:b,onClose:S}=s,C=nae(s,["content","icon","type","key","class","onClose"]);let $=m;return $==null&&(KI+=1,$=`antd-message-${KI}`),oB(x=>(u(y(y({},C),{key:$,content:()=>g(tae,{prefixCls:c,type:h,icon:typeof v=="function"?v():v},{default:()=>[typeof p=="function"?p():p]}),placement:"top",class:ge(h&&`${f}-${h}`,d,b),onClose:()=>{S==null||S(),x()}})),()=>{o($)}))},a={open:r,destroy:s=>{var u;s!==void 0?o(s):(u=t.value)===null||u===void 0||u.destroy()}};return["info","success","warning","error","loading"].forEach(s=>{const u=(c,d,f)=>{let p;c&&typeof c=="object"&&"content"in c?p=c:p={content:c};let v,h;typeof d=="function"?h=d:(v=d,h=f);const m=y(y({onClose:h,duration:v},p),{type:s});return r(m)};a[s]=u}),[a,()=>g(iae,k(k({key:n},e),{},{ref:t}),null)]}function OR(e){return aae(e)}let IR=3,TR,So,lae=1,ER="",_R="move-up",MR=!1,AR=()=>document.body,RR,DR=!1;function sae(){return lae++}function cae(e){e.top!==void 0&&(TR=e.top,So=null),e.duration!==void 0&&(IR=e.duration),e.prefixCls!==void 0&&(ER=e.prefixCls),e.getContainer!==void 0&&(AR=e.getContainer,So=null),e.transitionName!==void 0&&(_R=e.transitionName,So=null,MR=!0),e.maxCount!==void 0&&(RR=e.maxCount,So=null),e.rtl!==void 0&&(DR=e.rtl)}function uae(e,t){if(So){t(So);return}Sh.newInstance({appContext:e.appContext,prefixCls:e.prefixCls||ER,rootPrefixCls:e.rootPrefixCls,transitionName:_R,hasTransitionName:MR,style:{top:TR},getContainer:AR||e.getPopupContainer,maxCount:RR,name:"message",useStyle:PR},n=>{if(So){t(So);return}So=n,t(n)})}const NR={info:Ya,success:qr,error:po,warning:Jr,loading:Po},dae=Object.keys(NR);function fae(e){const t=e.duration!==void 0?e.duration:IR,n=e.key||sae(),o=new Promise(i=>{const a=()=>(typeof e.onClose=="function"&&e.onClose(),i(!0));uae(e,l=>{l.notice({key:n,duration:t,style:e.style||{},class:e.class,content:s=>{let{prefixCls:u}=s;const c=NR[e.type],d=c?g(c,null,null):"",f=ge(`${u}-custom-content`,{[`${u}-${e.type}`]:e.type,[`${u}-rtl`]:DR===!0});return g("div",{class:f},[typeof e.icon=="function"?e.icon():e.icon||d,g("span",null,[typeof e.content=="function"?e.content():e.content])])},onClose:a,onClick:e.onClick})})}),r=()=>{So&&So.removeNotice(n)};return r.then=(i,a)=>o.then(i,a),r.promise=o,r}function pae(e){return Object.prototype.toString.call(e)==="[object Object]"&&!!e.content}const Gl={open:fae,config:cae,destroy(e){if(So)if(e){const{removeNotice:t}=So;t(e)}else{const{destroy:t}=So;t(),So=null}}};function gae(e,t){e[t]=(n,o,r)=>pae(n)?e.open(y(y({},n),{type:t})):(typeof o=="function"&&(r=o,o=void 0),e.open({content:n,duration:o,type:t,onClose:r}))}dae.forEach(e=>gae(Gl,e));Gl.warn=Gl.warning;Gl.useMessage=OR;const hae=e=>{const{componentCls:t,width:n,notificationMarginEdge:o}=e,r=new at("antNotificationTopFadeIn",{"0%":{marginTop:"-100%",opacity:0},"100%":{marginTop:0,opacity:1}}),i=new at("antNotificationBottomFadeIn",{"0%":{marginBottom:"-100%",opacity:0},"100%":{marginBottom:0,opacity:1}}),a=new at("antNotificationLeftFadeIn",{"0%":{right:{_skip_check_:!0,value:n},opacity:0},"100%":{right:{_skip_check_:!0,value:0},opacity:1}});return{[`&${t}-top, &${t}-bottom`]:{marginInline:0},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:r}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:i}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginInlineEnd:0,marginInlineStart:o,[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}}}},vae=e=>{const{iconCls:t,componentCls:n,boxShadowSecondary:o,fontSizeLG:r,notificationMarginBottom:i,borderRadiusLG:a,colorSuccess:l,colorInfo:s,colorWarning:u,colorError:c,colorTextHeading:d,notificationBg:f,notificationPadding:p,notificationMarginEdge:v,motionDurationMid:h,motionEaseInOut:m,fontSize:b,lineHeight:S,width:C,notificationIconSize:$}=e,x=`${n}-notice`,P=new at("antNotificationFadeIn",{"0%":{left:{_skip_check_:!0,value:C},opacity:0},"100%":{left:{_skip_check_:!0,value:0},opacity:1}}),w=new at("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:i,opacity:1},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[n]:y(y(y(y({},qe(e)),{position:"fixed",zIndex:e.zIndexPopup,marginInlineEnd:v,[`${n}-hook-holder`]:{position:"relative"},[`&${n}-top, &${n}-bottom`]:{[`${n}-notice`]:{marginInline:"auto auto"}},[`&${n}-topLeft, &${n}-bottomLeft`]:{[`${n}-notice`]:{marginInlineEnd:"auto",marginInlineStart:0}},[`${n}-fade-enter, ${n}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:m,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${n}-fade-leave`]:{animationTimingFunction:m,animationFillMode:"both",animationDuration:h,animationPlayState:"paused"},[`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]:{animationName:P,animationPlayState:"running"},[`${n}-fade-leave${n}-fade-leave-active`]:{animationName:w,animationPlayState:"running"}}),hae(e)),{"&-rtl":{direction:"rtl",[`${n}-notice-btn`]:{float:"left"}}})},{[x]:{position:"relative",width:C,maxWidth:`calc(100vw - ${v*2}px)`,marginBottom:i,marginInlineStart:"auto",padding:p,overflow:"hidden",lineHeight:S,wordWrap:"break-word",background:f,borderRadius:a,boxShadow:o,[`${n}-close-icon`]:{fontSize:b,cursor:"pointer"},[`${x}-message`]:{marginBottom:e.marginXS,color:d,fontSize:r,lineHeight:e.lineHeightLG},[`${x}-description`]:{fontSize:b},[`&${x}-closable ${x}-message`]:{paddingInlineEnd:e.paddingLG},[`${x}-with-icon ${x}-message`]:{marginBottom:e.marginXS,marginInlineStart:e.marginSM+$,fontSize:r},[`${x}-with-icon ${x}-description`]:{marginInlineStart:e.marginSM+$,fontSize:b},[`${x}-icon`]:{position:"absolute",fontSize:$,lineHeight:0,[`&-success${t}`]:{color:l},[`&-info${t}`]:{color:s},[`&-warning${t}`]:{color:u},[`&-error${t}`]:{color:c}},[`${x}-close`]:{position:"absolute",top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:"none",width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?"transparent":e.colorFillContent}},[`${x}-btn`]:{float:"right",marginTop:e.marginSM}}},{[`${x}-pure-panel`]:{margin:0}}]},kR=Ue("Notification",e=>{const t=e.paddingMD,n=e.paddingLG,o=Be(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`,notificationMarginBottom:e.margin,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationIconSize:e.fontSizeLG*e.lineHeightLG,notificationCloseButtonSize:e.controlHeightLG*.55});return[vae(o)]},e=>({zIndexPopup:e.zIndexPopupBase+50,width:384}));function mae(e,t){return t||g("span",{class:`${e}-close-x`},[g(fo,{class:`${e}-close-icon`},null)])}g(Ya,null,null),g(qr,null,null),g(po,null,null),g(Jr,null,null),g(Po,null,null);const bae={success:qr,info:Ya,error:po,warning:Jr};function yae(e){let{prefixCls:t,icon:n,type:o,message:r,description:i,btn:a}=e,l=null;if(n)l=g("span",{class:`${t}-icon`},[js(n)]);else if(o){const s=bae[o];l=g(s,{class:`${t}-icon ${t}-icon-${o}`},null)}return g("div",{class:ge({[`${t}-with-icon`]:l}),role:"alert"},[l,g("div",{class:`${t}-message`},[r]),g("div",{class:`${t}-description`},[i]),a&&g("div",{class:`${t}-btn`},[a])])}function LR(e,t,n){let o;switch(t=typeof t=="number"?`${t}px`:t,n=typeof n=="number"?`${n}px`:n,e){case"top":o={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":o={left:0,top:t,bottom:"auto"};break;case"topRight":o={right:0,top:t,bottom:"auto"};break;case"bottom":o={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":o={left:0,top:"auto",bottom:n};break;default:o={right:0,top:"auto",bottom:n};break}return o}function Sae(e){return{name:`${e}-fade`}}var Cae=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.prefixCls||o("notification")),a=f=>{var p,v;return LR(f,(p=e.top)!==null&&p!==void 0?p:UI,(v=e.bottom)!==null&&v!==void 0?v:UI)},[,l]=kR(i),s=()=>ge(l.value,{[`${i.value}-rtl`]:e.rtl}),u=()=>Sae(i.value),[c,d]=wR({prefixCls:i.value,getStyles:a,getClassName:s,motion:u,closable:!0,closeIcon:mae(i.value),duration:xae,getContainer:()=>{var f,p;return((f=e.getPopupContainer)===null||f===void 0?void 0:f.call(e))||((p=r.value)===null||p===void 0?void 0:p.call(r))||document.body},maxCount:e.maxCount,hashId:l.value,onAllRemoved:e.onAllRemoved});return n(y(y({},c),{prefixCls:i.value,hashId:l})),d}});function wae(e){const t=se(null),n=Symbol("notificationHolderKey"),o=l=>{if(!t.value)return;const{open:s,prefixCls:u,hashId:c}=t.value,d=`${u}-notice`,{message:f,description:p,icon:v,type:h,btn:m,class:b}=l,S=Cae(l,["message","description","icon","type","btn","class"]);return s(y(y({placement:"topRight"},S),{content:()=>g(yae,{prefixCls:d,icon:typeof v=="function"?v():v,type:h,message:typeof f=="function"?f():f,description:typeof p=="function"?p():p,btn:typeof m=="function"?m():m},null),class:ge(h&&`${d}-${h}`,c,b)}))},i={open:o,destroy:l=>{var s,u;l!==void 0?(s=t.value)===null||s===void 0||s.close(l):(u=t.value)===null||u===void 0||u.destroy()}};return["success","info","warning","error"].forEach(l=>{i[l]=s=>o(y(y({},s),{type:l}))}),[i,()=>g($ae,k(k({key:n},e),{},{ref:t}),null)]}function FR(e){return wae(e)}const xl={};let BR=4.5,HR="24px",zR="24px",p1="",jR="topRight",WR=()=>document.body,VR=null,g1=!1,KR;function Pae(e){const{duration:t,placement:n,bottom:o,top:r,getContainer:i,closeIcon:a,prefixCls:l}=e;l!==void 0&&(p1=l),t!==void 0&&(BR=t),n!==void 0&&(jR=n),o!==void 0&&(zR=typeof o=="number"?`${o}px`:o),r!==void 0&&(HR=typeof r=="number"?`${r}px`:r),i!==void 0&&(WR=i),a!==void 0&&(VR=a),e.rtl!==void 0&&(g1=e.rtl),e.maxCount!==void 0&&(KR=e.maxCount)}function Oae(e,t){let{prefixCls:n,placement:o=jR,getContainer:r=WR,top:i,bottom:a,closeIcon:l=VR,appContext:s}=e;const{getPrefixCls:u}=Fae(),c=u("notification",n||p1),d=`${c}-${o}-${g1}`,f=xl[d];if(f){Promise.resolve(f).then(v=>{t(v)});return}const p=ge(`${c}-${o}`,{[`${c}-rtl`]:g1===!0});Sh.newInstance({name:"notification",prefixCls:n||p1,useStyle:kR,class:p,style:LR(o,i??HR,a??zR),appContext:s,getContainer:r,closeIcon:v=>{let{prefixCls:h}=v;return g("span",{class:`${h}-close-x`},[js(l,{},g(fo,{class:`${h}-close-icon`},null))])},maxCount:KR,hasTransitionName:!0},v=>{xl[d]=v,t(v)})}const Iae={success:Gv,info:Yv,error:qv,warning:Xv};function Tae(e){const{icon:t,type:n,description:o,message:r,btn:i}=e,a=e.duration===void 0?BR:e.duration;Oae(e,l=>{l.notice({content:s=>{let{prefixCls:u}=s;const c=`${u}-notice`;let d=null;if(t)d=()=>g("span",{class:`${c}-icon`},[js(t)]);else if(n){const f=Iae[n];d=()=>g(f,{class:`${c}-icon ${c}-icon-${n}`},null)}return g("div",{class:d?`${c}-with-icon`:""},[d&&d(),g("div",{class:`${c}-message`},[!o&&d?g("span",{class:`${c}-message-single-line-auto-margin`},null):null,js(r)]),g("div",{class:`${c}-description`},[js(o)]),i?g("span",{class:`${c}-btn`},[js(i)]):null])},duration:a,closable:!0,onClose:e.onClose,onClick:e.onClick,key:e.key,style:e.style||{},class:e.class})})}const Ha={open:Tae,close(e){Object.keys(xl).forEach(t=>Promise.resolve(xl[t]).then(n=>{n.removeNotice(e)}))},config:Pae,destroy(){Object.keys(xl).forEach(e=>{Promise.resolve(xl[e]).then(t=>{t.destroy()}),delete xl[e]})}},Eae=["success","info","warning","error"];Eae.forEach(e=>{Ha[e]=t=>Ha.open(y(y({},t),{type:e}))});Ha.warn=Ha.warning;Ha.useNotification=FR;const _ae=`-ant-${Date.now()}-${Math.random()}`;function Mae(e,t){const n={},o=(a,l)=>{let s=a.clone();return s=(l==null?void 0:l(s))||s,s.toRgbString()},r=(a,l)=>{const s=new St(a),u=jl(s.toRgbString());n[`${l}-color`]=o(s),n[`${l}-color-disabled`]=u[1],n[`${l}-color-hover`]=u[4],n[`${l}-color-active`]=u[6],n[`${l}-color-outline`]=s.clone().setAlpha(.2).toRgbString(),n[`${l}-color-deprecated-bg`]=u[0],n[`${l}-color-deprecated-border`]=u[2]};if(t.primaryColor){r(t.primaryColor,"primary");const a=new St(t.primaryColor),l=jl(a.toRgbString());l.forEach((u,c)=>{n[`primary-${c+1}`]=u}),n["primary-color-deprecated-l-35"]=o(a,u=>u.lighten(35)),n["primary-color-deprecated-l-20"]=o(a,u=>u.lighten(20)),n["primary-color-deprecated-t-20"]=o(a,u=>u.tint(20)),n["primary-color-deprecated-t-50"]=o(a,u=>u.tint(50)),n["primary-color-deprecated-f-12"]=o(a,u=>u.setAlpha(u.getAlpha()*.12));const s=new St(l[0]);n["primary-color-active-deprecated-f-30"]=o(s,u=>u.setAlpha(u.getAlpha()*.3)),n["primary-color-active-deprecated-d-02"]=o(s,u=>u.darken(2))}return t.successColor&&r(t.successColor,"success"),t.warningColor&&r(t.warningColor,"warning"),t.errorColor&&r(t.errorColor,"error"),t.infoColor&&r(t.infoColor,"info"),` + ${t}-loading ${n}`]:{color:s}}},{[`${t}-notice-pure-panel`]:{padding:0,textAlign:"start"}}]},PR=Ue("Message",e=>{const t=Be(e,{messageNoticeContentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`});return[Qie(t)]},e=>({height:150,zIndexPopup:e.zIndexPopupBase+10})),eae={info:g(Ya,null,null),success:g(qr,null,null),error:g(po,null,null),warning:g(Jr,null,null),loading:g(Po,null,null)},tae=le({name:"PureContent",inheritAttrs:!1,props:["prefixCls","type","icon"],setup(e,t){let{slots:n}=t;return()=>{var o;return g("div",{class:ge(`${e.prefixCls}-custom-content`,`${e.prefixCls}-${e.type}`)},[e.icon||eae[e.type],g("span",null,[(o=n.default)===null||o===void 0?void 0:o.call(n)])])}}});var nae=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);ri("message",e.prefixCls)),[,s]=PR(l),u=()=>{var h;const m=(h=e.top)!==null&&h!==void 0?h:oae;return{left:"50%",transform:"translateX(-50%)",top:typeof m=="number"?`${m}px`:m}},c=()=>ge(s.value,e.rtl?`${l.value}-rtl`:""),d=()=>{var h;return qS({prefixCls:l.value,animation:(h=e.animation)!==null&&h!==void 0?h:"move-up",transitionName:e.transitionName})},f=g("span",{class:`${l.value}-close-x`},[g(fo,{class:`${l.value}-close-icon`},null)]),[p,v]=wR({getStyles:u,prefixCls:l.value,getClassName:c,motion:d,closable:!1,closeIcon:f,duration:(o=e.duration)!==null&&o!==void 0?o:rae,getContainer:(r=e.staticGetContainer)!==null&&r!==void 0?r:a.value,maxCount:e.maxCount,onAllRemoved:e.onAllRemoved});return n(y(y({},p),{prefixCls:l,hashId:s})),v}});let KI=0;function aae(e){const t=se(null),n=Symbol("messageHolderKey"),o=s=>{var u;(u=t.value)===null||u===void 0||u.close(s)},r=s=>{if(!t.value){const x=()=>{};return x.then=()=>{},x}const{open:u,prefixCls:c,hashId:d}=t.value,f=`${c}-notice`,{content:p,icon:v,type:h,key:m,class:b,onClose:S}=s,C=nae(s,["content","icon","type","key","class","onClose"]);let $=m;return $==null&&(KI+=1,$=`antd-message-${KI}`),oB(x=>(u(y(y({},C),{key:$,content:()=>g(tae,{prefixCls:c,type:h,icon:typeof v=="function"?v():v},{default:()=>[typeof p=="function"?p():p]}),placement:"top",class:ge(h&&`${f}-${h}`,d,b),onClose:()=>{S==null||S(),x()}})),()=>{o($)}))},a={open:r,destroy:s=>{var u;s!==void 0?o(s):(u=t.value)===null||u===void 0||u.destroy()}};return["info","success","warning","error","loading"].forEach(s=>{const u=(c,d,f)=>{let p;c&&typeof c=="object"&&"content"in c?p=c:p={content:c};let v,h;typeof d=="function"?h=d:(v=d,h=f);const m=y(y({onClose:h,duration:v},p),{type:s});return r(m)};a[s]=u}),[a,()=>g(iae,k(k({key:n},e),{},{ref:t}),null)]}function OR(e){return aae(e)}let IR=3,TR,So,lae=1,ER="",_R="move-up",MR=!1,AR=()=>document.body,RR,DR=!1;function sae(){return lae++}function cae(e){e.top!==void 0&&(TR=e.top,So=null),e.duration!==void 0&&(IR=e.duration),e.prefixCls!==void 0&&(ER=e.prefixCls),e.getContainer!==void 0&&(AR=e.getContainer,So=null),e.transitionName!==void 0&&(_R=e.transitionName,So=null,MR=!0),e.maxCount!==void 0&&(RR=e.maxCount,So=null),e.rtl!==void 0&&(DR=e.rtl)}function uae(e,t){if(So){t(So);return}yh.newInstance({appContext:e.appContext,prefixCls:e.prefixCls||ER,rootPrefixCls:e.rootPrefixCls,transitionName:_R,hasTransitionName:MR,style:{top:TR},getContainer:AR||e.getPopupContainer,maxCount:RR,name:"message",useStyle:PR},n=>{if(So){t(So);return}So=n,t(n)})}const NR={info:Ya,success:qr,error:po,warning:Jr,loading:Po},dae=Object.keys(NR);function fae(e){const t=e.duration!==void 0?e.duration:IR,n=e.key||sae(),o=new Promise(i=>{const a=()=>(typeof e.onClose=="function"&&e.onClose(),i(!0));uae(e,l=>{l.notice({key:n,duration:t,style:e.style||{},class:e.class,content:s=>{let{prefixCls:u}=s;const c=NR[e.type],d=c?g(c,null,null):"",f=ge(`${u}-custom-content`,{[`${u}-${e.type}`]:e.type,[`${u}-rtl`]:DR===!0});return g("div",{class:f},[typeof e.icon=="function"?e.icon():e.icon||d,g("span",null,[typeof e.content=="function"?e.content():e.content])])},onClose:a,onClick:e.onClick})})}),r=()=>{So&&So.removeNotice(n)};return r.then=(i,a)=>o.then(i,a),r.promise=o,r}function pae(e){return Object.prototype.toString.call(e)==="[object Object]"&&!!e.content}const Gl={open:fae,config:cae,destroy(e){if(So)if(e){const{removeNotice:t}=So;t(e)}else{const{destroy:t}=So;t(),So=null}}};function gae(e,t){e[t]=(n,o,r)=>pae(n)?e.open(y(y({},n),{type:t})):(typeof o=="function"&&(r=o,o=void 0),e.open({content:n,duration:o,type:t,onClose:r}))}dae.forEach(e=>gae(Gl,e));Gl.warn=Gl.warning;Gl.useMessage=OR;const hae=e=>{const{componentCls:t,width:n,notificationMarginEdge:o}=e,r=new at("antNotificationTopFadeIn",{"0%":{marginTop:"-100%",opacity:0},"100%":{marginTop:0,opacity:1}}),i=new at("antNotificationBottomFadeIn",{"0%":{marginBottom:"-100%",opacity:0},"100%":{marginBottom:0,opacity:1}}),a=new at("antNotificationLeftFadeIn",{"0%":{right:{_skip_check_:!0,value:n},opacity:0},"100%":{right:{_skip_check_:!0,value:0},opacity:1}});return{[`&${t}-top, &${t}-bottom`]:{marginInline:0},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:r}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:i}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginInlineEnd:0,marginInlineStart:o,[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}}}},vae=e=>{const{iconCls:t,componentCls:n,boxShadowSecondary:o,fontSizeLG:r,notificationMarginBottom:i,borderRadiusLG:a,colorSuccess:l,colorInfo:s,colorWarning:u,colorError:c,colorTextHeading:d,notificationBg:f,notificationPadding:p,notificationMarginEdge:v,motionDurationMid:h,motionEaseInOut:m,fontSize:b,lineHeight:S,width:C,notificationIconSize:$}=e,x=`${n}-notice`,P=new at("antNotificationFadeIn",{"0%":{left:{_skip_check_:!0,value:C},opacity:0},"100%":{left:{_skip_check_:!0,value:0},opacity:1}}),w=new at("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:i,opacity:1},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[n]:y(y(y(y({},qe(e)),{position:"fixed",zIndex:e.zIndexPopup,marginInlineEnd:v,[`${n}-hook-holder`]:{position:"relative"},[`&${n}-top, &${n}-bottom`]:{[`${n}-notice`]:{marginInline:"auto auto"}},[`&${n}-topLeft, &${n}-bottomLeft`]:{[`${n}-notice`]:{marginInlineEnd:"auto",marginInlineStart:0}},[`${n}-fade-enter, ${n}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:m,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${n}-fade-leave`]:{animationTimingFunction:m,animationFillMode:"both",animationDuration:h,animationPlayState:"paused"},[`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]:{animationName:P,animationPlayState:"running"},[`${n}-fade-leave${n}-fade-leave-active`]:{animationName:w,animationPlayState:"running"}}),hae(e)),{"&-rtl":{direction:"rtl",[`${n}-notice-btn`]:{float:"left"}}})},{[x]:{position:"relative",width:C,maxWidth:`calc(100vw - ${v*2}px)`,marginBottom:i,marginInlineStart:"auto",padding:p,overflow:"hidden",lineHeight:S,wordWrap:"break-word",background:f,borderRadius:a,boxShadow:o,[`${n}-close-icon`]:{fontSize:b,cursor:"pointer"},[`${x}-message`]:{marginBottom:e.marginXS,color:d,fontSize:r,lineHeight:e.lineHeightLG},[`${x}-description`]:{fontSize:b},[`&${x}-closable ${x}-message`]:{paddingInlineEnd:e.paddingLG},[`${x}-with-icon ${x}-message`]:{marginBottom:e.marginXS,marginInlineStart:e.marginSM+$,fontSize:r},[`${x}-with-icon ${x}-description`]:{marginInlineStart:e.marginSM+$,fontSize:b},[`${x}-icon`]:{position:"absolute",fontSize:$,lineHeight:0,[`&-success${t}`]:{color:l},[`&-info${t}`]:{color:s},[`&-warning${t}`]:{color:u},[`&-error${t}`]:{color:c}},[`${x}-close`]:{position:"absolute",top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:"none",width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?"transparent":e.colorFillContent}},[`${x}-btn`]:{float:"right",marginTop:e.marginSM}}},{[`${x}-pure-panel`]:{margin:0}}]},kR=Ue("Notification",e=>{const t=e.paddingMD,n=e.paddingLG,o=Be(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`,notificationMarginBottom:e.margin,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationIconSize:e.fontSizeLG*e.lineHeightLG,notificationCloseButtonSize:e.controlHeightLG*.55});return[vae(o)]},e=>({zIndexPopup:e.zIndexPopupBase+50,width:384}));function mae(e,t){return t||g("span",{class:`${e}-close-x`},[g(fo,{class:`${e}-close-icon`},null)])}g(Ya,null,null),g(qr,null,null),g(po,null,null),g(Jr,null,null),g(Po,null,null);const bae={success:qr,info:Ya,error:po,warning:Jr};function yae(e){let{prefixCls:t,icon:n,type:o,message:r,description:i,btn:a}=e,l=null;if(n)l=g("span",{class:`${t}-icon`},[js(n)]);else if(o){const s=bae[o];l=g(s,{class:`${t}-icon ${t}-icon-${o}`},null)}return g("div",{class:ge({[`${t}-with-icon`]:l}),role:"alert"},[l,g("div",{class:`${t}-message`},[r]),g("div",{class:`${t}-description`},[i]),a&&g("div",{class:`${t}-btn`},[a])])}function LR(e,t,n){let o;switch(t=typeof t=="number"?`${t}px`:t,n=typeof n=="number"?`${n}px`:n,e){case"top":o={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":o={left:0,top:t,bottom:"auto"};break;case"topRight":o={right:0,top:t,bottom:"auto"};break;case"bottom":o={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":o={left:0,top:"auto",bottom:n};break;default:o={right:0,top:"auto",bottom:n};break}return o}function Sae(e){return{name:`${e}-fade`}}var Cae=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.prefixCls||o("notification")),a=f=>{var p,v;return LR(f,(p=e.top)!==null&&p!==void 0?p:UI,(v=e.bottom)!==null&&v!==void 0?v:UI)},[,l]=kR(i),s=()=>ge(l.value,{[`${i.value}-rtl`]:e.rtl}),u=()=>Sae(i.value),[c,d]=wR({prefixCls:i.value,getStyles:a,getClassName:s,motion:u,closable:!0,closeIcon:mae(i.value),duration:xae,getContainer:()=>{var f,p;return((f=e.getPopupContainer)===null||f===void 0?void 0:f.call(e))||((p=r.value)===null||p===void 0?void 0:p.call(r))||document.body},maxCount:e.maxCount,hashId:l.value,onAllRemoved:e.onAllRemoved});return n(y(y({},c),{prefixCls:i.value,hashId:l})),d}});function wae(e){const t=se(null),n=Symbol("notificationHolderKey"),o=l=>{if(!t.value)return;const{open:s,prefixCls:u,hashId:c}=t.value,d=`${u}-notice`,{message:f,description:p,icon:v,type:h,btn:m,class:b}=l,S=Cae(l,["message","description","icon","type","btn","class"]);return s(y(y({placement:"topRight"},S),{content:()=>g(yae,{prefixCls:d,icon:typeof v=="function"?v():v,type:h,message:typeof f=="function"?f():f,description:typeof p=="function"?p():p,btn:typeof m=="function"?m():m},null),class:ge(h&&`${d}-${h}`,c,b)}))},i={open:o,destroy:l=>{var s,u;l!==void 0?(s=t.value)===null||s===void 0||s.close(l):(u=t.value)===null||u===void 0||u.destroy()}};return["success","info","warning","error"].forEach(l=>{i[l]=s=>o(y(y({},s),{type:l}))}),[i,()=>g($ae,k(k({key:n},e),{},{ref:t}),null)]}function FR(e){return wae(e)}const xl={};let BR=4.5,HR="24px",zR="24px",p1="",jR="topRight",WR=()=>document.body,VR=null,g1=!1,KR;function Pae(e){const{duration:t,placement:n,bottom:o,top:r,getContainer:i,closeIcon:a,prefixCls:l}=e;l!==void 0&&(p1=l),t!==void 0&&(BR=t),n!==void 0&&(jR=n),o!==void 0&&(zR=typeof o=="number"?`${o}px`:o),r!==void 0&&(HR=typeof r=="number"?`${r}px`:r),i!==void 0&&(WR=i),a!==void 0&&(VR=a),e.rtl!==void 0&&(g1=e.rtl),e.maxCount!==void 0&&(KR=e.maxCount)}function Oae(e,t){let{prefixCls:n,placement:o=jR,getContainer:r=WR,top:i,bottom:a,closeIcon:l=VR,appContext:s}=e;const{getPrefixCls:u}=Fae(),c=u("notification",n||p1),d=`${c}-${o}-${g1}`,f=xl[d];if(f){Promise.resolve(f).then(v=>{t(v)});return}const p=ge(`${c}-${o}`,{[`${c}-rtl`]:g1===!0});yh.newInstance({name:"notification",prefixCls:n||p1,useStyle:kR,class:p,style:LR(o,i??HR,a??zR),appContext:s,getContainer:r,closeIcon:v=>{let{prefixCls:h}=v;return g("span",{class:`${h}-close-x`},[js(l,{},g(fo,{class:`${h}-close-icon`},null))])},maxCount:KR,hasTransitionName:!0},v=>{xl[d]=v,t(v)})}const Iae={success:Uv,info:Xv,error:Yv,warning:Gv};function Tae(e){const{icon:t,type:n,description:o,message:r,btn:i}=e,a=e.duration===void 0?BR:e.duration;Oae(e,l=>{l.notice({content:s=>{let{prefixCls:u}=s;const c=`${u}-notice`;let d=null;if(t)d=()=>g("span",{class:`${c}-icon`},[js(t)]);else if(n){const f=Iae[n];d=()=>g(f,{class:`${c}-icon ${c}-icon-${n}`},null)}return g("div",{class:d?`${c}-with-icon`:""},[d&&d(),g("div",{class:`${c}-message`},[!o&&d?g("span",{class:`${c}-message-single-line-auto-margin`},null):null,js(r)]),g("div",{class:`${c}-description`},[js(o)]),i?g("span",{class:`${c}-btn`},[js(i)]):null])},duration:a,closable:!0,onClose:e.onClose,onClick:e.onClick,key:e.key,style:e.style||{},class:e.class})})}const Ha={open:Tae,close(e){Object.keys(xl).forEach(t=>Promise.resolve(xl[t]).then(n=>{n.removeNotice(e)}))},config:Pae,destroy(){Object.keys(xl).forEach(e=>{Promise.resolve(xl[e]).then(t=>{t.destroy()}),delete xl[e]})}},Eae=["success","info","warning","error"];Eae.forEach(e=>{Ha[e]=t=>Ha.open(y(y({},t),{type:e}))});Ha.warn=Ha.warning;Ha.useNotification=FR;const _ae=`-ant-${Date.now()}-${Math.random()}`;function Mae(e,t){const n={},o=(a,l)=>{let s=a.clone();return s=(l==null?void 0:l(s))||s,s.toRgbString()},r=(a,l)=>{const s=new St(a),u=jl(s.toRgbString());n[`${l}-color`]=o(s),n[`${l}-color-disabled`]=u[1],n[`${l}-color-hover`]=u[4],n[`${l}-color-active`]=u[6],n[`${l}-color-outline`]=s.clone().setAlpha(.2).toRgbString(),n[`${l}-color-deprecated-bg`]=u[0],n[`${l}-color-deprecated-border`]=u[2]};if(t.primaryColor){r(t.primaryColor,"primary");const a=new St(t.primaryColor),l=jl(a.toRgbString());l.forEach((u,c)=>{n[`primary-${c+1}`]=u}),n["primary-color-deprecated-l-35"]=o(a,u=>u.lighten(35)),n["primary-color-deprecated-l-20"]=o(a,u=>u.lighten(20)),n["primary-color-deprecated-t-20"]=o(a,u=>u.tint(20)),n["primary-color-deprecated-t-50"]=o(a,u=>u.tint(50)),n["primary-color-deprecated-f-12"]=o(a,u=>u.setAlpha(u.getAlpha()*.12));const s=new St(l[0]);n["primary-color-active-deprecated-f-30"]=o(s,u=>u.setAlpha(u.getAlpha()*.3)),n["primary-color-active-deprecated-d-02"]=o(s,u=>u.darken(2))}return t.successColor&&r(t.successColor,"success"),t.warningColor&&r(t.warningColor,"warning"),t.errorColor&&r(t.errorColor,"error"),t.infoColor&&r(t.infoColor,"info"),` :root { ${Object.keys(n).map(a=>`--${e}-${a}: ${n[a]};`).join(` `)} } - `.trim()}function Aae(e,t){const n=Mae(e,t);so()&&Md(n,`${_ae}-dynamic-theme`)}const Rae=e=>{const[t,n]=na();return yy(E(()=>({theme:t.value,token:n.value,hashId:"",path:["ant-design-icons",e.value]})),()=>[{[`.${e.value}`]:y(y({},ns()),{[`.${e.value} .${e.value}-icon`]:{display:"block"}})}])};function Dae(e,t){const n=E(()=>(e==null?void 0:e.value)||{}),o=E(()=>n.value.inherit===!1||!(t!=null&&t.value)?I6:t.value);return E(()=>{if(!(e!=null&&e.value))return t==null?void 0:t.value;const i=y({},o.value.components);return Object.keys(e.value.components||{}).forEach(a=>{i[a]=y(y({},i[a]),e.value.components[a])}),y(y(y({},o.value),n.value),{token:y(y({},o.value.token),n.value.token),components:i})})}var Nae=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{y(Un,Lx),Un.prefixCls=sc(),Un.iconPrefixCls=UR(),Un.getPrefixCls=(e,t)=>t||(e?`${Un.prefixCls}-${e}`:Un.prefixCls),Un.getRootPrefixCls=()=>Un.prefixCls?Un.prefixCls:sc()});let J0;const Lae=e=>{J0&&J0(),J0=Ve(()=>{y(Lx,rt(e)),y(Un,rt(e))}),e.theme&&Aae(sc(),e.theme)},Fae=()=>({getPrefixCls:(e,t)=>t||(e?`${sc()}-${e}`:sc()),getIconPrefixCls:UR,getRootPrefixCls:()=>Un.prefixCls?Un.prefixCls:sc()}),Nl=le({compatConfig:{MODE:3},name:"AConfigProvider",inheritAttrs:!1,props:EB(),setup(e,t){let{slots:n}=t;const o=vv(),r=(M,D)=>{const{prefixCls:N="ant"}=e;if(D)return D;const L=N||o.getPrefixCls("");return M?`${L}-${M}`:L},i=E(()=>e.iconPrefixCls||o.iconPrefixCls.value||NS),a=E(()=>i.value!==o.iconPrefixCls.value),l=E(()=>{var M;return e.csp||((M=o.csp)===null||M===void 0?void 0:M.value)}),s=Rae(i),u=Dae(E(()=>e.theme),E(()=>{var M;return(M=o.theme)===null||M===void 0?void 0:M.value})),c=M=>(e.renderEmpty||n.renderEmpty||o.renderEmpty||hz)(M),d=E(()=>{var M,D;return(M=e.autoInsertSpaceInButton)!==null&&M!==void 0?M:(D=o.autoInsertSpaceInButton)===null||D===void 0?void 0:D.value}),f=E(()=>{var M;return e.locale||((M=o.locale)===null||M===void 0?void 0:M.value)});be(f,()=>{Lx.locale=f.value},{immediate:!0});const p=E(()=>{var M;return e.direction||((M=o.direction)===null||M===void 0?void 0:M.value)}),v=E(()=>{var M,D;return(M=e.space)!==null&&M!==void 0?M:(D=o.space)===null||D===void 0?void 0:D.value}),h=E(()=>{var M,D;return(M=e.virtual)!==null&&M!==void 0?M:(D=o.virtual)===null||D===void 0?void 0:D.value}),m=E(()=>{var M,D;return(M=e.dropdownMatchSelectWidth)!==null&&M!==void 0?M:(D=o.dropdownMatchSelectWidth)===null||D===void 0?void 0:D.value}),b=E(()=>{var M;return e.getTargetContainer!==void 0?e.getTargetContainer:(M=o.getTargetContainer)===null||M===void 0?void 0:M.value}),S=E(()=>{var M;return e.getPopupContainer!==void 0?e.getPopupContainer:(M=o.getPopupContainer)===null||M===void 0?void 0:M.value}),C=E(()=>{var M;return e.pageHeader!==void 0?e.pageHeader:(M=o.pageHeader)===null||M===void 0?void 0:M.value}),$=E(()=>{var M;return e.input!==void 0?e.input:(M=o.input)===null||M===void 0?void 0:M.value}),x=E(()=>{var M;return e.pagination!==void 0?e.pagination:(M=o.pagination)===null||M===void 0?void 0:M.value}),P=E(()=>{var M;return e.form!==void 0?e.form:(M=o.form)===null||M===void 0?void 0:M.value}),w=E(()=>{var M;return e.select!==void 0?e.select:(M=o.select)===null||M===void 0?void 0:M.value}),O=E(()=>e.componentSize),I=E(()=>e.componentDisabled),_=E(()=>{var M,D;return(M=e.wave)!==null&&M!==void 0?M:(D=o.wave)===null||D===void 0?void 0:D.value}),T={csp:l,autoInsertSpaceInButton:d,locale:f,direction:p,space:v,virtual:h,dropdownMatchSelectWidth:m,getPrefixCls:r,iconPrefixCls:i,theme:E(()=>{var M,D;return(M=u.value)!==null&&M!==void 0?M:(D=o.theme)===null||D===void 0?void 0:D.value}),renderEmpty:c,getTargetContainer:b,getPopupContainer:S,pageHeader:C,input:$,pagination:x,form:P,select:w,componentSize:O,componentDisabled:I,transformCellText:E(()=>e.transformCellText),wave:_},A=E(()=>{const M=u.value||{},{algorithm:D,token:N}=M,L=Nae(M,["algorithm","token"]),F=D&&(!Array.isArray(D)||D.length>0)?d6(D):void 0;return y(y({},L),{theme:F,token:y(y({},Cv),N)})}),R=E(()=>{var M,D;let N={};return f.value&&(N=((M=f.value.Form)===null||M===void 0?void 0:M.defaultValidateMessages)||((D=$o.Form)===null||D===void 0?void 0:D.defaultValidateMessages)||{}),e.form&&e.form.validateMessages&&(N=y(y({},N),e.form.validateMessages)),N});_B(T),IB({validateMessages:R}),A6(O),ZM(I);const H=M=>{var D,N;let L=a.value?s((D=n.default)===null||D===void 0?void 0:D.call(n)):(N=n.default)===null||N===void 0?void 0:N.call(n);if(e.theme){const F=function(){return L}();L=g(uz,{value:A.value},{default:()=>[F]})}return g(xR,{locale:f.value||M,ANT_MARK__:f1},{default:()=>[L]})};return Ve(()=>{p.value&&(Gl.config({rtl:p.value==="rtl"}),Ha.config({rtl:p.value==="rtl"}))}),()=>g(ts,{children:(M,D,N)=>H(N)},null)}});Nl.config=Lae;Nl.install=function(e){e.component(Nl.name,Nl)};const Bae=(e,t)=>{let{attrs:n,slots:o}=t;return g(Qt,k(k({size:"small",type:"primary"},e),n),o)},hp=(e,t,n)=>{const o=Q9(n);return{[`${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${o}Bg`],borderColor:e[`color${o}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},Hae=e=>Hg(e,(t,n)=>{let{textColor:o,lightBorderColor:r,lightColor:i,darkColor:a}=n;return{[`${e.componentCls}-${t}`]:{color:o,background:i,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:a,borderColor:a},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}}),zae=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:o,componentCls:r}=e,i=o-n,a=t-n;return{[r]:y(y({},qe(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:`${e.tagLineHeight}px`,whiteSpace:"nowrap",background:e.tagDefaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",[`&${r}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.tagDefaultColor},[`${r}-close-icon`]:{marginInlineStart:a,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${r}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${r}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:i}}),[`${r}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},GR=Ue("Tag",e=>{const{fontSize:t,lineHeight:n,lineWidth:o,fontSizeIcon:r}=e,i=Math.round(t*n),a=e.fontSizeSM,l=i-o*2,s=e.colorFillAlter,u=e.colorText,c=Be(e,{tagFontSize:a,tagLineHeight:l,tagDefaultBg:s,tagDefaultColor:u,tagIconSize:r-2*o,tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary});return[zae(c),Hae(c),hp(c,"success","Success"),hp(c,"processing","Info"),hp(c,"error","Error"),hp(c,"warning","Warning")]}),jae=()=>({prefixCls:String,checked:{type:Boolean,default:void 0},onChange:{type:Function},onClick:{type:Function},"onUpdate:checked":Function}),Ch=le({compatConfig:{MODE:3},name:"ACheckableTag",inheritAttrs:!1,props:jae(),setup(e,t){let{slots:n,emit:o,attrs:r}=t;const{prefixCls:i}=Te("tag",e),[a,l]=GR(i),s=c=>{const{checked:d}=e;o("update:checked",!d),o("change",!d),o("click",c)},u=E(()=>ge(i.value,l.value,{[`${i.value}-checkable`]:!0,[`${i.value}-checkable-checked`]:e.checked}));return()=>{var c;return a(g("span",k(k({},r),{},{class:[u.value,r.class],onClick:s}),[(c=n.default)===null||c===void 0?void 0:c.call(n)]))}}}),Wae=()=>({prefixCls:String,color:{type:String},closable:{type:Boolean,default:!1},closeIcon:K.any,visible:{type:Boolean,default:void 0},onClose:{type:Function},onClick:zl(),"onUpdate:visible":Function,icon:K.any,bordered:{type:Boolean,default:!0}}),cc=le({compatConfig:{MODE:3},name:"ATag",inheritAttrs:!1,props:Wae(),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r}=t;const{prefixCls:i,direction:a}=Te("tag",e),[l,s]=GR(i),u=se(!0);Ve(()=>{e.visible!==void 0&&(u.value=e.visible)});const c=v=>{v.stopPropagation(),o("update:visible",!1),o("close",v),!v.defaultPrevented&&e.visible===void 0&&(u.value=!1)},d=E(()=>Jv(e.color)||hZ(e.color)),f=E(()=>ge(i.value,s.value,{[`${i.value}-${e.color}`]:d.value,[`${i.value}-has-color`]:e.color&&!d.value,[`${i.value}-hidden`]:!u.value,[`${i.value}-rtl`]:a.value==="rtl",[`${i.value}-borderless`]:!e.bordered})),p=v=>{o("click",v)};return()=>{var v,h,m;const{icon:b=(v=n.icon)===null||v===void 0?void 0:v.call(n),color:S,closeIcon:C=(h=n.closeIcon)===null||h===void 0?void 0:h.call(n),closable:$=!1}=e,x=()=>$?C?g("span",{class:`${i.value}-close-icon`,onClick:c},[C]):g(fo,{class:`${i.value}-close-icon`,onClick:c},null):null,P={backgroundColor:S&&!d.value?S:void 0},w=b||null,O=(m=n.default)===null||m===void 0?void 0:m.call(n),I=w?g(Le,null,[w,g("span",null,[O])]):O,_=e.onClick!==void 0,T=g("span",k(k({},r),{},{onClick:p,class:[f.value,r.class],style:[P,r.style]}),[I,x()]);return l(_?g(zC,null,{default:()=>[T]}):T)}}});cc.CheckableTag=Ch;cc.install=function(e){return e.component(cc.name,cc),e.component(Ch.name,Ch),e};function Vae(e,t){let{slots:n,attrs:o}=t;return g(cc,k(k({color:"blue"},e),o),n)}var Kae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};function GI(e){for(var t=1;tT.value||O.value),[H,M]=M5(x),D=ae();h({focus:()=>{var re;(re=D.value)===null||re===void 0||re.focus()},blur:()=>{var re;(re=D.value)===null||re===void 0||re.blur()}});const N=re=>S.valueFormat?e.toString(re,S.valueFormat):re,L=(re,ne)=>{const X=N(re);b("update:value",X),b("change",X,ne),C.onFieldChange()},F=re=>{b("update:open",re),b("openChange",re)},B=re=>{b("focus",re)},j=re=>{b("blur",re),C.onFieldBlur()},z=(re,ne)=>{const X=N(re);b("panelChange",X,ne)},G=re=>{const ne=N(re);b("ok",ne)},[Q]=wr("DatePicker",Ed),Y=E(()=>S.value?S.valueFormat?e.toDate(S.value,S.valueFormat):S.value:S.value===""?void 0:S.value),oe=E(()=>S.defaultValue?S.valueFormat?e.toDate(S.defaultValue,S.valueFormat):S.defaultValue:S.defaultValue===""?void 0:S.defaultValue),Z=E(()=>S.defaultPickerValue?S.valueFormat?e.toDate(S.defaultPickerValue,S.valueFormat):S.defaultPickerValue:S.defaultPickerValue===""?void 0:S.defaultPickerValue);return()=>{var re,ne,X,te,W,U;const J=y(y({},Q.value),S.locale),de=y(y({},S),m),{bordered:fe=!0,placeholder:pe,suffixIcon:ve=(re=v.suffixIcon)===null||re===void 0?void 0:re.call(v),showToday:he=!0,transitionName:V,allowClear:q=!0,dateRender:ie=v.dateRender,renderExtraFooter:me=v.renderExtraFooter,monthCellRender:Se=v.monthCellRender||S.monthCellContentRender||v.monthCellContentRender,clearIcon:ce=(ne=v.clearIcon)===null||ne===void 0?void 0:ne.call(v),id:ee=C.id.value}=de,ue=Jae(de,["bordered","placeholder","suffixIcon","showToday","transitionName","allowClear","dateRender","renderExtraFooter","monthCellRender","clearIcon","id"]),xe=de.showTime===""?!0:de.showTime,{format:Pe}=de;let _e={};u&&(_e.picker=u);const Ce=u||de.picker||"date";_e=y(y(y({},_e),xe?$h(y({format:Pe,picker:Ce},typeof xe=="object"?xe:{})):{}),Ce==="time"?$h(y(y({format:Pe},ue),{picker:Ce})):{});const we=x.value,Oe=g(Le,null,[ve||g(u==="time"?vm:hm,null,null),$.hasFeedback&&$.feedbackIcon]);return H(g(Uee,k(k(k({monthCellRender:Se,dateRender:ie,renderExtraFooter:me,ref:D,placeholder:Yae(J,Ce,pe),suffixIcon:Oe,dropdownAlign:XR(P.value,S.placement),clearIcon:ce||g(po,null,null),allowClear:q,transitionName:V||`${I.value}-slide-up`},ue),_e),{},{id:ee,picker:Ce,value:Y.value,defaultValue:oe.value,defaultPickerValue:Z.value,showToday:he,locale:J.lang,class:ge({[`${we}-${R.value}`]:R.value,[`${we}-borderless`]:!fe},lo(we,Yr($.status,S.status),$.hasFeedback),m.class,M.value,A.value),disabled:_.value,prefixCls:we,getPopupContainer:m.getCalendarContainer||w.value,generateConfig:e,prevIcon:((X=v.prevIcon)===null||X===void 0?void 0:X.call(v))||g("span",{class:`${we}-prev-icon`},null),nextIcon:((te=v.nextIcon)===null||te===void 0?void 0:te.call(v))||g("span",{class:`${we}-next-icon`},null),superPrevIcon:((W=v.superPrevIcon)===null||W===void 0?void 0:W.call(v))||g("span",{class:`${we}-super-prev-icon`},null),superNextIcon:((U=v.superNextIcon)===null||U===void 0?void 0:U.call(v))||g("span",{class:`${we}-super-next-icon`},null),components:JR,direction:P.value,dropdownClassName:ge(M.value,S.popupClassName,S.dropdownClassName),onChange:L,onOpenChange:F,onFocus:B,onBlur:j,onPanelChange:z,onOk:G}),null))}}})}const o=n(void 0,"ADatePicker"),r=n("week","AWeekPicker"),i=n("month","AMonthPicker"),a=n("year","AYearPicker"),l=n("time","TimePicker"),s=n("quarter","AQuarterPicker");return{DatePicker:o,WeekPicker:r,MonthPicker:i,YearPicker:a,TimePicker:l,QuarterPicker:s}}var Qae={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z"}}]},name:"swap-right",theme:"outlined"};function YI(e){for(var t=1;tS.value||h.value),[x,P]=M5(f),w=ae();i({focus:()=>{var B;(B=w.value)===null||B===void 0||B.focus()},blur:()=>{var B;(B=w.value)===null||B===void 0||B.blur()}});const O=B=>u.valueFormat?e.toString(B,u.valueFormat):B,I=(B,j)=>{const z=O(B);s("update:value",z),s("change",z,j),c.onFieldChange()},_=B=>{s("update:open",B),s("openChange",B)},T=B=>{s("focus",B)},A=B=>{s("blur",B),c.onFieldBlur()},R=(B,j)=>{const z=O(B);s("panelChange",z,j)},H=B=>{const j=O(B);s("ok",j)},M=(B,j,z)=>{const G=O(B);s("calendarChange",G,j,z)},[D]=wr("DatePicker",Ed),N=E(()=>u.value&&u.valueFormat?e.toDate(u.value,u.valueFormat):u.value),L=E(()=>u.defaultValue&&u.valueFormat?e.toDate(u.defaultValue,u.valueFormat):u.defaultValue),F=E(()=>u.defaultPickerValue&&u.valueFormat?e.toDate(u.defaultPickerValue,u.valueFormat):u.defaultPickerValue);return()=>{var B,j,z,G,Q,Y,oe;const Z=y(y({},D.value),u.locale),re=y(y({},u),l),{prefixCls:ne,bordered:X=!0,placeholder:te,suffixIcon:W=(B=a.suffixIcon)===null||B===void 0?void 0:B.call(a),picker:U="date",transitionName:J,allowClear:de=!0,dateRender:fe=a.dateRender,renderExtraFooter:pe=a.renderExtraFooter,separator:ve=(j=a.separator)===null||j===void 0?void 0:j.call(a),clearIcon:he=(z=a.clearIcon)===null||z===void 0?void 0:z.call(a),id:V=c.id.value}=re,q=tle(re,["prefixCls","bordered","placeholder","suffixIcon","picker","transitionName","allowClear","dateRender","renderExtraFooter","separator","clearIcon","id"]);delete q["onUpdate:value"],delete q["onUpdate:open"];const{format:ie,showTime:me}=re;let Se={};Se=y(y(y({},Se),me?$h(y({format:ie,picker:U},me)):{}),U==="time"?$h(y(y({format:ie},it(q,["disabledTime"])),{picker:U})):{});const ce=f.value,ee=g(Le,null,[W||g(U==="time"?vm:hm,null,null),d.hasFeedback&&d.feedbackIcon]);return x(g(nte,k(k(k({dateRender:fe,renderExtraFooter:pe,separator:ve||g("span",{"aria-label":"to",class:`${ce}-separator`},[g(Fx,null,null)]),ref:w,dropdownAlign:XR(p.value,u.placement),placeholder:qae(Z,U,te),suffixIcon:ee,clearIcon:he||g(po,null,null),allowClear:de,transitionName:J||`${m.value}-slide-up`},q),Se),{},{disabled:b.value,id:V,value:N.value,defaultValue:L.value,defaultPickerValue:F.value,picker:U,class:ge({[`${ce}-${$.value}`]:$.value,[`${ce}-borderless`]:!X},lo(ce,Yr(d.status,u.status),d.hasFeedback),l.class,P.value,C.value),locale:Z.lang,prefixCls:ce,getPopupContainer:l.getCalendarContainer||v.value,generateConfig:e,prevIcon:((G=a.prevIcon)===null||G===void 0?void 0:G.call(a))||g("span",{class:`${ce}-prev-icon`},null),nextIcon:((Q=a.nextIcon)===null||Q===void 0?void 0:Q.call(a))||g("span",{class:`${ce}-next-icon`},null),superPrevIcon:((Y=a.superPrevIcon)===null||Y===void 0?void 0:Y.call(a))||g("span",{class:`${ce}-super-prev-icon`},null),superNextIcon:((oe=a.superNextIcon)===null||oe===void 0?void 0:oe.call(a))||g("span",{class:`${ce}-super-next-icon`},null),components:JR,direction:p.value,dropdownClassName:ge(P.value,u.popupClassName,u.dropdownClassName),onChange:I,onOpenChange:_,onFocus:T,onBlur:A,onPanelChange:R,onOk:H,onCalendarChange:M}),null))}}})}const JR={button:Bae,rangeItem:Vae};function ole(e){return e?Array.isArray(e)?e:[e]:[]}function $h(e){const{format:t,picker:n,showHour:o,showMinute:r,showSecond:i,use12Hours:a}=e,l=ole(t)[0],s=y({},e);return l&&typeof l=="string"&&(!l.includes("s")&&i===void 0&&(s.showSecond=!1),!l.includes("m")&&r===void 0&&(s.showMinute=!1),!l.includes("H")&&!l.includes("h")&&o===void 0&&(s.showHour=!1),(l.includes("a")||l.includes("A"))&&a===void 0&&(s.use12Hours=!0)),n==="time"?s:(typeof l=="function"&&delete s.format,{showTime:s})}function ZR(e,t){const{DatePicker:n,WeekPicker:o,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:l}=Zae(e,t),s=nle(e,t);return{DatePicker:n,WeekPicker:o,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:l,RangePicker:s}}const{DatePicker:Z0,WeekPicker:tg,MonthPicker:ng,YearPicker:rle,TimePicker:ile,QuarterPicker:og,RangePicker:rg}=ZR(XC),ale=y(Z0,{WeekPicker:tg,MonthPicker:ng,YearPicker:rle,RangePicker:rg,TimePicker:ile,QuarterPicker:og,install:e=>(e.component(Z0.name,Z0),e.component(rg.name,rg),e.component(ng.name,ng),e.component(tg.name,tg),e.component(og.name,og),e)});function vp(e){return e!=null}const Q0=e=>{const{itemPrefixCls:t,component:n,span:o,labelStyle:r,contentStyle:i,bordered:a,label:l,content:s,colon:u}=e,c=n;return a?g(c,{class:[{[`${t}-item-label`]:vp(l),[`${t}-item-content`]:vp(s)}],colSpan:o},{default:()=>[vp(l)&&g("span",{style:r},[l]),vp(s)&&g("span",{style:i},[s])]}):g(c,{class:[`${t}-item`],colSpan:o},{default:()=>[g("div",{class:`${t}-item-container`},[(l||l===0)&&g("span",{class:[`${t}-item-label`,{[`${t}-item-no-colon`]:!u}],style:r},[l]),(s||s===0)&&g("span",{class:`${t}-item-content`,style:i},[s])])]})},lle=e=>{const t=(u,c,d)=>{let{colon:f,prefixCls:p,bordered:v}=c,{component:h,type:m,showLabel:b,showContent:S,labelStyle:C,contentStyle:$}=d;return u.map((x,P)=>{var w,O;const I=x.props||{},{prefixCls:_=p,span:T=1,labelStyle:A=I["label-style"],contentStyle:R=I["content-style"],label:H=(O=(w=x.children)===null||w===void 0?void 0:w.label)===null||O===void 0?void 0:O.call(w)}=I,M=hv(x),D=xB(x),N=VM(x),{key:L}=x;return typeof h=="string"?g(Q0,{key:`${m}-${String(L)||P}`,class:D,style:N,labelStyle:y(y({},C),A),contentStyle:y(y({},$),R),span:T,colon:f,component:h,itemPrefixCls:_,bordered:v,label:b?H:null,content:S?M:null},null):[g(Q0,{key:`label-${String(L)||P}`,class:D,style:y(y(y({},C),N),A),span:1,colon:f,component:h[0],itemPrefixCls:_,bordered:v,label:H},null),g(Q0,{key:`content-${String(L)||P}`,class:D,style:y(y(y({},$),N),R),span:T*2-1,component:h[1],itemPrefixCls:_,bordered:v,content:M},null)]})},{prefixCls:n,vertical:o,row:r,index:i,bordered:a}=e,{labelStyle:l,contentStyle:s}=ze(tD,{labelStyle:ae({}),contentStyle:ae({})});return o?g(Le,null,[g("tr",{key:`label-${i}`,class:`${n}-row`},[t(r,e,{component:"th",type:"label",showLabel:!0,labelStyle:l.value,contentStyle:s.value})]),g("tr",{key:`content-${i}`,class:`${n}-row`},[t(r,e,{component:"td",type:"content",showContent:!0,labelStyle:l.value,contentStyle:s.value})])]):g("tr",{key:i,class:`${n}-row`},[t(r,e,{component:a?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0,labelStyle:l.value,contentStyle:s.value})])},sle=e=>{const{componentCls:t,descriptionsSmallPadding:n,descriptionsDefaultPadding:o,descriptionsMiddlePadding:r,descriptionsBg:i}=e;return{[`&${t}-bordered`]:{[`${t}-view`]:{border:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto",borderCollapse:"collapse"}},[`${t}-item-label, ${t}-item-content`]:{padding:o,borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`${t}-item-label`]:{backgroundColor:i,"&::after":{display:"none"}},[`${t}-row`]:{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBottom:"none"}},[`&${t}-middle`]:{[`${t}-item-label, ${t}-item-content`]:{padding:r}},[`&${t}-small`]:{[`${t}-item-label, ${t}-item-content`]:{padding:n}}}}},cle=e=>{const{componentCls:t,descriptionsExtraColor:n,descriptionItemPaddingBottom:o,descriptionsItemLabelColonMarginRight:r,descriptionsItemLabelColonMarginLeft:i,descriptionsTitleMarginBottom:a}=e;return{[t]:y(y(y({},qe(e)),sle(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:a},[`${t}-title`]:y(y({},cn),{flex:"auto",color:e.colorText,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:n,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed"}},[`${t}-row`]:{"> th, > td":{paddingBottom:o},"&:last-child":{borderBottom:"none"}},[`${t}-item-label`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${i}px ${r}px`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}},ule=Ue("Descriptions",e=>{const t=e.colorFillAlter,n=e.fontSizeSM*e.lineHeightSM,o=e.colorText,r=`${e.paddingXS}px ${e.padding}px`,i=`${e.padding}px ${e.paddingLG}px`,a=`${e.paddingSM}px ${e.paddingLG}px`,l=e.padding,s=e.marginXS,u=e.marginXXS/2,c=Be(e,{descriptionsBg:t,descriptionsTitleMarginBottom:n,descriptionsExtraColor:o,descriptionItemPaddingBottom:l,descriptionsSmallPadding:r,descriptionsDefaultPadding:i,descriptionsMiddlePadding:a,descriptionsItemLabelColonMarginRight:s,descriptionsItemLabelColonMarginLeft:u});return[cle(c)]});K.any;const dle=()=>({prefixCls:String,label:K.any,labelStyle:{type:Object,default:void 0},contentStyle:{type:Object,default:void 0},span:{type:Number,default:1}}),QR=le({compatConfig:{MODE:3},name:"ADescriptionsItem",props:dle(),setup(e,t){let{slots:n}=t;return()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),eD={xxxl:3,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1};function fle(e,t){if(typeof e=="number")return e;if(typeof e=="object")for(let n=0;nt)&&(o=mt(e,{span:t})),o}function ple(e,t){const n=Ot(e),o=[];let r=[],i=t;return n.forEach((a,l)=>{var s;const u=(s=a.props)===null||s===void 0?void 0:s.span,c=u||1;if(l===n.length-1){r.push(qI(a,i,u)),o.push(r);return}c({prefixCls:String,bordered:{type:Boolean,default:void 0},size:{type:String,default:"default"},title:K.any,extra:K.any,column:{type:[Number,Object],default:()=>eD},layout:String,colon:{type:Boolean,default:void 0},labelStyle:{type:Object,default:void 0},contentStyle:{type:Object,default:void 0}}),tD=Symbol("descriptionsContext"),Bs=le({compatConfig:{MODE:3},name:"ADescriptions",inheritAttrs:!1,props:gle(),slots:Object,Item:QR,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("descriptions",e);let a;const l=ae({}),[s,u]=ule(r),c=NC();cf(()=>{a=c.value.subscribe(f=>{typeof e.column=="object"&&(l.value=f)})}),tt(()=>{c.value.unsubscribe(a)}),Xe(tD,{labelStyle:We(e,"labelStyle"),contentStyle:We(e,"contentStyle")});const d=E(()=>fle(e.column,l.value));return()=>{var f,p,v;const{size:h,bordered:m=!1,layout:b="horizontal",colon:S=!0,title:C=(f=n.title)===null||f===void 0?void 0:f.call(n),extra:$=(p=n.extra)===null||p===void 0?void 0:p.call(n)}=e,x=(v=n.default)===null||v===void 0?void 0:v.call(n),P=ple(x,d.value);return s(g("div",k(k({},o),{},{class:[r.value,{[`${r.value}-${h}`]:h!=="default",[`${r.value}-bordered`]:!!m,[`${r.value}-rtl`]:i.value==="rtl"},o.class,u.value]}),[(C||$)&&g("div",{class:`${r.value}-header`},[C&&g("div",{class:`${r.value}-title`},[C]),$&&g("div",{class:`${r.value}-extra`},[$])]),g("div",{class:`${r.value}-view`},[g("table",null,[g("tbody",null,[P.map((w,O)=>g(lle,{key:O,index:O,colon:S,prefixCls:r.value,vertical:b==="vertical",bordered:m,row:w},null))])])])]))}}});Bs.install=function(e){return e.component(Bs.name,Bs),e.component(Bs.Item.name,Bs.Item),e};const hle=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:o,lineWidth:r}=e;return{[t]:y(y({},qe(e)),{borderBlockStart:`${r}px solid ${o}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",margin:`0 ${e.dividerVerticalGutterMargin}px`,verticalAlign:"middle",borderTop:0,borderInlineStart:`${r}px solid ${o}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${e.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${e.dividerHorizontalWithTextGutterMargin}px 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${o}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${r}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-left`]:{"&::before":{width:"5%"},"&::after":{width:"95%"}},[`&-horizontal${t}-with-text-right`]:{"&::before":{width:"95%"},"&::after":{width:"5%"}},[`${t}-inner-text`]:{display:"inline-block",padding:"0 1em"},"&-dashed":{background:"none",borderColor:o,borderStyle:"dashed",borderWidth:`${r}px 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:r,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-left${t}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-right${t}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}},vle=Ue("Divider",e=>{const t=Be(e,{dividerVerticalGutterMargin:e.marginXS,dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG});return[hle(t)]},{sizePaddingEdgeHorizontal:0}),mle=()=>({prefixCls:String,type:{type:String,default:"horizontal"},dashed:{type:Boolean,default:!1},orientation:{type:String,default:"center"},plain:{type:Boolean,default:!1},orientationMargin:[String,Number]}),ble=le({name:"ADivider",inheritAttrs:!1,compatConfig:{MODE:3},props:mle(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("divider",e),[a,l]=vle(r),s=E(()=>e.orientation==="left"&&e.orientationMargin!=null),u=E(()=>e.orientation==="right"&&e.orientationMargin!=null),c=E(()=>{const{type:p,dashed:v,plain:h}=e,m=r.value;return{[m]:!0,[l.value]:!!l.value,[`${m}-${p}`]:!0,[`${m}-dashed`]:!!v,[`${m}-plain`]:!!h,[`${m}-rtl`]:i.value==="rtl",[`${m}-no-default-orientation-margin-left`]:s.value,[`${m}-no-default-orientation-margin-right`]:u.value}}),d=E(()=>{const p=typeof e.orientationMargin=="number"?`${e.orientationMargin}px`:e.orientationMargin;return y(y({},s.value&&{marginLeft:p}),u.value&&{marginRight:p})}),f=E(()=>e.orientation.length>0?"-"+e.orientation:e.orientation);return()=>{var p;const v=Ot((p=n.default)===null||p===void 0?void 0:p.call(n));return a(g("div",k(k({},o),{},{class:[c.value,v.length?`${r.value}-with-text ${r.value}-with-text${f.value}`:"",o.class],role:"separator"}),[v.length?g("span",{class:`${r.value}-inner-text`,style:d.value},[v]):null]))}}}),yle=Lt(ble);zr.Button=Hd;zr.install=function(e){return e.component(zr.name,zr),e.component(Hd.name,Hd),e};const nD=()=>({prefixCls:String,width:K.oneOfType([K.string,K.number]),height:K.oneOfType([K.string,K.number]),style:{type:Object,default:void 0},class:String,rootClassName:String,rootStyle:De(),placement:{type:String},wrapperClassName:String,level:{type:[String,Array]},levelMove:{type:[Number,Function,Array]},duration:String,ease:String,showMask:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},maskStyle:{type:Object,default:void 0},afterVisibleChange:Function,keyboard:{type:Boolean,default:void 0},contentWrapperStyle:pt(),autofocus:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},motion:ye(),maskMotion:De()}),Sle=()=>y(y({},nD()),{forceRender:{type:Boolean,default:void 0},getContainer:K.oneOfType([K.string,K.func,K.object,K.looseBool])}),Cle=()=>y(y({},nD()),{getContainer:Function,getOpenCount:Function,scrollLocker:K.any,inline:Boolean});function xle(e){return Array.isArray(e)?e:[e]}const $le={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"};Object.keys($le).filter(e=>{if(typeof document>"u")return!1;const t=document.getElementsByTagName("html")[0];return e in(t?t.style:{})})[0];const wle=!(typeof window<"u"&&window.document&&window.document.createElement);var Ple=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{ot(()=>{var b;const{open:S,getContainer:C,showMask:$,autofocus:x}=e,P=C==null?void 0:C();v(e),S&&(P&&(P.parentNode,document.body),ot(()=>{x&&c()}),$&&((b=e.scrollLocker)===null||b===void 0||b.lock()))})}),be(()=>e.level,()=>{v(e)},{flush:"post"}),be(()=>e.open,()=>{const{open:b,getContainer:S,scrollLocker:C,showMask:$,autofocus:x}=e,P=S==null?void 0:S();P&&(P.parentNode,document.body),b?(x&&c(),$&&(C==null||C.lock())):C==null||C.unLock()},{flush:"post"}),Zn(()=>{var b;const{open:S}=e;S&&(document.body.style.touchAction=""),(b=e.scrollLocker)===null||b===void 0||b.unLock()}),be(()=>e.placement,b=>{b&&(s.value=null)});const c=()=>{var b,S;(S=(b=i.value)===null||b===void 0?void 0:b.focus)===null||S===void 0||S.call(b)},d=b=>{n("close",b)},f=b=>{b.keyCode===Ie.ESC&&(b.stopPropagation(),d(b))},p=()=>{const{open:b,afterVisibleChange:S}=e;S&&S(!!b)},v=b=>{let{level:S,getContainer:C}=b;if(wle)return;const $=C==null?void 0:C(),x=$?$.parentNode:null;u=[],S==="all"?(x?Array.prototype.slice.call(x.children):[]).forEach(w=>{w.nodeName!=="SCRIPT"&&w.nodeName!=="STYLE"&&w.nodeName!=="LINK"&&w!==$&&u.push(w)}):S&&xle(S).forEach(P=>{document.querySelectorAll(P).forEach(w=>{u.push(w)})})},h=b=>{n("handleClick",b)},m=se(!1);return be(i,()=>{ot(()=>{m.value=!0})}),()=>{var b,S;const{width:C,height:$,open:x,prefixCls:P,placement:w,level:O,levelMove:I,ease:_,duration:T,getContainer:A,onChange:R,afterVisibleChange:H,showMask:M,maskClosable:D,maskStyle:N,keyboard:L,getOpenCount:F,scrollLocker:B,contentWrapperStyle:j,style:z,class:G,rootClassName:Q,rootStyle:Y,maskMotion:oe,motion:Z,inline:re}=e,ne=Ple(e,["width","height","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","keyboard","getOpenCount","scrollLocker","contentWrapperStyle","style","class","rootClassName","rootStyle","maskMotion","motion","inline"]),X=x&&m.value,te=ge(P,{[`${P}-${w}`]:!0,[`${P}-open`]:X,[`${P}-inline`]:re,"no-mask":!M,[Q]:!0}),W=typeof Z=="function"?Z(w):Z;return g("div",k(k({},it(ne,["autofocus"])),{},{tabindex:-1,class:te,style:Y,ref:i,onKeydown:X&&L?f:void 0}),[g(Nn,oe,{default:()=>[M&&Pn(g("div",{class:`${P}-mask`,onClick:D?d:void 0,style:N,ref:a},null),[[Vn,X]])]}),g(Nn,k(k({},W),{},{onAfterEnter:p,onAfterLeave:p}),{default:()=>[Pn(g("div",{class:`${P}-content-wrapper`,style:[j],ref:r},[g("div",{class:[`${P}-content`,G],style:z,ref:s},[(b=o.default)===null||b===void 0?void 0:b.call(o)]),o.handler?g("div",{onClick:h,ref:l},[(S=o.handler)===null||S===void 0?void 0:S.call(o)]):null]),[[Vn,X]])]})])}}});var ZI=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{},showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",keyboard:!0,forceRender:!1,autofocus:!0}),emits:["handleClick","close"],setup(e,t){let{emit:n,slots:o}=t;const r=ae(null),i=l=>{n("handleClick",l)},a=l=>{n("close",l)};return()=>{const{getContainer:l,wrapperClassName:s,rootClassName:u,rootStyle:c,forceRender:d}=e,f=ZI(e,["getContainer","wrapperClassName","rootClassName","rootStyle","forceRender"]);let p=null;if(!l)return g(JI,k(k({},f),{},{rootClassName:u,rootStyle:c,open:e.open,onClose:a,onHandleClick:i,inline:!0}),o);const v=!!o.handler||d;return(v||e.open||r.value)&&(p=g(gf,{autoLock:!0,visible:e.open,forceRender:v,getContainer:l,wrapperClassName:s},{default:h=>{var{visible:m,afterClose:b}=h,S=ZI(h,["visible","afterClose"]);return g(JI,k(k(k({ref:r},f),S),{},{rootClassName:u,rootStyle:c,open:m!==void 0?m:e.open,afterVisibleChange:b!==void 0?b:e.afterVisibleChange,onClose:a,onHandleClick:i}),o)}})),p}}}),Ile=e=>{const{componentCls:t,motionDurationSlow:n}=e,o={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${n}`}}};return{[t]:{[`${t}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${n}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${t}-panel-motion`]:{"&-left":[o,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[o,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[o,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[o,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}},Tle=e=>{const{componentCls:t,zIndexPopup:n,colorBgMask:o,colorBgElevated:r,motionDurationSlow:i,motionDurationMid:a,padding:l,paddingLG:s,fontSizeLG:u,lineHeightLG:c,lineWidth:d,lineType:f,colorSplit:p,marginSM:v,colorIcon:h,colorIconHover:m,colorText:b,fontWeightStrong:S,drawerFooterPaddingVertical:C,drawerFooterPaddingHorizontal:$}=e,x=`${t}-content-wrapper`;return{[t]:{position:"fixed",inset:0,zIndex:n,pointerEvents:"none","&-pure":{position:"relative",background:r,[`&${t}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${t}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${t}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${t}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${t}-mask`]:{position:"absolute",inset:0,zIndex:n,background:o,pointerEvents:"auto"},[x]:{position:"absolute",zIndex:n,transition:`all ${i}`,"&-hidden":{display:"none"}},[`&-left > ${x}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${x}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${x}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${x}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${t}-content`]:{width:"100%",height:"100%",overflow:"auto",background:r,pointerEvents:"auto"},[`${t}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${t}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${l}px ${s}px`,fontSize:u,lineHeight:c,borderBottom:`${d}px ${f} ${p}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${t}-extra`]:{flex:"none"},[`${t}-close`]:{display:"inline-block",marginInlineEnd:v,color:h,fontWeight:S,fontSize:u,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${a}`,textRendering:"auto","&:focus, &:hover":{color:m,textDecoration:"none"}},[`${t}-title`]:{flex:1,margin:0,color:b,fontWeight:e.fontWeightStrong,fontSize:u,lineHeight:c},[`${t}-body`]:{flex:1,minWidth:0,minHeight:0,padding:s,overflow:"auto"},[`${t}-footer`]:{flexShrink:0,padding:`${C}px ${$}px`,borderTop:`${d}px ${f} ${p}`},"&-rtl":{direction:"rtl"}}}},Ele=Ue("Drawer",e=>{const t=Be(e,{drawerFooterPaddingVertical:e.paddingXS,drawerFooterPaddingHorizontal:e.padding});return[Tle(t),Ile(t)]},e=>({zIndexPopup:e.zIndexPopupBase}));var _le=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({autofocus:{type:Boolean,default:void 0},closable:{type:Boolean,default:void 0},closeIcon:K.any,destroyOnClose:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},getContainer:{type:[String,Function,Boolean,Object],default:void 0},maskClosable:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},maskStyle:De(),rootClassName:String,rootStyle:De(),size:{type:String},drawerStyle:De(),headerStyle:De(),bodyStyle:De(),contentWrapperStyle:{type:Object,default:void 0},title:K.any,visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},width:K.oneOfType([K.string,K.number]),height:K.oneOfType([K.string,K.number]),zIndex:Number,prefixCls:String,push:K.oneOfType([K.looseBool,{type:Object}]),placement:K.oneOf(Mle),keyboard:{type:Boolean,default:void 0},extra:K.any,footer:K.any,footerStyle:De(),level:K.any,levelMove:{type:[Number,Array,Function]},handle:K.any,afterVisibleChange:Function,onAfterVisibleChange:Function,onAfterOpenChange:Function,"onUpdate:visible":Function,"onUpdate:open":Function,onClose:Function}),Rle=le({compatConfig:{MODE:3},name:"ADrawer",inheritAttrs:!1,props:Qe(Ale(),{closable:!0,placement:"right",maskClosable:!0,mask:!0,level:null,keyboard:!0,push:QI}),slots:Object,setup(e,t){let{emit:n,slots:o,attrs:r}=t;const i=se(!1),a=se(!1),l=se(null),s=se(!1),u=se(!1),c=E(()=>{var F;return(F=e.open)!==null&&F!==void 0?F:e.visible});be(c,()=>{c.value?s.value=!0:u.value=!1},{immediate:!0}),be([c,s],()=>{c.value&&s.value&&(u.value=!0)},{immediate:!0});const d=ze("parentDrawerOpts",null),{prefixCls:f,getPopupContainer:p,direction:v}=Te("drawer",e),[h,m]=Ele(f),b=E(()=>e.getContainer===void 0&&(p!=null&&p.value)?()=>p.value(document.body):e.getContainer);Mt(!e.afterVisibleChange,"Drawer","`afterVisibleChange` prop is deprecated, please use `@afterVisibleChange` event instead"),Xe("parentDrawerOpts",{setPush:()=>{i.value=!0},setPull:()=>{i.value=!1,ot(()=>{$()})}}),Ke(()=>{c.value&&d&&d.setPush()}),Zn(()=>{d&&d.setPull()}),be(u,()=>{d&&(u.value?d.setPush():d.setPull())},{flush:"post"});const $=()=>{var F,B;(B=(F=l.value)===null||F===void 0?void 0:F.domFocus)===null||B===void 0||B.call(F)},x=F=>{n("update:visible",!1),n("update:open",!1),n("close",F)},P=F=>{var B;F||(a.value===!1&&(a.value=!0),e.destroyOnClose&&(s.value=!1)),(B=e.afterVisibleChange)===null||B===void 0||B.call(e,F),n("afterVisibleChange",F),n("afterOpenChange",F)},w=E(()=>{const{push:F,placement:B}=e;let j;return typeof F=="boolean"?j=F?QI.distance:0:j=F.distance,j=parseFloat(String(j||0)),B==="left"||B==="right"?`translateX(${B==="left"?j:-j}px)`:B==="top"||B==="bottom"?`translateY(${B==="top"?j:-j}px)`:null}),O=E(()=>{var F;return(F=e.width)!==null&&F!==void 0?F:e.size==="large"?736:378}),I=E(()=>{var F;return(F=e.height)!==null&&F!==void 0?F:e.size==="large"?736:378}),_=E(()=>{const{mask:F,placement:B}=e;if(!u.value&&!F)return{};const j={};return B==="left"||B==="right"?j.width=oh(O.value)?`${O.value}px`:O.value:j.height=oh(I.value)?`${I.value}px`:I.value,j}),T=E(()=>{const{zIndex:F,contentWrapperStyle:B}=e,j=_.value;return[{zIndex:F,transform:i.value?w.value:void 0},y({},B),j]}),A=F=>{const{closable:B,headerStyle:j}=e,z=mn(o,e,"extra"),G=mn(o,e,"title");return!G&&!B?null:g("div",{class:ge(`${F}-header`,{[`${F}-header-close-only`]:B&&!G&&!z}),style:j},[g("div",{class:`${F}-header-title`},[R(F),G&&g("div",{class:`${F}-title`},[G])]),z&&g("div",{class:`${F}-extra`},[z])])},R=F=>{var B;const{closable:j}=e,z=o.closeIcon?(B=o.closeIcon)===null||B===void 0?void 0:B.call(o):e.closeIcon;return j&&g("button",{key:"closer",onClick:x,"aria-label":"Close",class:`${F}-close`},[z===void 0?g(fo,null,null):z])},H=F=>{var B;if(a.value&&!e.forceRender&&!s.value)return null;const{bodyStyle:j,drawerStyle:z}=e;return g("div",{class:`${F}-wrapper-body`,style:z},[A(F),g("div",{key:"body",class:`${F}-body`,style:j},[(B=o.default)===null||B===void 0?void 0:B.call(o)]),M(F)])},M=F=>{const B=mn(o,e,"footer");if(!B)return null;const j=`${F}-footer`;return g("div",{class:j,style:e.footerStyle},[B])},D=E(()=>ge({"no-mask":!e.mask,[`${f.value}-rtl`]:v.value==="rtl"},e.rootClassName,m.value)),N=E(()=>Cr(co(f.value,"mask-motion"))),L=F=>Cr(co(f.value,`panel-motion-${F}`));return()=>{const{width:F,height:B,placement:j,mask:z,forceRender:G}=e,Q=_le(e,["width","height","placement","mask","forceRender"]),Y=y(y(y({},r),it(Q,["size","closeIcon","closable","destroyOnClose","drawerStyle","headerStyle","bodyStyle","title","push","onAfterVisibleChange","onClose","onUpdate:visible","onUpdate:open","visible"])),{forceRender:G,onClose:x,afterVisibleChange:P,handler:!1,prefixCls:f.value,open:u.value,showMask:z,placement:j,ref:l});return h(g(Bd,null,{default:()=>[g(Ole,k(k({},Y),{},{maskMotion:N.value,motion:L,width:O.value,height:I.value,getContainer:b.value,rootClassName:D.value,rootStyle:e.rootStyle,contentWrapperStyle:T.value}),{handler:e.handle?()=>e.handle:o.handle,default:()=>H(f.value)})]}))}}}),Dle=Lt(Rle);var Nle={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"};function e4(e){for(var t=1;t({prefixCls:String,description:K.any,type:Ne("default"),shape:Ne("circle"),tooltip:K.any,href:String,target:String,badge:De(),onClick:ye()}),Lle=()=>({prefixCls:Ne()}),Fle=()=>y(y({},Bx()),{trigger:Ne(),open:$e(),onOpenChange:ye(),"onUpdate:open":ye()}),Ble=()=>y(y({},Bx()),{prefixCls:String,duration:Number,target:ye(),visibilityHeight:Number,onClick:ye()}),Hle=le({compatConfig:{MODE:3},name:"AFloatButtonContent",inheritAttrs:!1,props:Lle(),setup(e,t){let{attrs:n,slots:o}=t;return()=>{var r;const{prefixCls:i}=e,a=zt((r=o.description)===null||r===void 0?void 0:r.call(o));return g("div",k(k({},n),{},{class:[n.class,`${i}-content`]}),[o.icon||a.length?g(Le,null,[o.icon&&g("div",{class:`${i}-icon`},[o.icon()]),a.length?g("div",{class:`${i}-description`},[a]):null]):g("div",{class:`${i}-icon`},[g(mm,null,null)])])}}}),oD=Symbol("floatButtonGroupContext"),zle=e=>(Xe(oD,e),e),rD=()=>ze(oD,{shape:ae()}),t4=e=>e===0?0:e-Math.sqrt(Math.pow(e,2)/2),jle=e=>{const{componentCls:t,floatButtonSize:n,motionDurationSlow:o,motionEaseInOutCirc:r}=e,i=`${t}-group`,a=new at("antFloatButtonMoveDownIn",{"0%":{transform:`translate3d(0, ${n}px, 0)`,transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),l=new at("antFloatButtonMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:`translate3d(0, ${n}px, 0)`,transformOrigin:"0 0",opacity:0}});return[{[`${i}-wrap`]:y({},mf(`${i}-wrap`,a,l,o,!0))},{[`${i}-wrap`]:{[` + `.trim()}function Aae(e,t){const n=Mae(e,t);so()&&Md(n,`${_ae}-dynamic-theme`)}const Rae=e=>{const[t,n]=na();return yy(E(()=>({theme:t.value,token:n.value,hashId:"",path:["ant-design-icons",e.value]})),()=>[{[`.${e.value}`]:y(y({},ns()),{[`.${e.value} .${e.value}-icon`]:{display:"block"}})}])};function Dae(e,t){const n=E(()=>(e==null?void 0:e.value)||{}),o=E(()=>n.value.inherit===!1||!(t!=null&&t.value)?I6:t.value);return E(()=>{if(!(e!=null&&e.value))return t==null?void 0:t.value;const i=y({},o.value.components);return Object.keys(e.value.components||{}).forEach(a=>{i[a]=y(y({},i[a]),e.value.components[a])}),y(y(y({},o.value),n.value),{token:y(y({},o.value.token),n.value.token),components:i})})}var Nae=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{y(Un,Lx),Un.prefixCls=sc(),Un.iconPrefixCls=UR(),Un.getPrefixCls=(e,t)=>t||(e?`${Un.prefixCls}-${e}`:Un.prefixCls),Un.getRootPrefixCls=()=>Un.prefixCls?Un.prefixCls:sc()});let J0;const Lae=e=>{J0&&J0(),J0=Ve(()=>{y(Lx,rt(e)),y(Un,rt(e))}),e.theme&&Aae(sc(),e.theme)},Fae=()=>({getPrefixCls:(e,t)=>t||(e?`${sc()}-${e}`:sc()),getIconPrefixCls:UR,getRootPrefixCls:()=>Un.prefixCls?Un.prefixCls:sc()}),Nl=le({compatConfig:{MODE:3},name:"AConfigProvider",inheritAttrs:!1,props:EB(),setup(e,t){let{slots:n}=t;const o=hv(),r=(M,D)=>{const{prefixCls:N="ant"}=e;if(D)return D;const L=N||o.getPrefixCls("");return M?`${L}-${M}`:L},i=E(()=>e.iconPrefixCls||o.iconPrefixCls.value||NS),a=E(()=>i.value!==o.iconPrefixCls.value),l=E(()=>{var M;return e.csp||((M=o.csp)===null||M===void 0?void 0:M.value)}),s=Rae(i),u=Dae(E(()=>e.theme),E(()=>{var M;return(M=o.theme)===null||M===void 0?void 0:M.value})),c=M=>(e.renderEmpty||n.renderEmpty||o.renderEmpty||hz)(M),d=E(()=>{var M,D;return(M=e.autoInsertSpaceInButton)!==null&&M!==void 0?M:(D=o.autoInsertSpaceInButton)===null||D===void 0?void 0:D.value}),f=E(()=>{var M;return e.locale||((M=o.locale)===null||M===void 0?void 0:M.value)});be(f,()=>{Lx.locale=f.value},{immediate:!0});const p=E(()=>{var M;return e.direction||((M=o.direction)===null||M===void 0?void 0:M.value)}),v=E(()=>{var M,D;return(M=e.space)!==null&&M!==void 0?M:(D=o.space)===null||D===void 0?void 0:D.value}),h=E(()=>{var M,D;return(M=e.virtual)!==null&&M!==void 0?M:(D=o.virtual)===null||D===void 0?void 0:D.value}),m=E(()=>{var M,D;return(M=e.dropdownMatchSelectWidth)!==null&&M!==void 0?M:(D=o.dropdownMatchSelectWidth)===null||D===void 0?void 0:D.value}),b=E(()=>{var M;return e.getTargetContainer!==void 0?e.getTargetContainer:(M=o.getTargetContainer)===null||M===void 0?void 0:M.value}),S=E(()=>{var M;return e.getPopupContainer!==void 0?e.getPopupContainer:(M=o.getPopupContainer)===null||M===void 0?void 0:M.value}),C=E(()=>{var M;return e.pageHeader!==void 0?e.pageHeader:(M=o.pageHeader)===null||M===void 0?void 0:M.value}),$=E(()=>{var M;return e.input!==void 0?e.input:(M=o.input)===null||M===void 0?void 0:M.value}),x=E(()=>{var M;return e.pagination!==void 0?e.pagination:(M=o.pagination)===null||M===void 0?void 0:M.value}),P=E(()=>{var M;return e.form!==void 0?e.form:(M=o.form)===null||M===void 0?void 0:M.value}),w=E(()=>{var M;return e.select!==void 0?e.select:(M=o.select)===null||M===void 0?void 0:M.value}),O=E(()=>e.componentSize),I=E(()=>e.componentDisabled),_=E(()=>{var M,D;return(M=e.wave)!==null&&M!==void 0?M:(D=o.wave)===null||D===void 0?void 0:D.value}),T={csp:l,autoInsertSpaceInButton:d,locale:f,direction:p,space:v,virtual:h,dropdownMatchSelectWidth:m,getPrefixCls:r,iconPrefixCls:i,theme:E(()=>{var M,D;return(M=u.value)!==null&&M!==void 0?M:(D=o.theme)===null||D===void 0?void 0:D.value}),renderEmpty:c,getTargetContainer:b,getPopupContainer:S,pageHeader:C,input:$,pagination:x,form:P,select:w,componentSize:O,componentDisabled:I,transformCellText:E(()=>e.transformCellText),wave:_},A=E(()=>{const M=u.value||{},{algorithm:D,token:N}=M,L=Nae(M,["algorithm","token"]),F=D&&(!Array.isArray(D)||D.length>0)?d6(D):void 0;return y(y({},L),{theme:F,token:y(y({},Sv),N)})}),R=E(()=>{var M,D;let N={};return f.value&&(N=((M=f.value.Form)===null||M===void 0?void 0:M.defaultValidateMessages)||((D=$o.Form)===null||D===void 0?void 0:D.defaultValidateMessages)||{}),e.form&&e.form.validateMessages&&(N=y(y({},N),e.form.validateMessages)),N});_B(T),IB({validateMessages:R}),A6(O),ZM(I);const H=M=>{var D,N;let L=a.value?s((D=n.default)===null||D===void 0?void 0:D.call(n)):(N=n.default)===null||N===void 0?void 0:N.call(n);if(e.theme){const F=function(){return L}();L=g(uz,{value:A.value},{default:()=>[F]})}return g(xR,{locale:f.value||M,ANT_MARK__:f1},{default:()=>[L]})};return Ve(()=>{p.value&&(Gl.config({rtl:p.value==="rtl"}),Ha.config({rtl:p.value==="rtl"}))}),()=>g(ts,{children:(M,D,N)=>H(N)},null)}});Nl.config=Lae;Nl.install=function(e){e.component(Nl.name,Nl)};const Bae=(e,t)=>{let{attrs:n,slots:o}=t;return g(Qt,k(k({size:"small",type:"primary"},e),n),o)},hp=(e,t,n)=>{const o=Q9(n);return{[`${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${o}Bg`],borderColor:e[`color${o}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},Hae=e=>Bg(e,(t,n)=>{let{textColor:o,lightBorderColor:r,lightColor:i,darkColor:a}=n;return{[`${e.componentCls}-${t}`]:{color:o,background:i,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:a,borderColor:a},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}}),zae=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:o,componentCls:r}=e,i=o-n,a=t-n;return{[r]:y(y({},qe(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:`${e.tagLineHeight}px`,whiteSpace:"nowrap",background:e.tagDefaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",[`&${r}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.tagDefaultColor},[`${r}-close-icon`]:{marginInlineStart:a,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${r}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${r}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:i}}),[`${r}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},GR=Ue("Tag",e=>{const{fontSize:t,lineHeight:n,lineWidth:o,fontSizeIcon:r}=e,i=Math.round(t*n),a=e.fontSizeSM,l=i-o*2,s=e.colorFillAlter,u=e.colorText,c=Be(e,{tagFontSize:a,tagLineHeight:l,tagDefaultBg:s,tagDefaultColor:u,tagIconSize:r-2*o,tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary});return[zae(c),Hae(c),hp(c,"success","Success"),hp(c,"processing","Info"),hp(c,"error","Error"),hp(c,"warning","Warning")]}),jae=()=>({prefixCls:String,checked:{type:Boolean,default:void 0},onChange:{type:Function},onClick:{type:Function},"onUpdate:checked":Function}),Sh=le({compatConfig:{MODE:3},name:"ACheckableTag",inheritAttrs:!1,props:jae(),setup(e,t){let{slots:n,emit:o,attrs:r}=t;const{prefixCls:i}=Te("tag",e),[a,l]=GR(i),s=c=>{const{checked:d}=e;o("update:checked",!d),o("change",!d),o("click",c)},u=E(()=>ge(i.value,l.value,{[`${i.value}-checkable`]:!0,[`${i.value}-checkable-checked`]:e.checked}));return()=>{var c;return a(g("span",k(k({},r),{},{class:[u.value,r.class],onClick:s}),[(c=n.default)===null||c===void 0?void 0:c.call(n)]))}}}),Wae=()=>({prefixCls:String,color:{type:String},closable:{type:Boolean,default:!1},closeIcon:K.any,visible:{type:Boolean,default:void 0},onClose:{type:Function},onClick:zl(),"onUpdate:visible":Function,icon:K.any,bordered:{type:Boolean,default:!0}}),cc=le({compatConfig:{MODE:3},name:"ATag",inheritAttrs:!1,props:Wae(),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r}=t;const{prefixCls:i,direction:a}=Te("tag",e),[l,s]=GR(i),u=se(!0);Ve(()=>{e.visible!==void 0&&(u.value=e.visible)});const c=v=>{v.stopPropagation(),o("update:visible",!1),o("close",v),!v.defaultPrevented&&e.visible===void 0&&(u.value=!1)},d=E(()=>qv(e.color)||hZ(e.color)),f=E(()=>ge(i.value,s.value,{[`${i.value}-${e.color}`]:d.value,[`${i.value}-has-color`]:e.color&&!d.value,[`${i.value}-hidden`]:!u.value,[`${i.value}-rtl`]:a.value==="rtl",[`${i.value}-borderless`]:!e.bordered})),p=v=>{o("click",v)};return()=>{var v,h,m;const{icon:b=(v=n.icon)===null||v===void 0?void 0:v.call(n),color:S,closeIcon:C=(h=n.closeIcon)===null||h===void 0?void 0:h.call(n),closable:$=!1}=e,x=()=>$?C?g("span",{class:`${i.value}-close-icon`,onClick:c},[C]):g(fo,{class:`${i.value}-close-icon`,onClick:c},null):null,P={backgroundColor:S&&!d.value?S:void 0},w=b||null,O=(m=n.default)===null||m===void 0?void 0:m.call(n),I=w?g(Le,null,[w,g("span",null,[O])]):O,_=e.onClick!==void 0,T=g("span",k(k({},r),{},{onClick:p,class:[f.value,r.class],style:[P,r.style]}),[I,x()]);return l(_?g(zC,null,{default:()=>[T]}):T)}}});cc.CheckableTag=Sh;cc.install=function(e){return e.component(cc.name,cc),e.component(Sh.name,Sh),e};function Vae(e,t){let{slots:n,attrs:o}=t;return g(cc,k(k({color:"blue"},e),o),n)}var Kae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};function GI(e){for(var t=1;tT.value||O.value),[H,M]=M5(x),D=ae();h({focus:()=>{var re;(re=D.value)===null||re===void 0||re.focus()},blur:()=>{var re;(re=D.value)===null||re===void 0||re.blur()}});const N=re=>S.valueFormat?e.toString(re,S.valueFormat):re,L=(re,ne)=>{const X=N(re);b("update:value",X),b("change",X,ne),C.onFieldChange()},F=re=>{b("update:open",re),b("openChange",re)},B=re=>{b("focus",re)},j=re=>{b("blur",re),C.onFieldBlur()},z=(re,ne)=>{const X=N(re);b("panelChange",X,ne)},G=re=>{const ne=N(re);b("ok",ne)},[Q]=wr("DatePicker",Ed),Y=E(()=>S.value?S.valueFormat?e.toDate(S.value,S.valueFormat):S.value:S.value===""?void 0:S.value),oe=E(()=>S.defaultValue?S.valueFormat?e.toDate(S.defaultValue,S.valueFormat):S.defaultValue:S.defaultValue===""?void 0:S.defaultValue),Z=E(()=>S.defaultPickerValue?S.valueFormat?e.toDate(S.defaultPickerValue,S.valueFormat):S.defaultPickerValue:S.defaultPickerValue===""?void 0:S.defaultPickerValue);return()=>{var re,ne,X,te,W,U;const J=y(y({},Q.value),S.locale),de=y(y({},S),m),{bordered:fe=!0,placeholder:pe,suffixIcon:ve=(re=v.suffixIcon)===null||re===void 0?void 0:re.call(v),showToday:he=!0,transitionName:V,allowClear:q=!0,dateRender:ie=v.dateRender,renderExtraFooter:me=v.renderExtraFooter,monthCellRender:Se=v.monthCellRender||S.monthCellContentRender||v.monthCellContentRender,clearIcon:ce=(ne=v.clearIcon)===null||ne===void 0?void 0:ne.call(v),id:ee=C.id.value}=de,ue=Jae(de,["bordered","placeholder","suffixIcon","showToday","transitionName","allowClear","dateRender","renderExtraFooter","monthCellRender","clearIcon","id"]),xe=de.showTime===""?!0:de.showTime,{format:Pe}=de;let _e={};u&&(_e.picker=u);const Ce=u||de.picker||"date";_e=y(y(y({},_e),xe?xh(y({format:Pe,picker:Ce},typeof xe=="object"?xe:{})):{}),Ce==="time"?xh(y(y({format:Pe},ue),{picker:Ce})):{});const we=x.value,Oe=g(Le,null,[ve||g(u==="time"?hm:gm,null,null),$.hasFeedback&&$.feedbackIcon]);return H(g(Uee,k(k(k({monthCellRender:Se,dateRender:ie,renderExtraFooter:me,ref:D,placeholder:Yae(J,Ce,pe),suffixIcon:Oe,dropdownAlign:XR(P.value,S.placement),clearIcon:ce||g(po,null,null),allowClear:q,transitionName:V||`${I.value}-slide-up`},ue),_e),{},{id:ee,picker:Ce,value:Y.value,defaultValue:oe.value,defaultPickerValue:Z.value,showToday:he,locale:J.lang,class:ge({[`${we}-${R.value}`]:R.value,[`${we}-borderless`]:!fe},lo(we,Yr($.status,S.status),$.hasFeedback),m.class,M.value,A.value),disabled:_.value,prefixCls:we,getPopupContainer:m.getCalendarContainer||w.value,generateConfig:e,prevIcon:((X=v.prevIcon)===null||X===void 0?void 0:X.call(v))||g("span",{class:`${we}-prev-icon`},null),nextIcon:((te=v.nextIcon)===null||te===void 0?void 0:te.call(v))||g("span",{class:`${we}-next-icon`},null),superPrevIcon:((W=v.superPrevIcon)===null||W===void 0?void 0:W.call(v))||g("span",{class:`${we}-super-prev-icon`},null),superNextIcon:((U=v.superNextIcon)===null||U===void 0?void 0:U.call(v))||g("span",{class:`${we}-super-next-icon`},null),components:JR,direction:P.value,dropdownClassName:ge(M.value,S.popupClassName,S.dropdownClassName),onChange:L,onOpenChange:F,onFocus:B,onBlur:j,onPanelChange:z,onOk:G}),null))}}})}const o=n(void 0,"ADatePicker"),r=n("week","AWeekPicker"),i=n("month","AMonthPicker"),a=n("year","AYearPicker"),l=n("time","TimePicker"),s=n("quarter","AQuarterPicker");return{DatePicker:o,WeekPicker:r,MonthPicker:i,YearPicker:a,TimePicker:l,QuarterPicker:s}}var Qae={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z"}}]},name:"swap-right",theme:"outlined"};function YI(e){for(var t=1;tS.value||h.value),[x,P]=M5(f),w=ae();i({focus:()=>{var B;(B=w.value)===null||B===void 0||B.focus()},blur:()=>{var B;(B=w.value)===null||B===void 0||B.blur()}});const O=B=>u.valueFormat?e.toString(B,u.valueFormat):B,I=(B,j)=>{const z=O(B);s("update:value",z),s("change",z,j),c.onFieldChange()},_=B=>{s("update:open",B),s("openChange",B)},T=B=>{s("focus",B)},A=B=>{s("blur",B),c.onFieldBlur()},R=(B,j)=>{const z=O(B);s("panelChange",z,j)},H=B=>{const j=O(B);s("ok",j)},M=(B,j,z)=>{const G=O(B);s("calendarChange",G,j,z)},[D]=wr("DatePicker",Ed),N=E(()=>u.value&&u.valueFormat?e.toDate(u.value,u.valueFormat):u.value),L=E(()=>u.defaultValue&&u.valueFormat?e.toDate(u.defaultValue,u.valueFormat):u.defaultValue),F=E(()=>u.defaultPickerValue&&u.valueFormat?e.toDate(u.defaultPickerValue,u.valueFormat):u.defaultPickerValue);return()=>{var B,j,z,G,Q,Y,oe;const Z=y(y({},D.value),u.locale),re=y(y({},u),l),{prefixCls:ne,bordered:X=!0,placeholder:te,suffixIcon:W=(B=a.suffixIcon)===null||B===void 0?void 0:B.call(a),picker:U="date",transitionName:J,allowClear:de=!0,dateRender:fe=a.dateRender,renderExtraFooter:pe=a.renderExtraFooter,separator:ve=(j=a.separator)===null||j===void 0?void 0:j.call(a),clearIcon:he=(z=a.clearIcon)===null||z===void 0?void 0:z.call(a),id:V=c.id.value}=re,q=tle(re,["prefixCls","bordered","placeholder","suffixIcon","picker","transitionName","allowClear","dateRender","renderExtraFooter","separator","clearIcon","id"]);delete q["onUpdate:value"],delete q["onUpdate:open"];const{format:ie,showTime:me}=re;let Se={};Se=y(y(y({},Se),me?xh(y({format:ie,picker:U},me)):{}),U==="time"?xh(y(y({format:ie},it(q,["disabledTime"])),{picker:U})):{});const ce=f.value,ee=g(Le,null,[W||g(U==="time"?hm:gm,null,null),d.hasFeedback&&d.feedbackIcon]);return x(g(nte,k(k(k({dateRender:fe,renderExtraFooter:pe,separator:ve||g("span",{"aria-label":"to",class:`${ce}-separator`},[g(Fx,null,null)]),ref:w,dropdownAlign:XR(p.value,u.placement),placeholder:qae(Z,U,te),suffixIcon:ee,clearIcon:he||g(po,null,null),allowClear:de,transitionName:J||`${m.value}-slide-up`},q),Se),{},{disabled:b.value,id:V,value:N.value,defaultValue:L.value,defaultPickerValue:F.value,picker:U,class:ge({[`${ce}-${$.value}`]:$.value,[`${ce}-borderless`]:!X},lo(ce,Yr(d.status,u.status),d.hasFeedback),l.class,P.value,C.value),locale:Z.lang,prefixCls:ce,getPopupContainer:l.getCalendarContainer||v.value,generateConfig:e,prevIcon:((G=a.prevIcon)===null||G===void 0?void 0:G.call(a))||g("span",{class:`${ce}-prev-icon`},null),nextIcon:((Q=a.nextIcon)===null||Q===void 0?void 0:Q.call(a))||g("span",{class:`${ce}-next-icon`},null),superPrevIcon:((Y=a.superPrevIcon)===null||Y===void 0?void 0:Y.call(a))||g("span",{class:`${ce}-super-prev-icon`},null),superNextIcon:((oe=a.superNextIcon)===null||oe===void 0?void 0:oe.call(a))||g("span",{class:`${ce}-super-next-icon`},null),components:JR,direction:p.value,dropdownClassName:ge(P.value,u.popupClassName,u.dropdownClassName),onChange:I,onOpenChange:_,onFocus:T,onBlur:A,onPanelChange:R,onOk:H,onCalendarChange:M}),null))}}})}const JR={button:Bae,rangeItem:Vae};function ole(e){return e?Array.isArray(e)?e:[e]:[]}function xh(e){const{format:t,picker:n,showHour:o,showMinute:r,showSecond:i,use12Hours:a}=e,l=ole(t)[0],s=y({},e);return l&&typeof l=="string"&&(!l.includes("s")&&i===void 0&&(s.showSecond=!1),!l.includes("m")&&r===void 0&&(s.showMinute=!1),!l.includes("H")&&!l.includes("h")&&o===void 0&&(s.showHour=!1),(l.includes("a")||l.includes("A"))&&a===void 0&&(s.use12Hours=!0)),n==="time"?s:(typeof l=="function"&&delete s.format,{showTime:s})}function ZR(e,t){const{DatePicker:n,WeekPicker:o,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:l}=Zae(e,t),s=nle(e,t);return{DatePicker:n,WeekPicker:o,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:l,RangePicker:s}}const{DatePicker:Z0,WeekPicker:eg,MonthPicker:tg,YearPicker:rle,TimePicker:ile,QuarterPicker:ng,RangePicker:og}=ZR(XC),ale=y(Z0,{WeekPicker:eg,MonthPicker:tg,YearPicker:rle,RangePicker:og,TimePicker:ile,QuarterPicker:ng,install:e=>(e.component(Z0.name,Z0),e.component(og.name,og),e.component(tg.name,tg),e.component(eg.name,eg),e.component(ng.name,ng),e)});function vp(e){return e!=null}const Q0=e=>{const{itemPrefixCls:t,component:n,span:o,labelStyle:r,contentStyle:i,bordered:a,label:l,content:s,colon:u}=e,c=n;return a?g(c,{class:[{[`${t}-item-label`]:vp(l),[`${t}-item-content`]:vp(s)}],colSpan:o},{default:()=>[vp(l)&&g("span",{style:r},[l]),vp(s)&&g("span",{style:i},[s])]}):g(c,{class:[`${t}-item`],colSpan:o},{default:()=>[g("div",{class:`${t}-item-container`},[(l||l===0)&&g("span",{class:[`${t}-item-label`,{[`${t}-item-no-colon`]:!u}],style:r},[l]),(s||s===0)&&g("span",{class:`${t}-item-content`,style:i},[s])])]})},lle=e=>{const t=(u,c,d)=>{let{colon:f,prefixCls:p,bordered:v}=c,{component:h,type:m,showLabel:b,showContent:S,labelStyle:C,contentStyle:$}=d;return u.map((x,P)=>{var w,O;const I=x.props||{},{prefixCls:_=p,span:T=1,labelStyle:A=I["label-style"],contentStyle:R=I["content-style"],label:H=(O=(w=x.children)===null||w===void 0?void 0:w.label)===null||O===void 0?void 0:O.call(w)}=I,M=gv(x),D=xB(x),N=VM(x),{key:L}=x;return typeof h=="string"?g(Q0,{key:`${m}-${String(L)||P}`,class:D,style:N,labelStyle:y(y({},C),A),contentStyle:y(y({},$),R),span:T,colon:f,component:h,itemPrefixCls:_,bordered:v,label:b?H:null,content:S?M:null},null):[g(Q0,{key:`label-${String(L)||P}`,class:D,style:y(y(y({},C),N),A),span:1,colon:f,component:h[0],itemPrefixCls:_,bordered:v,label:H},null),g(Q0,{key:`content-${String(L)||P}`,class:D,style:y(y(y({},$),N),R),span:T*2-1,component:h[1],itemPrefixCls:_,bordered:v,content:M},null)]})},{prefixCls:n,vertical:o,row:r,index:i,bordered:a}=e,{labelStyle:l,contentStyle:s}=ze(tD,{labelStyle:ae({}),contentStyle:ae({})});return o?g(Le,null,[g("tr",{key:`label-${i}`,class:`${n}-row`},[t(r,e,{component:"th",type:"label",showLabel:!0,labelStyle:l.value,contentStyle:s.value})]),g("tr",{key:`content-${i}`,class:`${n}-row`},[t(r,e,{component:"td",type:"content",showContent:!0,labelStyle:l.value,contentStyle:s.value})])]):g("tr",{key:i,class:`${n}-row`},[t(r,e,{component:a?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0,labelStyle:l.value,contentStyle:s.value})])},sle=e=>{const{componentCls:t,descriptionsSmallPadding:n,descriptionsDefaultPadding:o,descriptionsMiddlePadding:r,descriptionsBg:i}=e;return{[`&${t}-bordered`]:{[`${t}-view`]:{border:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto",borderCollapse:"collapse"}},[`${t}-item-label, ${t}-item-content`]:{padding:o,borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`${t}-item-label`]:{backgroundColor:i,"&::after":{display:"none"}},[`${t}-row`]:{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBottom:"none"}},[`&${t}-middle`]:{[`${t}-item-label, ${t}-item-content`]:{padding:r}},[`&${t}-small`]:{[`${t}-item-label, ${t}-item-content`]:{padding:n}}}}},cle=e=>{const{componentCls:t,descriptionsExtraColor:n,descriptionItemPaddingBottom:o,descriptionsItemLabelColonMarginRight:r,descriptionsItemLabelColonMarginLeft:i,descriptionsTitleMarginBottom:a}=e;return{[t]:y(y(y({},qe(e)),sle(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:a},[`${t}-title`]:y(y({},cn),{flex:"auto",color:e.colorText,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:n,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed"}},[`${t}-row`]:{"> th, > td":{paddingBottom:o},"&:last-child":{borderBottom:"none"}},[`${t}-item-label`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${i}px ${r}px`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}},ule=Ue("Descriptions",e=>{const t=e.colorFillAlter,n=e.fontSizeSM*e.lineHeightSM,o=e.colorText,r=`${e.paddingXS}px ${e.padding}px`,i=`${e.padding}px ${e.paddingLG}px`,a=`${e.paddingSM}px ${e.paddingLG}px`,l=e.padding,s=e.marginXS,u=e.marginXXS/2,c=Be(e,{descriptionsBg:t,descriptionsTitleMarginBottom:n,descriptionsExtraColor:o,descriptionItemPaddingBottom:l,descriptionsSmallPadding:r,descriptionsDefaultPadding:i,descriptionsMiddlePadding:a,descriptionsItemLabelColonMarginRight:s,descriptionsItemLabelColonMarginLeft:u});return[cle(c)]});K.any;const dle=()=>({prefixCls:String,label:K.any,labelStyle:{type:Object,default:void 0},contentStyle:{type:Object,default:void 0},span:{type:Number,default:1}}),QR=le({compatConfig:{MODE:3},name:"ADescriptionsItem",props:dle(),setup(e,t){let{slots:n}=t;return()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),eD={xxxl:3,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1};function fle(e,t){if(typeof e=="number")return e;if(typeof e=="object")for(let n=0;nt)&&(o=mt(e,{span:t})),o}function ple(e,t){const n=Ot(e),o=[];let r=[],i=t;return n.forEach((a,l)=>{var s;const u=(s=a.props)===null||s===void 0?void 0:s.span,c=u||1;if(l===n.length-1){r.push(qI(a,i,u)),o.push(r);return}c({prefixCls:String,bordered:{type:Boolean,default:void 0},size:{type:String,default:"default"},title:K.any,extra:K.any,column:{type:[Number,Object],default:()=>eD},layout:String,colon:{type:Boolean,default:void 0},labelStyle:{type:Object,default:void 0},contentStyle:{type:Object,default:void 0}}),tD=Symbol("descriptionsContext"),Bs=le({compatConfig:{MODE:3},name:"ADescriptions",inheritAttrs:!1,props:gle(),slots:Object,Item:QR,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("descriptions",e);let a;const l=ae({}),[s,u]=ule(r),c=NC();cf(()=>{a=c.value.subscribe(f=>{typeof e.column=="object"&&(l.value=f)})}),tt(()=>{c.value.unsubscribe(a)}),Xe(tD,{labelStyle:We(e,"labelStyle"),contentStyle:We(e,"contentStyle")});const d=E(()=>fle(e.column,l.value));return()=>{var f,p,v;const{size:h,bordered:m=!1,layout:b="horizontal",colon:S=!0,title:C=(f=n.title)===null||f===void 0?void 0:f.call(n),extra:$=(p=n.extra)===null||p===void 0?void 0:p.call(n)}=e,x=(v=n.default)===null||v===void 0?void 0:v.call(n),P=ple(x,d.value);return s(g("div",k(k({},o),{},{class:[r.value,{[`${r.value}-${h}`]:h!=="default",[`${r.value}-bordered`]:!!m,[`${r.value}-rtl`]:i.value==="rtl"},o.class,u.value]}),[(C||$)&&g("div",{class:`${r.value}-header`},[C&&g("div",{class:`${r.value}-title`},[C]),$&&g("div",{class:`${r.value}-extra`},[$])]),g("div",{class:`${r.value}-view`},[g("table",null,[g("tbody",null,[P.map((w,O)=>g(lle,{key:O,index:O,colon:S,prefixCls:r.value,vertical:b==="vertical",bordered:m,row:w},null))])])])]))}}});Bs.install=function(e){return e.component(Bs.name,Bs),e.component(Bs.Item.name,Bs.Item),e};const hle=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:o,lineWidth:r}=e;return{[t]:y(y({},qe(e)),{borderBlockStart:`${r}px solid ${o}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",margin:`0 ${e.dividerVerticalGutterMargin}px`,verticalAlign:"middle",borderTop:0,borderInlineStart:`${r}px solid ${o}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${e.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${e.dividerHorizontalWithTextGutterMargin}px 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${o}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${r}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-left`]:{"&::before":{width:"5%"},"&::after":{width:"95%"}},[`&-horizontal${t}-with-text-right`]:{"&::before":{width:"95%"},"&::after":{width:"5%"}},[`${t}-inner-text`]:{display:"inline-block",padding:"0 1em"},"&-dashed":{background:"none",borderColor:o,borderStyle:"dashed",borderWidth:`${r}px 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:r,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-left${t}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-right${t}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}},vle=Ue("Divider",e=>{const t=Be(e,{dividerVerticalGutterMargin:e.marginXS,dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG});return[hle(t)]},{sizePaddingEdgeHorizontal:0}),mle=()=>({prefixCls:String,type:{type:String,default:"horizontal"},dashed:{type:Boolean,default:!1},orientation:{type:String,default:"center"},plain:{type:Boolean,default:!1},orientationMargin:[String,Number]}),ble=le({name:"ADivider",inheritAttrs:!1,compatConfig:{MODE:3},props:mle(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("divider",e),[a,l]=vle(r),s=E(()=>e.orientation==="left"&&e.orientationMargin!=null),u=E(()=>e.orientation==="right"&&e.orientationMargin!=null),c=E(()=>{const{type:p,dashed:v,plain:h}=e,m=r.value;return{[m]:!0,[l.value]:!!l.value,[`${m}-${p}`]:!0,[`${m}-dashed`]:!!v,[`${m}-plain`]:!!h,[`${m}-rtl`]:i.value==="rtl",[`${m}-no-default-orientation-margin-left`]:s.value,[`${m}-no-default-orientation-margin-right`]:u.value}}),d=E(()=>{const p=typeof e.orientationMargin=="number"?`${e.orientationMargin}px`:e.orientationMargin;return y(y({},s.value&&{marginLeft:p}),u.value&&{marginRight:p})}),f=E(()=>e.orientation.length>0?"-"+e.orientation:e.orientation);return()=>{var p;const v=Ot((p=n.default)===null||p===void 0?void 0:p.call(n));return a(g("div",k(k({},o),{},{class:[c.value,v.length?`${r.value}-with-text ${r.value}-with-text${f.value}`:"",o.class],role:"separator"}),[v.length?g("span",{class:`${r.value}-inner-text`,style:d.value},[v]):null]))}}}),yle=Lt(ble);zr.Button=Hd;zr.install=function(e){return e.component(zr.name,zr),e.component(Hd.name,Hd),e};const nD=()=>({prefixCls:String,width:K.oneOfType([K.string,K.number]),height:K.oneOfType([K.string,K.number]),style:{type:Object,default:void 0},class:String,rootClassName:String,rootStyle:De(),placement:{type:String},wrapperClassName:String,level:{type:[String,Array]},levelMove:{type:[Number,Function,Array]},duration:String,ease:String,showMask:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},maskStyle:{type:Object,default:void 0},afterVisibleChange:Function,keyboard:{type:Boolean,default:void 0},contentWrapperStyle:pt(),autofocus:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},motion:ye(),maskMotion:De()}),Sle=()=>y(y({},nD()),{forceRender:{type:Boolean,default:void 0},getContainer:K.oneOfType([K.string,K.func,K.object,K.looseBool])}),Cle=()=>y(y({},nD()),{getContainer:Function,getOpenCount:Function,scrollLocker:K.any,inline:Boolean});function xle(e){return Array.isArray(e)?e:[e]}const $le={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"};Object.keys($le).filter(e=>{if(typeof document>"u")return!1;const t=document.getElementsByTagName("html")[0];return e in(t?t.style:{})})[0];const wle=!(typeof window<"u"&&window.document&&window.document.createElement);var Ple=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{ot(()=>{var b;const{open:S,getContainer:C,showMask:$,autofocus:x}=e,P=C==null?void 0:C();v(e),S&&(P&&(P.parentNode,document.body),ot(()=>{x&&c()}),$&&((b=e.scrollLocker)===null||b===void 0||b.lock()))})}),be(()=>e.level,()=>{v(e)},{flush:"post"}),be(()=>e.open,()=>{const{open:b,getContainer:S,scrollLocker:C,showMask:$,autofocus:x}=e,P=S==null?void 0:S();P&&(P.parentNode,document.body),b?(x&&c(),$&&(C==null||C.lock())):C==null||C.unLock()},{flush:"post"}),Zn(()=>{var b;const{open:S}=e;S&&(document.body.style.touchAction=""),(b=e.scrollLocker)===null||b===void 0||b.unLock()}),be(()=>e.placement,b=>{b&&(s.value=null)});const c=()=>{var b,S;(S=(b=i.value)===null||b===void 0?void 0:b.focus)===null||S===void 0||S.call(b)},d=b=>{n("close",b)},f=b=>{b.keyCode===Ie.ESC&&(b.stopPropagation(),d(b))},p=()=>{const{open:b,afterVisibleChange:S}=e;S&&S(!!b)},v=b=>{let{level:S,getContainer:C}=b;if(wle)return;const $=C==null?void 0:C(),x=$?$.parentNode:null;u=[],S==="all"?(x?Array.prototype.slice.call(x.children):[]).forEach(w=>{w.nodeName!=="SCRIPT"&&w.nodeName!=="STYLE"&&w.nodeName!=="LINK"&&w!==$&&u.push(w)}):S&&xle(S).forEach(P=>{document.querySelectorAll(P).forEach(w=>{u.push(w)})})},h=b=>{n("handleClick",b)},m=se(!1);return be(i,()=>{ot(()=>{m.value=!0})}),()=>{var b,S;const{width:C,height:$,open:x,prefixCls:P,placement:w,level:O,levelMove:I,ease:_,duration:T,getContainer:A,onChange:R,afterVisibleChange:H,showMask:M,maskClosable:D,maskStyle:N,keyboard:L,getOpenCount:F,scrollLocker:B,contentWrapperStyle:j,style:z,class:G,rootClassName:Q,rootStyle:Y,maskMotion:oe,motion:Z,inline:re}=e,ne=Ple(e,["width","height","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","keyboard","getOpenCount","scrollLocker","contentWrapperStyle","style","class","rootClassName","rootStyle","maskMotion","motion","inline"]),X=x&&m.value,te=ge(P,{[`${P}-${w}`]:!0,[`${P}-open`]:X,[`${P}-inline`]:re,"no-mask":!M,[Q]:!0}),W=typeof Z=="function"?Z(w):Z;return g("div",k(k({},it(ne,["autofocus"])),{},{tabindex:-1,class:te,style:Y,ref:i,onKeydown:X&&L?f:void 0}),[g(Nn,oe,{default:()=>[M&&Pn(g("div",{class:`${P}-mask`,onClick:D?d:void 0,style:N,ref:a},null),[[Vn,X]])]}),g(Nn,k(k({},W),{},{onAfterEnter:p,onAfterLeave:p}),{default:()=>[Pn(g("div",{class:`${P}-content-wrapper`,style:[j],ref:r},[g("div",{class:[`${P}-content`,G],style:z,ref:s},[(b=o.default)===null||b===void 0?void 0:b.call(o)]),o.handler?g("div",{onClick:h,ref:l},[(S=o.handler)===null||S===void 0?void 0:S.call(o)]):null]),[[Vn,X]])]})])}}});var ZI=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{},showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",keyboard:!0,forceRender:!1,autofocus:!0}),emits:["handleClick","close"],setup(e,t){let{emit:n,slots:o}=t;const r=ae(null),i=l=>{n("handleClick",l)},a=l=>{n("close",l)};return()=>{const{getContainer:l,wrapperClassName:s,rootClassName:u,rootStyle:c,forceRender:d}=e,f=ZI(e,["getContainer","wrapperClassName","rootClassName","rootStyle","forceRender"]);let p=null;if(!l)return g(JI,k(k({},f),{},{rootClassName:u,rootStyle:c,open:e.open,onClose:a,onHandleClick:i,inline:!0}),o);const v=!!o.handler||d;return(v||e.open||r.value)&&(p=g(gf,{autoLock:!0,visible:e.open,forceRender:v,getContainer:l,wrapperClassName:s},{default:h=>{var{visible:m,afterClose:b}=h,S=ZI(h,["visible","afterClose"]);return g(JI,k(k(k({ref:r},f),S),{},{rootClassName:u,rootStyle:c,open:m!==void 0?m:e.open,afterVisibleChange:b!==void 0?b:e.afterVisibleChange,onClose:a,onHandleClick:i}),o)}})),p}}}),Ile=e=>{const{componentCls:t,motionDurationSlow:n}=e,o={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${n}`}}};return{[t]:{[`${t}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${n}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${t}-panel-motion`]:{"&-left":[o,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[o,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[o,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[o,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}},Tle=e=>{const{componentCls:t,zIndexPopup:n,colorBgMask:o,colorBgElevated:r,motionDurationSlow:i,motionDurationMid:a,padding:l,paddingLG:s,fontSizeLG:u,lineHeightLG:c,lineWidth:d,lineType:f,colorSplit:p,marginSM:v,colorIcon:h,colorIconHover:m,colorText:b,fontWeightStrong:S,drawerFooterPaddingVertical:C,drawerFooterPaddingHorizontal:$}=e,x=`${t}-content-wrapper`;return{[t]:{position:"fixed",inset:0,zIndex:n,pointerEvents:"none","&-pure":{position:"relative",background:r,[`&${t}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${t}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${t}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${t}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${t}-mask`]:{position:"absolute",inset:0,zIndex:n,background:o,pointerEvents:"auto"},[x]:{position:"absolute",zIndex:n,transition:`all ${i}`,"&-hidden":{display:"none"}},[`&-left > ${x}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${x}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${x}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${x}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${t}-content`]:{width:"100%",height:"100%",overflow:"auto",background:r,pointerEvents:"auto"},[`${t}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${t}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${l}px ${s}px`,fontSize:u,lineHeight:c,borderBottom:`${d}px ${f} ${p}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${t}-extra`]:{flex:"none"},[`${t}-close`]:{display:"inline-block",marginInlineEnd:v,color:h,fontWeight:S,fontSize:u,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${a}`,textRendering:"auto","&:focus, &:hover":{color:m,textDecoration:"none"}},[`${t}-title`]:{flex:1,margin:0,color:b,fontWeight:e.fontWeightStrong,fontSize:u,lineHeight:c},[`${t}-body`]:{flex:1,minWidth:0,minHeight:0,padding:s,overflow:"auto"},[`${t}-footer`]:{flexShrink:0,padding:`${C}px ${$}px`,borderTop:`${d}px ${f} ${p}`},"&-rtl":{direction:"rtl"}}}},Ele=Ue("Drawer",e=>{const t=Be(e,{drawerFooterPaddingVertical:e.paddingXS,drawerFooterPaddingHorizontal:e.padding});return[Tle(t),Ile(t)]},e=>({zIndexPopup:e.zIndexPopupBase}));var _le=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({autofocus:{type:Boolean,default:void 0},closable:{type:Boolean,default:void 0},closeIcon:K.any,destroyOnClose:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},getContainer:{type:[String,Function,Boolean,Object],default:void 0},maskClosable:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},maskStyle:De(),rootClassName:String,rootStyle:De(),size:{type:String},drawerStyle:De(),headerStyle:De(),bodyStyle:De(),contentWrapperStyle:{type:Object,default:void 0},title:K.any,visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},width:K.oneOfType([K.string,K.number]),height:K.oneOfType([K.string,K.number]),zIndex:Number,prefixCls:String,push:K.oneOfType([K.looseBool,{type:Object}]),placement:K.oneOf(Mle),keyboard:{type:Boolean,default:void 0},extra:K.any,footer:K.any,footerStyle:De(),level:K.any,levelMove:{type:[Number,Array,Function]},handle:K.any,afterVisibleChange:Function,onAfterVisibleChange:Function,onAfterOpenChange:Function,"onUpdate:visible":Function,"onUpdate:open":Function,onClose:Function}),Rle=le({compatConfig:{MODE:3},name:"ADrawer",inheritAttrs:!1,props:Qe(Ale(),{closable:!0,placement:"right",maskClosable:!0,mask:!0,level:null,keyboard:!0,push:QI}),slots:Object,setup(e,t){let{emit:n,slots:o,attrs:r}=t;const i=se(!1),a=se(!1),l=se(null),s=se(!1),u=se(!1),c=E(()=>{var F;return(F=e.open)!==null&&F!==void 0?F:e.visible});be(c,()=>{c.value?s.value=!0:u.value=!1},{immediate:!0}),be([c,s],()=>{c.value&&s.value&&(u.value=!0)},{immediate:!0});const d=ze("parentDrawerOpts",null),{prefixCls:f,getPopupContainer:p,direction:v}=Te("drawer",e),[h,m]=Ele(f),b=E(()=>e.getContainer===void 0&&(p!=null&&p.value)?()=>p.value(document.body):e.getContainer);Mt(!e.afterVisibleChange,"Drawer","`afterVisibleChange` prop is deprecated, please use `@afterVisibleChange` event instead"),Xe("parentDrawerOpts",{setPush:()=>{i.value=!0},setPull:()=>{i.value=!1,ot(()=>{$()})}}),Ke(()=>{c.value&&d&&d.setPush()}),Zn(()=>{d&&d.setPull()}),be(u,()=>{d&&(u.value?d.setPush():d.setPull())},{flush:"post"});const $=()=>{var F,B;(B=(F=l.value)===null||F===void 0?void 0:F.domFocus)===null||B===void 0||B.call(F)},x=F=>{n("update:visible",!1),n("update:open",!1),n("close",F)},P=F=>{var B;F||(a.value===!1&&(a.value=!0),e.destroyOnClose&&(s.value=!1)),(B=e.afterVisibleChange)===null||B===void 0||B.call(e,F),n("afterVisibleChange",F),n("afterOpenChange",F)},w=E(()=>{const{push:F,placement:B}=e;let j;return typeof F=="boolean"?j=F?QI.distance:0:j=F.distance,j=parseFloat(String(j||0)),B==="left"||B==="right"?`translateX(${B==="left"?j:-j}px)`:B==="top"||B==="bottom"?`translateY(${B==="top"?j:-j}px)`:null}),O=E(()=>{var F;return(F=e.width)!==null&&F!==void 0?F:e.size==="large"?736:378}),I=E(()=>{var F;return(F=e.height)!==null&&F!==void 0?F:e.size==="large"?736:378}),_=E(()=>{const{mask:F,placement:B}=e;if(!u.value&&!F)return{};const j={};return B==="left"||B==="right"?j.width=nh(O.value)?`${O.value}px`:O.value:j.height=nh(I.value)?`${I.value}px`:I.value,j}),T=E(()=>{const{zIndex:F,contentWrapperStyle:B}=e,j=_.value;return[{zIndex:F,transform:i.value?w.value:void 0},y({},B),j]}),A=F=>{const{closable:B,headerStyle:j}=e,z=mn(o,e,"extra"),G=mn(o,e,"title");return!G&&!B?null:g("div",{class:ge(`${F}-header`,{[`${F}-header-close-only`]:B&&!G&&!z}),style:j},[g("div",{class:`${F}-header-title`},[R(F),G&&g("div",{class:`${F}-title`},[G])]),z&&g("div",{class:`${F}-extra`},[z])])},R=F=>{var B;const{closable:j}=e,z=o.closeIcon?(B=o.closeIcon)===null||B===void 0?void 0:B.call(o):e.closeIcon;return j&&g("button",{key:"closer",onClick:x,"aria-label":"Close",class:`${F}-close`},[z===void 0?g(fo,null,null):z])},H=F=>{var B;if(a.value&&!e.forceRender&&!s.value)return null;const{bodyStyle:j,drawerStyle:z}=e;return g("div",{class:`${F}-wrapper-body`,style:z},[A(F),g("div",{key:"body",class:`${F}-body`,style:j},[(B=o.default)===null||B===void 0?void 0:B.call(o)]),M(F)])},M=F=>{const B=mn(o,e,"footer");if(!B)return null;const j=`${F}-footer`;return g("div",{class:j,style:e.footerStyle},[B])},D=E(()=>ge({"no-mask":!e.mask,[`${f.value}-rtl`]:v.value==="rtl"},e.rootClassName,m.value)),N=E(()=>Cr(co(f.value,"mask-motion"))),L=F=>Cr(co(f.value,`panel-motion-${F}`));return()=>{const{width:F,height:B,placement:j,mask:z,forceRender:G}=e,Q=_le(e,["width","height","placement","mask","forceRender"]),Y=y(y(y({},r),it(Q,["size","closeIcon","closable","destroyOnClose","drawerStyle","headerStyle","bodyStyle","title","push","onAfterVisibleChange","onClose","onUpdate:visible","onUpdate:open","visible"])),{forceRender:G,onClose:x,afterVisibleChange:P,handler:!1,prefixCls:f.value,open:u.value,showMask:z,placement:j,ref:l});return h(g(Bd,null,{default:()=>[g(Ole,k(k({},Y),{},{maskMotion:N.value,motion:L,width:O.value,height:I.value,getContainer:b.value,rootClassName:D.value,rootStyle:e.rootStyle,contentWrapperStyle:T.value}),{handler:e.handle?()=>e.handle:o.handle,default:()=>H(f.value)})]}))}}}),Dle=Lt(Rle);var Nle={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"};function eT(e){for(var t=1;t({prefixCls:String,description:K.any,type:Ne("default"),shape:Ne("circle"),tooltip:K.any,href:String,target:String,badge:De(),onClick:ye()}),Lle=()=>({prefixCls:Ne()}),Fle=()=>y(y({},Bx()),{trigger:Ne(),open:$e(),onOpenChange:ye(),"onUpdate:open":ye()}),Ble=()=>y(y({},Bx()),{prefixCls:String,duration:Number,target:ye(),visibilityHeight:Number,onClick:ye()}),Hle=le({compatConfig:{MODE:3},name:"AFloatButtonContent",inheritAttrs:!1,props:Lle(),setup(e,t){let{attrs:n,slots:o}=t;return()=>{var r;const{prefixCls:i}=e,a=zt((r=o.description)===null||r===void 0?void 0:r.call(o));return g("div",k(k({},n),{},{class:[n.class,`${i}-content`]}),[o.icon||a.length?g(Le,null,[o.icon&&g("div",{class:`${i}-icon`},[o.icon()]),a.length?g("div",{class:`${i}-description`},[a]):null]):g("div",{class:`${i}-icon`},[g(vm,null,null)])])}}}),oD=Symbol("floatButtonGroupContext"),zle=e=>(Xe(oD,e),e),rD=()=>ze(oD,{shape:ae()}),tT=e=>e===0?0:e-Math.sqrt(Math.pow(e,2)/2),jle=e=>{const{componentCls:t,floatButtonSize:n,motionDurationSlow:o,motionEaseInOutCirc:r}=e,i=`${t}-group`,a=new at("antFloatButtonMoveDownIn",{"0%":{transform:`translate3d(0, ${n}px, 0)`,transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),l=new at("antFloatButtonMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:`translate3d(0, ${n}px, 0)`,transformOrigin:"0 0",opacity:0}});return[{[`${i}-wrap`]:y({},mf(`${i}-wrap`,a,l,o,!0))},{[`${i}-wrap`]:{[` &${i}-wrap-enter, &${i}-wrap-appear - `]:{opacity:0,animationTimingFunction:r},[`&${i}-wrap-leave`]:{animationTimingFunction:r}}}]},Wle=e=>{const{antCls:t,componentCls:n,floatButtonSize:o,margin:r,borderRadiusLG:i,borderRadiusSM:a,badgeOffset:l,floatButtonBodyPadding:s}=e,u=`${n}-group`;return{[u]:y(y({},qe(e)),{zIndex:99,display:"block",border:"none",position:"fixed",width:o,height:"auto",boxShadow:"none",minHeight:o,insetInlineEnd:e.floatButtonInsetInlineEnd,insetBlockEnd:e.floatButtonInsetBlockEnd,borderRadius:i,[`${u}-wrap`]:{zIndex:-1,display:"block",position:"relative",marginBottom:r},[`&${u}-rtl`]:{direction:"rtl"},[n]:{position:"static"}}),[`${u}-circle`]:{[`${n}-circle:not(:last-child)`]:{marginBottom:e.margin,[`${n}-body`]:{width:o,height:o,borderRadius:"50%"}}},[`${u}-square`]:{[`${n}-square`]:{borderRadius:0,padding:0,"&:first-child":{borderStartStartRadius:i,borderStartEndRadius:i},"&:last-child":{borderEndStartRadius:i,borderEndEndRadius:i},"&:not(:last-child)":{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${t}-badge`]:{[`${t}-badge-count`]:{top:-(s+l),insetInlineEnd:-(s+l)}}},[`${u}-wrap`]:{display:"block",borderRadius:i,boxShadow:e.boxShadowSecondary,[`${n}-square`]:{boxShadow:"none",marginTop:0,borderRadius:0,padding:s,"&:first-child":{borderStartStartRadius:i,borderStartEndRadius:i},"&:last-child":{borderEndStartRadius:i,borderEndEndRadius:i},"&:not(:last-child)":{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${n}-body`]:{width:e.floatButtonBodySize,height:e.floatButtonBodySize}}}},[`${u}-circle-shadow`]:{boxShadow:"none"},[`${u}-square-shadow`]:{boxShadow:e.boxShadowSecondary,[`${n}-square`]:{boxShadow:"none",padding:s,[`${n}-body`]:{width:e.floatButtonBodySize,height:e.floatButtonBodySize,borderRadius:a}}}}},Vle=e=>{const{antCls:t,componentCls:n,floatButtonBodyPadding:o,floatButtonIconSize:r,floatButtonSize:i,borderRadiusLG:a,badgeOffset:l,dotOffsetInSquare:s,dotOffsetInCircle:u}=e;return{[n]:y(y({},qe(e)),{border:"none",position:"fixed",cursor:"pointer",zIndex:99,display:"block",justifyContent:"center",alignItems:"center",width:i,height:i,insetInlineEnd:e.floatButtonInsetInlineEnd,insetBlockEnd:e.floatButtonInsetBlockEnd,boxShadow:e.boxShadowSecondary,"&-pure":{position:"relative",inset:"auto"},"&:empty":{display:"none"},[`${t}-badge`]:{width:"100%",height:"100%",[`${t}-badge-count`]:{transform:"translate(0, 0)",transformOrigin:"center",top:-l,insetInlineEnd:-l}},[`${n}-body`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",transition:`all ${e.motionDurationMid}`,[`${n}-content`]:{overflow:"hidden",textAlign:"center",minHeight:i,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:`${o/2}px ${o}px`,[`${n}-icon`]:{textAlign:"center",margin:"auto",width:r,fontSize:r,lineHeight:1}}}}),[`${n}-rtl`]:{direction:"rtl"},[`${n}-circle`]:{height:i,borderRadius:"50%",[`${t}-badge`]:{[`${t}-badge-dot`]:{top:u,insetInlineEnd:u}},[`${n}-body`]:{borderRadius:"50%"}},[`${n}-square`]:{height:"auto",minHeight:i,borderRadius:a,[`${t}-badge`]:{[`${t}-badge-dot`]:{top:s,insetInlineEnd:s}},[`${n}-body`]:{height:"auto",borderRadius:a}},[`${n}-default`]:{backgroundColor:e.floatButtonBackgroundColor,transition:`background-color ${e.motionDurationMid}`,[`${n}-body`]:{backgroundColor:e.floatButtonBackgroundColor,transition:`background-color ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.colorFillContent},[`${n}-content`]:{[`${n}-icon`]:{color:e.colorText},[`${n}-description`]:{display:"flex",alignItems:"center",lineHeight:`${e.fontSizeLG}px`,color:e.colorText,fontSize:e.fontSizeSM}}}},[`${n}-primary`]:{backgroundColor:e.colorPrimary,[`${n}-body`]:{backgroundColor:e.colorPrimary,transition:`background-color ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.colorPrimaryHover},[`${n}-content`]:{[`${n}-icon`]:{color:e.colorTextLightSolid},[`${n}-description`]:{display:"flex",alignItems:"center",lineHeight:`${e.fontSizeLG}px`,color:e.colorTextLightSolid,fontSize:e.fontSizeSM}}}}}},Hx=Ue("FloatButton",e=>{const{colorTextLightSolid:t,colorBgElevated:n,controlHeightLG:o,marginXXL:r,marginLG:i,fontSize:a,fontSizeIcon:l,controlItemBgHover:s,paddingXXS:u,borderRadiusLG:c}=e,d=Be(e,{floatButtonBackgroundColor:n,floatButtonColor:t,floatButtonHoverBackgroundColor:s,floatButtonFontSize:a,floatButtonIconSize:l*1.5,floatButtonSize:o,floatButtonInsetBlockEnd:r,floatButtonInsetInlineEnd:i,floatButtonBodySize:o-u*2,floatButtonBodyPadding:u,badgeOffset:u*1.5,dotOffsetInCircle:t4(o/2),dotOffsetInSquare:t4(c)});return[Wle(d),Vle(d),AC(e),jle(d)]});var Kle=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r(s==null?void 0:s.value)||e.shape);return()=>{var d;const{prefixCls:f,type:p="default",shape:v="circle",description:h=(d=o.description)===null||d===void 0?void 0:d.call(o),tooltip:m,badge:b={}}=e,S=Kle(e,["prefixCls","type","shape","description","tooltip","badge"]),C=ge(r.value,`${r.value}-${p}`,`${r.value}-${c.value}`,{[`${r.value}-rtl`]:i.value==="rtl"},n.class,l.value),$=g(Ro,{placement:"left"},{title:o.tooltip||m?()=>o.tooltip&&o.tooltip()||m:void 0,default:()=>g(nd,b,{default:()=>[g("div",{class:`${r.value}-body`},[g(Hle,{prefixCls:r.value},{icon:o.icon,description:()=>h})])]})});return a(e.href?g("a",k(k(k({ref:u},n),S),{},{class:C}),[$]):g("button",k(k(k({ref:u},n),S),{},{class:C,type:"button"}),[$]))}}}),wh=le({compatConfig:{MODE:3},name:"AFloatButtonGroup",inheritAttrs:!1,props:Qe(Fle(),{type:"default",shape:"circle"}),setup(e,t){let{attrs:n,slots:o,emit:r}=t;const{prefixCls:i,direction:a}=Te(zx,e),[l,s]=Hx(i),[u,c]=Dt(!1,{value:E(()=>e.open)}),d=ae(null),f=ae(null);zle({shape:E(()=>e.shape)});const p={onMouseenter(){var b;c(!0),r("update:open",!0),(b=e.onOpenChange)===null||b===void 0||b.call(e,!0)},onMouseleave(){var b;c(!1),r("update:open",!1),(b=e.onOpenChange)===null||b===void 0||b.call(e,!1)}},v=E(()=>e.trigger==="hover"?p:{}),h=()=>{var b;const S=!u.value;r("update:open",S),(b=e.onOpenChange)===null||b===void 0||b.call(e,S),c(S)},m=b=>{var S,C,$;if(!((S=d.value)===null||S===void 0)&&S.contains(b.target)){!((C=Co(f.value))===null||C===void 0)&&C.contains(b.target)&&h();return}c(!1),r("update:open",!1),($=e.onOpenChange)===null||$===void 0||$.call(e,!1)};return be(E(()=>e.trigger),b=>{so()&&(document.removeEventListener("click",m),b==="click"&&document.addEventListener("click",m))},{immediate:!0}),tt(()=>{document.removeEventListener("click",m)}),()=>{var b;const{shape:S="circle",type:C="default",tooltip:$,description:x,trigger:P}=e,w=`${i.value}-group`,O=ge(w,s.value,n.class,{[`${w}-rtl`]:a.value==="rtl",[`${w}-${S}`]:S,[`${w}-${S}-shadow`]:!P}),I=ge(s.value,`${w}-wrap`),_=Cr(`${w}-wrap`);return l(g("div",k(k({ref:d},n),{},{class:O},v.value),[P&&["click","hover"].includes(P)?g(Le,null,[g(Nn,_,{default:()=>[Pn(g("div",{class:I},[o.default&&o.default()]),[[Vn,u.value]])]}),g(ka,{ref:f,type:C,shape:S,tooltip:$,description:x},{icon:()=>{var T,A;return u.value?((T=o.closeIcon)===null||T===void 0?void 0:T.call(o))||g(fo,null,null):((A=o.icon)===null||A===void 0?void 0:A.call(o))||g(mm,null,null)},tooltip:o.tooltip,description:o.description})]):(b=o.default)===null||b===void 0?void 0:b.call(o)]))}}});var Ule={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 168H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM518.3 355a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V848c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V509.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 355z"}}]},name:"vertical-align-top",theme:"outlined"};function n4(e){for(var t=1;twindow,duration:450,type:"default",shape:"circle"}),setup(e,t){let{slots:n,attrs:o,emit:r}=t;const{prefixCls:i,direction:a}=Te(zx,e),[l]=Hx(i),s=ae(),u=rt({visible:e.visibilityHeight===0,scrollEvent:null}),c=()=>s.value&&s.value.ownerDocument?s.value.ownerDocument:window,d=m=>{const{target:b=c,duration:S}=e;US(0,{getContainer:b,duration:S}),r("click",m)},f=gy(m=>{const{visibilityHeight:b}=e,S=KS(m.target);u.visible=S>=b}),p=()=>{const{target:m}=e,S=(m||c)();f({target:S}),S==null||S.addEventListener("scroll",f)},v=()=>{const{target:m}=e,S=(m||c)();f.cancel(),S==null||S.removeEventListener("scroll",f)};be(()=>e.target,()=>{v(),ot(()=>{p()})}),Ke(()=>{ot(()=>{p()})}),lv(()=>{ot(()=>{p()})}),J_(()=>{v()}),tt(()=>{v()});const h=rD();return()=>{const{description:m,type:b,shape:S,tooltip:C,badge:$}=e,x=y(y({},o),{shape:(h==null?void 0:h.shape.value)||S,onClick:d,class:{[`${i.value}`]:!0,[`${o.class}`]:o.class,[`${i.value}-rtl`]:a.value==="rtl"},description:m,type:b,tooltip:C,badge:$}),P=Cr("fade");return l(g(Nn,P,{default:()=>[Pn(g(ka,k(k({},x),{},{ref:s}),{icon:()=>{var w;return((w=n.icon)===null||w===void 0?void 0:w.call(n))||g(jx,null,null)}}),[[Vn,u.visible]])]}))}}});ka.Group=wh;ka.BackTop=Ph;ka.install=function(e){return e.component(ka.name,ka),e.component(wh.name,wh),e.component(Ph.name,Ph),e};const ld=e=>e!=null&&(Array.isArray(e)?zt(e).length:!0);function Wx(e){return ld(e.prefix)||ld(e.suffix)||ld(e.allowClear)}function ig(e){return ld(e.addonBefore)||ld(e.addonAfter)}function h1(e){return typeof e>"u"||e===null?"":String(e)}function sd(e,t,n,o){if(!n)return;const r=t;if(t.type==="click"){Object.defineProperty(r,"target",{writable:!0}),Object.defineProperty(r,"currentTarget",{writable:!0});const i=e.cloneNode(!0);r.target=i,r.currentTarget=i,i.value="",n(r);return}if(o!==void 0){Object.defineProperty(r,"target",{writable:!0}),Object.defineProperty(r,"currentTarget",{writable:!0}),r.target=e,r.currentTarget=e,e.value=o,n(r);return}n(r)}function iD(e,t){if(!e)return;e.focus(t);const{cursor:n}=t||{};if(n){const o=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(o,o);break;default:e.setSelectionRange(0,o)}}}const Xle=()=>({addonBefore:K.any,addonAfter:K.any,prefix:K.any,suffix:K.any,clearIcon:K.any,affixWrapperClassName:String,groupClassName:String,wrapperClassName:String,inputClassName:String,allowClear:{type:Boolean,default:void 0}}),aD=()=>y(y({},Xle()),{value:{type:[String,Number,Symbol],default:void 0},defaultValue:{type:[String,Number,Symbol],default:void 0},inputElement:K.any,prefixCls:String,disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},triggerFocus:Function,readonly:{type:Boolean,default:void 0},handleReset:Function,hidden:{type:Boolean,default:void 0}}),lD=()=>y(y({},aD()),{id:String,placeholder:{type:[String,Number]},autocomplete:String,type:Ne("text"),name:String,size:{type:String},autofocus:{type:Boolean,default:void 0},lazy:{type:Boolean,default:!0},maxlength:Number,loading:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},showCount:{type:[Boolean,Object]},htmlSize:Number,onPressEnter:Function,onKeydown:Function,onKeyup:Function,onFocus:Function,onBlur:Function,onChange:Function,onInput:Function,"onUpdate:value":Function,onCompositionstart:Function,onCompositionend:Function,valueModifiers:Object,hidden:{type:Boolean,default:void 0},status:String}),Yle=le({name:"BaseInput",inheritAttrs:!1,props:aD(),setup(e,t){let{slots:n,attrs:o}=t;const r=ae(),i=l=>{var s;if(!((s=r.value)===null||s===void 0)&&s.contains(l.target)){const{triggerFocus:u}=e;u==null||u()}},a=()=>{var l;const{allowClear:s,value:u,disabled:c,readonly:d,handleReset:f,suffix:p=n.suffix,prefixCls:v}=e;if(!s)return null;const h=!c&&!d&&u,m=`${v}-clear-icon`,b=((l=n.clearIcon)===null||l===void 0?void 0:l.call(n))||"*";return g("span",{onClick:f,onMousedown:S=>S.preventDefault(),class:ge({[`${m}-hidden`]:!h,[`${m}-has-suffix`]:!!p},m),role:"button",tabindex:-1},[b])};return()=>{var l,s;const{focused:u,value:c,disabled:d,allowClear:f,readonly:p,hidden:v,prefixCls:h,prefix:m=(l=n.prefix)===null||l===void 0?void 0:l.call(n),suffix:b=(s=n.suffix)===null||s===void 0?void 0:s.call(n),addonAfter:S=n.addonAfter,addonBefore:C=n.addonBefore,inputElement:$,affixWrapperClassName:x,wrapperClassName:P,groupClassName:w}=e;let O=mt($,{value:c,hidden:v});if(Wx({prefix:m,suffix:b,allowClear:f})){const I=`${h}-affix-wrapper`,_=ge(I,{[`${I}-disabled`]:d,[`${I}-focused`]:u,[`${I}-readonly`]:p,[`${I}-input-with-clear-btn`]:b&&f&&c},!ig({addonAfter:S,addonBefore:C})&&o.class,x),T=(b||f)&&g("span",{class:`${h}-suffix`},[a(),b]);O=g("span",{class:_,style:o.style,hidden:!ig({addonAfter:S,addonBefore:C})&&v,onMousedown:i,ref:r},[m&&g("span",{class:`${h}-prefix`},[m]),mt($,{style:null,value:c,hidden:null}),T])}if(ig({addonAfter:S,addonBefore:C})){const I=`${h}-group`,_=`${I}-addon`,T=ge(`${h}-wrapper`,I,P),A=ge(`${h}-group-wrapper`,o.class,w);return g("span",{class:A,style:o.style,hidden:v},[g("span",{class:T},[C&&g("span",{class:_},[C]),mt(O,{style:null,hidden:null}),S&&g("span",{class:_},[S])])])}return O}}});var qle=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.value,()=>{a.value=e.value}),be(()=>e.disabled,()=>{e.disabled&&(l.value=!1)});const c=w=>{s.value&&iD(s.value.input,w)},d=()=>{var w;(w=s.value.input)===null||w===void 0||w.blur()},f=(w,O,I)=>{var _;(_=s.value.input)===null||_===void 0||_.setSelectionRange(w,O,I)},p=()=>{var w;(w=s.value.input)===null||w===void 0||w.select()};r({focus:c,blur:d,input:E(()=>{var w;return(w=s.value.input)===null||w===void 0?void 0:w.input}),stateValue:a,setSelectionRange:f,select:p});const v=w=>{i("change",w)},h=(w,O)=>{a.value!==w&&(e.value===void 0?a.value=w:ot(()=>{var I;s.value.input.value!==a.value&&((I=u.value)===null||I===void 0||I.$forceUpdate())}),ot(()=>{O&&O()}))},m=w=>{const{value:O}=w.target;if(a.value===O)return;const I=w.target.value;sd(s.value.input,w,v),h(I)},b=w=>{w.keyCode===13&&i("pressEnter",w),i("keydown",w)},S=w=>{l.value=!0,i("focus",w)},C=w=>{l.value=!1,i("blur",w)},$=w=>{sd(s.value.input,w,v),h("",()=>{c()})},x=()=>{var w,O;const{addonBefore:I=n.addonBefore,addonAfter:_=n.addonAfter,disabled:T,valueModifiers:A={},htmlSize:R,autocomplete:H,prefixCls:M,inputClassName:D,prefix:N=(w=n.prefix)===null||w===void 0?void 0:w.call(n),suffix:L=(O=n.suffix)===null||O===void 0?void 0:O.call(n),allowClear:F,type:B="text"}=e,j=it(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","bordered","htmlSize","lazy","showCount","valueModifiers","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName"]),z=y(y(y({},j),o),{autocomplete:H,onChange:m,onInput:m,onFocus:S,onBlur:C,onKeydown:b,class:ge(M,{[`${M}-disabled`]:T},D,!ig({addonAfter:_,addonBefore:I})&&!Wx({prefix:N,suffix:L,allowClear:F})&&o.class),ref:s,key:"ant-input",size:R,type:B,lazy:e.lazy});return A.lazy&&delete z.onInput,z.autofocus||delete z.autofocus,g(Xc,it(z,["size"]),null)},P=()=>{var w;const{maxlength:O,suffix:I=(w=n.suffix)===null||w===void 0?void 0:w.call(n),showCount:_,prefixCls:T}=e,A=Number(O)>0;if(I||_){const R=[...h1(a.value)].length,H=typeof _=="object"?_.formatter({count:R,maxlength:O}):`${R}${A?` / ${O}`:""}`;return g(Le,null,[!!_&&g("span",{class:ge(`${T}-show-count-suffix`,{[`${T}-show-count-has-suffix`]:!!I})},[H]),I])}return null};return Ke(()=>{}),()=>{const{prefixCls:w,disabled:O}=e,I=qle(e,["prefixCls","disabled"]);return g(Yle,k(k(k({},I),o),{},{ref:u,prefixCls:w,inputElement:x(),handleReset:$,value:h1(a.value),focused:l.value,triggerFocus:c,suffix:P(),disabled:O}),n)}}}),bm=()=>it(lD(),["wrapperClassName","groupClassName","inputClassName","affixWrapperClassName"]),sD=()=>y(y({},it(bm(),["prefix","addonBefore","addonAfter","suffix"])),{rows:Number,autosize:{type:[Boolean,Object],default:void 0},autoSize:{type:[Boolean,Object],default:void 0},onResize:{type:Function},onCompositionstart:zl(),onCompositionend:zl(),valueModifiers:Object});var Zle=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rYr(s.status,e.status)),{direction:c,prefixCls:d,size:f,autocomplete:p}=Te("input",e),{compactSize:v,compactItemClassnames:h}=Xa(d,c),m=E(()=>v.value||f.value),[b,S]=yx(d),C=ko();r({focus:R=>{var H;(H=a.value)===null||H===void 0||H.focus(R)},blur:()=>{var R;(R=a.value)===null||R===void 0||R.blur()},input:a,setSelectionRange:(R,H,M)=>{var D;(D=a.value)===null||D===void 0||D.setSelectionRange(R,H,M)},select:()=>{var R;(R=a.value)===null||R===void 0||R.select()}});const O=ae([]),I=()=>{O.value.push(setTimeout(()=>{var R,H,M,D;!((R=a.value)===null||R===void 0)&&R.input&&((H=a.value)===null||H===void 0?void 0:H.input.getAttribute("type"))==="password"&&(!((M=a.value)===null||M===void 0)&&M.input.hasAttribute("value"))&&((D=a.value)===null||D===void 0||D.input.removeAttribute("value"))}))};Ke(()=>{I()}),cv(()=>{O.value.forEach(R=>clearTimeout(R))}),tt(()=>{O.value.forEach(R=>clearTimeout(R))});const _=R=>{I(),i("blur",R),l.onFieldBlur()},T=R=>{I(),i("focus",R)},A=R=>{i("update:value",R.target.value),i("change",R),i("input",R),l.onFieldChange()};return()=>{var R,H,M,D,N,L;const{hasFeedback:F,feedbackIcon:B}=s,{allowClear:j,bordered:z=!0,prefix:G=(R=n.prefix)===null||R===void 0?void 0:R.call(n),suffix:Q=(H=n.suffix)===null||H===void 0?void 0:H.call(n),addonAfter:Y=(M=n.addonAfter)===null||M===void 0?void 0:M.call(n),addonBefore:oe=(D=n.addonBefore)===null||D===void 0?void 0:D.call(n),id:Z=(N=l.id)===null||N===void 0?void 0:N.value}=e,re=Zle(e,["allowClear","bordered","prefix","suffix","addonAfter","addonBefore","id"]),ne=(F||Q)&&g(Le,null,[Q,F&&B]),X=d.value,te=Wx({prefix:G,suffix:Q})||!!F,W=n.clearIcon||(()=>g(po,null,null));return b(g(Jle,k(k(k({},o),it(re,["onUpdate:value","onChange","onInput"])),{},{onChange:A,id:Z,disabled:(L=e.disabled)!==null&&L!==void 0?L:C.value,ref:a,prefixCls:X,autocomplete:p.value,onBlur:_,onFocus:T,prefix:G,suffix:ne,allowClear:j,addonAfter:Y&&g(Bd,null,{default:()=>[g(Jg,null,{default:()=>[Y]})]}),addonBefore:oe&&g(Bd,null,{default:()=>[g(Jg,null,{default:()=>[oe]})]}),class:[o.class,h.value],inputClassName:ge({[`${X}-sm`]:m.value==="small",[`${X}-lg`]:m.value==="large",[`${X}-rtl`]:c.value==="rtl",[`${X}-borderless`]:!z},!te&&lo(X,u.value),S.value),affixWrapperClassName:ge({[`${X}-affix-wrapper-sm`]:m.value==="small",[`${X}-affix-wrapper-lg`]:m.value==="large",[`${X}-affix-wrapper-rtl`]:c.value==="rtl",[`${X}-affix-wrapper-borderless`]:!z},lo(`${X}-affix-wrapper`,u.value,F),S.value),wrapperClassName:ge({[`${X}-group-rtl`]:c.value==="rtl"},S.value),groupClassName:ge({[`${X}-group-wrapper-sm`]:m.value==="small",[`${X}-group-wrapper-lg`]:m.value==="large",[`${X}-group-wrapper-rtl`]:c.value==="rtl"},lo(`${X}-group-wrapper`,u.value,F),S.value)}),y(y({},n),{clearIcon:W})))}}}),cD=le({compatConfig:{MODE:3},name:"AInputGroup",inheritAttrs:!1,props:{prefixCls:String,size:{type:String},compact:{type:Boolean,default:void 0}},setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i,getPrefixCls:a}=Te("input-group",e),l=kn.useInject();kn.useProvide(l,{isFormItemInput:!1});const s=E(()=>a("input")),[u,c]=yx(s),d=E(()=>{const f=r.value;return{[`${f}`]:!0,[c.value]:!0,[`${f}-lg`]:e.size==="large",[`${f}-sm`]:e.size==="small",[`${f}-compact`]:e.compact,[`${f}-rtl`]:i.value==="rtl"}});return()=>{var f;return u(g("span",k(k({},o),{},{class:ge(d.value,o.class)}),[(f=n.default)===null||f===void 0?void 0:f.call(n)]))}}});var Qle=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var x;(x=a.value)===null||x===void 0||x.focus()},blur:()=>{var x;(x=a.value)===null||x===void 0||x.blur()}});const c=x=>{i("update:value",x.target.value),x&&x.target&&x.type==="click"&&i("search",x.target.value,x),i("change",x)},d=x=>{var P;document.activeElement===((P=a.value)===null||P===void 0?void 0:P.input)&&x.preventDefault()},f=x=>{var P,w;i("search",(w=(P=a.value)===null||P===void 0?void 0:P.input)===null||w===void 0?void 0:w.stateValue,x)},p=x=>{l.value||e.loading||f(x)},v=x=>{l.value=!0,i("compositionstart",x)},h=x=>{l.value=!1,i("compositionend",x)},{prefixCls:m,getPrefixCls:b,direction:S,size:C}=Te("input-search",e),$=E(()=>b("input",e.inputPrefixCls));return()=>{var x,P,w,O;const{disabled:I,loading:_,addonAfter:T=(x=n.addonAfter)===null||x===void 0?void 0:x.call(n),suffix:A=(P=n.suffix)===null||P===void 0?void 0:P.call(n)}=e,R=Qle(e,["disabled","loading","addonAfter","suffix"]);let{enterButton:H=(O=(w=n.enterButton)===null||w===void 0?void 0:w.call(n))!==null&&O!==void 0?O:!1}=e;H=H||H==="";const M=typeof H=="boolean"?g(qc,null,null):null,D=`${m.value}-button`,N=Array.isArray(H)?H[0]:H;let L;const F=N.type&&Bv(N.type)&&N.type.__ANT_BUTTON;if(F||N.tagName==="button")L=mt(N,y({onMousedown:d,onClick:f,key:"enterButton"},F?{class:D,size:C.value}:{}),!1);else{const j=M&&!H;L=g(Qt,{class:D,type:H?"primary":void 0,size:C.value,disabled:I,key:"enterButton",onMousedown:d,onClick:f,loading:_,icon:j?M:null},{default:()=>[j?null:M||H]})}T&&(L=[L,T]);const B=ge(m.value,{[`${m.value}-rtl`]:S.value==="rtl",[`${m.value}-${C.value}`]:!!C.value,[`${m.value}-with-button`]:!!H},o.class);return g(Cn,k(k(k({ref:a},it(R,["onUpdate:value","onSearch","enterButton"])),o),{},{onPressEnter:p,onCompositionstart:v,onCompositionend:h,size:C.value,prefixCls:$.value,addonAfter:L,suffix:A,onChange:c,class:B,disabled:I}),n)}}}),o4=e=>e!=null&&(Array.isArray(e)?zt(e).length:!0);function ese(e){return o4(e.addonBefore)||o4(e.addonAfter)}const tse=["text","input"],nse=le({compatConfig:{MODE:3},name:"ClearableLabeledInput",inheritAttrs:!1,props:{prefixCls:String,inputType:K.oneOf(Jn("text","input")),value:It(),defaultValue:It(),allowClear:{type:Boolean,default:void 0},element:It(),handleReset:Function,disabled:{type:Boolean,default:void 0},direction:{type:String},size:{type:String},suffix:It(),prefix:It(),addonBefore:It(),addonAfter:It(),readonly:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},bordered:{type:Boolean,default:!0},triggerFocus:{type:Function},hidden:Boolean,status:String,hashId:String},setup(e,t){let{slots:n,attrs:o}=t;const r=kn.useInject(),i=l=>{const{value:s,disabled:u,readonly:c,handleReset:d,suffix:f=n.suffix}=e,p=!u&&!c&&s,v=`${l}-clear-icon`;return g(po,{onClick:d,onMousedown:h=>h.preventDefault(),class:ge({[`${v}-hidden`]:!p,[`${v}-has-suffix`]:!!f},v),role:"button"},null)},a=(l,s)=>{const{value:u,allowClear:c,direction:d,bordered:f,hidden:p,status:v,addonAfter:h=n.addonAfter,addonBefore:m=n.addonBefore,hashId:b}=e,{status:S,hasFeedback:C}=r;if(!c)return mt(s,{value:u,disabled:e.disabled});const $=ge(`${l}-affix-wrapper`,`${l}-affix-wrapper-textarea-with-clear-btn`,lo(`${l}-affix-wrapper`,Yr(S,v),C),{[`${l}-affix-wrapper-rtl`]:d==="rtl",[`${l}-affix-wrapper-borderless`]:!f,[`${o.class}`]:!ese({addonAfter:h,addonBefore:m})&&o.class},b);return g("span",{class:$,style:o.style,hidden:p},[mt(s,{style:null,value:u,disabled:e.disabled}),i(l)])};return()=>{var l;const{prefixCls:s,inputType:u,element:c=(l=n.element)===null||l===void 0?void 0:l.call(n)}=e;return u===tse[0]?a(s,c):null}}}),ose=` + `]:{opacity:0,animationTimingFunction:r},[`&${i}-wrap-leave`]:{animationTimingFunction:r}}}]},Wle=e=>{const{antCls:t,componentCls:n,floatButtonSize:o,margin:r,borderRadiusLG:i,borderRadiusSM:a,badgeOffset:l,floatButtonBodyPadding:s}=e,u=`${n}-group`;return{[u]:y(y({},qe(e)),{zIndex:99,display:"block",border:"none",position:"fixed",width:o,height:"auto",boxShadow:"none",minHeight:o,insetInlineEnd:e.floatButtonInsetInlineEnd,insetBlockEnd:e.floatButtonInsetBlockEnd,borderRadius:i,[`${u}-wrap`]:{zIndex:-1,display:"block",position:"relative",marginBottom:r},[`&${u}-rtl`]:{direction:"rtl"},[n]:{position:"static"}}),[`${u}-circle`]:{[`${n}-circle:not(:last-child)`]:{marginBottom:e.margin,[`${n}-body`]:{width:o,height:o,borderRadius:"50%"}}},[`${u}-square`]:{[`${n}-square`]:{borderRadius:0,padding:0,"&:first-child":{borderStartStartRadius:i,borderStartEndRadius:i},"&:last-child":{borderEndStartRadius:i,borderEndEndRadius:i},"&:not(:last-child)":{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${t}-badge`]:{[`${t}-badge-count`]:{top:-(s+l),insetInlineEnd:-(s+l)}}},[`${u}-wrap`]:{display:"block",borderRadius:i,boxShadow:e.boxShadowSecondary,[`${n}-square`]:{boxShadow:"none",marginTop:0,borderRadius:0,padding:s,"&:first-child":{borderStartStartRadius:i,borderStartEndRadius:i},"&:last-child":{borderEndStartRadius:i,borderEndEndRadius:i},"&:not(:last-child)":{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${n}-body`]:{width:e.floatButtonBodySize,height:e.floatButtonBodySize}}}},[`${u}-circle-shadow`]:{boxShadow:"none"},[`${u}-square-shadow`]:{boxShadow:e.boxShadowSecondary,[`${n}-square`]:{boxShadow:"none",padding:s,[`${n}-body`]:{width:e.floatButtonBodySize,height:e.floatButtonBodySize,borderRadius:a}}}}},Vle=e=>{const{antCls:t,componentCls:n,floatButtonBodyPadding:o,floatButtonIconSize:r,floatButtonSize:i,borderRadiusLG:a,badgeOffset:l,dotOffsetInSquare:s,dotOffsetInCircle:u}=e;return{[n]:y(y({},qe(e)),{border:"none",position:"fixed",cursor:"pointer",zIndex:99,display:"block",justifyContent:"center",alignItems:"center",width:i,height:i,insetInlineEnd:e.floatButtonInsetInlineEnd,insetBlockEnd:e.floatButtonInsetBlockEnd,boxShadow:e.boxShadowSecondary,"&-pure":{position:"relative",inset:"auto"},"&:empty":{display:"none"},[`${t}-badge`]:{width:"100%",height:"100%",[`${t}-badge-count`]:{transform:"translate(0, 0)",transformOrigin:"center",top:-l,insetInlineEnd:-l}},[`${n}-body`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",transition:`all ${e.motionDurationMid}`,[`${n}-content`]:{overflow:"hidden",textAlign:"center",minHeight:i,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:`${o/2}px ${o}px`,[`${n}-icon`]:{textAlign:"center",margin:"auto",width:r,fontSize:r,lineHeight:1}}}}),[`${n}-rtl`]:{direction:"rtl"},[`${n}-circle`]:{height:i,borderRadius:"50%",[`${t}-badge`]:{[`${t}-badge-dot`]:{top:u,insetInlineEnd:u}},[`${n}-body`]:{borderRadius:"50%"}},[`${n}-square`]:{height:"auto",minHeight:i,borderRadius:a,[`${t}-badge`]:{[`${t}-badge-dot`]:{top:s,insetInlineEnd:s}},[`${n}-body`]:{height:"auto",borderRadius:a}},[`${n}-default`]:{backgroundColor:e.floatButtonBackgroundColor,transition:`background-color ${e.motionDurationMid}`,[`${n}-body`]:{backgroundColor:e.floatButtonBackgroundColor,transition:`background-color ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.colorFillContent},[`${n}-content`]:{[`${n}-icon`]:{color:e.colorText},[`${n}-description`]:{display:"flex",alignItems:"center",lineHeight:`${e.fontSizeLG}px`,color:e.colorText,fontSize:e.fontSizeSM}}}},[`${n}-primary`]:{backgroundColor:e.colorPrimary,[`${n}-body`]:{backgroundColor:e.colorPrimary,transition:`background-color ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.colorPrimaryHover},[`${n}-content`]:{[`${n}-icon`]:{color:e.colorTextLightSolid},[`${n}-description`]:{display:"flex",alignItems:"center",lineHeight:`${e.fontSizeLG}px`,color:e.colorTextLightSolid,fontSize:e.fontSizeSM}}}}}},Hx=Ue("FloatButton",e=>{const{colorTextLightSolid:t,colorBgElevated:n,controlHeightLG:o,marginXXL:r,marginLG:i,fontSize:a,fontSizeIcon:l,controlItemBgHover:s,paddingXXS:u,borderRadiusLG:c}=e,d=Be(e,{floatButtonBackgroundColor:n,floatButtonColor:t,floatButtonHoverBackgroundColor:s,floatButtonFontSize:a,floatButtonIconSize:l*1.5,floatButtonSize:o,floatButtonInsetBlockEnd:r,floatButtonInsetInlineEnd:i,floatButtonBodySize:o-u*2,floatButtonBodyPadding:u,badgeOffset:u*1.5,dotOffsetInCircle:tT(o/2),dotOffsetInSquare:tT(c)});return[Wle(d),Vle(d),AC(e),jle(d)]});var Kle=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r(s==null?void 0:s.value)||e.shape);return()=>{var d;const{prefixCls:f,type:p="default",shape:v="circle",description:h=(d=o.description)===null||d===void 0?void 0:d.call(o),tooltip:m,badge:b={}}=e,S=Kle(e,["prefixCls","type","shape","description","tooltip","badge"]),C=ge(r.value,`${r.value}-${p}`,`${r.value}-${c.value}`,{[`${r.value}-rtl`]:i.value==="rtl"},n.class,l.value),$=g(Ro,{placement:"left"},{title:o.tooltip||m?()=>o.tooltip&&o.tooltip()||m:void 0,default:()=>g(nd,b,{default:()=>[g("div",{class:`${r.value}-body`},[g(Hle,{prefixCls:r.value},{icon:o.icon,description:()=>h})])]})});return a(e.href?g("a",k(k(k({ref:u},n),S),{},{class:C}),[$]):g("button",k(k(k({ref:u},n),S),{},{class:C,type:"button"}),[$]))}}}),$h=le({compatConfig:{MODE:3},name:"AFloatButtonGroup",inheritAttrs:!1,props:Qe(Fle(),{type:"default",shape:"circle"}),setup(e,t){let{attrs:n,slots:o,emit:r}=t;const{prefixCls:i,direction:a}=Te(zx,e),[l,s]=Hx(i),[u,c]=Dt(!1,{value:E(()=>e.open)}),d=ae(null),f=ae(null);zle({shape:E(()=>e.shape)});const p={onMouseenter(){var b;c(!0),r("update:open",!0),(b=e.onOpenChange)===null||b===void 0||b.call(e,!0)},onMouseleave(){var b;c(!1),r("update:open",!1),(b=e.onOpenChange)===null||b===void 0||b.call(e,!1)}},v=E(()=>e.trigger==="hover"?p:{}),h=()=>{var b;const S=!u.value;r("update:open",S),(b=e.onOpenChange)===null||b===void 0||b.call(e,S),c(S)},m=b=>{var S,C,$;if(!((S=d.value)===null||S===void 0)&&S.contains(b.target)){!((C=Co(f.value))===null||C===void 0)&&C.contains(b.target)&&h();return}c(!1),r("update:open",!1),($=e.onOpenChange)===null||$===void 0||$.call(e,!1)};return be(E(()=>e.trigger),b=>{so()&&(document.removeEventListener("click",m),b==="click"&&document.addEventListener("click",m))},{immediate:!0}),tt(()=>{document.removeEventListener("click",m)}),()=>{var b;const{shape:S="circle",type:C="default",tooltip:$,description:x,trigger:P}=e,w=`${i.value}-group`,O=ge(w,s.value,n.class,{[`${w}-rtl`]:a.value==="rtl",[`${w}-${S}`]:S,[`${w}-${S}-shadow`]:!P}),I=ge(s.value,`${w}-wrap`),_=Cr(`${w}-wrap`);return l(g("div",k(k({ref:d},n),{},{class:O},v.value),[P&&["click","hover"].includes(P)?g(Le,null,[g(Nn,_,{default:()=>[Pn(g("div",{class:I},[o.default&&o.default()]),[[Vn,u.value]])]}),g(ka,{ref:f,type:C,shape:S,tooltip:$,description:x},{icon:()=>{var T,A;return u.value?((T=o.closeIcon)===null||T===void 0?void 0:T.call(o))||g(fo,null,null):((A=o.icon)===null||A===void 0?void 0:A.call(o))||g(vm,null,null)},tooltip:o.tooltip,description:o.description})]):(b=o.default)===null||b===void 0?void 0:b.call(o)]))}}});var Ule={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 168H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM518.3 355a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V848c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V509.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 355z"}}]},name:"vertical-align-top",theme:"outlined"};function nT(e){for(var t=1;twindow,duration:450,type:"default",shape:"circle"}),setup(e,t){let{slots:n,attrs:o,emit:r}=t;const{prefixCls:i,direction:a}=Te(zx,e),[l]=Hx(i),s=ae(),u=rt({visible:e.visibilityHeight===0,scrollEvent:null}),c=()=>s.value&&s.value.ownerDocument?s.value.ownerDocument:window,d=m=>{const{target:b=c,duration:S}=e;US(0,{getContainer:b,duration:S}),r("click",m)},f=gy(m=>{const{visibilityHeight:b}=e,S=KS(m.target);u.visible=S>=b}),p=()=>{const{target:m}=e,S=(m||c)();f({target:S}),S==null||S.addEventListener("scroll",f)},v=()=>{const{target:m}=e,S=(m||c)();f.cancel(),S==null||S.removeEventListener("scroll",f)};be(()=>e.target,()=>{v(),ot(()=>{p()})}),Ke(()=>{ot(()=>{p()})}),av(()=>{ot(()=>{p()})}),J_(()=>{v()}),tt(()=>{v()});const h=rD();return()=>{const{description:m,type:b,shape:S,tooltip:C,badge:$}=e,x=y(y({},o),{shape:(h==null?void 0:h.shape.value)||S,onClick:d,class:{[`${i.value}`]:!0,[`${o.class}`]:o.class,[`${i.value}-rtl`]:a.value==="rtl"},description:m,type:b,tooltip:C,badge:$}),P=Cr("fade");return l(g(Nn,P,{default:()=>[Pn(g(ka,k(k({},x),{},{ref:s}),{icon:()=>{var w;return((w=n.icon)===null||w===void 0?void 0:w.call(n))||g(jx,null,null)}}),[[Vn,u.visible]])]}))}}});ka.Group=$h;ka.BackTop=wh;ka.install=function(e){return e.component(ka.name,ka),e.component($h.name,$h),e.component(wh.name,wh),e};const ld=e=>e!=null&&(Array.isArray(e)?zt(e).length:!0);function Wx(e){return ld(e.prefix)||ld(e.suffix)||ld(e.allowClear)}function rg(e){return ld(e.addonBefore)||ld(e.addonAfter)}function h1(e){return typeof e>"u"||e===null?"":String(e)}function sd(e,t,n,o){if(!n)return;const r=t;if(t.type==="click"){Object.defineProperty(r,"target",{writable:!0}),Object.defineProperty(r,"currentTarget",{writable:!0});const i=e.cloneNode(!0);r.target=i,r.currentTarget=i,i.value="",n(r);return}if(o!==void 0){Object.defineProperty(r,"target",{writable:!0}),Object.defineProperty(r,"currentTarget",{writable:!0}),r.target=e,r.currentTarget=e,e.value=o,n(r);return}n(r)}function iD(e,t){if(!e)return;e.focus(t);const{cursor:n}=t||{};if(n){const o=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(o,o);break;default:e.setSelectionRange(0,o)}}}const Xle=()=>({addonBefore:K.any,addonAfter:K.any,prefix:K.any,suffix:K.any,clearIcon:K.any,affixWrapperClassName:String,groupClassName:String,wrapperClassName:String,inputClassName:String,allowClear:{type:Boolean,default:void 0}}),aD=()=>y(y({},Xle()),{value:{type:[String,Number,Symbol],default:void 0},defaultValue:{type:[String,Number,Symbol],default:void 0},inputElement:K.any,prefixCls:String,disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},triggerFocus:Function,readonly:{type:Boolean,default:void 0},handleReset:Function,hidden:{type:Boolean,default:void 0}}),lD=()=>y(y({},aD()),{id:String,placeholder:{type:[String,Number]},autocomplete:String,type:Ne("text"),name:String,size:{type:String},autofocus:{type:Boolean,default:void 0},lazy:{type:Boolean,default:!0},maxlength:Number,loading:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},showCount:{type:[Boolean,Object]},htmlSize:Number,onPressEnter:Function,onKeydown:Function,onKeyup:Function,onFocus:Function,onBlur:Function,onChange:Function,onInput:Function,"onUpdate:value":Function,onCompositionstart:Function,onCompositionend:Function,valueModifiers:Object,hidden:{type:Boolean,default:void 0},status:String}),Yle=le({name:"BaseInput",inheritAttrs:!1,props:aD(),setup(e,t){let{slots:n,attrs:o}=t;const r=ae(),i=l=>{var s;if(!((s=r.value)===null||s===void 0)&&s.contains(l.target)){const{triggerFocus:u}=e;u==null||u()}},a=()=>{var l;const{allowClear:s,value:u,disabled:c,readonly:d,handleReset:f,suffix:p=n.suffix,prefixCls:v}=e;if(!s)return null;const h=!c&&!d&&u,m=`${v}-clear-icon`,b=((l=n.clearIcon)===null||l===void 0?void 0:l.call(n))||"*";return g("span",{onClick:f,onMousedown:S=>S.preventDefault(),class:ge({[`${m}-hidden`]:!h,[`${m}-has-suffix`]:!!p},m),role:"button",tabindex:-1},[b])};return()=>{var l,s;const{focused:u,value:c,disabled:d,allowClear:f,readonly:p,hidden:v,prefixCls:h,prefix:m=(l=n.prefix)===null||l===void 0?void 0:l.call(n),suffix:b=(s=n.suffix)===null||s===void 0?void 0:s.call(n),addonAfter:S=n.addonAfter,addonBefore:C=n.addonBefore,inputElement:$,affixWrapperClassName:x,wrapperClassName:P,groupClassName:w}=e;let O=mt($,{value:c,hidden:v});if(Wx({prefix:m,suffix:b,allowClear:f})){const I=`${h}-affix-wrapper`,_=ge(I,{[`${I}-disabled`]:d,[`${I}-focused`]:u,[`${I}-readonly`]:p,[`${I}-input-with-clear-btn`]:b&&f&&c},!rg({addonAfter:S,addonBefore:C})&&o.class,x),T=(b||f)&&g("span",{class:`${h}-suffix`},[a(),b]);O=g("span",{class:_,style:o.style,hidden:!rg({addonAfter:S,addonBefore:C})&&v,onMousedown:i,ref:r},[m&&g("span",{class:`${h}-prefix`},[m]),mt($,{style:null,value:c,hidden:null}),T])}if(rg({addonAfter:S,addonBefore:C})){const I=`${h}-group`,_=`${I}-addon`,T=ge(`${h}-wrapper`,I,P),A=ge(`${h}-group-wrapper`,o.class,w);return g("span",{class:A,style:o.style,hidden:v},[g("span",{class:T},[C&&g("span",{class:_},[C]),mt(O,{style:null,hidden:null}),S&&g("span",{class:_},[S])])])}return O}}});var qle=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.value,()=>{a.value=e.value}),be(()=>e.disabled,()=>{e.disabled&&(l.value=!1)});const c=w=>{s.value&&iD(s.value.input,w)},d=()=>{var w;(w=s.value.input)===null||w===void 0||w.blur()},f=(w,O,I)=>{var _;(_=s.value.input)===null||_===void 0||_.setSelectionRange(w,O,I)},p=()=>{var w;(w=s.value.input)===null||w===void 0||w.select()};r({focus:c,blur:d,input:E(()=>{var w;return(w=s.value.input)===null||w===void 0?void 0:w.input}),stateValue:a,setSelectionRange:f,select:p});const v=w=>{i("change",w)},h=(w,O)=>{a.value!==w&&(e.value===void 0?a.value=w:ot(()=>{var I;s.value.input.value!==a.value&&((I=u.value)===null||I===void 0||I.$forceUpdate())}),ot(()=>{O&&O()}))},m=w=>{const{value:O}=w.target;if(a.value===O)return;const I=w.target.value;sd(s.value.input,w,v),h(I)},b=w=>{w.keyCode===13&&i("pressEnter",w),i("keydown",w)},S=w=>{l.value=!0,i("focus",w)},C=w=>{l.value=!1,i("blur",w)},$=w=>{sd(s.value.input,w,v),h("",()=>{c()})},x=()=>{var w,O;const{addonBefore:I=n.addonBefore,addonAfter:_=n.addonAfter,disabled:T,valueModifiers:A={},htmlSize:R,autocomplete:H,prefixCls:M,inputClassName:D,prefix:N=(w=n.prefix)===null||w===void 0?void 0:w.call(n),suffix:L=(O=n.suffix)===null||O===void 0?void 0:O.call(n),allowClear:F,type:B="text"}=e,j=it(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","bordered","htmlSize","lazy","showCount","valueModifiers","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName"]),z=y(y(y({},j),o),{autocomplete:H,onChange:m,onInput:m,onFocus:S,onBlur:C,onKeydown:b,class:ge(M,{[`${M}-disabled`]:T},D,!rg({addonAfter:_,addonBefore:I})&&!Wx({prefix:N,suffix:L,allowClear:F})&&o.class),ref:s,key:"ant-input",size:R,type:B,lazy:e.lazy});return A.lazy&&delete z.onInput,z.autofocus||delete z.autofocus,g(Xc,it(z,["size"]),null)},P=()=>{var w;const{maxlength:O,suffix:I=(w=n.suffix)===null||w===void 0?void 0:w.call(n),showCount:_,prefixCls:T}=e,A=Number(O)>0;if(I||_){const R=[...h1(a.value)].length,H=typeof _=="object"?_.formatter({count:R,maxlength:O}):`${R}${A?` / ${O}`:""}`;return g(Le,null,[!!_&&g("span",{class:ge(`${T}-show-count-suffix`,{[`${T}-show-count-has-suffix`]:!!I})},[H]),I])}return null};return Ke(()=>{}),()=>{const{prefixCls:w,disabled:O}=e,I=qle(e,["prefixCls","disabled"]);return g(Yle,k(k(k({},I),o),{},{ref:u,prefixCls:w,inputElement:x(),handleReset:$,value:h1(a.value),focused:l.value,triggerFocus:c,suffix:P(),disabled:O}),n)}}}),mm=()=>it(lD(),["wrapperClassName","groupClassName","inputClassName","affixWrapperClassName"]),sD=()=>y(y({},it(mm(),["prefix","addonBefore","addonAfter","suffix"])),{rows:Number,autosize:{type:[Boolean,Object],default:void 0},autoSize:{type:[Boolean,Object],default:void 0},onResize:{type:Function},onCompositionstart:zl(),onCompositionend:zl(),valueModifiers:Object});var Zle=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rYr(s.status,e.status)),{direction:c,prefixCls:d,size:f,autocomplete:p}=Te("input",e),{compactSize:v,compactItemClassnames:h}=Xa(d,c),m=E(()=>v.value||f.value),[b,S]=yx(d),C=ko();r({focus:R=>{var H;(H=a.value)===null||H===void 0||H.focus(R)},blur:()=>{var R;(R=a.value)===null||R===void 0||R.blur()},input:a,setSelectionRange:(R,H,M)=>{var D;(D=a.value)===null||D===void 0||D.setSelectionRange(R,H,M)},select:()=>{var R;(R=a.value)===null||R===void 0||R.select()}});const O=ae([]),I=()=>{O.value.push(setTimeout(()=>{var R,H,M,D;!((R=a.value)===null||R===void 0)&&R.input&&((H=a.value)===null||H===void 0?void 0:H.input.getAttribute("type"))==="password"&&(!((M=a.value)===null||M===void 0)&&M.input.hasAttribute("value"))&&((D=a.value)===null||D===void 0||D.input.removeAttribute("value"))}))};Ke(()=>{I()}),sv(()=>{O.value.forEach(R=>clearTimeout(R))}),tt(()=>{O.value.forEach(R=>clearTimeout(R))});const _=R=>{I(),i("blur",R),l.onFieldBlur()},T=R=>{I(),i("focus",R)},A=R=>{i("update:value",R.target.value),i("change",R),i("input",R),l.onFieldChange()};return()=>{var R,H,M,D,N,L;const{hasFeedback:F,feedbackIcon:B}=s,{allowClear:j,bordered:z=!0,prefix:G=(R=n.prefix)===null||R===void 0?void 0:R.call(n),suffix:Q=(H=n.suffix)===null||H===void 0?void 0:H.call(n),addonAfter:Y=(M=n.addonAfter)===null||M===void 0?void 0:M.call(n),addonBefore:oe=(D=n.addonBefore)===null||D===void 0?void 0:D.call(n),id:Z=(N=l.id)===null||N===void 0?void 0:N.value}=e,re=Zle(e,["allowClear","bordered","prefix","suffix","addonAfter","addonBefore","id"]),ne=(F||Q)&&g(Le,null,[Q,F&&B]),X=d.value,te=Wx({prefix:G,suffix:Q})||!!F,W=n.clearIcon||(()=>g(po,null,null));return b(g(Jle,k(k(k({},o),it(re,["onUpdate:value","onChange","onInput"])),{},{onChange:A,id:Z,disabled:(L=e.disabled)!==null&&L!==void 0?L:C.value,ref:a,prefixCls:X,autocomplete:p.value,onBlur:_,onFocus:T,prefix:G,suffix:ne,allowClear:j,addonAfter:Y&&g(Bd,null,{default:()=>[g(qg,null,{default:()=>[Y]})]}),addonBefore:oe&&g(Bd,null,{default:()=>[g(qg,null,{default:()=>[oe]})]}),class:[o.class,h.value],inputClassName:ge({[`${X}-sm`]:m.value==="small",[`${X}-lg`]:m.value==="large",[`${X}-rtl`]:c.value==="rtl",[`${X}-borderless`]:!z},!te&&lo(X,u.value),S.value),affixWrapperClassName:ge({[`${X}-affix-wrapper-sm`]:m.value==="small",[`${X}-affix-wrapper-lg`]:m.value==="large",[`${X}-affix-wrapper-rtl`]:c.value==="rtl",[`${X}-affix-wrapper-borderless`]:!z},lo(`${X}-affix-wrapper`,u.value,F),S.value),wrapperClassName:ge({[`${X}-group-rtl`]:c.value==="rtl"},S.value),groupClassName:ge({[`${X}-group-wrapper-sm`]:m.value==="small",[`${X}-group-wrapper-lg`]:m.value==="large",[`${X}-group-wrapper-rtl`]:c.value==="rtl"},lo(`${X}-group-wrapper`,u.value,F),S.value)}),y(y({},n),{clearIcon:W})))}}}),cD=le({compatConfig:{MODE:3},name:"AInputGroup",inheritAttrs:!1,props:{prefixCls:String,size:{type:String},compact:{type:Boolean,default:void 0}},setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i,getPrefixCls:a}=Te("input-group",e),l=kn.useInject();kn.useProvide(l,{isFormItemInput:!1});const s=E(()=>a("input")),[u,c]=yx(s),d=E(()=>{const f=r.value;return{[`${f}`]:!0,[c.value]:!0,[`${f}-lg`]:e.size==="large",[`${f}-sm`]:e.size==="small",[`${f}-compact`]:e.compact,[`${f}-rtl`]:i.value==="rtl"}});return()=>{var f;return u(g("span",k(k({},o),{},{class:ge(d.value,o.class)}),[(f=n.default)===null||f===void 0?void 0:f.call(n)]))}}});var Qle=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var x;(x=a.value)===null||x===void 0||x.focus()},blur:()=>{var x;(x=a.value)===null||x===void 0||x.blur()}});const c=x=>{i("update:value",x.target.value),x&&x.target&&x.type==="click"&&i("search",x.target.value,x),i("change",x)},d=x=>{var P;document.activeElement===((P=a.value)===null||P===void 0?void 0:P.input)&&x.preventDefault()},f=x=>{var P,w;i("search",(w=(P=a.value)===null||P===void 0?void 0:P.input)===null||w===void 0?void 0:w.stateValue,x)},p=x=>{l.value||e.loading||f(x)},v=x=>{l.value=!0,i("compositionstart",x)},h=x=>{l.value=!1,i("compositionend",x)},{prefixCls:m,getPrefixCls:b,direction:S,size:C}=Te("input-search",e),$=E(()=>b("input",e.inputPrefixCls));return()=>{var x,P,w,O;const{disabled:I,loading:_,addonAfter:T=(x=n.addonAfter)===null||x===void 0?void 0:x.call(n),suffix:A=(P=n.suffix)===null||P===void 0?void 0:P.call(n)}=e,R=Qle(e,["disabled","loading","addonAfter","suffix"]);let{enterButton:H=(O=(w=n.enterButton)===null||w===void 0?void 0:w.call(n))!==null&&O!==void 0?O:!1}=e;H=H||H==="";const M=typeof H=="boolean"?g(qc,null,null):null,D=`${m.value}-button`,N=Array.isArray(H)?H[0]:H;let L;const F=N.type&&Fv(N.type)&&N.type.__ANT_BUTTON;if(F||N.tagName==="button")L=mt(N,y({onMousedown:d,onClick:f,key:"enterButton"},F?{class:D,size:C.value}:{}),!1);else{const j=M&&!H;L=g(Qt,{class:D,type:H?"primary":void 0,size:C.value,disabled:I,key:"enterButton",onMousedown:d,onClick:f,loading:_,icon:j?M:null},{default:()=>[j?null:M||H]})}T&&(L=[L,T]);const B=ge(m.value,{[`${m.value}-rtl`]:S.value==="rtl",[`${m.value}-${C.value}`]:!!C.value,[`${m.value}-with-button`]:!!H},o.class);return g(Cn,k(k(k({ref:a},it(R,["onUpdate:value","onSearch","enterButton"])),o),{},{onPressEnter:p,onCompositionstart:v,onCompositionend:h,size:C.value,prefixCls:$.value,addonAfter:L,suffix:A,onChange:c,class:B,disabled:I}),n)}}}),oT=e=>e!=null&&(Array.isArray(e)?zt(e).length:!0);function ese(e){return oT(e.addonBefore)||oT(e.addonAfter)}const tse=["text","input"],nse=le({compatConfig:{MODE:3},name:"ClearableLabeledInput",inheritAttrs:!1,props:{prefixCls:String,inputType:K.oneOf(Jn("text","input")),value:It(),defaultValue:It(),allowClear:{type:Boolean,default:void 0},element:It(),handleReset:Function,disabled:{type:Boolean,default:void 0},direction:{type:String},size:{type:String},suffix:It(),prefix:It(),addonBefore:It(),addonAfter:It(),readonly:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},bordered:{type:Boolean,default:!0},triggerFocus:{type:Function},hidden:Boolean,status:String,hashId:String},setup(e,t){let{slots:n,attrs:o}=t;const r=kn.useInject(),i=l=>{const{value:s,disabled:u,readonly:c,handleReset:d,suffix:f=n.suffix}=e,p=!u&&!c&&s,v=`${l}-clear-icon`;return g(po,{onClick:d,onMousedown:h=>h.preventDefault(),class:ge({[`${v}-hidden`]:!p,[`${v}-has-suffix`]:!!f},v),role:"button"},null)},a=(l,s)=>{const{value:u,allowClear:c,direction:d,bordered:f,hidden:p,status:v,addonAfter:h=n.addonAfter,addonBefore:m=n.addonBefore,hashId:b}=e,{status:S,hasFeedback:C}=r;if(!c)return mt(s,{value:u,disabled:e.disabled});const $=ge(`${l}-affix-wrapper`,`${l}-affix-wrapper-textarea-with-clear-btn`,lo(`${l}-affix-wrapper`,Yr(S,v),C),{[`${l}-affix-wrapper-rtl`]:d==="rtl",[`${l}-affix-wrapper-borderless`]:!f,[`${o.class}`]:!ese({addonAfter:h,addonBefore:m})&&o.class},b);return g("span",{class:$,style:o.style,hidden:p},[mt(s,{style:null,value:u,disabled:e.disabled}),i(l)])};return()=>{var l;const{prefixCls:s,inputType:u,element:c=(l=n.element)===null||l===void 0?void 0:l.call(n)}=e;return u===tse[0]?a(s,c):null}}}),ose=` min-height:0 !important; max-height:none !important; height:0 !important; @@ -360,10 +360,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho top:0 !important; right:0 !important; pointer-events: none !important; -`,rse=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],eb={};let ar;function ise(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&eb[n])return eb[n];const o=window.getComputedStyle(e),r=o.getPropertyValue("box-sizing")||o.getPropertyValue("-moz-box-sizing")||o.getPropertyValue("-webkit-box-sizing"),i=parseFloat(o.getPropertyValue("padding-bottom"))+parseFloat(o.getPropertyValue("padding-top")),a=parseFloat(o.getPropertyValue("border-bottom-width"))+parseFloat(o.getPropertyValue("border-top-width")),s={sizingStyle:rse.map(u=>`${u}:${o.getPropertyValue(u)}`).join(";"),paddingSize:i,borderSize:a,boxSizing:r};return t&&n&&(eb[n]=s),s}function ase(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ar||(ar=document.createElement("textarea"),ar.setAttribute("tab-index","-1"),ar.setAttribute("aria-hidden","true"),document.body.appendChild(ar)),e.getAttribute("wrap")?ar.setAttribute("wrap",e.getAttribute("wrap")):ar.removeAttribute("wrap");const{paddingSize:r,borderSize:i,boxSizing:a,sizingStyle:l}=ise(e,t);ar.setAttribute("style",`${l};${ose}`),ar.value=e.value||e.placeholder||"";let s,u,c,d=ar.scrollHeight;if(a==="border-box"?d+=i:a==="content-box"&&(d-=r),n!==null||o!==null){ar.value=" ";const p=ar.scrollHeight-r;n!==null&&(s=p*n,a==="border-box"&&(s=s+r+i),d=Math.max(s,d)),o!==null&&(u=p*o,a==="border-box"&&(u=u+r+i),c=d>u?"":"hidden",d=Math.min(u,d))}const f={height:`${d}px`,overflowY:c,resize:"none"};return s&&(f.minHeight=`${s}px`),u&&(f.maxHeight=`${u}px`),f}const tb=0,nb=1,ob=2,lse=le({compatConfig:{MODE:3},name:"ResizableTextArea",inheritAttrs:!1,props:sD(),setup(e,t){let{attrs:n,emit:o,expose:r}=t,i,a;const l=ae(),s=ae({}),u=ae(ob);tt(()=>{Ze.cancel(i),Ze.cancel(a)});const c=()=>{try{if(l.value&&document.activeElement===l.value.input){const P=l.value.getSelectionStart(),w=l.value.getSelectionEnd(),O=l.value.getScrollTop();l.value.setSelectionRange(P,w),l.value.setScrollTop(O)}}catch{}},d=ae(),f=ae();Ve(()=>{const P=e.autoSize||e.autosize;P?(d.value=P.minRows,f.value=P.maxRows):(d.value=void 0,f.value=void 0)});const p=E(()=>!!(e.autoSize||e.autosize)),v=()=>{u.value=tb};be([()=>e.value,d,f,p],()=>{p.value&&v()},{immediate:!0});const h=ae();be([u,l],()=>{if(l.value)if(u.value===tb)u.value=nb;else if(u.value===nb){const P=ase(l.value.input,!1,d.value,f.value);u.value=ob,h.value=P}else c()},{immediate:!0,flush:"post"});const m=Jt(),b=ae(),S=()=>{Ze.cancel(b.value)},C=P=>{u.value===ob&&(o("resize",P),p.value&&(S(),b.value=Ze(()=>{v()})))};tt(()=>{S()}),r({resizeTextarea:()=>{v()},textArea:E(()=>{var P;return(P=l.value)===null||P===void 0?void 0:P.input}),instance:m}),Yo(e.autosize===void 0);const x=()=>{const{prefixCls:P,disabled:w}=e,O=it(e,["prefixCls","onPressEnter","autoSize","autosize","defaultValue","allowClear","type","maxlength","valueModifiers"]),I=ge(P,n.class,{[`${P}-disabled`]:w}),_=p.value?h.value:null,T=[n.style,s.value,_],A=y(y(y({},O),n),{style:T,class:I});return(u.value===tb||u.value===nb)&&T.push({overflowX:"hidden",overflowY:"hidden"}),A.autofocus||delete A.autofocus,A.rows===0&&delete A.rows,g(br,{onResize:C,disabled:!p.value},{default:()=>[g(Xc,k(k({},A),{},{ref:l,tag:"textarea"}),null)]})};return()=>x()}});function dD(e,t){return[...e||""].slice(0,t).join("")}function r4(e,t,n,o){let r=n;return e?r=dD(n,o):[...t||""].lengtho&&(r=t),r}const Vx=le({compatConfig:{MODE:3},name:"ATextarea",inheritAttrs:!1,props:sD(),setup(e,t){let{attrs:n,expose:o,emit:r}=t;var i;const a=bn(),l=kn.useInject(),s=E(()=>Yr(l.status,e.status)),u=se((i=e.value)!==null&&i!==void 0?i:e.defaultValue),c=se(),d=se(""),{prefixCls:f,size:p,direction:v}=Te("input",e),[h,m]=yx(f),b=ko(),S=E(()=>e.showCount===""||e.showCount||!1),C=E(()=>Number(e.maxlength)>0),$=se(!1),x=se(),P=se(0),w=F=>{$.value=!0,x.value=d.value,P.value=F.currentTarget.selectionStart,r("compositionstart",F)},O=F=>{var B;$.value=!1;let j=F.currentTarget.value;if(C.value){const z=P.value>=e.maxlength+1||P.value===((B=x.value)===null||B===void 0?void 0:B.length);j=r4(z,x.value,j,e.maxlength)}j!==d.value&&(A(j),sd(F.currentTarget,F,M,j)),r("compositionend",F)},I=Jt();be(()=>e.value,()=>{var F;"value"in I.vnode.props,u.value=(F=e.value)!==null&&F!==void 0?F:""});const _=F=>{var B;iD((B=c.value)===null||B===void 0?void 0:B.textArea,F)},T=()=>{var F,B;(B=(F=c.value)===null||F===void 0?void 0:F.textArea)===null||B===void 0||B.blur()},A=(F,B)=>{u.value!==F&&(e.value===void 0?u.value=F:ot(()=>{var j,z,G;c.value.textArea.value!==d.value&&((G=(j=c.value)===null||j===void 0?void 0:(z=j.instance).update)===null||G===void 0||G.call(z))}),ot(()=>{B&&B()}))},R=F=>{F.keyCode===13&&r("pressEnter",F),r("keydown",F)},H=F=>{const{onBlur:B}=e;B==null||B(F),a.onFieldBlur()},M=F=>{r("update:value",F.target.value),r("change",F),r("input",F),a.onFieldChange()},D=F=>{sd(c.value.textArea,F,M),A("",()=>{_()})},N=F=>{let B=F.target.value;if(u.value!==B){if(C.value){const j=F.target,z=j.selectionStart>=e.maxlength+1||j.selectionStart===B.length||!j.selectionStart;B=r4(z,d.value,B,e.maxlength)}sd(F.currentTarget,F,M,B),A(B)}},L=()=>{var F,B;const{class:j}=n,{bordered:z=!0}=e,G=y(y(y({},it(e,["allowClear"])),n),{class:[{[`${f.value}-borderless`]:!z,[`${j}`]:j&&!S.value,[`${f.value}-sm`]:p.value==="small",[`${f.value}-lg`]:p.value==="large"},lo(f.value,s.value),m.value],disabled:b.value,showCount:null,prefixCls:f.value,onInput:N,onChange:N,onBlur:H,onKeydown:R,onCompositionstart:w,onCompositionend:O});return!((F=e.valueModifiers)===null||F===void 0)&&F.lazy&&delete G.onInput,g(lse,k(k({},G),{},{id:(B=G==null?void 0:G.id)!==null&&B!==void 0?B:a.id.value,ref:c,maxlength:e.maxlength,lazy:e.lazy}),null)};return o({focus:_,blur:T,resizableTextArea:c}),Ve(()=>{let F=h1(u.value);!$.value&&C.value&&(e.value===null||e.value===void 0)&&(F=dD(F,e.maxlength)),d.value=F}),()=>{var F;const{maxlength:B,bordered:j=!0,hidden:z}=e,{style:G,class:Q}=n,Y=y(y(y({},e),n),{prefixCls:f.value,inputType:"text",handleReset:D,direction:v.value,bordered:j,style:S.value?void 0:G,hashId:m.value,disabled:(F=e.disabled)!==null&&F!==void 0?F:b.value});let oe=g(nse,k(k({},Y),{},{value:d.value,status:e.status}),{element:L});if(S.value||l.hasFeedback){const Z=[...d.value].length;let re="";typeof S.value=="object"?re=S.value.formatter({value:d.value,count:Z,maxlength:B}):re=`${Z}${C.value?` / ${B}`:""}`,oe=g("div",{hidden:z,class:ge(`${f.value}-textarea`,{[`${f.value}-textarea-rtl`]:v.value==="rtl",[`${f.value}-textarea-show-count`]:S.value,[`${f.value}-textarea-in-form-item`]:l.isFormItemInput},`${f.value}-textarea-show-count`,Q,m.value),style:G,"data-count":typeof re!="object"?re:void 0},[oe,l.hasFeedback&&g("span",{class:`${f.value}-textarea-suffix`},[l.feedbackIcon])])}return h(oe)}}});var sse={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function i4(e){for(var t=1;tg(e?Ef:Kx,null,null),fD=le({compatConfig:{MODE:3},name:"AInputPassword",inheritAttrs:!1,props:y(y({},bm()),{prefixCls:String,inputPrefixCls:String,action:{type:String,default:"click"},visibilityToggle:{type:Boolean,default:!0},visible:{type:Boolean,default:void 0},"onUpdate:visible":Function,iconRender:Function}),setup(e,t){let{slots:n,attrs:o,expose:r,emit:i}=t;const a=se(!1),l=()=>{const{disabled:m}=e;m||(a.value=!a.value,i("update:visible",a.value))};Ve(()=>{e.visible!==void 0&&(a.value=!!e.visible)});const s=se();r({focus:()=>{var m;(m=s.value)===null||m===void 0||m.focus()},blur:()=>{var m;(m=s.value)===null||m===void 0||m.blur()}});const d=m=>{const{action:b,iconRender:S=n.iconRender||gse}=e,C=pse[b]||"",$=S(a.value),x={[C]:l,class:`${m}-icon`,key:"passwordIcon",onMousedown:P=>{P.preventDefault()},onMouseup:P=>{P.preventDefault()}};return mt(sn($)?$:g("span",null,[$]),x)},{prefixCls:f,getPrefixCls:p}=Te("input-password",e),v=E(()=>p("input",e.inputPrefixCls)),h=()=>{const{size:m,visibilityToggle:b}=e,S=fse(e,["size","visibilityToggle"]),C=b&&d(f.value),$=ge(f.value,o.class,{[`${f.value}-${m}`]:!!m}),x=y(y(y({},it(S,["suffix","iconRender","action"])),o),{type:a.value?"text":"password",class:$,prefixCls:v.value,suffix:C});return m&&(x.size=m),g(Cn,k({ref:s},x),n)};return()=>h()}});Cn.Group=cD;Cn.Search=uD;Cn.TextArea=Vx;Cn.Password=fD;Cn.install=function(e){return e.component(Cn.name,Cn),e.component(Cn.Group.name,Cn.Group),e.component(Cn.Search.name,Cn.Search),e.component(Cn.TextArea.name,Cn.TextArea),e.component(Cn.Password.name,Cn.Password),e};function ym(){return{keyboard:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},afterClose:Function,closable:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},destroyOnClose:{type:Boolean,default:void 0},mousePosition:K.shape({x:Number,y:Number}).loose,title:K.any,footer:K.any,transitionName:String,maskTransitionName:String,animation:K.any,maskAnimation:K.any,wrapStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},maskStyle:{type:Object,default:void 0},prefixCls:String,wrapClassName:String,rootClassName:String,width:[String,Number],height:[String,Number],zIndex:Number,bodyProps:K.any,maskProps:K.any,wrapProps:K.any,getContainer:K.any,dialogStyle:{type:Object,default:void 0},dialogClass:String,closeIcon:K.any,forceRender:{type:Boolean,default:void 0},getOpenCount:Function,focusTriggerAfterClose:{type:Boolean,default:void 0},onClose:Function,modalRender:Function}}function l4(e,t,n){let o=t;return!o&&n&&(o=`${e}-${n}`),o}let s4=-1;function hse(){return s4+=1,s4}function c4(e,t){let n=e[`page${t?"Y":"X"}Offset`];const o=`scroll${t?"Top":"Left"}`;if(typeof n!="number"){const r=e.document;n=r.documentElement[o],typeof n!="number"&&(n=r.body[o])}return n}function vse(e){const t=e.getBoundingClientRect(),n={left:t.left,top:t.top},o=e.ownerDocument,r=o.defaultView||o.parentWindow;return n.left+=c4(r),n.top+=c4(r,!0),n}const mse={width:0,height:0,overflow:"hidden",outline:"none"},bse={outline:"none"},yse=le({compatConfig:{MODE:3},name:"DialogContent",inheritAttrs:!1,props:y(y({},ym()),{motionName:String,ariaId:String,onVisibleChanged:Function,onMousedown:Function,onMouseup:Function}),setup(e,t){let{expose:n,slots:o,attrs:r}=t;const i=ae(),a=ae(),l=ae();n({focus:()=>{var f;(f=i.value)===null||f===void 0||f.focus({preventScroll:!0})},changeActive:f=>{const{activeElement:p}=document;f&&p===a.value?i.value.focus({preventScroll:!0}):!f&&p===i.value&&a.value.focus({preventScroll:!0})}});const s=ae(),u=E(()=>{const{width:f,height:p}=e,v={};return f!==void 0&&(v.width=typeof f=="number"?`${f}px`:f),p!==void 0&&(v.height=typeof p=="number"?`${p}px`:p),s.value&&(v.transformOrigin=s.value),v}),c=()=>{ot(()=>{if(l.value){const f=vse(l.value);s.value=e.mousePosition?`${e.mousePosition.x-f.left}px ${e.mousePosition.y-f.top}px`:""}})},d=f=>{e.onVisibleChanged(f)};return()=>{var f,p,v,h;const{prefixCls:m,footer:b=(f=o.footer)===null||f===void 0?void 0:f.call(o),title:S=(p=o.title)===null||p===void 0?void 0:p.call(o),ariaId:C,closable:$,closeIcon:x=(v=o.closeIcon)===null||v===void 0?void 0:v.call(o),onClose:P,bodyStyle:w,bodyProps:O,onMousedown:I,onMouseup:_,visible:T,modalRender:A=o.modalRender,destroyOnClose:R,motionName:H}=e;let M;b&&(M=g("div",{class:`${m}-footer`},[b]));let D;S&&(D=g("div",{class:`${m}-header`},[g("div",{class:`${m}-title`,id:C},[S])]));let N;$&&(N=g("button",{type:"button",onClick:P,"aria-label":"Close",class:`${m}-close`},[x||g("span",{class:`${m}-close-x`},null)]));const L=g("div",{class:`${m}-content`},[N,D,g("div",k({class:`${m}-body`,style:w},O),[(h=o.default)===null||h===void 0?void 0:h.call(o)]),M]),F=Cr(H);return g(Nn,k(k({},F),{},{onBeforeEnter:c,onAfterEnter:()=>d(!0),onAfterLeave:()=>d(!1)}),{default:()=>[T||!R?Pn(g("div",k(k({},r),{},{ref:l,key:"dialog-element",role:"document",style:[u.value,r.style],class:[m,r.class],onMousedown:I,onMouseup:_}),[g("div",{tabindex:0,ref:i,style:bse},[A?A({originVNode:L}):L]),g("div",{tabindex:0,ref:a,style:mse},null)]),[[Vn,T]]):null]})}}}),Sse=le({compatConfig:{MODE:3},name:"DialogMask",props:{prefixCls:String,visible:Boolean,motionName:String,maskProps:Object},setup(e,t){return()=>{const{prefixCls:n,visible:o,maskProps:r,motionName:i}=e,a=Cr(i);return g(Nn,a,{default:()=>[Pn(g("div",k({class:`${n}-mask`},r),null),[[Vn,o]])]})}}}),u4=le({compatConfig:{MODE:3},name:"VcDialog",inheritAttrs:!1,props:Qe(y(y({},ym()),{getOpenCount:Function,scrollLocker:Object}),{mask:!0,visible:!1,keyboard:!0,closable:!0,maskClosable:!0,destroyOnClose:!1,prefixCls:"rc-dialog",getOpenCount:()=>null,focusTriggerAfterClose:!0}),setup(e,t){let{attrs:n,slots:o}=t;const r=se(),i=se(),a=se(),l=se(e.visible),s=se(`vcDialogTitle${hse()}`),u=b=>{var S,C;if(b)Pa(i.value,document.activeElement)||(r.value=document.activeElement,(S=a.value)===null||S===void 0||S.focus());else{const $=l.value;if(l.value=!1,e.mask&&r.value&&e.focusTriggerAfterClose){try{r.value.focus({preventScroll:!0})}catch{}r.value=null}$&&((C=e.afterClose)===null||C===void 0||C.call(e))}},c=b=>{var S;(S=e.onClose)===null||S===void 0||S.call(e,b)},d=se(!1),f=se(),p=()=>{clearTimeout(f.value),d.value=!0},v=()=>{f.value=setTimeout(()=>{d.value=!1})},h=b=>{if(!e.maskClosable)return null;d.value?d.value=!1:i.value===b.target&&c(b)},m=b=>{if(e.keyboard&&b.keyCode===Ie.ESC){b.stopPropagation(),c(b);return}e.visible&&b.keyCode===Ie.TAB&&a.value.changeActive(!b.shiftKey)};return be(()=>e.visible,()=>{e.visible&&(l.value=!0)},{flush:"post"}),tt(()=>{var b;clearTimeout(f.value),(b=e.scrollLocker)===null||b===void 0||b.unLock()}),Ve(()=>{var b,S;(b=e.scrollLocker)===null||b===void 0||b.unLock(),l.value&&((S=e.scrollLocker)===null||S===void 0||S.lock())}),()=>{const{prefixCls:b,mask:S,visible:C,maskTransitionName:$,maskAnimation:x,zIndex:P,wrapClassName:w,rootClassName:O,wrapStyle:I,closable:_,maskProps:T,maskStyle:A,transitionName:R,animation:H,wrapProps:M,title:D=o.title}=e,{style:N,class:L}=n;return g("div",k({class:[`${b}-root`,O]},Ua(e,{data:!0})),[g(Sse,{prefixCls:b,visible:S&&C,motionName:l4(b,$,x),style:y({zIndex:P},A),maskProps:T},null),g("div",k({tabIndex:-1,onKeydown:m,class:ge(`${b}-wrap`,w),ref:i,onClick:h,role:"dialog","aria-labelledby":D?s.value:null,style:y(y({zIndex:P},I),{display:l.value?null:"none"})},M),[g(yse,k(k({},it(e,["scrollLocker"])),{},{style:N,class:L,onMousedown:p,onMouseup:v,ref:a,closable:_,ariaId:s.value,prefixCls:b,visible:C,onClose:c,onVisibleChanged:u,motionName:l4(b,R,H)}),o)])])}}}),Cse=ym(),pD=le({compatConfig:{MODE:3},name:"DialogWrap",inheritAttrs:!1,props:Qe(Cse,{visible:!1}),setup(e,t){let{attrs:n,slots:o}=t;const r=ae(e.visible);return uC({},{inTriggerContext:!1}),be(()=>e.visible,()=>{e.visible&&(r.value=!0)},{flush:"post"}),()=>{const{visible:i,getContainer:a,forceRender:l,destroyOnClose:s=!1,afterClose:u}=e;let c=y(y(y({},e),n),{ref:"_component",key:"dialog"});return a===!1?g(u4,k(k({},c),{},{getOpenCount:()=>2}),o):!l&&s&&!r.value?null:g(gf,{autoLock:!0,visible:i,forceRender:l,getContainer:a},{default:d=>(c=y(y(y({},c),d),{afterClose:()=>{u==null||u(),r.value=!1}}),g(u4,c,o))})}}});function xse(e){const t=ae(null),n=rt(y({},e)),o=ae([]),r=i=>{t.value===null&&(o.value=[],t.value=Ze(()=>{let a;o.value.forEach(l=>{a=y(y({},a),l)}),y(n,a),t.value=null})),o.value.push(i)};return Ke(()=>{t.value&&Ze.cancel(t.value)}),[n,r]}function d4(e,t,n,o){const r=t+n,i=(n-o)/2;if(n>o){if(t>0)return{[e]:i};if(t<0&&ro)return{[e]:t<0?i:-i};return{}}function $se(e,t,n,o){const{width:r,height:i}=EK();let a=null;return e<=r&&t<=i?a={x:0,y:0}:(e>r||t>i)&&(a=y(y({},d4("x",n,e,r)),d4("y",o,t,i))),a}var wse=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{Xe(f4,e)},inject:()=>ze(f4,{isPreviewGroup:se(!1),previewUrls:E(()=>new Map),setPreviewUrls:()=>{},current:ae(null),setCurrent:()=>{},setShowPreview:()=>{},setMousePosition:()=>{},registerImage:null,rootClassName:""})},Pse=()=>({previewPrefixCls:String,preview:{type:[Boolean,Object],default:!0},icons:{type:Object,default:()=>({})}}),gD=le({compatConfig:{MODE:3},name:"PreviewGroup",inheritAttrs:!1,props:Pse(),setup(e,t){let{slots:n}=t;const o=E(()=>{const x={visible:void 0,onVisibleChange:()=>{},getContainer:void 0,current:0};return typeof e.preview=="object"?mD(e.preview,x):x}),r=rt(new Map),i=ae(),a=E(()=>o.value.visible),l=E(()=>o.value.getContainer),s=(x,P)=>{var w,O;(O=(w=o.value).onVisibleChange)===null||O===void 0||O.call(w,x,P)},[u,c]=Dt(!!a.value,{value:a,onChange:s}),d=ae(null),f=E(()=>a.value!==void 0),p=E(()=>Array.from(r.keys())),v=E(()=>p.value[o.value.current]),h=E(()=>new Map(Array.from(r).filter(x=>{let[,{canPreview:P}]=x;return!!P}).map(x=>{let[P,{url:w}]=x;return[P,w]}))),m=function(x,P){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;r.set(x,{url:P,canPreview:w})},b=x=>{i.value=x},S=x=>{d.value=x},C=function(x,P){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const O=()=>{r.delete(x)};return r.set(x,{url:P,canPreview:w}),O},$=x=>{x==null||x.stopPropagation(),c(!1),S(null)};return be(v,x=>{b(x)},{immediate:!0,flush:"post"}),Ve(()=>{u.value&&f.value&&b(v.value)},{flush:"post"}),Ux.provide({isPreviewGroup:se(!0),previewUrls:h,setPreviewUrls:m,current:i,setCurrent:b,setShowPreview:c,setMousePosition:S,registerImage:C}),()=>{const x=wse(o.value,[]);return g(Le,null,[n.default&&n.default(),g(hD,k(k({},x),{},{"ria-hidden":!u.value,visible:u.value,prefixCls:e.previewPrefixCls,onClose:$,mousePosition:d.value,src:h.value.get(i.value),icons:e.icons,getContainer:l.value}),null)])}}}),ul={x:0,y:0},Ose=y(y({},ym()),{src:String,alt:String,rootClassName:String,icons:{type:Object,default:()=>({})}}),hD=le({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:Ose,emits:["close","afterClose"],setup(e,t){let{emit:n,attrs:o}=t;const{rotateLeft:r,rotateRight:i,zoomIn:a,zoomOut:l,close:s,left:u,right:c,flipX:d,flipY:f}=rt(e.icons),p=se(1),v=se(0),h=rt({x:1,y:1}),[m,b]=xse(ul),S=()=>n("close"),C=se(),$=rt({originX:0,originY:0,deltaX:0,deltaY:0}),x=se(!1),P=Ux.inject(),{previewUrls:w,current:O,isPreviewGroup:I,setCurrent:_}=P,T=E(()=>w.value.size),A=E(()=>Array.from(w.value.keys())),R=E(()=>A.value.indexOf(O.value)),H=E(()=>I.value?w.value.get(O.value):e.src),M=E(()=>I.value&&T.value>1),D=se({wheelDirection:0}),N=()=>{p.value=1,v.value=0,h.x=1,h.y=1,b(ul),n("afterClose")},L=pe=>{pe?p.value+=.5:p.value++,b(ul)},F=pe=>{p.value>1&&(pe?p.value-=.5:p.value--),b(ul)},B=()=>{v.value+=90},j=()=>{v.value-=90},z=()=>{h.x=-h.x},G=()=>{h.y=-h.y},Q=pe=>{pe.preventDefault(),pe.stopPropagation(),R.value>0&&_(A.value[R.value-1])},Y=pe=>{pe.preventDefault(),pe.stopPropagation(),R.valueL(),type:"zoomIn"},{icon:l,onClick:()=>F(),type:"zoomOut",disabled:E(()=>p.value===1)},{icon:i,onClick:B,type:"rotateRight"},{icon:r,onClick:j,type:"rotateLeft"},{icon:d,onClick:z,type:"flipX"},{icon:f,onClick:G,type:"flipY"}],X=()=>{if(e.visible&&x.value){const pe=C.value.offsetWidth*p.value,ve=C.value.offsetHeight*p.value,{left:he,top:V}=Ug(C.value),q=v.value%180!==0;x.value=!1;const ie=$se(q?ve:pe,q?pe:ve,he,V);ie&&b(y({},ie))}},te=pe=>{pe.button===0&&(pe.preventDefault(),pe.stopPropagation(),$.deltaX=pe.pageX-m.x,$.deltaY=pe.pageY-m.y,$.originX=m.x,$.originY=m.y,x.value=!0)},W=pe=>{e.visible&&x.value&&b({x:pe.pageX-$.deltaX,y:pe.pageY-$.deltaY})},U=pe=>{if(!e.visible)return;pe.preventDefault();const ve=pe.deltaY;D.value={wheelDirection:ve}},J=pe=>{!e.visible||!M.value||(pe.preventDefault(),pe.keyCode===Ie.LEFT?R.value>0&&_(A.value[R.value-1]):pe.keyCode===Ie.RIGHT&&R.value{e.visible&&(p.value!==1&&(p.value=1),(m.x!==ul.x||m.y!==ul.y)&&b(ul))};let fe=()=>{};return Ke(()=>{be([()=>e.visible,x],()=>{fe();let pe,ve;const he=Ht(window,"mouseup",X,!1),V=Ht(window,"mousemove",W,!1),q=Ht(window,"wheel",U,{passive:!1}),ie=Ht(window,"keydown",J,!1);try{window.top!==window.self&&(pe=Ht(window.top,"mouseup",X,!1),ve=Ht(window.top,"mousemove",W,!1))}catch{}fe=()=>{he.remove(),V.remove(),q.remove(),ie.remove(),pe&&pe.remove(),ve&&ve.remove()}},{flush:"post",immediate:!0}),be([D],()=>{const{wheelDirection:pe}=D.value;pe>0?F(!0):pe<0&&L(!0)})}),Zn(()=>{fe()}),()=>{const{visible:pe,prefixCls:ve,rootClassName:he}=e;return g(pD,k(k({},o),{},{transitionName:e.transitionName,maskTransitionName:e.maskTransitionName,closable:!1,keyboard:!0,prefixCls:ve,onClose:S,afterClose:N,visible:pe,wrapClassName:oe,rootClassName:he,getContainer:e.getContainer}),{default:()=>[g("div",{class:[`${e.prefixCls}-operations-wrapper`,he]},[g("ul",{class:`${e.prefixCls}-operations`},[ne.map(V=>{let{icon:q,onClick:ie,type:me,disabled:Se}=V;return g("li",{class:ge(Z,{[`${e.prefixCls}-operations-operation-disabled`]:Se&&(Se==null?void 0:Se.value)}),onClick:ie,key:me},[Dn(q,{class:re})])})])]),g("div",{class:`${e.prefixCls}-img-wrapper`,style:{transform:`translate3d(${m.x}px, ${m.y}px, 0)`}},[g("img",{onMousedown:te,onDblclick:de,ref:C,class:`${e.prefixCls}-img`,src:H.value,alt:e.alt,style:{transform:`scale3d(${h.x*p.value}, ${h.y*p.value}, 1) rotate(${v.value}deg)`}},null)]),M.value&&g("div",{class:ge(`${e.prefixCls}-switch-left`,{[`${e.prefixCls}-switch-left-disabled`]:R.value<=0}),onClick:Q},[u]),M.value&&g("div",{class:ge(`${e.prefixCls}-switch-right`,{[`${e.prefixCls}-switch-right-disabled`]:R.value>=T.value-1}),onClick:Y},[c])]})}}});var Ise=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({src:String,wrapperClassName:String,wrapperStyle:{type:Object,default:void 0},rootClassName:String,prefixCls:String,previewPrefixCls:String,width:[Number,String],height:[Number,String],previewMask:{type:[Boolean,Function],default:void 0},placeholder:K.any,fallback:String,preview:{type:[Boolean,Object],default:!0},onClick:{type:Function},onError:{type:Function}}),mD=(e,t)=>{const n=y({},e);return Object.keys(t).forEach(o=>{e[o]===void 0&&(n[o]=t[o])}),n};let Tse=0;const bD=le({compatConfig:{MODE:3},name:"VcImage",inheritAttrs:!1,props:vD(),emits:["click","error"],setup(e,t){let{attrs:n,slots:o,emit:r}=t;const i=E(()=>e.prefixCls),a=E(()=>`${i.value}-preview`),l=E(()=>{const L={visible:void 0,onVisibleChange:()=>{},getContainer:void 0};return typeof e.preview=="object"?mD(e.preview,L):L}),s=E(()=>{var L;return(L=l.value.src)!==null&&L!==void 0?L:e.src}),u=E(()=>e.placeholder&&e.placeholder!==!0||o.placeholder),c=E(()=>l.value.visible),d=E(()=>l.value.getContainer),f=E(()=>c.value!==void 0),p=(L,F)=>{var B,j;(j=(B=l.value).onVisibleChange)===null||j===void 0||j.call(B,L,F)},[v,h]=Dt(!!c.value,{value:c,onChange:p}),m=ae(u.value?"loading":"normal");be(()=>e.src,()=>{m.value=u.value?"loading":"normal"});const b=ae(null),S=E(()=>m.value==="error"),C=Ux.inject(),{isPreviewGroup:$,setCurrent:x,setShowPreview:P,setMousePosition:w,registerImage:O}=C,I=ae(Tse++),_=E(()=>e.preview&&!S.value),T=()=>{m.value="normal"},A=L=>{m.value="error",r("error",L)},R=L=>{if(!f.value){const{left:F,top:B}=Ug(L.target);$.value?(x(I.value),w({x:F,y:B})):b.value={x:F,y:B}}$.value?P(!0):h(!0),r("click",L)},H=()=>{h(!1),f.value||(b.value=null)},M=ae(null);be(()=>M,()=>{m.value==="loading"&&M.value.complete&&(M.value.naturalWidth||M.value.naturalHeight)&&T()});let D=()=>{};Ke(()=>{be([s,_],()=>{if(D(),!$.value)return()=>{};D=O(I.value,s.value,_.value),_.value||D()},{flush:"post",immediate:!0})}),Zn(()=>{D()});const N=L=>xq(L)?L+"px":L;return()=>{const{prefixCls:L,wrapperClassName:F,fallback:B,src:j,placeholder:z,wrapperStyle:G,rootClassName:Q,width:Y,height:oe,crossorigin:Z,decoding:re,alt:ne,sizes:X,srcset:te,usemap:W,class:U,style:J}=y(y({},e),n),de=l.value,{icons:fe,maskClassName:pe}=de,ve=Ise(de,["icons","maskClassName"]),he=ge(L,F,Q,{[`${L}-error`]:S.value}),V=S.value&&B?B:s.value,q={crossorigin:Z,decoding:re,alt:ne,sizes:X,srcset:te,usemap:W,width:Y,height:oe,class:ge(`${L}-img`,{[`${L}-img-placeholder`]:z===!0},U),style:y({height:N(oe)},J)};return g(Le,null,[g("div",{class:he,onClick:_.value?R:ie=>{r("click",ie)},style:y({width:N(Y),height:N(oe)},G)},[g("img",k(k(k({},q),S.value&&B?{src:B}:{onLoad:T,onError:A,src:j}),{},{ref:M}),null),m.value==="loading"&&g("div",{"aria-hidden":"true",class:`${L}-placeholder`},[z||o.placeholder&&o.placeholder()]),o.previewMask&&_.value&&g("div",{class:[`${L}-mask`,pe]},[o.previewMask()])]),!$.value&&_.value&&g(hD,k(k({},ve),{},{"aria-hidden":!v.value,visible:v.value,prefixCls:a.value,onClose:H,mousePosition:b.value,src:V,alt:ne,getContainer:d.value,icons:fe,rootClassName:Q}),null)])}}});bD.PreviewGroup=gD;var Ese={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"};function p4(e){for(var t=1;t{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}${e.antCls}-zoom-enter, ${t}${e.antCls}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${e.antCls}-zoom-leave ${t}-content`]:{pointerEvents:"none"},[`${t}-mask`]:y(y({},b4("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:y(y({},b4("fixed")),{overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${t}-root`]:AC(e)}]},Bse=e=>{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap`]:{zIndex:e.zIndexPopupBase,position:"fixed",inset:0,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"},[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax})`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${e.marginXS} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:y(y({},qe(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${e.margin*2}px)`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.modalHeadingColor,fontWeight:e.fontWeightStrong,fontSize:e.modalHeaderTitleFontSize,lineHeight:e.modalHeaderTitleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.modalContentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadowSecondary,pointerEvents:"auto",padding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`},[`${t}-close`]:y({position:"absolute",top:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,insetInlineEnd:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,zIndex:e.zIndexPopupBase+10,padding:0,color:e.modalCloseColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalConfirmIconSize,height:e.modalConfirmIconSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"block",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:`${e.modalCloseBtnSize}px`,textAlign:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:e.modalIconHoverColor,backgroundColor:e.wireframe?"transparent":e.colorFillContent,textDecoration:"none"},"&:active":{backgroundColor:e.wireframe?"transparent":e.colorFillContentHover}},Ji(e)),[`${t}-header`]:{color:e.colorText,background:e.modalHeaderBg,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,marginBottom:e.marginXS},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word"},[`${t}-footer`]:{textAlign:"end",background:e.modalFooterBg,marginTop:e.marginSM,[`${e.antCls}-btn + ${e.antCls}-btn:not(${e.antCls}-dropdown-trigger)`]:{marginBottom:0,marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}})},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-content, +`,rse=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],eb={};let ar;function ise(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&eb[n])return eb[n];const o=window.getComputedStyle(e),r=o.getPropertyValue("box-sizing")||o.getPropertyValue("-moz-box-sizing")||o.getPropertyValue("-webkit-box-sizing"),i=parseFloat(o.getPropertyValue("padding-bottom"))+parseFloat(o.getPropertyValue("padding-top")),a=parseFloat(o.getPropertyValue("border-bottom-width"))+parseFloat(o.getPropertyValue("border-top-width")),s={sizingStyle:rse.map(u=>`${u}:${o.getPropertyValue(u)}`).join(";"),paddingSize:i,borderSize:a,boxSizing:r};return t&&n&&(eb[n]=s),s}function ase(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ar||(ar=document.createElement("textarea"),ar.setAttribute("tab-index","-1"),ar.setAttribute("aria-hidden","true"),document.body.appendChild(ar)),e.getAttribute("wrap")?ar.setAttribute("wrap",e.getAttribute("wrap")):ar.removeAttribute("wrap");const{paddingSize:r,borderSize:i,boxSizing:a,sizingStyle:l}=ise(e,t);ar.setAttribute("style",`${l};${ose}`),ar.value=e.value||e.placeholder||"";let s,u,c,d=ar.scrollHeight;if(a==="border-box"?d+=i:a==="content-box"&&(d-=r),n!==null||o!==null){ar.value=" ";const p=ar.scrollHeight-r;n!==null&&(s=p*n,a==="border-box"&&(s=s+r+i),d=Math.max(s,d)),o!==null&&(u=p*o,a==="border-box"&&(u=u+r+i),c=d>u?"":"hidden",d=Math.min(u,d))}const f={height:`${d}px`,overflowY:c,resize:"none"};return s&&(f.minHeight=`${s}px`),u&&(f.maxHeight=`${u}px`),f}const tb=0,nb=1,ob=2,lse=le({compatConfig:{MODE:3},name:"ResizableTextArea",inheritAttrs:!1,props:sD(),setup(e,t){let{attrs:n,emit:o,expose:r}=t,i,a;const l=ae(),s=ae({}),u=ae(ob);tt(()=>{Ze.cancel(i),Ze.cancel(a)});const c=()=>{try{if(l.value&&document.activeElement===l.value.input){const P=l.value.getSelectionStart(),w=l.value.getSelectionEnd(),O=l.value.getScrollTop();l.value.setSelectionRange(P,w),l.value.setScrollTop(O)}}catch{}},d=ae(),f=ae();Ve(()=>{const P=e.autoSize||e.autosize;P?(d.value=P.minRows,f.value=P.maxRows):(d.value=void 0,f.value=void 0)});const p=E(()=>!!(e.autoSize||e.autosize)),v=()=>{u.value=tb};be([()=>e.value,d,f,p],()=>{p.value&&v()},{immediate:!0});const h=ae();be([u,l],()=>{if(l.value)if(u.value===tb)u.value=nb;else if(u.value===nb){const P=ase(l.value.input,!1,d.value,f.value);u.value=ob,h.value=P}else c()},{immediate:!0,flush:"post"});const m=Jt(),b=ae(),S=()=>{Ze.cancel(b.value)},C=P=>{u.value===ob&&(o("resize",P),p.value&&(S(),b.value=Ze(()=>{v()})))};tt(()=>{S()}),r({resizeTextarea:()=>{v()},textArea:E(()=>{var P;return(P=l.value)===null||P===void 0?void 0:P.input}),instance:m}),Yo(e.autosize===void 0);const x=()=>{const{prefixCls:P,disabled:w}=e,O=it(e,["prefixCls","onPressEnter","autoSize","autosize","defaultValue","allowClear","type","maxlength","valueModifiers"]),I=ge(P,n.class,{[`${P}-disabled`]:w}),_=p.value?h.value:null,T=[n.style,s.value,_],A=y(y(y({},O),n),{style:T,class:I});return(u.value===tb||u.value===nb)&&T.push({overflowX:"hidden",overflowY:"hidden"}),A.autofocus||delete A.autofocus,A.rows===0&&delete A.rows,g(br,{onResize:C,disabled:!p.value},{default:()=>[g(Xc,k(k({},A),{},{ref:l,tag:"textarea"}),null)]})};return()=>x()}});function dD(e,t){return[...e||""].slice(0,t).join("")}function rT(e,t,n,o){let r=n;return e?r=dD(n,o):[...t||""].lengtho&&(r=t),r}const Vx=le({compatConfig:{MODE:3},name:"ATextarea",inheritAttrs:!1,props:sD(),setup(e,t){let{attrs:n,expose:o,emit:r}=t;var i;const a=bn(),l=kn.useInject(),s=E(()=>Yr(l.status,e.status)),u=se((i=e.value)!==null&&i!==void 0?i:e.defaultValue),c=se(),d=se(""),{prefixCls:f,size:p,direction:v}=Te("input",e),[h,m]=yx(f),b=ko(),S=E(()=>e.showCount===""||e.showCount||!1),C=E(()=>Number(e.maxlength)>0),$=se(!1),x=se(),P=se(0),w=F=>{$.value=!0,x.value=d.value,P.value=F.currentTarget.selectionStart,r("compositionstart",F)},O=F=>{var B;$.value=!1;let j=F.currentTarget.value;if(C.value){const z=P.value>=e.maxlength+1||P.value===((B=x.value)===null||B===void 0?void 0:B.length);j=rT(z,x.value,j,e.maxlength)}j!==d.value&&(A(j),sd(F.currentTarget,F,M,j)),r("compositionend",F)},I=Jt();be(()=>e.value,()=>{var F;"value"in I.vnode.props,u.value=(F=e.value)!==null&&F!==void 0?F:""});const _=F=>{var B;iD((B=c.value)===null||B===void 0?void 0:B.textArea,F)},T=()=>{var F,B;(B=(F=c.value)===null||F===void 0?void 0:F.textArea)===null||B===void 0||B.blur()},A=(F,B)=>{u.value!==F&&(e.value===void 0?u.value=F:ot(()=>{var j,z,G;c.value.textArea.value!==d.value&&((G=(j=c.value)===null||j===void 0?void 0:(z=j.instance).update)===null||G===void 0||G.call(z))}),ot(()=>{B&&B()}))},R=F=>{F.keyCode===13&&r("pressEnter",F),r("keydown",F)},H=F=>{const{onBlur:B}=e;B==null||B(F),a.onFieldBlur()},M=F=>{r("update:value",F.target.value),r("change",F),r("input",F),a.onFieldChange()},D=F=>{sd(c.value.textArea,F,M),A("",()=>{_()})},N=F=>{let B=F.target.value;if(u.value!==B){if(C.value){const j=F.target,z=j.selectionStart>=e.maxlength+1||j.selectionStart===B.length||!j.selectionStart;B=rT(z,d.value,B,e.maxlength)}sd(F.currentTarget,F,M,B),A(B)}},L=()=>{var F,B;const{class:j}=n,{bordered:z=!0}=e,G=y(y(y({},it(e,["allowClear"])),n),{class:[{[`${f.value}-borderless`]:!z,[`${j}`]:j&&!S.value,[`${f.value}-sm`]:p.value==="small",[`${f.value}-lg`]:p.value==="large"},lo(f.value,s.value),m.value],disabled:b.value,showCount:null,prefixCls:f.value,onInput:N,onChange:N,onBlur:H,onKeydown:R,onCompositionstart:w,onCompositionend:O});return!((F=e.valueModifiers)===null||F===void 0)&&F.lazy&&delete G.onInput,g(lse,k(k({},G),{},{id:(B=G==null?void 0:G.id)!==null&&B!==void 0?B:a.id.value,ref:c,maxlength:e.maxlength,lazy:e.lazy}),null)};return o({focus:_,blur:T,resizableTextArea:c}),Ve(()=>{let F=h1(u.value);!$.value&&C.value&&(e.value===null||e.value===void 0)&&(F=dD(F,e.maxlength)),d.value=F}),()=>{var F;const{maxlength:B,bordered:j=!0,hidden:z}=e,{style:G,class:Q}=n,Y=y(y(y({},e),n),{prefixCls:f.value,inputType:"text",handleReset:D,direction:v.value,bordered:j,style:S.value?void 0:G,hashId:m.value,disabled:(F=e.disabled)!==null&&F!==void 0?F:b.value});let oe=g(nse,k(k({},Y),{},{value:d.value,status:e.status}),{element:L});if(S.value||l.hasFeedback){const Z=[...d.value].length;let re="";typeof S.value=="object"?re=S.value.formatter({value:d.value,count:Z,maxlength:B}):re=`${Z}${C.value?` / ${B}`:""}`,oe=g("div",{hidden:z,class:ge(`${f.value}-textarea`,{[`${f.value}-textarea-rtl`]:v.value==="rtl",[`${f.value}-textarea-show-count`]:S.value,[`${f.value}-textarea-in-form-item`]:l.isFormItemInput},`${f.value}-textarea-show-count`,Q,m.value),style:G,"data-count":typeof re!="object"?re:void 0},[oe,l.hasFeedback&&g("span",{class:`${f.value}-textarea-suffix`},[l.feedbackIcon])])}return h(oe)}}});var sse={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function iT(e){for(var t=1;tg(e?Ef:Kx,null,null),fD=le({compatConfig:{MODE:3},name:"AInputPassword",inheritAttrs:!1,props:y(y({},mm()),{prefixCls:String,inputPrefixCls:String,action:{type:String,default:"click"},visibilityToggle:{type:Boolean,default:!0},visible:{type:Boolean,default:void 0},"onUpdate:visible":Function,iconRender:Function}),setup(e,t){let{slots:n,attrs:o,expose:r,emit:i}=t;const a=se(!1),l=()=>{const{disabled:m}=e;m||(a.value=!a.value,i("update:visible",a.value))};Ve(()=>{e.visible!==void 0&&(a.value=!!e.visible)});const s=se();r({focus:()=>{var m;(m=s.value)===null||m===void 0||m.focus()},blur:()=>{var m;(m=s.value)===null||m===void 0||m.blur()}});const d=m=>{const{action:b,iconRender:S=n.iconRender||gse}=e,C=pse[b]||"",$=S(a.value),x={[C]:l,class:`${m}-icon`,key:"passwordIcon",onMousedown:P=>{P.preventDefault()},onMouseup:P=>{P.preventDefault()}};return mt(sn($)?$:g("span",null,[$]),x)},{prefixCls:f,getPrefixCls:p}=Te("input-password",e),v=E(()=>p("input",e.inputPrefixCls)),h=()=>{const{size:m,visibilityToggle:b}=e,S=fse(e,["size","visibilityToggle"]),C=b&&d(f.value),$=ge(f.value,o.class,{[`${f.value}-${m}`]:!!m}),x=y(y(y({},it(S,["suffix","iconRender","action"])),o),{type:a.value?"text":"password",class:$,prefixCls:v.value,suffix:C});return m&&(x.size=m),g(Cn,k({ref:s},x),n)};return()=>h()}});Cn.Group=cD;Cn.Search=uD;Cn.TextArea=Vx;Cn.Password=fD;Cn.install=function(e){return e.component(Cn.name,Cn),e.component(Cn.Group.name,Cn.Group),e.component(Cn.Search.name,Cn.Search),e.component(Cn.TextArea.name,Cn.TextArea),e.component(Cn.Password.name,Cn.Password),e};function bm(){return{keyboard:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},afterClose:Function,closable:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},destroyOnClose:{type:Boolean,default:void 0},mousePosition:K.shape({x:Number,y:Number}).loose,title:K.any,footer:K.any,transitionName:String,maskTransitionName:String,animation:K.any,maskAnimation:K.any,wrapStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},maskStyle:{type:Object,default:void 0},prefixCls:String,wrapClassName:String,rootClassName:String,width:[String,Number],height:[String,Number],zIndex:Number,bodyProps:K.any,maskProps:K.any,wrapProps:K.any,getContainer:K.any,dialogStyle:{type:Object,default:void 0},dialogClass:String,closeIcon:K.any,forceRender:{type:Boolean,default:void 0},getOpenCount:Function,focusTriggerAfterClose:{type:Boolean,default:void 0},onClose:Function,modalRender:Function}}function lT(e,t,n){let o=t;return!o&&n&&(o=`${e}-${n}`),o}let sT=-1;function hse(){return sT+=1,sT}function cT(e,t){let n=e[`page${t?"Y":"X"}Offset`];const o=`scroll${t?"Top":"Left"}`;if(typeof n!="number"){const r=e.document;n=r.documentElement[o],typeof n!="number"&&(n=r.body[o])}return n}function vse(e){const t=e.getBoundingClientRect(),n={left:t.left,top:t.top},o=e.ownerDocument,r=o.defaultView||o.parentWindow;return n.left+=cT(r),n.top+=cT(r,!0),n}const mse={width:0,height:0,overflow:"hidden",outline:"none"},bse={outline:"none"},yse=le({compatConfig:{MODE:3},name:"DialogContent",inheritAttrs:!1,props:y(y({},bm()),{motionName:String,ariaId:String,onVisibleChanged:Function,onMousedown:Function,onMouseup:Function}),setup(e,t){let{expose:n,slots:o,attrs:r}=t;const i=ae(),a=ae(),l=ae();n({focus:()=>{var f;(f=i.value)===null||f===void 0||f.focus({preventScroll:!0})},changeActive:f=>{const{activeElement:p}=document;f&&p===a.value?i.value.focus({preventScroll:!0}):!f&&p===i.value&&a.value.focus({preventScroll:!0})}});const s=ae(),u=E(()=>{const{width:f,height:p}=e,v={};return f!==void 0&&(v.width=typeof f=="number"?`${f}px`:f),p!==void 0&&(v.height=typeof p=="number"?`${p}px`:p),s.value&&(v.transformOrigin=s.value),v}),c=()=>{ot(()=>{if(l.value){const f=vse(l.value);s.value=e.mousePosition?`${e.mousePosition.x-f.left}px ${e.mousePosition.y-f.top}px`:""}})},d=f=>{e.onVisibleChanged(f)};return()=>{var f,p,v,h;const{prefixCls:m,footer:b=(f=o.footer)===null||f===void 0?void 0:f.call(o),title:S=(p=o.title)===null||p===void 0?void 0:p.call(o),ariaId:C,closable:$,closeIcon:x=(v=o.closeIcon)===null||v===void 0?void 0:v.call(o),onClose:P,bodyStyle:w,bodyProps:O,onMousedown:I,onMouseup:_,visible:T,modalRender:A=o.modalRender,destroyOnClose:R,motionName:H}=e;let M;b&&(M=g("div",{class:`${m}-footer`},[b]));let D;S&&(D=g("div",{class:`${m}-header`},[g("div",{class:`${m}-title`,id:C},[S])]));let N;$&&(N=g("button",{type:"button",onClick:P,"aria-label":"Close",class:`${m}-close`},[x||g("span",{class:`${m}-close-x`},null)]));const L=g("div",{class:`${m}-content`},[N,D,g("div",k({class:`${m}-body`,style:w},O),[(h=o.default)===null||h===void 0?void 0:h.call(o)]),M]),F=Cr(H);return g(Nn,k(k({},F),{},{onBeforeEnter:c,onAfterEnter:()=>d(!0),onAfterLeave:()=>d(!1)}),{default:()=>[T||!R?Pn(g("div",k(k({},r),{},{ref:l,key:"dialog-element",role:"document",style:[u.value,r.style],class:[m,r.class],onMousedown:I,onMouseup:_}),[g("div",{tabindex:0,ref:i,style:bse},[A?A({originVNode:L}):L]),g("div",{tabindex:0,ref:a,style:mse},null)]),[[Vn,T]]):null]})}}}),Sse=le({compatConfig:{MODE:3},name:"DialogMask",props:{prefixCls:String,visible:Boolean,motionName:String,maskProps:Object},setup(e,t){return()=>{const{prefixCls:n,visible:o,maskProps:r,motionName:i}=e,a=Cr(i);return g(Nn,a,{default:()=>[Pn(g("div",k({class:`${n}-mask`},r),null),[[Vn,o]])]})}}}),uT=le({compatConfig:{MODE:3},name:"VcDialog",inheritAttrs:!1,props:Qe(y(y({},bm()),{getOpenCount:Function,scrollLocker:Object}),{mask:!0,visible:!1,keyboard:!0,closable:!0,maskClosable:!0,destroyOnClose:!1,prefixCls:"rc-dialog",getOpenCount:()=>null,focusTriggerAfterClose:!0}),setup(e,t){let{attrs:n,slots:o}=t;const r=se(),i=se(),a=se(),l=se(e.visible),s=se(`vcDialogTitle${hse()}`),u=b=>{var S,C;if(b)Pa(i.value,document.activeElement)||(r.value=document.activeElement,(S=a.value)===null||S===void 0||S.focus());else{const $=l.value;if(l.value=!1,e.mask&&r.value&&e.focusTriggerAfterClose){try{r.value.focus({preventScroll:!0})}catch{}r.value=null}$&&((C=e.afterClose)===null||C===void 0||C.call(e))}},c=b=>{var S;(S=e.onClose)===null||S===void 0||S.call(e,b)},d=se(!1),f=se(),p=()=>{clearTimeout(f.value),d.value=!0},v=()=>{f.value=setTimeout(()=>{d.value=!1})},h=b=>{if(!e.maskClosable)return null;d.value?d.value=!1:i.value===b.target&&c(b)},m=b=>{if(e.keyboard&&b.keyCode===Ie.ESC){b.stopPropagation(),c(b);return}e.visible&&b.keyCode===Ie.TAB&&a.value.changeActive(!b.shiftKey)};return be(()=>e.visible,()=>{e.visible&&(l.value=!0)},{flush:"post"}),tt(()=>{var b;clearTimeout(f.value),(b=e.scrollLocker)===null||b===void 0||b.unLock()}),Ve(()=>{var b,S;(b=e.scrollLocker)===null||b===void 0||b.unLock(),l.value&&((S=e.scrollLocker)===null||S===void 0||S.lock())}),()=>{const{prefixCls:b,mask:S,visible:C,maskTransitionName:$,maskAnimation:x,zIndex:P,wrapClassName:w,rootClassName:O,wrapStyle:I,closable:_,maskProps:T,maskStyle:A,transitionName:R,animation:H,wrapProps:M,title:D=o.title}=e,{style:N,class:L}=n;return g("div",k({class:[`${b}-root`,O]},Ua(e,{data:!0})),[g(Sse,{prefixCls:b,visible:S&&C,motionName:lT(b,$,x),style:y({zIndex:P},A),maskProps:T},null),g("div",k({tabIndex:-1,onKeydown:m,class:ge(`${b}-wrap`,w),ref:i,onClick:h,role:"dialog","aria-labelledby":D?s.value:null,style:y(y({zIndex:P},I),{display:l.value?null:"none"})},M),[g(yse,k(k({},it(e,["scrollLocker"])),{},{style:N,class:L,onMousedown:p,onMouseup:v,ref:a,closable:_,ariaId:s.value,prefixCls:b,visible:C,onClose:c,onVisibleChanged:u,motionName:lT(b,R,H)}),o)])])}}}),Cse=bm(),pD=le({compatConfig:{MODE:3},name:"DialogWrap",inheritAttrs:!1,props:Qe(Cse,{visible:!1}),setup(e,t){let{attrs:n,slots:o}=t;const r=ae(e.visible);return uC({},{inTriggerContext:!1}),be(()=>e.visible,()=>{e.visible&&(r.value=!0)},{flush:"post"}),()=>{const{visible:i,getContainer:a,forceRender:l,destroyOnClose:s=!1,afterClose:u}=e;let c=y(y(y({},e),n),{ref:"_component",key:"dialog"});return a===!1?g(uT,k(k({},c),{},{getOpenCount:()=>2}),o):!l&&s&&!r.value?null:g(gf,{autoLock:!0,visible:i,forceRender:l,getContainer:a},{default:d=>(c=y(y(y({},c),d),{afterClose:()=>{u==null||u(),r.value=!1}}),g(uT,c,o))})}}});function xse(e){const t=ae(null),n=rt(y({},e)),o=ae([]),r=i=>{t.value===null&&(o.value=[],t.value=Ze(()=>{let a;o.value.forEach(l=>{a=y(y({},a),l)}),y(n,a),t.value=null})),o.value.push(i)};return Ke(()=>{t.value&&Ze.cancel(t.value)}),[n,r]}function dT(e,t,n,o){const r=t+n,i=(n-o)/2;if(n>o){if(t>0)return{[e]:i};if(t<0&&ro)return{[e]:t<0?i:-i};return{}}function $se(e,t,n,o){const{width:r,height:i}=EK();let a=null;return e<=r&&t<=i?a={x:0,y:0}:(e>r||t>i)&&(a=y(y({},dT("x",n,e,r)),dT("y",o,t,i))),a}var wse=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{Xe(fT,e)},inject:()=>ze(fT,{isPreviewGroup:se(!1),previewUrls:E(()=>new Map),setPreviewUrls:()=>{},current:ae(null),setCurrent:()=>{},setShowPreview:()=>{},setMousePosition:()=>{},registerImage:null,rootClassName:""})},Pse=()=>({previewPrefixCls:String,preview:{type:[Boolean,Object],default:!0},icons:{type:Object,default:()=>({})}}),gD=le({compatConfig:{MODE:3},name:"PreviewGroup",inheritAttrs:!1,props:Pse(),setup(e,t){let{slots:n}=t;const o=E(()=>{const x={visible:void 0,onVisibleChange:()=>{},getContainer:void 0,current:0};return typeof e.preview=="object"?mD(e.preview,x):x}),r=rt(new Map),i=ae(),a=E(()=>o.value.visible),l=E(()=>o.value.getContainer),s=(x,P)=>{var w,O;(O=(w=o.value).onVisibleChange)===null||O===void 0||O.call(w,x,P)},[u,c]=Dt(!!a.value,{value:a,onChange:s}),d=ae(null),f=E(()=>a.value!==void 0),p=E(()=>Array.from(r.keys())),v=E(()=>p.value[o.value.current]),h=E(()=>new Map(Array.from(r).filter(x=>{let[,{canPreview:P}]=x;return!!P}).map(x=>{let[P,{url:w}]=x;return[P,w]}))),m=function(x,P){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;r.set(x,{url:P,canPreview:w})},b=x=>{i.value=x},S=x=>{d.value=x},C=function(x,P){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const O=()=>{r.delete(x)};return r.set(x,{url:P,canPreview:w}),O},$=x=>{x==null||x.stopPropagation(),c(!1),S(null)};return be(v,x=>{b(x)},{immediate:!0,flush:"post"}),Ve(()=>{u.value&&f.value&&b(v.value)},{flush:"post"}),Ux.provide({isPreviewGroup:se(!0),previewUrls:h,setPreviewUrls:m,current:i,setCurrent:b,setShowPreview:c,setMousePosition:S,registerImage:C}),()=>{const x=wse(o.value,[]);return g(Le,null,[n.default&&n.default(),g(hD,k(k({},x),{},{"ria-hidden":!u.value,visible:u.value,prefixCls:e.previewPrefixCls,onClose:$,mousePosition:d.value,src:h.value.get(i.value),icons:e.icons,getContainer:l.value}),null)])}}}),ul={x:0,y:0},Ose=y(y({},bm()),{src:String,alt:String,rootClassName:String,icons:{type:Object,default:()=>({})}}),hD=le({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:Ose,emits:["close","afterClose"],setup(e,t){let{emit:n,attrs:o}=t;const{rotateLeft:r,rotateRight:i,zoomIn:a,zoomOut:l,close:s,left:u,right:c,flipX:d,flipY:f}=rt(e.icons),p=se(1),v=se(0),h=rt({x:1,y:1}),[m,b]=xse(ul),S=()=>n("close"),C=se(),$=rt({originX:0,originY:0,deltaX:0,deltaY:0}),x=se(!1),P=Ux.inject(),{previewUrls:w,current:O,isPreviewGroup:I,setCurrent:_}=P,T=E(()=>w.value.size),A=E(()=>Array.from(w.value.keys())),R=E(()=>A.value.indexOf(O.value)),H=E(()=>I.value?w.value.get(O.value):e.src),M=E(()=>I.value&&T.value>1),D=se({wheelDirection:0}),N=()=>{p.value=1,v.value=0,h.x=1,h.y=1,b(ul),n("afterClose")},L=pe=>{pe?p.value+=.5:p.value++,b(ul)},F=pe=>{p.value>1&&(pe?p.value-=.5:p.value--),b(ul)},B=()=>{v.value+=90},j=()=>{v.value-=90},z=()=>{h.x=-h.x},G=()=>{h.y=-h.y},Q=pe=>{pe.preventDefault(),pe.stopPropagation(),R.value>0&&_(A.value[R.value-1])},Y=pe=>{pe.preventDefault(),pe.stopPropagation(),R.valueL(),type:"zoomIn"},{icon:l,onClick:()=>F(),type:"zoomOut",disabled:E(()=>p.value===1)},{icon:i,onClick:B,type:"rotateRight"},{icon:r,onClick:j,type:"rotateLeft"},{icon:d,onClick:z,type:"flipX"},{icon:f,onClick:G,type:"flipY"}],X=()=>{if(e.visible&&x.value){const pe=C.value.offsetWidth*p.value,ve=C.value.offsetHeight*p.value,{left:he,top:V}=Kg(C.value),q=v.value%180!==0;x.value=!1;const ie=$se(q?ve:pe,q?pe:ve,he,V);ie&&b(y({},ie))}},te=pe=>{pe.button===0&&(pe.preventDefault(),pe.stopPropagation(),$.deltaX=pe.pageX-m.x,$.deltaY=pe.pageY-m.y,$.originX=m.x,$.originY=m.y,x.value=!0)},W=pe=>{e.visible&&x.value&&b({x:pe.pageX-$.deltaX,y:pe.pageY-$.deltaY})},U=pe=>{if(!e.visible)return;pe.preventDefault();const ve=pe.deltaY;D.value={wheelDirection:ve}},J=pe=>{!e.visible||!M.value||(pe.preventDefault(),pe.keyCode===Ie.LEFT?R.value>0&&_(A.value[R.value-1]):pe.keyCode===Ie.RIGHT&&R.value{e.visible&&(p.value!==1&&(p.value=1),(m.x!==ul.x||m.y!==ul.y)&&b(ul))};let fe=()=>{};return Ke(()=>{be([()=>e.visible,x],()=>{fe();let pe,ve;const he=Ht(window,"mouseup",X,!1),V=Ht(window,"mousemove",W,!1),q=Ht(window,"wheel",U,{passive:!1}),ie=Ht(window,"keydown",J,!1);try{window.top!==window.self&&(pe=Ht(window.top,"mouseup",X,!1),ve=Ht(window.top,"mousemove",W,!1))}catch{}fe=()=>{he.remove(),V.remove(),q.remove(),ie.remove(),pe&&pe.remove(),ve&&ve.remove()}},{flush:"post",immediate:!0}),be([D],()=>{const{wheelDirection:pe}=D.value;pe>0?F(!0):pe<0&&L(!0)})}),Zn(()=>{fe()}),()=>{const{visible:pe,prefixCls:ve,rootClassName:he}=e;return g(pD,k(k({},o),{},{transitionName:e.transitionName,maskTransitionName:e.maskTransitionName,closable:!1,keyboard:!0,prefixCls:ve,onClose:S,afterClose:N,visible:pe,wrapClassName:oe,rootClassName:he,getContainer:e.getContainer}),{default:()=>[g("div",{class:[`${e.prefixCls}-operations-wrapper`,he]},[g("ul",{class:`${e.prefixCls}-operations`},[ne.map(V=>{let{icon:q,onClick:ie,type:me,disabled:Se}=V;return g("li",{class:ge(Z,{[`${e.prefixCls}-operations-operation-disabled`]:Se&&(Se==null?void 0:Se.value)}),onClick:ie,key:me},[Dn(q,{class:re})])})])]),g("div",{class:`${e.prefixCls}-img-wrapper`,style:{transform:`translate3d(${m.x}px, ${m.y}px, 0)`}},[g("img",{onMousedown:te,onDblclick:de,ref:C,class:`${e.prefixCls}-img`,src:H.value,alt:e.alt,style:{transform:`scale3d(${h.x*p.value}, ${h.y*p.value}, 1) rotate(${v.value}deg)`}},null)]),M.value&&g("div",{class:ge(`${e.prefixCls}-switch-left`,{[`${e.prefixCls}-switch-left-disabled`]:R.value<=0}),onClick:Q},[u]),M.value&&g("div",{class:ge(`${e.prefixCls}-switch-right`,{[`${e.prefixCls}-switch-right-disabled`]:R.value>=T.value-1}),onClick:Y},[c])]})}}});var Ise=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({src:String,wrapperClassName:String,wrapperStyle:{type:Object,default:void 0},rootClassName:String,prefixCls:String,previewPrefixCls:String,width:[Number,String],height:[Number,String],previewMask:{type:[Boolean,Function],default:void 0},placeholder:K.any,fallback:String,preview:{type:[Boolean,Object],default:!0},onClick:{type:Function},onError:{type:Function}}),mD=(e,t)=>{const n=y({},e);return Object.keys(t).forEach(o=>{e[o]===void 0&&(n[o]=t[o])}),n};let Tse=0;const bD=le({compatConfig:{MODE:3},name:"VcImage",inheritAttrs:!1,props:vD(),emits:["click","error"],setup(e,t){let{attrs:n,slots:o,emit:r}=t;const i=E(()=>e.prefixCls),a=E(()=>`${i.value}-preview`),l=E(()=>{const L={visible:void 0,onVisibleChange:()=>{},getContainer:void 0};return typeof e.preview=="object"?mD(e.preview,L):L}),s=E(()=>{var L;return(L=l.value.src)!==null&&L!==void 0?L:e.src}),u=E(()=>e.placeholder&&e.placeholder!==!0||o.placeholder),c=E(()=>l.value.visible),d=E(()=>l.value.getContainer),f=E(()=>c.value!==void 0),p=(L,F)=>{var B,j;(j=(B=l.value).onVisibleChange)===null||j===void 0||j.call(B,L,F)},[v,h]=Dt(!!c.value,{value:c,onChange:p}),m=ae(u.value?"loading":"normal");be(()=>e.src,()=>{m.value=u.value?"loading":"normal"});const b=ae(null),S=E(()=>m.value==="error"),C=Ux.inject(),{isPreviewGroup:$,setCurrent:x,setShowPreview:P,setMousePosition:w,registerImage:O}=C,I=ae(Tse++),_=E(()=>e.preview&&!S.value),T=()=>{m.value="normal"},A=L=>{m.value="error",r("error",L)},R=L=>{if(!f.value){const{left:F,top:B}=Kg(L.target);$.value?(x(I.value),w({x:F,y:B})):b.value={x:F,y:B}}$.value?P(!0):h(!0),r("click",L)},H=()=>{h(!1),f.value||(b.value=null)},M=ae(null);be(()=>M,()=>{m.value==="loading"&&M.value.complete&&(M.value.naturalWidth||M.value.naturalHeight)&&T()});let D=()=>{};Ke(()=>{be([s,_],()=>{if(D(),!$.value)return()=>{};D=O(I.value,s.value,_.value),_.value||D()},{flush:"post",immediate:!0})}),Zn(()=>{D()});const N=L=>xq(L)?L+"px":L;return()=>{const{prefixCls:L,wrapperClassName:F,fallback:B,src:j,placeholder:z,wrapperStyle:G,rootClassName:Q,width:Y,height:oe,crossorigin:Z,decoding:re,alt:ne,sizes:X,srcset:te,usemap:W,class:U,style:J}=y(y({},e),n),de=l.value,{icons:fe,maskClassName:pe}=de,ve=Ise(de,["icons","maskClassName"]),he=ge(L,F,Q,{[`${L}-error`]:S.value}),V=S.value&&B?B:s.value,q={crossorigin:Z,decoding:re,alt:ne,sizes:X,srcset:te,usemap:W,width:Y,height:oe,class:ge(`${L}-img`,{[`${L}-img-placeholder`]:z===!0},U),style:y({height:N(oe)},J)};return g(Le,null,[g("div",{class:he,onClick:_.value?R:ie=>{r("click",ie)},style:y({width:N(Y),height:N(oe)},G)},[g("img",k(k(k({},q),S.value&&B?{src:B}:{onLoad:T,onError:A,src:j}),{},{ref:M}),null),m.value==="loading"&&g("div",{"aria-hidden":"true",class:`${L}-placeholder`},[z||o.placeholder&&o.placeholder()]),o.previewMask&&_.value&&g("div",{class:[`${L}-mask`,pe]},[o.previewMask()])]),!$.value&&_.value&&g(hD,k(k({},ve),{},{"aria-hidden":!v.value,visible:v.value,prefixCls:a.value,onClose:H,mousePosition:b.value,src:V,alt:ne,getContainer:d.value,icons:fe,rootClassName:Q}),null)])}}});bD.PreviewGroup=gD;var Ese={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"};function pT(e){for(var t=1;t{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}${e.antCls}-zoom-enter, ${t}${e.antCls}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${e.antCls}-zoom-leave ${t}-content`]:{pointerEvents:"none"},[`${t}-mask`]:y(y({},bT("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:y(y({},bT("fixed")),{overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${t}-root`]:AC(e)}]},Bse=e=>{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap`]:{zIndex:e.zIndexPopupBase,position:"fixed",inset:0,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"},[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax})`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${e.marginXS} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:y(y({},qe(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${e.margin*2}px)`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.modalHeadingColor,fontWeight:e.fontWeightStrong,fontSize:e.modalHeaderTitleFontSize,lineHeight:e.modalHeaderTitleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.modalContentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadowSecondary,pointerEvents:"auto",padding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`},[`${t}-close`]:y({position:"absolute",top:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,insetInlineEnd:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,zIndex:e.zIndexPopupBase+10,padding:0,color:e.modalCloseColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalConfirmIconSize,height:e.modalConfirmIconSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"block",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:`${e.modalCloseBtnSize}px`,textAlign:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:e.modalIconHoverColor,backgroundColor:e.wireframe?"transparent":e.colorFillContent,textDecoration:"none"},"&:active":{backgroundColor:e.wireframe?"transparent":e.colorFillContentHover}},Ji(e)),[`${t}-header`]:{color:e.colorText,background:e.modalHeaderBg,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,marginBottom:e.marginXS},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word"},[`${t}-footer`]:{textAlign:"end",background:e.modalFooterBg,marginTop:e.marginSM,[`${e.antCls}-btn + ${e.antCls}-btn:not(${e.antCls}-dropdown-trigger)`]:{marginBottom:0,marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}})},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-content, ${t}-body, ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},Hse=e=>{const{componentCls:t}=e,n=`${t}-confirm`;return{[n]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${n}-body-wrapper`]:y({},Kr()),[`${n}-body`]:{display:"flex",flexWrap:"wrap",alignItems:"center",[`${n}-title`]:{flex:"0 0 100%",display:"block",overflow:"hidden",color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.modalHeaderTitleFontSize,lineHeight:e.modalHeaderTitleLineHeight,[`+ ${n}-content`]:{marginBlockStart:e.marginXS,flexBasis:"100%",maxWidth:`calc(100% - ${e.modalConfirmIconSize+e.marginSM}px)`}},[`${n}-content`]:{color:e.colorText,fontSize:e.fontSize},[`> ${e.iconCls}`]:{flex:"none",marginInlineEnd:e.marginSM,fontSize:e.modalConfirmIconSize,[`+ ${n}-title`]:{flex:1},[`+ ${n}-title + ${n}-content`]:{marginInlineStart:e.modalConfirmIconSize+e.marginSM}}},[`${n}-btns`]:{textAlign:"end",marginTop:e.marginSM,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${n}-error ${n}-body > ${e.iconCls}`]:{color:e.colorError},[`${n}-warning ${n}-body > ${e.iconCls}, - ${n}-confirm ${n}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${n}-info ${n}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${n}-success ${n}-body > ${e.iconCls}`]:{color:e.colorSuccess},[`${t}-zoom-leave ${t}-btns`]:{pointerEvents:"none"}}},zse=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},jse=e=>{const{componentCls:t,antCls:n}=e,o=`${t}-confirm`;return{[t]:{[`${t}-content`]:{padding:0},[`${t}-header`]:{padding:e.modalHeaderPadding,borderBottom:`${e.modalHeaderBorderWidth}px ${e.modalHeaderBorderStyle} ${e.modalHeaderBorderColorSplit}`,marginBottom:0},[`${t}-body`]:{padding:e.modalBodyPadding},[`${t}-footer`]:{padding:`${e.modalFooterPaddingVertical}px ${e.modalFooterPaddingHorizontal}px`,borderTop:`${e.modalFooterBorderWidth}px ${e.modalFooterBorderStyle} ${e.modalFooterBorderColorSplit}`,borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`,marginTop:0}},[o]:{[`${n}-modal-body`]:{padding:`${e.padding*2}px ${e.padding*2}px ${e.paddingLG}px`},[`${o}-body`]:{[`> ${e.iconCls}`]:{marginInlineEnd:e.margin,[`+ ${o}-title + ${o}-content`]:{marginInlineStart:e.modalConfirmIconSize+e.margin}}},[`${o}-btns`]:{marginTop:e.marginLG}}}},Wse=Ue("Modal",e=>{const t=e.padding,n=e.fontSizeHeading5,o=e.lineHeightHeading5,r=Be(e,{modalBodyPadding:e.paddingLG,modalHeaderBg:e.colorBgElevated,modalHeaderPadding:`${t}px ${e.paddingLG}px`,modalHeaderBorderWidth:e.lineWidth,modalHeaderBorderStyle:e.lineType,modalHeaderTitleLineHeight:o,modalHeaderTitleFontSize:n,modalHeaderBorderColorSplit:e.colorSplit,modalHeaderCloseSize:o*n+t*2,modalContentBg:e.colorBgElevated,modalHeadingColor:e.colorTextHeading,modalCloseColor:e.colorTextDescription,modalFooterBg:"transparent",modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterPaddingVertical:e.paddingXS,modalFooterPaddingHorizontal:e.padding,modalFooterBorderWidth:e.lineWidth,modalConfirmTitleFontSize:e.fontSizeLG,modalIconHoverColor:e.colorIconHover,modalConfirmIconSize:e.fontSize*e.lineHeight,modalCloseBtnSize:e.controlHeightLG*.55});return[Bse(r),Hse(r),zse(r),yD(r),e.wireframe&&jse(r),eu(r,"zoom")]}),v1=e=>({position:e||"absolute",inset:0}),Vse=e=>{const{iconCls:t,motionDurationSlow:n,paddingXXS:o,marginXXS:r,prefixCls:i}=e;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",background:new St("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${n}`,[`.${i}-mask-info`]:y(y({},cn),{padding:`0 ${o}px`,[t]:{marginInlineEnd:r,svg:{verticalAlign:"baseline"}}})}},Kse=e=>{const{previewCls:t,modalMaskBg:n,paddingSM:o,previewOperationColorDisabled:r,motionDurationSlow:i}=e,a=new St(n).setAlpha(.1),l=a.clone().setAlpha(.2);return{[`${t}-operations`]:y(y({},qe(e)),{display:"flex",flexDirection:"row-reverse",alignItems:"center",color:e.previewOperationColor,listStyle:"none",background:a.toRgbString(),pointerEvents:"auto","&-operation":{marginInlineStart:o,padding:o,cursor:"pointer",transition:`all ${i}`,userSelect:"none","&:hover":{background:l.toRgbString()},"&-disabled":{color:r,pointerEvents:"none"},"&:last-of-type":{marginInlineStart:0}},"&-progress":{position:"absolute",left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%)"},"&-icon":{fontSize:e.previewOperationSize}})}},Use=e=>{const{modalMaskBg:t,iconCls:n,previewOperationColorDisabled:o,previewCls:r,zIndexPopup:i,motionDurationSlow:a}=e,l=new St(t).setAlpha(.1),s=l.clone().setAlpha(.2);return{[`${r}-switch-left, ${r}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:i+1,display:"flex",alignItems:"center",justifyContent:"center",width:e.imagePreviewSwitchSize,height:e.imagePreviewSwitchSize,marginTop:-e.imagePreviewSwitchSize/2,color:e.previewOperationColor,background:l.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${a}`,pointerEvents:"auto",userSelect:"none","&:hover":{background:s.toRgbString()},"&-disabled":{"&, &:hover":{color:o,background:"transparent",cursor:"not-allowed",[`> ${n}`]:{cursor:"not-allowed"}}},[`> ${n}`]:{fontSize:e.previewOperationSize}},[`${r}-switch-left`]:{insetInlineStart:e.marginSM},[`${r}-switch-right`]:{insetInlineEnd:e.marginSM}}},Gse=e=>{const{motionEaseOut:t,previewCls:n,motionDurationSlow:o,componentCls:r}=e;return[{[`${r}-preview-root`]:{[n]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${n}-body`]:y(y({},v1()),{overflow:"hidden"}),[`${n}-img`]:{maxWidth:"100%",maxHeight:"100%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${o} ${t} 0s`,userSelect:"none",pointerEvents:"auto","&-wrapper":y(y({},v1()),{transition:`transform ${o} ${t} 0s`,display:"flex",justifyContent:"center",alignItems:"center","&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${n}-moving`]:{[`${n}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${r}-preview-root`]:{[`${n}-wrap`]:{zIndex:e.zIndexPopup}}},{[`${r}-preview-operations-wrapper`]:{position:"fixed",insetBlockStart:0,insetInlineEnd:0,zIndex:e.zIndexPopup+1,width:"100%"},"&":[Kse(e),Use(e)]}]},Xse=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",display:"inline-block",[`${t}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${t}-mask`]:y({},Vse(e)),[`${t}-mask:hover`]:{opacity:1},[`${t}-placeholder`]:y({},v1())}}},Yse=e=>{const{previewCls:t}=e;return{[`${t}-root`]:eu(e,"zoom"),"&":AC(e,!0)}},SD=Ue("Image",e=>{const t=`${e.componentCls}-preview`,n=Be(e,{previewCls:t,modalMaskBg:new St("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[Xse(n),Gse(n),yD(Be(n,{componentCls:t})),Yse(n)]},e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new St(e.colorTextLightSolid).toRgbString(),previewOperationColorDisabled:new St(e.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5})),CD={rotateLeft:g(Gx,null,null),rotateRight:g(Xx,null,null),zoomIn:g(Yx,null,null),zoomOut:g(qx,null,null),close:g(fo,null,null),left:g(mi,null,null),right:g(Jo,null,null),flipX:g(Oh,null,null),flipY:g(Oh,{rotate:90},null)},qse=()=>({previewPrefixCls:String,preview:It()}),xD=le({compatConfig:{MODE:3},name:"AImagePreviewGroup",inheritAttrs:!1,props:qse(),setup(e,t){let{attrs:n,slots:o}=t;const{prefixCls:r,rootPrefixCls:i}=Te("image",e),a=E(()=>`${r.value}-preview`),[l,s]=SD(r),u=E(()=>{const{preview:c}=e;if(c===!1)return c;const d=typeof c=="object"?c:{};return y(y({},d),{rootClassName:s.value,transitionName:co(i.value,"zoom",d.transitionName),maskTransitionName:co(i.value,"fade",d.maskTransitionName)})});return()=>l(g(gD,k(k({},y(y({},n),e)),{},{preview:u.value,icons:CD,previewPrefixCls:a.value}),o))}}),$l=le({name:"AImage",inheritAttrs:!1,props:vD(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,rootPrefixCls:i,configProvider:a}=Te("image",e),[l,s]=SD(r),u=E(()=>{const{preview:c}=e;if(c===!1)return c;const d=typeof c=="object"?c:{};return y(y({icons:CD},d),{transitionName:co(i.value,"zoom",d.transitionName),maskTransitionName:co(i.value,"fade",d.maskTransitionName)})});return()=>{var c,d;const f=((d=(c=a.locale)===null||c===void 0?void 0:c.value)===null||d===void 0?void 0:d.Image)||$o.Image,p=()=>g("div",{class:`${r.value}-mask-info`},[g(Ef,null,null),f==null?void 0:f.preview]),{previewMask:v=n.previewMask||p}=e;return l(g(bD,k(k({},y(y(y({},o),e),{prefixCls:r.value})),{},{preview:u.value,rootClassName:ge(e.rootClassName,s.value)}),y(y({},n),{previewMask:typeof v=="function"?v:null})))}}});$l.PreviewGroup=xD;$l.install=function(e){return e.component($l.name,$l),e.component($l.PreviewGroup.name,$l.PreviewGroup),e};var Jse={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};function y4(e){for(var t=1;tNumber.MAX_SAFE_INTEGER)return String(m1()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(eNumber.MAX_SAFE_INTEGER)return new wl(Number.MAX_SAFE_INTEGER);if(o0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":Qx(this.number):this.origin}}class Us{constructor(t){if(this.origin="",$D(t)){this.empty=!0;return}if(this.origin=String(t),t==="-"||Number.isNaN(t)){this.nan=!0;return}let n=t;if(Zx(n)&&(n=Number(n)),n=typeof n=="string"?n:Qx(n),e$(n)){const o=cd(n);this.negative=o.negative;const r=o.trimStr.split(".");this.integer=BigInt(r[0]);const i=r[1]||"0";this.decimal=BigInt(i),this.decimalLen=i.length}else this.nan=!0}getMark(){return this.negative?"-":""}getIntegerStr(){return this.integer.toString()}getDecimalStr(){return this.decimal.toString().padStart(this.decimalLen,"0")}alignDecimal(t){const n=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(t,"0")}`;return BigInt(n)}negate(){const t=new Us(this.toString());return t.negative=!t.negative,t}add(t){if(this.isInvalidate())return new Us(t);const n=new Us(t);if(n.isInvalidate())return this;const o=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),r=this.alignDecimal(o),i=n.alignDecimal(o),a=(r+i).toString(),{negativeStr:l,trimStr:s}=cd(a),u=`${l}${s.padStart(o+1,"0")}`;return new Us(`${u.slice(0,-o)}.${u.slice(-o)}`)}isEmpty(){return this.empty}isNaN(){return this.nan}isInvalidate(){return this.isEmpty()||this.isNaN()}equals(t){return this.toString()===(t==null?void 0:t.toString())}lessEquals(t){return this.add(t.negate().toString()).toNumber()<=0}toNumber(){return this.isNaN()?NaN:Number(this.toString())}toString(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":cd(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}function ri(e){return m1()?new Us(e):new wl(e)}function b1(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";const{negativeStr:r,integerStr:i,decimalStr:a}=cd(e),l=`${t}${a}`,s=`${r}${i}`;if(n>=0){const u=Number(a[n]);if(u>=5&&!o){const c=ri(e).add(`${r}0.${"0".repeat(n)}${10-u}`);return b1(c.toString(),t,n,o)}return n===0?s:`${s}${t}${a.padEnd(n,"0").slice(0,n)}`}return l===".0"?s:`${s}${l}`}const Qse=200,ece=600,tce=le({compatConfig:{MODE:3},name:"StepHandler",inheritAttrs:!1,props:{prefixCls:String,upDisabled:Boolean,downDisabled:Boolean,onStep:ye()},slots:Object,setup(e,t){let{slots:n,emit:o}=t;const r=ae(),i=(l,s)=>{l.preventDefault(),o("step",s);function u(){o("step",s),r.value=setTimeout(u,Qse)}r.value=setTimeout(u,ece)},a=()=>{clearTimeout(r.value)};return tt(()=>{a()}),()=>{if(fC())return null;const{prefixCls:l,upDisabled:s,downDisabled:u}=e,c=`${l}-handler`,d=ge(c,`${c}-up`,{[`${c}-up-disabled`]:s}),f=ge(c,`${c}-down`,{[`${c}-down-disabled`]:u}),p={unselectable:"on",role:"button",onMouseup:a,onMouseleave:a},{upNode:v,downNode:h}=n;return g("div",{class:`${c}-wrap`},[g("span",k(k({},p),{},{onMousedown:m=>{i(m,!0)},"aria-label":"Increase Value","aria-disabled":s,class:d}),[(v==null?void 0:v())||g("span",{unselectable:"on",class:`${l}-handler-up-inner`},null)]),g("span",k(k({},p),{},{onMousedown:m=>{i(m,!1)},"aria-label":"Decrease Value","aria-disabled":u,class:f}),[(h==null?void 0:h())||g("span",{unselectable:"on",class:`${l}-handler-down-inner`},null)])])}}});function nce(e,t){const n=ae(null);function o(){try{const{selectionStart:i,selectionEnd:a,value:l}=e.value,s=l.substring(0,i),u=l.substring(a);n.value={start:i,end:a,value:l,beforeTxt:s,afterTxt:u}}catch{}}function r(){if(e.value&&n.value&&t.value)try{const{value:i}=e.value,{beforeTxt:a,afterTxt:l,start:s}=n.value;let u=i.length;if(i.endsWith(l))u=i.length-n.value.afterTxt.length;else if(i.startsWith(a))u=a.length;else{const c=a[s-1],d=i.indexOf(c,s-1);d!==-1&&(u=d+1)}e.value.setSelectionRange(u,u)}catch(i){`${i.message}`}}return[o,r]}const oce=()=>{const e=se(0),t=()=>{Ze.cancel(e.value)};return tt(()=>{t()}),n=>{t(),e.value=Ze(()=>{n()})}};var rce=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re||t.isEmpty()?t.toString():t.toNumber(),C4=e=>{const t=ri(e);return t.isInvalidate()?null:t},wD=()=>({stringMode:$e(),defaultValue:He([String,Number]),value:He([String,Number]),prefixCls:Ne(),min:He([String,Number]),max:He([String,Number]),step:He([String,Number],1),tabindex:Number,controls:$e(!0),readonly:$e(),disabled:$e(),autofocus:$e(),keyboard:$e(!0),parser:ye(),formatter:ye(),precision:Number,decimalSeparator:String,onInput:ye(),onChange:ye(),onPressEnter:ye(),onStep:ye(),onBlur:ye(),onFocus:ye()}),ice=le({compatConfig:{MODE:3},name:"InnerInputNumber",inheritAttrs:!1,props:y(y({},wD()),{lazy:Boolean}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r,expose:i}=t;const a=se(),l=se(!1),s=se(!1),u=se(!1),c=se(ri(e.value));function d(z){e.value===void 0&&(c.value=z)}const f=(z,G)=>{if(!G)return e.precision>=0?e.precision:Math.max(Xd(z),Xd(e.step))},p=z=>{const G=String(z);if(e.parser)return e.parser(G);let Q=G;return e.decimalSeparator&&(Q=Q.replace(e.decimalSeparator,".")),Q.replace(/[^\w.-]+/g,"")},v=se(""),h=(z,G)=>{if(e.formatter)return e.formatter(z,{userTyping:G,input:String(v.value)});let Q=typeof z=="number"?Qx(z):z;if(!G){const Y=f(Q,G);if(e$(Q)&&(e.decimalSeparator||Y>=0)){const oe=e.decimalSeparator||".";Q=b1(Q,oe,Y)}}return Q},m=(()=>{const z=e.value;return c.value.isInvalidate()&&["string","number"].includes(typeof z)?Number.isNaN(z)?"":z:h(c.value.toString(),!1)})();v.value=m;function b(z,G){v.value=h(z.isInvalidate()?z.toString(!1):z.toString(!G),G)}const S=E(()=>C4(e.max)),C=E(()=>C4(e.min)),$=E(()=>!S.value||!c.value||c.value.isInvalidate()?!1:S.value.lessEquals(c.value)),x=E(()=>!C.value||!c.value||c.value.isInvalidate()?!1:c.value.lessEquals(C.value)),[P,w]=nce(a,l),O=z=>S.value&&!z.lessEquals(S.value)?S.value:C.value&&!C.value.lessEquals(z)?C.value:null,I=z=>!O(z),_=(z,G)=>{var Q;let Y=z,oe=I(Y)||Y.isEmpty();if(!Y.isEmpty()&&!G&&(Y=O(Y)||Y,oe=!0),!e.readonly&&!e.disabled&&oe){const Z=Y.toString(),re=f(Z,G);return re>=0&&(Y=ri(b1(Z,".",re))),Y.equals(c.value)||(d(Y),(Q=e.onChange)===null||Q===void 0||Q.call(e,Y.isEmpty()?null:S4(e.stringMode,Y)),e.value===void 0&&b(Y,G)),Y}return c.value},T=oce(),A=z=>{var G;if(P(),v.value=z,!u.value){const Q=p(z),Y=ri(Q);Y.isNaN()||_(Y,!0)}(G=e.onInput)===null||G===void 0||G.call(e,z),T(()=>{let Q=z;e.parser||(Q=z.replace(/。/g,".")),Q!==z&&A(Q)})},R=()=>{u.value=!0},H=()=>{u.value=!1,A(a.value.value)},M=z=>{A(z.target.value)},D=z=>{var G,Q;if(z&&$.value||!z&&x.value)return;s.value=!1;let Y=ri(e.step);z||(Y=Y.negate());const oe=(c.value||ri(0)).add(Y.toString()),Z=_(oe,!1);(G=e.onStep)===null||G===void 0||G.call(e,S4(e.stringMode,Z),{offset:e.step,type:z?"up":"down"}),(Q=a.value)===null||Q===void 0||Q.focus()},N=z=>{const G=ri(p(v.value));let Q=G;G.isNaN()?Q=c.value:Q=_(G,z),e.value!==void 0?b(c.value,!1):Q.isNaN()||b(Q,!1)},L=()=>{s.value=!0},F=z=>{var G;const{which:Q}=z;s.value=!0,Q===Ie.ENTER&&(u.value||(s.value=!1),N(!1),(G=e.onPressEnter)===null||G===void 0||G.call(e,z)),e.keyboard!==!1&&!u.value&&[Ie.UP,Ie.DOWN].includes(Q)&&(D(Ie.UP===Q),z.preventDefault())},B=()=>{s.value=!1},j=z=>{N(!1),l.value=!1,s.value=!1,r("blur",z)};return be(()=>e.precision,()=>{c.value.isInvalidate()||b(c.value,!1)},{flush:"post"}),be(()=>e.value,()=>{const z=ri(e.value);c.value=z;const G=ri(p(v.value));(!z.equals(G)||!s.value||e.formatter)&&b(z,s.value)},{flush:"post"}),be(v,()=>{e.formatter&&w()},{flush:"post"}),be(()=>e.disabled,z=>{z&&(l.value=!1)}),i({focus:()=>{var z;(z=a.value)===null||z===void 0||z.focus()},blur:()=>{var z;(z=a.value)===null||z===void 0||z.blur()}}),()=>{const z=y(y({},n),e),{prefixCls:G="rc-input-number",min:Q,max:Y,step:oe=1,defaultValue:Z,value:re,disabled:ne,readonly:X,keyboard:te,controls:W=!0,autofocus:U,stringMode:J,parser:de,formatter:fe,precision:pe,decimalSeparator:ve,onChange:he,onInput:V,onPressEnter:q,onStep:ie,lazy:me,class:Se,style:ce}=z,ee=rce(z,["prefixCls","min","max","step","defaultValue","value","disabled","readonly","keyboard","controls","autofocus","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","lazy","class","style"]),{upHandler:ue,downHandler:xe}=o,Pe=`${G}-input`,_e={};return me?_e.onChange=M:_e.onInput=M,g("div",{class:ge(G,Se,{[`${G}-focused`]:l.value,[`${G}-disabled`]:ne,[`${G}-readonly`]:X,[`${G}-not-a-number`]:c.value.isNaN(),[`${G}-out-of-range`]:!c.value.isInvalidate()&&!I(c.value)}),style:ce,onKeydown:F,onKeyup:B},[W&&g(tce,{prefixCls:G,upDisabled:$.value,downDisabled:x.value,onStep:D},{upNode:ue,downNode:xe}),g("div",{class:`${Pe}-wrap`},[g("input",k(k(k({autofocus:U,autocomplete:"off",role:"spinbutton","aria-valuemin":Q,"aria-valuemax":Y,"aria-valuenow":c.value.isInvalidate()?null:c.value.toString(),step:oe},ee),{},{ref:a,class:Pe,value:v.value,disabled:ne,readonly:X,onFocus:Ce=>{l.value=!0,r("focus",Ce)}},_e),{},{onBlur:j,onCompositionstart:R,onCompositionend:H,onBeforeinput:L}),null)])])}}});function rb(e){return e!=null}const ace=e=>{const{componentCls:t,lineWidth:n,lineType:o,colorBorder:r,borderRadius:i,fontSizeLG:a,controlHeightLG:l,controlHeightSM:s,colorError:u,inputPaddingHorizontalSM:c,colorTextDescription:d,motionDurationMid:f,colorPrimary:p,controlHeight:v,inputPaddingHorizontal:h,colorBgContainer:m,colorTextDisabled:b,borderRadiusSM:S,borderRadiusLG:C,controlWidth:$,handleVisible:x}=e;return[{[t]:y(y(y(y({},qe(e)),fs(e)),$f(e,t)),{display:"inline-block",width:$,margin:0,padding:0,border:`${n}px ${o} ${r}`,borderRadius:i,"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,borderRadius:C,[`input${t}-input`]:{height:l-2*n}},"&-sm":{padding:0,borderRadius:S,[`input${t}-input`]:{height:s-2*n,padding:`0 ${c}px`}},"&:hover":y({},ru(e)),"&-focused":y({},Ba(e)),"&-disabled":y(y({},mx(e)),{[`${t}-input`]:{cursor:"not-allowed"}}),"&-out-of-range":{input:{color:u}},"&-group":y(y(y({},qe(e)),T5(e)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:C}},"&-sm":{[`${t}-group-addon`]:{borderRadius:S}}}}),[t]:{"&-input":y(y({width:"100%",height:v-2*n,padding:`0 ${h}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:i,outline:0,transition:`all ${f} linear`,appearance:"textfield",color:e.colorText,fontSize:"inherit",verticalAlign:"top"},vx(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[t]:{[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{opacity:1},[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleWidth,height:"100%",background:m,borderStartStartRadius:0,borderStartEndRadius:i,borderEndEndRadius:i,borderEndStartRadius:0,opacity:x===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${f} linear ${f}`,[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[` + ${n}-confirm ${n}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${n}-info ${n}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${n}-success ${n}-body > ${e.iconCls}`]:{color:e.colorSuccess},[`${t}-zoom-leave ${t}-btns`]:{pointerEvents:"none"}}},zse=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},jse=e=>{const{componentCls:t,antCls:n}=e,o=`${t}-confirm`;return{[t]:{[`${t}-content`]:{padding:0},[`${t}-header`]:{padding:e.modalHeaderPadding,borderBottom:`${e.modalHeaderBorderWidth}px ${e.modalHeaderBorderStyle} ${e.modalHeaderBorderColorSplit}`,marginBottom:0},[`${t}-body`]:{padding:e.modalBodyPadding},[`${t}-footer`]:{padding:`${e.modalFooterPaddingVertical}px ${e.modalFooterPaddingHorizontal}px`,borderTop:`${e.modalFooterBorderWidth}px ${e.modalFooterBorderStyle} ${e.modalFooterBorderColorSplit}`,borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`,marginTop:0}},[o]:{[`${n}-modal-body`]:{padding:`${e.padding*2}px ${e.padding*2}px ${e.paddingLG}px`},[`${o}-body`]:{[`> ${e.iconCls}`]:{marginInlineEnd:e.margin,[`+ ${o}-title + ${o}-content`]:{marginInlineStart:e.modalConfirmIconSize+e.margin}}},[`${o}-btns`]:{marginTop:e.marginLG}}}},Wse=Ue("Modal",e=>{const t=e.padding,n=e.fontSizeHeading5,o=e.lineHeightHeading5,r=Be(e,{modalBodyPadding:e.paddingLG,modalHeaderBg:e.colorBgElevated,modalHeaderPadding:`${t}px ${e.paddingLG}px`,modalHeaderBorderWidth:e.lineWidth,modalHeaderBorderStyle:e.lineType,modalHeaderTitleLineHeight:o,modalHeaderTitleFontSize:n,modalHeaderBorderColorSplit:e.colorSplit,modalHeaderCloseSize:o*n+t*2,modalContentBg:e.colorBgElevated,modalHeadingColor:e.colorTextHeading,modalCloseColor:e.colorTextDescription,modalFooterBg:"transparent",modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterPaddingVertical:e.paddingXS,modalFooterPaddingHorizontal:e.padding,modalFooterBorderWidth:e.lineWidth,modalConfirmTitleFontSize:e.fontSizeLG,modalIconHoverColor:e.colorIconHover,modalConfirmIconSize:e.fontSize*e.lineHeight,modalCloseBtnSize:e.controlHeightLG*.55});return[Bse(r),Hse(r),zse(r),yD(r),e.wireframe&&jse(r),eu(r,"zoom")]}),v1=e=>({position:e||"absolute",inset:0}),Vse=e=>{const{iconCls:t,motionDurationSlow:n,paddingXXS:o,marginXXS:r,prefixCls:i}=e;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",background:new St("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${n}`,[`.${i}-mask-info`]:y(y({},cn),{padding:`0 ${o}px`,[t]:{marginInlineEnd:r,svg:{verticalAlign:"baseline"}}})}},Kse=e=>{const{previewCls:t,modalMaskBg:n,paddingSM:o,previewOperationColorDisabled:r,motionDurationSlow:i}=e,a=new St(n).setAlpha(.1),l=a.clone().setAlpha(.2);return{[`${t}-operations`]:y(y({},qe(e)),{display:"flex",flexDirection:"row-reverse",alignItems:"center",color:e.previewOperationColor,listStyle:"none",background:a.toRgbString(),pointerEvents:"auto","&-operation":{marginInlineStart:o,padding:o,cursor:"pointer",transition:`all ${i}`,userSelect:"none","&:hover":{background:l.toRgbString()},"&-disabled":{color:r,pointerEvents:"none"},"&:last-of-type":{marginInlineStart:0}},"&-progress":{position:"absolute",left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%)"},"&-icon":{fontSize:e.previewOperationSize}})}},Use=e=>{const{modalMaskBg:t,iconCls:n,previewOperationColorDisabled:o,previewCls:r,zIndexPopup:i,motionDurationSlow:a}=e,l=new St(t).setAlpha(.1),s=l.clone().setAlpha(.2);return{[`${r}-switch-left, ${r}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:i+1,display:"flex",alignItems:"center",justifyContent:"center",width:e.imagePreviewSwitchSize,height:e.imagePreviewSwitchSize,marginTop:-e.imagePreviewSwitchSize/2,color:e.previewOperationColor,background:l.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${a}`,pointerEvents:"auto",userSelect:"none","&:hover":{background:s.toRgbString()},"&-disabled":{"&, &:hover":{color:o,background:"transparent",cursor:"not-allowed",[`> ${n}`]:{cursor:"not-allowed"}}},[`> ${n}`]:{fontSize:e.previewOperationSize}},[`${r}-switch-left`]:{insetInlineStart:e.marginSM},[`${r}-switch-right`]:{insetInlineEnd:e.marginSM}}},Gse=e=>{const{motionEaseOut:t,previewCls:n,motionDurationSlow:o,componentCls:r}=e;return[{[`${r}-preview-root`]:{[n]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${n}-body`]:y(y({},v1()),{overflow:"hidden"}),[`${n}-img`]:{maxWidth:"100%",maxHeight:"100%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${o} ${t} 0s`,userSelect:"none",pointerEvents:"auto","&-wrapper":y(y({},v1()),{transition:`transform ${o} ${t} 0s`,display:"flex",justifyContent:"center",alignItems:"center","&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${n}-moving`]:{[`${n}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${r}-preview-root`]:{[`${n}-wrap`]:{zIndex:e.zIndexPopup}}},{[`${r}-preview-operations-wrapper`]:{position:"fixed",insetBlockStart:0,insetInlineEnd:0,zIndex:e.zIndexPopup+1,width:"100%"},"&":[Kse(e),Use(e)]}]},Xse=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",display:"inline-block",[`${t}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${t}-mask`]:y({},Vse(e)),[`${t}-mask:hover`]:{opacity:1},[`${t}-placeholder`]:y({},v1())}}},Yse=e=>{const{previewCls:t}=e;return{[`${t}-root`]:eu(e,"zoom"),"&":AC(e,!0)}},SD=Ue("Image",e=>{const t=`${e.componentCls}-preview`,n=Be(e,{previewCls:t,modalMaskBg:new St("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[Xse(n),Gse(n),yD(Be(n,{componentCls:t})),Yse(n)]},e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new St(e.colorTextLightSolid).toRgbString(),previewOperationColorDisabled:new St(e.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5})),CD={rotateLeft:g(Gx,null,null),rotateRight:g(Xx,null,null),zoomIn:g(Yx,null,null),zoomOut:g(qx,null,null),close:g(fo,null,null),left:g(mi,null,null),right:g(Jo,null,null),flipX:g(Ph,null,null),flipY:g(Ph,{rotate:90},null)},qse=()=>({previewPrefixCls:String,preview:It()}),xD=le({compatConfig:{MODE:3},name:"AImagePreviewGroup",inheritAttrs:!1,props:qse(),setup(e,t){let{attrs:n,slots:o}=t;const{prefixCls:r,rootPrefixCls:i}=Te("image",e),a=E(()=>`${r.value}-preview`),[l,s]=SD(r),u=E(()=>{const{preview:c}=e;if(c===!1)return c;const d=typeof c=="object"?c:{};return y(y({},d),{rootClassName:s.value,transitionName:co(i.value,"zoom",d.transitionName),maskTransitionName:co(i.value,"fade",d.maskTransitionName)})});return()=>l(g(gD,k(k({},y(y({},n),e)),{},{preview:u.value,icons:CD,previewPrefixCls:a.value}),o))}}),$l=le({name:"AImage",inheritAttrs:!1,props:vD(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,rootPrefixCls:i,configProvider:a}=Te("image",e),[l,s]=SD(r),u=E(()=>{const{preview:c}=e;if(c===!1)return c;const d=typeof c=="object"?c:{};return y(y({icons:CD},d),{transitionName:co(i.value,"zoom",d.transitionName),maskTransitionName:co(i.value,"fade",d.maskTransitionName)})});return()=>{var c,d;const f=((d=(c=a.locale)===null||c===void 0?void 0:c.value)===null||d===void 0?void 0:d.Image)||$o.Image,p=()=>g("div",{class:`${r.value}-mask-info`},[g(Ef,null,null),f==null?void 0:f.preview]),{previewMask:v=n.previewMask||p}=e;return l(g(bD,k(k({},y(y(y({},o),e),{prefixCls:r.value})),{},{preview:u.value,rootClassName:ge(e.rootClassName,s.value)}),y(y({},n),{previewMask:typeof v=="function"?v:null})))}}});$l.PreviewGroup=xD;$l.install=function(e){return e.component($l.name,$l),e.component($l.PreviewGroup.name,$l.PreviewGroup),e};var Jse={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};function yT(e){for(var t=1;tNumber.MAX_SAFE_INTEGER)return String(m1()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(eNumber.MAX_SAFE_INTEGER)return new wl(Number.MAX_SAFE_INTEGER);if(o0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":Qx(this.number):this.origin}}class Us{constructor(t){if(this.origin="",$D(t)){this.empty=!0;return}if(this.origin=String(t),t==="-"||Number.isNaN(t)){this.nan=!0;return}let n=t;if(Zx(n)&&(n=Number(n)),n=typeof n=="string"?n:Qx(n),e$(n)){const o=cd(n);this.negative=o.negative;const r=o.trimStr.split(".");this.integer=BigInt(r[0]);const i=r[1]||"0";this.decimal=BigInt(i),this.decimalLen=i.length}else this.nan=!0}getMark(){return this.negative?"-":""}getIntegerStr(){return this.integer.toString()}getDecimalStr(){return this.decimal.toString().padStart(this.decimalLen,"0")}alignDecimal(t){const n=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(t,"0")}`;return BigInt(n)}negate(){const t=new Us(this.toString());return t.negative=!t.negative,t}add(t){if(this.isInvalidate())return new Us(t);const n=new Us(t);if(n.isInvalidate())return this;const o=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),r=this.alignDecimal(o),i=n.alignDecimal(o),a=(r+i).toString(),{negativeStr:l,trimStr:s}=cd(a),u=`${l}${s.padStart(o+1,"0")}`;return new Us(`${u.slice(0,-o)}.${u.slice(-o)}`)}isEmpty(){return this.empty}isNaN(){return this.nan}isInvalidate(){return this.isEmpty()||this.isNaN()}equals(t){return this.toString()===(t==null?void 0:t.toString())}lessEquals(t){return this.add(t.negate().toString()).toNumber()<=0}toNumber(){return this.isNaN()?NaN:Number(this.toString())}toString(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":cd(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}function ri(e){return m1()?new Us(e):new wl(e)}function b1(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";const{negativeStr:r,integerStr:i,decimalStr:a}=cd(e),l=`${t}${a}`,s=`${r}${i}`;if(n>=0){const u=Number(a[n]);if(u>=5&&!o){const c=ri(e).add(`${r}0.${"0".repeat(n)}${10-u}`);return b1(c.toString(),t,n,o)}return n===0?s:`${s}${t}${a.padEnd(n,"0").slice(0,n)}`}return l===".0"?s:`${s}${l}`}const Qse=200,ece=600,tce=le({compatConfig:{MODE:3},name:"StepHandler",inheritAttrs:!1,props:{prefixCls:String,upDisabled:Boolean,downDisabled:Boolean,onStep:ye()},slots:Object,setup(e,t){let{slots:n,emit:o}=t;const r=ae(),i=(l,s)=>{l.preventDefault(),o("step",s);function u(){o("step",s),r.value=setTimeout(u,Qse)}r.value=setTimeout(u,ece)},a=()=>{clearTimeout(r.value)};return tt(()=>{a()}),()=>{if(fC())return null;const{prefixCls:l,upDisabled:s,downDisabled:u}=e,c=`${l}-handler`,d=ge(c,`${c}-up`,{[`${c}-up-disabled`]:s}),f=ge(c,`${c}-down`,{[`${c}-down-disabled`]:u}),p={unselectable:"on",role:"button",onMouseup:a,onMouseleave:a},{upNode:v,downNode:h}=n;return g("div",{class:`${c}-wrap`},[g("span",k(k({},p),{},{onMousedown:m=>{i(m,!0)},"aria-label":"Increase Value","aria-disabled":s,class:d}),[(v==null?void 0:v())||g("span",{unselectable:"on",class:`${l}-handler-up-inner`},null)]),g("span",k(k({},p),{},{onMousedown:m=>{i(m,!1)},"aria-label":"Decrease Value","aria-disabled":u,class:f}),[(h==null?void 0:h())||g("span",{unselectable:"on",class:`${l}-handler-down-inner`},null)])])}}});function nce(e,t){const n=ae(null);function o(){try{const{selectionStart:i,selectionEnd:a,value:l}=e.value,s=l.substring(0,i),u=l.substring(a);n.value={start:i,end:a,value:l,beforeTxt:s,afterTxt:u}}catch{}}function r(){if(e.value&&n.value&&t.value)try{const{value:i}=e.value,{beforeTxt:a,afterTxt:l,start:s}=n.value;let u=i.length;if(i.endsWith(l))u=i.length-n.value.afterTxt.length;else if(i.startsWith(a))u=a.length;else{const c=a[s-1],d=i.indexOf(c,s-1);d!==-1&&(u=d+1)}e.value.setSelectionRange(u,u)}catch(i){`${i.message}`}}return[o,r]}const oce=()=>{const e=se(0),t=()=>{Ze.cancel(e.value)};return tt(()=>{t()}),n=>{t(),e.value=Ze(()=>{n()})}};var rce=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re||t.isEmpty()?t.toString():t.toNumber(),CT=e=>{const t=ri(e);return t.isInvalidate()?null:t},wD=()=>({stringMode:$e(),defaultValue:He([String,Number]),value:He([String,Number]),prefixCls:Ne(),min:He([String,Number]),max:He([String,Number]),step:He([String,Number],1),tabindex:Number,controls:$e(!0),readonly:$e(),disabled:$e(),autofocus:$e(),keyboard:$e(!0),parser:ye(),formatter:ye(),precision:Number,decimalSeparator:String,onInput:ye(),onChange:ye(),onPressEnter:ye(),onStep:ye(),onBlur:ye(),onFocus:ye()}),ice=le({compatConfig:{MODE:3},name:"InnerInputNumber",inheritAttrs:!1,props:y(y({},wD()),{lazy:Boolean}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r,expose:i}=t;const a=se(),l=se(!1),s=se(!1),u=se(!1),c=se(ri(e.value));function d(z){e.value===void 0&&(c.value=z)}const f=(z,G)=>{if(!G)return e.precision>=0?e.precision:Math.max(Xd(z),Xd(e.step))},p=z=>{const G=String(z);if(e.parser)return e.parser(G);let Q=G;return e.decimalSeparator&&(Q=Q.replace(e.decimalSeparator,".")),Q.replace(/[^\w.-]+/g,"")},v=se(""),h=(z,G)=>{if(e.formatter)return e.formatter(z,{userTyping:G,input:String(v.value)});let Q=typeof z=="number"?Qx(z):z;if(!G){const Y=f(Q,G);if(e$(Q)&&(e.decimalSeparator||Y>=0)){const oe=e.decimalSeparator||".";Q=b1(Q,oe,Y)}}return Q},m=(()=>{const z=e.value;return c.value.isInvalidate()&&["string","number"].includes(typeof z)?Number.isNaN(z)?"":z:h(c.value.toString(),!1)})();v.value=m;function b(z,G){v.value=h(z.isInvalidate()?z.toString(!1):z.toString(!G),G)}const S=E(()=>CT(e.max)),C=E(()=>CT(e.min)),$=E(()=>!S.value||!c.value||c.value.isInvalidate()?!1:S.value.lessEquals(c.value)),x=E(()=>!C.value||!c.value||c.value.isInvalidate()?!1:c.value.lessEquals(C.value)),[P,w]=nce(a,l),O=z=>S.value&&!z.lessEquals(S.value)?S.value:C.value&&!C.value.lessEquals(z)?C.value:null,I=z=>!O(z),_=(z,G)=>{var Q;let Y=z,oe=I(Y)||Y.isEmpty();if(!Y.isEmpty()&&!G&&(Y=O(Y)||Y,oe=!0),!e.readonly&&!e.disabled&&oe){const Z=Y.toString(),re=f(Z,G);return re>=0&&(Y=ri(b1(Z,".",re))),Y.equals(c.value)||(d(Y),(Q=e.onChange)===null||Q===void 0||Q.call(e,Y.isEmpty()?null:ST(e.stringMode,Y)),e.value===void 0&&b(Y,G)),Y}return c.value},T=oce(),A=z=>{var G;if(P(),v.value=z,!u.value){const Q=p(z),Y=ri(Q);Y.isNaN()||_(Y,!0)}(G=e.onInput)===null||G===void 0||G.call(e,z),T(()=>{let Q=z;e.parser||(Q=z.replace(/。/g,".")),Q!==z&&A(Q)})},R=()=>{u.value=!0},H=()=>{u.value=!1,A(a.value.value)},M=z=>{A(z.target.value)},D=z=>{var G,Q;if(z&&$.value||!z&&x.value)return;s.value=!1;let Y=ri(e.step);z||(Y=Y.negate());const oe=(c.value||ri(0)).add(Y.toString()),Z=_(oe,!1);(G=e.onStep)===null||G===void 0||G.call(e,ST(e.stringMode,Z),{offset:e.step,type:z?"up":"down"}),(Q=a.value)===null||Q===void 0||Q.focus()},N=z=>{const G=ri(p(v.value));let Q=G;G.isNaN()?Q=c.value:Q=_(G,z),e.value!==void 0?b(c.value,!1):Q.isNaN()||b(Q,!1)},L=()=>{s.value=!0},F=z=>{var G;const{which:Q}=z;s.value=!0,Q===Ie.ENTER&&(u.value||(s.value=!1),N(!1),(G=e.onPressEnter)===null||G===void 0||G.call(e,z)),e.keyboard!==!1&&!u.value&&[Ie.UP,Ie.DOWN].includes(Q)&&(D(Ie.UP===Q),z.preventDefault())},B=()=>{s.value=!1},j=z=>{N(!1),l.value=!1,s.value=!1,r("blur",z)};return be(()=>e.precision,()=>{c.value.isInvalidate()||b(c.value,!1)},{flush:"post"}),be(()=>e.value,()=>{const z=ri(e.value);c.value=z;const G=ri(p(v.value));(!z.equals(G)||!s.value||e.formatter)&&b(z,s.value)},{flush:"post"}),be(v,()=>{e.formatter&&w()},{flush:"post"}),be(()=>e.disabled,z=>{z&&(l.value=!1)}),i({focus:()=>{var z;(z=a.value)===null||z===void 0||z.focus()},blur:()=>{var z;(z=a.value)===null||z===void 0||z.blur()}}),()=>{const z=y(y({},n),e),{prefixCls:G="rc-input-number",min:Q,max:Y,step:oe=1,defaultValue:Z,value:re,disabled:ne,readonly:X,keyboard:te,controls:W=!0,autofocus:U,stringMode:J,parser:de,formatter:fe,precision:pe,decimalSeparator:ve,onChange:he,onInput:V,onPressEnter:q,onStep:ie,lazy:me,class:Se,style:ce}=z,ee=rce(z,["prefixCls","min","max","step","defaultValue","value","disabled","readonly","keyboard","controls","autofocus","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","lazy","class","style"]),{upHandler:ue,downHandler:xe}=o,Pe=`${G}-input`,_e={};return me?_e.onChange=M:_e.onInput=M,g("div",{class:ge(G,Se,{[`${G}-focused`]:l.value,[`${G}-disabled`]:ne,[`${G}-readonly`]:X,[`${G}-not-a-number`]:c.value.isNaN(),[`${G}-out-of-range`]:!c.value.isInvalidate()&&!I(c.value)}),style:ce,onKeydown:F,onKeyup:B},[W&&g(tce,{prefixCls:G,upDisabled:$.value,downDisabled:x.value,onStep:D},{upNode:ue,downNode:xe}),g("div",{class:`${Pe}-wrap`},[g("input",k(k(k({autofocus:U,autocomplete:"off",role:"spinbutton","aria-valuemin":Q,"aria-valuemax":Y,"aria-valuenow":c.value.isInvalidate()?null:c.value.toString(),step:oe},ee),{},{ref:a,class:Pe,value:v.value,disabled:ne,readonly:X,onFocus:Ce=>{l.value=!0,r("focus",Ce)}},_e),{},{onBlur:j,onCompositionstart:R,onCompositionend:H,onBeforeinput:L}),null)])])}}});function rb(e){return e!=null}const ace=e=>{const{componentCls:t,lineWidth:n,lineType:o,colorBorder:r,borderRadius:i,fontSizeLG:a,controlHeightLG:l,controlHeightSM:s,colorError:u,inputPaddingHorizontalSM:c,colorTextDescription:d,motionDurationMid:f,colorPrimary:p,controlHeight:v,inputPaddingHorizontal:h,colorBgContainer:m,colorTextDisabled:b,borderRadiusSM:S,borderRadiusLG:C,controlWidth:$,handleVisible:x}=e;return[{[t]:y(y(y(y({},qe(e)),fs(e)),$f(e,t)),{display:"inline-block",width:$,margin:0,padding:0,border:`${n}px ${o} ${r}`,borderRadius:i,"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,borderRadius:C,[`input${t}-input`]:{height:l-2*n}},"&-sm":{padding:0,borderRadius:S,[`input${t}-input`]:{height:s-2*n,padding:`0 ${c}px`}},"&:hover":y({},ru(e)),"&-focused":y({},Ba(e)),"&-disabled":y(y({},mx(e)),{[`${t}-input`]:{cursor:"not-allowed"}}),"&-out-of-range":{input:{color:u}},"&-group":y(y(y({},qe(e)),T5(e)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:C}},"&-sm":{[`${t}-group-addon`]:{borderRadius:S}}}}),[t]:{"&-input":y(y({width:"100%",height:v-2*n,padding:`0 ${h}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:i,outline:0,transition:`all ${f} linear`,appearance:"textfield",color:e.colorText,fontSize:"inherit",verticalAlign:"top"},vx(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[t]:{[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{opacity:1},[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleWidth,height:"100%",background:m,borderStartStartRadius:0,borderStartEndRadius:i,borderEndEndRadius:i,borderEndStartRadius:0,opacity:x===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${f} linear ${f}`,[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[` ${t}-handler-up-inner, ${t}-handler-down-inner `]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},[`${t}-handler`]:{height:"50%",overflow:"hidden",color:d,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${n}px ${o} ${r}`,transition:`all ${f} linear`,"&:active":{background:e.colorFillAlter},"&:hover":{height:"60%",[` @@ -375,7 +375,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `]:{cursor:"not-allowed"},[` ${t}-handler-up-disabled:hover &-handler-up-inner, ${t}-handler-down-disabled:hover &-handler-down-inner - `]:{color:b}}},{[`${t}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${t}-handler-down`]:{borderBlockStartWidth:0}}}]},lce=e=>{const{componentCls:t,inputPaddingHorizontal:n,inputAffixPadding:o,controlWidth:r,borderRadiusLG:i,borderRadiusSM:a}=e;return{[`${t}-affix-wrapper`]:y(y(y({},fs(e)),$f(e,`${t}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:r,padding:0,paddingInlineStart:n,"&-lg":{borderRadius:i},"&-sm":{borderRadius:a},[`&:not(${t}-affix-wrapper-disabled):hover`]:y(y({},ru(e)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${t}[disabled]`]:{background:"transparent"}},[`> div${t}`]:{width:"100%",border:"none",outline:"none",[`&${t}-focused`]:{boxShadow:"none !important"}},[`input${t}-input`]:{padding:0},"&::before":{width:0,visibility:"hidden",content:'"\\a0"'},[`${t}-handler-wrap`]:{zIndex:2},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:o},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:n,marginInlineStart:o}}})}},sce=Ue("InputNumber",e=>{const t=ps(e);return[ace(t),lce(t),tu(t)]},e=>({controlWidth:90,handleWidth:e.controlHeightSM-e.lineWidth*2,handleFontSize:e.fontSize/2,handleVisible:"auto"}));var cce=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);ry(y({},x4),{size:Ne(),bordered:$e(!0),placeholder:String,name:String,id:String,type:String,addonBefore:K.any,addonAfter:K.any,prefix:K.any,"onUpdate:value":x4.onChange,valueModifiers:Object,status:Ne()}),ib=le({compatConfig:{MODE:3},name:"AInputNumber",inheritAttrs:!1,props:uce(),slots:Object,setup(e,t){let{emit:n,expose:o,attrs:r,slots:i}=t;var a;const l=bn(),s=kn.useInject(),u=E(()=>Yr(s.status,e.status)),{prefixCls:c,size:d,direction:f,disabled:p}=Te("input-number",e),{compactSize:v,compactItemClassnames:h}=Xa(c,f),m=ko(),b=E(()=>{var R;return(R=p.value)!==null&&R!==void 0?R:m.value}),[S,C]=sce(c),$=E(()=>v.value||d.value),x=se((a=e.value)!==null&&a!==void 0?a:e.defaultValue),P=se(!1);be(()=>e.value,()=>{x.value=e.value});const w=se(null),O=()=>{var R;(R=w.value)===null||R===void 0||R.focus()};o({focus:O,blur:()=>{var R;(R=w.value)===null||R===void 0||R.blur()}});const _=R=>{e.value===void 0&&(x.value=R),n("update:value",R),n("change",R),l.onFieldChange()},T=R=>{P.value=!1,n("blur",R),l.onFieldBlur()},A=R=>{P.value=!0,n("focus",R)};return()=>{var R,H,M,D;const{hasFeedback:N,isFormItemInput:L,feedbackIcon:F}=s,B=(R=e.id)!==null&&R!==void 0?R:l.id.value,j=y(y(y({},r),e),{id:B,disabled:b.value}),{class:z,bordered:G,readonly:Q,style:Y,addonBefore:oe=(H=i.addonBefore)===null||H===void 0?void 0:H.call(i),addonAfter:Z=(M=i.addonAfter)===null||M===void 0?void 0:M.call(i),prefix:re=(D=i.prefix)===null||D===void 0?void 0:D.call(i),valueModifiers:ne={}}=j,X=cce(j,["class","bordered","readonly","style","addonBefore","addonAfter","prefix","valueModifiers"]),te=c.value,W=ge({[`${te}-lg`]:$.value==="large",[`${te}-sm`]:$.value==="small",[`${te}-rtl`]:f.value==="rtl",[`${te}-readonly`]:Q,[`${te}-borderless`]:!G,[`${te}-in-form-item`]:L},lo(te,u.value),z,h.value,C.value);let U=g(ice,k(k({},it(X,["size","defaultValue"])),{},{ref:w,lazy:!!ne.lazy,value:x.value,class:W,prefixCls:te,readonly:Q,onChange:_,onBlur:T,onFocus:A}),{upHandler:i.upIcon?()=>g("span",{class:`${te}-handler-up-inner`},[i.upIcon()]):()=>g(Jx,{class:`${te}-handler-up-inner`},null),downHandler:i.downIcon?()=>g("span",{class:`${te}-handler-down-inner`},[i.downIcon()]):()=>g(cs,{class:`${te}-handler-down-inner`},null)});const J=rb(oe)||rb(Z),de=rb(re);if(de||N){const fe=ge(`${te}-affix-wrapper`,lo(`${te}-affix-wrapper`,u.value,N),{[`${te}-affix-wrapper-focused`]:P.value,[`${te}-affix-wrapper-disabled`]:b.value,[`${te}-affix-wrapper-sm`]:$.value==="small",[`${te}-affix-wrapper-lg`]:$.value==="large",[`${te}-affix-wrapper-rtl`]:f.value==="rtl",[`${te}-affix-wrapper-readonly`]:Q,[`${te}-affix-wrapper-borderless`]:!G,[`${z}`]:!J&&z},C.value);U=g("div",{class:fe,style:Y,onClick:O},[de&&g("span",{class:`${te}-prefix`},[re]),U,N&&g("span",{class:`${te}-suffix`},[F])])}if(J){const fe=`${te}-group`,pe=`${fe}-addon`,ve=oe?g("div",{class:pe},[oe]):null,he=Z?g("div",{class:pe},[Z]):null,V=ge(`${te}-wrapper`,fe,{[`${fe}-rtl`]:f.value==="rtl"},C.value),q=ge(`${te}-group-wrapper`,{[`${te}-group-wrapper-sm`]:$.value==="small",[`${te}-group-wrapper-lg`]:$.value==="large",[`${te}-group-wrapper-rtl`]:f.value==="rtl"},lo(`${c}-group-wrapper`,u.value,N),z,C.value);U=g("div",{class:q,style:Y},[g("div",{class:V},[ve&&g(Bd,null,{default:()=>[g(Jg,null,{default:()=>[ve]})]}),U,he&&g(Bd,null,{default:()=>[g(Jg,null,{default:()=>[he]})]})])])}return S(mt(U,{style:Y}))}}}),dce=y(ib,{install:e=>(e.component(ib.name,ib),e)}),fce=e=>{const{componentCls:t,colorBgContainer:n,colorBgBody:o,colorText:r}=e;return{[`${t}-sider-light`]:{background:n,[`${t}-sider-trigger`]:{color:r,background:n},[`${t}-sider-zero-width-trigger`]:{color:r,background:n,border:`1px solid ${o}`,borderInlineStart:0}}}},pce=e=>{const{antCls:t,componentCls:n,colorText:o,colorTextLightSolid:r,colorBgHeader:i,colorBgBody:a,colorBgTrigger:l,layoutHeaderHeight:s,layoutHeaderPaddingInline:u,layoutHeaderColor:c,layoutFooterPadding:d,layoutTriggerHeight:f,layoutZeroTriggerSize:p,motionDurationMid:v,motionDurationSlow:h,fontSize:m,borderRadius:b}=e;return{[n]:y(y({display:"flex",flex:"auto",flexDirection:"column",color:o,minHeight:0,background:a,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},[`${n}-header`]:{height:s,paddingInline:u,color:c,lineHeight:`${s}px`,background:i,[`${t}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:d,color:o,fontSize:m,background:a},[`${n}-content`]:{flex:"auto",minHeight:0},[`${n}-sider`]:{position:"relative",minWidth:0,background:i,transition:`all ${v}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${t}-menu${t}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:f},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:f,color:r,lineHeight:`${f}px`,textAlign:"center",background:l,cursor:"pointer",transition:`all ${v}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:s,insetInlineEnd:-p,zIndex:1,width:p,height:p,color:r,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:i,borderStartStartRadius:0,borderStartEndRadius:b,borderEndEndRadius:b,borderEndStartRadius:0,cursor:"pointer",transition:`background ${h} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${h}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-p,borderStartStartRadius:b,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:b}}}}},fce(e)),{"&-rtl":{direction:"rtl"}})}},gce=Ue("Layout",e=>{const{colorText:t,controlHeightSM:n,controlHeight:o,controlHeightLG:r,marginXXS:i}=e,a=r*1.25,l=Be(e,{layoutHeaderHeight:o*2,layoutHeaderPaddingInline:a,layoutHeaderColor:t,layoutFooterPadding:`${n}px ${a}px`,layoutTriggerHeight:r+i*2,layoutZeroTriggerSize:r});return[pce(l)]},e=>{const{colorBgLayout:t}=e;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140"}}),t$=()=>({prefixCls:String,hasSider:{type:Boolean,default:void 0},tagName:String});function Sm(e){let{suffixCls:t,tagName:n,name:o}=e;return r=>le({compatConfig:{MODE:3},name:o,props:t$(),setup(a,l){let{slots:s}=l;const{prefixCls:u}=Te(t,a);return()=>{const c=y(y({},a),{prefixCls:u.value,tagName:n});return g(r,c,s)}}})}const n$=le({compatConfig:{MODE:3},props:t$(),setup(e,t){let{slots:n}=t;return()=>g(e.tagName,{class:e.prefixCls},n)}}),hce=le({compatConfig:{MODE:3},inheritAttrs:!1,props:t$(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("",e),[a,l]=gce(r),s=ae([]);Xe(FA,{addSider:d=>{s.value=[...s.value,d]},removeSider:d=>{s.value=s.value.filter(f=>f!==d)}});const c=E(()=>{const{prefixCls:d,hasSider:f}=e;return{[l.value]:!0,[`${d}`]:!0,[`${d}-has-sider`]:typeof f=="boolean"?f:s.value.length>0,[`${d}-rtl`]:i.value==="rtl"}});return()=>{const{tagName:d}=e;return a(g(d,y(y({},o),{class:[c.value,o.class]}),n))}}}),ab=Sm({suffixCls:"layout",tagName:"section",name:"ALayout"})(hce),ag=Sm({suffixCls:"layout-header",tagName:"header",name:"ALayoutHeader"})(n$),lg=Sm({suffixCls:"layout-footer",tagName:"footer",name:"ALayoutFooter"})(n$),sg=Sm({suffixCls:"layout-content",tagName:"main",name:"ALayoutContent"})(n$);var vce={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"};function $4(e){for(var t=1;t({prefixCls:String,collapsible:{type:Boolean,default:void 0},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean,default:void 0},reverseArrow:{type:Boolean,default:void 0},zeroWidthTriggerStyle:{type:Object,default:void 0},trigger:K.any,width:K.oneOfType([K.number,K.string]),collapsedWidth:K.oneOfType([K.number,K.string]),breakpoint:K.oneOf(Jn("xs","sm","md","lg","xl","xxl","xxxl")),theme:K.oneOf(Jn("light","dark")).def("dark"),onBreakpoint:Function,onCollapse:Function}),yce=(()=>{let e=0;return function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e+=1,`${t}${e}`}})(),cg=le({compatConfig:{MODE:3},name:"ALayoutSider",inheritAttrs:!1,props:Qe(bce(),{collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80}),emits:["breakpoint","update:collapsed","collapse"],setup(e,t){let{emit:n,attrs:o,slots:r}=t;const{prefixCls:i}=Te("layout-sider",e),a=ze(FA,void 0),l=se(!!(e.collapsed!==void 0?e.collapsed:e.defaultCollapsed)),s=se(!1);be(()=>e.collapsed,()=>{l.value=!!e.collapsed}),Xe(LA,l);const u=(h,m)=>{e.collapsed===void 0&&(l.value=h),n("update:collapsed",h),n("collapse",h,m)},c=se(h=>{s.value=h.matches,n("breakpoint",h.matches),l.value!==h.matches&&u(h.matches,"responsive")});let d;function f(h){return c.value(h)}const p=yce("ant-sider-");a&&a.addSider(p),Ke(()=>{be(()=>e.breakpoint,()=>{try{d==null||d.removeEventListener("change",f)}catch{d==null||d.removeListener(f)}if(typeof window<"u"){const{matchMedia:h}=window;if(h&&e.breakpoint&&e.breakpoint in w4){d=h(`(max-width: ${w4[e.breakpoint]})`);try{d.addEventListener("change",f)}catch{d.addListener(f)}f(d)}}},{immediate:!0})}),tt(()=>{try{d==null||d.removeEventListener("change",f)}catch{d==null||d.removeListener(f)}a&&a.removeSider(p)});const v=()=>{u(!l.value,"clickTrigger")};return()=>{var h,m;const b=i.value,{collapsedWidth:S,width:C,reverseArrow:$,zeroWidthTriggerStyle:x,trigger:P=(h=r.trigger)===null||h===void 0?void 0:h.call(r),collapsible:w,theme:O}=e,I=l.value?S:C,_=oh(I)?`${I}px`:String(I),T=parseFloat(String(S||0))===0?g("span",{onClick:v,class:ge(`${b}-zero-width-trigger`,`${b}-zero-width-trigger-${$?"right":"left"}`),style:x},[P||g(o$,null,null)]):null,A={expanded:g($?Jo:mi,null,null),collapsed:g($?mi:Jo,null,null)},R=l.value?"collapsed":"expanded",H=A[R],M=P!==null?T||g("div",{class:`${b}-trigger`,onClick:v,style:{width:_}},[P||H]):null,D=[o.style,{flex:`0 0 ${_}`,maxWidth:_,minWidth:_,width:_}],N=ge(b,`${b}-${O}`,{[`${b}-collapsed`]:!!l.value,[`${b}-has-trigger`]:w&&P!==null&&!T,[`${b}-below`]:!!s.value,[`${b}-zero-width`]:parseFloat(_)===0},o.class);return g("aside",k(k({},o),{},{class:N,style:D}),[g("div",{class:`${b}-children`},[(m=r.default)===null||m===void 0?void 0:m.call(r)]),w||s.value&&T?M:null])}}}),Sce=ag,Cce=lg,xce=cg,$ce=sg,wce=y(ab,{Header:ag,Footer:lg,Content:sg,Sider:cg,install:e=>(e.component(ab.name,ab),e.component(ag.name,ag),e.component(lg.name,lg),e.component(cg.name,cg),e.component(sg.name,sg),e)});function Pce(e,t,n){var o=n||{},r=o.noTrailing,i=r===void 0?!1:r,a=o.noLeading,l=a===void 0?!1:a,s=o.debounceMode,u=s===void 0?void 0:s,c,d=!1,f=0;function p(){c&&clearTimeout(c)}function v(m){var b=m||{},S=b.upcomingOnly,C=S===void 0?!1:S;p(),d=!C}function h(){for(var m=arguments.length,b=new Array(m),S=0;Se?l?(f=Date.now(),i||(c=setTimeout(u?P:x,e))):x():i!==!0&&(c=setTimeout(u?P:x,u===void 0?e-$:e))}return h.cancel=v,h}function Oce(e,t,n){var o={},r=o.atBegin,i=r===void 0?!1:r;return Pce(e,t,{debounceMode:i!==!1})}const Ice=new at("antSpinMove",{to:{opacity:1}}),Tce=new at("antRotate",{to:{transform:"rotate(405deg)"}}),Ece=e=>({[`${e.componentCls}`]:y(y({},qe(e)),{position:"absolute",display:"none",color:e.colorPrimary,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"static",display:"inline-block",opacity:1},"&-nested-loading":{position:"relative",[`> div > ${e.componentCls}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${e.componentCls}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:-e.spinDotSize/2},[`${e.componentCls}-text`]:{position:"absolute",top:"50%",width:"100%",paddingTop:(e.spinDotSize-e.fontSize)/2+2,textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.spinDotSize/2)-10},"&-sm":{[`${e.componentCls}-dot`]:{margin:-e.spinDotSizeSM/2},[`${e.componentCls}-text`]:{paddingTop:(e.spinDotSizeSM-e.fontSize)/2+2},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.spinDotSizeSM/2)-10}},"&-lg":{[`${e.componentCls}-dot`]:{margin:-(e.spinDotSizeLG/2)},[`${e.componentCls}-text`]:{paddingTop:(e.spinDotSizeLG-e.fontSize)/2+2},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.spinDotSizeLG/2)-10}}},[`${e.componentCls}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${e.componentCls}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${e.componentCls}-dot`]:{position:"relative",display:"inline-block",fontSize:e.spinDotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:(e.spinDotSize-e.marginXXS/2)/2,height:(e.spinDotSize-e.marginXXS/2)/2,backgroundColor:e.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:Ice,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:Tce,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&-sm ${e.componentCls}-dot`]:{fontSize:e.spinDotSizeSM,i:{width:(e.spinDotSizeSM-e.marginXXS/2)/2,height:(e.spinDotSizeSM-e.marginXXS/2)/2}},[`&-lg ${e.componentCls}-dot`]:{fontSize:e.spinDotSizeLG,i:{width:(e.spinDotSizeLG-e.marginXXS)/2,height:(e.spinDotSizeLG-e.marginXXS)/2}},[`&${e.componentCls}-show-text ${e.componentCls}-text`]:{display:"block"}})}),_ce=Ue("Spin",e=>{const t=Be(e,{spinDotDefault:e.colorTextDescription,spinDotSize:e.controlHeightLG/2,spinDotSizeSM:e.controlHeightLG*.35,spinDotSizeLG:e.controlHeight});return[Ece(t)]},{contentHeight:400});var Mce=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:K.any,delay:Number,indicator:K.any});let ug=null;function Rce(e,t){return!!e&&!!t&&!isNaN(Number(t))}function Dce(e){const t=e.indicator;ug=typeof t=="function"?t:()=>g(t,null,null)}const di=le({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:Qe(Ace(),{size:"default",spinning:!0,wrapperClassName:""}),setup(e,t){let{attrs:n,slots:o}=t;const{prefixCls:r,size:i,direction:a}=Te("spin",e),[l,s]=_ce(r),u=se(e.spinning&&!Rce(e.spinning,e.delay));let c;return be([()=>e.spinning,()=>e.delay],()=>{c==null||c.cancel(),c=Oce(e.delay,()=>{u.value=e.spinning}),c==null||c()},{immediate:!0,flush:"post"}),tt(()=>{c==null||c.cancel()}),()=>{var d,f;const{class:p}=n,v=Mce(n,["class"]),{tip:h=(d=o.tip)===null||d===void 0?void 0:d.call(o)}=e,m=(f=o.default)===null||f===void 0?void 0:f.call(o),b={[s.value]:!0,[r.value]:!0,[`${r.value}-sm`]:i.value==="small",[`${r.value}-lg`]:i.value==="large",[`${r.value}-spinning`]:u.value,[`${r.value}-show-text`]:!!h,[`${r.value}-rtl`]:a.value==="rtl",[p]:!!p};function S($){const x=`${$}-dot`;let P=mn(o,e,"indicator");return P===null?null:(Array.isArray(P)&&(P=P.length===1?P[0]:P),ln(P)?Dn(P,{class:x}):ug&&ln(ug())?Dn(ug(),{class:x}):g("span",{class:`${x} ${$}-dot-spin`},[g("i",{class:`${$}-dot-item`},null),g("i",{class:`${$}-dot-item`},null),g("i",{class:`${$}-dot-item`},null),g("i",{class:`${$}-dot-item`},null)]))}const C=g("div",k(k({},v),{},{class:b,"aria-live":"polite","aria-busy":u.value}),[S(r.value),h?g("div",{class:`${r.value}-text`},[h]):null]);if(m&&zt(m).length){const $={[`${r.value}-container`]:!0,[`${r.value}-blur`]:u.value};return l(g("div",{class:[`${r.value}-nested-loading`,e.wrapperClassName,s.value]},[u.value&&g("div",{key:"loading"},[C]),g("div",{class:$,key:"container"},[m])]))}return l(C)}}});di.setDefaultIndicator=Dce;di.install=function(e){return e.component(di.name,di),e};var Nce={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};function P4(e){for(var t=1;t{const r=y(y(y({},e),{size:"small"}),n);return g(Fn,r,o)}}}),Hce=le({name:"MiddleSelect",inheritAttrs:!1,props:Uv(),Option:Fn.Option,setup(e,t){let{attrs:n,slots:o}=t;return()=>{const r=y(y(y({},e),{size:"middle"}),n);return g(Fn,r,o)}}}),dl=le({compatConfig:{MODE:3},name:"Pager",inheritAttrs:!1,props:{rootPrefixCls:String,page:Number,active:{type:Boolean,default:void 0},last:{type:Boolean,default:void 0},locale:K.object,showTitle:{type:Boolean,default:void 0},itemRender:{type:Function,default:()=>{}},onClick:{type:Function},onKeypress:{type:Function}},eimt:["click","keypress"],setup(e,t){let{emit:n,attrs:o}=t;const r=()=>{n("click",e.page)},i=a=>{n("keypress",a,r,e.page)};return()=>{const{showTitle:a,page:l,itemRender:s}=e,{class:u,style:c}=o,d=`${e.rootPrefixCls}-item`,f=ge(d,`${d}-${e.page}`,{[`${d}-active`]:e.active,[`${d}-disabled`]:!e.page},u);return g("li",{onClick:r,onKeypress:i,title:a?String(l):null,tabindex:"0",class:f,style:c},[s({page:l,type:"page",originalElement:g("a",{rel:"nofollow"},[l])})])}}}),vl={ENTER:13,ARROW_UP:38,ARROW_DOWN:40},zce=le({compatConfig:{MODE:3},props:{disabled:{type:Boolean,default:void 0},changeSize:Function,quickGo:Function,selectComponentClass:K.any,current:Number,pageSizeOptions:K.array.def(["10","20","50","100"]),pageSize:Number,buildOptionText:Function,locale:K.object,rootPrefixCls:String,selectPrefixCls:String,goButton:K.any},setup(e){const t=ae(""),n=E(()=>!t.value||isNaN(t.value)?void 0:Number(t.value)),o=s=>`${s.value} ${e.locale.items_per_page}`,r=s=>{const{value:u}=s.target;t.value!==u&&(t.value=u)},i=s=>{const{goButton:u,quickGo:c,rootPrefixCls:d}=e;if(!(u||t.value===""))if(s.relatedTarget&&(s.relatedTarget.className.indexOf(`${d}-item-link`)>=0||s.relatedTarget.className.indexOf(`${d}-item`)>=0)){t.value="";return}else c(n.value),t.value=""},a=s=>{t.value!==""&&(s.keyCode===vl.ENTER||s.type==="click")&&(e.quickGo(n.value),t.value="")},l=E(()=>{const{pageSize:s,pageSizeOptions:u}=e;return u.some(c=>c.toString()===s.toString())?u:u.concat([s.toString()]).sort((c,d)=>{const f=isNaN(Number(c))?0:Number(c),p=isNaN(Number(d))?0:Number(d);return f-p})});return()=>{const{rootPrefixCls:s,locale:u,changeSize:c,quickGo:d,goButton:f,selectComponentClass:p,selectPrefixCls:v,pageSize:h,disabled:m}=e,b=`${s}-options`;let S=null,C=null,$=null;if(!c&&!d)return null;if(c&&p){const x=e.buildOptionText||o,P=l.value.map((w,O)=>g(p.Option,{key:O,value:w},{default:()=>[x({value:w})]}));S=g(p,{disabled:m,prefixCls:v,showSearch:!1,class:`${b}-size-changer`,optionLabelProp:"children",value:(h||l.value[0]).toString(),onChange:w=>c(Number(w)),getPopupContainer:w=>w.parentNode},{default:()=>[P]})}return d&&(f&&($=typeof f=="boolean"?g("button",{type:"button",onClick:a,onKeyup:a,disabled:m,class:`${b}-quick-jumper-button`},[u.jump_to_confirm]):g("span",{onClick:a,onKeyup:a},[f])),C=g("div",{class:`${b}-quick-jumper`},[u.jump_to,g(Xc,{disabled:m,type:"text",value:t.value,onInput:r,onChange:r,onKeyup:a,onBlur:i},null),u.page,$])),g("li",{class:`${b}`},[S,C])}}}),jce={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页"};var Wce=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r"u"?t.statePageSize:e;return Math.floor((n.total-1)/o)+1}const Uce=le({compatConfig:{MODE:3},name:"Pagination",mixins:[ls],inheritAttrs:!1,props:{disabled:{type:Boolean,default:void 0},prefixCls:K.string.def("rc-pagination"),selectPrefixCls:K.string.def("rc-select"),current:Number,defaultCurrent:K.number.def(1),total:K.number.def(0),pageSize:Number,defaultPageSize:K.number.def(10),hideOnSinglePage:{type:Boolean,default:!1},showSizeChanger:{type:Boolean,default:void 0},showLessItems:{type:Boolean,default:!1},selectComponentClass:K.any,showPrevNextJumpers:{type:Boolean,default:!0},showQuickJumper:K.oneOfType([K.looseBool,K.object]).def(!1),showTitle:{type:Boolean,default:!0},pageSizeOptions:K.arrayOf(K.oneOfType([K.number,K.string])),buildOptionText:Function,showTotal:Function,simple:{type:Boolean,default:void 0},locale:K.object.def(jce),itemRender:K.func.def(Kce),prevIcon:K.any,nextIcon:K.any,jumpPrevIcon:K.any,jumpNextIcon:K.any,totalBoundaryShowSizeChanger:K.number.def(50)},data(){const e=this.$props;let t=eh([this.current,this.defaultCurrent]);const n=eh([this.pageSize,this.defaultPageSize]);return t=Math.min(t,wi(n,void 0,e)),{stateCurrent:t,stateCurrentInputValue:t,statePageSize:n}},watch:{current(e){this.setState({stateCurrent:e,stateCurrentInputValue:e})},pageSize(e){const t={};let n=this.stateCurrent;const o=wi(e,this.$data,this.$props);n=n>o?o:n,ki(this,"current")||(t.stateCurrent=n,t.stateCurrentInputValue=n),t.statePageSize=e,this.setState(t)},stateCurrent(e,t){this.$nextTick(()=>{if(this.$refs.paginationNode){const n=this.$refs.paginationNode.querySelector(`.${this.prefixCls}-item-${t}`);n&&document.activeElement===n&&n.blur()}})},total(){const e={},t=wi(this.pageSize,this.$data,this.$props);if(ki(this,"current")){const n=Math.min(this.current,t);e.stateCurrent=n,e.stateCurrentInputValue=n}else{let n=this.stateCurrent;n===0&&t>0?n=1:n=Math.min(this.stateCurrent,t),e.stateCurrent=n}this.setState(e)}},methods:{getJumpPrevPage(){return Math.max(1,this.stateCurrent-(this.showLessItems?3:5))},getJumpNextPage(){return Math.min(wi(void 0,this.$data,this.$props),this.stateCurrent+(this.showLessItems?3:5))},getItemIcon(e,t){const{prefixCls:n}=this.$props;return WM(this,e,this.$props)||g("button",{type:"button","aria-label":t,class:`${n}-item-link`},null)},getValidValue(e){const t=e.target.value,n=wi(void 0,this.$data,this.$props),{stateCurrentInputValue:o}=this.$data;let r;return t===""?r=t:isNaN(Number(t))?r=o:t>=n?r=n:r=Number(t),r},isValid(e){return Vce(e)&&e!==this.stateCurrent},shouldDisplayQuickJumper(){const{showQuickJumper:e,pageSize:t,total:n}=this.$props;return n<=t?!1:e},handleKeyDown(e){(e.keyCode===vl.ARROW_UP||e.keyCode===vl.ARROW_DOWN)&&e.preventDefault()},handleKeyUp(e){const t=this.getValidValue(e),n=this.stateCurrentInputValue;t!==n&&this.setState({stateCurrentInputValue:t}),e.keyCode===vl.ENTER?this.handleChange(t):e.keyCode===vl.ARROW_UP?this.handleChange(t-1):e.keyCode===vl.ARROW_DOWN&&this.handleChange(t+1)},changePageSize(e){let t=this.stateCurrent;const n=t,o=wi(e,this.$data,this.$props);t=t>o?o:t,o===0&&(t=this.stateCurrent),typeof e=="number"&&(ki(this,"pageSize")||this.setState({statePageSize:e}),ki(this,"current")||this.setState({stateCurrent:t,stateCurrentInputValue:t})),this.__emit("update:pageSize",e),t!==n&&this.__emit("update:current",t),this.__emit("showSizeChange",t,e),this.__emit("change",t,e)},handleChange(e){const{disabled:t}=this.$props;let n=e;if(this.isValid(n)&&!t){const o=wi(void 0,this.$data,this.$props);return n>o?n=o:n<1&&(n=1),ki(this,"current")||this.setState({stateCurrent:n,stateCurrentInputValue:n}),this.__emit("update:current",n),this.__emit("change",n,this.statePageSize),n}return this.stateCurrent},prev(){this.hasPrev()&&this.handleChange(this.stateCurrent-1)},next(){this.hasNext()&&this.handleChange(this.stateCurrent+1)},jumpPrev(){this.handleChange(this.getJumpPrevPage())},jumpNext(){this.handleChange(this.getJumpNextPage())},hasPrev(){return this.stateCurrent>1},hasNext(){return this.stateCurrentn},runIfEnter(e,t){if(e.key==="Enter"||e.charCode===13){e.preventDefault();for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r0?b-1:0,D=b+1=H*2&&b!==3&&(w[0]=g(dl,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:Y,page:Y,class:`${e}-item-after-jump-prev`,active:!1,showTitle:this.showTitle,itemRender:c},null),w.unshift(O)),P-b>=H*2&&b!==P-2&&(w[w.length-1]=g(dl,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:oe,page:oe,class:`${e}-item-before-jump-next`,active:!1,showTitle:this.showTitle,itemRender:c},null),w.push(I)),Y!==1&&w.unshift(_),oe!==P&&w.push(T)}let F=null;s&&(F=g("li",{class:`${e}-total-text`},[s(o,[o===0?0:(b-1)*S+1,b*S>o?o:b*S])]));const B=!N||!P,j=!L||!P,z=this.buildOptionText||this.$slots.buildOptionText;return g("ul",k(k({unselectable:"on",ref:"paginationNode"},x),{},{class:ge({[`${e}`]:!0,[`${e}-disabled`]:t},$)}),[F,g("li",{title:l?r.prev_page:null,onClick:this.prev,tabindex:B?null:0,onKeypress:this.runIfEnterPrev,class:ge(`${e}-prev`,{[`${e}-disabled`]:B}),"aria-disabled":B},[this.renderPrev(M)]),w,g("li",{title:l?r.next_page:null,onClick:this.next,tabindex:j?null:0,onKeypress:this.runIfEnterNext,class:ge(`${e}-next`,{[`${e}-disabled`]:j}),"aria-disabled":j},[this.renderNext(D)]),g(zce,{disabled:t,locale:r,rootPrefixCls:e,selectComponentClass:v,selectPrefixCls:h,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:b,pageSize:S,pageSizeOptions:m,buildOptionText:z||null,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:R},null)])}}),Gce=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`&${t}-mini`]:{[` + `]:{color:b}}},{[`${t}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${t}-handler-down`]:{borderBlockStartWidth:0}}}]},lce=e=>{const{componentCls:t,inputPaddingHorizontal:n,inputAffixPadding:o,controlWidth:r,borderRadiusLG:i,borderRadiusSM:a}=e;return{[`${t}-affix-wrapper`]:y(y(y({},fs(e)),$f(e,`${t}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:r,padding:0,paddingInlineStart:n,"&-lg":{borderRadius:i},"&-sm":{borderRadius:a},[`&:not(${t}-affix-wrapper-disabled):hover`]:y(y({},ru(e)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${t}[disabled]`]:{background:"transparent"}},[`> div${t}`]:{width:"100%",border:"none",outline:"none",[`&${t}-focused`]:{boxShadow:"none !important"}},[`input${t}-input`]:{padding:0},"&::before":{width:0,visibility:"hidden",content:'"\\a0"'},[`${t}-handler-wrap`]:{zIndex:2},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:o},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:n,marginInlineStart:o}}})}},sce=Ue("InputNumber",e=>{const t=ps(e);return[ace(t),lce(t),tu(t)]},e=>({controlWidth:90,handleWidth:e.controlHeightSM-e.lineWidth*2,handleFontSize:e.fontSize/2,handleVisible:"auto"}));var cce=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);ry(y({},xT),{size:Ne(),bordered:$e(!0),placeholder:String,name:String,id:String,type:String,addonBefore:K.any,addonAfter:K.any,prefix:K.any,"onUpdate:value":xT.onChange,valueModifiers:Object,status:Ne()}),ib=le({compatConfig:{MODE:3},name:"AInputNumber",inheritAttrs:!1,props:uce(),slots:Object,setup(e,t){let{emit:n,expose:o,attrs:r,slots:i}=t;var a;const l=bn(),s=kn.useInject(),u=E(()=>Yr(s.status,e.status)),{prefixCls:c,size:d,direction:f,disabled:p}=Te("input-number",e),{compactSize:v,compactItemClassnames:h}=Xa(c,f),m=ko(),b=E(()=>{var R;return(R=p.value)!==null&&R!==void 0?R:m.value}),[S,C]=sce(c),$=E(()=>v.value||d.value),x=se((a=e.value)!==null&&a!==void 0?a:e.defaultValue),P=se(!1);be(()=>e.value,()=>{x.value=e.value});const w=se(null),O=()=>{var R;(R=w.value)===null||R===void 0||R.focus()};o({focus:O,blur:()=>{var R;(R=w.value)===null||R===void 0||R.blur()}});const _=R=>{e.value===void 0&&(x.value=R),n("update:value",R),n("change",R),l.onFieldChange()},T=R=>{P.value=!1,n("blur",R),l.onFieldBlur()},A=R=>{P.value=!0,n("focus",R)};return()=>{var R,H,M,D;const{hasFeedback:N,isFormItemInput:L,feedbackIcon:F}=s,B=(R=e.id)!==null&&R!==void 0?R:l.id.value,j=y(y(y({},r),e),{id:B,disabled:b.value}),{class:z,bordered:G,readonly:Q,style:Y,addonBefore:oe=(H=i.addonBefore)===null||H===void 0?void 0:H.call(i),addonAfter:Z=(M=i.addonAfter)===null||M===void 0?void 0:M.call(i),prefix:re=(D=i.prefix)===null||D===void 0?void 0:D.call(i),valueModifiers:ne={}}=j,X=cce(j,["class","bordered","readonly","style","addonBefore","addonAfter","prefix","valueModifiers"]),te=c.value,W=ge({[`${te}-lg`]:$.value==="large",[`${te}-sm`]:$.value==="small",[`${te}-rtl`]:f.value==="rtl",[`${te}-readonly`]:Q,[`${te}-borderless`]:!G,[`${te}-in-form-item`]:L},lo(te,u.value),z,h.value,C.value);let U=g(ice,k(k({},it(X,["size","defaultValue"])),{},{ref:w,lazy:!!ne.lazy,value:x.value,class:W,prefixCls:te,readonly:Q,onChange:_,onBlur:T,onFocus:A}),{upHandler:i.upIcon?()=>g("span",{class:`${te}-handler-up-inner`},[i.upIcon()]):()=>g(Jx,{class:`${te}-handler-up-inner`},null),downHandler:i.downIcon?()=>g("span",{class:`${te}-handler-down-inner`},[i.downIcon()]):()=>g(cs,{class:`${te}-handler-down-inner`},null)});const J=rb(oe)||rb(Z),de=rb(re);if(de||N){const fe=ge(`${te}-affix-wrapper`,lo(`${te}-affix-wrapper`,u.value,N),{[`${te}-affix-wrapper-focused`]:P.value,[`${te}-affix-wrapper-disabled`]:b.value,[`${te}-affix-wrapper-sm`]:$.value==="small",[`${te}-affix-wrapper-lg`]:$.value==="large",[`${te}-affix-wrapper-rtl`]:f.value==="rtl",[`${te}-affix-wrapper-readonly`]:Q,[`${te}-affix-wrapper-borderless`]:!G,[`${z}`]:!J&&z},C.value);U=g("div",{class:fe,style:Y,onClick:O},[de&&g("span",{class:`${te}-prefix`},[re]),U,N&&g("span",{class:`${te}-suffix`},[F])])}if(J){const fe=`${te}-group`,pe=`${fe}-addon`,ve=oe?g("div",{class:pe},[oe]):null,he=Z?g("div",{class:pe},[Z]):null,V=ge(`${te}-wrapper`,fe,{[`${fe}-rtl`]:f.value==="rtl"},C.value),q=ge(`${te}-group-wrapper`,{[`${te}-group-wrapper-sm`]:$.value==="small",[`${te}-group-wrapper-lg`]:$.value==="large",[`${te}-group-wrapper-rtl`]:f.value==="rtl"},lo(`${c}-group-wrapper`,u.value,N),z,C.value);U=g("div",{class:q,style:Y},[g("div",{class:V},[ve&&g(Bd,null,{default:()=>[g(qg,null,{default:()=>[ve]})]}),U,he&&g(Bd,null,{default:()=>[g(qg,null,{default:()=>[he]})]})])])}return S(mt(U,{style:Y}))}}}),dce=y(ib,{install:e=>(e.component(ib.name,ib),e)}),fce=e=>{const{componentCls:t,colorBgContainer:n,colorBgBody:o,colorText:r}=e;return{[`${t}-sider-light`]:{background:n,[`${t}-sider-trigger`]:{color:r,background:n},[`${t}-sider-zero-width-trigger`]:{color:r,background:n,border:`1px solid ${o}`,borderInlineStart:0}}}},pce=e=>{const{antCls:t,componentCls:n,colorText:o,colorTextLightSolid:r,colorBgHeader:i,colorBgBody:a,colorBgTrigger:l,layoutHeaderHeight:s,layoutHeaderPaddingInline:u,layoutHeaderColor:c,layoutFooterPadding:d,layoutTriggerHeight:f,layoutZeroTriggerSize:p,motionDurationMid:v,motionDurationSlow:h,fontSize:m,borderRadius:b}=e;return{[n]:y(y({display:"flex",flex:"auto",flexDirection:"column",color:o,minHeight:0,background:a,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},[`${n}-header`]:{height:s,paddingInline:u,color:c,lineHeight:`${s}px`,background:i,[`${t}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:d,color:o,fontSize:m,background:a},[`${n}-content`]:{flex:"auto",minHeight:0},[`${n}-sider`]:{position:"relative",minWidth:0,background:i,transition:`all ${v}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${t}-menu${t}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:f},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:f,color:r,lineHeight:`${f}px`,textAlign:"center",background:l,cursor:"pointer",transition:`all ${v}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:s,insetInlineEnd:-p,zIndex:1,width:p,height:p,color:r,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:i,borderStartStartRadius:0,borderStartEndRadius:b,borderEndEndRadius:b,borderEndStartRadius:0,cursor:"pointer",transition:`background ${h} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${h}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-p,borderStartStartRadius:b,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:b}}}}},fce(e)),{"&-rtl":{direction:"rtl"}})}},gce=Ue("Layout",e=>{const{colorText:t,controlHeightSM:n,controlHeight:o,controlHeightLG:r,marginXXS:i}=e,a=r*1.25,l=Be(e,{layoutHeaderHeight:o*2,layoutHeaderPaddingInline:a,layoutHeaderColor:t,layoutFooterPadding:`${n}px ${a}px`,layoutTriggerHeight:r+i*2,layoutZeroTriggerSize:r});return[pce(l)]},e=>{const{colorBgLayout:t}=e;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140"}}),t$=()=>({prefixCls:String,hasSider:{type:Boolean,default:void 0},tagName:String});function ym(e){let{suffixCls:t,tagName:n,name:o}=e;return r=>le({compatConfig:{MODE:3},name:o,props:t$(),setup(a,l){let{slots:s}=l;const{prefixCls:u}=Te(t,a);return()=>{const c=y(y({},a),{prefixCls:u.value,tagName:n});return g(r,c,s)}}})}const n$=le({compatConfig:{MODE:3},props:t$(),setup(e,t){let{slots:n}=t;return()=>g(e.tagName,{class:e.prefixCls},n)}}),hce=le({compatConfig:{MODE:3},inheritAttrs:!1,props:t$(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("",e),[a,l]=gce(r),s=ae([]);Xe(F8,{addSider:d=>{s.value=[...s.value,d]},removeSider:d=>{s.value=s.value.filter(f=>f!==d)}});const c=E(()=>{const{prefixCls:d,hasSider:f}=e;return{[l.value]:!0,[`${d}`]:!0,[`${d}-has-sider`]:typeof f=="boolean"?f:s.value.length>0,[`${d}-rtl`]:i.value==="rtl"}});return()=>{const{tagName:d}=e;return a(g(d,y(y({},o),{class:[c.value,o.class]}),n))}}}),ab=ym({suffixCls:"layout",tagName:"section",name:"ALayout"})(hce),ig=ym({suffixCls:"layout-header",tagName:"header",name:"ALayoutHeader"})(n$),ag=ym({suffixCls:"layout-footer",tagName:"footer",name:"ALayoutFooter"})(n$),lg=ym({suffixCls:"layout-content",tagName:"main",name:"ALayoutContent"})(n$);var vce={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"};function $T(e){for(var t=1;t({prefixCls:String,collapsible:{type:Boolean,default:void 0},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean,default:void 0},reverseArrow:{type:Boolean,default:void 0},zeroWidthTriggerStyle:{type:Object,default:void 0},trigger:K.any,width:K.oneOfType([K.number,K.string]),collapsedWidth:K.oneOfType([K.number,K.string]),breakpoint:K.oneOf(Jn("xs","sm","md","lg","xl","xxl","xxxl")),theme:K.oneOf(Jn("light","dark")).def("dark"),onBreakpoint:Function,onCollapse:Function}),yce=(()=>{let e=0;return function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e+=1,`${t}${e}`}})(),sg=le({compatConfig:{MODE:3},name:"ALayoutSider",inheritAttrs:!1,props:Qe(bce(),{collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80}),emits:["breakpoint","update:collapsed","collapse"],setup(e,t){let{emit:n,attrs:o,slots:r}=t;const{prefixCls:i}=Te("layout-sider",e),a=ze(F8,void 0),l=se(!!(e.collapsed!==void 0?e.collapsed:e.defaultCollapsed)),s=se(!1);be(()=>e.collapsed,()=>{l.value=!!e.collapsed}),Xe(L8,l);const u=(h,m)=>{e.collapsed===void 0&&(l.value=h),n("update:collapsed",h),n("collapse",h,m)},c=se(h=>{s.value=h.matches,n("breakpoint",h.matches),l.value!==h.matches&&u(h.matches,"responsive")});let d;function f(h){return c.value(h)}const p=yce("ant-sider-");a&&a.addSider(p),Ke(()=>{be(()=>e.breakpoint,()=>{try{d==null||d.removeEventListener("change",f)}catch{d==null||d.removeListener(f)}if(typeof window<"u"){const{matchMedia:h}=window;if(h&&e.breakpoint&&e.breakpoint in wT){d=h(`(max-width: ${wT[e.breakpoint]})`);try{d.addEventListener("change",f)}catch{d.addListener(f)}f(d)}}},{immediate:!0})}),tt(()=>{try{d==null||d.removeEventListener("change",f)}catch{d==null||d.removeListener(f)}a&&a.removeSider(p)});const v=()=>{u(!l.value,"clickTrigger")};return()=>{var h,m;const b=i.value,{collapsedWidth:S,width:C,reverseArrow:$,zeroWidthTriggerStyle:x,trigger:P=(h=r.trigger)===null||h===void 0?void 0:h.call(r),collapsible:w,theme:O}=e,I=l.value?S:C,_=nh(I)?`${I}px`:String(I),T=parseFloat(String(S||0))===0?g("span",{onClick:v,class:ge(`${b}-zero-width-trigger`,`${b}-zero-width-trigger-${$?"right":"left"}`),style:x},[P||g(o$,null,null)]):null,A={expanded:g($?Jo:mi,null,null),collapsed:g($?mi:Jo,null,null)},R=l.value?"collapsed":"expanded",H=A[R],M=P!==null?T||g("div",{class:`${b}-trigger`,onClick:v,style:{width:_}},[P||H]):null,D=[o.style,{flex:`0 0 ${_}`,maxWidth:_,minWidth:_,width:_}],N=ge(b,`${b}-${O}`,{[`${b}-collapsed`]:!!l.value,[`${b}-has-trigger`]:w&&P!==null&&!T,[`${b}-below`]:!!s.value,[`${b}-zero-width`]:parseFloat(_)===0},o.class);return g("aside",k(k({},o),{},{class:N,style:D}),[g("div",{class:`${b}-children`},[(m=r.default)===null||m===void 0?void 0:m.call(r)]),w||s.value&&T?M:null])}}}),Sce=ig,Cce=ag,xce=sg,$ce=lg,wce=y(ab,{Header:ig,Footer:ag,Content:lg,Sider:sg,install:e=>(e.component(ab.name,ab),e.component(ig.name,ig),e.component(ag.name,ag),e.component(sg.name,sg),e.component(lg.name,lg),e)});function Pce(e,t,n){var o=n||{},r=o.noTrailing,i=r===void 0?!1:r,a=o.noLeading,l=a===void 0?!1:a,s=o.debounceMode,u=s===void 0?void 0:s,c,d=!1,f=0;function p(){c&&clearTimeout(c)}function v(m){var b=m||{},S=b.upcomingOnly,C=S===void 0?!1:S;p(),d=!C}function h(){for(var m=arguments.length,b=new Array(m),S=0;Se?l?(f=Date.now(),i||(c=setTimeout(u?P:x,e))):x():i!==!0&&(c=setTimeout(u?P:x,u===void 0?e-$:e))}return h.cancel=v,h}function Oce(e,t,n){var o={},r=o.atBegin,i=r===void 0?!1:r;return Pce(e,t,{debounceMode:i!==!1})}const Ice=new at("antSpinMove",{to:{opacity:1}}),Tce=new at("antRotate",{to:{transform:"rotate(405deg)"}}),Ece=e=>({[`${e.componentCls}`]:y(y({},qe(e)),{position:"absolute",display:"none",color:e.colorPrimary,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"static",display:"inline-block",opacity:1},"&-nested-loading":{position:"relative",[`> div > ${e.componentCls}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${e.componentCls}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:-e.spinDotSize/2},[`${e.componentCls}-text`]:{position:"absolute",top:"50%",width:"100%",paddingTop:(e.spinDotSize-e.fontSize)/2+2,textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.spinDotSize/2)-10},"&-sm":{[`${e.componentCls}-dot`]:{margin:-e.spinDotSizeSM/2},[`${e.componentCls}-text`]:{paddingTop:(e.spinDotSizeSM-e.fontSize)/2+2},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.spinDotSizeSM/2)-10}},"&-lg":{[`${e.componentCls}-dot`]:{margin:-(e.spinDotSizeLG/2)},[`${e.componentCls}-text`]:{paddingTop:(e.spinDotSizeLG-e.fontSize)/2+2},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.spinDotSizeLG/2)-10}}},[`${e.componentCls}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${e.componentCls}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${e.componentCls}-dot`]:{position:"relative",display:"inline-block",fontSize:e.spinDotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:(e.spinDotSize-e.marginXXS/2)/2,height:(e.spinDotSize-e.marginXXS/2)/2,backgroundColor:e.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:Ice,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:Tce,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&-sm ${e.componentCls}-dot`]:{fontSize:e.spinDotSizeSM,i:{width:(e.spinDotSizeSM-e.marginXXS/2)/2,height:(e.spinDotSizeSM-e.marginXXS/2)/2}},[`&-lg ${e.componentCls}-dot`]:{fontSize:e.spinDotSizeLG,i:{width:(e.spinDotSizeLG-e.marginXXS)/2,height:(e.spinDotSizeLG-e.marginXXS)/2}},[`&${e.componentCls}-show-text ${e.componentCls}-text`]:{display:"block"}})}),_ce=Ue("Spin",e=>{const t=Be(e,{spinDotDefault:e.colorTextDescription,spinDotSize:e.controlHeightLG/2,spinDotSizeSM:e.controlHeightLG*.35,spinDotSizeLG:e.controlHeight});return[Ece(t)]},{contentHeight:400});var Mce=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:K.any,delay:Number,indicator:K.any});let cg=null;function Rce(e,t){return!!e&&!!t&&!isNaN(Number(t))}function Dce(e){const t=e.indicator;cg=typeof t=="function"?t:()=>g(t,null,null)}const di=le({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:Qe(Ace(),{size:"default",spinning:!0,wrapperClassName:""}),setup(e,t){let{attrs:n,slots:o}=t;const{prefixCls:r,size:i,direction:a}=Te("spin",e),[l,s]=_ce(r),u=se(e.spinning&&!Rce(e.spinning,e.delay));let c;return be([()=>e.spinning,()=>e.delay],()=>{c==null||c.cancel(),c=Oce(e.delay,()=>{u.value=e.spinning}),c==null||c()},{immediate:!0,flush:"post"}),tt(()=>{c==null||c.cancel()}),()=>{var d,f;const{class:p}=n,v=Mce(n,["class"]),{tip:h=(d=o.tip)===null||d===void 0?void 0:d.call(o)}=e,m=(f=o.default)===null||f===void 0?void 0:f.call(o),b={[s.value]:!0,[r.value]:!0,[`${r.value}-sm`]:i.value==="small",[`${r.value}-lg`]:i.value==="large",[`${r.value}-spinning`]:u.value,[`${r.value}-show-text`]:!!h,[`${r.value}-rtl`]:a.value==="rtl",[p]:!!p};function S($){const x=`${$}-dot`;let P=mn(o,e,"indicator");return P===null?null:(Array.isArray(P)&&(P=P.length===1?P[0]:P),ln(P)?Dn(P,{class:x}):cg&&ln(cg())?Dn(cg(),{class:x}):g("span",{class:`${x} ${$}-dot-spin`},[g("i",{class:`${$}-dot-item`},null),g("i",{class:`${$}-dot-item`},null),g("i",{class:`${$}-dot-item`},null),g("i",{class:`${$}-dot-item`},null)]))}const C=g("div",k(k({},v),{},{class:b,"aria-live":"polite","aria-busy":u.value}),[S(r.value),h?g("div",{class:`${r.value}-text`},[h]):null]);if(m&&zt(m).length){const $={[`${r.value}-container`]:!0,[`${r.value}-blur`]:u.value};return l(g("div",{class:[`${r.value}-nested-loading`,e.wrapperClassName,s.value]},[u.value&&g("div",{key:"loading"},[C]),g("div",{class:$,key:"container"},[m])]))}return l(C)}}});di.setDefaultIndicator=Dce;di.install=function(e){return e.component(di.name,di),e};var Nce={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};function PT(e){for(var t=1;t{const r=y(y(y({},e),{size:"small"}),n);return g(Fn,r,o)}}}),Hce=le({name:"MiddleSelect",inheritAttrs:!1,props:Kv(),Option:Fn.Option,setup(e,t){let{attrs:n,slots:o}=t;return()=>{const r=y(y(y({},e),{size:"middle"}),n);return g(Fn,r,o)}}}),dl=le({compatConfig:{MODE:3},name:"Pager",inheritAttrs:!1,props:{rootPrefixCls:String,page:Number,active:{type:Boolean,default:void 0},last:{type:Boolean,default:void 0},locale:K.object,showTitle:{type:Boolean,default:void 0},itemRender:{type:Function,default:()=>{}},onClick:{type:Function},onKeypress:{type:Function}},eimt:["click","keypress"],setup(e,t){let{emit:n,attrs:o}=t;const r=()=>{n("click",e.page)},i=a=>{n("keypress",a,r,e.page)};return()=>{const{showTitle:a,page:l,itemRender:s}=e,{class:u,style:c}=o,d=`${e.rootPrefixCls}-item`,f=ge(d,`${d}-${e.page}`,{[`${d}-active`]:e.active,[`${d}-disabled`]:!e.page},u);return g("li",{onClick:r,onKeypress:i,title:a?String(l):null,tabindex:"0",class:f,style:c},[s({page:l,type:"page",originalElement:g("a",{rel:"nofollow"},[l])})])}}}),vl={ENTER:13,ARROW_UP:38,ARROW_DOWN:40},zce=le({compatConfig:{MODE:3},props:{disabled:{type:Boolean,default:void 0},changeSize:Function,quickGo:Function,selectComponentClass:K.any,current:Number,pageSizeOptions:K.array.def(["10","20","50","100"]),pageSize:Number,buildOptionText:Function,locale:K.object,rootPrefixCls:String,selectPrefixCls:String,goButton:K.any},setup(e){const t=ae(""),n=E(()=>!t.value||isNaN(t.value)?void 0:Number(t.value)),o=s=>`${s.value} ${e.locale.items_per_page}`,r=s=>{const{value:u}=s.target;t.value!==u&&(t.value=u)},i=s=>{const{goButton:u,quickGo:c,rootPrefixCls:d}=e;if(!(u||t.value===""))if(s.relatedTarget&&(s.relatedTarget.className.indexOf(`${d}-item-link`)>=0||s.relatedTarget.className.indexOf(`${d}-item`)>=0)){t.value="";return}else c(n.value),t.value=""},a=s=>{t.value!==""&&(s.keyCode===vl.ENTER||s.type==="click")&&(e.quickGo(n.value),t.value="")},l=E(()=>{const{pageSize:s,pageSizeOptions:u}=e;return u.some(c=>c.toString()===s.toString())?u:u.concat([s.toString()]).sort((c,d)=>{const f=isNaN(Number(c))?0:Number(c),p=isNaN(Number(d))?0:Number(d);return f-p})});return()=>{const{rootPrefixCls:s,locale:u,changeSize:c,quickGo:d,goButton:f,selectComponentClass:p,selectPrefixCls:v,pageSize:h,disabled:m}=e,b=`${s}-options`;let S=null,C=null,$=null;if(!c&&!d)return null;if(c&&p){const x=e.buildOptionText||o,P=l.value.map((w,O)=>g(p.Option,{key:O,value:w},{default:()=>[x({value:w})]}));S=g(p,{disabled:m,prefixCls:v,showSearch:!1,class:`${b}-size-changer`,optionLabelProp:"children",value:(h||l.value[0]).toString(),onChange:w=>c(Number(w)),getPopupContainer:w=>w.parentNode},{default:()=>[P]})}return d&&(f&&($=typeof f=="boolean"?g("button",{type:"button",onClick:a,onKeyup:a,disabled:m,class:`${b}-quick-jumper-button`},[u.jump_to_confirm]):g("span",{onClick:a,onKeyup:a},[f])),C=g("div",{class:`${b}-quick-jumper`},[u.jump_to,g(Xc,{disabled:m,type:"text",value:t.value,onInput:r,onChange:r,onKeyup:a,onBlur:i},null),u.page,$])),g("li",{class:`${b}`},[S,C])}}}),jce={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页"};var Wce=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r"u"?t.statePageSize:e;return Math.floor((n.total-1)/o)+1}const Uce=le({compatConfig:{MODE:3},name:"Pagination",mixins:[ls],inheritAttrs:!1,props:{disabled:{type:Boolean,default:void 0},prefixCls:K.string.def("rc-pagination"),selectPrefixCls:K.string.def("rc-select"),current:Number,defaultCurrent:K.number.def(1),total:K.number.def(0),pageSize:Number,defaultPageSize:K.number.def(10),hideOnSinglePage:{type:Boolean,default:!1},showSizeChanger:{type:Boolean,default:void 0},showLessItems:{type:Boolean,default:!1},selectComponentClass:K.any,showPrevNextJumpers:{type:Boolean,default:!0},showQuickJumper:K.oneOfType([K.looseBool,K.object]).def(!1),showTitle:{type:Boolean,default:!0},pageSizeOptions:K.arrayOf(K.oneOfType([K.number,K.string])),buildOptionText:Function,showTotal:Function,simple:{type:Boolean,default:void 0},locale:K.object.def(jce),itemRender:K.func.def(Kce),prevIcon:K.any,nextIcon:K.any,jumpPrevIcon:K.any,jumpNextIcon:K.any,totalBoundaryShowSizeChanger:K.number.def(50)},data(){const e=this.$props;let t=Qg([this.current,this.defaultCurrent]);const n=Qg([this.pageSize,this.defaultPageSize]);return t=Math.min(t,wi(n,void 0,e)),{stateCurrent:t,stateCurrentInputValue:t,statePageSize:n}},watch:{current(e){this.setState({stateCurrent:e,stateCurrentInputValue:e})},pageSize(e){const t={};let n=this.stateCurrent;const o=wi(e,this.$data,this.$props);n=n>o?o:n,ki(this,"current")||(t.stateCurrent=n,t.stateCurrentInputValue=n),t.statePageSize=e,this.setState(t)},stateCurrent(e,t){this.$nextTick(()=>{if(this.$refs.paginationNode){const n=this.$refs.paginationNode.querySelector(`.${this.prefixCls}-item-${t}`);n&&document.activeElement===n&&n.blur()}})},total(){const e={},t=wi(this.pageSize,this.$data,this.$props);if(ki(this,"current")){const n=Math.min(this.current,t);e.stateCurrent=n,e.stateCurrentInputValue=n}else{let n=this.stateCurrent;n===0&&t>0?n=1:n=Math.min(this.stateCurrent,t),e.stateCurrent=n}this.setState(e)}},methods:{getJumpPrevPage(){return Math.max(1,this.stateCurrent-(this.showLessItems?3:5))},getJumpNextPage(){return Math.min(wi(void 0,this.$data,this.$props),this.stateCurrent+(this.showLessItems?3:5))},getItemIcon(e,t){const{prefixCls:n}=this.$props;return WM(this,e,this.$props)||g("button",{type:"button","aria-label":t,class:`${n}-item-link`},null)},getValidValue(e){const t=e.target.value,n=wi(void 0,this.$data,this.$props),{stateCurrentInputValue:o}=this.$data;let r;return t===""?r=t:isNaN(Number(t))?r=o:t>=n?r=n:r=Number(t),r},isValid(e){return Vce(e)&&e!==this.stateCurrent},shouldDisplayQuickJumper(){const{showQuickJumper:e,pageSize:t,total:n}=this.$props;return n<=t?!1:e},handleKeyDown(e){(e.keyCode===vl.ARROW_UP||e.keyCode===vl.ARROW_DOWN)&&e.preventDefault()},handleKeyUp(e){const t=this.getValidValue(e),n=this.stateCurrentInputValue;t!==n&&this.setState({stateCurrentInputValue:t}),e.keyCode===vl.ENTER?this.handleChange(t):e.keyCode===vl.ARROW_UP?this.handleChange(t-1):e.keyCode===vl.ARROW_DOWN&&this.handleChange(t+1)},changePageSize(e){let t=this.stateCurrent;const n=t,o=wi(e,this.$data,this.$props);t=t>o?o:t,o===0&&(t=this.stateCurrent),typeof e=="number"&&(ki(this,"pageSize")||this.setState({statePageSize:e}),ki(this,"current")||this.setState({stateCurrent:t,stateCurrentInputValue:t})),this.__emit("update:pageSize",e),t!==n&&this.__emit("update:current",t),this.__emit("showSizeChange",t,e),this.__emit("change",t,e)},handleChange(e){const{disabled:t}=this.$props;let n=e;if(this.isValid(n)&&!t){const o=wi(void 0,this.$data,this.$props);return n>o?n=o:n<1&&(n=1),ki(this,"current")||this.setState({stateCurrent:n,stateCurrentInputValue:n}),this.__emit("update:current",n),this.__emit("change",n,this.statePageSize),n}return this.stateCurrent},prev(){this.hasPrev()&&this.handleChange(this.stateCurrent-1)},next(){this.hasNext()&&this.handleChange(this.stateCurrent+1)},jumpPrev(){this.handleChange(this.getJumpPrevPage())},jumpNext(){this.handleChange(this.getJumpNextPage())},hasPrev(){return this.stateCurrent>1},hasNext(){return this.stateCurrentn},runIfEnter(e,t){if(e.key==="Enter"||e.charCode===13){e.preventDefault();for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r0?b-1:0,D=b+1=H*2&&b!==3&&(w[0]=g(dl,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:Y,page:Y,class:`${e}-item-after-jump-prev`,active:!1,showTitle:this.showTitle,itemRender:c},null),w.unshift(O)),P-b>=H*2&&b!==P-2&&(w[w.length-1]=g(dl,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:oe,page:oe,class:`${e}-item-before-jump-next`,active:!1,showTitle:this.showTitle,itemRender:c},null),w.push(I)),Y!==1&&w.unshift(_),oe!==P&&w.push(T)}let F=null;s&&(F=g("li",{class:`${e}-total-text`},[s(o,[o===0?0:(b-1)*S+1,b*S>o?o:b*S])]));const B=!N||!P,j=!L||!P,z=this.buildOptionText||this.$slots.buildOptionText;return g("ul",k(k({unselectable:"on",ref:"paginationNode"},x),{},{class:ge({[`${e}`]:!0,[`${e}-disabled`]:t},$)}),[F,g("li",{title:l?r.prev_page:null,onClick:this.prev,tabindex:B?null:0,onKeypress:this.runIfEnterPrev,class:ge(`${e}-prev`,{[`${e}-disabled`]:B}),"aria-disabled":B},[this.renderPrev(M)]),w,g("li",{title:l?r.next_page:null,onClick:this.next,tabindex:j?null:0,onKeypress:this.runIfEnterNext,class:ge(`${e}-next`,{[`${e}-disabled`]:j}),"aria-disabled":j},[this.renderNext(D)]),g(zce,{disabled:t,locale:r,rootPrefixCls:e,selectComponentClass:v,selectPrefixCls:h,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:b,pageSize:S,pageSizeOptions:m,buildOptionText:z||null,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:R},null)])}}),Gce=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`&${t}-mini`]:{[` &:hover ${t}-item:not(${t}-item-active), &:active ${t}-item:not(${t}-item-active), &:hover ${t}-item-link, @@ -395,9 +395,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${t}-next, ${t}-jump-prev, ${t}-jump-next - `]:{display:"inline-block",minWidth:e.paginationItemSize,height:e.paginationItemSize,color:e.colorText,fontFamily:e.paginationFontFamily,lineHeight:`${e.paginationItemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:focus-visible ${t}-item-link`]:y({},qi(e)),[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:`${e.controlHeight}px`,verticalAlign:"top",input:y(y({},fs(e)),{width:e.controlHeightLG*1.25,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},Jce=e=>{const{componentCls:t}=e;return{[`${t}-item`]:y(y({display:"inline-block",minWidth:e.paginationItemSize,height:e.paginationItemSize,marginInlineEnd:e.marginXS,fontFamily:e.paginationFontFamily,lineHeight:`${e.paginationItemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${e.paginationItemPaddingInline}px`,color:e.colorText,transition:"none","&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}}},Ji(e)),{"&-active":{fontWeight:e.paginationFontWeightActive,backgroundColor:e.paginationItemBgActive,borderColor:e.colorPrimary,a:{color:e.colorPrimary},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.colorPrimaryHover}}})}},Zce=e=>{const{componentCls:t}=e;return{[t]:y(y(y(y(y(y(y(y({},qe(e)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.paginationItemSize,marginInlineEnd:e.marginXS,lineHeight:`${e.paginationItemSize-2}px`,verticalAlign:"middle"}}),Jce(e)),qce(e)),Yce(e)),Xce(e)),Gce(e)),{[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}}),[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},Qce=e=>{const{componentCls:t}=e;return{[`${t}${t}-disabled`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.paginationItemDisabledBgActive}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[t]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.paginationItemBg},[`${t}-item-link`]:{backgroundColor:e.paginationItemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.paginationItemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.paginationItemBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.paginationItemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},eue=Ue("Pagination",e=>{const t=Be(e,{paginationItemSize:e.controlHeight,paginationFontFamily:e.fontFamily,paginationItemBg:e.colorBgContainer,paginationItemBgActive:e.colorBgContainer,paginationFontWeightActive:e.fontWeightStrong,paginationItemSizeSM:e.controlHeightSM,paginationItemInputBg:e.colorBgContainer,paginationMiniOptionsSizeChangerTop:0,paginationItemDisabledBgActive:e.controlItemBgActiveDisabled,paginationItemDisabledColorActive:e.colorTextDisabled,paginationItemLinkBg:e.colorBgContainer,inputOutlineOffset:"0 0",paginationMiniOptionsMarginInlineStart:e.marginXXS/2,paginationMiniQuickJumperInputWidth:e.controlHeightLG*1.1,paginationItemPaddingInline:e.marginXXS*1.5,paginationEllipsisLetterSpacing:e.marginXXS/2,paginationSlashMarginInlineStart:e.marginXXS,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},ps(e));return[Zce(t),e.wireframe&&Qce(t)]});var tue=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({total:Number,defaultCurrent:Number,disabled:$e(),current:Number,defaultPageSize:Number,pageSize:Number,hideOnSinglePage:$e(),showSizeChanger:$e(),pageSizeOptions:pt(),buildOptionText:ye(),showQuickJumper:He([Boolean,Object]),showTotal:ye(),size:Ne(),simple:$e(),locale:Object,prefixCls:String,selectPrefixCls:String,totalBoundaryShowSizeChanger:Number,selectComponentClass:String,itemRender:ye(),role:String,responsive:Boolean,showLessItems:$e(),onChange:ye(),onShowSizeChange:ye(),"onUpdate:current":ye(),"onUpdate:pageSize":ye()}),oue=le({compatConfig:{MODE:3},name:"APagination",inheritAttrs:!1,props:nue(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,configProvider:i,direction:a,size:l}=Te("pagination",e),[s,u]=eue(r),c=E(()=>i.getPrefixCls("select",e.selectPrefixCls)),d=nu(),[f]=wr("Pagination",QM,We(e,"locale")),p=v=>{const h=g("span",{class:`${v}-item-ellipsis`},[zn("•••")]),m=g("button",{class:`${v}-item-link`,type:"button",tabindex:-1},[a.value==="rtl"?g(Jo,null,null):g(mi,null,null)]),b=g("button",{class:`${v}-item-link`,type:"button",tabindex:-1},[a.value==="rtl"?g(mi,null,null):g(Jo,null,null)]),S=g("a",{rel:"nofollow",class:`${v}-item-link`},[g("div",{class:`${v}-item-container`},[a.value==="rtl"?g(Th,{class:`${v}-item-link-icon`},null):g(Ih,{class:`${v}-item-link-icon`},null),h])]),C=g("a",{rel:"nofollow",class:`${v}-item-link`},[g("div",{class:`${v}-item-container`},[a.value==="rtl"?g(Ih,{class:`${v}-item-link-icon`},null):g(Th,{class:`${v}-item-link-icon`},null),h])]);return{prevIcon:m,nextIcon:b,jumpPrevIcon:S,jumpNextIcon:C}};return()=>{var v;const{itemRender:h=n.itemRender,buildOptionText:m=n.buildOptionText,selectComponentClass:b,responsive:S}=e,C=tue(e,["itemRender","buildOptionText","selectComponentClass","responsive"]),$=l.value==="small"||!!(!((v=d.value)===null||v===void 0)&&v.xs&&!l.value&&S),x=y(y(y(y(y({},C),p(r.value)),{prefixCls:r.value,selectPrefixCls:c.value,selectComponentClass:b||($?Bce:Hce),locale:f.value,buildOptionText:m}),o),{class:ge({[`${r.value}-mini`]:$,[`${r.value}-rtl`]:a.value==="rtl"},o.class,u.value),itemRender:h});return s(g(Uce,x,null))}}}),Cm=Lt(oue),rue=()=>({avatar:K.any,description:K.any,prefixCls:String,title:K.any}),PD=le({compatConfig:{MODE:3},name:"AListItemMeta",props:rue(),displayName:"AListItemMeta",__ANT_LIST_ITEM_META:!0,slots:Object,setup(e,t){let{slots:n}=t;const{prefixCls:o}=Te("list",e);return()=>{var r,i,a,l,s,u;const c=`${o.value}-item-meta`,d=(r=e.title)!==null&&r!==void 0?r:(i=n.title)===null||i===void 0?void 0:i.call(n),f=(a=e.description)!==null&&a!==void 0?a:(l=n.description)===null||l===void 0?void 0:l.call(n),p=(s=e.avatar)!==null&&s!==void 0?s:(u=n.avatar)===null||u===void 0?void 0:u.call(n),v=g("div",{class:`${o.value}-item-meta-content`},[d&&g("h4",{class:`${o.value}-item-meta-title`},[d]),f&&g("div",{class:`${o.value}-item-meta-description`},[f])]);return g("div",{class:c},[p&&g("div",{class:`${o.value}-item-meta-avatar`},[p]),(d||f)&&v])}}}),OD=Symbol("ListContextKey");var iue=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,extra:K.any,actions:K.array,grid:Object,colStyle:{type:Object,default:void 0}}),ID=le({compatConfig:{MODE:3},name:"AListItem",inheritAttrs:!1,Meta:PD,props:aue(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{itemLayout:r,grid:i}=ze(OD,{grid:ae(),itemLayout:ae()}),{prefixCls:a}=Te("list",e),l=()=>{var u;const c=((u=n.default)===null||u===void 0?void 0:u.call(n))||[];let d;return c.forEach(f=>{PB(f)&&!df(f)&&(d=!0)}),d&&c.length>1},s=()=>{var u,c;const d=(u=e.extra)!==null&&u!==void 0?u:(c=n.extra)===null||c===void 0?void 0:c.call(n);return r.value==="vertical"?!!d:!l()};return()=>{var u,c,d,f,p;const{class:v}=o,h=iue(o,["class"]),m=a.value,b=(u=e.extra)!==null&&u!==void 0?u:(c=n.extra)===null||c===void 0?void 0:c.call(n),S=(d=n.default)===null||d===void 0?void 0:d.call(n);let C=(f=e.actions)!==null&&f!==void 0?f:Ot((p=n.actions)===null||p===void 0?void 0:p.call(n));C=C&&!Array.isArray(C)?[C]:C;const $=C&&C.length>0&&g("ul",{class:`${m}-item-action`,key:"actions"},[C.map((w,O)=>g("li",{key:`${m}-item-action-${O}`},[w,O!==C.length-1&&g("em",{class:`${m}-item-action-split`},null)]))]),x=i.value?"div":"li",P=g(x,k(k({},h),{},{class:ge(`${m}-item`,{[`${m}-item-no-flex`]:!s()},v)}),{default:()=>[r.value==="vertical"&&b?[g("div",{class:`${m}-item-main`,key:"content"},[S,$]),g("div",{class:`${m}-item-extra`,key:"extra"},[b])]:[S,$,mt(b,{key:"extra"})]]});return i.value?g(pm,{flex:1,style:e.colStyle},{default:()=>[P]}):P}}}),lue=e=>{const{listBorderedCls:t,componentCls:n,paddingLG:o,margin:r,padding:i,listItemPaddingSM:a,marginLG:l,borderRadiusLG:s}=e;return{[`${t}`]:{border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:s,[`${n}-header,${n}-footer,${n}-item`]:{paddingInline:o},[`${n}-pagination`]:{margin:`${r}px ${l}px`}},[`${t}${n}-sm`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:a}},[`${t}${n}-lg`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:`${i}px ${o}px`}}}},sue=e=>{const{componentCls:t,screenSM:n,screenMD:o,marginLG:r,marginSM:i,margin:a}=e;return{[`@media screen and (max-width:${o})`]:{[`${t}`]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:r}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:r}}}},[`@media screen and (max-width: ${n})`]:{[`${t}`]:{[`${t}-item`]:{flexWrap:"wrap",[`${t}-action`]:{marginInlineStart:i}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:"wrap-reverse",[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${a}px`}}}}}},cue=e=>{const{componentCls:t,antCls:n,controlHeight:o,minHeight:r,paddingSM:i,marginLG:a,padding:l,listItemPadding:s,colorPrimary:u,listItemPaddingSM:c,listItemPaddingLG:d,paddingXS:f,margin:p,colorText:v,colorTextDescription:h,motionDurationSlow:m,lineWidth:b}=e;return{[`${t}`]:y(y({},qe(e)),{position:"relative","*":{outline:"none"},[`${t}-header, ${t}-footer`]:{background:"transparent",paddingBlock:i},[`${t}-pagination`]:{marginBlockStart:a,textAlign:"end",[`${n}-pagination-options`]:{textAlign:"start"}},[`${t}-spin`]:{minHeight:r,textAlign:"center"},[`${t}-items`]:{margin:0,padding:0,listStyle:"none"},[`${t}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:s,color:v,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:l},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:v},[`${t}-item-meta-title`]:{marginBottom:e.marginXXS,color:v,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:v,transition:`all ${m}`,"&:hover":{color:u}}},[`${t}-item-meta-description`]:{color:h,fontSize:e.fontSize,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${f}px`,color:h,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:b,height:Math.ceil(e.fontSize*e.lineHeight)-e.marginXXS*2,transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${l}px 0`,color:h,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:l,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},[`${t}-item-no-flex`]:{display:"block"}}),[`${t}-grid ${n}-col > ${t}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:p,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:a},[`${t}-item-meta`]:{marginBlockEnd:l,[`${t}-item-meta-title`]:{marginBlockEnd:i,color:v,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:l,marginInlineStart:"auto","> li":{padding:`0 ${l}px`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:o},[`${t}-split${t}-something-after-last-item ${n}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:d},[`${t}-sm ${t}-item`]:{padding:c},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}},uue=Ue("List",e=>{const t=Be(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG,listItemPadding:`${e.paddingContentVertical}px ${e.paddingContentHorizontalLG}px`,listItemPaddingSM:`${e.paddingContentVerticalSM}px ${e.paddingContentHorizontal}px`,listItemPaddingLG:`${e.paddingContentVerticalLG}px ${e.paddingContentHorizontalLG}px`});return[cue(t),lue(t),sue(t)]},{contentWidth:220}),due=()=>({bordered:$e(),dataSource:pt(),extra:ro(),grid:De(),itemLayout:String,loading:He([Boolean,Object]),loadMore:ro(),pagination:He([Boolean,Object]),prefixCls:String,rowKey:He([String,Number,Function]),renderItem:ye(),size:String,split:$e(),header:ro(),footer:ro(),locale:De()}),ba=le({compatConfig:{MODE:3},name:"AList",inheritAttrs:!1,Item:ID,props:Qe(due(),{dataSource:[],bordered:!1,split:!0,loading:!1,pagination:!1}),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;var r,i;Xe(OD,{grid:We(e,"grid"),itemLayout:We(e,"itemLayout")});const a={current:1,total:0},{prefixCls:l,direction:s,renderEmpty:u}=Te("list",e),[c,d]=uue(l),f=E(()=>e.pagination&&typeof e.pagination=="object"?e.pagination:{}),p=ae((r=f.value.defaultCurrent)!==null&&r!==void 0?r:1),v=ae((i=f.value.defaultPageSize)!==null&&i!==void 0?i:10);be(f,()=>{"current"in f.value&&(p.value=f.value.current),"pageSize"in f.value&&(v.value=f.value.pageSize)});const h=[],m=R=>(H,M)=>{p.value=H,v.value=M,f.value[R]&&f.value[R](H,M)},b=m("onChange"),S=m("onShowSizeChange"),C=E(()=>typeof e.loading=="boolean"?{spinning:e.loading}:e.loading),$=E(()=>C.value&&C.value.spinning),x=E(()=>{let R="";switch(e.size){case"large":R="lg";break;case"small":R="sm";break}return R}),P=E(()=>({[`${l.value}`]:!0,[`${l.value}-vertical`]:e.itemLayout==="vertical",[`${l.value}-${x.value}`]:x.value,[`${l.value}-split`]:e.split,[`${l.value}-bordered`]:e.bordered,[`${l.value}-loading`]:$.value,[`${l.value}-grid`]:!!e.grid,[`${l.value}-rtl`]:s.value==="rtl"})),w=E(()=>{const R=y(y(y({},a),{total:e.dataSource.length,current:p.value,pageSize:v.value}),e.pagination||{}),H=Math.ceil(R.total/R.pageSize);return R.current>H&&(R.current=H),R}),O=E(()=>{let R=[...e.dataSource];return e.pagination&&e.dataSource.length>(w.value.current-1)*w.value.pageSize&&(R=[...e.dataSource].splice((w.value.current-1)*w.value.pageSize,w.value.pageSize)),R}),I=nu(),_=Vo(()=>{for(let R=0;R{if(!e.grid)return;const R=_.value&&e.grid[_.value]?e.grid[_.value]:e.grid.column;if(R)return{width:`${100/R}%`,maxWidth:`${100/R}%`}}),A=(R,H)=>{var M;const D=(M=e.renderItem)!==null&&M!==void 0?M:n.renderItem;if(!D)return null;let N;const L=typeof e.rowKey;return L==="function"?N=e.rowKey(R):L==="string"||L==="number"?N=R[e.rowKey]:N=R.key,N||(N=`list-item-${H}`),h[H]=N,D({item:R,index:H})};return()=>{var R,H,M,D,N,L,F,B;const j=(R=e.loadMore)!==null&&R!==void 0?R:(H=n.loadMore)===null||H===void 0?void 0:H.call(n),z=(M=e.footer)!==null&&M!==void 0?M:(D=n.footer)===null||D===void 0?void 0:D.call(n),G=(N=e.header)!==null&&N!==void 0?N:(L=n.header)===null||L===void 0?void 0:L.call(n),Q=Ot((F=n.default)===null||F===void 0?void 0:F.call(n)),Y=!!(j||e.pagination||z),oe=ge(y(y({},P.value),{[`${l.value}-something-after-last-item`]:Y}),o.class,d.value),Z=e.pagination?g("div",{class:`${l.value}-pagination`},[g(Cm,k(k({},w.value),{},{onChange:b,onShowSizeChange:S}),null)]):null;let re=$.value&&g("div",{style:{minHeight:"53px"}},null);if(O.value.length>0){h.length=0;const X=O.value.map((W,U)=>A(W,U)),te=X.map((W,U)=>g("div",{key:h[U],style:T.value},[W]));re=e.grid?g(Ax,{gutter:e.grid.gutter},{default:()=>[te]}):g("ul",{class:`${l.value}-items`},[X])}else!Q.length&&!$.value&&(re=g("div",{class:`${l.value}-empty-text`},[((B=e.locale)===null||B===void 0?void 0:B.emptyText)||u("List")]));const ne=w.value.position||"bottom";return c(g("div",k(k({},o),{},{class:oe}),[(ne==="top"||ne==="both")&&Z,G&&g("div",{class:`${l.value}-header`},[G]),g(di,C.value,{default:()=>[re,Q]}),z&&g("div",{class:`${l.value}-footer`},[z]),j||(ne==="bottom"||ne==="both")&&Z]))}}});ba.install=function(e){return e.component(ba.name,ba),e.component(ba.Item.name,ba.Item),e.component(ba.Item.Meta.name,ba.Item.Meta),e};function fue(e){const{selectionStart:t}=e;return e.value.slice(0,t)}function pue(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(Array.isArray(t)?t:[t]).reduce((o,r)=>{const i=e.lastIndexOf(r);return i>o.location?{location:i,prefix:r}:o},{location:-1,prefix:""})}function I4(e){return(e||"").toLowerCase()}function gue(e,t,n){const o=e[0];if(!o||o===n)return e;let r=e;const i=t.length;for(let a=0;a[]}},setup(e,t){let{slots:n}=t;const{activeIndex:o,setActiveIndex:r,selectOption:i,onFocus:a=yue,loading:l}=ze(TD,{activeIndex:se(),loading:se(!1)});let s;const u=c=>{clearTimeout(s),s=setTimeout(()=>{a(c)})};return tt(()=>{clearTimeout(s)}),()=>{var c;const{prefixCls:d,options:f}=e,p=f[o.value]||{};return g(on,{prefixCls:`${d}-menu`,activeKey:p.value,onSelect:v=>{let{key:h}=v;const m=f.find(b=>{let{value:S}=b;return S===h});i(m)},onMousedown:u},{default:()=>[!l.value&&f.map((v,h)=>{var m,b;const{value:S,disabled:C,label:$=v.value,class:x,style:P}=v;return g(ui,{key:S,disabled:C,onMouseenter:()=>{r(h)},class:x,style:P},{default:()=>[(b=(m=n.option)===null||m===void 0?void 0:m.call(n,v))!==null&&b!==void 0?b:typeof $=="function"?$(v):$]})}),!l.value&&f.length===0?g(ui,{key:"notFoundContent",disabled:!0},{default:()=>[(c=n.notFoundContent)===null||c===void 0?void 0:c.call(n)]}):null,l.value&&g(ui,{key:"loading",disabled:!0},{default:()=>[g(di,{size:"small"},null)]})]})}}}),Cue={bottomRight:{points:["tl","br"],offset:[0,4],overflow:{adjustX:0,adjustY:1}},bottomLeft:{points:["tr","bl"],offset:[0,4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["bl","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topLeft:{points:["br","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}},xue=le({compatConfig:{MODE:3},name:"KeywordTrigger",props:{loading:{type:Boolean,default:void 0},options:{type:Array,default:()=>[]},prefixCls:String,placement:String,visible:{type:Boolean,default:void 0},transitionName:String,getPopupContainer:Function,direction:String,dropdownClassName:String},setup(e,t){let{slots:n}=t;const o=()=>`${e.prefixCls}-dropdown`,r=()=>{const{options:a}=e;return g(Sue,{prefixCls:o(),options:a},{notFoundContent:n.notFoundContent,option:n.option})},i=E(()=>{const{placement:a,direction:l}=e;let s="topRight";return l==="rtl"?s=a==="top"?"topLeft":"bottomLeft":s=a==="top"?"topRight":"bottomRight",s});return()=>{const{visible:a,transitionName:l,getPopupContainer:s}=e;return g(ss,{prefixCls:o(),popupVisible:a,popup:r(),popupClassName:e.dropdownClassName,popupPlacement:i.value,popupTransitionName:l,builtinPlacements:Cue,getPopupContainer:s},{default:n.default})}}}),$ue=Jn("top","bottom"),ED={autofocus:{type:Boolean,default:void 0},prefix:K.oneOfType([K.string,K.arrayOf(K.string)]),prefixCls:String,value:String,disabled:{type:Boolean,default:void 0},split:String,transitionName:String,placement:K.oneOf($ue),character:K.any,characterRender:Function,filterOption:{type:[Boolean,Function]},validateSearch:Function,getPopupContainer:{type:Function},options:pt(),loading:{type:Boolean,default:void 0},rows:[Number,String],direction:{type:String}},_D=y(y({},ED),{dropdownClassName:String}),MD={prefix:"@",split:" ",rows:1,validateSearch:mue,filterOption:()=>bue};Qe(_D,MD);var T4=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{u.value=e.value});const c=T=>{n("change",T)},d=T=>{let{target:{value:A}}=T;c(A)},f=(T,A,R)=>{y(u,{measuring:!0,measureText:T,measurePrefix:A,measureLocation:R,activeIndex:0})},p=T=>{y(u,{measuring:!1,measureLocation:0,measureText:null}),T==null||T()},v=T=>{const{which:A}=T;if(u.measuring){if(A===Ie.UP||A===Ie.DOWN){const R=O.value.length,H=A===Ie.UP?-1:1,M=(u.activeIndex+H+R)%R;u.activeIndex=M,T.preventDefault()}else if(A===Ie.ESC)p();else if(A===Ie.ENTER){if(T.preventDefault(),!O.value.length){p();return}const R=O.value[u.activeIndex];x(R)}}},h=T=>{const{key:A,which:R}=T,{measureText:H,measuring:M}=u,{prefix:D,validateSearch:N}=e,L=T.target;if(L.composing)return;const F=fue(L),{location:B,prefix:j}=pue(F,D);if([Ie.ESC,Ie.UP,Ie.DOWN,Ie.ENTER].indexOf(R)===-1)if(B!==-1){const z=F.slice(B+j.length),G=N(z,e),Q=!!w(z).length;G?(A===j||A==="Shift"||M||z!==H&&Q)&&f(z,j,B):M&&p(),G&&n("search",z,j)}else M&&p()},m=T=>{u.measuring||n("pressenter",T)},b=T=>{C(T)},S=T=>{$(T)},C=T=>{clearTimeout(s.value);const{isFocus:A}=u;!A&&T&&n("focus",T),u.isFocus=!0},$=T=>{s.value=setTimeout(()=>{u.isFocus=!1,p(),n("blur",T)},100)},x=T=>{const{split:A}=e,{value:R=""}=T,{text:H,selectionLocation:M}=hue(u.value,{measureLocation:u.measureLocation,targetText:R,prefix:u.measurePrefix,selectionStart:l.value.getSelectionStart(),split:A});c(H),p(()=>{vue(l.value.input,M)}),n("select",T,u.measurePrefix)},P=T=>{u.activeIndex=T},w=T=>{const A=T||u.measureText||"",{filterOption:R}=e;return e.options.filter(M=>R?R(A,M):!0)},O=E(()=>w());return r({blur:()=>{l.value.blur()},focus:()=>{l.value.focus()}}),Xe(TD,{activeIndex:We(u,"activeIndex"),setActiveIndex:P,selectOption:x,onFocus:C,onBlur:$,loading:We(e,"loading")}),uo(()=>{ot(()=>{u.measuring&&(a.value.scrollTop=l.value.getScrollTop())})}),()=>{const{measureLocation:T,measurePrefix:A,measuring:R}=u,{prefixCls:H,placement:M,transitionName:D,getPopupContainer:N,direction:L}=e,F=T4(e,["prefixCls","placement","transitionName","getPopupContainer","direction"]),{class:B,style:j}=o,z=T4(o,["class","style"]),G=it(F,["value","prefix","split","validateSearch","filterOption","options","loading"]),Q=y(y(y({},G),z),{onChange:E4,onSelect:E4,value:u.value,onInput:d,onBlur:S,onKeydown:v,onKeyup:h,onFocus:b,onPressenter:m});return g("div",{class:ge(H,B),style:j},[g(Xc,k(k({},Q),{},{ref:l,tag:"textarea"}),null),R&&g("div",{ref:a,class:`${H}-measure`},[u.value.slice(0,T),g(xue,{prefixCls:H,transitionName:D,dropdownClassName:e.dropdownClassName,placement:M,options:R?O.value:[],visible:!0,direction:L,getPopupContainer:N},{default:()=>[g("span",null,[A])],notFoundContent:i.notFoundContent,option:i.option}),u.value.slice(T+A.length)])])}}}),Pue={value:String,disabled:Boolean,payload:De()},AD=y(y({},Pue),{label:It([])}),RD={name:"Option",props:AD,render(e,t){let{slots:n}=t;var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}};y({compatConfig:{MODE:3}},RD);const Oue=e=>{const{componentCls:t,colorTextDisabled:n,controlItemBgHover:o,controlPaddingHorizontal:r,colorText:i,motionDurationSlow:a,lineHeight:l,controlHeight:s,inputPaddingHorizontal:u,inputPaddingVertical:c,fontSize:d,colorBgElevated:f,borderRadiusLG:p,boxShadowSecondary:v}=e,h=Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2);return{[t]:y(y(y(y(y({},qe(e)),fs(e)),{position:"relative",display:"inline-block",height:"auto",padding:0,overflow:"hidden",lineHeight:l,whiteSpace:"pre-wrap",verticalAlign:"bottom"}),$f(e,t)),{"&-disabled":{"> textarea":y({},mx(e))},"&-focused":y({},Ba(e)),[`&-affix-wrapper ${t}-suffix`]:{position:"absolute",top:0,insetInlineEnd:u,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto"},[`> textarea, ${t}-measure`]:{color:i,boxSizing:"border-box",minHeight:s-2,margin:0,padding:`${c}px ${u}px`,overflow:"inherit",overflowX:"hidden",overflowY:"auto",fontWeight:"inherit",fontSize:"inherit",fontFamily:"inherit",fontStyle:"inherit",fontVariant:"inherit",fontSizeAdjust:"inherit",fontStretch:"inherit",lineHeight:"inherit",direction:"inherit",letterSpacing:"inherit",whiteSpace:"inherit",textAlign:"inherit",verticalAlign:"top",wordWrap:"break-word",wordBreak:"inherit",tabSize:"inherit"},"> textarea":y({width:"100%",border:"none",outline:"none",resize:"none",backgroundColor:"inherit"},vx(e.colorTextPlaceholder)),[`${t}-measure`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:-1,color:"transparent",pointerEvents:"none","> span":{display:"inline-block",minHeight:"1em"}},"&-dropdown":y(y({},qe(e)),{position:"absolute",top:-9999,insetInlineStart:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",fontSize:d,fontVariant:"initial",backgroundColor:f,borderRadius:p,outline:"none",boxShadow:v,"&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.dropdownHeight,marginBottom:0,paddingInlineStart:0,overflow:"auto",listStyle:"none",outline:"none","&-item":y(y({},cn),{position:"relative",display:"block",minWidth:e.controlItemWidth,padding:`${h}px ${r}px`,color:i,fontWeight:"normal",lineHeight:l,cursor:"pointer",transition:`background ${a} ease`,"&:hover":{backgroundColor:o},"&:first-child":{borderStartStartRadius:p,borderStartEndRadius:p,borderEndStartRadius:0,borderEndEndRadius:0},"&:last-child":{borderStartStartRadius:0,borderStartEndRadius:0,borderEndStartRadius:p,borderEndEndRadius:p},"&-disabled":{color:n,cursor:"not-allowed","&:hover":{color:n,backgroundColor:o,cursor:"not-allowed"}},"&-selected":{color:i,fontWeight:e.fontWeightStrong,backgroundColor:o},"&-active":{backgroundColor:o}})}})})}},Iue=Ue("Mentions",e=>{const t=ps(e);return[Oue(t)]},e=>({dropdownHeight:250,controlItemWidth:100,zIndexPopup:e.zIndexPopupBase+50}));var _4=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{prefix:n="@",split:o=" "}=t,r=Array.isArray(n)?n:[n];return e.split(o).map(function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",a=null;return r.some(l=>i.slice(0,l.length)===l?(a=l,!0):!1),a!==null?{prefix:a,value:i.slice(a.length)}:null}).filter(i=>!!i&&!!i.value)},_ue=()=>y(y({},ED),{loading:{type:Boolean,default:void 0},onFocus:{type:Function},onBlur:{type:Function},onSelect:{type:Function},onChange:{type:Function},onPressenter:{type:Function},"onUpdate:value":{type:Function},notFoundContent:K.any,defaultValue:String,id:String,status:String}),lb=le({compatConfig:{MODE:3},name:"AMentions",inheritAttrs:!1,props:_ue(),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r,expose:i}=t;var a,l;const{prefixCls:s,renderEmpty:u,direction:c}=Te("mentions",e),[d,f]=Iue(s),p=se(!1),v=se(null),h=se((l=(a=e.value)!==null&&a!==void 0?a:e.defaultValue)!==null&&l!==void 0?l:""),m=bn(),b=kn.useInject(),S=E(()=>Yr(b.status,e.status));VC({prefixCls:E(()=>`${s.value}-menu`),mode:E(()=>"vertical"),selectable:E(()=>!1),onClick:()=>{},validator:A=>{let{mode:R}=A}}),be(()=>e.value,A=>{h.value=A});const C=A=>{p.value=!0,o("focus",A)},$=A=>{p.value=!1,o("blur",A),m.onFieldBlur()},x=function(){for(var A=arguments.length,R=new Array(A),H=0;H{e.value===void 0&&(h.value=A),o("update:value",A),o("change",A),m.onFieldChange()},w=()=>{const A=e.notFoundContent;return A!==void 0?A:n.notFoundContent?n.notFoundContent():u("Select")},O=()=>{var A;return Ot(((A=n.default)===null||A===void 0?void 0:A.call(n))||[]).map(R=>{var H,M;return y(y({},jM(R)),{label:(M=(H=R.children)===null||H===void 0?void 0:H.default)===null||M===void 0?void 0:M.call(H)})})};i({focus:()=>{v.value.focus()},blur:()=>{v.value.blur()}});const T=E(()=>e.loading?Tue:e.filterOption);return()=>{const{disabled:A,getPopupContainer:R,rows:H=1,id:M=m.id.value}=e,D=_4(e,["disabled","getPopupContainer","rows","id"]),{hasFeedback:N,feedbackIcon:L}=b,{class:F}=r,B=_4(r,["class"]),j=it(D,["defaultValue","onUpdate:value","prefixCls"]),z=ge({[`${s.value}-disabled`]:A,[`${s.value}-focused`]:p.value,[`${s.value}-rtl`]:c.value==="rtl"},lo(s.value,S.value),!N&&F,f.value),G=y(y(y(y({prefixCls:s.value},j),{disabled:A,direction:c.value,filterOption:T.value,getPopupContainer:R,options:e.loading?[{value:"ANTDV_SEARCHING",disabled:!0,label:g(di,{size:"small"},null)}]:e.options||O(),class:z}),B),{rows:H,onChange:P,onSelect:x,onFocus:C,onBlur:$,ref:v,value:h.value,id:M}),Q=g(wue,k(k({},G),{},{dropdownClassName:f.value}),{notFoundContent:w,option:n.option});return d(N?g("div",{class:ge(`${s.value}-affix-wrapper`,lo(`${s.value}-affix-wrapper`,S.value,N),F,f.value)},[Q,g("span",{class:`${s.value}-suffix`},[L])]):Q)}}}),dg=le(y(y({compatConfig:{MODE:3}},RD),{name:"AMentionsOption",props:AD})),Mue=y(lb,{Option:dg,getMentions:Eue,install:e=>(e.component(lb.name,lb),e.component(dg.name,dg),e)});var Aue=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{y1={x:e.pageX,y:e.pageY},setTimeout(()=>y1=null,100)};aR()&&Ht(document.documentElement,"click",Rue,!0);const Due=()=>({prefixCls:String,visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},confirmLoading:{type:Boolean,default:void 0},title:K.any,closable:{type:Boolean,default:void 0},closeIcon:K.any,onOk:Function,onCancel:Function,"onUpdate:visible":Function,"onUpdate:open":Function,onChange:Function,afterClose:Function,centered:{type:Boolean,default:void 0},width:[String,Number],footer:K.any,okText:K.any,okType:String,cancelText:K.any,icon:K.any,maskClosable:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},okButtonProps:De(),cancelButtonProps:De(),destroyOnClose:{type:Boolean,default:void 0},wrapClassName:String,maskTransitionName:String,transitionName:String,getContainer:{type:[String,Function,Boolean,Object],default:void 0},zIndex:Number,bodyStyle:De(),maskStyle:De(),mask:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},wrapProps:Object,focusTriggerAfterClose:{type:Boolean,default:void 0},modalRender:Function,mousePosition:De()}),Tn=le({compatConfig:{MODE:3},name:"AModal",inheritAttrs:!1,props:Qe(Due(),{width:520,confirmLoading:!1,okType:"primary"}),setup(e,t){let{emit:n,slots:o,attrs:r}=t;const[i]=wr("Modal"),{prefixCls:a,rootPrefixCls:l,direction:s,getPopupContainer:u}=Te("modal",e),[c,d]=Wse(a);Yo(e.visible===void 0);const f=h=>{n("update:visible",!1),n("update:open",!1),n("cancel",h),n("change",!1)},p=h=>{n("ok",h)},v=()=>{var h,m;const{okText:b=(h=o.okText)===null||h===void 0?void 0:h.call(o),okType:S,cancelText:C=(m=o.cancelText)===null||m===void 0?void 0:m.call(o),confirmLoading:$}=e;return g(Le,null,[g(Qt,k({onClick:f},e.cancelButtonProps),{default:()=>[C||i.value.cancelText]}),g(Qt,k(k({},rh(S)),{},{loading:$,onClick:p},e.okButtonProps),{default:()=>[b||i.value.okText]})])};return()=>{var h,m;const{prefixCls:b,visible:S,open:C,wrapClassName:$,centered:x,getContainer:P,closeIcon:w=(h=o.closeIcon)===null||h===void 0?void 0:h.call(o),focusTriggerAfterClose:O=!0}=e,I=Aue(e,["prefixCls","visible","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose"]),_=ge($,{[`${a.value}-centered`]:!!x,[`${a.value}-wrap-rtl`]:s.value==="rtl"});return c(g(pD,k(k(k({},I),r),{},{rootClassName:d.value,class:ge(d.value,r.class),getContainer:P||(u==null?void 0:u.value),prefixCls:a.value,wrapClassName:_,visible:C??S,onClose:f,focusTriggerAfterClose:O,transitionName:co(l.value,"zoom",e.transitionName),maskTransitionName:co(l.value,"fade",e.maskTransitionName),mousePosition:(m=I.mousePosition)!==null&&m!==void 0?m:y1}),y(y({},o),{footer:o.footer||v,closeIcon:()=>g("span",{class:`${a.value}-close-x`},[w||g(fo,{class:`${a.value}-close-icon`},null)])})))}}}),DD=()=>{const e=se(!1);return tt(()=>{e.value=!0}),e},Nue={type:{type:String},actionFn:Function,close:Function,autofocus:Boolean,prefixCls:String,buttonProps:De(),emitEvent:Boolean,quitOnNullishReturnValue:Boolean};function M4(e){return!!(e&&e.then)}const S1=le({compatConfig:{MODE:3},name:"ActionButton",props:Nue,setup(e,t){let{slots:n}=t;const o=se(!1),r=se(),i=se(!1);let a;const l=DD();Ke(()=>{e.autofocus&&(a=setTimeout(()=>{var d,f;return(f=(d=Co(r.value))===null||d===void 0?void 0:d.focus)===null||f===void 0?void 0:f.call(d)}))}),tt(()=>{clearTimeout(a)});const s=function(){for(var d,f=arguments.length,p=new Array(f),v=0;v{M4(d)&&(i.value=!0,d.then(function(){l.value||(i.value=!1),s(...arguments),o.value=!1},f=>(l.value||(i.value=!1),o.value=!1,Promise.reject(f))))},c=d=>{const{actionFn:f}=e;if(o.value)return;if(o.value=!0,!f){s();return}let p;if(e.emitEvent){if(p=f(d),e.quitOnNullishReturnValue&&!M4(p)){o.value=!1,s(d);return}}else if(f.length)p=f(e.close),o.value=!1;else if(p=f(),!p){s();return}u(p)};return()=>{const{type:d,prefixCls:f,buttonProps:p}=e;return g(Qt,k(k(k({},rh(d)),{},{onClick:c,loading:i.value,prefixCls:f},p),{},{ref:r}),n)}}});function Is(e){return typeof e=="function"?e():e}const ND=le({name:"ConfirmDialog",inheritAttrs:!1,props:["icon","onCancel","onOk","close","closable","zIndex","afterClose","visible","open","keyboard","centered","getContainer","maskStyle","okButtonProps","cancelButtonProps","okType","prefixCls","okCancel","width","mask","maskClosable","okText","cancelText","autoFocusButton","transitionName","maskTransitionName","type","title","content","direction","rootPrefixCls","bodyStyle","closeIcon","modalRender","focusTriggerAfterClose","wrapClassName","confirmPrefixCls","footer"],setup(e,t){let{attrs:n}=t;const[o]=wr("Modal");return()=>{const{icon:r,onCancel:i,onOk:a,close:l,okText:s,closable:u=!1,zIndex:c,afterClose:d,keyboard:f,centered:p,getContainer:v,maskStyle:h,okButtonProps:m,cancelButtonProps:b,okCancel:S,width:C=416,mask:$=!0,maskClosable:x=!1,type:P,open:w,title:O,content:I,direction:_,closeIcon:T,modalRender:A,focusTriggerAfterClose:R,rootPrefixCls:H,bodyStyle:M,wrapClassName:D,footer:N}=e;let L=r;if(!r&&r!==null)switch(P){case"info":L=g(Ya,null,null);break;case"success":L=g(qr,null,null);break;case"error":L=g(po,null,null);break;default:L=g(Jr,null,null)}const F=e.okType||"primary",B=e.prefixCls||"ant-modal",j=`${B}-confirm`,z=n.style||{},G=S??P==="confirm",Q=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",Y=`${B}-confirm`,oe=ge(Y,`${Y}-${e.type}`,{[`${Y}-rtl`]:_==="rtl"},n.class),Z=o.value,re=G&&g(S1,{actionFn:i,close:l,autofocus:Q==="cancel",buttonProps:b,prefixCls:`${H}-btn`},{default:()=>[Is(e.cancelText)||Z.cancelText]});return g(Tn,{prefixCls:B,class:oe,wrapClassName:ge({[`${Y}-centered`]:!!p},D),onCancel:ne=>l==null?void 0:l({triggerCancel:!0},ne),open:w,title:"",footer:"",transitionName:co(H,"zoom",e.transitionName),maskTransitionName:co(H,"fade",e.maskTransitionName),mask:$,maskClosable:x,maskStyle:h,style:z,bodyStyle:M,width:C,zIndex:c,afterClose:d,keyboard:f,centered:p,getContainer:v,closable:u,closeIcon:T,modalRender:A,focusTriggerAfterClose:R},{default:()=>[g("div",{class:`${j}-body-wrapper`},[g("div",{class:`${j}-body`},[Is(L),O===void 0?null:g("span",{class:`${j}-title`},[Is(O)]),g("div",{class:`${j}-content`},[Is(I)])]),N!==void 0?Is(N):g("div",{class:`${j}-btns`},[re,g(S1,{type:F,actionFn:a,close:l,autofocus:Q==="ok",buttonProps:m,prefixCls:`${H}-btn`},{default:()=>[Is(s)||(G?Z.okText:Z.justOkText)]})])])]})}}}),Il=[],_f=e=>{const t=document.createDocumentFragment();let n=y(y({},it(e,["parentContext","appContext"])),{close:i,open:!0}),o=null;function r(){o&&(Fa(null,t),o=null);for(var u=arguments.length,c=new Array(u),d=0;dp&&p.triggerCancel);e.onCancel&&f&&e.onCancel(()=>{},...c.slice(1));for(let p=0;p{typeof e.afterClose=="function"&&e.afterClose(),r.apply(this,c)}}),n.visible&&delete n.visible,a(n)}function a(u){typeof u=="function"?n=u(n):n=y(y({},n),u),o&&kj(o,n,t)}const l=u=>{const c=Un,d=c.prefixCls,f=u.prefixCls||`${d}-modal`,p=c.iconPrefixCls,v=Kie();return g(Nl,k(k({},c),{},{prefixCls:d}),{default:()=>[g(ND,k(k({},u),{},{rootPrefixCls:d,prefixCls:f,iconPrefixCls:p,locale:v,cancelText:u.cancelText||v.cancelText}),null)]})};function s(u){const c=g(l,y({},u));return c.appContext=e.parentContext||e.appContext||c.appContext,Fa(c,t),c}return o=s(n),Il.push(i),{destroy:i,update:a}};function kD(e){return y(y({},e),{type:"warning"})}function LD(e){return y(y({},e),{type:"info"})}function FD(e){return y(y({},e),{type:"success"})}function BD(e){return y(y({},e),{type:"error"})}function HD(e){return y(y({},e),{type:"confirm"})}const kue=()=>({config:Object,afterClose:Function,destroyAction:Function,open:Boolean}),Lue=le({name:"HookModal",inheritAttrs:!1,props:Qe(kue(),{config:{width:520,okType:"primary"}}),setup(e,t){let{expose:n}=t;var o;const r=E(()=>e.open),i=E(()=>e.config),{direction:a,getPrefixCls:l}=vv(),s=l("modal"),u=l(),c=()=>{var v,h;e==null||e.afterClose(),(h=(v=i.value).afterClose)===null||h===void 0||h.call(v)},d=function(){e.destroyAction(...arguments)};n({destroy:d});const f=(o=i.value.okCancel)!==null&&o!==void 0?o:i.value.type==="confirm",[p]=wr("Modal",$o.Modal);return()=>g(ND,k(k({prefixCls:s,rootPrefixCls:u},i.value),{},{close:d,open:r.value,afterClose:c,okText:i.value.okText||(f?p==null?void 0:p.value.okText:p==null?void 0:p.value.justOkText),direction:i.value.direction||a.value,cancelText:i.value.cancelText||(p==null?void 0:p.value.cancelText)}),null)}});let A4=0;const Fue=le({name:"ElementsHolder",inheritAttrs:!1,setup(e,t){let{expose:n}=t;const o=se([]);return n({addModal:i=>(o.value.push(i),o.value=o.value.slice(),()=>{o.value=o.value.filter(a=>a!==i)})}),()=>o.value.map(i=>i())}});function zD(){const e=se(null),t=se([]);be(t,()=>{t.value.length&&([...t.value].forEach(a=>{a()}),t.value=[])},{immediate:!0});const n=i=>function(l){var s;A4+=1;const u=se(!0),c=se(null),d=se(Bt(l)),f=se({});be(()=>l,C=>{m(y(y({},Ut(C)?C.value:C),f.value))});const p=function(){u.value=!1;for(var C=arguments.length,$=new Array(C),x=0;xw&&w.triggerCancel);d.value.onCancel&&P&&d.value.onCancel(()=>{},...$.slice(1))};let v;const h=()=>g(Lue,{key:`modal-${A4}`,config:i(d.value),ref:c,open:u.value,destroyAction:p,afterClose:()=>{v==null||v()}},null);v=(s=e.value)===null||s===void 0?void 0:s.addModal(h),v&&Il.push(v);const m=C=>{d.value=y(y({},d.value),C)};return{destroy:()=>{c.value?p():t.value=[...t.value,p]},update:C=>{f.value=C,c.value?m(C):t.value=[...t.value,()=>m(C)]}}},o=E(()=>({info:n(LD),success:n(FD),error:n(BD),warning:n(kD),confirm:n(HD)})),r=Symbol("modalHolderKey");return[o.value,()=>g(Fue,{key:r,ref:e},null)]}function jD(e){return _f(kD(e))}Tn.useModal=zD;Tn.info=function(t){return _f(LD(t))};Tn.success=function(t){return _f(FD(t))};Tn.error=function(t){return _f(BD(t))};Tn.warning=jD;Tn.warn=jD;Tn.confirm=function(t){return _f(HD(t))};Tn.destroyAll=function(){for(;Il.length;){const t=Il.pop();t&&t()}};Tn.install=function(e){return e.component(Tn.name,Tn),e};const WD=e=>{const{value:t,formatter:n,precision:o,decimalSeparator:r,groupSeparator:i="",prefixCls:a}=e;let l;if(typeof n=="function")l=n({value:t});else{const s=String(t),u=s.match(/^(-?)(\d*)(\.(\d+))?$/);if(!u)l=s;else{const c=u[1];let d=u[2]||"0",f=u[4]||"";d=d.replace(/\B(?=(\d{3})+(?!\d))/g,i),typeof o=="number"&&(f=f.padEnd(o,"0").slice(0,o>0?o:0)),f&&(f=`${r}${f}`),l=[g("span",{key:"int",class:`${a}-content-value-int`},[c,d]),f&&g("span",{key:"decimal",class:`${a}-content-value-decimal`},[f])]}}return g("span",{class:`${a}-content-value`},[l])};WD.displayName="StatisticNumber";const Bue=e=>{const{componentCls:t,marginXXS:n,padding:o,colorTextDescription:r,statisticTitleFontSize:i,colorTextHeading:a,statisticContentFontSize:l,statisticFontFamily:s}=e;return{[`${t}`]:y(y({},qe(e)),{[`${t}-title`]:{marginBottom:n,color:r,fontSize:i},[`${t}-skeleton`]:{paddingTop:o},[`${t}-content`]:{color:a,fontSize:l,fontFamily:s,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:n},[`${t}-content-suffix`]:{marginInlineStart:n}}})}},Hue=Ue("Statistic",e=>{const{fontSizeHeading3:t,fontSize:n,fontFamily:o}=e,r=Be(e,{statisticTitleFontSize:n,statisticContentFontSize:t,statisticFontFamily:o});return[Bue(r)]}),VD=()=>({prefixCls:String,decimalSeparator:String,groupSeparator:String,format:String,value:He([Number,String,Object]),valueStyle:{type:Object,default:void 0},valueRender:ye(),formatter:It(),precision:Number,prefix:ro(),suffix:ro(),title:ro(),loading:$e()}),Li=le({compatConfig:{MODE:3},name:"AStatistic",inheritAttrs:!1,props:Qe(VD(),{decimalSeparator:".",groupSeparator:",",loading:!1}),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("statistic",e),[a,l]=Hue(r);return()=>{var s,u,c,d,f,p,v;const{value:h=0,valueStyle:m,valueRender:b}=e,S=r.value,C=(s=e.title)!==null&&s!==void 0?s:(u=n.title)===null||u===void 0?void 0:u.call(n),$=(c=e.prefix)!==null&&c!==void 0?c:(d=n.prefix)===null||d===void 0?void 0:d.call(n),x=(f=e.suffix)!==null&&f!==void 0?f:(p=n.suffix)===null||p===void 0?void 0:p.call(n),P=(v=e.formatter)!==null&&v!==void 0?v:n.formatter;let w=g(WD,k({"data-for-update":Date.now()},y(y({},e),{prefixCls:S,value:h,formatter:P})),null);return b&&(w=b(w)),a(g("div",k(k({},o),{},{class:[S,{[`${S}-rtl`]:i.value==="rtl"},o.class,l.value]}),[C&&g("div",{class:`${S}-title`},[C]),g(no,{paragraph:!1,loading:e.loading},{default:()=>[g("div",{style:m,class:`${S}-content`},[$&&g("span",{class:`${S}-content-prefix`},[$]),w,x&&g("span",{class:`${S}-content-suffix`},[x])])]})]))}}}),zue=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function jue(e,t){let n=e;const o=/\[[^\]]*]/g,r=(t.match(o)||[]).map(s=>s.slice(1,-1)),i=t.replace(o,"[]"),a=zue.reduce((s,u)=>{let[c,d]=u;if(s.includes(c)){const f=Math.floor(n/d);return n-=f*d,s.replace(new RegExp(`${c}+`,"g"),p=>{const v=p.length;return f.toString().padStart(v,"0")})}return s},i);let l=0;return a.replace(o,()=>{const s=r[l];return l+=1,s})}function Wue(e,t){const{format:n=""}=t,o=new Date(e).getTime(),r=Date.now(),i=Math.max(o-r,0);return jue(i,n)}const Vue=1e3/30;function sb(e){return new Date(e).getTime()}const Kue=()=>y(y({},VD()),{value:He([Number,String,Object]),format:String,onFinish:Function,onChange:Function}),Uue=le({compatConfig:{MODE:3},name:"AStatisticCountdown",props:Qe(Kue(),{format:"HH:mm:ss"}),setup(e,t){let{emit:n,slots:o}=t;const r=ae(),i=ae(),a=()=>{const{value:d}=e;sb(d)>=Date.now()?l():s()},l=()=>{if(r.value)return;const d=sb(e.value);r.value=setInterval(()=>{i.value.$forceUpdate(),d>Date.now()&&n("change",d-Date.now()),a()},Vue)},s=()=>{const{value:d}=e;r.value&&(clearInterval(r.value),r.value=void 0,sb(d){let{value:f,config:p}=d;const{format:v}=e;return Wue(f,y(y({},p),{format:v}))},c=d=>d;return Ke(()=>{a()}),uo(()=>{a()}),tt(()=>{s()}),()=>{const d=e.value;return g(Li,k({ref:i},y(y({},it(e,["onFinish","onChange"])),{value:d,valueRender:c,formatter:u})),o)}}});Li.Countdown=Uue;Li.install=function(e){return e.component(Li.name,Li),e.component(Li.Countdown.name,Li.Countdown),e};const Gue=Li.Countdown;var Xue={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};function R4(e){for(var t=1;t{const{keyCode:p}=f;p===Ie.ENTER&&f.preventDefault()},s=f=>{const{keyCode:p}=f;p===Ie.ENTER&&o("click",f)},u=f=>{o("click",f)},c=()=>{a.value&&a.value.focus()},d=()=>{a.value&&a.value.blur()};return Ke(()=>{e.autofocus&&c()}),i({focus:c,blur:d}),()=>{var f;const{noStyle:p,disabled:v}=e,h=Zue(e,["noStyle","disabled"]);let m={};return p||(m=y({},Que)),v&&(m.pointerEvents="none"),g("div",k(k(k({role:"button",tabindex:0,ref:a},h),r),{},{onClick:u,onKeydown:l,onKeyup:s,style:y(y({},m),r.style||{})}),[(f=n.default)===null||f===void 0?void 0:f.call(n)])}}}),ede={small:8,middle:16,large:24},tde=()=>({prefixCls:String,size:{type:[String,Number,Array]},direction:K.oneOf(Jn("horizontal","vertical")).def("horizontal"),align:K.oneOf(Jn("start","end","center","baseline")),wrap:$e()});function nde(e){return typeof e=="string"?ede[e]:e||0}const uc=le({compatConfig:{MODE:3},name:"ASpace",inheritAttrs:!1,props:tde(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,space:i,direction:a}=Te("space",e),[l,s]=z8(r),u=sR(),c=E(()=>{var b,S,C;return(C=(b=e.size)!==null&&b!==void 0?b:(S=i==null?void 0:i.value)===null||S===void 0?void 0:S.size)!==null&&C!==void 0?C:"small"}),d=ae(),f=ae();be(c,()=>{[d.value,f.value]=(Array.isArray(c.value)?c.value:[c.value,c.value]).map(b=>nde(b))},{immediate:!0});const p=E(()=>e.align===void 0&&e.direction==="horizontal"?"center":e.align),v=E(()=>ge(r.value,s.value,`${r.value}-${e.direction}`,{[`${r.value}-rtl`]:a.value==="rtl",[`${r.value}-align-${p.value}`]:p.value})),h=E(()=>a.value==="rtl"?"marginLeft":"marginRight"),m=E(()=>{const b={};return u.value&&(b.columnGap=`${d.value}px`,b.rowGap=`${f.value}px`),y(y({},b),e.wrap&&{flexWrap:"wrap",marginBottom:`${-f.value}px`})});return()=>{var b,S;const{wrap:C,direction:$="horizontal"}=e,x=(b=n.default)===null||b===void 0?void 0:b.call(n),P=zt(x),w=P.length;if(w===0)return null;const O=(S=n.split)===null||S===void 0?void 0:S.call(n),I=`${r.value}-item`,_=d.value,T=w-1;return g("div",k(k({},o),{},{class:[v.value,o.class],style:[m.value,o.style]}),[P.map((A,R)=>{let H=x.indexOf(A);H===-1&&(H=`$$space-${R}`);let M={};return u.value||($==="vertical"?R{const{componentCls:t,antCls:n}=e;return{[t]:y(y({},qe(e)),{position:"relative",padding:`${e.pageHeaderPaddingVertical}px ${e.pageHeaderPadding}px`,backgroundColor:e.colorBgContainer,[`&${t}-ghost`]:{backgroundColor:e.pageHeaderGhostBg},"&.has-footer":{paddingBottom:0},[`${t}-back`]:{marginRight:e.marginMD,fontSize:e.fontSizeLG,lineHeight:1,"&-button":y(y({},xv(e)),{color:e.pageHeaderBackColor,cursor:"pointer"})},[`${n}-divider-vertical`]:{height:"14px",margin:`0 ${e.marginSM}`,verticalAlign:"middle"},[`${n}-breadcrumb + &-heading`]:{marginTop:e.marginXS},[`${t}-heading`]:{display:"flex",justifyContent:"space-between","&-left":{display:"flex",alignItems:"center",margin:`${e.marginXS/2}px 0`,overflow:"hidden"},"&-title":y({marginRight:e.marginSM,marginBottom:0,color:e.colorTextHeading,fontWeight:600,fontSize:e.pageHeaderHeadingTitle,lineHeight:`${e.controlHeight}px`},cn),[`${n}-avatar`]:{marginRight:e.marginSM},"&-sub-title":y({marginRight:e.marginSM,color:e.colorTextDescription,fontSize:e.pageHeaderHeadingSubTitle,lineHeight:e.lineHeight},cn),"&-extra":{margin:`${e.marginXS/2}px 0`,whiteSpace:"nowrap","> *":{marginLeft:e.marginSM,whiteSpace:"unset"},"> *:first-child":{marginLeft:0}}},[`${t}-content`]:{paddingTop:e.pageHeaderContentPaddingVertical},[`${t}-footer`]:{marginTop:e.marginMD,[`${n}-tabs`]:{[`> ${n}-tabs-nav`]:{margin:0,"&::before":{border:"none"}},[`${n}-tabs-tab`]:{paddingTop:e.paddingXS,paddingBottom:e.paddingXS,fontSize:e.pageHeaderTabFontSize}}},[`${t}-compact ${t}-heading`]:{flexWrap:"wrap"},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}},rde=Ue("PageHeader",e=>{const t=Be(e,{pageHeaderPadding:e.paddingLG,pageHeaderPaddingVertical:e.paddingMD,pageHeaderPaddingBreadcrumb:e.paddingSM,pageHeaderContentPaddingVertical:e.paddingSM,pageHeaderBackColor:e.colorTextBase,pageHeaderGhostBg:"transparent",pageHeaderHeadingTitle:e.fontSizeHeading4,pageHeaderHeadingSubTitle:e.fontSize,pageHeaderTabFontSize:e.fontSizeLG});return[ode(t)]}),ide=()=>({backIcon:ro(),prefixCls:String,title:ro(),subTitle:ro(),breadcrumb:K.object,tags:ro(),footer:ro(),extra:ro(),avatar:De(),ghost:{type:Boolean,default:void 0},onBack:Function}),ade=le({compatConfig:{MODE:3},name:"APageHeader",inheritAttrs:!1,props:ide(),slots:Object,setup(e,t){let{emit:n,slots:o,attrs:r}=t;const{prefixCls:i,direction:a,pageHeader:l}=Te("page-header",e),[s,u]=rde(i),c=se(!1),d=DD(),f=$=>{let{width:x}=$;d.value||(c.value=x<768)},p=E(()=>{var $,x,P;return(P=($=e.ghost)!==null&&$!==void 0?$:(x=l==null?void 0:l.value)===null||x===void 0?void 0:x.ghost)!==null&&P!==void 0?P:!0}),v=()=>{var $,x,P;return(P=($=e.backIcon)!==null&&$!==void 0?$:(x=o.backIcon)===null||x===void 0?void 0:x.call(o))!==null&&P!==void 0?P:a.value==="rtl"?g(i$,null,null):g(r$,null,null)},h=$=>!$||!e.onBack?null:g(ts,{componentName:"PageHeader",children:x=>{let{back:P}=x;return g("div",{class:`${i.value}-back`},[g(Eh,{onClick:w=>{n("back",w)},class:`${i.value}-back-button`,"aria-label":P},{default:()=>[$]})])}},null),m=()=>{var $;return e.breadcrumb?g(Rl,e.breadcrumb,null):($=o.breadcrumb)===null||$===void 0?void 0:$.call(o)},b=()=>{var $,x,P,w,O,I,_,T,A;const{avatar:R}=e,H=($=e.title)!==null&&$!==void 0?$:(x=o.title)===null||x===void 0?void 0:x.call(o),M=(P=e.subTitle)!==null&&P!==void 0?P:(w=o.subTitle)===null||w===void 0?void 0:w.call(o),D=(O=e.tags)!==null&&O!==void 0?O:(I=o.tags)===null||I===void 0?void 0:I.call(o),N=(_=e.extra)!==null&&_!==void 0?_:(T=o.extra)===null||T===void 0?void 0:T.call(o),L=`${i.value}-heading`,F=H||M||D||N;if(!F)return null;const B=v(),j=h(B);return g("div",{class:L},[(j||R||F)&&g("div",{class:`${L}-left`},[j,R?g(Al,R,null):(A=o.avatar)===null||A===void 0?void 0:A.call(o),H&&g("span",{class:`${L}-title`,title:typeof H=="string"?H:void 0},[H]),M&&g("span",{class:`${L}-sub-title`,title:typeof M=="string"?M:void 0},[M]),D&&g("span",{class:`${L}-tags`},[D])]),N&&g("span",{class:`${L}-extra`},[g(uc,null,{default:()=>[N]})])])},S=()=>{var $,x;const P=($=e.footer)!==null&&$!==void 0?$:zt((x=o.footer)===null||x===void 0?void 0:x.call(o));return wB(P)?null:g("div",{class:`${i.value}-footer`},[P])},C=$=>g("div",{class:`${i.value}-content`},[$]);return()=>{var $,x;const P=(($=e.breadcrumb)===null||$===void 0?void 0:$.routes)||o.breadcrumb,w=e.footer||o.footer,O=Ot((x=o.default)===null||x===void 0?void 0:x.call(o)),I=ge(i.value,{"has-breadcrumb":P,"has-footer":w,[`${i.value}-ghost`]:p.value,[`${i.value}-rtl`]:a.value==="rtl",[`${i.value}-compact`]:c.value},r.class,u.value);return s(g(br,{onResize:f},{default:()=>[g("div",k(k({},r),{},{class:I}),[m(),b(),O.length?C(O):null,S()])]}))}}}),lde=Lt(ade),sde=e=>{const{componentCls:t,iconCls:n,zIndexPopup:o,colorText:r,colorWarning:i,marginXS:a,fontSize:l,fontWeightStrong:s,lineHeight:u}=e;return{[t]:{zIndex:o,[`${t}-inner-content`]:{color:r},[`${t}-message`]:{position:"relative",marginBottom:a,color:r,fontSize:l,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${n}`]:{color:i,fontSize:l,flex:"none",lineHeight:1,paddingTop:(Math.round(l*u)-l)/2},"&-title":{flex:"auto",marginInlineStart:a},"&-title-only":{fontWeight:s}},[`${t}-description`]:{position:"relative",marginInlineStart:l+a,marginBottom:a,color:r,fontSize:l},[`${t}-buttons`]:{textAlign:"end",button:{marginInlineStart:a}}}}},cde=Ue("Popconfirm",e=>sde(e),e=>{const{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}});var ude=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);ry(y({},kC()),{prefixCls:String,content:It(),title:It(),description:It(),okType:Ne("primary"),disabled:{type:Boolean,default:!1},okText:It(),cancelText:It(),icon:It(),okButtonProps:De(),cancelButtonProps:De(),showCancel:{type:Boolean,default:!0},onConfirm:Function,onCancel:Function}),fde=le({compatConfig:{MODE:3},name:"APopconfirm",inheritAttrs:!1,props:Qe(dde(),y(y({},SA()),{trigger:"click",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0,okType:"primary",disabled:!1})),slots:Object,setup(e,t){let{slots:n,emit:o,expose:r,attrs:i}=t;const a=ae();Yo(e.visible===void 0),r({getPopupDomNode:()=>{var P,w;return(w=(P=a.value)===null||P===void 0?void 0:P.getPopupDomNode)===null||w===void 0?void 0:w.call(P)}});const[l,s]=Dt(!1,{value:We(e,"open")}),u=(P,w)=>{e.open===void 0&&s(P),o("update:open",P),o("openChange",P,w)},c=P=>{u(!1,P)},d=P=>{var w;return(w=e.onConfirm)===null||w===void 0?void 0:w.call(e,P)},f=P=>{var w;u(!1,P),(w=e.onCancel)===null||w===void 0||w.call(e,P)},p=P=>{P.keyCode===Ie.ESC&&l&&u(!1,P)},v=P=>{const{disabled:w}=e;w||u(P)},{prefixCls:h,getPrefixCls:m}=Te("popconfirm",e),b=E(()=>m()),S=E(()=>m("btn")),[C]=cde(h),[$]=wr("Popconfirm",$o.Popconfirm),x=()=>{var P,w,O,I,_;const{okButtonProps:T,cancelButtonProps:A,title:R=(P=n.title)===null||P===void 0?void 0:P.call(n),description:H=(w=n.description)===null||w===void 0?void 0:w.call(n),cancelText:M=(O=n.cancel)===null||O===void 0?void 0:O.call(n),okText:D=(I=n.okText)===null||I===void 0?void 0:I.call(n),okType:N,icon:L=((_=n.icon)===null||_===void 0?void 0:_.call(n))||g(Jr,null,null),showCancel:F=!0}=e,{cancelButton:B,okButton:j}=n,z=y({onClick:f,size:"small"},A),G=y(y(y({onClick:d},rh(N)),{size:"small"}),T);return g("div",{class:`${h.value}-inner-content`},[g("div",{class:`${h.value}-message`},[L&&g("span",{class:`${h.value}-message-icon`},[L]),g("div",{class:[`${h.value}-message-title`,{[`${h.value}-message-title-only`]:!!H}]},[R])]),H&&g("div",{class:`${h.value}-description`},[H]),g("div",{class:`${h.value}-buttons`},[F?B?B(z):g(Qt,z,{default:()=>[M||$.value.cancelText]}):null,j?j(G):g(S1,{buttonProps:y(y({size:"small"},rh(N)),T),actionFn:d,close:c,prefixCls:S.value,quitOnNullishReturnValue:!0,emitEvent:!0},{default:()=>[D||$.value.okText]})])])};return()=>{var P;const{placement:w,overlayClassName:O,trigger:I="click"}=e,_=ude(e,["placement","overlayClassName","trigger"]),T=it(_,["title","content","cancelText","okText","onUpdate:open","onConfirm","onCancel","prefixCls"]),A=ge(h.value,O);return C(g(HC,k(k(k({},T),i),{},{trigger:I,placement:w,onOpenChange:v,open:l.value,overlayClassName:A,transitionName:co(b.value,"zoom-big",e.transitionName),ref:a,"data-popover-inject":!0}),{default:()=>[Nj(((P=n.default)===null||P===void 0?void 0:P.call(n))||[],{onKeydown:R=>{p(R)}},!1)],content:x}))}}}),pde=Lt(fde),gde=["normal","exception","active","success"],xm=()=>({prefixCls:String,type:Ne(),percent:Number,format:ye(),status:Ne(),showInfo:$e(),strokeWidth:Number,strokeLinecap:Ne(),strokeColor:It(),trailColor:String,width:Number,success:De(),gapDegree:Number,gapPosition:Ne(),size:He([String,Number,Array]),steps:Number,successPercent:Number,title:String,progressStatus:Ne()});function kl(e){return!e||e<0?0:e>100?100:e}function _h(e){let{success:t,successPercent:n}=e,o=n;return t&&"progress"in t&&(Mt(!1,"Progress","`success.progress` is deprecated. Please use `success.percent` instead."),o=t.progress),t&&"percent"in t&&(o=t.percent),o}function hde(e){let{percent:t,success:n,successPercent:o}=e;const r=kl(_h({success:n,successPercent:o}));return[r,kl(kl(t)-r)]}function vde(e){let{success:t={},strokeColor:n}=e;const{strokeColor:o}=t;return[o||ec.green,n||null]}const $m=(e,t,n)=>{var o,r,i,a;let l=-1,s=-1;if(t==="step"){const u=n.steps,c=n.strokeWidth;typeof e=="string"||typeof e>"u"?(l=e==="small"?2:14,s=c??8):typeof e=="number"?[l,s]=[e,e]:[l=14,s=8]=e,l*=u}else if(t==="line"){const u=n==null?void 0:n.strokeWidth;typeof e=="string"||typeof e>"u"?s=u||(e==="small"?6:8):typeof e=="number"?[l,s]=[e,e]:[l=-1,s=8]=e}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[l,s]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[l,s]=[e,e]:(l=(r=(o=e[0])!==null&&o!==void 0?o:e[1])!==null&&r!==void 0?r:120,s=(a=(i=e[0])!==null&&i!==void 0?i:e[1])!==null&&a!==void 0?a:120));return{width:l,height:s}};var mde=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);ry(y({},xm()),{strokeColor:It(),direction:Ne()}),yde=e=>{let t=[];return Object.keys(e).forEach(n=>{const o=parseFloat(n.replace(/%/g,""));isNaN(o)||t.push({key:o,value:e[n]})}),t=t.sort((n,o)=>n.key-o.key),t.map(n=>{let{key:o,value:r}=n;return`${r} ${o}%`}).join(", ")},Sde=(e,t)=>{const{from:n=ec.blue,to:o=ec.blue,direction:r=t==="rtl"?"to left":"to right"}=e,i=mde(e,["from","to","direction"]);if(Object.keys(i).length!==0){const a=yde(i);return{backgroundImage:`linear-gradient(${r}, ${a})`}}return{backgroundImage:`linear-gradient(${r}, ${n}, ${o})`}},Cde=le({compatConfig:{MODE:3},name:"ProgressLine",inheritAttrs:!1,props:bde(),setup(e,t){let{slots:n,attrs:o}=t;const r=E(()=>{const{strokeColor:p,direction:v}=e;return p&&typeof p!="string"?Sde(p,v):{backgroundColor:p}}),i=E(()=>e.strokeLinecap==="square"||e.strokeLinecap==="butt"?0:void 0),a=E(()=>e.trailColor?{backgroundColor:e.trailColor}:void 0),l=E(()=>{var p;return(p=e.size)!==null&&p!==void 0?p:[-1,e.strokeWidth||(e.size==="small"?6:8)]}),s=E(()=>$m(l.value,"line",{strokeWidth:e.strokeWidth})),u=E(()=>{const{percent:p}=e;return y({width:`${kl(p)}%`,height:`${s.value.height}px`,borderRadius:i.value},r.value)}),c=E(()=>_h(e)),d=E(()=>{const{success:p}=e;return{width:`${kl(c.value)}%`,height:`${s.value.height}px`,borderRadius:i.value,backgroundColor:p==null?void 0:p.strokeColor}}),f={width:s.value.width<0?"100%":s.value.width,height:`${s.value.height}px`};return()=>{var p;return g(Le,null,[g("div",k(k({},o),{},{class:[`${e.prefixCls}-outer`,o.class],style:[o.style,f]}),[g("div",{class:`${e.prefixCls}-inner`,style:a.value},[g("div",{class:`${e.prefixCls}-bg`,style:u.value},null),c.value!==void 0?g("div",{class:`${e.prefixCls}-success-bg`,style:d.value},null):null])]),(p=n.default)===null||p===void 0?void 0:p.call(n)])}}}),xde={percent:0,prefixCls:"vc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1},$de=e=>{const t=ae(null);return uo(()=>{const n=Date.now();let o=!1;e.value.forEach(r=>{const i=(r==null?void 0:r.$el)||r;if(!i)return;o=!0;const a=i.style;a.transitionDuration=".3s, .3s, .3s, .06s",t.value&&n-t.value<100&&(a.transitionDuration="0s, 0s")}),o&&(t.value=Date.now())}),e},wde={gapDegree:Number,gapPosition:{type:String},percent:{type:[Array,Number]},prefixCls:String,strokeColor:{type:[Object,String,Array]},strokeLinecap:{type:String},strokeWidth:Number,trailColor:String,trailWidth:Number,transition:String};var Pde=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r4&&arguments[4]!==void 0?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0;const a=50-o/2;let l=0,s=-a,u=0,c=-2*a;switch(i){case"left":l=-a,s=0,u=2*a,c=0;break;case"right":l=a,s=0,u=-2*a,c=0;break;case"bottom":s=a,c=2*a;break}const d=`M 50,50 m ${l},${s} + `]:{display:"inline-block",minWidth:e.paginationItemSize,height:e.paginationItemSize,color:e.colorText,fontFamily:e.paginationFontFamily,lineHeight:`${e.paginationItemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:focus-visible ${t}-item-link`]:y({},qi(e)),[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:`${e.controlHeight}px`,verticalAlign:"top",input:y(y({},fs(e)),{width:e.controlHeightLG*1.25,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},Jce=e=>{const{componentCls:t}=e;return{[`${t}-item`]:y(y({display:"inline-block",minWidth:e.paginationItemSize,height:e.paginationItemSize,marginInlineEnd:e.marginXS,fontFamily:e.paginationFontFamily,lineHeight:`${e.paginationItemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${e.paginationItemPaddingInline}px`,color:e.colorText,transition:"none","&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}}},Ji(e)),{"&-active":{fontWeight:e.paginationFontWeightActive,backgroundColor:e.paginationItemBgActive,borderColor:e.colorPrimary,a:{color:e.colorPrimary},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.colorPrimaryHover}}})}},Zce=e=>{const{componentCls:t}=e;return{[t]:y(y(y(y(y(y(y(y({},qe(e)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.paginationItemSize,marginInlineEnd:e.marginXS,lineHeight:`${e.paginationItemSize-2}px`,verticalAlign:"middle"}}),Jce(e)),qce(e)),Yce(e)),Xce(e)),Gce(e)),{[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}}),[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},Qce=e=>{const{componentCls:t}=e;return{[`${t}${t}-disabled`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.paginationItemDisabledBgActive}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[t]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.paginationItemBg},[`${t}-item-link`]:{backgroundColor:e.paginationItemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.paginationItemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.paginationItemBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.paginationItemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},eue=Ue("Pagination",e=>{const t=Be(e,{paginationItemSize:e.controlHeight,paginationFontFamily:e.fontFamily,paginationItemBg:e.colorBgContainer,paginationItemBgActive:e.colorBgContainer,paginationFontWeightActive:e.fontWeightStrong,paginationItemSizeSM:e.controlHeightSM,paginationItemInputBg:e.colorBgContainer,paginationMiniOptionsSizeChangerTop:0,paginationItemDisabledBgActive:e.controlItemBgActiveDisabled,paginationItemDisabledColorActive:e.colorTextDisabled,paginationItemLinkBg:e.colorBgContainer,inputOutlineOffset:"0 0",paginationMiniOptionsMarginInlineStart:e.marginXXS/2,paginationMiniQuickJumperInputWidth:e.controlHeightLG*1.1,paginationItemPaddingInline:e.marginXXS*1.5,paginationEllipsisLetterSpacing:e.marginXXS/2,paginationSlashMarginInlineStart:e.marginXXS,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},ps(e));return[Zce(t),e.wireframe&&Qce(t)]});var tue=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({total:Number,defaultCurrent:Number,disabled:$e(),current:Number,defaultPageSize:Number,pageSize:Number,hideOnSinglePage:$e(),showSizeChanger:$e(),pageSizeOptions:pt(),buildOptionText:ye(),showQuickJumper:He([Boolean,Object]),showTotal:ye(),size:Ne(),simple:$e(),locale:Object,prefixCls:String,selectPrefixCls:String,totalBoundaryShowSizeChanger:Number,selectComponentClass:String,itemRender:ye(),role:String,responsive:Boolean,showLessItems:$e(),onChange:ye(),onShowSizeChange:ye(),"onUpdate:current":ye(),"onUpdate:pageSize":ye()}),oue=le({compatConfig:{MODE:3},name:"APagination",inheritAttrs:!1,props:nue(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,configProvider:i,direction:a,size:l}=Te("pagination",e),[s,u]=eue(r),c=E(()=>i.getPrefixCls("select",e.selectPrefixCls)),d=nu(),[f]=wr("Pagination",QM,We(e,"locale")),p=v=>{const h=g("span",{class:`${v}-item-ellipsis`},[zn("•••")]),m=g("button",{class:`${v}-item-link`,type:"button",tabindex:-1},[a.value==="rtl"?g(Jo,null,null):g(mi,null,null)]),b=g("button",{class:`${v}-item-link`,type:"button",tabindex:-1},[a.value==="rtl"?g(mi,null,null):g(Jo,null,null)]),S=g("a",{rel:"nofollow",class:`${v}-item-link`},[g("div",{class:`${v}-item-container`},[a.value==="rtl"?g(Ih,{class:`${v}-item-link-icon`},null):g(Oh,{class:`${v}-item-link-icon`},null),h])]),C=g("a",{rel:"nofollow",class:`${v}-item-link`},[g("div",{class:`${v}-item-container`},[a.value==="rtl"?g(Oh,{class:`${v}-item-link-icon`},null):g(Ih,{class:`${v}-item-link-icon`},null),h])]);return{prevIcon:m,nextIcon:b,jumpPrevIcon:S,jumpNextIcon:C}};return()=>{var v;const{itemRender:h=n.itemRender,buildOptionText:m=n.buildOptionText,selectComponentClass:b,responsive:S}=e,C=tue(e,["itemRender","buildOptionText","selectComponentClass","responsive"]),$=l.value==="small"||!!(!((v=d.value)===null||v===void 0)&&v.xs&&!l.value&&S),x=y(y(y(y(y({},C),p(r.value)),{prefixCls:r.value,selectPrefixCls:c.value,selectComponentClass:b||($?Bce:Hce),locale:f.value,buildOptionText:m}),o),{class:ge({[`${r.value}-mini`]:$,[`${r.value}-rtl`]:a.value==="rtl"},o.class,u.value),itemRender:h});return s(g(Uce,x,null))}}}),Sm=Lt(oue),rue=()=>({avatar:K.any,description:K.any,prefixCls:String,title:K.any}),PD=le({compatConfig:{MODE:3},name:"AListItemMeta",props:rue(),displayName:"AListItemMeta",__ANT_LIST_ITEM_META:!0,slots:Object,setup(e,t){let{slots:n}=t;const{prefixCls:o}=Te("list",e);return()=>{var r,i,a,l,s,u;const c=`${o.value}-item-meta`,d=(r=e.title)!==null&&r!==void 0?r:(i=n.title)===null||i===void 0?void 0:i.call(n),f=(a=e.description)!==null&&a!==void 0?a:(l=n.description)===null||l===void 0?void 0:l.call(n),p=(s=e.avatar)!==null&&s!==void 0?s:(u=n.avatar)===null||u===void 0?void 0:u.call(n),v=g("div",{class:`${o.value}-item-meta-content`},[d&&g("h4",{class:`${o.value}-item-meta-title`},[d]),f&&g("div",{class:`${o.value}-item-meta-description`},[f])]);return g("div",{class:c},[p&&g("div",{class:`${o.value}-item-meta-avatar`},[p]),(d||f)&&v])}}}),OD=Symbol("ListContextKey");var iue=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,extra:K.any,actions:K.array,grid:Object,colStyle:{type:Object,default:void 0}}),ID=le({compatConfig:{MODE:3},name:"AListItem",inheritAttrs:!1,Meta:PD,props:aue(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{itemLayout:r,grid:i}=ze(OD,{grid:ae(),itemLayout:ae()}),{prefixCls:a}=Te("list",e),l=()=>{var u;const c=((u=n.default)===null||u===void 0?void 0:u.call(n))||[];let d;return c.forEach(f=>{PB(f)&&!df(f)&&(d=!0)}),d&&c.length>1},s=()=>{var u,c;const d=(u=e.extra)!==null&&u!==void 0?u:(c=n.extra)===null||c===void 0?void 0:c.call(n);return r.value==="vertical"?!!d:!l()};return()=>{var u,c,d,f,p;const{class:v}=o,h=iue(o,["class"]),m=a.value,b=(u=e.extra)!==null&&u!==void 0?u:(c=n.extra)===null||c===void 0?void 0:c.call(n),S=(d=n.default)===null||d===void 0?void 0:d.call(n);let C=(f=e.actions)!==null&&f!==void 0?f:Ot((p=n.actions)===null||p===void 0?void 0:p.call(n));C=C&&!Array.isArray(C)?[C]:C;const $=C&&C.length>0&&g("ul",{class:`${m}-item-action`,key:"actions"},[C.map((w,O)=>g("li",{key:`${m}-item-action-${O}`},[w,O!==C.length-1&&g("em",{class:`${m}-item-action-split`},null)]))]),x=i.value?"div":"li",P=g(x,k(k({},h),{},{class:ge(`${m}-item`,{[`${m}-item-no-flex`]:!s()},v)}),{default:()=>[r.value==="vertical"&&b?[g("div",{class:`${m}-item-main`,key:"content"},[S,$]),g("div",{class:`${m}-item-extra`,key:"extra"},[b])]:[S,$,mt(b,{key:"extra"})]]});return i.value?g(fm,{flex:1,style:e.colStyle},{default:()=>[P]}):P}}}),lue=e=>{const{listBorderedCls:t,componentCls:n,paddingLG:o,margin:r,padding:i,listItemPaddingSM:a,marginLG:l,borderRadiusLG:s}=e;return{[`${t}`]:{border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:s,[`${n}-header,${n}-footer,${n}-item`]:{paddingInline:o},[`${n}-pagination`]:{margin:`${r}px ${l}px`}},[`${t}${n}-sm`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:a}},[`${t}${n}-lg`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:`${i}px ${o}px`}}}},sue=e=>{const{componentCls:t,screenSM:n,screenMD:o,marginLG:r,marginSM:i,margin:a}=e;return{[`@media screen and (max-width:${o})`]:{[`${t}`]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:r}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:r}}}},[`@media screen and (max-width: ${n})`]:{[`${t}`]:{[`${t}-item`]:{flexWrap:"wrap",[`${t}-action`]:{marginInlineStart:i}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:"wrap-reverse",[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${a}px`}}}}}},cue=e=>{const{componentCls:t,antCls:n,controlHeight:o,minHeight:r,paddingSM:i,marginLG:a,padding:l,listItemPadding:s,colorPrimary:u,listItemPaddingSM:c,listItemPaddingLG:d,paddingXS:f,margin:p,colorText:v,colorTextDescription:h,motionDurationSlow:m,lineWidth:b}=e;return{[`${t}`]:y(y({},qe(e)),{position:"relative","*":{outline:"none"},[`${t}-header, ${t}-footer`]:{background:"transparent",paddingBlock:i},[`${t}-pagination`]:{marginBlockStart:a,textAlign:"end",[`${n}-pagination-options`]:{textAlign:"start"}},[`${t}-spin`]:{minHeight:r,textAlign:"center"},[`${t}-items`]:{margin:0,padding:0,listStyle:"none"},[`${t}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:s,color:v,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:l},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:v},[`${t}-item-meta-title`]:{marginBottom:e.marginXXS,color:v,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:v,transition:`all ${m}`,"&:hover":{color:u}}},[`${t}-item-meta-description`]:{color:h,fontSize:e.fontSize,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${f}px`,color:h,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:b,height:Math.ceil(e.fontSize*e.lineHeight)-e.marginXXS*2,transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${l}px 0`,color:h,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:l,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},[`${t}-item-no-flex`]:{display:"block"}}),[`${t}-grid ${n}-col > ${t}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:p,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:a},[`${t}-item-meta`]:{marginBlockEnd:l,[`${t}-item-meta-title`]:{marginBlockEnd:i,color:v,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:l,marginInlineStart:"auto","> li":{padding:`0 ${l}px`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:o},[`${t}-split${t}-something-after-last-item ${n}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:d},[`${t}-sm ${t}-item`]:{padding:c},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}},uue=Ue("List",e=>{const t=Be(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG,listItemPadding:`${e.paddingContentVertical}px ${e.paddingContentHorizontalLG}px`,listItemPaddingSM:`${e.paddingContentVerticalSM}px ${e.paddingContentHorizontal}px`,listItemPaddingLG:`${e.paddingContentVerticalLG}px ${e.paddingContentHorizontalLG}px`});return[cue(t),lue(t),sue(t)]},{contentWidth:220}),due=()=>({bordered:$e(),dataSource:pt(),extra:ro(),grid:De(),itemLayout:String,loading:He([Boolean,Object]),loadMore:ro(),pagination:He([Boolean,Object]),prefixCls:String,rowKey:He([String,Number,Function]),renderItem:ye(),size:String,split:$e(),header:ro(),footer:ro(),locale:De()}),ba=le({compatConfig:{MODE:3},name:"AList",inheritAttrs:!1,Item:ID,props:Qe(due(),{dataSource:[],bordered:!1,split:!0,loading:!1,pagination:!1}),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;var r,i;Xe(OD,{grid:We(e,"grid"),itemLayout:We(e,"itemLayout")});const a={current:1,total:0},{prefixCls:l,direction:s,renderEmpty:u}=Te("list",e),[c,d]=uue(l),f=E(()=>e.pagination&&typeof e.pagination=="object"?e.pagination:{}),p=ae((r=f.value.defaultCurrent)!==null&&r!==void 0?r:1),v=ae((i=f.value.defaultPageSize)!==null&&i!==void 0?i:10);be(f,()=>{"current"in f.value&&(p.value=f.value.current),"pageSize"in f.value&&(v.value=f.value.pageSize)});const h=[],m=R=>(H,M)=>{p.value=H,v.value=M,f.value[R]&&f.value[R](H,M)},b=m("onChange"),S=m("onShowSizeChange"),C=E(()=>typeof e.loading=="boolean"?{spinning:e.loading}:e.loading),$=E(()=>C.value&&C.value.spinning),x=E(()=>{let R="";switch(e.size){case"large":R="lg";break;case"small":R="sm";break}return R}),P=E(()=>({[`${l.value}`]:!0,[`${l.value}-vertical`]:e.itemLayout==="vertical",[`${l.value}-${x.value}`]:x.value,[`${l.value}-split`]:e.split,[`${l.value}-bordered`]:e.bordered,[`${l.value}-loading`]:$.value,[`${l.value}-grid`]:!!e.grid,[`${l.value}-rtl`]:s.value==="rtl"})),w=E(()=>{const R=y(y(y({},a),{total:e.dataSource.length,current:p.value,pageSize:v.value}),e.pagination||{}),H=Math.ceil(R.total/R.pageSize);return R.current>H&&(R.current=H),R}),O=E(()=>{let R=[...e.dataSource];return e.pagination&&e.dataSource.length>(w.value.current-1)*w.value.pageSize&&(R=[...e.dataSource].splice((w.value.current-1)*w.value.pageSize,w.value.pageSize)),R}),I=nu(),_=Vo(()=>{for(let R=0;R{if(!e.grid)return;const R=_.value&&e.grid[_.value]?e.grid[_.value]:e.grid.column;if(R)return{width:`${100/R}%`,maxWidth:`${100/R}%`}}),A=(R,H)=>{var M;const D=(M=e.renderItem)!==null&&M!==void 0?M:n.renderItem;if(!D)return null;let N;const L=typeof e.rowKey;return L==="function"?N=e.rowKey(R):L==="string"||L==="number"?N=R[e.rowKey]:N=R.key,N||(N=`list-item-${H}`),h[H]=N,D({item:R,index:H})};return()=>{var R,H,M,D,N,L,F,B;const j=(R=e.loadMore)!==null&&R!==void 0?R:(H=n.loadMore)===null||H===void 0?void 0:H.call(n),z=(M=e.footer)!==null&&M!==void 0?M:(D=n.footer)===null||D===void 0?void 0:D.call(n),G=(N=e.header)!==null&&N!==void 0?N:(L=n.header)===null||L===void 0?void 0:L.call(n),Q=Ot((F=n.default)===null||F===void 0?void 0:F.call(n)),Y=!!(j||e.pagination||z),oe=ge(y(y({},P.value),{[`${l.value}-something-after-last-item`]:Y}),o.class,d.value),Z=e.pagination?g("div",{class:`${l.value}-pagination`},[g(Sm,k(k({},w.value),{},{onChange:b,onShowSizeChange:S}),null)]):null;let re=$.value&&g("div",{style:{minHeight:"53px"}},null);if(O.value.length>0){h.length=0;const X=O.value.map((W,U)=>A(W,U)),te=X.map((W,U)=>g("div",{key:h[U],style:T.value},[W]));re=e.grid?g(Ax,{gutter:e.grid.gutter},{default:()=>[te]}):g("ul",{class:`${l.value}-items`},[X])}else!Q.length&&!$.value&&(re=g("div",{class:`${l.value}-empty-text`},[((B=e.locale)===null||B===void 0?void 0:B.emptyText)||u("List")]));const ne=w.value.position||"bottom";return c(g("div",k(k({},o),{},{class:oe}),[(ne==="top"||ne==="both")&&Z,G&&g("div",{class:`${l.value}-header`},[G]),g(di,C.value,{default:()=>[re,Q]}),z&&g("div",{class:`${l.value}-footer`},[z]),j||(ne==="bottom"||ne==="both")&&Z]))}}});ba.install=function(e){return e.component(ba.name,ba),e.component(ba.Item.name,ba.Item),e.component(ba.Item.Meta.name,ba.Item.Meta),e};function fue(e){const{selectionStart:t}=e;return e.value.slice(0,t)}function pue(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(Array.isArray(t)?t:[t]).reduce((o,r)=>{const i=e.lastIndexOf(r);return i>o.location?{location:i,prefix:r}:o},{location:-1,prefix:""})}function IT(e){return(e||"").toLowerCase()}function gue(e,t,n){const o=e[0];if(!o||o===n)return e;let r=e;const i=t.length;for(let a=0;a[]}},setup(e,t){let{slots:n}=t;const{activeIndex:o,setActiveIndex:r,selectOption:i,onFocus:a=yue,loading:l}=ze(TD,{activeIndex:se(),loading:se(!1)});let s;const u=c=>{clearTimeout(s),s=setTimeout(()=>{a(c)})};return tt(()=>{clearTimeout(s)}),()=>{var c;const{prefixCls:d,options:f}=e,p=f[o.value]||{};return g(on,{prefixCls:`${d}-menu`,activeKey:p.value,onSelect:v=>{let{key:h}=v;const m=f.find(b=>{let{value:S}=b;return S===h});i(m)},onMousedown:u},{default:()=>[!l.value&&f.map((v,h)=>{var m,b;const{value:S,disabled:C,label:$=v.value,class:x,style:P}=v;return g(ui,{key:S,disabled:C,onMouseenter:()=>{r(h)},class:x,style:P},{default:()=>[(b=(m=n.option)===null||m===void 0?void 0:m.call(n,v))!==null&&b!==void 0?b:typeof $=="function"?$(v):$]})}),!l.value&&f.length===0?g(ui,{key:"notFoundContent",disabled:!0},{default:()=>[(c=n.notFoundContent)===null||c===void 0?void 0:c.call(n)]}):null,l.value&&g(ui,{key:"loading",disabled:!0},{default:()=>[g(di,{size:"small"},null)]})]})}}}),Cue={bottomRight:{points:["tl","br"],offset:[0,4],overflow:{adjustX:0,adjustY:1}},bottomLeft:{points:["tr","bl"],offset:[0,4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["bl","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topLeft:{points:["br","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}},xue=le({compatConfig:{MODE:3},name:"KeywordTrigger",props:{loading:{type:Boolean,default:void 0},options:{type:Array,default:()=>[]},prefixCls:String,placement:String,visible:{type:Boolean,default:void 0},transitionName:String,getPopupContainer:Function,direction:String,dropdownClassName:String},setup(e,t){let{slots:n}=t;const o=()=>`${e.prefixCls}-dropdown`,r=()=>{const{options:a}=e;return g(Sue,{prefixCls:o(),options:a},{notFoundContent:n.notFoundContent,option:n.option})},i=E(()=>{const{placement:a,direction:l}=e;let s="topRight";return l==="rtl"?s=a==="top"?"topLeft":"bottomLeft":s=a==="top"?"topRight":"bottomRight",s});return()=>{const{visible:a,transitionName:l,getPopupContainer:s}=e;return g(ss,{prefixCls:o(),popupVisible:a,popup:r(),popupClassName:e.dropdownClassName,popupPlacement:i.value,popupTransitionName:l,builtinPlacements:Cue,getPopupContainer:s},{default:n.default})}}}),$ue=Jn("top","bottom"),ED={autofocus:{type:Boolean,default:void 0},prefix:K.oneOfType([K.string,K.arrayOf(K.string)]),prefixCls:String,value:String,disabled:{type:Boolean,default:void 0},split:String,transitionName:String,placement:K.oneOf($ue),character:K.any,characterRender:Function,filterOption:{type:[Boolean,Function]},validateSearch:Function,getPopupContainer:{type:Function},options:pt(),loading:{type:Boolean,default:void 0},rows:[Number,String],direction:{type:String}},_D=y(y({},ED),{dropdownClassName:String}),MD={prefix:"@",split:" ",rows:1,validateSearch:mue,filterOption:()=>bue};Qe(_D,MD);var TT=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{u.value=e.value});const c=T=>{n("change",T)},d=T=>{let{target:{value:A}}=T;c(A)},f=(T,A,R)=>{y(u,{measuring:!0,measureText:T,measurePrefix:A,measureLocation:R,activeIndex:0})},p=T=>{y(u,{measuring:!1,measureLocation:0,measureText:null}),T==null||T()},v=T=>{const{which:A}=T;if(u.measuring){if(A===Ie.UP||A===Ie.DOWN){const R=O.value.length,H=A===Ie.UP?-1:1,M=(u.activeIndex+H+R)%R;u.activeIndex=M,T.preventDefault()}else if(A===Ie.ESC)p();else if(A===Ie.ENTER){if(T.preventDefault(),!O.value.length){p();return}const R=O.value[u.activeIndex];x(R)}}},h=T=>{const{key:A,which:R}=T,{measureText:H,measuring:M}=u,{prefix:D,validateSearch:N}=e,L=T.target;if(L.composing)return;const F=fue(L),{location:B,prefix:j}=pue(F,D);if([Ie.ESC,Ie.UP,Ie.DOWN,Ie.ENTER].indexOf(R)===-1)if(B!==-1){const z=F.slice(B+j.length),G=N(z,e),Q=!!w(z).length;G?(A===j||A==="Shift"||M||z!==H&&Q)&&f(z,j,B):M&&p(),G&&n("search",z,j)}else M&&p()},m=T=>{u.measuring||n("pressenter",T)},b=T=>{C(T)},S=T=>{$(T)},C=T=>{clearTimeout(s.value);const{isFocus:A}=u;!A&&T&&n("focus",T),u.isFocus=!0},$=T=>{s.value=setTimeout(()=>{u.isFocus=!1,p(),n("blur",T)},100)},x=T=>{const{split:A}=e,{value:R=""}=T,{text:H,selectionLocation:M}=hue(u.value,{measureLocation:u.measureLocation,targetText:R,prefix:u.measurePrefix,selectionStart:l.value.getSelectionStart(),split:A});c(H),p(()=>{vue(l.value.input,M)}),n("select",T,u.measurePrefix)},P=T=>{u.activeIndex=T},w=T=>{const A=T||u.measureText||"",{filterOption:R}=e;return e.options.filter(M=>R?R(A,M):!0)},O=E(()=>w());return r({blur:()=>{l.value.blur()},focus:()=>{l.value.focus()}}),Xe(TD,{activeIndex:We(u,"activeIndex"),setActiveIndex:P,selectOption:x,onFocus:C,onBlur:$,loading:We(e,"loading")}),uo(()=>{ot(()=>{u.measuring&&(a.value.scrollTop=l.value.getScrollTop())})}),()=>{const{measureLocation:T,measurePrefix:A,measuring:R}=u,{prefixCls:H,placement:M,transitionName:D,getPopupContainer:N,direction:L}=e,F=TT(e,["prefixCls","placement","transitionName","getPopupContainer","direction"]),{class:B,style:j}=o,z=TT(o,["class","style"]),G=it(F,["value","prefix","split","validateSearch","filterOption","options","loading"]),Q=y(y(y({},G),z),{onChange:ET,onSelect:ET,value:u.value,onInput:d,onBlur:S,onKeydown:v,onKeyup:h,onFocus:b,onPressenter:m});return g("div",{class:ge(H,B),style:j},[g(Xc,k(k({},Q),{},{ref:l,tag:"textarea"}),null),R&&g("div",{ref:a,class:`${H}-measure`},[u.value.slice(0,T),g(xue,{prefixCls:H,transitionName:D,dropdownClassName:e.dropdownClassName,placement:M,options:R?O.value:[],visible:!0,direction:L,getPopupContainer:N},{default:()=>[g("span",null,[A])],notFoundContent:i.notFoundContent,option:i.option}),u.value.slice(T+A.length)])])}}}),Pue={value:String,disabled:Boolean,payload:De()},AD=y(y({},Pue),{label:It([])}),RD={name:"Option",props:AD,render(e,t){let{slots:n}=t;var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}};y({compatConfig:{MODE:3}},RD);const Oue=e=>{const{componentCls:t,colorTextDisabled:n,controlItemBgHover:o,controlPaddingHorizontal:r,colorText:i,motionDurationSlow:a,lineHeight:l,controlHeight:s,inputPaddingHorizontal:u,inputPaddingVertical:c,fontSize:d,colorBgElevated:f,borderRadiusLG:p,boxShadowSecondary:v}=e,h=Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2);return{[t]:y(y(y(y(y({},qe(e)),fs(e)),{position:"relative",display:"inline-block",height:"auto",padding:0,overflow:"hidden",lineHeight:l,whiteSpace:"pre-wrap",verticalAlign:"bottom"}),$f(e,t)),{"&-disabled":{"> textarea":y({},mx(e))},"&-focused":y({},Ba(e)),[`&-affix-wrapper ${t}-suffix`]:{position:"absolute",top:0,insetInlineEnd:u,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto"},[`> textarea, ${t}-measure`]:{color:i,boxSizing:"border-box",minHeight:s-2,margin:0,padding:`${c}px ${u}px`,overflow:"inherit",overflowX:"hidden",overflowY:"auto",fontWeight:"inherit",fontSize:"inherit",fontFamily:"inherit",fontStyle:"inherit",fontVariant:"inherit",fontSizeAdjust:"inherit",fontStretch:"inherit",lineHeight:"inherit",direction:"inherit",letterSpacing:"inherit",whiteSpace:"inherit",textAlign:"inherit",verticalAlign:"top",wordWrap:"break-word",wordBreak:"inherit",tabSize:"inherit"},"> textarea":y({width:"100%",border:"none",outline:"none",resize:"none",backgroundColor:"inherit"},vx(e.colorTextPlaceholder)),[`${t}-measure`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:-1,color:"transparent",pointerEvents:"none","> span":{display:"inline-block",minHeight:"1em"}},"&-dropdown":y(y({},qe(e)),{position:"absolute",top:-9999,insetInlineStart:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",fontSize:d,fontVariant:"initial",backgroundColor:f,borderRadius:p,outline:"none",boxShadow:v,"&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.dropdownHeight,marginBottom:0,paddingInlineStart:0,overflow:"auto",listStyle:"none",outline:"none","&-item":y(y({},cn),{position:"relative",display:"block",minWidth:e.controlItemWidth,padding:`${h}px ${r}px`,color:i,fontWeight:"normal",lineHeight:l,cursor:"pointer",transition:`background ${a} ease`,"&:hover":{backgroundColor:o},"&:first-child":{borderStartStartRadius:p,borderStartEndRadius:p,borderEndStartRadius:0,borderEndEndRadius:0},"&:last-child":{borderStartStartRadius:0,borderStartEndRadius:0,borderEndStartRadius:p,borderEndEndRadius:p},"&-disabled":{color:n,cursor:"not-allowed","&:hover":{color:n,backgroundColor:o,cursor:"not-allowed"}},"&-selected":{color:i,fontWeight:e.fontWeightStrong,backgroundColor:o},"&-active":{backgroundColor:o}})}})})}},Iue=Ue("Mentions",e=>{const t=ps(e);return[Oue(t)]},e=>({dropdownHeight:250,controlItemWidth:100,zIndexPopup:e.zIndexPopupBase+50}));var _T=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{prefix:n="@",split:o=" "}=t,r=Array.isArray(n)?n:[n];return e.split(o).map(function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",a=null;return r.some(l=>i.slice(0,l.length)===l?(a=l,!0):!1),a!==null?{prefix:a,value:i.slice(a.length)}:null}).filter(i=>!!i&&!!i.value)},_ue=()=>y(y({},ED),{loading:{type:Boolean,default:void 0},onFocus:{type:Function},onBlur:{type:Function},onSelect:{type:Function},onChange:{type:Function},onPressenter:{type:Function},"onUpdate:value":{type:Function},notFoundContent:K.any,defaultValue:String,id:String,status:String}),lb=le({compatConfig:{MODE:3},name:"AMentions",inheritAttrs:!1,props:_ue(),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r,expose:i}=t;var a,l;const{prefixCls:s,renderEmpty:u,direction:c}=Te("mentions",e),[d,f]=Iue(s),p=se(!1),v=se(null),h=se((l=(a=e.value)!==null&&a!==void 0?a:e.defaultValue)!==null&&l!==void 0?l:""),m=bn(),b=kn.useInject(),S=E(()=>Yr(b.status,e.status));VC({prefixCls:E(()=>`${s.value}-menu`),mode:E(()=>"vertical"),selectable:E(()=>!1),onClick:()=>{},validator:A=>{let{mode:R}=A}}),be(()=>e.value,A=>{h.value=A});const C=A=>{p.value=!0,o("focus",A)},$=A=>{p.value=!1,o("blur",A),m.onFieldBlur()},x=function(){for(var A=arguments.length,R=new Array(A),H=0;H{e.value===void 0&&(h.value=A),o("update:value",A),o("change",A),m.onFieldChange()},w=()=>{const A=e.notFoundContent;return A!==void 0?A:n.notFoundContent?n.notFoundContent():u("Select")},O=()=>{var A;return Ot(((A=n.default)===null||A===void 0?void 0:A.call(n))||[]).map(R=>{var H,M;return y(y({},jM(R)),{label:(M=(H=R.children)===null||H===void 0?void 0:H.default)===null||M===void 0?void 0:M.call(H)})})};i({focus:()=>{v.value.focus()},blur:()=>{v.value.blur()}});const T=E(()=>e.loading?Tue:e.filterOption);return()=>{const{disabled:A,getPopupContainer:R,rows:H=1,id:M=m.id.value}=e,D=_T(e,["disabled","getPopupContainer","rows","id"]),{hasFeedback:N,feedbackIcon:L}=b,{class:F}=r,B=_T(r,["class"]),j=it(D,["defaultValue","onUpdate:value","prefixCls"]),z=ge({[`${s.value}-disabled`]:A,[`${s.value}-focused`]:p.value,[`${s.value}-rtl`]:c.value==="rtl"},lo(s.value,S.value),!N&&F,f.value),G=y(y(y(y({prefixCls:s.value},j),{disabled:A,direction:c.value,filterOption:T.value,getPopupContainer:R,options:e.loading?[{value:"ANTDV_SEARCHING",disabled:!0,label:g(di,{size:"small"},null)}]:e.options||O(),class:z}),B),{rows:H,onChange:P,onSelect:x,onFocus:C,onBlur:$,ref:v,value:h.value,id:M}),Q=g(wue,k(k({},G),{},{dropdownClassName:f.value}),{notFoundContent:w,option:n.option});return d(N?g("div",{class:ge(`${s.value}-affix-wrapper`,lo(`${s.value}-affix-wrapper`,S.value,N),F,f.value)},[Q,g("span",{class:`${s.value}-suffix`},[L])]):Q)}}}),ug=le(y(y({compatConfig:{MODE:3}},RD),{name:"AMentionsOption",props:AD})),Mue=y(lb,{Option:ug,getMentions:Eue,install:e=>(e.component(lb.name,lb),e.component(ug.name,ug),e)});var Aue=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{y1={x:e.pageX,y:e.pageY},setTimeout(()=>y1=null,100)};aR()&&Ht(document.documentElement,"click",Rue,!0);const Due=()=>({prefixCls:String,visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},confirmLoading:{type:Boolean,default:void 0},title:K.any,closable:{type:Boolean,default:void 0},closeIcon:K.any,onOk:Function,onCancel:Function,"onUpdate:visible":Function,"onUpdate:open":Function,onChange:Function,afterClose:Function,centered:{type:Boolean,default:void 0},width:[String,Number],footer:K.any,okText:K.any,okType:String,cancelText:K.any,icon:K.any,maskClosable:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},okButtonProps:De(),cancelButtonProps:De(),destroyOnClose:{type:Boolean,default:void 0},wrapClassName:String,maskTransitionName:String,transitionName:String,getContainer:{type:[String,Function,Boolean,Object],default:void 0},zIndex:Number,bodyStyle:De(),maskStyle:De(),mask:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},wrapProps:Object,focusTriggerAfterClose:{type:Boolean,default:void 0},modalRender:Function,mousePosition:De()}),Tn=le({compatConfig:{MODE:3},name:"AModal",inheritAttrs:!1,props:Qe(Due(),{width:520,confirmLoading:!1,okType:"primary"}),setup(e,t){let{emit:n,slots:o,attrs:r}=t;const[i]=wr("Modal"),{prefixCls:a,rootPrefixCls:l,direction:s,getPopupContainer:u}=Te("modal",e),[c,d]=Wse(a);Yo(e.visible===void 0);const f=h=>{n("update:visible",!1),n("update:open",!1),n("cancel",h),n("change",!1)},p=h=>{n("ok",h)},v=()=>{var h,m;const{okText:b=(h=o.okText)===null||h===void 0?void 0:h.call(o),okType:S,cancelText:C=(m=o.cancelText)===null||m===void 0?void 0:m.call(o),confirmLoading:$}=e;return g(Le,null,[g(Qt,k({onClick:f},e.cancelButtonProps),{default:()=>[C||i.value.cancelText]}),g(Qt,k(k({},oh(S)),{},{loading:$,onClick:p},e.okButtonProps),{default:()=>[b||i.value.okText]})])};return()=>{var h,m;const{prefixCls:b,visible:S,open:C,wrapClassName:$,centered:x,getContainer:P,closeIcon:w=(h=o.closeIcon)===null||h===void 0?void 0:h.call(o),focusTriggerAfterClose:O=!0}=e,I=Aue(e,["prefixCls","visible","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose"]),_=ge($,{[`${a.value}-centered`]:!!x,[`${a.value}-wrap-rtl`]:s.value==="rtl"});return c(g(pD,k(k(k({},I),r),{},{rootClassName:d.value,class:ge(d.value,r.class),getContainer:P||(u==null?void 0:u.value),prefixCls:a.value,wrapClassName:_,visible:C??S,onClose:f,focusTriggerAfterClose:O,transitionName:co(l.value,"zoom",e.transitionName),maskTransitionName:co(l.value,"fade",e.maskTransitionName),mousePosition:(m=I.mousePosition)!==null&&m!==void 0?m:y1}),y(y({},o),{footer:o.footer||v,closeIcon:()=>g("span",{class:`${a.value}-close-x`},[w||g(fo,{class:`${a.value}-close-icon`},null)])})))}}}),DD=()=>{const e=se(!1);return tt(()=>{e.value=!0}),e},Nue={type:{type:String},actionFn:Function,close:Function,autofocus:Boolean,prefixCls:String,buttonProps:De(),emitEvent:Boolean,quitOnNullishReturnValue:Boolean};function MT(e){return!!(e&&e.then)}const S1=le({compatConfig:{MODE:3},name:"ActionButton",props:Nue,setup(e,t){let{slots:n}=t;const o=se(!1),r=se(),i=se(!1);let a;const l=DD();Ke(()=>{e.autofocus&&(a=setTimeout(()=>{var d,f;return(f=(d=Co(r.value))===null||d===void 0?void 0:d.focus)===null||f===void 0?void 0:f.call(d)}))}),tt(()=>{clearTimeout(a)});const s=function(){for(var d,f=arguments.length,p=new Array(f),v=0;v{MT(d)&&(i.value=!0,d.then(function(){l.value||(i.value=!1),s(...arguments),o.value=!1},f=>(l.value||(i.value=!1),o.value=!1,Promise.reject(f))))},c=d=>{const{actionFn:f}=e;if(o.value)return;if(o.value=!0,!f){s();return}let p;if(e.emitEvent){if(p=f(d),e.quitOnNullishReturnValue&&!MT(p)){o.value=!1,s(d);return}}else if(f.length)p=f(e.close),o.value=!1;else if(p=f(),!p){s();return}u(p)};return()=>{const{type:d,prefixCls:f,buttonProps:p}=e;return g(Qt,k(k(k({},oh(d)),{},{onClick:c,loading:i.value,prefixCls:f},p),{},{ref:r}),n)}}});function Is(e){return typeof e=="function"?e():e}const ND=le({name:"ConfirmDialog",inheritAttrs:!1,props:["icon","onCancel","onOk","close","closable","zIndex","afterClose","visible","open","keyboard","centered","getContainer","maskStyle","okButtonProps","cancelButtonProps","okType","prefixCls","okCancel","width","mask","maskClosable","okText","cancelText","autoFocusButton","transitionName","maskTransitionName","type","title","content","direction","rootPrefixCls","bodyStyle","closeIcon","modalRender","focusTriggerAfterClose","wrapClassName","confirmPrefixCls","footer"],setup(e,t){let{attrs:n}=t;const[o]=wr("Modal");return()=>{const{icon:r,onCancel:i,onOk:a,close:l,okText:s,closable:u=!1,zIndex:c,afterClose:d,keyboard:f,centered:p,getContainer:v,maskStyle:h,okButtonProps:m,cancelButtonProps:b,okCancel:S,width:C=416,mask:$=!0,maskClosable:x=!1,type:P,open:w,title:O,content:I,direction:_,closeIcon:T,modalRender:A,focusTriggerAfterClose:R,rootPrefixCls:H,bodyStyle:M,wrapClassName:D,footer:N}=e;let L=r;if(!r&&r!==null)switch(P){case"info":L=g(Ya,null,null);break;case"success":L=g(qr,null,null);break;case"error":L=g(po,null,null);break;default:L=g(Jr,null,null)}const F=e.okType||"primary",B=e.prefixCls||"ant-modal",j=`${B}-confirm`,z=n.style||{},G=S??P==="confirm",Q=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",Y=`${B}-confirm`,oe=ge(Y,`${Y}-${e.type}`,{[`${Y}-rtl`]:_==="rtl"},n.class),Z=o.value,re=G&&g(S1,{actionFn:i,close:l,autofocus:Q==="cancel",buttonProps:b,prefixCls:`${H}-btn`},{default:()=>[Is(e.cancelText)||Z.cancelText]});return g(Tn,{prefixCls:B,class:oe,wrapClassName:ge({[`${Y}-centered`]:!!p},D),onCancel:ne=>l==null?void 0:l({triggerCancel:!0},ne),open:w,title:"",footer:"",transitionName:co(H,"zoom",e.transitionName),maskTransitionName:co(H,"fade",e.maskTransitionName),mask:$,maskClosable:x,maskStyle:h,style:z,bodyStyle:M,width:C,zIndex:c,afterClose:d,keyboard:f,centered:p,getContainer:v,closable:u,closeIcon:T,modalRender:A,focusTriggerAfterClose:R},{default:()=>[g("div",{class:`${j}-body-wrapper`},[g("div",{class:`${j}-body`},[Is(L),O===void 0?null:g("span",{class:`${j}-title`},[Is(O)]),g("div",{class:`${j}-content`},[Is(I)])]),N!==void 0?Is(N):g("div",{class:`${j}-btns`},[re,g(S1,{type:F,actionFn:a,close:l,autofocus:Q==="ok",buttonProps:m,prefixCls:`${H}-btn`},{default:()=>[Is(s)||(G?Z.okText:Z.justOkText)]})])])]})}}}),Il=[],_f=e=>{const t=document.createDocumentFragment();let n=y(y({},it(e,["parentContext","appContext"])),{close:i,open:!0}),o=null;function r(){o&&(Fa(null,t),o=null);for(var u=arguments.length,c=new Array(u),d=0;dp&&p.triggerCancel);e.onCancel&&f&&e.onCancel(()=>{},...c.slice(1));for(let p=0;p{typeof e.afterClose=="function"&&e.afterClose(),r.apply(this,c)}}),n.visible&&delete n.visible,a(n)}function a(u){typeof u=="function"?n=u(n):n=y(y({},n),u),o&&kj(o,n,t)}const l=u=>{const c=Un,d=c.prefixCls,f=u.prefixCls||`${d}-modal`,p=c.iconPrefixCls,v=Kie();return g(Nl,k(k({},c),{},{prefixCls:d}),{default:()=>[g(ND,k(k({},u),{},{rootPrefixCls:d,prefixCls:f,iconPrefixCls:p,locale:v,cancelText:u.cancelText||v.cancelText}),null)]})};function s(u){const c=g(l,y({},u));return c.appContext=e.parentContext||e.appContext||c.appContext,Fa(c,t),c}return o=s(n),Il.push(i),{destroy:i,update:a}};function kD(e){return y(y({},e),{type:"warning"})}function LD(e){return y(y({},e),{type:"info"})}function FD(e){return y(y({},e),{type:"success"})}function BD(e){return y(y({},e),{type:"error"})}function HD(e){return y(y({},e),{type:"confirm"})}const kue=()=>({config:Object,afterClose:Function,destroyAction:Function,open:Boolean}),Lue=le({name:"HookModal",inheritAttrs:!1,props:Qe(kue(),{config:{width:520,okType:"primary"}}),setup(e,t){let{expose:n}=t;var o;const r=E(()=>e.open),i=E(()=>e.config),{direction:a,getPrefixCls:l}=hv(),s=l("modal"),u=l(),c=()=>{var v,h;e==null||e.afterClose(),(h=(v=i.value).afterClose)===null||h===void 0||h.call(v)},d=function(){e.destroyAction(...arguments)};n({destroy:d});const f=(o=i.value.okCancel)!==null&&o!==void 0?o:i.value.type==="confirm",[p]=wr("Modal",$o.Modal);return()=>g(ND,k(k({prefixCls:s,rootPrefixCls:u},i.value),{},{close:d,open:r.value,afterClose:c,okText:i.value.okText||(f?p==null?void 0:p.value.okText:p==null?void 0:p.value.justOkText),direction:i.value.direction||a.value,cancelText:i.value.cancelText||(p==null?void 0:p.value.cancelText)}),null)}});let AT=0;const Fue=le({name:"ElementsHolder",inheritAttrs:!1,setup(e,t){let{expose:n}=t;const o=se([]);return n({addModal:i=>(o.value.push(i),o.value=o.value.slice(),()=>{o.value=o.value.filter(a=>a!==i)})}),()=>o.value.map(i=>i())}});function zD(){const e=se(null),t=se([]);be(t,()=>{t.value.length&&([...t.value].forEach(a=>{a()}),t.value=[])},{immediate:!0});const n=i=>function(l){var s;AT+=1;const u=se(!0),c=se(null),d=se(Bt(l)),f=se({});be(()=>l,C=>{m(y(y({},Ut(C)?C.value:C),f.value))});const p=function(){u.value=!1;for(var C=arguments.length,$=new Array(C),x=0;xw&&w.triggerCancel);d.value.onCancel&&P&&d.value.onCancel(()=>{},...$.slice(1))};let v;const h=()=>g(Lue,{key:`modal-${AT}`,config:i(d.value),ref:c,open:u.value,destroyAction:p,afterClose:()=>{v==null||v()}},null);v=(s=e.value)===null||s===void 0?void 0:s.addModal(h),v&&Il.push(v);const m=C=>{d.value=y(y({},d.value),C)};return{destroy:()=>{c.value?p():t.value=[...t.value,p]},update:C=>{f.value=C,c.value?m(C):t.value=[...t.value,()=>m(C)]}}},o=E(()=>({info:n(LD),success:n(FD),error:n(BD),warning:n(kD),confirm:n(HD)})),r=Symbol("modalHolderKey");return[o.value,()=>g(Fue,{key:r,ref:e},null)]}function jD(e){return _f(kD(e))}Tn.useModal=zD;Tn.info=function(t){return _f(LD(t))};Tn.success=function(t){return _f(FD(t))};Tn.error=function(t){return _f(BD(t))};Tn.warning=jD;Tn.warn=jD;Tn.confirm=function(t){return _f(HD(t))};Tn.destroyAll=function(){for(;Il.length;){const t=Il.pop();t&&t()}};Tn.install=function(e){return e.component(Tn.name,Tn),e};const WD=e=>{const{value:t,formatter:n,precision:o,decimalSeparator:r,groupSeparator:i="",prefixCls:a}=e;let l;if(typeof n=="function")l=n({value:t});else{const s=String(t),u=s.match(/^(-?)(\d*)(\.(\d+))?$/);if(!u)l=s;else{const c=u[1];let d=u[2]||"0",f=u[4]||"";d=d.replace(/\B(?=(\d{3})+(?!\d))/g,i),typeof o=="number"&&(f=f.padEnd(o,"0").slice(0,o>0?o:0)),f&&(f=`${r}${f}`),l=[g("span",{key:"int",class:`${a}-content-value-int`},[c,d]),f&&g("span",{key:"decimal",class:`${a}-content-value-decimal`},[f])]}}return g("span",{class:`${a}-content-value`},[l])};WD.displayName="StatisticNumber";const Bue=e=>{const{componentCls:t,marginXXS:n,padding:o,colorTextDescription:r,statisticTitleFontSize:i,colorTextHeading:a,statisticContentFontSize:l,statisticFontFamily:s}=e;return{[`${t}`]:y(y({},qe(e)),{[`${t}-title`]:{marginBottom:n,color:r,fontSize:i},[`${t}-skeleton`]:{paddingTop:o},[`${t}-content`]:{color:a,fontSize:l,fontFamily:s,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:n},[`${t}-content-suffix`]:{marginInlineStart:n}}})}},Hue=Ue("Statistic",e=>{const{fontSizeHeading3:t,fontSize:n,fontFamily:o}=e,r=Be(e,{statisticTitleFontSize:n,statisticContentFontSize:t,statisticFontFamily:o});return[Bue(r)]}),VD=()=>({prefixCls:String,decimalSeparator:String,groupSeparator:String,format:String,value:He([Number,String,Object]),valueStyle:{type:Object,default:void 0},valueRender:ye(),formatter:It(),precision:Number,prefix:ro(),suffix:ro(),title:ro(),loading:$e()}),Li=le({compatConfig:{MODE:3},name:"AStatistic",inheritAttrs:!1,props:Qe(VD(),{decimalSeparator:".",groupSeparator:",",loading:!1}),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("statistic",e),[a,l]=Hue(r);return()=>{var s,u,c,d,f,p,v;const{value:h=0,valueStyle:m,valueRender:b}=e,S=r.value,C=(s=e.title)!==null&&s!==void 0?s:(u=n.title)===null||u===void 0?void 0:u.call(n),$=(c=e.prefix)!==null&&c!==void 0?c:(d=n.prefix)===null||d===void 0?void 0:d.call(n),x=(f=e.suffix)!==null&&f!==void 0?f:(p=n.suffix)===null||p===void 0?void 0:p.call(n),P=(v=e.formatter)!==null&&v!==void 0?v:n.formatter;let w=g(WD,k({"data-for-update":Date.now()},y(y({},e),{prefixCls:S,value:h,formatter:P})),null);return b&&(w=b(w)),a(g("div",k(k({},o),{},{class:[S,{[`${S}-rtl`]:i.value==="rtl"},o.class,l.value]}),[C&&g("div",{class:`${S}-title`},[C]),g(no,{paragraph:!1,loading:e.loading},{default:()=>[g("div",{style:m,class:`${S}-content`},[$&&g("span",{class:`${S}-content-prefix`},[$]),w,x&&g("span",{class:`${S}-content-suffix`},[x])])]})]))}}}),zue=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function jue(e,t){let n=e;const o=/\[[^\]]*]/g,r=(t.match(o)||[]).map(s=>s.slice(1,-1)),i=t.replace(o,"[]"),a=zue.reduce((s,u)=>{let[c,d]=u;if(s.includes(c)){const f=Math.floor(n/d);return n-=f*d,s.replace(new RegExp(`${c}+`,"g"),p=>{const v=p.length;return f.toString().padStart(v,"0")})}return s},i);let l=0;return a.replace(o,()=>{const s=r[l];return l+=1,s})}function Wue(e,t){const{format:n=""}=t,o=new Date(e).getTime(),r=Date.now(),i=Math.max(o-r,0);return jue(i,n)}const Vue=1e3/30;function sb(e){return new Date(e).getTime()}const Kue=()=>y(y({},VD()),{value:He([Number,String,Object]),format:String,onFinish:Function,onChange:Function}),Uue=le({compatConfig:{MODE:3},name:"AStatisticCountdown",props:Qe(Kue(),{format:"HH:mm:ss"}),setup(e,t){let{emit:n,slots:o}=t;const r=ae(),i=ae(),a=()=>{const{value:d}=e;sb(d)>=Date.now()?l():s()},l=()=>{if(r.value)return;const d=sb(e.value);r.value=setInterval(()=>{i.value.$forceUpdate(),d>Date.now()&&n("change",d-Date.now()),a()},Vue)},s=()=>{const{value:d}=e;r.value&&(clearInterval(r.value),r.value=void 0,sb(d){let{value:f,config:p}=d;const{format:v}=e;return Wue(f,y(y({},p),{format:v}))},c=d=>d;return Ke(()=>{a()}),uo(()=>{a()}),tt(()=>{s()}),()=>{const d=e.value;return g(Li,k({ref:i},y(y({},it(e,["onFinish","onChange"])),{value:d,valueRender:c,formatter:u})),o)}}});Li.Countdown=Uue;Li.install=function(e){return e.component(Li.name,Li),e.component(Li.Countdown.name,Li.Countdown),e};const Gue=Li.Countdown;var Xue={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};function RT(e){for(var t=1;t{const{keyCode:p}=f;p===Ie.ENTER&&f.preventDefault()},s=f=>{const{keyCode:p}=f;p===Ie.ENTER&&o("click",f)},u=f=>{o("click",f)},c=()=>{a.value&&a.value.focus()},d=()=>{a.value&&a.value.blur()};return Ke(()=>{e.autofocus&&c()}),i({focus:c,blur:d}),()=>{var f;const{noStyle:p,disabled:v}=e,h=Zue(e,["noStyle","disabled"]);let m={};return p||(m=y({},Que)),v&&(m.pointerEvents="none"),g("div",k(k(k({role:"button",tabindex:0,ref:a},h),r),{},{onClick:u,onKeydown:l,onKeyup:s,style:y(y({},m),r.style||{})}),[(f=n.default)===null||f===void 0?void 0:f.call(n)])}}}),ede={small:8,middle:16,large:24},tde=()=>({prefixCls:String,size:{type:[String,Number,Array]},direction:K.oneOf(Jn("horizontal","vertical")).def("horizontal"),align:K.oneOf(Jn("start","end","center","baseline")),wrap:$e()});function nde(e){return typeof e=="string"?ede[e]:e||0}const uc=le({compatConfig:{MODE:3},name:"ASpace",inheritAttrs:!1,props:tde(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,space:i,direction:a}=Te("space",e),[l,s]=zA(r),u=sR(),c=E(()=>{var b,S,C;return(C=(b=e.size)!==null&&b!==void 0?b:(S=i==null?void 0:i.value)===null||S===void 0?void 0:S.size)!==null&&C!==void 0?C:"small"}),d=ae(),f=ae();be(c,()=>{[d.value,f.value]=(Array.isArray(c.value)?c.value:[c.value,c.value]).map(b=>nde(b))},{immediate:!0});const p=E(()=>e.align===void 0&&e.direction==="horizontal"?"center":e.align),v=E(()=>ge(r.value,s.value,`${r.value}-${e.direction}`,{[`${r.value}-rtl`]:a.value==="rtl",[`${r.value}-align-${p.value}`]:p.value})),h=E(()=>a.value==="rtl"?"marginLeft":"marginRight"),m=E(()=>{const b={};return u.value&&(b.columnGap=`${d.value}px`,b.rowGap=`${f.value}px`),y(y({},b),e.wrap&&{flexWrap:"wrap",marginBottom:`${-f.value}px`})});return()=>{var b,S;const{wrap:C,direction:$="horizontal"}=e,x=(b=n.default)===null||b===void 0?void 0:b.call(n),P=zt(x),w=P.length;if(w===0)return null;const O=(S=n.split)===null||S===void 0?void 0:S.call(n),I=`${r.value}-item`,_=d.value,T=w-1;return g("div",k(k({},o),{},{class:[v.value,o.class],style:[m.value,o.style]}),[P.map((A,R)=>{let H=x.indexOf(A);H===-1&&(H=`$$space-${R}`);let M={};return u.value||($==="vertical"?R{const{componentCls:t,antCls:n}=e;return{[t]:y(y({},qe(e)),{position:"relative",padding:`${e.pageHeaderPaddingVertical}px ${e.pageHeaderPadding}px`,backgroundColor:e.colorBgContainer,[`&${t}-ghost`]:{backgroundColor:e.pageHeaderGhostBg},"&.has-footer":{paddingBottom:0},[`${t}-back`]:{marginRight:e.marginMD,fontSize:e.fontSizeLG,lineHeight:1,"&-button":y(y({},Cv(e)),{color:e.pageHeaderBackColor,cursor:"pointer"})},[`${n}-divider-vertical`]:{height:"14px",margin:`0 ${e.marginSM}`,verticalAlign:"middle"},[`${n}-breadcrumb + &-heading`]:{marginTop:e.marginXS},[`${t}-heading`]:{display:"flex",justifyContent:"space-between","&-left":{display:"flex",alignItems:"center",margin:`${e.marginXS/2}px 0`,overflow:"hidden"},"&-title":y({marginRight:e.marginSM,marginBottom:0,color:e.colorTextHeading,fontWeight:600,fontSize:e.pageHeaderHeadingTitle,lineHeight:`${e.controlHeight}px`},cn),[`${n}-avatar`]:{marginRight:e.marginSM},"&-sub-title":y({marginRight:e.marginSM,color:e.colorTextDescription,fontSize:e.pageHeaderHeadingSubTitle,lineHeight:e.lineHeight},cn),"&-extra":{margin:`${e.marginXS/2}px 0`,whiteSpace:"nowrap","> *":{marginLeft:e.marginSM,whiteSpace:"unset"},"> *:first-child":{marginLeft:0}}},[`${t}-content`]:{paddingTop:e.pageHeaderContentPaddingVertical},[`${t}-footer`]:{marginTop:e.marginMD,[`${n}-tabs`]:{[`> ${n}-tabs-nav`]:{margin:0,"&::before":{border:"none"}},[`${n}-tabs-tab`]:{paddingTop:e.paddingXS,paddingBottom:e.paddingXS,fontSize:e.pageHeaderTabFontSize}}},[`${t}-compact ${t}-heading`]:{flexWrap:"wrap"},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}},rde=Ue("PageHeader",e=>{const t=Be(e,{pageHeaderPadding:e.paddingLG,pageHeaderPaddingVertical:e.paddingMD,pageHeaderPaddingBreadcrumb:e.paddingSM,pageHeaderContentPaddingVertical:e.paddingSM,pageHeaderBackColor:e.colorTextBase,pageHeaderGhostBg:"transparent",pageHeaderHeadingTitle:e.fontSizeHeading4,pageHeaderHeadingSubTitle:e.fontSize,pageHeaderTabFontSize:e.fontSizeLG});return[ode(t)]}),ide=()=>({backIcon:ro(),prefixCls:String,title:ro(),subTitle:ro(),breadcrumb:K.object,tags:ro(),footer:ro(),extra:ro(),avatar:De(),ghost:{type:Boolean,default:void 0},onBack:Function}),ade=le({compatConfig:{MODE:3},name:"APageHeader",inheritAttrs:!1,props:ide(),slots:Object,setup(e,t){let{emit:n,slots:o,attrs:r}=t;const{prefixCls:i,direction:a,pageHeader:l}=Te("page-header",e),[s,u]=rde(i),c=se(!1),d=DD(),f=$=>{let{width:x}=$;d.value||(c.value=x<768)},p=E(()=>{var $,x,P;return(P=($=e.ghost)!==null&&$!==void 0?$:(x=l==null?void 0:l.value)===null||x===void 0?void 0:x.ghost)!==null&&P!==void 0?P:!0}),v=()=>{var $,x,P;return(P=($=e.backIcon)!==null&&$!==void 0?$:(x=o.backIcon)===null||x===void 0?void 0:x.call(o))!==null&&P!==void 0?P:a.value==="rtl"?g(i$,null,null):g(r$,null,null)},h=$=>!$||!e.onBack?null:g(ts,{componentName:"PageHeader",children:x=>{let{back:P}=x;return g("div",{class:`${i.value}-back`},[g(Th,{onClick:w=>{n("back",w)},class:`${i.value}-back-button`,"aria-label":P},{default:()=>[$]})])}},null),m=()=>{var $;return e.breadcrumb?g(Rl,e.breadcrumb,null):($=o.breadcrumb)===null||$===void 0?void 0:$.call(o)},b=()=>{var $,x,P,w,O,I,_,T,A;const{avatar:R}=e,H=($=e.title)!==null&&$!==void 0?$:(x=o.title)===null||x===void 0?void 0:x.call(o),M=(P=e.subTitle)!==null&&P!==void 0?P:(w=o.subTitle)===null||w===void 0?void 0:w.call(o),D=(O=e.tags)!==null&&O!==void 0?O:(I=o.tags)===null||I===void 0?void 0:I.call(o),N=(_=e.extra)!==null&&_!==void 0?_:(T=o.extra)===null||T===void 0?void 0:T.call(o),L=`${i.value}-heading`,F=H||M||D||N;if(!F)return null;const B=v(),j=h(B);return g("div",{class:L},[(j||R||F)&&g("div",{class:`${L}-left`},[j,R?g(Al,R,null):(A=o.avatar)===null||A===void 0?void 0:A.call(o),H&&g("span",{class:`${L}-title`,title:typeof H=="string"?H:void 0},[H]),M&&g("span",{class:`${L}-sub-title`,title:typeof M=="string"?M:void 0},[M]),D&&g("span",{class:`${L}-tags`},[D])]),N&&g("span",{class:`${L}-extra`},[g(uc,null,{default:()=>[N]})])])},S=()=>{var $,x;const P=($=e.footer)!==null&&$!==void 0?$:zt((x=o.footer)===null||x===void 0?void 0:x.call(o));return wB(P)?null:g("div",{class:`${i.value}-footer`},[P])},C=$=>g("div",{class:`${i.value}-content`},[$]);return()=>{var $,x;const P=(($=e.breadcrumb)===null||$===void 0?void 0:$.routes)||o.breadcrumb,w=e.footer||o.footer,O=Ot((x=o.default)===null||x===void 0?void 0:x.call(o)),I=ge(i.value,{"has-breadcrumb":P,"has-footer":w,[`${i.value}-ghost`]:p.value,[`${i.value}-rtl`]:a.value==="rtl",[`${i.value}-compact`]:c.value},r.class,u.value);return s(g(br,{onResize:f},{default:()=>[g("div",k(k({},r),{},{class:I}),[m(),b(),O.length?C(O):null,S()])]}))}}}),lde=Lt(ade),sde=e=>{const{componentCls:t,iconCls:n,zIndexPopup:o,colorText:r,colorWarning:i,marginXS:a,fontSize:l,fontWeightStrong:s,lineHeight:u}=e;return{[t]:{zIndex:o,[`${t}-inner-content`]:{color:r},[`${t}-message`]:{position:"relative",marginBottom:a,color:r,fontSize:l,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${n}`]:{color:i,fontSize:l,flex:"none",lineHeight:1,paddingTop:(Math.round(l*u)-l)/2},"&-title":{flex:"auto",marginInlineStart:a},"&-title-only":{fontWeight:s}},[`${t}-description`]:{position:"relative",marginInlineStart:l+a,marginBottom:a,color:r,fontSize:l},[`${t}-buttons`]:{textAlign:"end",button:{marginInlineStart:a}}}}},cde=Ue("Popconfirm",e=>sde(e),e=>{const{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}});var ude=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);ry(y({},kC()),{prefixCls:String,content:It(),title:It(),description:It(),okType:Ne("primary"),disabled:{type:Boolean,default:!1},okText:It(),cancelText:It(),icon:It(),okButtonProps:De(),cancelButtonProps:De(),showCancel:{type:Boolean,default:!0},onConfirm:Function,onCancel:Function}),fde=le({compatConfig:{MODE:3},name:"APopconfirm",inheritAttrs:!1,props:Qe(dde(),y(y({},S8()),{trigger:"click",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0,okType:"primary",disabled:!1})),slots:Object,setup(e,t){let{slots:n,emit:o,expose:r,attrs:i}=t;const a=ae();Yo(e.visible===void 0),r({getPopupDomNode:()=>{var P,w;return(w=(P=a.value)===null||P===void 0?void 0:P.getPopupDomNode)===null||w===void 0?void 0:w.call(P)}});const[l,s]=Dt(!1,{value:We(e,"open")}),u=(P,w)=>{e.open===void 0&&s(P),o("update:open",P),o("openChange",P,w)},c=P=>{u(!1,P)},d=P=>{var w;return(w=e.onConfirm)===null||w===void 0?void 0:w.call(e,P)},f=P=>{var w;u(!1,P),(w=e.onCancel)===null||w===void 0||w.call(e,P)},p=P=>{P.keyCode===Ie.ESC&&l&&u(!1,P)},v=P=>{const{disabled:w}=e;w||u(P)},{prefixCls:h,getPrefixCls:m}=Te("popconfirm",e),b=E(()=>m()),S=E(()=>m("btn")),[C]=cde(h),[$]=wr("Popconfirm",$o.Popconfirm),x=()=>{var P,w,O,I,_;const{okButtonProps:T,cancelButtonProps:A,title:R=(P=n.title)===null||P===void 0?void 0:P.call(n),description:H=(w=n.description)===null||w===void 0?void 0:w.call(n),cancelText:M=(O=n.cancel)===null||O===void 0?void 0:O.call(n),okText:D=(I=n.okText)===null||I===void 0?void 0:I.call(n),okType:N,icon:L=((_=n.icon)===null||_===void 0?void 0:_.call(n))||g(Jr,null,null),showCancel:F=!0}=e,{cancelButton:B,okButton:j}=n,z=y({onClick:f,size:"small"},A),G=y(y(y({onClick:d},oh(N)),{size:"small"}),T);return g("div",{class:`${h.value}-inner-content`},[g("div",{class:`${h.value}-message`},[L&&g("span",{class:`${h.value}-message-icon`},[L]),g("div",{class:[`${h.value}-message-title`,{[`${h.value}-message-title-only`]:!!H}]},[R])]),H&&g("div",{class:`${h.value}-description`},[H]),g("div",{class:`${h.value}-buttons`},[F?B?B(z):g(Qt,z,{default:()=>[M||$.value.cancelText]}):null,j?j(G):g(S1,{buttonProps:y(y({size:"small"},oh(N)),T),actionFn:d,close:c,prefixCls:S.value,quitOnNullishReturnValue:!0,emitEvent:!0},{default:()=>[D||$.value.okText]})])])};return()=>{var P;const{placement:w,overlayClassName:O,trigger:I="click"}=e,_=ude(e,["placement","overlayClassName","trigger"]),T=it(_,["title","content","cancelText","okText","onUpdate:open","onConfirm","onCancel","prefixCls"]),A=ge(h.value,O);return C(g(HC,k(k(k({},T),i),{},{trigger:I,placement:w,onOpenChange:v,open:l.value,overlayClassName:A,transitionName:co(b.value,"zoom-big",e.transitionName),ref:a,"data-popover-inject":!0}),{default:()=>[Nj(((P=n.default)===null||P===void 0?void 0:P.call(n))||[],{onKeydown:R=>{p(R)}},!1)],content:x}))}}}),pde=Lt(fde),gde=["normal","exception","active","success"],Cm=()=>({prefixCls:String,type:Ne(),percent:Number,format:ye(),status:Ne(),showInfo:$e(),strokeWidth:Number,strokeLinecap:Ne(),strokeColor:It(),trailColor:String,width:Number,success:De(),gapDegree:Number,gapPosition:Ne(),size:He([String,Number,Array]),steps:Number,successPercent:Number,title:String,progressStatus:Ne()});function kl(e){return!e||e<0?0:e>100?100:e}function Eh(e){let{success:t,successPercent:n}=e,o=n;return t&&"progress"in t&&(Mt(!1,"Progress","`success.progress` is deprecated. Please use `success.percent` instead."),o=t.progress),t&&"percent"in t&&(o=t.percent),o}function hde(e){let{percent:t,success:n,successPercent:o}=e;const r=kl(Eh({success:n,successPercent:o}));return[r,kl(kl(t)-r)]}function vde(e){let{success:t={},strokeColor:n}=e;const{strokeColor:o}=t;return[o||ec.green,n||null]}const xm=(e,t,n)=>{var o,r,i,a;let l=-1,s=-1;if(t==="step"){const u=n.steps,c=n.strokeWidth;typeof e=="string"||typeof e>"u"?(l=e==="small"?2:14,s=c??8):typeof e=="number"?[l,s]=[e,e]:[l=14,s=8]=e,l*=u}else if(t==="line"){const u=n==null?void 0:n.strokeWidth;typeof e=="string"||typeof e>"u"?s=u||(e==="small"?6:8):typeof e=="number"?[l,s]=[e,e]:[l=-1,s=8]=e}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[l,s]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[l,s]=[e,e]:(l=(r=(o=e[0])!==null&&o!==void 0?o:e[1])!==null&&r!==void 0?r:120,s=(a=(i=e[0])!==null&&i!==void 0?i:e[1])!==null&&a!==void 0?a:120));return{width:l,height:s}};var mde=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);ry(y({},Cm()),{strokeColor:It(),direction:Ne()}),yde=e=>{let t=[];return Object.keys(e).forEach(n=>{const o=parseFloat(n.replace(/%/g,""));isNaN(o)||t.push({key:o,value:e[n]})}),t=t.sort((n,o)=>n.key-o.key),t.map(n=>{let{key:o,value:r}=n;return`${r} ${o}%`}).join(", ")},Sde=(e,t)=>{const{from:n=ec.blue,to:o=ec.blue,direction:r=t==="rtl"?"to left":"to right"}=e,i=mde(e,["from","to","direction"]);if(Object.keys(i).length!==0){const a=yde(i);return{backgroundImage:`linear-gradient(${r}, ${a})`}}return{backgroundImage:`linear-gradient(${r}, ${n}, ${o})`}},Cde=le({compatConfig:{MODE:3},name:"ProgressLine",inheritAttrs:!1,props:bde(),setup(e,t){let{slots:n,attrs:o}=t;const r=E(()=>{const{strokeColor:p,direction:v}=e;return p&&typeof p!="string"?Sde(p,v):{backgroundColor:p}}),i=E(()=>e.strokeLinecap==="square"||e.strokeLinecap==="butt"?0:void 0),a=E(()=>e.trailColor?{backgroundColor:e.trailColor}:void 0),l=E(()=>{var p;return(p=e.size)!==null&&p!==void 0?p:[-1,e.strokeWidth||(e.size==="small"?6:8)]}),s=E(()=>xm(l.value,"line",{strokeWidth:e.strokeWidth})),u=E(()=>{const{percent:p}=e;return y({width:`${kl(p)}%`,height:`${s.value.height}px`,borderRadius:i.value},r.value)}),c=E(()=>Eh(e)),d=E(()=>{const{success:p}=e;return{width:`${kl(c.value)}%`,height:`${s.value.height}px`,borderRadius:i.value,backgroundColor:p==null?void 0:p.strokeColor}}),f={width:s.value.width<0?"100%":s.value.width,height:`${s.value.height}px`};return()=>{var p;return g(Le,null,[g("div",k(k({},o),{},{class:[`${e.prefixCls}-outer`,o.class],style:[o.style,f]}),[g("div",{class:`${e.prefixCls}-inner`,style:a.value},[g("div",{class:`${e.prefixCls}-bg`,style:u.value},null),c.value!==void 0?g("div",{class:`${e.prefixCls}-success-bg`,style:d.value},null):null])]),(p=n.default)===null||p===void 0?void 0:p.call(n)])}}}),xde={percent:0,prefixCls:"vc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1},$de=e=>{const t=ae(null);return uo(()=>{const n=Date.now();let o=!1;e.value.forEach(r=>{const i=(r==null?void 0:r.$el)||r;if(!i)return;o=!0;const a=i.style;a.transitionDuration=".3s, .3s, .3s, .06s",t.value&&n-t.value<100&&(a.transitionDuration="0s, 0s")}),o&&(t.value=Date.now())}),e},wde={gapDegree:Number,gapPosition:{type:String},percent:{type:[Array,Number]},prefixCls:String,strokeColor:{type:[Object,String,Array]},strokeLinecap:{type:String},strokeWidth:Number,trailColor:String,trailWidth:Number,transition:String};var Pde=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r4&&arguments[4]!==void 0?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0;const a=50-o/2;let l=0,s=-a,u=0,c=-2*a;switch(i){case"left":l=-a,s=0,u=2*a,c=0;break;case"right":l=a,s=0,u=-2*a,c=0;break;case"bottom":s=a,c=2*a;break}const d=`M 50,50 m ${l},${s} a ${a},${a} 0 1 1 ${u},${-c} - a ${a},${a} 0 1 1 ${-u},${c}`,f=Math.PI*2*a,p={stroke:n,strokeDasharray:`${t/100*(f-r)}px ${f}px`,strokeDashoffset:`-${r/2+e/100*(f-r)}px`,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s"};return{pathString:d,pathStyle:p}}const Ode=le({compatConfig:{MODE:3},name:"VCCircle",props:Qe(wde,xde),setup(e){N4+=1;const t=ae(N4),n=E(()=>L4(e.percent)),o=E(()=>L4(e.strokeColor)),[r,i]=Sx();$de(i);const a=()=>{const{prefixCls:l,strokeWidth:s,strokeLinecap:u,gapDegree:c,gapPosition:d}=e;let f=0;return n.value.map((p,v)=>{const h=o.value[v]||o.value[o.value.length-1],m=Object.prototype.toString.call(h)==="[object Object]"?`url(#${l}-gradient-${t.value})`:"",{pathString:b,pathStyle:S}=F4(f,p,h,s,c,d);f+=p;const C={key:v,d:b,stroke:m,"stroke-linecap":u,"stroke-width":s,opacity:p===0?0:1,"fill-opacity":"0",class:`${l}-circle-path`,style:S};return g("path",k({ref:r(v)},C),null)})};return()=>{const{prefixCls:l,strokeWidth:s,trailWidth:u,gapDegree:c,gapPosition:d,trailColor:f,strokeLinecap:p,strokeColor:v}=e,h=Pde(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","strokeColor"]),{pathString:m,pathStyle:b}=F4(0,100,f,s,c,d);delete h.percent;const S=o.value.find($=>Object.prototype.toString.call($)==="[object Object]"),C={d:m,stroke:f,"stroke-linecap":p,"stroke-width":u||s,"fill-opacity":"0",class:`${l}-circle-trail`,style:b};return g("svg",k({class:`${l}-circle`,viewBox:"0 0 100 100"},h),[S&&g("defs",null,[g("linearGradient",{id:`${l}-gradient-${t.value}`,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[Object.keys(S).sort(($,x)=>k4($)-k4(x)).map(($,x)=>g("stop",{key:x,offset:$,"stop-color":S[$]},null))])]),g("path",C,null),a().reverse()])}}}),Ide=()=>y(y({},xm()),{strokeColor:It()}),Tde=3,Ede=e=>Tde/e*100,_de=le({compatConfig:{MODE:3},name:"ProgressCircle",inheritAttrs:!1,props:Qe(Ide(),{trailColor:null}),setup(e,t){let{slots:n,attrs:o}=t;const r=E(()=>{var h;return(h=e.width)!==null&&h!==void 0?h:120}),i=E(()=>{var h;return(h=e.size)!==null&&h!==void 0?h:[r.value,r.value]}),a=E(()=>$m(i.value,"circle")),l=E(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type==="dashboard")return 75}),s=E(()=>({width:`${a.value.width}px`,height:`${a.value.height}px`,fontSize:`${a.value.width*.15+6}px`})),u=E(()=>{var h;return(h=e.strokeWidth)!==null&&h!==void 0?h:Math.max(Ede(a.value.width),6)}),c=E(()=>e.gapPosition||e.type==="dashboard"&&"bottom"||void 0),d=E(()=>hde(e)),f=E(()=>Object.prototype.toString.call(e.strokeColor)==="[object Object]"),p=E(()=>vde({success:e.success,strokeColor:e.strokeColor})),v=E(()=>({[`${e.prefixCls}-inner`]:!0,[`${e.prefixCls}-circle-gradient`]:f.value}));return()=>{var h;const m=g(Ode,{percent:d.value,strokeWidth:u.value,trailWidth:u.value,strokeColor:p.value,strokeLinecap:e.strokeLinecap,trailColor:e.trailColor,prefixCls:e.prefixCls,gapDegree:l.value,gapPosition:c.value},null);return g("div",k(k({},o),{},{class:[v.value,o.class],style:[o.style,s.value]}),[a.value.width<=20?g(Ro,null,{default:()=>[g("span",null,[m])],title:n.default}):g(Le,null,[m,(h=n.default)===null||h===void 0?void 0:h.call(n)])])}}}),Mde=()=>y(y({},xm()),{steps:Number,strokeColor:He(),trailColor:String}),Ade=le({compatConfig:{MODE:3},name:"Steps",props:Mde(),setup(e,t){let{slots:n}=t;const o=E(()=>Math.round(e.steps*((e.percent||0)/100))),r=E(()=>{var l;return(l=e.size)!==null&&l!==void 0?l:[e.size==="small"?2:14,e.strokeWidth||8]}),i=E(()=>$m(r.value,"step",{steps:e.steps,strokeWidth:e.strokeWidth||8})),a=E(()=>{const{steps:l,strokeColor:s,trailColor:u,prefixCls:c}=e,d=[];for(let f=0;f{var l;return g("div",{class:`${e.prefixCls}-steps-outer`},[a.value,(l=n.default)===null||l===void 0?void 0:l.call(n)])}}}),Rde=new at("antProgressActive",{"0%":{transform:"translateX(-100%) scaleX(0)",opacity:.1},"20%":{transform:"translateX(-100%) scaleX(0)",opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}}),Dde=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:y(y({},qe(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize,marginInlineEnd:e.marginXS,marginBottom:e.marginXS},[`${t}-outer`]:{display:"inline-block",width:"100%"},[`&${t}-show-info`]:{[`${t}-outer`]:{marginInlineEnd:`calc(-2em - ${e.marginXS}px)`,paddingInlineEnd:`calc(2em + ${e.paddingXS}px)`}},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:e.progressRemainingColor,borderRadius:e.progressLineRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorInfo}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",backgroundColor:e.colorInfo,borderRadius:e.progressLineRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",width:"2em",marginInlineStart:e.marginXS,color:e.progressInfoTextColor,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[n]:{fontSize:e.fontSize}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.progressLineRadius,opacity:0,animationName:Rde,animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},Nde=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.progressRemainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.colorText,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[n]:{fontSize:`${e.fontSize/e.fontSizeSM}em`}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},kde=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.progressRemainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.colorInfo}}}}}},Lde=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${n}`]:{fontSize:e.fontSizeSM}}}},Fde=Ue("Progress",e=>{const t=e.marginXXS/2,n=Be(e,{progressLineRadius:100,progressInfoTextColor:e.colorText,progressDefaultColor:e.colorInfo,progressRemainingColor:e.colorFillSecondary,progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Dde(n),Nde(n),kde(n),Lde(n)]});var Bde=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rArray.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor),u=E(()=>{const{percent:v=0}=e,h=_h(e);return parseInt(h!==void 0?h.toString():v.toString(),10)}),c=E(()=>{const{status:v}=e;return!gde.includes(v)&&u.value>=100?"success":v||"normal"}),d=E(()=>{const{type:v,showInfo:h,size:m}=e,b=r.value;return{[b]:!0,[`${b}-inline-circle`]:v==="circle"&&$m(m,"circle").width<=20,[`${b}-${v==="dashboard"&&"circle"||v}`]:!0,[`${b}-status-${c.value}`]:!0,[`${b}-show-info`]:h,[`${b}-${m}`]:m,[`${b}-rtl`]:i.value==="rtl",[l.value]:!0}}),f=E(()=>typeof e.strokeColor=="string"||Array.isArray(e.strokeColor)?e.strokeColor:void 0),p=()=>{const{showInfo:v,format:h,type:m,percent:b,title:S}=e,C=_h(e);if(!v)return null;let $;const x=h||(n==null?void 0:n.format)||(w=>`${w}%`),P=m==="line";return h||n!=null&&n.format||c.value!=="exception"&&c.value!=="success"?$=x(kl(b),kl(C)):c.value==="exception"?$=g(P?po:fo,null,null):c.value==="success"&&($=g(P?qr:Yc,null,null)),g("span",{class:`${r.value}-text`,title:S===void 0&&typeof $=="string"?$:void 0},[$])};return()=>{const{type:v,steps:h,title:m}=e,{class:b}=o,S=Bde(o,["class"]),C=p();let $;return v==="line"?$=h?g(Ade,k(k({},e),{},{strokeColor:f.value,prefixCls:r.value,steps:h}),{default:()=>[C]}):g(Cde,k(k({},e),{},{strokeColor:s.value,prefixCls:r.value,direction:i.value}),{default:()=>[C]}):(v==="circle"||v==="dashboard")&&($=g(_de,k(k({},e),{},{prefixCls:r.value,strokeColor:s.value,progressStatus:c.value}),{default:()=>[C]})),a(g("div",k(k({role:"progressbar"},S),{},{class:[d.value,b],title:m}),[$]))}}}),a$=Lt(Hde);function zde(e){let t=e.scrollX;const n="scrollLeft";if(typeof t!="number"){const o=e.document;t=o.documentElement[n],typeof t!="number"&&(t=o.body[n])}return t}function jde(e){let t,n;const o=e.ownerDocument,{body:r}=o,i=o&&o.documentElement,a=e.getBoundingClientRect();return t=a.left,n=a.top,t-=i.clientLeft||r.clientLeft||0,n-=i.clientTop||r.clientTop||0,{left:t,top:n}}function Wde(e){const t=jde(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=zde(o),t.left}var Vde={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"};function B4(e){for(var t=1;t{const{index:s}=e;n("hover",l,s)},r=l=>{const{index:s}=e;n("click",l,s)},i=l=>{const{index:s}=e;l.keyCode===13&&n("click",l,s)},a=E(()=>{const{prefixCls:l,index:s,value:u,allowHalf:c,focused:d}=e,f=s+1;let p=l;return u===0&&s===0&&d?p+=` ${l}-focused`:c&&u+.5>=f&&u{const{disabled:l,prefixCls:s,characterRender:u,character:c,index:d,count:f,value:p}=e,v=typeof c=="function"?c({disabled:l,prefixCls:s,index:d,count:f,value:p}):c;let h=g("li",{class:a.value},[g("div",{onClick:l?null:r,onKeydown:l?null:i,onMousemove:l?null:o,role:"radio","aria-checked":p>d?"true":"false","aria-posinset":d+1,"aria-setsize":f,tabindex:l?-1:0},[g("div",{class:`${s}-first`},[v]),g("div",{class:`${s}-second`},[v])])]);return u&&(h=u(h,e)),h}}}),Xde=e=>{const{componentCls:t}=e;return{[`${t}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:e.marginXS},"> div":{transition:`all ${e.motionDurationMid}, outline 0s`,"&:hover":{transform:e.rateStarHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${e.lineWidth}px dashed ${e.rateStarColor}`,transform:e.rateStarHoverScale}},"&-first, &-second":{color:e.defaultColor,transition:`all ${e.motionDurationMid}`,userSelect:"none",[e.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${t}-star-first, &-half ${t}-star-second`]:{opacity:1},[`&-half ${t}-star-first, &-full ${t}-star-second`]:{color:"inherit"}}}},Yde=e=>({[`&-rtl${e.componentCls}`]:{direction:"rtl"}}),qde=e=>{const{componentCls:t}=e;return{[t]:y(y(y(y(y({},qe(e)),{display:"inline-block",margin:0,padding:0,color:e.rateStarColor,fontSize:e.rateStarSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${t} ${t}-star`]:{cursor:"default","&:hover":{transform:"scale(1)"}}}),Xde(e)),{[`+ ${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,fontSize:e.fontSize}}),Yde(e))}},Jde=Ue("Rate",e=>{const{colorFillContent:t}=e,n=Be(e,{rateStarColor:e["yellow-6"],rateStarSize:e.controlHeightLG*.5,rateStarHoverScale:"scale(1.1)",defaultColor:t});return[qde(n)]}),Zde=()=>({prefixCls:String,count:Number,value:Number,allowHalf:{type:Boolean,default:void 0},allowClear:{type:Boolean,default:void 0},tooltips:Array,disabled:{type:Boolean,default:void 0},character:K.any,autofocus:{type:Boolean,default:void 0},tabindex:K.oneOfType([K.number,K.string]),direction:String,id:String,onChange:Function,onHoverChange:Function,"onUpdate:value":Function,onFocus:Function,onBlur:Function,onKeydown:Function}),Qde=le({compatConfig:{MODE:3},name:"ARate",inheritAttrs:!1,props:Qe(Zde(),{value:0,count:5,allowHalf:!1,allowClear:!0,tabindex:0,direction:"ltr"}),setup(e,t){let{slots:n,attrs:o,emit:r,expose:i}=t;const{prefixCls:a,direction:l}=Te("rate",e),[s,u]=Jde(a),c=bn(),d=ae(),[f,p]=Sx(),v=rt({value:e.value,focused:!1,cleanedValue:null,hoverValue:void 0});be(()=>e.value,()=>{v.value=e.value});const h=T=>Co(p.value.get(T)),m=(T,A)=>{const R=l.value==="rtl";let H=T+1;if(e.allowHalf){const M=h(T),D=Wde(M),N=M.clientWidth;(R&&A-D>N/2||!R&&A-D{e.value===void 0&&(v.value=T),r("update:value",T),r("change",T),c.onFieldChange()},S=(T,A)=>{const R=m(A,T.pageX);R!==v.cleanedValue&&(v.hoverValue=R,v.cleanedValue=null),r("hoverChange",R)},C=()=>{v.hoverValue=void 0,v.cleanedValue=null,r("hoverChange",void 0)},$=(T,A)=>{const{allowClear:R}=e,H=m(A,T.pageX);let M=!1;R&&(M=H===v.value),C(),b(M?0:H),v.cleanedValue=M?H:null},x=T=>{v.focused=!0,r("focus",T)},P=T=>{v.focused=!1,r("blur",T),c.onFieldBlur()},w=T=>{const{keyCode:A}=T,{count:R,allowHalf:H}=e,M=l.value==="rtl";A===Ie.RIGHT&&v.value0&&!M||A===Ie.RIGHT&&v.value>0&&M?(H?v.value-=.5:v.value-=1,b(v.value),T.preventDefault()):A===Ie.LEFT&&v.value{e.disabled||d.value.focus()};i({focus:O,blur:()=>{e.disabled||d.value.blur()}}),Ke(()=>{const{autofocus:T,disabled:A}=e;T&&!A&&O()});const _=(T,A)=>{let{index:R}=A;const{tooltips:H}=e;return H?g(Ro,{title:H[R]},{default:()=>[T]}):T};return()=>{const{count:T,allowHalf:A,disabled:R,tabindex:H,id:M=c.id.value}=e,{class:D,style:N}=o,L=[],F=R?`${a.value}-disabled`:"",B=e.character||n.character||(()=>g(l$,null,null));for(let z=0;zg("svg",{width:"252",height:"294"},[g("defs",null,[g("path",{d:"M0 .387h251.772v251.772H0z"},null)]),g("g",{fill:"none","fill-rule":"evenodd"},[g("g",{transform:"translate(0 .012)"},[g("mask",{fill:"#fff"},null),g("path",{d:"M0 127.32v-2.095C0 56.279 55.892.387 124.838.387h2.096c68.946 0 124.838 55.892 124.838 124.838v2.096c0 68.946-55.892 124.838-124.838 124.838h-2.096C55.892 252.16 0 196.267 0 127.321",fill:"#E4EBF7",mask:"url(#b)"},null)]),g("path",{d:"M39.755 130.84a8.276 8.276 0 1 1-16.468-1.66 8.276 8.276 0 0 1 16.468 1.66",fill:"#FFF"},null),g("path",{d:"M36.975 134.297l10.482 5.943M48.373 146.508l-12.648 10.788",stroke:"#FFF","stroke-width":"2"},null),g("path",{d:"M39.875 159.352a5.667 5.667 0 1 1-11.277-1.136 5.667 5.667 0 0 1 11.277 1.136M57.588 143.247a5.708 5.708 0 1 1-11.358-1.145 5.708 5.708 0 0 1 11.358 1.145M99.018 26.875l29.82-.014a4.587 4.587 0 1 0-.003-9.175l-29.82.013a4.587 4.587 0 1 0 .003 9.176M110.424 45.211l29.82-.013a4.588 4.588 0 0 0-.004-9.175l-29.82.013a4.587 4.587 0 1 0 .004 9.175",fill:"#FFF"},null),g("path",{d:"M112.798 26.861v-.002l15.784-.006a4.588 4.588 0 1 0 .003 9.175l-15.783.007v-.002a4.586 4.586 0 0 0-.004-9.172M184.523 135.668c-.553 5.485-5.447 9.483-10.931 8.93-5.485-.553-9.483-5.448-8.93-10.932.552-5.485 5.447-9.483 10.932-8.93 5.485.553 9.483 5.447 8.93 10.932",fill:"#FFF"},null),g("path",{d:"M179.26 141.75l12.64 7.167M193.006 156.477l-15.255 13.011",stroke:"#FFF","stroke-width":"2"},null),g("path",{d:"M184.668 170.057a6.835 6.835 0 1 1-13.6-1.372 6.835 6.835 0 0 1 13.6 1.372M203.34 153.325a6.885 6.885 0 1 1-13.7-1.382 6.885 6.885 0 0 1 13.7 1.382",fill:"#FFF"},null),g("path",{d:"M151.931 192.324a2.222 2.222 0 1 1-4.444 0 2.222 2.222 0 0 1 4.444 0zM225.27 116.056a2.222 2.222 0 1 1-4.445 0 2.222 2.222 0 0 1 4.444 0zM216.38 151.08a2.223 2.223 0 1 1-4.446-.001 2.223 2.223 0 0 1 4.446 0zM176.917 107.636a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM195.291 92.165a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM202.058 180.711a2.223 2.223 0 1 1-4.446 0 2.223 2.223 0 0 1 4.446 0z",stroke:"#FFF","stroke-width":"2"},null),g("path",{stroke:"#FFF","stroke-width":"2",d:"M214.404 153.302l-1.912 20.184-10.928 5.99M173.661 174.792l-6.356 9.814h-11.36l-4.508 6.484M174.941 125.168v-15.804M220.824 117.25l-12.84 7.901-15.31-7.902V94.39"},null),g("path",{d:"M166.588 65.936h-3.951a4.756 4.756 0 0 1-4.743-4.742 4.756 4.756 0 0 1 4.743-4.743h3.951a4.756 4.756 0 0 1 4.743 4.743 4.756 4.756 0 0 1-4.743 4.742",fill:"#FFF"},null),g("path",{d:"M174.823 30.03c0-16.281 13.198-29.48 29.48-29.48 16.28 0 29.48 13.199 29.48 29.48 0 16.28-13.2 29.48-29.48 29.48-16.282 0-29.48-13.2-29.48-29.48",fill:"#1890FF"},null),g("path",{d:"M205.952 38.387c.5.5.785 1.142.785 1.928s-.286 1.465-.785 1.964c-.572.5-1.214.75-2 .75-.785 0-1.429-.285-1.929-.785-.572-.5-.82-1.143-.82-1.929s.248-1.428.82-1.928c.5-.5 1.144-.75 1.93-.75.785 0 1.462.25 1.999.75m4.285-19.463c1.428 1.249 2.143 2.963 2.143 5.142 0 1.712-.427 3.13-1.219 4.25-.067.096-.137.18-.218.265-.416.429-1.41 1.346-2.956 2.699a5.07 5.07 0 0 0-1.428 1.75 5.207 5.207 0 0 0-.536 2.357v.5h-4.107v-.5c0-1.357.215-2.536.714-3.5.464-.964 1.857-2.464 4.178-4.536l.43-.5c.643-.785.964-1.643.964-2.535 0-1.18-.358-2.108-1-2.785-.678-.68-1.643-1.001-2.858-1.001-1.536 0-2.642.464-3.357 1.43-.37.5-.621 1.135-.76 1.904a1.999 1.999 0 0 1-1.971 1.63h-.004c-1.277 0-2.257-1.183-1.98-2.43.337-1.518 1.02-2.78 2.073-3.784 1.536-1.5 3.607-2.25 6.25-2.25 2.32 0 4.214.607 5.642 1.894",fill:"#FFF"},null),g("path",{d:"M52.04 76.131s21.81 5.36 27.307 15.945c5.575 10.74-6.352 9.26-15.73 4.935-10.86-5.008-24.7-11.822-11.577-20.88",fill:"#FFB594"},null),g("path",{d:"M90.483 67.504l-.449 2.893c-.753.49-4.748-2.663-4.748-2.663l-1.645.748-1.346-5.684s6.815-4.589 8.917-5.018c2.452-.501 9.884.94 10.7 2.278 0 0 1.32.486-2.227.69-3.548.203-5.043.447-6.79 3.132-1.747 2.686-2.412 3.624-2.412 3.624",fill:"#FFC6A0"},null),g("path",{d:"M128.055 111.367c-2.627-7.724-6.15-13.18-8.917-15.478-3.5-2.906-9.34-2.225-11.366-4.187-1.27-1.231-3.215-1.197-3.215-1.197s-14.98-3.158-16.828-3.479c-2.37-.41-2.124-.714-6.054-1.405-1.57-1.907-2.917-1.122-2.917-1.122l-7.11-1.383c-.853-1.472-2.423-1.023-2.423-1.023l-2.468-.897c-1.645 9.976-7.74 13.796-7.74 13.796 1.795 1.122 15.703 8.3 15.703 8.3l5.107 37.11s-3.321 5.694 1.346 9.109c0 0 19.883-3.743 34.921-.329 0 0 3.047-2.546.972-8.806.523-3.01 1.394-8.263 1.736-11.622.385.772 2.019 1.918 3.14 3.477 0 0 9.407-7.365 11.052-14.012-.832-.723-1.598-1.585-2.267-2.453-.567-.736-.358-2.056-.765-2.717-.669-1.084-1.804-1.378-1.907-1.682",fill:"#FFF"},null),g("path",{d:"M101.09 289.998s4.295 2.041 7.354 1.021c2.821-.94 4.53.668 7.08 1.178 2.55.51 6.874 1.1 11.686-1.26-.103-5.51-6.889-3.98-11.96-6.713-2.563-1.38-3.784-4.722-3.598-8.799h-9.402s-1.392 10.52-1.16 14.573",fill:"#CBD1D1"},null),g("path",{d:"M101.067 289.826s2.428 1.271 6.759.653c3.058-.437 3.712.481 7.423 1.031 3.712.55 10.724-.069 11.823-.894.413 1.1-.343 2.063-.343 2.063s-1.512.603-4.812.824c-2.03.136-5.8.291-7.607-.503-1.787-1.375-5.247-1.903-5.728-.241-3.918.95-7.355-.286-7.355-.286l-.16-2.647z",fill:"#2B0849"},null),g("path",{d:"M108.341 276.044h3.094s-.103 6.702 4.536 8.558c-4.64.618-8.558-2.303-7.63-8.558",fill:"#A4AABA"},null),g("path",{d:"M57.542 272.401s-2.107 7.416-4.485 12.306c-1.798 3.695-4.225 7.492 5.465 7.492 6.648 0 8.953-.48 7.423-6.599-1.53-6.12.266-13.199.266-13.199h-8.669z",fill:"#CBD1D1"},null),g("path",{d:"M51.476 289.793s2.097 1.169 6.633 1.169c6.083 0 8.249-1.65 8.249-1.65s.602 1.114-.619 2.165c-.993.855-3.597 1.591-7.39 1.546-4.145-.048-5.832-.566-6.736-1.168-.825-.55-.687-1.58-.137-2.062",fill:"#2B0849"},null),g("path",{d:"M58.419 274.304s.033 1.519-.314 2.93c-.349 1.42-1.078 3.104-1.13 4.139-.058 1.151 4.537 1.58 5.155.034.62-1.547 1.294-6.427 1.913-7.252.619-.825-4.903-2.119-5.624.15",fill:"#A4AABA"},null),g("path",{d:"M99.66 278.514l13.378.092s1.298-54.52 1.853-64.403c.554-9.882 3.776-43.364 1.002-63.128l-12.547-.644-22.849.78s-.434 3.966-1.195 9.976c-.063.496-.682.843-.749 1.365-.075.585.423 1.354.32 1.966-2.364 14.08-6.377 33.104-8.744 46.677-.116.666-1.234 1.009-1.458 2.691-.04.302.211 1.525.112 1.795-6.873 18.744-10.949 47.842-14.277 61.885l14.607-.014s2.197-8.57 4.03-16.97c2.811-12.886 23.111-85.01 23.111-85.01l3.016-.521 1.043 46.35s-.224 1.234.337 2.02c.56.785-.56 1.123-.392 2.244l.392 1.794s-.449 7.178-.898 11.89c-.448 4.71-.092 39.165-.092 39.165",fill:"#7BB2F9"},null),g("path",{d:"M76.085 221.626c1.153.094 4.038-2.019 6.955-4.935M106.36 225.142s2.774-1.11 6.103-3.883",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M107.275 222.1s2.773-1.11 6.102-3.884",stroke:"#648BD8","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M74.74 224.767s2.622-.591 6.505-3.365M86.03 151.634c-.27 3.106.3 8.525-4.336 9.123M103.625 149.88s.11 14.012-1.293 15.065c-2.219 1.664-2.99 1.944-2.99 1.944M99.79 150.438s.035 12.88-1.196 24.377M93.673 175.911s7.212-1.664 9.431-1.664M74.31 205.861a212.013 212.013 0 0 1-.979 4.56s-1.458 1.832-1.009 3.776c.449 1.944-.947 2.045-4.985 15.355-1.696 5.59-4.49 18.591-6.348 27.597l-.231 1.12M75.689 197.807a320.934 320.934 0 0 1-.882 4.754M82.591 152.233L81.395 162.7s-1.097.15-.5 2.244c.113 1.346-2.674 15.775-5.18 30.43M56.12 274.418h13.31",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M116.241 148.22s-17.047-3.104-35.893.2c.158 2.514-.003 4.15-.003 4.15s14.687-2.818 35.67-.312c.252-2.355.226-4.038.226-4.038",fill:"#192064"},null),g("path",{d:"M106.322 151.165l.003-4.911a.81.81 0 0 0-.778-.815c-2.44-.091-5.066-.108-7.836-.014a.818.818 0 0 0-.789.815l-.003 4.906a.81.81 0 0 0 .831.813c2.385-.06 4.973-.064 7.73.017a.815.815 0 0 0 .842-.81",fill:"#FFF"},null),g("path",{d:"M105.207 150.233l.002-3.076a.642.642 0 0 0-.619-.646 94.321 94.321 0 0 0-5.866-.01.65.65 0 0 0-.63.647v3.072a.64.64 0 0 0 .654.644 121.12 121.12 0 0 1 5.794.011c.362.01.665-.28.665-.642",fill:"#192064"},null),g("path",{d:"M100.263 275.415h12.338M101.436 270.53c.006 3.387.042 5.79.111 6.506M101.451 264.548a915.75 915.75 0 0 0-.015 4.337M100.986 174.965l.898 44.642s.673 1.57-.225 2.692c-.897 1.122 2.468.673.898 2.243-1.57 1.57.897 1.122 0 3.365-.596 1.489-.994 21.1-1.096 35.146",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M46.876 83.427s-.516 6.045 7.223 5.552c11.2-.712 9.218-9.345 31.54-21.655-.786-2.708-2.447-4.744-2.447-4.744s-11.068 3.11-22.584 8.046c-6.766 2.9-13.395 6.352-13.732 12.801M104.46 91.057l.941-5.372-8.884-11.43-5.037 5.372-1.74 7.834a.321.321 0 0 0 .108.32c.965.8 6.5 5.013 14.347 3.544a.332.332 0 0 0 .264-.268",fill:"#FFC6A0"},null),g("path",{d:"M93.942 79.387s-4.533-2.853-2.432-6.855c1.623-3.09 4.513 1.133 4.513 1.133s.52-3.642 3.121-3.642c.52-1.04 1.561-4.162 1.561-4.162s11.445 2.601 13.526 3.121c0 5.203-2.304 19.424-7.84 19.861-8.892.703-12.449-9.456-12.449-9.456",fill:"#FFC6A0"},null),g("path",{d:"M113.874 73.446c2.601-2.081 3.47-9.722 3.47-9.722s-2.479-.49-6.64-2.05c-4.683-2.081-12.798-4.747-17.48.976-9.668 3.223-2.05 19.823-2.05 19.823l2.713-3.021s-3.935-3.287-2.08-6.243c2.17-3.462 3.92 1.073 3.92 1.073s.637-2.387 3.581-3.342c.355-.71 1.036-2.674 1.432-3.85a1.073 1.073 0 0 1 1.263-.704c2.4.558 8.677 2.019 11.356 2.662.522.125.871.615.82 1.15l-.305 3.248z",fill:"#520038"},null),g("path",{d:"M104.977 76.064c-.103.61-.582 1.038-1.07.956-.489-.083-.801-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.644.698 1.254M112.132 77.694c-.103.61-.582 1.038-1.07.956-.488-.083-.8-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.643.698 1.254",fill:"#552950"},null),g("path",{stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round",d:"M110.13 74.84l-.896 1.61-.298 4.357h-2.228"},null),g("path",{d:"M110.846 74.481s1.79-.716 2.506.537",stroke:"#5C2552","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M92.386 74.282s.477-1.114 1.113-.716c.637.398 1.274 1.433.558 1.99-.717.556.159 1.67.159 1.67",stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M103.287 72.93s1.83 1.113 4.137.954",stroke:"#5C2552","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M103.685 81.762s2.227 1.193 4.376 1.193M104.64 84.308s.954.398 1.511.318M94.693 81.205s2.308 7.4 10.424 7.639",stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M81.45 89.384s.45 5.647-4.935 12.787M69 82.654s-.726 9.282-8.204 14.206",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M129.405 122.865s-5.272 7.403-9.422 10.768",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M119.306 107.329s.452 4.366-2.127 32.062",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M150.028 151.232h-49.837a1.01 1.01 0 0 1-1.01-1.01v-31.688c0-.557.452-1.01 1.01-1.01h49.837c.558 0 1.01.453 1.01 1.01v31.688a1.01 1.01 0 0 1-1.01 1.01",fill:"#F2D7AD"},null),g("path",{d:"M150.29 151.232h-19.863v-33.707h20.784v32.786a.92.92 0 0 1-.92.92",fill:"#F4D19D"},null),g("path",{d:"M123.554 127.896H92.917a.518.518 0 0 1-.425-.816l6.38-9.113c.193-.277.51-.442.85-.442h31.092l-7.26 10.371z",fill:"#F2D7AD"},null),g("path",{fill:"#CC9B6E",d:"M123.689 128.447H99.25v-.519h24.169l7.183-10.26.424.298z"},null),g("path",{d:"M158.298 127.896h-18.669a2.073 2.073 0 0 1-1.659-.83l-7.156-9.541h19.965c.49 0 .95.23 1.244.622l6.69 8.92a.519.519 0 0 1-.415.83",fill:"#F4D19D"},null),g("path",{fill:"#CC9B6E",d:"M157.847 128.479h-19.384l-7.857-10.475.415-.31 7.7 10.266h19.126zM130.554 150.685l-.032-8.177.519-.002.032 8.177z"},null),g("path",{fill:"#CC9B6E",d:"M130.511 139.783l-.08-21.414.519-.002.08 21.414zM111.876 140.932l-.498-.143 1.479-5.167.498.143zM108.437 141.06l-2.679-2.935 2.665-3.434.41.318-2.397 3.089 2.384 2.612zM116.607 141.06l-.383-.35 2.383-2.612-2.397-3.089.41-.318 2.665 3.434z"},null),g("path",{d:"M154.316 131.892l-3.114-1.96.038 3.514-1.043.092c-1.682.115-3.634.23-4.789.23-1.902 0-2.693 2.258 2.23 2.648l-2.645-.596s-2.168 1.317.504 2.3c0 0-1.58 1.217.561 2.58-.584 3.504 5.247 4.058 7.122 3.59 1.876-.47 4.233-2.359 4.487-5.16.28-3.085-.89-5.432-3.35-7.238",fill:"#FFC6A0"},null),g("path",{d:"M153.686 133.577s-6.522.47-8.36.372c-1.836-.098-1.904 2.19 2.359 2.264 3.739.15 5.451-.044 5.451-.044",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M145.16 135.877c-1.85 1.346.561 2.355.561 2.355s3.478.898 6.73.617",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M151.89 141.71s-6.28.111-6.73-2.132c-.223-1.346.45-1.402.45-1.402M146.114 140.868s-1.103 3.16 5.44 3.533M151.202 129.932v3.477M52.838 89.286c3.533-.337 8.423-1.248 13.582-7.754",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M168.567 248.318a6.647 6.647 0 0 1-6.647-6.647v-66.466a6.647 6.647 0 1 1 13.294 0v66.466a6.647 6.647 0 0 1-6.647 6.647",fill:"#5BA02E"},null),g("path",{d:"M176.543 247.653a6.647 6.647 0 0 1-6.646-6.647v-33.232a6.647 6.647 0 1 1 13.293 0v33.232a6.647 6.647 0 0 1-6.647 6.647",fill:"#92C110"},null),g("path",{d:"M186.443 293.613H158.92a3.187 3.187 0 0 1-3.187-3.187v-46.134a3.187 3.187 0 0 1 3.187-3.187h27.524a3.187 3.187 0 0 1 3.187 3.187v46.134a3.187 3.187 0 0 1-3.187 3.187",fill:"#F2D7AD"},null),g("path",{d:"M88.979 89.48s7.776 5.384 16.6 2.842",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null)])]),rfe=()=>g("svg",{width:"254",height:"294"},[g("defs",null,[g("path",{d:"M0 .335h253.49v253.49H0z"},null),g("path",{d:"M0 293.665h253.49V.401H0z"},null)]),g("g",{fill:"none","fill-rule":"evenodd"},[g("g",{transform:"translate(0 .067)"},[g("mask",{fill:"#fff"},null),g("path",{d:"M0 128.134v-2.11C0 56.608 56.273.334 125.69.334h2.11c69.416 0 125.69 56.274 125.69 125.69v2.11c0 69.417-56.274 125.69-125.69 125.69h-2.11C56.273 253.824 0 197.551 0 128.134",fill:"#E4EBF7",mask:"url(#b)"},null)]),g("path",{d:"M39.989 132.108a8.332 8.332 0 1 1-16.581-1.671 8.332 8.332 0 0 1 16.58 1.671",fill:"#FFF"},null),g("path",{d:"M37.19 135.59l10.553 5.983M48.665 147.884l-12.734 10.861",stroke:"#FFF","stroke-width":"2"},null),g("path",{d:"M40.11 160.816a5.706 5.706 0 1 1-11.354-1.145 5.706 5.706 0 0 1 11.354 1.145M57.943 144.6a5.747 5.747 0 1 1-11.436-1.152 5.747 5.747 0 0 1 11.436 1.153M99.656 27.434l30.024-.013a4.619 4.619 0 1 0-.004-9.238l-30.024.013a4.62 4.62 0 0 0 .004 9.238M111.14 45.896l30.023-.013a4.62 4.62 0 1 0-.004-9.238l-30.024.013a4.619 4.619 0 1 0 .004 9.238",fill:"#FFF"},null),g("path",{d:"M113.53 27.421v-.002l15.89-.007a4.619 4.619 0 1 0 .005 9.238l-15.892.007v-.002a4.618 4.618 0 0 0-.004-9.234M150.167 70.091h-3.979a4.789 4.789 0 0 1-4.774-4.775 4.788 4.788 0 0 1 4.774-4.774h3.979a4.789 4.789 0 0 1 4.775 4.774 4.789 4.789 0 0 1-4.775 4.775",fill:"#FFF"},null),g("path",{d:"M171.687 30.234c0-16.392 13.289-29.68 29.681-29.68 16.392 0 29.68 13.288 29.68 29.68 0 16.393-13.288 29.681-29.68 29.681s-29.68-13.288-29.68-29.68",fill:"#FF603B"},null),g("path",{d:"M203.557 19.435l-.676 15.035a1.514 1.514 0 0 1-3.026 0l-.675-15.035a2.19 2.19 0 1 1 4.377 0m-.264 19.378c.513.477.77 1.1.77 1.87s-.257 1.393-.77 1.907c-.55.476-1.21.733-1.943.733a2.545 2.545 0 0 1-1.87-.77c-.55-.514-.806-1.136-.806-1.87 0-.77.256-1.393.806-1.87.513-.513 1.137-.733 1.87-.733.77 0 1.43.22 1.943.733",fill:"#FFF"},null),g("path",{d:"M119.3 133.275c4.426-.598 3.612-1.204 4.079-4.778.675-5.18-3.108-16.935-8.262-25.118-1.088-10.72-12.598-11.24-12.598-11.24s4.312 4.895 4.196 16.199c1.398 5.243.804 14.45.804 14.45s5.255 11.369 11.78 10.487",fill:"#FFB594"},null),g("path",{d:"M100.944 91.61s1.463-.583 3.211.582c8.08 1.398 10.368 6.706 11.3 11.368 1.864 1.282 1.864 2.33 1.864 3.496.365.777 1.515 3.03 1.515 3.03s-7.225 1.748-10.954 6.758c-1.399-6.41-6.936-25.235-6.936-25.235",fill:"#FFF"},null),g("path",{d:"M94.008 90.5l1.019-5.815-9.23-11.874-5.233 5.581-2.593 9.863s8.39 5.128 16.037 2.246",fill:"#FFB594"},null),g("path",{d:"M82.931 78.216s-4.557-2.868-2.445-6.892c1.632-3.107 4.537 1.139 4.537 1.139s.524-3.662 3.139-3.662c.523-1.046 1.569-4.184 1.569-4.184s11.507 2.615 13.6 3.138c-.001 5.23-2.317 19.529-7.884 19.969-8.94.706-12.516-9.508-12.516-9.508",fill:"#FFC6A0"},null),g("path",{d:"M102.971 72.243c2.616-2.093 3.489-9.775 3.489-9.775s-2.492-.492-6.676-2.062c-4.708-2.092-12.867-4.771-17.575.982-9.54 4.41-2.062 19.93-2.062 19.93l2.729-3.037s-3.956-3.304-2.092-6.277c2.183-3.48 3.943 1.08 3.943 1.08s.64-2.4 3.6-3.36c.356-.714 1.04-2.69 1.44-3.872a1.08 1.08 0 0 1 1.27-.707c2.41.56 8.723 2.03 11.417 2.676.524.126.876.619.825 1.156l-.308 3.266z",fill:"#520038"},null),g("path",{d:"M101.22 76.514c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.961.491.083.805.647.702 1.26M94.26 75.074c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.96.491.082.805.646.702 1.26",fill:"#552950"},null),g("path",{stroke:"#DB836E","stroke-width":"1.063","stroke-linecap":"round","stroke-linejoin":"round",d:"M99.206 73.644l-.9 1.62-.3 4.38h-2.24"},null),g("path",{d:"M99.926 73.284s1.8-.72 2.52.54",stroke:"#5C2552","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M81.367 73.084s.48-1.12 1.12-.72c.64.4 1.28 1.44.56 2s.16 1.68.16 1.68",stroke:"#DB836E","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M92.326 71.724s1.84 1.12 4.16.96",stroke:"#5C2552","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M92.726 80.604s2.24 1.2 4.4 1.2M93.686 83.164s.96.4 1.52.32M83.687 80.044s1.786 6.547 9.262 7.954",stroke:"#DB836E","stroke-width":"1.063","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M95.548 91.663s-1.068 2.821-8.298 2.105c-7.23-.717-10.29-5.044-10.29-5.044",stroke:"#E4EBF7","stroke-width":"1.136","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M78.126 87.478s6.526 4.972 16.47 2.486c0 0 9.577 1.02 11.536 5.322 5.36 11.77.543 36.835 0 39.962 3.496 4.055-.466 8.483-.466 8.483-15.624-3.548-35.81-.6-35.81-.6-4.849-3.546-1.223-9.044-1.223-9.044L62.38 110.32c-2.485-15.227.833-19.803 3.549-20.743 3.03-1.049 8.04-1.282 8.04-1.282.496-.058 1.08-.076 1.37-.233 2.36-1.282 2.787-.583 2.787-.583",fill:"#FFF"},null),g("path",{d:"M65.828 89.81s-6.875.465-7.59 8.156c-.466 8.857 3.03 10.954 3.03 10.954s6.075 22.102 16.796 22.957c8.39-2.176 4.758-6.702 4.661-11.42-.233-11.304-7.108-16.897-7.108-16.897s-4.212-13.75-9.789-13.75",fill:"#FFC6A0"},null),g("path",{d:"M71.716 124.225s.855 11.264 9.828 6.486c4.765-2.536 7.581-13.828 9.789-22.568 1.456-5.768 2.58-12.197 2.58-12.197l-4.973-1.709s-2.408 5.516-7.769 12.275c-4.335 5.467-9.144 11.11-9.455 17.713",fill:"#FFC6A0"},null),g("path",{d:"M108.463 105.191s1.747 2.724-2.331 30.535c2.376 2.216 1.053 6.012-.233 7.51",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M123.262 131.527s-.427 2.732-11.77 1.981c-15.187-1.006-25.326-3.25-25.326-3.25l.933-5.8s.723.215 9.71-.068c11.887-.373 18.714-6.07 24.964-1.022 4.039 3.263 1.489 8.16 1.489 8.16",fill:"#FFC6A0"},null),g("path",{d:"M70.24 90.974s-5.593-4.739-11.054 2.68c-3.318 7.223.517 15.284 2.664 19.578-.31 3.729 2.33 4.311 2.33 4.311s.108.895 1.516 2.68c4.078-7.03 6.72-9.166 13.711-12.546-.328-.656-1.877-3.265-1.825-3.767.175-1.69-1.282-2.623-1.282-2.623s-.286-.156-1.165-2.738c-.788-2.313-2.036-5.177-4.895-7.575",fill:"#FFF"},null),g("path",{d:"M90.232 288.027s4.855 2.308 8.313 1.155c3.188-1.063 5.12.755 8.002 1.331 2.881.577 7.769 1.243 13.207-1.424-.117-6.228-7.786-4.499-13.518-7.588-2.895-1.56-4.276-5.336-4.066-9.944H91.544s-1.573 11.89-1.312 16.47",fill:"#CBD1D1"},null),g("path",{d:"M90.207 287.833s2.745 1.437 7.639.738c3.456-.494 3.223.66 7.418 1.282 4.195.621 13.092-.194 14.334-1.126.466 1.242-.388 2.33-.388 2.33s-1.709.682-5.438.932c-2.295.154-8.098.276-10.14-.621-2.02-1.554-4.894-1.515-6.06-.234-4.427 1.075-7.184-.31-7.184-.31l-.181-2.991z",fill:"#2B0849"},null),g("path",{d:"M98.429 272.257h3.496s-.117 7.574 5.127 9.671c-5.244.7-9.672-2.602-8.623-9.671",fill:"#A4AABA"},null),g("path",{d:"M44.425 272.046s-2.208 7.774-4.702 12.899c-1.884 3.874-4.428 7.854 5.729 7.854 6.97 0 9.385-.503 7.782-6.917-1.604-6.415.279-13.836.279-13.836h-9.088z",fill:"#CBD1D1"},null),g("path",{d:"M38.066 290.277s2.198 1.225 6.954 1.225c6.376 0 8.646-1.73 8.646-1.73s.63 1.168-.649 2.27c-1.04.897-3.77 1.668-7.745 1.621-4.347-.05-6.115-.593-7.062-1.224-.864-.577-.72-1.657-.144-2.162",fill:"#2B0849"},null),g("path",{d:"M45.344 274.041s.035 1.592-.329 3.07c-.365 1.49-1.13 3.255-1.184 4.34-.061 1.206 4.755 1.657 5.403.036.65-1.622 1.357-6.737 2.006-7.602.648-.865-5.14-2.222-5.896.156",fill:"#A4AABA"},null),g("path",{d:"M89.476 277.57l13.899.095s1.349-56.643 1.925-66.909c.576-10.267 3.923-45.052 1.042-65.585l-13.037-.669-23.737.81s-.452 4.12-1.243 10.365c-.065.515-.708.874-.777 1.417-.078.608.439 1.407.332 2.044-2.455 14.627-5.797 32.736-8.256 46.837-.121.693-1.282 1.048-1.515 2.796-.042.314.22 1.584.116 1.865-7.14 19.473-12.202 52.601-15.66 67.19l15.176-.015s2.282-10.145 4.185-18.871c2.922-13.389 24.012-88.32 24.012-88.32l3.133-.954-.158 48.568s-.233 1.282.35 2.098c.583.815-.581 1.167-.408 2.331l.408 1.864s-.466 7.458-.932 12.352c-.467 4.895 1.145 40.69 1.145 40.69",fill:"#7BB2F9"},null),g("path",{d:"M64.57 218.881c1.197.099 4.195-2.097 7.225-5.127M96.024 222.534s2.881-1.152 6.34-4.034",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M96.973 219.373s2.882-1.153 6.34-4.034",stroke:"#648BD8","stroke-width":"1.032","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M63.172 222.144s2.724-.614 6.759-3.496M74.903 146.166c-.281 3.226.31 8.856-4.506 9.478M93.182 144.344s.115 14.557-1.344 15.65c-2.305 1.73-3.107 2.02-3.107 2.02M89.197 144.923s.269 13.144-1.01 25.088M83.525 170.71s6.81-1.051 9.116-1.051M46.026 270.045l-.892 4.538M46.937 263.289l-.815 4.157M62.725 202.503c-.33 1.618-.102 1.904-.449 3.438 0 0-2.756 1.903-2.29 3.923.466 2.02-.31 3.424-4.505 17.252-1.762 5.807-4.233 18.922-6.165 28.278-.03.144-.521 2.646-1.14 5.8M64.158 194.136c-.295 1.658-.6 3.31-.917 4.938M71.33 146.787l-1.244 10.877s-1.14.155-.519 2.33c.117 1.399-2.778 16.39-5.382 31.615M44.242 273.727H58.07",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M106.18 142.117c-3.028-.489-18.825-2.744-36.219.2a.625.625 0 0 0-.518.644c.063 1.307.044 2.343.015 2.995a.617.617 0 0 0 .716.636c3.303-.534 17.037-2.412 35.664-.266.347.04.66-.214.692-.56.124-1.347.16-2.425.17-3.029a.616.616 0 0 0-.52-.62",fill:"#192064"},null),g("path",{d:"M96.398 145.264l.003-5.102a.843.843 0 0 0-.809-.847 114.104 114.104 0 0 0-8.141-.014.85.85 0 0 0-.82.847l-.003 5.097c0 .476.388.857.864.845 2.478-.064 5.166-.067 8.03.017a.848.848 0 0 0 .876-.843",fill:"#FFF"},null),g("path",{d:"M95.239 144.296l.002-3.195a.667.667 0 0 0-.643-.672c-1.9-.061-3.941-.073-6.094-.01a.675.675 0 0 0-.654.672l-.002 3.192c0 .376.305.677.68.669 1.859-.042 3.874-.043 6.02.012.376.01.69-.291.691-.668",fill:"#192064"},null),g("path",{d:"M90.102 273.522h12.819M91.216 269.761c.006 3.519-.072 5.55 0 6.292M90.923 263.474c-.009 1.599-.016 2.558-.016 4.505M90.44 170.404l.932 46.38s.7 1.631-.233 2.796c-.932 1.166 2.564.7.932 2.33-1.63 1.633.933 1.166 0 3.497-.618 1.546-1.031 21.921-1.138 36.513",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M73.736 98.665l2.214 4.312s2.098.816 1.865 2.68l.816 2.214M64.297 116.611c.233-.932 2.176-7.147 12.585-10.488M77.598 90.042s7.691 6.137 16.547 2.72",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M91.974 86.954s5.476-.816 7.574-4.545c1.297-.345.72 2.212-.33 3.671-.7.971-1.01 1.554-1.01 1.554s.194.31.155.816c-.053.697-.175.653-.272 1.048-.081.335.108.657 0 1.049-.046.17-.198.5-.382.878-.12.249-.072.687-.2.948-.231.469-1.562 1.87-2.622 2.855-3.826 3.554-5.018 1.644-6.001-.408-.894-1.865-.661-5.127-.874-6.875-.35-2.914-2.622-3.03-1.923-4.429.343-.685 2.87.69 3.263 1.748.757 2.04 2.952 1.807 2.622 1.69",fill:"#FFC6A0"},null),g("path",{d:"M99.8 82.429c-.465.077-.35.272-.97 1.243-.622.971-4.817 2.932-6.39 3.224-2.589.48-2.278-1.56-4.254-2.855-1.69-1.107-3.562-.638-1.398 1.398.99.932.932 1.107 1.398 3.205.335 1.506-.64 3.67.7 5.593",stroke:"#DB836E","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M79.543 108.673c-2.1 2.926-4.266 6.175-5.557 8.762",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M87.72 124.768s-2.098-1.942-5.127-2.719c-3.03-.777-3.574-.155-5.516.078-1.942.233-3.885-.932-3.652.7.233 1.63 5.05 1.01 5.206 2.097.155 1.087-6.37 2.796-8.313 2.175-.777.777.466 1.864 2.02 2.175.233 1.554 2.253 1.554 2.253 1.554s.699 1.01 2.641 1.088c2.486 1.32 8.934-.7 10.954-1.554 2.02-.855-.466-5.594-.466-5.594",fill:"#FFC6A0"},null),g("path",{d:"M73.425 122.826s.66 1.127 3.167 1.418c2.315.27 2.563.583 2.563.583s-2.545 2.894-9.07 2.272M72.416 129.274s3.826.097 4.933-.718M74.98 130.75s1.961.136 3.36-.505M77.232 131.916s1.748.019 2.914-.505M73.328 122.321s-.595-1.032 1.262-.427c1.671.544 2.833.055 5.128.155 1.389.061 3.067-.297 3.982.15 1.606.784 3.632 2.181 3.632 2.181s10.526 1.204 19.033-1.127M78.864 108.104s-8.39 2.758-13.168 12.12",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M109.278 112.533s3.38-3.613 7.575-4.662",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M107.375 123.006s9.697-2.745 11.445-.88",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M194.605 83.656l3.971-3.886M187.166 90.933l3.736-3.655M191.752 84.207l-4.462-4.56M198.453 91.057l-4.133-4.225M129.256 163.074l3.718-3.718M122.291 170.039l3.498-3.498M126.561 163.626l-4.27-4.27M132.975 170.039l-3.955-3.955",stroke:"#BFCDDD","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M190.156 211.779h-1.604a4.023 4.023 0 0 1-4.011-4.011V175.68a4.023 4.023 0 0 1 4.01-4.01h1.605a4.023 4.023 0 0 1 4.011 4.01v32.088a4.023 4.023 0 0 1-4.01 4.01",fill:"#A3B4C6"},null),g("path",{d:"M237.824 212.977a4.813 4.813 0 0 1-4.813 4.813h-86.636a4.813 4.813 0 0 1 0-9.626h86.636a4.813 4.813 0 0 1 4.813 4.813",fill:"#A3B4C6"},null),g("mask",{fill:"#fff"},null),g("path",{fill:"#A3B4C6",mask:"url(#d)",d:"M154.098 190.096h70.513v-84.617h-70.513z"},null),g("path",{d:"M224.928 190.096H153.78a3.219 3.219 0 0 1-3.208-3.209V167.92a3.219 3.219 0 0 1 3.208-3.21h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.219 3.219 0 0 1-3.21 3.209M224.928 130.832H153.78a3.218 3.218 0 0 1-3.208-3.208v-18.968a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.218 3.218 0 0 1-3.21 3.208",fill:"#BFCDDD",mask:"url(#d)"},null),g("path",{d:"M159.563 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 120.546h-22.461a.802.802 0 0 1-.802-.802v-3.208c0-.443.359-.803.802-.803h22.46c.444 0 .803.36.803.803v3.208c0 .443-.36.802-.802.802",fill:"#FFF",mask:"url(#d)"},null),g("path",{d:"M224.928 160.464H153.78a3.218 3.218 0 0 1-3.208-3.209v-18.967a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.209v18.967a3.218 3.218 0 0 1-3.21 3.209",fill:"#BFCDDD",mask:"url(#d)"},null),g("path",{d:"M173.455 130.832h49.301M164.984 130.832h6.089M155.952 130.832h6.75M173.837 160.613h49.3M165.365 160.613h6.089M155.57 160.613h6.751",stroke:"#7C90A5","stroke-width":"1.124","stroke-linecap":"round","stroke-linejoin":"round",mask:"url(#d)"},null),g("path",{d:"M159.563 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M166.98 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M174.397 151.038a2.407 2.407 0 1 1 .001-4.814 2.407 2.407 0 0 1 0 4.814M222.539 151.038h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802M159.563 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 179.987h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802",fill:"#FFF",mask:"url(#d)"},null),g("path",{d:"M203.04 221.108h-27.372a2.413 2.413 0 0 1-2.406-2.407v-11.448a2.414 2.414 0 0 1 2.406-2.407h27.372a2.414 2.414 0 0 1 2.407 2.407V218.7a2.413 2.413 0 0 1-2.407 2.407",fill:"#BFCDDD",mask:"url(#d)"},null),g("path",{d:"M177.259 207.217v11.52M201.05 207.217v11.52",stroke:"#A3B4C6","stroke-width":"1.124","stroke-linecap":"round","stroke-linejoin":"round",mask:"url(#d)"},null),g("path",{d:"M162.873 267.894a9.422 9.422 0 0 1-9.422-9.422v-14.82a9.423 9.423 0 0 1 18.845 0v14.82a9.423 9.423 0 0 1-9.423 9.422",fill:"#5BA02E",mask:"url(#d)"},null),g("path",{d:"M171.22 267.83a9.422 9.422 0 0 1-9.422-9.423v-3.438a9.423 9.423 0 0 1 18.845 0v3.438a9.423 9.423 0 0 1-9.422 9.423",fill:"#92C110",mask:"url(#d)"},null),g("path",{d:"M181.31 293.666h-27.712a3.209 3.209 0 0 1-3.209-3.21V269.79a3.209 3.209 0 0 1 3.209-3.21h27.711a3.209 3.209 0 0 1 3.209 3.21v20.668a3.209 3.209 0 0 1-3.209 3.209",fill:"#F2D7AD",mask:"url(#d)"},null)])]),ife=()=>g("svg",{width:"251",height:"294"},[g("g",{fill:"none","fill-rule":"evenodd"},[g("path",{d:"M0 129.023v-2.084C0 58.364 55.591 2.774 124.165 2.774h2.085c68.574 0 124.165 55.59 124.165 124.165v2.084c0 68.575-55.59 124.166-124.165 124.166h-2.085C55.591 253.189 0 197.598 0 129.023",fill:"#E4EBF7"},null),g("path",{d:"M41.417 132.92a8.231 8.231 0 1 1-16.38-1.65 8.231 8.231 0 0 1 16.38 1.65",fill:"#FFF"},null),g("path",{d:"M38.652 136.36l10.425 5.91M49.989 148.505l-12.58 10.73",stroke:"#FFF","stroke-width":"2"},null),g("path",{d:"M41.536 161.28a5.636 5.636 0 1 1-11.216-1.13 5.636 5.636 0 0 1 11.216 1.13M59.154 145.261a5.677 5.677 0 1 1-11.297-1.138 5.677 5.677 0 0 1 11.297 1.138M100.36 29.516l29.66-.013a4.562 4.562 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 0 0 .005 9.126M111.705 47.754l29.659-.013a4.563 4.563 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 1 0 .005 9.126",fill:"#FFF"},null),g("path",{d:"M114.066 29.503V29.5l15.698-.007a4.563 4.563 0 1 0 .004 9.126l-15.698.007v-.002a4.562 4.562 0 0 0-.004-9.122M185.405 137.723c-.55 5.455-5.418 9.432-10.873 8.882-5.456-.55-9.432-5.418-8.882-10.873.55-5.455 5.418-9.432 10.873-8.882 5.455.55 9.432 5.418 8.882 10.873",fill:"#FFF"},null),g("path",{d:"M180.17 143.772l12.572 7.129M193.841 158.42L178.67 171.36",stroke:"#FFF","stroke-width":"2"},null),g("path",{d:"M185.55 171.926a6.798 6.798 0 1 1-13.528-1.363 6.798 6.798 0 0 1 13.527 1.363M204.12 155.285a6.848 6.848 0 1 1-13.627-1.375 6.848 6.848 0 0 1 13.626 1.375",fill:"#FFF"},null),g("path",{d:"M152.988 194.074a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0zM225.931 118.217a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM217.09 153.051a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.42 0zM177.84 109.842a2.21 2.21 0 1 1-4.422 0 2.21 2.21 0 0 1 4.421 0zM196.114 94.454a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM202.844 182.523a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0z",stroke:"#FFF","stroke-width":"2"},null),g("path",{stroke:"#FFF","stroke-width":"2",d:"M215.125 155.262l-1.902 20.075-10.87 5.958M174.601 176.636l-6.322 9.761H156.98l-4.484 6.449M175.874 127.28V111.56M221.51 119.404l-12.77 7.859-15.228-7.86V96.668"},null),g("path",{d:"M180.68 29.32C180.68 13.128 193.806 0 210 0c16.193 0 29.32 13.127 29.32 29.32 0 16.194-13.127 29.322-29.32 29.322-16.193 0-29.32-13.128-29.32-29.321",fill:"#A26EF4"},null),g("path",{d:"M221.45 41.706l-21.563-.125a1.744 1.744 0 0 1-1.734-1.754l.071-12.23a1.744 1.744 0 0 1 1.754-1.734l21.562.125c.964.006 1.74.791 1.735 1.755l-.071 12.229a1.744 1.744 0 0 1-1.754 1.734",fill:"#FFF"},null),g("path",{d:"M215.106 29.192c-.015 2.577-2.049 4.654-4.543 4.64-2.494-.014-4.504-2.115-4.489-4.693l.04-6.925c.016-2.577 2.05-4.654 4.543-4.64 2.494.015 4.504 2.116 4.49 4.693l-.04 6.925zm-4.53-14.074a6.877 6.877 0 0 0-6.916 6.837l-.043 7.368a6.877 6.877 0 0 0 13.754.08l.042-7.368a6.878 6.878 0 0 0-6.837-6.917zM167.566 68.367h-3.93a4.73 4.73 0 0 1-4.717-4.717 4.73 4.73 0 0 1 4.717-4.717h3.93a4.73 4.73 0 0 1 4.717 4.717 4.73 4.73 0 0 1-4.717 4.717",fill:"#FFF"},null),g("path",{d:"M168.214 248.838a6.611 6.611 0 0 1-6.61-6.611v-66.108a6.611 6.611 0 0 1 13.221 0v66.108a6.611 6.611 0 0 1-6.61 6.61",fill:"#5BA02E"},null),g("path",{d:"M176.147 248.176a6.611 6.611 0 0 1-6.61-6.61v-33.054a6.611 6.611 0 1 1 13.221 0v33.053a6.611 6.611 0 0 1-6.61 6.611",fill:"#92C110"},null),g("path",{d:"M185.994 293.89h-27.376a3.17 3.17 0 0 1-3.17-3.17v-45.887a3.17 3.17 0 0 1 3.17-3.17h27.376a3.17 3.17 0 0 1 3.17 3.17v45.886a3.17 3.17 0 0 1-3.17 3.17",fill:"#F2D7AD"},null),g("path",{d:"M81.972 147.673s6.377-.927 17.566-1.28c11.729-.371 17.57 1.086 17.57 1.086s3.697-3.855.968-8.424c1.278-12.077 5.982-32.827.335-48.273-1.116-1.339-3.743-1.512-7.536-.62-1.337.315-7.147-.149-7.983-.1l-15.311-.347s-3.487-.17-8.035-.508c-1.512-.113-4.227-1.683-5.458-.338-.406.443-2.425 5.669-1.97 16.077l8.635 35.642s-3.141 3.61 1.219 7.085",fill:"#FFF"},null),g("path",{d:"M75.768 73.325l-.9-6.397 11.982-6.52s7.302-.118 8.038 1.205c.737 1.324-5.616.993-5.616.993s-1.836 1.388-2.615 2.5c-1.654 2.363-.986 6.471-8.318 5.986-1.708.284-2.57 2.233-2.57 2.233",fill:"#FFC6A0"},null),g("path",{d:"M52.44 77.672s14.217 9.406 24.973 14.444c1.061.497-2.094 16.183-11.892 11.811-7.436-3.318-20.162-8.44-21.482-14.496-.71-3.258 2.543-7.643 8.401-11.76M141.862 80.113s-6.693 2.999-13.844 6.876c-3.894 2.11-10.137 4.704-12.33 7.988-6.224 9.314 3.536 11.22 12.947 7.503 6.71-2.651 28.999-12.127 13.227-22.367",fill:"#FFB594"},null),g("path",{d:"M76.166 66.36l3.06 3.881s-2.783 2.67-6.31 5.747c-7.103 6.195-12.803 14.296-15.995 16.44-3.966 2.662-9.754 3.314-12.177-.118-3.553-5.032.464-14.628 31.422-25.95",fill:"#FFC6A0"},null),g("path",{d:"M64.674 85.116s-2.34 8.413-8.912 14.447c.652.548 18.586 10.51 22.144 10.056 5.238-.669 6.417-18.968 1.145-20.531-.702-.208-5.901-1.286-8.853-2.167-.87-.26-1.611-1.71-3.545-.936l-1.98-.869zM128.362 85.826s5.318 1.956 7.325 13.734c-.546.274-17.55 12.35-21.829 7.805-6.534-6.94-.766-17.393 4.275-18.61 4.646-1.121 5.03-1.37 10.23-2.929",fill:"#FFF"},null),g("path",{d:"M78.18 94.656s.911 7.41-4.914 13.078",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M87.397 94.68s3.124 2.572 10.263 2.572c7.14 0 9.074-3.437 9.074-3.437",stroke:"#E4EBF7","stroke-width":".932","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M117.184 68.639l-6.781-6.177s-5.355-4.314-9.223-.893c-3.867 3.422 4.463 2.083 5.653 4.165 1.19 2.082.848 1.143-2.083.446-5.603-1.331-2.082.893 2.975 5.355 2.091 1.845 6.992.955 6.992.955l2.467-3.851z",fill:"#FFC6A0"},null),g("path",{d:"M105.282 91.315l-.297-10.937-15.918-.027-.53 10.45c-.026.403.17.788.515.999 2.049 1.251 9.387 5.093 15.799.424.287-.21.443-.554.431-.91",fill:"#FFB594"},null),g("path",{d:"M107.573 74.24c.817-1.147.982-9.118 1.015-11.928a1.046 1.046 0 0 0-.965-1.055l-4.62-.365c-7.71-1.044-17.071.624-18.253 6.346-5.482 5.813-.421 13.244-.421 13.244s1.963 3.566 4.305 6.791c.756 1.041.398-3.731 3.04-5.929 5.524-4.594 15.899-7.103 15.899-7.103",fill:"#5C2552"},null),g("path",{d:"M88.426 83.206s2.685 6.202 11.602 6.522c7.82.28 8.973-7.008 7.434-17.505l-.909-5.483c-6.118-2.897-15.478.54-15.478.54s-.576 2.044-.19 5.504c-2.276 2.066-1.824 5.618-1.824 5.618s-.905-1.922-1.98-2.321c-.86-.32-1.897.089-2.322 1.98-1.04 4.632 3.667 5.145 3.667 5.145",fill:"#FFC6A0"},null),g("path",{stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round",d:"M100.843 77.099l1.701-.928-1.015-4.324.674-1.406"},null),g("path",{d:"M105.546 74.092c-.022.713-.452 1.279-.96 1.263-.51-.016-.904-.607-.882-1.32.021-.713.452-1.278.96-1.263.51.016.904.607.882 1.32M97.592 74.349c-.022.713-.452 1.278-.961 1.263-.509-.016-.904-.607-.882-1.32.022-.713.452-1.279.961-1.263.51.016.904.606.882 1.32",fill:"#552950"},null),g("path",{d:"M91.132 86.786s5.269 4.957 12.679 2.327",stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M99.776 81.903s-3.592.232-1.44-2.79c1.59-1.496 4.897-.46 4.897-.46s1.156 3.906-3.457 3.25",fill:"#DB836E"},null),g("path",{d:"M102.88 70.6s2.483.84 3.402.715M93.883 71.975s2.492-1.144 4.778-1.073",stroke:"#5C2552","stroke-width":"1.526","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M86.32 77.374s.961.879 1.458 2.106c-.377.48-1.033 1.152-.236 1.809M99.337 83.719s1.911.151 2.509-.254",stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M87.782 115.821l15.73-3.012M100.165 115.821l10.04-2.008",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M66.508 86.763s-1.598 8.83-6.697 14.078",stroke:"#E4EBF7","stroke-width":"1.114","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M128.31 87.934s3.013 4.121 4.06 11.785",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M64.09 84.816s-6.03 9.912-13.607 9.903",stroke:"#DB836E","stroke-width":".795","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M112.366 65.909l-.142 5.32s5.993 4.472 11.945 9.202c4.482 3.562 8.888 7.455 10.985 8.662 4.804 2.766 8.9 3.355 11.076 1.808 4.071-2.894 4.373-9.878-8.136-15.263-4.271-1.838-16.144-6.36-25.728-9.73",fill:"#FFC6A0"},null),g("path",{d:"M130.532 85.488s4.588 5.757 11.619 6.214",stroke:"#DB836E","stroke-width":".75","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M121.708 105.73s-.393 8.564-1.34 13.612",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M115.784 161.512s-3.57-1.488-2.678-7.14",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M101.52 290.246s4.326 2.057 7.408 1.03c2.842-.948 4.564.673 7.132 1.186 2.57.514 6.925 1.108 11.772-1.269-.104-5.551-6.939-4.01-12.048-6.763-2.582-1.39-3.812-4.757-3.625-8.863h-9.471s-1.402 10.596-1.169 14.68",fill:"#CBD1D1"},null),g("path",{d:"M101.496 290.073s2.447 1.281 6.809.658c3.081-.44 3.74.485 7.479 1.039 3.739.554 10.802-.07 11.91-.9.415 1.108-.347 2.077-.347 2.077s-1.523.608-4.847.831c-2.045.137-5.843.293-7.663-.507-1.8-1.385-5.286-1.917-5.77-.243-3.947.958-7.41-.288-7.41-.288l-.16-2.667z",fill:"#2B0849"},null),g("path",{d:"M108.824 276.19h3.116s-.103 6.751 4.57 8.62c-4.673.624-8.62-2.32-7.686-8.62",fill:"#A4AABA"},null),g("path",{d:"M57.65 272.52s-2.122 7.47-4.518 12.396c-1.811 3.724-4.255 7.548 5.505 7.548 6.698 0 9.02-.483 7.479-6.648-1.541-6.164.268-13.296.268-13.296H57.65z",fill:"#CBD1D1"},null),g("path",{d:"M51.54 290.04s2.111 1.178 6.682 1.178c6.128 0 8.31-1.662 8.31-1.662s.605 1.122-.624 2.18c-1 .862-3.624 1.603-7.444 1.559-4.177-.049-5.876-.57-6.786-1.177-.831-.554-.692-1.593-.138-2.078",fill:"#2B0849"},null),g("path",{d:"M58.533 274.438s.034 1.529-.315 2.95c-.352 1.431-1.087 3.127-1.139 4.17-.058 1.16 4.57 1.592 5.194.035.623-1.559 1.303-6.475 1.927-7.306.622-.831-4.94-2.135-5.667.15",fill:"#A4AABA"},null),g("path",{d:"M100.885 277.015l13.306.092s1.291-54.228 1.843-64.056c.552-9.828 3.756-43.13.997-62.788l-12.48-.64-22.725.776s-.433 3.944-1.19 9.921c-.062.493-.677.838-.744 1.358-.075.582.42 1.347.318 1.956-2.35 14.003-6.343 32.926-8.697 46.425-.116.663-1.227 1.004-1.45 2.677-.04.3.21 1.516.112 1.785-6.836 18.643-10.89 47.584-14.2 61.551l14.528-.014s2.185-8.524 4.008-16.878c2.796-12.817 22.987-84.553 22.987-84.553l3-.517 1.037 46.1s-.223 1.228.334 2.008c.558.782-.556 1.117-.39 2.233l.39 1.784s-.446 7.14-.892 11.826c-.446 4.685-.092 38.954-.092 38.954",fill:"#7BB2F9"},null),g("path",{d:"M77.438 220.434c1.146.094 4.016-2.008 6.916-4.91M107.55 223.931s2.758-1.103 6.069-3.862",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M108.459 220.905s2.759-1.104 6.07-3.863",stroke:"#648BD8","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M76.099 223.557s2.608-.587 6.47-3.346M87.33 150.82c-.27 3.088.297 8.478-4.315 9.073M104.829 149.075s.11 13.936-1.286 14.983c-2.207 1.655-2.975 1.934-2.975 1.934M101.014 149.63s.035 12.81-1.19 24.245M94.93 174.965s7.174-1.655 9.38-1.655M75.671 204.754c-.316 1.55-.64 3.067-.973 4.535 0 0-1.45 1.822-1.003 3.756.446 1.934-.943 2.034-4.96 15.273-1.686 5.559-4.464 18.49-6.313 27.447-.078.38-4.018 18.06-4.093 18.423M77.043 196.743a313.269 313.269 0 0 1-.877 4.729M83.908 151.414l-1.19 10.413s-1.091.148-.496 2.23c.111 1.34-2.66 15.692-5.153 30.267M57.58 272.94h13.238",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M117.377 147.423s-16.955-3.087-35.7.199c.157 2.501-.002 4.128-.002 4.128s14.607-2.802 35.476-.31c.251-2.342.226-4.017.226-4.017",fill:"#192064"},null),g("path",{d:"M107.511 150.353l.004-4.885a.807.807 0 0 0-.774-.81c-2.428-.092-5.04-.108-7.795-.014a.814.814 0 0 0-.784.81l-.003 4.88c0 .456.371.82.827.808a140.76 140.76 0 0 1 7.688.017.81.81 0 0 0 .837-.806",fill:"#FFF"},null),g("path",{d:"M106.402 149.426l.002-3.06a.64.64 0 0 0-.616-.643 94.135 94.135 0 0 0-5.834-.009.647.647 0 0 0-.626.643l-.001 3.056c0 .36.291.648.651.64 1.78-.04 3.708-.041 5.762.012.36.009.662-.279.662-.64",fill:"#192064"},null),g("path",{d:"M101.485 273.933h12.272M102.652 269.075c.006 3.368.04 5.759.11 6.47M102.667 263.125c-.009 1.53-.015 2.98-.016 4.313M102.204 174.024l.893 44.402s.669 1.561-.224 2.677c-.892 1.116 2.455.67.893 2.231-1.562 1.562.893 1.116 0 3.347-.592 1.48-.988 20.987-1.09 34.956",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null)])]),afe=e=>{const{componentCls:t,lineHeightHeading3:n,iconCls:o,padding:r,paddingXL:i,paddingXS:a,paddingLG:l,marginXS:s,lineHeight:u}=e;return{[t]:{padding:`${l*2}px ${i}px`,"&-rtl":{direction:"rtl"}},[`${t} ${t}-image`]:{width:e.imageWidth,height:e.imageHeight,margin:"auto"},[`${t} ${t}-icon`]:{marginBottom:l,textAlign:"center",[`& > ${o}`]:{fontSize:e.resultIconFontSize}},[`${t} ${t}-title`]:{color:e.colorTextHeading,fontSize:e.resultTitleFontSize,lineHeight:n,marginBlock:s,textAlign:"center"},[`${t} ${t}-subtitle`]:{color:e.colorTextDescription,fontSize:e.resultSubtitleFontSize,lineHeight:u,textAlign:"center"},[`${t} ${t}-content`]:{marginTop:l,padding:`${l}px ${r*2.5}px`,backgroundColor:e.colorFillAlter},[`${t} ${t}-extra`]:{margin:e.resultExtraMargin,textAlign:"center","& > *":{marginInlineEnd:a,"&:last-child":{marginInlineEnd:0}}}}},lfe=e=>{const{componentCls:t,iconCls:n}=e;return{[`${t}-success ${t}-icon > ${n}`]:{color:e.resultSuccessIconColor},[`${t}-error ${t}-icon > ${n}`]:{color:e.resultErrorIconColor},[`${t}-info ${t}-icon > ${n}`]:{color:e.resultInfoIconColor},[`${t}-warning ${t}-icon > ${n}`]:{color:e.resultWarningIconColor}}},sfe=e=>[afe(e),lfe(e)],cfe=e=>sfe(e),ufe=Ue("Result",e=>{const{paddingLG:t,fontSizeHeading3:n}=e,o=e.fontSize,r=`${t}px 0 0 0`,i=e.colorInfo,a=e.colorError,l=e.colorSuccess,s=e.colorWarning,u=Be(e,{resultTitleFontSize:n,resultSubtitleFontSize:o,resultIconFontSize:n*3,resultExtraMargin:r,resultInfoIconColor:i,resultErrorIconColor:a,resultSuccessIconColor:l,resultWarningIconColor:s});return[cfe(u)]},{imageWidth:250,imageHeight:295}),dfe={success:qr,error:po,info:Jr,warning:s$},Mf={404:ofe,500:rfe,403:ife},ffe=Object.keys(Mf),pfe=()=>({prefixCls:String,icon:K.any,status:{type:[Number,String],default:"info"},title:K.any,subTitle:K.any,extra:K.any}),gfe=(e,t)=>{let{status:n,icon:o}=t;if(ffe.includes(`${n}`)){const a=Mf[n];return g("div",{class:`${e}-icon ${e}-image`},[g(a,null,null)])}const r=dfe[n],i=o||g(r,null,null);return g("div",{class:`${e}-icon`},[i])},hfe=(e,t)=>t&&g("div",{class:`${e}-extra`},[t]),Ll=le({compatConfig:{MODE:3},name:"AResult",inheritAttrs:!1,props:pfe(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("result",e),[a,l]=ufe(r),s=E(()=>ge(r.value,l.value,`${r.value}-${e.status}`,{[`${r.value}-rtl`]:i.value==="rtl"}));return()=>{var u,c,d,f,p,v,h,m;const b=(u=e.title)!==null&&u!==void 0?u:(c=n.title)===null||c===void 0?void 0:c.call(n),S=(d=e.subTitle)!==null&&d!==void 0?d:(f=n.subTitle)===null||f===void 0?void 0:f.call(n),C=(p=e.icon)!==null&&p!==void 0?p:(v=n.icon)===null||v===void 0?void 0:v.call(n),$=(h=e.extra)!==null&&h!==void 0?h:(m=n.extra)===null||m===void 0?void 0:m.call(n),x=r.value;return a(g("div",k(k({},o),{},{class:[s.value,o.class]}),[gfe(x,{status:e.status,icon:C}),g("div",{class:`${x}-title`},[b]),S&&g("div",{class:`${x}-subtitle`},[S]),hfe(x,$),n.default&&g("div",{class:`${x}-content`},[n.default()])]))}}});Ll.PRESENTED_IMAGE_403=Mf[403];Ll.PRESENTED_IMAGE_404=Mf[404];Ll.PRESENTED_IMAGE_500=Mf[500];Ll.install=function(e){return e.component(Ll.name,Ll),e};const vfe=Lt(Ax),c$=(e,t)=>{let{attrs:n}=t;const{included:o,vertical:r,style:i,class:a}=n;let{length:l,offset:s,reverse:u}=n;l<0&&(u=!u,l=Math.abs(l),s=100-s);const c=r?{[u?"top":"bottom"]:`${s}%`,[u?"bottom":"top"]:"auto",height:`${l}%`}:{[u?"right":"left"]:`${s}%`,[u?"left":"right"]:"auto",width:`${l}%`},d=y(y({},i),c);return o?g("div",{class:a,style:d},null):null};c$.inheritAttrs=!1;const mfe=(e,t,n,o,r,i)=>{const a=Object.keys(t).map(parseFloat).sort((l,s)=>l-s);if(n&&o)for(let l=r;l<=i;l+=o)a.indexOf(l)===-1&&a.push(l);return a},KD=(e,t)=>{let{attrs:n}=t;const{prefixCls:o,vertical:r,reverse:i,marks:a,dots:l,step:s,included:u,lowerBound:c,upperBound:d,max:f,min:p,dotStyle:v,activeDotStyle:h}=n,m=f-p,b=mfe(r,a,l,s,p,f).map(S=>{const C=`${Math.abs(S-p)/m*100}%`,$=!u&&S===d||u&&S<=d&&S>=c;let x=r?y(y({},v),{[i?"top":"bottom"]:C}):y(y({},v),{[i?"right":"left"]:C});$&&(x=y(y({},x),h));const P=ge({[`${o}-dot`]:!0,[`${o}-dot-active`]:$,[`${o}-dot-reverse`]:i});return g("span",{class:P,style:x,key:S},null)});return g("div",{class:`${o}-step`},[b])};KD.inheritAttrs=!1;const UD=(e,t)=>{let{attrs:n,slots:o}=t;const{class:r,vertical:i,reverse:a,marks:l,included:s,upperBound:u,lowerBound:c,max:d,min:f,onClickLabel:p}=n,v=Object.keys(l),h=o.mark,m=d-f,b=v.map(parseFloat).sort((S,C)=>S-C).map(S=>{const C=typeof l[S]=="function"?l[S]():l[S],$=typeof C=="object"&&!sn(C);let x=$?C.label:C;if(!x&&x!==0)return null;h&&(x=h({point:S,label:x}));const P=!s&&S===u||s&&S<=u&&S>=c,w=ge({[`${r}-text`]:!0,[`${r}-text-active`]:P}),O={marginBottom:"-50%",[a?"top":"bottom"]:`${(S-f)/m*100}%`},I={transform:`translateX(${a?"50%":"-50%"})`,msTransform:`translateX(${a?"50%":"-50%"})`,[a?"right":"left"]:`${(S-f)/m*100}%`},_=i?O:I,T=$?y(y({},_),C.style):_,A={[hn?"onTouchstartPassive":"onTouchstart"]:R=>p(R,S)};return g("span",k({class:w,style:T,key:S,onMousedown:R=>p(R,S)},A),[x])});return g("div",{class:r},[b])};UD.inheritAttrs=!1;const GD=le({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:K.oneOfType([K.number,K.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup(e,t){let{attrs:n,emit:o,expose:r}=t;const i=se(!1),a=se(),l=()=>{document.activeElement===a.value&&(i.value=!0)},s=m=>{i.value=!1,o("blur",m)},u=()=>{i.value=!1},c=()=>{var m;(m=a.value)===null||m===void 0||m.focus()},d=()=>{var m;(m=a.value)===null||m===void 0||m.blur()},f=()=>{i.value=!0,c()},p=m=>{m.preventDefault(),c(),o("mousedown",m)};r({focus:c,blur:d,clickFocus:f,ref:a});let v=null;Ke(()=>{v=Ht(document,"mouseup",l)}),tt(()=>{v==null||v.remove()});const h=E(()=>{const{vertical:m,offset:b,reverse:S}=e;return m?{[S?"top":"bottom"]:`${b}%`,[S?"bottom":"top"]:"auto",transform:S?null:"translateY(+50%)"}:{[S?"right":"left"]:`${b}%`,[S?"left":"right"]:"auto",transform:`translateX(${S?"+":"-"}50%)`}});return()=>{const{prefixCls:m,disabled:b,min:S,max:C,value:$,tabindex:x,ariaLabel:P,ariaLabelledBy:w,ariaValueTextFormatter:O,onMouseenter:I,onMouseleave:_}=e,T=ge(n.class,{[`${m}-handle-click-focused`]:i.value}),A={"aria-valuemin":S,"aria-valuemax":C,"aria-valuenow":$,"aria-disabled":!!b},R=[n.style,h.value];let H=x||0;(b||x===null)&&(H=null);let M;O&&(M=O($));const D=y(y(y(y({},n),{role:"slider",tabindex:H}),A),{class:T,onBlur:s,onKeydown:u,onMousedown:p,onMouseenter:I,onMouseleave:_,ref:a,style:R});return g("div",k(k({},D),{},{"aria-label":P,"aria-labelledby":w,"aria-valuetext":M}),null)}}});function cb(e,t){try{return Object.keys(t).some(n=>e.target===t[n].ref)}catch{return!1}}function XD(e,t){let{min:n,max:o}=t;return eo}function z4(e){return e.touches.length>1||e.type.toLowerCase()==="touchend"&&e.touches.length>0}function j4(e,t){let{marks:n,step:o,min:r,max:i}=t;const a=Object.keys(n).map(parseFloat);if(o!==null){const s=Math.pow(10,YD(o)),u=Math.floor((i*s-r*s)/(o*s)),c=Math.min((e-r)/o,u),d=Math.round(c)*o+r;a.push(d)}const l=a.map(s=>Math.abs(e-s));return a[l.indexOf(Math.min(...l))]}function YD(e){const t=e.toString();let n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n}function W4(e,t){let n=1;return window.visualViewport&&(n=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?t.clientY:t.pageX)/n}function V4(e,t){let n=1;return window.visualViewport&&(n=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?t.touches[0].clientY:t.touches[0].pageX)/n}function K4(e,t){const n=t.getBoundingClientRect();return e?n.top+n.height*.5:window.scrollX+n.left+n.width*.5}function u$(e,t){let{max:n,min:o}=t;return e<=o?o:e>=n?n:e}function qD(e,t){const{step:n}=t,o=isFinite(j4(e,t))?j4(e,t):0;return n===null?o:parseFloat(o.toFixed(YD(n)))}function Tc(e){e.stopPropagation(),e.preventDefault()}function bfe(e,t,n){const o={increase:(a,l)=>a+l,decrease:(a,l)=>a-l},r=o[e](Object.keys(n.marks).indexOf(JSON.stringify(t)),1),i=Object.keys(n.marks)[r];return n.step?o[e](t,n.step):Object.keys(n.marks).length&&n.marks[i]?n.marks[i]:t}function JD(e,t,n){const o="increase",r="decrease";let i=o;switch(e.keyCode){case Ie.UP:i=t&&n?r:o;break;case Ie.RIGHT:i=!t&&n?r:o;break;case Ie.DOWN:i=t&&n?o:r;break;case Ie.LEFT:i=!t&&n?o:r;break;case Ie.END:return(a,l)=>l.max;case Ie.HOME:return(a,l)=>l.min;case Ie.PAGE_UP:return(a,l)=>a+l.step*2;case Ie.PAGE_DOWN:return(a,l)=>a-l.step*2;default:return}return(a,l)=>bfe(i,a,l)}var yfe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{this.document=this.sliderRef&&this.sliderRef.ownerDocument;const{autofocus:n,disabled:o}=this;n&&!o&&this.focus()})},beforeUnmount(){this.$nextTick(()=>{this.removeDocumentEvents()})},methods:{defaultHandle(n){var{index:o,directives:r,className:i,style:a}=n,l=yfe(n,["index","directives","className","style"]);if(delete l.dragging,l.value===null)return null;const s=y(y({},l),{class:i,style:a,key:o});return g(GD,s,null)},onDown(n,o){let r=o;const{draggableTrack:i,vertical:a}=this.$props,{bounds:l}=this.$data,s=i&&this.positionGetValue?this.positionGetValue(r)||[]:[],u=cb(n,this.handlesRefs);if(this.dragTrack=i&&l.length>=2&&!u&&!s.map((c,d)=>{const f=d?!0:c>=l[d];return d===s.length-1?c<=l[d]:f}).some(c=>!c),this.dragTrack)this.dragOffset=r,this.startBounds=[...l];else{if(!u)this.dragOffset=0;else{const c=K4(a,n.target);this.dragOffset=r-c,r=c}this.onStart(r)}},onMouseDown(n){if(n.button!==0)return;this.removeDocumentEvents();const o=this.$props.vertical,r=W4(o,n);this.onDown(n,r),this.addDocumentMouseEvents()},onTouchStart(n){if(z4(n))return;const o=this.vertical,r=V4(o,n);this.onDown(n,r),this.addDocumentTouchEvents(),Tc(n)},onFocus(n){const{vertical:o}=this;if(cb(n,this.handlesRefs)&&!this.dragTrack){const r=K4(o,n.target);this.dragOffset=0,this.onStart(r),Tc(n),this.$emit("focus",n)}},onBlur(n){this.dragTrack||this.onEnd(),this.$emit("blur",n)},onMouseUp(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove(n){if(!this.sliderRef){this.onEnd();return}const o=W4(this.vertical,n);this.onMove(n,o-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove(n){if(z4(n)||!this.sliderRef){this.onEnd();return}const o=V4(this.vertical,n);this.onMove(n,o-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown(n){this.sliderRef&&cb(n,this.handlesRefs)&&this.onKeyboard(n)},onClickMarkLabel(n,o){n.stopPropagation(),this.onChange({sValue:o}),this.setState({sValue:o},()=>this.onEnd(!0))},getSliderStart(){const n=this.sliderRef,{vertical:o,reverse:r}=this,i=n.getBoundingClientRect();return o?r?i.bottom:i.top:window.scrollX+(r?i.right:i.left)},getSliderLength(){const n=this.sliderRef;if(!n)return 0;const o=n.getBoundingClientRect();return this.vertical?o.height:o.width},addDocumentTouchEvents(){this.onTouchMoveListener=Ht(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=Ht(this.document,"touchend",this.onEnd)},addDocumentMouseEvents(){this.onMouseMoveListener=Ht(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=Ht(this.document,"mouseup",this.onEnd)},removeDocumentEvents(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus(){var n;this.$props.disabled||(n=this.handlesRefs[0])===null||n===void 0||n.focus()},blur(){this.$props.disabled||Object.keys(this.handlesRefs).forEach(n=>{var o,r;(r=(o=this.handlesRefs[n])===null||o===void 0?void 0:o.blur)===null||r===void 0||r.call(o)})},calcValue(n){const{vertical:o,min:r,max:i}=this,a=Math.abs(Math.max(n,0)/this.getSliderLength());return o?(1-a)*(i-r)+r:a*(i-r)+r},calcValueByPos(n){const r=(this.reverse?-1:1)*(n-this.getSliderStart());return this.trimAlignValue(this.calcValue(r))},calcOffset(n){const{min:o,max:r}=this,i=(n-o)/(r-o);return Math.max(0,i*100)},saveSlider(n){this.sliderRef=n},saveHandle(n,o){this.handlesRefs[n]=o}},render(){const{prefixCls:n,marks:o,dots:r,step:i,included:a,disabled:l,vertical:s,reverse:u,min:c,max:d,maximumTrackStyle:f,railStyle:p,dotStyle:v,activeDotStyle:h,id:m}=this,{class:b,style:S}=this.$attrs,{tracks:C,handles:$}=this.renderSlider(),x=ge(n,b,{[`${n}-with-marks`]:Object.keys(o).length,[`${n}-disabled`]:l,[`${n}-vertical`]:s,[`${n}-horizontal`]:!s}),P={vertical:s,marks:o,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:d,min:c,reverse:u,class:`${n}-mark`,onClickLabel:l?fl:this.onClickMarkLabel},w={[hn?"onTouchstartPassive":"onTouchstart"]:l?fl:this.onTouchStart};return g("div",k(k({id:m,ref:this.saveSlider,tabindex:"-1",class:x},w),{},{onMousedown:l?fl:this.onMouseDown,onMouseup:l?fl:this.onMouseUp,onKeydown:l?fl:this.onKeyDown,onFocus:l?fl:this.onFocus,onBlur:l?fl:this.onBlur,style:S}),[g("div",{class:`${n}-rail`,style:y(y({},f),p)},null),C,g(KD,{prefixCls:n,vertical:s,reverse:u,marks:o,dots:r,step:i,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:d,min:c,dotStyle:v,activeDotStyle:h},null),$,g(UD,P,{mark:this.$slots.mark}),hv(this)])}})}const Sfe=le({compatConfig:{MODE:3},name:"Slider",mixins:[ls],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:K.oneOfType([K.number,K.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data(){const e=this.defaultValue!==void 0?this.defaultValue:this.min,t=this.value!==void 0?this.value:e;return{sValue:this.trimAlignValue(t),dragging:!1}},watch:{value:{handler(e){this.setChangeValue(e)},deep:!0},min(){const{sValue:e}=this;this.setChangeValue(e)},max(){const{sValue:e}=this;this.setChangeValue(e)}},methods:{setChangeValue(e){const t=e!==void 0?e:this.sValue,n=this.trimAlignValue(t,this.$props);n!==this.sValue&&(this.setState({sValue:n}),XD(t,this.$props)&&this.$emit("change",n))},onChange(e){const t=!ki(this,"value"),n=e.sValue>this.max?y(y({},e),{sValue:this.max}):e;t&&this.setState(n);const o=n.sValue;this.$emit("change",o)},onStart(e){this.setState({dragging:!0});const{sValue:t}=this;this.$emit("beforeChange",t);const n=this.calcValueByPos(e);this.startValue=n,this.startPosition=e,n!==t&&(this.prevMovedHandleIndex=0,this.onChange({sValue:n}))},onEnd(e){const{dragging:t}=this;this.removeDocumentEvents(),(t||e)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove(e,t){Tc(e);const{sValue:n}=this,o=this.calcValueByPos(t);o!==n&&this.onChange({sValue:o})},onKeyboard(e){const{reverse:t,vertical:n}=this.$props,o=JD(e,n,t);if(o){Tc(e);const{sValue:r}=this,i=o(r,this.$props),a=this.trimAlignValue(i);if(a===r)return;this.onChange({sValue:a}),this.$emit("afterChange",a),this.onEnd()}},getLowerBound(){const e=this.$props.startPoint||this.$props.min;return this.$data.sValue>e?e:this.$data.sValue},getUpperBound(){return this.$data.sValue1&&arguments[1]!==void 0?arguments[1]:{};if(e===null)return null;const n=y(y({},this.$props),t),o=u$(e,n);return qD(o,n)},getTrack(e){let{prefixCls:t,reverse:n,vertical:o,included:r,minimumTrackStyle:i,mergedTrackStyle:a,length:l,offset:s}=e;return g(c$,{class:`${t}-track`,vertical:o,included:r,offset:s,reverse:n,length:l,style:y(y({},i),a)},null)},renderSlider(){const{prefixCls:e,vertical:t,included:n,disabled:o,minimumTrackStyle:r,trackStyle:i,handleStyle:a,tabindex:l,ariaLabelForHandle:s,ariaLabelledByForHandle:u,ariaValueTextFormatterForHandle:c,min:d,max:f,startPoint:p,reverse:v,handle:h,defaultHandle:m}=this,b=h||m,{sValue:S,dragging:C}=this,$=this.calcOffset(S),x=b({class:`${e}-handle`,prefixCls:e,vertical:t,offset:$,value:S,dragging:C,disabled:o,min:d,max:f,reverse:v,index:0,tabindex:l,ariaLabel:s,ariaLabelledBy:u,ariaValueTextFormatter:c,style:a[0]||a,ref:O=>this.saveHandle(0,O),onFocus:this.onFocus,onBlur:this.onBlur}),P=p!==void 0?this.calcOffset(p):0,w=i[0]||i;return{tracks:this.getTrack({prefixCls:e,reverse:v,vertical:t,included:n,offset:P,minimumTrackStyle:r,mergedTrackStyle:w,length:$-P}),handles:x}}}}),Cfe=ZD(Sfe),wu=e=>{let{value:t,handle:n,bounds:o,props:r}=e;const{allowCross:i,pushable:a}=r,l=Number(a),s=u$(t,r);let u=s;return!i&&n!=null&&o!==void 0&&(n>0&&s<=o[n-1]+l&&(u=o[n-1]+l),n=o[n+1]-l&&(u=o[n+1]-l)),qD(u,r)},xfe={defaultValue:K.arrayOf(K.number),value:K.arrayOf(K.number),count:Number,pushable:K6(K.oneOfType([K.looseBool,K.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:K.arrayOf(K.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},$fe=le({compatConfig:{MODE:3},name:"Range",mixins:[ls],inheritAttrs:!1,props:Qe(xfe,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data(){const{count:e,min:t,max:n}=this,o=Array(...Array(e+1)).map(()=>t),r=ki(this,"defaultValue")?this.defaultValue:o;let{value:i}=this;i===void 0&&(i=r);const a=i.map((s,u)=>wu({value:s,handle:u,props:this.$props}));return{sHandle:null,recent:a[0]===n?0:a.length-1,bounds:a}},watch:{value:{handler(e){const{bounds:t}=this;this.setChangeValue(e||t)},deep:!0},min(){const{value:e}=this;this.setChangeValue(e||this.bounds)},max(){const{value:e}=this;this.setChangeValue(e||this.bounds)}},methods:{setChangeValue(e){const{bounds:t}=this;let n=e.map((o,r)=>wu({value:o,handle:r,bounds:t,props:this.$props}));if(t.length===n.length){if(n.every((o,r)=>o===t[r]))return null}else n=e.map((o,r)=>wu({value:o,handle:r,props:this.$props}));if(this.setState({bounds:n}),e.some(o=>XD(o,this.$props))){const o=e.map(r=>u$(r,this.$props));this.$emit("change",o)}},onChange(e){if(!ki(this,"value"))this.setState(e);else{const r={};["sHandle","recent"].forEach(i=>{e[i]!==void 0&&(r[i]=e[i])}),Object.keys(r).length&&this.setState(r)}const o=y(y({},this.$data),e).bounds;this.$emit("change",o)},positionGetValue(e){const t=this.getValue(),n=this.calcValueByPos(e),o=this.getClosestBound(n),r=this.getBoundNeedMoving(n,o),i=t[r];if(n===i)return null;const a=[...t];return a[r]=n,a},onStart(e){const{bounds:t}=this;this.$emit("beforeChange",t);const n=this.calcValueByPos(e);this.startValue=n,this.startPosition=e;const o=this.getClosestBound(n);this.prevMovedHandleIndex=this.getBoundNeedMoving(n,o),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});const r=t[this.prevMovedHandleIndex];if(n===r)return;const i=[...t];i[this.prevMovedHandleIndex]=n,this.onChange({bounds:i})},onEnd(e){const{sHandle:t}=this;this.removeDocumentEvents(),t||(this.dragTrack=!1),(t!==null||e)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove(e,t,n,o){Tc(e);const{$data:r,$props:i}=this,a=i.max||100,l=i.min||0;if(n){let f=i.vertical?-t:t;f=i.reverse?-f:f;const p=a-Math.max(...o),v=l-Math.min(...o),h=Math.min(Math.max(f/(this.getSliderLength()/100),v),p),m=o.map(b=>Math.floor(Math.max(Math.min(b+h,a),l)));r.bounds.map((b,S)=>b===m[S]).some(b=>!b)&&this.onChange({bounds:m});return}const{bounds:s,sHandle:u}=this,c=this.calcValueByPos(t),d=s[u];c!==d&&this.moveTo(c)},onKeyboard(e){const{reverse:t,vertical:n}=this.$props,o=JD(e,n,t);if(o){Tc(e);const{bounds:r,sHandle:i}=this,a=r[i===null?this.recent:i],l=o(a,this.$props),s=wu({value:l,handle:i,bounds:r,props:this.$props});if(s===a)return;this.moveTo(s,!0)}},getClosestBound(e){const{bounds:t}=this;let n=0;for(let o=1;o=t[o]&&(n=o);return Math.abs(t[n+1]-e)l-s),this.internalPointsCache={marks:e,step:t,points:a}}return this.internalPointsCache.points},moveTo(e,t){const n=[...this.bounds],{sHandle:o,recent:r}=this,i=o===null?r:o;n[i]=e;let a=i;this.$props.pushable!==!1?this.pushSurroundingHandles(n,a):this.$props.allowCross&&(n.sort((l,s)=>l-s),a=n.indexOf(e)),this.onChange({recent:a,sHandle:a,bounds:n}),t&&(this.$emit("afterChange",n),this.setState({},()=>{this.handlesRefs[a].focus()}),this.onEnd())},pushSurroundingHandles(e,t){const n=e[t],{pushable:o}=this,r=Number(o);let i=0;if(e[t+1]-n=o.length||i<0)return!1;const a=t+n,l=o[i],{pushable:s}=this,u=Number(s),c=n*(e[a]-l);return this.pushHandle(e,a,n,u-c)?(e[t]=l,!0):!1},trimAlignValue(e){const{sHandle:t,bounds:n}=this;return wu({value:e,handle:t,bounds:n,props:this.$props})},ensureValueNotConflict(e,t,n){let{allowCross:o,pushable:r}=n;const i=this.$data||{},{bounds:a}=i;if(e=e===void 0?i.sHandle:e,r=Number(r),!o&&e!=null&&a!==void 0){if(e>0&&t<=a[e-1]+r)return a[e-1]+r;if(e=a[e+1]-r)return a[e+1]-r}return t},getTrack(e){let{bounds:t,prefixCls:n,reverse:o,vertical:r,included:i,offsets:a,trackStyle:l}=e;return t.slice(0,-1).map((s,u)=>{const c=u+1,d=ge({[`${n}-track`]:!0,[`${n}-track-${c}`]:!0});return g(c$,{class:d,vertical:r,reverse:o,included:i,offset:a[c-1],length:a[c]-a[c-1],style:l[u],key:c},null)})},renderSlider(){const{sHandle:e,bounds:t,prefixCls:n,vertical:o,included:r,disabled:i,min:a,max:l,reverse:s,handle:u,defaultHandle:c,trackStyle:d,handleStyle:f,tabindex:p,ariaLabelGroupForHandles:v,ariaLabelledByGroupForHandles:h,ariaValueTextFormatterGroupForHandles:m}=this,b=u||c,S=t.map(x=>this.calcOffset(x)),C=`${n}-handle`,$=t.map((x,P)=>{let w=p[P]||0;(i||p[P]===null)&&(w=null);const O=e===P;return b({class:ge({[C]:!0,[`${C}-${P+1}`]:!0,[`${C}-dragging`]:O}),prefixCls:n,vertical:o,dragging:O,offset:S[P],value:x,index:P,tabindex:w,min:a,max:l,reverse:s,disabled:i,style:f[P],ref:I=>this.saveHandle(P,I),onFocus:this.onFocus,onBlur:this.onBlur,ariaLabel:v[P],ariaLabelledBy:h[P],ariaValueTextFormatter:m[P]})});return{tracks:this.getTrack({bounds:t,prefixCls:n,reverse:s,vertical:o,included:r,offsets:S,trackStyle:d}),handles:$}}}}),wfe=ZD($fe),Pfe=le({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:yA(),setup(e,t){let{attrs:n,slots:o}=t;const r=ae(null),i=ae(null);function a(){Ze.cancel(i.value),i.value=null}function l(){i.value=Ze(()=>{var u;(u=r.value)===null||u===void 0||u.forcePopupAlign(),i.value=null})}const s=()=>{a(),e.open&&l()};return be([()=>e.open,()=>e.title],()=>{s()},{flush:"post",immediate:!0}),lv(()=>{s()}),tt(()=>{a()}),()=>g(Ro,k(k({ref:r},e),n),o)}}),Ofe=e=>{const{componentCls:t,controlSize:n,dotSize:o,marginFull:r,marginPart:i,colorFillContentHover:a}=e;return{[t]:y(y({},qe(e)),{position:"relative",height:n,margin:`${i}px ${r}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${r}px ${i}px`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.colorFillTertiary,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${t}-track`]:{position:"absolute",backgroundColor:e.colorPrimaryBorder,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},"&:hover":{[`${t}-rail`]:{backgroundColor:e.colorFillSecondary},[`${t}-track`]:{backgroundColor:e.colorPrimaryBorderHover},[`${t}-dot`]:{borderColor:a},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.colorPrimary}},[`${t}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${t}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+e.handleLineWidth*2,height:e.handleSize+e.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:` + a ${a},${a} 0 1 1 ${-u},${c}`,f=Math.PI*2*a,p={stroke:n,strokeDasharray:`${t/100*(f-r)}px ${f}px`,strokeDashoffset:`-${r/2+e/100*(f-r)}px`,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s"};return{pathString:d,pathStyle:p}}const Ode=le({compatConfig:{MODE:3},name:"VCCircle",props:Qe(wde,xde),setup(e){NT+=1;const t=ae(NT),n=E(()=>LT(e.percent)),o=E(()=>LT(e.strokeColor)),[r,i]=Sx();$de(i);const a=()=>{const{prefixCls:l,strokeWidth:s,strokeLinecap:u,gapDegree:c,gapPosition:d}=e;let f=0;return n.value.map((p,v)=>{const h=o.value[v]||o.value[o.value.length-1],m=Object.prototype.toString.call(h)==="[object Object]"?`url(#${l}-gradient-${t.value})`:"",{pathString:b,pathStyle:S}=FT(f,p,h,s,c,d);f+=p;const C={key:v,d:b,stroke:m,"stroke-linecap":u,"stroke-width":s,opacity:p===0?0:1,"fill-opacity":"0",class:`${l}-circle-path`,style:S};return g("path",k({ref:r(v)},C),null)})};return()=>{const{prefixCls:l,strokeWidth:s,trailWidth:u,gapDegree:c,gapPosition:d,trailColor:f,strokeLinecap:p,strokeColor:v}=e,h=Pde(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","strokeColor"]),{pathString:m,pathStyle:b}=FT(0,100,f,s,c,d);delete h.percent;const S=o.value.find($=>Object.prototype.toString.call($)==="[object Object]"),C={d:m,stroke:f,"stroke-linecap":p,"stroke-width":u||s,"fill-opacity":"0",class:`${l}-circle-trail`,style:b};return g("svg",k({class:`${l}-circle`,viewBox:"0 0 100 100"},h),[S&&g("defs",null,[g("linearGradient",{id:`${l}-gradient-${t.value}`,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[Object.keys(S).sort(($,x)=>kT($)-kT(x)).map(($,x)=>g("stop",{key:x,offset:$,"stop-color":S[$]},null))])]),g("path",C,null),a().reverse()])}}}),Ide=()=>y(y({},Cm()),{strokeColor:It()}),Tde=3,Ede=e=>Tde/e*100,_de=le({compatConfig:{MODE:3},name:"ProgressCircle",inheritAttrs:!1,props:Qe(Ide(),{trailColor:null}),setup(e,t){let{slots:n,attrs:o}=t;const r=E(()=>{var h;return(h=e.width)!==null&&h!==void 0?h:120}),i=E(()=>{var h;return(h=e.size)!==null&&h!==void 0?h:[r.value,r.value]}),a=E(()=>xm(i.value,"circle")),l=E(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type==="dashboard")return 75}),s=E(()=>({width:`${a.value.width}px`,height:`${a.value.height}px`,fontSize:`${a.value.width*.15+6}px`})),u=E(()=>{var h;return(h=e.strokeWidth)!==null&&h!==void 0?h:Math.max(Ede(a.value.width),6)}),c=E(()=>e.gapPosition||e.type==="dashboard"&&"bottom"||void 0),d=E(()=>hde(e)),f=E(()=>Object.prototype.toString.call(e.strokeColor)==="[object Object]"),p=E(()=>vde({success:e.success,strokeColor:e.strokeColor})),v=E(()=>({[`${e.prefixCls}-inner`]:!0,[`${e.prefixCls}-circle-gradient`]:f.value}));return()=>{var h;const m=g(Ode,{percent:d.value,strokeWidth:u.value,trailWidth:u.value,strokeColor:p.value,strokeLinecap:e.strokeLinecap,trailColor:e.trailColor,prefixCls:e.prefixCls,gapDegree:l.value,gapPosition:c.value},null);return g("div",k(k({},o),{},{class:[v.value,o.class],style:[o.style,s.value]}),[a.value.width<=20?g(Ro,null,{default:()=>[g("span",null,[m])],title:n.default}):g(Le,null,[m,(h=n.default)===null||h===void 0?void 0:h.call(n)])])}}}),Mde=()=>y(y({},Cm()),{steps:Number,strokeColor:He(),trailColor:String}),Ade=le({compatConfig:{MODE:3},name:"Steps",props:Mde(),setup(e,t){let{slots:n}=t;const o=E(()=>Math.round(e.steps*((e.percent||0)/100))),r=E(()=>{var l;return(l=e.size)!==null&&l!==void 0?l:[e.size==="small"?2:14,e.strokeWidth||8]}),i=E(()=>xm(r.value,"step",{steps:e.steps,strokeWidth:e.strokeWidth||8})),a=E(()=>{const{steps:l,strokeColor:s,trailColor:u,prefixCls:c}=e,d=[];for(let f=0;f{var l;return g("div",{class:`${e.prefixCls}-steps-outer`},[a.value,(l=n.default)===null||l===void 0?void 0:l.call(n)])}}}),Rde=new at("antProgressActive",{"0%":{transform:"translateX(-100%) scaleX(0)",opacity:.1},"20%":{transform:"translateX(-100%) scaleX(0)",opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}}),Dde=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:y(y({},qe(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize,marginInlineEnd:e.marginXS,marginBottom:e.marginXS},[`${t}-outer`]:{display:"inline-block",width:"100%"},[`&${t}-show-info`]:{[`${t}-outer`]:{marginInlineEnd:`calc(-2em - ${e.marginXS}px)`,paddingInlineEnd:`calc(2em + ${e.paddingXS}px)`}},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:e.progressRemainingColor,borderRadius:e.progressLineRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorInfo}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",backgroundColor:e.colorInfo,borderRadius:e.progressLineRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",width:"2em",marginInlineStart:e.marginXS,color:e.progressInfoTextColor,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[n]:{fontSize:e.fontSize}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.progressLineRadius,opacity:0,animationName:Rde,animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},Nde=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.progressRemainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.colorText,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[n]:{fontSize:`${e.fontSize/e.fontSizeSM}em`}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},kde=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.progressRemainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.colorInfo}}}}}},Lde=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${n}`]:{fontSize:e.fontSizeSM}}}},Fde=Ue("Progress",e=>{const t=e.marginXXS/2,n=Be(e,{progressLineRadius:100,progressInfoTextColor:e.colorText,progressDefaultColor:e.colorInfo,progressRemainingColor:e.colorFillSecondary,progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Dde(n),Nde(n),kde(n),Lde(n)]});var Bde=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rArray.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor),u=E(()=>{const{percent:v=0}=e,h=Eh(e);return parseInt(h!==void 0?h.toString():v.toString(),10)}),c=E(()=>{const{status:v}=e;return!gde.includes(v)&&u.value>=100?"success":v||"normal"}),d=E(()=>{const{type:v,showInfo:h,size:m}=e,b=r.value;return{[b]:!0,[`${b}-inline-circle`]:v==="circle"&&xm(m,"circle").width<=20,[`${b}-${v==="dashboard"&&"circle"||v}`]:!0,[`${b}-status-${c.value}`]:!0,[`${b}-show-info`]:h,[`${b}-${m}`]:m,[`${b}-rtl`]:i.value==="rtl",[l.value]:!0}}),f=E(()=>typeof e.strokeColor=="string"||Array.isArray(e.strokeColor)?e.strokeColor:void 0),p=()=>{const{showInfo:v,format:h,type:m,percent:b,title:S}=e,C=Eh(e);if(!v)return null;let $;const x=h||(n==null?void 0:n.format)||(w=>`${w}%`),P=m==="line";return h||n!=null&&n.format||c.value!=="exception"&&c.value!=="success"?$=x(kl(b),kl(C)):c.value==="exception"?$=g(P?po:fo,null,null):c.value==="success"&&($=g(P?qr:Yc,null,null)),g("span",{class:`${r.value}-text`,title:S===void 0&&typeof $=="string"?$:void 0},[$])};return()=>{const{type:v,steps:h,title:m}=e,{class:b}=o,S=Bde(o,["class"]),C=p();let $;return v==="line"?$=h?g(Ade,k(k({},e),{},{strokeColor:f.value,prefixCls:r.value,steps:h}),{default:()=>[C]}):g(Cde,k(k({},e),{},{strokeColor:s.value,prefixCls:r.value,direction:i.value}),{default:()=>[C]}):(v==="circle"||v==="dashboard")&&($=g(_de,k(k({},e),{},{prefixCls:r.value,strokeColor:s.value,progressStatus:c.value}),{default:()=>[C]})),a(g("div",k(k({role:"progressbar"},S),{},{class:[d.value,b],title:m}),[$]))}}}),a$=Lt(Hde);function zde(e){let t=e.scrollX;const n="scrollLeft";if(typeof t!="number"){const o=e.document;t=o.documentElement[n],typeof t!="number"&&(t=o.body[n])}return t}function jde(e){let t,n;const o=e.ownerDocument,{body:r}=o,i=o&&o.documentElement,a=e.getBoundingClientRect();return t=a.left,n=a.top,t-=i.clientLeft||r.clientLeft||0,n-=i.clientTop||r.clientTop||0,{left:t,top:n}}function Wde(e){const t=jde(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=zde(o),t.left}var Vde={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"};function BT(e){for(var t=1;t{const{index:s}=e;n("hover",l,s)},r=l=>{const{index:s}=e;n("click",l,s)},i=l=>{const{index:s}=e;l.keyCode===13&&n("click",l,s)},a=E(()=>{const{prefixCls:l,index:s,value:u,allowHalf:c,focused:d}=e,f=s+1;let p=l;return u===0&&s===0&&d?p+=` ${l}-focused`:c&&u+.5>=f&&u{const{disabled:l,prefixCls:s,characterRender:u,character:c,index:d,count:f,value:p}=e,v=typeof c=="function"?c({disabled:l,prefixCls:s,index:d,count:f,value:p}):c;let h=g("li",{class:a.value},[g("div",{onClick:l?null:r,onKeydown:l?null:i,onMousemove:l?null:o,role:"radio","aria-checked":p>d?"true":"false","aria-posinset":d+1,"aria-setsize":f,tabindex:l?-1:0},[g("div",{class:`${s}-first`},[v]),g("div",{class:`${s}-second`},[v])])]);return u&&(h=u(h,e)),h}}}),Xde=e=>{const{componentCls:t}=e;return{[`${t}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:e.marginXS},"> div":{transition:`all ${e.motionDurationMid}, outline 0s`,"&:hover":{transform:e.rateStarHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${e.lineWidth}px dashed ${e.rateStarColor}`,transform:e.rateStarHoverScale}},"&-first, &-second":{color:e.defaultColor,transition:`all ${e.motionDurationMid}`,userSelect:"none",[e.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${t}-star-first, &-half ${t}-star-second`]:{opacity:1},[`&-half ${t}-star-first, &-full ${t}-star-second`]:{color:"inherit"}}}},Yde=e=>({[`&-rtl${e.componentCls}`]:{direction:"rtl"}}),qde=e=>{const{componentCls:t}=e;return{[t]:y(y(y(y(y({},qe(e)),{display:"inline-block",margin:0,padding:0,color:e.rateStarColor,fontSize:e.rateStarSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${t} ${t}-star`]:{cursor:"default","&:hover":{transform:"scale(1)"}}}),Xde(e)),{[`+ ${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,fontSize:e.fontSize}}),Yde(e))}},Jde=Ue("Rate",e=>{const{colorFillContent:t}=e,n=Be(e,{rateStarColor:e["yellow-6"],rateStarSize:e.controlHeightLG*.5,rateStarHoverScale:"scale(1.1)",defaultColor:t});return[qde(n)]}),Zde=()=>({prefixCls:String,count:Number,value:Number,allowHalf:{type:Boolean,default:void 0},allowClear:{type:Boolean,default:void 0},tooltips:Array,disabled:{type:Boolean,default:void 0},character:K.any,autofocus:{type:Boolean,default:void 0},tabindex:K.oneOfType([K.number,K.string]),direction:String,id:String,onChange:Function,onHoverChange:Function,"onUpdate:value":Function,onFocus:Function,onBlur:Function,onKeydown:Function}),Qde=le({compatConfig:{MODE:3},name:"ARate",inheritAttrs:!1,props:Qe(Zde(),{value:0,count:5,allowHalf:!1,allowClear:!0,tabindex:0,direction:"ltr"}),setup(e,t){let{slots:n,attrs:o,emit:r,expose:i}=t;const{prefixCls:a,direction:l}=Te("rate",e),[s,u]=Jde(a),c=bn(),d=ae(),[f,p]=Sx(),v=rt({value:e.value,focused:!1,cleanedValue:null,hoverValue:void 0});be(()=>e.value,()=>{v.value=e.value});const h=T=>Co(p.value.get(T)),m=(T,A)=>{const R=l.value==="rtl";let H=T+1;if(e.allowHalf){const M=h(T),D=Wde(M),N=M.clientWidth;(R&&A-D>N/2||!R&&A-D{e.value===void 0&&(v.value=T),r("update:value",T),r("change",T),c.onFieldChange()},S=(T,A)=>{const R=m(A,T.pageX);R!==v.cleanedValue&&(v.hoverValue=R,v.cleanedValue=null),r("hoverChange",R)},C=()=>{v.hoverValue=void 0,v.cleanedValue=null,r("hoverChange",void 0)},$=(T,A)=>{const{allowClear:R}=e,H=m(A,T.pageX);let M=!1;R&&(M=H===v.value),C(),b(M?0:H),v.cleanedValue=M?H:null},x=T=>{v.focused=!0,r("focus",T)},P=T=>{v.focused=!1,r("blur",T),c.onFieldBlur()},w=T=>{const{keyCode:A}=T,{count:R,allowHalf:H}=e,M=l.value==="rtl";A===Ie.RIGHT&&v.value0&&!M||A===Ie.RIGHT&&v.value>0&&M?(H?v.value-=.5:v.value-=1,b(v.value),T.preventDefault()):A===Ie.LEFT&&v.value{e.disabled||d.value.focus()};i({focus:O,blur:()=>{e.disabled||d.value.blur()}}),Ke(()=>{const{autofocus:T,disabled:A}=e;T&&!A&&O()});const _=(T,A)=>{let{index:R}=A;const{tooltips:H}=e;return H?g(Ro,{title:H[R]},{default:()=>[T]}):T};return()=>{const{count:T,allowHalf:A,disabled:R,tabindex:H,id:M=c.id.value}=e,{class:D,style:N}=o,L=[],F=R?`${a.value}-disabled`:"",B=e.character||n.character||(()=>g(l$,null,null));for(let z=0;zg("svg",{width:"252",height:"294"},[g("defs",null,[g("path",{d:"M0 .387h251.772v251.772H0z"},null)]),g("g",{fill:"none","fill-rule":"evenodd"},[g("g",{transform:"translate(0 .012)"},[g("mask",{fill:"#fff"},null),g("path",{d:"M0 127.32v-2.095C0 56.279 55.892.387 124.838.387h2.096c68.946 0 124.838 55.892 124.838 124.838v2.096c0 68.946-55.892 124.838-124.838 124.838h-2.096C55.892 252.16 0 196.267 0 127.321",fill:"#E4EBF7",mask:"url(#b)"},null)]),g("path",{d:"M39.755 130.84a8.276 8.276 0 1 1-16.468-1.66 8.276 8.276 0 0 1 16.468 1.66",fill:"#FFF"},null),g("path",{d:"M36.975 134.297l10.482 5.943M48.373 146.508l-12.648 10.788",stroke:"#FFF","stroke-width":"2"},null),g("path",{d:"M39.875 159.352a5.667 5.667 0 1 1-11.277-1.136 5.667 5.667 0 0 1 11.277 1.136M57.588 143.247a5.708 5.708 0 1 1-11.358-1.145 5.708 5.708 0 0 1 11.358 1.145M99.018 26.875l29.82-.014a4.587 4.587 0 1 0-.003-9.175l-29.82.013a4.587 4.587 0 1 0 .003 9.176M110.424 45.211l29.82-.013a4.588 4.588 0 0 0-.004-9.175l-29.82.013a4.587 4.587 0 1 0 .004 9.175",fill:"#FFF"},null),g("path",{d:"M112.798 26.861v-.002l15.784-.006a4.588 4.588 0 1 0 .003 9.175l-15.783.007v-.002a4.586 4.586 0 0 0-.004-9.172M184.523 135.668c-.553 5.485-5.447 9.483-10.931 8.93-5.485-.553-9.483-5.448-8.93-10.932.552-5.485 5.447-9.483 10.932-8.93 5.485.553 9.483 5.447 8.93 10.932",fill:"#FFF"},null),g("path",{d:"M179.26 141.75l12.64 7.167M193.006 156.477l-15.255 13.011",stroke:"#FFF","stroke-width":"2"},null),g("path",{d:"M184.668 170.057a6.835 6.835 0 1 1-13.6-1.372 6.835 6.835 0 0 1 13.6 1.372M203.34 153.325a6.885 6.885 0 1 1-13.7-1.382 6.885 6.885 0 0 1 13.7 1.382",fill:"#FFF"},null),g("path",{d:"M151.931 192.324a2.222 2.222 0 1 1-4.444 0 2.222 2.222 0 0 1 4.444 0zM225.27 116.056a2.222 2.222 0 1 1-4.445 0 2.222 2.222 0 0 1 4.444 0zM216.38 151.08a2.223 2.223 0 1 1-4.446-.001 2.223 2.223 0 0 1 4.446 0zM176.917 107.636a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM195.291 92.165a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM202.058 180.711a2.223 2.223 0 1 1-4.446 0 2.223 2.223 0 0 1 4.446 0z",stroke:"#FFF","stroke-width":"2"},null),g("path",{stroke:"#FFF","stroke-width":"2",d:"M214.404 153.302l-1.912 20.184-10.928 5.99M173.661 174.792l-6.356 9.814h-11.36l-4.508 6.484M174.941 125.168v-15.804M220.824 117.25l-12.84 7.901-15.31-7.902V94.39"},null),g("path",{d:"M166.588 65.936h-3.951a4.756 4.756 0 0 1-4.743-4.742 4.756 4.756 0 0 1 4.743-4.743h3.951a4.756 4.756 0 0 1 4.743 4.743 4.756 4.756 0 0 1-4.743 4.742",fill:"#FFF"},null),g("path",{d:"M174.823 30.03c0-16.281 13.198-29.48 29.48-29.48 16.28 0 29.48 13.199 29.48 29.48 0 16.28-13.2 29.48-29.48 29.48-16.282 0-29.48-13.2-29.48-29.48",fill:"#1890FF"},null),g("path",{d:"M205.952 38.387c.5.5.785 1.142.785 1.928s-.286 1.465-.785 1.964c-.572.5-1.214.75-2 .75-.785 0-1.429-.285-1.929-.785-.572-.5-.82-1.143-.82-1.929s.248-1.428.82-1.928c.5-.5 1.144-.75 1.93-.75.785 0 1.462.25 1.999.75m4.285-19.463c1.428 1.249 2.143 2.963 2.143 5.142 0 1.712-.427 3.13-1.219 4.25-.067.096-.137.18-.218.265-.416.429-1.41 1.346-2.956 2.699a5.07 5.07 0 0 0-1.428 1.75 5.207 5.207 0 0 0-.536 2.357v.5h-4.107v-.5c0-1.357.215-2.536.714-3.5.464-.964 1.857-2.464 4.178-4.536l.43-.5c.643-.785.964-1.643.964-2.535 0-1.18-.358-2.108-1-2.785-.678-.68-1.643-1.001-2.858-1.001-1.536 0-2.642.464-3.357 1.43-.37.5-.621 1.135-.76 1.904a1.999 1.999 0 0 1-1.971 1.63h-.004c-1.277 0-2.257-1.183-1.98-2.43.337-1.518 1.02-2.78 2.073-3.784 1.536-1.5 3.607-2.25 6.25-2.25 2.32 0 4.214.607 5.642 1.894",fill:"#FFF"},null),g("path",{d:"M52.04 76.131s21.81 5.36 27.307 15.945c5.575 10.74-6.352 9.26-15.73 4.935-10.86-5.008-24.7-11.822-11.577-20.88",fill:"#FFB594"},null),g("path",{d:"M90.483 67.504l-.449 2.893c-.753.49-4.748-2.663-4.748-2.663l-1.645.748-1.346-5.684s6.815-4.589 8.917-5.018c2.452-.501 9.884.94 10.7 2.278 0 0 1.32.486-2.227.69-3.548.203-5.043.447-6.79 3.132-1.747 2.686-2.412 3.624-2.412 3.624",fill:"#FFC6A0"},null),g("path",{d:"M128.055 111.367c-2.627-7.724-6.15-13.18-8.917-15.478-3.5-2.906-9.34-2.225-11.366-4.187-1.27-1.231-3.215-1.197-3.215-1.197s-14.98-3.158-16.828-3.479c-2.37-.41-2.124-.714-6.054-1.405-1.57-1.907-2.917-1.122-2.917-1.122l-7.11-1.383c-.853-1.472-2.423-1.023-2.423-1.023l-2.468-.897c-1.645 9.976-7.74 13.796-7.74 13.796 1.795 1.122 15.703 8.3 15.703 8.3l5.107 37.11s-3.321 5.694 1.346 9.109c0 0 19.883-3.743 34.921-.329 0 0 3.047-2.546.972-8.806.523-3.01 1.394-8.263 1.736-11.622.385.772 2.019 1.918 3.14 3.477 0 0 9.407-7.365 11.052-14.012-.832-.723-1.598-1.585-2.267-2.453-.567-.736-.358-2.056-.765-2.717-.669-1.084-1.804-1.378-1.907-1.682",fill:"#FFF"},null),g("path",{d:"M101.09 289.998s4.295 2.041 7.354 1.021c2.821-.94 4.53.668 7.08 1.178 2.55.51 6.874 1.1 11.686-1.26-.103-5.51-6.889-3.98-11.96-6.713-2.563-1.38-3.784-4.722-3.598-8.799h-9.402s-1.392 10.52-1.16 14.573",fill:"#CBD1D1"},null),g("path",{d:"M101.067 289.826s2.428 1.271 6.759.653c3.058-.437 3.712.481 7.423 1.031 3.712.55 10.724-.069 11.823-.894.413 1.1-.343 2.063-.343 2.063s-1.512.603-4.812.824c-2.03.136-5.8.291-7.607-.503-1.787-1.375-5.247-1.903-5.728-.241-3.918.95-7.355-.286-7.355-.286l-.16-2.647z",fill:"#2B0849"},null),g("path",{d:"M108.341 276.044h3.094s-.103 6.702 4.536 8.558c-4.64.618-8.558-2.303-7.63-8.558",fill:"#A4AABA"},null),g("path",{d:"M57.542 272.401s-2.107 7.416-4.485 12.306c-1.798 3.695-4.225 7.492 5.465 7.492 6.648 0 8.953-.48 7.423-6.599-1.53-6.12.266-13.199.266-13.199h-8.669z",fill:"#CBD1D1"},null),g("path",{d:"M51.476 289.793s2.097 1.169 6.633 1.169c6.083 0 8.249-1.65 8.249-1.65s.602 1.114-.619 2.165c-.993.855-3.597 1.591-7.39 1.546-4.145-.048-5.832-.566-6.736-1.168-.825-.55-.687-1.58-.137-2.062",fill:"#2B0849"},null),g("path",{d:"M58.419 274.304s.033 1.519-.314 2.93c-.349 1.42-1.078 3.104-1.13 4.139-.058 1.151 4.537 1.58 5.155.034.62-1.547 1.294-6.427 1.913-7.252.619-.825-4.903-2.119-5.624.15",fill:"#A4AABA"},null),g("path",{d:"M99.66 278.514l13.378.092s1.298-54.52 1.853-64.403c.554-9.882 3.776-43.364 1.002-63.128l-12.547-.644-22.849.78s-.434 3.966-1.195 9.976c-.063.496-.682.843-.749 1.365-.075.585.423 1.354.32 1.966-2.364 14.08-6.377 33.104-8.744 46.677-.116.666-1.234 1.009-1.458 2.691-.04.302.211 1.525.112 1.795-6.873 18.744-10.949 47.842-14.277 61.885l14.607-.014s2.197-8.57 4.03-16.97c2.811-12.886 23.111-85.01 23.111-85.01l3.016-.521 1.043 46.35s-.224 1.234.337 2.02c.56.785-.56 1.123-.392 2.244l.392 1.794s-.449 7.178-.898 11.89c-.448 4.71-.092 39.165-.092 39.165",fill:"#7BB2F9"},null),g("path",{d:"M76.085 221.626c1.153.094 4.038-2.019 6.955-4.935M106.36 225.142s2.774-1.11 6.103-3.883",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M107.275 222.1s2.773-1.11 6.102-3.884",stroke:"#648BD8","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M74.74 224.767s2.622-.591 6.505-3.365M86.03 151.634c-.27 3.106.3 8.525-4.336 9.123M103.625 149.88s.11 14.012-1.293 15.065c-2.219 1.664-2.99 1.944-2.99 1.944M99.79 150.438s.035 12.88-1.196 24.377M93.673 175.911s7.212-1.664 9.431-1.664M74.31 205.861a212.013 212.013 0 0 1-.979 4.56s-1.458 1.832-1.009 3.776c.449 1.944-.947 2.045-4.985 15.355-1.696 5.59-4.49 18.591-6.348 27.597l-.231 1.12M75.689 197.807a320.934 320.934 0 0 1-.882 4.754M82.591 152.233L81.395 162.7s-1.097.15-.5 2.244c.113 1.346-2.674 15.775-5.18 30.43M56.12 274.418h13.31",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M116.241 148.22s-17.047-3.104-35.893.2c.158 2.514-.003 4.15-.003 4.15s14.687-2.818 35.67-.312c.252-2.355.226-4.038.226-4.038",fill:"#192064"},null),g("path",{d:"M106.322 151.165l.003-4.911a.81.81 0 0 0-.778-.815c-2.44-.091-5.066-.108-7.836-.014a.818.818 0 0 0-.789.815l-.003 4.906a.81.81 0 0 0 .831.813c2.385-.06 4.973-.064 7.73.017a.815.815 0 0 0 .842-.81",fill:"#FFF"},null),g("path",{d:"M105.207 150.233l.002-3.076a.642.642 0 0 0-.619-.646 94.321 94.321 0 0 0-5.866-.01.65.65 0 0 0-.63.647v3.072a.64.64 0 0 0 .654.644 121.12 121.12 0 0 1 5.794.011c.362.01.665-.28.665-.642",fill:"#192064"},null),g("path",{d:"M100.263 275.415h12.338M101.436 270.53c.006 3.387.042 5.79.111 6.506M101.451 264.548a915.75 915.75 0 0 0-.015 4.337M100.986 174.965l.898 44.642s.673 1.57-.225 2.692c-.897 1.122 2.468.673.898 2.243-1.57 1.57.897 1.122 0 3.365-.596 1.489-.994 21.1-1.096 35.146",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M46.876 83.427s-.516 6.045 7.223 5.552c11.2-.712 9.218-9.345 31.54-21.655-.786-2.708-2.447-4.744-2.447-4.744s-11.068 3.11-22.584 8.046c-6.766 2.9-13.395 6.352-13.732 12.801M104.46 91.057l.941-5.372-8.884-11.43-5.037 5.372-1.74 7.834a.321.321 0 0 0 .108.32c.965.8 6.5 5.013 14.347 3.544a.332.332 0 0 0 .264-.268",fill:"#FFC6A0"},null),g("path",{d:"M93.942 79.387s-4.533-2.853-2.432-6.855c1.623-3.09 4.513 1.133 4.513 1.133s.52-3.642 3.121-3.642c.52-1.04 1.561-4.162 1.561-4.162s11.445 2.601 13.526 3.121c0 5.203-2.304 19.424-7.84 19.861-8.892.703-12.449-9.456-12.449-9.456",fill:"#FFC6A0"},null),g("path",{d:"M113.874 73.446c2.601-2.081 3.47-9.722 3.47-9.722s-2.479-.49-6.64-2.05c-4.683-2.081-12.798-4.747-17.48.976-9.668 3.223-2.05 19.823-2.05 19.823l2.713-3.021s-3.935-3.287-2.08-6.243c2.17-3.462 3.92 1.073 3.92 1.073s.637-2.387 3.581-3.342c.355-.71 1.036-2.674 1.432-3.85a1.073 1.073 0 0 1 1.263-.704c2.4.558 8.677 2.019 11.356 2.662.522.125.871.615.82 1.15l-.305 3.248z",fill:"#520038"},null),g("path",{d:"M104.977 76.064c-.103.61-.582 1.038-1.07.956-.489-.083-.801-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.644.698 1.254M112.132 77.694c-.103.61-.582 1.038-1.07.956-.488-.083-.8-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.643.698 1.254",fill:"#552950"},null),g("path",{stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round",d:"M110.13 74.84l-.896 1.61-.298 4.357h-2.228"},null),g("path",{d:"M110.846 74.481s1.79-.716 2.506.537",stroke:"#5C2552","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M92.386 74.282s.477-1.114 1.113-.716c.637.398 1.274 1.433.558 1.99-.717.556.159 1.67.159 1.67",stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M103.287 72.93s1.83 1.113 4.137.954",stroke:"#5C2552","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M103.685 81.762s2.227 1.193 4.376 1.193M104.64 84.308s.954.398 1.511.318M94.693 81.205s2.308 7.4 10.424 7.639",stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M81.45 89.384s.45 5.647-4.935 12.787M69 82.654s-.726 9.282-8.204 14.206",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M129.405 122.865s-5.272 7.403-9.422 10.768",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M119.306 107.329s.452 4.366-2.127 32.062",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M150.028 151.232h-49.837a1.01 1.01 0 0 1-1.01-1.01v-31.688c0-.557.452-1.01 1.01-1.01h49.837c.558 0 1.01.453 1.01 1.01v31.688a1.01 1.01 0 0 1-1.01 1.01",fill:"#F2D7AD"},null),g("path",{d:"M150.29 151.232h-19.863v-33.707h20.784v32.786a.92.92 0 0 1-.92.92",fill:"#F4D19D"},null),g("path",{d:"M123.554 127.896H92.917a.518.518 0 0 1-.425-.816l6.38-9.113c.193-.277.51-.442.85-.442h31.092l-7.26 10.371z",fill:"#F2D7AD"},null),g("path",{fill:"#CC9B6E",d:"M123.689 128.447H99.25v-.519h24.169l7.183-10.26.424.298z"},null),g("path",{d:"M158.298 127.896h-18.669a2.073 2.073 0 0 1-1.659-.83l-7.156-9.541h19.965c.49 0 .95.23 1.244.622l6.69 8.92a.519.519 0 0 1-.415.83",fill:"#F4D19D"},null),g("path",{fill:"#CC9B6E",d:"M157.847 128.479h-19.384l-7.857-10.475.415-.31 7.7 10.266h19.126zM130.554 150.685l-.032-8.177.519-.002.032 8.177z"},null),g("path",{fill:"#CC9B6E",d:"M130.511 139.783l-.08-21.414.519-.002.08 21.414zM111.876 140.932l-.498-.143 1.479-5.167.498.143zM108.437 141.06l-2.679-2.935 2.665-3.434.41.318-2.397 3.089 2.384 2.612zM116.607 141.06l-.383-.35 2.383-2.612-2.397-3.089.41-.318 2.665 3.434z"},null),g("path",{d:"M154.316 131.892l-3.114-1.96.038 3.514-1.043.092c-1.682.115-3.634.23-4.789.23-1.902 0-2.693 2.258 2.23 2.648l-2.645-.596s-2.168 1.317.504 2.3c0 0-1.58 1.217.561 2.58-.584 3.504 5.247 4.058 7.122 3.59 1.876-.47 4.233-2.359 4.487-5.16.28-3.085-.89-5.432-3.35-7.238",fill:"#FFC6A0"},null),g("path",{d:"M153.686 133.577s-6.522.47-8.36.372c-1.836-.098-1.904 2.19 2.359 2.264 3.739.15 5.451-.044 5.451-.044",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M145.16 135.877c-1.85 1.346.561 2.355.561 2.355s3.478.898 6.73.617",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M151.89 141.71s-6.28.111-6.73-2.132c-.223-1.346.45-1.402.45-1.402M146.114 140.868s-1.103 3.16 5.44 3.533M151.202 129.932v3.477M52.838 89.286c3.533-.337 8.423-1.248 13.582-7.754",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M168.567 248.318a6.647 6.647 0 0 1-6.647-6.647v-66.466a6.647 6.647 0 1 1 13.294 0v66.466a6.647 6.647 0 0 1-6.647 6.647",fill:"#5BA02E"},null),g("path",{d:"M176.543 247.653a6.647 6.647 0 0 1-6.646-6.647v-33.232a6.647 6.647 0 1 1 13.293 0v33.232a6.647 6.647 0 0 1-6.647 6.647",fill:"#92C110"},null),g("path",{d:"M186.443 293.613H158.92a3.187 3.187 0 0 1-3.187-3.187v-46.134a3.187 3.187 0 0 1 3.187-3.187h27.524a3.187 3.187 0 0 1 3.187 3.187v46.134a3.187 3.187 0 0 1-3.187 3.187",fill:"#F2D7AD"},null),g("path",{d:"M88.979 89.48s7.776 5.384 16.6 2.842",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null)])]),rfe=()=>g("svg",{width:"254",height:"294"},[g("defs",null,[g("path",{d:"M0 .335h253.49v253.49H0z"},null),g("path",{d:"M0 293.665h253.49V.401H0z"},null)]),g("g",{fill:"none","fill-rule":"evenodd"},[g("g",{transform:"translate(0 .067)"},[g("mask",{fill:"#fff"},null),g("path",{d:"M0 128.134v-2.11C0 56.608 56.273.334 125.69.334h2.11c69.416 0 125.69 56.274 125.69 125.69v2.11c0 69.417-56.274 125.69-125.69 125.69h-2.11C56.273 253.824 0 197.551 0 128.134",fill:"#E4EBF7",mask:"url(#b)"},null)]),g("path",{d:"M39.989 132.108a8.332 8.332 0 1 1-16.581-1.671 8.332 8.332 0 0 1 16.58 1.671",fill:"#FFF"},null),g("path",{d:"M37.19 135.59l10.553 5.983M48.665 147.884l-12.734 10.861",stroke:"#FFF","stroke-width":"2"},null),g("path",{d:"M40.11 160.816a5.706 5.706 0 1 1-11.354-1.145 5.706 5.706 0 0 1 11.354 1.145M57.943 144.6a5.747 5.747 0 1 1-11.436-1.152 5.747 5.747 0 0 1 11.436 1.153M99.656 27.434l30.024-.013a4.619 4.619 0 1 0-.004-9.238l-30.024.013a4.62 4.62 0 0 0 .004 9.238M111.14 45.896l30.023-.013a4.62 4.62 0 1 0-.004-9.238l-30.024.013a4.619 4.619 0 1 0 .004 9.238",fill:"#FFF"},null),g("path",{d:"M113.53 27.421v-.002l15.89-.007a4.619 4.619 0 1 0 .005 9.238l-15.892.007v-.002a4.618 4.618 0 0 0-.004-9.234M150.167 70.091h-3.979a4.789 4.789 0 0 1-4.774-4.775 4.788 4.788 0 0 1 4.774-4.774h3.979a4.789 4.789 0 0 1 4.775 4.774 4.789 4.789 0 0 1-4.775 4.775",fill:"#FFF"},null),g("path",{d:"M171.687 30.234c0-16.392 13.289-29.68 29.681-29.68 16.392 0 29.68 13.288 29.68 29.68 0 16.393-13.288 29.681-29.68 29.681s-29.68-13.288-29.68-29.68",fill:"#FF603B"},null),g("path",{d:"M203.557 19.435l-.676 15.035a1.514 1.514 0 0 1-3.026 0l-.675-15.035a2.19 2.19 0 1 1 4.377 0m-.264 19.378c.513.477.77 1.1.77 1.87s-.257 1.393-.77 1.907c-.55.476-1.21.733-1.943.733a2.545 2.545 0 0 1-1.87-.77c-.55-.514-.806-1.136-.806-1.87 0-.77.256-1.393.806-1.87.513-.513 1.137-.733 1.87-.733.77 0 1.43.22 1.943.733",fill:"#FFF"},null),g("path",{d:"M119.3 133.275c4.426-.598 3.612-1.204 4.079-4.778.675-5.18-3.108-16.935-8.262-25.118-1.088-10.72-12.598-11.24-12.598-11.24s4.312 4.895 4.196 16.199c1.398 5.243.804 14.45.804 14.45s5.255 11.369 11.78 10.487",fill:"#FFB594"},null),g("path",{d:"M100.944 91.61s1.463-.583 3.211.582c8.08 1.398 10.368 6.706 11.3 11.368 1.864 1.282 1.864 2.33 1.864 3.496.365.777 1.515 3.03 1.515 3.03s-7.225 1.748-10.954 6.758c-1.399-6.41-6.936-25.235-6.936-25.235",fill:"#FFF"},null),g("path",{d:"M94.008 90.5l1.019-5.815-9.23-11.874-5.233 5.581-2.593 9.863s8.39 5.128 16.037 2.246",fill:"#FFB594"},null),g("path",{d:"M82.931 78.216s-4.557-2.868-2.445-6.892c1.632-3.107 4.537 1.139 4.537 1.139s.524-3.662 3.139-3.662c.523-1.046 1.569-4.184 1.569-4.184s11.507 2.615 13.6 3.138c-.001 5.23-2.317 19.529-7.884 19.969-8.94.706-12.516-9.508-12.516-9.508",fill:"#FFC6A0"},null),g("path",{d:"M102.971 72.243c2.616-2.093 3.489-9.775 3.489-9.775s-2.492-.492-6.676-2.062c-4.708-2.092-12.867-4.771-17.575.982-9.54 4.41-2.062 19.93-2.062 19.93l2.729-3.037s-3.956-3.304-2.092-6.277c2.183-3.48 3.943 1.08 3.943 1.08s.64-2.4 3.6-3.36c.356-.714 1.04-2.69 1.44-3.872a1.08 1.08 0 0 1 1.27-.707c2.41.56 8.723 2.03 11.417 2.676.524.126.876.619.825 1.156l-.308 3.266z",fill:"#520038"},null),g("path",{d:"M101.22 76.514c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.961.491.083.805.647.702 1.26M94.26 75.074c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.96.491.082.805.646.702 1.26",fill:"#552950"},null),g("path",{stroke:"#DB836E","stroke-width":"1.063","stroke-linecap":"round","stroke-linejoin":"round",d:"M99.206 73.644l-.9 1.62-.3 4.38h-2.24"},null),g("path",{d:"M99.926 73.284s1.8-.72 2.52.54",stroke:"#5C2552","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M81.367 73.084s.48-1.12 1.12-.72c.64.4 1.28 1.44.56 2s.16 1.68.16 1.68",stroke:"#DB836E","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M92.326 71.724s1.84 1.12 4.16.96",stroke:"#5C2552","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M92.726 80.604s2.24 1.2 4.4 1.2M93.686 83.164s.96.4 1.52.32M83.687 80.044s1.786 6.547 9.262 7.954",stroke:"#DB836E","stroke-width":"1.063","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M95.548 91.663s-1.068 2.821-8.298 2.105c-7.23-.717-10.29-5.044-10.29-5.044",stroke:"#E4EBF7","stroke-width":"1.136","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M78.126 87.478s6.526 4.972 16.47 2.486c0 0 9.577 1.02 11.536 5.322 5.36 11.77.543 36.835 0 39.962 3.496 4.055-.466 8.483-.466 8.483-15.624-3.548-35.81-.6-35.81-.6-4.849-3.546-1.223-9.044-1.223-9.044L62.38 110.32c-2.485-15.227.833-19.803 3.549-20.743 3.03-1.049 8.04-1.282 8.04-1.282.496-.058 1.08-.076 1.37-.233 2.36-1.282 2.787-.583 2.787-.583",fill:"#FFF"},null),g("path",{d:"M65.828 89.81s-6.875.465-7.59 8.156c-.466 8.857 3.03 10.954 3.03 10.954s6.075 22.102 16.796 22.957c8.39-2.176 4.758-6.702 4.661-11.42-.233-11.304-7.108-16.897-7.108-16.897s-4.212-13.75-9.789-13.75",fill:"#FFC6A0"},null),g("path",{d:"M71.716 124.225s.855 11.264 9.828 6.486c4.765-2.536 7.581-13.828 9.789-22.568 1.456-5.768 2.58-12.197 2.58-12.197l-4.973-1.709s-2.408 5.516-7.769 12.275c-4.335 5.467-9.144 11.11-9.455 17.713",fill:"#FFC6A0"},null),g("path",{d:"M108.463 105.191s1.747 2.724-2.331 30.535c2.376 2.216 1.053 6.012-.233 7.51",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M123.262 131.527s-.427 2.732-11.77 1.981c-15.187-1.006-25.326-3.25-25.326-3.25l.933-5.8s.723.215 9.71-.068c11.887-.373 18.714-6.07 24.964-1.022 4.039 3.263 1.489 8.16 1.489 8.16",fill:"#FFC6A0"},null),g("path",{d:"M70.24 90.974s-5.593-4.739-11.054 2.68c-3.318 7.223.517 15.284 2.664 19.578-.31 3.729 2.33 4.311 2.33 4.311s.108.895 1.516 2.68c4.078-7.03 6.72-9.166 13.711-12.546-.328-.656-1.877-3.265-1.825-3.767.175-1.69-1.282-2.623-1.282-2.623s-.286-.156-1.165-2.738c-.788-2.313-2.036-5.177-4.895-7.575",fill:"#FFF"},null),g("path",{d:"M90.232 288.027s4.855 2.308 8.313 1.155c3.188-1.063 5.12.755 8.002 1.331 2.881.577 7.769 1.243 13.207-1.424-.117-6.228-7.786-4.499-13.518-7.588-2.895-1.56-4.276-5.336-4.066-9.944H91.544s-1.573 11.89-1.312 16.47",fill:"#CBD1D1"},null),g("path",{d:"M90.207 287.833s2.745 1.437 7.639.738c3.456-.494 3.223.66 7.418 1.282 4.195.621 13.092-.194 14.334-1.126.466 1.242-.388 2.33-.388 2.33s-1.709.682-5.438.932c-2.295.154-8.098.276-10.14-.621-2.02-1.554-4.894-1.515-6.06-.234-4.427 1.075-7.184-.31-7.184-.31l-.181-2.991z",fill:"#2B0849"},null),g("path",{d:"M98.429 272.257h3.496s-.117 7.574 5.127 9.671c-5.244.7-9.672-2.602-8.623-9.671",fill:"#A4AABA"},null),g("path",{d:"M44.425 272.046s-2.208 7.774-4.702 12.899c-1.884 3.874-4.428 7.854 5.729 7.854 6.97 0 9.385-.503 7.782-6.917-1.604-6.415.279-13.836.279-13.836h-9.088z",fill:"#CBD1D1"},null),g("path",{d:"M38.066 290.277s2.198 1.225 6.954 1.225c6.376 0 8.646-1.73 8.646-1.73s.63 1.168-.649 2.27c-1.04.897-3.77 1.668-7.745 1.621-4.347-.05-6.115-.593-7.062-1.224-.864-.577-.72-1.657-.144-2.162",fill:"#2B0849"},null),g("path",{d:"M45.344 274.041s.035 1.592-.329 3.07c-.365 1.49-1.13 3.255-1.184 4.34-.061 1.206 4.755 1.657 5.403.036.65-1.622 1.357-6.737 2.006-7.602.648-.865-5.14-2.222-5.896.156",fill:"#A4AABA"},null),g("path",{d:"M89.476 277.57l13.899.095s1.349-56.643 1.925-66.909c.576-10.267 3.923-45.052 1.042-65.585l-13.037-.669-23.737.81s-.452 4.12-1.243 10.365c-.065.515-.708.874-.777 1.417-.078.608.439 1.407.332 2.044-2.455 14.627-5.797 32.736-8.256 46.837-.121.693-1.282 1.048-1.515 2.796-.042.314.22 1.584.116 1.865-7.14 19.473-12.202 52.601-15.66 67.19l15.176-.015s2.282-10.145 4.185-18.871c2.922-13.389 24.012-88.32 24.012-88.32l3.133-.954-.158 48.568s-.233 1.282.35 2.098c.583.815-.581 1.167-.408 2.331l.408 1.864s-.466 7.458-.932 12.352c-.467 4.895 1.145 40.69 1.145 40.69",fill:"#7BB2F9"},null),g("path",{d:"M64.57 218.881c1.197.099 4.195-2.097 7.225-5.127M96.024 222.534s2.881-1.152 6.34-4.034",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M96.973 219.373s2.882-1.153 6.34-4.034",stroke:"#648BD8","stroke-width":"1.032","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M63.172 222.144s2.724-.614 6.759-3.496M74.903 146.166c-.281 3.226.31 8.856-4.506 9.478M93.182 144.344s.115 14.557-1.344 15.65c-2.305 1.73-3.107 2.02-3.107 2.02M89.197 144.923s.269 13.144-1.01 25.088M83.525 170.71s6.81-1.051 9.116-1.051M46.026 270.045l-.892 4.538M46.937 263.289l-.815 4.157M62.725 202.503c-.33 1.618-.102 1.904-.449 3.438 0 0-2.756 1.903-2.29 3.923.466 2.02-.31 3.424-4.505 17.252-1.762 5.807-4.233 18.922-6.165 28.278-.03.144-.521 2.646-1.14 5.8M64.158 194.136c-.295 1.658-.6 3.31-.917 4.938M71.33 146.787l-1.244 10.877s-1.14.155-.519 2.33c.117 1.399-2.778 16.39-5.382 31.615M44.242 273.727H58.07",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M106.18 142.117c-3.028-.489-18.825-2.744-36.219.2a.625.625 0 0 0-.518.644c.063 1.307.044 2.343.015 2.995a.617.617 0 0 0 .716.636c3.303-.534 17.037-2.412 35.664-.266.347.04.66-.214.692-.56.124-1.347.16-2.425.17-3.029a.616.616 0 0 0-.52-.62",fill:"#192064"},null),g("path",{d:"M96.398 145.264l.003-5.102a.843.843 0 0 0-.809-.847 114.104 114.104 0 0 0-8.141-.014.85.85 0 0 0-.82.847l-.003 5.097c0 .476.388.857.864.845 2.478-.064 5.166-.067 8.03.017a.848.848 0 0 0 .876-.843",fill:"#FFF"},null),g("path",{d:"M95.239 144.296l.002-3.195a.667.667 0 0 0-.643-.672c-1.9-.061-3.941-.073-6.094-.01a.675.675 0 0 0-.654.672l-.002 3.192c0 .376.305.677.68.669 1.859-.042 3.874-.043 6.02.012.376.01.69-.291.691-.668",fill:"#192064"},null),g("path",{d:"M90.102 273.522h12.819M91.216 269.761c.006 3.519-.072 5.55 0 6.292M90.923 263.474c-.009 1.599-.016 2.558-.016 4.505M90.44 170.404l.932 46.38s.7 1.631-.233 2.796c-.932 1.166 2.564.7.932 2.33-1.63 1.633.933 1.166 0 3.497-.618 1.546-1.031 21.921-1.138 36.513",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M73.736 98.665l2.214 4.312s2.098.816 1.865 2.68l.816 2.214M64.297 116.611c.233-.932 2.176-7.147 12.585-10.488M77.598 90.042s7.691 6.137 16.547 2.72",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M91.974 86.954s5.476-.816 7.574-4.545c1.297-.345.72 2.212-.33 3.671-.7.971-1.01 1.554-1.01 1.554s.194.31.155.816c-.053.697-.175.653-.272 1.048-.081.335.108.657 0 1.049-.046.17-.198.5-.382.878-.12.249-.072.687-.2.948-.231.469-1.562 1.87-2.622 2.855-3.826 3.554-5.018 1.644-6.001-.408-.894-1.865-.661-5.127-.874-6.875-.35-2.914-2.622-3.03-1.923-4.429.343-.685 2.87.69 3.263 1.748.757 2.04 2.952 1.807 2.622 1.69",fill:"#FFC6A0"},null),g("path",{d:"M99.8 82.429c-.465.077-.35.272-.97 1.243-.622.971-4.817 2.932-6.39 3.224-2.589.48-2.278-1.56-4.254-2.855-1.69-1.107-3.562-.638-1.398 1.398.99.932.932 1.107 1.398 3.205.335 1.506-.64 3.67.7 5.593",stroke:"#DB836E","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M79.543 108.673c-2.1 2.926-4.266 6.175-5.557 8.762",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M87.72 124.768s-2.098-1.942-5.127-2.719c-3.03-.777-3.574-.155-5.516.078-1.942.233-3.885-.932-3.652.7.233 1.63 5.05 1.01 5.206 2.097.155 1.087-6.37 2.796-8.313 2.175-.777.777.466 1.864 2.02 2.175.233 1.554 2.253 1.554 2.253 1.554s.699 1.01 2.641 1.088c2.486 1.32 8.934-.7 10.954-1.554 2.02-.855-.466-5.594-.466-5.594",fill:"#FFC6A0"},null),g("path",{d:"M73.425 122.826s.66 1.127 3.167 1.418c2.315.27 2.563.583 2.563.583s-2.545 2.894-9.07 2.272M72.416 129.274s3.826.097 4.933-.718M74.98 130.75s1.961.136 3.36-.505M77.232 131.916s1.748.019 2.914-.505M73.328 122.321s-.595-1.032 1.262-.427c1.671.544 2.833.055 5.128.155 1.389.061 3.067-.297 3.982.15 1.606.784 3.632 2.181 3.632 2.181s10.526 1.204 19.033-1.127M78.864 108.104s-8.39 2.758-13.168 12.12",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M109.278 112.533s3.38-3.613 7.575-4.662",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M107.375 123.006s9.697-2.745 11.445-.88",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M194.605 83.656l3.971-3.886M187.166 90.933l3.736-3.655M191.752 84.207l-4.462-4.56M198.453 91.057l-4.133-4.225M129.256 163.074l3.718-3.718M122.291 170.039l3.498-3.498M126.561 163.626l-4.27-4.27M132.975 170.039l-3.955-3.955",stroke:"#BFCDDD","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M190.156 211.779h-1.604a4.023 4.023 0 0 1-4.011-4.011V175.68a4.023 4.023 0 0 1 4.01-4.01h1.605a4.023 4.023 0 0 1 4.011 4.01v32.088a4.023 4.023 0 0 1-4.01 4.01",fill:"#A3B4C6"},null),g("path",{d:"M237.824 212.977a4.813 4.813 0 0 1-4.813 4.813h-86.636a4.813 4.813 0 0 1 0-9.626h86.636a4.813 4.813 0 0 1 4.813 4.813",fill:"#A3B4C6"},null),g("mask",{fill:"#fff"},null),g("path",{fill:"#A3B4C6",mask:"url(#d)",d:"M154.098 190.096h70.513v-84.617h-70.513z"},null),g("path",{d:"M224.928 190.096H153.78a3.219 3.219 0 0 1-3.208-3.209V167.92a3.219 3.219 0 0 1 3.208-3.21h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.219 3.219 0 0 1-3.21 3.209M224.928 130.832H153.78a3.218 3.218 0 0 1-3.208-3.208v-18.968a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.218 3.218 0 0 1-3.21 3.208",fill:"#BFCDDD",mask:"url(#d)"},null),g("path",{d:"M159.563 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 120.546h-22.461a.802.802 0 0 1-.802-.802v-3.208c0-.443.359-.803.802-.803h22.46c.444 0 .803.36.803.803v3.208c0 .443-.36.802-.802.802",fill:"#FFF",mask:"url(#d)"},null),g("path",{d:"M224.928 160.464H153.78a3.218 3.218 0 0 1-3.208-3.209v-18.967a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.209v18.967a3.218 3.218 0 0 1-3.21 3.209",fill:"#BFCDDD",mask:"url(#d)"},null),g("path",{d:"M173.455 130.832h49.301M164.984 130.832h6.089M155.952 130.832h6.75M173.837 160.613h49.3M165.365 160.613h6.089M155.57 160.613h6.751",stroke:"#7C90A5","stroke-width":"1.124","stroke-linecap":"round","stroke-linejoin":"round",mask:"url(#d)"},null),g("path",{d:"M159.563 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M166.98 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M174.397 151.038a2.407 2.407 0 1 1 .001-4.814 2.407 2.407 0 0 1 0 4.814M222.539 151.038h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802M159.563 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 179.987h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802",fill:"#FFF",mask:"url(#d)"},null),g("path",{d:"M203.04 221.108h-27.372a2.413 2.413 0 0 1-2.406-2.407v-11.448a2.414 2.414 0 0 1 2.406-2.407h27.372a2.414 2.414 0 0 1 2.407 2.407V218.7a2.413 2.413 0 0 1-2.407 2.407",fill:"#BFCDDD",mask:"url(#d)"},null),g("path",{d:"M177.259 207.217v11.52M201.05 207.217v11.52",stroke:"#A3B4C6","stroke-width":"1.124","stroke-linecap":"round","stroke-linejoin":"round",mask:"url(#d)"},null),g("path",{d:"M162.873 267.894a9.422 9.422 0 0 1-9.422-9.422v-14.82a9.423 9.423 0 0 1 18.845 0v14.82a9.423 9.423 0 0 1-9.423 9.422",fill:"#5BA02E",mask:"url(#d)"},null),g("path",{d:"M171.22 267.83a9.422 9.422 0 0 1-9.422-9.423v-3.438a9.423 9.423 0 0 1 18.845 0v3.438a9.423 9.423 0 0 1-9.422 9.423",fill:"#92C110",mask:"url(#d)"},null),g("path",{d:"M181.31 293.666h-27.712a3.209 3.209 0 0 1-3.209-3.21V269.79a3.209 3.209 0 0 1 3.209-3.21h27.711a3.209 3.209 0 0 1 3.209 3.21v20.668a3.209 3.209 0 0 1-3.209 3.209",fill:"#F2D7AD",mask:"url(#d)"},null)])]),ife=()=>g("svg",{width:"251",height:"294"},[g("g",{fill:"none","fill-rule":"evenodd"},[g("path",{d:"M0 129.023v-2.084C0 58.364 55.591 2.774 124.165 2.774h2.085c68.574 0 124.165 55.59 124.165 124.165v2.084c0 68.575-55.59 124.166-124.165 124.166h-2.085C55.591 253.189 0 197.598 0 129.023",fill:"#E4EBF7"},null),g("path",{d:"M41.417 132.92a8.231 8.231 0 1 1-16.38-1.65 8.231 8.231 0 0 1 16.38 1.65",fill:"#FFF"},null),g("path",{d:"M38.652 136.36l10.425 5.91M49.989 148.505l-12.58 10.73",stroke:"#FFF","stroke-width":"2"},null),g("path",{d:"M41.536 161.28a5.636 5.636 0 1 1-11.216-1.13 5.636 5.636 0 0 1 11.216 1.13M59.154 145.261a5.677 5.677 0 1 1-11.297-1.138 5.677 5.677 0 0 1 11.297 1.138M100.36 29.516l29.66-.013a4.562 4.562 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 0 0 .005 9.126M111.705 47.754l29.659-.013a4.563 4.563 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 1 0 .005 9.126",fill:"#FFF"},null),g("path",{d:"M114.066 29.503V29.5l15.698-.007a4.563 4.563 0 1 0 .004 9.126l-15.698.007v-.002a4.562 4.562 0 0 0-.004-9.122M185.405 137.723c-.55 5.455-5.418 9.432-10.873 8.882-5.456-.55-9.432-5.418-8.882-10.873.55-5.455 5.418-9.432 10.873-8.882 5.455.55 9.432 5.418 8.882 10.873",fill:"#FFF"},null),g("path",{d:"M180.17 143.772l12.572 7.129M193.841 158.42L178.67 171.36",stroke:"#FFF","stroke-width":"2"},null),g("path",{d:"M185.55 171.926a6.798 6.798 0 1 1-13.528-1.363 6.798 6.798 0 0 1 13.527 1.363M204.12 155.285a6.848 6.848 0 1 1-13.627-1.375 6.848 6.848 0 0 1 13.626 1.375",fill:"#FFF"},null),g("path",{d:"M152.988 194.074a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0zM225.931 118.217a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM217.09 153.051a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.42 0zM177.84 109.842a2.21 2.21 0 1 1-4.422 0 2.21 2.21 0 0 1 4.421 0zM196.114 94.454a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM202.844 182.523a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0z",stroke:"#FFF","stroke-width":"2"},null),g("path",{stroke:"#FFF","stroke-width":"2",d:"M215.125 155.262l-1.902 20.075-10.87 5.958M174.601 176.636l-6.322 9.761H156.98l-4.484 6.449M175.874 127.28V111.56M221.51 119.404l-12.77 7.859-15.228-7.86V96.668"},null),g("path",{d:"M180.68 29.32C180.68 13.128 193.806 0 210 0c16.193 0 29.32 13.127 29.32 29.32 0 16.194-13.127 29.322-29.32 29.322-16.193 0-29.32-13.128-29.32-29.321",fill:"#A26EF4"},null),g("path",{d:"M221.45 41.706l-21.563-.125a1.744 1.744 0 0 1-1.734-1.754l.071-12.23a1.744 1.744 0 0 1 1.754-1.734l21.562.125c.964.006 1.74.791 1.735 1.755l-.071 12.229a1.744 1.744 0 0 1-1.754 1.734",fill:"#FFF"},null),g("path",{d:"M215.106 29.192c-.015 2.577-2.049 4.654-4.543 4.64-2.494-.014-4.504-2.115-4.489-4.693l.04-6.925c.016-2.577 2.05-4.654 4.543-4.64 2.494.015 4.504 2.116 4.49 4.693l-.04 6.925zm-4.53-14.074a6.877 6.877 0 0 0-6.916 6.837l-.043 7.368a6.877 6.877 0 0 0 13.754.08l.042-7.368a6.878 6.878 0 0 0-6.837-6.917zM167.566 68.367h-3.93a4.73 4.73 0 0 1-4.717-4.717 4.73 4.73 0 0 1 4.717-4.717h3.93a4.73 4.73 0 0 1 4.717 4.717 4.73 4.73 0 0 1-4.717 4.717",fill:"#FFF"},null),g("path",{d:"M168.214 248.838a6.611 6.611 0 0 1-6.61-6.611v-66.108a6.611 6.611 0 0 1 13.221 0v66.108a6.611 6.611 0 0 1-6.61 6.61",fill:"#5BA02E"},null),g("path",{d:"M176.147 248.176a6.611 6.611 0 0 1-6.61-6.61v-33.054a6.611 6.611 0 1 1 13.221 0v33.053a6.611 6.611 0 0 1-6.61 6.611",fill:"#92C110"},null),g("path",{d:"M185.994 293.89h-27.376a3.17 3.17 0 0 1-3.17-3.17v-45.887a3.17 3.17 0 0 1 3.17-3.17h27.376a3.17 3.17 0 0 1 3.17 3.17v45.886a3.17 3.17 0 0 1-3.17 3.17",fill:"#F2D7AD"},null),g("path",{d:"M81.972 147.673s6.377-.927 17.566-1.28c11.729-.371 17.57 1.086 17.57 1.086s3.697-3.855.968-8.424c1.278-12.077 5.982-32.827.335-48.273-1.116-1.339-3.743-1.512-7.536-.62-1.337.315-7.147-.149-7.983-.1l-15.311-.347s-3.487-.17-8.035-.508c-1.512-.113-4.227-1.683-5.458-.338-.406.443-2.425 5.669-1.97 16.077l8.635 35.642s-3.141 3.61 1.219 7.085",fill:"#FFF"},null),g("path",{d:"M75.768 73.325l-.9-6.397 11.982-6.52s7.302-.118 8.038 1.205c.737 1.324-5.616.993-5.616.993s-1.836 1.388-2.615 2.5c-1.654 2.363-.986 6.471-8.318 5.986-1.708.284-2.57 2.233-2.57 2.233",fill:"#FFC6A0"},null),g("path",{d:"M52.44 77.672s14.217 9.406 24.973 14.444c1.061.497-2.094 16.183-11.892 11.811-7.436-3.318-20.162-8.44-21.482-14.496-.71-3.258 2.543-7.643 8.401-11.76M141.862 80.113s-6.693 2.999-13.844 6.876c-3.894 2.11-10.137 4.704-12.33 7.988-6.224 9.314 3.536 11.22 12.947 7.503 6.71-2.651 28.999-12.127 13.227-22.367",fill:"#FFB594"},null),g("path",{d:"M76.166 66.36l3.06 3.881s-2.783 2.67-6.31 5.747c-7.103 6.195-12.803 14.296-15.995 16.44-3.966 2.662-9.754 3.314-12.177-.118-3.553-5.032.464-14.628 31.422-25.95",fill:"#FFC6A0"},null),g("path",{d:"M64.674 85.116s-2.34 8.413-8.912 14.447c.652.548 18.586 10.51 22.144 10.056 5.238-.669 6.417-18.968 1.145-20.531-.702-.208-5.901-1.286-8.853-2.167-.87-.26-1.611-1.71-3.545-.936l-1.98-.869zM128.362 85.826s5.318 1.956 7.325 13.734c-.546.274-17.55 12.35-21.829 7.805-6.534-6.94-.766-17.393 4.275-18.61 4.646-1.121 5.03-1.37 10.23-2.929",fill:"#FFF"},null),g("path",{d:"M78.18 94.656s.911 7.41-4.914 13.078",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M87.397 94.68s3.124 2.572 10.263 2.572c7.14 0 9.074-3.437 9.074-3.437",stroke:"#E4EBF7","stroke-width":".932","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M117.184 68.639l-6.781-6.177s-5.355-4.314-9.223-.893c-3.867 3.422 4.463 2.083 5.653 4.165 1.19 2.082.848 1.143-2.083.446-5.603-1.331-2.082.893 2.975 5.355 2.091 1.845 6.992.955 6.992.955l2.467-3.851z",fill:"#FFC6A0"},null),g("path",{d:"M105.282 91.315l-.297-10.937-15.918-.027-.53 10.45c-.026.403.17.788.515.999 2.049 1.251 9.387 5.093 15.799.424.287-.21.443-.554.431-.91",fill:"#FFB594"},null),g("path",{d:"M107.573 74.24c.817-1.147.982-9.118 1.015-11.928a1.046 1.046 0 0 0-.965-1.055l-4.62-.365c-7.71-1.044-17.071.624-18.253 6.346-5.482 5.813-.421 13.244-.421 13.244s1.963 3.566 4.305 6.791c.756 1.041.398-3.731 3.04-5.929 5.524-4.594 15.899-7.103 15.899-7.103",fill:"#5C2552"},null),g("path",{d:"M88.426 83.206s2.685 6.202 11.602 6.522c7.82.28 8.973-7.008 7.434-17.505l-.909-5.483c-6.118-2.897-15.478.54-15.478.54s-.576 2.044-.19 5.504c-2.276 2.066-1.824 5.618-1.824 5.618s-.905-1.922-1.98-2.321c-.86-.32-1.897.089-2.322 1.98-1.04 4.632 3.667 5.145 3.667 5.145",fill:"#FFC6A0"},null),g("path",{stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round",d:"M100.843 77.099l1.701-.928-1.015-4.324.674-1.406"},null),g("path",{d:"M105.546 74.092c-.022.713-.452 1.279-.96 1.263-.51-.016-.904-.607-.882-1.32.021-.713.452-1.278.96-1.263.51.016.904.607.882 1.32M97.592 74.349c-.022.713-.452 1.278-.961 1.263-.509-.016-.904-.607-.882-1.32.022-.713.452-1.279.961-1.263.51.016.904.606.882 1.32",fill:"#552950"},null),g("path",{d:"M91.132 86.786s5.269 4.957 12.679 2.327",stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M99.776 81.903s-3.592.232-1.44-2.79c1.59-1.496 4.897-.46 4.897-.46s1.156 3.906-3.457 3.25",fill:"#DB836E"},null),g("path",{d:"M102.88 70.6s2.483.84 3.402.715M93.883 71.975s2.492-1.144 4.778-1.073",stroke:"#5C2552","stroke-width":"1.526","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M86.32 77.374s.961.879 1.458 2.106c-.377.48-1.033 1.152-.236 1.809M99.337 83.719s1.911.151 2.509-.254",stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M87.782 115.821l15.73-3.012M100.165 115.821l10.04-2.008",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M66.508 86.763s-1.598 8.83-6.697 14.078",stroke:"#E4EBF7","stroke-width":"1.114","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M128.31 87.934s3.013 4.121 4.06 11.785",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M64.09 84.816s-6.03 9.912-13.607 9.903",stroke:"#DB836E","stroke-width":".795","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M112.366 65.909l-.142 5.32s5.993 4.472 11.945 9.202c4.482 3.562 8.888 7.455 10.985 8.662 4.804 2.766 8.9 3.355 11.076 1.808 4.071-2.894 4.373-9.878-8.136-15.263-4.271-1.838-16.144-6.36-25.728-9.73",fill:"#FFC6A0"},null),g("path",{d:"M130.532 85.488s4.588 5.757 11.619 6.214",stroke:"#DB836E","stroke-width":".75","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M121.708 105.73s-.393 8.564-1.34 13.612",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M115.784 161.512s-3.57-1.488-2.678-7.14",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M101.52 290.246s4.326 2.057 7.408 1.03c2.842-.948 4.564.673 7.132 1.186 2.57.514 6.925 1.108 11.772-1.269-.104-5.551-6.939-4.01-12.048-6.763-2.582-1.39-3.812-4.757-3.625-8.863h-9.471s-1.402 10.596-1.169 14.68",fill:"#CBD1D1"},null),g("path",{d:"M101.496 290.073s2.447 1.281 6.809.658c3.081-.44 3.74.485 7.479 1.039 3.739.554 10.802-.07 11.91-.9.415 1.108-.347 2.077-.347 2.077s-1.523.608-4.847.831c-2.045.137-5.843.293-7.663-.507-1.8-1.385-5.286-1.917-5.77-.243-3.947.958-7.41-.288-7.41-.288l-.16-2.667z",fill:"#2B0849"},null),g("path",{d:"M108.824 276.19h3.116s-.103 6.751 4.57 8.62c-4.673.624-8.62-2.32-7.686-8.62",fill:"#A4AABA"},null),g("path",{d:"M57.65 272.52s-2.122 7.47-4.518 12.396c-1.811 3.724-4.255 7.548 5.505 7.548 6.698 0 9.02-.483 7.479-6.648-1.541-6.164.268-13.296.268-13.296H57.65z",fill:"#CBD1D1"},null),g("path",{d:"M51.54 290.04s2.111 1.178 6.682 1.178c6.128 0 8.31-1.662 8.31-1.662s.605 1.122-.624 2.18c-1 .862-3.624 1.603-7.444 1.559-4.177-.049-5.876-.57-6.786-1.177-.831-.554-.692-1.593-.138-2.078",fill:"#2B0849"},null),g("path",{d:"M58.533 274.438s.034 1.529-.315 2.95c-.352 1.431-1.087 3.127-1.139 4.17-.058 1.16 4.57 1.592 5.194.035.623-1.559 1.303-6.475 1.927-7.306.622-.831-4.94-2.135-5.667.15",fill:"#A4AABA"},null),g("path",{d:"M100.885 277.015l13.306.092s1.291-54.228 1.843-64.056c.552-9.828 3.756-43.13.997-62.788l-12.48-.64-22.725.776s-.433 3.944-1.19 9.921c-.062.493-.677.838-.744 1.358-.075.582.42 1.347.318 1.956-2.35 14.003-6.343 32.926-8.697 46.425-.116.663-1.227 1.004-1.45 2.677-.04.3.21 1.516.112 1.785-6.836 18.643-10.89 47.584-14.2 61.551l14.528-.014s2.185-8.524 4.008-16.878c2.796-12.817 22.987-84.553 22.987-84.553l3-.517 1.037 46.1s-.223 1.228.334 2.008c.558.782-.556 1.117-.39 2.233l.39 1.784s-.446 7.14-.892 11.826c-.446 4.685-.092 38.954-.092 38.954",fill:"#7BB2F9"},null),g("path",{d:"M77.438 220.434c1.146.094 4.016-2.008 6.916-4.91M107.55 223.931s2.758-1.103 6.069-3.862",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M108.459 220.905s2.759-1.104 6.07-3.863",stroke:"#648BD8","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M76.099 223.557s2.608-.587 6.47-3.346M87.33 150.82c-.27 3.088.297 8.478-4.315 9.073M104.829 149.075s.11 13.936-1.286 14.983c-2.207 1.655-2.975 1.934-2.975 1.934M101.014 149.63s.035 12.81-1.19 24.245M94.93 174.965s7.174-1.655 9.38-1.655M75.671 204.754c-.316 1.55-.64 3.067-.973 4.535 0 0-1.45 1.822-1.003 3.756.446 1.934-.943 2.034-4.96 15.273-1.686 5.559-4.464 18.49-6.313 27.447-.078.38-4.018 18.06-4.093 18.423M77.043 196.743a313.269 313.269 0 0 1-.877 4.729M83.908 151.414l-1.19 10.413s-1.091.148-.496 2.23c.111 1.34-2.66 15.692-5.153 30.267M57.58 272.94h13.238",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),g("path",{d:"M117.377 147.423s-16.955-3.087-35.7.199c.157 2.501-.002 4.128-.002 4.128s14.607-2.802 35.476-.31c.251-2.342.226-4.017.226-4.017",fill:"#192064"},null),g("path",{d:"M107.511 150.353l.004-4.885a.807.807 0 0 0-.774-.81c-2.428-.092-5.04-.108-7.795-.014a.814.814 0 0 0-.784.81l-.003 4.88c0 .456.371.82.827.808a140.76 140.76 0 0 1 7.688.017.81.81 0 0 0 .837-.806",fill:"#FFF"},null),g("path",{d:"M106.402 149.426l.002-3.06a.64.64 0 0 0-.616-.643 94.135 94.135 0 0 0-5.834-.009.647.647 0 0 0-.626.643l-.001 3.056c0 .36.291.648.651.64 1.78-.04 3.708-.041 5.762.012.36.009.662-.279.662-.64",fill:"#192064"},null),g("path",{d:"M101.485 273.933h12.272M102.652 269.075c.006 3.368.04 5.759.11 6.47M102.667 263.125c-.009 1.53-.015 2.98-.016 4.313M102.204 174.024l.893 44.402s.669 1.561-.224 2.677c-.892 1.116 2.455.67.893 2.231-1.562 1.562.893 1.116 0 3.347-.592 1.48-.988 20.987-1.09 34.956",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null)])]),afe=e=>{const{componentCls:t,lineHeightHeading3:n,iconCls:o,padding:r,paddingXL:i,paddingXS:a,paddingLG:l,marginXS:s,lineHeight:u}=e;return{[t]:{padding:`${l*2}px ${i}px`,"&-rtl":{direction:"rtl"}},[`${t} ${t}-image`]:{width:e.imageWidth,height:e.imageHeight,margin:"auto"},[`${t} ${t}-icon`]:{marginBottom:l,textAlign:"center",[`& > ${o}`]:{fontSize:e.resultIconFontSize}},[`${t} ${t}-title`]:{color:e.colorTextHeading,fontSize:e.resultTitleFontSize,lineHeight:n,marginBlock:s,textAlign:"center"},[`${t} ${t}-subtitle`]:{color:e.colorTextDescription,fontSize:e.resultSubtitleFontSize,lineHeight:u,textAlign:"center"},[`${t} ${t}-content`]:{marginTop:l,padding:`${l}px ${r*2.5}px`,backgroundColor:e.colorFillAlter},[`${t} ${t}-extra`]:{margin:e.resultExtraMargin,textAlign:"center","& > *":{marginInlineEnd:a,"&:last-child":{marginInlineEnd:0}}}}},lfe=e=>{const{componentCls:t,iconCls:n}=e;return{[`${t}-success ${t}-icon > ${n}`]:{color:e.resultSuccessIconColor},[`${t}-error ${t}-icon > ${n}`]:{color:e.resultErrorIconColor},[`${t}-info ${t}-icon > ${n}`]:{color:e.resultInfoIconColor},[`${t}-warning ${t}-icon > ${n}`]:{color:e.resultWarningIconColor}}},sfe=e=>[afe(e),lfe(e)],cfe=e=>sfe(e),ufe=Ue("Result",e=>{const{paddingLG:t,fontSizeHeading3:n}=e,o=e.fontSize,r=`${t}px 0 0 0`,i=e.colorInfo,a=e.colorError,l=e.colorSuccess,s=e.colorWarning,u=Be(e,{resultTitleFontSize:n,resultSubtitleFontSize:o,resultIconFontSize:n*3,resultExtraMargin:r,resultInfoIconColor:i,resultErrorIconColor:a,resultSuccessIconColor:l,resultWarningIconColor:s});return[cfe(u)]},{imageWidth:250,imageHeight:295}),dfe={success:qr,error:po,info:Jr,warning:s$},Mf={404:ofe,500:rfe,403:ife},ffe=Object.keys(Mf),pfe=()=>({prefixCls:String,icon:K.any,status:{type:[Number,String],default:"info"},title:K.any,subTitle:K.any,extra:K.any}),gfe=(e,t)=>{let{status:n,icon:o}=t;if(ffe.includes(`${n}`)){const a=Mf[n];return g("div",{class:`${e}-icon ${e}-image`},[g(a,null,null)])}const r=dfe[n],i=o||g(r,null,null);return g("div",{class:`${e}-icon`},[i])},hfe=(e,t)=>t&&g("div",{class:`${e}-extra`},[t]),Ll=le({compatConfig:{MODE:3},name:"AResult",inheritAttrs:!1,props:pfe(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("result",e),[a,l]=ufe(r),s=E(()=>ge(r.value,l.value,`${r.value}-${e.status}`,{[`${r.value}-rtl`]:i.value==="rtl"}));return()=>{var u,c,d,f,p,v,h,m;const b=(u=e.title)!==null&&u!==void 0?u:(c=n.title)===null||c===void 0?void 0:c.call(n),S=(d=e.subTitle)!==null&&d!==void 0?d:(f=n.subTitle)===null||f===void 0?void 0:f.call(n),C=(p=e.icon)!==null&&p!==void 0?p:(v=n.icon)===null||v===void 0?void 0:v.call(n),$=(h=e.extra)!==null&&h!==void 0?h:(m=n.extra)===null||m===void 0?void 0:m.call(n),x=r.value;return a(g("div",k(k({},o),{},{class:[s.value,o.class]}),[gfe(x,{status:e.status,icon:C}),g("div",{class:`${x}-title`},[b]),S&&g("div",{class:`${x}-subtitle`},[S]),hfe(x,$),n.default&&g("div",{class:`${x}-content`},[n.default()])]))}}});Ll.PRESENTED_IMAGE_403=Mf[403];Ll.PRESENTED_IMAGE_404=Mf[404];Ll.PRESENTED_IMAGE_500=Mf[500];Ll.install=function(e){return e.component(Ll.name,Ll),e};const vfe=Lt(Ax),c$=(e,t)=>{let{attrs:n}=t;const{included:o,vertical:r,style:i,class:a}=n;let{length:l,offset:s,reverse:u}=n;l<0&&(u=!u,l=Math.abs(l),s=100-s);const c=r?{[u?"top":"bottom"]:`${s}%`,[u?"bottom":"top"]:"auto",height:`${l}%`}:{[u?"right":"left"]:`${s}%`,[u?"left":"right"]:"auto",width:`${l}%`},d=y(y({},i),c);return o?g("div",{class:a,style:d},null):null};c$.inheritAttrs=!1;const mfe=(e,t,n,o,r,i)=>{const a=Object.keys(t).map(parseFloat).sort((l,s)=>l-s);if(n&&o)for(let l=r;l<=i;l+=o)a.indexOf(l)===-1&&a.push(l);return a},KD=(e,t)=>{let{attrs:n}=t;const{prefixCls:o,vertical:r,reverse:i,marks:a,dots:l,step:s,included:u,lowerBound:c,upperBound:d,max:f,min:p,dotStyle:v,activeDotStyle:h}=n,m=f-p,b=mfe(r,a,l,s,p,f).map(S=>{const C=`${Math.abs(S-p)/m*100}%`,$=!u&&S===d||u&&S<=d&&S>=c;let x=r?y(y({},v),{[i?"top":"bottom"]:C}):y(y({},v),{[i?"right":"left"]:C});$&&(x=y(y({},x),h));const P=ge({[`${o}-dot`]:!0,[`${o}-dot-active`]:$,[`${o}-dot-reverse`]:i});return g("span",{class:P,style:x,key:S},null)});return g("div",{class:`${o}-step`},[b])};KD.inheritAttrs=!1;const UD=(e,t)=>{let{attrs:n,slots:o}=t;const{class:r,vertical:i,reverse:a,marks:l,included:s,upperBound:u,lowerBound:c,max:d,min:f,onClickLabel:p}=n,v=Object.keys(l),h=o.mark,m=d-f,b=v.map(parseFloat).sort((S,C)=>S-C).map(S=>{const C=typeof l[S]=="function"?l[S]():l[S],$=typeof C=="object"&&!sn(C);let x=$?C.label:C;if(!x&&x!==0)return null;h&&(x=h({point:S,label:x}));const P=!s&&S===u||s&&S<=u&&S>=c,w=ge({[`${r}-text`]:!0,[`${r}-text-active`]:P}),O={marginBottom:"-50%",[a?"top":"bottom"]:`${(S-f)/m*100}%`},I={transform:`translateX(${a?"50%":"-50%"})`,msTransform:`translateX(${a?"50%":"-50%"})`,[a?"right":"left"]:`${(S-f)/m*100}%`},_=i?O:I,T=$?y(y({},_),C.style):_,A={[hn?"onTouchstartPassive":"onTouchstart"]:R=>p(R,S)};return g("span",k({class:w,style:T,key:S,onMousedown:R=>p(R,S)},A),[x])});return g("div",{class:r},[b])};UD.inheritAttrs=!1;const GD=le({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:K.oneOfType([K.number,K.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup(e,t){let{attrs:n,emit:o,expose:r}=t;const i=se(!1),a=se(),l=()=>{document.activeElement===a.value&&(i.value=!0)},s=m=>{i.value=!1,o("blur",m)},u=()=>{i.value=!1},c=()=>{var m;(m=a.value)===null||m===void 0||m.focus()},d=()=>{var m;(m=a.value)===null||m===void 0||m.blur()},f=()=>{i.value=!0,c()},p=m=>{m.preventDefault(),c(),o("mousedown",m)};r({focus:c,blur:d,clickFocus:f,ref:a});let v=null;Ke(()=>{v=Ht(document,"mouseup",l)}),tt(()=>{v==null||v.remove()});const h=E(()=>{const{vertical:m,offset:b,reverse:S}=e;return m?{[S?"top":"bottom"]:`${b}%`,[S?"bottom":"top"]:"auto",transform:S?null:"translateY(+50%)"}:{[S?"right":"left"]:`${b}%`,[S?"left":"right"]:"auto",transform:`translateX(${S?"+":"-"}50%)`}});return()=>{const{prefixCls:m,disabled:b,min:S,max:C,value:$,tabindex:x,ariaLabel:P,ariaLabelledBy:w,ariaValueTextFormatter:O,onMouseenter:I,onMouseleave:_}=e,T=ge(n.class,{[`${m}-handle-click-focused`]:i.value}),A={"aria-valuemin":S,"aria-valuemax":C,"aria-valuenow":$,"aria-disabled":!!b},R=[n.style,h.value];let H=x||0;(b||x===null)&&(H=null);let M;O&&(M=O($));const D=y(y(y(y({},n),{role:"slider",tabindex:H}),A),{class:T,onBlur:s,onKeydown:u,onMousedown:p,onMouseenter:I,onMouseleave:_,ref:a,style:R});return g("div",k(k({},D),{},{"aria-label":P,"aria-labelledby":w,"aria-valuetext":M}),null)}}});function cb(e,t){try{return Object.keys(t).some(n=>e.target===t[n].ref)}catch{return!1}}function XD(e,t){let{min:n,max:o}=t;return eo}function zT(e){return e.touches.length>1||e.type.toLowerCase()==="touchend"&&e.touches.length>0}function jT(e,t){let{marks:n,step:o,min:r,max:i}=t;const a=Object.keys(n).map(parseFloat);if(o!==null){const s=Math.pow(10,YD(o)),u=Math.floor((i*s-r*s)/(o*s)),c=Math.min((e-r)/o,u),d=Math.round(c)*o+r;a.push(d)}const l=a.map(s=>Math.abs(e-s));return a[l.indexOf(Math.min(...l))]}function YD(e){const t=e.toString();let n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n}function WT(e,t){let n=1;return window.visualViewport&&(n=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?t.clientY:t.pageX)/n}function VT(e,t){let n=1;return window.visualViewport&&(n=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?t.touches[0].clientY:t.touches[0].pageX)/n}function KT(e,t){const n=t.getBoundingClientRect();return e?n.top+n.height*.5:window.scrollX+n.left+n.width*.5}function u$(e,t){let{max:n,min:o}=t;return e<=o?o:e>=n?n:e}function qD(e,t){const{step:n}=t,o=isFinite(jT(e,t))?jT(e,t):0;return n===null?o:parseFloat(o.toFixed(YD(n)))}function Tc(e){e.stopPropagation(),e.preventDefault()}function bfe(e,t,n){const o={increase:(a,l)=>a+l,decrease:(a,l)=>a-l},r=o[e](Object.keys(n.marks).indexOf(JSON.stringify(t)),1),i=Object.keys(n.marks)[r];return n.step?o[e](t,n.step):Object.keys(n.marks).length&&n.marks[i]?n.marks[i]:t}function JD(e,t,n){const o="increase",r="decrease";let i=o;switch(e.keyCode){case Ie.UP:i=t&&n?r:o;break;case Ie.RIGHT:i=!t&&n?r:o;break;case Ie.DOWN:i=t&&n?o:r;break;case Ie.LEFT:i=!t&&n?o:r;break;case Ie.END:return(a,l)=>l.max;case Ie.HOME:return(a,l)=>l.min;case Ie.PAGE_UP:return(a,l)=>a+l.step*2;case Ie.PAGE_DOWN:return(a,l)=>a-l.step*2;default:return}return(a,l)=>bfe(i,a,l)}var yfe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{this.document=this.sliderRef&&this.sliderRef.ownerDocument;const{autofocus:n,disabled:o}=this;n&&!o&&this.focus()})},beforeUnmount(){this.$nextTick(()=>{this.removeDocumentEvents()})},methods:{defaultHandle(n){var{index:o,directives:r,className:i,style:a}=n,l=yfe(n,["index","directives","className","style"]);if(delete l.dragging,l.value===null)return null;const s=y(y({},l),{class:i,style:a,key:o});return g(GD,s,null)},onDown(n,o){let r=o;const{draggableTrack:i,vertical:a}=this.$props,{bounds:l}=this.$data,s=i&&this.positionGetValue?this.positionGetValue(r)||[]:[],u=cb(n,this.handlesRefs);if(this.dragTrack=i&&l.length>=2&&!u&&!s.map((c,d)=>{const f=d?!0:c>=l[d];return d===s.length-1?c<=l[d]:f}).some(c=>!c),this.dragTrack)this.dragOffset=r,this.startBounds=[...l];else{if(!u)this.dragOffset=0;else{const c=KT(a,n.target);this.dragOffset=r-c,r=c}this.onStart(r)}},onMouseDown(n){if(n.button!==0)return;this.removeDocumentEvents();const o=this.$props.vertical,r=WT(o,n);this.onDown(n,r),this.addDocumentMouseEvents()},onTouchStart(n){if(zT(n))return;const o=this.vertical,r=VT(o,n);this.onDown(n,r),this.addDocumentTouchEvents(),Tc(n)},onFocus(n){const{vertical:o}=this;if(cb(n,this.handlesRefs)&&!this.dragTrack){const r=KT(o,n.target);this.dragOffset=0,this.onStart(r),Tc(n),this.$emit("focus",n)}},onBlur(n){this.dragTrack||this.onEnd(),this.$emit("blur",n)},onMouseUp(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove(n){if(!this.sliderRef){this.onEnd();return}const o=WT(this.vertical,n);this.onMove(n,o-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove(n){if(zT(n)||!this.sliderRef){this.onEnd();return}const o=VT(this.vertical,n);this.onMove(n,o-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown(n){this.sliderRef&&cb(n,this.handlesRefs)&&this.onKeyboard(n)},onClickMarkLabel(n,o){n.stopPropagation(),this.onChange({sValue:o}),this.setState({sValue:o},()=>this.onEnd(!0))},getSliderStart(){const n=this.sliderRef,{vertical:o,reverse:r}=this,i=n.getBoundingClientRect();return o?r?i.bottom:i.top:window.scrollX+(r?i.right:i.left)},getSliderLength(){const n=this.sliderRef;if(!n)return 0;const o=n.getBoundingClientRect();return this.vertical?o.height:o.width},addDocumentTouchEvents(){this.onTouchMoveListener=Ht(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=Ht(this.document,"touchend",this.onEnd)},addDocumentMouseEvents(){this.onMouseMoveListener=Ht(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=Ht(this.document,"mouseup",this.onEnd)},removeDocumentEvents(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus(){var n;this.$props.disabled||(n=this.handlesRefs[0])===null||n===void 0||n.focus()},blur(){this.$props.disabled||Object.keys(this.handlesRefs).forEach(n=>{var o,r;(r=(o=this.handlesRefs[n])===null||o===void 0?void 0:o.blur)===null||r===void 0||r.call(o)})},calcValue(n){const{vertical:o,min:r,max:i}=this,a=Math.abs(Math.max(n,0)/this.getSliderLength());return o?(1-a)*(i-r)+r:a*(i-r)+r},calcValueByPos(n){const r=(this.reverse?-1:1)*(n-this.getSliderStart());return this.trimAlignValue(this.calcValue(r))},calcOffset(n){const{min:o,max:r}=this,i=(n-o)/(r-o);return Math.max(0,i*100)},saveSlider(n){this.sliderRef=n},saveHandle(n,o){this.handlesRefs[n]=o}},render(){const{prefixCls:n,marks:o,dots:r,step:i,included:a,disabled:l,vertical:s,reverse:u,min:c,max:d,maximumTrackStyle:f,railStyle:p,dotStyle:v,activeDotStyle:h,id:m}=this,{class:b,style:S}=this.$attrs,{tracks:C,handles:$}=this.renderSlider(),x=ge(n,b,{[`${n}-with-marks`]:Object.keys(o).length,[`${n}-disabled`]:l,[`${n}-vertical`]:s,[`${n}-horizontal`]:!s}),P={vertical:s,marks:o,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:d,min:c,reverse:u,class:`${n}-mark`,onClickLabel:l?fl:this.onClickMarkLabel},w={[hn?"onTouchstartPassive":"onTouchstart"]:l?fl:this.onTouchStart};return g("div",k(k({id:m,ref:this.saveSlider,tabindex:"-1",class:x},w),{},{onMousedown:l?fl:this.onMouseDown,onMouseup:l?fl:this.onMouseUp,onKeydown:l?fl:this.onKeyDown,onFocus:l?fl:this.onFocus,onBlur:l?fl:this.onBlur,style:S}),[g("div",{class:`${n}-rail`,style:y(y({},f),p)},null),C,g(KD,{prefixCls:n,vertical:s,reverse:u,marks:o,dots:r,step:i,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:d,min:c,dotStyle:v,activeDotStyle:h},null),$,g(UD,P,{mark:this.$slots.mark}),gv(this)])}})}const Sfe=le({compatConfig:{MODE:3},name:"Slider",mixins:[ls],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:K.oneOfType([K.number,K.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data(){const e=this.defaultValue!==void 0?this.defaultValue:this.min,t=this.value!==void 0?this.value:e;return{sValue:this.trimAlignValue(t),dragging:!1}},watch:{value:{handler(e){this.setChangeValue(e)},deep:!0},min(){const{sValue:e}=this;this.setChangeValue(e)},max(){const{sValue:e}=this;this.setChangeValue(e)}},methods:{setChangeValue(e){const t=e!==void 0?e:this.sValue,n=this.trimAlignValue(t,this.$props);n!==this.sValue&&(this.setState({sValue:n}),XD(t,this.$props)&&this.$emit("change",n))},onChange(e){const t=!ki(this,"value"),n=e.sValue>this.max?y(y({},e),{sValue:this.max}):e;t&&this.setState(n);const o=n.sValue;this.$emit("change",o)},onStart(e){this.setState({dragging:!0});const{sValue:t}=this;this.$emit("beforeChange",t);const n=this.calcValueByPos(e);this.startValue=n,this.startPosition=e,n!==t&&(this.prevMovedHandleIndex=0,this.onChange({sValue:n}))},onEnd(e){const{dragging:t}=this;this.removeDocumentEvents(),(t||e)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove(e,t){Tc(e);const{sValue:n}=this,o=this.calcValueByPos(t);o!==n&&this.onChange({sValue:o})},onKeyboard(e){const{reverse:t,vertical:n}=this.$props,o=JD(e,n,t);if(o){Tc(e);const{sValue:r}=this,i=o(r,this.$props),a=this.trimAlignValue(i);if(a===r)return;this.onChange({sValue:a}),this.$emit("afterChange",a),this.onEnd()}},getLowerBound(){const e=this.$props.startPoint||this.$props.min;return this.$data.sValue>e?e:this.$data.sValue},getUpperBound(){return this.$data.sValue1&&arguments[1]!==void 0?arguments[1]:{};if(e===null)return null;const n=y(y({},this.$props),t),o=u$(e,n);return qD(o,n)},getTrack(e){let{prefixCls:t,reverse:n,vertical:o,included:r,minimumTrackStyle:i,mergedTrackStyle:a,length:l,offset:s}=e;return g(c$,{class:`${t}-track`,vertical:o,included:r,offset:s,reverse:n,length:l,style:y(y({},i),a)},null)},renderSlider(){const{prefixCls:e,vertical:t,included:n,disabled:o,minimumTrackStyle:r,trackStyle:i,handleStyle:a,tabindex:l,ariaLabelForHandle:s,ariaLabelledByForHandle:u,ariaValueTextFormatterForHandle:c,min:d,max:f,startPoint:p,reverse:v,handle:h,defaultHandle:m}=this,b=h||m,{sValue:S,dragging:C}=this,$=this.calcOffset(S),x=b({class:`${e}-handle`,prefixCls:e,vertical:t,offset:$,value:S,dragging:C,disabled:o,min:d,max:f,reverse:v,index:0,tabindex:l,ariaLabel:s,ariaLabelledBy:u,ariaValueTextFormatter:c,style:a[0]||a,ref:O=>this.saveHandle(0,O),onFocus:this.onFocus,onBlur:this.onBlur}),P=p!==void 0?this.calcOffset(p):0,w=i[0]||i;return{tracks:this.getTrack({prefixCls:e,reverse:v,vertical:t,included:n,offset:P,minimumTrackStyle:r,mergedTrackStyle:w,length:$-P}),handles:x}}}}),Cfe=ZD(Sfe),wu=e=>{let{value:t,handle:n,bounds:o,props:r}=e;const{allowCross:i,pushable:a}=r,l=Number(a),s=u$(t,r);let u=s;return!i&&n!=null&&o!==void 0&&(n>0&&s<=o[n-1]+l&&(u=o[n-1]+l),n=o[n+1]-l&&(u=o[n+1]-l)),qD(u,r)},xfe={defaultValue:K.arrayOf(K.number),value:K.arrayOf(K.number),count:Number,pushable:K6(K.oneOfType([K.looseBool,K.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:K.arrayOf(K.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},$fe=le({compatConfig:{MODE:3},name:"Range",mixins:[ls],inheritAttrs:!1,props:Qe(xfe,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data(){const{count:e,min:t,max:n}=this,o=Array(...Array(e+1)).map(()=>t),r=ki(this,"defaultValue")?this.defaultValue:o;let{value:i}=this;i===void 0&&(i=r);const a=i.map((s,u)=>wu({value:s,handle:u,props:this.$props}));return{sHandle:null,recent:a[0]===n?0:a.length-1,bounds:a}},watch:{value:{handler(e){const{bounds:t}=this;this.setChangeValue(e||t)},deep:!0},min(){const{value:e}=this;this.setChangeValue(e||this.bounds)},max(){const{value:e}=this;this.setChangeValue(e||this.bounds)}},methods:{setChangeValue(e){const{bounds:t}=this;let n=e.map((o,r)=>wu({value:o,handle:r,bounds:t,props:this.$props}));if(t.length===n.length){if(n.every((o,r)=>o===t[r]))return null}else n=e.map((o,r)=>wu({value:o,handle:r,props:this.$props}));if(this.setState({bounds:n}),e.some(o=>XD(o,this.$props))){const o=e.map(r=>u$(r,this.$props));this.$emit("change",o)}},onChange(e){if(!ki(this,"value"))this.setState(e);else{const r={};["sHandle","recent"].forEach(i=>{e[i]!==void 0&&(r[i]=e[i])}),Object.keys(r).length&&this.setState(r)}const o=y(y({},this.$data),e).bounds;this.$emit("change",o)},positionGetValue(e){const t=this.getValue(),n=this.calcValueByPos(e),o=this.getClosestBound(n),r=this.getBoundNeedMoving(n,o),i=t[r];if(n===i)return null;const a=[...t];return a[r]=n,a},onStart(e){const{bounds:t}=this;this.$emit("beforeChange",t);const n=this.calcValueByPos(e);this.startValue=n,this.startPosition=e;const o=this.getClosestBound(n);this.prevMovedHandleIndex=this.getBoundNeedMoving(n,o),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});const r=t[this.prevMovedHandleIndex];if(n===r)return;const i=[...t];i[this.prevMovedHandleIndex]=n,this.onChange({bounds:i})},onEnd(e){const{sHandle:t}=this;this.removeDocumentEvents(),t||(this.dragTrack=!1),(t!==null||e)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove(e,t,n,o){Tc(e);const{$data:r,$props:i}=this,a=i.max||100,l=i.min||0;if(n){let f=i.vertical?-t:t;f=i.reverse?-f:f;const p=a-Math.max(...o),v=l-Math.min(...o),h=Math.min(Math.max(f/(this.getSliderLength()/100),v),p),m=o.map(b=>Math.floor(Math.max(Math.min(b+h,a),l)));r.bounds.map((b,S)=>b===m[S]).some(b=>!b)&&this.onChange({bounds:m});return}const{bounds:s,sHandle:u}=this,c=this.calcValueByPos(t),d=s[u];c!==d&&this.moveTo(c)},onKeyboard(e){const{reverse:t,vertical:n}=this.$props,o=JD(e,n,t);if(o){Tc(e);const{bounds:r,sHandle:i}=this,a=r[i===null?this.recent:i],l=o(a,this.$props),s=wu({value:l,handle:i,bounds:r,props:this.$props});if(s===a)return;this.moveTo(s,!0)}},getClosestBound(e){const{bounds:t}=this;let n=0;for(let o=1;o=t[o]&&(n=o);return Math.abs(t[n+1]-e)l-s),this.internalPointsCache={marks:e,step:t,points:a}}return this.internalPointsCache.points},moveTo(e,t){const n=[...this.bounds],{sHandle:o,recent:r}=this,i=o===null?r:o;n[i]=e;let a=i;this.$props.pushable!==!1?this.pushSurroundingHandles(n,a):this.$props.allowCross&&(n.sort((l,s)=>l-s),a=n.indexOf(e)),this.onChange({recent:a,sHandle:a,bounds:n}),t&&(this.$emit("afterChange",n),this.setState({},()=>{this.handlesRefs[a].focus()}),this.onEnd())},pushSurroundingHandles(e,t){const n=e[t],{pushable:o}=this,r=Number(o);let i=0;if(e[t+1]-n=o.length||i<0)return!1;const a=t+n,l=o[i],{pushable:s}=this,u=Number(s),c=n*(e[a]-l);return this.pushHandle(e,a,n,u-c)?(e[t]=l,!0):!1},trimAlignValue(e){const{sHandle:t,bounds:n}=this;return wu({value:e,handle:t,bounds:n,props:this.$props})},ensureValueNotConflict(e,t,n){let{allowCross:o,pushable:r}=n;const i=this.$data||{},{bounds:a}=i;if(e=e===void 0?i.sHandle:e,r=Number(r),!o&&e!=null&&a!==void 0){if(e>0&&t<=a[e-1]+r)return a[e-1]+r;if(e=a[e+1]-r)return a[e+1]-r}return t},getTrack(e){let{bounds:t,prefixCls:n,reverse:o,vertical:r,included:i,offsets:a,trackStyle:l}=e;return t.slice(0,-1).map((s,u)=>{const c=u+1,d=ge({[`${n}-track`]:!0,[`${n}-track-${c}`]:!0});return g(c$,{class:d,vertical:r,reverse:o,included:i,offset:a[c-1],length:a[c]-a[c-1],style:l[u],key:c},null)})},renderSlider(){const{sHandle:e,bounds:t,prefixCls:n,vertical:o,included:r,disabled:i,min:a,max:l,reverse:s,handle:u,defaultHandle:c,trackStyle:d,handleStyle:f,tabindex:p,ariaLabelGroupForHandles:v,ariaLabelledByGroupForHandles:h,ariaValueTextFormatterGroupForHandles:m}=this,b=u||c,S=t.map(x=>this.calcOffset(x)),C=`${n}-handle`,$=t.map((x,P)=>{let w=p[P]||0;(i||p[P]===null)&&(w=null);const O=e===P;return b({class:ge({[C]:!0,[`${C}-${P+1}`]:!0,[`${C}-dragging`]:O}),prefixCls:n,vertical:o,dragging:O,offset:S[P],value:x,index:P,tabindex:w,min:a,max:l,reverse:s,disabled:i,style:f[P],ref:I=>this.saveHandle(P,I),onFocus:this.onFocus,onBlur:this.onBlur,ariaLabel:v[P],ariaLabelledBy:h[P],ariaValueTextFormatter:m[P]})});return{tracks:this.getTrack({bounds:t,prefixCls:n,reverse:s,vertical:o,included:r,offsets:S,trackStyle:d}),handles:$}}}}),wfe=ZD($fe),Pfe=le({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:y8(),setup(e,t){let{attrs:n,slots:o}=t;const r=ae(null),i=ae(null);function a(){Ze.cancel(i.value),i.value=null}function l(){i.value=Ze(()=>{var u;(u=r.value)===null||u===void 0||u.forcePopupAlign(),i.value=null})}const s=()=>{a(),e.open&&l()};return be([()=>e.open,()=>e.title],()=>{s()},{flush:"post",immediate:!0}),av(()=>{s()}),tt(()=>{a()}),()=>g(Ro,k(k({ref:r},e),n),o)}}),Ofe=e=>{const{componentCls:t,controlSize:n,dotSize:o,marginFull:r,marginPart:i,colorFillContentHover:a}=e;return{[t]:y(y({},qe(e)),{position:"relative",height:n,margin:`${i}px ${r}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${r}px ${i}px`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.colorFillTertiary,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${t}-track`]:{position:"absolute",backgroundColor:e.colorPrimaryBorder,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},"&:hover":{[`${t}-rail`]:{backgroundColor:e.colorFillSecondary},[`${t}-track`]:{backgroundColor:e.colorPrimaryBorderHover},[`${t}-dot`]:{borderColor:a},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.colorPrimary}},[`${t}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${t}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+e.handleLineWidth*2,height:e.handleSize+e.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:` inset-inline-start ${e.motionDurationMid}, inset-block-start ${e.motionDurationMid}, width ${e.motionDurationMid}, @@ -408,7 +408,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `]:{backgroundColor:e.colorBgElevated,borderColor:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:e.handleSize,height:e.handleSize,boxShadow:`0 0 0 ${e.handleLineWidth}px ${new St(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString()}`,insetInlineStart:0,insetBlockStart:0},[` ${t}-mark-text, ${t}-dot - `]:{cursor:"not-allowed !important"}}})}},QD=(e,t)=>{const{componentCls:n,railSize:o,handleSize:r,dotSize:i}=e,a=t?"paddingBlock":"paddingInline",l=t?"width":"height",s=t?"height":"width",u=t?"insetBlockStart":"insetInlineStart",c=t?"top":"insetInlineStart";return{[a]:o,[s]:o*3,[`${n}-rail`]:{[l]:"100%",[s]:o},[`${n}-track`]:{[s]:o},[`${n}-handle`]:{[u]:(o*3-r)/2},[`${n}-mark`]:{insetInlineStart:0,top:0,[c]:r,[l]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[c]:o,[l]:"100%",[s]:o},[`${n}-dot`]:{position:"absolute",[u]:(o-i)/2}}},Ife=e=>{const{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:y(y({},QD(e,!0)),{[`&${t}-with-marks`]:{marginBottom:n}})}},Tfe=e=>{const{componentCls:t}=e;return{[`${t}-vertical`]:y(y({},QD(e,!1)),{height:"100%"})}},Efe=Ue("Slider",e=>{const t=Be(e,{marginPart:(e.controlHeight-e.controlSize)/2,marginFull:e.controlSize/2,marginPartWithMark:e.controlHeightLG-e.controlSize});return[Ofe(t),Ife(t),Tfe(t)]},e=>{const n=e.controlHeightLG/4,o=e.controlHeightSM/2,r=e.lineWidth+1,i=e.lineWidth+1*3;return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:o,dotSize:8,handleLineWidth:r,handleLineWidthHover:i}});var U4=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rtypeof e=="number"?e.toString():"",Mfe=()=>({id:String,prefixCls:String,tooltipPrefixCls:String,range:He([Boolean,Object]),reverse:$e(),min:Number,max:Number,step:He([Object,Number]),marks:De(),dots:$e(),value:He([Array,Number]),defaultValue:He([Array,Number]),included:$e(),disabled:$e(),vertical:$e(),tipFormatter:He([Function,Object],()=>_fe),tooltipOpen:$e(),tooltipVisible:$e(),tooltipPlacement:Ne(),getTooltipPopupContainer:ye(),autofocus:$e(),handleStyle:He([Array,Object]),trackStyle:He([Array,Object]),onChange:ye(),onAfterChange:ye(),onFocus:ye(),onBlur:ye(),"onUpdate:value":ye()}),Afe=le({compatConfig:{MODE:3},name:"ASlider",inheritAttrs:!1,props:Mfe(),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r,expose:i}=t;const{prefixCls:a,rootPrefixCls:l,direction:s,getPopupContainer:u,configProvider:c}=Te("slider",e),[d,f]=Efe(a),p=bn(),v=ae(),h=ae({}),m=(w,O)=>{h.value[w]=O},b=E(()=>e.tooltipPlacement?e.tooltipPlacement:e.vertical?s.value==="rtl"?"left":"right":"top"),S=()=>{var w;(w=v.value)===null||w===void 0||w.focus()},C=()=>{var w;(w=v.value)===null||w===void 0||w.blur()},$=w=>{r("update:value",w),r("change",w),p.onFieldChange()},x=w=>{r("blur",w)};i({focus:S,blur:C});const P=w=>{var{tooltipPrefixCls:O}=w,I=w.info,{value:_,dragging:T,index:A}=I,R=U4(I,["value","dragging","index"]);const{tipFormatter:H,tooltipOpen:M=e.tooltipVisible,getTooltipPopupContainer:D}=e,N=H?h.value[A]||T:!1,L=M||M===void 0&&N;return g(Pfe,{prefixCls:O,title:H?H(_):"",open:L,placement:b.value,transitionName:`${l.value}-zoom-down`,key:A,overlayClassName:`${a.value}-tooltip`,getPopupContainer:D||(u==null?void 0:u.value)},{default:()=>[g(GD,k(k({},R),{},{value:_,onMouseenter:()=>m(A,!0),onMouseleave:()=>m(A,!1)}),null)]})};return()=>{const{tooltipPrefixCls:w,range:O,id:I=p.id.value}=e,_=U4(e,["tooltipPrefixCls","range","id"]),T=c.getPrefixCls("tooltip",w),A=ge(n.class,{[`${a.value}-rtl`]:s.value==="rtl"},f.value);s.value==="rtl"&&!_.vertical&&(_.reverse=!_.reverse);let R;return typeof O=="object"&&(R=O.draggableTrack),d(O?g(wfe,k(k(k({},n),_),{},{step:_.step,draggableTrack:R,class:A,ref:v,handle:H=>P({tooltipPrefixCls:T,prefixCls:a.value,info:H}),prefixCls:a.value,onChange:$,onBlur:x}),{mark:o.mark}):g(Cfe,k(k(k({},n),_),{},{id:I,step:_.step,class:A,ref:v,handle:H=>P({tooltipPrefixCls:T,prefixCls:a.value,info:H}),prefixCls:a.value,onChange:$,onBlur:x}),{mark:o.mark}))}}}),Rfe=Lt(Afe);function G4(e){return typeof e=="string"}function Dfe(){}const eN=()=>({prefixCls:String,itemWidth:String,active:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},status:Ne(),iconPrefix:String,icon:K.any,adjustMarginRight:String,stepNumber:Number,stepIndex:Number,description:K.any,title:K.any,subTitle:K.any,progressDot:K6(K.oneOfType([K.looseBool,K.func])),tailContent:K.any,icons:K.shape({finish:K.any,error:K.any}).loose,onClick:ye(),onStepClick:ye(),stepIcon:ye(),itemRender:ye(),__legacy:$e()}),tN=le({compatConfig:{MODE:3},name:"Step",inheritAttrs:!1,props:eN(),setup(e,t){let{slots:n,emit:o,attrs:r}=t;const i=l=>{o("click",l),o("stepClick",e.stepIndex)},a=l=>{let{icon:s,title:u,description:c}=l;const{prefixCls:d,stepNumber:f,status:p,iconPrefix:v,icons:h,progressDot:m=n.progressDot,stepIcon:b=n.stepIcon}=e;let S;const C=ge(`${d}-icon`,`${v}icon`,{[`${v}icon-${s}`]:s&&G4(s),[`${v}icon-check`]:!s&&p==="finish"&&(h&&!h.finish||!h),[`${v}icon-cross`]:!s&&p==="error"&&(h&&!h.error||!h)}),$=g("span",{class:`${d}-icon-dot`},null);return m?typeof m=="function"?S=g("span",{class:`${d}-icon`},[m({iconDot:$,index:f-1,status:p,title:u,description:c,prefixCls:d})]):S=g("span",{class:`${d}-icon`},[$]):s&&!G4(s)?S=g("span",{class:`${d}-icon`},[s]):h&&h.finish&&p==="finish"?S=g("span",{class:`${d}-icon`},[h.finish]):h&&h.error&&p==="error"?S=g("span",{class:`${d}-icon`},[h.error]):s||p==="finish"||p==="error"?S=g("span",{class:C},null):S=g("span",{class:`${d}-icon`},[f]),b&&(S=b({index:f-1,status:p,title:u,description:c,node:S})),S};return()=>{var l,s,u,c;const{prefixCls:d,itemWidth:f,active:p,status:v="wait",tailContent:h,adjustMarginRight:m,disabled:b,title:S=(l=n.title)===null||l===void 0?void 0:l.call(n),description:C=(s=n.description)===null||s===void 0?void 0:s.call(n),subTitle:$=(u=n.subTitle)===null||u===void 0?void 0:u.call(n),icon:x=(c=n.icon)===null||c===void 0?void 0:c.call(n),onClick:P,onStepClick:w}=e,O=v||"wait",I=ge(`${d}-item`,`${d}-item-${O}`,{[`${d}-item-custom`]:x,[`${d}-item-active`]:p,[`${d}-item-disabled`]:b===!0}),_={};f&&(_.width=f),m&&(_.marginRight=m);const T={onClick:P||Dfe};w&&!b&&(T.role="button",T.tabindex=0,T.onClick=i);const A=g("div",k(k({},it(r,["__legacy"])),{},{class:[I,r.class],style:[r.style,_]}),[g("div",k(k({},T),{},{class:`${d}-item-container`}),[g("div",{class:`${d}-item-tail`},[h]),g("div",{class:`${d}-item-icon`},[a({icon:x,title:S,description:C})]),g("div",{class:`${d}-item-content`},[g("div",{class:`${d}-item-title`},[S,$&&g("div",{title:typeof $=="string"?$:void 0,class:`${d}-item-subtitle`},[$])]),C&&g("div",{class:`${d}-item-description`},[C])])])]);return e.itemRender?e.itemRender(A):A}}});var Nfe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r[]),icons:K.shape({finish:K.any,error:K.any}).loose,stepIcon:ye(),isInline:K.looseBool,itemRender:ye()},emits:["change"],setup(e,t){let{slots:n,emit:o}=t;const r=l=>{const{current:s}=e;s!==l&&o("change",l)},i=(l,s,u)=>{const{prefixCls:c,iconPrefix:d,status:f,current:p,initial:v,icons:h,stepIcon:m=n.stepIcon,isInline:b,itemRender:S,progressDot:C=n.progressDot}=e,$=b||C,x=y(y({},l),{class:""}),P=v+s,w={active:P===p,stepNumber:P+1,stepIndex:P,key:P,prefixCls:c,iconPrefix:d,progressDot:$,stepIcon:m,icons:h,onStepClick:r};return f==="error"&&s===p-1&&(x.class=`${c}-next-error`),x.status||(P===p?x.status=f:PS(x,O)),g(tN,k(k(k({},x),w),{},{__legacy:!1}),null))},a=(l,s)=>i(y({},l.props),s,u=>mt(l,u));return()=>{var l;const{prefixCls:s,direction:u,type:c,labelPlacement:d,iconPrefix:f,status:p,size:v,current:h,progressDot:m=n.progressDot,initial:b,icons:S,items:C,isInline:$,itemRender:x}=e,P=Nfe(e,["prefixCls","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","initial","icons","items","isInline","itemRender"]),w=c==="navigation",O=$||m,I=$?"horizontal":u,_=$?void 0:v,T=O?"vertical":d,A=ge(s,`${s}-${u}`,{[`${s}-${_}`]:_,[`${s}-label-${T}`]:I==="horizontal",[`${s}-dot`]:!!O,[`${s}-navigation`]:w,[`${s}-inline`]:$});return g("div",k({class:A},P),[C.filter(R=>R).map((R,H)=>i(R,H)),zt((l=n.default)===null||l===void 0?void 0:l.call(n)).map(a)])}}}),Lfe=e=>{const{componentCls:t,stepsIconCustomTop:n,stepsIconCustomSize:o,stepsIconCustomFontSize:r}=e;return{[`${t}-item-custom`]:{[`> ${t}-item-container > ${t}-item-icon`]:{height:"auto",background:"none",border:0,[`> ${t}-icon`]:{top:n,width:o,height:o,fontSize:r,lineHeight:`${o}px`}}},[`&:not(${t}-vertical)`]:{[`${t}-item-custom`]:{[`${t}-item-icon`]:{width:"auto",background:"none"}}}}},Ffe=e=>{const{componentCls:t,stepsIconSize:n,lineHeight:o,stepsSmallIconSize:r}=e;return{[`&${t}-label-vertical`]:{[`${t}-item`]:{overflow:"visible","&-tail":{marginInlineStart:n/2+e.controlHeightLG,padding:`${e.paddingXXS}px ${e.paddingLG}px`},"&-content":{display:"block",width:(n/2+e.controlHeightLG)*2,marginTop:e.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:e.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:e.marginXXS,marginInlineStart:0,lineHeight:o}},[`&${t}-small:not(${t}-dot)`]:{[`${t}-item`]:{"&-icon":{marginInlineStart:e.controlHeightLG+(n-r)/2}}}}}},Bfe=e=>{const{componentCls:t,stepsNavContentMaxWidth:n,stepsNavArrowColor:o,stepsNavActiveColor:r,motionDurationSlow:i}=e;return{[`&${t}-navigation`]:{paddingTop:e.paddingSM,[`&${t}-small`]:{[`${t}-item`]:{"&-container":{marginInlineStart:-e.marginSM}}},[`${t}-item`]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:-e.margin,paddingBottom:e.paddingSM,textAlign:"start",transition:`opacity ${i}`,[`${t}-item-content`]:{maxWidth:n},[`${t}-item-title`]:y(y({maxWidth:"100%",paddingInlineEnd:0},cn),{"&::after":{display:"none"}})},[`&:not(${t}-item-active)`]:{[`${t}-item-container[role='button']`]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:`calc(50% - ${e.paddingSM/2}px)`,insetInlineStart:"100%",display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,borderTop:`${e.lineWidth}px ${e.lineType} ${o}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${o}`,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:e.lineWidthBold,backgroundColor:r,transition:`width ${i}, inset-inline-start ${i}`,transitionTimingFunction:"ease-out",content:'""'}},[`${t}-item${t}-item-active::before`]:{insetInlineStart:0,width:"100%"}},[`&${t}-navigation${t}-vertical`]:{[`> ${t}-item`]:{marginInlineEnd:0,"&::before":{display:"none"},[`&${t}-item-active::before`]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:e.lineWidth*3,height:`calc(100% - ${e.marginLG}px)`},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:e.controlHeight*.25,height:e.controlHeight*.25,marginBottom:e.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},[`> ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}},[`&${t}-navigation${t}-horizontal`]:{[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}}},Hfe=e=>{const{antCls:t,componentCls:n}=e;return{[`&${n}-with-progress`]:{[`${n}-item`]:{paddingTop:e.paddingXXS,[`&-process ${n}-item-container ${n}-item-icon ${n}-icon`]:{color:e.processIconColor}},[`&${n}-vertical > ${n}-item `]:{paddingInlineStart:e.paddingXXS,[`> ${n}-item-container > ${n}-item-tail`]:{top:e.marginXXS,insetInlineStart:e.stepsIconSize/2-e.lineWidth+e.paddingXXS}},[`&, &${n}-small`]:{[`&${n}-horizontal ${n}-item:first-child`]:{paddingBottom:e.paddingXXS,paddingInlineStart:e.paddingXXS}},[`&${n}-small${n}-vertical > ${n}-item > ${n}-item-container > ${n}-item-tail`]:{insetInlineStart:e.stepsSmallIconSize/2-e.lineWidth+e.paddingXXS},[`&${n}-label-vertical`]:{[`${n}-item ${n}-item-tail`]:{top:e.margin-2*e.lineWidth}},[`${n}-item-icon`]:{position:"relative",[`${t}-progress`]:{position:"absolute",insetBlockStart:(e.stepsIconSize-e.stepsProgressSize-e.lineWidth*2)/2,insetInlineStart:(e.stepsIconSize-e.stepsProgressSize-e.lineWidth*2)/2}}}}},zfe=e=>{const{componentCls:t,descriptionWidth:n,lineHeight:o,stepsCurrentDotSize:r,stepsDotSize:i,motionDurationSlow:a}=e;return{[`&${t}-dot, &${t}-dot${t}-small`]:{[`${t}-item`]:{"&-title":{lineHeight:o},"&-tail":{top:Math.floor((e.stepsDotSize-e.lineWidth*3)/2),width:"100%",marginTop:0,marginBottom:0,marginInline:`${n/2}px 0`,padding:0,"&::after":{width:`calc(100% - ${e.marginSM*2}px)`,height:e.lineWidth*3,marginInlineStart:e.marginSM}},"&-icon":{width:i,height:i,marginInlineStart:(e.descriptionWidth-i)/2,paddingInlineEnd:0,lineHeight:`${i}px`,background:"transparent",border:0,[`${t}-icon-dot`]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:`all ${a}`,"&::after":{position:"absolute",top:-e.marginSM,insetInlineStart:(i-e.controlHeightLG*1.5)/2,width:e.controlHeightLG*1.5,height:e.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:n},[`&-process ${t}-item-icon`]:{position:"relative",top:(i-r)/2,width:r,height:r,lineHeight:`${r}px`,background:"none",marginInlineStart:(e.descriptionWidth-r)/2},[`&-process ${t}-icon`]:{[`&:first-child ${t}-icon-dot`]:{insetInlineStart:0}}}},[`&${t}-vertical${t}-dot`]:{[`${t}-item-icon`]:{marginTop:(e.controlHeight-i)/2,marginInlineStart:0,background:"none"},[`${t}-item-process ${t}-item-icon`]:{marginTop:(e.controlHeight-r)/2,top:0,insetInlineStart:(i-r)/2,marginInlineStart:0},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:(e.controlHeight-i)/2,insetInlineStart:0,margin:0,padding:`${i+e.paddingXS}px 0 ${e.paddingXS}px`,"&::after":{marginInlineStart:(i-e.lineWidth)/2}},[`&${t}-small`]:{[`${t}-item-icon`]:{marginTop:(e.controlHeightSM-i)/2},[`${t}-item-process ${t}-item-icon`]:{marginTop:(e.controlHeightSM-r)/2},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:(e.controlHeightSM-i)/2}},[`${t}-item:first-child ${t}-icon-dot`]:{insetInlineStart:0},[`${t}-item-content`]:{width:"inherit"}}}},jfe=e=>{const{componentCls:t}=e;return{[`&${t}-rtl`]:{direction:"rtl",[`${t}-item`]:{"&-subtitle":{float:"left"}},[`&${t}-navigation`]:{[`${t}-item::after`]:{transform:"rotate(-45deg)"}},[`&${t}-vertical`]:{[`> ${t}-item`]:{"&::after":{transform:"rotate(225deg)"},[`${t}-item-icon`]:{float:"right"}}},[`&${t}-dot`]:{[`${t}-item-icon ${t}-icon-dot, &${t}-small ${t}-item-icon ${t}-icon-dot`]:{float:"right"}}}}},Wfe=e=>{const{componentCls:t,stepsSmallIconSize:n,fontSizeSM:o,fontSize:r,colorTextDescription:i}=e;return{[`&${t}-small`]:{[`&${t}-horizontal:not(${t}-label-vertical) ${t}-item`]:{paddingInlineStart:e.paddingSM,"&:first-child":{paddingInlineStart:0}},[`${t}-item-icon`]:{width:n,height:n,marginTop:0,marginBottom:0,marginInline:`0 ${e.marginXS}px`,fontSize:o,lineHeight:`${n}px`,textAlign:"center",borderRadius:n},[`${t}-item-title`]:{paddingInlineEnd:e.paddingSM,fontSize:r,lineHeight:`${n}px`,"&::after":{top:n/2}},[`${t}-item-description`]:{color:i,fontSize:r},[`${t}-item-tail`]:{top:n/2-e.paddingXXS},[`${t}-item-custom ${t}-item-icon`]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,[`> ${t}-icon`]:{fontSize:n,lineHeight:`${n}px`,transform:"none"}}}}},Vfe=e=>{const{componentCls:t,stepsSmallIconSize:n,stepsIconSize:o}=e;return{[`&${t}-vertical`]:{display:"flex",flexDirection:"column",[`> ${t}-item`]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",[`${t}-item-icon`]:{float:"left",marginInlineEnd:e.margin},[`${t}-item-content`]:{display:"block",minHeight:e.controlHeight*1.5,overflow:"hidden"},[`${t}-item-title`]:{lineHeight:`${o}px`},[`${t}-item-description`]:{paddingBottom:e.paddingSM}},[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.stepsIconSize/2-e.lineWidth,width:e.lineWidth,height:"100%",padding:`${o+e.marginXXS*1.5}px 0 ${e.marginXXS*1.5}px`,"&::after":{width:e.lineWidth,height:"100%"}},[`> ${t}-item:not(:last-child) > ${t}-item-container > ${t}-item-tail`]:{display:"block"},[` > ${t}-item > ${t}-item-container > ${t}-item-content > ${t}-item-title`]:{"&::after":{display:"none"}},[`&${t}-small ${t}-item-container`]:{[`${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.stepsSmallIconSize/2-e.lineWidth,padding:`${n+e.marginXXS*1.5}px 0 ${e.marginXXS*1.5}px`},[`${t}-item-title`]:{lineHeight:`${n}px`}}}}},Kfe=e=>{const{componentCls:t,inlineDotSize:n,inlineTitleColor:o,inlineTailColor:r}=e,i=e.paddingXS+e.lineWidth,a={[`${t}-item-container ${t}-item-content ${t}-item-title`]:{color:o}};return{[`&${t}-inline`]:{width:"auto",display:"inline-flex",[`${t}-item`]:{flex:"none","&-container":{padding:`${i}px ${e.paddingXXS}px 0`,margin:`0 ${e.marginXXS/2}px`,borderRadius:e.borderRadiusSM,cursor:"pointer",transition:`background-color ${e.motionDurationMid}`,"&:hover":{background:e.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:n,height:n,marginInlineStart:`calc(50% - ${n/2}px)`,[`> ${t}-icon`]:{top:0},[`${t}-icon-dot`]:{borderRadius:e.fontSizeSM/4}},"&-content":{width:"auto",marginTop:e.marginXS-e.lineWidth},"&-title":{color:o,fontSize:e.fontSizeSM,lineHeight:e.lineHeightSM,fontWeight:"normal",marginBottom:e.marginXXS/2},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:i+n/2,transform:"translateY(-50%)","&:after":{width:"100%",height:e.lineWidth,borderRadius:0,marginInlineStart:0,background:r}},[`&:first-child ${t}-item-tail`]:{width:"50%",marginInlineStart:"50%"},[`&:last-child ${t}-item-tail`]:{display:"block",width:"50%"},"&-wait":y({[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:e.colorBorderBg,border:`${e.lineWidth}px ${e.lineType} ${r}`}},a),"&-finish":y({[`${t}-item-tail::after`]:{backgroundColor:r},[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:r,border:`${e.lineWidth}px ${e.lineType} ${r}`}},a),"&-error":a,"&-active, &-process":y({[`${t}-item-icon`]:{width:n,height:n,marginInlineStart:`calc(50% - ${n/2}px)`,top:0}},a),[`&:not(${t}-item-active) > ${t}-item-container[role='button']:hover`]:{[`${t}-item-title`]:{color:o}}}}}};var Gs;(function(e){e.wait="wait",e.process="process",e.finish="finish",e.error="error"})(Gs||(Gs={}));const mp=(e,t)=>{const n=`${t.componentCls}-item`,o=`${e}IconColor`,r=`${e}TitleColor`,i=`${e}DescriptionColor`,a=`${e}TailColor`,l=`${e}IconBgColor`,s=`${e}IconBorderColor`,u=`${e}DotColor`;return{[`${n}-${e} ${n}-icon`]:{backgroundColor:t[l],borderColor:t[s],[`> ${t.componentCls}-icon`]:{color:t[o],[`${t.componentCls}-icon-dot`]:{background:t[u]}}},[`${n}-${e}${n}-custom ${n}-icon`]:{[`> ${t.componentCls}-icon`]:{color:t[u]}},[`${n}-${e} > ${n}-container > ${n}-content > ${n}-title`]:{color:t[r],"&::after":{backgroundColor:t[a]}},[`${n}-${e} > ${n}-container > ${n}-content > ${n}-description`]:{color:t[i]},[`${n}-${e} > ${n}-container > ${n}-tail::after`]:{backgroundColor:t[a]}}},Ufe=e=>{const{componentCls:t,motionDurationSlow:n}=e,o=`${t}-item`;return y(y(y(y(y(y({[o]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",[`> ${o}-container > ${o}-tail, > ${o}-container > ${o}-content > ${o}-title::after`]:{display:"none"}}},[`${o}-container`]:{outline:"none"},[`${o}-icon, ${o}-content`]:{display:"inline-block",verticalAlign:"top"},[`${o}-icon`]:{width:e.stepsIconSize,height:e.stepsIconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:e.marginXS,fontSize:e.stepsIconFontSize,fontFamily:e.fontFamily,lineHeight:`${e.stepsIconSize}px`,textAlign:"center",borderRadius:e.stepsIconSize,border:`${e.lineWidth}px ${e.lineType} transparent`,transition:`background-color ${n}, border-color ${n}`,[`${t}-icon`]:{position:"relative",top:e.stepsIconTop,color:e.colorPrimary,lineHeight:1}},[`${o}-tail`]:{position:"absolute",top:e.stepsIconSize/2-e.paddingXXS,insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:e.lineWidth,background:e.colorSplit,borderRadius:e.lineWidth,transition:`background ${n}`,content:'""'}},[`${o}-title`]:{position:"relative",display:"inline-block",paddingInlineEnd:e.padding,color:e.colorText,fontSize:e.fontSizeLG,lineHeight:`${e.stepsTitleLineHeight}px`,"&::after":{position:"absolute",top:e.stepsTitleLineHeight/2,insetInlineStart:"100%",display:"block",width:9999,height:e.lineWidth,background:e.processTailColor,content:'""'}},[`${o}-subtitle`]:{display:"inline",marginInlineStart:e.marginXS,color:e.colorTextDescription,fontWeight:"normal",fontSize:e.fontSize},[`${o}-description`]:{color:e.colorTextDescription,fontSize:e.fontSize}},mp(Gs.wait,e)),mp(Gs.process,e)),{[`${o}-process > ${o}-container > ${o}-title`]:{fontWeight:e.fontWeightStrong}}),mp(Gs.finish,e)),mp(Gs.error,e)),{[`${o}${t}-next-error > ${t}-item-title::after`]:{background:e.colorError},[`${o}-disabled`]:{cursor:"not-allowed"}})},Gfe=e=>{const{componentCls:t,motionDurationSlow:n}=e;return{[`& ${t}-item`]:{[`&:not(${t}-item-active)`]:{[`& > ${t}-item-container[role='button']`]:{cursor:"pointer",[`${t}-item`]:{[`&-title, &-subtitle, &-description, &-icon ${t}-icon`]:{transition:`color ${n}`}},"&:hover":{[`${t}-item`]:{"&-title, &-subtitle, &-description":{color:e.colorPrimary}}}},[`&:not(${t}-item-process)`]:{[`& > ${t}-item-container[role='button']:hover`]:{[`${t}-item`]:{"&-icon":{borderColor:e.colorPrimary,[`${t}-icon`]:{color:e.colorPrimary}}}}}}},[`&${t}-horizontal:not(${t}-label-vertical)`]:{[`${t}-item`]:{paddingInlineStart:e.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},[`&:last-child ${t}-item-title`]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:e.descriptionWidth,whiteSpace:"normal"}}}}},Xfe=e=>{const{componentCls:t}=e;return{[t]:y(y(y(y(y(y(y(y(y(y(y(y(y({},qe(e)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),Ufe(e)),Gfe(e)),Lfe(e)),Wfe(e)),Vfe(e)),Ffe(e)),zfe(e)),Bfe(e)),jfe(e)),Hfe(e)),Kfe(e))}},Yfe=Ue("Steps",e=>{const{wireframe:t,colorTextDisabled:n,fontSizeHeading3:o,fontSize:r,controlHeight:i,controlHeightLG:a,colorTextLightSolid:l,colorText:s,colorPrimary:u,colorTextLabel:c,colorTextDescription:d,colorTextQuaternary:f,colorFillContent:p,controlItemBgActive:v,colorError:h,colorBgContainer:m,colorBorderSecondary:b}=e,S=e.controlHeight,C=e.colorSplit,$=Be(e,{processTailColor:C,stepsNavArrowColor:n,stepsIconSize:S,stepsIconCustomSize:S,stepsIconCustomTop:0,stepsIconCustomFontSize:a/2,stepsIconTop:-.5,stepsIconFontSize:r,stepsTitleLineHeight:i,stepsSmallIconSize:o,stepsDotSize:i/4,stepsCurrentDotSize:a/4,stepsNavContentMaxWidth:"auto",processIconColor:l,processTitleColor:s,processDescriptionColor:s,processIconBgColor:u,processIconBorderColor:u,processDotColor:u,waitIconColor:t?n:c,waitTitleColor:d,waitDescriptionColor:d,waitTailColor:C,waitIconBgColor:t?m:p,waitIconBorderColor:t?n:"transparent",waitDotColor:n,finishIconColor:u,finishTitleColor:s,finishDescriptionColor:d,finishTailColor:u,finishIconBgColor:t?m:v,finishIconBorderColor:t?u:v,finishDotColor:u,errorIconColor:l,errorTitleColor:h,errorDescriptionColor:h,errorTailColor:C,errorIconBgColor:h,errorIconBorderColor:h,errorDotColor:h,stepsNavActiveColor:u,stepsProgressSize:a,inlineDotSize:6,inlineTitleColor:f,inlineTailColor:b});return[Xfe($)]},{descriptionWidth:140}),qfe=()=>({prefixCls:String,iconPrefix:String,current:Number,initial:Number,percent:Number,responsive:$e(),items:pt(),labelPlacement:Ne(),status:Ne(),size:Ne(),direction:Ne(),progressDot:He([Boolean,Function]),type:Ne(),onChange:ye(),"onUpdate:current":ye()}),ub=le({compatConfig:{MODE:3},name:"ASteps",inheritAttrs:!1,props:Qe(qfe(),{current:0,responsive:!0,labelPlacement:"horizontal"}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r}=t;const{prefixCls:i,direction:a,configProvider:l}=Te("steps",e),[s,u]=Yfe(i),[,c]=na(),d=nu(),f=E(()=>e.responsive&&d.value.xs?"vertical":e.direction),p=E(()=>l.getPrefixCls("",e.iconPrefix)),v=C=>{r("update:current",C),r("change",C)},h=E(()=>e.type==="inline"),m=E(()=>h.value?void 0:e.percent),b=C=>{let{node:$,status:x}=C;if(x==="process"&&e.percent!==void 0){const P=e.size==="small"?c.value.controlHeight:c.value.controlHeightLG;return g("div",{class:`${i.value}-progress-icon`},[g(a$,{type:"circle",percent:m.value,size:P,strokeWidth:4,format:()=>null},null),$])}return $},S=E(()=>({finish:g(Yc,{class:`${i.value}-finish-icon`},null),error:g(fo,{class:`${i.value}-error-icon`},null)}));return()=>{const C=ge({[`${i.value}-rtl`]:a.value==="rtl",[`${i.value}-with-progress`]:m.value!==void 0},n.class,u.value),$=(x,P)=>x.description?g(Ro,{title:x.description},{default:()=>[P]}):P;return s(g(kfe,k(k(k({icons:S.value},n),it(e,["percent","responsive"])),{},{items:e.items,direction:f.value,prefixCls:i.value,iconPrefix:p.value,class:C,onChange:v,isInline:h.value,itemRender:h.value?$:void 0}),y({stepIcon:b},o)))}}}),fg=le(y(y({compatConfig:{MODE:3}},tN),{name:"AStep",props:eN()})),Jfe=y(ub,{Step:fg,install:e=>(e.component(ub.name,ub),e.component(fg.name,fg),e)}),Zfe=e=>{const{componentCls:t}=e,n=`${t}-inner`;return{[t]:{[`&${t}-small`]:{minWidth:e.switchMinWidthSM,height:e.switchHeightSM,lineHeight:`${e.switchHeightSM}px`,[`${t}-inner`]:{paddingInlineStart:e.switchInnerMarginMaxSM,paddingInlineEnd:e.switchInnerMarginMinSM,[`${n}-checked`]:{marginInlineStart:`calc(-100% + ${e.switchPinSizeSM+e.switchPadding*2}px - ${e.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(100% - ${e.switchPinSizeSM+e.switchPadding*2}px + ${e.switchInnerMarginMaxSM*2}px)`},[`${n}-unchecked`]:{marginTop:-e.switchHeightSM,marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:e.switchPinSizeSM,height:e.switchPinSizeSM},[`${t}-loading-icon`]:{top:(e.switchPinSizeSM-e.switchLoadingIconSize)/2,fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:e.switchInnerMarginMinSM,paddingInlineEnd:e.switchInnerMarginMaxSM,[`${n}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${n}-unchecked`]:{marginInlineStart:`calc(100% - ${e.switchPinSizeSM+e.switchPadding*2}px + ${e.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(-100% + ${e.switchPinSizeSM+e.switchPadding*2}px - ${e.switchInnerMarginMaxSM*2}px)`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${e.switchPinSizeSM+e.switchPadding}px)`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${n}`]:{[`${n}-unchecked`]:{marginInlineStart:e.marginXXS/2,marginInlineEnd:-e.marginXXS/2}},[`&${t}-checked ${n}`]:{[`${n}-checked`]:{marginInlineStart:-e.marginXXS/2,marginInlineEnd:e.marginXXS/2}}}}}}},Qfe=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:(e.switchPinSize-e.fontSize)/2,color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},epe=e=>{const{componentCls:t}=e,n=`${t}-handle`;return{[t]:{[n]:{position:"absolute",top:e.switchPadding,insetInlineStart:e.switchPadding,width:e.switchPinSize,height:e.switchPinSize,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:e.colorWhite,borderRadius:e.switchPinSize/2,boxShadow:e.switchHandleShadow,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${n}`]:{insetInlineStart:`calc(100% - ${e.switchPinSize+e.switchPadding}px)`},[`&:not(${t}-disabled):active`]:{[`${n}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${n}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},tpe=e=>{const{componentCls:t}=e,n=`${t}-inner`;return{[t]:{[n]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:e.switchInnerMarginMax,paddingInlineEnd:e.switchInnerMarginMin,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${n}-checked, ${n}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none"},[`${n}-checked`]:{marginInlineStart:`calc(-100% + ${e.switchPinSize+e.switchPadding*2}px - ${e.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(100% - ${e.switchPinSize+e.switchPadding*2}px + ${e.switchInnerMarginMax*2}px)`},[`${n}-unchecked`]:{marginTop:-e.switchHeight,marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${n}`]:{paddingInlineStart:e.switchInnerMarginMin,paddingInlineEnd:e.switchInnerMarginMax,[`${n}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${n}-unchecked`]:{marginInlineStart:`calc(100% - ${e.switchPinSize+e.switchPadding*2}px + ${e.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(-100% + ${e.switchPinSize+e.switchPadding*2}px - ${e.switchInnerMarginMax*2}px)`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${n}`]:{[`${n}-unchecked`]:{marginInlineStart:e.switchPadding*2,marginInlineEnd:-e.switchPadding*2}},[`&${t}-checked ${n}`]:{[`${n}-checked`]:{marginInlineStart:-e.switchPadding*2,marginInlineEnd:e.switchPadding*2}}}}}},npe=e=>{const{componentCls:t}=e;return{[t]:y(y(y(y({},qe(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:e.switchMinWidth,height:e.switchHeight,lineHeight:`${e.switchHeight}px`,verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),Ji(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}},ope=Ue("Switch",e=>{const t=e.fontSize*e.lineHeight,n=e.controlHeight/2,o=2,r=t-o*2,i=n-o*2,a=Be(e,{switchMinWidth:r*2+o*4,switchHeight:t,switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchInnerMarginMin:r/2,switchInnerMarginMax:r+o+o*2,switchPadding:o,switchPinSize:r,switchBg:e.colorBgContainer,switchMinWidthSM:i*2+o*2,switchHeightSM:n,switchInnerMarginMinSM:i/2,switchInnerMarginMaxSM:i+o+o*2,switchPinSizeSM:i,switchHandleShadow:`0 2px 4px 0 ${new St("#00230b").setAlpha(.2).toRgbString()}`,switchLoadingIconSize:e.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[npe(a),tpe(a),epe(a),Qfe(a),Zfe(a)]}),rpe=Jn("small","default"),ipe=()=>({id:String,prefixCls:String,size:K.oneOf(rpe),disabled:{type:Boolean,default:void 0},checkedChildren:K.any,unCheckedChildren:K.any,tabindex:K.oneOfType([K.string,K.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:K.oneOfType([K.string,K.number,K.looseBool]),checkedValue:K.oneOfType([K.string,K.number,K.looseBool]).def(!0),unCheckedValue:K.oneOfType([K.string,K.number,K.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}),ape=le({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:ipe(),slots:Object,setup(e,t){let{attrs:n,slots:o,expose:r,emit:i}=t;const a=bn(),l=ko(),s=E(()=>{var I;return(I=e.disabled)!==null&&I!==void 0?I:l.value});cf(()=>{});const u=ae(e.checked!==void 0?e.checked:n.defaultChecked),c=E(()=>u.value===e.checkedValue);be(()=>e.checked,()=>{u.value=e.checked});const{prefixCls:d,direction:f,size:p}=Te("switch",e),[v,h]=ope(d),m=ae(),b=()=>{var I;(I=m.value)===null||I===void 0||I.focus()};r({focus:b,blur:()=>{var I;(I=m.value)===null||I===void 0||I.blur()}}),Ke(()=>{ot(()=>{e.autofocus&&!s.value&&m.value.focus()})});const C=(I,_)=>{s.value||(i("update:checked",I),i("change",I,_),a.onFieldChange())},$=I=>{i("blur",I)},x=I=>{b();const _=c.value?e.unCheckedValue:e.checkedValue;C(_,I),i("click",_,I)},P=I=>{I.keyCode===Ie.LEFT?C(e.unCheckedValue,I):I.keyCode===Ie.RIGHT&&C(e.checkedValue,I),i("keydown",I)},w=I=>{var _;(_=m.value)===null||_===void 0||_.blur(),i("mouseup",I)},O=E(()=>({[`${d.value}-small`]:p.value==="small",[`${d.value}-loading`]:e.loading,[`${d.value}-checked`]:c.value,[`${d.value}-disabled`]:s.value,[d.value]:!0,[`${d.value}-rtl`]:f.value==="rtl",[h.value]:!0}));return()=>{var I;return v(g(zC,null,{default:()=>[g("button",k(k(k({},it(e,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),n),{},{id:(I=e.id)!==null&&I!==void 0?I:a.id.value,onKeydown:P,onClick:x,onBlur:$,onMouseup:w,type:"button",role:"switch","aria-checked":u.value,disabled:s.value||e.loading,class:[n.class,O.value],ref:m}),[g("div",{class:`${d.value}-handle`},[e.loading?g(Po,{class:`${d.value}-loading-icon`},null):null]),g("span",{class:`${d.value}-inner`},[g("span",{class:`${d.value}-inner-checked`},[mn(o,e,"checkedChildren")]),g("span",{class:`${d.value}-inner-unchecked`},[mn(o,e,"unCheckedChildren")])])])]}))}}}),lpe=Lt(ape),nN=Symbol("TableContextProps"),spe=e=>{Xe(nN,e)},Si=()=>ze(nN,{}),cpe="RC_TABLE_KEY";function oN(e){return e==null?[]:Array.isArray(e)?e:[e]}function rN(e,t){if(!t&&typeof t!="number")return e;const n=oN(t);let o=e;for(let r=0;r{const{key:r,dataIndex:i}=o||{};let a=r||oN(i).join("-")||cpe;for(;n[a];)a=`${a}_next`;n[a]=!0,t.push(a)}),t}function upe(){const e={};function t(i,a){a&&Object.keys(a).forEach(l=>{const s=a[l];s&&typeof s=="object"?(i[l]=i[l]||{},t(i[l],s)):i[l]=s})}for(var n=arguments.length,o=new Array(n),r=0;r{t(e,i)}),e}function C1(e){return e!=null}const iN=Symbol("SlotsContextProps"),dpe=e=>{Xe(iN,e)},d$=()=>ze(iN,E(()=>({}))),aN=Symbol("ContextProps"),fpe=e=>{Xe(aN,e)},ppe=()=>ze(aN,{onResizeColumn:()=>{}}),dc="RC_TABLE_INTERNAL_COL_DEFINE",lN=Symbol("HoverContextProps"),gpe=e=>{Xe(lN,e)},hpe=()=>ze(lN,{startRow:se(-1),endRow:se(-1),onHover(){}}),x1=se(!1),vpe=()=>{Ke(()=>{x1.value=x1.value||Mx("position","sticky")})},mpe=()=>x1;var bpe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r=n}function Spe(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!ln(e)}const Pm=le({name:"Cell",props:["prefixCls","record","index","renderIndex","dataIndex","customRender","component","colSpan","rowSpan","fixLeft","fixRight","firstFixLeft","lastFixLeft","firstFixRight","lastFixRight","appendNode","additionalProps","ellipsis","align","rowType","isSticky","column","cellType","transformCellText"],setup(e,t){let{slots:n}=t;const o=d$(),{onHover:r,startRow:i,endRow:a}=hpe(),l=E(()=>{var h,m,b,S;return(b=(h=e.colSpan)!==null&&h!==void 0?h:(m=e.additionalProps)===null||m===void 0?void 0:m.colSpan)!==null&&b!==void 0?b:(S=e.additionalProps)===null||S===void 0?void 0:S.colspan}),s=E(()=>{var h,m,b,S;return(b=(h=e.rowSpan)!==null&&h!==void 0?h:(m=e.additionalProps)===null||m===void 0?void 0:m.rowSpan)!==null&&b!==void 0?b:(S=e.additionalProps)===null||S===void 0?void 0:S.rowspan}),u=Vo(()=>{const{index:h}=e;return ype(h,s.value||1,i.value,a.value)}),c=mpe(),d=(h,m)=>{var b;const{record:S,index:C,additionalProps:$}=e;S&&r(C,C+m-1),(b=$==null?void 0:$.onMouseenter)===null||b===void 0||b.call($,h)},f=h=>{var m;const{record:b,additionalProps:S}=e;b&&r(-1,-1),(m=S==null?void 0:S.onMouseleave)===null||m===void 0||m.call(S,h)},p=h=>{const m=zt(h)[0];return ln(m)?m.type===ta?m.children:Array.isArray(m.children)?p(m.children):void 0:m},v=se(null);return be([u,()=>e.prefixCls,v],()=>{const h=Co(v.value);h&&(u.value?ch(h,`${e.prefixCls}-cell-row-hover`):uh(h,`${e.prefixCls}-cell-row-hover`))}),()=>{var h,m,b,S,C,$;const{prefixCls:x,record:P,index:w,renderIndex:O,dataIndex:I,customRender:_,component:T="td",fixLeft:A,fixRight:R,firstFixLeft:H,lastFixLeft:M,firstFixRight:D,lastFixRight:N,appendNode:L=(h=n.appendNode)===null||h===void 0?void 0:h.call(n),additionalProps:F={},ellipsis:B,align:j,rowType:z,isSticky:G,column:Q={},cellType:Y}=e,oe=`${x}-cell`;let Z,re;const ne=(m=n.default)===null||m===void 0?void 0:m.call(n);if(C1(ne)||Y==="header")re=ne;else{const ce=rN(P,I);if(re=ce,_){const ee=_({text:ce,value:ce,record:P,index:w,renderIndex:O,column:Q.__originColumn__});Spe(ee)?(re=ee.children,Z=ee.props):re=ee}if(!(dc in Q)&&Y==="body"&&o.value.bodyCell&&!(!((b=Q.slots)===null||b===void 0)&&b.customRender)){const ee=Pv(o.value,"bodyCell",{text:ce,value:ce,record:P,index:w,column:Q.__originColumn__},()=>{const ue=re===void 0?ce:re;return[typeof ue=="object"&&sn(ue)||typeof ue!="object"?ue:null]});re=Ot(ee)}e.transformCellText&&(re=e.transformCellText({text:re,record:P,index:w,column:Q.__originColumn__}))}typeof re=="object"&&!Array.isArray(re)&&!ln(re)&&(re=null),B&&(M||D)&&(re=g("span",{class:`${oe}-content`},[re])),Array.isArray(re)&&re.length===1&&(re=re[0]);const X=Z||{},{colSpan:te,rowSpan:W,style:U,class:J}=X,de=bpe(X,["colSpan","rowSpan","style","class"]),fe=(S=te!==void 0?te:l.value)!==null&&S!==void 0?S:1,pe=(C=W!==void 0?W:s.value)!==null&&C!==void 0?C:1;if(fe===0||pe===0)return null;const ve={},he=typeof A=="number"&&c.value,V=typeof R=="number"&&c.value;he&&(ve.position="sticky",ve.left=`${A}px`),V&&(ve.position="sticky",ve.right=`${R}px`);const q={};j&&(q.textAlign=j);let ie;const me=B===!0?{showTitle:!0}:B;me&&(me.showTitle||z==="header")&&(typeof re=="string"||typeof re=="number"?ie=re.toString():ln(re)&&(ie=p([re])));const Se=y(y(y({title:ie},de),F),{colSpan:fe!==1?fe:null,rowSpan:pe!==1?pe:null,class:ge(oe,{[`${oe}-fix-left`]:he&&c.value,[`${oe}-fix-left-first`]:H&&c.value,[`${oe}-fix-left-last`]:M&&c.value,[`${oe}-fix-right`]:V&&c.value,[`${oe}-fix-right-first`]:D&&c.value,[`${oe}-fix-right-last`]:N&&c.value,[`${oe}-ellipsis`]:B,[`${oe}-with-append`]:L,[`${oe}-fix-sticky`]:(he||V)&&G&&c.value},F.class,J),onMouseenter:ce=>{d(ce,pe)},onMouseleave:f,style:[F.style,q,ve,U]});return g(T,k(k({},Se),{},{ref:v}),{default:()=>[L,re,($=n.dragHandle)===null||$===void 0?void 0:$.call(n)]})}}});function f$(e,t,n,o,r){const i=n[e]||{},a=n[t]||{};let l,s;i.fixed==="left"?l=o.left[e]:a.fixed==="right"&&(s=o.right[t]);let u=!1,c=!1,d=!1,f=!1;const p=n[t+1],v=n[e-1];return r==="rtl"?l!==void 0?f=!(v&&v.fixed==="left"):s!==void 0&&(d=!(p&&p.fixed==="right")):l!==void 0?u=!(p&&p.fixed==="left"):s!==void 0&&(c=!(v&&v.fixed==="right")),{fixLeft:l,fixRight:s,lastFixLeft:u,firstFixRight:c,lastFixRight:d,firstFixLeft:f,isSticky:o.isSticky}}const X4={mouse:{move:"mousemove",stop:"mouseup"},touch:{move:"touchmove",stop:"touchend"}},Y4=50,Cpe=le({compatConfig:{MODE:3},name:"DragHandle",props:{prefixCls:String,width:{type:Number,required:!0},minWidth:{type:Number,default:Y4},maxWidth:{type:Number,default:1/0},column:{type:Object,default:void 0}},setup(e){let t=0,n={remove:()=>{}},o={remove:()=>{}};const r=()=>{n.remove(),o.remove()};Zn(()=>{r()}),Ve(()=>{Mt(!isNaN(e.width),"Table","width must be a number when use resizable")});const{onResizeColumn:i}=ppe(),a=E(()=>typeof e.minWidth=="number"&&!isNaN(e.minWidth)?e.minWidth:Y4),l=E(()=>typeof e.maxWidth=="number"&&!isNaN(e.maxWidth)?e.maxWidth:1/0),s=Jt();let u=0;const c=se(!1);let d;const f=C=>{let $=0;C.touches?C.touches.length?$=C.touches[0].pageX:$=C.changedTouches[0].pageX:$=C.pageX;const x=t-$;let P=Math.max(u-x,a.value);P=Math.min(P,l.value),Ze.cancel(d),d=Ze(()=>{i(P,e.column.__originColumn__)})},p=C=>{f(C)},v=C=>{c.value=!1,f(C),r()},h=(C,$)=>{c.value=!0,r(),u=s.vnode.el.parentNode.getBoundingClientRect().width,!(C instanceof MouseEvent&&C.which!==1)&&(C.stopPropagation&&C.stopPropagation(),t=C.touches?C.touches[0].pageX:C.pageX,n=Ht(document.documentElement,$.move,p),o=Ht(document.documentElement,$.stop,v))},m=C=>{C.stopPropagation(),C.preventDefault(),h(C,X4.mouse)},b=C=>{C.stopPropagation(),C.preventDefault(),h(C,X4.touch)},S=C=>{C.stopPropagation(),C.preventDefault()};return()=>{const{prefixCls:C}=e,$={[hn?"onTouchstartPassive":"onTouchstart"]:x=>b(x)};return g("div",k(k({class:`${C}-resize-handle ${c.value?"dragging":""}`,onMousedown:m},$),{},{onClick:S}),[g("div",{class:`${C}-resize-handle-line`},null)])}}}),xpe=le({name:"HeaderRow",props:["cells","stickyOffsets","flattenColumns","rowComponent","cellComponent","index","customHeaderRow"],setup(e){const t=Si();return()=>{const{prefixCls:n,direction:o}=t,{cells:r,stickyOffsets:i,flattenColumns:a,rowComponent:l,cellComponent:s,customHeaderRow:u,index:c}=e;let d;u&&(d=u(r.map(p=>p.column),c));const f=wm(r.map(p=>p.column));return g(l,d,{default:()=>[r.map((p,v)=>{const{column:h}=p,m=f$(p.colStart,p.colEnd,a,i,o);let b;h&&h.customHeaderCell&&(b=p.column.customHeaderCell(h));const S=h;return g(Pm,k(k(k({},p),{},{cellType:"header",ellipsis:h.ellipsis,align:h.align,component:s,prefixCls:n,key:f[v]},m),{},{additionalProps:b,rowType:"header",column:h}),{default:()=>h.title,dragHandle:()=>S.resizable?g(Cpe,{prefixCls:n,width:S.width,minWidth:S.minWidth,maxWidth:S.maxWidth,column:S},null):null})})]})}}});function $pe(e){const t=[];function n(r,i){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[a]=t[a]||[];let l=i;return r.filter(Boolean).map(u=>{const c={key:u.key,class:ge(u.className,u.class),column:u,colStart:l};let d=1;const f=u.children;return f&&f.length>0&&(d=n(f,l,a+1).reduce((p,v)=>p+v,0),c.hasSubColumns=!0),"colSpan"in u&&({colSpan:d}=u),"rowSpan"in u&&(c.rowSpan=u.rowSpan),c.colSpan=d,c.colEnd=c.colStart+d-1,t[a].push(c),l+=d,d})}n(e,0);const o=t.length;for(let r=0;r{!("rowSpan"in i)&&!i.hasSubColumns&&(i.rowSpan=o-r)});return t}const q4=le({name:"TableHeader",inheritAttrs:!1,props:["columns","flattenColumns","stickyOffsets","customHeaderRow"],setup(e){const t=Si(),n=E(()=>$pe(e.columns));return()=>{const{prefixCls:o,getComponent:r}=t,{stickyOffsets:i,flattenColumns:a,customHeaderRow:l}=e,s=r(["header","wrapper"],"thead"),u=r(["header","row"],"tr"),c=r(["header","cell"],"th");return g(s,{class:`${o}-thead`},{default:()=>[n.value.map((d,f)=>g(xpe,{key:f,flattenColumns:a,cells:d,stickyOffsets:i,rowComponent:u,cellComponent:c,customHeaderRow:l,index:f},null))]})}}}),sN=Symbol("ExpandedRowProps"),wpe=e=>{Xe(sN,e)},Ppe=()=>ze(sN,{}),cN=le({name:"ExpandedRow",inheritAttrs:!1,props:["prefixCls","component","cellComponent","expanded","colSpan","isEmpty"],setup(e,t){let{slots:n,attrs:o}=t;const r=Si(),i=Ppe(),{fixHeader:a,fixColumn:l,componentWidth:s,horizonScroll:u}=i;return()=>{const{prefixCls:c,component:d,cellComponent:f,expanded:p,colSpan:v,isEmpty:h}=e;return g(d,{class:o.class,style:{display:p?null:"none"}},{default:()=>[g(Pm,{component:f,prefixCls:c,colSpan:v},{default:()=>{var m;let b=(m=n.default)===null||m===void 0?void 0:m.call(n);return(h?u.value:l.value)&&(b=g("div",{style:{width:`${s.value-(a.value?r.scrollbarSize:0)}px`,position:"sticky",left:0,overflow:"hidden"},class:`${c}-expanded-row-fixed`},[b])),b}})]})}}}),Ope=le({name:"MeasureCell",props:["columnKey"],setup(e,t){let{emit:n}=t;const o=ae();return Ke(()=>{o.value&&n("columnResize",e.columnKey,o.value.offsetWidth)}),()=>g(br,{onResize:r=>{let{offsetWidth:i}=r;n("columnResize",e.columnKey,i)}},{default:()=>[g("td",{ref:o,style:{padding:0,border:0,height:0}},[g("div",{style:{height:0,overflow:"hidden"}},[zn(" ")])])]})}}),uN=Symbol("BodyContextProps"),Ipe=e=>{Xe(uN,e)},dN=()=>ze(uN,{}),Tpe=le({name:"BodyRow",inheritAttrs:!1,props:["record","index","renderIndex","recordKey","expandedKeys","rowComponent","cellComponent","customRow","rowExpandable","indent","rowKey","getRowKey","childrenColumnName"],setup(e,t){let{attrs:n}=t;const o=Si(),r=dN(),i=se(!1),a=E(()=>e.expandedKeys&&e.expandedKeys.has(e.recordKey));Ve(()=>{a.value&&(i.value=!0)});const l=E(()=>r.expandableType==="row"&&(!e.rowExpandable||e.rowExpandable(e.record))),s=E(()=>r.expandableType==="nest"),u=E(()=>e.childrenColumnName&&e.record&&e.record[e.childrenColumnName]),c=E(()=>l.value||s.value),d=(m,b)=>{r.onTriggerExpand(m,b)},f=E(()=>{var m;return((m=e.customRow)===null||m===void 0?void 0:m.call(e,e.record,e.index))||{}}),p=function(m){var b,S;r.expandRowByClick&&c.value&&d(e.record,m);for(var C=arguments.length,$=new Array(C>1?C-1:0),x=1;x{const{record:m,index:b,indent:S}=e,{rowClassName:C}=r;return typeof C=="string"?C:typeof C=="function"?C(m,b,S):""}),h=E(()=>wm(r.flattenColumns));return()=>{const{class:m,style:b}=n,{record:S,index:C,rowKey:$,indent:x=0,rowComponent:P,cellComponent:w}=e,{prefixCls:O,fixedInfoList:I,transformCellText:_}=o,{flattenColumns:T,expandedRowClassName:A,indentSize:R,expandIcon:H,expandedRowRender:M,expandIconColumnIndex:D}=r,N=g(P,k(k({},f.value),{},{"data-row-key":$,class:ge(m,`${O}-row`,`${O}-row-level-${x}`,v.value,f.value.class),style:[b,f.value.style],onClick:p}),{default:()=>[T.map((F,B)=>{const{customRender:j,dataIndex:z,className:G}=F,Q=h[B],Y=I[B];let oe;F.customCell&&(oe=F.customCell(S,C,F));const Z=B===(D||0)&&s.value?g(Le,null,[g("span",{style:{paddingLeft:`${R*x}px`},class:`${O}-row-indent indent-level-${x}`},null),H({prefixCls:O,expanded:a.value,expandable:u.value,record:S,onExpand:d})]):null;return g(Pm,k(k({cellType:"body",class:G,ellipsis:F.ellipsis,align:F.align,component:w,prefixCls:O,key:Q,record:S,index:C,renderIndex:e.renderIndex,dataIndex:z,customRender:j},Y),{},{additionalProps:oe,column:F,transformCellText:_,appendNode:Z}),null)})]});let L;if(l.value&&(i.value||a.value)){const F=M({record:S,index:C,indent:x+1,expanded:a.value}),B=A&&A(S,C,x);L=g(cN,{expanded:a.value,class:ge(`${O}-expanded-row`,`${O}-expanded-row-level-${x+1}`,B),prefixCls:O,component:P,cellComponent:w,colSpan:T.length,isEmpty:!1},{default:()=>[F]})}return g(Le,null,[N,L])}}});function fN(e,t,n,o,r,i){const a=[];a.push({record:e,indent:t,index:i});const l=r(e),s=o==null?void 0:o.has(l);if(e&&Array.isArray(e[n])&&s)for(let u=0;u{const i=t.value,a=n.value,l=e.value;if(a!=null&&a.size){const s=[];for(let u=0;u<(l==null?void 0:l.length);u+=1){const c=l[u];s.push(...fN(c,0,i,a,o.value,u))}return s}return l==null?void 0:l.map((s,u)=>({record:s,indent:0,index:u}))})}const pN=Symbol("ResizeContextProps"),_pe=e=>{Xe(pN,e)},Mpe=()=>ze(pN,{onColumnResize:()=>{}}),Ape=le({name:"TableBody",props:["data","getRowKey","measureColumnWidth","expandedKeys","customRow","rowExpandable","childrenColumnName"],setup(e,t){let{slots:n}=t;const o=Mpe(),r=Si(),i=dN(),a=Epe(We(e,"data"),We(e,"childrenColumnName"),We(e,"expandedKeys"),We(e,"getRowKey")),l=se(-1),s=se(-1);let u;return gpe({startRow:l,endRow:s,onHover:(c,d)=>{clearTimeout(u),u=setTimeout(()=>{l.value=c,s.value=d},100)}}),()=>{var c;const{data:d,getRowKey:f,measureColumnWidth:p,expandedKeys:v,customRow:h,rowExpandable:m,childrenColumnName:b}=e,{onColumnResize:S}=o,{prefixCls:C,getComponent:$}=r,{flattenColumns:x}=i,P=$(["body","wrapper"],"tbody"),w=$(["body","row"],"tr"),O=$(["body","cell"],"td");let I;d.length?I=a.value.map((T,A)=>{const{record:R,indent:H,index:M}=T,D=f(R,A);return g(Tpe,{key:D,rowKey:D,record:R,recordKey:D,index:A,renderIndex:M,rowComponent:w,cellComponent:O,expandedKeys:v,customRow:h,getRowKey:f,rowExpandable:m,childrenColumnName:b,indent:H},null)}):I=g(cN,{expanded:!0,class:`${C}-placeholder`,prefixCls:C,component:w,cellComponent:O,colSpan:x.length,isEmpty:!0},{default:()=>[(c=n.emptyNode)===null||c===void 0?void 0:c.call(n)]});const _=wm(x);return g(P,{class:`${C}-tbody`},{default:()=>[p&&g("tr",{"aria-hidden":"true",class:`${C}-measure-row`,style:{height:0,fontSize:0}},[_.map(T=>g(Ope,{key:T,columnKey:T,onColumnResize:S},null))]),I]})}}}),xa={};var Rpe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{fixed:o}=n,r=o===!0?"left":o,i=n.children;return i&&i.length>0?[...t,...$1(i).map(a=>y({fixed:r},a))]:[...t,y(y({},n),{fixed:r})]},[])}function Dpe(e){return e.map(t=>{const{fixed:n}=t,o=Rpe(t,["fixed"]);let r=n;return n==="left"?r="right":n==="right"&&(r="left"),y({fixed:r},o)})}function Npe(e,t){let{prefixCls:n,columns:o,expandable:r,expandedKeys:i,getRowKey:a,onTriggerExpand:l,expandIcon:s,rowExpandable:u,expandIconColumnIndex:c,direction:d,expandRowByClick:f,expandColumnWidth:p,expandFixed:v}=e;const h=d$(),m=E(()=>{if(r.value){let C=o.value.slice();if(!C.includes(xa)){const R=c.value||0;R>=0&&C.splice(R,0,xa)}const $=C.indexOf(xa);C=C.filter((R,H)=>R!==xa||H===$);const x=o.value[$];let P;(v.value==="left"||v.value)&&!c.value?P="left":(v.value==="right"||v.value)&&c.value===o.value.length?P="right":P=x?x.fixed:null;const w=i.value,O=u.value,I=s.value,_=n.value,T=f.value,A={[dc]:{class:`${n.value}-expand-icon-col`,columnType:"EXPAND_COLUMN"},title:Pv(h.value,"expandColumnTitle",{},()=>[""]),fixed:P,class:`${n.value}-row-expand-icon-cell`,width:p.value,customRender:R=>{let{record:H,index:M}=R;const D=a.value(H,M),N=w.has(D),L=O?O(H):!0,F=I({prefixCls:_,expanded:N,expandable:L,record:H,onExpand:l});return T?g("span",{onClick:B=>B.stopPropagation()},[F]):F}};return C.map(R=>R===xa?A:R)}return o.value.filter(C=>C!==xa)}),b=E(()=>{let C=m.value;return t.value&&(C=t.value(C)),C.length||(C=[{customRender:()=>null}]),C}),S=E(()=>d.value==="rtl"?Dpe($1(b.value)):$1(b.value));return[b,S]}function gN(e){const t=se(e);let n;const o=se([]);function r(i){o.value.push(i),Ze.cancel(n),n=Ze(()=>{const a=o.value;o.value=[],a.forEach(l=>{t.value=l(t.value)})})}return tt(()=>{Ze.cancel(n)}),[t,r]}function kpe(e){const t=ae(null),n=ae();function o(){clearTimeout(n.value)}function r(a){t.value=a,o(),n.value=setTimeout(()=>{t.value=null,n.value=void 0},100)}function i(){return t.value}return tt(()=>{o()}),[r,i]}function Lpe(e,t,n){return E(()=>{const r=[],i=[];let a=0,l=0;const s=e.value,u=t.value,c=n.value;for(let d=0;d=0;l-=1){const s=t[l],u=n&&n[l],c=u&&u[dc];if(s||c||a){const d=c||{},{columnType:f}=d,p=Fpe(d,["columnType"]);r.unshift(g("col",k({key:l,style:{width:typeof s=="number"?`${s}px`:s}},p),null)),a=!0}}return g("colgroup",null,[r])}function w1(e,t){let{slots:n}=t;var o;return g("div",null,[(o=n.default)===null||o===void 0?void 0:o.call(n)])}w1.displayName="Panel";let Bpe=0;const Hpe=le({name:"TableSummary",props:["fixed"],setup(e,t){let{slots:n}=t;const o=Si(),r=`table-summary-uni-key-${++Bpe}`,i=E(()=>e.fixed===""||e.fixed);return Ve(()=>{o.summaryCollect(r,i.value)}),tt(()=>{o.summaryCollect(r,!1)}),()=>{var a;return(a=n.default)===null||a===void 0?void 0:a.call(n)}}}),zpe=le({compatConfig:{MODE:3},name:"ATableSummaryRow",setup(e,t){let{slots:n}=t;return()=>{var o;return g("tr",null,[(o=n.default)===null||o===void 0?void 0:o.call(n)])}}}),vN=Symbol("SummaryContextProps"),jpe=e=>{Xe(vN,e)},Wpe=()=>ze(vN,{}),Vpe=le({name:"ATableSummaryCell",props:["index","colSpan","rowSpan","align"],setup(e,t){let{attrs:n,slots:o}=t;const r=Si(),i=Wpe();return()=>{const{index:a,colSpan:l=1,rowSpan:s,align:u}=e,{prefixCls:c,direction:d}=r,{scrollColumnIndex:f,stickyOffsets:p,flattenColumns:v}=i,m=a+l-1+1===f?l+1:l,b=f$(a,a+m-1,v,p,d);return g(Pm,k({class:n.class,index:a,component:"td",prefixCls:c,record:null,dataIndex:null,align:u,colSpan:m,rowSpan:s,customRender:()=>{var S;return(S=o.default)===null||S===void 0?void 0:S.call(o)}},b),null)}}}),bp=le({name:"TableFooter",inheritAttrs:!1,props:["stickyOffsets","flattenColumns"],setup(e,t){let{slots:n}=t;const o=Si();return jpe(rt({stickyOffsets:We(e,"stickyOffsets"),flattenColumns:We(e,"flattenColumns"),scrollColumnIndex:E(()=>{const r=e.flattenColumns.length-1,i=e.flattenColumns[r];return i!=null&&i.scrollbar?r:null})})),()=>{var r;const{prefixCls:i}=o;return g("tfoot",{class:`${i}-summary`},[(r=n.default)===null||r===void 0?void 0:r.call(n)])}}}),Kpe=Hpe;function Upe(e){let{prefixCls:t,record:n,onExpand:o,expanded:r,expandable:i}=e;const a=`${t}-row-expand-icon`;if(!i)return g("span",{class:[a,`${t}-row-spaced`]},null);const l=s=>{o(n,s),s.stopPropagation()};return g("span",{class:{[a]:!0,[`${t}-row-expanded`]:r,[`${t}-row-collapsed`]:!r},onClick:l},null)}function Gpe(e,t,n){const o=[];function r(i){(i||[]).forEach((a,l)=>{o.push(t(a,l)),r(a[n])})}return r(e),o}const Xpe=le({name:"StickyScrollBar",inheritAttrs:!1,props:["offsetScroll","container","scrollBodyRef","scrollBodySizeInfo"],emits:["scroll"],setup(e,t){let{emit:n,expose:o}=t;const r=Si(),i=se(0),a=se(0),l=se(0);Ve(()=>{i.value=e.scrollBodySizeInfo.scrollWidth||0,a.value=e.scrollBodySizeInfo.clientWidth||0,l.value=i.value&&a.value*(a.value/i.value)},{flush:"post"});const s=se(),[u,c]=gN({scrollLeft:0,isHiddenScrollBar:!0}),d=ae({delta:0,x:0}),f=se(!1),p=()=>{f.value=!1},v=w=>{d.value={delta:w.pageX-u.value.scrollLeft,x:0},f.value=!0,w.preventDefault()},h=w=>{const{buttons:O}=w||(window==null?void 0:window.event);if(!f.value||O===0){f.value&&(f.value=!1);return}let I=d.value.x+w.pageX-d.value.x-d.value.delta;I<=0&&(I=0),I+l.value>=a.value&&(I=a.value-l.value),n("scroll",{scrollLeft:I/a.value*(i.value+2)}),d.value.x=w.pageX},m=()=>{if(!e.scrollBodyRef.value)return;const w=Ug(e.scrollBodyRef.value).top,O=w+e.scrollBodyRef.value.offsetHeight,I=e.container===window?document.documentElement.scrollTop+window.innerHeight:Ug(e.container).top+e.container.clientHeight;O-Kg()<=I||w>=I-e.offsetScroll?c(_=>y(y({},_),{isHiddenScrollBar:!0})):c(_=>y(y({},_),{isHiddenScrollBar:!1}))};o({setScrollLeft:w=>{c(O=>y(y({},O),{scrollLeft:w/i.value*a.value||0}))}});let S=null,C=null,$=null,x=null;Ke(()=>{S=Ht(document.body,"mouseup",p,!1),C=Ht(document.body,"mousemove",h,!1),$=Ht(window,"resize",m,!1)}),lv(()=>{ot(()=>{m()})}),Ke(()=>{setTimeout(()=>{be([l,f],()=>{m()},{immediate:!0,flush:"post"})})}),be(()=>e.container,()=>{x==null||x.remove(),x=Ht(e.container,"scroll",m,!1)},{immediate:!0,flush:"post"}),tt(()=>{S==null||S.remove(),C==null||C.remove(),x==null||x.remove(),$==null||$.remove()}),be(()=>y({},u.value),(w,O)=>{w.isHiddenScrollBar!==(O==null?void 0:O.isHiddenScrollBar)&&!w.isHiddenScrollBar&&c(I=>{const _=e.scrollBodyRef.value;return _?y(y({},I),{scrollLeft:_.scrollLeft/_.scrollWidth*_.clientWidth}):I})},{immediate:!0});const P=Kg();return()=>{if(i.value<=a.value||!l.value||u.value.isHiddenScrollBar)return null;const{prefixCls:w}=r;return g("div",{style:{height:`${P}px`,width:`${a.value}px`,bottom:`${e.offsetScroll}px`},class:`${w}-sticky-scroll`},[g("div",{onMousedown:v,ref:s,class:ge(`${w}-sticky-scroll-bar`,{[`${w}-sticky-scroll-bar-active`]:f.value}),style:{width:`${l.value}px`,transform:`translate3d(${u.value.scrollLeft}px, 0, 0)`}},null)])}}}),J4=so()?window:null;function Ype(e,t){return E(()=>{const{offsetHeader:n=0,offsetSummary:o=0,offsetScroll:r=0,getContainer:i=()=>J4}=typeof e.value=="object"?e.value:{},a=i()||J4,l=!!e.value;return{isSticky:l,stickyClassName:l?`${t.value}-sticky-holder`:"",offsetHeader:n,offsetSummary:o,offsetScroll:r,container:a}})}function qpe(e,t){return E(()=>{const n=[],o=e.value,r=t.value;for(let i=0;ii.isSticky&&!e.fixHeader?0:i.scrollbarSize),l=ae(),s=h=>{const{currentTarget:m,deltaX:b}=h;b&&(r("scroll",{currentTarget:m,scrollLeft:m.scrollLeft+b}),h.preventDefault())},u=ae();Ke(()=>{ot(()=>{u.value=Ht(l.value,"wheel",s)})}),tt(()=>{var h;(h=u.value)===null||h===void 0||h.remove()});const c=E(()=>e.flattenColumns.every(h=>h.width&&h.width!==0&&h.width!=="0px")),d=ae([]),f=ae([]);Ve(()=>{const h=e.flattenColumns[e.flattenColumns.length-1],m={fixed:h?h.fixed:null,scrollbar:!0,customHeaderCell:()=>({class:`${i.prefixCls}-cell-scrollbar`})};d.value=a.value?[...e.columns,m]:e.columns,f.value=a.value?[...e.flattenColumns,m]:e.flattenColumns});const p=E(()=>{const{stickyOffsets:h,direction:m}=e,{right:b,left:S}=h;return y(y({},h),{left:m==="rtl"?[...S.map(C=>C+a.value),0]:S,right:m==="rtl"?b:[...b.map(C=>C+a.value),0],isSticky:i.isSticky})}),v=qpe(We(e,"colWidths"),We(e,"columCount"));return()=>{var h;const{noData:m,columCount:b,stickyTopOffset:S,stickyBottomOffset:C,stickyClassName:$,maxContentScroll:x}=e,{isSticky:P}=i;return g("div",{style:y({overflow:"hidden"},P?{top:`${S}px`,bottom:`${C}px`}:{}),ref:l,class:ge(n.class,{[$]:!!$})},[g("table",{style:{tableLayout:"fixed",visibility:m||v.value?null:"hidden"}},[(!m||!x||c.value)&&g(hN,{colWidths:v.value?[...v.value,a.value]:[],columCount:b+1,columns:f.value},null),(h=o.default)===null||h===void 0?void 0:h.call(o,y(y({},e),{stickyOffsets:p.value,columns:d.value,flattenColumns:f.value}))])])}}});function Q4(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o[r,We(e,r)])))}const Jpe=[],Zpe={},P1="rc-table-internal-hook",Qpe=le({name:"VcTable",inheritAttrs:!1,props:["prefixCls","data","columns","rowKey","tableLayout","scroll","rowClassName","title","footer","id","showHeader","components","customRow","customHeaderRow","direction","expandFixed","expandColumnWidth","expandedRowKeys","defaultExpandedRowKeys","expandedRowRender","expandRowByClick","expandIcon","onExpand","onExpandedRowsChange","onUpdate:expandedRowKeys","defaultExpandAllRows","indentSize","expandIconColumnIndex","expandedRowClassName","childrenColumnName","rowExpandable","sticky","transformColumns","internalHooks","internalRefs","canExpandable","onUpdateInternalRefs","transformCellText"],emits:["expand","expandedRowsChange","updateInternalRefs","update:expandedRowKeys"],setup(e,t){let{attrs:n,slots:o,emit:r}=t;const i=E(()=>e.data||Jpe),a=E(()=>!!i.value.length),l=E(()=>upe(e.components,{})),s=(ee,ue)=>rN(l.value,ee)||ue,u=E(()=>{const ee=e.rowKey;return typeof ee=="function"?ee:ue=>ue&&ue[ee]}),c=E(()=>e.expandIcon||Upe),d=E(()=>e.childrenColumnName||"children"),f=E(()=>e.expandedRowRender?"row":e.canExpandable||i.value.some(ee=>ee&&typeof ee=="object"&&ee[d.value])?"nest":!1),p=se([]);Ve(()=>{e.defaultExpandedRowKeys&&(p.value=e.defaultExpandedRowKeys),e.defaultExpandAllRows&&(p.value=Gpe(i.value,u.value,d.value))})();const h=E(()=>new Set(e.expandedRowKeys||p.value||[])),m=ee=>{const ue=u.value(ee,i.value.indexOf(ee));let xe;const Pe=h.value.has(ue);Pe?(h.value.delete(ue),xe=[...h.value]):xe=[...h.value,ue],p.value=xe,r("expand",!Pe,ee),r("update:expandedRowKeys",xe),r("expandedRowsChange",xe)},b=ae(0),[S,C]=Npe(y(y({},Fr(e)),{expandable:E(()=>!!e.expandedRowRender),expandedKeys:h,getRowKey:u,onTriggerExpand:m,expandIcon:c}),E(()=>e.internalHooks===P1?e.transformColumns:null)),$=E(()=>({columns:S.value,flattenColumns:C.value})),x=ae(),P=ae(),w=ae(),O=ae({scrollWidth:0,clientWidth:0}),I=ae(),[_,T]=$t(!1),[A,R]=$t(!1),[H,M]=gN(new Map),D=E(()=>wm(C.value)),N=E(()=>D.value.map(ee=>H.value.get(ee))),L=E(()=>C.value.length),F=Lpe(N,L,We(e,"direction")),B=E(()=>e.scroll&&C1(e.scroll.y)),j=E(()=>e.scroll&&C1(e.scroll.x)||!!e.expandFixed),z=E(()=>j.value&&C.value.some(ee=>{let{fixed:ue}=ee;return ue})),G=ae(),Q=Ype(We(e,"sticky"),We(e,"prefixCls")),Y=rt({}),oe=E(()=>{const ee=Object.values(Y)[0];return(B.value||Q.value.isSticky)&&ee}),Z=(ee,ue)=>{ue?Y[ee]=ue:delete Y[ee]},re=ae({}),ne=ae({}),X=ae({});Ve(()=>{B.value&&(ne.value={overflowY:"scroll",maxHeight:yl(e.scroll.y)}),j.value&&(re.value={overflowX:"auto"},B.value||(ne.value={overflowY:"hidden"}),X.value={width:e.scroll.x===!0?"auto":yl(e.scroll.x),minWidth:"100%"})});const te=(ee,ue)=>{Ov(x.value)&&M(xe=>{if(xe.get(ee)!==ue){const Pe=new Map(xe);return Pe.set(ee,ue),Pe}return xe})},[W,U]=kpe();function J(ee,ue){if(!ue)return;if(typeof ue=="function"){ue(ee);return}const xe=ue.$el||ue;xe.scrollLeft!==ee&&(xe.scrollLeft=ee)}const de=ee=>{let{currentTarget:ue,scrollLeft:xe}=ee;var Pe;const _e=e.direction==="rtl",Ce=typeof xe=="number"?xe:ue.scrollLeft,we=ue||Zpe;if((!U()||U()===we)&&(W(we),J(Ce,P.value),J(Ce,w.value),J(Ce,I.value),J(Ce,(Pe=G.value)===null||Pe===void 0?void 0:Pe.setScrollLeft)),ue){const{scrollWidth:Oe,clientWidth:Me}=ue;_e?(T(-Ce0)):(T(Ce>0),R(Ce{j.value&&w.value?de({currentTarget:w.value}):(T(!1),R(!1))};let pe;const ve=ee=>{ee!==b.value&&(fe(),b.value=x.value?x.value.offsetWidth:ee)},he=ee=>{let{width:ue}=ee;if(clearTimeout(pe),b.value===0){ve(ue);return}pe=setTimeout(()=>{ve(ue)},100)};be([j,()=>e.data,()=>e.columns],()=>{j.value&&fe()},{flush:"post"});const[V,q]=$t(0);vpe(),Ke(()=>{ot(()=>{var ee,ue;fe(),q(yK(w.value).width),O.value={scrollWidth:((ee=w.value)===null||ee===void 0?void 0:ee.scrollWidth)||0,clientWidth:((ue=w.value)===null||ue===void 0?void 0:ue.clientWidth)||0}})}),uo(()=>{ot(()=>{var ee,ue;const xe=((ee=w.value)===null||ee===void 0?void 0:ee.scrollWidth)||0,Pe=((ue=w.value)===null||ue===void 0?void 0:ue.clientWidth)||0;(O.value.scrollWidth!==xe||O.value.clientWidth!==Pe)&&(O.value={scrollWidth:xe,clientWidth:Pe})})}),Ve(()=>{e.internalHooks===P1&&e.internalRefs&&e.onUpdateInternalRefs({body:w.value?w.value.$el||w.value:null})},{flush:"post"});const ie=E(()=>e.tableLayout?e.tableLayout:z.value?e.scroll.x==="max-content"?"auto":"fixed":B.value||Q.value.isSticky||C.value.some(ee=>{let{ellipsis:ue}=ee;return ue})?"fixed":"auto"),me=()=>{var ee;return a.value?null:((ee=o.emptyText)===null||ee===void 0?void 0:ee.call(o))||"No Data"};spe(rt(y(y({},Fr(Q4(e,"prefixCls","direction","transformCellText"))),{getComponent:s,scrollbarSize:V,fixedInfoList:E(()=>C.value.map((ee,ue)=>f$(ue,ue,C.value,F.value,e.direction))),isSticky:E(()=>Q.value.isSticky),summaryCollect:Z}))),Ipe(rt(y(y({},Fr(Q4(e,"rowClassName","expandedRowClassName","expandRowByClick","expandedRowRender","expandIconColumnIndex","indentSize"))),{columns:S,flattenColumns:C,tableLayout:ie,expandIcon:c,expandableType:f,onTriggerExpand:m}))),_pe({onColumnResize:te}),wpe({componentWidth:b,fixHeader:B,fixColumn:z,horizonScroll:j});const Se=()=>g(Ape,{data:i.value,measureColumnWidth:B.value||j.value||Q.value.isSticky,expandedKeys:h.value,rowExpandable:e.rowExpandable,getRowKey:u.value,customRow:e.customRow,childrenColumnName:d.value},{emptyNode:me}),ce=()=>g(hN,{colWidths:C.value.map(ee=>{let{width:ue}=ee;return ue}),columns:C.value},null);return()=>{var ee;const{prefixCls:ue,scroll:xe,tableLayout:Pe,direction:_e,title:Ce=o.title,footer:we=o.footer,id:Oe,showHeader:Me,customHeaderRow:Re}=e,{isSticky:Ae,offsetHeader:Fe,offsetSummary:lt,offsetScroll:bt,stickyClassName:ft,container:yt}=Q.value,Ct=s(["table"],"table"),fn=s(["body"]),yn=(ee=o.summary)===null||ee===void 0?void 0:ee.call(o,{pageData:i.value});let On=()=>null;const tn={colWidths:N.value,columCount:C.value.length,stickyOffsets:F.value,customHeaderRow:Re,fixHeader:B.value,scroll:xe};if(B.value||Ae){let er=()=>null;typeof fn=="function"?(er=()=>fn(i.value,{scrollbarSize:V.value,ref:w,onScroll:de}),tn.colWidths=C.value.map((Io,ol)=>{let{width:Ee}=Io;const Je=ol===S.value.length-1?Ee-V.value:Ee;return typeof Je=="number"&&!Number.isNaN(Je)?Je:0})):er=()=>g("div",{style:y(y({},re.value),ne.value),onScroll:de,ref:w,class:ge(`${ue}-body`)},[g(Ct,{style:y(y({},X.value),{tableLayout:ie.value})},{default:()=>[ce(),Se(),!oe.value&&yn&&g(bp,{stickyOffsets:F.value,flattenColumns:C.value},{default:()=>[yn]})]})]);const Or=y(y(y({noData:!i.value.length,maxContentScroll:j.value&&xe.x==="max-content"},tn),$.value),{direction:_e,stickyClassName:ft,onScroll:de});On=()=>g(Le,null,[Me!==!1&&g(Z4,k(k({},Or),{},{stickyTopOffset:Fe,class:`${ue}-header`,ref:P}),{default:Io=>g(Le,null,[g(q4,Io,null),oe.value==="top"&&g(bp,Io,{default:()=>[yn]})])}),er(),oe.value&&oe.value!=="top"&&g(Z4,k(k({},Or),{},{stickyBottomOffset:lt,class:`${ue}-summary`,ref:I}),{default:Io=>g(bp,Io,{default:()=>[yn]})}),Ae&&w.value&&g(Xpe,{ref:G,offsetScroll:bt,scrollBodyRef:w,onScroll:de,container:yt,scrollBodySizeInfo:O.value},null)])}else On=()=>g("div",{style:y(y({},re.value),ne.value),class:ge(`${ue}-content`),onScroll:de,ref:w},[g(Ct,{style:y(y({},X.value),{tableLayout:ie.value})},{default:()=>[ce(),Me!==!1&&g(q4,k(k({},tn),$.value),null),Se(),yn&&g(bp,{stickyOffsets:F.value,flattenColumns:C.value},{default:()=>[yn]})]})]);const Qn=Ua(n,{aria:!0,data:!0}),Oo=()=>g("div",k(k({},Qn),{},{class:ge(ue,{[`${ue}-rtl`]:_e==="rtl",[`${ue}-ping-left`]:_.value,[`${ue}-ping-right`]:A.value,[`${ue}-layout-fixed`]:Pe==="fixed",[`${ue}-fixed-header`]:B.value,[`${ue}-fixed-column`]:z.value,[`${ue}-scroll-horizontal`]:j.value,[`${ue}-has-fix-left`]:C.value[0]&&C.value[0].fixed,[`${ue}-has-fix-right`]:C.value[L.value-1]&&C.value[L.value-1].fixed==="right",[n.class]:n.class}),style:n.style,id:Oe,ref:x}),[Ce&&g(w1,{class:`${ue}-title`},{default:()=>[Ce(i.value)]}),g("div",{class:`${ue}-container`},[On()]),we&&g(w1,{class:`${ue}-footer`},{default:()=>[we(i.value)]})]);return j.value?g(br,{onResize:he},{default:Oo}):Oo()}}});function ege(){const e=y({},arguments.length<=0?void 0:arguments[0]);for(let t=1;t{const r=n[o];r!==void 0&&(e[o]=r)})}return e}const O1=10;function tge(e,t){const n={current:e.current,pageSize:e.pageSize};return Object.keys(t&&typeof t=="object"?t:{}).forEach(r=>{const i=e[r];typeof i!="function"&&(n[r]=i)}),n}function nge(e,t,n){const o=E(()=>t.value&&typeof t.value=="object"?t.value:{}),r=E(()=>o.value.total||0),[i,a]=$t(()=>({current:"defaultCurrent"in o.value?o.value.defaultCurrent:1,pageSize:"defaultPageSize"in o.value?o.value.defaultPageSize:O1})),l=E(()=>{const c=ege(i.value,o.value,{total:r.value>0?r.value:e.value}),d=Math.ceil((r.value||e.value)/c.pageSize);return c.current>d&&(c.current=d||1),c}),s=(c,d)=>{t.value!==!1&&a({current:c??1,pageSize:d||l.value.pageSize})},u=(c,d)=>{var f,p;t.value&&((p=(f=o.value).onChange)===null||p===void 0||p.call(f,c,d)),s(c,d),n(c,d||l.value.pageSize)};return[E(()=>t.value===!1?{}:y(y({},l.value),{onChange:u})),s]}function oge(e,t,n){const o=se({});be([e,t,n],()=>{const i=new Map,a=n.value,l=t.value;function s(u){u.forEach((c,d)=>{const f=a(c,d);i.set(f,c),c&&typeof c=="object"&&l in c&&s(c[l]||[])})}s(e.value),o.value={kvMap:i}},{deep:!0,immediate:!0});function r(i){return o.value.kvMap.get(i)}return[r]}const Ai={},I1="SELECT_ALL",T1="SELECT_INVERT",E1="SELECT_NONE",rge=[];function mN(e,t){let n=[];return(t||[]).forEach(o=>{n.push(o),o&&typeof o=="object"&&e in o&&(n=[...n,...mN(e,o[e])])}),n}function ige(e,t){const n=E(()=>{const I=e.value||{},{checkStrictly:_=!0}=I;return y(y({},I),{checkStrictly:_})}),[o,r]=Dt(n.value.selectedRowKeys||n.value.defaultSelectedRowKeys||rge,{value:E(()=>n.value.selectedRowKeys)}),i=se(new Map),a=I=>{if(n.value.preserveSelectedRowKeys){const _=new Map;I.forEach(T=>{let A=t.getRecordByKey(T);!A&&i.value.has(T)&&(A=i.value.get(T)),_.set(T,A)}),i.value=_}};Ve(()=>{a(o.value)});const l=E(()=>n.value.checkStrictly?null:If(t.data.value,{externalGetKey:t.getRowKey.value,childrenPropName:t.childrenColumnName.value}).keyEntities),s=E(()=>mN(t.childrenColumnName.value,t.pageData.value)),u=E(()=>{const I=new Map,_=t.getRowKey.value,T=n.value.getCheckboxProps;return s.value.forEach((A,R)=>{const H=_(A,R),M=(T?T(A):null)||{};I.set(H,M)}),I}),{maxLevel:c,levelEntities:d}=um(l),f=I=>{var _;return!!(!((_=u.value.get(t.getRowKey.value(I)))===null||_===void 0)&&_.disabled)},p=E(()=>{if(n.value.checkStrictly)return[o.value||[],[]];const{checkedKeys:I,halfCheckedKeys:_}=pr(o.value,!0,l.value,c.value,d.value,f);return[I||[],_]}),v=E(()=>p.value[0]),h=E(()=>p.value[1]),m=E(()=>{const I=n.value.type==="radio"?v.value.slice(0,1):v.value;return new Set(I)}),b=E(()=>n.value.type==="radio"?new Set:new Set(h.value)),[S,C]=$t(null),$=I=>{let _,T;a(I);const{preserveSelectedRowKeys:A,onChange:R}=n.value,{getRecordByKey:H}=t;A?(_=I,T=I.map(M=>i.value.get(M))):(_=[],T=[],I.forEach(M=>{const D=H(M);D!==void 0&&(_.push(M),T.push(D))})),r(_),R==null||R(_,T)},x=(I,_,T,A)=>{const{onSelect:R}=n.value,{getRecordByKey:H}=t||{};if(R){const M=T.map(D=>H(D));R(H(I),_,M,A)}$(T)},P=E(()=>{const{onSelectInvert:I,onSelectNone:_,selections:T,hideSelectAll:A}=n.value,{data:R,pageData:H,getRowKey:M,locale:D}=t;return!T||A?null:(T===!0?[I1,T1,E1]:T).map(L=>L===I1?{key:"all",text:D.value.selectionAll,onSelect(){$(R.value.map((F,B)=>M.value(F,B)).filter(F=>{const B=u.value.get(F);return!(B!=null&&B.disabled)||m.value.has(F)}))}}:L===T1?{key:"invert",text:D.value.selectInvert,onSelect(){const F=new Set(m.value);H.value.forEach((j,z)=>{const G=M.value(j,z),Q=u.value.get(G);Q!=null&&Q.disabled||(F.has(G)?F.delete(G):F.add(G))});const B=Array.from(F);I&&(Mt(!1,"Table","`onSelectInvert` will be removed in future. Please use `onChange` instead."),I(B)),$(B)}}:L===E1?{key:"none",text:D.value.selectNone,onSelect(){_==null||_(),$(Array.from(m.value).filter(F=>{const B=u.value.get(F);return B==null?void 0:B.disabled}))}}:L)}),w=E(()=>s.value.length);return[I=>{var _;const{onSelectAll:T,onSelectMultiple:A,columnWidth:R,type:H,fixed:M,renderCell:D,hideSelectAll:N,checkStrictly:L}=n.value,{prefixCls:F,getRecordByKey:B,getRowKey:j,expandType:z,getPopupContainer:G}=t;if(!e.value)return I.filter(ve=>ve!==Ai);let Q=I.slice();const Y=new Set(m.value),oe=s.value.map(j.value).filter(ve=>!u.value.get(ve).disabled),Z=oe.every(ve=>Y.has(ve)),re=oe.some(ve=>Y.has(ve)),ne=()=>{const ve=[];Z?oe.forEach(V=>{Y.delete(V),ve.push(V)}):oe.forEach(V=>{Y.has(V)||(Y.add(V),ve.push(V))});const he=Array.from(Y);T==null||T(!Z,he.map(V=>B(V)),ve.map(V=>B(V))),$(he)};let X;if(H!=="radio"){let ve;if(P.value){const me=g(on,{getPopupContainer:G.value},{default:()=>[P.value.map((Se,ce)=>{const{key:ee,text:ue,onSelect:xe}=Se;return g(on.Item,{key:ee||ce,onClick:()=>{xe==null||xe(oe)}},{default:()=>[ue]})})]});ve=g("div",{class:`${F.value}-selection-extra`},[g(zr,{overlay:me,getPopupContainer:G.value},{default:()=>[g("span",null,[g(cs,null,null)])]})])}const he=s.value.map((me,Se)=>{const ce=j.value(me,Se),ee=u.value.get(ce)||{};return y({checked:Y.has(ce)},ee)}).filter(me=>{let{disabled:Se}=me;return Se}),V=!!he.length&&he.length===w.value,q=V&&he.every(me=>{let{checked:Se}=me;return Se}),ie=V&&he.some(me=>{let{checked:Se}=me;return Se});X=!N&&g("div",{class:`${F.value}-selection`},[g(gr,{checked:V?q:!!w.value&&Z,indeterminate:V?!q&&ie:!Z&&re,onChange:ne,disabled:w.value===0||V,"aria-label":ve?"Custom selection":"Select all",skipGroup:!0},null),ve])}let te;H==="radio"?te=ve=>{let{record:he,index:V}=ve;const q=j.value(he,V),ie=Y.has(q);return{node:g(bo,k(k({},u.value.get(q)),{},{checked:ie,onClick:me=>me.stopPropagation(),onChange:me=>{Y.has(q)||x(q,!0,[q],me.nativeEvent)}}),null),checked:ie}}:te=ve=>{let{record:he,index:V}=ve;var q;const ie=j.value(he,V),me=Y.has(ie),Se=b.value.has(ie),ce=u.value.get(ie);let ee;return z.value==="nest"?(ee=Se,Mt(typeof(ce==null?void 0:ce.indeterminate)!="boolean","Table","set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.")):ee=(q=ce==null?void 0:ce.indeterminate)!==null&&q!==void 0?q:Se,{node:g(gr,k(k({},ce),{},{indeterminate:ee,checked:me,skipGroup:!0,onClick:ue=>ue.stopPropagation(),onChange:ue=>{let{nativeEvent:xe}=ue;const{shiftKey:Pe}=xe;let _e=-1,Ce=-1;if(Pe&&L){const we=new Set([S.value,ie]);oe.some((Oe,Me)=>{if(we.has(Oe))if(_e===-1)_e=Me;else return Ce=Me,!0;return!1})}if(Ce!==-1&&_e!==Ce&&L){const we=oe.slice(_e,Ce+1),Oe=[];me?we.forEach(Re=>{Y.has(Re)&&(Oe.push(Re),Y.delete(Re))}):we.forEach(Re=>{Y.has(Re)||(Oe.push(Re),Y.add(Re))});const Me=Array.from(Y);A==null||A(!me,Me.map(Re=>B(Re)),Oe.map(Re=>B(Re))),$(Me)}else{const we=v.value;if(L){const Oe=me?ni(we,ie):_i(we,ie);x(ie,!me,Oe,xe)}else{const Oe=pr([...we,ie],!0,l.value,c.value,d.value,f),{checkedKeys:Me,halfCheckedKeys:Re}=Oe;let Ae=Me;if(me){const Fe=new Set(Me);Fe.delete(ie),Ae=pr(Array.from(Fe),{halfCheckedKeys:Re},l.value,c.value,d.value,f).checkedKeys}x(ie,!me,Ae,xe)}}C(ie)}}),null),checked:me}};const W=ve=>{let{record:he,index:V}=ve;const{node:q,checked:ie}=te({record:he,index:V});return D?D(ie,he,V,q):q};if(!Q.includes(Ai))if(Q.findIndex(ve=>{var he;return((he=ve[dc])===null||he===void 0?void 0:he.columnType)==="EXPAND_COLUMN"})===0){const[ve,...he]=Q;Q=[ve,Ai,...he]}else Q=[Ai,...Q];const U=Q.indexOf(Ai);Q=Q.filter((ve,he)=>ve!==Ai||he===U);const J=Q[U-1],de=Q[U+1];let fe=M;fe===void 0&&((de==null?void 0:de.fixed)!==void 0?fe=de.fixed:(J==null?void 0:J.fixed)!==void 0&&(fe=J.fixed)),fe&&J&&((_=J[dc])===null||_===void 0?void 0:_.columnType)==="EXPAND_COLUMN"&&J.fixed===void 0&&(J.fixed=fe);const pe={fixed:fe,width:R,className:`${F.value}-selection-column`,title:n.value.columnTitle||X,customRender:W,[dc]:{class:`${F.value}-selection-col`}};return Q.map(ve=>ve===Ai?pe:ve)},m]}var age={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};function eT(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:[];const t=Ot(e),n=[];return t.forEach(o=>{var r,i,a,l;if(!o)return;const s=o.key,u=((r=o.props)===null||r===void 0?void 0:r.style)||{},c=((i=o.props)===null||i===void 0?void 0:i.class)||"",d=o.props||{};for(const[m,b]of Object.entries(d))d[Kc(m)]=b;const f=o.children||{},{default:p}=f,v=uge(f,["default"]),h=y(y(y({},v),d),{style:u,class:c});if(s&&(h.key=s),!((a=o.type)===null||a===void 0)&&a.__ANT_TABLE_COLUMN_GROUP)h.children=bN(typeof p=="function"?p():p);else{const m=(l=o.children)===null||l===void 0?void 0:l.default;h.customRender=h.customRender||m}n.push(h)}),n}const pg="ascend",db="descend";function Mh(e){return typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1}function nT(e){return typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1}function dge(e,t){return t?e[e.indexOf(t)+1]:e[0]}function _1(e,t,n){let o=[];function r(i,a){o.push({column:i,key:Xl(i,a),multiplePriority:Mh(i),sortOrder:i.sortOrder})}return(e||[]).forEach((i,a)=>{const l=Af(a,n);i.children?("sortOrder"in i&&r(i,l),o=[...o,..._1(i.children,t,l)]):i.sorter&&("sortOrder"in i?r(i,l):t&&i.defaultSortOrder&&o.push({column:i,key:Xl(i,l),multiplePriority:Mh(i),sortOrder:i.defaultSortOrder}))}),o}function yN(e,t,n,o,r,i,a,l){return(t||[]).map((s,u)=>{const c=Af(u,l);let d=s;if(d.sorter){const f=d.sortDirections||r,p=d.showSorterTooltip===void 0?a:d.showSorterTooltip,v=Xl(d,c),h=n.find(I=>{let{key:_}=I;return _===v}),m=h?h.sortOrder:null,b=dge(f,m),S=f.includes(pg)&&g(g$,{class:ge(`${e}-column-sorter-up`,{active:m===pg}),role:"presentation"},null),C=f.includes(db)&&g(p$,{role:"presentation",class:ge(`${e}-column-sorter-down`,{active:m===db})},null),{cancelSort:$,triggerAsc:x,triggerDesc:P}=i||{};let w=$;b===db?w=P:b===pg&&(w=x);const O=typeof p=="object"?p:{title:w};d=y(y({},d),{className:ge(d.className,{[`${e}-column-sort`]:m}),title:I=>{const _=g("div",{class:`${e}-column-sorters`},[g("span",{class:`${e}-column-title`},[h$(s.title,I)]),g("span",{class:ge(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(S&&C)})},[g("span",{class:`${e}-column-sorter-inner`},[S,C])])]);return p?g(Ro,O,{default:()=>[_]}):_},customHeaderCell:I=>{const _=s.customHeaderCell&&s.customHeaderCell(I)||{},T=_.onClick,A=_.onKeydown;return _.onClick=R=>{o({column:s,key:v,sortOrder:b,multiplePriority:Mh(s)}),T&&T(R)},_.onKeydown=R=>{R.keyCode===Ie.ENTER&&(o({column:s,key:v,sortOrder:b,multiplePriority:Mh(s)}),A==null||A(R))},m&&(_["aria-sort"]=m==="ascend"?"ascending":"descending"),_.class=ge(_.class,`${e}-column-has-sorters`),_.tabindex=0,_}})}return"children"in d&&(d=y(y({},d),{children:yN(e,d.children,n,o,r,i,a,c)})),d})}function oT(e){const{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}}function rT(e){const t=e.filter(n=>{let{sortOrder:o}=n;return o}).map(oT);return t.length===0&&e.length?y(y({},oT(e[e.length-1])),{column:void 0}):t.length<=1?t[0]||{}:t}function M1(e,t,n){const o=t.slice().sort((a,l)=>l.multiplePriority-a.multiplePriority),r=e.slice(),i=o.filter(a=>{let{column:{sorter:l},sortOrder:s}=a;return nT(l)&&s});return i.length?r.sort((a,l)=>{for(let s=0;s{const l=a[n];return l?y(y({},a),{[n]:M1(l,t,n)}):a}):r}function fge(e){let{prefixCls:t,mergedColumns:n,onSorterChange:o,sortDirections:r,tableLocale:i,showSorterTooltip:a}=e;const[l,s]=$t(_1(n.value,!0)),u=E(()=>{let v=!0;const h=_1(n.value,!1);if(!h.length)return l.value;const m=[];function b(C){v?m.push(C):m.push(y(y({},C),{sortOrder:null}))}let S=null;return h.forEach(C=>{S===null?(b(C),C.sortOrder&&(C.multiplePriority===!1?v=!1:S=!0)):(S&&C.multiplePriority!==!1||(v=!1),b(C))}),m}),c=E(()=>{const v=u.value.map(h=>{let{column:m,sortOrder:b}=h;return{column:m,order:b}});return{sortColumns:v,sortColumn:v[0]&&v[0].column,sortOrder:v[0]&&v[0].order}});function d(v){let h;v.multiplePriority===!1||!u.value.length||u.value[0].multiplePriority===!1?h=[v]:h=[...u.value.filter(m=>{let{key:b}=m;return b!==v.key}),v],s(h),o(rT(h),h)}const f=v=>yN(t.value,v,u.value,d,r.value,i.value,a.value),p=E(()=>rT(u.value));return[f,u,c,p]}var pge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"};function iT(e){for(var t=1;t{const{keyCode:t}=e;t===Ie.ENTER&&e.stopPropagation()},vge=(e,t)=>{let{slots:n}=t;var o;return g("div",{onClick:r=>r.stopPropagation(),onKeydown:hge},[(o=n.default)===null||o===void 0?void 0:o.call(n)])},aT=le({compatConfig:{MODE:3},name:"FilterSearch",inheritAttrs:!1,props:{value:Ne(),onChange:ye(),filterSearch:He([Boolean,Function]),tablePrefixCls:Ne(),locale:De()},setup(e){return()=>{const{value:t,onChange:n,filterSearch:o,tablePrefixCls:r,locale:i}=e;return o?g("div",{class:`${r}-filter-dropdown-search`},[g(Cn,{placeholder:i.filterSearchPlaceholder,onChange:n,value:t,htmlSize:1,class:`${r}-filter-dropdown-search-input`},{prefix:()=>g(qc,null,null)})]):null}}});var lT=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.motion?e.motion:Sf()),s=(u,c)=>{var d,f,p,v;c==="appear"?(f=(d=l.value)===null||d===void 0?void 0:d.onAfterEnter)===null||f===void 0||f.call(d,u):c==="leave"&&((v=(p=l.value)===null||p===void 0?void 0:p.onAfterLeave)===null||v===void 0||v.call(p,u)),a.value||e.onMotionEnd(),a.value=!0};return be(()=>e.motionNodes,()=>{e.motionNodes&&e.motionType==="hide"&&r.value&&ot(()=>{r.value=!1})},{immediate:!0,flush:"post"}),Ke(()=>{e.motionNodes&&e.onMotionStart()}),tt(()=>{e.motionNodes&&s()}),()=>{const{motion:u,motionNodes:c,motionType:d,active:f,eventKey:p}=e,v=lT(e,["motion","motionNodes","motionType","active","eventKey"]);return c?g(Nn,k(k({},l.value),{},{appear:d==="show",onAfterAppear:h=>s(h,"appear"),onAfterLeave:h=>s(h,"leave")}),{default:()=>[Pn(g("div",{class:`${i.value.prefixCls}-treenode-motion`},[c.map(h=>{const m=lT(h.data,[]),{title:b,key:S,isStart:C,isEnd:$}=h;return delete m.children,g(t1,k(k({},m),{},{title:b,active:f,data:h.data,key:S,eventKey:S,isStart:C,isEnd:$}),o)})]),[[Vn,r.value]])]}):g(t1,k(k({class:n.class,style:n.style},v),{},{active:f,eventKey:p}),o)}}});function bge(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const n=e.length,o=t.length;if(Math.abs(n-o)!==1)return{add:!1,key:null};function r(i,a){const l=new Map;i.forEach(u=>{l.set(u,!0)});const s=a.filter(u=>!l.has(u));return s.length===1?s[0]:null}return na.key===n),r=e[o+1],i=t.findIndex(a=>a.key===n);if(r){const a=t.findIndex(l=>l.key===r.key);return t.slice(i+1,a)}return t.slice(i+1)}var cT=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{},Yl=`RC_TREE_MOTION_${Math.random()}`,A1={key:Yl},SN={key:Yl,level:0,index:0,pos:"0",node:A1,nodes:[A1]},dT={parent:null,children:[],pos:SN.pos,data:A1,title:null,key:Yl,isStart:[],isEnd:[]};function fT(e,t,n,o){return t===!1||!n?e:e.slice(0,Math.ceil(n/o)+1)}function pT(e){const{key:t,pos:n}=e;return Of(t,n)}function Sge(e){let t=String(e.key),n=e;for(;n.parent;)n=n.parent,t=`${n.key} > ${t}`;return t}const Cge=le({compatConfig:{MODE:3},name:"NodeList",inheritAttrs:!1,props:woe,setup(e,t){let{expose:n,attrs:o}=t;const r=ae(),i=ae(),{expandedKeys:a,flattenNodes:l}=Z5();n({scrollTo:h=>{r.value.scrollTo(h)},getIndentWidth:()=>i.value.offsetWidth});const s=se(l.value),u=se([]),c=ae(null);function d(){s.value=l.value,u.value=[],c.value=null,e.onListChangeEnd()}const f=Ex();be([()=>a.value.slice(),l],(h,m)=>{let[b,S]=h,[C,$]=m;const x=bge(C,b);if(x.key!==null){const{virtual:P,height:w,itemHeight:O}=e;if(x.add){const I=$.findIndex(A=>{let{key:R}=A;return R===x.key}),_=fT(sT($,S,x.key),P,w,O),T=$.slice();T.splice(I+1,0,dT),s.value=T,u.value=_,c.value="show"}else{const I=S.findIndex(A=>{let{key:R}=A;return R===x.key}),_=fT(sT(S,$,x.key),P,w,O),T=S.slice();T.splice(I+1,0,dT),s.value=T,u.value=_,c.value="hide"}}else $!==S&&(s.value=S)}),be(()=>f.value.dragging,h=>{h||d()});const p=E(()=>e.motion===void 0?s.value:l.value),v=()=>{e.onActiveChange(null)};return()=>{const h=y(y({},e),o),{prefixCls:m,selectable:b,checkable:S,disabled:C,motion:$,height:x,itemHeight:P,virtual:w,focusable:O,activeItem:I,focused:_,tabindex:T,onKeydown:A,onFocus:R,onBlur:H,onListChangeStart:M,onListChangeEnd:D}=h,N=cT(h,["prefixCls","selectable","checkable","disabled","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabindex","onKeydown","onFocus","onBlur","onListChangeStart","onListChangeEnd"]);return g(Le,null,[_&&I&&g("span",{style:uT,"aria-live":"assertive"},[Sge(I)]),g("div",null,[g("input",{style:uT,disabled:O===!1||C,tabindex:O!==!1?T:null,onKeydown:A,onFocus:R,onBlur:H,value:"",onChange:yge,"aria-label":"for screen reader"},null)]),g("div",{class:`${m}-treenode`,"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden"}},[g("div",{class:`${m}-indent`},[g("div",{ref:i,class:`${m}-indent-unit`},null)])]),g(T8,k(k({},it(N,["onActiveChange"])),{},{data:p.value,itemKey:pT,height:x,fullHeight:!1,virtual:w,itemHeight:P,prefixCls:`${m}-list`,ref:r,onVisibleChange:(L,F)=>{const B=new Set(L);F.filter(z=>!B.has(z)).some(z=>pT(z)===Yl)&&d()}}),{default:L=>{const{pos:F}=L,B=cT(L.data,[]),{title:j,key:z,isStart:G,isEnd:Q}=L,Y=Of(z,F);return delete B.key,delete B.children,g(mge,k(k({},B),{},{eventKey:Y,title:j,active:!!I&&z===I.key,data:L.data,isStart:G,isEnd:Q,motion:$,motionNodes:z===Yl?u.value:null,motionType:c.value,onMotionStart:M,onMotionEnd:d,onMousemove:v}),null)}})])}}});function xge(e){let{dropPosition:t,dropLevelOffset:n,indent:o}=e;const r={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:"2px"};switch(t){case-1:r.top=0,r.left=`${-n*o}px`;break;case 1:r.bottom=0,r.left=`${-n*o}px`;break;case 0:r.bottom=0,r.left=`${o}`;break}return g("div",{style:r},null)}const $ge=10,CN=le({compatConfig:{MODE:3},name:"Tree",inheritAttrs:!1,props:Qe(eR(),{prefixCls:"vc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,expandAction:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:xge,allowDrop:()=>!0}),setup(e,t){let{attrs:n,slots:o,expose:r}=t;const i=se(!1);let a={};const l=se(),s=se([]),u=se([]),c=se([]),d=se([]),f=se([]),p=se([]),v={},h=rt({draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null}),m=se([]);be([()=>e.treeData,()=>e.children],()=>{m.value=e.treeData!==void 0?e.treeData.slice():o1(nt(e.children))},{immediate:!0,deep:!0});const b=se({}),S=se(!1),C=se(null),$=se(!1),x=E(()=>am(e.fieldNames)),P=se();let w=null,O=null,I=null;const _=E(()=>({expandedKeysSet:T.value,selectedKeysSet:A.value,loadedKeysSet:R.value,loadingKeysSet:H.value,checkedKeysSet:M.value,halfCheckedKeysSet:D.value,dragOverNodeKey:h.dragOverNodeKey,dropPosition:h.dropPosition,keyEntities:b.value})),T=E(()=>new Set(p.value)),A=E(()=>new Set(s.value)),R=E(()=>new Set(d.value)),H=E(()=>new Set(f.value)),M=E(()=>new Set(u.value)),D=E(()=>new Set(c.value));Ve(()=>{if(m.value){const Ce=If(m.value,{fieldNames:x.value});b.value=y({[Yl]:SN},Ce.keyEntities)}});let N=!1;be([()=>e.expandedKeys,()=>e.autoExpandParent,b],(Ce,we)=>{let[Oe,Me]=Ce,[Re,Ae]=we,Fe=p.value;if(e.expandedKeys!==void 0||N&&Me!==Ae)Fe=e.autoExpandParent||!N&&e.defaultExpandParent?n1(e.expandedKeys,b.value):e.expandedKeys;else if(!N&&e.defaultExpandAll){const lt=y({},b.value);delete lt[Yl],Fe=Object.keys(lt).map(bt=>lt[bt].key)}else!N&&e.defaultExpandedKeys&&(Fe=e.autoExpandParent||e.defaultExpandParent?n1(e.defaultExpandedKeys,b.value):e.defaultExpandedKeys);Fe&&(p.value=Fe),N=!0},{immediate:!0});const L=se([]);Ve(()=>{L.value=Aoe(m.value,p.value,x.value)}),Ve(()=>{e.selectable&&(e.selectedKeys!==void 0?s.value=wI(e.selectedKeys,e):!N&&e.defaultSelectedKeys&&(s.value=wI(e.defaultSelectedKeys,e)))});const{maxLevel:F,levelEntities:B}=um(b);Ve(()=>{if(e.checkable){let Ce;if(e.checkedKeys!==void 0?Ce=G0(e.checkedKeys)||{}:!N&&e.defaultCheckedKeys?Ce=G0(e.defaultCheckedKeys)||{}:m.value&&(Ce=G0(e.checkedKeys)||{checkedKeys:u.value,halfCheckedKeys:c.value}),Ce){let{checkedKeys:we=[],halfCheckedKeys:Oe=[]}=Ce;e.checkStrictly||({checkedKeys:we,halfCheckedKeys:Oe}=pr(we,!0,b.value,F.value,B.value)),u.value=we,c.value=Oe}}}),Ve(()=>{e.loadedKeys&&(d.value=e.loadedKeys)});const j=()=>{y(h,{dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})},z=Ce=>{P.value.scrollTo(Ce)};be(()=>e.activeKey,()=>{e.activeKey!==void 0&&(C.value=e.activeKey)},{immediate:!0}),be(C,Ce=>{ot(()=>{Ce!==null&&z({key:Ce})})},{immediate:!0,flush:"post"});const G=Ce=>{e.expandedKeys===void 0&&(p.value=Ce)},Q=()=>{h.draggingNodeKey!==null&&y(h,{draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),w=null,I=null},Y=(Ce,we)=>{const{onDragend:Oe}=e;h.dragOverNodeKey=null,Q(),Oe==null||Oe({event:Ce,node:we.eventData}),O=null},oe=Ce=>{Y(Ce,null),window.removeEventListener("dragend",oe)},Z=(Ce,we)=>{const{onDragstart:Oe}=e,{eventKey:Me,eventData:Re}=we;O=we,w={x:Ce.clientX,y:Ce.clientY};const Ae=ni(p.value,Me);h.draggingNodeKey=Me,h.dragChildrenKeys=Toe(Me,b.value),l.value=P.value.getIndentWidth(),G(Ae),window.addEventListener("dragend",oe),Oe&&Oe({event:Ce,node:Re})},re=(Ce,we)=>{const{onDragenter:Oe,onExpand:Me,allowDrop:Re,direction:Ae}=e,{pos:Fe,eventKey:lt}=we;if(I!==lt&&(I=lt),!O){j();return}const{dropPosition:bt,dropLevelOffset:ft,dropTargetKey:yt,dropContainerKey:Ct,dropTargetPos:fn,dropAllowed:yn,dragOverNodeKey:On}=$I(Ce,O,we,l.value,w,Re,L.value,b.value,T.value,Ae);if(h.dragChildrenKeys.indexOf(yt)!==-1||!yn){j();return}if(a||(a={}),Object.keys(a).forEach(tn=>{clearTimeout(a[tn])}),O.eventKey!==we.eventKey&&(a[Fe]=window.setTimeout(()=>{if(h.draggingNodeKey===null)return;let tn=p.value.slice();const Qn=b.value[we.eventKey];Qn&&(Qn.children||[]).length&&(tn=_i(p.value,we.eventKey)),G(tn),Me&&Me(tn,{node:we.eventData,expanded:!0,nativeEvent:Ce})},800)),O.eventKey===yt&&ft===0){j();return}y(h,{dragOverNodeKey:On,dropPosition:bt,dropLevelOffset:ft,dropTargetKey:yt,dropContainerKey:Ct,dropTargetPos:fn,dropAllowed:yn}),Oe&&Oe({event:Ce,node:we.eventData,expandedKeys:p.value})},ne=(Ce,we)=>{const{onDragover:Oe,allowDrop:Me,direction:Re}=e;if(!O)return;const{dropPosition:Ae,dropLevelOffset:Fe,dropTargetKey:lt,dropContainerKey:bt,dropAllowed:ft,dropTargetPos:yt,dragOverNodeKey:Ct}=$I(Ce,O,we,l.value,w,Me,L.value,b.value,T.value,Re);h.dragChildrenKeys.indexOf(lt)!==-1||!ft||(O.eventKey===lt&&Fe===0?h.dropPosition===null&&h.dropLevelOffset===null&&h.dropTargetKey===null&&h.dropContainerKey===null&&h.dropTargetPos===null&&h.dropAllowed===!1&&h.dragOverNodeKey===null||j():Ae===h.dropPosition&&Fe===h.dropLevelOffset&<===h.dropTargetKey&&bt===h.dropContainerKey&&yt===h.dropTargetPos&&ft===h.dropAllowed&&Ct===h.dragOverNodeKey||y(h,{dropPosition:Ae,dropLevelOffset:Fe,dropTargetKey:lt,dropContainerKey:bt,dropTargetPos:yt,dropAllowed:ft,dragOverNodeKey:Ct}),Oe&&Oe({event:Ce,node:we.eventData}))},X=(Ce,we)=>{I===we.eventKey&&!Ce.currentTarget.contains(Ce.relatedTarget)&&(j(),I=null);const{onDragleave:Oe}=e;Oe&&Oe({event:Ce,node:we.eventData})},te=function(Ce,we){let Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Me;const{dragChildrenKeys:Re,dropPosition:Ae,dropTargetKey:Fe,dropTargetPos:lt,dropAllowed:bt}=h;if(!bt)return;const{onDrop:ft}=e;if(h.dragOverNodeKey=null,Q(),Fe===null)return;const yt=y(y({},qp(Fe,nt(_.value))),{active:((Me=ue.value)===null||Me===void 0?void 0:Me.key)===Fe,data:b.value[Fe].node});Re.indexOf(Fe);const Ct=_x(lt),fn={event:Ce,node:Jp(yt),dragNode:O?O.eventData:null,dragNodesKeys:[O.eventKey].concat(Re),dropToGap:Ae!==0,dropPosition:Ae+Number(Ct[Ct.length-1])};Oe||ft==null||ft(fn),O=null},W=(Ce,we)=>{const{expanded:Oe,key:Me}=we,Re=L.value.filter(Fe=>Fe.key===Me)[0],Ae=Jp(y(y({},qp(Me,_.value)),{data:Re.data}));G(Oe?ni(p.value,Me):_i(p.value,Me)),me(Ce,Ae)},U=(Ce,we)=>{const{onClick:Oe,expandAction:Me}=e;Me==="click"&&W(Ce,we),Oe&&Oe(Ce,we)},J=(Ce,we)=>{const{onDblclick:Oe,expandAction:Me}=e;(Me==="doubleclick"||Me==="dblclick")&&W(Ce,we),Oe&&Oe(Ce,we)},de=(Ce,we)=>{let Oe=s.value;const{onSelect:Me,multiple:Re}=e,{selected:Ae}=we,Fe=we[x.value.key],lt=!Ae;lt?Re?Oe=_i(Oe,Fe):Oe=[Fe]:Oe=ni(Oe,Fe);const bt=b.value,ft=Oe.map(yt=>{const Ct=bt[yt];return Ct?Ct.node:null}).filter(yt=>yt);e.selectedKeys===void 0&&(s.value=Oe),Me&&Me(Oe,{event:"select",selected:lt,node:we,selectedNodes:ft,nativeEvent:Ce})},fe=(Ce,we,Oe)=>{const{checkStrictly:Me,onCheck:Re}=e,Ae=we[x.value.key];let Fe;const lt={event:"check",node:we,checked:Oe,nativeEvent:Ce},bt=b.value;if(Me){const ft=Oe?_i(u.value,Ae):ni(u.value,Ae),yt=ni(c.value,Ae);Fe={checked:ft,halfChecked:yt},lt.checkedNodes=ft.map(Ct=>bt[Ct]).filter(Ct=>Ct).map(Ct=>Ct.node),e.checkedKeys===void 0&&(u.value=ft)}else{let{checkedKeys:ft,halfCheckedKeys:yt}=pr([...u.value,Ae],!0,bt,F.value,B.value);if(!Oe){const Ct=new Set(ft);Ct.delete(Ae),{checkedKeys:ft,halfCheckedKeys:yt}=pr(Array.from(Ct),{halfCheckedKeys:yt},bt,F.value,B.value)}Fe=ft,lt.checkedNodes=[],lt.checkedNodesPositions=[],lt.halfCheckedKeys=yt,ft.forEach(Ct=>{const fn=bt[Ct];if(!fn)return;const{node:yn,pos:On}=fn;lt.checkedNodes.push(yn),lt.checkedNodesPositions.push({node:yn,pos:On})}),e.checkedKeys===void 0&&(u.value=ft,c.value=yt)}Re&&Re(Fe,lt)},pe=Ce=>{const we=Ce[x.value.key],Oe=new Promise((Me,Re)=>{const{loadData:Ae,onLoad:Fe}=e;if(!Ae||R.value.has(we)||H.value.has(we))return null;Ae(Ce).then(()=>{const bt=_i(d.value,we),ft=ni(f.value,we);Fe&&Fe(bt,{event:"load",node:Ce}),e.loadedKeys===void 0&&(d.value=bt),f.value=ft,Me()}).catch(bt=>{const ft=ni(f.value,we);if(f.value=ft,v[we]=(v[we]||0)+1,v[we]>=$ge){const yt=_i(d.value,we);e.loadedKeys===void 0&&(d.value=yt),Me()}Re(bt)}),f.value=_i(f.value,we)});return Oe.catch(()=>{}),Oe},ve=(Ce,we)=>{const{onMouseenter:Oe}=e;Oe&&Oe({event:Ce,node:we})},he=(Ce,we)=>{const{onMouseleave:Oe}=e;Oe&&Oe({event:Ce,node:we})},V=(Ce,we)=>{const{onRightClick:Oe}=e;Oe&&(Ce.preventDefault(),Oe({event:Ce,node:we}))},q=Ce=>{const{onFocus:we}=e;S.value=!0,we&&we(Ce)},ie=Ce=>{const{onBlur:we}=e;S.value=!1,ee(null),we&&we(Ce)},me=(Ce,we)=>{let Oe=p.value;const{onExpand:Me,loadData:Re}=e,{expanded:Ae}=we,Fe=we[x.value.key];if($.value)return;Oe.indexOf(Fe);const lt=!Ae;if(lt?Oe=_i(Oe,Fe):Oe=ni(Oe,Fe),G(Oe),Me&&Me(Oe,{node:we,expanded:lt,nativeEvent:Ce}),lt&&Re){const bt=pe(we);bt&&bt.then(()=>{}).catch(ft=>{const yt=ni(p.value,Fe);G(yt),Promise.reject(ft)})}},Se=()=>{$.value=!0},ce=()=>{setTimeout(()=>{$.value=!1})},ee=Ce=>{const{onActiveChange:we}=e;C.value!==Ce&&(e.activeKey!==void 0&&(C.value=Ce),Ce!==null&&z({key:Ce}),we&&we(Ce))},ue=E(()=>C.value===null?null:L.value.find(Ce=>{let{key:we}=Ce;return we===C.value})||null),xe=Ce=>{let we=L.value.findIndex(Me=>{let{key:Re}=Me;return Re===C.value});we===-1&&Ce<0&&(we=L.value.length),we=(we+Ce+L.value.length)%L.value.length;const Oe=L.value[we];if(Oe){const{key:Me}=Oe;ee(Me)}else ee(null)},Pe=E(()=>Jp(y(y({},qp(C.value,_.value)),{data:ue.value.data,active:!0}))),_e=Ce=>{const{onKeydown:we,checkable:Oe,selectable:Me}=e;switch(Ce.which){case Ie.UP:{xe(-1),Ce.preventDefault();break}case Ie.DOWN:{xe(1),Ce.preventDefault();break}}const Re=ue.value;if(Re&&Re.data){const Ae=Re.data.isLeaf===!1||!!(Re.data.children||[]).length,Fe=Pe.value;switch(Ce.which){case Ie.LEFT:{Ae&&T.value.has(C.value)?me({},Fe):Re.parent&&ee(Re.parent.key),Ce.preventDefault();break}case Ie.RIGHT:{Ae&&!T.value.has(C.value)?me({},Fe):Re.children&&Re.children.length&&ee(Re.children[0].key),Ce.preventDefault();break}case Ie.ENTER:case Ie.SPACE:{Oe&&!Fe.disabled&&Fe.checkable!==!1&&!Fe.disableCheckbox?fe({},Fe,!M.value.has(C.value)):!Oe&&Me&&!Fe.disabled&&Fe.selectable!==!1&&de({},Fe);break}}}we&&we(Ce)};return r({onNodeExpand:me,scrollTo:z,onKeydown:_e,selectedKeys:E(()=>s.value),checkedKeys:E(()=>u.value),halfCheckedKeys:E(()=>c.value),loadedKeys:E(()=>d.value),loadingKeys:E(()=>f.value),expandedKeys:E(()=>p.value)}),Zn(()=>{window.removeEventListener("dragend",oe),i.value=!0}),xoe({expandedKeys:p,selectedKeys:s,loadedKeys:d,loadingKeys:f,checkedKeys:u,halfCheckedKeys:c,expandedKeysSet:T,selectedKeysSet:A,loadedKeysSet:R,loadingKeysSet:H,checkedKeysSet:M,halfCheckedKeysSet:D,flattenNodes:L}),()=>{const{draggingNodeKey:Ce,dropLevelOffset:we,dropContainerKey:Oe,dropTargetKey:Me,dropPosition:Re,dragOverNodeKey:Ae}=h,{prefixCls:Fe,showLine:lt,focusable:bt,tabindex:ft=0,selectable:yt,showIcon:Ct,icon:fn=o.icon,switcherIcon:yn,draggable:On,checkable:tn,checkStrictly:Qn,disabled:Oo,motion:er,loadData:Or,filterTreeNode:Io,height:ol,itemHeight:Ee,virtual:Je,dropIndicatorRender:Ge,onContextmenu:Tt,onScroll:Sn,direction:nn,rootClassName:To,rootStyle:Kn}=e,{class:Zr,style:Fo}=n,tr=Ua(y(y({},e),n),{aria:!0,data:!0});let jt;return On?typeof On=="object"?jt=On:typeof On=="function"?jt={nodeDraggable:On}:jt={}:jt=!1,g(Coe,{value:{prefixCls:Fe,selectable:yt,showIcon:Ct,icon:fn,switcherIcon:yn,draggable:jt,draggingNodeKey:Ce,checkable:tn,customCheckable:o.checkable,checkStrictly:Qn,disabled:Oo,keyEntities:b.value,dropLevelOffset:we,dropContainerKey:Oe,dropTargetKey:Me,dropPosition:Re,dragOverNodeKey:Ae,dragging:Ce!==null,indent:l.value,direction:nn,dropIndicatorRender:Ge,loadData:Or,filterTreeNode:Io,onNodeClick:U,onNodeDoubleClick:J,onNodeExpand:me,onNodeSelect:de,onNodeCheck:fe,onNodeLoad:pe,onNodeMouseEnter:ve,onNodeMouseLeave:he,onNodeContextMenu:V,onNodeDragStart:Z,onNodeDragEnter:re,onNodeDragOver:ne,onNodeDragLeave:X,onNodeDragEnd:Y,onNodeDrop:te,slots:o}},{default:()=>[g("div",{role:"tree",class:ge(Fe,Zr,To,{[`${Fe}-show-line`]:lt,[`${Fe}-focused`]:S.value,[`${Fe}-active-focused`]:C.value!==null}),style:Kn},[g(Cge,k({ref:P,prefixCls:Fe,style:Fo,disabled:Oo,selectable:yt,checkable:!!tn,motion:er,height:ol,itemHeight:Ee,virtual:Je,focusable:bt,focused:S.value,tabindex:ft,activeItem:ue.value,onFocus:q,onBlur:ie,onKeydown:_e,onActiveChange:ee,onListChangeStart:Se,onListChangeEnd:ce,onContextmenu:Tt,onScroll:Sn},tr),null)])]})}}});var wge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};function gT(e){for(var t=1;t({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),Nge=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${t.lineWidthBold}px solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),kge=(e,t)=>{const{treeCls:n,treeNodeCls:o,treeNodePadding:r,treeTitleHeight:i}=t,a=(i-t.fontSizeLG)/2,l=t.paddingXS;return{[n]:y(y({},qe(t)),{background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,[`&${n}-rtl`]:{[`${n}-switcher`]:{"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${n}-active-focused)`]:y({},qi(t)),[`${n}-list-holder-inner`]:{alignItems:"flex-start"},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:"stretch",[`${n}-node-content-wrapper`]:{flex:"auto"},[`${o}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:r,insetInlineStart:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:Rge,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${o}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${r}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${n}-node-content-wrapper`]:y({},qi(t)),[`&:not(${o}-disabled).filter-node ${n}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${n}-draggable-icon`]:{width:i,lineHeight:`${i}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${t.motionDurationSlow}`,[`${o}:hover &`]:{opacity:.45}},[`&${o}-disabled`]:{[`${n}-draggable-icon`]:{visibility:"hidden"}}}},[`${n}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:i}},[`${n}-draggable-icon`]:{visibility:"hidden"},[`${n}-switcher`]:y(y({},Dge(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:i,margin:0,lineHeight:`${i}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:i/2,bottom:-r,marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:i/2*.8,height:i/2,borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${n}-checkbox`]:{top:"initial",marginInlineEnd:l,marginBlockStart:a},[`${n}-node-content-wrapper, ${n}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:i,margin:0,padding:`0 ${t.paddingXS/2}px`,color:"inherit",lineHeight:`${i}px`,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:t.controlItemBgHover},[`&${n}-node-selected`]:{backgroundColor:t.controlItemBgActive},[`${n}-iconEle`]:{display:"inline-block",width:i,height:i,lineHeight:`${i}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${n}-node-content-wrapper`]:y({lineHeight:`${i}px`,userSelect:"none"},Nge(e,t)),[`${o}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${t.colorPrimary}`}},"&-show-line":{[`${n}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:i/2,bottom:-r,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${n}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${o}-leaf-last`]:{[`${n}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${i/2}px !important`}}}}})}},Lge=e=>{const{treeCls:t,treeNodeCls:n,treeNodePadding:o}=e;return{[`${t}${t}-directory`]:{[n]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:o,insetInlineStart:0,transition:`background-color ${e.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:e.controlItemBgHover}},"> *":{zIndex:1},[`${t}-switcher`]:{transition:`color ${e.motionDurationMid}`},[`${t}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${t}-node-selected`]:{color:e.colorTextLightSolid,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:e.colorPrimary},[`${t}-switcher`]:{color:e.colorTextLightSolid},[`${t}-node-content-wrapper`]:{color:e.colorTextLightSolid,background:"transparent"}}}}}},$N=(e,t)=>{const n=`.${e}`,o=`${n}-treenode`,r=t.paddingXS/2,i=t.controlHeightSM,a=Be(t,{treeCls:n,treeNodeCls:o,treeNodePadding:r,treeTitleHeight:i});return[kge(e,a),Lge(a)]},Fge=Ue("Tree",(e,t)=>{let{prefixCls:n}=t;return[{[e.componentCls]:gm(`${n}-checkbox`,e)},$N(n,e),bf(e)]}),wN=()=>{const e=eR();return y(y({},e),{showLine:He([Boolean,Object]),multiple:$e(),autoExpandParent:$e(),checkStrictly:$e(),checkable:$e(),disabled:$e(),defaultExpandAll:$e(),defaultExpandParent:$e(),defaultExpandedKeys:pt(),expandedKeys:pt(),checkedKeys:He([Array,Object]),defaultCheckedKeys:pt(),selectedKeys:pt(),defaultSelectedKeys:pt(),selectable:$e(),loadedKeys:pt(),draggable:$e(),showIcon:$e(),icon:ye(),switcherIcon:K.any,prefixCls:String,replaceFields:De(),blockNode:$e(),openAnimation:K.any,onDoubleclick:e.onDblclick,"onUpdate:selectedKeys":ye(),"onUpdate:checkedKeys":ye(),"onUpdate:expandedKeys":ye()})},gg=le({compatConfig:{MODE:3},name:"ATree",inheritAttrs:!1,props:Qe(wN(),{checkable:!1,selectable:!0,showIcon:!1,blockNode:!1}),slots:Object,setup(e,t){let{attrs:n,expose:o,emit:r,slots:i}=t;e.treeData===void 0&&i.default;const{prefixCls:a,direction:l,virtual:s}=Te("tree",e),[u,c]=Fge(a),d=ae();o({treeRef:d,onNodeExpand:function(){var m;(m=d.value)===null||m===void 0||m.onNodeExpand(...arguments)},scrollTo:m=>{var b;(b=d.value)===null||b===void 0||b.scrollTo(m)},selectedKeys:E(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.selectedKeys}),checkedKeys:E(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.checkedKeys}),halfCheckedKeys:E(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.halfCheckedKeys}),loadedKeys:E(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.loadedKeys}),loadingKeys:E(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.loadingKeys}),expandedKeys:E(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.expandedKeys})}),Ve(()=>{Mt(e.replaceFields===void 0,"Tree","`replaceFields` is deprecated, please use fieldNames instead")});const p=(m,b)=>{r("update:checkedKeys",m),r("check",m,b)},v=(m,b)=>{r("update:expandedKeys",m),r("expand",m,b)},h=(m,b)=>{r("update:selectedKeys",m),r("select",m,b)};return()=>{const{showIcon:m,showLine:b,switcherIcon:S=i.switcherIcon,icon:C=i.icon,blockNode:$,checkable:x,selectable:P,fieldNames:w=e.replaceFields,motion:O=e.openAnimation,itemHeight:I=28,onDoubleclick:_,onDblclick:T}=e,A=y(y(y({},n),it(e,["onUpdate:checkedKeys","onUpdate:expandedKeys","onUpdate:selectedKeys","onDoubleclick"])),{showLine:!!b,dropIndicatorRender:Age,fieldNames:w,icon:C,itemHeight:I}),R=i.default?zt(i.default()):void 0;return u(g(CN,k(k({},A),{},{virtual:s.value,motion:O,ref:d,prefixCls:a.value,class:ge({[`${a.value}-icon-hide`]:!m,[`${a.value}-block-node`]:$,[`${a.value}-unselectable`]:!P,[`${a.value}-rtl`]:l.value==="rtl"},n.class,c.value),direction:l.value,checkable:x,selectable:P,switcherIcon:H=>xN(a.value,S,H,i.leafIcon,b),onCheck:p,onExpand:v,onSelect:h,onDblclick:T||_,children:R}),y(y({},i),{checkable:()=>g("span",{class:`${a.value}-checkbox-inner`},null)})))}}});var Bge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};function yT(e){for(var t=1;t{if(l===Ri.End)return!1;if(s(u)){if(a.push(u),l===Ri.None)l=Ri.Start;else if(l===Ri.Start)return l=Ri.End,!1}else l===Ri.Start&&a.push(u);return n.includes(u)}),a}function fb(e,t,n){const o=[...t],r=[];return x$(e,n,(i,a)=>{const l=o.indexOf(i);return l!==-1&&(r.push(a),o.splice(l,1)),!!o.length}),r}var Vge=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);ry(y({},wN()),{expandAction:He([Boolean,String])});function Uge(e){const{isLeaf:t,expanded:n}=e;return g(t?Om:n?S$:C$,null,null)}const hg=le({compatConfig:{MODE:3},name:"ADirectoryTree",inheritAttrs:!1,props:Qe(Kge(),{showIcon:!0,expandAction:"click"}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r,expose:i}=t;var a;const l=ae(e.treeData||o1(zt((a=o.default)===null||a===void 0?void 0:a.call(o))));be(()=>e.treeData,()=>{l.value=e.treeData}),uo(()=>{ot(()=>{var I;e.treeData===void 0&&o.default&&(l.value=o1(zt((I=o.default)===null||I===void 0?void 0:I.call(o))))})});const s=ae(),u=ae(),c=E(()=>am(e.fieldNames)),d=ae();i({scrollTo:I=>{var _;(_=d.value)===null||_===void 0||_.scrollTo(I)},selectedKeys:E(()=>{var I;return(I=d.value)===null||I===void 0?void 0:I.selectedKeys}),checkedKeys:E(()=>{var I;return(I=d.value)===null||I===void 0?void 0:I.checkedKeys}),halfCheckedKeys:E(()=>{var I;return(I=d.value)===null||I===void 0?void 0:I.halfCheckedKeys}),loadedKeys:E(()=>{var I;return(I=d.value)===null||I===void 0?void 0:I.loadedKeys}),loadingKeys:E(()=>{var I;return(I=d.value)===null||I===void 0?void 0:I.loadingKeys}),expandedKeys:E(()=>{var I;return(I=d.value)===null||I===void 0?void 0:I.expandedKeys})});const p=()=>{const{keyEntities:I}=If(l.value,{fieldNames:c.value});let _;return e.defaultExpandAll?_=Object.keys(I):e.defaultExpandParent?_=n1(e.expandedKeys||e.defaultExpandedKeys||[],I):_=e.expandedKeys||e.defaultExpandedKeys,_},v=ae(e.selectedKeys||e.defaultSelectedKeys||[]),h=ae(p());be(()=>e.selectedKeys,()=>{e.selectedKeys!==void 0&&(v.value=e.selectedKeys)},{immediate:!0}),be(()=>e.expandedKeys,()=>{e.expandedKeys!==void 0&&(h.value=e.expandedKeys)},{immediate:!0});const b=MC((I,_)=>{const{isLeaf:T}=_;T||I.shiftKey||I.metaKey||I.ctrlKey||d.value.onNodeExpand(I,_)},200,{leading:!0}),S=(I,_)=>{e.expandedKeys===void 0&&(h.value=I),r("update:expandedKeys",I),r("expand",I,_)},C=(I,_)=>{const{expandAction:T}=e;T==="click"&&b(I,_),r("click",I,_)},$=(I,_)=>{const{expandAction:T}=e;(T==="dblclick"||T==="doubleclick")&&b(I,_),r("doubleclick",I,_),r("dblclick",I,_)},x=(I,_)=>{const{multiple:T}=e,{node:A,nativeEvent:R}=_,H=A[c.value.key],M=y(y({},_),{selected:!0}),D=(R==null?void 0:R.ctrlKey)||(R==null?void 0:R.metaKey),N=R==null?void 0:R.shiftKey;let L;T&&D?(L=I,s.value=H,u.value=L,M.selectedNodes=fb(l.value,L,c.value)):T&&N?(L=Array.from(new Set([...u.value||[],...Wge({treeData:l.value,expandedKeys:h.value,startKey:H,endKey:s.value,fieldNames:c.value})])),M.selectedNodes=fb(l.value,L,c.value)):(L=[H],s.value=H,u.value=L,M.selectedNodes=fb(l.value,L,c.value)),r("update:selectedKeys",L),r("select",L,M),e.selectedKeys===void 0&&(v.value=L)},P=(I,_)=>{r("update:checkedKeys",I),r("check",I,_)},{prefixCls:w,direction:O}=Te("tree",e);return()=>{const I=ge(`${w.value}-directory`,{[`${w.value}-directory-rtl`]:O.value==="rtl"},n.class),{icon:_=o.icon,blockNode:T=!0}=e,A=Vge(e,["icon","blockNode"]);return g(gg,k(k(k({},n),{},{icon:_||Uge,ref:d,blockNode:T},A),{},{prefixCls:w.value,class:I,expandedKeys:h.value,selectedKeys:v.value,onSelect:x,onClick:C,onDblclick:$,onExpand:S,onCheck:P}),o)}}}),vg=t1,PN=y(gg,{DirectoryTree:hg,TreeNode:vg,install:e=>(e.component(gg.name,gg),e.component(vg.name,vg),e.component(hg.name,hg),e)});function CT(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const o=new Set;function r(i,a){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;const s=o.has(i);if(FS(!s,"Warning: There may be circular references"),s)return!1;if(i===a)return!0;if(n&&l>1)return!1;o.add(i);const u=l+1;if(Array.isArray(i)){if(!Array.isArray(a)||i.length!==a.length)return!1;for(let c=0;cr(i[d],a[d],u))}return!1}return r(e,t)}const{SubMenu:Gge,Item:Xge}=on;function Yge(e){return e.some(t=>{let{children:n}=t;return n&&n.length>0})}function ON(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function IN(e){let{filters:t,prefixCls:n,filteredKeys:o,filterMultiple:r,searchValue:i,filterSearch:a}=e;return t.map((l,s)=>{const u=String(l.value);if(l.children)return g(Gge,{key:u||s,title:l.text,popupClassName:`${n}-dropdown-submenu`},{default:()=>[IN({filters:l.children,prefixCls:n,filteredKeys:o,filterMultiple:r,searchValue:i,filterSearch:a})]});const c=r?gr:bo,d=g(Xge,{key:l.value!==void 0?u:s},{default:()=>[g(c,{checked:o.includes(u)},null),g("span",null,[l.text])]});return i.trim()?typeof a=="function"?a(i,l)?d:void 0:ON(i,l.text)?d:void 0:d})}const qge=le({name:"FilterDropdown",props:["tablePrefixCls","prefixCls","dropdownPrefixCls","column","filterState","filterMultiple","filterMode","filterSearch","columnKey","triggerFilter","locale","getPopupContainer"],setup(e,t){let{slots:n}=t;const o=d$(),r=E(()=>{var z;return(z=e.filterMode)!==null&&z!==void 0?z:"menu"}),i=E(()=>{var z;return(z=e.filterSearch)!==null&&z!==void 0?z:!1}),a=E(()=>e.column.filterDropdownOpen||e.column.filterDropdownVisible),l=E(()=>e.column.onFilterDropdownOpenChange||e.column.onFilterDropdownVisibleChange),s=se(!1),u=E(()=>{var z;return!!(e.filterState&&(!((z=e.filterState.filteredKeys)===null||z===void 0)&&z.length||e.filterState.forceFiltered))}),c=E(()=>{var z;return Im((z=e.column)===null||z===void 0?void 0:z.filters)}),d=E(()=>{const{filterDropdown:z,slots:G={},customFilterDropdown:Q}=e.column;return z||G.filterDropdown&&o.value[G.filterDropdown]||Q&&o.value.customFilterDropdown}),f=E(()=>{const{filterIcon:z,slots:G={}}=e.column;return z||G.filterIcon&&o.value[G.filterIcon]||o.value.customFilterIcon}),p=z=>{var G;s.value=z,(G=l.value)===null||G===void 0||G.call(l,z)},v=E(()=>typeof a.value=="boolean"?a.value:s.value),h=E(()=>{var z;return(z=e.filterState)===null||z===void 0?void 0:z.filteredKeys}),m=se([]),b=z=>{let{selectedKeys:G}=z;m.value=G},S=(z,G)=>{let{node:Q,checked:Y}=G;e.filterMultiple?b({selectedKeys:z}):b({selectedKeys:Y&&Q.key?[Q.key]:[]})};be(h,()=>{s.value&&b({selectedKeys:h.value||[]})},{immediate:!0});const C=se([]),$=se(),x=z=>{$.value=setTimeout(()=>{C.value=z})},P=()=>{clearTimeout($.value)};tt(()=>{clearTimeout($.value)});const w=se(""),O=z=>{const{value:G}=z.target;w.value=G};be(s,()=>{s.value||(w.value="")});const I=z=>{const{column:G,columnKey:Q,filterState:Y}=e,oe=z&&z.length?z:null;if(oe===null&&(!Y||!Y.filteredKeys)||CT(oe,Y==null?void 0:Y.filteredKeys,!0))return null;e.triggerFilter({column:G,key:Q,filteredKeys:oe})},_=()=>{p(!1),I(m.value)},T=function(){let{confirm:z,closeDropdown:G}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};z&&I([]),G&&p(!1),w.value="",e.column.filterResetToDefaultFilteredValue?m.value=(e.column.defaultFilteredValue||[]).map(Q=>String(Q)):m.value=[]},A=function(){let{closeDropdown:z}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};z&&p(!1),I(m.value)},R=z=>{z&&h.value!==void 0&&(m.value=h.value||[]),p(z),!z&&!d.value&&_()},{direction:H}=Te("",e),M=z=>{if(z.target.checked){const G=c.value;m.value=G}else m.value=[]},D=z=>{let{filters:G}=z;return(G||[]).map((Q,Y)=>{const oe=String(Q.value),Z={title:Q.text,key:Q.value!==void 0?oe:Y};return Q.children&&(Z.children=D({filters:Q.children})),Z})},N=z=>{var G;return y(y({},z),{text:z.title,value:z.key,children:((G=z.children)===null||G===void 0?void 0:G.map(Q=>N(Q)))||[]})},L=E(()=>D({filters:e.column.filters})),F=E(()=>ge({[`${e.dropdownPrefixCls}-menu-without-submenu`]:!Yge(e.column.filters||[])})),B=()=>{const z=m.value,{column:G,locale:Q,tablePrefixCls:Y,filterMultiple:oe,dropdownPrefixCls:Z,getPopupContainer:re,prefixCls:ne}=e;return(G.filters||[]).length===0?g(Oa,{image:Oa.PRESENTED_IMAGE_SIMPLE,description:Q.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}},null):r.value==="tree"?g(Le,null,[g(aT,{filterSearch:i.value,value:w.value,onChange:O,tablePrefixCls:Y,locale:Q},null),g("div",{class:`${Y}-filter-dropdown-tree`},[oe?g(gr,{class:`${Y}-filter-dropdown-checkall`,onChange:M,checked:z.length===c.value.length,indeterminate:z.length>0&&z.length[Q.filterCheckall]}):null,g(PN,{checkable:!0,selectable:!1,blockNode:!0,multiple:oe,checkStrictly:!oe,class:`${Z}-menu`,onCheck:S,checkedKeys:z,selectedKeys:z,showIcon:!1,treeData:L.value,autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:w.value.trim()?X=>typeof i.value=="function"?i.value(w.value,N(X)):ON(w.value,X.title):void 0},null)])]):g(Le,null,[g(aT,{filterSearch:i.value,value:w.value,onChange:O,tablePrefixCls:Y,locale:Q},null),g(on,{multiple:oe,prefixCls:`${Z}-menu`,class:F.value,onClick:P,onSelect:b,onDeselect:b,selectedKeys:z,getPopupContainer:re,openKeys:C.value,onOpenChange:x},{default:()=>IN({filters:G.filters||[],filterSearch:i.value,prefixCls:ne,filteredKeys:m.value,filterMultiple:oe,searchValue:w.value})})])},j=E(()=>{const z=m.value;return e.column.filterResetToDefaultFilteredValue?CT((e.column.defaultFilteredValue||[]).map(G=>String(G)),z,!0):z.length===0});return()=>{var z;const{tablePrefixCls:G,prefixCls:Q,column:Y,dropdownPrefixCls:oe,locale:Z,getPopupContainer:re}=e;let ne;typeof d.value=="function"?ne=d.value({prefixCls:`${oe}-custom`,setSelectedKeys:W=>b({selectedKeys:W}),selectedKeys:m.value,confirm:A,clearFilters:T,filters:Y.filters,visible:v.value,column:Y.__originColumn__,close:()=>{p(!1)}}):d.value?ne=d.value:ne=g(Le,null,[B(),g("div",{class:`${Q}-dropdown-btns`},[g(Qt,{type:"link",size:"small",disabled:j.value,onClick:()=>T()},{default:()=>[Z.filterReset]}),g(Qt,{type:"primary",size:"small",onClick:_},{default:()=>[Z.filterConfirm]})])]);const X=g(vge,{class:`${Q}-dropdown`},{default:()=>[ne]});let te;return typeof f.value=="function"?te=f.value({filtered:u.value,column:Y.__originColumn__}):f.value?te=f.value:te=g(v$,null,null),g("div",{class:`${Q}-column`},[g("span",{class:`${G}-column-title`},[(z=n.default)===null||z===void 0?void 0:z.call(n)]),g(zr,{overlay:X,trigger:["click"],open:v.value,onOpenChange:R,getPopupContainer:re,placement:H.value==="rtl"?"bottomLeft":"bottomRight"},{default:()=>[g("span",{role:"button",tabindex:-1,class:ge(`${Q}-trigger`,{active:u.value}),onClick:W=>{W.stopPropagation()}},[te])]})])}}});function R1(e,t,n){let o=[];return(e||[]).forEach((r,i)=>{var a,l;const s=Af(i,n),u=r.filterDropdown||((a=r==null?void 0:r.slots)===null||a===void 0?void 0:a.filterDropdown)||r.customFilterDropdown;if(r.filters||u||"onFilter"in r)if("filteredValue"in r){let c=r.filteredValue;u||(c=(l=c==null?void 0:c.map(String))!==null&&l!==void 0?l:c),o.push({column:r,key:Xl(r,s),filteredKeys:c,forceFiltered:r.filtered})}else o.push({column:r,key:Xl(r,s),filteredKeys:t&&r.defaultFilteredValue?r.defaultFilteredValue:void 0,forceFiltered:r.filtered});"children"in r&&(o=[...o,...R1(r.children,t,s)])}),o}function TN(e,t,n,o,r,i,a,l){return n.map((s,u)=>{var c;const d=Af(u,l),{filterMultiple:f=!0,filterMode:p,filterSearch:v}=s;let h=s;const m=s.filterDropdown||((c=s==null?void 0:s.slots)===null||c===void 0?void 0:c.filterDropdown)||s.customFilterDropdown;if(h.filters||m){const b=Xl(h,d),S=o.find(C=>{let{key:$}=C;return b===$});h=y(y({},h),{title:C=>g(qge,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:h,columnKey:b,filterState:S,filterMultiple:f,filterMode:p,filterSearch:v,triggerFilter:i,locale:r,getPopupContainer:a},{default:()=>[h$(s.title,C)]})})}return"children"in h&&(h=y(y({},h),{children:TN(e,t,h.children,o,r,i,a,d)})),h})}function Im(e){let t=[];return(e||[]).forEach(n=>{let{value:o,children:r}=n;t.push(o),r&&(t=[...t,...Im(r)])}),t}function xT(e){const t={};return e.forEach(n=>{let{key:o,filteredKeys:r,column:i}=n;var a;const l=i.filterDropdown||((a=i==null?void 0:i.slots)===null||a===void 0?void 0:a.filterDropdown)||i.customFilterDropdown,{filters:s}=i;if(l)t[o]=r||null;else if(Array.isArray(r)){const u=Im(s);t[o]=u.filter(c=>r.includes(String(c)))}else t[o]=null}),t}function $T(e,t){return t.reduce((n,o)=>{const{column:{onFilter:r,filters:i},filteredKeys:a}=o;return r&&a&&a.length?n.filter(l=>a.some(s=>{const u=Im(i),c=u.findIndex(f=>String(f)===String(s)),d=c!==-1?u[c]:s;return r(d,l)})):n},e)}function EN(e){return e.flatMap(t=>"children"in t?[t,...EN(t.children||[])]:[t])}function Jge(e){let{prefixCls:t,dropdownPrefixCls:n,mergedColumns:o,locale:r,onFilterChange:i,getPopupContainer:a}=e;const l=E(()=>EN(o.value)),[s,u]=$t(R1(l.value,!0)),c=E(()=>{const v=R1(l.value,!1);if(v.length===0)return v;let h=!0,m=!0;if(v.forEach(b=>{let{filteredKeys:S}=b;S!==void 0?h=!1:m=!1}),h){const b=(l.value||[]).map((S,C)=>Xl(S,Af(C)));return s.value.filter(S=>{let{key:C}=S;return b.includes(C)}).map(S=>{const C=l.value[b.findIndex($=>$===S.key)];return y(y({},S),{column:y(y({},S.column),C),forceFiltered:C.filtered})})}return Mt(m,"Table","Columns should all contain `filteredValue` or not contain `filteredValue`."),v}),d=E(()=>xT(c.value)),f=v=>{const h=c.value.filter(m=>{let{key:b}=m;return b!==v.key});h.push(v),u(h),i(xT(h),h)};return[v=>TN(t.value,n.value,v,c.value,r.value,f,a.value),c,d]}function _N(e,t){return e.map(n=>{const o=y({},n);return o.title=h$(o.title,t),"children"in o&&(o.children=_N(o.children,t)),o})}function Zge(e){return[n=>_N(n,e.value)]}function Qge(e){return function(n){let{prefixCls:o,onExpand:r,record:i,expanded:a,expandable:l}=n;const s=`${o}-row-expand-icon`;return g("button",{type:"button",onClick:u=>{r(i,u),u.stopPropagation()},class:ge(s,{[`${s}-spaced`]:!l,[`${s}-expanded`]:l&&a,[`${s}-collapsed`]:l&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a},null)}}function MN(e,t){const n=t.value;return e.map(o=>{var r;if(o===Ai||o===xa)return o;const i=y({},o),{slots:a={}}=i;return i.__originColumn__=o,Mt(!("slots"in i),"Table","`column.slots` is deprecated. Please use `v-slot:headerCell` `v-slot:bodyCell` instead."),Object.keys(a).forEach(l=>{const s=a[l];i[l]===void 0&&n[s]&&(i[l]=n[s])}),t.value.headerCell&&!(!((r=o.slots)===null||r===void 0)&&r.title)&&(i.title=Pv(t.value,"headerCell",{title:o.title,column:o},()=>[o.title])),"children"in i&&Array.isArray(i.children)&&(i.children=MN(i.children,t)),i})}function ehe(e){return[n=>MN(n,e)]}const the=e=>{const{componentCls:t}=e,n=`${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`,o=(r,i,a)=>({[`&${t}-${r}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"> table > tbody > tr > td":{[`> ${t}-expanded-row-fixed`]:{margin:`-${i}px -${a+e.lineWidth}px`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:y(y(y({[`> ${t}-title`]:{border:n,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:n,[` + `]:{cursor:"not-allowed !important"}}})}},QD=(e,t)=>{const{componentCls:n,railSize:o,handleSize:r,dotSize:i}=e,a=t?"paddingBlock":"paddingInline",l=t?"width":"height",s=t?"height":"width",u=t?"insetBlockStart":"insetInlineStart",c=t?"top":"insetInlineStart";return{[a]:o,[s]:o*3,[`${n}-rail`]:{[l]:"100%",[s]:o},[`${n}-track`]:{[s]:o},[`${n}-handle`]:{[u]:(o*3-r)/2},[`${n}-mark`]:{insetInlineStart:0,top:0,[c]:r,[l]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[c]:o,[l]:"100%",[s]:o},[`${n}-dot`]:{position:"absolute",[u]:(o-i)/2}}},Ife=e=>{const{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:y(y({},QD(e,!0)),{[`&${t}-with-marks`]:{marginBottom:n}})}},Tfe=e=>{const{componentCls:t}=e;return{[`${t}-vertical`]:y(y({},QD(e,!1)),{height:"100%"})}},Efe=Ue("Slider",e=>{const t=Be(e,{marginPart:(e.controlHeight-e.controlSize)/2,marginFull:e.controlSize/2,marginPartWithMark:e.controlHeightLG-e.controlSize});return[Ofe(t),Ife(t),Tfe(t)]},e=>{const n=e.controlHeightLG/4,o=e.controlHeightSM/2,r=e.lineWidth+1,i=e.lineWidth+1*3;return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:o,dotSize:8,handleLineWidth:r,handleLineWidthHover:i}});var UT=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rtypeof e=="number"?e.toString():"",Mfe=()=>({id:String,prefixCls:String,tooltipPrefixCls:String,range:He([Boolean,Object]),reverse:$e(),min:Number,max:Number,step:He([Object,Number]),marks:De(),dots:$e(),value:He([Array,Number]),defaultValue:He([Array,Number]),included:$e(),disabled:$e(),vertical:$e(),tipFormatter:He([Function,Object],()=>_fe),tooltipOpen:$e(),tooltipVisible:$e(),tooltipPlacement:Ne(),getTooltipPopupContainer:ye(),autofocus:$e(),handleStyle:He([Array,Object]),trackStyle:He([Array,Object]),onChange:ye(),onAfterChange:ye(),onFocus:ye(),onBlur:ye(),"onUpdate:value":ye()}),Afe=le({compatConfig:{MODE:3},name:"ASlider",inheritAttrs:!1,props:Mfe(),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r,expose:i}=t;const{prefixCls:a,rootPrefixCls:l,direction:s,getPopupContainer:u,configProvider:c}=Te("slider",e),[d,f]=Efe(a),p=bn(),v=ae(),h=ae({}),m=(w,O)=>{h.value[w]=O},b=E(()=>e.tooltipPlacement?e.tooltipPlacement:e.vertical?s.value==="rtl"?"left":"right":"top"),S=()=>{var w;(w=v.value)===null||w===void 0||w.focus()},C=()=>{var w;(w=v.value)===null||w===void 0||w.blur()},$=w=>{r("update:value",w),r("change",w),p.onFieldChange()},x=w=>{r("blur",w)};i({focus:S,blur:C});const P=w=>{var{tooltipPrefixCls:O}=w,I=w.info,{value:_,dragging:T,index:A}=I,R=UT(I,["value","dragging","index"]);const{tipFormatter:H,tooltipOpen:M=e.tooltipVisible,getTooltipPopupContainer:D}=e,N=H?h.value[A]||T:!1,L=M||M===void 0&&N;return g(Pfe,{prefixCls:O,title:H?H(_):"",open:L,placement:b.value,transitionName:`${l.value}-zoom-down`,key:A,overlayClassName:`${a.value}-tooltip`,getPopupContainer:D||(u==null?void 0:u.value)},{default:()=>[g(GD,k(k({},R),{},{value:_,onMouseenter:()=>m(A,!0),onMouseleave:()=>m(A,!1)}),null)]})};return()=>{const{tooltipPrefixCls:w,range:O,id:I=p.id.value}=e,_=UT(e,["tooltipPrefixCls","range","id"]),T=c.getPrefixCls("tooltip",w),A=ge(n.class,{[`${a.value}-rtl`]:s.value==="rtl"},f.value);s.value==="rtl"&&!_.vertical&&(_.reverse=!_.reverse);let R;return typeof O=="object"&&(R=O.draggableTrack),d(O?g(wfe,k(k(k({},n),_),{},{step:_.step,draggableTrack:R,class:A,ref:v,handle:H=>P({tooltipPrefixCls:T,prefixCls:a.value,info:H}),prefixCls:a.value,onChange:$,onBlur:x}),{mark:o.mark}):g(Cfe,k(k(k({},n),_),{},{id:I,step:_.step,class:A,ref:v,handle:H=>P({tooltipPrefixCls:T,prefixCls:a.value,info:H}),prefixCls:a.value,onChange:$,onBlur:x}),{mark:o.mark}))}}}),Rfe=Lt(Afe);function GT(e){return typeof e=="string"}function Dfe(){}const eN=()=>({prefixCls:String,itemWidth:String,active:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},status:Ne(),iconPrefix:String,icon:K.any,adjustMarginRight:String,stepNumber:Number,stepIndex:Number,description:K.any,title:K.any,subTitle:K.any,progressDot:K6(K.oneOfType([K.looseBool,K.func])),tailContent:K.any,icons:K.shape({finish:K.any,error:K.any}).loose,onClick:ye(),onStepClick:ye(),stepIcon:ye(),itemRender:ye(),__legacy:$e()}),tN=le({compatConfig:{MODE:3},name:"Step",inheritAttrs:!1,props:eN(),setup(e,t){let{slots:n,emit:o,attrs:r}=t;const i=l=>{o("click",l),o("stepClick",e.stepIndex)},a=l=>{let{icon:s,title:u,description:c}=l;const{prefixCls:d,stepNumber:f,status:p,iconPrefix:v,icons:h,progressDot:m=n.progressDot,stepIcon:b=n.stepIcon}=e;let S;const C=ge(`${d}-icon`,`${v}icon`,{[`${v}icon-${s}`]:s&>(s),[`${v}icon-check`]:!s&&p==="finish"&&(h&&!h.finish||!h),[`${v}icon-cross`]:!s&&p==="error"&&(h&&!h.error||!h)}),$=g("span",{class:`${d}-icon-dot`},null);return m?typeof m=="function"?S=g("span",{class:`${d}-icon`},[m({iconDot:$,index:f-1,status:p,title:u,description:c,prefixCls:d})]):S=g("span",{class:`${d}-icon`},[$]):s&&!GT(s)?S=g("span",{class:`${d}-icon`},[s]):h&&h.finish&&p==="finish"?S=g("span",{class:`${d}-icon`},[h.finish]):h&&h.error&&p==="error"?S=g("span",{class:`${d}-icon`},[h.error]):s||p==="finish"||p==="error"?S=g("span",{class:C},null):S=g("span",{class:`${d}-icon`},[f]),b&&(S=b({index:f-1,status:p,title:u,description:c,node:S})),S};return()=>{var l,s,u,c;const{prefixCls:d,itemWidth:f,active:p,status:v="wait",tailContent:h,adjustMarginRight:m,disabled:b,title:S=(l=n.title)===null||l===void 0?void 0:l.call(n),description:C=(s=n.description)===null||s===void 0?void 0:s.call(n),subTitle:$=(u=n.subTitle)===null||u===void 0?void 0:u.call(n),icon:x=(c=n.icon)===null||c===void 0?void 0:c.call(n),onClick:P,onStepClick:w}=e,O=v||"wait",I=ge(`${d}-item`,`${d}-item-${O}`,{[`${d}-item-custom`]:x,[`${d}-item-active`]:p,[`${d}-item-disabled`]:b===!0}),_={};f&&(_.width=f),m&&(_.marginRight=m);const T={onClick:P||Dfe};w&&!b&&(T.role="button",T.tabindex=0,T.onClick=i);const A=g("div",k(k({},it(r,["__legacy"])),{},{class:[I,r.class],style:[r.style,_]}),[g("div",k(k({},T),{},{class:`${d}-item-container`}),[g("div",{class:`${d}-item-tail`},[h]),g("div",{class:`${d}-item-icon`},[a({icon:x,title:S,description:C})]),g("div",{class:`${d}-item-content`},[g("div",{class:`${d}-item-title`},[S,$&&g("div",{title:typeof $=="string"?$:void 0,class:`${d}-item-subtitle`},[$])]),C&&g("div",{class:`${d}-item-description`},[C])])])]);return e.itemRender?e.itemRender(A):A}}});var Nfe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r[]),icons:K.shape({finish:K.any,error:K.any}).loose,stepIcon:ye(),isInline:K.looseBool,itemRender:ye()},emits:["change"],setup(e,t){let{slots:n,emit:o}=t;const r=l=>{const{current:s}=e;s!==l&&o("change",l)},i=(l,s,u)=>{const{prefixCls:c,iconPrefix:d,status:f,current:p,initial:v,icons:h,stepIcon:m=n.stepIcon,isInline:b,itemRender:S,progressDot:C=n.progressDot}=e,$=b||C,x=y(y({},l),{class:""}),P=v+s,w={active:P===p,stepNumber:P+1,stepIndex:P,key:P,prefixCls:c,iconPrefix:d,progressDot:$,stepIcon:m,icons:h,onStepClick:r};return f==="error"&&s===p-1&&(x.class=`${c}-next-error`),x.status||(P===p?x.status=f:PS(x,O)),g(tN,k(k(k({},x),w),{},{__legacy:!1}),null))},a=(l,s)=>i(y({},l.props),s,u=>mt(l,u));return()=>{var l;const{prefixCls:s,direction:u,type:c,labelPlacement:d,iconPrefix:f,status:p,size:v,current:h,progressDot:m=n.progressDot,initial:b,icons:S,items:C,isInline:$,itemRender:x}=e,P=Nfe(e,["prefixCls","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","initial","icons","items","isInline","itemRender"]),w=c==="navigation",O=$||m,I=$?"horizontal":u,_=$?void 0:v,T=O?"vertical":d,A=ge(s,`${s}-${u}`,{[`${s}-${_}`]:_,[`${s}-label-${T}`]:I==="horizontal",[`${s}-dot`]:!!O,[`${s}-navigation`]:w,[`${s}-inline`]:$});return g("div",k({class:A},P),[C.filter(R=>R).map((R,H)=>i(R,H)),zt((l=n.default)===null||l===void 0?void 0:l.call(n)).map(a)])}}}),Lfe=e=>{const{componentCls:t,stepsIconCustomTop:n,stepsIconCustomSize:o,stepsIconCustomFontSize:r}=e;return{[`${t}-item-custom`]:{[`> ${t}-item-container > ${t}-item-icon`]:{height:"auto",background:"none",border:0,[`> ${t}-icon`]:{top:n,width:o,height:o,fontSize:r,lineHeight:`${o}px`}}},[`&:not(${t}-vertical)`]:{[`${t}-item-custom`]:{[`${t}-item-icon`]:{width:"auto",background:"none"}}}}},Ffe=e=>{const{componentCls:t,stepsIconSize:n,lineHeight:o,stepsSmallIconSize:r}=e;return{[`&${t}-label-vertical`]:{[`${t}-item`]:{overflow:"visible","&-tail":{marginInlineStart:n/2+e.controlHeightLG,padding:`${e.paddingXXS}px ${e.paddingLG}px`},"&-content":{display:"block",width:(n/2+e.controlHeightLG)*2,marginTop:e.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:e.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:e.marginXXS,marginInlineStart:0,lineHeight:o}},[`&${t}-small:not(${t}-dot)`]:{[`${t}-item`]:{"&-icon":{marginInlineStart:e.controlHeightLG+(n-r)/2}}}}}},Bfe=e=>{const{componentCls:t,stepsNavContentMaxWidth:n,stepsNavArrowColor:o,stepsNavActiveColor:r,motionDurationSlow:i}=e;return{[`&${t}-navigation`]:{paddingTop:e.paddingSM,[`&${t}-small`]:{[`${t}-item`]:{"&-container":{marginInlineStart:-e.marginSM}}},[`${t}-item`]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:-e.margin,paddingBottom:e.paddingSM,textAlign:"start",transition:`opacity ${i}`,[`${t}-item-content`]:{maxWidth:n},[`${t}-item-title`]:y(y({maxWidth:"100%",paddingInlineEnd:0},cn),{"&::after":{display:"none"}})},[`&:not(${t}-item-active)`]:{[`${t}-item-container[role='button']`]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:`calc(50% - ${e.paddingSM/2}px)`,insetInlineStart:"100%",display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,borderTop:`${e.lineWidth}px ${e.lineType} ${o}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${o}`,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:e.lineWidthBold,backgroundColor:r,transition:`width ${i}, inset-inline-start ${i}`,transitionTimingFunction:"ease-out",content:'""'}},[`${t}-item${t}-item-active::before`]:{insetInlineStart:0,width:"100%"}},[`&${t}-navigation${t}-vertical`]:{[`> ${t}-item`]:{marginInlineEnd:0,"&::before":{display:"none"},[`&${t}-item-active::before`]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:e.lineWidth*3,height:`calc(100% - ${e.marginLG}px)`},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:e.controlHeight*.25,height:e.controlHeight*.25,marginBottom:e.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},[`> ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}},[`&${t}-navigation${t}-horizontal`]:{[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}}},Hfe=e=>{const{antCls:t,componentCls:n}=e;return{[`&${n}-with-progress`]:{[`${n}-item`]:{paddingTop:e.paddingXXS,[`&-process ${n}-item-container ${n}-item-icon ${n}-icon`]:{color:e.processIconColor}},[`&${n}-vertical > ${n}-item `]:{paddingInlineStart:e.paddingXXS,[`> ${n}-item-container > ${n}-item-tail`]:{top:e.marginXXS,insetInlineStart:e.stepsIconSize/2-e.lineWidth+e.paddingXXS}},[`&, &${n}-small`]:{[`&${n}-horizontal ${n}-item:first-child`]:{paddingBottom:e.paddingXXS,paddingInlineStart:e.paddingXXS}},[`&${n}-small${n}-vertical > ${n}-item > ${n}-item-container > ${n}-item-tail`]:{insetInlineStart:e.stepsSmallIconSize/2-e.lineWidth+e.paddingXXS},[`&${n}-label-vertical`]:{[`${n}-item ${n}-item-tail`]:{top:e.margin-2*e.lineWidth}},[`${n}-item-icon`]:{position:"relative",[`${t}-progress`]:{position:"absolute",insetBlockStart:(e.stepsIconSize-e.stepsProgressSize-e.lineWidth*2)/2,insetInlineStart:(e.stepsIconSize-e.stepsProgressSize-e.lineWidth*2)/2}}}}},zfe=e=>{const{componentCls:t,descriptionWidth:n,lineHeight:o,stepsCurrentDotSize:r,stepsDotSize:i,motionDurationSlow:a}=e;return{[`&${t}-dot, &${t}-dot${t}-small`]:{[`${t}-item`]:{"&-title":{lineHeight:o},"&-tail":{top:Math.floor((e.stepsDotSize-e.lineWidth*3)/2),width:"100%",marginTop:0,marginBottom:0,marginInline:`${n/2}px 0`,padding:0,"&::after":{width:`calc(100% - ${e.marginSM*2}px)`,height:e.lineWidth*3,marginInlineStart:e.marginSM}},"&-icon":{width:i,height:i,marginInlineStart:(e.descriptionWidth-i)/2,paddingInlineEnd:0,lineHeight:`${i}px`,background:"transparent",border:0,[`${t}-icon-dot`]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:`all ${a}`,"&::after":{position:"absolute",top:-e.marginSM,insetInlineStart:(i-e.controlHeightLG*1.5)/2,width:e.controlHeightLG*1.5,height:e.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:n},[`&-process ${t}-item-icon`]:{position:"relative",top:(i-r)/2,width:r,height:r,lineHeight:`${r}px`,background:"none",marginInlineStart:(e.descriptionWidth-r)/2},[`&-process ${t}-icon`]:{[`&:first-child ${t}-icon-dot`]:{insetInlineStart:0}}}},[`&${t}-vertical${t}-dot`]:{[`${t}-item-icon`]:{marginTop:(e.controlHeight-i)/2,marginInlineStart:0,background:"none"},[`${t}-item-process ${t}-item-icon`]:{marginTop:(e.controlHeight-r)/2,top:0,insetInlineStart:(i-r)/2,marginInlineStart:0},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:(e.controlHeight-i)/2,insetInlineStart:0,margin:0,padding:`${i+e.paddingXS}px 0 ${e.paddingXS}px`,"&::after":{marginInlineStart:(i-e.lineWidth)/2}},[`&${t}-small`]:{[`${t}-item-icon`]:{marginTop:(e.controlHeightSM-i)/2},[`${t}-item-process ${t}-item-icon`]:{marginTop:(e.controlHeightSM-r)/2},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:(e.controlHeightSM-i)/2}},[`${t}-item:first-child ${t}-icon-dot`]:{insetInlineStart:0},[`${t}-item-content`]:{width:"inherit"}}}},jfe=e=>{const{componentCls:t}=e;return{[`&${t}-rtl`]:{direction:"rtl",[`${t}-item`]:{"&-subtitle":{float:"left"}},[`&${t}-navigation`]:{[`${t}-item::after`]:{transform:"rotate(-45deg)"}},[`&${t}-vertical`]:{[`> ${t}-item`]:{"&::after":{transform:"rotate(225deg)"},[`${t}-item-icon`]:{float:"right"}}},[`&${t}-dot`]:{[`${t}-item-icon ${t}-icon-dot, &${t}-small ${t}-item-icon ${t}-icon-dot`]:{float:"right"}}}}},Wfe=e=>{const{componentCls:t,stepsSmallIconSize:n,fontSizeSM:o,fontSize:r,colorTextDescription:i}=e;return{[`&${t}-small`]:{[`&${t}-horizontal:not(${t}-label-vertical) ${t}-item`]:{paddingInlineStart:e.paddingSM,"&:first-child":{paddingInlineStart:0}},[`${t}-item-icon`]:{width:n,height:n,marginTop:0,marginBottom:0,marginInline:`0 ${e.marginXS}px`,fontSize:o,lineHeight:`${n}px`,textAlign:"center",borderRadius:n},[`${t}-item-title`]:{paddingInlineEnd:e.paddingSM,fontSize:r,lineHeight:`${n}px`,"&::after":{top:n/2}},[`${t}-item-description`]:{color:i,fontSize:r},[`${t}-item-tail`]:{top:n/2-e.paddingXXS},[`${t}-item-custom ${t}-item-icon`]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,[`> ${t}-icon`]:{fontSize:n,lineHeight:`${n}px`,transform:"none"}}}}},Vfe=e=>{const{componentCls:t,stepsSmallIconSize:n,stepsIconSize:o}=e;return{[`&${t}-vertical`]:{display:"flex",flexDirection:"column",[`> ${t}-item`]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",[`${t}-item-icon`]:{float:"left",marginInlineEnd:e.margin},[`${t}-item-content`]:{display:"block",minHeight:e.controlHeight*1.5,overflow:"hidden"},[`${t}-item-title`]:{lineHeight:`${o}px`},[`${t}-item-description`]:{paddingBottom:e.paddingSM}},[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.stepsIconSize/2-e.lineWidth,width:e.lineWidth,height:"100%",padding:`${o+e.marginXXS*1.5}px 0 ${e.marginXXS*1.5}px`,"&::after":{width:e.lineWidth,height:"100%"}},[`> ${t}-item:not(:last-child) > ${t}-item-container > ${t}-item-tail`]:{display:"block"},[` > ${t}-item > ${t}-item-container > ${t}-item-content > ${t}-item-title`]:{"&::after":{display:"none"}},[`&${t}-small ${t}-item-container`]:{[`${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.stepsSmallIconSize/2-e.lineWidth,padding:`${n+e.marginXXS*1.5}px 0 ${e.marginXXS*1.5}px`},[`${t}-item-title`]:{lineHeight:`${n}px`}}}}},Kfe=e=>{const{componentCls:t,inlineDotSize:n,inlineTitleColor:o,inlineTailColor:r}=e,i=e.paddingXS+e.lineWidth,a={[`${t}-item-container ${t}-item-content ${t}-item-title`]:{color:o}};return{[`&${t}-inline`]:{width:"auto",display:"inline-flex",[`${t}-item`]:{flex:"none","&-container":{padding:`${i}px ${e.paddingXXS}px 0`,margin:`0 ${e.marginXXS/2}px`,borderRadius:e.borderRadiusSM,cursor:"pointer",transition:`background-color ${e.motionDurationMid}`,"&:hover":{background:e.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:n,height:n,marginInlineStart:`calc(50% - ${n/2}px)`,[`> ${t}-icon`]:{top:0},[`${t}-icon-dot`]:{borderRadius:e.fontSizeSM/4}},"&-content":{width:"auto",marginTop:e.marginXS-e.lineWidth},"&-title":{color:o,fontSize:e.fontSizeSM,lineHeight:e.lineHeightSM,fontWeight:"normal",marginBottom:e.marginXXS/2},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:i+n/2,transform:"translateY(-50%)","&:after":{width:"100%",height:e.lineWidth,borderRadius:0,marginInlineStart:0,background:r}},[`&:first-child ${t}-item-tail`]:{width:"50%",marginInlineStart:"50%"},[`&:last-child ${t}-item-tail`]:{display:"block",width:"50%"},"&-wait":y({[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:e.colorBorderBg,border:`${e.lineWidth}px ${e.lineType} ${r}`}},a),"&-finish":y({[`${t}-item-tail::after`]:{backgroundColor:r},[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:r,border:`${e.lineWidth}px ${e.lineType} ${r}`}},a),"&-error":a,"&-active, &-process":y({[`${t}-item-icon`]:{width:n,height:n,marginInlineStart:`calc(50% - ${n/2}px)`,top:0}},a),[`&:not(${t}-item-active) > ${t}-item-container[role='button']:hover`]:{[`${t}-item-title`]:{color:o}}}}}};var Gs;(function(e){e.wait="wait",e.process="process",e.finish="finish",e.error="error"})(Gs||(Gs={}));const mp=(e,t)=>{const n=`${t.componentCls}-item`,o=`${e}IconColor`,r=`${e}TitleColor`,i=`${e}DescriptionColor`,a=`${e}TailColor`,l=`${e}IconBgColor`,s=`${e}IconBorderColor`,u=`${e}DotColor`;return{[`${n}-${e} ${n}-icon`]:{backgroundColor:t[l],borderColor:t[s],[`> ${t.componentCls}-icon`]:{color:t[o],[`${t.componentCls}-icon-dot`]:{background:t[u]}}},[`${n}-${e}${n}-custom ${n}-icon`]:{[`> ${t.componentCls}-icon`]:{color:t[u]}},[`${n}-${e} > ${n}-container > ${n}-content > ${n}-title`]:{color:t[r],"&::after":{backgroundColor:t[a]}},[`${n}-${e} > ${n}-container > ${n}-content > ${n}-description`]:{color:t[i]},[`${n}-${e} > ${n}-container > ${n}-tail::after`]:{backgroundColor:t[a]}}},Ufe=e=>{const{componentCls:t,motionDurationSlow:n}=e,o=`${t}-item`;return y(y(y(y(y(y({[o]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",[`> ${o}-container > ${o}-tail, > ${o}-container > ${o}-content > ${o}-title::after`]:{display:"none"}}},[`${o}-container`]:{outline:"none"},[`${o}-icon, ${o}-content`]:{display:"inline-block",verticalAlign:"top"},[`${o}-icon`]:{width:e.stepsIconSize,height:e.stepsIconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:e.marginXS,fontSize:e.stepsIconFontSize,fontFamily:e.fontFamily,lineHeight:`${e.stepsIconSize}px`,textAlign:"center",borderRadius:e.stepsIconSize,border:`${e.lineWidth}px ${e.lineType} transparent`,transition:`background-color ${n}, border-color ${n}`,[`${t}-icon`]:{position:"relative",top:e.stepsIconTop,color:e.colorPrimary,lineHeight:1}},[`${o}-tail`]:{position:"absolute",top:e.stepsIconSize/2-e.paddingXXS,insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:e.lineWidth,background:e.colorSplit,borderRadius:e.lineWidth,transition:`background ${n}`,content:'""'}},[`${o}-title`]:{position:"relative",display:"inline-block",paddingInlineEnd:e.padding,color:e.colorText,fontSize:e.fontSizeLG,lineHeight:`${e.stepsTitleLineHeight}px`,"&::after":{position:"absolute",top:e.stepsTitleLineHeight/2,insetInlineStart:"100%",display:"block",width:9999,height:e.lineWidth,background:e.processTailColor,content:'""'}},[`${o}-subtitle`]:{display:"inline",marginInlineStart:e.marginXS,color:e.colorTextDescription,fontWeight:"normal",fontSize:e.fontSize},[`${o}-description`]:{color:e.colorTextDescription,fontSize:e.fontSize}},mp(Gs.wait,e)),mp(Gs.process,e)),{[`${o}-process > ${o}-container > ${o}-title`]:{fontWeight:e.fontWeightStrong}}),mp(Gs.finish,e)),mp(Gs.error,e)),{[`${o}${t}-next-error > ${t}-item-title::after`]:{background:e.colorError},[`${o}-disabled`]:{cursor:"not-allowed"}})},Gfe=e=>{const{componentCls:t,motionDurationSlow:n}=e;return{[`& ${t}-item`]:{[`&:not(${t}-item-active)`]:{[`& > ${t}-item-container[role='button']`]:{cursor:"pointer",[`${t}-item`]:{[`&-title, &-subtitle, &-description, &-icon ${t}-icon`]:{transition:`color ${n}`}},"&:hover":{[`${t}-item`]:{"&-title, &-subtitle, &-description":{color:e.colorPrimary}}}},[`&:not(${t}-item-process)`]:{[`& > ${t}-item-container[role='button']:hover`]:{[`${t}-item`]:{"&-icon":{borderColor:e.colorPrimary,[`${t}-icon`]:{color:e.colorPrimary}}}}}}},[`&${t}-horizontal:not(${t}-label-vertical)`]:{[`${t}-item`]:{paddingInlineStart:e.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},[`&:last-child ${t}-item-title`]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:e.descriptionWidth,whiteSpace:"normal"}}}}},Xfe=e=>{const{componentCls:t}=e;return{[t]:y(y(y(y(y(y(y(y(y(y(y(y(y({},qe(e)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),Ufe(e)),Gfe(e)),Lfe(e)),Wfe(e)),Vfe(e)),Ffe(e)),zfe(e)),Bfe(e)),jfe(e)),Hfe(e)),Kfe(e))}},Yfe=Ue("Steps",e=>{const{wireframe:t,colorTextDisabled:n,fontSizeHeading3:o,fontSize:r,controlHeight:i,controlHeightLG:a,colorTextLightSolid:l,colorText:s,colorPrimary:u,colorTextLabel:c,colorTextDescription:d,colorTextQuaternary:f,colorFillContent:p,controlItemBgActive:v,colorError:h,colorBgContainer:m,colorBorderSecondary:b}=e,S=e.controlHeight,C=e.colorSplit,$=Be(e,{processTailColor:C,stepsNavArrowColor:n,stepsIconSize:S,stepsIconCustomSize:S,stepsIconCustomTop:0,stepsIconCustomFontSize:a/2,stepsIconTop:-.5,stepsIconFontSize:r,stepsTitleLineHeight:i,stepsSmallIconSize:o,stepsDotSize:i/4,stepsCurrentDotSize:a/4,stepsNavContentMaxWidth:"auto",processIconColor:l,processTitleColor:s,processDescriptionColor:s,processIconBgColor:u,processIconBorderColor:u,processDotColor:u,waitIconColor:t?n:c,waitTitleColor:d,waitDescriptionColor:d,waitTailColor:C,waitIconBgColor:t?m:p,waitIconBorderColor:t?n:"transparent",waitDotColor:n,finishIconColor:u,finishTitleColor:s,finishDescriptionColor:d,finishTailColor:u,finishIconBgColor:t?m:v,finishIconBorderColor:t?u:v,finishDotColor:u,errorIconColor:l,errorTitleColor:h,errorDescriptionColor:h,errorTailColor:C,errorIconBgColor:h,errorIconBorderColor:h,errorDotColor:h,stepsNavActiveColor:u,stepsProgressSize:a,inlineDotSize:6,inlineTitleColor:f,inlineTailColor:b});return[Xfe($)]},{descriptionWidth:140}),qfe=()=>({prefixCls:String,iconPrefix:String,current:Number,initial:Number,percent:Number,responsive:$e(),items:pt(),labelPlacement:Ne(),status:Ne(),size:Ne(),direction:Ne(),progressDot:He([Boolean,Function]),type:Ne(),onChange:ye(),"onUpdate:current":ye()}),ub=le({compatConfig:{MODE:3},name:"ASteps",inheritAttrs:!1,props:Qe(qfe(),{current:0,responsive:!0,labelPlacement:"horizontal"}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r}=t;const{prefixCls:i,direction:a,configProvider:l}=Te("steps",e),[s,u]=Yfe(i),[,c]=na(),d=nu(),f=E(()=>e.responsive&&d.value.xs?"vertical":e.direction),p=E(()=>l.getPrefixCls("",e.iconPrefix)),v=C=>{r("update:current",C),r("change",C)},h=E(()=>e.type==="inline"),m=E(()=>h.value?void 0:e.percent),b=C=>{let{node:$,status:x}=C;if(x==="process"&&e.percent!==void 0){const P=e.size==="small"?c.value.controlHeight:c.value.controlHeightLG;return g("div",{class:`${i.value}-progress-icon`},[g(a$,{type:"circle",percent:m.value,size:P,strokeWidth:4,format:()=>null},null),$])}return $},S=E(()=>({finish:g(Yc,{class:`${i.value}-finish-icon`},null),error:g(fo,{class:`${i.value}-error-icon`},null)}));return()=>{const C=ge({[`${i.value}-rtl`]:a.value==="rtl",[`${i.value}-with-progress`]:m.value!==void 0},n.class,u.value),$=(x,P)=>x.description?g(Ro,{title:x.description},{default:()=>[P]}):P;return s(g(kfe,k(k(k({icons:S.value},n),it(e,["percent","responsive"])),{},{items:e.items,direction:f.value,prefixCls:i.value,iconPrefix:p.value,class:C,onChange:v,isInline:h.value,itemRender:h.value?$:void 0}),y({stepIcon:b},o)))}}}),dg=le(y(y({compatConfig:{MODE:3}},tN),{name:"AStep",props:eN()})),Jfe=y(ub,{Step:dg,install:e=>(e.component(ub.name,ub),e.component(dg.name,dg),e)}),Zfe=e=>{const{componentCls:t}=e,n=`${t}-inner`;return{[t]:{[`&${t}-small`]:{minWidth:e.switchMinWidthSM,height:e.switchHeightSM,lineHeight:`${e.switchHeightSM}px`,[`${t}-inner`]:{paddingInlineStart:e.switchInnerMarginMaxSM,paddingInlineEnd:e.switchInnerMarginMinSM,[`${n}-checked`]:{marginInlineStart:`calc(-100% + ${e.switchPinSizeSM+e.switchPadding*2}px - ${e.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(100% - ${e.switchPinSizeSM+e.switchPadding*2}px + ${e.switchInnerMarginMaxSM*2}px)`},[`${n}-unchecked`]:{marginTop:-e.switchHeightSM,marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:e.switchPinSizeSM,height:e.switchPinSizeSM},[`${t}-loading-icon`]:{top:(e.switchPinSizeSM-e.switchLoadingIconSize)/2,fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:e.switchInnerMarginMinSM,paddingInlineEnd:e.switchInnerMarginMaxSM,[`${n}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${n}-unchecked`]:{marginInlineStart:`calc(100% - ${e.switchPinSizeSM+e.switchPadding*2}px + ${e.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(-100% + ${e.switchPinSizeSM+e.switchPadding*2}px - ${e.switchInnerMarginMaxSM*2}px)`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${e.switchPinSizeSM+e.switchPadding}px)`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${n}`]:{[`${n}-unchecked`]:{marginInlineStart:e.marginXXS/2,marginInlineEnd:-e.marginXXS/2}},[`&${t}-checked ${n}`]:{[`${n}-checked`]:{marginInlineStart:-e.marginXXS/2,marginInlineEnd:e.marginXXS/2}}}}}}},Qfe=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:(e.switchPinSize-e.fontSize)/2,color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},epe=e=>{const{componentCls:t}=e,n=`${t}-handle`;return{[t]:{[n]:{position:"absolute",top:e.switchPadding,insetInlineStart:e.switchPadding,width:e.switchPinSize,height:e.switchPinSize,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:e.colorWhite,borderRadius:e.switchPinSize/2,boxShadow:e.switchHandleShadow,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${n}`]:{insetInlineStart:`calc(100% - ${e.switchPinSize+e.switchPadding}px)`},[`&:not(${t}-disabled):active`]:{[`${n}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${n}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},tpe=e=>{const{componentCls:t}=e,n=`${t}-inner`;return{[t]:{[n]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:e.switchInnerMarginMax,paddingInlineEnd:e.switchInnerMarginMin,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${n}-checked, ${n}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none"},[`${n}-checked`]:{marginInlineStart:`calc(-100% + ${e.switchPinSize+e.switchPadding*2}px - ${e.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(100% - ${e.switchPinSize+e.switchPadding*2}px + ${e.switchInnerMarginMax*2}px)`},[`${n}-unchecked`]:{marginTop:-e.switchHeight,marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${n}`]:{paddingInlineStart:e.switchInnerMarginMin,paddingInlineEnd:e.switchInnerMarginMax,[`${n}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${n}-unchecked`]:{marginInlineStart:`calc(100% - ${e.switchPinSize+e.switchPadding*2}px + ${e.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(-100% + ${e.switchPinSize+e.switchPadding*2}px - ${e.switchInnerMarginMax*2}px)`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${n}`]:{[`${n}-unchecked`]:{marginInlineStart:e.switchPadding*2,marginInlineEnd:-e.switchPadding*2}},[`&${t}-checked ${n}`]:{[`${n}-checked`]:{marginInlineStart:-e.switchPadding*2,marginInlineEnd:e.switchPadding*2}}}}}},npe=e=>{const{componentCls:t}=e;return{[t]:y(y(y(y({},qe(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:e.switchMinWidth,height:e.switchHeight,lineHeight:`${e.switchHeight}px`,verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),Ji(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}},ope=Ue("Switch",e=>{const t=e.fontSize*e.lineHeight,n=e.controlHeight/2,o=2,r=t-o*2,i=n-o*2,a=Be(e,{switchMinWidth:r*2+o*4,switchHeight:t,switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchInnerMarginMin:r/2,switchInnerMarginMax:r+o+o*2,switchPadding:o,switchPinSize:r,switchBg:e.colorBgContainer,switchMinWidthSM:i*2+o*2,switchHeightSM:n,switchInnerMarginMinSM:i/2,switchInnerMarginMaxSM:i+o+o*2,switchPinSizeSM:i,switchHandleShadow:`0 2px 4px 0 ${new St("#00230b").setAlpha(.2).toRgbString()}`,switchLoadingIconSize:e.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[npe(a),tpe(a),epe(a),Qfe(a),Zfe(a)]}),rpe=Jn("small","default"),ipe=()=>({id:String,prefixCls:String,size:K.oneOf(rpe),disabled:{type:Boolean,default:void 0},checkedChildren:K.any,unCheckedChildren:K.any,tabindex:K.oneOfType([K.string,K.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:K.oneOfType([K.string,K.number,K.looseBool]),checkedValue:K.oneOfType([K.string,K.number,K.looseBool]).def(!0),unCheckedValue:K.oneOfType([K.string,K.number,K.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}),ape=le({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:ipe(),slots:Object,setup(e,t){let{attrs:n,slots:o,expose:r,emit:i}=t;const a=bn(),l=ko(),s=E(()=>{var I;return(I=e.disabled)!==null&&I!==void 0?I:l.value});cf(()=>{});const u=ae(e.checked!==void 0?e.checked:n.defaultChecked),c=E(()=>u.value===e.checkedValue);be(()=>e.checked,()=>{u.value=e.checked});const{prefixCls:d,direction:f,size:p}=Te("switch",e),[v,h]=ope(d),m=ae(),b=()=>{var I;(I=m.value)===null||I===void 0||I.focus()};r({focus:b,blur:()=>{var I;(I=m.value)===null||I===void 0||I.blur()}}),Ke(()=>{ot(()=>{e.autofocus&&!s.value&&m.value.focus()})});const C=(I,_)=>{s.value||(i("update:checked",I),i("change",I,_),a.onFieldChange())},$=I=>{i("blur",I)},x=I=>{b();const _=c.value?e.unCheckedValue:e.checkedValue;C(_,I),i("click",_,I)},P=I=>{I.keyCode===Ie.LEFT?C(e.unCheckedValue,I):I.keyCode===Ie.RIGHT&&C(e.checkedValue,I),i("keydown",I)},w=I=>{var _;(_=m.value)===null||_===void 0||_.blur(),i("mouseup",I)},O=E(()=>({[`${d.value}-small`]:p.value==="small",[`${d.value}-loading`]:e.loading,[`${d.value}-checked`]:c.value,[`${d.value}-disabled`]:s.value,[d.value]:!0,[`${d.value}-rtl`]:f.value==="rtl",[h.value]:!0}));return()=>{var I;return v(g(zC,null,{default:()=>[g("button",k(k(k({},it(e,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),n),{},{id:(I=e.id)!==null&&I!==void 0?I:a.id.value,onKeydown:P,onClick:x,onBlur:$,onMouseup:w,type:"button",role:"switch","aria-checked":u.value,disabled:s.value||e.loading,class:[n.class,O.value],ref:m}),[g("div",{class:`${d.value}-handle`},[e.loading?g(Po,{class:`${d.value}-loading-icon`},null):null]),g("span",{class:`${d.value}-inner`},[g("span",{class:`${d.value}-inner-checked`},[mn(o,e,"checkedChildren")]),g("span",{class:`${d.value}-inner-unchecked`},[mn(o,e,"unCheckedChildren")])])])]}))}}}),lpe=Lt(ape),nN=Symbol("TableContextProps"),spe=e=>{Xe(nN,e)},Si=()=>ze(nN,{}),cpe="RC_TABLE_KEY";function oN(e){return e==null?[]:Array.isArray(e)?e:[e]}function rN(e,t){if(!t&&typeof t!="number")return e;const n=oN(t);let o=e;for(let r=0;r{const{key:r,dataIndex:i}=o||{};let a=r||oN(i).join("-")||cpe;for(;n[a];)a=`${a}_next`;n[a]=!0,t.push(a)}),t}function upe(){const e={};function t(i,a){a&&Object.keys(a).forEach(l=>{const s=a[l];s&&typeof s=="object"?(i[l]=i[l]||{},t(i[l],s)):i[l]=s})}for(var n=arguments.length,o=new Array(n),r=0;r{t(e,i)}),e}function C1(e){return e!=null}const iN=Symbol("SlotsContextProps"),dpe=e=>{Xe(iN,e)},d$=()=>ze(iN,E(()=>({}))),aN=Symbol("ContextProps"),fpe=e=>{Xe(aN,e)},ppe=()=>ze(aN,{onResizeColumn:()=>{}}),dc="RC_TABLE_INTERNAL_COL_DEFINE",lN=Symbol("HoverContextProps"),gpe=e=>{Xe(lN,e)},hpe=()=>ze(lN,{startRow:se(-1),endRow:se(-1),onHover(){}}),x1=se(!1),vpe=()=>{Ke(()=>{x1.value=x1.value||Mx("position","sticky")})},mpe=()=>x1;var bpe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r=n}function Spe(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!ln(e)}const wm=le({name:"Cell",props:["prefixCls","record","index","renderIndex","dataIndex","customRender","component","colSpan","rowSpan","fixLeft","fixRight","firstFixLeft","lastFixLeft","firstFixRight","lastFixRight","appendNode","additionalProps","ellipsis","align","rowType","isSticky","column","cellType","transformCellText"],setup(e,t){let{slots:n}=t;const o=d$(),{onHover:r,startRow:i,endRow:a}=hpe(),l=E(()=>{var h,m,b,S;return(b=(h=e.colSpan)!==null&&h!==void 0?h:(m=e.additionalProps)===null||m===void 0?void 0:m.colSpan)!==null&&b!==void 0?b:(S=e.additionalProps)===null||S===void 0?void 0:S.colspan}),s=E(()=>{var h,m,b,S;return(b=(h=e.rowSpan)!==null&&h!==void 0?h:(m=e.additionalProps)===null||m===void 0?void 0:m.rowSpan)!==null&&b!==void 0?b:(S=e.additionalProps)===null||S===void 0?void 0:S.rowspan}),u=Vo(()=>{const{index:h}=e;return ype(h,s.value||1,i.value,a.value)}),c=mpe(),d=(h,m)=>{var b;const{record:S,index:C,additionalProps:$}=e;S&&r(C,C+m-1),(b=$==null?void 0:$.onMouseenter)===null||b===void 0||b.call($,h)},f=h=>{var m;const{record:b,additionalProps:S}=e;b&&r(-1,-1),(m=S==null?void 0:S.onMouseleave)===null||m===void 0||m.call(S,h)},p=h=>{const m=zt(h)[0];return ln(m)?m.type===ta?m.children:Array.isArray(m.children)?p(m.children):void 0:m},v=se(null);return be([u,()=>e.prefixCls,v],()=>{const h=Co(v.value);h&&(u.value?sh(h,`${e.prefixCls}-cell-row-hover`):ch(h,`${e.prefixCls}-cell-row-hover`))}),()=>{var h,m,b,S,C,$;const{prefixCls:x,record:P,index:w,renderIndex:O,dataIndex:I,customRender:_,component:T="td",fixLeft:A,fixRight:R,firstFixLeft:H,lastFixLeft:M,firstFixRight:D,lastFixRight:N,appendNode:L=(h=n.appendNode)===null||h===void 0?void 0:h.call(n),additionalProps:F={},ellipsis:B,align:j,rowType:z,isSticky:G,column:Q={},cellType:Y}=e,oe=`${x}-cell`;let Z,re;const ne=(m=n.default)===null||m===void 0?void 0:m.call(n);if(C1(ne)||Y==="header")re=ne;else{const ce=rN(P,I);if(re=ce,_){const ee=_({text:ce,value:ce,record:P,index:w,renderIndex:O,column:Q.__originColumn__});Spe(ee)?(re=ee.children,Z=ee.props):re=ee}if(!(dc in Q)&&Y==="body"&&o.value.bodyCell&&!(!((b=Q.slots)===null||b===void 0)&&b.customRender)){const ee=wv(o.value,"bodyCell",{text:ce,value:ce,record:P,index:w,column:Q.__originColumn__},()=>{const ue=re===void 0?ce:re;return[typeof ue=="object"&&sn(ue)||typeof ue!="object"?ue:null]});re=Ot(ee)}e.transformCellText&&(re=e.transformCellText({text:re,record:P,index:w,column:Q.__originColumn__}))}typeof re=="object"&&!Array.isArray(re)&&!ln(re)&&(re=null),B&&(M||D)&&(re=g("span",{class:`${oe}-content`},[re])),Array.isArray(re)&&re.length===1&&(re=re[0]);const X=Z||{},{colSpan:te,rowSpan:W,style:U,class:J}=X,de=bpe(X,["colSpan","rowSpan","style","class"]),fe=(S=te!==void 0?te:l.value)!==null&&S!==void 0?S:1,pe=(C=W!==void 0?W:s.value)!==null&&C!==void 0?C:1;if(fe===0||pe===0)return null;const ve={},he=typeof A=="number"&&c.value,V=typeof R=="number"&&c.value;he&&(ve.position="sticky",ve.left=`${A}px`),V&&(ve.position="sticky",ve.right=`${R}px`);const q={};j&&(q.textAlign=j);let ie;const me=B===!0?{showTitle:!0}:B;me&&(me.showTitle||z==="header")&&(typeof re=="string"||typeof re=="number"?ie=re.toString():ln(re)&&(ie=p([re])));const Se=y(y(y({title:ie},de),F),{colSpan:fe!==1?fe:null,rowSpan:pe!==1?pe:null,class:ge(oe,{[`${oe}-fix-left`]:he&&c.value,[`${oe}-fix-left-first`]:H&&c.value,[`${oe}-fix-left-last`]:M&&c.value,[`${oe}-fix-right`]:V&&c.value,[`${oe}-fix-right-first`]:D&&c.value,[`${oe}-fix-right-last`]:N&&c.value,[`${oe}-ellipsis`]:B,[`${oe}-with-append`]:L,[`${oe}-fix-sticky`]:(he||V)&&G&&c.value},F.class,J),onMouseenter:ce=>{d(ce,pe)},onMouseleave:f,style:[F.style,q,ve,U]});return g(T,k(k({},Se),{},{ref:v}),{default:()=>[L,re,($=n.dragHandle)===null||$===void 0?void 0:$.call(n)]})}}});function f$(e,t,n,o,r){const i=n[e]||{},a=n[t]||{};let l,s;i.fixed==="left"?l=o.left[e]:a.fixed==="right"&&(s=o.right[t]);let u=!1,c=!1,d=!1,f=!1;const p=n[t+1],v=n[e-1];return r==="rtl"?l!==void 0?f=!(v&&v.fixed==="left"):s!==void 0&&(d=!(p&&p.fixed==="right")):l!==void 0?u=!(p&&p.fixed==="left"):s!==void 0&&(c=!(v&&v.fixed==="right")),{fixLeft:l,fixRight:s,lastFixLeft:u,firstFixRight:c,lastFixRight:d,firstFixLeft:f,isSticky:o.isSticky}}const XT={mouse:{move:"mousemove",stop:"mouseup"},touch:{move:"touchmove",stop:"touchend"}},YT=50,Cpe=le({compatConfig:{MODE:3},name:"DragHandle",props:{prefixCls:String,width:{type:Number,required:!0},minWidth:{type:Number,default:YT},maxWidth:{type:Number,default:1/0},column:{type:Object,default:void 0}},setup(e){let t=0,n={remove:()=>{}},o={remove:()=>{}};const r=()=>{n.remove(),o.remove()};Zn(()=>{r()}),Ve(()=>{Mt(!isNaN(e.width),"Table","width must be a number when use resizable")});const{onResizeColumn:i}=ppe(),a=E(()=>typeof e.minWidth=="number"&&!isNaN(e.minWidth)?e.minWidth:YT),l=E(()=>typeof e.maxWidth=="number"&&!isNaN(e.maxWidth)?e.maxWidth:1/0),s=Jt();let u=0;const c=se(!1);let d;const f=C=>{let $=0;C.touches?C.touches.length?$=C.touches[0].pageX:$=C.changedTouches[0].pageX:$=C.pageX;const x=t-$;let P=Math.max(u-x,a.value);P=Math.min(P,l.value),Ze.cancel(d),d=Ze(()=>{i(P,e.column.__originColumn__)})},p=C=>{f(C)},v=C=>{c.value=!1,f(C),r()},h=(C,$)=>{c.value=!0,r(),u=s.vnode.el.parentNode.getBoundingClientRect().width,!(C instanceof MouseEvent&&C.which!==1)&&(C.stopPropagation&&C.stopPropagation(),t=C.touches?C.touches[0].pageX:C.pageX,n=Ht(document.documentElement,$.move,p),o=Ht(document.documentElement,$.stop,v))},m=C=>{C.stopPropagation(),C.preventDefault(),h(C,XT.mouse)},b=C=>{C.stopPropagation(),C.preventDefault(),h(C,XT.touch)},S=C=>{C.stopPropagation(),C.preventDefault()};return()=>{const{prefixCls:C}=e,$={[hn?"onTouchstartPassive":"onTouchstart"]:x=>b(x)};return g("div",k(k({class:`${C}-resize-handle ${c.value?"dragging":""}`,onMousedown:m},$),{},{onClick:S}),[g("div",{class:`${C}-resize-handle-line`},null)])}}}),xpe=le({name:"HeaderRow",props:["cells","stickyOffsets","flattenColumns","rowComponent","cellComponent","index","customHeaderRow"],setup(e){const t=Si();return()=>{const{prefixCls:n,direction:o}=t,{cells:r,stickyOffsets:i,flattenColumns:a,rowComponent:l,cellComponent:s,customHeaderRow:u,index:c}=e;let d;u&&(d=u(r.map(p=>p.column),c));const f=$m(r.map(p=>p.column));return g(l,d,{default:()=>[r.map((p,v)=>{const{column:h}=p,m=f$(p.colStart,p.colEnd,a,i,o);let b;h&&h.customHeaderCell&&(b=p.column.customHeaderCell(h));const S=h;return g(wm,k(k(k({},p),{},{cellType:"header",ellipsis:h.ellipsis,align:h.align,component:s,prefixCls:n,key:f[v]},m),{},{additionalProps:b,rowType:"header",column:h}),{default:()=>h.title,dragHandle:()=>S.resizable?g(Cpe,{prefixCls:n,width:S.width,minWidth:S.minWidth,maxWidth:S.maxWidth,column:S},null):null})})]})}}});function $pe(e){const t=[];function n(r,i){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[a]=t[a]||[];let l=i;return r.filter(Boolean).map(u=>{const c={key:u.key,class:ge(u.className,u.class),column:u,colStart:l};let d=1;const f=u.children;return f&&f.length>0&&(d=n(f,l,a+1).reduce((p,v)=>p+v,0),c.hasSubColumns=!0),"colSpan"in u&&({colSpan:d}=u),"rowSpan"in u&&(c.rowSpan=u.rowSpan),c.colSpan=d,c.colEnd=c.colStart+d-1,t[a].push(c),l+=d,d})}n(e,0);const o=t.length;for(let r=0;r{!("rowSpan"in i)&&!i.hasSubColumns&&(i.rowSpan=o-r)});return t}const qT=le({name:"TableHeader",inheritAttrs:!1,props:["columns","flattenColumns","stickyOffsets","customHeaderRow"],setup(e){const t=Si(),n=E(()=>$pe(e.columns));return()=>{const{prefixCls:o,getComponent:r}=t,{stickyOffsets:i,flattenColumns:a,customHeaderRow:l}=e,s=r(["header","wrapper"],"thead"),u=r(["header","row"],"tr"),c=r(["header","cell"],"th");return g(s,{class:`${o}-thead`},{default:()=>[n.value.map((d,f)=>g(xpe,{key:f,flattenColumns:a,cells:d,stickyOffsets:i,rowComponent:u,cellComponent:c,customHeaderRow:l,index:f},null))]})}}}),sN=Symbol("ExpandedRowProps"),wpe=e=>{Xe(sN,e)},Ppe=()=>ze(sN,{}),cN=le({name:"ExpandedRow",inheritAttrs:!1,props:["prefixCls","component","cellComponent","expanded","colSpan","isEmpty"],setup(e,t){let{slots:n,attrs:o}=t;const r=Si(),i=Ppe(),{fixHeader:a,fixColumn:l,componentWidth:s,horizonScroll:u}=i;return()=>{const{prefixCls:c,component:d,cellComponent:f,expanded:p,colSpan:v,isEmpty:h}=e;return g(d,{class:o.class,style:{display:p?null:"none"}},{default:()=>[g(wm,{component:f,prefixCls:c,colSpan:v},{default:()=>{var m;let b=(m=n.default)===null||m===void 0?void 0:m.call(n);return(h?u.value:l.value)&&(b=g("div",{style:{width:`${s.value-(a.value?r.scrollbarSize:0)}px`,position:"sticky",left:0,overflow:"hidden"},class:`${c}-expanded-row-fixed`},[b])),b}})]})}}}),Ope=le({name:"MeasureCell",props:["columnKey"],setup(e,t){let{emit:n}=t;const o=ae();return Ke(()=>{o.value&&n("columnResize",e.columnKey,o.value.offsetWidth)}),()=>g(br,{onResize:r=>{let{offsetWidth:i}=r;n("columnResize",e.columnKey,i)}},{default:()=>[g("td",{ref:o,style:{padding:0,border:0,height:0}},[g("div",{style:{height:0,overflow:"hidden"}},[zn(" ")])])]})}}),uN=Symbol("BodyContextProps"),Ipe=e=>{Xe(uN,e)},dN=()=>ze(uN,{}),Tpe=le({name:"BodyRow",inheritAttrs:!1,props:["record","index","renderIndex","recordKey","expandedKeys","rowComponent","cellComponent","customRow","rowExpandable","indent","rowKey","getRowKey","childrenColumnName"],setup(e,t){let{attrs:n}=t;const o=Si(),r=dN(),i=se(!1),a=E(()=>e.expandedKeys&&e.expandedKeys.has(e.recordKey));Ve(()=>{a.value&&(i.value=!0)});const l=E(()=>r.expandableType==="row"&&(!e.rowExpandable||e.rowExpandable(e.record))),s=E(()=>r.expandableType==="nest"),u=E(()=>e.childrenColumnName&&e.record&&e.record[e.childrenColumnName]),c=E(()=>l.value||s.value),d=(m,b)=>{r.onTriggerExpand(m,b)},f=E(()=>{var m;return((m=e.customRow)===null||m===void 0?void 0:m.call(e,e.record,e.index))||{}}),p=function(m){var b,S;r.expandRowByClick&&c.value&&d(e.record,m);for(var C=arguments.length,$=new Array(C>1?C-1:0),x=1;x{const{record:m,index:b,indent:S}=e,{rowClassName:C}=r;return typeof C=="string"?C:typeof C=="function"?C(m,b,S):""}),h=E(()=>$m(r.flattenColumns));return()=>{const{class:m,style:b}=n,{record:S,index:C,rowKey:$,indent:x=0,rowComponent:P,cellComponent:w}=e,{prefixCls:O,fixedInfoList:I,transformCellText:_}=o,{flattenColumns:T,expandedRowClassName:A,indentSize:R,expandIcon:H,expandedRowRender:M,expandIconColumnIndex:D}=r,N=g(P,k(k({},f.value),{},{"data-row-key":$,class:ge(m,`${O}-row`,`${O}-row-level-${x}`,v.value,f.value.class),style:[b,f.value.style],onClick:p}),{default:()=>[T.map((F,B)=>{const{customRender:j,dataIndex:z,className:G}=F,Q=h[B],Y=I[B];let oe;F.customCell&&(oe=F.customCell(S,C,F));const Z=B===(D||0)&&s.value?g(Le,null,[g("span",{style:{paddingLeft:`${R*x}px`},class:`${O}-row-indent indent-level-${x}`},null),H({prefixCls:O,expanded:a.value,expandable:u.value,record:S,onExpand:d})]):null;return g(wm,k(k({cellType:"body",class:G,ellipsis:F.ellipsis,align:F.align,component:w,prefixCls:O,key:Q,record:S,index:C,renderIndex:e.renderIndex,dataIndex:z,customRender:j},Y),{},{additionalProps:oe,column:F,transformCellText:_,appendNode:Z}),null)})]});let L;if(l.value&&(i.value||a.value)){const F=M({record:S,index:C,indent:x+1,expanded:a.value}),B=A&&A(S,C,x);L=g(cN,{expanded:a.value,class:ge(`${O}-expanded-row`,`${O}-expanded-row-level-${x+1}`,B),prefixCls:O,component:P,cellComponent:w,colSpan:T.length,isEmpty:!1},{default:()=>[F]})}return g(Le,null,[N,L])}}});function fN(e,t,n,o,r,i){const a=[];a.push({record:e,indent:t,index:i});const l=r(e),s=o==null?void 0:o.has(l);if(e&&Array.isArray(e[n])&&s)for(let u=0;u{const i=t.value,a=n.value,l=e.value;if(a!=null&&a.size){const s=[];for(let u=0;u<(l==null?void 0:l.length);u+=1){const c=l[u];s.push(...fN(c,0,i,a,o.value,u))}return s}return l==null?void 0:l.map((s,u)=>({record:s,indent:0,index:u}))})}const pN=Symbol("ResizeContextProps"),_pe=e=>{Xe(pN,e)},Mpe=()=>ze(pN,{onColumnResize:()=>{}}),Ape=le({name:"TableBody",props:["data","getRowKey","measureColumnWidth","expandedKeys","customRow","rowExpandable","childrenColumnName"],setup(e,t){let{slots:n}=t;const o=Mpe(),r=Si(),i=dN(),a=Epe(We(e,"data"),We(e,"childrenColumnName"),We(e,"expandedKeys"),We(e,"getRowKey")),l=se(-1),s=se(-1);let u;return gpe({startRow:l,endRow:s,onHover:(c,d)=>{clearTimeout(u),u=setTimeout(()=>{l.value=c,s.value=d},100)}}),()=>{var c;const{data:d,getRowKey:f,measureColumnWidth:p,expandedKeys:v,customRow:h,rowExpandable:m,childrenColumnName:b}=e,{onColumnResize:S}=o,{prefixCls:C,getComponent:$}=r,{flattenColumns:x}=i,P=$(["body","wrapper"],"tbody"),w=$(["body","row"],"tr"),O=$(["body","cell"],"td");let I;d.length?I=a.value.map((T,A)=>{const{record:R,indent:H,index:M}=T,D=f(R,A);return g(Tpe,{key:D,rowKey:D,record:R,recordKey:D,index:A,renderIndex:M,rowComponent:w,cellComponent:O,expandedKeys:v,customRow:h,getRowKey:f,rowExpandable:m,childrenColumnName:b,indent:H},null)}):I=g(cN,{expanded:!0,class:`${C}-placeholder`,prefixCls:C,component:w,cellComponent:O,colSpan:x.length,isEmpty:!0},{default:()=>[(c=n.emptyNode)===null||c===void 0?void 0:c.call(n)]});const _=$m(x);return g(P,{class:`${C}-tbody`},{default:()=>[p&&g("tr",{"aria-hidden":"true",class:`${C}-measure-row`,style:{height:0,fontSize:0}},[_.map(T=>g(Ope,{key:T,columnKey:T,onColumnResize:S},null))]),I]})}}}),xa={};var Rpe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{fixed:o}=n,r=o===!0?"left":o,i=n.children;return i&&i.length>0?[...t,...$1(i).map(a=>y({fixed:r},a))]:[...t,y(y({},n),{fixed:r})]},[])}function Dpe(e){return e.map(t=>{const{fixed:n}=t,o=Rpe(t,["fixed"]);let r=n;return n==="left"?r="right":n==="right"&&(r="left"),y({fixed:r},o)})}function Npe(e,t){let{prefixCls:n,columns:o,expandable:r,expandedKeys:i,getRowKey:a,onTriggerExpand:l,expandIcon:s,rowExpandable:u,expandIconColumnIndex:c,direction:d,expandRowByClick:f,expandColumnWidth:p,expandFixed:v}=e;const h=d$(),m=E(()=>{if(r.value){let C=o.value.slice();if(!C.includes(xa)){const R=c.value||0;R>=0&&C.splice(R,0,xa)}const $=C.indexOf(xa);C=C.filter((R,H)=>R!==xa||H===$);const x=o.value[$];let P;(v.value==="left"||v.value)&&!c.value?P="left":(v.value==="right"||v.value)&&c.value===o.value.length?P="right":P=x?x.fixed:null;const w=i.value,O=u.value,I=s.value,_=n.value,T=f.value,A={[dc]:{class:`${n.value}-expand-icon-col`,columnType:"EXPAND_COLUMN"},title:wv(h.value,"expandColumnTitle",{},()=>[""]),fixed:P,class:`${n.value}-row-expand-icon-cell`,width:p.value,customRender:R=>{let{record:H,index:M}=R;const D=a.value(H,M),N=w.has(D),L=O?O(H):!0,F=I({prefixCls:_,expanded:N,expandable:L,record:H,onExpand:l});return T?g("span",{onClick:B=>B.stopPropagation()},[F]):F}};return C.map(R=>R===xa?A:R)}return o.value.filter(C=>C!==xa)}),b=E(()=>{let C=m.value;return t.value&&(C=t.value(C)),C.length||(C=[{customRender:()=>null}]),C}),S=E(()=>d.value==="rtl"?Dpe($1(b.value)):$1(b.value));return[b,S]}function gN(e){const t=se(e);let n;const o=se([]);function r(i){o.value.push(i),Ze.cancel(n),n=Ze(()=>{const a=o.value;o.value=[],a.forEach(l=>{t.value=l(t.value)})})}return tt(()=>{Ze.cancel(n)}),[t,r]}function kpe(e){const t=ae(null),n=ae();function o(){clearTimeout(n.value)}function r(a){t.value=a,o(),n.value=setTimeout(()=>{t.value=null,n.value=void 0},100)}function i(){return t.value}return tt(()=>{o()}),[r,i]}function Lpe(e,t,n){return E(()=>{const r=[],i=[];let a=0,l=0;const s=e.value,u=t.value,c=n.value;for(let d=0;d=0;l-=1){const s=t[l],u=n&&n[l],c=u&&u[dc];if(s||c||a){const d=c||{},{columnType:f}=d,p=Fpe(d,["columnType"]);r.unshift(g("col",k({key:l,style:{width:typeof s=="number"?`${s}px`:s}},p),null)),a=!0}}return g("colgroup",null,[r])}function w1(e,t){let{slots:n}=t;var o;return g("div",null,[(o=n.default)===null||o===void 0?void 0:o.call(n)])}w1.displayName="Panel";let Bpe=0;const Hpe=le({name:"TableSummary",props:["fixed"],setup(e,t){let{slots:n}=t;const o=Si(),r=`table-summary-uni-key-${++Bpe}`,i=E(()=>e.fixed===""||e.fixed);return Ve(()=>{o.summaryCollect(r,i.value)}),tt(()=>{o.summaryCollect(r,!1)}),()=>{var a;return(a=n.default)===null||a===void 0?void 0:a.call(n)}}}),zpe=le({compatConfig:{MODE:3},name:"ATableSummaryRow",setup(e,t){let{slots:n}=t;return()=>{var o;return g("tr",null,[(o=n.default)===null||o===void 0?void 0:o.call(n)])}}}),vN=Symbol("SummaryContextProps"),jpe=e=>{Xe(vN,e)},Wpe=()=>ze(vN,{}),Vpe=le({name:"ATableSummaryCell",props:["index","colSpan","rowSpan","align"],setup(e,t){let{attrs:n,slots:o}=t;const r=Si(),i=Wpe();return()=>{const{index:a,colSpan:l=1,rowSpan:s,align:u}=e,{prefixCls:c,direction:d}=r,{scrollColumnIndex:f,stickyOffsets:p,flattenColumns:v}=i,m=a+l-1+1===f?l+1:l,b=f$(a,a+m-1,v,p,d);return g(wm,k({class:n.class,index:a,component:"td",prefixCls:c,record:null,dataIndex:null,align:u,colSpan:m,rowSpan:s,customRender:()=>{var S;return(S=o.default)===null||S===void 0?void 0:S.call(o)}},b),null)}}}),bp=le({name:"TableFooter",inheritAttrs:!1,props:["stickyOffsets","flattenColumns"],setup(e,t){let{slots:n}=t;const o=Si();return jpe(rt({stickyOffsets:We(e,"stickyOffsets"),flattenColumns:We(e,"flattenColumns"),scrollColumnIndex:E(()=>{const r=e.flattenColumns.length-1,i=e.flattenColumns[r];return i!=null&&i.scrollbar?r:null})})),()=>{var r;const{prefixCls:i}=o;return g("tfoot",{class:`${i}-summary`},[(r=n.default)===null||r===void 0?void 0:r.call(n)])}}}),Kpe=Hpe;function Upe(e){let{prefixCls:t,record:n,onExpand:o,expanded:r,expandable:i}=e;const a=`${t}-row-expand-icon`;if(!i)return g("span",{class:[a,`${t}-row-spaced`]},null);const l=s=>{o(n,s),s.stopPropagation()};return g("span",{class:{[a]:!0,[`${t}-row-expanded`]:r,[`${t}-row-collapsed`]:!r},onClick:l},null)}function Gpe(e,t,n){const o=[];function r(i){(i||[]).forEach((a,l)=>{o.push(t(a,l)),r(a[n])})}return r(e),o}const Xpe=le({name:"StickyScrollBar",inheritAttrs:!1,props:["offsetScroll","container","scrollBodyRef","scrollBodySizeInfo"],emits:["scroll"],setup(e,t){let{emit:n,expose:o}=t;const r=Si(),i=se(0),a=se(0),l=se(0);Ve(()=>{i.value=e.scrollBodySizeInfo.scrollWidth||0,a.value=e.scrollBodySizeInfo.clientWidth||0,l.value=i.value&&a.value*(a.value/i.value)},{flush:"post"});const s=se(),[u,c]=gN({scrollLeft:0,isHiddenScrollBar:!0}),d=ae({delta:0,x:0}),f=se(!1),p=()=>{f.value=!1},v=w=>{d.value={delta:w.pageX-u.value.scrollLeft,x:0},f.value=!0,w.preventDefault()},h=w=>{const{buttons:O}=w||(window==null?void 0:window.event);if(!f.value||O===0){f.value&&(f.value=!1);return}let I=d.value.x+w.pageX-d.value.x-d.value.delta;I<=0&&(I=0),I+l.value>=a.value&&(I=a.value-l.value),n("scroll",{scrollLeft:I/a.value*(i.value+2)}),d.value.x=w.pageX},m=()=>{if(!e.scrollBodyRef.value)return;const w=Kg(e.scrollBodyRef.value).top,O=w+e.scrollBodyRef.value.offsetHeight,I=e.container===window?document.documentElement.scrollTop+window.innerHeight:Kg(e.container).top+e.container.clientHeight;O-Vg()<=I||w>=I-e.offsetScroll?c(_=>y(y({},_),{isHiddenScrollBar:!0})):c(_=>y(y({},_),{isHiddenScrollBar:!1}))};o({setScrollLeft:w=>{c(O=>y(y({},O),{scrollLeft:w/i.value*a.value||0}))}});let S=null,C=null,$=null,x=null;Ke(()=>{S=Ht(document.body,"mouseup",p,!1),C=Ht(document.body,"mousemove",h,!1),$=Ht(window,"resize",m,!1)}),av(()=>{ot(()=>{m()})}),Ke(()=>{setTimeout(()=>{be([l,f],()=>{m()},{immediate:!0,flush:"post"})})}),be(()=>e.container,()=>{x==null||x.remove(),x=Ht(e.container,"scroll",m,!1)},{immediate:!0,flush:"post"}),tt(()=>{S==null||S.remove(),C==null||C.remove(),x==null||x.remove(),$==null||$.remove()}),be(()=>y({},u.value),(w,O)=>{w.isHiddenScrollBar!==(O==null?void 0:O.isHiddenScrollBar)&&!w.isHiddenScrollBar&&c(I=>{const _=e.scrollBodyRef.value;return _?y(y({},I),{scrollLeft:_.scrollLeft/_.scrollWidth*_.clientWidth}):I})},{immediate:!0});const P=Vg();return()=>{if(i.value<=a.value||!l.value||u.value.isHiddenScrollBar)return null;const{prefixCls:w}=r;return g("div",{style:{height:`${P}px`,width:`${a.value}px`,bottom:`${e.offsetScroll}px`},class:`${w}-sticky-scroll`},[g("div",{onMousedown:v,ref:s,class:ge(`${w}-sticky-scroll-bar`,{[`${w}-sticky-scroll-bar-active`]:f.value}),style:{width:`${l.value}px`,transform:`translate3d(${u.value.scrollLeft}px, 0, 0)`}},null)])}}}),JT=so()?window:null;function Ype(e,t){return E(()=>{const{offsetHeader:n=0,offsetSummary:o=0,offsetScroll:r=0,getContainer:i=()=>JT}=typeof e.value=="object"?e.value:{},a=i()||JT,l=!!e.value;return{isSticky:l,stickyClassName:l?`${t.value}-sticky-holder`:"",offsetHeader:n,offsetSummary:o,offsetScroll:r,container:a}})}function qpe(e,t){return E(()=>{const n=[],o=e.value,r=t.value;for(let i=0;ii.isSticky&&!e.fixHeader?0:i.scrollbarSize),l=ae(),s=h=>{const{currentTarget:m,deltaX:b}=h;b&&(r("scroll",{currentTarget:m,scrollLeft:m.scrollLeft+b}),h.preventDefault())},u=ae();Ke(()=>{ot(()=>{u.value=Ht(l.value,"wheel",s)})}),tt(()=>{var h;(h=u.value)===null||h===void 0||h.remove()});const c=E(()=>e.flattenColumns.every(h=>h.width&&h.width!==0&&h.width!=="0px")),d=ae([]),f=ae([]);Ve(()=>{const h=e.flattenColumns[e.flattenColumns.length-1],m={fixed:h?h.fixed:null,scrollbar:!0,customHeaderCell:()=>({class:`${i.prefixCls}-cell-scrollbar`})};d.value=a.value?[...e.columns,m]:e.columns,f.value=a.value?[...e.flattenColumns,m]:e.flattenColumns});const p=E(()=>{const{stickyOffsets:h,direction:m}=e,{right:b,left:S}=h;return y(y({},h),{left:m==="rtl"?[...S.map(C=>C+a.value),0]:S,right:m==="rtl"?b:[...b.map(C=>C+a.value),0],isSticky:i.isSticky})}),v=qpe(We(e,"colWidths"),We(e,"columCount"));return()=>{var h;const{noData:m,columCount:b,stickyTopOffset:S,stickyBottomOffset:C,stickyClassName:$,maxContentScroll:x}=e,{isSticky:P}=i;return g("div",{style:y({overflow:"hidden"},P?{top:`${S}px`,bottom:`${C}px`}:{}),ref:l,class:ge(n.class,{[$]:!!$})},[g("table",{style:{tableLayout:"fixed",visibility:m||v.value?null:"hidden"}},[(!m||!x||c.value)&&g(hN,{colWidths:v.value?[...v.value,a.value]:[],columCount:b+1,columns:f.value},null),(h=o.default)===null||h===void 0?void 0:h.call(o,y(y({},e),{stickyOffsets:p.value,columns:d.value,flattenColumns:f.value}))])])}}});function QT(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o[r,We(e,r)])))}const Jpe=[],Zpe={},P1="rc-table-internal-hook",Qpe=le({name:"VcTable",inheritAttrs:!1,props:["prefixCls","data","columns","rowKey","tableLayout","scroll","rowClassName","title","footer","id","showHeader","components","customRow","customHeaderRow","direction","expandFixed","expandColumnWidth","expandedRowKeys","defaultExpandedRowKeys","expandedRowRender","expandRowByClick","expandIcon","onExpand","onExpandedRowsChange","onUpdate:expandedRowKeys","defaultExpandAllRows","indentSize","expandIconColumnIndex","expandedRowClassName","childrenColumnName","rowExpandable","sticky","transformColumns","internalHooks","internalRefs","canExpandable","onUpdateInternalRefs","transformCellText"],emits:["expand","expandedRowsChange","updateInternalRefs","update:expandedRowKeys"],setup(e,t){let{attrs:n,slots:o,emit:r}=t;const i=E(()=>e.data||Jpe),a=E(()=>!!i.value.length),l=E(()=>upe(e.components,{})),s=(ee,ue)=>rN(l.value,ee)||ue,u=E(()=>{const ee=e.rowKey;return typeof ee=="function"?ee:ue=>ue&&ue[ee]}),c=E(()=>e.expandIcon||Upe),d=E(()=>e.childrenColumnName||"children"),f=E(()=>e.expandedRowRender?"row":e.canExpandable||i.value.some(ee=>ee&&typeof ee=="object"&&ee[d.value])?"nest":!1),p=se([]);Ve(()=>{e.defaultExpandedRowKeys&&(p.value=e.defaultExpandedRowKeys),e.defaultExpandAllRows&&(p.value=Gpe(i.value,u.value,d.value))})();const h=E(()=>new Set(e.expandedRowKeys||p.value||[])),m=ee=>{const ue=u.value(ee,i.value.indexOf(ee));let xe;const Pe=h.value.has(ue);Pe?(h.value.delete(ue),xe=[...h.value]):xe=[...h.value,ue],p.value=xe,r("expand",!Pe,ee),r("update:expandedRowKeys",xe),r("expandedRowsChange",xe)},b=ae(0),[S,C]=Npe(y(y({},Fr(e)),{expandable:E(()=>!!e.expandedRowRender),expandedKeys:h,getRowKey:u,onTriggerExpand:m,expandIcon:c}),E(()=>e.internalHooks===P1?e.transformColumns:null)),$=E(()=>({columns:S.value,flattenColumns:C.value})),x=ae(),P=ae(),w=ae(),O=ae({scrollWidth:0,clientWidth:0}),I=ae(),[_,T]=$t(!1),[A,R]=$t(!1),[H,M]=gN(new Map),D=E(()=>$m(C.value)),N=E(()=>D.value.map(ee=>H.value.get(ee))),L=E(()=>C.value.length),F=Lpe(N,L,We(e,"direction")),B=E(()=>e.scroll&&C1(e.scroll.y)),j=E(()=>e.scroll&&C1(e.scroll.x)||!!e.expandFixed),z=E(()=>j.value&&C.value.some(ee=>{let{fixed:ue}=ee;return ue})),G=ae(),Q=Ype(We(e,"sticky"),We(e,"prefixCls")),Y=rt({}),oe=E(()=>{const ee=Object.values(Y)[0];return(B.value||Q.value.isSticky)&&ee}),Z=(ee,ue)=>{ue?Y[ee]=ue:delete Y[ee]},re=ae({}),ne=ae({}),X=ae({});Ve(()=>{B.value&&(ne.value={overflowY:"scroll",maxHeight:yl(e.scroll.y)}),j.value&&(re.value={overflowX:"auto"},B.value||(ne.value={overflowY:"hidden"}),X.value={width:e.scroll.x===!0?"auto":yl(e.scroll.x),minWidth:"100%"})});const te=(ee,ue)=>{Pv(x.value)&&M(xe=>{if(xe.get(ee)!==ue){const Pe=new Map(xe);return Pe.set(ee,ue),Pe}return xe})},[W,U]=kpe();function J(ee,ue){if(!ue)return;if(typeof ue=="function"){ue(ee);return}const xe=ue.$el||ue;xe.scrollLeft!==ee&&(xe.scrollLeft=ee)}const de=ee=>{let{currentTarget:ue,scrollLeft:xe}=ee;var Pe;const _e=e.direction==="rtl",Ce=typeof xe=="number"?xe:ue.scrollLeft,we=ue||Zpe;if((!U()||U()===we)&&(W(we),J(Ce,P.value),J(Ce,w.value),J(Ce,I.value),J(Ce,(Pe=G.value)===null||Pe===void 0?void 0:Pe.setScrollLeft)),ue){const{scrollWidth:Oe,clientWidth:Me}=ue;_e?(T(-Ce0)):(T(Ce>0),R(Ce{j.value&&w.value?de({currentTarget:w.value}):(T(!1),R(!1))};let pe;const ve=ee=>{ee!==b.value&&(fe(),b.value=x.value?x.value.offsetWidth:ee)},he=ee=>{let{width:ue}=ee;if(clearTimeout(pe),b.value===0){ve(ue);return}pe=setTimeout(()=>{ve(ue)},100)};be([j,()=>e.data,()=>e.columns],()=>{j.value&&fe()},{flush:"post"});const[V,q]=$t(0);vpe(),Ke(()=>{ot(()=>{var ee,ue;fe(),q(yK(w.value).width),O.value={scrollWidth:((ee=w.value)===null||ee===void 0?void 0:ee.scrollWidth)||0,clientWidth:((ue=w.value)===null||ue===void 0?void 0:ue.clientWidth)||0}})}),uo(()=>{ot(()=>{var ee,ue;const xe=((ee=w.value)===null||ee===void 0?void 0:ee.scrollWidth)||0,Pe=((ue=w.value)===null||ue===void 0?void 0:ue.clientWidth)||0;(O.value.scrollWidth!==xe||O.value.clientWidth!==Pe)&&(O.value={scrollWidth:xe,clientWidth:Pe})})}),Ve(()=>{e.internalHooks===P1&&e.internalRefs&&e.onUpdateInternalRefs({body:w.value?w.value.$el||w.value:null})},{flush:"post"});const ie=E(()=>e.tableLayout?e.tableLayout:z.value?e.scroll.x==="max-content"?"auto":"fixed":B.value||Q.value.isSticky||C.value.some(ee=>{let{ellipsis:ue}=ee;return ue})?"fixed":"auto"),me=()=>{var ee;return a.value?null:((ee=o.emptyText)===null||ee===void 0?void 0:ee.call(o))||"No Data"};spe(rt(y(y({},Fr(QT(e,"prefixCls","direction","transformCellText"))),{getComponent:s,scrollbarSize:V,fixedInfoList:E(()=>C.value.map((ee,ue)=>f$(ue,ue,C.value,F.value,e.direction))),isSticky:E(()=>Q.value.isSticky),summaryCollect:Z}))),Ipe(rt(y(y({},Fr(QT(e,"rowClassName","expandedRowClassName","expandRowByClick","expandedRowRender","expandIconColumnIndex","indentSize"))),{columns:S,flattenColumns:C,tableLayout:ie,expandIcon:c,expandableType:f,onTriggerExpand:m}))),_pe({onColumnResize:te}),wpe({componentWidth:b,fixHeader:B,fixColumn:z,horizonScroll:j});const Se=()=>g(Ape,{data:i.value,measureColumnWidth:B.value||j.value||Q.value.isSticky,expandedKeys:h.value,rowExpandable:e.rowExpandable,getRowKey:u.value,customRow:e.customRow,childrenColumnName:d.value},{emptyNode:me}),ce=()=>g(hN,{colWidths:C.value.map(ee=>{let{width:ue}=ee;return ue}),columns:C.value},null);return()=>{var ee;const{prefixCls:ue,scroll:xe,tableLayout:Pe,direction:_e,title:Ce=o.title,footer:we=o.footer,id:Oe,showHeader:Me,customHeaderRow:Re}=e,{isSticky:Ae,offsetHeader:Fe,offsetSummary:lt,offsetScroll:bt,stickyClassName:ft,container:yt}=Q.value,Ct=s(["table"],"table"),fn=s(["body"]),yn=(ee=o.summary)===null||ee===void 0?void 0:ee.call(o,{pageData:i.value});let On=()=>null;const tn={colWidths:N.value,columCount:C.value.length,stickyOffsets:F.value,customHeaderRow:Re,fixHeader:B.value,scroll:xe};if(B.value||Ae){let er=()=>null;typeof fn=="function"?(er=()=>fn(i.value,{scrollbarSize:V.value,ref:w,onScroll:de}),tn.colWidths=C.value.map((Io,ol)=>{let{width:Ee}=Io;const Je=ol===S.value.length-1?Ee-V.value:Ee;return typeof Je=="number"&&!Number.isNaN(Je)?Je:0})):er=()=>g("div",{style:y(y({},re.value),ne.value),onScroll:de,ref:w,class:ge(`${ue}-body`)},[g(Ct,{style:y(y({},X.value),{tableLayout:ie.value})},{default:()=>[ce(),Se(),!oe.value&&yn&&g(bp,{stickyOffsets:F.value,flattenColumns:C.value},{default:()=>[yn]})]})]);const Or=y(y(y({noData:!i.value.length,maxContentScroll:j.value&&xe.x==="max-content"},tn),$.value),{direction:_e,stickyClassName:ft,onScroll:de});On=()=>g(Le,null,[Me!==!1&&g(ZT,k(k({},Or),{},{stickyTopOffset:Fe,class:`${ue}-header`,ref:P}),{default:Io=>g(Le,null,[g(qT,Io,null),oe.value==="top"&&g(bp,Io,{default:()=>[yn]})])}),er(),oe.value&&oe.value!=="top"&&g(ZT,k(k({},Or),{},{stickyBottomOffset:lt,class:`${ue}-summary`,ref:I}),{default:Io=>g(bp,Io,{default:()=>[yn]})}),Ae&&w.value&&g(Xpe,{ref:G,offsetScroll:bt,scrollBodyRef:w,onScroll:de,container:yt,scrollBodySizeInfo:O.value},null)])}else On=()=>g("div",{style:y(y({},re.value),ne.value),class:ge(`${ue}-content`),onScroll:de,ref:w},[g(Ct,{style:y(y({},X.value),{tableLayout:ie.value})},{default:()=>[ce(),Me!==!1&&g(qT,k(k({},tn),$.value),null),Se(),yn&&g(bp,{stickyOffsets:F.value,flattenColumns:C.value},{default:()=>[yn]})]})]);const Qn=Ua(n,{aria:!0,data:!0}),Oo=()=>g("div",k(k({},Qn),{},{class:ge(ue,{[`${ue}-rtl`]:_e==="rtl",[`${ue}-ping-left`]:_.value,[`${ue}-ping-right`]:A.value,[`${ue}-layout-fixed`]:Pe==="fixed",[`${ue}-fixed-header`]:B.value,[`${ue}-fixed-column`]:z.value,[`${ue}-scroll-horizontal`]:j.value,[`${ue}-has-fix-left`]:C.value[0]&&C.value[0].fixed,[`${ue}-has-fix-right`]:C.value[L.value-1]&&C.value[L.value-1].fixed==="right",[n.class]:n.class}),style:n.style,id:Oe,ref:x}),[Ce&&g(w1,{class:`${ue}-title`},{default:()=>[Ce(i.value)]}),g("div",{class:`${ue}-container`},[On()]),we&&g(w1,{class:`${ue}-footer`},{default:()=>[we(i.value)]})]);return j.value?g(br,{onResize:he},{default:Oo}):Oo()}}});function ege(){const e=y({},arguments.length<=0?void 0:arguments[0]);for(let t=1;t{const r=n[o];r!==void 0&&(e[o]=r)})}return e}const O1=10;function tge(e,t){const n={current:e.current,pageSize:e.pageSize};return Object.keys(t&&typeof t=="object"?t:{}).forEach(r=>{const i=e[r];typeof i!="function"&&(n[r]=i)}),n}function nge(e,t,n){const o=E(()=>t.value&&typeof t.value=="object"?t.value:{}),r=E(()=>o.value.total||0),[i,a]=$t(()=>({current:"defaultCurrent"in o.value?o.value.defaultCurrent:1,pageSize:"defaultPageSize"in o.value?o.value.defaultPageSize:O1})),l=E(()=>{const c=ege(i.value,o.value,{total:r.value>0?r.value:e.value}),d=Math.ceil((r.value||e.value)/c.pageSize);return c.current>d&&(c.current=d||1),c}),s=(c,d)=>{t.value!==!1&&a({current:c??1,pageSize:d||l.value.pageSize})},u=(c,d)=>{var f,p;t.value&&((p=(f=o.value).onChange)===null||p===void 0||p.call(f,c,d)),s(c,d),n(c,d||l.value.pageSize)};return[E(()=>t.value===!1?{}:y(y({},l.value),{onChange:u})),s]}function oge(e,t,n){const o=se({});be([e,t,n],()=>{const i=new Map,a=n.value,l=t.value;function s(u){u.forEach((c,d)=>{const f=a(c,d);i.set(f,c),c&&typeof c=="object"&&l in c&&s(c[l]||[])})}s(e.value),o.value={kvMap:i}},{deep:!0,immediate:!0});function r(i){return o.value.kvMap.get(i)}return[r]}const Ai={},I1="SELECT_ALL",T1="SELECT_INVERT",E1="SELECT_NONE",rge=[];function mN(e,t){let n=[];return(t||[]).forEach(o=>{n.push(o),o&&typeof o=="object"&&e in o&&(n=[...n,...mN(e,o[e])])}),n}function ige(e,t){const n=E(()=>{const I=e.value||{},{checkStrictly:_=!0}=I;return y(y({},I),{checkStrictly:_})}),[o,r]=Dt(n.value.selectedRowKeys||n.value.defaultSelectedRowKeys||rge,{value:E(()=>n.value.selectedRowKeys)}),i=se(new Map),a=I=>{if(n.value.preserveSelectedRowKeys){const _=new Map;I.forEach(T=>{let A=t.getRecordByKey(T);!A&&i.value.has(T)&&(A=i.value.get(T)),_.set(T,A)}),i.value=_}};Ve(()=>{a(o.value)});const l=E(()=>n.value.checkStrictly?null:If(t.data.value,{externalGetKey:t.getRowKey.value,childrenPropName:t.childrenColumnName.value}).keyEntities),s=E(()=>mN(t.childrenColumnName.value,t.pageData.value)),u=E(()=>{const I=new Map,_=t.getRowKey.value,T=n.value.getCheckboxProps;return s.value.forEach((A,R)=>{const H=_(A,R),M=(T?T(A):null)||{};I.set(H,M)}),I}),{maxLevel:c,levelEntities:d}=cm(l),f=I=>{var _;return!!(!((_=u.value.get(t.getRowKey.value(I)))===null||_===void 0)&&_.disabled)},p=E(()=>{if(n.value.checkStrictly)return[o.value||[],[]];const{checkedKeys:I,halfCheckedKeys:_}=pr(o.value,!0,l.value,c.value,d.value,f);return[I||[],_]}),v=E(()=>p.value[0]),h=E(()=>p.value[1]),m=E(()=>{const I=n.value.type==="radio"?v.value.slice(0,1):v.value;return new Set(I)}),b=E(()=>n.value.type==="radio"?new Set:new Set(h.value)),[S,C]=$t(null),$=I=>{let _,T;a(I);const{preserveSelectedRowKeys:A,onChange:R}=n.value,{getRecordByKey:H}=t;A?(_=I,T=I.map(M=>i.value.get(M))):(_=[],T=[],I.forEach(M=>{const D=H(M);D!==void 0&&(_.push(M),T.push(D))})),r(_),R==null||R(_,T)},x=(I,_,T,A)=>{const{onSelect:R}=n.value,{getRecordByKey:H}=t||{};if(R){const M=T.map(D=>H(D));R(H(I),_,M,A)}$(T)},P=E(()=>{const{onSelectInvert:I,onSelectNone:_,selections:T,hideSelectAll:A}=n.value,{data:R,pageData:H,getRowKey:M,locale:D}=t;return!T||A?null:(T===!0?[I1,T1,E1]:T).map(L=>L===I1?{key:"all",text:D.value.selectionAll,onSelect(){$(R.value.map((F,B)=>M.value(F,B)).filter(F=>{const B=u.value.get(F);return!(B!=null&&B.disabled)||m.value.has(F)}))}}:L===T1?{key:"invert",text:D.value.selectInvert,onSelect(){const F=new Set(m.value);H.value.forEach((j,z)=>{const G=M.value(j,z),Q=u.value.get(G);Q!=null&&Q.disabled||(F.has(G)?F.delete(G):F.add(G))});const B=Array.from(F);I&&(Mt(!1,"Table","`onSelectInvert` will be removed in future. Please use `onChange` instead."),I(B)),$(B)}}:L===E1?{key:"none",text:D.value.selectNone,onSelect(){_==null||_(),$(Array.from(m.value).filter(F=>{const B=u.value.get(F);return B==null?void 0:B.disabled}))}}:L)}),w=E(()=>s.value.length);return[I=>{var _;const{onSelectAll:T,onSelectMultiple:A,columnWidth:R,type:H,fixed:M,renderCell:D,hideSelectAll:N,checkStrictly:L}=n.value,{prefixCls:F,getRecordByKey:B,getRowKey:j,expandType:z,getPopupContainer:G}=t;if(!e.value)return I.filter(ve=>ve!==Ai);let Q=I.slice();const Y=new Set(m.value),oe=s.value.map(j.value).filter(ve=>!u.value.get(ve).disabled),Z=oe.every(ve=>Y.has(ve)),re=oe.some(ve=>Y.has(ve)),ne=()=>{const ve=[];Z?oe.forEach(V=>{Y.delete(V),ve.push(V)}):oe.forEach(V=>{Y.has(V)||(Y.add(V),ve.push(V))});const he=Array.from(Y);T==null||T(!Z,he.map(V=>B(V)),ve.map(V=>B(V))),$(he)};let X;if(H!=="radio"){let ve;if(P.value){const me=g(on,{getPopupContainer:G.value},{default:()=>[P.value.map((Se,ce)=>{const{key:ee,text:ue,onSelect:xe}=Se;return g(on.Item,{key:ee||ce,onClick:()=>{xe==null||xe(oe)}},{default:()=>[ue]})})]});ve=g("div",{class:`${F.value}-selection-extra`},[g(zr,{overlay:me,getPopupContainer:G.value},{default:()=>[g("span",null,[g(cs,null,null)])]})])}const he=s.value.map((me,Se)=>{const ce=j.value(me,Se),ee=u.value.get(ce)||{};return y({checked:Y.has(ce)},ee)}).filter(me=>{let{disabled:Se}=me;return Se}),V=!!he.length&&he.length===w.value,q=V&&he.every(me=>{let{checked:Se}=me;return Se}),ie=V&&he.some(me=>{let{checked:Se}=me;return Se});X=!N&&g("div",{class:`${F.value}-selection`},[g(gr,{checked:V?q:!!w.value&&Z,indeterminate:V?!q&&ie:!Z&&re,onChange:ne,disabled:w.value===0||V,"aria-label":ve?"Custom selection":"Select all",skipGroup:!0},null),ve])}let te;H==="radio"?te=ve=>{let{record:he,index:V}=ve;const q=j.value(he,V),ie=Y.has(q);return{node:g(bo,k(k({},u.value.get(q)),{},{checked:ie,onClick:me=>me.stopPropagation(),onChange:me=>{Y.has(q)||x(q,!0,[q],me.nativeEvent)}}),null),checked:ie}}:te=ve=>{let{record:he,index:V}=ve;var q;const ie=j.value(he,V),me=Y.has(ie),Se=b.value.has(ie),ce=u.value.get(ie);let ee;return z.value==="nest"?(ee=Se,Mt(typeof(ce==null?void 0:ce.indeterminate)!="boolean","Table","set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.")):ee=(q=ce==null?void 0:ce.indeterminate)!==null&&q!==void 0?q:Se,{node:g(gr,k(k({},ce),{},{indeterminate:ee,checked:me,skipGroup:!0,onClick:ue=>ue.stopPropagation(),onChange:ue=>{let{nativeEvent:xe}=ue;const{shiftKey:Pe}=xe;let _e=-1,Ce=-1;if(Pe&&L){const we=new Set([S.value,ie]);oe.some((Oe,Me)=>{if(we.has(Oe))if(_e===-1)_e=Me;else return Ce=Me,!0;return!1})}if(Ce!==-1&&_e!==Ce&&L){const we=oe.slice(_e,Ce+1),Oe=[];me?we.forEach(Re=>{Y.has(Re)&&(Oe.push(Re),Y.delete(Re))}):we.forEach(Re=>{Y.has(Re)||(Oe.push(Re),Y.add(Re))});const Me=Array.from(Y);A==null||A(!me,Me.map(Re=>B(Re)),Oe.map(Re=>B(Re))),$(Me)}else{const we=v.value;if(L){const Oe=me?ni(we,ie):_i(we,ie);x(ie,!me,Oe,xe)}else{const Oe=pr([...we,ie],!0,l.value,c.value,d.value,f),{checkedKeys:Me,halfCheckedKeys:Re}=Oe;let Ae=Me;if(me){const Fe=new Set(Me);Fe.delete(ie),Ae=pr(Array.from(Fe),{halfCheckedKeys:Re},l.value,c.value,d.value,f).checkedKeys}x(ie,!me,Ae,xe)}}C(ie)}}),null),checked:me}};const W=ve=>{let{record:he,index:V}=ve;const{node:q,checked:ie}=te({record:he,index:V});return D?D(ie,he,V,q):q};if(!Q.includes(Ai))if(Q.findIndex(ve=>{var he;return((he=ve[dc])===null||he===void 0?void 0:he.columnType)==="EXPAND_COLUMN"})===0){const[ve,...he]=Q;Q=[ve,Ai,...he]}else Q=[Ai,...Q];const U=Q.indexOf(Ai);Q=Q.filter((ve,he)=>ve!==Ai||he===U);const J=Q[U-1],de=Q[U+1];let fe=M;fe===void 0&&((de==null?void 0:de.fixed)!==void 0?fe=de.fixed:(J==null?void 0:J.fixed)!==void 0&&(fe=J.fixed)),fe&&J&&((_=J[dc])===null||_===void 0?void 0:_.columnType)==="EXPAND_COLUMN"&&J.fixed===void 0&&(J.fixed=fe);const pe={fixed:fe,width:R,className:`${F.value}-selection-column`,title:n.value.columnTitle||X,customRender:W,[dc]:{class:`${F.value}-selection-col`}};return Q.map(ve=>ve===Ai?pe:ve)},m]}var age={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};function e4(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:[];const t=Ot(e),n=[];return t.forEach(o=>{var r,i,a,l;if(!o)return;const s=o.key,u=((r=o.props)===null||r===void 0?void 0:r.style)||{},c=((i=o.props)===null||i===void 0?void 0:i.class)||"",d=o.props||{};for(const[m,b]of Object.entries(d))d[Kc(m)]=b;const f=o.children||{},{default:p}=f,v=uge(f,["default"]),h=y(y(y({},v),d),{style:u,class:c});if(s&&(h.key=s),!((a=o.type)===null||a===void 0)&&a.__ANT_TABLE_COLUMN_GROUP)h.children=bN(typeof p=="function"?p():p);else{const m=(l=o.children)===null||l===void 0?void 0:l.default;h.customRender=h.customRender||m}n.push(h)}),n}const fg="ascend",db="descend";function _h(e){return typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1}function n4(e){return typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1}function dge(e,t){return t?e[e.indexOf(t)+1]:e[0]}function _1(e,t,n){let o=[];function r(i,a){o.push({column:i,key:Xl(i,a),multiplePriority:_h(i),sortOrder:i.sortOrder})}return(e||[]).forEach((i,a)=>{const l=Af(a,n);i.children?("sortOrder"in i&&r(i,l),o=[...o,..._1(i.children,t,l)]):i.sorter&&("sortOrder"in i?r(i,l):t&&i.defaultSortOrder&&o.push({column:i,key:Xl(i,l),multiplePriority:_h(i),sortOrder:i.defaultSortOrder}))}),o}function yN(e,t,n,o,r,i,a,l){return(t||[]).map((s,u)=>{const c=Af(u,l);let d=s;if(d.sorter){const f=d.sortDirections||r,p=d.showSorterTooltip===void 0?a:d.showSorterTooltip,v=Xl(d,c),h=n.find(I=>{let{key:_}=I;return _===v}),m=h?h.sortOrder:null,b=dge(f,m),S=f.includes(fg)&&g(g$,{class:ge(`${e}-column-sorter-up`,{active:m===fg}),role:"presentation"},null),C=f.includes(db)&&g(p$,{role:"presentation",class:ge(`${e}-column-sorter-down`,{active:m===db})},null),{cancelSort:$,triggerAsc:x,triggerDesc:P}=i||{};let w=$;b===db?w=P:b===fg&&(w=x);const O=typeof p=="object"?p:{title:w};d=y(y({},d),{className:ge(d.className,{[`${e}-column-sort`]:m}),title:I=>{const _=g("div",{class:`${e}-column-sorters`},[g("span",{class:`${e}-column-title`},[h$(s.title,I)]),g("span",{class:ge(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(S&&C)})},[g("span",{class:`${e}-column-sorter-inner`},[S,C])])]);return p?g(Ro,O,{default:()=>[_]}):_},customHeaderCell:I=>{const _=s.customHeaderCell&&s.customHeaderCell(I)||{},T=_.onClick,A=_.onKeydown;return _.onClick=R=>{o({column:s,key:v,sortOrder:b,multiplePriority:_h(s)}),T&&T(R)},_.onKeydown=R=>{R.keyCode===Ie.ENTER&&(o({column:s,key:v,sortOrder:b,multiplePriority:_h(s)}),A==null||A(R))},m&&(_["aria-sort"]=m==="ascend"?"ascending":"descending"),_.class=ge(_.class,`${e}-column-has-sorters`),_.tabindex=0,_}})}return"children"in d&&(d=y(y({},d),{children:yN(e,d.children,n,o,r,i,a,c)})),d})}function o4(e){const{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}}function r4(e){const t=e.filter(n=>{let{sortOrder:o}=n;return o}).map(o4);return t.length===0&&e.length?y(y({},o4(e[e.length-1])),{column:void 0}):t.length<=1?t[0]||{}:t}function M1(e,t,n){const o=t.slice().sort((a,l)=>l.multiplePriority-a.multiplePriority),r=e.slice(),i=o.filter(a=>{let{column:{sorter:l},sortOrder:s}=a;return n4(l)&&s});return i.length?r.sort((a,l)=>{for(let s=0;s{const l=a[n];return l?y(y({},a),{[n]:M1(l,t,n)}):a}):r}function fge(e){let{prefixCls:t,mergedColumns:n,onSorterChange:o,sortDirections:r,tableLocale:i,showSorterTooltip:a}=e;const[l,s]=$t(_1(n.value,!0)),u=E(()=>{let v=!0;const h=_1(n.value,!1);if(!h.length)return l.value;const m=[];function b(C){v?m.push(C):m.push(y(y({},C),{sortOrder:null}))}let S=null;return h.forEach(C=>{S===null?(b(C),C.sortOrder&&(C.multiplePriority===!1?v=!1:S=!0)):(S&&C.multiplePriority!==!1||(v=!1),b(C))}),m}),c=E(()=>{const v=u.value.map(h=>{let{column:m,sortOrder:b}=h;return{column:m,order:b}});return{sortColumns:v,sortColumn:v[0]&&v[0].column,sortOrder:v[0]&&v[0].order}});function d(v){let h;v.multiplePriority===!1||!u.value.length||u.value[0].multiplePriority===!1?h=[v]:h=[...u.value.filter(m=>{let{key:b}=m;return b!==v.key}),v],s(h),o(r4(h),h)}const f=v=>yN(t.value,v,u.value,d,r.value,i.value,a.value),p=E(()=>r4(u.value));return[f,u,c,p]}var pge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"};function i4(e){for(var t=1;t{const{keyCode:t}=e;t===Ie.ENTER&&e.stopPropagation()},vge=(e,t)=>{let{slots:n}=t;var o;return g("div",{onClick:r=>r.stopPropagation(),onKeydown:hge},[(o=n.default)===null||o===void 0?void 0:o.call(n)])},a4=le({compatConfig:{MODE:3},name:"FilterSearch",inheritAttrs:!1,props:{value:Ne(),onChange:ye(),filterSearch:He([Boolean,Function]),tablePrefixCls:Ne(),locale:De()},setup(e){return()=>{const{value:t,onChange:n,filterSearch:o,tablePrefixCls:r,locale:i}=e;return o?g("div",{class:`${r}-filter-dropdown-search`},[g(Cn,{placeholder:i.filterSearchPlaceholder,onChange:n,value:t,htmlSize:1,class:`${r}-filter-dropdown-search-input`},{prefix:()=>g(qc,null,null)})]):null}}});var l4=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.motion?e.motion:Sf()),s=(u,c)=>{var d,f,p,v;c==="appear"?(f=(d=l.value)===null||d===void 0?void 0:d.onAfterEnter)===null||f===void 0||f.call(d,u):c==="leave"&&((v=(p=l.value)===null||p===void 0?void 0:p.onAfterLeave)===null||v===void 0||v.call(p,u)),a.value||e.onMotionEnd(),a.value=!0};return be(()=>e.motionNodes,()=>{e.motionNodes&&e.motionType==="hide"&&r.value&&ot(()=>{r.value=!1})},{immediate:!0,flush:"post"}),Ke(()=>{e.motionNodes&&e.onMotionStart()}),tt(()=>{e.motionNodes&&s()}),()=>{const{motion:u,motionNodes:c,motionType:d,active:f,eventKey:p}=e,v=l4(e,["motion","motionNodes","motionType","active","eventKey"]);return c?g(Nn,k(k({},l.value),{},{appear:d==="show",onAfterAppear:h=>s(h,"appear"),onAfterLeave:h=>s(h,"leave")}),{default:()=>[Pn(g("div",{class:`${i.value.prefixCls}-treenode-motion`},[c.map(h=>{const m=l4(h.data,[]),{title:b,key:S,isStart:C,isEnd:$}=h;return delete m.children,g(t1,k(k({},m),{},{title:b,active:f,data:h.data,key:S,eventKey:S,isStart:C,isEnd:$}),o)})]),[[Vn,r.value]])]}):g(t1,k(k({class:n.class,style:n.style},v),{},{active:f,eventKey:p}),o)}}});function bge(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const n=e.length,o=t.length;if(Math.abs(n-o)!==1)return{add:!1,key:null};function r(i,a){const l=new Map;i.forEach(u=>{l.set(u,!0)});const s=a.filter(u=>!l.has(u));return s.length===1?s[0]:null}return na.key===n),r=e[o+1],i=t.findIndex(a=>a.key===n);if(r){const a=t.findIndex(l=>l.key===r.key);return t.slice(i+1,a)}return t.slice(i+1)}var c4=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{},Yl=`RC_TREE_MOTION_${Math.random()}`,A1={key:Yl},SN={key:Yl,level:0,index:0,pos:"0",node:A1,nodes:[A1]},d4={parent:null,children:[],pos:SN.pos,data:A1,title:null,key:Yl,isStart:[],isEnd:[]};function f4(e,t,n,o){return t===!1||!n?e:e.slice(0,Math.ceil(n/o)+1)}function p4(e){const{key:t,pos:n}=e;return Of(t,n)}function Sge(e){let t=String(e.key),n=e;for(;n.parent;)n=n.parent,t=`${n.key} > ${t}`;return t}const Cge=le({compatConfig:{MODE:3},name:"NodeList",inheritAttrs:!1,props:woe,setup(e,t){let{expose:n,attrs:o}=t;const r=ae(),i=ae(),{expandedKeys:a,flattenNodes:l}=Z5();n({scrollTo:h=>{r.value.scrollTo(h)},getIndentWidth:()=>i.value.offsetWidth});const s=se(l.value),u=se([]),c=ae(null);function d(){s.value=l.value,u.value=[],c.value=null,e.onListChangeEnd()}const f=Ex();be([()=>a.value.slice(),l],(h,m)=>{let[b,S]=h,[C,$]=m;const x=bge(C,b);if(x.key!==null){const{virtual:P,height:w,itemHeight:O}=e;if(x.add){const I=$.findIndex(A=>{let{key:R}=A;return R===x.key}),_=f4(s4($,S,x.key),P,w,O),T=$.slice();T.splice(I+1,0,d4),s.value=T,u.value=_,c.value="show"}else{const I=S.findIndex(A=>{let{key:R}=A;return R===x.key}),_=f4(s4(S,$,x.key),P,w,O),T=S.slice();T.splice(I+1,0,d4),s.value=T,u.value=_,c.value="hide"}}else $!==S&&(s.value=S)}),be(()=>f.value.dragging,h=>{h||d()});const p=E(()=>e.motion===void 0?s.value:l.value),v=()=>{e.onActiveChange(null)};return()=>{const h=y(y({},e),o),{prefixCls:m,selectable:b,checkable:S,disabled:C,motion:$,height:x,itemHeight:P,virtual:w,focusable:O,activeItem:I,focused:_,tabindex:T,onKeydown:A,onFocus:R,onBlur:H,onListChangeStart:M,onListChangeEnd:D}=h,N=c4(h,["prefixCls","selectable","checkable","disabled","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabindex","onKeydown","onFocus","onBlur","onListChangeStart","onListChangeEnd"]);return g(Le,null,[_&&I&&g("span",{style:u4,"aria-live":"assertive"},[Sge(I)]),g("div",null,[g("input",{style:u4,disabled:O===!1||C,tabindex:O!==!1?T:null,onKeydown:A,onFocus:R,onBlur:H,value:"",onChange:yge,"aria-label":"for screen reader"},null)]),g("div",{class:`${m}-treenode`,"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden"}},[g("div",{class:`${m}-indent`},[g("div",{ref:i,class:`${m}-indent-unit`},null)])]),g(TA,k(k({},it(N,["onActiveChange"])),{},{data:p.value,itemKey:p4,height:x,fullHeight:!1,virtual:w,itemHeight:P,prefixCls:`${m}-list`,ref:r,onVisibleChange:(L,F)=>{const B=new Set(L);F.filter(z=>!B.has(z)).some(z=>p4(z)===Yl)&&d()}}),{default:L=>{const{pos:F}=L,B=c4(L.data,[]),{title:j,key:z,isStart:G,isEnd:Q}=L,Y=Of(z,F);return delete B.key,delete B.children,g(mge,k(k({},B),{},{eventKey:Y,title:j,active:!!I&&z===I.key,data:L.data,isStart:G,isEnd:Q,motion:$,motionNodes:z===Yl?u.value:null,motionType:c.value,onMotionStart:M,onMotionEnd:d,onMousemove:v}),null)}})])}}});function xge(e){let{dropPosition:t,dropLevelOffset:n,indent:o}=e;const r={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:"2px"};switch(t){case-1:r.top=0,r.left=`${-n*o}px`;break;case 1:r.bottom=0,r.left=`${-n*o}px`;break;case 0:r.bottom=0,r.left=`${o}`;break}return g("div",{style:r},null)}const $ge=10,CN=le({compatConfig:{MODE:3},name:"Tree",inheritAttrs:!1,props:Qe(eR(),{prefixCls:"vc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,expandAction:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:xge,allowDrop:()=>!0}),setup(e,t){let{attrs:n,slots:o,expose:r}=t;const i=se(!1);let a={};const l=se(),s=se([]),u=se([]),c=se([]),d=se([]),f=se([]),p=se([]),v={},h=rt({draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null}),m=se([]);be([()=>e.treeData,()=>e.children],()=>{m.value=e.treeData!==void 0?e.treeData.slice():o1(nt(e.children))},{immediate:!0,deep:!0});const b=se({}),S=se(!1),C=se(null),$=se(!1),x=E(()=>im(e.fieldNames)),P=se();let w=null,O=null,I=null;const _=E(()=>({expandedKeysSet:T.value,selectedKeysSet:A.value,loadedKeysSet:R.value,loadingKeysSet:H.value,checkedKeysSet:M.value,halfCheckedKeysSet:D.value,dragOverNodeKey:h.dragOverNodeKey,dropPosition:h.dropPosition,keyEntities:b.value})),T=E(()=>new Set(p.value)),A=E(()=>new Set(s.value)),R=E(()=>new Set(d.value)),H=E(()=>new Set(f.value)),M=E(()=>new Set(u.value)),D=E(()=>new Set(c.value));Ve(()=>{if(m.value){const Ce=If(m.value,{fieldNames:x.value});b.value=y({[Yl]:SN},Ce.keyEntities)}});let N=!1;be([()=>e.expandedKeys,()=>e.autoExpandParent,b],(Ce,we)=>{let[Oe,Me]=Ce,[Re,Ae]=we,Fe=p.value;if(e.expandedKeys!==void 0||N&&Me!==Ae)Fe=e.autoExpandParent||!N&&e.defaultExpandParent?n1(e.expandedKeys,b.value):e.expandedKeys;else if(!N&&e.defaultExpandAll){const lt=y({},b.value);delete lt[Yl],Fe=Object.keys(lt).map(bt=>lt[bt].key)}else!N&&e.defaultExpandedKeys&&(Fe=e.autoExpandParent||e.defaultExpandParent?n1(e.defaultExpandedKeys,b.value):e.defaultExpandedKeys);Fe&&(p.value=Fe),N=!0},{immediate:!0});const L=se([]);Ve(()=>{L.value=Aoe(m.value,p.value,x.value)}),Ve(()=>{e.selectable&&(e.selectedKeys!==void 0?s.value=wI(e.selectedKeys,e):!N&&e.defaultSelectedKeys&&(s.value=wI(e.defaultSelectedKeys,e)))});const{maxLevel:F,levelEntities:B}=cm(b);Ve(()=>{if(e.checkable){let Ce;if(e.checkedKeys!==void 0?Ce=G0(e.checkedKeys)||{}:!N&&e.defaultCheckedKeys?Ce=G0(e.defaultCheckedKeys)||{}:m.value&&(Ce=G0(e.checkedKeys)||{checkedKeys:u.value,halfCheckedKeys:c.value}),Ce){let{checkedKeys:we=[],halfCheckedKeys:Oe=[]}=Ce;e.checkStrictly||({checkedKeys:we,halfCheckedKeys:Oe}=pr(we,!0,b.value,F.value,B.value)),u.value=we,c.value=Oe}}}),Ve(()=>{e.loadedKeys&&(d.value=e.loadedKeys)});const j=()=>{y(h,{dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})},z=Ce=>{P.value.scrollTo(Ce)};be(()=>e.activeKey,()=>{e.activeKey!==void 0&&(C.value=e.activeKey)},{immediate:!0}),be(C,Ce=>{ot(()=>{Ce!==null&&z({key:Ce})})},{immediate:!0,flush:"post"});const G=Ce=>{e.expandedKeys===void 0&&(p.value=Ce)},Q=()=>{h.draggingNodeKey!==null&&y(h,{draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),w=null,I=null},Y=(Ce,we)=>{const{onDragend:Oe}=e;h.dragOverNodeKey=null,Q(),Oe==null||Oe({event:Ce,node:we.eventData}),O=null},oe=Ce=>{Y(Ce,null),window.removeEventListener("dragend",oe)},Z=(Ce,we)=>{const{onDragstart:Oe}=e,{eventKey:Me,eventData:Re}=we;O=we,w={x:Ce.clientX,y:Ce.clientY};const Ae=ni(p.value,Me);h.draggingNodeKey=Me,h.dragChildrenKeys=Toe(Me,b.value),l.value=P.value.getIndentWidth(),G(Ae),window.addEventListener("dragend",oe),Oe&&Oe({event:Ce,node:Re})},re=(Ce,we)=>{const{onDragenter:Oe,onExpand:Me,allowDrop:Re,direction:Ae}=e,{pos:Fe,eventKey:lt}=we;if(I!==lt&&(I=lt),!O){j();return}const{dropPosition:bt,dropLevelOffset:ft,dropTargetKey:yt,dropContainerKey:Ct,dropTargetPos:fn,dropAllowed:yn,dragOverNodeKey:On}=$I(Ce,O,we,l.value,w,Re,L.value,b.value,T.value,Ae);if(h.dragChildrenKeys.indexOf(yt)!==-1||!yn){j();return}if(a||(a={}),Object.keys(a).forEach(tn=>{clearTimeout(a[tn])}),O.eventKey!==we.eventKey&&(a[Fe]=window.setTimeout(()=>{if(h.draggingNodeKey===null)return;let tn=p.value.slice();const Qn=b.value[we.eventKey];Qn&&(Qn.children||[]).length&&(tn=_i(p.value,we.eventKey)),G(tn),Me&&Me(tn,{node:we.eventData,expanded:!0,nativeEvent:Ce})},800)),O.eventKey===yt&&ft===0){j();return}y(h,{dragOverNodeKey:On,dropPosition:bt,dropLevelOffset:ft,dropTargetKey:yt,dropContainerKey:Ct,dropTargetPos:fn,dropAllowed:yn}),Oe&&Oe({event:Ce,node:we.eventData,expandedKeys:p.value})},ne=(Ce,we)=>{const{onDragover:Oe,allowDrop:Me,direction:Re}=e;if(!O)return;const{dropPosition:Ae,dropLevelOffset:Fe,dropTargetKey:lt,dropContainerKey:bt,dropAllowed:ft,dropTargetPos:yt,dragOverNodeKey:Ct}=$I(Ce,O,we,l.value,w,Me,L.value,b.value,T.value,Re);h.dragChildrenKeys.indexOf(lt)!==-1||!ft||(O.eventKey===lt&&Fe===0?h.dropPosition===null&&h.dropLevelOffset===null&&h.dropTargetKey===null&&h.dropContainerKey===null&&h.dropTargetPos===null&&h.dropAllowed===!1&&h.dragOverNodeKey===null||j():Ae===h.dropPosition&&Fe===h.dropLevelOffset&<===h.dropTargetKey&&bt===h.dropContainerKey&&yt===h.dropTargetPos&&ft===h.dropAllowed&&Ct===h.dragOverNodeKey||y(h,{dropPosition:Ae,dropLevelOffset:Fe,dropTargetKey:lt,dropContainerKey:bt,dropTargetPos:yt,dropAllowed:ft,dragOverNodeKey:Ct}),Oe&&Oe({event:Ce,node:we.eventData}))},X=(Ce,we)=>{I===we.eventKey&&!Ce.currentTarget.contains(Ce.relatedTarget)&&(j(),I=null);const{onDragleave:Oe}=e;Oe&&Oe({event:Ce,node:we.eventData})},te=function(Ce,we){let Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Me;const{dragChildrenKeys:Re,dropPosition:Ae,dropTargetKey:Fe,dropTargetPos:lt,dropAllowed:bt}=h;if(!bt)return;const{onDrop:ft}=e;if(h.dragOverNodeKey=null,Q(),Fe===null)return;const yt=y(y({},Yp(Fe,nt(_.value))),{active:((Me=ue.value)===null||Me===void 0?void 0:Me.key)===Fe,data:b.value[Fe].node});Re.indexOf(Fe);const Ct=_x(lt),fn={event:Ce,node:qp(yt),dragNode:O?O.eventData:null,dragNodesKeys:[O.eventKey].concat(Re),dropToGap:Ae!==0,dropPosition:Ae+Number(Ct[Ct.length-1])};Oe||ft==null||ft(fn),O=null},W=(Ce,we)=>{const{expanded:Oe,key:Me}=we,Re=L.value.filter(Fe=>Fe.key===Me)[0],Ae=qp(y(y({},Yp(Me,_.value)),{data:Re.data}));G(Oe?ni(p.value,Me):_i(p.value,Me)),me(Ce,Ae)},U=(Ce,we)=>{const{onClick:Oe,expandAction:Me}=e;Me==="click"&&W(Ce,we),Oe&&Oe(Ce,we)},J=(Ce,we)=>{const{onDblclick:Oe,expandAction:Me}=e;(Me==="doubleclick"||Me==="dblclick")&&W(Ce,we),Oe&&Oe(Ce,we)},de=(Ce,we)=>{let Oe=s.value;const{onSelect:Me,multiple:Re}=e,{selected:Ae}=we,Fe=we[x.value.key],lt=!Ae;lt?Re?Oe=_i(Oe,Fe):Oe=[Fe]:Oe=ni(Oe,Fe);const bt=b.value,ft=Oe.map(yt=>{const Ct=bt[yt];return Ct?Ct.node:null}).filter(yt=>yt);e.selectedKeys===void 0&&(s.value=Oe),Me&&Me(Oe,{event:"select",selected:lt,node:we,selectedNodes:ft,nativeEvent:Ce})},fe=(Ce,we,Oe)=>{const{checkStrictly:Me,onCheck:Re}=e,Ae=we[x.value.key];let Fe;const lt={event:"check",node:we,checked:Oe,nativeEvent:Ce},bt=b.value;if(Me){const ft=Oe?_i(u.value,Ae):ni(u.value,Ae),yt=ni(c.value,Ae);Fe={checked:ft,halfChecked:yt},lt.checkedNodes=ft.map(Ct=>bt[Ct]).filter(Ct=>Ct).map(Ct=>Ct.node),e.checkedKeys===void 0&&(u.value=ft)}else{let{checkedKeys:ft,halfCheckedKeys:yt}=pr([...u.value,Ae],!0,bt,F.value,B.value);if(!Oe){const Ct=new Set(ft);Ct.delete(Ae),{checkedKeys:ft,halfCheckedKeys:yt}=pr(Array.from(Ct),{halfCheckedKeys:yt},bt,F.value,B.value)}Fe=ft,lt.checkedNodes=[],lt.checkedNodesPositions=[],lt.halfCheckedKeys=yt,ft.forEach(Ct=>{const fn=bt[Ct];if(!fn)return;const{node:yn,pos:On}=fn;lt.checkedNodes.push(yn),lt.checkedNodesPositions.push({node:yn,pos:On})}),e.checkedKeys===void 0&&(u.value=ft,c.value=yt)}Re&&Re(Fe,lt)},pe=Ce=>{const we=Ce[x.value.key],Oe=new Promise((Me,Re)=>{const{loadData:Ae,onLoad:Fe}=e;if(!Ae||R.value.has(we)||H.value.has(we))return null;Ae(Ce).then(()=>{const bt=_i(d.value,we),ft=ni(f.value,we);Fe&&Fe(bt,{event:"load",node:Ce}),e.loadedKeys===void 0&&(d.value=bt),f.value=ft,Me()}).catch(bt=>{const ft=ni(f.value,we);if(f.value=ft,v[we]=(v[we]||0)+1,v[we]>=$ge){const yt=_i(d.value,we);e.loadedKeys===void 0&&(d.value=yt),Me()}Re(bt)}),f.value=_i(f.value,we)});return Oe.catch(()=>{}),Oe},ve=(Ce,we)=>{const{onMouseenter:Oe}=e;Oe&&Oe({event:Ce,node:we})},he=(Ce,we)=>{const{onMouseleave:Oe}=e;Oe&&Oe({event:Ce,node:we})},V=(Ce,we)=>{const{onRightClick:Oe}=e;Oe&&(Ce.preventDefault(),Oe({event:Ce,node:we}))},q=Ce=>{const{onFocus:we}=e;S.value=!0,we&&we(Ce)},ie=Ce=>{const{onBlur:we}=e;S.value=!1,ee(null),we&&we(Ce)},me=(Ce,we)=>{let Oe=p.value;const{onExpand:Me,loadData:Re}=e,{expanded:Ae}=we,Fe=we[x.value.key];if($.value)return;Oe.indexOf(Fe);const lt=!Ae;if(lt?Oe=_i(Oe,Fe):Oe=ni(Oe,Fe),G(Oe),Me&&Me(Oe,{node:we,expanded:lt,nativeEvent:Ce}),lt&&Re){const bt=pe(we);bt&&bt.then(()=>{}).catch(ft=>{const yt=ni(p.value,Fe);G(yt),Promise.reject(ft)})}},Se=()=>{$.value=!0},ce=()=>{setTimeout(()=>{$.value=!1})},ee=Ce=>{const{onActiveChange:we}=e;C.value!==Ce&&(e.activeKey!==void 0&&(C.value=Ce),Ce!==null&&z({key:Ce}),we&&we(Ce))},ue=E(()=>C.value===null?null:L.value.find(Ce=>{let{key:we}=Ce;return we===C.value})||null),xe=Ce=>{let we=L.value.findIndex(Me=>{let{key:Re}=Me;return Re===C.value});we===-1&&Ce<0&&(we=L.value.length),we=(we+Ce+L.value.length)%L.value.length;const Oe=L.value[we];if(Oe){const{key:Me}=Oe;ee(Me)}else ee(null)},Pe=E(()=>qp(y(y({},Yp(C.value,_.value)),{data:ue.value.data,active:!0}))),_e=Ce=>{const{onKeydown:we,checkable:Oe,selectable:Me}=e;switch(Ce.which){case Ie.UP:{xe(-1),Ce.preventDefault();break}case Ie.DOWN:{xe(1),Ce.preventDefault();break}}const Re=ue.value;if(Re&&Re.data){const Ae=Re.data.isLeaf===!1||!!(Re.data.children||[]).length,Fe=Pe.value;switch(Ce.which){case Ie.LEFT:{Ae&&T.value.has(C.value)?me({},Fe):Re.parent&&ee(Re.parent.key),Ce.preventDefault();break}case Ie.RIGHT:{Ae&&!T.value.has(C.value)?me({},Fe):Re.children&&Re.children.length&&ee(Re.children[0].key),Ce.preventDefault();break}case Ie.ENTER:case Ie.SPACE:{Oe&&!Fe.disabled&&Fe.checkable!==!1&&!Fe.disableCheckbox?fe({},Fe,!M.value.has(C.value)):!Oe&&Me&&!Fe.disabled&&Fe.selectable!==!1&&de({},Fe);break}}}we&&we(Ce)};return r({onNodeExpand:me,scrollTo:z,onKeydown:_e,selectedKeys:E(()=>s.value),checkedKeys:E(()=>u.value),halfCheckedKeys:E(()=>c.value),loadedKeys:E(()=>d.value),loadingKeys:E(()=>f.value),expandedKeys:E(()=>p.value)}),Zn(()=>{window.removeEventListener("dragend",oe),i.value=!0}),xoe({expandedKeys:p,selectedKeys:s,loadedKeys:d,loadingKeys:f,checkedKeys:u,halfCheckedKeys:c,expandedKeysSet:T,selectedKeysSet:A,loadedKeysSet:R,loadingKeysSet:H,checkedKeysSet:M,halfCheckedKeysSet:D,flattenNodes:L}),()=>{const{draggingNodeKey:Ce,dropLevelOffset:we,dropContainerKey:Oe,dropTargetKey:Me,dropPosition:Re,dragOverNodeKey:Ae}=h,{prefixCls:Fe,showLine:lt,focusable:bt,tabindex:ft=0,selectable:yt,showIcon:Ct,icon:fn=o.icon,switcherIcon:yn,draggable:On,checkable:tn,checkStrictly:Qn,disabled:Oo,motion:er,loadData:Or,filterTreeNode:Io,height:ol,itemHeight:Ee,virtual:Je,dropIndicatorRender:Ge,onContextmenu:Tt,onScroll:Sn,direction:nn,rootClassName:To,rootStyle:Kn}=e,{class:Zr,style:Fo}=n,tr=Ua(y(y({},e),n),{aria:!0,data:!0});let jt;return On?typeof On=="object"?jt=On:typeof On=="function"?jt={nodeDraggable:On}:jt={}:jt=!1,g(Coe,{value:{prefixCls:Fe,selectable:yt,showIcon:Ct,icon:fn,switcherIcon:yn,draggable:jt,draggingNodeKey:Ce,checkable:tn,customCheckable:o.checkable,checkStrictly:Qn,disabled:Oo,keyEntities:b.value,dropLevelOffset:we,dropContainerKey:Oe,dropTargetKey:Me,dropPosition:Re,dragOverNodeKey:Ae,dragging:Ce!==null,indent:l.value,direction:nn,dropIndicatorRender:Ge,loadData:Or,filterTreeNode:Io,onNodeClick:U,onNodeDoubleClick:J,onNodeExpand:me,onNodeSelect:de,onNodeCheck:fe,onNodeLoad:pe,onNodeMouseEnter:ve,onNodeMouseLeave:he,onNodeContextMenu:V,onNodeDragStart:Z,onNodeDragEnter:re,onNodeDragOver:ne,onNodeDragLeave:X,onNodeDragEnd:Y,onNodeDrop:te,slots:o}},{default:()=>[g("div",{role:"tree",class:ge(Fe,Zr,To,{[`${Fe}-show-line`]:lt,[`${Fe}-focused`]:S.value,[`${Fe}-active-focused`]:C.value!==null}),style:Kn},[g(Cge,k({ref:P,prefixCls:Fe,style:Fo,disabled:Oo,selectable:yt,checkable:!!tn,motion:er,height:ol,itemHeight:Ee,virtual:Je,focusable:bt,focused:S.value,tabindex:ft,activeItem:ue.value,onFocus:q,onBlur:ie,onKeydown:_e,onActiveChange:ee,onListChangeStart:Se,onListChangeEnd:ce,onContextmenu:Tt,onScroll:Sn},tr),null)])]})}}});var wge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};function g4(e){for(var t=1;t({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),Nge=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${t.lineWidthBold}px solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),kge=(e,t)=>{const{treeCls:n,treeNodeCls:o,treeNodePadding:r,treeTitleHeight:i}=t,a=(i-t.fontSizeLG)/2,l=t.paddingXS;return{[n]:y(y({},qe(t)),{background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,[`&${n}-rtl`]:{[`${n}-switcher`]:{"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${n}-active-focused)`]:y({},qi(t)),[`${n}-list-holder-inner`]:{alignItems:"flex-start"},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:"stretch",[`${n}-node-content-wrapper`]:{flex:"auto"},[`${o}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:r,insetInlineStart:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:Rge,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${o}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${r}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${n}-node-content-wrapper`]:y({},qi(t)),[`&:not(${o}-disabled).filter-node ${n}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${n}-draggable-icon`]:{width:i,lineHeight:`${i}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${t.motionDurationSlow}`,[`${o}:hover &`]:{opacity:.45}},[`&${o}-disabled`]:{[`${n}-draggable-icon`]:{visibility:"hidden"}}}},[`${n}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:i}},[`${n}-draggable-icon`]:{visibility:"hidden"},[`${n}-switcher`]:y(y({},Dge(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:i,margin:0,lineHeight:`${i}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:i/2,bottom:-r,marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:i/2*.8,height:i/2,borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${n}-checkbox`]:{top:"initial",marginInlineEnd:l,marginBlockStart:a},[`${n}-node-content-wrapper, ${n}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:i,margin:0,padding:`0 ${t.paddingXS/2}px`,color:"inherit",lineHeight:`${i}px`,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:t.controlItemBgHover},[`&${n}-node-selected`]:{backgroundColor:t.controlItemBgActive},[`${n}-iconEle`]:{display:"inline-block",width:i,height:i,lineHeight:`${i}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${n}-node-content-wrapper`]:y({lineHeight:`${i}px`,userSelect:"none"},Nge(e,t)),[`${o}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${t.colorPrimary}`}},"&-show-line":{[`${n}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:i/2,bottom:-r,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${n}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${o}-leaf-last`]:{[`${n}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${i/2}px !important`}}}}})}},Lge=e=>{const{treeCls:t,treeNodeCls:n,treeNodePadding:o}=e;return{[`${t}${t}-directory`]:{[n]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:o,insetInlineStart:0,transition:`background-color ${e.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:e.controlItemBgHover}},"> *":{zIndex:1},[`${t}-switcher`]:{transition:`color ${e.motionDurationMid}`},[`${t}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${t}-node-selected`]:{color:e.colorTextLightSolid,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:e.colorPrimary},[`${t}-switcher`]:{color:e.colorTextLightSolid},[`${t}-node-content-wrapper`]:{color:e.colorTextLightSolid,background:"transparent"}}}}}},$N=(e,t)=>{const n=`.${e}`,o=`${n}-treenode`,r=t.paddingXS/2,i=t.controlHeightSM,a=Be(t,{treeCls:n,treeNodeCls:o,treeNodePadding:r,treeTitleHeight:i});return[kge(e,a),Lge(a)]},Fge=Ue("Tree",(e,t)=>{let{prefixCls:n}=t;return[{[e.componentCls]:pm(`${n}-checkbox`,e)},$N(n,e),bf(e)]}),wN=()=>{const e=eR();return y(y({},e),{showLine:He([Boolean,Object]),multiple:$e(),autoExpandParent:$e(),checkStrictly:$e(),checkable:$e(),disabled:$e(),defaultExpandAll:$e(),defaultExpandParent:$e(),defaultExpandedKeys:pt(),expandedKeys:pt(),checkedKeys:He([Array,Object]),defaultCheckedKeys:pt(),selectedKeys:pt(),defaultSelectedKeys:pt(),selectable:$e(),loadedKeys:pt(),draggable:$e(),showIcon:$e(),icon:ye(),switcherIcon:K.any,prefixCls:String,replaceFields:De(),blockNode:$e(),openAnimation:K.any,onDoubleclick:e.onDblclick,"onUpdate:selectedKeys":ye(),"onUpdate:checkedKeys":ye(),"onUpdate:expandedKeys":ye()})},pg=le({compatConfig:{MODE:3},name:"ATree",inheritAttrs:!1,props:Qe(wN(),{checkable:!1,selectable:!0,showIcon:!1,blockNode:!1}),slots:Object,setup(e,t){let{attrs:n,expose:o,emit:r,slots:i}=t;e.treeData===void 0&&i.default;const{prefixCls:a,direction:l,virtual:s}=Te("tree",e),[u,c]=Fge(a),d=ae();o({treeRef:d,onNodeExpand:function(){var m;(m=d.value)===null||m===void 0||m.onNodeExpand(...arguments)},scrollTo:m=>{var b;(b=d.value)===null||b===void 0||b.scrollTo(m)},selectedKeys:E(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.selectedKeys}),checkedKeys:E(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.checkedKeys}),halfCheckedKeys:E(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.halfCheckedKeys}),loadedKeys:E(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.loadedKeys}),loadingKeys:E(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.loadingKeys}),expandedKeys:E(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.expandedKeys})}),Ve(()=>{Mt(e.replaceFields===void 0,"Tree","`replaceFields` is deprecated, please use fieldNames instead")});const p=(m,b)=>{r("update:checkedKeys",m),r("check",m,b)},v=(m,b)=>{r("update:expandedKeys",m),r("expand",m,b)},h=(m,b)=>{r("update:selectedKeys",m),r("select",m,b)};return()=>{const{showIcon:m,showLine:b,switcherIcon:S=i.switcherIcon,icon:C=i.icon,blockNode:$,checkable:x,selectable:P,fieldNames:w=e.replaceFields,motion:O=e.openAnimation,itemHeight:I=28,onDoubleclick:_,onDblclick:T}=e,A=y(y(y({},n),it(e,["onUpdate:checkedKeys","onUpdate:expandedKeys","onUpdate:selectedKeys","onDoubleclick"])),{showLine:!!b,dropIndicatorRender:Age,fieldNames:w,icon:C,itemHeight:I}),R=i.default?zt(i.default()):void 0;return u(g(CN,k(k({},A),{},{virtual:s.value,motion:O,ref:d,prefixCls:a.value,class:ge({[`${a.value}-icon-hide`]:!m,[`${a.value}-block-node`]:$,[`${a.value}-unselectable`]:!P,[`${a.value}-rtl`]:l.value==="rtl"},n.class,c.value),direction:l.value,checkable:x,selectable:P,switcherIcon:H=>xN(a.value,S,H,i.leafIcon,b),onCheck:p,onExpand:v,onSelect:h,onDblclick:T||_,children:R}),y(y({},i),{checkable:()=>g("span",{class:`${a.value}-checkbox-inner`},null)})))}}});var Bge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};function y4(e){for(var t=1;t{if(l===Ri.End)return!1;if(s(u)){if(a.push(u),l===Ri.None)l=Ri.Start;else if(l===Ri.Start)return l=Ri.End,!1}else l===Ri.Start&&a.push(u);return n.includes(u)}),a}function fb(e,t,n){const o=[...t],r=[];return x$(e,n,(i,a)=>{const l=o.indexOf(i);return l!==-1&&(r.push(a),o.splice(l,1)),!!o.length}),r}var Vge=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);ry(y({},wN()),{expandAction:He([Boolean,String])});function Uge(e){const{isLeaf:t,expanded:n}=e;return g(t?Pm:n?S$:C$,null,null)}const gg=le({compatConfig:{MODE:3},name:"ADirectoryTree",inheritAttrs:!1,props:Qe(Kge(),{showIcon:!0,expandAction:"click"}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r,expose:i}=t;var a;const l=ae(e.treeData||o1(zt((a=o.default)===null||a===void 0?void 0:a.call(o))));be(()=>e.treeData,()=>{l.value=e.treeData}),uo(()=>{ot(()=>{var I;e.treeData===void 0&&o.default&&(l.value=o1(zt((I=o.default)===null||I===void 0?void 0:I.call(o))))})});const s=ae(),u=ae(),c=E(()=>im(e.fieldNames)),d=ae();i({scrollTo:I=>{var _;(_=d.value)===null||_===void 0||_.scrollTo(I)},selectedKeys:E(()=>{var I;return(I=d.value)===null||I===void 0?void 0:I.selectedKeys}),checkedKeys:E(()=>{var I;return(I=d.value)===null||I===void 0?void 0:I.checkedKeys}),halfCheckedKeys:E(()=>{var I;return(I=d.value)===null||I===void 0?void 0:I.halfCheckedKeys}),loadedKeys:E(()=>{var I;return(I=d.value)===null||I===void 0?void 0:I.loadedKeys}),loadingKeys:E(()=>{var I;return(I=d.value)===null||I===void 0?void 0:I.loadingKeys}),expandedKeys:E(()=>{var I;return(I=d.value)===null||I===void 0?void 0:I.expandedKeys})});const p=()=>{const{keyEntities:I}=If(l.value,{fieldNames:c.value});let _;return e.defaultExpandAll?_=Object.keys(I):e.defaultExpandParent?_=n1(e.expandedKeys||e.defaultExpandedKeys||[],I):_=e.expandedKeys||e.defaultExpandedKeys,_},v=ae(e.selectedKeys||e.defaultSelectedKeys||[]),h=ae(p());be(()=>e.selectedKeys,()=>{e.selectedKeys!==void 0&&(v.value=e.selectedKeys)},{immediate:!0}),be(()=>e.expandedKeys,()=>{e.expandedKeys!==void 0&&(h.value=e.expandedKeys)},{immediate:!0});const b=MC((I,_)=>{const{isLeaf:T}=_;T||I.shiftKey||I.metaKey||I.ctrlKey||d.value.onNodeExpand(I,_)},200,{leading:!0}),S=(I,_)=>{e.expandedKeys===void 0&&(h.value=I),r("update:expandedKeys",I),r("expand",I,_)},C=(I,_)=>{const{expandAction:T}=e;T==="click"&&b(I,_),r("click",I,_)},$=(I,_)=>{const{expandAction:T}=e;(T==="dblclick"||T==="doubleclick")&&b(I,_),r("doubleclick",I,_),r("dblclick",I,_)},x=(I,_)=>{const{multiple:T}=e,{node:A,nativeEvent:R}=_,H=A[c.value.key],M=y(y({},_),{selected:!0}),D=(R==null?void 0:R.ctrlKey)||(R==null?void 0:R.metaKey),N=R==null?void 0:R.shiftKey;let L;T&&D?(L=I,s.value=H,u.value=L,M.selectedNodes=fb(l.value,L,c.value)):T&&N?(L=Array.from(new Set([...u.value||[],...Wge({treeData:l.value,expandedKeys:h.value,startKey:H,endKey:s.value,fieldNames:c.value})])),M.selectedNodes=fb(l.value,L,c.value)):(L=[H],s.value=H,u.value=L,M.selectedNodes=fb(l.value,L,c.value)),r("update:selectedKeys",L),r("select",L,M),e.selectedKeys===void 0&&(v.value=L)},P=(I,_)=>{r("update:checkedKeys",I),r("check",I,_)},{prefixCls:w,direction:O}=Te("tree",e);return()=>{const I=ge(`${w.value}-directory`,{[`${w.value}-directory-rtl`]:O.value==="rtl"},n.class),{icon:_=o.icon,blockNode:T=!0}=e,A=Vge(e,["icon","blockNode"]);return g(pg,k(k(k({},n),{},{icon:_||Uge,ref:d,blockNode:T},A),{},{prefixCls:w.value,class:I,expandedKeys:h.value,selectedKeys:v.value,onSelect:x,onClick:C,onDblclick:$,onExpand:S,onCheck:P}),o)}}}),hg=t1,PN=y(pg,{DirectoryTree:gg,TreeNode:hg,install:e=>(e.component(pg.name,pg),e.component(hg.name,hg),e.component(gg.name,gg),e)});function C4(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const o=new Set;function r(i,a){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;const s=o.has(i);if(FS(!s,"Warning: There may be circular references"),s)return!1;if(i===a)return!0;if(n&&l>1)return!1;o.add(i);const u=l+1;if(Array.isArray(i)){if(!Array.isArray(a)||i.length!==a.length)return!1;for(let c=0;cr(i[d],a[d],u))}return!1}return r(e,t)}const{SubMenu:Gge,Item:Xge}=on;function Yge(e){return e.some(t=>{let{children:n}=t;return n&&n.length>0})}function ON(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function IN(e){let{filters:t,prefixCls:n,filteredKeys:o,filterMultiple:r,searchValue:i,filterSearch:a}=e;return t.map((l,s)=>{const u=String(l.value);if(l.children)return g(Gge,{key:u||s,title:l.text,popupClassName:`${n}-dropdown-submenu`},{default:()=>[IN({filters:l.children,prefixCls:n,filteredKeys:o,filterMultiple:r,searchValue:i,filterSearch:a})]});const c=r?gr:bo,d=g(Xge,{key:l.value!==void 0?u:s},{default:()=>[g(c,{checked:o.includes(u)},null),g("span",null,[l.text])]});return i.trim()?typeof a=="function"?a(i,l)?d:void 0:ON(i,l.text)?d:void 0:d})}const qge=le({name:"FilterDropdown",props:["tablePrefixCls","prefixCls","dropdownPrefixCls","column","filterState","filterMultiple","filterMode","filterSearch","columnKey","triggerFilter","locale","getPopupContainer"],setup(e,t){let{slots:n}=t;const o=d$(),r=E(()=>{var z;return(z=e.filterMode)!==null&&z!==void 0?z:"menu"}),i=E(()=>{var z;return(z=e.filterSearch)!==null&&z!==void 0?z:!1}),a=E(()=>e.column.filterDropdownOpen||e.column.filterDropdownVisible),l=E(()=>e.column.onFilterDropdownOpenChange||e.column.onFilterDropdownVisibleChange),s=se(!1),u=E(()=>{var z;return!!(e.filterState&&(!((z=e.filterState.filteredKeys)===null||z===void 0)&&z.length||e.filterState.forceFiltered))}),c=E(()=>{var z;return Om((z=e.column)===null||z===void 0?void 0:z.filters)}),d=E(()=>{const{filterDropdown:z,slots:G={},customFilterDropdown:Q}=e.column;return z||G.filterDropdown&&o.value[G.filterDropdown]||Q&&o.value.customFilterDropdown}),f=E(()=>{const{filterIcon:z,slots:G={}}=e.column;return z||G.filterIcon&&o.value[G.filterIcon]||o.value.customFilterIcon}),p=z=>{var G;s.value=z,(G=l.value)===null||G===void 0||G.call(l,z)},v=E(()=>typeof a.value=="boolean"?a.value:s.value),h=E(()=>{var z;return(z=e.filterState)===null||z===void 0?void 0:z.filteredKeys}),m=se([]),b=z=>{let{selectedKeys:G}=z;m.value=G},S=(z,G)=>{let{node:Q,checked:Y}=G;e.filterMultiple?b({selectedKeys:z}):b({selectedKeys:Y&&Q.key?[Q.key]:[]})};be(h,()=>{s.value&&b({selectedKeys:h.value||[]})},{immediate:!0});const C=se([]),$=se(),x=z=>{$.value=setTimeout(()=>{C.value=z})},P=()=>{clearTimeout($.value)};tt(()=>{clearTimeout($.value)});const w=se(""),O=z=>{const{value:G}=z.target;w.value=G};be(s,()=>{s.value||(w.value="")});const I=z=>{const{column:G,columnKey:Q,filterState:Y}=e,oe=z&&z.length?z:null;if(oe===null&&(!Y||!Y.filteredKeys)||C4(oe,Y==null?void 0:Y.filteredKeys,!0))return null;e.triggerFilter({column:G,key:Q,filteredKeys:oe})},_=()=>{p(!1),I(m.value)},T=function(){let{confirm:z,closeDropdown:G}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};z&&I([]),G&&p(!1),w.value="",e.column.filterResetToDefaultFilteredValue?m.value=(e.column.defaultFilteredValue||[]).map(Q=>String(Q)):m.value=[]},A=function(){let{closeDropdown:z}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};z&&p(!1),I(m.value)},R=z=>{z&&h.value!==void 0&&(m.value=h.value||[]),p(z),!z&&!d.value&&_()},{direction:H}=Te("",e),M=z=>{if(z.target.checked){const G=c.value;m.value=G}else m.value=[]},D=z=>{let{filters:G}=z;return(G||[]).map((Q,Y)=>{const oe=String(Q.value),Z={title:Q.text,key:Q.value!==void 0?oe:Y};return Q.children&&(Z.children=D({filters:Q.children})),Z})},N=z=>{var G;return y(y({},z),{text:z.title,value:z.key,children:((G=z.children)===null||G===void 0?void 0:G.map(Q=>N(Q)))||[]})},L=E(()=>D({filters:e.column.filters})),F=E(()=>ge({[`${e.dropdownPrefixCls}-menu-without-submenu`]:!Yge(e.column.filters||[])})),B=()=>{const z=m.value,{column:G,locale:Q,tablePrefixCls:Y,filterMultiple:oe,dropdownPrefixCls:Z,getPopupContainer:re,prefixCls:ne}=e;return(G.filters||[]).length===0?g(Oa,{image:Oa.PRESENTED_IMAGE_SIMPLE,description:Q.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}},null):r.value==="tree"?g(Le,null,[g(a4,{filterSearch:i.value,value:w.value,onChange:O,tablePrefixCls:Y,locale:Q},null),g("div",{class:`${Y}-filter-dropdown-tree`},[oe?g(gr,{class:`${Y}-filter-dropdown-checkall`,onChange:M,checked:z.length===c.value.length,indeterminate:z.length>0&&z.length[Q.filterCheckall]}):null,g(PN,{checkable:!0,selectable:!1,blockNode:!0,multiple:oe,checkStrictly:!oe,class:`${Z}-menu`,onCheck:S,checkedKeys:z,selectedKeys:z,showIcon:!1,treeData:L.value,autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:w.value.trim()?X=>typeof i.value=="function"?i.value(w.value,N(X)):ON(w.value,X.title):void 0},null)])]):g(Le,null,[g(a4,{filterSearch:i.value,value:w.value,onChange:O,tablePrefixCls:Y,locale:Q},null),g(on,{multiple:oe,prefixCls:`${Z}-menu`,class:F.value,onClick:P,onSelect:b,onDeselect:b,selectedKeys:z,getPopupContainer:re,openKeys:C.value,onOpenChange:x},{default:()=>IN({filters:G.filters||[],filterSearch:i.value,prefixCls:ne,filteredKeys:m.value,filterMultiple:oe,searchValue:w.value})})])},j=E(()=>{const z=m.value;return e.column.filterResetToDefaultFilteredValue?C4((e.column.defaultFilteredValue||[]).map(G=>String(G)),z,!0):z.length===0});return()=>{var z;const{tablePrefixCls:G,prefixCls:Q,column:Y,dropdownPrefixCls:oe,locale:Z,getPopupContainer:re}=e;let ne;typeof d.value=="function"?ne=d.value({prefixCls:`${oe}-custom`,setSelectedKeys:W=>b({selectedKeys:W}),selectedKeys:m.value,confirm:A,clearFilters:T,filters:Y.filters,visible:v.value,column:Y.__originColumn__,close:()=>{p(!1)}}):d.value?ne=d.value:ne=g(Le,null,[B(),g("div",{class:`${Q}-dropdown-btns`},[g(Qt,{type:"link",size:"small",disabled:j.value,onClick:()=>T()},{default:()=>[Z.filterReset]}),g(Qt,{type:"primary",size:"small",onClick:_},{default:()=>[Z.filterConfirm]})])]);const X=g(vge,{class:`${Q}-dropdown`},{default:()=>[ne]});let te;return typeof f.value=="function"?te=f.value({filtered:u.value,column:Y.__originColumn__}):f.value?te=f.value:te=g(v$,null,null),g("div",{class:`${Q}-column`},[g("span",{class:`${G}-column-title`},[(z=n.default)===null||z===void 0?void 0:z.call(n)]),g(zr,{overlay:X,trigger:["click"],open:v.value,onOpenChange:R,getPopupContainer:re,placement:H.value==="rtl"?"bottomLeft":"bottomRight"},{default:()=>[g("span",{role:"button",tabindex:-1,class:ge(`${Q}-trigger`,{active:u.value}),onClick:W=>{W.stopPropagation()}},[te])]})])}}});function R1(e,t,n){let o=[];return(e||[]).forEach((r,i)=>{var a,l;const s=Af(i,n),u=r.filterDropdown||((a=r==null?void 0:r.slots)===null||a===void 0?void 0:a.filterDropdown)||r.customFilterDropdown;if(r.filters||u||"onFilter"in r)if("filteredValue"in r){let c=r.filteredValue;u||(c=(l=c==null?void 0:c.map(String))!==null&&l!==void 0?l:c),o.push({column:r,key:Xl(r,s),filteredKeys:c,forceFiltered:r.filtered})}else o.push({column:r,key:Xl(r,s),filteredKeys:t&&r.defaultFilteredValue?r.defaultFilteredValue:void 0,forceFiltered:r.filtered});"children"in r&&(o=[...o,...R1(r.children,t,s)])}),o}function TN(e,t,n,o,r,i,a,l){return n.map((s,u)=>{var c;const d=Af(u,l),{filterMultiple:f=!0,filterMode:p,filterSearch:v}=s;let h=s;const m=s.filterDropdown||((c=s==null?void 0:s.slots)===null||c===void 0?void 0:c.filterDropdown)||s.customFilterDropdown;if(h.filters||m){const b=Xl(h,d),S=o.find(C=>{let{key:$}=C;return b===$});h=y(y({},h),{title:C=>g(qge,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:h,columnKey:b,filterState:S,filterMultiple:f,filterMode:p,filterSearch:v,triggerFilter:i,locale:r,getPopupContainer:a},{default:()=>[h$(s.title,C)]})})}return"children"in h&&(h=y(y({},h),{children:TN(e,t,h.children,o,r,i,a,d)})),h})}function Om(e){let t=[];return(e||[]).forEach(n=>{let{value:o,children:r}=n;t.push(o),r&&(t=[...t,...Om(r)])}),t}function x4(e){const t={};return e.forEach(n=>{let{key:o,filteredKeys:r,column:i}=n;var a;const l=i.filterDropdown||((a=i==null?void 0:i.slots)===null||a===void 0?void 0:a.filterDropdown)||i.customFilterDropdown,{filters:s}=i;if(l)t[o]=r||null;else if(Array.isArray(r)){const u=Om(s);t[o]=u.filter(c=>r.includes(String(c)))}else t[o]=null}),t}function $4(e,t){return t.reduce((n,o)=>{const{column:{onFilter:r,filters:i},filteredKeys:a}=o;return r&&a&&a.length?n.filter(l=>a.some(s=>{const u=Om(i),c=u.findIndex(f=>String(f)===String(s)),d=c!==-1?u[c]:s;return r(d,l)})):n},e)}function EN(e){return e.flatMap(t=>"children"in t?[t,...EN(t.children||[])]:[t])}function Jge(e){let{prefixCls:t,dropdownPrefixCls:n,mergedColumns:o,locale:r,onFilterChange:i,getPopupContainer:a}=e;const l=E(()=>EN(o.value)),[s,u]=$t(R1(l.value,!0)),c=E(()=>{const v=R1(l.value,!1);if(v.length===0)return v;let h=!0,m=!0;if(v.forEach(b=>{let{filteredKeys:S}=b;S!==void 0?h=!1:m=!1}),h){const b=(l.value||[]).map((S,C)=>Xl(S,Af(C)));return s.value.filter(S=>{let{key:C}=S;return b.includes(C)}).map(S=>{const C=l.value[b.findIndex($=>$===S.key)];return y(y({},S),{column:y(y({},S.column),C),forceFiltered:C.filtered})})}return Mt(m,"Table","Columns should all contain `filteredValue` or not contain `filteredValue`."),v}),d=E(()=>x4(c.value)),f=v=>{const h=c.value.filter(m=>{let{key:b}=m;return b!==v.key});h.push(v),u(h),i(x4(h),h)};return[v=>TN(t.value,n.value,v,c.value,r.value,f,a.value),c,d]}function _N(e,t){return e.map(n=>{const o=y({},n);return o.title=h$(o.title,t),"children"in o&&(o.children=_N(o.children,t)),o})}function Zge(e){return[n=>_N(n,e.value)]}function Qge(e){return function(n){let{prefixCls:o,onExpand:r,record:i,expanded:a,expandable:l}=n;const s=`${o}-row-expand-icon`;return g("button",{type:"button",onClick:u=>{r(i,u),u.stopPropagation()},class:ge(s,{[`${s}-spaced`]:!l,[`${s}-expanded`]:l&&a,[`${s}-collapsed`]:l&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a},null)}}function MN(e,t){const n=t.value;return e.map(o=>{var r;if(o===Ai||o===xa)return o;const i=y({},o),{slots:a={}}=i;return i.__originColumn__=o,Mt(!("slots"in i),"Table","`column.slots` is deprecated. Please use `v-slot:headerCell` `v-slot:bodyCell` instead."),Object.keys(a).forEach(l=>{const s=a[l];i[l]===void 0&&n[s]&&(i[l]=n[s])}),t.value.headerCell&&!(!((r=o.slots)===null||r===void 0)&&r.title)&&(i.title=wv(t.value,"headerCell",{title:o.title,column:o},()=>[o.title])),"children"in i&&Array.isArray(i.children)&&(i.children=MN(i.children,t)),i})}function ehe(e){return[n=>MN(n,e)]}const the=e=>{const{componentCls:t}=e,n=`${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`,o=(r,i,a)=>({[`&${t}-${r}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"> table > tbody > tr > td":{[`> ${t}-expanded-row-fixed`]:{margin:`-${i}px -${a+e.lineWidth}px`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:y(y(y({[`> ${t}-title`]:{border:n,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:n,[` > ${t}-content, > ${t}-header, > ${t}-body, @@ -422,7 +422,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `]:{"> td":{borderInlineEnd:0}}}}}},o("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),o("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{[`> ${t}-footer`]:{border:n,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${e.lineWidth}px 0 ${e.lineWidth}px ${e.tableHeaderBg}`}}}}},nhe=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:y(y({},cn),{wordBreak:"keep-all",[` &${t}-cell-fix-left-last, &${t}-cell-fix-right-first - `]:{overflow:"visible",[`${t}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${t}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},ohe=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:"center",color:e.colorTextDisabled,"&:hover > td":{background:e.colorBgContainer}}}}},rhe=e=>{const{componentCls:t,antCls:n,controlInteractiveSize:o,motionDurationSlow:r,lineWidth:i,paddingXS:a,lineType:l,tableBorderColor:s,tableExpandIconBg:u,tableExpandColumnWidth:c,borderRadius:d,fontSize:f,fontSizeSM:p,lineHeight:v,tablePaddingVertical:h,tablePaddingHorizontal:m,tableExpandedRowBg:b,paddingXXS:S}=e,C=o/2-i,$=C*2+i*3,x=`${i}px ${l} ${s}`,P=S-i;return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:c},[`${t}-row-expand-icon-cell`]:{textAlign:"center",[`${t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${t}-row-indent`]:{height:1,float:"left"},[`${t}-row-expand-icon`]:y(y({},xv(e)),{position:"relative",float:"left",boxSizing:"border-box",width:$,height:$,padding:0,color:"inherit",lineHeight:`${$}px`,background:u,border:x,borderRadius:d,transform:`scale(${o/$})`,transition:`all ${r}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${r} ease-out`,content:'""'},"&::before":{top:C,insetInlineEnd:P,insetInlineStart:P,height:i},"&::after":{top:P,bottom:P,insetInlineStart:C,width:i,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:(f*v-i*3)/2-Math.ceil((p*1.4-i*3)/2),marginInlineEnd:a},[`tr${t}-expanded-row`]:{"&, &:hover":{"> td":{background:b}},[`${n}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`-${h}px -${m}px`,padding:`${h}px ${m}px`}}}},ihe=e=>{const{componentCls:t,antCls:n,iconCls:o,tableFilterDropdownWidth:r,tableFilterDropdownSearchWidth:i,paddingXXS:a,paddingXS:l,colorText:s,lineWidth:u,lineType:c,tableBorderColor:d,tableHeaderIconColor:f,fontSizeSM:p,tablePaddingHorizontal:v,borderRadius:h,motionDurationSlow:m,colorTextDescription:b,colorPrimary:S,tableHeaderFilterActiveBg:C,colorTextDisabled:$,tableFilterDropdownBg:x,tableFilterDropdownHeight:P,controlItemBgHover:w,controlItemBgActive:O,boxShadowSecondary:I}=e,_=`${n}-dropdown`,T=`${t}-filter-dropdown`,A=`${n}-tree`,R=`${u}px ${c} ${d}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-a,marginInline:`${a}px ${-v/2}px`,padding:`0 ${a}px`,color:f,fontSize:p,borderRadius:h,cursor:"pointer",transition:`all ${m}`,"&:hover":{color:b,background:C},"&.active":{color:S}}}},{[`${n}-dropdown`]:{[T]:y(y({},qe(e)),{minWidth:r,backgroundColor:x,borderRadius:h,boxShadow:I,[`${_}-menu`]:{maxHeight:P,overflowX:"hidden",border:0,boxShadow:"none","&:empty::after":{display:"block",padding:`${l}px 0`,color:$,fontSize:p,textAlign:"center",content:'"Not Found"'}},[`${T}-tree`]:{paddingBlock:`${l}px 0`,paddingInline:l,[A]:{padding:0},[`${A}-treenode ${A}-node-content-wrapper:hover`]:{backgroundColor:w},[`${A}-treenode-checkbox-checked ${A}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:O}}},[`${T}-search`]:{padding:l,borderBottom:R,"&-input":{input:{minWidth:i},[o]:{color:$}}},[`${T}-checkall`]:{width:"100%",marginBottom:a,marginInlineStart:a},[`${T}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${l-u}px ${l}px`,overflow:"hidden",backgroundColor:"inherit",borderTop:R}})}},{[`${n}-dropdown ${T}, ${T}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:l,color:s},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},ahe=e=>{const{componentCls:t,lineWidth:n,colorSplit:o,motionDurationSlow:r,zIndexTableFixed:i,tableBg:a,zIndexTableSticky:l}=e,s=o;return{[`${t}-wrapper`]:{[` + `]:{overflow:"visible",[`${t}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${t}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},ohe=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:"center",color:e.colorTextDisabled,"&:hover > td":{background:e.colorBgContainer}}}}},rhe=e=>{const{componentCls:t,antCls:n,controlInteractiveSize:o,motionDurationSlow:r,lineWidth:i,paddingXS:a,lineType:l,tableBorderColor:s,tableExpandIconBg:u,tableExpandColumnWidth:c,borderRadius:d,fontSize:f,fontSizeSM:p,lineHeight:v,tablePaddingVertical:h,tablePaddingHorizontal:m,tableExpandedRowBg:b,paddingXXS:S}=e,C=o/2-i,$=C*2+i*3,x=`${i}px ${l} ${s}`,P=S-i;return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:c},[`${t}-row-expand-icon-cell`]:{textAlign:"center",[`${t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${t}-row-indent`]:{height:1,float:"left"},[`${t}-row-expand-icon`]:y(y({},Cv(e)),{position:"relative",float:"left",boxSizing:"border-box",width:$,height:$,padding:0,color:"inherit",lineHeight:`${$}px`,background:u,border:x,borderRadius:d,transform:`scale(${o/$})`,transition:`all ${r}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${r} ease-out`,content:'""'},"&::before":{top:C,insetInlineEnd:P,insetInlineStart:P,height:i},"&::after":{top:P,bottom:P,insetInlineStart:C,width:i,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:(f*v-i*3)/2-Math.ceil((p*1.4-i*3)/2),marginInlineEnd:a},[`tr${t}-expanded-row`]:{"&, &:hover":{"> td":{background:b}},[`${n}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`-${h}px -${m}px`,padding:`${h}px ${m}px`}}}},ihe=e=>{const{componentCls:t,antCls:n,iconCls:o,tableFilterDropdownWidth:r,tableFilterDropdownSearchWidth:i,paddingXXS:a,paddingXS:l,colorText:s,lineWidth:u,lineType:c,tableBorderColor:d,tableHeaderIconColor:f,fontSizeSM:p,tablePaddingHorizontal:v,borderRadius:h,motionDurationSlow:m,colorTextDescription:b,colorPrimary:S,tableHeaderFilterActiveBg:C,colorTextDisabled:$,tableFilterDropdownBg:x,tableFilterDropdownHeight:P,controlItemBgHover:w,controlItemBgActive:O,boxShadowSecondary:I}=e,_=`${n}-dropdown`,T=`${t}-filter-dropdown`,A=`${n}-tree`,R=`${u}px ${c} ${d}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-a,marginInline:`${a}px ${-v/2}px`,padding:`0 ${a}px`,color:f,fontSize:p,borderRadius:h,cursor:"pointer",transition:`all ${m}`,"&:hover":{color:b,background:C},"&.active":{color:S}}}},{[`${n}-dropdown`]:{[T]:y(y({},qe(e)),{minWidth:r,backgroundColor:x,borderRadius:h,boxShadow:I,[`${_}-menu`]:{maxHeight:P,overflowX:"hidden",border:0,boxShadow:"none","&:empty::after":{display:"block",padding:`${l}px 0`,color:$,fontSize:p,textAlign:"center",content:'"Not Found"'}},[`${T}-tree`]:{paddingBlock:`${l}px 0`,paddingInline:l,[A]:{padding:0},[`${A}-treenode ${A}-node-content-wrapper:hover`]:{backgroundColor:w},[`${A}-treenode-checkbox-checked ${A}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:O}}},[`${T}-search`]:{padding:l,borderBottom:R,"&-input":{input:{minWidth:i},[o]:{color:$}}},[`${T}-checkall`]:{width:"100%",marginBottom:a,marginInlineStart:a},[`${T}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${l-u}px ${l}px`,overflow:"hidden",backgroundColor:"inherit",borderTop:R}})}},{[`${n}-dropdown ${T}, ${T}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:l,color:s},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},ahe=e=>{const{componentCls:t,lineWidth:n,colorSplit:o,motionDurationSlow:r,zIndexTableFixed:i,tableBg:a,zIndexTableSticky:l}=e,s=o;return{[`${t}-wrapper`]:{[` ${t}-cell-fix-left, ${t}-cell-fix-right `]:{position:"sticky !important",zIndex:i,background:a},[` @@ -450,7 +450,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `]:{padding:`${r}px ${i}px`},[`${t}-filter-trigger`]:{marginInlineEnd:`-${i/2}px`},[`${t}-expanded-row-fixed`]:{margin:`-${r}px -${i}px`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:`-${r}px`,marginInline:`${e.tableExpandColumnWidth-i}px -${i}px`}},[`${t}-selection-column`]:{paddingInlineStart:`${i/4}px`}}});return{[`${t}-wrapper`]:y(y({},n("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),n("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},fhe=e=>{const{componentCls:t}=e;return{[`${t}-wrapper ${t}-resize-handle`]:{position:"absolute",top:0,height:"100% !important",bottom:0,left:" auto !important",right:" -8px",cursor:"col-resize",touchAction:"none",userSelect:"auto",width:"16px",zIndex:1,"&-line":{display:"block",width:"1px",marginLeft:"7px",height:"100% !important",backgroundColor:e.colorPrimary,opacity:0},"&:hover &-line":{opacity:1}},[`${t}-wrapper ${t}-resize-handle.dragging`]:{overflow:"hidden",[`${t}-resize-handle-line`]:{opacity:1},"&:before":{position:"absolute",top:0,bottom:0,content:'" "',width:"200vw",transform:"translateX(-50%)",opacity:0}}}},phe=e=>{const{componentCls:t,marginXXS:n,fontSizeIcon:o,tableHeaderIconColor:r,tableHeaderIconColorHover:i}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},[` &${t}-cell-fix-left:hover, &${t}-cell-fix-right:hover - `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${t}-column-sorter`]:{marginInlineStart:n,color:r,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:o,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:i}}}},ghe=e=>{const{componentCls:t,opacityLoading:n,tableScrollThumbBg:o,tableScrollThumbBgHover:r,tableScrollThumbSize:i,tableScrollBg:a,zIndexTableSticky:l}=e,s=`${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:l,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${i}px !important`,zIndex:l,display:"flex",alignItems:"center",background:a,borderTop:s,opacity:n,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:i,backgroundColor:o,borderRadius:100,transition:`all ${e.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:r}}}}}}},wT=e=>{const{componentCls:t,lineWidth:n,tableBorderColor:o}=e,r=`${n}px ${e.lineType} ${o}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:r}}},[`div${t}-summary`]:{boxShadow:`0 -${n}px 0 ${o}`}}}},hhe=e=>{const{componentCls:t,fontWeightStrong:n,tablePaddingVertical:o,tablePaddingHorizontal:r,lineWidth:i,lineType:a,tableBorderColor:l,tableFontSize:s,tableBg:u,tableRadius:c,tableHeaderTextColor:d,motionDurationMid:f,tableHeaderBg:p,tableHeaderCellSplitColor:v,tableRowHoverBg:h,tableSelectedRowBg:m,tableSelectedRowHoverBg:b,tableFooterTextColor:S,tableFooterBg:C,paddingContentVerticalLG:$}=e,x=`${i}px ${a} ${l}`;return{[`${t}-wrapper`]:y(y({clear:"both",maxWidth:"100%"},Kr()),{[t]:y(y({},qe(e)),{fontSize:s,background:u,borderRadius:`${c}px ${c}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${c}px ${c}px 0 0`,borderCollapse:"separate",borderSpacing:0},[` + `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${t}-column-sorter`]:{marginInlineStart:n,color:r,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:o,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:i}}}},ghe=e=>{const{componentCls:t,opacityLoading:n,tableScrollThumbBg:o,tableScrollThumbBgHover:r,tableScrollThumbSize:i,tableScrollBg:a,zIndexTableSticky:l}=e,s=`${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:l,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${i}px !important`,zIndex:l,display:"flex",alignItems:"center",background:a,borderTop:s,opacity:n,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:i,backgroundColor:o,borderRadius:100,transition:`all ${e.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:r}}}}}}},w4=e=>{const{componentCls:t,lineWidth:n,tableBorderColor:o}=e,r=`${n}px ${e.lineType} ${o}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:r}}},[`div${t}-summary`]:{boxShadow:`0 -${n}px 0 ${o}`}}}},hhe=e=>{const{componentCls:t,fontWeightStrong:n,tablePaddingVertical:o,tablePaddingHorizontal:r,lineWidth:i,lineType:a,tableBorderColor:l,tableFontSize:s,tableBg:u,tableRadius:c,tableHeaderTextColor:d,motionDurationMid:f,tableHeaderBg:p,tableHeaderCellSplitColor:v,tableRowHoverBg:h,tableSelectedRowBg:m,tableSelectedRowHoverBg:b,tableFooterTextColor:S,tableFooterBg:C,paddingContentVerticalLG:$}=e,x=`${i}px ${a} ${l}`;return{[`${t}-wrapper`]:y(y({clear:"both",maxWidth:"100%"},Kr()),{[t]:y(y({},qe(e)),{fontSize:s,background:u,borderRadius:`${c}px ${c}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${c}px ${c}px 0 0`,borderCollapse:"separate",borderSpacing:0},[` ${t}-thead > tr > th, ${t}-tbody > tr > td, tfoot > tr > th, @@ -462,7 +462,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `]:{[t]:{marginBlock:`-${o}px`,marginInline:`${e.tableExpandColumnWidth-r}px -${r}px`,[`${t}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},[` &${t}-row:hover > td, > td${t}-cell-row-hover - `]:{background:h},[`&${t}-row-selected`]:{"> td":{background:m},"&:hover > td":{background:b}}}},[`${t}-footer`]:{padding:`${o}px ${r}px`,color:S,background:C}})}},vhe=Ue("Table",e=>{const{controlItemBgActive:t,controlItemBgActiveHover:n,colorTextPlaceholder:o,colorTextHeading:r,colorSplit:i,colorBorderSecondary:a,fontSize:l,padding:s,paddingXS:u,paddingSM:c,controlHeight:d,colorFillAlter:f,colorIcon:p,colorIconHover:v,opacityLoading:h,colorBgContainer:m,borderRadiusLG:b,colorFillContent:S,colorFillSecondary:C,controlInteractiveSize:$}=e,x=new St(p),P=new St(v),w=t,O=2,I=new St(C).onBackground(m).toHexString(),_=new St(S).onBackground(m).toHexString(),T=new St(f).onBackground(m).toHexString(),A=Be(e,{tableFontSize:l,tableBg:m,tableRadius:b,tablePaddingVertical:s,tablePaddingHorizontal:s,tablePaddingVerticalMiddle:c,tablePaddingHorizontalMiddle:u,tablePaddingVerticalSmall:u,tablePaddingHorizontalSmall:u,tableBorderColor:a,tableHeaderTextColor:r,tableHeaderBg:T,tableFooterTextColor:r,tableFooterBg:T,tableHeaderCellSplitColor:a,tableHeaderSortBg:I,tableHeaderSortHoverBg:_,tableHeaderIconColor:x.clone().setAlpha(x.getAlpha()*h).toRgbString(),tableHeaderIconColorHover:P.clone().setAlpha(P.getAlpha()*h).toRgbString(),tableBodySortBg:T,tableFixedHeaderSortActiveBg:I,tableHeaderFilterActiveBg:S,tableFilterDropdownBg:m,tableRowHoverBg:T,tableSelectedRowBg:w,tableSelectedRowHoverBg:n,zIndexTableFixed:O,zIndexTableSticky:O+1,tableFontSizeMiddle:l,tableFontSizeSmall:l,tableSelectionColumnWidth:d,tableExpandIconBg:m,tableExpandColumnWidth:$+2*e.padding,tableExpandedRowBg:f,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:o,tableScrollThumbBgHover:r,tableScrollBg:i});return[hhe(A),lhe(A),wT(A),phe(A),ihe(A),the(A),she(A),rhe(A),wT(A),ohe(A),uhe(A),ahe(A),ghe(A),nhe(A),dhe(A),fhe(A),che(A)]}),mhe=[],AN=()=>({prefixCls:Ne(),columns:pt(),rowKey:He([String,Function]),tableLayout:Ne(),rowClassName:He([String,Function]),title:ye(),footer:ye(),id:Ne(),showHeader:$e(),components:De(),customRow:ye(),customHeaderRow:ye(),direction:Ne(),expandFixed:He([Boolean,String]),expandColumnWidth:Number,expandedRowKeys:pt(),defaultExpandedRowKeys:pt(),expandedRowRender:ye(),expandRowByClick:$e(),expandIcon:ye(),onExpand:ye(),onExpandedRowsChange:ye(),"onUpdate:expandedRowKeys":ye(),defaultExpandAllRows:$e(),indentSize:Number,expandIconColumnIndex:Number,showExpandColumn:$e(),expandedRowClassName:ye(),childrenColumnName:Ne(),rowExpandable:ye(),sticky:He([Boolean,Object]),dropdownPrefixCls:String,dataSource:pt(),pagination:He([Boolean,Object]),loading:He([Boolean,Object]),size:Ne(),bordered:$e(),locale:De(),onChange:ye(),onResizeColumn:ye(),rowSelection:De(),getPopupContainer:ye(),scroll:De(),sortDirections:pt(),showSorterTooltip:He([Boolean,Object],!0),transformCellText:ye()}),bhe=le({name:"InternalTable",inheritAttrs:!1,props:Qe(y(y({},AN()),{contextSlots:De()}),{rowKey:"key"}),setup(e,t){let{attrs:n,slots:o,expose:r,emit:i}=t;Mt(!(typeof e.rowKey=="function"&&e.rowKey.length>1),"Table","`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected."),dpe(E(()=>e.contextSlots)),fpe({onResizeColumn:(fe,pe)=>{i("resizeColumn",fe,pe)}});const a=nu(),l=E(()=>{const fe=new Set(Object.keys(a.value).filter(pe=>a.value[pe]));return e.columns.filter(pe=>!pe.responsive||pe.responsive.some(ve=>fe.has(ve)))}),{size:s,renderEmpty:u,direction:c,prefixCls:d,configProvider:f}=Te("table",e),[p,v]=vhe(d),h=E(()=>{var fe;return e.transformCellText||((fe=f.transformCellText)===null||fe===void 0?void 0:fe.value)}),[m]=wr("Table",$o.Table,We(e,"locale")),b=E(()=>e.dataSource||mhe),S=E(()=>f.getPrefixCls("dropdown",e.dropdownPrefixCls)),C=E(()=>e.childrenColumnName||"children"),$=E(()=>b.value.some(fe=>fe==null?void 0:fe[C.value])?"nest":e.expandedRowRender?"row":null),x=rt({body:null}),P=fe=>{y(x,fe)},w=E(()=>typeof e.rowKey=="function"?e.rowKey:fe=>fe==null?void 0:fe[e.rowKey]),[O]=oge(b,C,w),I={},_=function(fe,pe){let ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{pagination:he,scroll:V,onChange:q}=e,ie=y(y({},I),fe);ve&&(I.resetPagination(),ie.pagination.current&&(ie.pagination.current=1),he&&he.onChange&&he.onChange(1,ie.pagination.pageSize)),V&&V.scrollToFirstRowOnChange!==!1&&x.body&&US(0,{getContainer:()=>x.body}),q==null||q(ie.pagination,ie.filters,ie.sorter,{currentDataSource:$T(M1(b.value,ie.sorterStates,C.value),ie.filterStates),action:pe})},T=(fe,pe)=>{_({sorter:fe,sorterStates:pe},"sort",!1)},[A,R,H,M]=fge({prefixCls:d,mergedColumns:l,onSorterChange:T,sortDirections:E(()=>e.sortDirections||["ascend","descend"]),tableLocale:m,showSorterTooltip:We(e,"showSorterTooltip")}),D=E(()=>M1(b.value,R.value,C.value)),N=(fe,pe)=>{_({filters:fe,filterStates:pe},"filter",!0)},[L,F,B]=Jge({prefixCls:d,locale:m,dropdownPrefixCls:S,mergedColumns:l,onFilterChange:N,getPopupContainer:We(e,"getPopupContainer")}),j=E(()=>$T(D.value,F.value)),[z]=ehe(We(e,"contextSlots")),G=E(()=>{const fe={},pe=B.value;return Object.keys(pe).forEach(ve=>{pe[ve]!==null&&(fe[ve]=pe[ve])}),y(y({},H.value),{filters:fe})}),[Q]=Zge(G),Y=(fe,pe)=>{_({pagination:y(y({},I.pagination),{current:fe,pageSize:pe})},"paginate")},[oe,Z]=nge(E(()=>j.value.length),We(e,"pagination"),Y);Ve(()=>{I.sorter=M.value,I.sorterStates=R.value,I.filters=B.value,I.filterStates=F.value,I.pagination=e.pagination===!1?{}:tge(oe.value,e.pagination),I.resetPagination=Z});const re=E(()=>{if(e.pagination===!1||!oe.value.pageSize)return j.value;const{current:fe=1,total:pe,pageSize:ve=O1}=oe.value;return Mt(fe>0,"Table","`current` should be positive number."),j.value.lengthve?j.value.slice((fe-1)*ve,fe*ve):j.value:j.value.slice((fe-1)*ve,fe*ve)});Ve(()=>{ot(()=>{const{total:fe,pageSize:pe=O1}=oe.value;j.value.lengthpe&&Mt(!1,"Table","`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.")})},{flush:"post"});const ne=E(()=>e.showExpandColumn===!1?-1:$.value==="nest"&&e.expandIconColumnIndex===void 0?e.rowSelection?1:0:e.expandIconColumnIndex>0&&e.rowSelection?e.expandIconColumnIndex-1:e.expandIconColumnIndex),X=ae();be(()=>e.rowSelection,()=>{X.value=e.rowSelection?y({},e.rowSelection):e.rowSelection},{deep:!0,immediate:!0});const[te,W]=ige(X,{prefixCls:d,data:j,pageData:re,getRowKey:w,getRecordByKey:O,expandType:$,childrenColumnName:C,locale:m,getPopupContainer:E(()=>e.getPopupContainer)}),U=(fe,pe,ve)=>{let he;const{rowClassName:V}=e;return typeof V=="function"?he=ge(V(fe,pe,ve)):he=ge(V),ge({[`${d.value}-row-selected`]:W.value.has(w.value(fe,pe))},he)};r({selectedKeySet:W});const J=E(()=>typeof e.indentSize=="number"?e.indentSize:15),de=fe=>Q(te(L(A(z(fe)))));return()=>{var fe;const{expandIcon:pe=o.expandIcon||Qge(m.value),pagination:ve,loading:he,bordered:V}=e;let q,ie;if(ve!==!1&&(!((fe=oe.value)===null||fe===void 0)&&fe.total)){let ee;oe.value.size?ee=oe.value.size:ee=s.value==="small"||s.value==="middle"?"small":void 0;const ue=_e=>g(Cm,k(k({},oe.value),{},{class:[`${d.value}-pagination ${d.value}-pagination-${_e}`,oe.value.class],size:ee}),null),xe=c.value==="rtl"?"left":"right",{position:Pe}=oe.value;if(Pe!==null&&Array.isArray(Pe)){const _e=Pe.find(Oe=>Oe.includes("top")),Ce=Pe.find(Oe=>Oe.includes("bottom")),we=Pe.every(Oe=>`${Oe}`=="none");!_e&&!Ce&&!we&&(ie=ue(xe)),_e&&(q=ue(_e.toLowerCase().replace("top",""))),Ce&&(ie=ue(Ce.toLowerCase().replace("bottom","")))}else ie=ue(xe)}let me;typeof he=="boolean"?me={spinning:he}:typeof he=="object"&&(me=y({spinning:!0},he));const Se=ge(`${d.value}-wrapper`,{[`${d.value}-wrapper-rtl`]:c.value==="rtl"},n.class,v.value),ce=it(e,["columns"]);return p(g("div",{class:Se,style:n.style},[g(di,k({spinning:!1},me),{default:()=>[q,g(Qpe,k(k(k({},n),ce),{},{expandedRowKeys:e.expandedRowKeys,defaultExpandedRowKeys:e.defaultExpandedRowKeys,expandIconColumnIndex:ne.value,indentSize:J.value,expandIcon:pe,columns:l.value,direction:c.value,prefixCls:d.value,class:ge({[`${d.value}-middle`]:s.value==="middle",[`${d.value}-small`]:s.value==="small",[`${d.value}-bordered`]:V,[`${d.value}-empty`]:b.value.length===0}),data:re.value,rowKey:w.value,rowClassName:U,internalHooks:P1,internalRefs:x,onUpdateInternalRefs:P,transformColumns:de,transformCellText:h.value}),y(y({},o),{emptyText:()=>{var ee,ue;return((ee=o.emptyText)===null||ee===void 0?void 0:ee.call(o))||((ue=e.locale)===null||ue===void 0?void 0:ue.emptyText)||u("Table")}})),ie]})]))}}}),pb=le({name:"ATable",inheritAttrs:!1,props:Qe(AN(),{rowKey:"key"}),slots:Object,setup(e,t){let{attrs:n,slots:o,expose:r}=t;const i=ae();return r({table:i}),()=>{var a;const l=e.columns||bN((a=o.default)===null||a===void 0?void 0:a.call(o));return g(bhe,k(k(k({ref:i},n),e),{},{columns:l||[],expandedRowRender:o.expandedRowRender||e.expandedRowRender,contextSlots:y({},o)}),o)}}}),mg=le({name:"ATableColumn",slots:Object,render(){return null}}),bg=le({name:"ATableColumnGroup",slots:Object,__ANT_TABLE_COLUMN_GROUP:!0,render(){return null}}),Ah=zpe,Rh=Vpe,yg=y(Kpe,{Cell:Rh,Row:Ah,name:"ATableSummary"}),yhe=y(pb,{SELECTION_ALL:I1,SELECTION_INVERT:T1,SELECTION_NONE:E1,SELECTION_COLUMN:Ai,EXPAND_COLUMN:xa,Column:mg,ColumnGroup:bg,Summary:yg,install:e=>(e.component(yg.name,yg),e.component(Rh.name,Rh),e.component(Ah.name,Ah),e.component(pb.name,pb),e.component(mg.name,mg),e.component(bg.name,bg),e)}),She={prefixCls:String,placeholder:String,value:String,handleClear:Function,disabled:{type:Boolean,default:void 0},onChange:Function},Che=le({compatConfig:{MODE:3},name:"Search",inheritAttrs:!1,props:Qe(She,{placeholder:""}),emits:["change"],setup(e,t){let{emit:n}=t;const o=r=>{var i;n("change",r),r.target.value===""&&((i=e.handleClear)===null||i===void 0||i.call(e))};return()=>{const{placeholder:r,value:i,prefixCls:a,disabled:l}=e;return g(Cn,{placeholder:r,class:a,value:i,onChange:o,disabled:l,allowClear:!0},{prefix:()=>g(qc,null,null)})}}});var xhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};function PT(e){for(var t=1;t{const{renderedText:o,renderedEl:r,item:i,checked:a,disabled:l,prefixCls:s,showRemove:u}=e,c=ge({[`${s}-content-item`]:!0,[`${s}-content-item-disabled`]:l||i.disabled});let d;return(typeof o=="string"||typeof o=="number")&&(d=String(o)),g(ts,{componentName:"Transfer",defaultLocale:$o.Transfer},{default:f=>{const p=g("span",{class:`${s}-content-item-text`},[r]);return u?g("li",{class:c,title:d},[p,g(Eh,{disabled:l||i.disabled,class:`${s}-content-item-remove`,"aria-label":f.remove,onClick:()=>{n("remove",i)}},{default:()=>[g(Tm,null,null)]})]):g("li",{class:c,title:d,onClick:l||i.disabled?whe:()=>{n("click",i)}},[g(gr,{class:`${s}-checkbox`,checked:a,disabled:l||i.disabled},null),p])}})}}}),Ihe={prefixCls:String,filteredRenderItems:K.array.def([]),selectedKeys:K.array,disabled:$e(),showRemove:$e(),pagination:K.any,onItemSelect:Function,onScroll:Function,onItemRemove:Function};function The(e){if(!e)return null;const t={pageSize:10,simple:!0,showSizeChanger:!1,showLessItems:!1};return typeof e=="object"?y(y({},t),e):t}const Ehe=le({compatConfig:{MODE:3},name:"ListBody",inheritAttrs:!1,props:Ihe,emits:["itemSelect","itemRemove","scroll"],setup(e,t){let{emit:n,expose:o}=t;const r=ae(1),i=d=>{const{selectedKeys:f}=e,p=f.indexOf(d.key)>=0;n("itemSelect",d.key,!p)},a=d=>{n("itemRemove",[d.key])},l=d=>{n("scroll",d)},s=E(()=>The(e.pagination));be([s,()=>e.filteredRenderItems],()=>{if(s.value){const d=Math.ceil(e.filteredRenderItems.length/s.value.pageSize);r.value=Math.min(r.value,d)}},{immediate:!0});const u=E(()=>{const{filteredRenderItems:d}=e;let f=d;return s.value&&(f=d.slice((r.value-1)*s.value.pageSize,r.value*s.value.pageSize)),f}),c=d=>{r.value=d};return o({items:u}),()=>{const{prefixCls:d,filteredRenderItems:f,selectedKeys:p,disabled:v,showRemove:h}=e;let m=null;s.value&&(m=g(Cm,{simple:s.value.simple,showSizeChanger:s.value.showSizeChanger,showLessItems:s.value.showLessItems,size:"small",disabled:v,class:`${d}-pagination`,total:f.length,pageSize:s.value.pageSize,current:r.value,onChange:c},null));const b=u.value.map(S=>{let{renderedEl:C,renderedText:$,item:x}=S;const{disabled:P}=x,w=p.indexOf(x.key)>=0;return g(Ohe,{disabled:v||P,key:x.key,item:x,renderedText:$,renderedEl:C,checked:w,prefixCls:d,onClick:i,onRemove:a,showRemove:h},null)});return g(Le,null,[g("ul",{class:ge(`${d}-content`,{[`${d}-content-show-remove`]:h}),onScroll:l},[b]),m])}}}),D1=e=>{const t=new Map;return e.forEach((n,o)=>{t.set(n,o)}),t},_he=e=>{const t=new Map;return e.forEach((n,o)=>{let{disabled:r,key:i}=n;r&&t.set(i,o)}),t},Mhe=()=>null;function Ahe(e){return!!(e&&!sn(e)&&Object.prototype.toString.call(e)==="[object Object]")}function yp(e){return e.filter(t=>!t.disabled).map(t=>t.key)}const Rhe={prefixCls:String,dataSource:pt([]),filter:String,filterOption:Function,checkedKeys:K.arrayOf(K.string),handleFilter:Function,handleClear:Function,renderItem:Function,showSearch:$e(!1),searchPlaceholder:String,notFoundContent:K.any,itemUnit:String,itemsUnit:String,renderList:K.any,disabled:$e(),direction:Ne(),showSelectAll:$e(),remove:String,selectAll:String,selectCurrent:String,selectInvert:String,removeAll:String,removeCurrent:String,selectAllLabel:K.any,showRemove:$e(),pagination:K.any,onItemSelect:Function,onItemSelectAll:Function,onItemRemove:Function,onScroll:Function},OT=le({compatConfig:{MODE:3},name:"TransferList",inheritAttrs:!1,props:Rhe,slots:Object,setup(e,t){let{attrs:n,slots:o}=t;const r=ae(""),i=ae(),a=ae(),l=(x,P)=>{let w=x?x(P):null;const O=!!w&&zt(w).length>0;return O||(w=g(Ehe,k(k({},P),{},{ref:a}),null)),{customize:O,bodyContent:w}},s=x=>{const{renderItem:P=Mhe}=e,w=P(x),O=Ahe(w);return{renderedText:O?w.value:w,renderedEl:O?w.label:w,item:x}},u=ae([]),c=ae([]);Ve(()=>{const x=[],P=[];e.dataSource.forEach(w=>{const O=s(w),{renderedText:I}=O;if(r.value&&r.value.trim()&&!b(I,w))return null;x.push(w),P.push(O)}),u.value=x,c.value=P});const d=E(()=>{const{checkedKeys:x}=e;if(x.length===0)return"none";const P=D1(x);return u.value.every(w=>P.has(w.key)||!!w.disabled)?"all":"part"}),f=E(()=>yp(u.value)),p=(x,P)=>Array.from(new Set([...x,...e.checkedKeys])).filter(w=>P.indexOf(w)===-1),v=x=>{let{disabled:P,prefixCls:w}=x;var O;const I=d.value==="all";return g(gr,{disabled:((O=e.dataSource)===null||O===void 0?void 0:O.length)===0||P,checked:I,indeterminate:d.value==="part",class:`${w}-checkbox`,onChange:()=>{const T=f.value;e.onItemSelectAll(p(I?[]:T,I?e.checkedKeys:[]))}},null)},h=x=>{var P;const{target:{value:w}}=x;r.value=w,(P=e.handleFilter)===null||P===void 0||P.call(e,x)},m=x=>{var P;r.value="",(P=e.handleClear)===null||P===void 0||P.call(e,x)},b=(x,P)=>{const{filterOption:w}=e;return w?w(r.value,P):x.includes(r.value)},S=(x,P)=>{const{itemsUnit:w,itemUnit:O,selectAllLabel:I}=e;if(I)return typeof I=="function"?I({selectedCount:x,totalCount:P}):I;const _=P>1?w:O;return g(Le,null,[(x>0?`${x}/`:"")+P,zn(" "),_])},C=E(()=>Array.isArray(e.notFoundContent)?e.notFoundContent[e.direction==="left"?0:1]:e.notFoundContent),$=(x,P,w,O,I,_)=>{const T=I?g("div",{class:`${x}-body-search-wrapper`},[g(Che,{prefixCls:`${x}-search`,onChange:h,handleClear:m,placeholder:P,value:r.value,disabled:_},null)]):null;let A;const{onEvents:R}=RS(n),{bodyContent:H,customize:M}=l(O,y(y(y({},e),{filteredItems:u.value,filteredRenderItems:c.value,selectedKeys:w}),R));return M?A=g("div",{class:`${x}-body-customize-wrapper`},[H]):A=u.value.length?H:g("div",{class:`${x}-body-not-found`},[C.value]),g("div",{class:I?`${x}-body ${x}-body-with-search`:`${x}-body`,ref:i},[T,A])};return()=>{var x,P;const{prefixCls:w,checkedKeys:O,disabled:I,showSearch:_,searchPlaceholder:T,selectAll:A,selectCurrent:R,selectInvert:H,removeAll:M,removeCurrent:D,renderList:N,onItemSelectAll:L,onItemRemove:F,showSelectAll:B=!0,showRemove:j,pagination:z}=e,G=(x=o.footer)===null||x===void 0?void 0:x.call(o,y({},e)),Q=ge(w,{[`${w}-with-pagination`]:!!z,[`${w}-with-footer`]:!!G}),Y=$(w,T,O,N,_,I),oe=G?g("div",{class:`${w}-footer`},[G]):null,Z=!j&&!z&&v({disabled:I,prefixCls:w});let re=null;j?re=g(on,null,{default:()=>[z&&g(on.Item,{key:"removeCurrent",onClick:()=>{const X=yp((a.value.items||[]).map(te=>te.item));F==null||F(X)}},{default:()=>[D]}),g(on.Item,{key:"removeAll",onClick:()=>{F==null||F(f.value)}},{default:()=>[M]})]}):re=g(on,null,{default:()=>[g(on.Item,{key:"selectAll",onClick:()=>{const X=f.value;L(p(X,[]))}},{default:()=>[A]}),z&&g(on.Item,{onClick:()=>{const X=yp((a.value.items||[]).map(te=>te.item));L(p(X,[]))}},{default:()=>[R]}),g(on.Item,{key:"selectInvert",onClick:()=>{let X;z?X=yp((a.value.items||[]).map(J=>J.item)):X=f.value;const te=new Set(O),W=[],U=[];X.forEach(J=>{te.has(J)?U.push(J):W.push(J)}),L(p(W,U))}},{default:()=>[H]})]});const ne=g(zr,{class:`${w}-header-dropdown`,overlay:re,disabled:I},{default:()=>[g(cs,null,null)]});return g("div",{class:Q,style:n.style},[g("div",{class:`${w}-header`},[B?g(Le,null,[Z,ne]):null,g("span",{class:`${w}-header-selected`},[g("span",null,[S(O.length,u.value.length)]),g("span",{class:`${w}-header-title`},[(P=o.titleText)===null||P===void 0?void 0:P.call(o)])])]),Y,oe])}}});function IT(){}const $$=e=>{const{disabled:t,moveToLeft:n=IT,moveToRight:o=IT,leftArrowText:r="",rightArrowText:i="",leftActive:a,rightActive:l,class:s,style:u,direction:c,oneWay:d}=e;return g("div",{class:s,style:u},[g(Qt,{type:"primary",size:"small",disabled:t||!l,onClick:o,icon:g(c!=="rtl"?Jo:mi,null,null)},{default:()=>[i]}),!d&&g(Qt,{type:"primary",size:"small",disabled:t||!a,onClick:n,icon:g(c!=="rtl"?mi:Jo,null,null)},{default:()=>[r]})])};$$.displayName="Operation";$$.inheritAttrs=!1;const Dhe=e=>{const{antCls:t,componentCls:n,listHeight:o,controlHeightLG:r,marginXXS:i,margin:a}=e,l=`${t}-table`,s=`${t}-input`;return{[`${n}-customize-list`]:{[`${n}-list`]:{flex:"1 1 50%",width:"auto",height:"auto",minHeight:o},[`${l}-wrapper`]:{[`${l}-small`]:{border:0,borderRadius:0,[`${l}-selection-column`]:{width:r,minWidth:r}},[`${l}-pagination${l}-pagination`]:{margin:`${a}px 0 ${i}px`}},[`${s}[disabled]`]:{backgroundColor:"transparent"}}}},TT=(e,t)=>{const{componentCls:n,colorBorder:o}=e;return{[`${n}-list`]:{borderColor:t,"&-search:not([disabled])":{borderColor:o}}}},Nhe=e=>{const{componentCls:t}=e;return{[`${t}-status-error`]:y({},TT(e,e.colorError)),[`${t}-status-warning`]:y({},TT(e,e.colorWarning))}},khe=e=>{const{componentCls:t,colorBorder:n,colorSplit:o,lineWidth:r,transferItemHeight:i,transferHeaderHeight:a,transferHeaderVerticalPadding:l,transferItemPaddingVertical:s,controlItemBgActive:u,controlItemBgActiveHover:c,colorTextDisabled:d,listHeight:f,listWidth:p,listWidthLG:v,fontSizeIcon:h,marginXS:m,paddingSM:b,lineType:S,iconCls:C,motionDurationSlow:$}=e;return{display:"flex",flexDirection:"column",width:p,height:f,border:`${r}px ${S} ${n}`,borderRadius:e.borderRadiusLG,"&-with-pagination":{width:v,height:"auto"},"&-search":{[`${C}-search`]:{color:d}},"&-header":{display:"flex",flex:"none",alignItems:"center",height:a,padding:`${l-r}px ${b}px ${l}px`,color:e.colorText,background:e.colorBgContainer,borderBottom:`${r}px ${S} ${o}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,"> *:not(:last-child)":{marginInlineEnd:4},"> *":{flex:"none"},"&-title":y(y({},cn),{flex:"auto",textAlign:"end"}),"&-dropdown":y(y({},ns()),{fontSize:h,transform:"translateY(10%)",cursor:"pointer","&[disabled]":{cursor:"not-allowed"}})},"&-body":{display:"flex",flex:"auto",flexDirection:"column",overflow:"hidden",fontSize:e.fontSize,"&-search-wrapper":{position:"relative",flex:"none",padding:b}},"&-content":{flex:"auto",margin:0,padding:0,overflow:"auto",listStyle:"none","&-item":{display:"flex",alignItems:"center",minHeight:i,padding:`${s}px ${b}px`,transition:`all ${$}`,"> *:not(:last-child)":{marginInlineEnd:m},"> *":{flex:"none"},"&-text":y(y({},cn),{flex:"auto"}),"&-remove":{position:"relative",color:n,cursor:"pointer",transition:`all ${$}`,"&:hover":{color:e.colorLinkHover},"&::after":{position:"absolute",insert:`-${s}px -50%`,content:'""'}},[`&:not(${t}-list-content-item-disabled)`]:{"&:hover":{backgroundColor:e.controlItemBgHover,cursor:"pointer"},[`&${t}-list-content-item-checked:hover`]:{backgroundColor:c}},"&-checked":{backgroundColor:u},"&-disabled":{color:d,cursor:"not-allowed"}},[`&-show-remove ${t}-list-content-item:not(${t}-list-content-item-disabled):hover`]:{background:"transparent",cursor:"default"}},"&-pagination":{padding:`${e.paddingXS}px 0`,textAlign:"end",borderTop:`${r}px ${S} ${o}`},"&-body-not-found":{flex:"none",width:"100%",margin:"auto 0",color:d,textAlign:"center"},"&-footer":{borderTop:`${r}px ${S} ${o}`},"&-checkbox":{lineHeight:1}}},Lhe=e=>{const{antCls:t,iconCls:n,componentCls:o,transferHeaderHeight:r,marginXS:i,marginXXS:a,fontSizeIcon:l,fontSize:s,lineHeight:u}=e;return{[o]:y(y({},qe(e)),{position:"relative",display:"flex",alignItems:"stretch",[`${o}-disabled`]:{[`${o}-list`]:{background:e.colorBgContainerDisabled}},[`${o}-list`]:khe(e),[`${o}-operation`]:{display:"flex",flex:"none",flexDirection:"column",alignSelf:"center",margin:`0 ${i}px`,verticalAlign:"middle",[`${t}-btn`]:{display:"block","&:first-child":{marginBottom:a},[n]:{fontSize:l}}},[`${t}-empty-image`]:{maxHeight:r/2-Math.round(s*u)}})}},Fhe=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},Bhe=Ue("Transfer",e=>{const{fontSize:t,lineHeight:n,lineWidth:o,controlHeightLG:r,controlHeight:i}=e,a=Math.round(t*n),l=r,s=i,u=Be(e,{transferItemHeight:s,transferHeaderHeight:l,transferHeaderVerticalPadding:Math.ceil((l-o-a)/2),transferItemPaddingVertical:(s-a)/2});return[Lhe(u),Dhe(u),Nhe(u),Fhe(u)]},{listWidth:180,listHeight:200,listWidthLG:250}),Hhe=()=>({id:String,prefixCls:String,dataSource:pt([]),disabled:$e(),targetKeys:pt(),selectedKeys:pt(),render:ye(),listStyle:He([Function,Object],()=>({})),operationStyle:De(void 0),titles:pt(),operations:pt(),showSearch:$e(!1),filterOption:ye(),searchPlaceholder:String,notFoundContent:K.any,locale:De(),rowKey:ye(),showSelectAll:$e(),selectAllLabels:pt(),children:ye(),oneWay:$e(),pagination:He([Object,Boolean]),status:Ne(),onChange:ye(),onSelectChange:ye(),onSearch:ye(),onScroll:ye(),"onUpdate:targetKeys":ye(),"onUpdate:selectedKeys":ye()}),zhe=le({compatConfig:{MODE:3},name:"ATransfer",inheritAttrs:!1,props:Hhe(),slots:Object,setup(e,t){let{emit:n,attrs:o,slots:r,expose:i}=t;const{configProvider:a,prefixCls:l,direction:s}=Te("transfer",e),[u,c]=Bhe(l),d=ae([]),f=ae([]),p=bn(),v=kn.useInject(),h=E(()=>Yr(v.status,e.status));be(()=>e.selectedKeys,()=>{var Y,oe;d.value=((Y=e.selectedKeys)===null||Y===void 0?void 0:Y.filter(Z=>e.targetKeys.indexOf(Z)===-1))||[],f.value=((oe=e.selectedKeys)===null||oe===void 0?void 0:oe.filter(Z=>e.targetKeys.indexOf(Z)>-1))||[]},{immediate:!0});const m=(Y,oe)=>{const Z={notFoundContent:oe("Transfer")},re=mn(r,e,"notFoundContent");return re&&(Z.notFoundContent=re),e.searchPlaceholder!==void 0&&(Z.searchPlaceholder=e.searchPlaceholder),y(y(y({},Y),Z),e.locale)},b=Y=>{const{targetKeys:oe=[],dataSource:Z=[]}=e,re=Y==="right"?d.value:f.value,ne=_he(Z),X=re.filter(J=>!ne.has(J)),te=D1(X),W=Y==="right"?X.concat(oe):oe.filter(J=>!te.has(J)),U=Y==="right"?"left":"right";Y==="right"?d.value=[]:f.value=[],n("update:targetKeys",W),w(U,[]),n("change",W,Y,X),p.onFieldChange()},S=()=>{b("left")},C=()=>{b("right")},$=(Y,oe)=>{w(Y,oe)},x=Y=>$("left",Y),P=Y=>$("right",Y),w=(Y,oe)=>{Y==="left"?(e.selectedKeys||(d.value=oe),n("update:selectedKeys",[...oe,...f.value]),n("selectChange",oe,nt(f.value))):(e.selectedKeys||(f.value=oe),n("update:selectedKeys",[...oe,...d.value]),n("selectChange",nt(d.value),oe))},O=(Y,oe)=>{const Z=oe.target.value;n("search",Y,Z)},I=Y=>{O("left",Y)},_=Y=>{O("right",Y)},T=Y=>{n("search",Y,"")},A=()=>{T("left")},R=()=>{T("right")},H=(Y,oe,Z)=>{const re=Y==="left"?[...d.value]:[...f.value],ne=re.indexOf(oe);ne>-1&&re.splice(ne,1),Z&&re.push(oe),w(Y,re)},M=(Y,oe)=>H("left",Y,oe),D=(Y,oe)=>H("right",Y,oe),N=Y=>{const{targetKeys:oe=[]}=e,Z=oe.filter(re=>!Y.includes(re));n("update:targetKeys",Z),n("change",Z,"left",[...Y])},L=(Y,oe)=>{n("scroll",Y,oe)},F=Y=>{L("left",Y)},B=Y=>{L("right",Y)},j=(Y,oe)=>typeof Y=="function"?Y({direction:oe}):Y,z=ae([]),G=ae([]);Ve(()=>{const{dataSource:Y,rowKey:oe,targetKeys:Z=[]}=e,re=[],ne=new Array(Z.length),X=D1(Z);Y.forEach(te=>{oe&&(te.key=oe(te)),X.has(te.key)?ne[X.get(te.key)]=te:re.push(te)}),z.value=re,G.value=ne}),i({handleSelectChange:w});const Q=Y=>{var oe,Z,re,ne,X,te;const{disabled:W,operations:U=[],showSearch:J,listStyle:de,operationStyle:fe,filterOption:pe,showSelectAll:ve,selectAllLabels:he=[],oneWay:V,pagination:q,id:ie=p.id.value}=e,{class:me,style:Se}=o,ce=r.children,ee=!ce&&q,ue=a.renderEmpty,xe=m(Y,ue),{footer:Pe}=r,_e=e.render||r.render,Ce=f.value.length>0,we=d.value.length>0,Oe=ge(l.value,me,{[`${l.value}-disabled`]:W,[`${l.value}-customize-list`]:!!ce,[`${l.value}-rtl`]:s.value==="rtl"},lo(l.value,h.value,v.hasFeedback),c.value),Me=e.titles,Re=(re=(oe=Me&&Me[0])!==null&&oe!==void 0?oe:(Z=r.leftTitle)===null||Z===void 0?void 0:Z.call(r))!==null&&re!==void 0?re:(xe.titles||["",""])[0],Ae=(te=(ne=Me&&Me[1])!==null&&ne!==void 0?ne:(X=r.rightTitle)===null||X===void 0?void 0:X.call(r))!==null&&te!==void 0?te:(xe.titles||["",""])[1];return g("div",k(k({},o),{},{class:Oe,style:Se,id:ie}),[g(OT,k({key:"leftList",prefixCls:`${l.value}-list`,dataSource:z.value,filterOption:pe,style:j(de,"left"),checkedKeys:d.value,handleFilter:I,handleClear:A,onItemSelect:M,onItemSelectAll:x,renderItem:_e,showSearch:J,renderList:ce,onScroll:F,disabled:W,direction:s.value==="rtl"?"right":"left",showSelectAll:ve,selectAllLabel:he[0]||r.leftSelectAllLabel,pagination:ee},xe),{titleText:()=>Re,footer:Pe}),g($$,{key:"operation",class:`${l.value}-operation`,rightActive:we,rightArrowText:U[0],moveToRight:C,leftActive:Ce,leftArrowText:U[1],moveToLeft:S,style:fe,disabled:W,direction:s.value,oneWay:V},null),g(OT,k({key:"rightList",prefixCls:`${l.value}-list`,dataSource:G.value,filterOption:pe,style:j(de,"right"),checkedKeys:f.value,handleFilter:_,handleClear:R,onItemSelect:D,onItemSelectAll:P,onItemRemove:N,renderItem:_e,showSearch:J,renderList:ce,onScroll:B,disabled:W,direction:s.value==="rtl"?"left":"right",showSelectAll:ve,selectAllLabel:he[1]||r.rightSelectAllLabel,showRemove:V,pagination:ee},xe),{titleText:()=>Ae,footer:Pe})])};return()=>u(g(ts,{componentName:"Transfer",defaultLocale:$o.Transfer,children:Q},null))}}),jhe=Lt(zhe);function Whe(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function Vhe(e){const{label:t,value:n,children:o}=e||{},r=n||"value";return{_title:t?[t]:["title","label"],value:r,key:r,children:o||"children"}}function N1(e){return e.disabled||e.disableCheckbox||e.checkable===!1}function Khe(e,t){const n=[];function o(r){r.forEach(i=>{n.push(i[t.value]);const a=i[t.children];a&&o(a)})}return o(e),n}function ET(e){return e==null}const RN=Symbol("TreeSelectContextPropsKey");function Uhe(e){return Xe(RN,e)}function Ghe(){return ze(RN,{})}const Xhe={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Yhe=le({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,setup(e,t){let{slots:n,expose:o}=t;const r=hf(),i=Dv(),a=Ghe(),l=ae(),s=gC(()=>a.treeData,[()=>r.open,()=>a.treeData],x=>x[0]),u=E(()=>{const{checkable:x,halfCheckedKeys:P,checkedKeys:w}=i;return x?{checked:w,halfChecked:P}:null});be(()=>r.open,()=>{ot(()=>{var x;r.open&&!r.multiple&&i.checkedKeys.length&&((x=l.value)===null||x===void 0||x.scrollTo({key:i.checkedKeys[0]}))})},{immediate:!0,flush:"post"});const c=E(()=>String(r.searchValue).toLowerCase()),d=x=>c.value?String(x[i.treeNodeFilterProp]).toLowerCase().includes(c.value):!1,f=se(i.treeDefaultExpandedKeys),p=se(null);be(()=>r.searchValue,()=>{r.searchValue&&(p.value=Khe(nt(a.treeData),nt(a.fieldNames)))},{immediate:!0});const v=E(()=>i.treeExpandedKeys?i.treeExpandedKeys.slice():r.searchValue?p.value:f.value),h=x=>{var P;f.value=x,p.value=x,(P=i.onTreeExpand)===null||P===void 0||P.call(i,x)},m=x=>{x.preventDefault()},b=(x,P)=>{let{node:w}=P;var O,I;const{checkable:_,checkedKeys:T}=i;_&&N1(w)||((O=a.onSelect)===null||O===void 0||O.call(a,w.key,{selected:!T.includes(w.key)}),r.multiple||(I=r.toggleOpen)===null||I===void 0||I.call(r,!1))},S=ae(null),C=E(()=>i.keyEntities[S.value]),$=x=>{S.value=x};return o({scrollTo:function(){for(var x,P,w=arguments.length,O=new Array(w),I=0;I{var P;const{which:w}=x;switch(w){case Ie.UP:case Ie.DOWN:case Ie.LEFT:case Ie.RIGHT:(P=l.value)===null||P===void 0||P.onKeydown(x);break;case Ie.ENTER:{if(C.value){const{selectable:O,value:I}=C.value.node||{};O!==!1&&b(null,{node:{key:S.value},selected:!i.checkedKeys.includes(I)})}break}case Ie.ESC:r.toggleOpen(!1)}},onKeyup:()=>{}}),()=>{var x;const{prefixCls:P,multiple:w,searchValue:O,open:I,notFoundContent:_=(x=n.notFoundContent)===null||x===void 0?void 0:x.call(n)}=r,{listHeight:T,listItemHeight:A,virtual:R,dropdownMatchSelectWidth:H,treeExpandAction:M}=a,{checkable:D,treeDefaultExpandAll:N,treeIcon:L,showTreeIcon:F,switcherIcon:B,treeLine:j,loadData:z,treeLoadedKeys:G,treeMotion:Q,onTreeLoad:Y,checkedKeys:oe}=i;if(s.value.length===0)return g("div",{role:"listbox",class:`${P}-empty`,onMousedown:m},[_]);const Z={fieldNames:a.fieldNames};return G&&(Z.loadedKeys=G),v.value&&(Z.expandedKeys=v.value),g("div",{onMousedown:m},[C.value&&I&&g("span",{style:Xhe,"aria-live":"assertive"},[C.value.node.value]),g(CN,k(k({ref:l,focusable:!1,prefixCls:`${P}-tree`,treeData:s.value,height:T,itemHeight:A,virtual:R!==!1&&H!==!1,multiple:w,icon:L,showIcon:F,switcherIcon:B,showLine:j,loadData:O?null:z,motion:Q,activeKey:S.value,checkable:D,checkStrictly:!0,checkedKeys:u.value,selectedKeys:D?[]:oe,defaultExpandAll:N},Z),{},{onActiveChange:$,onSelect:b,onCheck:b,onExpand:h,onLoad:Y,filterTreeNode:d,expandAction:M}),y(y({},n),{checkable:i.customSlots.treeCheckable}))])}}}),qhe="SHOW_ALL",DN="SHOW_PARENT",w$="SHOW_CHILD";function _T(e,t,n,o){const r=new Set(e);return t===w$?e.filter(i=>{const a=n[i];return!(a&&a.children&&a.children.some(l=>{let{node:s}=l;return r.has(s[o.value])})&&a.children.every(l=>{let{node:s}=l;return N1(s)||r.has(s[o.value])}))}):t===DN?e.filter(i=>{const a=n[i],l=a?a.parent:null;return!(l&&!N1(l.node)&&r.has(l.key))}):e}const iu=()=>null;iu.inheritAttrs=!1;iu.displayName="ATreeSelectNode";iu.isTreeSelectNode=!0;var Jhe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r0&&arguments[0]!==void 0?arguments[0]:[];return zt(n).map(o=>{var r,i,a;if(!Zhe(o))return null;const l=o.children||{},s=o.key,u={};for(const[w,O]of Object.entries(o.props))u[Kc(w)]=O;const{isLeaf:c,checkable:d,selectable:f,disabled:p,disableCheckbox:v}=u,h={isLeaf:c||c===""||void 0,checkable:d||d===""||void 0,selectable:f||f===""||void 0,disabled:p||p===""||void 0,disableCheckbox:v||v===""||void 0},m=y(y({},u),h),{title:b=(r=l.title)===null||r===void 0?void 0:r.call(l,m),switcherIcon:S=(i=l.switcherIcon)===null||i===void 0?void 0:i.call(l,m)}=u,C=Jhe(u,["title","switcherIcon"]),$=(a=l.default)===null||a===void 0?void 0:a.call(l),x=y(y(y({},C),{title:b,switcherIcon:S,key:s,isLeaf:c}),h),P=t($);return P.length&&(x.children=P),x})}return t(e)}function k1(e){if(!e)return e;const t=y({},e);return"props"in t||Object.defineProperty(t,"props",{get(){return t}}),t}function eve(e,t,n,o,r,i){let a=null,l=null;function s(){function u(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return c.map((p,v)=>{const h=`${d}-${v}`,m=p[i.value],b=n.includes(m),S=u(p[i.children]||[],h,b),C=g(iu,p,{default:()=>[S.map($=>$.node)]});if(t===m&&(a=C),b){const $={pos:h,node:C,children:S};return f||l.push($),$}return null}).filter(p=>p)}l||(l=[],u(o),l.sort((c,d)=>{let{node:{props:{value:f}}}=c,{node:{props:{value:p}}}=d;const v=n.indexOf(f),h=n.indexOf(p);return v-h}))}Object.defineProperty(e,"triggerNode",{get(){return s(),a}}),Object.defineProperty(e,"allCheckedNodes",{get(){return s(),r?l:l.map(u=>{let{node:c}=u;return c})}})}function tve(e,t){let{id:n,pId:o,rootPId:r}=t;const i={},a=[];return e.map(s=>{const u=y({},s),c=u[n];return i[c]=u,u.key=u.key||c,u}).forEach(s=>{const u=s[o],c=i[u];c&&(c.children=c.children||[],c.children.push(s)),(u===r||!c&&r===null)&&a.push(s)}),a}function nve(e,t,n){const o=se();return be([n,e,t],()=>{const r=n.value;e.value?o.value=n.value?tve(nt(e.value),y({id:"id",pId:"pId",rootPId:null},r!==!0?r:{})):nt(e.value).slice():o.value=Qhe(nt(t.value))},{immediate:!0,deep:!0}),o}const ove=e=>{const t=se({valueLabels:new Map}),n=se();return be(e,()=>{n.value=nt(e.value)},{immediate:!0}),[E(()=>{const{valueLabels:r}=t.value,i=new Map,a=n.value.map(l=>{var s;const{value:u}=l,c=(s=l.label)!==null&&s!==void 0?s:r.get(u);return i.set(u,c),y(y({},l),{label:c})});return t.value.valueLabels=i,a})]},rve=(e,t)=>{const n=se(new Map),o=se({});return Ve(()=>{const r=t.value,i=If(e.value,{fieldNames:r,initWrapper:a=>y(y({},a),{valueEntities:new Map}),processEntity:(a,l)=>{const s=a.node[r.value];l.valueEntities.set(s,a)}});n.value=i.valueEntities,o.value=i.keyEntities}),{valueEntities:n,keyEntities:o}},ive=(e,t,n,o,r,i)=>{const a=se([]),l=se([]);return Ve(()=>{let s=e.value.map(d=>{let{value:f}=d;return f}),u=t.value.map(d=>{let{value:f}=d;return f});const c=s.filter(d=>!o.value[d]);n.value&&({checkedKeys:s,halfCheckedKeys:u}=pr(s,!0,o.value,r.value,i.value)),a.value=Array.from(new Set([...c,...s])),l.value=u}),[a,l]},ave=(e,t,n)=>{let{treeNodeFilterProp:o,filterTreeNode:r,fieldNames:i}=n;return E(()=>{const{children:a}=i.value,l=t.value,s=o==null?void 0:o.value;if(!l||r.value===!1)return e.value;let u;if(typeof r.value=="function")u=r.value;else{const d=l.toUpperCase();u=(f,p)=>{const v=p[s];return String(v).toUpperCase().includes(d)}}function c(d){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const p=[];for(let v=0,h=d.length;ve.treeCheckable&&!e.treeCheckStrictly),l=E(()=>e.treeCheckable||e.treeCheckStrictly),s=E(()=>e.treeCheckStrictly||e.labelInValue),u=E(()=>l.value||e.multiple),c=E(()=>Vhe(e.fieldNames)),[d,f]=Dt("",{value:E(()=>e.searchValue!==void 0?e.searchValue:e.inputValue),postState:ie=>ie||""}),p=ie=>{var me;f(ie),(me=e.onSearch)===null||me===void 0||me.call(e,ie)},v=nve(We(e,"treeData"),We(e,"children"),We(e,"treeDataSimpleMode")),{keyEntities:h,valueEntities:m}=rve(v,c),b=ie=>{const me=[],Se=[];return ie.forEach(ce=>{m.value.has(ce)?Se.push(ce):me.push(ce)}),{missingRawValues:me,existRawValues:Se}},S=ave(v,d,{fieldNames:c,treeNodeFilterProp:We(e,"treeNodeFilterProp"),filterTreeNode:We(e,"filterTreeNode")}),C=ie=>{if(ie){if(e.treeNodeLabelProp)return ie[e.treeNodeLabelProp];const{_title:me}=c.value;for(let Se=0;SeWhe(ie).map(Se=>lve(Se)?{value:Se}:Se),x=ie=>$(ie).map(Se=>{let{label:ce}=Se;const{value:ee,halfChecked:ue}=Se;let xe;const Pe=m.value.get(ee);return Pe&&(ce=ce??C(Pe.node),xe=Pe.node.disabled),{label:ce,value:ee,halfChecked:ue,disabled:xe}}),[P,w]=Dt(e.defaultValue,{value:We(e,"value")}),O=E(()=>$(P.value)),I=se([]),_=se([]);Ve(()=>{const ie=[],me=[];O.value.forEach(Se=>{Se.halfChecked?me.push(Se):ie.push(Se)}),I.value=ie,_.value=me});const T=E(()=>I.value.map(ie=>ie.value)),{maxLevel:A,levelEntities:R}=um(h),[H,M]=ive(I,_,a,h,A,R),D=E(()=>{const Se=_T(H.value,e.showCheckedStrategy,h.value,c.value).map(ue=>{var xe,Pe,_e;return(_e=(Pe=(xe=h.value[ue])===null||xe===void 0?void 0:xe.node)===null||Pe===void 0?void 0:Pe[c.value.value])!==null&&_e!==void 0?_e:ue}).map(ue=>{const xe=I.value.find(Pe=>Pe.value===ue);return{value:ue,label:xe==null?void 0:xe.label}}),ce=x(Se),ee=ce[0];return!u.value&&ee&&ET(ee.value)&&ET(ee.label)?[]:ce.map(ue=>{var xe;return y(y({},ue),{label:(xe=ue.label)!==null&&xe!==void 0?xe:ue.value})})}),[N]=ove(D),L=(ie,me,Se)=>{const ce=x(ie);if(w(ce),e.autoClearSearchValue&&f(""),e.onChange){let ee=ie;a.value&&(ee=_T(ie,e.showCheckedStrategy,h.value,c.value).map(Re=>{const Ae=m.value.get(Re);return Ae?Ae.node[c.value.value]:Re}));const{triggerValue:ue,selected:xe}=me||{triggerValue:void 0,selected:void 0};let Pe=ee;if(e.treeCheckStrictly){const Me=_.value.filter(Re=>!ee.includes(Re.value));Pe=[...Pe,...Me]}const _e=x(Pe),Ce={preValue:I.value,triggerValue:ue};let we=!0;(e.treeCheckStrictly||Se==="selection"&&!xe)&&(we=!1),eve(Ce,ue,ie,v.value,we,c.value),l.value?Ce.checked=xe:Ce.selected=xe;const Oe=s.value?_e:_e.map(Me=>Me.value);e.onChange(u.value?Oe:Oe[0],s.value?null:_e.map(Me=>Me.label),Ce)}},F=(ie,me)=>{let{selected:Se,source:ce}=me;var ee,ue,xe;const Pe=nt(h.value),_e=nt(m.value),Ce=Pe[ie],we=Ce==null?void 0:Ce.node,Oe=(ee=we==null?void 0:we[c.value.value])!==null&&ee!==void 0?ee:ie;if(!u.value)L([Oe],{selected:!0,triggerValue:Oe},"option");else{let Me=Se?[...T.value,Oe]:H.value.filter(Re=>Re!==Oe);if(a.value){const{missingRawValues:Re,existRawValues:Ae}=b(Me),Fe=Ae.map(bt=>_e.get(bt).key);let lt;Se?{checkedKeys:lt}=pr(Fe,!0,Pe,A.value,R.value):{checkedKeys:lt}=pr(Fe,{halfCheckedKeys:M.value},Pe,A.value,R.value),Me=[...Re,...lt.map(bt=>Pe[bt].node[c.value.value])]}L(Me,{selected:Se,triggerValue:Oe},ce||"option")}Se||!u.value?(ue=e.onSelect)===null||ue===void 0||ue.call(e,Oe,k1(we)):(xe=e.onDeselect)===null||xe===void 0||xe.call(e,Oe,k1(we))},B=ie=>{if(e.onDropdownVisibleChange){const me={};Object.defineProperty(me,"documentClickClose",{get(){return!1}}),e.onDropdownVisibleChange(ie,me)}},j=(ie,me)=>{const Se=ie.map(ce=>ce.value);if(me.type==="clear"){L(Se,{},"selection");return}me.values.length&&F(me.values[0].value,{selected:!1,source:"selection"})},{treeNodeFilterProp:z,loadData:G,treeLoadedKeys:Q,onTreeLoad:Y,treeDefaultExpandAll:oe,treeExpandedKeys:Z,treeDefaultExpandedKeys:re,onTreeExpand:ne,virtual:X,listHeight:te,listItemHeight:W,treeLine:U,treeIcon:J,showTreeIcon:de,switcherIcon:fe,treeMotion:pe,customSlots:ve,dropdownMatchSelectWidth:he,treeExpandAction:V}=Fr(e);VK(Gg({checkable:l,loadData:G,treeLoadedKeys:Q,onTreeLoad:Y,checkedKeys:H,halfCheckedKeys:M,treeDefaultExpandAll:oe,treeExpandedKeys:Z,treeDefaultExpandedKeys:re,onTreeExpand:ne,treeIcon:J,treeMotion:pe,showTreeIcon:de,switcherIcon:fe,treeLine:U,treeNodeFilterProp:z,keyEntities:h,customSlots:ve})),Uhe(Gg({virtual:X,listHeight:te,listItemHeight:W,treeData:S,fieldNames:c,onSelect:F,dropdownMatchSelectWidth:he,treeExpandAction:V}));const q=ae();return o({focus(){var ie;(ie=q.value)===null||ie===void 0||ie.focus()},blur(){var ie;(ie=q.value)===null||ie===void 0||ie.blur()},scrollTo(ie){var me;(me=q.value)===null||me===void 0||me.scrollTo(ie)}}),()=>{var ie;const me=it(e,["id","prefixCls","customSlots","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","virtual","listHeight","listItemHeight","onDropdownVisibleChange","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion"]);return g(pC,k(k(k({ref:q},n),me),{},{id:i,prefixCls:e.prefixCls,mode:u.value?"multiple":void 0,displayValues:N.value,onDisplayValuesChange:j,searchValue:d.value,onSearch:p,OptionList:Yhe,emptyOptions:!v.value.length,onDropdownVisibleChange:B,tagRender:e.tagRender||r.tagRender,dropdownMatchSelectWidth:(ie=e.dropdownMatchSelectWidth)!==null&&ie!==void 0?ie:!0}),r)}}}),cve=e=>{const{componentCls:t,treePrefixCls:n,colorBgElevated:o}=e,r=`.${n}`;return[{[`${t}-dropdown`]:[{padding:`${e.paddingXS}px ${e.paddingXS/2}px`},$N(n,Be(e,{colorBgContainer:o})),{[r]:{borderRadius:0,"&-list-holder-inner":{alignItems:"stretch",[`${r}-treenode`]:{[`${r}-node-content-wrapper`]:{flex:"auto"}}}}},gm(`${n}-checkbox`,e),{"&-rtl":{direction:"rtl",[`${r}-switcher${r}-switcher_close`]:{[`${r}-switcher-icon svg`]:{transform:"rotate(90deg)"}}}}]}]};function uve(e,t){return Ue("TreeSelect",n=>{const o=Be(n,{treePrefixCls:t.value});return[cve(o)]})(e)}const MT=(e,t,n)=>n!==void 0?n:`${e}-${t}`;function dve(){return y(y({},it(NN(),["showTreeIcon","treeMotion","inputIcon","getInputElement","treeLine","customSlots"])),{suffixIcon:K.any,size:Ne(),bordered:$e(),treeLine:He([Boolean,Object]),replaceFields:De(),placement:Ne(),status:Ne(),popupClassName:String,dropdownClassName:String,"onUpdate:value":ye(),"onUpdate:treeExpandedKeys":ye(),"onUpdate:searchValue":ye()})}const gb=le({compatConfig:{MODE:3},name:"ATreeSelect",inheritAttrs:!1,props:Qe(dve(),{choiceTransitionName:"",listHeight:256,treeIcon:!1,listItemHeight:26,bordered:!0}),slots:Object,setup(e,t){let{attrs:n,slots:o,expose:r,emit:i}=t;e.treeData===void 0&&o.default,Mt(e.multiple!==!1||!e.treeCheckable,"TreeSelect","`multiple` will always be `true` when `treeCheckable` is true"),Mt(e.replaceFields===void 0,"TreeSelect","`replaceFields` is deprecated, please use fieldNames instead"),Mt(!e.dropdownClassName,"TreeSelect","`dropdownClassName` is deprecated. Please use `popupClassName` instead.");const a=bn(),l=kn.useInject(),s=E(()=>Yr(l.status,e.status)),{prefixCls:u,renderEmpty:c,direction:d,virtual:f,dropdownMatchSelectWidth:p,size:v,getPopupContainer:h,getPrefixCls:m,disabled:b}=Te("select",e),{compactSize:S,compactItemClassnames:C}=Xa(u,d),$=E(()=>S.value||v.value),x=ko(),P=E(()=>{var Q;return(Q=b.value)!==null&&Q!==void 0?Q:x.value}),w=E(()=>m()),O=E(()=>e.placement!==void 0?e.placement:d.value==="rtl"?"bottomRight":"bottomLeft"),I=E(()=>MT(w.value,cC(O.value),e.transitionName)),_=E(()=>MT(w.value,"",e.choiceTransitionName)),T=E(()=>m("select-tree",e.prefixCls)),A=E(()=>m("tree-select",e.prefixCls)),[R,H]=DC(u),[M]=uve(A,T),D=E(()=>ge(e.popupClassName||e.dropdownClassName,`${A.value}-dropdown`,{[`${A.value}-dropdown-rtl`]:d.value==="rtl"},H.value)),N=E(()=>!!(e.treeCheckable||e.multiple)),L=E(()=>e.showArrow!==void 0?e.showArrow:e.loading||!N.value),F=ae();r({focus(){var Q,Y;(Y=(Q=F.value).focus)===null||Y===void 0||Y.call(Q)},blur(){var Q,Y;(Y=(Q=F.value).blur)===null||Y===void 0||Y.call(Q)}});const B=function(){for(var Q=arguments.length,Y=new Array(Q),oe=0;oe{i("update:treeExpandedKeys",Q),i("treeExpand",Q)},z=Q=>{i("update:searchValue",Q),i("search",Q)},G=Q=>{i("blur",Q),a.onFieldBlur()};return()=>{var Q,Y,oe;const{notFoundContent:Z=(Q=o.notFoundContent)===null||Q===void 0?void 0:Q.call(o),prefixCls:re,bordered:ne,listHeight:X,listItemHeight:te,multiple:W,treeIcon:U,treeLine:J,showArrow:de,switcherIcon:fe=(Y=o.switcherIcon)===null||Y===void 0?void 0:Y.call(o),fieldNames:pe=e.replaceFields,id:ve=a.id.value,placeholder:he=(oe=o.placeholder)===null||oe===void 0?void 0:oe.call(o)}=e,{isFormItemInput:V,hasFeedback:q,feedbackIcon:ie}=l,{suffixIcon:me,removeIcon:Se,clearIcon:ce}=SC(y(y({},e),{multiple:N.value,showArrow:L.value,hasFeedback:q,feedbackIcon:ie,prefixCls:u.value}),o);let ee;Z!==void 0?ee=Z:ee=c("Select");const ue=it(e,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon","bordered","status","onUpdate:value","onUpdate:treeExpandedKeys","onUpdate:searchValue"]),xe=ge(!re&&A.value,{[`${u.value}-lg`]:$.value==="large",[`${u.value}-sm`]:$.value==="small",[`${u.value}-rtl`]:d.value==="rtl",[`${u.value}-borderless`]:!ne,[`${u.value}-in-form-item`]:V},lo(u.value,s.value,q),C.value,n.class,H.value),Pe={};return e.treeData===void 0&&o.default&&(Pe.children=Ot(o.default())),R(M(g(sve,k(k(k(k({},n),ue),{},{disabled:P.value,virtual:f.value,dropdownMatchSelectWidth:p.value,id:ve,fieldNames:pe,ref:F,prefixCls:u.value,class:xe,listHeight:X,listItemHeight:te,treeLine:!!J,inputIcon:me,multiple:W,removeIcon:Se,clearIcon:ce,switcherIcon:_e=>xN(T.value,fe,_e,o.leafIcon,J),showTreeIcon:U,notFoundContent:ee,getPopupContainer:h==null?void 0:h.value,treeMotion:null,dropdownClassName:D.value,choiceTransitionName:_.value,onChange:B,onBlur:G,onSearch:z,onTreeExpand:j},Pe),{},{transitionName:I.value,customSlots:y(y({},o),{treeCheckable:()=>g("span",{class:`${u.value}-tree-checkbox-inner`},null)}),maxTagPlaceholder:e.maxTagPlaceholder||o.maxTagPlaceholder,placement:O.value,showArrow:q||de,placeholder:he}),y(y({},o),{treeCheckable:()=>g("span",{class:`${u.value}-tree-checkbox-inner`},null)}))))}}}),L1=iu,fve=y(gb,{TreeNode:iu,SHOW_ALL:qhe,SHOW_PARENT:DN,SHOW_CHILD:w$,install:e=>(e.component(gb.name,gb),e.component(L1.displayName,L1),e)}),hb=()=>({format:String,showNow:$e(),showHour:$e(),showMinute:$e(),showSecond:$e(),use12Hours:$e(),hourStep:Number,minuteStep:Number,secondStep:Number,hideDisabledOptions:$e(),popupClassName:String,status:Ne()});function pve(e){const t=ZR(e,y(y({},hb()),{order:{type:Boolean,default:!0}})),{TimePicker:n,RangePicker:o}=t,r=le({name:"ATimePicker",inheritAttrs:!1,props:y(y(y(y({},xh()),YR()),hb()),{addon:{type:Function}}),slots:Object,setup(a,l){let{slots:s,expose:u,emit:c,attrs:d}=l;const f=a,p=bn();Mt(!(s.addon||f.addon),"TimePicker","`addon` is deprecated. Please use `v-slot:renderExtraFooter` instead.");const v=ae();u({focus:()=>{var $;($=v.value)===null||$===void 0||$.focus()},blur:()=>{var $;($=v.value)===null||$===void 0||$.blur()}});const h=($,x)=>{c("update:value",$),c("change",$,x),p.onFieldChange()},m=$=>{c("update:open",$),c("openChange",$)},b=$=>{c("focus",$)},S=$=>{c("blur",$),p.onFieldBlur()},C=$=>{c("ok",$)};return()=>{const{id:$=p.id.value}=f;return g(n,k(k(k({},d),it(f,["onUpdate:value","onUpdate:open"])),{},{id:$,dropdownClassName:f.popupClassName,mode:void 0,ref:v,renderExtraFooter:f.addon||s.addon||f.renderExtraFooter||s.renderExtraFooter,onChange:h,onOpenChange:m,onFocus:b,onBlur:S,onOk:C}),s)}}}),i=le({name:"ATimeRangePicker",inheritAttrs:!1,props:y(y(y(y({},xh()),qR()),hb()),{order:{type:Boolean,default:!0}}),slots:Object,setup(a,l){let{slots:s,expose:u,emit:c,attrs:d}=l;const f=a,p=ae(),v=bn();u({focus:()=>{var P;(P=p.value)===null||P===void 0||P.focus()},blur:()=>{var P;(P=p.value)===null||P===void 0||P.blur()}});const h=(P,w)=>{c("update:value",P),c("change",P,w),v.onFieldChange()},m=P=>{c("update:open",P),c("openChange",P)},b=P=>{c("focus",P)},S=P=>{c("blur",P),v.onFieldBlur()},C=(P,w)=>{c("panelChange",P,w)},$=P=>{c("ok",P)},x=(P,w,O)=>{c("calendarChange",P,w,O)};return()=>{const{id:P=v.id.value}=f;return g(o,k(k(k({},d),it(f,["onUpdate:open","onUpdate:value"])),{},{id:P,dropdownClassName:f.popupClassName,picker:"time",mode:void 0,ref:p,onChange:h,onOpenChange:m,onFocus:b,onBlur:S,onPanelChange:C,onOk:$,onCalendarChange:x}),s)}}});return{TimePicker:r,TimeRangePicker:i}}const{TimePicker:Sp,TimeRangePicker:Sg}=pve(XC),gve=y(Sp,{TimePicker:Sp,TimeRangePicker:Sg,install:e=>(e.component(Sp.name,Sp),e.component(Sg.name,Sg),e)}),hve=()=>({prefixCls:String,color:String,dot:K.any,pending:$e(),position:K.oneOf(Jn("left","right","")).def(""),label:K.any}),Yd=le({compatConfig:{MODE:3},name:"ATimelineItem",props:Qe(hve(),{color:"blue",pending:!1}),slots:Object,setup(e,t){let{slots:n}=t;const{prefixCls:o}=Te("timeline",e),r=E(()=>({[`${o.value}-item`]:!0,[`${o.value}-item-pending`]:e.pending})),i=E(()=>/blue|red|green|gray/.test(e.color||"")?void 0:e.color||"blue"),a=E(()=>({[`${o.value}-item-head`]:!0,[`${o.value}-item-head-${e.color||"blue"}`]:!i.value}));return()=>{var l,s,u;const{label:c=(l=n.label)===null||l===void 0?void 0:l.call(n),dot:d=(s=n.dot)===null||s===void 0?void 0:s.call(n)}=e;return g("li",{class:r.value},[c&&g("div",{class:`${o.value}-item-label`},[c]),g("div",{class:`${o.value}-item-tail`},null),g("div",{class:[a.value,!!d&&`${o.value}-item-head-custom`],style:{borderColor:i.value,color:i.value}},[d]),g("div",{class:`${o.value}-item-content`},[(u=n.default)===null||u===void 0?void 0:u.call(n)])])}}}),vve=e=>{const{componentCls:t}=e;return{[t]:y(y({},qe(e)),{margin:0,padding:0,listStyle:"none",[`${t}-item`]:{position:"relative",margin:0,paddingBottom:e.timeLineItemPaddingBottom,fontSize:e.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:e.timeLineItemHeadSize,insetInlineStart:(e.timeLineItemHeadSize-e.timeLineItemTailWidth)/2,height:`calc(100% - ${e.timeLineItemHeadSize}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px ${e.lineType} ${e.colorSplit}`},"&-pending":{[`${t}-item-head`]:{fontSize:e.fontSizeSM,backgroundColor:"transparent"},[`${t}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:e.timeLineItemHeadSize,height:e.timeLineItemHeadSize,backgroundColor:e.colorBgContainer,border:`${e.timeLineHeadBorderWidth}px ${e.lineType} transparent`,borderRadius:"50%","&-blue":{color:e.colorPrimary,borderColor:e.colorPrimary},"&-red":{color:e.colorError,borderColor:e.colorError},"&-green":{color:e.colorSuccess,borderColor:e.colorSuccess},"&-gray":{color:e.colorTextDisabled,borderColor:e.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:e.timeLineItemHeadSize/2,insetInlineStart:e.timeLineItemHeadSize/2,width:"auto",height:"auto",marginBlockStart:0,paddingBlock:e.timeLineItemCustomHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:-(e.fontSize*e.lineHeight-e.fontSize)+e.lineWidth,marginInlineStart:e.margin+e.timeLineItemHeadSize,marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${t}-item-tail`]:{display:"none"},[`> ${t}-item-content`]:{minHeight:e.controlHeightLG*1.2}}},[`&${t}-alternate, + `]:{background:h},[`&${t}-row-selected`]:{"> td":{background:m},"&:hover > td":{background:b}}}},[`${t}-footer`]:{padding:`${o}px ${r}px`,color:S,background:C}})}},vhe=Ue("Table",e=>{const{controlItemBgActive:t,controlItemBgActiveHover:n,colorTextPlaceholder:o,colorTextHeading:r,colorSplit:i,colorBorderSecondary:a,fontSize:l,padding:s,paddingXS:u,paddingSM:c,controlHeight:d,colorFillAlter:f,colorIcon:p,colorIconHover:v,opacityLoading:h,colorBgContainer:m,borderRadiusLG:b,colorFillContent:S,colorFillSecondary:C,controlInteractiveSize:$}=e,x=new St(p),P=new St(v),w=t,O=2,I=new St(C).onBackground(m).toHexString(),_=new St(S).onBackground(m).toHexString(),T=new St(f).onBackground(m).toHexString(),A=Be(e,{tableFontSize:l,tableBg:m,tableRadius:b,tablePaddingVertical:s,tablePaddingHorizontal:s,tablePaddingVerticalMiddle:c,tablePaddingHorizontalMiddle:u,tablePaddingVerticalSmall:u,tablePaddingHorizontalSmall:u,tableBorderColor:a,tableHeaderTextColor:r,tableHeaderBg:T,tableFooterTextColor:r,tableFooterBg:T,tableHeaderCellSplitColor:a,tableHeaderSortBg:I,tableHeaderSortHoverBg:_,tableHeaderIconColor:x.clone().setAlpha(x.getAlpha()*h).toRgbString(),tableHeaderIconColorHover:P.clone().setAlpha(P.getAlpha()*h).toRgbString(),tableBodySortBg:T,tableFixedHeaderSortActiveBg:I,tableHeaderFilterActiveBg:S,tableFilterDropdownBg:m,tableRowHoverBg:T,tableSelectedRowBg:w,tableSelectedRowHoverBg:n,zIndexTableFixed:O,zIndexTableSticky:O+1,tableFontSizeMiddle:l,tableFontSizeSmall:l,tableSelectionColumnWidth:d,tableExpandIconBg:m,tableExpandColumnWidth:$+2*e.padding,tableExpandedRowBg:f,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:o,tableScrollThumbBgHover:r,tableScrollBg:i});return[hhe(A),lhe(A),w4(A),phe(A),ihe(A),the(A),she(A),rhe(A),w4(A),ohe(A),uhe(A),ahe(A),ghe(A),nhe(A),dhe(A),fhe(A),che(A)]}),mhe=[],AN=()=>({prefixCls:Ne(),columns:pt(),rowKey:He([String,Function]),tableLayout:Ne(),rowClassName:He([String,Function]),title:ye(),footer:ye(),id:Ne(),showHeader:$e(),components:De(),customRow:ye(),customHeaderRow:ye(),direction:Ne(),expandFixed:He([Boolean,String]),expandColumnWidth:Number,expandedRowKeys:pt(),defaultExpandedRowKeys:pt(),expandedRowRender:ye(),expandRowByClick:$e(),expandIcon:ye(),onExpand:ye(),onExpandedRowsChange:ye(),"onUpdate:expandedRowKeys":ye(),defaultExpandAllRows:$e(),indentSize:Number,expandIconColumnIndex:Number,showExpandColumn:$e(),expandedRowClassName:ye(),childrenColumnName:Ne(),rowExpandable:ye(),sticky:He([Boolean,Object]),dropdownPrefixCls:String,dataSource:pt(),pagination:He([Boolean,Object]),loading:He([Boolean,Object]),size:Ne(),bordered:$e(),locale:De(),onChange:ye(),onResizeColumn:ye(),rowSelection:De(),getPopupContainer:ye(),scroll:De(),sortDirections:pt(),showSorterTooltip:He([Boolean,Object],!0),transformCellText:ye()}),bhe=le({name:"InternalTable",inheritAttrs:!1,props:Qe(y(y({},AN()),{contextSlots:De()}),{rowKey:"key"}),setup(e,t){let{attrs:n,slots:o,expose:r,emit:i}=t;Mt(!(typeof e.rowKey=="function"&&e.rowKey.length>1),"Table","`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected."),dpe(E(()=>e.contextSlots)),fpe({onResizeColumn:(fe,pe)=>{i("resizeColumn",fe,pe)}});const a=nu(),l=E(()=>{const fe=new Set(Object.keys(a.value).filter(pe=>a.value[pe]));return e.columns.filter(pe=>!pe.responsive||pe.responsive.some(ve=>fe.has(ve)))}),{size:s,renderEmpty:u,direction:c,prefixCls:d,configProvider:f}=Te("table",e),[p,v]=vhe(d),h=E(()=>{var fe;return e.transformCellText||((fe=f.transformCellText)===null||fe===void 0?void 0:fe.value)}),[m]=wr("Table",$o.Table,We(e,"locale")),b=E(()=>e.dataSource||mhe),S=E(()=>f.getPrefixCls("dropdown",e.dropdownPrefixCls)),C=E(()=>e.childrenColumnName||"children"),$=E(()=>b.value.some(fe=>fe==null?void 0:fe[C.value])?"nest":e.expandedRowRender?"row":null),x=rt({body:null}),P=fe=>{y(x,fe)},w=E(()=>typeof e.rowKey=="function"?e.rowKey:fe=>fe==null?void 0:fe[e.rowKey]),[O]=oge(b,C,w),I={},_=function(fe,pe){let ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{pagination:he,scroll:V,onChange:q}=e,ie=y(y({},I),fe);ve&&(I.resetPagination(),ie.pagination.current&&(ie.pagination.current=1),he&&he.onChange&&he.onChange(1,ie.pagination.pageSize)),V&&V.scrollToFirstRowOnChange!==!1&&x.body&&US(0,{getContainer:()=>x.body}),q==null||q(ie.pagination,ie.filters,ie.sorter,{currentDataSource:$4(M1(b.value,ie.sorterStates,C.value),ie.filterStates),action:pe})},T=(fe,pe)=>{_({sorter:fe,sorterStates:pe},"sort",!1)},[A,R,H,M]=fge({prefixCls:d,mergedColumns:l,onSorterChange:T,sortDirections:E(()=>e.sortDirections||["ascend","descend"]),tableLocale:m,showSorterTooltip:We(e,"showSorterTooltip")}),D=E(()=>M1(b.value,R.value,C.value)),N=(fe,pe)=>{_({filters:fe,filterStates:pe},"filter",!0)},[L,F,B]=Jge({prefixCls:d,locale:m,dropdownPrefixCls:S,mergedColumns:l,onFilterChange:N,getPopupContainer:We(e,"getPopupContainer")}),j=E(()=>$4(D.value,F.value)),[z]=ehe(We(e,"contextSlots")),G=E(()=>{const fe={},pe=B.value;return Object.keys(pe).forEach(ve=>{pe[ve]!==null&&(fe[ve]=pe[ve])}),y(y({},H.value),{filters:fe})}),[Q]=Zge(G),Y=(fe,pe)=>{_({pagination:y(y({},I.pagination),{current:fe,pageSize:pe})},"paginate")},[oe,Z]=nge(E(()=>j.value.length),We(e,"pagination"),Y);Ve(()=>{I.sorter=M.value,I.sorterStates=R.value,I.filters=B.value,I.filterStates=F.value,I.pagination=e.pagination===!1?{}:tge(oe.value,e.pagination),I.resetPagination=Z});const re=E(()=>{if(e.pagination===!1||!oe.value.pageSize)return j.value;const{current:fe=1,total:pe,pageSize:ve=O1}=oe.value;return Mt(fe>0,"Table","`current` should be positive number."),j.value.lengthve?j.value.slice((fe-1)*ve,fe*ve):j.value:j.value.slice((fe-1)*ve,fe*ve)});Ve(()=>{ot(()=>{const{total:fe,pageSize:pe=O1}=oe.value;j.value.lengthpe&&Mt(!1,"Table","`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.")})},{flush:"post"});const ne=E(()=>e.showExpandColumn===!1?-1:$.value==="nest"&&e.expandIconColumnIndex===void 0?e.rowSelection?1:0:e.expandIconColumnIndex>0&&e.rowSelection?e.expandIconColumnIndex-1:e.expandIconColumnIndex),X=ae();be(()=>e.rowSelection,()=>{X.value=e.rowSelection?y({},e.rowSelection):e.rowSelection},{deep:!0,immediate:!0});const[te,W]=ige(X,{prefixCls:d,data:j,pageData:re,getRowKey:w,getRecordByKey:O,expandType:$,childrenColumnName:C,locale:m,getPopupContainer:E(()=>e.getPopupContainer)}),U=(fe,pe,ve)=>{let he;const{rowClassName:V}=e;return typeof V=="function"?he=ge(V(fe,pe,ve)):he=ge(V),ge({[`${d.value}-row-selected`]:W.value.has(w.value(fe,pe))},he)};r({selectedKeySet:W});const J=E(()=>typeof e.indentSize=="number"?e.indentSize:15),de=fe=>Q(te(L(A(z(fe)))));return()=>{var fe;const{expandIcon:pe=o.expandIcon||Qge(m.value),pagination:ve,loading:he,bordered:V}=e;let q,ie;if(ve!==!1&&(!((fe=oe.value)===null||fe===void 0)&&fe.total)){let ee;oe.value.size?ee=oe.value.size:ee=s.value==="small"||s.value==="middle"?"small":void 0;const ue=_e=>g(Sm,k(k({},oe.value),{},{class:[`${d.value}-pagination ${d.value}-pagination-${_e}`,oe.value.class],size:ee}),null),xe=c.value==="rtl"?"left":"right",{position:Pe}=oe.value;if(Pe!==null&&Array.isArray(Pe)){const _e=Pe.find(Oe=>Oe.includes("top")),Ce=Pe.find(Oe=>Oe.includes("bottom")),we=Pe.every(Oe=>`${Oe}`=="none");!_e&&!Ce&&!we&&(ie=ue(xe)),_e&&(q=ue(_e.toLowerCase().replace("top",""))),Ce&&(ie=ue(Ce.toLowerCase().replace("bottom","")))}else ie=ue(xe)}let me;typeof he=="boolean"?me={spinning:he}:typeof he=="object"&&(me=y({spinning:!0},he));const Se=ge(`${d.value}-wrapper`,{[`${d.value}-wrapper-rtl`]:c.value==="rtl"},n.class,v.value),ce=it(e,["columns"]);return p(g("div",{class:Se,style:n.style},[g(di,k({spinning:!1},me),{default:()=>[q,g(Qpe,k(k(k({},n),ce),{},{expandedRowKeys:e.expandedRowKeys,defaultExpandedRowKeys:e.defaultExpandedRowKeys,expandIconColumnIndex:ne.value,indentSize:J.value,expandIcon:pe,columns:l.value,direction:c.value,prefixCls:d.value,class:ge({[`${d.value}-middle`]:s.value==="middle",[`${d.value}-small`]:s.value==="small",[`${d.value}-bordered`]:V,[`${d.value}-empty`]:b.value.length===0}),data:re.value,rowKey:w.value,rowClassName:U,internalHooks:P1,internalRefs:x,onUpdateInternalRefs:P,transformColumns:de,transformCellText:h.value}),y(y({},o),{emptyText:()=>{var ee,ue;return((ee=o.emptyText)===null||ee===void 0?void 0:ee.call(o))||((ue=e.locale)===null||ue===void 0?void 0:ue.emptyText)||u("Table")}})),ie]})]))}}}),pb=le({name:"ATable",inheritAttrs:!1,props:Qe(AN(),{rowKey:"key"}),slots:Object,setup(e,t){let{attrs:n,slots:o,expose:r}=t;const i=ae();return r({table:i}),()=>{var a;const l=e.columns||bN((a=o.default)===null||a===void 0?void 0:a.call(o));return g(bhe,k(k(k({ref:i},n),e),{},{columns:l||[],expandedRowRender:o.expandedRowRender||e.expandedRowRender,contextSlots:y({},o)}),o)}}}),vg=le({name:"ATableColumn",slots:Object,render(){return null}}),mg=le({name:"ATableColumnGroup",slots:Object,__ANT_TABLE_COLUMN_GROUP:!0,render(){return null}}),Mh=zpe,Ah=Vpe,bg=y(Kpe,{Cell:Ah,Row:Mh,name:"ATableSummary"}),yhe=y(pb,{SELECTION_ALL:I1,SELECTION_INVERT:T1,SELECTION_NONE:E1,SELECTION_COLUMN:Ai,EXPAND_COLUMN:xa,Column:vg,ColumnGroup:mg,Summary:bg,install:e=>(e.component(bg.name,bg),e.component(Ah.name,Ah),e.component(Mh.name,Mh),e.component(pb.name,pb),e.component(vg.name,vg),e.component(mg.name,mg),e)}),She={prefixCls:String,placeholder:String,value:String,handleClear:Function,disabled:{type:Boolean,default:void 0},onChange:Function},Che=le({compatConfig:{MODE:3},name:"Search",inheritAttrs:!1,props:Qe(She,{placeholder:""}),emits:["change"],setup(e,t){let{emit:n}=t;const o=r=>{var i;n("change",r),r.target.value===""&&((i=e.handleClear)===null||i===void 0||i.call(e))};return()=>{const{placeholder:r,value:i,prefixCls:a,disabled:l}=e;return g(Cn,{placeholder:r,class:a,value:i,onChange:o,disabled:l,allowClear:!0},{prefix:()=>g(qc,null,null)})}}});var xhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};function P4(e){for(var t=1;t{const{renderedText:o,renderedEl:r,item:i,checked:a,disabled:l,prefixCls:s,showRemove:u}=e,c=ge({[`${s}-content-item`]:!0,[`${s}-content-item-disabled`]:l||i.disabled});let d;return(typeof o=="string"||typeof o=="number")&&(d=String(o)),g(ts,{componentName:"Transfer",defaultLocale:$o.Transfer},{default:f=>{const p=g("span",{class:`${s}-content-item-text`},[r]);return u?g("li",{class:c,title:d},[p,g(Th,{disabled:l||i.disabled,class:`${s}-content-item-remove`,"aria-label":f.remove,onClick:()=>{n("remove",i)}},{default:()=>[g(Im,null,null)]})]):g("li",{class:c,title:d,onClick:l||i.disabled?whe:()=>{n("click",i)}},[g(gr,{class:`${s}-checkbox`,checked:a,disabled:l||i.disabled},null),p])}})}}}),Ihe={prefixCls:String,filteredRenderItems:K.array.def([]),selectedKeys:K.array,disabled:$e(),showRemove:$e(),pagination:K.any,onItemSelect:Function,onScroll:Function,onItemRemove:Function};function The(e){if(!e)return null;const t={pageSize:10,simple:!0,showSizeChanger:!1,showLessItems:!1};return typeof e=="object"?y(y({},t),e):t}const Ehe=le({compatConfig:{MODE:3},name:"ListBody",inheritAttrs:!1,props:Ihe,emits:["itemSelect","itemRemove","scroll"],setup(e,t){let{emit:n,expose:o}=t;const r=ae(1),i=d=>{const{selectedKeys:f}=e,p=f.indexOf(d.key)>=0;n("itemSelect",d.key,!p)},a=d=>{n("itemRemove",[d.key])},l=d=>{n("scroll",d)},s=E(()=>The(e.pagination));be([s,()=>e.filteredRenderItems],()=>{if(s.value){const d=Math.ceil(e.filteredRenderItems.length/s.value.pageSize);r.value=Math.min(r.value,d)}},{immediate:!0});const u=E(()=>{const{filteredRenderItems:d}=e;let f=d;return s.value&&(f=d.slice((r.value-1)*s.value.pageSize,r.value*s.value.pageSize)),f}),c=d=>{r.value=d};return o({items:u}),()=>{const{prefixCls:d,filteredRenderItems:f,selectedKeys:p,disabled:v,showRemove:h}=e;let m=null;s.value&&(m=g(Sm,{simple:s.value.simple,showSizeChanger:s.value.showSizeChanger,showLessItems:s.value.showLessItems,size:"small",disabled:v,class:`${d}-pagination`,total:f.length,pageSize:s.value.pageSize,current:r.value,onChange:c},null));const b=u.value.map(S=>{let{renderedEl:C,renderedText:$,item:x}=S;const{disabled:P}=x,w=p.indexOf(x.key)>=0;return g(Ohe,{disabled:v||P,key:x.key,item:x,renderedText:$,renderedEl:C,checked:w,prefixCls:d,onClick:i,onRemove:a,showRemove:h},null)});return g(Le,null,[g("ul",{class:ge(`${d}-content`,{[`${d}-content-show-remove`]:h}),onScroll:l},[b]),m])}}}),D1=e=>{const t=new Map;return e.forEach((n,o)=>{t.set(n,o)}),t},_he=e=>{const t=new Map;return e.forEach((n,o)=>{let{disabled:r,key:i}=n;r&&t.set(i,o)}),t},Mhe=()=>null;function Ahe(e){return!!(e&&!sn(e)&&Object.prototype.toString.call(e)==="[object Object]")}function yp(e){return e.filter(t=>!t.disabled).map(t=>t.key)}const Rhe={prefixCls:String,dataSource:pt([]),filter:String,filterOption:Function,checkedKeys:K.arrayOf(K.string),handleFilter:Function,handleClear:Function,renderItem:Function,showSearch:$e(!1),searchPlaceholder:String,notFoundContent:K.any,itemUnit:String,itemsUnit:String,renderList:K.any,disabled:$e(),direction:Ne(),showSelectAll:$e(),remove:String,selectAll:String,selectCurrent:String,selectInvert:String,removeAll:String,removeCurrent:String,selectAllLabel:K.any,showRemove:$e(),pagination:K.any,onItemSelect:Function,onItemSelectAll:Function,onItemRemove:Function,onScroll:Function},O4=le({compatConfig:{MODE:3},name:"TransferList",inheritAttrs:!1,props:Rhe,slots:Object,setup(e,t){let{attrs:n,slots:o}=t;const r=ae(""),i=ae(),a=ae(),l=(x,P)=>{let w=x?x(P):null;const O=!!w&&zt(w).length>0;return O||(w=g(Ehe,k(k({},P),{},{ref:a}),null)),{customize:O,bodyContent:w}},s=x=>{const{renderItem:P=Mhe}=e,w=P(x),O=Ahe(w);return{renderedText:O?w.value:w,renderedEl:O?w.label:w,item:x}},u=ae([]),c=ae([]);Ve(()=>{const x=[],P=[];e.dataSource.forEach(w=>{const O=s(w),{renderedText:I}=O;if(r.value&&r.value.trim()&&!b(I,w))return null;x.push(w),P.push(O)}),u.value=x,c.value=P});const d=E(()=>{const{checkedKeys:x}=e;if(x.length===0)return"none";const P=D1(x);return u.value.every(w=>P.has(w.key)||!!w.disabled)?"all":"part"}),f=E(()=>yp(u.value)),p=(x,P)=>Array.from(new Set([...x,...e.checkedKeys])).filter(w=>P.indexOf(w)===-1),v=x=>{let{disabled:P,prefixCls:w}=x;var O;const I=d.value==="all";return g(gr,{disabled:((O=e.dataSource)===null||O===void 0?void 0:O.length)===0||P,checked:I,indeterminate:d.value==="part",class:`${w}-checkbox`,onChange:()=>{const T=f.value;e.onItemSelectAll(p(I?[]:T,I?e.checkedKeys:[]))}},null)},h=x=>{var P;const{target:{value:w}}=x;r.value=w,(P=e.handleFilter)===null||P===void 0||P.call(e,x)},m=x=>{var P;r.value="",(P=e.handleClear)===null||P===void 0||P.call(e,x)},b=(x,P)=>{const{filterOption:w}=e;return w?w(r.value,P):x.includes(r.value)},S=(x,P)=>{const{itemsUnit:w,itemUnit:O,selectAllLabel:I}=e;if(I)return typeof I=="function"?I({selectedCount:x,totalCount:P}):I;const _=P>1?w:O;return g(Le,null,[(x>0?`${x}/`:"")+P,zn(" "),_])},C=E(()=>Array.isArray(e.notFoundContent)?e.notFoundContent[e.direction==="left"?0:1]:e.notFoundContent),$=(x,P,w,O,I,_)=>{const T=I?g("div",{class:`${x}-body-search-wrapper`},[g(Che,{prefixCls:`${x}-search`,onChange:h,handleClear:m,placeholder:P,value:r.value,disabled:_},null)]):null;let A;const{onEvents:R}=RS(n),{bodyContent:H,customize:M}=l(O,y(y(y({},e),{filteredItems:u.value,filteredRenderItems:c.value,selectedKeys:w}),R));return M?A=g("div",{class:`${x}-body-customize-wrapper`},[H]):A=u.value.length?H:g("div",{class:`${x}-body-not-found`},[C.value]),g("div",{class:I?`${x}-body ${x}-body-with-search`:`${x}-body`,ref:i},[T,A])};return()=>{var x,P;const{prefixCls:w,checkedKeys:O,disabled:I,showSearch:_,searchPlaceholder:T,selectAll:A,selectCurrent:R,selectInvert:H,removeAll:M,removeCurrent:D,renderList:N,onItemSelectAll:L,onItemRemove:F,showSelectAll:B=!0,showRemove:j,pagination:z}=e,G=(x=o.footer)===null||x===void 0?void 0:x.call(o,y({},e)),Q=ge(w,{[`${w}-with-pagination`]:!!z,[`${w}-with-footer`]:!!G}),Y=$(w,T,O,N,_,I),oe=G?g("div",{class:`${w}-footer`},[G]):null,Z=!j&&!z&&v({disabled:I,prefixCls:w});let re=null;j?re=g(on,null,{default:()=>[z&&g(on.Item,{key:"removeCurrent",onClick:()=>{const X=yp((a.value.items||[]).map(te=>te.item));F==null||F(X)}},{default:()=>[D]}),g(on.Item,{key:"removeAll",onClick:()=>{F==null||F(f.value)}},{default:()=>[M]})]}):re=g(on,null,{default:()=>[g(on.Item,{key:"selectAll",onClick:()=>{const X=f.value;L(p(X,[]))}},{default:()=>[A]}),z&&g(on.Item,{onClick:()=>{const X=yp((a.value.items||[]).map(te=>te.item));L(p(X,[]))}},{default:()=>[R]}),g(on.Item,{key:"selectInvert",onClick:()=>{let X;z?X=yp((a.value.items||[]).map(J=>J.item)):X=f.value;const te=new Set(O),W=[],U=[];X.forEach(J=>{te.has(J)?U.push(J):W.push(J)}),L(p(W,U))}},{default:()=>[H]})]});const ne=g(zr,{class:`${w}-header-dropdown`,overlay:re,disabled:I},{default:()=>[g(cs,null,null)]});return g("div",{class:Q,style:n.style},[g("div",{class:`${w}-header`},[B?g(Le,null,[Z,ne]):null,g("span",{class:`${w}-header-selected`},[g("span",null,[S(O.length,u.value.length)]),g("span",{class:`${w}-header-title`},[(P=o.titleText)===null||P===void 0?void 0:P.call(o)])])]),Y,oe])}}});function I4(){}const $$=e=>{const{disabled:t,moveToLeft:n=I4,moveToRight:o=I4,leftArrowText:r="",rightArrowText:i="",leftActive:a,rightActive:l,class:s,style:u,direction:c,oneWay:d}=e;return g("div",{class:s,style:u},[g(Qt,{type:"primary",size:"small",disabled:t||!l,onClick:o,icon:g(c!=="rtl"?Jo:mi,null,null)},{default:()=>[i]}),!d&&g(Qt,{type:"primary",size:"small",disabled:t||!a,onClick:n,icon:g(c!=="rtl"?mi:Jo,null,null)},{default:()=>[r]})])};$$.displayName="Operation";$$.inheritAttrs=!1;const Dhe=e=>{const{antCls:t,componentCls:n,listHeight:o,controlHeightLG:r,marginXXS:i,margin:a}=e,l=`${t}-table`,s=`${t}-input`;return{[`${n}-customize-list`]:{[`${n}-list`]:{flex:"1 1 50%",width:"auto",height:"auto",minHeight:o},[`${l}-wrapper`]:{[`${l}-small`]:{border:0,borderRadius:0,[`${l}-selection-column`]:{width:r,minWidth:r}},[`${l}-pagination${l}-pagination`]:{margin:`${a}px 0 ${i}px`}},[`${s}[disabled]`]:{backgroundColor:"transparent"}}}},T4=(e,t)=>{const{componentCls:n,colorBorder:o}=e;return{[`${n}-list`]:{borderColor:t,"&-search:not([disabled])":{borderColor:o}}}},Nhe=e=>{const{componentCls:t}=e;return{[`${t}-status-error`]:y({},T4(e,e.colorError)),[`${t}-status-warning`]:y({},T4(e,e.colorWarning))}},khe=e=>{const{componentCls:t,colorBorder:n,colorSplit:o,lineWidth:r,transferItemHeight:i,transferHeaderHeight:a,transferHeaderVerticalPadding:l,transferItemPaddingVertical:s,controlItemBgActive:u,controlItemBgActiveHover:c,colorTextDisabled:d,listHeight:f,listWidth:p,listWidthLG:v,fontSizeIcon:h,marginXS:m,paddingSM:b,lineType:S,iconCls:C,motionDurationSlow:$}=e;return{display:"flex",flexDirection:"column",width:p,height:f,border:`${r}px ${S} ${n}`,borderRadius:e.borderRadiusLG,"&-with-pagination":{width:v,height:"auto"},"&-search":{[`${C}-search`]:{color:d}},"&-header":{display:"flex",flex:"none",alignItems:"center",height:a,padding:`${l-r}px ${b}px ${l}px`,color:e.colorText,background:e.colorBgContainer,borderBottom:`${r}px ${S} ${o}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,"> *:not(:last-child)":{marginInlineEnd:4},"> *":{flex:"none"},"&-title":y(y({},cn),{flex:"auto",textAlign:"end"}),"&-dropdown":y(y({},ns()),{fontSize:h,transform:"translateY(10%)",cursor:"pointer","&[disabled]":{cursor:"not-allowed"}})},"&-body":{display:"flex",flex:"auto",flexDirection:"column",overflow:"hidden",fontSize:e.fontSize,"&-search-wrapper":{position:"relative",flex:"none",padding:b}},"&-content":{flex:"auto",margin:0,padding:0,overflow:"auto",listStyle:"none","&-item":{display:"flex",alignItems:"center",minHeight:i,padding:`${s}px ${b}px`,transition:`all ${$}`,"> *:not(:last-child)":{marginInlineEnd:m},"> *":{flex:"none"},"&-text":y(y({},cn),{flex:"auto"}),"&-remove":{position:"relative",color:n,cursor:"pointer",transition:`all ${$}`,"&:hover":{color:e.colorLinkHover},"&::after":{position:"absolute",insert:`-${s}px -50%`,content:'""'}},[`&:not(${t}-list-content-item-disabled)`]:{"&:hover":{backgroundColor:e.controlItemBgHover,cursor:"pointer"},[`&${t}-list-content-item-checked:hover`]:{backgroundColor:c}},"&-checked":{backgroundColor:u},"&-disabled":{color:d,cursor:"not-allowed"}},[`&-show-remove ${t}-list-content-item:not(${t}-list-content-item-disabled):hover`]:{background:"transparent",cursor:"default"}},"&-pagination":{padding:`${e.paddingXS}px 0`,textAlign:"end",borderTop:`${r}px ${S} ${o}`},"&-body-not-found":{flex:"none",width:"100%",margin:"auto 0",color:d,textAlign:"center"},"&-footer":{borderTop:`${r}px ${S} ${o}`},"&-checkbox":{lineHeight:1}}},Lhe=e=>{const{antCls:t,iconCls:n,componentCls:o,transferHeaderHeight:r,marginXS:i,marginXXS:a,fontSizeIcon:l,fontSize:s,lineHeight:u}=e;return{[o]:y(y({},qe(e)),{position:"relative",display:"flex",alignItems:"stretch",[`${o}-disabled`]:{[`${o}-list`]:{background:e.colorBgContainerDisabled}},[`${o}-list`]:khe(e),[`${o}-operation`]:{display:"flex",flex:"none",flexDirection:"column",alignSelf:"center",margin:`0 ${i}px`,verticalAlign:"middle",[`${t}-btn`]:{display:"block","&:first-child":{marginBottom:a},[n]:{fontSize:l}}},[`${t}-empty-image`]:{maxHeight:r/2-Math.round(s*u)}})}},Fhe=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},Bhe=Ue("Transfer",e=>{const{fontSize:t,lineHeight:n,lineWidth:o,controlHeightLG:r,controlHeight:i}=e,a=Math.round(t*n),l=r,s=i,u=Be(e,{transferItemHeight:s,transferHeaderHeight:l,transferHeaderVerticalPadding:Math.ceil((l-o-a)/2),transferItemPaddingVertical:(s-a)/2});return[Lhe(u),Dhe(u),Nhe(u),Fhe(u)]},{listWidth:180,listHeight:200,listWidthLG:250}),Hhe=()=>({id:String,prefixCls:String,dataSource:pt([]),disabled:$e(),targetKeys:pt(),selectedKeys:pt(),render:ye(),listStyle:He([Function,Object],()=>({})),operationStyle:De(void 0),titles:pt(),operations:pt(),showSearch:$e(!1),filterOption:ye(),searchPlaceholder:String,notFoundContent:K.any,locale:De(),rowKey:ye(),showSelectAll:$e(),selectAllLabels:pt(),children:ye(),oneWay:$e(),pagination:He([Object,Boolean]),status:Ne(),onChange:ye(),onSelectChange:ye(),onSearch:ye(),onScroll:ye(),"onUpdate:targetKeys":ye(),"onUpdate:selectedKeys":ye()}),zhe=le({compatConfig:{MODE:3},name:"ATransfer",inheritAttrs:!1,props:Hhe(),slots:Object,setup(e,t){let{emit:n,attrs:o,slots:r,expose:i}=t;const{configProvider:a,prefixCls:l,direction:s}=Te("transfer",e),[u,c]=Bhe(l),d=ae([]),f=ae([]),p=bn(),v=kn.useInject(),h=E(()=>Yr(v.status,e.status));be(()=>e.selectedKeys,()=>{var Y,oe;d.value=((Y=e.selectedKeys)===null||Y===void 0?void 0:Y.filter(Z=>e.targetKeys.indexOf(Z)===-1))||[],f.value=((oe=e.selectedKeys)===null||oe===void 0?void 0:oe.filter(Z=>e.targetKeys.indexOf(Z)>-1))||[]},{immediate:!0});const m=(Y,oe)=>{const Z={notFoundContent:oe("Transfer")},re=mn(r,e,"notFoundContent");return re&&(Z.notFoundContent=re),e.searchPlaceholder!==void 0&&(Z.searchPlaceholder=e.searchPlaceholder),y(y(y({},Y),Z),e.locale)},b=Y=>{const{targetKeys:oe=[],dataSource:Z=[]}=e,re=Y==="right"?d.value:f.value,ne=_he(Z),X=re.filter(J=>!ne.has(J)),te=D1(X),W=Y==="right"?X.concat(oe):oe.filter(J=>!te.has(J)),U=Y==="right"?"left":"right";Y==="right"?d.value=[]:f.value=[],n("update:targetKeys",W),w(U,[]),n("change",W,Y,X),p.onFieldChange()},S=()=>{b("left")},C=()=>{b("right")},$=(Y,oe)=>{w(Y,oe)},x=Y=>$("left",Y),P=Y=>$("right",Y),w=(Y,oe)=>{Y==="left"?(e.selectedKeys||(d.value=oe),n("update:selectedKeys",[...oe,...f.value]),n("selectChange",oe,nt(f.value))):(e.selectedKeys||(f.value=oe),n("update:selectedKeys",[...oe,...d.value]),n("selectChange",nt(d.value),oe))},O=(Y,oe)=>{const Z=oe.target.value;n("search",Y,Z)},I=Y=>{O("left",Y)},_=Y=>{O("right",Y)},T=Y=>{n("search",Y,"")},A=()=>{T("left")},R=()=>{T("right")},H=(Y,oe,Z)=>{const re=Y==="left"?[...d.value]:[...f.value],ne=re.indexOf(oe);ne>-1&&re.splice(ne,1),Z&&re.push(oe),w(Y,re)},M=(Y,oe)=>H("left",Y,oe),D=(Y,oe)=>H("right",Y,oe),N=Y=>{const{targetKeys:oe=[]}=e,Z=oe.filter(re=>!Y.includes(re));n("update:targetKeys",Z),n("change",Z,"left",[...Y])},L=(Y,oe)=>{n("scroll",Y,oe)},F=Y=>{L("left",Y)},B=Y=>{L("right",Y)},j=(Y,oe)=>typeof Y=="function"?Y({direction:oe}):Y,z=ae([]),G=ae([]);Ve(()=>{const{dataSource:Y,rowKey:oe,targetKeys:Z=[]}=e,re=[],ne=new Array(Z.length),X=D1(Z);Y.forEach(te=>{oe&&(te.key=oe(te)),X.has(te.key)?ne[X.get(te.key)]=te:re.push(te)}),z.value=re,G.value=ne}),i({handleSelectChange:w});const Q=Y=>{var oe,Z,re,ne,X,te;const{disabled:W,operations:U=[],showSearch:J,listStyle:de,operationStyle:fe,filterOption:pe,showSelectAll:ve,selectAllLabels:he=[],oneWay:V,pagination:q,id:ie=p.id.value}=e,{class:me,style:Se}=o,ce=r.children,ee=!ce&&q,ue=a.renderEmpty,xe=m(Y,ue),{footer:Pe}=r,_e=e.render||r.render,Ce=f.value.length>0,we=d.value.length>0,Oe=ge(l.value,me,{[`${l.value}-disabled`]:W,[`${l.value}-customize-list`]:!!ce,[`${l.value}-rtl`]:s.value==="rtl"},lo(l.value,h.value,v.hasFeedback),c.value),Me=e.titles,Re=(re=(oe=Me&&Me[0])!==null&&oe!==void 0?oe:(Z=r.leftTitle)===null||Z===void 0?void 0:Z.call(r))!==null&&re!==void 0?re:(xe.titles||["",""])[0],Ae=(te=(ne=Me&&Me[1])!==null&&ne!==void 0?ne:(X=r.rightTitle)===null||X===void 0?void 0:X.call(r))!==null&&te!==void 0?te:(xe.titles||["",""])[1];return g("div",k(k({},o),{},{class:Oe,style:Se,id:ie}),[g(O4,k({key:"leftList",prefixCls:`${l.value}-list`,dataSource:z.value,filterOption:pe,style:j(de,"left"),checkedKeys:d.value,handleFilter:I,handleClear:A,onItemSelect:M,onItemSelectAll:x,renderItem:_e,showSearch:J,renderList:ce,onScroll:F,disabled:W,direction:s.value==="rtl"?"right":"left",showSelectAll:ve,selectAllLabel:he[0]||r.leftSelectAllLabel,pagination:ee},xe),{titleText:()=>Re,footer:Pe}),g($$,{key:"operation",class:`${l.value}-operation`,rightActive:we,rightArrowText:U[0],moveToRight:C,leftActive:Ce,leftArrowText:U[1],moveToLeft:S,style:fe,disabled:W,direction:s.value,oneWay:V},null),g(O4,k({key:"rightList",prefixCls:`${l.value}-list`,dataSource:G.value,filterOption:pe,style:j(de,"right"),checkedKeys:f.value,handleFilter:_,handleClear:R,onItemSelect:D,onItemSelectAll:P,onItemRemove:N,renderItem:_e,showSearch:J,renderList:ce,onScroll:B,disabled:W,direction:s.value==="rtl"?"left":"right",showSelectAll:ve,selectAllLabel:he[1]||r.rightSelectAllLabel,showRemove:V,pagination:ee},xe),{titleText:()=>Ae,footer:Pe})])};return()=>u(g(ts,{componentName:"Transfer",defaultLocale:$o.Transfer,children:Q},null))}}),jhe=Lt(zhe);function Whe(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function Vhe(e){const{label:t,value:n,children:o}=e||{},r=n||"value";return{_title:t?[t]:["title","label"],value:r,key:r,children:o||"children"}}function N1(e){return e.disabled||e.disableCheckbox||e.checkable===!1}function Khe(e,t){const n=[];function o(r){r.forEach(i=>{n.push(i[t.value]);const a=i[t.children];a&&o(a)})}return o(e),n}function E4(e){return e==null}const RN=Symbol("TreeSelectContextPropsKey");function Uhe(e){return Xe(RN,e)}function Ghe(){return ze(RN,{})}const Xhe={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Yhe=le({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,setup(e,t){let{slots:n,expose:o}=t;const r=hf(),i=Rv(),a=Ghe(),l=ae(),s=gC(()=>a.treeData,[()=>r.open,()=>a.treeData],x=>x[0]),u=E(()=>{const{checkable:x,halfCheckedKeys:P,checkedKeys:w}=i;return x?{checked:w,halfChecked:P}:null});be(()=>r.open,()=>{ot(()=>{var x;r.open&&!r.multiple&&i.checkedKeys.length&&((x=l.value)===null||x===void 0||x.scrollTo({key:i.checkedKeys[0]}))})},{immediate:!0,flush:"post"});const c=E(()=>String(r.searchValue).toLowerCase()),d=x=>c.value?String(x[i.treeNodeFilterProp]).toLowerCase().includes(c.value):!1,f=se(i.treeDefaultExpandedKeys),p=se(null);be(()=>r.searchValue,()=>{r.searchValue&&(p.value=Khe(nt(a.treeData),nt(a.fieldNames)))},{immediate:!0});const v=E(()=>i.treeExpandedKeys?i.treeExpandedKeys.slice():r.searchValue?p.value:f.value),h=x=>{var P;f.value=x,p.value=x,(P=i.onTreeExpand)===null||P===void 0||P.call(i,x)},m=x=>{x.preventDefault()},b=(x,P)=>{let{node:w}=P;var O,I;const{checkable:_,checkedKeys:T}=i;_&&N1(w)||((O=a.onSelect)===null||O===void 0||O.call(a,w.key,{selected:!T.includes(w.key)}),r.multiple||(I=r.toggleOpen)===null||I===void 0||I.call(r,!1))},S=ae(null),C=E(()=>i.keyEntities[S.value]),$=x=>{S.value=x};return o({scrollTo:function(){for(var x,P,w=arguments.length,O=new Array(w),I=0;I{var P;const{which:w}=x;switch(w){case Ie.UP:case Ie.DOWN:case Ie.LEFT:case Ie.RIGHT:(P=l.value)===null||P===void 0||P.onKeydown(x);break;case Ie.ENTER:{if(C.value){const{selectable:O,value:I}=C.value.node||{};O!==!1&&b(null,{node:{key:S.value},selected:!i.checkedKeys.includes(I)})}break}case Ie.ESC:r.toggleOpen(!1)}},onKeyup:()=>{}}),()=>{var x;const{prefixCls:P,multiple:w,searchValue:O,open:I,notFoundContent:_=(x=n.notFoundContent)===null||x===void 0?void 0:x.call(n)}=r,{listHeight:T,listItemHeight:A,virtual:R,dropdownMatchSelectWidth:H,treeExpandAction:M}=a,{checkable:D,treeDefaultExpandAll:N,treeIcon:L,showTreeIcon:F,switcherIcon:B,treeLine:j,loadData:z,treeLoadedKeys:G,treeMotion:Q,onTreeLoad:Y,checkedKeys:oe}=i;if(s.value.length===0)return g("div",{role:"listbox",class:`${P}-empty`,onMousedown:m},[_]);const Z={fieldNames:a.fieldNames};return G&&(Z.loadedKeys=G),v.value&&(Z.expandedKeys=v.value),g("div",{onMousedown:m},[C.value&&I&&g("span",{style:Xhe,"aria-live":"assertive"},[C.value.node.value]),g(CN,k(k({ref:l,focusable:!1,prefixCls:`${P}-tree`,treeData:s.value,height:T,itemHeight:A,virtual:R!==!1&&H!==!1,multiple:w,icon:L,showIcon:F,switcherIcon:B,showLine:j,loadData:O?null:z,motion:Q,activeKey:S.value,checkable:D,checkStrictly:!0,checkedKeys:u.value,selectedKeys:D?[]:oe,defaultExpandAll:N},Z),{},{onActiveChange:$,onSelect:b,onCheck:b,onExpand:h,onLoad:Y,filterTreeNode:d,expandAction:M}),y(y({},n),{checkable:i.customSlots.treeCheckable}))])}}}),qhe="SHOW_ALL",DN="SHOW_PARENT",w$="SHOW_CHILD";function _4(e,t,n,o){const r=new Set(e);return t===w$?e.filter(i=>{const a=n[i];return!(a&&a.children&&a.children.some(l=>{let{node:s}=l;return r.has(s[o.value])})&&a.children.every(l=>{let{node:s}=l;return N1(s)||r.has(s[o.value])}))}):t===DN?e.filter(i=>{const a=n[i],l=a?a.parent:null;return!(l&&!N1(l.node)&&r.has(l.key))}):e}const iu=()=>null;iu.inheritAttrs=!1;iu.displayName="ATreeSelectNode";iu.isTreeSelectNode=!0;var Jhe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r0&&arguments[0]!==void 0?arguments[0]:[];return zt(n).map(o=>{var r,i,a;if(!Zhe(o))return null;const l=o.children||{},s=o.key,u={};for(const[w,O]of Object.entries(o.props))u[Kc(w)]=O;const{isLeaf:c,checkable:d,selectable:f,disabled:p,disableCheckbox:v}=u,h={isLeaf:c||c===""||void 0,checkable:d||d===""||void 0,selectable:f||f===""||void 0,disabled:p||p===""||void 0,disableCheckbox:v||v===""||void 0},m=y(y({},u),h),{title:b=(r=l.title)===null||r===void 0?void 0:r.call(l,m),switcherIcon:S=(i=l.switcherIcon)===null||i===void 0?void 0:i.call(l,m)}=u,C=Jhe(u,["title","switcherIcon"]),$=(a=l.default)===null||a===void 0?void 0:a.call(l),x=y(y(y({},C),{title:b,switcherIcon:S,key:s,isLeaf:c}),h),P=t($);return P.length&&(x.children=P),x})}return t(e)}function k1(e){if(!e)return e;const t=y({},e);return"props"in t||Object.defineProperty(t,"props",{get(){return t}}),t}function eve(e,t,n,o,r,i){let a=null,l=null;function s(){function u(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return c.map((p,v)=>{const h=`${d}-${v}`,m=p[i.value],b=n.includes(m),S=u(p[i.children]||[],h,b),C=g(iu,p,{default:()=>[S.map($=>$.node)]});if(t===m&&(a=C),b){const $={pos:h,node:C,children:S};return f||l.push($),$}return null}).filter(p=>p)}l||(l=[],u(o),l.sort((c,d)=>{let{node:{props:{value:f}}}=c,{node:{props:{value:p}}}=d;const v=n.indexOf(f),h=n.indexOf(p);return v-h}))}Object.defineProperty(e,"triggerNode",{get(){return s(),a}}),Object.defineProperty(e,"allCheckedNodes",{get(){return s(),r?l:l.map(u=>{let{node:c}=u;return c})}})}function tve(e,t){let{id:n,pId:o,rootPId:r}=t;const i={},a=[];return e.map(s=>{const u=y({},s),c=u[n];return i[c]=u,u.key=u.key||c,u}).forEach(s=>{const u=s[o],c=i[u];c&&(c.children=c.children||[],c.children.push(s)),(u===r||!c&&r===null)&&a.push(s)}),a}function nve(e,t,n){const o=se();return be([n,e,t],()=>{const r=n.value;e.value?o.value=n.value?tve(nt(e.value),y({id:"id",pId:"pId",rootPId:null},r!==!0?r:{})):nt(e.value).slice():o.value=Qhe(nt(t.value))},{immediate:!0,deep:!0}),o}const ove=e=>{const t=se({valueLabels:new Map}),n=se();return be(e,()=>{n.value=nt(e.value)},{immediate:!0}),[E(()=>{const{valueLabels:r}=t.value,i=new Map,a=n.value.map(l=>{var s;const{value:u}=l,c=(s=l.label)!==null&&s!==void 0?s:r.get(u);return i.set(u,c),y(y({},l),{label:c})});return t.value.valueLabels=i,a})]},rve=(e,t)=>{const n=se(new Map),o=se({});return Ve(()=>{const r=t.value,i=If(e.value,{fieldNames:r,initWrapper:a=>y(y({},a),{valueEntities:new Map}),processEntity:(a,l)=>{const s=a.node[r.value];l.valueEntities.set(s,a)}});n.value=i.valueEntities,o.value=i.keyEntities}),{valueEntities:n,keyEntities:o}},ive=(e,t,n,o,r,i)=>{const a=se([]),l=se([]);return Ve(()=>{let s=e.value.map(d=>{let{value:f}=d;return f}),u=t.value.map(d=>{let{value:f}=d;return f});const c=s.filter(d=>!o.value[d]);n.value&&({checkedKeys:s,halfCheckedKeys:u}=pr(s,!0,o.value,r.value,i.value)),a.value=Array.from(new Set([...c,...s])),l.value=u}),[a,l]},ave=(e,t,n)=>{let{treeNodeFilterProp:o,filterTreeNode:r,fieldNames:i}=n;return E(()=>{const{children:a}=i.value,l=t.value,s=o==null?void 0:o.value;if(!l||r.value===!1)return e.value;let u;if(typeof r.value=="function")u=r.value;else{const d=l.toUpperCase();u=(f,p)=>{const v=p[s];return String(v).toUpperCase().includes(d)}}function c(d){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const p=[];for(let v=0,h=d.length;ve.treeCheckable&&!e.treeCheckStrictly),l=E(()=>e.treeCheckable||e.treeCheckStrictly),s=E(()=>e.treeCheckStrictly||e.labelInValue),u=E(()=>l.value||e.multiple),c=E(()=>Vhe(e.fieldNames)),[d,f]=Dt("",{value:E(()=>e.searchValue!==void 0?e.searchValue:e.inputValue),postState:ie=>ie||""}),p=ie=>{var me;f(ie),(me=e.onSearch)===null||me===void 0||me.call(e,ie)},v=nve(We(e,"treeData"),We(e,"children"),We(e,"treeDataSimpleMode")),{keyEntities:h,valueEntities:m}=rve(v,c),b=ie=>{const me=[],Se=[];return ie.forEach(ce=>{m.value.has(ce)?Se.push(ce):me.push(ce)}),{missingRawValues:me,existRawValues:Se}},S=ave(v,d,{fieldNames:c,treeNodeFilterProp:We(e,"treeNodeFilterProp"),filterTreeNode:We(e,"filterTreeNode")}),C=ie=>{if(ie){if(e.treeNodeLabelProp)return ie[e.treeNodeLabelProp];const{_title:me}=c.value;for(let Se=0;SeWhe(ie).map(Se=>lve(Se)?{value:Se}:Se),x=ie=>$(ie).map(Se=>{let{label:ce}=Se;const{value:ee,halfChecked:ue}=Se;let xe;const Pe=m.value.get(ee);return Pe&&(ce=ce??C(Pe.node),xe=Pe.node.disabled),{label:ce,value:ee,halfChecked:ue,disabled:xe}}),[P,w]=Dt(e.defaultValue,{value:We(e,"value")}),O=E(()=>$(P.value)),I=se([]),_=se([]);Ve(()=>{const ie=[],me=[];O.value.forEach(Se=>{Se.halfChecked?me.push(Se):ie.push(Se)}),I.value=ie,_.value=me});const T=E(()=>I.value.map(ie=>ie.value)),{maxLevel:A,levelEntities:R}=cm(h),[H,M]=ive(I,_,a,h,A,R),D=E(()=>{const Se=_4(H.value,e.showCheckedStrategy,h.value,c.value).map(ue=>{var xe,Pe,_e;return(_e=(Pe=(xe=h.value[ue])===null||xe===void 0?void 0:xe.node)===null||Pe===void 0?void 0:Pe[c.value.value])!==null&&_e!==void 0?_e:ue}).map(ue=>{const xe=I.value.find(Pe=>Pe.value===ue);return{value:ue,label:xe==null?void 0:xe.label}}),ce=x(Se),ee=ce[0];return!u.value&&ee&&E4(ee.value)&&E4(ee.label)?[]:ce.map(ue=>{var xe;return y(y({},ue),{label:(xe=ue.label)!==null&&xe!==void 0?xe:ue.value})})}),[N]=ove(D),L=(ie,me,Se)=>{const ce=x(ie);if(w(ce),e.autoClearSearchValue&&f(""),e.onChange){let ee=ie;a.value&&(ee=_4(ie,e.showCheckedStrategy,h.value,c.value).map(Re=>{const Ae=m.value.get(Re);return Ae?Ae.node[c.value.value]:Re}));const{triggerValue:ue,selected:xe}=me||{triggerValue:void 0,selected:void 0};let Pe=ee;if(e.treeCheckStrictly){const Me=_.value.filter(Re=>!ee.includes(Re.value));Pe=[...Pe,...Me]}const _e=x(Pe),Ce={preValue:I.value,triggerValue:ue};let we=!0;(e.treeCheckStrictly||Se==="selection"&&!xe)&&(we=!1),eve(Ce,ue,ie,v.value,we,c.value),l.value?Ce.checked=xe:Ce.selected=xe;const Oe=s.value?_e:_e.map(Me=>Me.value);e.onChange(u.value?Oe:Oe[0],s.value?null:_e.map(Me=>Me.label),Ce)}},F=(ie,me)=>{let{selected:Se,source:ce}=me;var ee,ue,xe;const Pe=nt(h.value),_e=nt(m.value),Ce=Pe[ie],we=Ce==null?void 0:Ce.node,Oe=(ee=we==null?void 0:we[c.value.value])!==null&&ee!==void 0?ee:ie;if(!u.value)L([Oe],{selected:!0,triggerValue:Oe},"option");else{let Me=Se?[...T.value,Oe]:H.value.filter(Re=>Re!==Oe);if(a.value){const{missingRawValues:Re,existRawValues:Ae}=b(Me),Fe=Ae.map(bt=>_e.get(bt).key);let lt;Se?{checkedKeys:lt}=pr(Fe,!0,Pe,A.value,R.value):{checkedKeys:lt}=pr(Fe,{halfCheckedKeys:M.value},Pe,A.value,R.value),Me=[...Re,...lt.map(bt=>Pe[bt].node[c.value.value])]}L(Me,{selected:Se,triggerValue:Oe},ce||"option")}Se||!u.value?(ue=e.onSelect)===null||ue===void 0||ue.call(e,Oe,k1(we)):(xe=e.onDeselect)===null||xe===void 0||xe.call(e,Oe,k1(we))},B=ie=>{if(e.onDropdownVisibleChange){const me={};Object.defineProperty(me,"documentClickClose",{get(){return!1}}),e.onDropdownVisibleChange(ie,me)}},j=(ie,me)=>{const Se=ie.map(ce=>ce.value);if(me.type==="clear"){L(Se,{},"selection");return}me.values.length&&F(me.values[0].value,{selected:!1,source:"selection"})},{treeNodeFilterProp:z,loadData:G,treeLoadedKeys:Q,onTreeLoad:Y,treeDefaultExpandAll:oe,treeExpandedKeys:Z,treeDefaultExpandedKeys:re,onTreeExpand:ne,virtual:X,listHeight:te,listItemHeight:W,treeLine:U,treeIcon:J,showTreeIcon:de,switcherIcon:fe,treeMotion:pe,customSlots:ve,dropdownMatchSelectWidth:he,treeExpandAction:V}=Fr(e);VK(Ug({checkable:l,loadData:G,treeLoadedKeys:Q,onTreeLoad:Y,checkedKeys:H,halfCheckedKeys:M,treeDefaultExpandAll:oe,treeExpandedKeys:Z,treeDefaultExpandedKeys:re,onTreeExpand:ne,treeIcon:J,treeMotion:pe,showTreeIcon:de,switcherIcon:fe,treeLine:U,treeNodeFilterProp:z,keyEntities:h,customSlots:ve})),Uhe(Ug({virtual:X,listHeight:te,listItemHeight:W,treeData:S,fieldNames:c,onSelect:F,dropdownMatchSelectWidth:he,treeExpandAction:V}));const q=ae();return o({focus(){var ie;(ie=q.value)===null||ie===void 0||ie.focus()},blur(){var ie;(ie=q.value)===null||ie===void 0||ie.blur()},scrollTo(ie){var me;(me=q.value)===null||me===void 0||me.scrollTo(ie)}}),()=>{var ie;const me=it(e,["id","prefixCls","customSlots","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","virtual","listHeight","listItemHeight","onDropdownVisibleChange","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion"]);return g(pC,k(k(k({ref:q},n),me),{},{id:i,prefixCls:e.prefixCls,mode:u.value?"multiple":void 0,displayValues:N.value,onDisplayValuesChange:j,searchValue:d.value,onSearch:p,OptionList:Yhe,emptyOptions:!v.value.length,onDropdownVisibleChange:B,tagRender:e.tagRender||r.tagRender,dropdownMatchSelectWidth:(ie=e.dropdownMatchSelectWidth)!==null&&ie!==void 0?ie:!0}),r)}}}),cve=e=>{const{componentCls:t,treePrefixCls:n,colorBgElevated:o}=e,r=`.${n}`;return[{[`${t}-dropdown`]:[{padding:`${e.paddingXS}px ${e.paddingXS/2}px`},$N(n,Be(e,{colorBgContainer:o})),{[r]:{borderRadius:0,"&-list-holder-inner":{alignItems:"stretch",[`${r}-treenode`]:{[`${r}-node-content-wrapper`]:{flex:"auto"}}}}},pm(`${n}-checkbox`,e),{"&-rtl":{direction:"rtl",[`${r}-switcher${r}-switcher_close`]:{[`${r}-switcher-icon svg`]:{transform:"rotate(90deg)"}}}}]}]};function uve(e,t){return Ue("TreeSelect",n=>{const o=Be(n,{treePrefixCls:t.value});return[cve(o)]})(e)}const M4=(e,t,n)=>n!==void 0?n:`${e}-${t}`;function dve(){return y(y({},it(NN(),["showTreeIcon","treeMotion","inputIcon","getInputElement","treeLine","customSlots"])),{suffixIcon:K.any,size:Ne(),bordered:$e(),treeLine:He([Boolean,Object]),replaceFields:De(),placement:Ne(),status:Ne(),popupClassName:String,dropdownClassName:String,"onUpdate:value":ye(),"onUpdate:treeExpandedKeys":ye(),"onUpdate:searchValue":ye()})}const gb=le({compatConfig:{MODE:3},name:"ATreeSelect",inheritAttrs:!1,props:Qe(dve(),{choiceTransitionName:"",listHeight:256,treeIcon:!1,listItemHeight:26,bordered:!0}),slots:Object,setup(e,t){let{attrs:n,slots:o,expose:r,emit:i}=t;e.treeData===void 0&&o.default,Mt(e.multiple!==!1||!e.treeCheckable,"TreeSelect","`multiple` will always be `true` when `treeCheckable` is true"),Mt(e.replaceFields===void 0,"TreeSelect","`replaceFields` is deprecated, please use fieldNames instead"),Mt(!e.dropdownClassName,"TreeSelect","`dropdownClassName` is deprecated. Please use `popupClassName` instead.");const a=bn(),l=kn.useInject(),s=E(()=>Yr(l.status,e.status)),{prefixCls:u,renderEmpty:c,direction:d,virtual:f,dropdownMatchSelectWidth:p,size:v,getPopupContainer:h,getPrefixCls:m,disabled:b}=Te("select",e),{compactSize:S,compactItemClassnames:C}=Xa(u,d),$=E(()=>S.value||v.value),x=ko(),P=E(()=>{var Q;return(Q=b.value)!==null&&Q!==void 0?Q:x.value}),w=E(()=>m()),O=E(()=>e.placement!==void 0?e.placement:d.value==="rtl"?"bottomRight":"bottomLeft"),I=E(()=>M4(w.value,cC(O.value),e.transitionName)),_=E(()=>M4(w.value,"",e.choiceTransitionName)),T=E(()=>m("select-tree",e.prefixCls)),A=E(()=>m("tree-select",e.prefixCls)),[R,H]=DC(u),[M]=uve(A,T),D=E(()=>ge(e.popupClassName||e.dropdownClassName,`${A.value}-dropdown`,{[`${A.value}-dropdown-rtl`]:d.value==="rtl"},H.value)),N=E(()=>!!(e.treeCheckable||e.multiple)),L=E(()=>e.showArrow!==void 0?e.showArrow:e.loading||!N.value),F=ae();r({focus(){var Q,Y;(Y=(Q=F.value).focus)===null||Y===void 0||Y.call(Q)},blur(){var Q,Y;(Y=(Q=F.value).blur)===null||Y===void 0||Y.call(Q)}});const B=function(){for(var Q=arguments.length,Y=new Array(Q),oe=0;oe{i("update:treeExpandedKeys",Q),i("treeExpand",Q)},z=Q=>{i("update:searchValue",Q),i("search",Q)},G=Q=>{i("blur",Q),a.onFieldBlur()};return()=>{var Q,Y,oe;const{notFoundContent:Z=(Q=o.notFoundContent)===null||Q===void 0?void 0:Q.call(o),prefixCls:re,bordered:ne,listHeight:X,listItemHeight:te,multiple:W,treeIcon:U,treeLine:J,showArrow:de,switcherIcon:fe=(Y=o.switcherIcon)===null||Y===void 0?void 0:Y.call(o),fieldNames:pe=e.replaceFields,id:ve=a.id.value,placeholder:he=(oe=o.placeholder)===null||oe===void 0?void 0:oe.call(o)}=e,{isFormItemInput:V,hasFeedback:q,feedbackIcon:ie}=l,{suffixIcon:me,removeIcon:Se,clearIcon:ce}=SC(y(y({},e),{multiple:N.value,showArrow:L.value,hasFeedback:q,feedbackIcon:ie,prefixCls:u.value}),o);let ee;Z!==void 0?ee=Z:ee=c("Select");const ue=it(e,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon","bordered","status","onUpdate:value","onUpdate:treeExpandedKeys","onUpdate:searchValue"]),xe=ge(!re&&A.value,{[`${u.value}-lg`]:$.value==="large",[`${u.value}-sm`]:$.value==="small",[`${u.value}-rtl`]:d.value==="rtl",[`${u.value}-borderless`]:!ne,[`${u.value}-in-form-item`]:V},lo(u.value,s.value,q),C.value,n.class,H.value),Pe={};return e.treeData===void 0&&o.default&&(Pe.children=Ot(o.default())),R(M(g(sve,k(k(k(k({},n),ue),{},{disabled:P.value,virtual:f.value,dropdownMatchSelectWidth:p.value,id:ve,fieldNames:pe,ref:F,prefixCls:u.value,class:xe,listHeight:X,listItemHeight:te,treeLine:!!J,inputIcon:me,multiple:W,removeIcon:Se,clearIcon:ce,switcherIcon:_e=>xN(T.value,fe,_e,o.leafIcon,J),showTreeIcon:U,notFoundContent:ee,getPopupContainer:h==null?void 0:h.value,treeMotion:null,dropdownClassName:D.value,choiceTransitionName:_.value,onChange:B,onBlur:G,onSearch:z,onTreeExpand:j},Pe),{},{transitionName:I.value,customSlots:y(y({},o),{treeCheckable:()=>g("span",{class:`${u.value}-tree-checkbox-inner`},null)}),maxTagPlaceholder:e.maxTagPlaceholder||o.maxTagPlaceholder,placement:O.value,showArrow:q||de,placeholder:he}),y(y({},o),{treeCheckable:()=>g("span",{class:`${u.value}-tree-checkbox-inner`},null)}))))}}}),L1=iu,fve=y(gb,{TreeNode:iu,SHOW_ALL:qhe,SHOW_PARENT:DN,SHOW_CHILD:w$,install:e=>(e.component(gb.name,gb),e.component(L1.displayName,L1),e)}),hb=()=>({format:String,showNow:$e(),showHour:$e(),showMinute:$e(),showSecond:$e(),use12Hours:$e(),hourStep:Number,minuteStep:Number,secondStep:Number,hideDisabledOptions:$e(),popupClassName:String,status:Ne()});function pve(e){const t=ZR(e,y(y({},hb()),{order:{type:Boolean,default:!0}})),{TimePicker:n,RangePicker:o}=t,r=le({name:"ATimePicker",inheritAttrs:!1,props:y(y(y(y({},Ch()),YR()),hb()),{addon:{type:Function}}),slots:Object,setup(a,l){let{slots:s,expose:u,emit:c,attrs:d}=l;const f=a,p=bn();Mt(!(s.addon||f.addon),"TimePicker","`addon` is deprecated. Please use `v-slot:renderExtraFooter` instead.");const v=ae();u({focus:()=>{var $;($=v.value)===null||$===void 0||$.focus()},blur:()=>{var $;($=v.value)===null||$===void 0||$.blur()}});const h=($,x)=>{c("update:value",$),c("change",$,x),p.onFieldChange()},m=$=>{c("update:open",$),c("openChange",$)},b=$=>{c("focus",$)},S=$=>{c("blur",$),p.onFieldBlur()},C=$=>{c("ok",$)};return()=>{const{id:$=p.id.value}=f;return g(n,k(k(k({},d),it(f,["onUpdate:value","onUpdate:open"])),{},{id:$,dropdownClassName:f.popupClassName,mode:void 0,ref:v,renderExtraFooter:f.addon||s.addon||f.renderExtraFooter||s.renderExtraFooter,onChange:h,onOpenChange:m,onFocus:b,onBlur:S,onOk:C}),s)}}}),i=le({name:"ATimeRangePicker",inheritAttrs:!1,props:y(y(y(y({},Ch()),qR()),hb()),{order:{type:Boolean,default:!0}}),slots:Object,setup(a,l){let{slots:s,expose:u,emit:c,attrs:d}=l;const f=a,p=ae(),v=bn();u({focus:()=>{var P;(P=p.value)===null||P===void 0||P.focus()},blur:()=>{var P;(P=p.value)===null||P===void 0||P.blur()}});const h=(P,w)=>{c("update:value",P),c("change",P,w),v.onFieldChange()},m=P=>{c("update:open",P),c("openChange",P)},b=P=>{c("focus",P)},S=P=>{c("blur",P),v.onFieldBlur()},C=(P,w)=>{c("panelChange",P,w)},$=P=>{c("ok",P)},x=(P,w,O)=>{c("calendarChange",P,w,O)};return()=>{const{id:P=v.id.value}=f;return g(o,k(k(k({},d),it(f,["onUpdate:open","onUpdate:value"])),{},{id:P,dropdownClassName:f.popupClassName,picker:"time",mode:void 0,ref:p,onChange:h,onOpenChange:m,onFocus:b,onBlur:S,onPanelChange:C,onOk:$,onCalendarChange:x}),s)}}});return{TimePicker:r,TimeRangePicker:i}}const{TimePicker:Sp,TimeRangePicker:yg}=pve(XC),gve=y(Sp,{TimePicker:Sp,TimeRangePicker:yg,install:e=>(e.component(Sp.name,Sp),e.component(yg.name,yg),e)}),hve=()=>({prefixCls:String,color:String,dot:K.any,pending:$e(),position:K.oneOf(Jn("left","right","")).def(""),label:K.any}),Yd=le({compatConfig:{MODE:3},name:"ATimelineItem",props:Qe(hve(),{color:"blue",pending:!1}),slots:Object,setup(e,t){let{slots:n}=t;const{prefixCls:o}=Te("timeline",e),r=E(()=>({[`${o.value}-item`]:!0,[`${o.value}-item-pending`]:e.pending})),i=E(()=>/blue|red|green|gray/.test(e.color||"")?void 0:e.color||"blue"),a=E(()=>({[`${o.value}-item-head`]:!0,[`${o.value}-item-head-${e.color||"blue"}`]:!i.value}));return()=>{var l,s,u;const{label:c=(l=n.label)===null||l===void 0?void 0:l.call(n),dot:d=(s=n.dot)===null||s===void 0?void 0:s.call(n)}=e;return g("li",{class:r.value},[c&&g("div",{class:`${o.value}-item-label`},[c]),g("div",{class:`${o.value}-item-tail`},null),g("div",{class:[a.value,!!d&&`${o.value}-item-head-custom`],style:{borderColor:i.value,color:i.value}},[d]),g("div",{class:`${o.value}-item-content`},[(u=n.default)===null||u===void 0?void 0:u.call(n)])])}}}),vve=e=>{const{componentCls:t}=e;return{[t]:y(y({},qe(e)),{margin:0,padding:0,listStyle:"none",[`${t}-item`]:{position:"relative",margin:0,paddingBottom:e.timeLineItemPaddingBottom,fontSize:e.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:e.timeLineItemHeadSize,insetInlineStart:(e.timeLineItemHeadSize-e.timeLineItemTailWidth)/2,height:`calc(100% - ${e.timeLineItemHeadSize}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px ${e.lineType} ${e.colorSplit}`},"&-pending":{[`${t}-item-head`]:{fontSize:e.fontSizeSM,backgroundColor:"transparent"},[`${t}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:e.timeLineItemHeadSize,height:e.timeLineItemHeadSize,backgroundColor:e.colorBgContainer,border:`${e.timeLineHeadBorderWidth}px ${e.lineType} transparent`,borderRadius:"50%","&-blue":{color:e.colorPrimary,borderColor:e.colorPrimary},"&-red":{color:e.colorError,borderColor:e.colorError},"&-green":{color:e.colorSuccess,borderColor:e.colorSuccess},"&-gray":{color:e.colorTextDisabled,borderColor:e.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:e.timeLineItemHeadSize/2,insetInlineStart:e.timeLineItemHeadSize/2,width:"auto",height:"auto",marginBlockStart:0,paddingBlock:e.timeLineItemCustomHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:-(e.fontSize*e.lineHeight-e.fontSize)+e.lineWidth,marginInlineStart:e.margin+e.timeLineItemHeadSize,marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${t}-item-tail`]:{display:"none"},[`> ${t}-item-content`]:{minHeight:e.controlHeightLG*1.2}}},[`&${t}-alternate, &${t}-right, &${t}-label`]:{[`${t}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:`-${e.marginXXS}px`,"&-custom":{marginInlineStart:e.timeLineItemTailWidth/2}},"&-left":{[`${t}-item-content`]:{insetInlineStart:`calc(50% - ${e.marginXXS}px)`,width:`calc(50% - ${e.marginSM}px)`,textAlign:"start"}},"&-right":{[`${t}-item-content`]:{width:`calc(50% - ${e.marginSM}px)`,margin:0,textAlign:"end"}}}},[`&${t}-right`]:{[`${t}-item-right`]:{[`${t}-item-tail, ${t}-item-head, @@ -470,12 +470,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${t}-item-last ${t}-item-tail`]:{display:"block",height:`calc(100% - ${e.margin}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px dotted ${e.colorSplit}`},[`&${t}-reverse ${t}-item-last - ${t}-item-tail`]:{display:"none"},[`&${t}-reverse ${t}-item-pending`]:{[`${t}-item-tail`]:{insetBlockStart:e.margin,display:"block",height:`calc(100% - ${e.margin}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px dotted ${e.colorSplit}`},[`${t}-item-content`]:{minHeight:e.controlHeightLG*1.2}},[`&${t}-label`]:{[`${t}-item-label`]:{position:"absolute",insetBlockStart:-(e.fontSize*e.lineHeight-e.fontSize)+e.timeLineItemTailWidth,width:`calc(50% - ${e.marginSM}px)`,textAlign:"end"},[`${t}-item-right`]:{[`${t}-item-label`]:{insetInlineStart:`calc(50% + ${e.marginSM}px)`,width:`calc(50% - ${e.marginSM}px)`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${t}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}},mve=Ue("Timeline",e=>{const t=Be(e,{timeLineItemPaddingBottom:e.padding*1.25,timeLineItemHeadSize:10,timeLineItemCustomHeadPaddingVertical:e.paddingXXS,timeLinePaddingInlineEnd:2,timeLineItemTailWidth:e.lineWidthBold,timeLineHeadBorderWidth:e.wireframe?e.lineWidthBold:e.lineWidth*3});return[vve(t)]}),bve=()=>({prefixCls:String,pending:K.any,pendingDot:K.any,reverse:$e(),mode:K.oneOf(Jn("left","alternate","right",""))}),ud=le({compatConfig:{MODE:3},name:"ATimeline",inheritAttrs:!1,props:Qe(bve(),{reverse:!1,mode:""}),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("timeline",e),[a,l]=mve(r),s=(u,c)=>{const d=u.props||{};return e.mode==="alternate"?d.position==="right"?`${r.value}-item-right`:d.position==="left"?`${r.value}-item-left`:c%2===0?`${r.value}-item-left`:`${r.value}-item-right`:e.mode==="left"?`${r.value}-item-left`:e.mode==="right"?`${r.value}-item-right`:d.position==="right"?`${r.value}-item-right`:""};return()=>{var u,c,d;const{pending:f=(u=n.pending)===null||u===void 0?void 0:u.call(n),pendingDot:p=(c=n.pendingDot)===null||c===void 0?void 0:c.call(n),reverse:v,mode:h}=e,m=typeof f=="boolean"?null:f,b=zt((d=n.default)===null||d===void 0?void 0:d.call(n)),S=f?g(Yd,{pending:!!f,dot:p||g(Po,null,null)},{default:()=>[m]}):null;S&&b.push(S);const C=v?b.reverse():b,$=C.length,x=`${r.value}-item-last`,P=C.map((I,_)=>{const T=_===$-2?x:"",A=_===$-1?x:"";return Dn(I,{class:ge([!v&&f?T:A,s(I,_)])})}),w=C.some(I=>{var _,T;return!!(!((_=I.props)===null||_===void 0)&&_.label||!((T=I.children)===null||T===void 0)&&T.label)}),O=ge(r.value,{[`${r.value}-pending`]:!!f,[`${r.value}-reverse`]:!!v,[`${r.value}-${h}`]:!!h&&!w,[`${r.value}-label`]:w,[`${r.value}-rtl`]:i.value==="rtl"},o.class,l.value);return a(g("ul",k(k({},o),{},{class:O}),[P]))}}});ud.Item=Yd;ud.install=function(e){return e.component(ud.name,ud),e.component(Yd.name,Yd),e};var yve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};function AT(e){for(var t=1;t{const{sizeMarginHeadingVerticalEnd:r,fontWeightStrong:i}=o;return{marginBottom:r,color:n,fontWeight:i,fontSize:e,lineHeight:t}},xve=e=>{const t=[1,2,3,4,5],n={};return t.forEach(o=>{n[` + ${t}-item-tail`]:{display:"none"},[`&${t}-reverse ${t}-item-pending`]:{[`${t}-item-tail`]:{insetBlockStart:e.margin,display:"block",height:`calc(100% - ${e.margin}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px dotted ${e.colorSplit}`},[`${t}-item-content`]:{minHeight:e.controlHeightLG*1.2}},[`&${t}-label`]:{[`${t}-item-label`]:{position:"absolute",insetBlockStart:-(e.fontSize*e.lineHeight-e.fontSize)+e.timeLineItemTailWidth,width:`calc(50% - ${e.marginSM}px)`,textAlign:"end"},[`${t}-item-right`]:{[`${t}-item-label`]:{insetInlineStart:`calc(50% + ${e.marginSM}px)`,width:`calc(50% - ${e.marginSM}px)`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${t}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}},mve=Ue("Timeline",e=>{const t=Be(e,{timeLineItemPaddingBottom:e.padding*1.25,timeLineItemHeadSize:10,timeLineItemCustomHeadPaddingVertical:e.paddingXXS,timeLinePaddingInlineEnd:2,timeLineItemTailWidth:e.lineWidthBold,timeLineHeadBorderWidth:e.wireframe?e.lineWidthBold:e.lineWidth*3});return[vve(t)]}),bve=()=>({prefixCls:String,pending:K.any,pendingDot:K.any,reverse:$e(),mode:K.oneOf(Jn("left","alternate","right",""))}),ud=le({compatConfig:{MODE:3},name:"ATimeline",inheritAttrs:!1,props:Qe(bve(),{reverse:!1,mode:""}),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("timeline",e),[a,l]=mve(r),s=(u,c)=>{const d=u.props||{};return e.mode==="alternate"?d.position==="right"?`${r.value}-item-right`:d.position==="left"?`${r.value}-item-left`:c%2===0?`${r.value}-item-left`:`${r.value}-item-right`:e.mode==="left"?`${r.value}-item-left`:e.mode==="right"?`${r.value}-item-right`:d.position==="right"?`${r.value}-item-right`:""};return()=>{var u,c,d;const{pending:f=(u=n.pending)===null||u===void 0?void 0:u.call(n),pendingDot:p=(c=n.pendingDot)===null||c===void 0?void 0:c.call(n),reverse:v,mode:h}=e,m=typeof f=="boolean"?null:f,b=zt((d=n.default)===null||d===void 0?void 0:d.call(n)),S=f?g(Yd,{pending:!!f,dot:p||g(Po,null,null)},{default:()=>[m]}):null;S&&b.push(S);const C=v?b.reverse():b,$=C.length,x=`${r.value}-item-last`,P=C.map((I,_)=>{const T=_===$-2?x:"",A=_===$-1?x:"";return Dn(I,{class:ge([!v&&f?T:A,s(I,_)])})}),w=C.some(I=>{var _,T;return!!(!((_=I.props)===null||_===void 0)&&_.label||!((T=I.children)===null||T===void 0)&&T.label)}),O=ge(r.value,{[`${r.value}-pending`]:!!f,[`${r.value}-reverse`]:!!v,[`${r.value}-${h}`]:!!h&&!w,[`${r.value}-label`]:w,[`${r.value}-rtl`]:i.value==="rtl"},o.class,l.value);return a(g("ul",k(k({},o),{},{class:O}),[P]))}}});ud.Item=Yd;ud.install=function(e){return e.component(ud.name,ud),e.component(Yd.name,Yd),e};var yve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};function A4(e){for(var t=1;t{const{sizeMarginHeadingVerticalEnd:r,fontWeightStrong:i}=o;return{marginBottom:r,color:n,fontWeight:i,fontSize:e,lineHeight:t}},xve=e=>{const t=[1,2,3,4,5],n={};return t.forEach(o=>{n[` h${o}&, div&-h${o}, div&-h${o} > textarea, h${o} - `]=Cve(e[`fontSizeHeading${o}`],e[`lineHeightHeading${o}`],e.colorTextHeading,e)}),n},$ve=e=>{const{componentCls:t}=e;return{"a&, a":y(y({},xv(e)),{textDecoration:e.linkDecoration,"&:active, &:hover":{textDecoration:e.linkHoverDecoration},[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},wve=()=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:VH[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:600},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),Pve=e=>{const{componentCls:t}=e,o=ps(e).inputPaddingVertical+1;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:-e.paddingSM,marginTop:-o,marginBottom:`calc(1em - ${o}px)`},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.marginXS+2,insetBlockEnd:e.marginXS,color:e.colorTextDescription,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},Ove=e=>({"&-copy-success":{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}}}),Ive=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-single-line":{whiteSpace:"nowrap"},"&-ellipsis-single-line":{overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),Tve=e=>{const{componentCls:t,sizeMarginHeadingVerticalStart:n}=e;return{[t]:y(y(y(y(y(y(y(y(y({color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccess},[`&${t}-warning`]:{color:e.colorWarning},[`&${t}-danger`]:{color:e.colorError,"a&:active, a&:focus":{color:e.colorErrorActive},"a&:hover":{color:e.colorErrorHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},xve(e)),{[` + `]=Cve(e[`fontSizeHeading${o}`],e[`lineHeightHeading${o}`],e.colorTextHeading,e)}),n},$ve=e=>{const{componentCls:t}=e;return{"a&, a":y(y({},Cv(e)),{textDecoration:e.linkDecoration,"&:active, &:hover":{textDecoration:e.linkHoverDecoration},[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},wve=()=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:VH[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:600},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),Pve=e=>{const{componentCls:t}=e,o=ps(e).inputPaddingVertical+1;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:-e.paddingSM,marginTop:-o,marginBottom:`calc(1em - ${o}px)`},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.marginXS+2,insetBlockEnd:e.marginXS,color:e.colorTextDescription,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},Ove=e=>({"&-copy-success":{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}}}),Ive=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-single-line":{whiteSpace:"nowrap"},"&-ellipsis-single-line":{overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),Tve=e=>{const{componentCls:t,sizeMarginHeadingVerticalStart:n}=e;return{[t]:y(y(y(y(y(y(y(y(y({color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccess},[`&${t}-warning`]:{color:e.colorWarning},[`&${t}-danger`]:{color:e.colorError,"a&:active, a&:focus":{color:e.colorErrorActive},"a&:hover":{color:e.colorErrorHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},xve(e)),{[` & + h1${t}, & + h2${t}, & + h3${t}, @@ -485,41 +485,41 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${t}-expand, ${t}-edit, ${t}-copy - `]:y(y({},xv(e)),{marginInlineStart:e.marginXXS})}),Pve(e)),Ove(e)),Ive()),{"&-rtl":{direction:"rtl"}})}},kN=Ue("Typography",e=>[Tve(e)],{sizeMarginHeadingVerticalStart:"1.2em",sizeMarginHeadingVerticalEnd:"0.5em"}),Eve=()=>({prefixCls:String,value:String,maxlength:Number,autoSize:{type:[Boolean,Object]},onSave:Function,onCancel:Function,onEnd:Function,onChange:Function,originContent:String,direction:String,component:String}),_ve=le({compatConfig:{MODE:3},name:"Editable",inheritAttrs:!1,props:Eve(),setup(e,t){let{emit:n,slots:o,attrs:r}=t;const{prefixCls:i}=Fr(e),a=rt({current:e.value||"",lastKeyCode:void 0,inComposition:!1,cancelFlag:!1});be(()=>e.value,S=>{a.current=S});const l=ae();Ke(()=>{var S;if(l.value){const C=(S=l.value)===null||S===void 0?void 0:S.resizableTextArea,$=C==null?void 0:C.textArea;$.focus();const{length:x}=$.value;$.setSelectionRange(x,x)}});function s(S){l.value=S}function u(S){let{target:{value:C}}=S;a.current=C.replace(/[\r\n]/g,""),n("change",a.current)}function c(){a.inComposition=!0}function d(){a.inComposition=!1}function f(S){const{keyCode:C}=S;C===Ie.ENTER&&S.preventDefault(),!a.inComposition&&(a.lastKeyCode=C)}function p(S){const{keyCode:C,ctrlKey:$,altKey:x,metaKey:P,shiftKey:w}=S;a.lastKeyCode===C&&!a.inComposition&&!$&&!x&&!P&&!w&&(C===Ie.ENTER?(h(),n("end")):C===Ie.ESC&&(a.current=e.originContent,n("cancel")))}function v(){h()}function h(){n("save",a.current.trim())}const[m,b]=kN(i);return()=>{const S=ge({[`${i.value}`]:!0,[`${i.value}-edit-content`]:!0,[`${i.value}-rtl`]:e.direction==="rtl",[e.component?`${i.value}-${e.component}`:""]:!0},r.class,b.value);return m(g("div",k(k({},r),{},{class:S}),[g(Vx,{ref:s,maxlength:e.maxlength,value:a.current,onChange:u,onKeydown:f,onKeyup:p,onCompositionstart:c,onCompositionend:d,onBlur:v,rows:1,autoSize:e.autoSize===void 0||e.autoSize},null),o.enterIcon?o.enterIcon({className:`${e.prefixCls}-edit-content-confirm`}):g(P$,{class:`${e.prefixCls}-edit-content-confirm`},null)]))}}}),Mve=3,Ave=8;let _o;const vb={padding:0,margin:0,display:"inline",lineHeight:"inherit"};function LN(e,t){e.setAttribute("aria-hidden","true");const n=window.getComputedStyle(t),o=_K(n);e.setAttribute("style",o),e.style.position="fixed",e.style.left="0",e.style.height="auto",e.style.minHeight="auto",e.style.maxHeight="auto",e.style.paddingTop="0",e.style.paddingBottom="0",e.style.borderTopWidth="0",e.style.borderBottomWidth="0",e.style.top="-999999px",e.style.zIndex="-1000",e.style.textOverflow="clip",e.style.whiteSpace="normal",e.style.webkitLineClamp="none"}function Rve(e){const t=document.createElement("div");LN(t,e),t.appendChild(document.createTextNode("text")),document.body.appendChild(t);const n=t.getBoundingClientRect().height;return document.body.removeChild(t),n}const Dve=(e,t,n,o,r)=>{_o||(_o=document.createElement("div"),_o.setAttribute("aria-hidden","true"),document.body.appendChild(_o));const{rows:i,suffix:a=""}=t,l=Rve(e),s=Math.round(l*i*100)/100;LN(_o,e);const u=MM({render(){return g("div",{style:vb},[g("span",{style:vb},[n,a]),g("span",{style:vb},[o])])}});u.mount(_o);function c(){return Math.round(_o.getBoundingClientRect().height*100)/100-.1<=s}if(c())return u.unmount(),{content:n,text:_o.innerHTML,ellipsis:!1};const d=Array.prototype.slice.apply(_o.childNodes[0].childNodes[0].cloneNode(!0).childNodes).filter(C=>{let{nodeType:$,data:x}=C;return $!==Ave&&x!==""}),f=Array.prototype.slice.apply(_o.childNodes[0].childNodes[1].cloneNode(!0).childNodes);u.unmount();const p=[];_o.innerHTML="";const v=document.createElement("span");_o.appendChild(v);const h=document.createTextNode(r+a);v.appendChild(h),f.forEach(C=>{_o.appendChild(C)});function m(C){v.insertBefore(C,h)}function b(C,$){let x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,P=arguments.length>3&&arguments[3]!==void 0?arguments[3]:$.length,w=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;const O=Math.floor((x+P)/2),I=$.slice(0,O);if(C.textContent=I,x>=P-1)for(let _=P;_>=x;_-=1){const T=$.slice(0,_);if(C.textContent=T,c()||!T)return _===$.length?{finished:!1,vNode:$}:{finished:!0,vNode:T}}return c()?b(C,$,O,P,O):b(C,$,x,O,w)}function S(C){if(C.nodeType===Mve){const x=C.textContent||"",P=document.createTextNode(x);return m(P),b(P,x)}return{finished:!1,vNode:null}}return d.some(C=>{const{finished:$,vNode:x}=S(C);return x&&p.push(x),$}),{content:p,text:_o.innerHTML,ellipsis:!0}};var Nve=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,direction:String,component:String}),Ao=le({name:"ATypography",inheritAttrs:!1,props:kve(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("typography",e),[a,l]=kN(r);return()=>{var s;const u=y(y({},e),o),{prefixCls:c,direction:d,component:f="article"}=u,p=Nve(u,["prefixCls","direction","component"]);return a(g(f,k(k({},p),{},{class:ge(r.value,{[`${r.value}-rtl`]:i.value==="rtl"},o.class,l.value)}),{default:()=>[(s=n.default)===null||s===void 0?void 0:s.call(n)]}))}}}),Lve=()=>{const e=document.getSelection();if(!e.rangeCount)return function(){};let t=document.activeElement;const n=[];for(let o=0;o"u"){s&&console.warn("unable to use e.clipboardData"),s&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();const d=RT[t.format]||RT.default;window.clipboardData.setData(d,e)}else c.clipboardData.clearData(),c.clipboardData.setData(t.format,e);t.onCopy&&(c.preventDefault(),t.onCopy(c.clipboardData))}),document.body.appendChild(a),r.selectNodeContents(a),i.addRange(r),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(u){s&&console.error("unable to copy using execCommand: ",u),s&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(c){s&&console.error("unable to copy using clipboardData: ",c),s&&console.error("falling back to prompt"),n=Bve("message"in t?t.message:Fve),window.prompt(n,e)}}finally{i&&(typeof i.removeRange=="function"?i.removeRange(r):i.removeAllRanges()),a&&document.body.removeChild(a),o()}return l}var zve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};function DT(e){for(var t=1;t({editable:{type:[Boolean,Object],default:void 0},copyable:{type:[Boolean,Object],default:void 0},prefixCls:String,component:String,type:String,disabled:{type:Boolean,default:void 0},ellipsis:{type:[Boolean,Object],default:void 0},code:{type:Boolean,default:void 0},mark:{type:Boolean,default:void 0},underline:{type:Boolean,default:void 0},delete:{type:Boolean,default:void 0},strong:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},content:String,"onUpdate:content":Function}),Df=le({compatConfig:{MODE:3},name:"TypographyBase",inheritAttrs:!1,props:Rf(),setup(e,t){let{slots:n,attrs:o,emit:r}=t;const{prefixCls:i,direction:a}=Te("typography",e),l=rt({copied:!1,ellipsisText:"",ellipsisContent:null,isEllipsis:!1,expanded:!1,clientRendered:!1,expandStr:"",copyStr:"",copiedStr:"",editStr:"",copyId:void 0,rafId:void 0,prevProps:void 0,originContent:""}),s=ae(),u=ae(),c=E(()=>{const M=e.ellipsis;return M?y({rows:1,expandable:!1},typeof M=="object"?M:null):{}});Ke(()=>{l.clientRendered=!0,O()}),tt(()=>{clearTimeout(l.copyId),Ze.cancel(l.rafId)}),be([()=>c.value.rows,()=>e.content],()=>{ot(()=>{P()})},{flush:"post",deep:!0}),Ve(()=>{e.content===void 0&&(Yo(!e.editable),Yo(!e.ellipsis))});function d(){var M;return e.ellipsis||e.editable?e.content:(M=Co(s.value))===null||M===void 0?void 0:M.innerText}function f(M){const{onExpand:D}=c.value;l.expanded=!0,D==null||D(M)}function p(M){M.preventDefault(),l.originContent=e.content,x(!0)}function v(M){h(M),x(!1)}function h(M){const{onChange:D}=S.value;M!==e.content&&(r("update:content",M),D==null||D(M))}function m(){var M,D;(D=(M=S.value).onCancel)===null||D===void 0||D.call(M),x(!1)}function b(M){M.preventDefault(),M.stopPropagation();const{copyable:D}=e,N=y({},typeof D=="object"?D:null);N.text===void 0&&(N.text=d()),Hve(N.text||""),l.copied=!0,ot(()=>{N.onCopy&&N.onCopy(M),l.copyId=setTimeout(()=>{l.copied=!1},3e3)})}const S=E(()=>{const M=e.editable;return M?y({},typeof M=="object"?M:null):{editing:!1}}),[C,$]=Dt(!1,{value:E(()=>S.value.editing)});function x(M){const{onStart:D}=S.value;M&&D&&D(),$(M)}be(C,M=>{var D;M||(D=u.value)===null||D===void 0||D.focus()},{flush:"post"});function P(M){if(M){const{width:D,height:N}=M;if(!D||!N)return}Ze.cancel(l.rafId),l.rafId=Ze(()=>{O()})}const w=E(()=>{const{rows:M,expandable:D,suffix:N,onEllipsis:L,tooltip:F}=c.value;return N||F||e.editable||e.copyable||D||L?!1:M===1?Gve:Uve}),O=()=>{const{ellipsisText:M,isEllipsis:D}=l,{rows:N,suffix:L,onEllipsis:F}=c.value;if(!N||N<0||!Co(s.value)||l.expanded||e.content===void 0||w.value)return;const{content:B,text:j,ellipsis:z}=Dve(Co(s.value),{rows:N,suffix:L},e.content,H(!0),kT);(M!==j||l.isEllipsis!==z)&&(l.ellipsisText=j,l.ellipsisContent=B,l.isEllipsis=z,D!==z&&F&&F(z))};function I(M,D){let{mark:N,code:L,underline:F,delete:B,strong:j,keyboard:z}=M,G=D;function Q(Y,oe){if(!Y)return;const Z=function(){return G}();G=g(oe,null,{default:()=>[Z]})}return Q(j,"strong"),Q(F,"u"),Q(B,"del"),Q(L,"code"),Q(N,"mark"),Q(z,"kbd"),G}function _(M){const{expandable:D,symbol:N}=c.value;if(!D||!M&&(l.expanded||!l.isEllipsis))return null;const L=(n.ellipsisSymbol?n.ellipsisSymbol():N)||l.expandStr;return g("a",{key:"expand",class:`${i.value}-expand`,onClick:f,"aria-label":l.expandStr},[L])}function T(){if(!e.editable)return;const{tooltip:M,triggerType:D=["icon"]}=e.editable,N=n.editableIcon?n.editableIcon():g(I$,{role:"button"},null),L=n.editableTooltip?n.editableTooltip():l.editStr,F=typeof L=="string"?L:"";return D.indexOf("icon")!==-1?g(Ro,{key:"edit",title:M===!1?"":L},{default:()=>[g(Eh,{ref:u,class:`${i.value}-edit`,onClick:p,"aria-label":F},{default:()=>[N]})]}):null}function A(){if(!e.copyable)return;const{tooltip:M}=e.copyable,D=l.copied?l.copiedStr:l.copyStr,N=n.copyableTooltip?n.copyableTooltip({copied:l.copied}):D,L=typeof N=="string"?N:"",F=l.copied?g(Yc,null,null):g(O$,null,null),B=n.copyableIcon?n.copyableIcon({copied:!!l.copied}):F;return g(Ro,{key:"copy",title:M===!1?"":N},{default:()=>[g(Eh,{class:[`${i.value}-copy`,{[`${i.value}-copy-success`]:l.copied}],onClick:b,"aria-label":L},{default:()=>[B]})]})}function R(){const{class:M,style:D}=o,{maxlength:N,autoSize:L,onEnd:F}=S.value;return g(_ve,{class:M,style:D,prefixCls:i.value,value:e.content,originContent:l.originContent,maxlength:N,autoSize:L,onSave:v,onChange:h,onCancel:m,onEnd:F,direction:a.value,component:e.component},{enterIcon:n.editableEnterIcon})}function H(M){return[_(M),T(),A()].filter(D=>D)}return()=>{var M;const{triggerType:D=["icon"]}=S.value,N=e.ellipsis||e.editable?e.content!==void 0?e.content:(M=n.default)===null||M===void 0?void 0:M.call(n):n.default?n.default():e.content;return C.value?R():g(ts,{componentName:"Text",children:L=>{const F=y(y({},e),o),{type:B,disabled:j,content:z,class:G,style:Q}=F,Y=Kve(F,["type","disabled","content","class","style"]),{rows:oe,suffix:Z,tooltip:re}=c.value,{edit:ne,copy:X,copied:te,expand:W}=L;l.editStr=ne,l.copyStr=X,l.copiedStr=te,l.expandStr=W;const U=it(Y,["prefixCls","editable","copyable","ellipsis","mark","code","delete","underline","strong","keyboard","onUpdate:content"]),J=w.value,de=oe===1&&J,fe=oe&&oe>1&&J;let pe=N,ve;if(oe&&l.isEllipsis&&!l.expanded&&!J){const{title:q}=Y;let ie=q||"";!q&&(typeof N=="string"||typeof N=="number")&&(ie=String(N)),ie=ie==null?void 0:ie.slice(String(l.ellipsisContent||"").length),pe=g(Le,null,[nt(l.ellipsisContent),g("span",{title:ie,"aria-hidden":"true"},[kT]),Z])}else pe=g(Le,null,[N,Z]);pe=I(e,pe);const he=re&&oe&&l.isEllipsis&&!l.expanded&&!J,V=n.ellipsisTooltip?n.ellipsisTooltip():re;return g(br,{onResize:P,disabled:!oe},{default:()=>[g(Ao,k({ref:s,class:[{[`${i.value}-${B}`]:B,[`${i.value}-disabled`]:j,[`${i.value}-ellipsis`]:oe,[`${i.value}-single-line`]:oe===1&&!l.isEllipsis,[`${i.value}-ellipsis-single-line`]:de,[`${i.value}-ellipsis-multiple-line`]:fe},G],style:y(y({},Q),{WebkitLineClamp:fe?oe:void 0}),"aria-label":ve,direction:a.value,onClick:D.indexOf("text")!==-1?p:()=>{}},U),{default:()=>[he?g(Ro,{title:re===!0?N:V},{default:()=>[g("span",null,[pe])]}):pe,H()]})]})}},null)}}});var Xve=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rit(y(y({},Rf()),{ellipsis:{type:Boolean,default:void 0}}),["component"]),au=(e,t)=>{let{slots:n,attrs:o}=t;const r=y(y({},e),o),{ellipsis:i,rel:a}=r,l=Xve(r,["ellipsis","rel"]),s=y(y({},l),{rel:a===void 0&&l.target==="_blank"?"noopener noreferrer":a,ellipsis:!!i,component:"a"});return delete s.navigate,g(Df,s,n)};au.displayName="ATypographyLink";au.inheritAttrs=!1;au.props=Yve();const qve=()=>it(Rf(),["component"]),lu=(e,t)=>{let{slots:n,attrs:o}=t;const r=y(y(y({},e),{component:"div"}),o);return g(Df,r,n)};lu.displayName="ATypographyParagraph";lu.inheritAttrs=!1;lu.props=qve();const Jve=()=>y(y({},it(Rf(),["component"])),{ellipsis:{type:[Boolean,Object],default:void 0}}),su=(e,t)=>{let{slots:n,attrs:o}=t;const{ellipsis:r}=e,i=y(y(y({},e),{ellipsis:r&&typeof r=="object"?it(r,["expandable","rows"]):r,component:"span"}),o);return g(Df,i,n)};su.displayName="ATypographyText";su.inheritAttrs=!1;su.props=Jve();var Zve=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);ry(y({},it(Rf(),["component","strong"])),{level:Number}),cu=(e,t)=>{let{slots:n,attrs:o}=t;const{level:r=1}=e,i=Zve(e,["level"]);let a;Qve.includes(r)?a=`h${r}`:a="h1";const l=y(y(y({},i),{component:a}),o);return g(Df,l,n)};cu.displayName="ATypographyTitle";cu.inheritAttrs=!1;cu.props=eme();Ao.Text=su;Ao.Title=cu;Ao.Paragraph=lu;Ao.Link=au;Ao.Base=Df;Ao.install=function(e){return e.component(Ao.name,Ao),e.component(Ao.Text.displayName,su),e.component(Ao.Title.displayName,cu),e.component(Ao.Paragraph.displayName,lu),e.component(Ao.Link.displayName,au),e};function tme(e,t){const n=`cannot ${e.method} ${e.action} ${t.status}'`,o=new Error(n);return o.status=t.status,o.method=e.method,o.url=e.action,o}function LT(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function nme(e){const t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(i){i.total>0&&(i.percent=i.loaded/i.total*100),e.onProgress(i)});const n=new FormData;e.data&&Object.keys(e.data).forEach(r=>{const i=e.data[r];if(Array.isArray(i)){i.forEach(a=>{n.append(`${r}[]`,a)});return}n.append(r,i)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(i){e.onError(i)},t.onload=function(){return t.status<200||t.status>=300?e.onError(tme(e,t),LT(t)):e.onSuccess(LT(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const o=e.headers||{};return o["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(o).forEach(r=>{o[r]!==null&&t.setRequestHeader(r,o[r])}),t.send(n),{abort(){t.abort()}}}const ome=+new Date;let rme=0;function mb(){return`vc-upload-${ome}-${++rme}`}const bb=(e,t)=>{if(e&&t){const n=Array.isArray(t)?t:t.split(","),o=e.name||"",r=e.type||"",i=r.replace(/\/.*$/,"");return n.some(a=>{const l=a.trim();if(/^\*(\/\*)?$/.test(a))return!0;if(l.charAt(0)==="."){const s=o.toLowerCase(),u=l.toLowerCase();let c=[u];return(u===".jpg"||u===".jpeg")&&(c=[".jpg",".jpeg"]),c.some(d=>s.endsWith(d))}return/\/\*$/.test(l)?i===l.replace(/\/.*$/,""):!!(r===l||/^\w+$/.test(l))})}return!0};function ime(e,t){const n=e.createReader();let o=[];function r(){n.readEntries(i=>{const a=Array.prototype.slice.apply(i);o=o.concat(a),!a.length?t(o):r()})}r()}const ame=(e,t,n)=>{const o=(r,i)=>{r.path=i||"",r.isFile?r.file(a=>{n(a)&&(r.fullPath&&!a.webkitRelativePath&&(Object.defineProperties(a,{webkitRelativePath:{writable:!0}}),a.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(a,{webkitRelativePath:{writable:!1}})),t([a]))}):r.isDirectory&&ime(r,a=>{a.forEach(l=>{o(l,`${i}${r.name}/`)})})};e.forEach(r=>{o(r.webkitGetAsEntry())})},FN=()=>({capture:[Boolean,String],multipart:{type:Boolean,default:void 0},name:String,disabled:{type:Boolean,default:void 0},componentTag:String,action:[String,Function],method:String,directory:{type:Boolean,default:void 0},data:[Object,Function],headers:Object,accept:String,multiple:{type:Boolean,default:void 0},onBatchStart:Function,onReject:Function,onStart:Function,onError:Function,onSuccess:Function,onProgress:Function,beforeUpload:Function,customRequest:Function,withCredentials:{type:Boolean,default:void 0},openFileDialogOnClick:{type:Boolean,default:void 0},prefixCls:String,id:String,onMouseenter:Function,onMouseleave:Function,onClick:Function});var lme=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function l(c){try{u(o.next(c))}catch(d){a(d)}}function s(c){try{u(o.throw(c))}catch(d){a(d)}}function u(c){c.done?i(c.value):r(c.value).then(l,s)}u((o=o.apply(e,t||[])).next())})},sme=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rlme(this,void 0,void 0,function*(){const{beforeUpload:$}=e;let x=S;if($){try{x=yield $(S,C)}catch{x=!1}if(x===!1)return{origin:S,parsedFile:null,action:null,data:null}}const{action:P}=e;let w;typeof P=="function"?w=yield P(S):w=P;const{data:O}=e;let I;typeof O=="function"?I=yield O(S):I=O;const _=(typeof x=="object"||typeof x=="string")&&x?x:S;let T;_ instanceof File?T=_:T=new File([_],S.name,{type:S.type});const A=T;return A.uid=S.uid,{origin:S,data:I,parsedFile:A,action:w}}),c=S=>{let{data:C,origin:$,action:x,parsedFile:P}=S;if(!s)return;const{onStart:w,customRequest:O,name:I,headers:_,withCredentials:T,method:A}=e,{uid:R}=$,H=O||nme,M={action:x,filename:I,data:C,file:P,headers:_,withCredentials:T,method:A||"post",onProgress:D=>{const{onProgress:N}=e;N==null||N(D,P)},onSuccess:(D,N)=>{const{onSuccess:L}=e;L==null||L(D,P,N),delete a[R]},onError:(D,N)=>{const{onError:L}=e;L==null||L(D,N,P),delete a[R]}};w($),a[R]=H(M)},d=()=>{i.value=mb()},f=S=>{if(S){const C=S.uid?S.uid:S;a[C]&&a[C].abort&&a[C].abort(),delete a[C]}else Object.keys(a).forEach(C=>{a[C]&&a[C].abort&&a[C].abort(),delete a[C]})};Ke(()=>{s=!0}),tt(()=>{s=!1,f()});const p=S=>{const C=[...S],$=C.map(x=>(x.uid=mb(),u(x,C)));Promise.all($).then(x=>{const{onBatchStart:P}=e;P==null||P(x.map(w=>{let{origin:O,parsedFile:I}=w;return{file:O,parsedFile:I}})),x.filter(w=>w.parsedFile!==null).forEach(w=>{c(w)})})},v=S=>{const{accept:C,directory:$}=e,{files:x}=S.target,P=[...x].filter(w=>!$||bb(w,C));p(P),d()},h=S=>{const C=l.value;if(!C)return;const{onClick:$}=e;C.click(),$&&$(S)},m=S=>{S.key==="Enter"&&h(S)},b=S=>{const{multiple:C}=e;if(S.preventDefault(),S.type!=="dragover")if(e.directory)ame(Array.prototype.slice.call(S.dataTransfer.items),p,$=>bb($,e.accept));else{const $=Mq(Array.prototype.slice.call(S.dataTransfer.files),w=>bb(w,e.accept));let x=$[0];const P=$[1];C===!1&&(x=x.slice(0,1)),p(x),P.length&&e.onReject&&e.onReject(P)}};return r({abort:f}),()=>{var S;const{componentTag:C,prefixCls:$,disabled:x,id:P,multiple:w,accept:O,capture:I,directory:_,openFileDialogOnClick:T,onMouseenter:A,onMouseleave:R}=e,H=sme(e,["componentTag","prefixCls","disabled","id","multiple","accept","capture","directory","openFileDialogOnClick","onMouseenter","onMouseleave"]),M={[$]:!0,[`${$}-disabled`]:x,[o.class]:!!o.class},D=_?{directory:"directory",webkitdirectory:"webkitdirectory"}:{};return g(C,k(k({},x?{}:{onClick:T?h:()=>{},onKeydown:T?m:()=>{},onMouseenter:A,onMouseleave:R,onDrop:b,onDragover:b,tabindex:"0"}),{},{class:M,role:"button",style:o.style}),{default:()=>[g("input",k(k(k({},Ua(H,{aria:!0,data:!0})),{},{id:P,type:"file",ref:l,onClick:L=>L.stopPropagation(),onCancel:L=>L.stopPropagation(),key:i.value,style:{display:"none"},accept:O},D),{},{multiple:w,onChange:v},I!=null?{capture:I}:{}),null),(S=n.default)===null||S===void 0?void 0:S.call(n)]})}}});function yb(){}const FT=le({compatConfig:{MODE:3},name:"Upload",inheritAttrs:!1,props:Qe(FN(),{componentTag:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:yb,onError:yb,onSuccess:yb,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0}),setup(e,t){let{slots:n,attrs:o,expose:r}=t;const i=ae();return r({abort:l=>{var s;(s=i.value)===null||s===void 0||s.abort(l)}}),()=>g(cme,k(k(k({},e),o),{},{ref:i}),n)}});var ume={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};function BT(e){for(var t=1;t{let{uid:i}=r;return i===e.uid});return o===-1?n.push(e):n[o]=e,n}function Sb(e,t){const n=e.uid!==void 0?"uid":"name";return t.filter(o=>o[n]===e[n])[0]}function mme(e,t){const n=e.uid!==void 0?"uid":"name",o=t.filter(r=>r[n]!==e[n]);return o.length===t.length?null:o}const bme=function(){const t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),o=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(o)||[""])[0]},HN=e=>e.indexOf("image/")===0,yme=e=>{if(e.type&&!e.thumbUrl)return HN(e.type);const t=e.thumbUrl||e.url||"",n=bme(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(n)?!0:!(/^data:/.test(t)||n)},pa=200;function Sme(e){return new Promise(t=>{if(!e.type||!HN(e.type)){t("");return}const n=document.createElement("canvas");n.width=pa,n.height=pa,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${pa}px; height: ${pa}px; z-index: 9999; display: none;`,document.body.appendChild(n);const o=n.getContext("2d"),r=new Image;if(r.onload=()=>{const{width:i,height:a}=r;let l=pa,s=pa,u=0,c=0;i>a?(s=a*(pa/i),c=-(s-l)/2):(l=i*(pa/a),u=-(l-s)/2),o.drawImage(r,u,c,l,s);const d=n.toDataURL();document.body.removeChild(n),t(d)},r.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const i=new FileReader;i.addEventListener("load",()=>{i.result&&(r.src=i.result)}),i.readAsDataURL(e)}else r.src=window.URL.createObjectURL(e)})}var Cme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};function jT(e){for(var t=1;t({prefixCls:String,locale:De(void 0),file:De(),items:pt(),listType:Ne(),isImgUrl:ye(),showRemoveIcon:$e(),showDownloadIcon:$e(),showPreviewIcon:$e(),removeIcon:ye(),downloadIcon:ye(),previewIcon:ye(),iconRender:ye(),actionIconRender:ye(),itemRender:ye(),onPreview:ye(),onClose:ye(),onDownload:ye(),progress:De()}),wme=le({compatConfig:{MODE:3},name:"ListItem",inheritAttrs:!1,props:$me(),setup(e,t){let{slots:n,attrs:o}=t;var r;const i=se(!1),a=se();Ke(()=>{a.value=setTimeout(()=>{i.value=!0},300)}),tt(()=>{clearTimeout(a.value)});const l=se((r=e.file)===null||r===void 0?void 0:r.status);be(()=>{var c;return(c=e.file)===null||c===void 0?void 0:c.status},c=>{c!=="removed"&&(l.value=c)});const{rootPrefixCls:s}=Te("upload",e),u=E(()=>Cr(`${s.value}-fade`));return()=>{var c,d;const{prefixCls:f,locale:p,listType:v,file:h,items:m,progress:b,iconRender:S=n.iconRender,actionIconRender:C=n.actionIconRender,itemRender:$=n.itemRender,isImgUrl:x,showPreviewIcon:P,showRemoveIcon:w,showDownloadIcon:O,previewIcon:I=n.previewIcon,removeIcon:_=n.removeIcon,downloadIcon:T=n.downloadIcon,onPreview:A,onDownload:R,onClose:H}=e,{class:M,style:D}=o,N=S({file:h});let L=g("div",{class:`${f}-text-icon`},[N]);if(v==="picture"||v==="picture-card")if(l.value==="uploading"||!h.thumbUrl&&!h.url){const U={[`${f}-list-item-thumbnail`]:!0,[`${f}-list-item-file`]:l.value!=="uploading"};L=g("div",{class:U},[N])}else{const U=x!=null&&x(h)?g("img",{src:h.thumbUrl||h.url,alt:h.name,class:`${f}-list-item-image`,crossorigin:h.crossOrigin},null):N,J={[`${f}-list-item-thumbnail`]:!0,[`${f}-list-item-file`]:x&&!x(h)};L=g("a",{class:J,onClick:de=>A(h,de),href:h.url||h.thumbUrl,target:"_blank",rel:"noopener noreferrer"},[U])}const F={[`${f}-list-item`]:!0,[`${f}-list-item-${l.value}`]:!0},B=typeof h.linkProps=="string"?JSON.parse(h.linkProps):h.linkProps,j=w?C({customIcon:_?_({file:h}):g(Tm,null,null),callback:()=>H(h),prefixCls:f,title:p.removeFile}):null,z=O&&l.value==="done"?C({customIcon:T?T({file:h}):g(M$,null,null),callback:()=>R(h),prefixCls:f,title:p.downloadFile}):null,G=v!=="picture-card"&&g("span",{key:"download-delete",class:[`${f}-list-item-actions`,{picture:v==="picture"}]},[z,j]),Q=`${f}-list-item-name`,Y=h.url?[g("a",k(k({key:"view",target:"_blank",rel:"noopener noreferrer",class:Q,title:h.name},B),{},{href:h.url,onClick:U=>A(h,U)}),[h.name]),G]:[g("span",{key:"view",class:Q,onClick:U=>A(h,U),title:h.name},[h.name]),G],oe={pointerEvents:"none",opacity:.5},Z=P?g("a",{href:h.url||h.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:h.url||h.thumbUrl?void 0:oe,onClick:U=>A(h,U),title:p.previewFile},[I?I({file:h}):g(Ef,null,null)]):null,re=v==="picture-card"&&l.value!=="uploading"&&g("span",{class:`${f}-list-item-actions`},[Z,l.value==="done"&&z,j]),ne=g("div",{class:F},[L,Y,re,i.value&&g(Nn,u.value,{default:()=>[Pn(g("div",{class:`${f}-list-item-progress`},["percent"in h?g(a$,k(k({},b),{},{type:"line",percent:h.percent}),null):null]),[[Vn,l.value==="uploading"]])]})]),X={[`${f}-list-item-container`]:!0,[`${M}`]:!!M},te=h.response&&typeof h.response=="string"?h.response:((c=h.error)===null||c===void 0?void 0:c.statusText)||((d=h.error)===null||d===void 0?void 0:d.message)||p.uploadError,W=l.value==="error"?g(Ro,{title:te,getPopupContainer:U=>U.parentNode},{default:()=>[ne]}):ne;return g("div",{class:X,style:D},[$?$({originNode:W,file:h,fileList:m,actions:{download:R.bind(null,h),preview:A.bind(null,h),remove:H.bind(null,h)}}):W])}}}),Pme=(e,t)=>{let{slots:n}=t;var o;return zt((o=n.default)===null||o===void 0?void 0:o.call(n))[0]},Ome=le({compatConfig:{MODE:3},name:"AUploadList",props:Qe(vme(),{listType:"text",progress:{strokeWidth:2,showInfo:!1},showRemoveIcon:!0,showDownloadIcon:!1,showPreviewIcon:!0,previewFile:Sme,isImageUrl:yme,items:[],appendActionVisible:!0}),setup(e,t){let{slots:n,expose:o}=t;const r=se(!1);Ke(()=>{r.value==!0});const i=se([]);be(()=>e.items,function(){let h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];i.value=h.slice()},{immediate:!0,deep:!0}),Ve(()=>{if(e.listType!=="picture"&&e.listType!=="picture-card")return;let h=!1;(e.items||[]).forEach((m,b)=>{typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(m.originFileObj instanceof File||m.originFileObj instanceof Blob)||m.thumbUrl!==void 0||(m.thumbUrl="",e.previewFile&&e.previewFile(m.originFileObj).then(S=>{const C=S||"";C!==m.thumbUrl&&(i.value[b].thumbUrl=C,h=!0)}))}),h&&D_(i)});const a=(h,m)=>{if(e.onPreview)return m==null||m.preventDefault(),e.onPreview(h)},l=h=>{typeof e.onDownload=="function"?e.onDownload(h):h.url&&window.open(h.url)},s=h=>{var m;(m=e.onRemove)===null||m===void 0||m.call(e,h)},u=h=>{let{file:m}=h;const b=e.iconRender||n.iconRender;if(b)return b({file:m,listType:e.listType});const S=m.status==="uploading",C=e.isImageUrl&&e.isImageUrl(m)?g(E$,null,null):g(_$,null,null);let $=g(S?Po:T$,null,null);return e.listType==="picture"?$=S?g(Po,null,null):C:e.listType==="picture-card"&&($=S?e.locale.uploading:C),$},c=h=>{const{customIcon:m,callback:b,prefixCls:S,title:C}=h,$={type:"text",size:"small",title:C,onClick:()=>{b()},class:`${S}-list-item-action`};return sn(m)?g(Qt,$,{icon:()=>m}):g(Qt,$,{default:()=>[g("span",null,[m])]})};o({handlePreview:a,handleDownload:l});const{prefixCls:d,rootPrefixCls:f}=Te("upload",e),p=E(()=>({[`${d.value}-list`]:!0,[`${d.value}-list-${e.listType}`]:!0})),v=E(()=>{const h=y({},Sf(`${f.value}-motion-collapse`));delete h.onAfterAppear,delete h.onAfterEnter,delete h.onAfterLeave;const m=y(y({},Rv(`${d.value}-${e.listType==="picture-card"?"animate-inline":"animate"}`)),{class:p.value,appear:r.value});return e.listType!=="picture-card"?y(y({},h),m):m});return()=>{const{listType:h,locale:m,isImageUrl:b,showPreviewIcon:S,showRemoveIcon:C,showDownloadIcon:$,removeIcon:x,previewIcon:P,downloadIcon:w,progress:O,appendAction:I,itemRender:_,appendActionVisible:T}=e,A=I==null?void 0:I(),R=i.value;return g(fv,k(k({},v.value),{},{tag:"div"}),{default:()=>[R.map(H=>{const{uid:M}=H;return g(wme,{key:M,locale:m,prefixCls:d.value,file:H,items:R,progress:O,listType:h,isImgUrl:b,showPreviewIcon:S,showRemoveIcon:C,showDownloadIcon:$,onPreview:a,onDownload:l,onClose:s,removeIcon:x,previewIcon:P,downloadIcon:w,itemRender:_},y(y({},n),{iconRender:u,actionIconRender:c}))}),I?Pn(g(Pme,{key:"__ant_upload_appendAction"},{default:()=>A}),[[Vn,!!T]]):null]})}}}),Ime=e=>{const{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:`${e.padding}px 0`},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${e.marginXXS}px`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{cursor:"not-allowed",[`p${t}-drag-icon ${n}, + `]:y(y({},Cv(e)),{marginInlineStart:e.marginXXS})}),Pve(e)),Ove(e)),Ive()),{"&-rtl":{direction:"rtl"}})}},kN=Ue("Typography",e=>[Tve(e)],{sizeMarginHeadingVerticalStart:"1.2em",sizeMarginHeadingVerticalEnd:"0.5em"}),Eve=()=>({prefixCls:String,value:String,maxlength:Number,autoSize:{type:[Boolean,Object]},onSave:Function,onCancel:Function,onEnd:Function,onChange:Function,originContent:String,direction:String,component:String}),_ve=le({compatConfig:{MODE:3},name:"Editable",inheritAttrs:!1,props:Eve(),setup(e,t){let{emit:n,slots:o,attrs:r}=t;const{prefixCls:i}=Fr(e),a=rt({current:e.value||"",lastKeyCode:void 0,inComposition:!1,cancelFlag:!1});be(()=>e.value,S=>{a.current=S});const l=ae();Ke(()=>{var S;if(l.value){const C=(S=l.value)===null||S===void 0?void 0:S.resizableTextArea,$=C==null?void 0:C.textArea;$.focus();const{length:x}=$.value;$.setSelectionRange(x,x)}});function s(S){l.value=S}function u(S){let{target:{value:C}}=S;a.current=C.replace(/[\r\n]/g,""),n("change",a.current)}function c(){a.inComposition=!0}function d(){a.inComposition=!1}function f(S){const{keyCode:C}=S;C===Ie.ENTER&&S.preventDefault(),!a.inComposition&&(a.lastKeyCode=C)}function p(S){const{keyCode:C,ctrlKey:$,altKey:x,metaKey:P,shiftKey:w}=S;a.lastKeyCode===C&&!a.inComposition&&!$&&!x&&!P&&!w&&(C===Ie.ENTER?(h(),n("end")):C===Ie.ESC&&(a.current=e.originContent,n("cancel")))}function v(){h()}function h(){n("save",a.current.trim())}const[m,b]=kN(i);return()=>{const S=ge({[`${i.value}`]:!0,[`${i.value}-edit-content`]:!0,[`${i.value}-rtl`]:e.direction==="rtl",[e.component?`${i.value}-${e.component}`:""]:!0},r.class,b.value);return m(g("div",k(k({},r),{},{class:S}),[g(Vx,{ref:s,maxlength:e.maxlength,value:a.current,onChange:u,onKeydown:f,onKeyup:p,onCompositionstart:c,onCompositionend:d,onBlur:v,rows:1,autoSize:e.autoSize===void 0||e.autoSize},null),o.enterIcon?o.enterIcon({className:`${e.prefixCls}-edit-content-confirm`}):g(P$,{class:`${e.prefixCls}-edit-content-confirm`},null)]))}}}),Mve=3,Ave=8;let _o;const vb={padding:0,margin:0,display:"inline",lineHeight:"inherit"};function LN(e,t){e.setAttribute("aria-hidden","true");const n=window.getComputedStyle(t),o=_K(n);e.setAttribute("style",o),e.style.position="fixed",e.style.left="0",e.style.height="auto",e.style.minHeight="auto",e.style.maxHeight="auto",e.style.paddingTop="0",e.style.paddingBottom="0",e.style.borderTopWidth="0",e.style.borderBottomWidth="0",e.style.top="-999999px",e.style.zIndex="-1000",e.style.textOverflow="clip",e.style.whiteSpace="normal",e.style.webkitLineClamp="none"}function Rve(e){const t=document.createElement("div");LN(t,e),t.appendChild(document.createTextNode("text")),document.body.appendChild(t);const n=t.getBoundingClientRect().height;return document.body.removeChild(t),n}const Dve=(e,t,n,o,r)=>{_o||(_o=document.createElement("div"),_o.setAttribute("aria-hidden","true"),document.body.appendChild(_o));const{rows:i,suffix:a=""}=t,l=Rve(e),s=Math.round(l*i*100)/100;LN(_o,e);const u=MM({render(){return g("div",{style:vb},[g("span",{style:vb},[n,a]),g("span",{style:vb},[o])])}});u.mount(_o);function c(){return Math.round(_o.getBoundingClientRect().height*100)/100-.1<=s}if(c())return u.unmount(),{content:n,text:_o.innerHTML,ellipsis:!1};const d=Array.prototype.slice.apply(_o.childNodes[0].childNodes[0].cloneNode(!0).childNodes).filter(C=>{let{nodeType:$,data:x}=C;return $!==Ave&&x!==""}),f=Array.prototype.slice.apply(_o.childNodes[0].childNodes[1].cloneNode(!0).childNodes);u.unmount();const p=[];_o.innerHTML="";const v=document.createElement("span");_o.appendChild(v);const h=document.createTextNode(r+a);v.appendChild(h),f.forEach(C=>{_o.appendChild(C)});function m(C){v.insertBefore(C,h)}function b(C,$){let x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,P=arguments.length>3&&arguments[3]!==void 0?arguments[3]:$.length,w=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;const O=Math.floor((x+P)/2),I=$.slice(0,O);if(C.textContent=I,x>=P-1)for(let _=P;_>=x;_-=1){const T=$.slice(0,_);if(C.textContent=T,c()||!T)return _===$.length?{finished:!1,vNode:$}:{finished:!0,vNode:T}}return c()?b(C,$,O,P,O):b(C,$,x,O,w)}function S(C){if(C.nodeType===Mve){const x=C.textContent||"",P=document.createTextNode(x);return m(P),b(P,x)}return{finished:!1,vNode:null}}return d.some(C=>{const{finished:$,vNode:x}=S(C);return x&&p.push(x),$}),{content:p,text:_o.innerHTML,ellipsis:!0}};var Nve=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,direction:String,component:String}),Ao=le({name:"ATypography",inheritAttrs:!1,props:kve(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Te("typography",e),[a,l]=kN(r);return()=>{var s;const u=y(y({},e),o),{prefixCls:c,direction:d,component:f="article"}=u,p=Nve(u,["prefixCls","direction","component"]);return a(g(f,k(k({},p),{},{class:ge(r.value,{[`${r.value}-rtl`]:i.value==="rtl"},o.class,l.value)}),{default:()=>[(s=n.default)===null||s===void 0?void 0:s.call(n)]}))}}}),Lve=()=>{const e=document.getSelection();if(!e.rangeCount)return function(){};let t=document.activeElement;const n=[];for(let o=0;o"u"){s&&console.warn("unable to use e.clipboardData"),s&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();const d=R4[t.format]||R4.default;window.clipboardData.setData(d,e)}else c.clipboardData.clearData(),c.clipboardData.setData(t.format,e);t.onCopy&&(c.preventDefault(),t.onCopy(c.clipboardData))}),document.body.appendChild(a),r.selectNodeContents(a),i.addRange(r),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(u){s&&console.error("unable to copy using execCommand: ",u),s&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(c){s&&console.error("unable to copy using clipboardData: ",c),s&&console.error("falling back to prompt"),n=Bve("message"in t?t.message:Fve),window.prompt(n,e)}}finally{i&&(typeof i.removeRange=="function"?i.removeRange(r):i.removeAllRanges()),a&&document.body.removeChild(a),o()}return l}var zve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};function D4(e){for(var t=1;t({editable:{type:[Boolean,Object],default:void 0},copyable:{type:[Boolean,Object],default:void 0},prefixCls:String,component:String,type:String,disabled:{type:Boolean,default:void 0},ellipsis:{type:[Boolean,Object],default:void 0},code:{type:Boolean,default:void 0},mark:{type:Boolean,default:void 0},underline:{type:Boolean,default:void 0},delete:{type:Boolean,default:void 0},strong:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},content:String,"onUpdate:content":Function}),Df=le({compatConfig:{MODE:3},name:"TypographyBase",inheritAttrs:!1,props:Rf(),setup(e,t){let{slots:n,attrs:o,emit:r}=t;const{prefixCls:i,direction:a}=Te("typography",e),l=rt({copied:!1,ellipsisText:"",ellipsisContent:null,isEllipsis:!1,expanded:!1,clientRendered:!1,expandStr:"",copyStr:"",copiedStr:"",editStr:"",copyId:void 0,rafId:void 0,prevProps:void 0,originContent:""}),s=ae(),u=ae(),c=E(()=>{const M=e.ellipsis;return M?y({rows:1,expandable:!1},typeof M=="object"?M:null):{}});Ke(()=>{l.clientRendered=!0,O()}),tt(()=>{clearTimeout(l.copyId),Ze.cancel(l.rafId)}),be([()=>c.value.rows,()=>e.content],()=>{ot(()=>{P()})},{flush:"post",deep:!0}),Ve(()=>{e.content===void 0&&(Yo(!e.editable),Yo(!e.ellipsis))});function d(){var M;return e.ellipsis||e.editable?e.content:(M=Co(s.value))===null||M===void 0?void 0:M.innerText}function f(M){const{onExpand:D}=c.value;l.expanded=!0,D==null||D(M)}function p(M){M.preventDefault(),l.originContent=e.content,x(!0)}function v(M){h(M),x(!1)}function h(M){const{onChange:D}=S.value;M!==e.content&&(r("update:content",M),D==null||D(M))}function m(){var M,D;(D=(M=S.value).onCancel)===null||D===void 0||D.call(M),x(!1)}function b(M){M.preventDefault(),M.stopPropagation();const{copyable:D}=e,N=y({},typeof D=="object"?D:null);N.text===void 0&&(N.text=d()),Hve(N.text||""),l.copied=!0,ot(()=>{N.onCopy&&N.onCopy(M),l.copyId=setTimeout(()=>{l.copied=!1},3e3)})}const S=E(()=>{const M=e.editable;return M?y({},typeof M=="object"?M:null):{editing:!1}}),[C,$]=Dt(!1,{value:E(()=>S.value.editing)});function x(M){const{onStart:D}=S.value;M&&D&&D(),$(M)}be(C,M=>{var D;M||(D=u.value)===null||D===void 0||D.focus()},{flush:"post"});function P(M){if(M){const{width:D,height:N}=M;if(!D||!N)return}Ze.cancel(l.rafId),l.rafId=Ze(()=>{O()})}const w=E(()=>{const{rows:M,expandable:D,suffix:N,onEllipsis:L,tooltip:F}=c.value;return N||F||e.editable||e.copyable||D||L?!1:M===1?Gve:Uve}),O=()=>{const{ellipsisText:M,isEllipsis:D}=l,{rows:N,suffix:L,onEllipsis:F}=c.value;if(!N||N<0||!Co(s.value)||l.expanded||e.content===void 0||w.value)return;const{content:B,text:j,ellipsis:z}=Dve(Co(s.value),{rows:N,suffix:L},e.content,H(!0),k4);(M!==j||l.isEllipsis!==z)&&(l.ellipsisText=j,l.ellipsisContent=B,l.isEllipsis=z,D!==z&&F&&F(z))};function I(M,D){let{mark:N,code:L,underline:F,delete:B,strong:j,keyboard:z}=M,G=D;function Q(Y,oe){if(!Y)return;const Z=function(){return G}();G=g(oe,null,{default:()=>[Z]})}return Q(j,"strong"),Q(F,"u"),Q(B,"del"),Q(L,"code"),Q(N,"mark"),Q(z,"kbd"),G}function _(M){const{expandable:D,symbol:N}=c.value;if(!D||!M&&(l.expanded||!l.isEllipsis))return null;const L=(n.ellipsisSymbol?n.ellipsisSymbol():N)||l.expandStr;return g("a",{key:"expand",class:`${i.value}-expand`,onClick:f,"aria-label":l.expandStr},[L])}function T(){if(!e.editable)return;const{tooltip:M,triggerType:D=["icon"]}=e.editable,N=n.editableIcon?n.editableIcon():g(I$,{role:"button"},null),L=n.editableTooltip?n.editableTooltip():l.editStr,F=typeof L=="string"?L:"";return D.indexOf("icon")!==-1?g(Ro,{key:"edit",title:M===!1?"":L},{default:()=>[g(Th,{ref:u,class:`${i.value}-edit`,onClick:p,"aria-label":F},{default:()=>[N]})]}):null}function A(){if(!e.copyable)return;const{tooltip:M}=e.copyable,D=l.copied?l.copiedStr:l.copyStr,N=n.copyableTooltip?n.copyableTooltip({copied:l.copied}):D,L=typeof N=="string"?N:"",F=l.copied?g(Yc,null,null):g(O$,null,null),B=n.copyableIcon?n.copyableIcon({copied:!!l.copied}):F;return g(Ro,{key:"copy",title:M===!1?"":N},{default:()=>[g(Th,{class:[`${i.value}-copy`,{[`${i.value}-copy-success`]:l.copied}],onClick:b,"aria-label":L},{default:()=>[B]})]})}function R(){const{class:M,style:D}=o,{maxlength:N,autoSize:L,onEnd:F}=S.value;return g(_ve,{class:M,style:D,prefixCls:i.value,value:e.content,originContent:l.originContent,maxlength:N,autoSize:L,onSave:v,onChange:h,onCancel:m,onEnd:F,direction:a.value,component:e.component},{enterIcon:n.editableEnterIcon})}function H(M){return[_(M),T(),A()].filter(D=>D)}return()=>{var M;const{triggerType:D=["icon"]}=S.value,N=e.ellipsis||e.editable?e.content!==void 0?e.content:(M=n.default)===null||M===void 0?void 0:M.call(n):n.default?n.default():e.content;return C.value?R():g(ts,{componentName:"Text",children:L=>{const F=y(y({},e),o),{type:B,disabled:j,content:z,class:G,style:Q}=F,Y=Kve(F,["type","disabled","content","class","style"]),{rows:oe,suffix:Z,tooltip:re}=c.value,{edit:ne,copy:X,copied:te,expand:W}=L;l.editStr=ne,l.copyStr=X,l.copiedStr=te,l.expandStr=W;const U=it(Y,["prefixCls","editable","copyable","ellipsis","mark","code","delete","underline","strong","keyboard","onUpdate:content"]),J=w.value,de=oe===1&&J,fe=oe&&oe>1&&J;let pe=N,ve;if(oe&&l.isEllipsis&&!l.expanded&&!J){const{title:q}=Y;let ie=q||"";!q&&(typeof N=="string"||typeof N=="number")&&(ie=String(N)),ie=ie==null?void 0:ie.slice(String(l.ellipsisContent||"").length),pe=g(Le,null,[nt(l.ellipsisContent),g("span",{title:ie,"aria-hidden":"true"},[k4]),Z])}else pe=g(Le,null,[N,Z]);pe=I(e,pe);const he=re&&oe&&l.isEllipsis&&!l.expanded&&!J,V=n.ellipsisTooltip?n.ellipsisTooltip():re;return g(br,{onResize:P,disabled:!oe},{default:()=>[g(Ao,k({ref:s,class:[{[`${i.value}-${B}`]:B,[`${i.value}-disabled`]:j,[`${i.value}-ellipsis`]:oe,[`${i.value}-single-line`]:oe===1&&!l.isEllipsis,[`${i.value}-ellipsis-single-line`]:de,[`${i.value}-ellipsis-multiple-line`]:fe},G],style:y(y({},Q),{WebkitLineClamp:fe?oe:void 0}),"aria-label":ve,direction:a.value,onClick:D.indexOf("text")!==-1?p:()=>{}},U),{default:()=>[he?g(Ro,{title:re===!0?N:V},{default:()=>[g("span",null,[pe])]}):pe,H()]})]})}},null)}}});var Xve=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rit(y(y({},Rf()),{ellipsis:{type:Boolean,default:void 0}}),["component"]),au=(e,t)=>{let{slots:n,attrs:o}=t;const r=y(y({},e),o),{ellipsis:i,rel:a}=r,l=Xve(r,["ellipsis","rel"]),s=y(y({},l),{rel:a===void 0&&l.target==="_blank"?"noopener noreferrer":a,ellipsis:!!i,component:"a"});return delete s.navigate,g(Df,s,n)};au.displayName="ATypographyLink";au.inheritAttrs=!1;au.props=Yve();const qve=()=>it(Rf(),["component"]),lu=(e,t)=>{let{slots:n,attrs:o}=t;const r=y(y(y({},e),{component:"div"}),o);return g(Df,r,n)};lu.displayName="ATypographyParagraph";lu.inheritAttrs=!1;lu.props=qve();const Jve=()=>y(y({},it(Rf(),["component"])),{ellipsis:{type:[Boolean,Object],default:void 0}}),su=(e,t)=>{let{slots:n,attrs:o}=t;const{ellipsis:r}=e,i=y(y(y({},e),{ellipsis:r&&typeof r=="object"?it(r,["expandable","rows"]):r,component:"span"}),o);return g(Df,i,n)};su.displayName="ATypographyText";su.inheritAttrs=!1;su.props=Jve();var Zve=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);ry(y({},it(Rf(),["component","strong"])),{level:Number}),cu=(e,t)=>{let{slots:n,attrs:o}=t;const{level:r=1}=e,i=Zve(e,["level"]);let a;Qve.includes(r)?a=`h${r}`:a="h1";const l=y(y(y({},i),{component:a}),o);return g(Df,l,n)};cu.displayName="ATypographyTitle";cu.inheritAttrs=!1;cu.props=eme();Ao.Text=su;Ao.Title=cu;Ao.Paragraph=lu;Ao.Link=au;Ao.Base=Df;Ao.install=function(e){return e.component(Ao.name,Ao),e.component(Ao.Text.displayName,su),e.component(Ao.Title.displayName,cu),e.component(Ao.Paragraph.displayName,lu),e.component(Ao.Link.displayName,au),e};function tme(e,t){const n=`cannot ${e.method} ${e.action} ${t.status}'`,o=new Error(n);return o.status=t.status,o.method=e.method,o.url=e.action,o}function L4(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function nme(e){const t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(i){i.total>0&&(i.percent=i.loaded/i.total*100),e.onProgress(i)});const n=new FormData;e.data&&Object.keys(e.data).forEach(r=>{const i=e.data[r];if(Array.isArray(i)){i.forEach(a=>{n.append(`${r}[]`,a)});return}n.append(r,i)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(i){e.onError(i)},t.onload=function(){return t.status<200||t.status>=300?e.onError(tme(e,t),L4(t)):e.onSuccess(L4(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const o=e.headers||{};return o["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(o).forEach(r=>{o[r]!==null&&t.setRequestHeader(r,o[r])}),t.send(n),{abort(){t.abort()}}}const ome=+new Date;let rme=0;function mb(){return`vc-upload-${ome}-${++rme}`}const bb=(e,t)=>{if(e&&t){const n=Array.isArray(t)?t:t.split(","),o=e.name||"",r=e.type||"",i=r.replace(/\/.*$/,"");return n.some(a=>{const l=a.trim();if(/^\*(\/\*)?$/.test(a))return!0;if(l.charAt(0)==="."){const s=o.toLowerCase(),u=l.toLowerCase();let c=[u];return(u===".jpg"||u===".jpeg")&&(c=[".jpg",".jpeg"]),c.some(d=>s.endsWith(d))}return/\/\*$/.test(l)?i===l.replace(/\/.*$/,""):!!(r===l||/^\w+$/.test(l))})}return!0};function ime(e,t){const n=e.createReader();let o=[];function r(){n.readEntries(i=>{const a=Array.prototype.slice.apply(i);o=o.concat(a),!a.length?t(o):r()})}r()}const ame=(e,t,n)=>{const o=(r,i)=>{r.path=i||"",r.isFile?r.file(a=>{n(a)&&(r.fullPath&&!a.webkitRelativePath&&(Object.defineProperties(a,{webkitRelativePath:{writable:!0}}),a.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(a,{webkitRelativePath:{writable:!1}})),t([a]))}):r.isDirectory&&ime(r,a=>{a.forEach(l=>{o(l,`${i}${r.name}/`)})})};e.forEach(r=>{o(r.webkitGetAsEntry())})},FN=()=>({capture:[Boolean,String],multipart:{type:Boolean,default:void 0},name:String,disabled:{type:Boolean,default:void 0},componentTag:String,action:[String,Function],method:String,directory:{type:Boolean,default:void 0},data:[Object,Function],headers:Object,accept:String,multiple:{type:Boolean,default:void 0},onBatchStart:Function,onReject:Function,onStart:Function,onError:Function,onSuccess:Function,onProgress:Function,beforeUpload:Function,customRequest:Function,withCredentials:{type:Boolean,default:void 0},openFileDialogOnClick:{type:Boolean,default:void 0},prefixCls:String,id:String,onMouseenter:Function,onMouseleave:Function,onClick:Function});var lme=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function l(c){try{u(o.next(c))}catch(d){a(d)}}function s(c){try{u(o.throw(c))}catch(d){a(d)}}function u(c){c.done?i(c.value):r(c.value).then(l,s)}u((o=o.apply(e,t||[])).next())})},sme=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rlme(this,void 0,void 0,function*(){const{beforeUpload:$}=e;let x=S;if($){try{x=yield $(S,C)}catch{x=!1}if(x===!1)return{origin:S,parsedFile:null,action:null,data:null}}const{action:P}=e;let w;typeof P=="function"?w=yield P(S):w=P;const{data:O}=e;let I;typeof O=="function"?I=yield O(S):I=O;const _=(typeof x=="object"||typeof x=="string")&&x?x:S;let T;_ instanceof File?T=_:T=new File([_],S.name,{type:S.type});const A=T;return A.uid=S.uid,{origin:S,data:I,parsedFile:A,action:w}}),c=S=>{let{data:C,origin:$,action:x,parsedFile:P}=S;if(!s)return;const{onStart:w,customRequest:O,name:I,headers:_,withCredentials:T,method:A}=e,{uid:R}=$,H=O||nme,M={action:x,filename:I,data:C,file:P,headers:_,withCredentials:T,method:A||"post",onProgress:D=>{const{onProgress:N}=e;N==null||N(D,P)},onSuccess:(D,N)=>{const{onSuccess:L}=e;L==null||L(D,P,N),delete a[R]},onError:(D,N)=>{const{onError:L}=e;L==null||L(D,N,P),delete a[R]}};w($),a[R]=H(M)},d=()=>{i.value=mb()},f=S=>{if(S){const C=S.uid?S.uid:S;a[C]&&a[C].abort&&a[C].abort(),delete a[C]}else Object.keys(a).forEach(C=>{a[C]&&a[C].abort&&a[C].abort(),delete a[C]})};Ke(()=>{s=!0}),tt(()=>{s=!1,f()});const p=S=>{const C=[...S],$=C.map(x=>(x.uid=mb(),u(x,C)));Promise.all($).then(x=>{const{onBatchStart:P}=e;P==null||P(x.map(w=>{let{origin:O,parsedFile:I}=w;return{file:O,parsedFile:I}})),x.filter(w=>w.parsedFile!==null).forEach(w=>{c(w)})})},v=S=>{const{accept:C,directory:$}=e,{files:x}=S.target,P=[...x].filter(w=>!$||bb(w,C));p(P),d()},h=S=>{const C=l.value;if(!C)return;const{onClick:$}=e;C.click(),$&&$(S)},m=S=>{S.key==="Enter"&&h(S)},b=S=>{const{multiple:C}=e;if(S.preventDefault(),S.type!=="dragover")if(e.directory)ame(Array.prototype.slice.call(S.dataTransfer.items),p,$=>bb($,e.accept));else{const $=Mq(Array.prototype.slice.call(S.dataTransfer.files),w=>bb(w,e.accept));let x=$[0];const P=$[1];C===!1&&(x=x.slice(0,1)),p(x),P.length&&e.onReject&&e.onReject(P)}};return r({abort:f}),()=>{var S;const{componentTag:C,prefixCls:$,disabled:x,id:P,multiple:w,accept:O,capture:I,directory:_,openFileDialogOnClick:T,onMouseenter:A,onMouseleave:R}=e,H=sme(e,["componentTag","prefixCls","disabled","id","multiple","accept","capture","directory","openFileDialogOnClick","onMouseenter","onMouseleave"]),M={[$]:!0,[`${$}-disabled`]:x,[o.class]:!!o.class},D=_?{directory:"directory",webkitdirectory:"webkitdirectory"}:{};return g(C,k(k({},x?{}:{onClick:T?h:()=>{},onKeydown:T?m:()=>{},onMouseenter:A,onMouseleave:R,onDrop:b,onDragover:b,tabindex:"0"}),{},{class:M,role:"button",style:o.style}),{default:()=>[g("input",k(k(k({},Ua(H,{aria:!0,data:!0})),{},{id:P,type:"file",ref:l,onClick:L=>L.stopPropagation(),onCancel:L=>L.stopPropagation(),key:i.value,style:{display:"none"},accept:O},D),{},{multiple:w,onChange:v},I!=null?{capture:I}:{}),null),(S=n.default)===null||S===void 0?void 0:S.call(n)]})}}});function yb(){}const F4=le({compatConfig:{MODE:3},name:"Upload",inheritAttrs:!1,props:Qe(FN(),{componentTag:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:yb,onError:yb,onSuccess:yb,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0}),setup(e,t){let{slots:n,attrs:o,expose:r}=t;const i=ae();return r({abort:l=>{var s;(s=i.value)===null||s===void 0||s.abort(l)}}),()=>g(cme,k(k(k({},e),o),{},{ref:i}),n)}});var ume={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};function B4(e){for(var t=1;t{let{uid:i}=r;return i===e.uid});return o===-1?n.push(e):n[o]=e,n}function Sb(e,t){const n=e.uid!==void 0?"uid":"name";return t.filter(o=>o[n]===e[n])[0]}function mme(e,t){const n=e.uid!==void 0?"uid":"name",o=t.filter(r=>r[n]!==e[n]);return o.length===t.length?null:o}const bme=function(){const t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),o=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(o)||[""])[0]},HN=e=>e.indexOf("image/")===0,yme=e=>{if(e.type&&!e.thumbUrl)return HN(e.type);const t=e.thumbUrl||e.url||"",n=bme(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(n)?!0:!(/^data:/.test(t)||n)},pa=200;function Sme(e){return new Promise(t=>{if(!e.type||!HN(e.type)){t("");return}const n=document.createElement("canvas");n.width=pa,n.height=pa,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${pa}px; height: ${pa}px; z-index: 9999; display: none;`,document.body.appendChild(n);const o=n.getContext("2d"),r=new Image;if(r.onload=()=>{const{width:i,height:a}=r;let l=pa,s=pa,u=0,c=0;i>a?(s=a*(pa/i),c=-(s-l)/2):(l=i*(pa/a),u=-(l-s)/2),o.drawImage(r,u,c,l,s);const d=n.toDataURL();document.body.removeChild(n),t(d)},r.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const i=new FileReader;i.addEventListener("load",()=>{i.result&&(r.src=i.result)}),i.readAsDataURL(e)}else r.src=window.URL.createObjectURL(e)})}var Cme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};function j4(e){for(var t=1;t({prefixCls:String,locale:De(void 0),file:De(),items:pt(),listType:Ne(),isImgUrl:ye(),showRemoveIcon:$e(),showDownloadIcon:$e(),showPreviewIcon:$e(),removeIcon:ye(),downloadIcon:ye(),previewIcon:ye(),iconRender:ye(),actionIconRender:ye(),itemRender:ye(),onPreview:ye(),onClose:ye(),onDownload:ye(),progress:De()}),wme=le({compatConfig:{MODE:3},name:"ListItem",inheritAttrs:!1,props:$me(),setup(e,t){let{slots:n,attrs:o}=t;var r;const i=se(!1),a=se();Ke(()=>{a.value=setTimeout(()=>{i.value=!0},300)}),tt(()=>{clearTimeout(a.value)});const l=se((r=e.file)===null||r===void 0?void 0:r.status);be(()=>{var c;return(c=e.file)===null||c===void 0?void 0:c.status},c=>{c!=="removed"&&(l.value=c)});const{rootPrefixCls:s}=Te("upload",e),u=E(()=>Cr(`${s.value}-fade`));return()=>{var c,d;const{prefixCls:f,locale:p,listType:v,file:h,items:m,progress:b,iconRender:S=n.iconRender,actionIconRender:C=n.actionIconRender,itemRender:$=n.itemRender,isImgUrl:x,showPreviewIcon:P,showRemoveIcon:w,showDownloadIcon:O,previewIcon:I=n.previewIcon,removeIcon:_=n.removeIcon,downloadIcon:T=n.downloadIcon,onPreview:A,onDownload:R,onClose:H}=e,{class:M,style:D}=o,N=S({file:h});let L=g("div",{class:`${f}-text-icon`},[N]);if(v==="picture"||v==="picture-card")if(l.value==="uploading"||!h.thumbUrl&&!h.url){const U={[`${f}-list-item-thumbnail`]:!0,[`${f}-list-item-file`]:l.value!=="uploading"};L=g("div",{class:U},[N])}else{const U=x!=null&&x(h)?g("img",{src:h.thumbUrl||h.url,alt:h.name,class:`${f}-list-item-image`,crossorigin:h.crossOrigin},null):N,J={[`${f}-list-item-thumbnail`]:!0,[`${f}-list-item-file`]:x&&!x(h)};L=g("a",{class:J,onClick:de=>A(h,de),href:h.url||h.thumbUrl,target:"_blank",rel:"noopener noreferrer"},[U])}const F={[`${f}-list-item`]:!0,[`${f}-list-item-${l.value}`]:!0},B=typeof h.linkProps=="string"?JSON.parse(h.linkProps):h.linkProps,j=w?C({customIcon:_?_({file:h}):g(Im,null,null),callback:()=>H(h),prefixCls:f,title:p.removeFile}):null,z=O&&l.value==="done"?C({customIcon:T?T({file:h}):g(M$,null,null),callback:()=>R(h),prefixCls:f,title:p.downloadFile}):null,G=v!=="picture-card"&&g("span",{key:"download-delete",class:[`${f}-list-item-actions`,{picture:v==="picture"}]},[z,j]),Q=`${f}-list-item-name`,Y=h.url?[g("a",k(k({key:"view",target:"_blank",rel:"noopener noreferrer",class:Q,title:h.name},B),{},{href:h.url,onClick:U=>A(h,U)}),[h.name]),G]:[g("span",{key:"view",class:Q,onClick:U=>A(h,U),title:h.name},[h.name]),G],oe={pointerEvents:"none",opacity:.5},Z=P?g("a",{href:h.url||h.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:h.url||h.thumbUrl?void 0:oe,onClick:U=>A(h,U),title:p.previewFile},[I?I({file:h}):g(Ef,null,null)]):null,re=v==="picture-card"&&l.value!=="uploading"&&g("span",{class:`${f}-list-item-actions`},[Z,l.value==="done"&&z,j]),ne=g("div",{class:F},[L,Y,re,i.value&&g(Nn,u.value,{default:()=>[Pn(g("div",{class:`${f}-list-item-progress`},["percent"in h?g(a$,k(k({},b),{},{type:"line",percent:h.percent}),null):null]),[[Vn,l.value==="uploading"]])]})]),X={[`${f}-list-item-container`]:!0,[`${M}`]:!!M},te=h.response&&typeof h.response=="string"?h.response:((c=h.error)===null||c===void 0?void 0:c.statusText)||((d=h.error)===null||d===void 0?void 0:d.message)||p.uploadError,W=l.value==="error"?g(Ro,{title:te,getPopupContainer:U=>U.parentNode},{default:()=>[ne]}):ne;return g("div",{class:X,style:D},[$?$({originNode:W,file:h,fileList:m,actions:{download:R.bind(null,h),preview:A.bind(null,h),remove:H.bind(null,h)}}):W])}}}),Pme=(e,t)=>{let{slots:n}=t;var o;return zt((o=n.default)===null||o===void 0?void 0:o.call(n))[0]},Ome=le({compatConfig:{MODE:3},name:"AUploadList",props:Qe(vme(),{listType:"text",progress:{strokeWidth:2,showInfo:!1},showRemoveIcon:!0,showDownloadIcon:!1,showPreviewIcon:!0,previewFile:Sme,isImageUrl:yme,items:[],appendActionVisible:!0}),setup(e,t){let{slots:n,expose:o}=t;const r=se(!1);Ke(()=>{r.value==!0});const i=se([]);be(()=>e.items,function(){let h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];i.value=h.slice()},{immediate:!0,deep:!0}),Ve(()=>{if(e.listType!=="picture"&&e.listType!=="picture-card")return;let h=!1;(e.items||[]).forEach((m,b)=>{typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(m.originFileObj instanceof File||m.originFileObj instanceof Blob)||m.thumbUrl!==void 0||(m.thumbUrl="",e.previewFile&&e.previewFile(m.originFileObj).then(S=>{const C=S||"";C!==m.thumbUrl&&(i.value[b].thumbUrl=C,h=!0)}))}),h&&D_(i)});const a=(h,m)=>{if(e.onPreview)return m==null||m.preventDefault(),e.onPreview(h)},l=h=>{typeof e.onDownload=="function"?e.onDownload(h):h.url&&window.open(h.url)},s=h=>{var m;(m=e.onRemove)===null||m===void 0||m.call(e,h)},u=h=>{let{file:m}=h;const b=e.iconRender||n.iconRender;if(b)return b({file:m,listType:e.listType});const S=m.status==="uploading",C=e.isImageUrl&&e.isImageUrl(m)?g(E$,null,null):g(_$,null,null);let $=g(S?Po:T$,null,null);return e.listType==="picture"?$=S?g(Po,null,null):C:e.listType==="picture-card"&&($=S?e.locale.uploading:C),$},c=h=>{const{customIcon:m,callback:b,prefixCls:S,title:C}=h,$={type:"text",size:"small",title:C,onClick:()=>{b()},class:`${S}-list-item-action`};return sn(m)?g(Qt,$,{icon:()=>m}):g(Qt,$,{default:()=>[g("span",null,[m])]})};o({handlePreview:a,handleDownload:l});const{prefixCls:d,rootPrefixCls:f}=Te("upload",e),p=E(()=>({[`${d.value}-list`]:!0,[`${d.value}-list-${e.listType}`]:!0})),v=E(()=>{const h=y({},Sf(`${f.value}-motion-collapse`));delete h.onAfterAppear,delete h.onAfterEnter,delete h.onAfterLeave;const m=y(y({},Av(`${d.value}-${e.listType==="picture-card"?"animate-inline":"animate"}`)),{class:p.value,appear:r.value});return e.listType!=="picture-card"?y(y({},h),m):m});return()=>{const{listType:h,locale:m,isImageUrl:b,showPreviewIcon:S,showRemoveIcon:C,showDownloadIcon:$,removeIcon:x,previewIcon:P,downloadIcon:w,progress:O,appendAction:I,itemRender:_,appendActionVisible:T}=e,A=I==null?void 0:I(),R=i.value;return g(dv,k(k({},v.value),{},{tag:"div"}),{default:()=>[R.map(H=>{const{uid:M}=H;return g(wme,{key:M,locale:m,prefixCls:d.value,file:H,items:R,progress:O,listType:h,isImgUrl:b,showPreviewIcon:S,showRemoveIcon:C,showDownloadIcon:$,onPreview:a,onDownload:l,onClose:s,removeIcon:x,previewIcon:P,downloadIcon:w,itemRender:_},y(y({},n),{iconRender:u,actionIconRender:c}))}),I?Pn(g(Pme,{key:"__ant_upload_appendAction"},{default:()=>A}),[[Vn,!!T]]):null]})}}}),Ime=e=>{const{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:`${e.padding}px 0`},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${e.marginXXS}px`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{cursor:"not-allowed",[`p${t}-drag-icon ${n}, p${t}-text, p${t}-hint `]:{color:e.colorTextDisabled}}}}}},Tme=e=>{const{componentCls:t,antCls:n,iconCls:o,fontSize:r,lineHeight:i}=e,a=`${t}-list-item`,l=`${a}-actions`,s=`${a}-action`,u=Math.round(r*i);return{[`${t}-wrapper`]:{[`${t}-list`]:y(y({},Kr()),{lineHeight:e.lineHeight,[a]:{position:"relative",height:e.lineHeight*r,marginTop:e.marginXS,fontSize:r,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,"&:hover":{backgroundColor:e.controlItemBgHover},[`${a}-name`]:y(y({},cn),{padding:`0 ${e.paddingXS}px`,lineHeight:i,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[l]:{[s]:{opacity:0},[`${s}${n}-btn-sm`]:{height:u,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[` ${s}:focus, &.picture ${s} - `]:{opacity:1},[o]:{color:e.colorTextDescription,transition:`all ${e.motionDurationSlow}`},[`&:hover ${o}`]:{color:e.colorText}},[`${t}-icon ${o}`]:{color:e.colorTextDescription,fontSize:r},[`${a}-progress`]:{position:"absolute",bottom:-e.uploadProgressOffset,width:"100%",paddingInlineStart:r+e.paddingXS,fontSize:r,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${a}:hover ${s}`]:{opacity:1,color:e.colorText},[`${a}-error`]:{color:e.colorError,[`${a}-name, ${t}-icon ${o}`]:{color:e.colorError},[l]:{[`${o}, ${o}:hover`]:{color:e.colorError},[s]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},WT=new at("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),VT=new at("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),Eme=e=>{const{componentCls:t}=e,n=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${n}-appear, ${n}-enter, ${n}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${n}-appear, ${n}-enter`]:{animationName:WT},[`${n}-leave`]:{animationName:VT}}},WT,VT]},_me=e=>{const{componentCls:t,iconCls:n,uploadThumbnailSize:o,uploadProgressOffset:r}=e,i=`${t}-list`,a=`${i}-item`;return{[`${t}-wrapper`]:{[`${i}${i}-picture, ${i}${i}-picture-card`]:{[a]:{position:"relative",height:o+e.lineWidth*2+e.paddingXS*2,padding:e.paddingXS,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${a}-thumbnail`]:y(y({},cn),{width:o,height:o,lineHeight:`${o+e.paddingSM}px`,textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${a}-progress`]:{bottom:r,width:`calc(100% - ${e.paddingSM*2}px)`,marginTop:0,paddingInlineStart:o+e.paddingXS}},[`${a}-error`]:{borderColor:e.colorError,[`${a}-thumbnail ${n}`]:{"svg path[fill='#e6f7ff']":{fill:e.colorErrorBg},"svg path[fill='#1890ff']":{fill:e.colorError}}},[`${a}-uploading`]:{borderStyle:"dashed",[`${a}-name`]:{marginBottom:r}}}}}},Mme=e=>{const{componentCls:t,iconCls:n,fontSizeLG:o,colorTextLightSolid:r}=e,i=`${t}-list`,a=`${i}-item`,l=e.uploadPicCardSize;return{[`${t}-wrapper${t}-picture-card-wrapper`]:y(y({},Kr()),{display:"inline-block",width:"100%",[`${t}${t}-select`]:{width:l,height:l,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${i}${i}-picture-card`]:{[`${i}-item-container`]:{display:"inline-block",width:l,height:l,marginBlock:`0 ${e.marginXS}px`,marginInline:`0 ${e.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[a]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${e.paddingXS*2}px)`,height:`calc(100% - ${e.paddingXS*2}px)`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${a}:hover`]:{[`&::before, ${a}-actions`]:{opacity:1}},[`${a}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`${n}-eye, ${n}-download, ${n}-delete`]:{zIndex:10,width:o,margin:`0 ${e.marginXXS}px`,fontSize:o,cursor:"pointer",transition:`all ${e.motionDurationSlow}`}},[`${a}-actions, ${a}-actions:hover`]:{[`${n}-eye, ${n}-download, ${n}-delete`]:{color:new St(r).setAlpha(.65).toRgbString(),"&:hover":{color:r}}},[`${a}-thumbnail, ${a}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${a}-name`]:{display:"none",textAlign:"center"},[`${a}-file + ${a}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${e.paddingXS*2}px)`},[`${a}-uploading`]:{[`&${a}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${a}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${e.paddingXS*2}px)`,paddingInlineStart:0}}})}},Ame=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},Rme=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:y(y({},qe(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},Dme=Ue("Upload",e=>{const{fontSizeHeading3:t,fontSize:n,lineHeight:o,lineWidth:r,controlHeightLG:i}=e,a=Math.round(n*o),l=Be(e,{uploadThumbnailSize:t*2,uploadProgressOffset:a/2+r,uploadPicCardSize:i*2.55});return[Rme(l),Ime(l),_me(l),Mme(l),Tme(l),Eme(l),Ame(l),bf(l)]});var Nme=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function l(c){try{u(o.next(c))}catch(d){a(d)}}function s(c){try{u(o.throw(c))}catch(d){a(d)}}function u(c){c.done?i(c.value):r(c.value).then(l,s)}u((o=o.apply(e,t||[])).next())})},kme=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var T;return(T=s.value)!==null&&T!==void 0?T:d.value}),[p,v]=Dt(e.defaultFileList||[],{value:We(e,"fileList"),postState:T=>{const A=Date.now();return(T??[]).map((R,H)=>(!R.uid&&!Object.isFrozen(R)&&(R.uid=`__AUTO__${A}_${H}__`),R))}}),h=ae("drop"),m=ae(null);Ke(()=>{Mt(e.fileList!==void 0||o.value===void 0,"Upload","`value` is not a valid prop, do you mean `fileList`?"),Mt(e.transformFile===void 0,"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly."),Mt(e.remove===void 0,"Upload","`remove` props is deprecated. Please use `remove` event.")});const b=(T,A,R)=>{var H,M;let D=[...A];e.maxCount===1?D=D.slice(-1):e.maxCount&&(D=D.slice(0,e.maxCount)),v(D);const N={file:T,fileList:D};R&&(N.event=R),(H=e["onUpdate:fileList"])===null||H===void 0||H.call(e,N.fileList),(M=e.onChange)===null||M===void 0||M.call(e,N),i.onFieldChange()},S=(T,A)=>Nme(this,void 0,void 0,function*(){const{beforeUpload:R,transformFile:H}=e;let M=T;if(R){const D=yield R(T,A);if(D===!1)return!1;if(delete T[Lu],D===Lu)return Object.defineProperty(T,Lu,{value:!0,configurable:!0}),!1;typeof D=="object"&&D&&(M=D)}return H&&(M=yield H(M)),M}),C=T=>{const A=T.filter(M=>!M.file[Lu]);if(!A.length)return;const R=A.map(M=>Cp(M.file));let H=[...p.value];R.forEach(M=>{H=xp(M,H)}),R.forEach((M,D)=>{let N=M;if(A[D].parsedFile)M.status="uploading";else{const{originFileObj:L}=M;let F;try{F=new File([L],L.name,{type:L.type})}catch{F=new Blob([L],{type:L.type}),F.name=L.name,F.lastModifiedDate=new Date,F.lastModified=new Date().getTime()}F.uid=M.uid,N=F}b(N,H)})},$=(T,A,R)=>{try{typeof T=="string"&&(T=JSON.parse(T))}catch{}if(!Sb(A,p.value))return;const H=Cp(A);H.status="done",H.percent=100,H.response=T,H.xhr=R;const M=xp(H,p.value);b(H,M)},x=(T,A)=>{if(!Sb(A,p.value))return;const R=Cp(A);R.status="uploading",R.percent=T.percent;const H=xp(R,p.value);b(R,H,T)},P=(T,A,R)=>{if(!Sb(R,p.value))return;const H=Cp(R);H.error=T,H.response=A,H.status="error";const M=xp(H,p.value);b(H,M)},w=T=>{let A;const R=e.onRemove||e.remove;Promise.resolve(typeof R=="function"?R(T):R).then(H=>{var M,D;if(H===!1)return;const N=mme(T,p.value);N&&(A=y(y({},T),{status:"removed"}),(M=p.value)===null||M===void 0||M.forEach(L=>{const F=A.uid!==void 0?"uid":"name";L[F]===A[F]&&!Object.isFrozen(L)&&(L.status="removed")}),(D=m.value)===null||D===void 0||D.abort(A),b(A,N))})},O=T=>{var A;h.value=T.type,T.type==="drop"&&((A=e.onDrop)===null||A===void 0||A.call(e,T))};r({onBatchStart:C,onSuccess:$,onProgress:x,onError:P,fileList:p,upload:m});const[I]=wr("Upload",$o.Upload,E(()=>e.locale)),_=(T,A)=>{const{removeIcon:R,previewIcon:H,downloadIcon:M,previewFile:D,onPreview:N,onDownload:L,isImageUrl:F,progress:B,itemRender:j,iconRender:z,showUploadList:G}=e,{showDownloadIcon:Q,showPreviewIcon:Y,showRemoveIcon:oe}=typeof G=="boolean"?{}:G;return G?g(Ome,{prefixCls:a.value,listType:e.listType,items:p.value,previewFile:D,onPreview:N,onDownload:L,onRemove:w,showRemoveIcon:!f.value&&oe,showPreviewIcon:Y,showDownloadIcon:Q,removeIcon:R,previewIcon:H,downloadIcon:M,iconRender:z,locale:I.value,isImageUrl:F,progress:B,itemRender:j,appendActionVisible:A,appendAction:T},y({},n)):T==null?void 0:T()};return()=>{var T,A,R;const{listType:H,type:M}=e,{class:D,style:N}=o,L=kme(o,["class","style"]),F=y(y(y({onBatchStart:C,onError:P,onProgress:x,onSuccess:$},L),e),{id:(T=e.id)!==null&&T!==void 0?T:i.id.value,prefixCls:a.value,beforeUpload:S,onChange:void 0,disabled:f.value});delete F.remove,(!n.default||f.value)&&delete F.id;const B={[`${a.value}-rtl`]:l.value==="rtl"};if(M==="drag"){const Q=ge(a.value,{[`${a.value}-drag`]:!0,[`${a.value}-drag-uploading`]:p.value.some(Y=>Y.status==="uploading"),[`${a.value}-drag-hover`]:h.value==="dragover",[`${a.value}-disabled`]:f.value,[`${a.value}-rtl`]:l.value==="rtl"},o.class,c.value);return u(g("span",k(k({},o),{},{class:ge(`${a.value}-wrapper`,B,D,c.value)}),[g("div",{class:Q,onDrop:O,onDragover:O,onDragleave:O,style:o.style},[g(FT,k(k({},F),{},{ref:m,class:`${a.value}-btn`}),k({default:()=>[g("div",{class:`${a.value}-drag-container`},[(A=n.default)===null||A===void 0?void 0:A.call(n)])]},n))]),_()]))}const j=ge(a.value,{[`${a.value}-select`]:!0,[`${a.value}-select-${H}`]:!0,[`${a.value}-disabled`]:f.value,[`${a.value}-rtl`]:l.value==="rtl"}),z=Ot((R=n.default)===null||R===void 0?void 0:R.call(n)),G=Q=>g("div",{class:j,style:Q},[g(FT,k(k({},F),{},{ref:m}),n)]);return u(H==="picture-card"?g("span",k(k({},o),{},{class:ge(`${a.value}-wrapper`,`${a.value}-picture-card-wrapper`,B,o.class,c.value)}),[_(G,!!(z&&z.length))]):g("span",k(k({},o),{},{class:ge(`${a.value}-wrapper`,B,o.class,c.value)}),[G(z&&z.length?void 0:{display:"none"}),_()]))}}});var KT=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{height:r}=e,i=KT(e,["height"]),{style:a}=o,l=KT(o,["style"]),s=y(y(y({},i),l),{type:"drag",style:y(y({},a),{height:typeof r=="number"?`${r}px`:r})});return g(Cg,s,n)}}}),Lme=xg,Fme=y(Cg,{Dragger:xg,LIST_IGNORE:Lu,install(e){return e.component(Cg.name,Cg),e.component(xg.name,xg),e}});function Bme(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function Hme(e){return Object.keys(e).map(t=>`${Bme(t)}: ${e[t]};`).join(" ")}function UT(){return window.devicePixelRatio||1}function Cb(e,t,n,o){e.translate(t,n),e.rotate(Math.PI/180*Number(o)),e.translate(-t,-n)}const zme=(e,t)=>{let n=!1;return e.removedNodes.length&&(n=Array.from(e.removedNodes).some(o=>o===t)),e.type==="attributes"&&e.target===t&&(n=!0),n};var jme=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r2&&arguments[2]!==void 0?arguments[2]:{};const{window:o=b5}=n,r=jme(n,["window"]);let i;const a=v5(()=>o&&"MutationObserver"in o),l=()=>{i&&(i.disconnect(),i=void 0)},s=be(()=>gx(e),c=>{l(),a.value&&o&&c&&(i=new MutationObserver(t),i.observe(c,r))},{immediate:!0}),u=()=>{l(),s()};return h5(u),{isSupported:a,stop:u}}const xb=2,GT=3,Vme=()=>({zIndex:Number,rotate:Number,width:Number,height:Number,image:String,content:He([String,Array]),font:De(),rootClassName:String,gap:pt(),offset:pt()}),Kme=le({name:"AWatermark",inheritAttrs:!1,props:Qe(Vme(),{zIndex:9,rotate:-22,font:{},gap:[100,100]}),setup(e,t){let{slots:n,attrs:o}=t;const[,r]=na(),i=se(),a=se(),l=se(!1),s=E(()=>{var _,T;return(T=(_=e.gap)===null||_===void 0?void 0:_[0])!==null&&T!==void 0?T:100}),u=E(()=>{var _,T;return(T=(_=e.gap)===null||_===void 0?void 0:_[1])!==null&&T!==void 0?T:100}),c=E(()=>s.value/2),d=E(()=>u.value/2),f=E(()=>{var _,T;return(T=(_=e.offset)===null||_===void 0?void 0:_[0])!==null&&T!==void 0?T:c.value}),p=E(()=>{var _,T;return(T=(_=e.offset)===null||_===void 0?void 0:_[1])!==null&&T!==void 0?T:d.value}),v=E(()=>{var _,T;return(T=(_=e.font)===null||_===void 0?void 0:_.fontSize)!==null&&T!==void 0?T:r.value.fontSizeLG}),h=E(()=>{var _,T;return(T=(_=e.font)===null||_===void 0?void 0:_.fontWeight)!==null&&T!==void 0?T:"normal"}),m=E(()=>{var _,T;return(T=(_=e.font)===null||_===void 0?void 0:_.fontStyle)!==null&&T!==void 0?T:"normal"}),b=E(()=>{var _,T;return(T=(_=e.font)===null||_===void 0?void 0:_.fontFamily)!==null&&T!==void 0?T:"sans-serif"}),S=E(()=>{var _,T;return(T=(_=e.font)===null||_===void 0?void 0:_.color)!==null&&T!==void 0?T:r.value.colorFill}),C=E(()=>{var _;const T={zIndex:(_=e.zIndex)!==null&&_!==void 0?_:9,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let A=f.value-c.value,R=p.value-d.value;return A>0&&(T.left=`${A}px`,T.width=`calc(100% - ${A}px)`,A=0),R>0&&(T.top=`${R}px`,T.height=`calc(100% - ${R}px)`,R=0),T.backgroundPosition=`${A}px ${R}px`,T}),$=()=>{a.value&&(a.value.remove(),a.value=void 0)},x=(_,T)=>{var A;i.value&&a.value&&(l.value=!0,a.value.setAttribute("style",Hme(y(y({},C.value),{backgroundImage:`url('${_}')`,backgroundSize:`${(s.value+T)*xb}px`}))),(A=i.value)===null||A===void 0||A.append(a.value),setTimeout(()=>{l.value=!1}))},P=_=>{let T=120,A=64;const R=e.content,H=e.image,M=e.width,D=e.height;if(!H&&_.measureText){_.font=`${Number(v.value)}px ${b.value}`;const N=Array.isArray(R)?R:[R],L=N.map(F=>_.measureText(F).width);T=Math.ceil(Math.max(...L)),A=Number(v.value)*N.length+(N.length-1)*GT}return[M??T,D??A]},w=(_,T,A,R,H)=>{const M=UT(),D=e.content,N=Number(v.value)*M;_.font=`${m.value} normal ${h.value} ${N}px/${H}px ${b.value}`,_.fillStyle=S.value,_.textAlign="center",_.textBaseline="top",_.translate(R/2,0);const L=Array.isArray(D)?D:[D];L==null||L.forEach((F,B)=>{_.fillText(F??"",T,A+B*(N+GT*M))})},O=()=>{var _;const T=document.createElement("canvas"),A=T.getContext("2d"),R=e.image,H=(_=e.rotate)!==null&&_!==void 0?_:-22;if(A){a.value||(a.value=document.createElement("div"));const M=UT(),[D,N]=P(A),L=(s.value+D)*M,F=(u.value+N)*M;T.setAttribute("width",`${L*xb}px`),T.setAttribute("height",`${F*xb}px`);const B=s.value*M/2,j=u.value*M/2,z=D*M,G=N*M,Q=(z+s.value*M)/2,Y=(G+u.value*M)/2,oe=B+L,Z=j+F,re=Q+L,ne=Y+F;if(A.save(),Cb(A,Q,Y,H),R){const X=new Image;X.onload=()=>{A.drawImage(X,B,j,z,G),A.restore(),Cb(A,re,ne,H),A.drawImage(X,oe,Z,z,G),x(T.toDataURL(),D)},X.crossOrigin="anonymous",X.referrerPolicy="no-referrer",X.src=R}else w(A,B,j,z,G),A.restore(),Cb(A,re,ne,H),w(A,oe,Z,z,G),x(T.toDataURL(),D)}};return Ke(()=>{O()}),be(()=>[e,r.value.colorFill,r.value.fontSizeLG],()=>{O()},{deep:!0,flush:"post"}),tt(()=>{$()}),Wme(i,_=>{l.value||_.forEach(T=>{zme(T,a.value)&&($(),O())})},{attributes:!0,subtree:!0,childList:!0,attributeFilter:["style","class"]}),()=>{var _;return g("div",k(k({},o),{},{ref:i,class:[o.class,e.rootClassName],style:[{position:"relative"},o.style]}),[(_=n.default)===null||_===void 0?void 0:_.call(n)])}}}),Ume=Lt(Kme);function XT(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function YT(e){return{backgroundColor:e.bgColorSelected,boxShadow:e.boxShadow}}const Gme=y({overflow:"hidden"},cn),Xme=e=>{const{componentCls:t}=e;return{[t]:y(y(y(y(y({},qe(e)),{display:"inline-block",padding:e.segmentedContainerPadding,color:e.labelColor,backgroundColor:e.bgColor,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${e.motionDurationMid} ${e.motionEaseInOut}`,borderRadius:e.borderRadiusSM,"&-selected":y(y({},YT(e)),{color:e.labelColorHover}),"&::after":{content:'""',position:"absolute",width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",transition:`background-color ${e.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.labelColorHover,"&::after":{backgroundColor:e.bgColorHover}},"&-label":y({minHeight:e.controlHeight-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeight-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`},Gme),"&-icon + *":{marginInlineStart:e.marginSM/2},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:y(y({},YT(e)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${e.paddingXXS}px 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:e.controlHeightLG-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightLG-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:e.controlHeightSM-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightSM-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontalSM}px`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),XT(`&-disabled ${t}-item`,e)),XT(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:"transform, width"}})}},Yme=Ue("Segmented",e=>{const{lineWidthBold:t,lineWidth:n,colorTextLabel:o,colorText:r,colorFillSecondary:i,colorBgLayout:a,colorBgElevated:l}=e,s=Be(e,{segmentedPaddingHorizontal:e.controlPaddingHorizontal-n,segmentedPaddingHorizontalSM:e.controlPaddingHorizontalSM-n,segmentedContainerPadding:t,labelColor:o,labelColorHover:r,bgColor:a,bgColorHover:i,bgColorSelected:l});return[Xme(s)]}),qT=e=>e?{left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth}:null,Ts=e=>e!==void 0?`${e}px`:void 0,qme=le({props:{value:It(),getValueIndex:It(),prefixCls:It(),motionName:It(),onMotionStart:It(),onMotionEnd:It(),direction:It(),containerRef:It()},emits:["motionStart","motionEnd"],setup(e,t){let{emit:n}=t;const o=ae(),r=v=>{var h;const m=e.getValueIndex(v),b=(h=e.containerRef.value)===null||h===void 0?void 0:h.querySelectorAll(`.${e.prefixCls}-item`)[m];return(b==null?void 0:b.offsetParent)&&b},i=ae(null),a=ae(null);be(()=>e.value,(v,h)=>{const m=r(h),b=r(v),S=qT(m),C=qT(b);i.value=S,a.value=C,n(m&&b?"motionStart":"motionEnd")},{flush:"post"});const l=E(()=>{var v,h;return e.direction==="rtl"?Ts(-((v=i.value)===null||v===void 0?void 0:v.right)):Ts((h=i.value)===null||h===void 0?void 0:h.left)}),s=E(()=>{var v,h;return e.direction==="rtl"?Ts(-((v=a.value)===null||v===void 0?void 0:v.right)):Ts((h=a.value)===null||h===void 0?void 0:h.left)});let u;const c=v=>{clearTimeout(u),ot(()=>{v&&(v.style.transform="translateX(var(--thumb-start-left))",v.style.width="var(--thumb-start-width)")})},d=v=>{u=setTimeout(()=>{v&&(ch(v,`${e.motionName}-appear-active`),v.style.transform="translateX(var(--thumb-active-left))",v.style.width="var(--thumb-active-width)")})},f=v=>{i.value=null,a.value=null,v&&(v.style.transform=null,v.style.width=null,uh(v,`${e.motionName}-appear-active`)),n("motionEnd")},p=E(()=>{var v,h;return{"--thumb-start-left":l.value,"--thumb-start-width":Ts((v=i.value)===null||v===void 0?void 0:v.width),"--thumb-active-left":s.value,"--thumb-active-width":Ts((h=a.value)===null||h===void 0?void 0:h.width)}});return tt(()=>{clearTimeout(u)}),()=>{const v={ref:o,style:p.value,class:[`${e.prefixCls}-thumb`]};return g(Nn,{appear:!0,onBeforeEnter:c,onEnter:d,onAfterEnter:f},{default:()=>[!i.value||!a.value?null:g("div",v,null)]})}}});function Jme(e){return e.map(t=>typeof t=="object"&&t!==null?t:{label:t==null?void 0:t.toString(),title:t==null?void 0:t.toString(),value:t})}const Zme=()=>({prefixCls:String,options:pt(),block:$e(),disabled:$e(),size:Ne(),value:y(y({},He([String,Number])),{required:!0}),motionName:String,onChange:ye(),"onUpdate:value":ye()}),zN=(e,t)=>{let{slots:n,emit:o}=t;const{value:r,disabled:i,payload:a,title:l,prefixCls:s,label:u=n.label,checked:c,className:d}=e,f=p=>{i||o("change",p,r)};return g("label",{class:ge({[`${s}-item-disabled`]:i},d)},[g("input",{class:`${s}-item-input`,type:"radio",disabled:i,checked:c,onChange:f},null),g("div",{class:`${s}-item-label`,title:typeof l=="string"?l:""},[typeof u=="function"?u({value:r,disabled:i,payload:a,title:l}):u??r])])};zN.inheritAttrs=!1;const Qme=le({name:"ASegmented",inheritAttrs:!1,props:Qe(Zme(),{options:[],motionName:"thumb-motion"}),slots:Object,setup(e,t){let{emit:n,slots:o,attrs:r}=t;const{prefixCls:i,direction:a,size:l}=Te("segmented",e),[s,u]=Yme(i),c=se(),d=se(!1),f=E(()=>Jme(e.options)),p=(v,h)=>{e.disabled||(n("update:value",h),n("change",h))};return()=>{const v=i.value;return s(g("div",k(k({},r),{},{class:ge(v,{[u.value]:!0,[`${v}-block`]:e.block,[`${v}-disabled`]:e.disabled,[`${v}-lg`]:l.value=="large",[`${v}-sm`]:l.value=="small",[`${v}-rtl`]:a.value==="rtl"},r.class),ref:c}),[g("div",{class:`${v}-group`},[g(qme,{containerRef:c,prefixCls:v,value:e.value,motionName:`${v}-${e.motionName}`,direction:a.value,getValueIndex:h=>f.value.findIndex(m=>m.value===h),onMotionStart:()=>{d.value=!0},onMotionEnd:()=>{d.value=!1}},null),f.value.map(h=>g(zN,k(k({key:h.value,prefixCls:v,checked:h.value===e.value,onChange:p},h),{},{className:ge(h.className,`${v}-item`,{[`${v}-item-selected`]:h.value===e.value&&!d.value}),disabled:!!e.disabled||!!h.disabled}),o))])]))}}}),e0e=Lt(Qme),t0e=e=>{const{componentCls:t}=e;return{[t]:y(y({},qe(e)),{display:"flex",justifyContent:"center",alignItems:"center",padding:e.paddingSM,backgroundColor:e.colorWhite,borderRadius:e.borderRadiusLG,border:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${t}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:e.colorText,lineHeight:e.lineHeight,background:e.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${t}-expired , & > ${t}-scanned`]:{color:e.QRCodeTextColor}},"&-icon":{marginBlockEnd:e.marginXS,fontSize:e.controlHeight}}),[`${t}-borderless`]:{borderColor:"transparent"}}},n0e=Ue("QRCode",e=>t0e(Be(e,{QRCodeTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"})));var o0e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};function JT(e){for(var t=1;t({size:{type:Number,default:160},value:{type:String,required:!0},type:Ne("canvas"),color:String,bgColor:String,includeMargin:Boolean,imageSettings:De()}),i0e=()=>y(y({},R$()),{errorLevel:Ne("M"),icon:String,iconSize:{type:Number,default:40},status:Ne("active"),bordered:{type:Boolean,default:!0}});/** + `]:{opacity:1},[o]:{color:e.colorTextDescription,transition:`all ${e.motionDurationSlow}`},[`&:hover ${o}`]:{color:e.colorText}},[`${t}-icon ${o}`]:{color:e.colorTextDescription,fontSize:r},[`${a}-progress`]:{position:"absolute",bottom:-e.uploadProgressOffset,width:"100%",paddingInlineStart:r+e.paddingXS,fontSize:r,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${a}:hover ${s}`]:{opacity:1,color:e.colorText},[`${a}-error`]:{color:e.colorError,[`${a}-name, ${t}-icon ${o}`]:{color:e.colorError},[l]:{[`${o}, ${o}:hover`]:{color:e.colorError},[s]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},W4=new at("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),V4=new at("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),Eme=e=>{const{componentCls:t}=e,n=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${n}-appear, ${n}-enter, ${n}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${n}-appear, ${n}-enter`]:{animationName:W4},[`${n}-leave`]:{animationName:V4}}},W4,V4]},_me=e=>{const{componentCls:t,iconCls:n,uploadThumbnailSize:o,uploadProgressOffset:r}=e,i=`${t}-list`,a=`${i}-item`;return{[`${t}-wrapper`]:{[`${i}${i}-picture, ${i}${i}-picture-card`]:{[a]:{position:"relative",height:o+e.lineWidth*2+e.paddingXS*2,padding:e.paddingXS,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${a}-thumbnail`]:y(y({},cn),{width:o,height:o,lineHeight:`${o+e.paddingSM}px`,textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${a}-progress`]:{bottom:r,width:`calc(100% - ${e.paddingSM*2}px)`,marginTop:0,paddingInlineStart:o+e.paddingXS}},[`${a}-error`]:{borderColor:e.colorError,[`${a}-thumbnail ${n}`]:{"svg path[fill='#e6f7ff']":{fill:e.colorErrorBg},"svg path[fill='#1890ff']":{fill:e.colorError}}},[`${a}-uploading`]:{borderStyle:"dashed",[`${a}-name`]:{marginBottom:r}}}}}},Mme=e=>{const{componentCls:t,iconCls:n,fontSizeLG:o,colorTextLightSolid:r}=e,i=`${t}-list`,a=`${i}-item`,l=e.uploadPicCardSize;return{[`${t}-wrapper${t}-picture-card-wrapper`]:y(y({},Kr()),{display:"inline-block",width:"100%",[`${t}${t}-select`]:{width:l,height:l,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${i}${i}-picture-card`]:{[`${i}-item-container`]:{display:"inline-block",width:l,height:l,marginBlock:`0 ${e.marginXS}px`,marginInline:`0 ${e.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[a]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${e.paddingXS*2}px)`,height:`calc(100% - ${e.paddingXS*2}px)`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${a}:hover`]:{[`&::before, ${a}-actions`]:{opacity:1}},[`${a}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`${n}-eye, ${n}-download, ${n}-delete`]:{zIndex:10,width:o,margin:`0 ${e.marginXXS}px`,fontSize:o,cursor:"pointer",transition:`all ${e.motionDurationSlow}`}},[`${a}-actions, ${a}-actions:hover`]:{[`${n}-eye, ${n}-download, ${n}-delete`]:{color:new St(r).setAlpha(.65).toRgbString(),"&:hover":{color:r}}},[`${a}-thumbnail, ${a}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${a}-name`]:{display:"none",textAlign:"center"},[`${a}-file + ${a}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${e.paddingXS*2}px)`},[`${a}-uploading`]:{[`&${a}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${a}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${e.paddingXS*2}px)`,paddingInlineStart:0}}})}},Ame=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},Rme=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:y(y({},qe(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},Dme=Ue("Upload",e=>{const{fontSizeHeading3:t,fontSize:n,lineHeight:o,lineWidth:r,controlHeightLG:i}=e,a=Math.round(n*o),l=Be(e,{uploadThumbnailSize:t*2,uploadProgressOffset:a/2+r,uploadPicCardSize:i*2.55});return[Rme(l),Ime(l),_me(l),Mme(l),Tme(l),Eme(l),Ame(l),bf(l)]});var Nme=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function l(c){try{u(o.next(c))}catch(d){a(d)}}function s(c){try{u(o.throw(c))}catch(d){a(d)}}function u(c){c.done?i(c.value):r(c.value).then(l,s)}u((o=o.apply(e,t||[])).next())})},kme=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var T;return(T=s.value)!==null&&T!==void 0?T:d.value}),[p,v]=Dt(e.defaultFileList||[],{value:We(e,"fileList"),postState:T=>{const A=Date.now();return(T??[]).map((R,H)=>(!R.uid&&!Object.isFrozen(R)&&(R.uid=`__AUTO__${A}_${H}__`),R))}}),h=ae("drop"),m=ae(null);Ke(()=>{Mt(e.fileList!==void 0||o.value===void 0,"Upload","`value` is not a valid prop, do you mean `fileList`?"),Mt(e.transformFile===void 0,"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly."),Mt(e.remove===void 0,"Upload","`remove` props is deprecated. Please use `remove` event.")});const b=(T,A,R)=>{var H,M;let D=[...A];e.maxCount===1?D=D.slice(-1):e.maxCount&&(D=D.slice(0,e.maxCount)),v(D);const N={file:T,fileList:D};R&&(N.event=R),(H=e["onUpdate:fileList"])===null||H===void 0||H.call(e,N.fileList),(M=e.onChange)===null||M===void 0||M.call(e,N),i.onFieldChange()},S=(T,A)=>Nme(this,void 0,void 0,function*(){const{beforeUpload:R,transformFile:H}=e;let M=T;if(R){const D=yield R(T,A);if(D===!1)return!1;if(delete T[Lu],D===Lu)return Object.defineProperty(T,Lu,{value:!0,configurable:!0}),!1;typeof D=="object"&&D&&(M=D)}return H&&(M=yield H(M)),M}),C=T=>{const A=T.filter(M=>!M.file[Lu]);if(!A.length)return;const R=A.map(M=>Cp(M.file));let H=[...p.value];R.forEach(M=>{H=xp(M,H)}),R.forEach((M,D)=>{let N=M;if(A[D].parsedFile)M.status="uploading";else{const{originFileObj:L}=M;let F;try{F=new File([L],L.name,{type:L.type})}catch{F=new Blob([L],{type:L.type}),F.name=L.name,F.lastModifiedDate=new Date,F.lastModified=new Date().getTime()}F.uid=M.uid,N=F}b(N,H)})},$=(T,A,R)=>{try{typeof T=="string"&&(T=JSON.parse(T))}catch{}if(!Sb(A,p.value))return;const H=Cp(A);H.status="done",H.percent=100,H.response=T,H.xhr=R;const M=xp(H,p.value);b(H,M)},x=(T,A)=>{if(!Sb(A,p.value))return;const R=Cp(A);R.status="uploading",R.percent=T.percent;const H=xp(R,p.value);b(R,H,T)},P=(T,A,R)=>{if(!Sb(R,p.value))return;const H=Cp(R);H.error=T,H.response=A,H.status="error";const M=xp(H,p.value);b(H,M)},w=T=>{let A;const R=e.onRemove||e.remove;Promise.resolve(typeof R=="function"?R(T):R).then(H=>{var M,D;if(H===!1)return;const N=mme(T,p.value);N&&(A=y(y({},T),{status:"removed"}),(M=p.value)===null||M===void 0||M.forEach(L=>{const F=A.uid!==void 0?"uid":"name";L[F]===A[F]&&!Object.isFrozen(L)&&(L.status="removed")}),(D=m.value)===null||D===void 0||D.abort(A),b(A,N))})},O=T=>{var A;h.value=T.type,T.type==="drop"&&((A=e.onDrop)===null||A===void 0||A.call(e,T))};r({onBatchStart:C,onSuccess:$,onProgress:x,onError:P,fileList:p,upload:m});const[I]=wr("Upload",$o.Upload,E(()=>e.locale)),_=(T,A)=>{const{removeIcon:R,previewIcon:H,downloadIcon:M,previewFile:D,onPreview:N,onDownload:L,isImageUrl:F,progress:B,itemRender:j,iconRender:z,showUploadList:G}=e,{showDownloadIcon:Q,showPreviewIcon:Y,showRemoveIcon:oe}=typeof G=="boolean"?{}:G;return G?g(Ome,{prefixCls:a.value,listType:e.listType,items:p.value,previewFile:D,onPreview:N,onDownload:L,onRemove:w,showRemoveIcon:!f.value&&oe,showPreviewIcon:Y,showDownloadIcon:Q,removeIcon:R,previewIcon:H,downloadIcon:M,iconRender:z,locale:I.value,isImageUrl:F,progress:B,itemRender:j,appendActionVisible:A,appendAction:T},y({},n)):T==null?void 0:T()};return()=>{var T,A,R;const{listType:H,type:M}=e,{class:D,style:N}=o,L=kme(o,["class","style"]),F=y(y(y({onBatchStart:C,onError:P,onProgress:x,onSuccess:$},L),e),{id:(T=e.id)!==null&&T!==void 0?T:i.id.value,prefixCls:a.value,beforeUpload:S,onChange:void 0,disabled:f.value});delete F.remove,(!n.default||f.value)&&delete F.id;const B={[`${a.value}-rtl`]:l.value==="rtl"};if(M==="drag"){const Q=ge(a.value,{[`${a.value}-drag`]:!0,[`${a.value}-drag-uploading`]:p.value.some(Y=>Y.status==="uploading"),[`${a.value}-drag-hover`]:h.value==="dragover",[`${a.value}-disabled`]:f.value,[`${a.value}-rtl`]:l.value==="rtl"},o.class,c.value);return u(g("span",k(k({},o),{},{class:ge(`${a.value}-wrapper`,B,D,c.value)}),[g("div",{class:Q,onDrop:O,onDragover:O,onDragleave:O,style:o.style},[g(F4,k(k({},F),{},{ref:m,class:`${a.value}-btn`}),k({default:()=>[g("div",{class:`${a.value}-drag-container`},[(A=n.default)===null||A===void 0?void 0:A.call(n)])]},n))]),_()]))}const j=ge(a.value,{[`${a.value}-select`]:!0,[`${a.value}-select-${H}`]:!0,[`${a.value}-disabled`]:f.value,[`${a.value}-rtl`]:l.value==="rtl"}),z=Ot((R=n.default)===null||R===void 0?void 0:R.call(n)),G=Q=>g("div",{class:j,style:Q},[g(F4,k(k({},F),{},{ref:m}),n)]);return u(H==="picture-card"?g("span",k(k({},o),{},{class:ge(`${a.value}-wrapper`,`${a.value}-picture-card-wrapper`,B,o.class,c.value)}),[_(G,!!(z&&z.length))]):g("span",k(k({},o),{},{class:ge(`${a.value}-wrapper`,B,o.class,c.value)}),[G(z&&z.length?void 0:{display:"none"}),_()]))}}});var K4=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{height:r}=e,i=K4(e,["height"]),{style:a}=o,l=K4(o,["style"]),s=y(y(y({},i),l),{type:"drag",style:y(y({},a),{height:typeof r=="number"?`${r}px`:r})});return g(Sg,s,n)}}}),Lme=Cg,Fme=y(Sg,{Dragger:Cg,LIST_IGNORE:Lu,install(e){return e.component(Sg.name,Sg),e.component(Cg.name,Cg),e}});function Bme(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function Hme(e){return Object.keys(e).map(t=>`${Bme(t)}: ${e[t]};`).join(" ")}function U4(){return window.devicePixelRatio||1}function Cb(e,t,n,o){e.translate(t,n),e.rotate(Math.PI/180*Number(o)),e.translate(-t,-n)}const zme=(e,t)=>{let n=!1;return e.removedNodes.length&&(n=Array.from(e.removedNodes).some(o=>o===t)),e.type==="attributes"&&e.target===t&&(n=!0),n};var jme=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r2&&arguments[2]!==void 0?arguments[2]:{};const{window:o=b5}=n,r=jme(n,["window"]);let i;const a=v5(()=>o&&"MutationObserver"in o),l=()=>{i&&(i.disconnect(),i=void 0)},s=be(()=>gx(e),c=>{l(),a.value&&o&&c&&(i=new MutationObserver(t),i.observe(c,r))},{immediate:!0}),u=()=>{l(),s()};return h5(u),{isSupported:a,stop:u}}const xb=2,G4=3,Vme=()=>({zIndex:Number,rotate:Number,width:Number,height:Number,image:String,content:He([String,Array]),font:De(),rootClassName:String,gap:pt(),offset:pt()}),Kme=le({name:"AWatermark",inheritAttrs:!1,props:Qe(Vme(),{zIndex:9,rotate:-22,font:{},gap:[100,100]}),setup(e,t){let{slots:n,attrs:o}=t;const[,r]=na(),i=se(),a=se(),l=se(!1),s=E(()=>{var _,T;return(T=(_=e.gap)===null||_===void 0?void 0:_[0])!==null&&T!==void 0?T:100}),u=E(()=>{var _,T;return(T=(_=e.gap)===null||_===void 0?void 0:_[1])!==null&&T!==void 0?T:100}),c=E(()=>s.value/2),d=E(()=>u.value/2),f=E(()=>{var _,T;return(T=(_=e.offset)===null||_===void 0?void 0:_[0])!==null&&T!==void 0?T:c.value}),p=E(()=>{var _,T;return(T=(_=e.offset)===null||_===void 0?void 0:_[1])!==null&&T!==void 0?T:d.value}),v=E(()=>{var _,T;return(T=(_=e.font)===null||_===void 0?void 0:_.fontSize)!==null&&T!==void 0?T:r.value.fontSizeLG}),h=E(()=>{var _,T;return(T=(_=e.font)===null||_===void 0?void 0:_.fontWeight)!==null&&T!==void 0?T:"normal"}),m=E(()=>{var _,T;return(T=(_=e.font)===null||_===void 0?void 0:_.fontStyle)!==null&&T!==void 0?T:"normal"}),b=E(()=>{var _,T;return(T=(_=e.font)===null||_===void 0?void 0:_.fontFamily)!==null&&T!==void 0?T:"sans-serif"}),S=E(()=>{var _,T;return(T=(_=e.font)===null||_===void 0?void 0:_.color)!==null&&T!==void 0?T:r.value.colorFill}),C=E(()=>{var _;const T={zIndex:(_=e.zIndex)!==null&&_!==void 0?_:9,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let A=f.value-c.value,R=p.value-d.value;return A>0&&(T.left=`${A}px`,T.width=`calc(100% - ${A}px)`,A=0),R>0&&(T.top=`${R}px`,T.height=`calc(100% - ${R}px)`,R=0),T.backgroundPosition=`${A}px ${R}px`,T}),$=()=>{a.value&&(a.value.remove(),a.value=void 0)},x=(_,T)=>{var A;i.value&&a.value&&(l.value=!0,a.value.setAttribute("style",Hme(y(y({},C.value),{backgroundImage:`url('${_}')`,backgroundSize:`${(s.value+T)*xb}px`}))),(A=i.value)===null||A===void 0||A.append(a.value),setTimeout(()=>{l.value=!1}))},P=_=>{let T=120,A=64;const R=e.content,H=e.image,M=e.width,D=e.height;if(!H&&_.measureText){_.font=`${Number(v.value)}px ${b.value}`;const N=Array.isArray(R)?R:[R],L=N.map(F=>_.measureText(F).width);T=Math.ceil(Math.max(...L)),A=Number(v.value)*N.length+(N.length-1)*G4}return[M??T,D??A]},w=(_,T,A,R,H)=>{const M=U4(),D=e.content,N=Number(v.value)*M;_.font=`${m.value} normal ${h.value} ${N}px/${H}px ${b.value}`,_.fillStyle=S.value,_.textAlign="center",_.textBaseline="top",_.translate(R/2,0);const L=Array.isArray(D)?D:[D];L==null||L.forEach((F,B)=>{_.fillText(F??"",T,A+B*(N+G4*M))})},O=()=>{var _;const T=document.createElement("canvas"),A=T.getContext("2d"),R=e.image,H=(_=e.rotate)!==null&&_!==void 0?_:-22;if(A){a.value||(a.value=document.createElement("div"));const M=U4(),[D,N]=P(A),L=(s.value+D)*M,F=(u.value+N)*M;T.setAttribute("width",`${L*xb}px`),T.setAttribute("height",`${F*xb}px`);const B=s.value*M/2,j=u.value*M/2,z=D*M,G=N*M,Q=(z+s.value*M)/2,Y=(G+u.value*M)/2,oe=B+L,Z=j+F,re=Q+L,ne=Y+F;if(A.save(),Cb(A,Q,Y,H),R){const X=new Image;X.onload=()=>{A.drawImage(X,B,j,z,G),A.restore(),Cb(A,re,ne,H),A.drawImage(X,oe,Z,z,G),x(T.toDataURL(),D)},X.crossOrigin="anonymous",X.referrerPolicy="no-referrer",X.src=R}else w(A,B,j,z,G),A.restore(),Cb(A,re,ne,H),w(A,oe,Z,z,G),x(T.toDataURL(),D)}};return Ke(()=>{O()}),be(()=>[e,r.value.colorFill,r.value.fontSizeLG],()=>{O()},{deep:!0,flush:"post"}),tt(()=>{$()}),Wme(i,_=>{l.value||_.forEach(T=>{zme(T,a.value)&&($(),O())})},{attributes:!0,subtree:!0,childList:!0,attributeFilter:["style","class"]}),()=>{var _;return g("div",k(k({},o),{},{ref:i,class:[o.class,e.rootClassName],style:[{position:"relative"},o.style]}),[(_=n.default)===null||_===void 0?void 0:_.call(n)])}}}),Ume=Lt(Kme);function X4(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function Y4(e){return{backgroundColor:e.bgColorSelected,boxShadow:e.boxShadow}}const Gme=y({overflow:"hidden"},cn),Xme=e=>{const{componentCls:t}=e;return{[t]:y(y(y(y(y({},qe(e)),{display:"inline-block",padding:e.segmentedContainerPadding,color:e.labelColor,backgroundColor:e.bgColor,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${e.motionDurationMid} ${e.motionEaseInOut}`,borderRadius:e.borderRadiusSM,"&-selected":y(y({},Y4(e)),{color:e.labelColorHover}),"&::after":{content:'""',position:"absolute",width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",transition:`background-color ${e.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.labelColorHover,"&::after":{backgroundColor:e.bgColorHover}},"&-label":y({minHeight:e.controlHeight-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeight-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`},Gme),"&-icon + *":{marginInlineStart:e.marginSM/2},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:y(y({},Y4(e)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${e.paddingXXS}px 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:e.controlHeightLG-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightLG-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:e.controlHeightSM-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightSM-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontalSM}px`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),X4(`&-disabled ${t}-item`,e)),X4(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:"transform, width"}})}},Yme=Ue("Segmented",e=>{const{lineWidthBold:t,lineWidth:n,colorTextLabel:o,colorText:r,colorFillSecondary:i,colorBgLayout:a,colorBgElevated:l}=e,s=Be(e,{segmentedPaddingHorizontal:e.controlPaddingHorizontal-n,segmentedPaddingHorizontalSM:e.controlPaddingHorizontalSM-n,segmentedContainerPadding:t,labelColor:o,labelColorHover:r,bgColor:a,bgColorHover:i,bgColorSelected:l});return[Xme(s)]}),q4=e=>e?{left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth}:null,Ts=e=>e!==void 0?`${e}px`:void 0,qme=le({props:{value:It(),getValueIndex:It(),prefixCls:It(),motionName:It(),onMotionStart:It(),onMotionEnd:It(),direction:It(),containerRef:It()},emits:["motionStart","motionEnd"],setup(e,t){let{emit:n}=t;const o=ae(),r=v=>{var h;const m=e.getValueIndex(v),b=(h=e.containerRef.value)===null||h===void 0?void 0:h.querySelectorAll(`.${e.prefixCls}-item`)[m];return(b==null?void 0:b.offsetParent)&&b},i=ae(null),a=ae(null);be(()=>e.value,(v,h)=>{const m=r(h),b=r(v),S=q4(m),C=q4(b);i.value=S,a.value=C,n(m&&b?"motionStart":"motionEnd")},{flush:"post"});const l=E(()=>{var v,h;return e.direction==="rtl"?Ts(-((v=i.value)===null||v===void 0?void 0:v.right)):Ts((h=i.value)===null||h===void 0?void 0:h.left)}),s=E(()=>{var v,h;return e.direction==="rtl"?Ts(-((v=a.value)===null||v===void 0?void 0:v.right)):Ts((h=a.value)===null||h===void 0?void 0:h.left)});let u;const c=v=>{clearTimeout(u),ot(()=>{v&&(v.style.transform="translateX(var(--thumb-start-left))",v.style.width="var(--thumb-start-width)")})},d=v=>{u=setTimeout(()=>{v&&(sh(v,`${e.motionName}-appear-active`),v.style.transform="translateX(var(--thumb-active-left))",v.style.width="var(--thumb-active-width)")})},f=v=>{i.value=null,a.value=null,v&&(v.style.transform=null,v.style.width=null,ch(v,`${e.motionName}-appear-active`)),n("motionEnd")},p=E(()=>{var v,h;return{"--thumb-start-left":l.value,"--thumb-start-width":Ts((v=i.value)===null||v===void 0?void 0:v.width),"--thumb-active-left":s.value,"--thumb-active-width":Ts((h=a.value)===null||h===void 0?void 0:h.width)}});return tt(()=>{clearTimeout(u)}),()=>{const v={ref:o,style:p.value,class:[`${e.prefixCls}-thumb`]};return g(Nn,{appear:!0,onBeforeEnter:c,onEnter:d,onAfterEnter:f},{default:()=>[!i.value||!a.value?null:g("div",v,null)]})}}});function Jme(e){return e.map(t=>typeof t=="object"&&t!==null?t:{label:t==null?void 0:t.toString(),title:t==null?void 0:t.toString(),value:t})}const Zme=()=>({prefixCls:String,options:pt(),block:$e(),disabled:$e(),size:Ne(),value:y(y({},He([String,Number])),{required:!0}),motionName:String,onChange:ye(),"onUpdate:value":ye()}),zN=(e,t)=>{let{slots:n,emit:o}=t;const{value:r,disabled:i,payload:a,title:l,prefixCls:s,label:u=n.label,checked:c,className:d}=e,f=p=>{i||o("change",p,r)};return g("label",{class:ge({[`${s}-item-disabled`]:i},d)},[g("input",{class:`${s}-item-input`,type:"radio",disabled:i,checked:c,onChange:f},null),g("div",{class:`${s}-item-label`,title:typeof l=="string"?l:""},[typeof u=="function"?u({value:r,disabled:i,payload:a,title:l}):u??r])])};zN.inheritAttrs=!1;const Qme=le({name:"ASegmented",inheritAttrs:!1,props:Qe(Zme(),{options:[],motionName:"thumb-motion"}),slots:Object,setup(e,t){let{emit:n,slots:o,attrs:r}=t;const{prefixCls:i,direction:a,size:l}=Te("segmented",e),[s,u]=Yme(i),c=se(),d=se(!1),f=E(()=>Jme(e.options)),p=(v,h)=>{e.disabled||(n("update:value",h),n("change",h))};return()=>{const v=i.value;return s(g("div",k(k({},r),{},{class:ge(v,{[u.value]:!0,[`${v}-block`]:e.block,[`${v}-disabled`]:e.disabled,[`${v}-lg`]:l.value=="large",[`${v}-sm`]:l.value=="small",[`${v}-rtl`]:a.value==="rtl"},r.class),ref:c}),[g("div",{class:`${v}-group`},[g(qme,{containerRef:c,prefixCls:v,value:e.value,motionName:`${v}-${e.motionName}`,direction:a.value,getValueIndex:h=>f.value.findIndex(m=>m.value===h),onMotionStart:()=>{d.value=!0},onMotionEnd:()=>{d.value=!1}},null),f.value.map(h=>g(zN,k(k({key:h.value,prefixCls:v,checked:h.value===e.value,onChange:p},h),{},{className:ge(h.className,`${v}-item`,{[`${v}-item-selected`]:h.value===e.value&&!d.value}),disabled:!!e.disabled||!!h.disabled}),o))])]))}}}),e0e=Lt(Qme),t0e=e=>{const{componentCls:t}=e;return{[t]:y(y({},qe(e)),{display:"flex",justifyContent:"center",alignItems:"center",padding:e.paddingSM,backgroundColor:e.colorWhite,borderRadius:e.borderRadiusLG,border:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${t}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:e.colorText,lineHeight:e.lineHeight,background:e.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${t}-expired , & > ${t}-scanned`]:{color:e.QRCodeTextColor}},"&-icon":{marginBlockEnd:e.marginXS,fontSize:e.controlHeight}}),[`${t}-borderless`]:{borderColor:"transparent"}}},n0e=Ue("QRCode",e=>t0e(Be(e,{QRCodeTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"})));var o0e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};function J4(e){for(var t=1;t({size:{type:Number,default:160},value:{type:String,required:!0},type:Ne("canvas"),color:String,bgColor:String,includeMargin:Boolean,imageSettings:De()}),i0e=()=>y(y({},R$()),{errorLevel:Ne("M"),icon:String,iconSize:{type:Number,default:40},status:Ne("active"),bordered:{type:Boolean,default:!0}});/** * @license QR Code generator library (TypeScript) * Copyright (c) Project Nayuki. * SPDX-License-Identifier: MIT - */var dr;(function(e){class t{static encodeText(l,s){const u=e.QrSegment.makeSegments(l);return t.encodeSegments(u,s)}static encodeBinary(l,s){const u=e.QrSegment.makeBytes(l);return t.encodeSegments([u],s)}static encodeSegments(l,s){let u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(t.MIN_VERSION<=u&&u<=c&&c<=t.MAX_VERSION)||d<-1||d>7)throw new RangeError("Invalid value");let p,v;for(p=u;;p++){const S=t.getNumDataCodewords(p,s)*8,C=i.getTotalBits(l,p);if(C<=S){v=C;break}if(p>=c)throw new RangeError("Data too long")}for(const S of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])f&&v<=t.getNumDataCodewords(p,S)*8&&(s=S);const h=[];for(const S of l){n(S.mode.modeBits,4,h),n(S.numChars,S.mode.numCharCountBits(p),h);for(const C of S.getData())h.push(C)}r(h.length==v);const m=t.getNumDataCodewords(p,s)*8;r(h.length<=m),n(0,Math.min(4,m-h.length),h),n(0,(8-h.length%8)%8,h),r(h.length%8==0);for(let S=236;h.lengthb[C>>>3]|=S<<7-(C&7)),new t(p,s,b,d)}constructor(l,s,u,c){if(this.version=l,this.errorCorrectionLevel=s,this.modules=[],this.isFunction=[],lt.MAX_VERSION)throw new RangeError("Version value out of range");if(c<-1||c>7)throw new RangeError("Mask value out of range");this.size=l*4+17;const d=[];for(let p=0;p>>9)*1335;const c=(s<<10|u)^21522;r(c>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,o(c,d));this.setFunctionModule(8,7,o(c,6)),this.setFunctionModule(8,8,o(c,7)),this.setFunctionModule(7,8,o(c,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,o(c,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,o(c,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,o(c,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let l=this.version;for(let u=0;u<12;u++)l=l<<1^(l>>>11)*7973;const s=this.version<<12|l;r(s>>>18==0);for(let u=0;u<18;u++){const c=o(s,u),d=this.size-11+u%3,f=Math.floor(u/3);this.setFunctionModule(d,f,c),this.setFunctionModule(f,d,c)}}drawFinderPattern(l,s){for(let u=-4;u<=4;u++)for(let c=-4;c<=4;c++){const d=Math.max(Math.abs(c),Math.abs(u)),f=l+c,p=s+u;0<=f&&f{(S!=v-d||$>=p)&&b.push(C[S])});return r(b.length==f),b}drawCodewords(l){if(l.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let s=0;for(let u=this.size-1;u>=1;u-=2){u==6&&(u=5);for(let c=0;c>>3],7-(s&7)),s++)}}r(s==l.length*8)}applyMask(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(let s=0;s5&&l++):(this.finderPenaltyAddHistory(p,v),f||(l+=this.finderPenaltyCountPatterns(v)*t.PENALTY_N3),f=this.modules[d][h],p=1);l+=this.finderPenaltyTerminateAndCount(f,p,v)*t.PENALTY_N3}for(let d=0;d5&&l++):(this.finderPenaltyAddHistory(p,v),f||(l+=this.finderPenaltyCountPatterns(v)*t.PENALTY_N3),f=this.modules[h][d],p=1);l+=this.finderPenaltyTerminateAndCount(f,p,v)*t.PENALTY_N3}for(let d=0;df+(p?1:0),s);const u=this.size*this.size,c=Math.ceil(Math.abs(s*20-u*10)/u)-1;return r(0<=c&&c<=9),l+=c*t.PENALTY_N4,r(0<=l&&l<=2568888),l}getAlignmentPatternPositions(){if(this.version==1)return[];{const l=Math.floor(this.version/7)+2,s=this.version==32?26:Math.ceil((this.version*4+4)/(l*2-2))*2,u=[6];for(let c=this.size-7;u.lengtht.MAX_VERSION)throw new RangeError("Version number out of range");let s=(16*l+128)*l+64;if(l>=2){const u=Math.floor(l/7)+2;s-=(25*u-10)*u-55,l>=7&&(s-=36)}return r(208<=s&&s<=29648),s}static getNumDataCodewords(l,s){return Math.floor(t.getNumRawDataModules(l)/8)-t.ECC_CODEWORDS_PER_BLOCK[s.ordinal][l]*t.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][l]}static reedSolomonComputeDivisor(l){if(l<1||l>255)throw new RangeError("Degree out of range");const s=[];for(let c=0;c0);for(const c of l){const d=c^u.shift();u.push(0),s.forEach((f,p)=>u[p]^=t.reedSolomonMultiply(f,d))}return u}static reedSolomonMultiply(l,s){if(l>>>8||s>>>8)throw new RangeError("Byte out of range");let u=0;for(let c=7;c>=0;c--)u=u<<1^(u>>>7)*285,u^=(s>>>c&1)*l;return r(u>>>8==0),u}finderPenaltyCountPatterns(l){const s=l[1];r(s<=this.size*3);const u=s>0&&l[2]==s&&l[3]==s*3&&l[4]==s&&l[5]==s;return(u&&l[0]>=s*4&&l[6]>=s?1:0)+(u&&l[6]>=s*4&&l[0]>=s?1:0)}finderPenaltyTerminateAndCount(l,s,u){return l&&(this.finderPenaltyAddHistory(s,u),s=0),s+=this.size,this.finderPenaltyAddHistory(s,u),this.finderPenaltyCountPatterns(u)}finderPenaltyAddHistory(l,s){s[0]==0&&(l+=this.size),s.pop(),s.unshift(l)}}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(a,l,s){if(l<0||l>31||a>>>l)throw new RangeError("Value out of range");for(let u=l-1;u>=0;u--)s.push(a>>>u&1)}function o(a,l){return(a>>>l&1)!=0}function r(a){if(!a)throw new Error("Assertion error")}class i{static makeBytes(l){const s=[];for(const u of l)n(u,8,s);return new i(i.Mode.BYTE,l.length,s)}static makeNumeric(l){if(!i.isNumeric(l))throw new RangeError("String contains non-numeric characters");const s=[];for(let u=0;u=1<1&&arguments[1]!==void 0?arguments[1]:0;const n=[];return e.forEach(function(o,r){let i=null;o.forEach(function(a,l){if(!a&&i!==null){n.push(`M${i+t} ${r+t}h${l-i}v1H${i+t}z`),i=null;return}if(l===o.length-1){if(!a)return;i===null?n.push(`M${l+t},${r+t} h1v1H${l+t}z`):n.push(`M${i+t},${r+t} h${l+1-i}v1H${i+t}z`);return}a&&i===null&&(i=l)})}),n.join("")}function XN(e,t){return e.slice().map((n,o)=>o=t.y+t.h?n:n.map((r,i)=>i=t.x+t.w?r:!1))}function YN(e,t,n,o){if(o==null)return null;const r=e.length+n*2,i=Math.floor(t*s0e),a=r/t,l=(o.width||i)*a,s=(o.height||i)*a,u=o.x==null?e.length/2-l/2:o.x*a,c=o.y==null?e.length/2-s/2:o.y*a;let d=null;if(o.excavate){const f=Math.floor(u),p=Math.floor(c),v=Math.ceil(l+u-f),h=Math.ceil(s+c-p);d={x:f,y:p,w:v,h}}return{x:u,y:c,h:s,w:l,excavation:d}}function qN(e,t){return t!=null?Math.floor(t):e?a0e:l0e}const c0e=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),u0e=le({name:"QRCodeCanvas",inheritAttrs:!1,props:y(y({},R$()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(e,t){let{attrs:n,expose:o}=t;const r=E(()=>{var s;return(s=e.imageSettings)===null||s===void 0?void 0:s.src}),i=se(null),a=se(null),l=se(!1);return o({toDataURL:(s,u)=>{var c;return(c=i.value)===null||c===void 0?void 0:c.toDataURL(s,u)}}),Ve(()=>{const{value:s,size:u=F1,level:c=WN,bgColor:d=VN,fgColor:f=KN,includeMargin:p=UN,marginSize:v,imageSettings:h}=e;if(i.value!=null){const m=i.value,b=m.getContext("2d");if(!b)return;let S=dr.QrCode.encodeText(s,jN[c]).getModules();const C=qN(p,v),$=S.length+C*2,x=YN(S,u,C,h),P=a.value,w=l.value&&x!=null&&P!==null&&P.complete&&P.naturalHeight!==0&&P.naturalWidth!==0;w&&x.excavation!=null&&(S=XN(S,x.excavation));const O=window.devicePixelRatio||1;m.height=m.width=u*O;const I=u/$*O;b.scale(I,I),b.fillStyle=d,b.fillRect(0,0,$,$),b.fillStyle=f,c0e?b.fill(new Path2D(GN(S,C))):S.forEach(function(_,T){_.forEach(function(A,R){A&&b.fillRect(R+C,T+C,1,1)})}),w&&b.drawImage(P,x.x+C,x.y+C,x.w,x.h)}},{flush:"post"}),be(r,()=>{l.value=!1}),()=>{var s;const u=(s=e.size)!==null&&s!==void 0?s:F1,c={height:`${u}px`,width:`${u}px`};let d=null;return r.value!=null&&(d=g("img",{src:r.value,key:r.value,style:{display:"none"},onLoad:()=>{l.value=!0},ref:a},null)),g(Le,null,[g("canvas",k(k({},n),{},{style:[c,n.style],ref:i}),null),d])}}}),d0e=le({name:"QRCodeSVG",inheritAttrs:!1,props:y(y({},R$()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(e){let t=null,n=null,o=null,r=null,i=null,a=null;return Ve(()=>{const{value:l,size:s=F1,level:u=WN,includeMargin:c=UN,marginSize:d,imageSettings:f}=e;t=dr.QrCode.encodeText(l,jN[u]).getModules(),n=qN(c,d),o=t.length+n*2,r=YN(t,s,n,f),f!=null&&r!=null&&(r.excavation!=null&&(t=XN(t,r.excavation)),a=g("image",{"xlink:href":f.src,height:r.h,width:r.w,x:r.x+n,y:r.y+n,preserveAspectRatio:"none"},null)),i=GN(t,n)}),()=>{const l=e.bgColor&&VN,s=e.fgColor&&KN;return g("svg",{height:e.size,width:e.size,viewBox:`0 0 ${o} ${o}`},[!!e.title&&g("title",null,[e.title]),g("path",{fill:l,d:`M0,0 h${o}v${o}H0z`,"shape-rendering":"crispEdges"},null),g("path",{fill:s,d:i,"shape-rendering":"crispEdges"},null),a])}}}),f0e=le({name:"AQrcode",inheritAttrs:!1,props:i0e(),emits:["refresh"],setup(e,t){let{emit:n,attrs:o,expose:r}=t;const[i]=wr("QRCode"),{prefixCls:a}=Te("qrcode",e),[l,s]=n0e(a),[,u]=na(),c=ae();r({toDataURL:(f,p)=>{var v;return(v=c.value)===null||v===void 0?void 0:v.toDataURL(f,p)}});const d=E(()=>{const{value:f,icon:p="",size:v=160,iconSize:h=40,color:m=u.value.colorText,bgColor:b="transparent",errorLevel:S="M"}=e,C={src:p,x:void 0,y:void 0,height:h,width:h,excavate:!0};return{value:f,size:v-(u.value.paddingSM+u.value.lineWidth)*2,level:S,bgColor:b,fgColor:m,imageSettings:p?C:void 0}});return()=>{const f=a.value;return l(g("div",k(k({},o),{},{style:[o.style,{width:`${e.size}px`,height:`${e.size}px`,backgroundColor:d.value.bgColor}],class:[s.value,f,{[`${f}-borderless`]:!e.bordered}]}),[e.status!=="active"&&g("div",{class:`${f}-mask`},[e.status==="loading"&&g(di,null,null),e.status==="expired"&&g(Le,null,[g("p",{class:`${f}-expired`},[i.value.expired]),g(Qt,{type:"link",onClick:p=>n("refresh",p)},{default:()=>[i.value.refresh],icon:()=>g(A$,null,null)})]),e.status==="scanned"&&g("p",{class:`${f}-scanned`},[i.value.scanned])]),e.type==="canvas"?g(u0e,k({ref:c},d.value),null):g(d0e,d.value,null)]))}}}),p0e=Lt(f0e);function g0e(e){const t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:o,right:r,bottom:i,left:a}=e.getBoundingClientRect();return o>=0&&a>=0&&r<=t&&i<=n}function h0e(e,t,n,o){const[r,i]=$t(void 0);Ve(()=>{const c=typeof e.value=="function"?e.value():e.value;i(c||null)},{flush:"post"});const[a,l]=$t(null),s=()=>{if(!t.value){l(null);return}if(r.value){!g0e(r.value)&&t.value&&r.value.scrollIntoView(o.value);const{left:c,top:d,width:f,height:p}=r.value.getBoundingClientRect(),v={left:c,top:d,width:f,height:p,radius:0};JSON.stringify(a.value)!==JSON.stringify(v)&&l(v)}else l(null)};return Ke(()=>{be([t,r],()=>{s()},{flush:"post",immediate:!0}),window.addEventListener("resize",s)}),tt(()=>{window.removeEventListener("resize",s)}),[E(()=>{var c,d;if(!a.value)return a.value;const f=((c=n.value)===null||c===void 0?void 0:c.offset)||6,p=((d=n.value)===null||d===void 0?void 0:d.radius)||2;return{left:a.value.left-f,top:a.value.top-f,width:a.value.width+f*2,height:a.value.height+f*2,radius:p}}),r]}const v0e=()=>({arrow:He([Boolean,Object]),target:He([String,Function,Object]),title:He([String,Object]),description:He([String,Object]),placement:Ne(),mask:He([Object,Boolean],!0),className:{type:String},style:De(),scrollIntoViewOptions:He([Boolean,Object])}),D$=()=>y(y({},v0e()),{prefixCls:{type:String},total:{type:Number},current:{type:Number},onClose:ye(),onFinish:ye(),renderPanel:ye(),onPrev:ye(),onNext:ye()}),m0e=le({name:"DefaultPanel",inheritAttrs:!1,props:D$(),setup(e,t){let{attrs:n}=t;return()=>{const{prefixCls:o,current:r,total:i,title:a,description:l,onClose:s,onPrev:u,onNext:c,onFinish:d}=e;return g("div",k(k({},n),{},{class:ge(`${o}-content`,n.class)}),[g("div",{class:`${o}-inner`},[g("button",{type:"button",onClick:s,"aria-label":"Close",class:`${o}-close`},[g("span",{class:`${o}-close-x`},[zn("×")])]),g("div",{class:`${o}-header`},[g("div",{class:`${o}-title`},[a])]),g("div",{class:`${o}-description`},[l]),g("div",{class:`${o}-footer`},[g("div",{class:`${o}-sliders`},[i>1?[...Array.from({length:i}).keys()].map((f,p)=>g("span",{key:f,class:p===r?"active":""},null)):null]),g("div",{class:`${o}-buttons`},[r!==0?g("button",{class:`${o}-prev-btn`,onClick:u},[zn("Prev")]):null,r===i-1?g("button",{class:`${o}-finish-btn`,onClick:d},[zn("Finish")]):g("button",{class:`${o}-next-btn`,onClick:c},[zn("Next")])])])])])}}}),b0e=le({name:"TourStep",inheritAttrs:!1,props:D$(),setup(e,t){let{attrs:n}=t;return()=>{const{current:o,renderPanel:r}=e;return g(Le,null,[typeof r=="function"?r(y(y({},n),e),o):g(m0e,k(k({},n),e),null)])}}});let ZT=0;const y0e=so();function S0e(){let e;return y0e?(e=ZT,ZT+=1):e="TEST_OR_SSR",e}function C0e(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ae("");const t=`vc_unique_${S0e()}`;return e.value||t}const $p={fill:"transparent","pointer-events":"auto"},x0e=le({name:"TourMask",props:{prefixCls:{type:String},pos:De(),rootClassName:{type:String},showMask:$e(),fill:{type:String,default:"rgba(0,0,0,0.5)"},open:$e(),animated:He([Boolean,Object]),zIndex:{type:Number}},setup(e,t){let{attrs:n}=t;const o=C0e();return()=>{const{prefixCls:r,open:i,rootClassName:a,pos:l,showMask:s,fill:u,animated:c,zIndex:d}=e,f=`${r}-mask-${o}`,p=typeof c=="object"?c==null?void 0:c.placeholder:c;return g(gf,{visible:i,autoLock:!0},{default:()=>i&&g("div",k(k({},n),{},{class:ge(`${r}-mask`,a,n.class),style:[{position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:d,pointerEvents:"none"},n.style]}),[s?g("svg",{style:{width:"100%",height:"100%"}},[g("defs",null,[g("mask",{id:f},[g("rect",{x:"0",y:"0",width:"100vw",height:"100vh",fill:"white"},null),l&&g("rect",{x:l.left,y:l.top,rx:l.radius,width:l.width,height:l.height,fill:"black",class:p?`${r}-placeholder-animated`:""},null)])]),g("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:u,mask:`url(#${f})`},null),l&&g(Le,null,[g("rect",k(k({},$p),{},{x:"0",y:"0",width:"100%",height:l.top}),null),g("rect",k(k({},$p),{},{x:"0",y:"0",width:l.left,height:"100%"}),null),g("rect",k(k({},$p),{},{x:"0",y:l.top+l.height,width:"100%",height:`calc(100vh - ${l.top+l.height}px)`}),null),g("rect",k(k({},$p),{},{x:l.left+l.width,y:"0",width:`calc(100vw - ${l.left+l.width}px)`,height:"100%"}),null)])]):null])})}}}),$0e=[0,0],QT={left:{points:["cr","cl"],offset:[-8,0]},right:{points:["cl","cr"],offset:[8,0]},top:{points:["bc","tc"],offset:[0,-8]},bottom:{points:["tc","bc"],offset:[0,8]},topLeft:{points:["bl","tl"],offset:[0,-8]},leftTop:{points:["tr","tl"],offset:[-8,0]},topRight:{points:["br","tr"],offset:[0,-8]},rightTop:{points:["tl","tr"],offset:[8,0]},bottomRight:{points:["tr","br"],offset:[0,8]},rightBottom:{points:["bl","br"],offset:[8,0]},bottomLeft:{points:["tl","bl"],offset:[0,8]},leftBottom:{points:["br","bl"],offset:[-8,0]}};function JN(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const t={};return Object.keys(QT).forEach(n=>{t[n]=y(y({},QT[n]),{autoArrow:e,targetOffset:$0e})}),t}JN();var w0e=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{builtinPlacements:e,popupAlign:t}=X6();return{builtinPlacements:e,popupAlign:t,steps:pt(),open:$e(),defaultCurrent:{type:Number},current:{type:Number},onChange:ye(),onClose:ye(),onFinish:ye(),mask:He([Boolean,Object],!0),arrow:He([Boolean,Object],!0),rootClassName:{type:String},placement:Ne("bottom"),prefixCls:{type:String,default:"rc-tour"},renderPanel:ye(),gap:De(),animated:He([Boolean,Object]),scrollIntoViewOptions:He([Boolean,Object],!0),zIndex:{type:Number,default:1001}}},P0e=le({name:"Tour",inheritAttrs:!1,props:Qe(ZN(),{}),setup(e){const{defaultCurrent:t,placement:n,mask:o,scrollIntoViewOptions:r,open:i,gap:a,arrow:l}=Fr(e),s=ae(),[u,c]=Dt(0,{value:E(()=>e.current),defaultValue:t.value}),[d,f]=Dt(void 0,{value:E(()=>e.open),postState:w=>u.value<0||u.value>=e.steps.length?!1:w??!0}),p=se(d.value);Ve(()=>{d.value&&!p.value&&c(0),p.value=d.value});const v=E(()=>e.steps[u.value]||{}),h=E(()=>{var w;return(w=v.value.placement)!==null&&w!==void 0?w:n.value}),m=E(()=>{var w;return d.value&&((w=v.value.mask)!==null&&w!==void 0?w:o.value)}),b=E(()=>{var w;return(w=v.value.scrollIntoViewOptions)!==null&&w!==void 0?w:r.value}),[S,C]=h0e(E(()=>v.value.target),i,a,b),$=E(()=>C.value?typeof v.value.arrow>"u"?l.value:v.value.arrow:!1),x=E(()=>typeof $.value=="object"?$.value.pointAtCenter:!1);be(x,()=>{var w;(w=s.value)===null||w===void 0||w.forcePopupAlign()}),be(u,()=>{var w;(w=s.value)===null||w===void 0||w.forcePopupAlign()});const P=w=>{var O;c(w),(O=e.onChange)===null||O===void 0||O.call(e,w)};return()=>{var w;const{prefixCls:O,steps:I,onClose:_,onFinish:T,rootClassName:A,renderPanel:R,animated:H,zIndex:M}=e,D=w0e(e,["prefixCls","steps","onClose","onFinish","rootClassName","renderPanel","animated","zIndex"]);if(C.value===void 0)return null;const N=()=>{f(!1),_==null||_(u.value)},L=typeof m.value=="boolean"?m.value:!!m.value,F=typeof m.value=="boolean"?void 0:m.value,B=()=>C.value||document.body,j=()=>g(b0e,k({arrow:$.value,key:"content",prefixCls:O,total:I.length,renderPanel:R,onPrev:()=>{P(u.value-1)},onNext:()=>{P(u.value+1)},onClose:N,current:u.value,onFinish:()=>{N(),T==null||T()}},v.value),null),z=E(()=>{const G=S.value||$b,Q={};return Object.keys(G).forEach(Y=>{typeof G[Y]=="number"?Q[Y]=`${G[Y]}px`:Q[Y]=G[Y]}),Q});return d.value?g(Le,null,[g(x0e,{zIndex:M,prefixCls:O,pos:S.value,showMask:L,style:F==null?void 0:F.style,fill:F==null?void 0:F.color,open:d.value,animated:H,rootClassName:A},null),g(ss,k(k({},D),{},{arrow:!!D.arrow,builtinPlacements:v.value.target?(w=D.builtinPlacements)!==null&&w!==void 0?w:JN(x.value):void 0,ref:s,popupStyle:v.value.target?v.value.style:y(y({},v.value.style),{position:"fixed",left:$b.left,top:$b.top,transform:"translate(-50%, -50%)"}),popupPlacement:h.value,popupVisible:d.value,popupClassName:ge(A,v.value.className),prefixCls:O,popup:j,forceRender:!1,destroyPopupOnHide:!0,zIndex:M,mask:!1,getTriggerDOMNode:B}),{default:()=>[g(gf,{visible:d.value,autoLock:!0},{default:()=>[g("div",{class:ge(A,`${O}-target-placeholder`),style:y(y({},z.value),{position:"fixed",pointerEvents:"none"})},null)]})]})]):null}}}),O0e=()=>y(y({},ZN()),{steps:{type:Array},prefixCls:{type:String},current:{type:Number},type:{type:String},"onUpdate:current":Function}),I0e=()=>y(y({},D$()),{cover:{type:Object},nextButtonProps:{type:Object},prevButtonProps:{type:Object},current:{type:Number},type:{type:String}}),T0e=le({name:"ATourPanel",inheritAttrs:!1,props:I0e(),setup(e,t){let{attrs:n,slots:o}=t;const{current:r,total:i}=Fr(e),a=E(()=>r.value===i.value-1),l=u=>{var c;const d=e.prevButtonProps;(c=e.onPrev)===null||c===void 0||c.call(e,u),typeof(d==null?void 0:d.onClick)=="function"&&(d==null||d.onClick())},s=u=>{var c,d;const f=e.nextButtonProps;a.value?(c=e.onFinish)===null||c===void 0||c.call(e,u):(d=e.onNext)===null||d===void 0||d.call(e,u),typeof(f==null?void 0:f.onClick)=="function"&&(f==null||f.onClick())};return()=>{const{prefixCls:u,title:c,onClose:d,cover:f,description:p,type:v,arrow:h}=e,m=e.prevButtonProps,b=e.nextButtonProps;let S;c&&(S=g("div",{class:`${u}-header`},[g("div",{class:`${u}-title`},[c])]));let C;p&&(C=g("div",{class:`${u}-description`},[p]));let $;f&&($=g("div",{class:`${u}-cover`},[f]));let x;o.indicatorsRender?x=o.indicatorsRender({current:r.value,total:i}):x=[...Array.from({length:i.value}).keys()].map((O,I)=>g("span",{key:O,class:ge(I===r.value&&`${u}-indicator-active`,`${u}-indicator`)},null));const P=v==="primary"?"default":"primary",w={type:"default",ghost:v==="primary"};return g(ts,{componentName:"Tour",defaultLocale:$o.Tour},{default:O=>{var I;return g("div",k(k({},n),{},{class:ge(v==="primary"?`${u}-primary`:"",n.class,`${u}-content`)}),[h&&g("div",{class:`${u}-arrow`,key:"arrow"},null),g("div",{class:`${u}-inner`},[g(fo,{class:`${u}-close`,onClick:d},null),$,S,C,g("div",{class:`${u}-footer`},[i.value>1&&g("div",{class:`${u}-indicators`},[x]),g("div",{class:`${u}-buttons`},[r.value!==0?g(Qt,k(k(k({},w),m),{},{onClick:l,size:"small",class:ge(`${u}-prev-btn`,m==null?void 0:m.className)}),{default:()=>[dy(m==null?void 0:m.children)?m.children():(I=m==null?void 0:m.children)!==null&&I!==void 0?I:O.Previous]}):null,g(Qt,k(k({type:P},b),{},{onClick:s,size:"small",class:ge(`${u}-next-btn`,b==null?void 0:b.className)}),{default:()=>[dy(b==null?void 0:b.children)?b==null?void 0:b.children():a.value?O.Finish:O.Next]})])])])])}})}}}),E0e=e=>{let{defaultType:t,steps:n,current:o,defaultCurrent:r}=e;const i=ae(r==null?void 0:r.value),a=E(()=>o==null?void 0:o.value);be(a,c=>{i.value=c??(r==null?void 0:r.value)},{immediate:!0});const l=c=>{i.value=c},s=E(()=>{var c,d;return typeof i.value=="number"?n&&((d=(c=n.value)===null||c===void 0?void 0:c[i.value])===null||d===void 0?void 0:d.type):t==null?void 0:t.value});return{currentMergedType:E(()=>{var c;return(c=s.value)!==null&&c!==void 0?c:t==null?void 0:t.value}),updateInnerCurrent:l}},_0e=e=>{const{componentCls:t,lineHeight:n,padding:o,paddingXS:r,borderRadius:i,borderRadiusXS:a,colorPrimary:l,colorText:s,colorFill:u,indicatorHeight:c,indicatorWidth:d,boxShadowTertiary:f,tourZIndexPopup:p,fontSize:v,colorBgContainer:h,fontWeightStrong:m,marginXS:b,colorTextLightSolid:S,tourBorderRadius:C,colorWhite:$,colorBgTextHover:x,tourCloseSize:P,motionDurationSlow:w,antCls:O}=e;return[{[t]:y(y({},qe(e)),{color:s,position:"absolute",zIndex:p,display:"block",visibility:"visible",fontSize:v,lineHeight:n,width:520,"--antd-arrow-background-color":h,"&-pure":{maxWidth:"100%",position:"relative"},[`&${t}-hidden`]:{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{textAlign:"start",textDecoration:"none",borderRadius:C,boxShadow:f,position:"relative",backgroundColor:h,border:"none",backgroundClip:"padding-box",[`${t}-close`]:{position:"absolute",top:o,insetInlineEnd:o,color:e.colorIcon,outline:"none",width:P,height:P,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?"transparent":e.colorFillContent}},[`${t}-cover`]:{textAlign:"center",padding:`${o+P+r}px ${o}px 0`,img:{width:"100%"}},[`${t}-header`]:{padding:`${o}px ${o}px ${r}px`,[`${t}-title`]:{lineHeight:n,fontSize:v,fontWeight:m}},[`${t}-description`]:{padding:`0 ${o}px`,lineHeight:n,wordWrap:"break-word"},[`${t}-footer`]:{padding:`${r}px ${o}px ${o}px`,textAlign:"end",borderRadius:`0 0 ${a}px ${a}px`,display:"flex",[`${t}-indicators`]:{display:"inline-block",[`${t}-indicator`]:{width:d,height:c,display:"inline-block",borderRadius:"50%",background:u,"&:not(:last-child)":{marginInlineEnd:c},"&-active":{background:l}}},[`${t}-buttons`]:{marginInlineStart:"auto",[`${O}-btn`]:{marginInlineStart:b}}}},[`${t}-primary, &${t}-primary`]:{"--antd-arrow-background-color":l,[`${t}-inner`]:{color:S,textAlign:"start",textDecoration:"none",backgroundColor:l,borderRadius:i,boxShadow:f,[`${t}-close`]:{color:S},[`${t}-indicators`]:{[`${t}-indicator`]:{background:new St(S).setAlpha(.15).toRgbString(),"&-active":{background:S}}},[`${t}-prev-btn`]:{color:S,borderColor:new St(S).setAlpha(.15).toRgbString(),backgroundColor:l,"&:hover":{backgroundColor:new St(S).setAlpha(.15).toRgbString(),borderColor:"transparent"}},[`${t}-next-btn`]:{color:l,borderColor:"transparent",background:$,"&:hover":{background:new St(x).onBackground($).toRgbString()}}}}}),[`${t}-mask`]:{[`${t}-placeholder-animated`]:{transition:`all ${w}`}},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:Math.min(C,FC)}}},BC(e,{colorBg:"var(--antd-arrow-background-color)",contentRadius:C,limitVerticalRadius:!0})]},M0e=Ue("Tour",e=>{const{borderRadiusLG:t,fontSize:n,lineHeight:o}=e,r=Be(e,{tourZIndexPopup:e.zIndexPopupBase+70,indicatorWidth:6,indicatorHeight:6,tourBorderRadius:t,tourCloseSize:n*o});return[_0e(r)]});var A0e=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{steps:h,current:m,type:b,rootClassName:S}=e,C=A0e(e,["steps","current","type","rootClassName"]),$=ge({[`${u.value}-primary`]:p.value==="primary",[`${u.value}-rtl`]:c.value==="rtl"},f.value,S),x=(O,I)=>g(T0e,k(k({},O),{},{type:b,current:I}),{indicatorsRender:r.indicatorsRender}),P=O=>{v(O),o("update:current",O),o("change",O)},w=E(()=>LC({arrowPointAtCenter:!0,autoAdjustOverflow:!0}));return d(g(P0e,k(k(k({},n),C),{},{rootClassName:$,prefixCls:u.value,current:m,defaultCurrent:e.defaultCurrent,animated:!0,renderPanel:x,onChange:P,steps:h,builtinPlacements:w.value}),null))}}}),D0e=Lt(R0e),QN=Symbol("appConfigContext"),N0e=e=>Xe(QN,e),k0e=()=>ze(QN,{}),e7=Symbol("appContext"),L0e=e=>Xe(e7,e),F0e=rt({message:{},notification:{},modal:{}}),B0e=()=>ze(e7,F0e),H0e=e=>{const{componentCls:t,colorText:n,fontSize:o,lineHeight:r,fontFamily:i}=e;return{[t]:{color:n,fontSize:o,lineHeight:r,fontFamily:i}}},z0e=Ue("App",e=>[H0e(e)]),j0e=()=>({rootClassName:String,message:De(),notification:De()}),W0e=()=>B0e(),dd=le({name:"AApp",props:Qe(j0e(),{}),setup(e,t){let{slots:n}=t;const{prefixCls:o}=Te("app",e),[r,i]=z0e(o),a=E(()=>ge(i.value,o.value,e.rootClassName)),l=k0e(),s=E(()=>({message:y(y({},l.message),e.message),notification:y(y({},l.notification),e.notification)}));N0e(s.value);const[u,c]=OR(s.value.message),[d,f]=FR(s.value.notification),[p,v]=zD(),h=E(()=>({message:u,notification:d,modal:p}));return L0e(h.value),()=>{var m;return r(g("div",{class:a.value},[v(),c(),f(),(m=n.default)===null||m===void 0?void 0:m.call(n)]))}}});dd.useApp=W0e;dd.install=function(e){e.component(dd.name,dd)};const t7=["wrap","nowrap","wrap-reverse"],n7=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],o7=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],V0e=(e,t)=>{const n={};return t7.forEach(o=>{n[`${e}-wrap-${o}`]=t.wrap===o}),n},K0e=(e,t)=>{const n={};return o7.forEach(o=>{n[`${e}-align-${o}`]=t.align===o}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},U0e=(e,t)=>{const n={};return n7.forEach(o=>{n[`${e}-justify-${o}`]=t.justify===o}),n};function G0e(e,t){return ge(y(y(y({},V0e(e,t)),K0e(e,t)),U0e(e,t)))}const X0e=e=>{const{componentCls:t}=e;return{[t]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},Y0e=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},q0e=e=>{const{componentCls:t}=e,n={};return t7.forEach(o=>{n[`${t}-wrap-${o}`]={flexWrap:o}}),n},J0e=e=>{const{componentCls:t}=e,n={};return o7.forEach(o=>{n[`${t}-align-${o}`]={alignItems:o}}),n},Z0e=e=>{const{componentCls:t}=e,n={};return n7.forEach(o=>{n[`${t}-justify-${o}`]={justifyContent:o}}),n},Q0e=Ue("Flex",e=>{const t=Be(e,{flexGapSM:e.paddingXS,flexGap:e.padding,flexGapLG:e.paddingLG});return[X0e(t),Y0e(t),q0e(t),J0e(t),Z0e(t)]});function eE(e){return["small","middle","large"].includes(e)}const ebe=()=>({prefixCls:Ne(),vertical:$e(),wrap:Ne(),justify:Ne(),align:Ne(),flex:He([Number,String]),gap:He([Number,String]),component:It()});var tbe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var c;return[a.value,s.value,G0e(a.value,e),{[`${a.value}-rtl`]:i.value==="rtl",[`${a.value}-gap-${e.gap}`]:eE(e.gap),[`${a.value}-vertical`]:(c=e.vertical)!==null&&c!==void 0?c:r==null?void 0:r.value.vertical}]});return()=>{var c;const{flex:d,gap:f,component:p="div"}=e,v=tbe(e,["flex","gap","component"]),h={};return d&&(h.flex=d),f&&!eE(f)&&(h.gap=`${f}px`),l(g(p,k({class:[o.class,u.value],style:[o.style,h]},it(v,["justify","wrap","align","vertical"])),{default:()=>[(c=n.default)===null||c===void 0?void 0:c.call(n)]}))}}}),obe=Lt(nbe),tE=Object.freeze(Object.defineProperty({__proto__:null,Affix:R6,Alert:eZ,Anchor:Cl,AnchorLink:GS,App:dd,AutoComplete:EJ,AutoCompleteOptGroup:TJ,AutoCompleteOption:IJ,Avatar:Al,AvatarGroup:th,BackTop:Ph,Badge:nd,BadgeRibbon:nh,Breadcrumb:Rl,BreadcrumbItem:zd,BreadcrumbSeparator:dh,Button:Qt,ButtonGroup:lh,Calendar:Mte,Card:ac,CardGrid:vh,CardMeta:hh,Carousel:moe,Cascader:Aie,CheckableTag:Ch,Checkbox:gr,CheckboxGroup:yh,Col:Fie,Collapse:rd,CollapsePanel:mh,Comment:Wie,Compact:Qg,ConfigProvider:Nl,DatePicker:ale,Descriptions:Bs,DescriptionsItem:QR,DirectoryTree:hg,Divider:yle,Drawer:Dle,Dropdown:zr,DropdownButton:Hd,Empty:Oa,Flex:obe,FloatButton:ka,FloatButtonGroup:wh,Form:Ia,FormItem:bR,FormItemRest:qg,Grid:Lie,Image:$l,ImagePreviewGroup:xD,Input:Cn,InputGroup:cD,InputNumber:dce,InputPassword:fD,InputSearch:uD,Layout:wce,LayoutContent:$ce,LayoutFooter:Cce,LayoutHeader:Sce,LayoutSider:xce,List:ba,ListItem:ID,ListItemMeta:PD,LocaleProvider:xR,Mentions:Mue,MentionsOption:dg,Menu:on,MenuDivider:Wd,MenuItem:ui,MenuItemGroup:jd,Modal:Tn,MonthPicker:ng,PageHeader:lde,Pagination:Cm,Popconfirm:pde,Popover:HC,Progress:a$,QRCode:p0e,QuarterPicker:og,Radio:bo,RadioButton:ph,RadioGroup:hx,RangePicker:rg,Rate:efe,Result:Ll,Row:vfe,Segmented:e0e,Select:Fn,SelectOptGroup:wJ,SelectOption:$J,Skeleton:no,SkeletonAvatar:Px,SkeletonButton:xx,SkeletonImage:wx,SkeletonInput:$x,SkeletonTitle:nm,Slider:Rfe,Space:uc,Spin:di,Statistic:Li,StatisticCountdown:Gue,Step:fg,Steps:Jfe,SubMenu:Ul,Switch:lpe,TabPane:gh,Table:yhe,TableColumn:mg,TableColumnGroup:bg,TableSummary:yg,TableSummaryCell:Rh,TableSummaryRow:Ah,Tabs:Dl,Tag:cc,Textarea:Vx,TimePicker:gve,TimeRangePicker:Sg,Timeline:ud,TimelineItem:Yd,Tooltip:Ro,Tour:D0e,Transfer:jhe,Tree:PN,TreeNode:vg,TreeSelect:fve,TreeSelectNode:L1,Typography:Ao,TypographyLink:au,TypographyParagraph:lu,TypographyText:su,TypographyTitle:cu,Upload:Fme,UploadDragger:Lme,Watermark:Ume,WeekPicker:tg,message:Gl,notification:Ha},Symbol.toStringTag,{value:"Module"})),rbe=function(e){return Object.keys(tE).forEach(t=>{const n=tE[t];n.install&&e.use(n)}),e.use(IH.StyleProvider),e.config.globalProperties.$message=Gl,e.config.globalProperties.$notification=Ha,e.config.globalProperties.$info=Tn.info,e.config.globalProperties.$success=Tn.success,e.config.globalProperties.$error=Tn.error,e.config.globalProperties.$warning=Tn.warning,e.config.globalProperties.$confirm=Tn.confirm,e.config.globalProperties.$destroyAll=Tn.destroyAll,e},ibe={version:C6,install:rbe};/*! + */var dr;(function(e){class t{static encodeText(l,s){const u=e.QrSegment.makeSegments(l);return t.encodeSegments(u,s)}static encodeBinary(l,s){const u=e.QrSegment.makeBytes(l);return t.encodeSegments([u],s)}static encodeSegments(l,s){let u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(t.MIN_VERSION<=u&&u<=c&&c<=t.MAX_VERSION)||d<-1||d>7)throw new RangeError("Invalid value");let p,v;for(p=u;;p++){const S=t.getNumDataCodewords(p,s)*8,C=i.getTotalBits(l,p);if(C<=S){v=C;break}if(p>=c)throw new RangeError("Data too long")}for(const S of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])f&&v<=t.getNumDataCodewords(p,S)*8&&(s=S);const h=[];for(const S of l){n(S.mode.modeBits,4,h),n(S.numChars,S.mode.numCharCountBits(p),h);for(const C of S.getData())h.push(C)}r(h.length==v);const m=t.getNumDataCodewords(p,s)*8;r(h.length<=m),n(0,Math.min(4,m-h.length),h),n(0,(8-h.length%8)%8,h),r(h.length%8==0);for(let S=236;h.lengthb[C>>>3]|=S<<7-(C&7)),new t(p,s,b,d)}constructor(l,s,u,c){if(this.version=l,this.errorCorrectionLevel=s,this.modules=[],this.isFunction=[],lt.MAX_VERSION)throw new RangeError("Version value out of range");if(c<-1||c>7)throw new RangeError("Mask value out of range");this.size=l*4+17;const d=[];for(let p=0;p>>9)*1335;const c=(s<<10|u)^21522;r(c>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,o(c,d));this.setFunctionModule(8,7,o(c,6)),this.setFunctionModule(8,8,o(c,7)),this.setFunctionModule(7,8,o(c,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,o(c,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,o(c,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,o(c,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let l=this.version;for(let u=0;u<12;u++)l=l<<1^(l>>>11)*7973;const s=this.version<<12|l;r(s>>>18==0);for(let u=0;u<18;u++){const c=o(s,u),d=this.size-11+u%3,f=Math.floor(u/3);this.setFunctionModule(d,f,c),this.setFunctionModule(f,d,c)}}drawFinderPattern(l,s){for(let u=-4;u<=4;u++)for(let c=-4;c<=4;c++){const d=Math.max(Math.abs(c),Math.abs(u)),f=l+c,p=s+u;0<=f&&f{(S!=v-d||$>=p)&&b.push(C[S])});return r(b.length==f),b}drawCodewords(l){if(l.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let s=0;for(let u=this.size-1;u>=1;u-=2){u==6&&(u=5);for(let c=0;c>>3],7-(s&7)),s++)}}r(s==l.length*8)}applyMask(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(let s=0;s5&&l++):(this.finderPenaltyAddHistory(p,v),f||(l+=this.finderPenaltyCountPatterns(v)*t.PENALTY_N3),f=this.modules[d][h],p=1);l+=this.finderPenaltyTerminateAndCount(f,p,v)*t.PENALTY_N3}for(let d=0;d5&&l++):(this.finderPenaltyAddHistory(p,v),f||(l+=this.finderPenaltyCountPatterns(v)*t.PENALTY_N3),f=this.modules[h][d],p=1);l+=this.finderPenaltyTerminateAndCount(f,p,v)*t.PENALTY_N3}for(let d=0;df+(p?1:0),s);const u=this.size*this.size,c=Math.ceil(Math.abs(s*20-u*10)/u)-1;return r(0<=c&&c<=9),l+=c*t.PENALTY_N4,r(0<=l&&l<=2568888),l}getAlignmentPatternPositions(){if(this.version==1)return[];{const l=Math.floor(this.version/7)+2,s=this.version==32?26:Math.ceil((this.version*4+4)/(l*2-2))*2,u=[6];for(let c=this.size-7;u.lengtht.MAX_VERSION)throw new RangeError("Version number out of range");let s=(16*l+128)*l+64;if(l>=2){const u=Math.floor(l/7)+2;s-=(25*u-10)*u-55,l>=7&&(s-=36)}return r(208<=s&&s<=29648),s}static getNumDataCodewords(l,s){return Math.floor(t.getNumRawDataModules(l)/8)-t.ECC_CODEWORDS_PER_BLOCK[s.ordinal][l]*t.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][l]}static reedSolomonComputeDivisor(l){if(l<1||l>255)throw new RangeError("Degree out of range");const s=[];for(let c=0;c0);for(const c of l){const d=c^u.shift();u.push(0),s.forEach((f,p)=>u[p]^=t.reedSolomonMultiply(f,d))}return u}static reedSolomonMultiply(l,s){if(l>>>8||s>>>8)throw new RangeError("Byte out of range");let u=0;for(let c=7;c>=0;c--)u=u<<1^(u>>>7)*285,u^=(s>>>c&1)*l;return r(u>>>8==0),u}finderPenaltyCountPatterns(l){const s=l[1];r(s<=this.size*3);const u=s>0&&l[2]==s&&l[3]==s*3&&l[4]==s&&l[5]==s;return(u&&l[0]>=s*4&&l[6]>=s?1:0)+(u&&l[6]>=s*4&&l[0]>=s?1:0)}finderPenaltyTerminateAndCount(l,s,u){return l&&(this.finderPenaltyAddHistory(s,u),s=0),s+=this.size,this.finderPenaltyAddHistory(s,u),this.finderPenaltyCountPatterns(u)}finderPenaltyAddHistory(l,s){s[0]==0&&(l+=this.size),s.pop(),s.unshift(l)}}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(a,l,s){if(l<0||l>31||a>>>l)throw new RangeError("Value out of range");for(let u=l-1;u>=0;u--)s.push(a>>>u&1)}function o(a,l){return(a>>>l&1)!=0}function r(a){if(!a)throw new Error("Assertion error")}class i{static makeBytes(l){const s=[];for(const u of l)n(u,8,s);return new i(i.Mode.BYTE,l.length,s)}static makeNumeric(l){if(!i.isNumeric(l))throw new RangeError("String contains non-numeric characters");const s=[];for(let u=0;u=1<1&&arguments[1]!==void 0?arguments[1]:0;const n=[];return e.forEach(function(o,r){let i=null;o.forEach(function(a,l){if(!a&&i!==null){n.push(`M${i+t} ${r+t}h${l-i}v1H${i+t}z`),i=null;return}if(l===o.length-1){if(!a)return;i===null?n.push(`M${l+t},${r+t} h1v1H${l+t}z`):n.push(`M${i+t},${r+t} h${l+1-i}v1H${i+t}z`);return}a&&i===null&&(i=l)})}),n.join("")}function XN(e,t){return e.slice().map((n,o)=>o=t.y+t.h?n:n.map((r,i)=>i=t.x+t.w?r:!1))}function YN(e,t,n,o){if(o==null)return null;const r=e.length+n*2,i=Math.floor(t*s0e),a=r/t,l=(o.width||i)*a,s=(o.height||i)*a,u=o.x==null?e.length/2-l/2:o.x*a,c=o.y==null?e.length/2-s/2:o.y*a;let d=null;if(o.excavate){const f=Math.floor(u),p=Math.floor(c),v=Math.ceil(l+u-f),h=Math.ceil(s+c-p);d={x:f,y:p,w:v,h}}return{x:u,y:c,h:s,w:l,excavation:d}}function qN(e,t){return t!=null?Math.floor(t):e?a0e:l0e}const c0e=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),u0e=le({name:"QRCodeCanvas",inheritAttrs:!1,props:y(y({},R$()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(e,t){let{attrs:n,expose:o}=t;const r=E(()=>{var s;return(s=e.imageSettings)===null||s===void 0?void 0:s.src}),i=se(null),a=se(null),l=se(!1);return o({toDataURL:(s,u)=>{var c;return(c=i.value)===null||c===void 0?void 0:c.toDataURL(s,u)}}),Ve(()=>{const{value:s,size:u=F1,level:c=WN,bgColor:d=VN,fgColor:f=KN,includeMargin:p=UN,marginSize:v,imageSettings:h}=e;if(i.value!=null){const m=i.value,b=m.getContext("2d");if(!b)return;let S=dr.QrCode.encodeText(s,jN[c]).getModules();const C=qN(p,v),$=S.length+C*2,x=YN(S,u,C,h),P=a.value,w=l.value&&x!=null&&P!==null&&P.complete&&P.naturalHeight!==0&&P.naturalWidth!==0;w&&x.excavation!=null&&(S=XN(S,x.excavation));const O=window.devicePixelRatio||1;m.height=m.width=u*O;const I=u/$*O;b.scale(I,I),b.fillStyle=d,b.fillRect(0,0,$,$),b.fillStyle=f,c0e?b.fill(new Path2D(GN(S,C))):S.forEach(function(_,T){_.forEach(function(A,R){A&&b.fillRect(R+C,T+C,1,1)})}),w&&b.drawImage(P,x.x+C,x.y+C,x.w,x.h)}},{flush:"post"}),be(r,()=>{l.value=!1}),()=>{var s;const u=(s=e.size)!==null&&s!==void 0?s:F1,c={height:`${u}px`,width:`${u}px`};let d=null;return r.value!=null&&(d=g("img",{src:r.value,key:r.value,style:{display:"none"},onLoad:()=>{l.value=!0},ref:a},null)),g(Le,null,[g("canvas",k(k({},n),{},{style:[c,n.style],ref:i}),null),d])}}}),d0e=le({name:"QRCodeSVG",inheritAttrs:!1,props:y(y({},R$()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(e){let t=null,n=null,o=null,r=null,i=null,a=null;return Ve(()=>{const{value:l,size:s=F1,level:u=WN,includeMargin:c=UN,marginSize:d,imageSettings:f}=e;t=dr.QrCode.encodeText(l,jN[u]).getModules(),n=qN(c,d),o=t.length+n*2,r=YN(t,s,n,f),f!=null&&r!=null&&(r.excavation!=null&&(t=XN(t,r.excavation)),a=g("image",{"xlink:href":f.src,height:r.h,width:r.w,x:r.x+n,y:r.y+n,preserveAspectRatio:"none"},null)),i=GN(t,n)}),()=>{const l=e.bgColor&&VN,s=e.fgColor&&KN;return g("svg",{height:e.size,width:e.size,viewBox:`0 0 ${o} ${o}`},[!!e.title&&g("title",null,[e.title]),g("path",{fill:l,d:`M0,0 h${o}v${o}H0z`,"shape-rendering":"crispEdges"},null),g("path",{fill:s,d:i,"shape-rendering":"crispEdges"},null),a])}}}),f0e=le({name:"AQrcode",inheritAttrs:!1,props:i0e(),emits:["refresh"],setup(e,t){let{emit:n,attrs:o,expose:r}=t;const[i]=wr("QRCode"),{prefixCls:a}=Te("qrcode",e),[l,s]=n0e(a),[,u]=na(),c=ae();r({toDataURL:(f,p)=>{var v;return(v=c.value)===null||v===void 0?void 0:v.toDataURL(f,p)}});const d=E(()=>{const{value:f,icon:p="",size:v=160,iconSize:h=40,color:m=u.value.colorText,bgColor:b="transparent",errorLevel:S="M"}=e,C={src:p,x:void 0,y:void 0,height:h,width:h,excavate:!0};return{value:f,size:v-(u.value.paddingSM+u.value.lineWidth)*2,level:S,bgColor:b,fgColor:m,imageSettings:p?C:void 0}});return()=>{const f=a.value;return l(g("div",k(k({},o),{},{style:[o.style,{width:`${e.size}px`,height:`${e.size}px`,backgroundColor:d.value.bgColor}],class:[s.value,f,{[`${f}-borderless`]:!e.bordered}]}),[e.status!=="active"&&g("div",{class:`${f}-mask`},[e.status==="loading"&&g(di,null,null),e.status==="expired"&&g(Le,null,[g("p",{class:`${f}-expired`},[i.value.expired]),g(Qt,{type:"link",onClick:p=>n("refresh",p)},{default:()=>[i.value.refresh],icon:()=>g(A$,null,null)})]),e.status==="scanned"&&g("p",{class:`${f}-scanned`},[i.value.scanned])]),e.type==="canvas"?g(u0e,k({ref:c},d.value),null):g(d0e,d.value,null)]))}}}),p0e=Lt(f0e);function g0e(e){const t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:o,right:r,bottom:i,left:a}=e.getBoundingClientRect();return o>=0&&a>=0&&r<=t&&i<=n}function h0e(e,t,n,o){const[r,i]=$t(void 0);Ve(()=>{const c=typeof e.value=="function"?e.value():e.value;i(c||null)},{flush:"post"});const[a,l]=$t(null),s=()=>{if(!t.value){l(null);return}if(r.value){!g0e(r.value)&&t.value&&r.value.scrollIntoView(o.value);const{left:c,top:d,width:f,height:p}=r.value.getBoundingClientRect(),v={left:c,top:d,width:f,height:p,radius:0};JSON.stringify(a.value)!==JSON.stringify(v)&&l(v)}else l(null)};return Ke(()=>{be([t,r],()=>{s()},{flush:"post",immediate:!0}),window.addEventListener("resize",s)}),tt(()=>{window.removeEventListener("resize",s)}),[E(()=>{var c,d;if(!a.value)return a.value;const f=((c=n.value)===null||c===void 0?void 0:c.offset)||6,p=((d=n.value)===null||d===void 0?void 0:d.radius)||2;return{left:a.value.left-f,top:a.value.top-f,width:a.value.width+f*2,height:a.value.height+f*2,radius:p}}),r]}const v0e=()=>({arrow:He([Boolean,Object]),target:He([String,Function,Object]),title:He([String,Object]),description:He([String,Object]),placement:Ne(),mask:He([Object,Boolean],!0),className:{type:String},style:De(),scrollIntoViewOptions:He([Boolean,Object])}),D$=()=>y(y({},v0e()),{prefixCls:{type:String},total:{type:Number},current:{type:Number},onClose:ye(),onFinish:ye(),renderPanel:ye(),onPrev:ye(),onNext:ye()}),m0e=le({name:"DefaultPanel",inheritAttrs:!1,props:D$(),setup(e,t){let{attrs:n}=t;return()=>{const{prefixCls:o,current:r,total:i,title:a,description:l,onClose:s,onPrev:u,onNext:c,onFinish:d}=e;return g("div",k(k({},n),{},{class:ge(`${o}-content`,n.class)}),[g("div",{class:`${o}-inner`},[g("button",{type:"button",onClick:s,"aria-label":"Close",class:`${o}-close`},[g("span",{class:`${o}-close-x`},[zn("×")])]),g("div",{class:`${o}-header`},[g("div",{class:`${o}-title`},[a])]),g("div",{class:`${o}-description`},[l]),g("div",{class:`${o}-footer`},[g("div",{class:`${o}-sliders`},[i>1?[...Array.from({length:i}).keys()].map((f,p)=>g("span",{key:f,class:p===r?"active":""},null)):null]),g("div",{class:`${o}-buttons`},[r!==0?g("button",{class:`${o}-prev-btn`,onClick:u},[zn("Prev")]):null,r===i-1?g("button",{class:`${o}-finish-btn`,onClick:d},[zn("Finish")]):g("button",{class:`${o}-next-btn`,onClick:c},[zn("Next")])])])])])}}}),b0e=le({name:"TourStep",inheritAttrs:!1,props:D$(),setup(e,t){let{attrs:n}=t;return()=>{const{current:o,renderPanel:r}=e;return g(Le,null,[typeof r=="function"?r(y(y({},n),e),o):g(m0e,k(k({},n),e),null)])}}});let Z4=0;const y0e=so();function S0e(){let e;return y0e?(e=Z4,Z4+=1):e="TEST_OR_SSR",e}function C0e(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ae("");const t=`vc_unique_${S0e()}`;return e.value||t}const $p={fill:"transparent","pointer-events":"auto"},x0e=le({name:"TourMask",props:{prefixCls:{type:String},pos:De(),rootClassName:{type:String},showMask:$e(),fill:{type:String,default:"rgba(0,0,0,0.5)"},open:$e(),animated:He([Boolean,Object]),zIndex:{type:Number}},setup(e,t){let{attrs:n}=t;const o=C0e();return()=>{const{prefixCls:r,open:i,rootClassName:a,pos:l,showMask:s,fill:u,animated:c,zIndex:d}=e,f=`${r}-mask-${o}`,p=typeof c=="object"?c==null?void 0:c.placeholder:c;return g(gf,{visible:i,autoLock:!0},{default:()=>i&&g("div",k(k({},n),{},{class:ge(`${r}-mask`,a,n.class),style:[{position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:d,pointerEvents:"none"},n.style]}),[s?g("svg",{style:{width:"100%",height:"100%"}},[g("defs",null,[g("mask",{id:f},[g("rect",{x:"0",y:"0",width:"100vw",height:"100vh",fill:"white"},null),l&&g("rect",{x:l.left,y:l.top,rx:l.radius,width:l.width,height:l.height,fill:"black",class:p?`${r}-placeholder-animated`:""},null)])]),g("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:u,mask:`url(#${f})`},null),l&&g(Le,null,[g("rect",k(k({},$p),{},{x:"0",y:"0",width:"100%",height:l.top}),null),g("rect",k(k({},$p),{},{x:"0",y:"0",width:l.left,height:"100%"}),null),g("rect",k(k({},$p),{},{x:"0",y:l.top+l.height,width:"100%",height:`calc(100vh - ${l.top+l.height}px)`}),null),g("rect",k(k({},$p),{},{x:l.left+l.width,y:"0",width:`calc(100vw - ${l.left+l.width}px)`,height:"100%"}),null)])]):null])})}}}),$0e=[0,0],Q4={left:{points:["cr","cl"],offset:[-8,0]},right:{points:["cl","cr"],offset:[8,0]},top:{points:["bc","tc"],offset:[0,-8]},bottom:{points:["tc","bc"],offset:[0,8]},topLeft:{points:["bl","tl"],offset:[0,-8]},leftTop:{points:["tr","tl"],offset:[-8,0]},topRight:{points:["br","tr"],offset:[0,-8]},rightTop:{points:["tl","tr"],offset:[8,0]},bottomRight:{points:["tr","br"],offset:[0,8]},rightBottom:{points:["bl","br"],offset:[8,0]},bottomLeft:{points:["tl","bl"],offset:[0,8]},leftBottom:{points:["br","bl"],offset:[-8,0]}};function JN(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const t={};return Object.keys(Q4).forEach(n=>{t[n]=y(y({},Q4[n]),{autoArrow:e,targetOffset:$0e})}),t}JN();var w0e=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{builtinPlacements:e,popupAlign:t}=X6();return{builtinPlacements:e,popupAlign:t,steps:pt(),open:$e(),defaultCurrent:{type:Number},current:{type:Number},onChange:ye(),onClose:ye(),onFinish:ye(),mask:He([Boolean,Object],!0),arrow:He([Boolean,Object],!0),rootClassName:{type:String},placement:Ne("bottom"),prefixCls:{type:String,default:"rc-tour"},renderPanel:ye(),gap:De(),animated:He([Boolean,Object]),scrollIntoViewOptions:He([Boolean,Object],!0),zIndex:{type:Number,default:1001}}},P0e=le({name:"Tour",inheritAttrs:!1,props:Qe(ZN(),{}),setup(e){const{defaultCurrent:t,placement:n,mask:o,scrollIntoViewOptions:r,open:i,gap:a,arrow:l}=Fr(e),s=ae(),[u,c]=Dt(0,{value:E(()=>e.current),defaultValue:t.value}),[d,f]=Dt(void 0,{value:E(()=>e.open),postState:w=>u.value<0||u.value>=e.steps.length?!1:w??!0}),p=se(d.value);Ve(()=>{d.value&&!p.value&&c(0),p.value=d.value});const v=E(()=>e.steps[u.value]||{}),h=E(()=>{var w;return(w=v.value.placement)!==null&&w!==void 0?w:n.value}),m=E(()=>{var w;return d.value&&((w=v.value.mask)!==null&&w!==void 0?w:o.value)}),b=E(()=>{var w;return(w=v.value.scrollIntoViewOptions)!==null&&w!==void 0?w:r.value}),[S,C]=h0e(E(()=>v.value.target),i,a,b),$=E(()=>C.value?typeof v.value.arrow>"u"?l.value:v.value.arrow:!1),x=E(()=>typeof $.value=="object"?$.value.pointAtCenter:!1);be(x,()=>{var w;(w=s.value)===null||w===void 0||w.forcePopupAlign()}),be(u,()=>{var w;(w=s.value)===null||w===void 0||w.forcePopupAlign()});const P=w=>{var O;c(w),(O=e.onChange)===null||O===void 0||O.call(e,w)};return()=>{var w;const{prefixCls:O,steps:I,onClose:_,onFinish:T,rootClassName:A,renderPanel:R,animated:H,zIndex:M}=e,D=w0e(e,["prefixCls","steps","onClose","onFinish","rootClassName","renderPanel","animated","zIndex"]);if(C.value===void 0)return null;const N=()=>{f(!1),_==null||_(u.value)},L=typeof m.value=="boolean"?m.value:!!m.value,F=typeof m.value=="boolean"?void 0:m.value,B=()=>C.value||document.body,j=()=>g(b0e,k({arrow:$.value,key:"content",prefixCls:O,total:I.length,renderPanel:R,onPrev:()=>{P(u.value-1)},onNext:()=>{P(u.value+1)},onClose:N,current:u.value,onFinish:()=>{N(),T==null||T()}},v.value),null),z=E(()=>{const G=S.value||$b,Q={};return Object.keys(G).forEach(Y=>{typeof G[Y]=="number"?Q[Y]=`${G[Y]}px`:Q[Y]=G[Y]}),Q});return d.value?g(Le,null,[g(x0e,{zIndex:M,prefixCls:O,pos:S.value,showMask:L,style:F==null?void 0:F.style,fill:F==null?void 0:F.color,open:d.value,animated:H,rootClassName:A},null),g(ss,k(k({},D),{},{arrow:!!D.arrow,builtinPlacements:v.value.target?(w=D.builtinPlacements)!==null&&w!==void 0?w:JN(x.value):void 0,ref:s,popupStyle:v.value.target?v.value.style:y(y({},v.value.style),{position:"fixed",left:$b.left,top:$b.top,transform:"translate(-50%, -50%)"}),popupPlacement:h.value,popupVisible:d.value,popupClassName:ge(A,v.value.className),prefixCls:O,popup:j,forceRender:!1,destroyPopupOnHide:!0,zIndex:M,mask:!1,getTriggerDOMNode:B}),{default:()=>[g(gf,{visible:d.value,autoLock:!0},{default:()=>[g("div",{class:ge(A,`${O}-target-placeholder`),style:y(y({},z.value),{position:"fixed",pointerEvents:"none"})},null)]})]})]):null}}}),O0e=()=>y(y({},ZN()),{steps:{type:Array},prefixCls:{type:String},current:{type:Number},type:{type:String},"onUpdate:current":Function}),I0e=()=>y(y({},D$()),{cover:{type:Object},nextButtonProps:{type:Object},prevButtonProps:{type:Object},current:{type:Number},type:{type:String}}),T0e=le({name:"ATourPanel",inheritAttrs:!1,props:I0e(),setup(e,t){let{attrs:n,slots:o}=t;const{current:r,total:i}=Fr(e),a=E(()=>r.value===i.value-1),l=u=>{var c;const d=e.prevButtonProps;(c=e.onPrev)===null||c===void 0||c.call(e,u),typeof(d==null?void 0:d.onClick)=="function"&&(d==null||d.onClick())},s=u=>{var c,d;const f=e.nextButtonProps;a.value?(c=e.onFinish)===null||c===void 0||c.call(e,u):(d=e.onNext)===null||d===void 0||d.call(e,u),typeof(f==null?void 0:f.onClick)=="function"&&(f==null||f.onClick())};return()=>{const{prefixCls:u,title:c,onClose:d,cover:f,description:p,type:v,arrow:h}=e,m=e.prevButtonProps,b=e.nextButtonProps;let S;c&&(S=g("div",{class:`${u}-header`},[g("div",{class:`${u}-title`},[c])]));let C;p&&(C=g("div",{class:`${u}-description`},[p]));let $;f&&($=g("div",{class:`${u}-cover`},[f]));let x;o.indicatorsRender?x=o.indicatorsRender({current:r.value,total:i}):x=[...Array.from({length:i.value}).keys()].map((O,I)=>g("span",{key:O,class:ge(I===r.value&&`${u}-indicator-active`,`${u}-indicator`)},null));const P=v==="primary"?"default":"primary",w={type:"default",ghost:v==="primary"};return g(ts,{componentName:"Tour",defaultLocale:$o.Tour},{default:O=>{var I;return g("div",k(k({},n),{},{class:ge(v==="primary"?`${u}-primary`:"",n.class,`${u}-content`)}),[h&&g("div",{class:`${u}-arrow`,key:"arrow"},null),g("div",{class:`${u}-inner`},[g(fo,{class:`${u}-close`,onClick:d},null),$,S,C,g("div",{class:`${u}-footer`},[i.value>1&&g("div",{class:`${u}-indicators`},[x]),g("div",{class:`${u}-buttons`},[r.value!==0?g(Qt,k(k(k({},w),m),{},{onClick:l,size:"small",class:ge(`${u}-prev-btn`,m==null?void 0:m.className)}),{default:()=>[dy(m==null?void 0:m.children)?m.children():(I=m==null?void 0:m.children)!==null&&I!==void 0?I:O.Previous]}):null,g(Qt,k(k({type:P},b),{},{onClick:s,size:"small",class:ge(`${u}-next-btn`,b==null?void 0:b.className)}),{default:()=>[dy(b==null?void 0:b.children)?b==null?void 0:b.children():a.value?O.Finish:O.Next]})])])])])}})}}}),E0e=e=>{let{defaultType:t,steps:n,current:o,defaultCurrent:r}=e;const i=ae(r==null?void 0:r.value),a=E(()=>o==null?void 0:o.value);be(a,c=>{i.value=c??(r==null?void 0:r.value)},{immediate:!0});const l=c=>{i.value=c},s=E(()=>{var c,d;return typeof i.value=="number"?n&&((d=(c=n.value)===null||c===void 0?void 0:c[i.value])===null||d===void 0?void 0:d.type):t==null?void 0:t.value});return{currentMergedType:E(()=>{var c;return(c=s.value)!==null&&c!==void 0?c:t==null?void 0:t.value}),updateInnerCurrent:l}},_0e=e=>{const{componentCls:t,lineHeight:n,padding:o,paddingXS:r,borderRadius:i,borderRadiusXS:a,colorPrimary:l,colorText:s,colorFill:u,indicatorHeight:c,indicatorWidth:d,boxShadowTertiary:f,tourZIndexPopup:p,fontSize:v,colorBgContainer:h,fontWeightStrong:m,marginXS:b,colorTextLightSolid:S,tourBorderRadius:C,colorWhite:$,colorBgTextHover:x,tourCloseSize:P,motionDurationSlow:w,antCls:O}=e;return[{[t]:y(y({},qe(e)),{color:s,position:"absolute",zIndex:p,display:"block",visibility:"visible",fontSize:v,lineHeight:n,width:520,"--antd-arrow-background-color":h,"&-pure":{maxWidth:"100%",position:"relative"},[`&${t}-hidden`]:{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{textAlign:"start",textDecoration:"none",borderRadius:C,boxShadow:f,position:"relative",backgroundColor:h,border:"none",backgroundClip:"padding-box",[`${t}-close`]:{position:"absolute",top:o,insetInlineEnd:o,color:e.colorIcon,outline:"none",width:P,height:P,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?"transparent":e.colorFillContent}},[`${t}-cover`]:{textAlign:"center",padding:`${o+P+r}px ${o}px 0`,img:{width:"100%"}},[`${t}-header`]:{padding:`${o}px ${o}px ${r}px`,[`${t}-title`]:{lineHeight:n,fontSize:v,fontWeight:m}},[`${t}-description`]:{padding:`0 ${o}px`,lineHeight:n,wordWrap:"break-word"},[`${t}-footer`]:{padding:`${r}px ${o}px ${o}px`,textAlign:"end",borderRadius:`0 0 ${a}px ${a}px`,display:"flex",[`${t}-indicators`]:{display:"inline-block",[`${t}-indicator`]:{width:d,height:c,display:"inline-block",borderRadius:"50%",background:u,"&:not(:last-child)":{marginInlineEnd:c},"&-active":{background:l}}},[`${t}-buttons`]:{marginInlineStart:"auto",[`${O}-btn`]:{marginInlineStart:b}}}},[`${t}-primary, &${t}-primary`]:{"--antd-arrow-background-color":l,[`${t}-inner`]:{color:S,textAlign:"start",textDecoration:"none",backgroundColor:l,borderRadius:i,boxShadow:f,[`${t}-close`]:{color:S},[`${t}-indicators`]:{[`${t}-indicator`]:{background:new St(S).setAlpha(.15).toRgbString(),"&-active":{background:S}}},[`${t}-prev-btn`]:{color:S,borderColor:new St(S).setAlpha(.15).toRgbString(),backgroundColor:l,"&:hover":{backgroundColor:new St(S).setAlpha(.15).toRgbString(),borderColor:"transparent"}},[`${t}-next-btn`]:{color:l,borderColor:"transparent",background:$,"&:hover":{background:new St(x).onBackground($).toRgbString()}}}}}),[`${t}-mask`]:{[`${t}-placeholder-animated`]:{transition:`all ${w}`}},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:Math.min(C,FC)}}},BC(e,{colorBg:"var(--antd-arrow-background-color)",contentRadius:C,limitVerticalRadius:!0})]},M0e=Ue("Tour",e=>{const{borderRadiusLG:t,fontSize:n,lineHeight:o}=e,r=Be(e,{tourZIndexPopup:e.zIndexPopupBase+70,indicatorWidth:6,indicatorHeight:6,tourBorderRadius:t,tourCloseSize:n*o});return[_0e(r)]});var A0e=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{steps:h,current:m,type:b,rootClassName:S}=e,C=A0e(e,["steps","current","type","rootClassName"]),$=ge({[`${u.value}-primary`]:p.value==="primary",[`${u.value}-rtl`]:c.value==="rtl"},f.value,S),x=(O,I)=>g(T0e,k(k({},O),{},{type:b,current:I}),{indicatorsRender:r.indicatorsRender}),P=O=>{v(O),o("update:current",O),o("change",O)},w=E(()=>LC({arrowPointAtCenter:!0,autoAdjustOverflow:!0}));return d(g(P0e,k(k(k({},n),C),{},{rootClassName:$,prefixCls:u.value,current:m,defaultCurrent:e.defaultCurrent,animated:!0,renderPanel:x,onChange:P,steps:h,builtinPlacements:w.value}),null))}}}),D0e=Lt(R0e),QN=Symbol("appConfigContext"),N0e=e=>Xe(QN,e),k0e=()=>ze(QN,{}),e7=Symbol("appContext"),L0e=e=>Xe(e7,e),F0e=rt({message:{},notification:{},modal:{}}),B0e=()=>ze(e7,F0e),H0e=e=>{const{componentCls:t,colorText:n,fontSize:o,lineHeight:r,fontFamily:i}=e;return{[t]:{color:n,fontSize:o,lineHeight:r,fontFamily:i}}},z0e=Ue("App",e=>[H0e(e)]),j0e=()=>({rootClassName:String,message:De(),notification:De()}),W0e=()=>B0e(),dd=le({name:"AApp",props:Qe(j0e(),{}),setup(e,t){let{slots:n}=t;const{prefixCls:o}=Te("app",e),[r,i]=z0e(o),a=E(()=>ge(i.value,o.value,e.rootClassName)),l=k0e(),s=E(()=>({message:y(y({},l.message),e.message),notification:y(y({},l.notification),e.notification)}));N0e(s.value);const[u,c]=OR(s.value.message),[d,f]=FR(s.value.notification),[p,v]=zD(),h=E(()=>({message:u,notification:d,modal:p}));return L0e(h.value),()=>{var m;return r(g("div",{class:a.value},[v(),c(),f(),(m=n.default)===null||m===void 0?void 0:m.call(n)]))}}});dd.useApp=W0e;dd.install=function(e){e.component(dd.name,dd)};const t7=["wrap","nowrap","wrap-reverse"],n7=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],o7=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],V0e=(e,t)=>{const n={};return t7.forEach(o=>{n[`${e}-wrap-${o}`]=t.wrap===o}),n},K0e=(e,t)=>{const n={};return o7.forEach(o=>{n[`${e}-align-${o}`]=t.align===o}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},U0e=(e,t)=>{const n={};return n7.forEach(o=>{n[`${e}-justify-${o}`]=t.justify===o}),n};function G0e(e,t){return ge(y(y(y({},V0e(e,t)),K0e(e,t)),U0e(e,t)))}const X0e=e=>{const{componentCls:t}=e;return{[t]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},Y0e=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},q0e=e=>{const{componentCls:t}=e,n={};return t7.forEach(o=>{n[`${t}-wrap-${o}`]={flexWrap:o}}),n},J0e=e=>{const{componentCls:t}=e,n={};return o7.forEach(o=>{n[`${t}-align-${o}`]={alignItems:o}}),n},Z0e=e=>{const{componentCls:t}=e,n={};return n7.forEach(o=>{n[`${t}-justify-${o}`]={justifyContent:o}}),n},Q0e=Ue("Flex",e=>{const t=Be(e,{flexGapSM:e.paddingXS,flexGap:e.padding,flexGapLG:e.paddingLG});return[X0e(t),Y0e(t),q0e(t),J0e(t),Z0e(t)]});function eE(e){return["small","middle","large"].includes(e)}const ebe=()=>({prefixCls:Ne(),vertical:$e(),wrap:Ne(),justify:Ne(),align:Ne(),flex:He([Number,String]),gap:He([Number,String]),component:It()});var tbe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var c;return[a.value,s.value,G0e(a.value,e),{[`${a.value}-rtl`]:i.value==="rtl",[`${a.value}-gap-${e.gap}`]:eE(e.gap),[`${a.value}-vertical`]:(c=e.vertical)!==null&&c!==void 0?c:r==null?void 0:r.value.vertical}]});return()=>{var c;const{flex:d,gap:f,component:p="div"}=e,v=tbe(e,["flex","gap","component"]),h={};return d&&(h.flex=d),f&&!eE(f)&&(h.gap=`${f}px`),l(g(p,k({class:[o.class,u.value],style:[o.style,h]},it(v,["justify","wrap","align","vertical"])),{default:()=>[(c=n.default)===null||c===void 0?void 0:c.call(n)]}))}}}),obe=Lt(nbe),tE=Object.freeze(Object.defineProperty({__proto__:null,Affix:R6,Alert:eZ,Anchor:Cl,AnchorLink:GS,App:dd,AutoComplete:EJ,AutoCompleteOptGroup:TJ,AutoCompleteOption:IJ,Avatar:Al,AvatarGroup:eh,BackTop:wh,Badge:nd,BadgeRibbon:th,Breadcrumb:Rl,BreadcrumbItem:zd,BreadcrumbSeparator:uh,Button:Qt,ButtonGroup:ah,Calendar:Mte,Card:ac,CardGrid:hh,CardMeta:gh,Carousel:moe,Cascader:Aie,CheckableTag:Sh,Checkbox:gr,CheckboxGroup:bh,Col:Fie,Collapse:rd,CollapsePanel:vh,Comment:Wie,Compact:Zg,ConfigProvider:Nl,DatePicker:ale,Descriptions:Bs,DescriptionsItem:QR,DirectoryTree:gg,Divider:yle,Drawer:Dle,Dropdown:zr,DropdownButton:Hd,Empty:Oa,Flex:obe,FloatButton:ka,FloatButtonGroup:$h,Form:Ia,FormItem:bR,FormItemRest:Yg,Grid:Lie,Image:$l,ImagePreviewGroup:xD,Input:Cn,InputGroup:cD,InputNumber:dce,InputPassword:fD,InputSearch:uD,Layout:wce,LayoutContent:$ce,LayoutFooter:Cce,LayoutHeader:Sce,LayoutSider:xce,List:ba,ListItem:ID,ListItemMeta:PD,LocaleProvider:xR,Mentions:Mue,MentionsOption:ug,Menu:on,MenuDivider:Wd,MenuItem:ui,MenuItemGroup:jd,Modal:Tn,MonthPicker:tg,PageHeader:lde,Pagination:Sm,Popconfirm:pde,Popover:HC,Progress:a$,QRCode:p0e,QuarterPicker:ng,Radio:bo,RadioButton:fh,RadioGroup:hx,RangePicker:og,Rate:efe,Result:Ll,Row:vfe,Segmented:e0e,Select:Fn,SelectOptGroup:wJ,SelectOption:$J,Skeleton:no,SkeletonAvatar:Px,SkeletonButton:xx,SkeletonImage:wx,SkeletonInput:$x,SkeletonTitle:tm,Slider:Rfe,Space:uc,Spin:di,Statistic:Li,StatisticCountdown:Gue,Step:dg,Steps:Jfe,SubMenu:Ul,Switch:lpe,TabPane:ph,Table:yhe,TableColumn:vg,TableColumnGroup:mg,TableSummary:bg,TableSummaryCell:Ah,TableSummaryRow:Mh,Tabs:Dl,Tag:cc,Textarea:Vx,TimePicker:gve,TimeRangePicker:yg,Timeline:ud,TimelineItem:Yd,Tooltip:Ro,Tour:D0e,Transfer:jhe,Tree:PN,TreeNode:hg,TreeSelect:fve,TreeSelectNode:L1,Typography:Ao,TypographyLink:au,TypographyParagraph:lu,TypographyText:su,TypographyTitle:cu,Upload:Fme,UploadDragger:Lme,Watermark:Ume,WeekPicker:eg,message:Gl,notification:Ha},Symbol.toStringTag,{value:"Module"})),rbe=function(e){return Object.keys(tE).forEach(t=>{const n=tE[t];n.install&&e.use(n)}),e.use(IH.StyleProvider),e.config.globalProperties.$message=Gl,e.config.globalProperties.$notification=Ha,e.config.globalProperties.$info=Tn.info,e.config.globalProperties.$success=Tn.success,e.config.globalProperties.$error=Tn.error,e.config.globalProperties.$warning=Tn.warning,e.config.globalProperties.$confirm=Tn.confirm,e.config.globalProperties.$destroyAll=Tn.destroyAll,e},ibe={version:C6,install:rbe};/*! * vue-router v4.5.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const Hs=typeof document<"u";function r7(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function abe(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&r7(e.default)}const At=Object.assign;function wb(e,t){const n={};for(const o in t){const r=t[o];n[o]=Gr(r)?r.map(e):e(r)}return n}const fd=()=>{},Gr=Array.isArray,i7=/#/g,lbe=/&/g,sbe=/\//g,cbe=/=/g,ube=/\?/g,a7=/\+/g,dbe=/%5B/g,fbe=/%5D/g,l7=/%5E/g,pbe=/%60/g,s7=/%7B/g,gbe=/%7C/g,c7=/%7D/g,hbe=/%20/g;function N$(e){return encodeURI(""+e).replace(gbe,"|").replace(dbe,"[").replace(fbe,"]")}function vbe(e){return N$(e).replace(s7,"{").replace(c7,"}").replace(l7,"^")}function B1(e){return N$(e).replace(a7,"%2B").replace(hbe,"+").replace(i7,"%23").replace(lbe,"%26").replace(pbe,"`").replace(s7,"{").replace(c7,"}").replace(l7,"^")}function mbe(e){return B1(e).replace(cbe,"%3D")}function bbe(e){return N$(e).replace(i7,"%23").replace(ube,"%3F")}function ybe(e){return e==null?"":bbe(e).replace(sbe,"%2F")}function qd(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const Sbe=/\/$/,Cbe=e=>e.replace(Sbe,"");function Pb(e,t,n="/"){let o,r={},i="",a="";const l=t.indexOf("#");let s=t.indexOf("?");return l=0&&(s=-1),s>-1&&(o=t.slice(0,s),i=t.slice(s+1,l>-1?l:t.length),r=e(i)),l>-1&&(o=o||t.slice(0,l),a=t.slice(l,t.length)),o=Pbe(o??t,n),{fullPath:o+(i&&"?")+i+a,path:o,query:r,hash:qd(a)}}function xbe(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function nE(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function $be(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Ec(t.matched[o],n.matched[r])&&u7(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Ec(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function u7(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!wbe(e[n],t[n]))return!1;return!0}function wbe(e,t){return Gr(e)?oE(e,t):Gr(t)?oE(t,e):e===t}function oE(e,t){return Gr(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function Pbe(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let i=n.length-1,a,l;for(a=0;a1&&i--;else break;return n.slice(0,i).join("/")+"/"+o.slice(a).join("/")}const ga={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Jd;(function(e){e.pop="pop",e.push="push"})(Jd||(Jd={}));var pd;(function(e){e.back="back",e.forward="forward",e.unknown=""})(pd||(pd={}));function Obe(e){if(!e)if(Hs){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Cbe(e)}const Ibe=/^[^#]+#/;function Tbe(e,t){return e.replace(Ibe,"#")+t}function Ebe(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Em=()=>({left:window.scrollX,top:window.scrollY});function _be(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Ebe(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function rE(e,t){return(history.state?history.state.position-t:-1)+e}const H1=new Map;function Mbe(e,t){H1.set(e,t)}function Abe(e){const t=H1.get(e);return H1.delete(e),t}let Rbe=()=>location.protocol+"//"+location.host;function d7(e,t){const{pathname:n,search:o,hash:r}=t,i=e.indexOf("#");if(i>-1){let l=r.includes(e.slice(i))?e.slice(i).length:1,s=r.slice(l);return s[0]!=="/"&&(s="/"+s),nE(s,"")}return nE(n,e)+o+r}function Dbe(e,t,n,o){let r=[],i=[],a=null;const l=({state:f})=>{const p=d7(e,location),v=n.value,h=t.value;let m=0;if(f){if(n.value=p,t.value=f,a&&a===v){a=null;return}m=h?f.position-h.position:0}else o(p);r.forEach(b=>{b(n.value,v,{delta:m,type:Jd.pop,direction:m?m>0?pd.forward:pd.back:pd.unknown})})};function s(){a=n.value}function u(f){r.push(f);const p=()=>{const v=r.indexOf(f);v>-1&&r.splice(v,1)};return i.push(p),p}function c(){const{history:f}=window;f.state&&f.replaceState(At({},f.state,{scroll:Em()}),"")}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:s,listen:u,destroy:d}}function iE(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Em():null}}function Nbe(e){const{history:t,location:n}=window,o={value:d7(e,n)},r={value:t.state};r.value||i(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(s,u,c){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+s:Rbe()+e+s;try{t[c?"replaceState":"pushState"](u,"",f),r.value=u}catch(p){console.error(p),n[c?"replace":"assign"](f)}}function a(s,u){const c=At({},t.state,iE(r.value.back,s,r.value.forward,!0),u,{position:r.value.position});i(s,c,!0),o.value=s}function l(s,u){const c=At({},r.value,t.state,{forward:s,scroll:Em()});i(c.current,c,!0);const d=At({},iE(o.value,s,null),{position:c.position+1},u);i(s,d,!1),o.value=s}return{location:o,state:r,push:l,replace:a}}function kbe(e){e=Obe(e);const t=Nbe(e),n=Dbe(e,t.state,t.location,t.replace);function o(i,a=!0){a||n.pauseListeners(),history.go(i)}const r=At({location:"",base:e,go:o,createHref:Tbe.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function Lbe(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),kbe(e)}function Fbe(e){return typeof e=="string"||e&&typeof e=="object"}function f7(e){return typeof e=="string"||typeof e=="symbol"}const p7=Symbol("");var aE;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(aE||(aE={}));function _c(e,t){return At(new Error,{type:e,[p7]:!0},t)}function Pi(e,t){return e instanceof Error&&p7 in e&&(t==null||!!(e.type&t))}const lE="[^/]+?",Bbe={sensitive:!1,strict:!1,start:!0,end:!0},Hbe=/[.+*?^${}()[\]/\\]/g;function zbe(e,t){const n=At({},Bbe,t),o=[];let r=n.start?"^":"";const i=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(r+="/");for(let d=0;dt.length?t.length===1&&t[0]===80?1:-1:0}function g7(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Wbe={type:0,value:""},Vbe=/[a-zA-Z0-9_]/;function Kbe(e){if(!e)return[[]];if(e==="/")return[[Wbe]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${u}": ${p}`)}let n=0,o=n;const r=[];let i;function a(){i&&r.push(i),i=[]}let l=0,s,u="",c="";function d(){u&&(n===0?i.push({type:0,value:u}):n===1||n===2||n===3?(i.length>1&&(s==="*"||s==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:u,regexp:c,repeatable:s==="*"||s==="+",optional:s==="*"||s==="?"})):t("Invalid state to consume buffer"),u="")}function f(){u+=s}for(;l{a(C)}:fd}function a(d){if(f7(d)){const f=o.get(d);f&&(o.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(a),f.alias.forEach(a))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&o.delete(d.record.name),d.children.forEach(a),d.alias.forEach(a))}}function l(){return n}function s(d){const f=qbe(d,n);n.splice(f,0,d),d.record.name&&!dE(d)&&o.set(d.record.name,d)}function u(d,f){let p,v={},h,m;if("name"in d&&d.name){if(p=o.get(d.name),!p)throw _c(1,{location:d});m=p.record.name,v=At(cE(f.params,p.keys.filter(C=>!C.optional).concat(p.parent?p.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),d.params&&cE(d.params,p.keys.map(C=>C.name))),h=p.stringify(v)}else if(d.path!=null)h=d.path,p=n.find(C=>C.re.test(h)),p&&(v=p.parse(h),m=p.record.name);else{if(p=f.name?o.get(f.name):n.find(C=>C.re.test(f.path)),!p)throw _c(1,{location:d,currentLocation:f});m=p.record.name,v=At({},f.params,d.params),h=p.stringify(v)}const b=[];let S=p;for(;S;)b.unshift(S.record),S=S.parent;return{name:m,path:h,params:v,matched:b,meta:Ybe(b)}}e.forEach(d=>i(d));function c(){n.length=0,o.clear()}return{addRoute:i,resolve:u,removeRoute:a,clearRoutes:c,getRoutes:l,getRecordMatcher:r}}function cE(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function uE(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Xbe(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Xbe(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function dE(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ybe(e){return e.reduce((t,n)=>At(t,n.meta),{})}function fE(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function qbe(e,t){let n=0,o=t.length;for(;n!==o;){const i=n+o>>1;g7(e,t[i])<0?o=i:n=i+1}const r=Jbe(e);return r&&(o=t.lastIndexOf(r,o-1)),o}function Jbe(e){let t=e;for(;t=t.parent;)if(h7(t)&&g7(e,t)===0)return t}function h7({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Zbe(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ri&&B1(i)):[o&&B1(o)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function Qbe(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=Gr(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const eye=Symbol(""),gE=Symbol(""),_m=Symbol(""),k$=Symbol(""),z1=Symbol("");function Pu(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function $a(e,t,n,o,r,i=a=>a()){const a=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((l,s)=>{const u=f=>{f===!1?s(_c(4,{from:n,to:t})):f instanceof Error?s(f):Fbe(f)?s(_c(2,{from:t,to:f})):(a&&o.enterCallbacks[r]===a&&typeof f=="function"&&a.push(f),l())},c=i(()=>e.call(o&&o.instances[r],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(f=>s(f))})}function Ob(e,t,n,o,r=i=>i()){const i=[];for(const a of e)for(const l in a.components){let s=a.components[l];if(!(t!=="beforeRouteEnter"&&!a.instances[l]))if(r7(s)){const c=(s.__vccOpts||s)[t];c&&i.push($a(c,n,o,a,l,r))}else{let u=s();i.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${l}" at "${a.path}"`);const d=abe(c)?c.default:c;a.mods[l]=c,a.components[l]=d;const p=(d.__vccOpts||d)[t];return p&&$a(p,n,o,a,l,r)()}))}}return i}function hE(e){const t=ze(_m),n=ze(k$),o=E(()=>{const s=Bt(e.to);return t.resolve(s)}),r=E(()=>{const{matched:s}=o.value,{length:u}=s,c=s[u-1],d=n.matched;if(!c||!d.length)return-1;const f=d.findIndex(Ec.bind(null,c));if(f>-1)return f;const p=vE(s[u-2]);return u>1&&vE(c)===p&&d[d.length-1].path!==p?d.findIndex(Ec.bind(null,s[u-2])):f}),i=E(()=>r.value>-1&&iye(n.params,o.value.params)),a=E(()=>r.value>-1&&r.value===n.matched.length-1&&u7(n.params,o.value.params));function l(s={}){if(rye(s)){const u=t[Bt(e.replace)?"replace":"push"](Bt(e.to)).catch(fd);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:o,href:E(()=>o.value.href),isActive:i,isExactActive:a,navigate:l}}function tye(e){return e.length===1?e[0]:e}const nye=le({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:hE,setup(e,{slots:t}){const n=rt(hE(e)),{options:o}=ze(_m),r=E(()=>({[mE(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[mE(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&tye(t.default(n));return e.custom?i:Vr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),oye=nye;function rye(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function iye(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!Gr(r)||r.length!==o.length||o.some((i,a)=>i!==r[a]))return!1}return!0}function vE(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const mE=(e,t,n)=>e??t??n,aye=le({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=ze(z1),r=E(()=>e.route||o.value),i=ze(gE,0),a=E(()=>{let u=Bt(i);const{matched:c}=r.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),l=E(()=>r.value.matched[a.value]);Xe(gE,E(()=>a.value+1)),Xe(eye,l),Xe(z1,r);const s=ae();return be(()=>[s.value,l.value,e.name],([u,c,d],[f,p,v])=>{c&&(c.instances[d]=u,p&&p!==c&&u&&u===f&&(c.leaveGuards.size||(c.leaveGuards=p.leaveGuards),c.updateGuards.size||(c.updateGuards=p.updateGuards))),u&&c&&(!p||!Ec(c,p)||!f)&&(c.enterCallbacks[d]||[]).forEach(h=>h(u))},{flush:"post"}),()=>{const u=r.value,c=e.name,d=l.value,f=d&&d.components[c];if(!f)return bE(n.default,{Component:f,route:u});const p=d.props[c],v=p?p===!0?u.params:typeof p=="function"?p(u):p:null,m=Vr(f,At({},v,t,{onVnodeUnmounted:b=>{b.component.isUnmounted&&(d.instances[c]=null)},ref:s}));return bE(n.default,{Component:m,route:u})||m}}});function bE(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const v7=aye;function lye(e){const t=Gbe(e.routes,e),n=e.parseQuery||Zbe,o=e.stringifyQuery||pE,r=e.history,i=Pu(),a=Pu(),l=Pu(),s=se(ga);let u=ga;Hs&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=wb.bind(null,Z=>""+Z),d=wb.bind(null,ybe),f=wb.bind(null,qd);function p(Z,re){let ne,X;return f7(Z)?(ne=t.getRecordMatcher(Z),X=re):X=Z,t.addRoute(X,ne)}function v(Z){const re=t.getRecordMatcher(Z);re&&t.removeRoute(re)}function h(){return t.getRoutes().map(Z=>Z.record)}function m(Z){return!!t.getRecordMatcher(Z)}function b(Z,re){if(re=At({},re||s.value),typeof Z=="string"){const J=Pb(n,Z,re.path),de=t.resolve({path:J.path},re),fe=r.createHref(J.fullPath);return At(J,de,{params:f(de.params),hash:qd(J.hash),redirectedFrom:void 0,href:fe})}let ne;if(Z.path!=null)ne=At({},Z,{path:Pb(n,Z.path,re.path).path});else{const J=At({},Z.params);for(const de in J)J[de]==null&&delete J[de];ne=At({},Z,{params:d(J)}),re.params=d(re.params)}const X=t.resolve(ne,re),te=Z.hash||"";X.params=c(f(X.params));const W=xbe(o,At({},Z,{hash:vbe(te),path:X.path})),U=r.createHref(W);return At({fullPath:W,hash:te,query:o===pE?Qbe(Z.query):Z.query||{}},X,{redirectedFrom:void 0,href:U})}function S(Z){return typeof Z=="string"?Pb(n,Z,s.value.path):At({},Z)}function C(Z,re){if(u!==Z)return _c(8,{from:re,to:Z})}function $(Z){return w(Z)}function x(Z){return $(At(S(Z),{replace:!0}))}function P(Z){const re=Z.matched[Z.matched.length-1];if(re&&re.redirect){const{redirect:ne}=re;let X=typeof ne=="function"?ne(Z):ne;return typeof X=="string"&&(X=X.includes("?")||X.includes("#")?X=S(X):{path:X},X.params={}),At({query:Z.query,hash:Z.hash,params:X.path!=null?{}:Z.params},X)}}function w(Z,re){const ne=u=b(Z),X=s.value,te=Z.state,W=Z.force,U=Z.replace===!0,J=P(ne);if(J)return w(At(S(J),{state:typeof J=="object"?At({},te,J.state):te,force:W,replace:U}),re||ne);const de=ne;de.redirectedFrom=re;let fe;return!W&&$be(o,X,ne)&&(fe=_c(16,{to:de,from:X}),j(X,X,!0,!1)),(fe?Promise.resolve(fe):_(de,X)).catch(pe=>Pi(pe)?Pi(pe,2)?pe:B(pe):L(pe,de,X)).then(pe=>{if(pe){if(Pi(pe,2))return w(At({replace:U},S(pe.to),{state:typeof pe.to=="object"?At({},te,pe.to.state):te,force:W}),re||de)}else pe=A(de,X,!0,U,te);return T(de,X,pe),pe})}function O(Z,re){const ne=C(Z,re);return ne?Promise.reject(ne):Promise.resolve()}function I(Z){const re=Q.values().next().value;return re&&typeof re.runWithContext=="function"?re.runWithContext(Z):Z()}function _(Z,re){let ne;const[X,te,W]=sye(Z,re);ne=Ob(X.reverse(),"beforeRouteLeave",Z,re);for(const J of X)J.leaveGuards.forEach(de=>{ne.push($a(de,Z,re))});const U=O.bind(null,Z,re);return ne.push(U),oe(ne).then(()=>{ne=[];for(const J of i.list())ne.push($a(J,Z,re));return ne.push(U),oe(ne)}).then(()=>{ne=Ob(te,"beforeRouteUpdate",Z,re);for(const J of te)J.updateGuards.forEach(de=>{ne.push($a(de,Z,re))});return ne.push(U),oe(ne)}).then(()=>{ne=[];for(const J of W)if(J.beforeEnter)if(Gr(J.beforeEnter))for(const de of J.beforeEnter)ne.push($a(de,Z,re));else ne.push($a(J.beforeEnter,Z,re));return ne.push(U),oe(ne)}).then(()=>(Z.matched.forEach(J=>J.enterCallbacks={}),ne=Ob(W,"beforeRouteEnter",Z,re,I),ne.push(U),oe(ne))).then(()=>{ne=[];for(const J of a.list())ne.push($a(J,Z,re));return ne.push(U),oe(ne)}).catch(J=>Pi(J,8)?J:Promise.reject(J))}function T(Z,re,ne){l.list().forEach(X=>I(()=>X(Z,re,ne)))}function A(Z,re,ne,X,te){const W=C(Z,re);if(W)return W;const U=re===ga,J=Hs?history.state:{};ne&&(X||U?r.replace(Z.fullPath,At({scroll:U&&J&&J.scroll},te)):r.push(Z.fullPath,te)),s.value=Z,j(Z,re,ne,U),B()}let R;function H(){R||(R=r.listen((Z,re,ne)=>{if(!Y.listening)return;const X=b(Z),te=P(X);if(te){w(At(te,{replace:!0,force:!0}),X).catch(fd);return}u=X;const W=s.value;Hs&&Mbe(rE(W.fullPath,ne.delta),Em()),_(X,W).catch(U=>Pi(U,12)?U:Pi(U,2)?(w(At(S(U.to),{force:!0}),X).then(J=>{Pi(J,20)&&!ne.delta&&ne.type===Jd.pop&&r.go(-1,!1)}).catch(fd),Promise.reject()):(ne.delta&&r.go(-ne.delta,!1),L(U,X,W))).then(U=>{U=U||A(X,W,!1),U&&(ne.delta&&!Pi(U,8)?r.go(-ne.delta,!1):ne.type===Jd.pop&&Pi(U,20)&&r.go(-1,!1)),T(X,W,U)}).catch(fd)}))}let M=Pu(),D=Pu(),N;function L(Z,re,ne){B(Z);const X=D.list();return X.length?X.forEach(te=>te(Z,re,ne)):console.error(Z),Promise.reject(Z)}function F(){return N&&s.value!==ga?Promise.resolve():new Promise((Z,re)=>{M.add([Z,re])})}function B(Z){return N||(N=!Z,H(),M.list().forEach(([re,ne])=>Z?ne(Z):re()),M.reset()),Z}function j(Z,re,ne,X){const{scrollBehavior:te}=e;if(!Hs||!te)return Promise.resolve();const W=!ne&&Abe(rE(Z.fullPath,0))||(X||!ne)&&history.state&&history.state.scroll||null;return ot().then(()=>te(Z,re,W)).then(U=>U&&_be(U)).catch(U=>L(U,Z,re))}const z=Z=>r.go(Z);let G;const Q=new Set,Y={currentRoute:s,listening:!0,addRoute:p,removeRoute:v,clearRoutes:t.clearRoutes,hasRoute:m,getRoutes:h,resolve:b,options:e,push:$,replace:x,go:z,back:()=>z(-1),forward:()=>z(1),beforeEach:i.add,beforeResolve:a.add,afterEach:l.add,onError:D.add,isReady:F,install(Z){const re=this;Z.component("RouterLink",oye),Z.component("RouterView",v7),Z.config.globalProperties.$router=re,Object.defineProperty(Z.config.globalProperties,"$route",{enumerable:!0,get:()=>Bt(s)}),Hs&&!G&&s.value===ga&&(G=!0,$(r.location).catch(te=>{}));const ne={};for(const te in ga)Object.defineProperty(ne,te,{get:()=>s.value[te],enumerable:!0});Z.provide(_m,re),Z.provide(k$,A_(ne)),Z.provide(z1,s);const X=Z.unmount;Q.add(Z),Z.unmount=function(){Q.delete(Z),Q.size<1&&(u=ga,R&&R(),R=null,s.value=ga,G=!1,N=!1),X()}}};function oe(Z){return Z.reduce((re,ne)=>re.then(()=>I(ne)),Promise.resolve())}return Y}function sye(e,t){const n=[],o=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;aEc(u,l))?o.push(l):n.push(l));const s=e.matched[a];s&&(t.matched.find(u=>Ec(u,s))||r.push(s))}return[n,o,r]}function aOe(){return ze(_m)}function lOe(e){return ze(k$)}const cye="modulepreload",uye=function(e){return"/ui/"+e},yE={},Ou=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=Promise.allSettled(n.map(s=>{if(s=uye(s),s in yE)return;yE[s]=!0;const u=s.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":cye,u||(d.as="script"),d.crossOrigin="",d.href=s,l&&d.setAttribute("nonce",l),document.head.appendChild(d),u)return new Promise((f,p)=>{d.addEventListener("load",f),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${s}`)))})}))}function i(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return r.then(a=>{for(const l of a||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},m7=[{path:"/",name:"Root",redirect:()=>localStorage.getItem("hasInitialized")==="true"?localStorage.getItem("hasVisitedHome")==="true"?"/direct":"/home":"/init",meta:{skip:!0},children:[{path:"/init",name:"init",component:()=>Ou(()=>import("./index-Clz_zCtn.js"),__vite__mapDeps([0,1,2,3])),meta:{fullscreen:!0,skip:!0}},{path:"/home",name:"conversation",component:()=>Ou(()=>import("./index-Da6ed0Wm.js"),__vite__mapDeps([4,5,6,2,7,8,9,1,10])),meta:{icon:"carbon:chat",fullscreen:!0}},{path:"/direct/:id?",name:"direct",component:()=>Ou(()=>import("./index-BijJLnMN.js"),__vite__mapDeps([11,6,9,1,2,7,8,12,13,14])),meta:{icon:"carbon:chat",fullscreen:!0}},{path:"/configs/:category?",name:"configs",component:()=>Ou(()=>import("./index-H3fwLZKf.js").then(e=>e.i),__vite__mapDeps([15,6,2,12,13,7,8,16])),meta:{icon:"carbon:settings-adjust"}}]},{path:"/:catchAll(.*)",name:"notFound",component:()=>Ou(()=>import("./notFound-C8IvAV_5.js"),__vite__mapDeps([17,5,6,2,18])),meta:{skip:!0}}];function SE(...e){return e.join("/").replace(/\/+/g,"/")}function b7(e,t){if(e)for(const n of e)t&&(n.path=SE(t.path,n.path)),n.redirect&&typeof n.redirect=="string"&&(n.redirect=SE(n.path,n.redirect||"")),b7(n.children,n)}b7(m7,void 0);const dye={history:Lbe("/ui"),routes:m7},y7=lye(dye);y7.beforeEach(async(e,t,n)=>{if(e.path==="/init"){n();return}try{const r=await(await fetch("/api/init/status")).json();if(r.success&&!r.initialized){localStorage.removeItem("hasInitialized"),n("/init");return}else r.success&&r.initialized&&localStorage.setItem("hasInitialized","true")}catch(o){if(console.warn("Failed to check initialization status:",o),!(localStorage.getItem("hasInitialized")==="true")){n("/init");return}}n()});const fye={id:"app"},pye=le({__name:"App",setup(e){return(t,n)=>(st(),_t("div",fye,[g(Bt(v7))]))}});/*! + */const Hs=typeof document<"u";function r7(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function abe(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&r7(e.default)}const At=Object.assign;function wb(e,t){const n={};for(const o in t){const r=t[o];n[o]=Gr(r)?r.map(e):e(r)}return n}const fd=()=>{},Gr=Array.isArray,i7=/#/g,lbe=/&/g,sbe=/\//g,cbe=/=/g,ube=/\?/g,a7=/\+/g,dbe=/%5B/g,fbe=/%5D/g,l7=/%5E/g,pbe=/%60/g,s7=/%7B/g,gbe=/%7C/g,c7=/%7D/g,hbe=/%20/g;function N$(e){return encodeURI(""+e).replace(gbe,"|").replace(dbe,"[").replace(fbe,"]")}function vbe(e){return N$(e).replace(s7,"{").replace(c7,"}").replace(l7,"^")}function B1(e){return N$(e).replace(a7,"%2B").replace(hbe,"+").replace(i7,"%23").replace(lbe,"%26").replace(pbe,"`").replace(s7,"{").replace(c7,"}").replace(l7,"^")}function mbe(e){return B1(e).replace(cbe,"%3D")}function bbe(e){return N$(e).replace(i7,"%23").replace(ube,"%3F")}function ybe(e){return e==null?"":bbe(e).replace(sbe,"%2F")}function qd(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const Sbe=/\/$/,Cbe=e=>e.replace(Sbe,"");function Pb(e,t,n="/"){let o,r={},i="",a="";const l=t.indexOf("#");let s=t.indexOf("?");return l=0&&(s=-1),s>-1&&(o=t.slice(0,s),i=t.slice(s+1,l>-1?l:t.length),r=e(i)),l>-1&&(o=o||t.slice(0,l),a=t.slice(l,t.length)),o=Pbe(o??t,n),{fullPath:o+(i&&"?")+i+a,path:o,query:r,hash:qd(a)}}function xbe(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function nE(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function $be(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Ec(t.matched[o],n.matched[r])&&u7(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Ec(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function u7(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!wbe(e[n],t[n]))return!1;return!0}function wbe(e,t){return Gr(e)?oE(e,t):Gr(t)?oE(t,e):e===t}function oE(e,t){return Gr(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function Pbe(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let i=n.length-1,a,l;for(a=0;a1&&i--;else break;return n.slice(0,i).join("/")+"/"+o.slice(a).join("/")}const ga={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Jd;(function(e){e.pop="pop",e.push="push"})(Jd||(Jd={}));var pd;(function(e){e.back="back",e.forward="forward",e.unknown=""})(pd||(pd={}));function Obe(e){if(!e)if(Hs){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Cbe(e)}const Ibe=/^[^#]+#/;function Tbe(e,t){return e.replace(Ibe,"#")+t}function Ebe(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Tm=()=>({left:window.scrollX,top:window.scrollY});function _be(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Ebe(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function rE(e,t){return(history.state?history.state.position-t:-1)+e}const H1=new Map;function Mbe(e,t){H1.set(e,t)}function Abe(e){const t=H1.get(e);return H1.delete(e),t}let Rbe=()=>location.protocol+"//"+location.host;function d7(e,t){const{pathname:n,search:o,hash:r}=t,i=e.indexOf("#");if(i>-1){let l=r.includes(e.slice(i))?e.slice(i).length:1,s=r.slice(l);return s[0]!=="/"&&(s="/"+s),nE(s,"")}return nE(n,e)+o+r}function Dbe(e,t,n,o){let r=[],i=[],a=null;const l=({state:f})=>{const p=d7(e,location),v=n.value,h=t.value;let m=0;if(f){if(n.value=p,t.value=f,a&&a===v){a=null;return}m=h?f.position-h.position:0}else o(p);r.forEach(b=>{b(n.value,v,{delta:m,type:Jd.pop,direction:m?m>0?pd.forward:pd.back:pd.unknown})})};function s(){a=n.value}function u(f){r.push(f);const p=()=>{const v=r.indexOf(f);v>-1&&r.splice(v,1)};return i.push(p),p}function c(){const{history:f}=window;f.state&&f.replaceState(At({},f.state,{scroll:Tm()}),"")}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:s,listen:u,destroy:d}}function iE(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Tm():null}}function Nbe(e){const{history:t,location:n}=window,o={value:d7(e,n)},r={value:t.state};r.value||i(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(s,u,c){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+s:Rbe()+e+s;try{t[c?"replaceState":"pushState"](u,"",f),r.value=u}catch(p){console.error(p),n[c?"replace":"assign"](f)}}function a(s,u){const c=At({},t.state,iE(r.value.back,s,r.value.forward,!0),u,{position:r.value.position});i(s,c,!0),o.value=s}function l(s,u){const c=At({},r.value,t.state,{forward:s,scroll:Tm()});i(c.current,c,!0);const d=At({},iE(o.value,s,null),{position:c.position+1},u);i(s,d,!1),o.value=s}return{location:o,state:r,push:l,replace:a}}function kbe(e){e=Obe(e);const t=Nbe(e),n=Dbe(e,t.state,t.location,t.replace);function o(i,a=!0){a||n.pauseListeners(),history.go(i)}const r=At({location:"",base:e,go:o,createHref:Tbe.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function Lbe(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),kbe(e)}function Fbe(e){return typeof e=="string"||e&&typeof e=="object"}function f7(e){return typeof e=="string"||typeof e=="symbol"}const p7=Symbol("");var aE;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(aE||(aE={}));function _c(e,t){return At(new Error,{type:e,[p7]:!0},t)}function Pi(e,t){return e instanceof Error&&p7 in e&&(t==null||!!(e.type&t))}const lE="[^/]+?",Bbe={sensitive:!1,strict:!1,start:!0,end:!0},Hbe=/[.+*?^${}()[\]/\\]/g;function zbe(e,t){const n=At({},Bbe,t),o=[];let r=n.start?"^":"";const i=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(r+="/");for(let d=0;dt.length?t.length===1&&t[0]===80?1:-1:0}function g7(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Wbe={type:0,value:""},Vbe=/[a-zA-Z0-9_]/;function Kbe(e){if(!e)return[[]];if(e==="/")return[[Wbe]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${u}": ${p}`)}let n=0,o=n;const r=[];let i;function a(){i&&r.push(i),i=[]}let l=0,s,u="",c="";function d(){u&&(n===0?i.push({type:0,value:u}):n===1||n===2||n===3?(i.length>1&&(s==="*"||s==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:u,regexp:c,repeatable:s==="*"||s==="+",optional:s==="*"||s==="?"})):t("Invalid state to consume buffer"),u="")}function f(){u+=s}for(;l{a(C)}:fd}function a(d){if(f7(d)){const f=o.get(d);f&&(o.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(a),f.alias.forEach(a))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&o.delete(d.record.name),d.children.forEach(a),d.alias.forEach(a))}}function l(){return n}function s(d){const f=qbe(d,n);n.splice(f,0,d),d.record.name&&!dE(d)&&o.set(d.record.name,d)}function u(d,f){let p,v={},h,m;if("name"in d&&d.name){if(p=o.get(d.name),!p)throw _c(1,{location:d});m=p.record.name,v=At(cE(f.params,p.keys.filter(C=>!C.optional).concat(p.parent?p.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),d.params&&cE(d.params,p.keys.map(C=>C.name))),h=p.stringify(v)}else if(d.path!=null)h=d.path,p=n.find(C=>C.re.test(h)),p&&(v=p.parse(h),m=p.record.name);else{if(p=f.name?o.get(f.name):n.find(C=>C.re.test(f.path)),!p)throw _c(1,{location:d,currentLocation:f});m=p.record.name,v=At({},f.params,d.params),h=p.stringify(v)}const b=[];let S=p;for(;S;)b.unshift(S.record),S=S.parent;return{name:m,path:h,params:v,matched:b,meta:Ybe(b)}}e.forEach(d=>i(d));function c(){n.length=0,o.clear()}return{addRoute:i,resolve:u,removeRoute:a,clearRoutes:c,getRoutes:l,getRecordMatcher:r}}function cE(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function uE(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Xbe(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Xbe(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function dE(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ybe(e){return e.reduce((t,n)=>At(t,n.meta),{})}function fE(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function qbe(e,t){let n=0,o=t.length;for(;n!==o;){const i=n+o>>1;g7(e,t[i])<0?o=i:n=i+1}const r=Jbe(e);return r&&(o=t.lastIndexOf(r,o-1)),o}function Jbe(e){let t=e;for(;t=t.parent;)if(h7(t)&&g7(e,t)===0)return t}function h7({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Zbe(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ri&&B1(i)):[o&&B1(o)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function Qbe(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=Gr(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const eye=Symbol(""),gE=Symbol(""),Em=Symbol(""),k$=Symbol(""),z1=Symbol("");function Pu(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function $a(e,t,n,o,r,i=a=>a()){const a=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((l,s)=>{const u=f=>{f===!1?s(_c(4,{from:n,to:t})):f instanceof Error?s(f):Fbe(f)?s(_c(2,{from:t,to:f})):(a&&o.enterCallbacks[r]===a&&typeof f=="function"&&a.push(f),l())},c=i(()=>e.call(o&&o.instances[r],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(f=>s(f))})}function Ob(e,t,n,o,r=i=>i()){const i=[];for(const a of e)for(const l in a.components){let s=a.components[l];if(!(t!=="beforeRouteEnter"&&!a.instances[l]))if(r7(s)){const c=(s.__vccOpts||s)[t];c&&i.push($a(c,n,o,a,l,r))}else{let u=s();i.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${l}" at "${a.path}"`);const d=abe(c)?c.default:c;a.mods[l]=c,a.components[l]=d;const p=(d.__vccOpts||d)[t];return p&&$a(p,n,o,a,l,r)()}))}}return i}function hE(e){const t=ze(Em),n=ze(k$),o=E(()=>{const s=Bt(e.to);return t.resolve(s)}),r=E(()=>{const{matched:s}=o.value,{length:u}=s,c=s[u-1],d=n.matched;if(!c||!d.length)return-1;const f=d.findIndex(Ec.bind(null,c));if(f>-1)return f;const p=vE(s[u-2]);return u>1&&vE(c)===p&&d[d.length-1].path!==p?d.findIndex(Ec.bind(null,s[u-2])):f}),i=E(()=>r.value>-1&&iye(n.params,o.value.params)),a=E(()=>r.value>-1&&r.value===n.matched.length-1&&u7(n.params,o.value.params));function l(s={}){if(rye(s)){const u=t[Bt(e.replace)?"replace":"push"](Bt(e.to)).catch(fd);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:o,href:E(()=>o.value.href),isActive:i,isExactActive:a,navigate:l}}function tye(e){return e.length===1?e[0]:e}const nye=le({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:hE,setup(e,{slots:t}){const n=rt(hE(e)),{options:o}=ze(Em),r=E(()=>({[mE(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[mE(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&tye(t.default(n));return e.custom?i:Vr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),oye=nye;function rye(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function iye(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!Gr(r)||r.length!==o.length||o.some((i,a)=>i!==r[a]))return!1}return!0}function vE(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const mE=(e,t,n)=>e??t??n,aye=le({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=ze(z1),r=E(()=>e.route||o.value),i=ze(gE,0),a=E(()=>{let u=Bt(i);const{matched:c}=r.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),l=E(()=>r.value.matched[a.value]);Xe(gE,E(()=>a.value+1)),Xe(eye,l),Xe(z1,r);const s=ae();return be(()=>[s.value,l.value,e.name],([u,c,d],[f,p,v])=>{c&&(c.instances[d]=u,p&&p!==c&&u&&u===f&&(c.leaveGuards.size||(c.leaveGuards=p.leaveGuards),c.updateGuards.size||(c.updateGuards=p.updateGuards))),u&&c&&(!p||!Ec(c,p)||!f)&&(c.enterCallbacks[d]||[]).forEach(h=>h(u))},{flush:"post"}),()=>{const u=r.value,c=e.name,d=l.value,f=d&&d.components[c];if(!f)return bE(n.default,{Component:f,route:u});const p=d.props[c],v=p?p===!0?u.params:typeof p=="function"?p(u):p:null,m=Vr(f,At({},v,t,{onVnodeUnmounted:b=>{b.component.isUnmounted&&(d.instances[c]=null)},ref:s}));return bE(n.default,{Component:m,route:u})||m}}});function bE(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const v7=aye;function lye(e){const t=Gbe(e.routes,e),n=e.parseQuery||Zbe,o=e.stringifyQuery||pE,r=e.history,i=Pu(),a=Pu(),l=Pu(),s=se(ga);let u=ga;Hs&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=wb.bind(null,Z=>""+Z),d=wb.bind(null,ybe),f=wb.bind(null,qd);function p(Z,re){let ne,X;return f7(Z)?(ne=t.getRecordMatcher(Z),X=re):X=Z,t.addRoute(X,ne)}function v(Z){const re=t.getRecordMatcher(Z);re&&t.removeRoute(re)}function h(){return t.getRoutes().map(Z=>Z.record)}function m(Z){return!!t.getRecordMatcher(Z)}function b(Z,re){if(re=At({},re||s.value),typeof Z=="string"){const J=Pb(n,Z,re.path),de=t.resolve({path:J.path},re),fe=r.createHref(J.fullPath);return At(J,de,{params:f(de.params),hash:qd(J.hash),redirectedFrom:void 0,href:fe})}let ne;if(Z.path!=null)ne=At({},Z,{path:Pb(n,Z.path,re.path).path});else{const J=At({},Z.params);for(const de in J)J[de]==null&&delete J[de];ne=At({},Z,{params:d(J)}),re.params=d(re.params)}const X=t.resolve(ne,re),te=Z.hash||"";X.params=c(f(X.params));const W=xbe(o,At({},Z,{hash:vbe(te),path:X.path})),U=r.createHref(W);return At({fullPath:W,hash:te,query:o===pE?Qbe(Z.query):Z.query||{}},X,{redirectedFrom:void 0,href:U})}function S(Z){return typeof Z=="string"?Pb(n,Z,s.value.path):At({},Z)}function C(Z,re){if(u!==Z)return _c(8,{from:re,to:Z})}function $(Z){return w(Z)}function x(Z){return $(At(S(Z),{replace:!0}))}function P(Z){const re=Z.matched[Z.matched.length-1];if(re&&re.redirect){const{redirect:ne}=re;let X=typeof ne=="function"?ne(Z):ne;return typeof X=="string"&&(X=X.includes("?")||X.includes("#")?X=S(X):{path:X},X.params={}),At({query:Z.query,hash:Z.hash,params:X.path!=null?{}:Z.params},X)}}function w(Z,re){const ne=u=b(Z),X=s.value,te=Z.state,W=Z.force,U=Z.replace===!0,J=P(ne);if(J)return w(At(S(J),{state:typeof J=="object"?At({},te,J.state):te,force:W,replace:U}),re||ne);const de=ne;de.redirectedFrom=re;let fe;return!W&&$be(o,X,ne)&&(fe=_c(16,{to:de,from:X}),j(X,X,!0,!1)),(fe?Promise.resolve(fe):_(de,X)).catch(pe=>Pi(pe)?Pi(pe,2)?pe:B(pe):L(pe,de,X)).then(pe=>{if(pe){if(Pi(pe,2))return w(At({replace:U},S(pe.to),{state:typeof pe.to=="object"?At({},te,pe.to.state):te,force:W}),re||de)}else pe=A(de,X,!0,U,te);return T(de,X,pe),pe})}function O(Z,re){const ne=C(Z,re);return ne?Promise.reject(ne):Promise.resolve()}function I(Z){const re=Q.values().next().value;return re&&typeof re.runWithContext=="function"?re.runWithContext(Z):Z()}function _(Z,re){let ne;const[X,te,W]=sye(Z,re);ne=Ob(X.reverse(),"beforeRouteLeave",Z,re);for(const J of X)J.leaveGuards.forEach(de=>{ne.push($a(de,Z,re))});const U=O.bind(null,Z,re);return ne.push(U),oe(ne).then(()=>{ne=[];for(const J of i.list())ne.push($a(J,Z,re));return ne.push(U),oe(ne)}).then(()=>{ne=Ob(te,"beforeRouteUpdate",Z,re);for(const J of te)J.updateGuards.forEach(de=>{ne.push($a(de,Z,re))});return ne.push(U),oe(ne)}).then(()=>{ne=[];for(const J of W)if(J.beforeEnter)if(Gr(J.beforeEnter))for(const de of J.beforeEnter)ne.push($a(de,Z,re));else ne.push($a(J.beforeEnter,Z,re));return ne.push(U),oe(ne)}).then(()=>(Z.matched.forEach(J=>J.enterCallbacks={}),ne=Ob(W,"beforeRouteEnter",Z,re,I),ne.push(U),oe(ne))).then(()=>{ne=[];for(const J of a.list())ne.push($a(J,Z,re));return ne.push(U),oe(ne)}).catch(J=>Pi(J,8)?J:Promise.reject(J))}function T(Z,re,ne){l.list().forEach(X=>I(()=>X(Z,re,ne)))}function A(Z,re,ne,X,te){const W=C(Z,re);if(W)return W;const U=re===ga,J=Hs?history.state:{};ne&&(X||U?r.replace(Z.fullPath,At({scroll:U&&J&&J.scroll},te)):r.push(Z.fullPath,te)),s.value=Z,j(Z,re,ne,U),B()}let R;function H(){R||(R=r.listen((Z,re,ne)=>{if(!Y.listening)return;const X=b(Z),te=P(X);if(te){w(At(te,{replace:!0,force:!0}),X).catch(fd);return}u=X;const W=s.value;Hs&&Mbe(rE(W.fullPath,ne.delta),Tm()),_(X,W).catch(U=>Pi(U,12)?U:Pi(U,2)?(w(At(S(U.to),{force:!0}),X).then(J=>{Pi(J,20)&&!ne.delta&&ne.type===Jd.pop&&r.go(-1,!1)}).catch(fd),Promise.reject()):(ne.delta&&r.go(-ne.delta,!1),L(U,X,W))).then(U=>{U=U||A(X,W,!1),U&&(ne.delta&&!Pi(U,8)?r.go(-ne.delta,!1):ne.type===Jd.pop&&Pi(U,20)&&r.go(-1,!1)),T(X,W,U)}).catch(fd)}))}let M=Pu(),D=Pu(),N;function L(Z,re,ne){B(Z);const X=D.list();return X.length?X.forEach(te=>te(Z,re,ne)):console.error(Z),Promise.reject(Z)}function F(){return N&&s.value!==ga?Promise.resolve():new Promise((Z,re)=>{M.add([Z,re])})}function B(Z){return N||(N=!Z,H(),M.list().forEach(([re,ne])=>Z?ne(Z):re()),M.reset()),Z}function j(Z,re,ne,X){const{scrollBehavior:te}=e;if(!Hs||!te)return Promise.resolve();const W=!ne&&Abe(rE(Z.fullPath,0))||(X||!ne)&&history.state&&history.state.scroll||null;return ot().then(()=>te(Z,re,W)).then(U=>U&&_be(U)).catch(U=>L(U,Z,re))}const z=Z=>r.go(Z);let G;const Q=new Set,Y={currentRoute:s,listening:!0,addRoute:p,removeRoute:v,clearRoutes:t.clearRoutes,hasRoute:m,getRoutes:h,resolve:b,options:e,push:$,replace:x,go:z,back:()=>z(-1),forward:()=>z(1),beforeEach:i.add,beforeResolve:a.add,afterEach:l.add,onError:D.add,isReady:F,install(Z){const re=this;Z.component("RouterLink",oye),Z.component("RouterView",v7),Z.config.globalProperties.$router=re,Object.defineProperty(Z.config.globalProperties,"$route",{enumerable:!0,get:()=>Bt(s)}),Hs&&!G&&s.value===ga&&(G=!0,$(r.location).catch(te=>{}));const ne={};for(const te in ga)Object.defineProperty(ne,te,{get:()=>s.value[te],enumerable:!0});Z.provide(Em,re),Z.provide(k$,A_(ne)),Z.provide(z1,s);const X=Z.unmount;Q.add(Z),Z.unmount=function(){Q.delete(Z),Q.size<1&&(u=ga,R&&R(),R=null,s.value=ga,G=!1,N=!1),X()}}};function oe(Z){return Z.reduce((re,ne)=>re.then(()=>I(ne)),Promise.resolve())}return Y}function sye(e,t){const n=[],o=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;aEc(u,l))?o.push(l):n.push(l));const s=e.matched[a];s&&(t.matched.find(u=>Ec(u,s))||r.push(s))}return[n,o,r]}function iOe(){return ze(Em)}function aOe(e){return ze(k$)}const cye="modulepreload",uye=function(e){return"/ui/"+e},yE={},Ou=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=Promise.allSettled(n.map(s=>{if(s=uye(s),s in yE)return;yE[s]=!0;const u=s.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":cye,u||(d.as="script"),d.crossOrigin="",d.href=s,l&&d.setAttribute("nonce",l),document.head.appendChild(d),u)return new Promise((f,p)=>{d.addEventListener("load",f),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${s}`)))})}))}function i(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return r.then(a=>{for(const l of a||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},m7=[{path:"/",name:"Root",redirect:()=>localStorage.getItem("hasInitialized")==="true"?localStorage.getItem("hasVisitedHome")==="true"?"/direct":"/home":"/init",meta:{skip:!0},children:[{path:"/init",name:"init",component:()=>Ou(()=>import("./index-CAOqiiSi.js"),__vite__mapDeps([0,1,2,3])),meta:{fullscreen:!0,skip:!0}},{path:"/home",name:"conversation",component:()=>Ou(()=>import("./index-CZriWw3M.js"),__vite__mapDeps([4,5,6,2,7,8,9,1,10])),meta:{icon:"carbon:chat",fullscreen:!0}},{path:"/direct/:id?",name:"direct",component:()=>Ou(()=>import("./index-BxnqWDJP.js"),__vite__mapDeps([11,6,9,1,2,7,8,12,13,14])),meta:{icon:"carbon:chat",fullscreen:!0}},{path:"/configs/:category?",name:"configs",component:()=>Ou(()=>import("./index-DOvRfojN.js").then(e=>e.i),__vite__mapDeps([15,6,2,12,13,7,8,16])),meta:{icon:"carbon:settings-adjust"}}]},{path:"/:catchAll(.*)",name:"notFound",component:()=>Ou(()=>import("./notFound-BRvp1baV.js"),__vite__mapDeps([17,5,6,2,18])),meta:{skip:!0}}];function SE(...e){return e.join("/").replace(/\/+/g,"/")}function b7(e,t){if(e)for(const n of e)t&&(n.path=SE(t.path,n.path)),n.redirect&&typeof n.redirect=="string"&&(n.redirect=SE(n.path,n.redirect||"")),b7(n.children,n)}b7(m7,void 0);const dye={history:Lbe("/ui"),routes:m7},y7=lye(dye);y7.beforeEach(async(e,t,n)=>{if(e.path==="/init"){n();return}try{const r=await(await fetch("/api/init/status")).json();if(r.success&&!r.initialized){localStorage.removeItem("hasInitialized"),n("/init");return}else r.success&&r.initialized&&localStorage.setItem("hasInitialized","true")}catch(o){if(console.warn("Failed to check initialization status:",o),!(localStorage.getItem("hasInitialized")==="true")){n("/init");return}}n()});const fye={id:"app"},pye=le({__name:"App",setup(e){return(t,n)=>(st(),_t("div",fye,[g(Bt(v7))]))}});/*! * shared v9.14.4 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */const Dh=typeof window<"u",Qa=(e,t=!1)=>t?Symbol.for(e):Symbol(e),gye=(e,t,n)=>hye({l:e,k:t,s:n}),hye=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),vn=e=>typeof e=="number"&&isFinite(e),vye=e=>C7(e)==="[object Date]",za=e=>C7(e)==="[object RegExp]",Mm=e=>ht(e)&&Object.keys(e).length===0,qn=Object.assign,mye=Object.create,Nt=(e=null)=>mye(e);let CE;const Fi=()=>CE||(CE=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Nt());function xE(e){return e.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const bye=Object.prototype.hasOwnProperty;function Dr(e,t){return bye.call(e,t)}const Yt=Array.isArray,Kt=e=>typeof e=="function",je=e=>typeof e=="string",xt=e=>typeof e=="boolean",Et=e=>e!==null&&typeof e=="object",yye=e=>Et(e)&&Kt(e.then)&&Kt(e.catch),S7=Object.prototype.toString,C7=e=>S7.call(e),ht=e=>{if(!Et(e))return!1;const t=Object.getPrototypeOf(e);return t===null||t.constructor===Object},Sye=e=>e==null?"":Yt(e)||ht(e)&&e.toString===S7?JSON.stringify(e,null,2):String(e);function Cye(e,t=""){return e.reduce((n,o,r)=>r===0?n+o:n+t+o,"")}function Am(e){let t=e;return()=>++t}function xye(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const wp=e=>!Et(e)||Yt(e);function $g(e,t){if(wp(e)||wp(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:o,des:r}=n.pop();Object.keys(o).forEach(i=>{i!=="__proto__"&&(Et(o[i])&&!Et(r[i])&&(r[i]=Array.isArray(o[i])?[]:Nt()),wp(r[i])||wp(o[i])?r[i]=o[i]:n.push({src:o[i],des:r[i]}))})}}/*! + */const Rh=typeof window<"u",Qa=(e,t=!1)=>t?Symbol.for(e):Symbol(e),gye=(e,t,n)=>hye({l:e,k:t,s:n}),hye=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),vn=e=>typeof e=="number"&&isFinite(e),vye=e=>C7(e)==="[object Date]",za=e=>C7(e)==="[object RegExp]",_m=e=>ht(e)&&Object.keys(e).length===0,qn=Object.assign,mye=Object.create,Nt=(e=null)=>mye(e);let CE;const Fi=()=>CE||(CE=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Nt());function xE(e){return e.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const bye=Object.prototype.hasOwnProperty;function Dr(e,t){return bye.call(e,t)}const Yt=Array.isArray,Kt=e=>typeof e=="function",je=e=>typeof e=="string",xt=e=>typeof e=="boolean",Et=e=>e!==null&&typeof e=="object",yye=e=>Et(e)&&Kt(e.then)&&Kt(e.catch),S7=Object.prototype.toString,C7=e=>S7.call(e),ht=e=>{if(!Et(e))return!1;const t=Object.getPrototypeOf(e);return t===null||t.constructor===Object},Sye=e=>e==null?"":Yt(e)||ht(e)&&e.toString===S7?JSON.stringify(e,null,2):String(e);function Cye(e,t=""){return e.reduce((n,o,r)=>r===0?n+o:n+t+o,"")}function Mm(e){let t=e;return()=>++t}function xye(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const wp=e=>!Et(e)||Yt(e);function xg(e,t){if(wp(e)||wp(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:o,des:r}=n.pop();Object.keys(o).forEach(i=>{i!=="__proto__"&&(Et(o[i])&&!Et(r[i])&&(r[i]=Array.isArray(o[i])?[]:Nt()),wp(r[i])||wp(o[i])?r[i]=o[i]:n.push({src:o[i],des:r[i]}))})}}/*! * message-compiler v9.14.4 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */function $ye(e,t,n){return{line:e,column:t,offset:n}}function Nh(e,t,n){return{start:e,end:t}}const wye=/\{([0-9a-zA-Z]+)\}/g;function x7(e,...t){return t.length===1&&Pye(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(wye,(n,o)=>t.hasOwnProperty(o)?t[o]:"")}const $7=Object.assign,$E=e=>typeof e=="string",Pye=e=>e!==null&&typeof e=="object";function w7(e,t=""){return e.reduce((n,o,r)=>r===0?n+o:n+t+o,"")}const L$={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2},Oye={[L$.USE_MODULO_SYNTAX]:"Use modulo before '{{0}}'."};function Iye(e,t,...n){const o=x7(Oye[e],...n||[]),r={message:String(o),code:e};return t&&(r.location=t),r}const ut={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},Tye={[ut.EXPECTED_TOKEN]:"Expected token: '{0}'",[ut.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[ut.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[ut.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[ut.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[ut.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[ut.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[ut.EMPTY_PLACEHOLDER]:"Empty placeholder",[ut.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[ut.INVALID_LINKED_FORMAT]:"Invalid linked format",[ut.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[ut.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[ut.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[ut.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[ut.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[ut.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function uu(e,t,n={}){const{domain:o,messages:r,args:i}=n,a=x7((r||Tye)[e]||"",...i||[]),l=new SyntaxError(String(a));return l.code=e,t&&(l.location=t),l.domain=o,l}function Eye(e){throw e}const Oi=" ",_ye="\r",vo=` -`,Mye="\u2028",Aye="\u2029";function Rye(e){const t=e;let n=0,o=1,r=1,i=0;const a=w=>t[w]===_ye&&t[w+1]===vo,l=w=>t[w]===vo,s=w=>t[w]===Aye,u=w=>t[w]===Mye,c=w=>a(w)||l(w)||s(w)||u(w),d=()=>n,f=()=>o,p=()=>r,v=()=>i,h=w=>a(w)||s(w)||u(w)?vo:t[w],m=()=>h(n),b=()=>h(n+i);function S(){return i=0,c(n)&&(o++,r=0),a(n)&&n++,n++,r++,t[n]}function C(){return a(n+i)&&i++,i++,t[n+i]}function $(){n=0,o=1,r=1,i=0}function x(w=0){i=w}function P(){const w=n+i;for(;w!==n;)S();i=0}return{index:d,line:f,column:p,peekOffset:v,charAt:h,currentChar:m,currentPeek:b,next:S,peek:C,reset:$,resetPeek:x,skipToPeek:P}}const ha=void 0,Dye=".",wE="'",Nye="tokenizer";function kye(e,t={}){const n=t.location!==!1,o=Rye(e),r=()=>o.index(),i=()=>$ye(o.line(),o.column(),o.index()),a=i(),l=r(),s={currentType:14,offset:l,startLoc:a,endLoc:a,lastType:14,lastOffset:l,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},u=()=>s,{onError:c}=t;function d(V,q,ie,...me){const Se=u();if(q.column+=ie,q.offset+=ie,c){const ce=n?Nh(Se.startLoc,q):null,ee=uu(V,ce,{domain:Nye,args:me});c(ee)}}function f(V,q,ie){V.endLoc=i(),V.currentType=q;const me={type:q};return n&&(me.loc=Nh(V.startLoc,V.endLoc)),ie!=null&&(me.value=ie),me}const p=V=>f(V,14);function v(V,q){return V.currentChar()===q?(V.next(),q):(d(ut.EXPECTED_TOKEN,i(),0,q),"")}function h(V){let q="";for(;V.currentPeek()===Oi||V.currentPeek()===vo;)q+=V.currentPeek(),V.peek();return q}function m(V){const q=h(V);return V.skipToPeek(),q}function b(V){if(V===ha)return!1;const q=V.charCodeAt(0);return q>=97&&q<=122||q>=65&&q<=90||q===95}function S(V){if(V===ha)return!1;const q=V.charCodeAt(0);return q>=48&&q<=57}function C(V,q){const{currentType:ie}=q;if(ie!==2)return!1;h(V);const me=b(V.currentPeek());return V.resetPeek(),me}function $(V,q){const{currentType:ie}=q;if(ie!==2)return!1;h(V);const me=V.currentPeek()==="-"?V.peek():V.currentPeek(),Se=S(me);return V.resetPeek(),Se}function x(V,q){const{currentType:ie}=q;if(ie!==2)return!1;h(V);const me=V.currentPeek()===wE;return V.resetPeek(),me}function P(V,q){const{currentType:ie}=q;if(ie!==8)return!1;h(V);const me=V.currentPeek()===".";return V.resetPeek(),me}function w(V,q){const{currentType:ie}=q;if(ie!==9)return!1;h(V);const me=b(V.currentPeek());return V.resetPeek(),me}function O(V,q){const{currentType:ie}=q;if(!(ie===8||ie===12))return!1;h(V);const me=V.currentPeek()===":";return V.resetPeek(),me}function I(V,q){const{currentType:ie}=q;if(ie!==10)return!1;const me=()=>{const ce=V.currentPeek();return ce==="{"?b(V.peek()):ce==="@"||ce==="%"||ce==="|"||ce===":"||ce==="."||ce===Oi||!ce?!1:ce===vo?(V.peek(),me()):A(V,!1)},Se=me();return V.resetPeek(),Se}function _(V){h(V);const q=V.currentPeek()==="|";return V.resetPeek(),q}function T(V){const q=h(V),ie=V.currentPeek()==="%"&&V.peek()==="{";return V.resetPeek(),{isModulo:ie,hasSpace:q.length>0}}function A(V,q=!0){const ie=(Se=!1,ce="",ee=!1)=>{const ue=V.currentPeek();return ue==="{"?ce==="%"?!1:Se:ue==="@"||!ue?ce==="%"?!0:Se:ue==="%"?(V.peek(),ie(Se,"%",!0)):ue==="|"?ce==="%"||ee?!0:!(ce===Oi||ce===vo):ue===Oi?(V.peek(),ie(!0,Oi,ee)):ue===vo?(V.peek(),ie(!0,vo,ee)):!0},me=ie();return q&&V.resetPeek(),me}function R(V,q){const ie=V.currentChar();return ie===ha?ha:q(ie)?(V.next(),ie):null}function H(V){const q=V.charCodeAt(0);return q>=97&&q<=122||q>=65&&q<=90||q>=48&&q<=57||q===95||q===36}function M(V){return R(V,H)}function D(V){const q=V.charCodeAt(0);return q>=97&&q<=122||q>=65&&q<=90||q>=48&&q<=57||q===95||q===36||q===45}function N(V){return R(V,D)}function L(V){const q=V.charCodeAt(0);return q>=48&&q<=57}function F(V){return R(V,L)}function B(V){const q=V.charCodeAt(0);return q>=48&&q<=57||q>=65&&q<=70||q>=97&&q<=102}function j(V){return R(V,B)}function z(V){let q="",ie="";for(;q=F(V);)ie+=q;return ie}function G(V){m(V);const q=V.currentChar();return q!=="%"&&d(ut.EXPECTED_TOKEN,i(),0,q),V.next(),"%"}function Q(V){let q="";for(;;){const ie=V.currentChar();if(ie==="{"||ie==="}"||ie==="@"||ie==="|"||!ie)break;if(ie==="%")if(A(V))q+=ie,V.next();else break;else if(ie===Oi||ie===vo)if(A(V))q+=ie,V.next();else{if(_(V))break;q+=ie,V.next()}else q+=ie,V.next()}return q}function Y(V){m(V);let q="",ie="";for(;q=N(V);)ie+=q;return V.currentChar()===ha&&d(ut.UNTERMINATED_CLOSING_BRACE,i(),0),ie}function oe(V){m(V);let q="";return V.currentChar()==="-"?(V.next(),q+=`-${z(V)}`):q+=z(V),V.currentChar()===ha&&d(ut.UNTERMINATED_CLOSING_BRACE,i(),0),q}function Z(V){return V!==wE&&V!==vo}function re(V){m(V),v(V,"'");let q="",ie="";for(;q=R(V,Z);)q==="\\"?ie+=ne(V):ie+=q;const me=V.currentChar();return me===vo||me===ha?(d(ut.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),me===vo&&(V.next(),v(V,"'")),ie):(v(V,"'"),ie)}function ne(V){const q=V.currentChar();switch(q){case"\\":case"'":return V.next(),`\\${q}`;case"u":return X(V,q,4);case"U":return X(V,q,6);default:return d(ut.UNKNOWN_ESCAPE_SEQUENCE,i(),0,q),""}}function X(V,q,ie){v(V,q);let me="";for(let Se=0;Se{const me=V.currentChar();return me==="{"||me==="%"||me==="@"||me==="|"||me==="("||me===")"||!me||me===Oi?ie:(ie+=me,V.next(),q(ie))};return q("")}function de(V){m(V);const q=v(V,"|");return m(V),q}function fe(V,q){let ie=null;switch(V.currentChar()){case"{":return q.braceNest>=1&&d(ut.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),V.next(),ie=f(q,2,"{"),m(V),q.braceNest++,ie;case"}":return q.braceNest>0&&q.currentType===2&&d(ut.EMPTY_PLACEHOLDER,i(),0),V.next(),ie=f(q,3,"}"),q.braceNest--,q.braceNest>0&&m(V),q.inLinked&&q.braceNest===0&&(q.inLinked=!1),ie;case"@":return q.braceNest>0&&d(ut.UNTERMINATED_CLOSING_BRACE,i(),0),ie=pe(V,q)||p(q),q.braceNest=0,ie;default:{let Se=!0,ce=!0,ee=!0;if(_(V))return q.braceNest>0&&d(ut.UNTERMINATED_CLOSING_BRACE,i(),0),ie=f(q,1,de(V)),q.braceNest=0,q.inLinked=!1,ie;if(q.braceNest>0&&(q.currentType===5||q.currentType===6||q.currentType===7))return d(ut.UNTERMINATED_CLOSING_BRACE,i(),0),q.braceNest=0,ve(V,q);if(Se=C(V,q))return ie=f(q,5,Y(V)),m(V),ie;if(ce=$(V,q))return ie=f(q,6,oe(V)),m(V),ie;if(ee=x(V,q))return ie=f(q,7,re(V)),m(V),ie;if(!Se&&!ce&&!ee)return ie=f(q,13,W(V)),d(ut.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,ie.value),m(V),ie;break}}return ie}function pe(V,q){const{currentType:ie}=q;let me=null;const Se=V.currentChar();switch((ie===8||ie===9||ie===12||ie===10)&&(Se===vo||Se===Oi)&&d(ut.INVALID_LINKED_FORMAT,i(),0),Se){case"@":return V.next(),me=f(q,8,"@"),q.inLinked=!0,me;case".":return m(V),V.next(),f(q,9,".");case":":return m(V),V.next(),f(q,10,":");default:return _(V)?(me=f(q,1,de(V)),q.braceNest=0,q.inLinked=!1,me):P(V,q)||O(V,q)?(m(V),pe(V,q)):w(V,q)?(m(V),f(q,12,U(V))):I(V,q)?(m(V),Se==="{"?fe(V,q)||me:f(q,11,J(V))):(ie===8&&d(ut.INVALID_LINKED_FORMAT,i(),0),q.braceNest=0,q.inLinked=!1,ve(V,q))}}function ve(V,q){let ie={type:14};if(q.braceNest>0)return fe(V,q)||p(q);if(q.inLinked)return pe(V,q)||p(q);switch(V.currentChar()){case"{":return fe(V,q)||p(q);case"}":return d(ut.UNBALANCED_CLOSING_BRACE,i(),0),V.next(),f(q,3,"}");case"@":return pe(V,q)||p(q);default:{if(_(V))return ie=f(q,1,de(V)),q.braceNest=0,q.inLinked=!1,ie;const{isModulo:Se,hasSpace:ce}=T(V);if(Se)return ce?f(q,0,Q(V)):f(q,4,G(V));if(A(V))return f(q,0,Q(V));break}}return ie}function he(){const{currentType:V,offset:q,startLoc:ie,endLoc:me}=s;return s.lastType=V,s.lastOffset=q,s.lastStartLoc=ie,s.lastEndLoc=me,s.offset=r(),s.startLoc=i(),o.currentChar()===ha?f(s,14):ve(o,s)}return{nextToken:he,currentOffset:r,currentPosition:i,context:u}}const Lye="parser",Fye=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function Bye(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const o=parseInt(t||n,16);return o<=55295||o>=57344?String.fromCodePoint(o):"�"}}}function Hye(e={}){const t=e.location!==!1,{onError:n,onWarn:o}=e;function r(C,$,x,P,...w){const O=C.currentPosition();if(O.offset+=P,O.column+=P,n){const I=t?Nh(x,O):null,_=uu($,I,{domain:Lye,args:w});n(_)}}function i(C,$,x,P,...w){const O=C.currentPosition();if(O.offset+=P,O.column+=P,o){const I=t?Nh(x,O):null;o(Iye($,I,w))}}function a(C,$,x){const P={type:C};return t&&(P.start=$,P.end=$,P.loc={start:x,end:x}),P}function l(C,$,x,P){t&&(C.end=$,C.loc&&(C.loc.end=x))}function s(C,$){const x=C.context(),P=a(3,x.offset,x.startLoc);return P.value=$,l(P,C.currentOffset(),C.currentPosition()),P}function u(C,$){const x=C.context(),{lastOffset:P,lastStartLoc:w}=x,O=a(5,P,w);return O.index=parseInt($,10),C.nextToken(),l(O,C.currentOffset(),C.currentPosition()),O}function c(C,$,x){const P=C.context(),{lastOffset:w,lastStartLoc:O}=P,I=a(4,w,O);return I.key=$,x===!0&&(I.modulo=!0),C.nextToken(),l(I,C.currentOffset(),C.currentPosition()),I}function d(C,$){const x=C.context(),{lastOffset:P,lastStartLoc:w}=x,O=a(9,P,w);return O.value=$.replace(Fye,Bye),C.nextToken(),l(O,C.currentOffset(),C.currentPosition()),O}function f(C){const $=C.nextToken(),x=C.context(),{lastOffset:P,lastStartLoc:w}=x,O=a(8,P,w);return $.type!==12?(r(C,ut.UNEXPECTED_EMPTY_LINKED_MODIFIER,x.lastStartLoc,0),O.value="",l(O,P,w),{nextConsumeToken:$,node:O}):($.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,_r($)),O.value=$.value||"",l(O,C.currentOffset(),C.currentPosition()),{node:O})}function p(C,$){const x=C.context(),P=a(7,x.offset,x.startLoc);return P.value=$,l(P,C.currentOffset(),C.currentPosition()),P}function v(C){const $=C.context(),x=a(6,$.offset,$.startLoc);let P=C.nextToken();if(P.type===9){const w=f(C);x.modifier=w.node,P=w.nextConsumeToken||C.nextToken()}switch(P.type!==10&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(P)),P=C.nextToken(),P.type===2&&(P=C.nextToken()),P.type){case 11:P.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(P)),x.key=p(C,P.value||"");break;case 5:P.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(P)),x.key=c(C,P.value||"");break;case 6:P.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(P)),x.key=u(C,P.value||"");break;case 7:P.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(P)),x.key=d(C,P.value||"");break;default:{r(C,ut.UNEXPECTED_EMPTY_LINKED_KEY,$.lastStartLoc,0);const w=C.context(),O=a(7,w.offset,w.startLoc);return O.value="",l(O,w.offset,w.startLoc),x.key=O,l(x,w.offset,w.startLoc),{nextConsumeToken:P,node:x}}}return l(x,C.currentOffset(),C.currentPosition()),{node:x}}function h(C){const $=C.context(),x=$.currentType===1?C.currentOffset():$.offset,P=$.currentType===1?$.endLoc:$.startLoc,w=a(2,x,P);w.items=[];let O=null,I=null;do{const A=O||C.nextToken();switch(O=null,A.type){case 0:A.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(A)),w.items.push(s(C,A.value||""));break;case 6:A.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(A)),w.items.push(u(C,A.value||""));break;case 4:I=!0;break;case 5:A.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(A)),w.items.push(c(C,A.value||"",!!I)),I&&(i(C,L$.USE_MODULO_SYNTAX,$.lastStartLoc,0,_r(A)),I=null);break;case 7:A.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(A)),w.items.push(d(C,A.value||""));break;case 8:{const R=v(C);w.items.push(R.node),O=R.nextConsumeToken||null;break}}}while($.currentType!==14&&$.currentType!==1);const _=$.currentType===1?$.lastOffset:C.currentOffset(),T=$.currentType===1?$.lastEndLoc:C.currentPosition();return l(w,_,T),w}function m(C,$,x,P){const w=C.context();let O=P.items.length===0;const I=a(1,$,x);I.cases=[],I.cases.push(P);do{const _=h(C);O||(O=_.items.length===0),I.cases.push(_)}while(w.currentType!==14);return O&&r(C,ut.MUST_HAVE_MESSAGES_IN_PLURAL,x,0),l(I,C.currentOffset(),C.currentPosition()),I}function b(C){const $=C.context(),{offset:x,startLoc:P}=$,w=h(C);return $.currentType===14?w:m(C,x,P,w)}function S(C){const $=kye(C,$7({},e)),x=$.context(),P=a(0,x.offset,x.startLoc);return t&&P.loc&&(P.loc.source=C),P.body=b($),e.onCacheKey&&(P.cacheKey=e.onCacheKey(C)),x.currentType!==14&&r($,ut.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,C[x.offset]||""),l(P,$.currentOffset(),$.currentPosition()),P}return{parse:S}}function _r(e){if(e.type===14)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function zye(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:i=>(n.helpers.add(i),i)}}function PE(e,t){for(let n=0;nOE(n)),e}function OE(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;na;function s(h,m){a.code+=h}function u(h,m=!0){const b=m?o:"";s(r?b+" ".repeat(h):b)}function c(h=!0){const m=++a.indentLevel;h&&u(m)}function d(h=!0){const m=--a.indentLevel;h&&u(m)}function f(){u(a.indentLevel)}return{context:l,push:s,indent:c,deindent:d,newline:f,helper:h=>`_${h}`,needIndent:()=>a.needIndent}}function Gye(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Mc(e,t.key),t.modifier?(e.push(", "),Mc(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function Xye(e,t){const{helper:n,needIndent:o}=e;e.push(`${n("normalize")}([`),e.indent(o());const r=t.items.length;for(let i=0;i1){e.push(`${n("plural")}([`),e.indent(o());const r=t.cases.length;for(let i=0;i{const n=$E(t.mode)?t.mode:"normal",o=$E(t.filename)?t.filename:"message.intl";t.sourceMap;const r=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` + */function $ye(e,t,n){return{line:e,column:t,offset:n}}function Dh(e,t,n){return{start:e,end:t}}const wye=/\{([0-9a-zA-Z]+)\}/g;function x7(e,...t){return t.length===1&&Pye(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(wye,(n,o)=>t.hasOwnProperty(o)?t[o]:"")}const $7=Object.assign,$E=e=>typeof e=="string",Pye=e=>e!==null&&typeof e=="object";function w7(e,t=""){return e.reduce((n,o,r)=>r===0?n+o:n+t+o,"")}const L$={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2},Oye={[L$.USE_MODULO_SYNTAX]:"Use modulo before '{{0}}'."};function Iye(e,t,...n){const o=x7(Oye[e],...n||[]),r={message:String(o),code:e};return t&&(r.location=t),r}const ut={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},Tye={[ut.EXPECTED_TOKEN]:"Expected token: '{0}'",[ut.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[ut.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[ut.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[ut.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[ut.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[ut.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[ut.EMPTY_PLACEHOLDER]:"Empty placeholder",[ut.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[ut.INVALID_LINKED_FORMAT]:"Invalid linked format",[ut.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[ut.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[ut.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[ut.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[ut.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[ut.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function uu(e,t,n={}){const{domain:o,messages:r,args:i}=n,a=x7((r||Tye)[e]||"",...i||[]),l=new SyntaxError(String(a));return l.code=e,t&&(l.location=t),l.domain=o,l}function Eye(e){throw e}const Oi=" ",_ye="\r",vo=` +`,Mye="\u2028",Aye="\u2029";function Rye(e){const t=e;let n=0,o=1,r=1,i=0;const a=w=>t[w]===_ye&&t[w+1]===vo,l=w=>t[w]===vo,s=w=>t[w]===Aye,u=w=>t[w]===Mye,c=w=>a(w)||l(w)||s(w)||u(w),d=()=>n,f=()=>o,p=()=>r,v=()=>i,h=w=>a(w)||s(w)||u(w)?vo:t[w],m=()=>h(n),b=()=>h(n+i);function S(){return i=0,c(n)&&(o++,r=0),a(n)&&n++,n++,r++,t[n]}function C(){return a(n+i)&&i++,i++,t[n+i]}function $(){n=0,o=1,r=1,i=0}function x(w=0){i=w}function P(){const w=n+i;for(;w!==n;)S();i=0}return{index:d,line:f,column:p,peekOffset:v,charAt:h,currentChar:m,currentPeek:b,next:S,peek:C,reset:$,resetPeek:x,skipToPeek:P}}const ha=void 0,Dye=".",wE="'",Nye="tokenizer";function kye(e,t={}){const n=t.location!==!1,o=Rye(e),r=()=>o.index(),i=()=>$ye(o.line(),o.column(),o.index()),a=i(),l=r(),s={currentType:14,offset:l,startLoc:a,endLoc:a,lastType:14,lastOffset:l,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},u=()=>s,{onError:c}=t;function d(V,q,ie,...me){const Se=u();if(q.column+=ie,q.offset+=ie,c){const ce=n?Dh(Se.startLoc,q):null,ee=uu(V,ce,{domain:Nye,args:me});c(ee)}}function f(V,q,ie){V.endLoc=i(),V.currentType=q;const me={type:q};return n&&(me.loc=Dh(V.startLoc,V.endLoc)),ie!=null&&(me.value=ie),me}const p=V=>f(V,14);function v(V,q){return V.currentChar()===q?(V.next(),q):(d(ut.EXPECTED_TOKEN,i(),0,q),"")}function h(V){let q="";for(;V.currentPeek()===Oi||V.currentPeek()===vo;)q+=V.currentPeek(),V.peek();return q}function m(V){const q=h(V);return V.skipToPeek(),q}function b(V){if(V===ha)return!1;const q=V.charCodeAt(0);return q>=97&&q<=122||q>=65&&q<=90||q===95}function S(V){if(V===ha)return!1;const q=V.charCodeAt(0);return q>=48&&q<=57}function C(V,q){const{currentType:ie}=q;if(ie!==2)return!1;h(V);const me=b(V.currentPeek());return V.resetPeek(),me}function $(V,q){const{currentType:ie}=q;if(ie!==2)return!1;h(V);const me=V.currentPeek()==="-"?V.peek():V.currentPeek(),Se=S(me);return V.resetPeek(),Se}function x(V,q){const{currentType:ie}=q;if(ie!==2)return!1;h(V);const me=V.currentPeek()===wE;return V.resetPeek(),me}function P(V,q){const{currentType:ie}=q;if(ie!==8)return!1;h(V);const me=V.currentPeek()===".";return V.resetPeek(),me}function w(V,q){const{currentType:ie}=q;if(ie!==9)return!1;h(V);const me=b(V.currentPeek());return V.resetPeek(),me}function O(V,q){const{currentType:ie}=q;if(!(ie===8||ie===12))return!1;h(V);const me=V.currentPeek()===":";return V.resetPeek(),me}function I(V,q){const{currentType:ie}=q;if(ie!==10)return!1;const me=()=>{const ce=V.currentPeek();return ce==="{"?b(V.peek()):ce==="@"||ce==="%"||ce==="|"||ce===":"||ce==="."||ce===Oi||!ce?!1:ce===vo?(V.peek(),me()):A(V,!1)},Se=me();return V.resetPeek(),Se}function _(V){h(V);const q=V.currentPeek()==="|";return V.resetPeek(),q}function T(V){const q=h(V),ie=V.currentPeek()==="%"&&V.peek()==="{";return V.resetPeek(),{isModulo:ie,hasSpace:q.length>0}}function A(V,q=!0){const ie=(Se=!1,ce="",ee=!1)=>{const ue=V.currentPeek();return ue==="{"?ce==="%"?!1:Se:ue==="@"||!ue?ce==="%"?!0:Se:ue==="%"?(V.peek(),ie(Se,"%",!0)):ue==="|"?ce==="%"||ee?!0:!(ce===Oi||ce===vo):ue===Oi?(V.peek(),ie(!0,Oi,ee)):ue===vo?(V.peek(),ie(!0,vo,ee)):!0},me=ie();return q&&V.resetPeek(),me}function R(V,q){const ie=V.currentChar();return ie===ha?ha:q(ie)?(V.next(),ie):null}function H(V){const q=V.charCodeAt(0);return q>=97&&q<=122||q>=65&&q<=90||q>=48&&q<=57||q===95||q===36}function M(V){return R(V,H)}function D(V){const q=V.charCodeAt(0);return q>=97&&q<=122||q>=65&&q<=90||q>=48&&q<=57||q===95||q===36||q===45}function N(V){return R(V,D)}function L(V){const q=V.charCodeAt(0);return q>=48&&q<=57}function F(V){return R(V,L)}function B(V){const q=V.charCodeAt(0);return q>=48&&q<=57||q>=65&&q<=70||q>=97&&q<=102}function j(V){return R(V,B)}function z(V){let q="",ie="";for(;q=F(V);)ie+=q;return ie}function G(V){m(V);const q=V.currentChar();return q!=="%"&&d(ut.EXPECTED_TOKEN,i(),0,q),V.next(),"%"}function Q(V){let q="";for(;;){const ie=V.currentChar();if(ie==="{"||ie==="}"||ie==="@"||ie==="|"||!ie)break;if(ie==="%")if(A(V))q+=ie,V.next();else break;else if(ie===Oi||ie===vo)if(A(V))q+=ie,V.next();else{if(_(V))break;q+=ie,V.next()}else q+=ie,V.next()}return q}function Y(V){m(V);let q="",ie="";for(;q=N(V);)ie+=q;return V.currentChar()===ha&&d(ut.UNTERMINATED_CLOSING_BRACE,i(),0),ie}function oe(V){m(V);let q="";return V.currentChar()==="-"?(V.next(),q+=`-${z(V)}`):q+=z(V),V.currentChar()===ha&&d(ut.UNTERMINATED_CLOSING_BRACE,i(),0),q}function Z(V){return V!==wE&&V!==vo}function re(V){m(V),v(V,"'");let q="",ie="";for(;q=R(V,Z);)q==="\\"?ie+=ne(V):ie+=q;const me=V.currentChar();return me===vo||me===ha?(d(ut.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),me===vo&&(V.next(),v(V,"'")),ie):(v(V,"'"),ie)}function ne(V){const q=V.currentChar();switch(q){case"\\":case"'":return V.next(),`\\${q}`;case"u":return X(V,q,4);case"U":return X(V,q,6);default:return d(ut.UNKNOWN_ESCAPE_SEQUENCE,i(),0,q),""}}function X(V,q,ie){v(V,q);let me="";for(let Se=0;Se{const me=V.currentChar();return me==="{"||me==="%"||me==="@"||me==="|"||me==="("||me===")"||!me||me===Oi?ie:(ie+=me,V.next(),q(ie))};return q("")}function de(V){m(V);const q=v(V,"|");return m(V),q}function fe(V,q){let ie=null;switch(V.currentChar()){case"{":return q.braceNest>=1&&d(ut.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),V.next(),ie=f(q,2,"{"),m(V),q.braceNest++,ie;case"}":return q.braceNest>0&&q.currentType===2&&d(ut.EMPTY_PLACEHOLDER,i(),0),V.next(),ie=f(q,3,"}"),q.braceNest--,q.braceNest>0&&m(V),q.inLinked&&q.braceNest===0&&(q.inLinked=!1),ie;case"@":return q.braceNest>0&&d(ut.UNTERMINATED_CLOSING_BRACE,i(),0),ie=pe(V,q)||p(q),q.braceNest=0,ie;default:{let Se=!0,ce=!0,ee=!0;if(_(V))return q.braceNest>0&&d(ut.UNTERMINATED_CLOSING_BRACE,i(),0),ie=f(q,1,de(V)),q.braceNest=0,q.inLinked=!1,ie;if(q.braceNest>0&&(q.currentType===5||q.currentType===6||q.currentType===7))return d(ut.UNTERMINATED_CLOSING_BRACE,i(),0),q.braceNest=0,ve(V,q);if(Se=C(V,q))return ie=f(q,5,Y(V)),m(V),ie;if(ce=$(V,q))return ie=f(q,6,oe(V)),m(V),ie;if(ee=x(V,q))return ie=f(q,7,re(V)),m(V),ie;if(!Se&&!ce&&!ee)return ie=f(q,13,W(V)),d(ut.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,ie.value),m(V),ie;break}}return ie}function pe(V,q){const{currentType:ie}=q;let me=null;const Se=V.currentChar();switch((ie===8||ie===9||ie===12||ie===10)&&(Se===vo||Se===Oi)&&d(ut.INVALID_LINKED_FORMAT,i(),0),Se){case"@":return V.next(),me=f(q,8,"@"),q.inLinked=!0,me;case".":return m(V),V.next(),f(q,9,".");case":":return m(V),V.next(),f(q,10,":");default:return _(V)?(me=f(q,1,de(V)),q.braceNest=0,q.inLinked=!1,me):P(V,q)||O(V,q)?(m(V),pe(V,q)):w(V,q)?(m(V),f(q,12,U(V))):I(V,q)?(m(V),Se==="{"?fe(V,q)||me:f(q,11,J(V))):(ie===8&&d(ut.INVALID_LINKED_FORMAT,i(),0),q.braceNest=0,q.inLinked=!1,ve(V,q))}}function ve(V,q){let ie={type:14};if(q.braceNest>0)return fe(V,q)||p(q);if(q.inLinked)return pe(V,q)||p(q);switch(V.currentChar()){case"{":return fe(V,q)||p(q);case"}":return d(ut.UNBALANCED_CLOSING_BRACE,i(),0),V.next(),f(q,3,"}");case"@":return pe(V,q)||p(q);default:{if(_(V))return ie=f(q,1,de(V)),q.braceNest=0,q.inLinked=!1,ie;const{isModulo:Se,hasSpace:ce}=T(V);if(Se)return ce?f(q,0,Q(V)):f(q,4,G(V));if(A(V))return f(q,0,Q(V));break}}return ie}function he(){const{currentType:V,offset:q,startLoc:ie,endLoc:me}=s;return s.lastType=V,s.lastOffset=q,s.lastStartLoc=ie,s.lastEndLoc=me,s.offset=r(),s.startLoc=i(),o.currentChar()===ha?f(s,14):ve(o,s)}return{nextToken:he,currentOffset:r,currentPosition:i,context:u}}const Lye="parser",Fye=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function Bye(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const o=parseInt(t||n,16);return o<=55295||o>=57344?String.fromCodePoint(o):"�"}}}function Hye(e={}){const t=e.location!==!1,{onError:n,onWarn:o}=e;function r(C,$,x,P,...w){const O=C.currentPosition();if(O.offset+=P,O.column+=P,n){const I=t?Dh(x,O):null,_=uu($,I,{domain:Lye,args:w});n(_)}}function i(C,$,x,P,...w){const O=C.currentPosition();if(O.offset+=P,O.column+=P,o){const I=t?Dh(x,O):null;o(Iye($,I,w))}}function a(C,$,x){const P={type:C};return t&&(P.start=$,P.end=$,P.loc={start:x,end:x}),P}function l(C,$,x,P){t&&(C.end=$,C.loc&&(C.loc.end=x))}function s(C,$){const x=C.context(),P=a(3,x.offset,x.startLoc);return P.value=$,l(P,C.currentOffset(),C.currentPosition()),P}function u(C,$){const x=C.context(),{lastOffset:P,lastStartLoc:w}=x,O=a(5,P,w);return O.index=parseInt($,10),C.nextToken(),l(O,C.currentOffset(),C.currentPosition()),O}function c(C,$,x){const P=C.context(),{lastOffset:w,lastStartLoc:O}=P,I=a(4,w,O);return I.key=$,x===!0&&(I.modulo=!0),C.nextToken(),l(I,C.currentOffset(),C.currentPosition()),I}function d(C,$){const x=C.context(),{lastOffset:P,lastStartLoc:w}=x,O=a(9,P,w);return O.value=$.replace(Fye,Bye),C.nextToken(),l(O,C.currentOffset(),C.currentPosition()),O}function f(C){const $=C.nextToken(),x=C.context(),{lastOffset:P,lastStartLoc:w}=x,O=a(8,P,w);return $.type!==12?(r(C,ut.UNEXPECTED_EMPTY_LINKED_MODIFIER,x.lastStartLoc,0),O.value="",l(O,P,w),{nextConsumeToken:$,node:O}):($.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,_r($)),O.value=$.value||"",l(O,C.currentOffset(),C.currentPosition()),{node:O})}function p(C,$){const x=C.context(),P=a(7,x.offset,x.startLoc);return P.value=$,l(P,C.currentOffset(),C.currentPosition()),P}function v(C){const $=C.context(),x=a(6,$.offset,$.startLoc);let P=C.nextToken();if(P.type===9){const w=f(C);x.modifier=w.node,P=w.nextConsumeToken||C.nextToken()}switch(P.type!==10&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(P)),P=C.nextToken(),P.type===2&&(P=C.nextToken()),P.type){case 11:P.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(P)),x.key=p(C,P.value||"");break;case 5:P.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(P)),x.key=c(C,P.value||"");break;case 6:P.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(P)),x.key=u(C,P.value||"");break;case 7:P.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(P)),x.key=d(C,P.value||"");break;default:{r(C,ut.UNEXPECTED_EMPTY_LINKED_KEY,$.lastStartLoc,0);const w=C.context(),O=a(7,w.offset,w.startLoc);return O.value="",l(O,w.offset,w.startLoc),x.key=O,l(x,w.offset,w.startLoc),{nextConsumeToken:P,node:x}}}return l(x,C.currentOffset(),C.currentPosition()),{node:x}}function h(C){const $=C.context(),x=$.currentType===1?C.currentOffset():$.offset,P=$.currentType===1?$.endLoc:$.startLoc,w=a(2,x,P);w.items=[];let O=null,I=null;do{const A=O||C.nextToken();switch(O=null,A.type){case 0:A.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(A)),w.items.push(s(C,A.value||""));break;case 6:A.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(A)),w.items.push(u(C,A.value||""));break;case 4:I=!0;break;case 5:A.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(A)),w.items.push(c(C,A.value||"",!!I)),I&&(i(C,L$.USE_MODULO_SYNTAX,$.lastStartLoc,0,_r(A)),I=null);break;case 7:A.value==null&&r(C,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,_r(A)),w.items.push(d(C,A.value||""));break;case 8:{const R=v(C);w.items.push(R.node),O=R.nextConsumeToken||null;break}}}while($.currentType!==14&&$.currentType!==1);const _=$.currentType===1?$.lastOffset:C.currentOffset(),T=$.currentType===1?$.lastEndLoc:C.currentPosition();return l(w,_,T),w}function m(C,$,x,P){const w=C.context();let O=P.items.length===0;const I=a(1,$,x);I.cases=[],I.cases.push(P);do{const _=h(C);O||(O=_.items.length===0),I.cases.push(_)}while(w.currentType!==14);return O&&r(C,ut.MUST_HAVE_MESSAGES_IN_PLURAL,x,0),l(I,C.currentOffset(),C.currentPosition()),I}function b(C){const $=C.context(),{offset:x,startLoc:P}=$,w=h(C);return $.currentType===14?w:m(C,x,P,w)}function S(C){const $=kye(C,$7({},e)),x=$.context(),P=a(0,x.offset,x.startLoc);return t&&P.loc&&(P.loc.source=C),P.body=b($),e.onCacheKey&&(P.cacheKey=e.onCacheKey(C)),x.currentType!==14&&r($,ut.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,C[x.offset]||""),l(P,$.currentOffset(),$.currentPosition()),P}return{parse:S}}function _r(e){if(e.type===14)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function zye(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:i=>(n.helpers.add(i),i)}}function PE(e,t){for(let n=0;nOE(n)),e}function OE(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;na;function s(h,m){a.code+=h}function u(h,m=!0){const b=m?o:"";s(r?b+" ".repeat(h):b)}function c(h=!0){const m=++a.indentLevel;h&&u(m)}function d(h=!0){const m=--a.indentLevel;h&&u(m)}function f(){u(a.indentLevel)}return{context:l,push:s,indent:c,deindent:d,newline:f,helper:h=>`_${h}`,needIndent:()=>a.needIndent}}function Gye(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Mc(e,t.key),t.modifier?(e.push(", "),Mc(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function Xye(e,t){const{helper:n,needIndent:o}=e;e.push(`${n("normalize")}([`),e.indent(o());const r=t.items.length;for(let i=0;i1){e.push(`${n("plural")}([`),e.indent(o());const r=t.cases.length;for(let i=0;i{const n=$E(t.mode)?t.mode:"normal",o=$E(t.filename)?t.filename:"message.intl";t.sourceMap;const r=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` `,i=t.needIndent?t.needIndent:n!=="arrow",a=e.helpers||[],l=Uye(e,{filename:o,breakLineCode:r,needIndent:i});l.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(i),a.length>0&&(l.push(`const { ${w7(a.map(c=>`${c}: _${c}`),", ")} } = ctx`),l.newline()),l.push("return "),Mc(l,e),l.deindent(i),l.push("}"),delete e.helpers;const{code:s,map:u}=l.context();return{ast:e,code:s,map:u?u.toJSON():void 0}};function Zye(e,t={}){const n=$7({},t),o=!!n.jit,r=!!n.minify,i=n.optimize==null?!0:n.optimize,l=Hye(n).parse(e);return o?(i&&Wye(l),r&&zs(l),{ast:l,code:""}):(jye(l,n),Jye(l,n))}/*! * core-base v9.14.4 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */function Qye(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Fi().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Fi().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Fi().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function fi(e){return Et(e)&&B$(e)===0&&(Dr(e,"b")||Dr(e,"body"))}const P7=["b","body"];function e1e(e){return el(e,P7)}const O7=["c","cases"];function t1e(e){return el(e,O7,[])}const I7=["s","static"];function n1e(e){return el(e,I7)}const T7=["i","items"];function o1e(e){return el(e,T7,[])}const E7=["t","type"];function B$(e){return el(e,E7)}const _7=["v","value"];function Pp(e,t){const n=el(e,_7);if(n!=null)return n;throw Zd(t)}const M7=["m","modifier"];function r1e(e){return el(e,M7)}const A7=["k","key"];function i1e(e){const t=el(e,A7);if(t)return t;throw Zd(6)}function el(e,t,n){for(let o=0;o{a===void 0?a=l:a+=l},f[1]=()=>{a!==void 0&&(t.push(a),a=void 0)},f[2]=()=>{f[0](),r++},f[3]=()=>{if(r>0)r--,o=4,f[0]();else{if(r=0,a===void 0||(a=u1e(a),a===!1))return!1;f[1]()}};function p(){const v=e[n+1];if(o===5&&v==="'"||o===6&&v==='"')return n++,l="\\"+v,f[0](),!0}for(;o!==null;)if(n++,i=e[n],!(i==="\\"&&p())){if(s=c1e(i),d=tl[o],u=d[s]||d.l||8,u===8||(o=u[0],u[1]!==void 0&&(c=f[u[1]],c&&(l=i,c()===!1))))return;if(o===7)return t}}const IE=new Map;function f1e(e,t){return Et(e)?e[t]:null}function p1e(e,t){if(!Et(e))return null;let n=IE.get(t);if(n||(n=d1e(t),n&&IE.set(t,n)),!n)return null;const o=n.length;let r=e,i=0;for(;ie,h1e=e=>"",v1e="text",m1e=e=>e.length===0?"":Cye(e),b1e=Sye;function TE(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function y1e(e){const t=vn(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(vn(e.named.count)||vn(e.named.n))?vn(e.named.count)?e.named.count:vn(e.named.n)?e.named.n:t:t}function S1e(e,t){t.count||(t.count=e),t.n||(t.n=e)}function C1e(e={}){const t=e.locale,n=y1e(e),o=Et(e.pluralRules)&&je(t)&&Kt(e.pluralRules[t])?e.pluralRules[t]:TE,r=Et(e.pluralRules)&&je(t)&&Kt(e.pluralRules[t])?TE:void 0,i=b=>b[o(n,b.length,r)],a=e.list||[],l=b=>a[b],s=e.named||Nt();vn(e.pluralIndex)&&S1e(n,s);const u=b=>s[b];function c(b){const S=Kt(e.messages)?e.messages(b):Et(e.messages)?e.messages[b]:!1;return S||(e.parent?e.parent.message(b):h1e)}const d=b=>e.modifiers?e.modifiers[b]:g1e,f=ht(e.processor)&&Kt(e.processor.normalize)?e.processor.normalize:m1e,p=ht(e.processor)&&Kt(e.processor.interpolate)?e.processor.interpolate:b1e,v=ht(e.processor)&&je(e.processor.type)?e.processor.type:v1e,m={list:l,named:u,plural:i,linked:(b,...S)=>{const[C,$]=S;let x="text",P="";S.length===1?Et(C)?(P=C.modifier||P,x=C.type||x):je(C)&&(P=C||P):S.length===2&&(je(C)&&(P=C||P),je($)&&(x=$||x));const w=c(b)(m),O=x==="vnode"&&Yt(w)&&P?w[0]:w;return P?d(P)(O,x):O},message:c,type:v,interpolate:p,normalize:f,values:qn(Nt(),a,s)};return m}let Qd=null;function x1e(e){Qd=e}function $1e(e,t,n){Qd&&Qd.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const w1e=P1e("function:translate");function P1e(e){return t=>Qd&&Qd.emit(e,t)}const O1e=L$.__EXTEND_POINT__,pl=Am(O1e),I1e={FALLBACK_TO_TRANSLATE:pl(),CANNOT_FORMAT_NUMBER:pl(),FALLBACK_TO_NUMBER_FORMAT:pl(),CANNOT_FORMAT_DATE:pl(),FALLBACK_TO_DATE_FORMAT:pl(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:pl(),__EXTEND_POINT__:pl()},D7=ut.__EXTEND_POINT__,gl=Am(D7),Nr={INVALID_ARGUMENT:D7,INVALID_DATE_ARGUMENT:gl(),INVALID_ISO_DATE_ARGUMENT:gl(),NOT_SUPPORT_NON_STRING_MESSAGE:gl(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:gl(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:gl(),NOT_SUPPORT_LOCALE_TYPE:gl(),__EXTEND_POINT__:gl()};function si(e){return uu(e,null,void 0)}function H$(e,t){return t.locale!=null?EE(t.locale):EE(e.locale)}let Ib;function EE(e){if(je(e))return e;if(Kt(e)){if(e.resolvedOnce&&Ib!=null)return Ib;if(e.constructor.name==="Function"){const t=e();if(yye(t))throw si(Nr.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Ib=t}else throw si(Nr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw si(Nr.NOT_SUPPORT_LOCALE_TYPE)}function T1e(e,t,n){return[...new Set([n,...Yt(t)?t:Et(t)?Object.keys(t):je(t)?[t]:[n]])]}function N7(e,t,n){const o=je(n)?n:Ac,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let i=r.__localeChainCache.get(o);if(!i){i=[];let a=[n];for(;Yt(a);)a=_E(i,a,t);const l=Yt(t)||!ht(t)?t:t.default?t.default:null;a=je(l)?[l]:l,Yt(a)&&_E(i,a,!1),r.__localeChainCache.set(o,i)}return i}function _E(e,t,n){let o=!0;for(let r=0;r`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function A1e(){return{upper:(e,t)=>t==="text"&&je(e)?e.toUpperCase():t==="vnode"&&Et(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&je(e)?e.toLowerCase():t==="vnode"&&Et(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&je(e)?AE(e):t==="vnode"&&Et(e)&&"__v_isVNode"in e?AE(e.children):e}}let k7;function RE(e){k7=e}let L7;function R1e(e){L7=e}let F7;function D1e(e){F7=e}let B7=null;const N1e=e=>{B7=e},k1e=()=>B7;let H7=null;const DE=e=>{H7=e},L1e=()=>H7;let NE=0;function F1e(e={}){const t=Kt(e.onWarn)?e.onWarn:xye,n=je(e.version)?e.version:M1e,o=je(e.locale)||Kt(e.locale)?e.locale:Ac,r=Kt(o)?Ac:o,i=Yt(e.fallbackLocale)||ht(e.fallbackLocale)||je(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:r,a=ht(e.messages)?e.messages:Tb(r),l=ht(e.datetimeFormats)?e.datetimeFormats:Tb(r),s=ht(e.numberFormats)?e.numberFormats:Tb(r),u=qn(Nt(),e.modifiers,A1e()),c=e.pluralRules||Nt(),d=Kt(e.missing)?e.missing:null,f=xt(e.missingWarn)||za(e.missingWarn)?e.missingWarn:!0,p=xt(e.fallbackWarn)||za(e.fallbackWarn)?e.fallbackWarn:!0,v=!!e.fallbackFormat,h=!!e.unresolving,m=Kt(e.postTranslation)?e.postTranslation:null,b=ht(e.processor)?e.processor:null,S=xt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,C=!!e.escapeParameter,$=Kt(e.messageCompiler)?e.messageCompiler:k7,x=Kt(e.messageResolver)?e.messageResolver:L7||f1e,P=Kt(e.localeFallbacker)?e.localeFallbacker:F7||T1e,w=Et(e.fallbackContext)?e.fallbackContext:void 0,O=e,I=Et(O.__datetimeFormatters)?O.__datetimeFormatters:new Map,_=Et(O.__numberFormatters)?O.__numberFormatters:new Map,T=Et(O.__meta)?O.__meta:{};NE++;const A={version:n,cid:NE,locale:o,fallbackLocale:i,messages:a,modifiers:u,pluralRules:c,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:v,unresolving:h,postTranslation:m,processor:b,warnHtmlMessage:S,escapeParameter:C,messageCompiler:$,messageResolver:x,localeFallbacker:P,fallbackContext:w,onWarn:t,__meta:T};return A.datetimeFormats=l,A.numberFormats=s,A.__datetimeFormatters=I,A.__numberFormatters=_,__INTLIFY_PROD_DEVTOOLS__&&$1e(A,n,T),A}const Tb=e=>({[e]:Nt()});function z$(e,t,n,o,r){const{missing:i,onWarn:a}=e;if(i!==null){const l=i(e,n,t,r);return je(l)?l:t}else return t}function Iu(e,t,n){const o=e;o.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function B1e(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function H1e(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let o=n+1;oz1e(n,e)}function z1e(e,t){const n=e1e(t);if(n==null)throw Zd(0);if(B$(n)===1){const i=t1e(n);return e.plural(i.reduce((a,l)=>[...a,kE(e,l)],[]))}else return kE(e,n)}function kE(e,t){const n=n1e(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const o=o1e(t).reduce((r,i)=>[...r,j1(e,i)],[]);return e.normalize(o)}}function j1(e,t){const n=B$(t);switch(n){case 3:return Pp(t,n);case 9:return Pp(t,n);case 4:{const o=t;if(Dr(o,"k")&&o.k)return e.interpolate(e.named(o.k));if(Dr(o,"key")&&o.key)return e.interpolate(e.named(o.key));throw Zd(n)}case 5:{const o=t;if(Dr(o,"i")&&vn(o.i))return e.interpolate(e.list(o.i));if(Dr(o,"index")&&vn(o.index))return e.interpolate(e.list(o.index));throw Zd(n)}case 6:{const o=t,r=r1e(o),i=i1e(o);return e.linked(j1(e,i),r?j1(e,r):void 0,e.type)}case 7:return Pp(t,n);case 8:return Pp(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const z7=e=>e;let Xs=Nt();function j7(e,t={}){let n=!1;const o=t.onError||Eye;return t.onError=r=>{n=!0,o(r)},{...Zye(e,t),detectError:n}}const j1e=(e,t)=>{if(!je(e))throw si(Nr.NOT_SUPPORT_NON_STRING_MESSAGE);{xt(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||z7)(e),r=Xs[o];if(r)return r;const{code:i,detectError:a}=j7(e,t),l=new Function(`return ${i}`)();return a?l:Xs[o]=l}};function W1e(e,t){if(__INTLIFY_JIT_COMPILATION__&&!__INTLIFY_DROP_MESSAGE_COMPILER__&&je(e)){xt(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||z7)(e),r=Xs[o];if(r)return r;const{ast:i,detectError:a}=j7(e,{...t,location:!1,jit:!0}),l=Eb(i);return a?l:Xs[o]=l}else{const n=e.cacheKey;if(n){const o=Xs[n];return o||(Xs[n]=Eb(e))}else return Eb(e)}}const LE=()=>"",cr=e=>Kt(e);function FE(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:r,messageCompiler:i,fallbackLocale:a,messages:l}=e,[s,u]=W1(...t),c=xt(u.missingWarn)?u.missingWarn:e.missingWarn,d=xt(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,f=xt(u.escapeParameter)?u.escapeParameter:e.escapeParameter,p=!!u.resolvedMessage,v=je(u.default)||xt(u.default)?xt(u.default)?i?s:()=>s:u.default:n?i?s:()=>s:"",h=n||v!=="",m=H$(e,u);f&&V1e(u);let[b,S,C]=p?[s,m,l[m]||Nt()]:W7(e,s,m,a,d,c),$=b,x=s;if(!p&&!(je($)||fi($)||cr($))&&h&&($=v,x=$),!p&&(!(je($)||fi($)||cr($))||!je(S)))return r?Rm:s;let P=!1;const w=()=>{P=!0},O=cr($)?$:V7(e,s,S,$,x,w);if(P)return $;const I=G1e(e,S,C,u),_=C1e(I),T=K1e(e,O,_),A=o?o(T,s):T;if(__INTLIFY_PROD_DEVTOOLS__){const R={timestamp:Date.now(),key:je(s)?s:cr($)?$.key:"",locale:S||(cr($)?$.locale:""),format:je($)?$:cr($)?$.source:"",message:A};R.meta=qn({},e.__meta,k1e()||{}),w1e(R)}return A}function V1e(e){Yt(e.list)?e.list=e.list.map(t=>je(t)?xE(t):t):Et(e.named)&&Object.keys(e.named).forEach(t=>{je(e.named[t])&&(e.named[t]=xE(e.named[t]))})}function W7(e,t,n,o,r,i){const{messages:a,onWarn:l,messageResolver:s,localeFallbacker:u}=e,c=u(e,o,n);let d=Nt(),f,p=null;const v="translate";for(let h=0;ho;return u.locale=n,u.key=t,u}const s=a(o,U1e(e,n,r,o,l,i));return s.locale=n,s.key=t,s.source=o,s}function K1e(e,t,n){return t(n)}function W1(...e){const[t,n,o]=e,r=Nt();if(!je(t)&&!vn(t)&&!cr(t)&&!fi(t))throw si(Nr.INVALID_ARGUMENT);const i=vn(t)?String(t):(cr(t),t);return vn(n)?r.plural=n:je(n)?r.default=n:ht(n)&&!Mm(n)?r.named=n:Yt(n)&&(r.list=n),vn(o)?r.plural=o:je(o)?r.default=o:ht(o)&&qn(r,o),[i,r]}function U1e(e,t,n,o,r,i){return{locale:t,key:n,warnHtmlMessage:r,onError:a=>{throw i&&i(a),a},onCacheKey:a=>gye(t,n,a)}}function G1e(e,t,n,o){const{modifiers:r,pluralRules:i,messageResolver:a,fallbackLocale:l,fallbackWarn:s,missingWarn:u,fallbackContext:c}=e,f={locale:t,modifiers:r,pluralRules:i,messages:p=>{let v=a(n,p);if(v==null&&c){const[,,h]=W7(c,p,t,l,s,u);v=a(h,p)}if(je(v)||fi(v)){let h=!1;const b=V7(e,p,t,v,p,()=>{h=!0});return h?LE:b}else return cr(v)?v:LE}};return e.processor&&(f.processor=e.processor),o.list&&(f.list=o.list),o.named&&(f.named=o.named),vn(o.plural)&&(f.pluralIndex=o.plural),f}function BE(e,...t){const{datetimeFormats:n,unresolving:o,fallbackLocale:r,onWarn:i,localeFallbacker:a}=e,{__datetimeFormatters:l}=e,[s,u,c,d]=V1(...t),f=xt(c.missingWarn)?c.missingWarn:e.missingWarn;xt(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const p=!!c.part,v=H$(e,c),h=a(e,r,v);if(!je(s)||s==="")return new Intl.DateTimeFormat(v,d).format(u);let m={},b,S=null;const C="datetime format";for(let P=0;P{K7.includes(s)?a[s]=n[s]:i[s]=n[s]}),je(o)?i.locale=o:ht(o)&&(a=o),ht(r)&&(a=r),[i.key||"",l,i,a]}function HE(e,t,n){const o=e;for(const r in n){const i=`${t}__${r}`;o.__datetimeFormatters.has(i)&&o.__datetimeFormatters.delete(i)}}function zE(e,...t){const{numberFormats:n,unresolving:o,fallbackLocale:r,onWarn:i,localeFallbacker:a}=e,{__numberFormatters:l}=e,[s,u,c,d]=K1(...t),f=xt(c.missingWarn)?c.missingWarn:e.missingWarn;xt(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const p=!!c.part,v=H$(e,c),h=a(e,r,v);if(!je(s)||s==="")return new Intl.NumberFormat(v,d).format(u);let m={},b,S=null;const C="number format";for(let P=0;P{U7.includes(s)?a[s]=n[s]:i[s]=n[s]}),je(o)?i.locale=o:ht(o)&&(a=o),ht(r)&&(a=r),[i.key||"",l,i,a]}function jE(e,t,n){const o=e;for(const r in n){const i=`${t}__${r}`;o.__numberFormatters.has(i)&&o.__numberFormatters.delete(i)}}Qye();/*! + */function Qye(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Fi().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Fi().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Fi().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function fi(e){return Et(e)&&B$(e)===0&&(Dr(e,"b")||Dr(e,"body"))}const P7=["b","body"];function e1e(e){return el(e,P7)}const O7=["c","cases"];function t1e(e){return el(e,O7,[])}const I7=["s","static"];function n1e(e){return el(e,I7)}const T7=["i","items"];function o1e(e){return el(e,T7,[])}const E7=["t","type"];function B$(e){return el(e,E7)}const _7=["v","value"];function Pp(e,t){const n=el(e,_7);if(n!=null)return n;throw Zd(t)}const M7=["m","modifier"];function r1e(e){return el(e,M7)}const A7=["k","key"];function i1e(e){const t=el(e,A7);if(t)return t;throw Zd(6)}function el(e,t,n){for(let o=0;o{a===void 0?a=l:a+=l},f[1]=()=>{a!==void 0&&(t.push(a),a=void 0)},f[2]=()=>{f[0](),r++},f[3]=()=>{if(r>0)r--,o=4,f[0]();else{if(r=0,a===void 0||(a=u1e(a),a===!1))return!1;f[1]()}};function p(){const v=e[n+1];if(o===5&&v==="'"||o===6&&v==='"')return n++,l="\\"+v,f[0](),!0}for(;o!==null;)if(n++,i=e[n],!(i==="\\"&&p())){if(s=c1e(i),d=tl[o],u=d[s]||d.l||8,u===8||(o=u[0],u[1]!==void 0&&(c=f[u[1]],c&&(l=i,c()===!1))))return;if(o===7)return t}}const IE=new Map;function f1e(e,t){return Et(e)?e[t]:null}function p1e(e,t){if(!Et(e))return null;let n=IE.get(t);if(n||(n=d1e(t),n&&IE.set(t,n)),!n)return null;const o=n.length;let r=e,i=0;for(;ie,h1e=e=>"",v1e="text",m1e=e=>e.length===0?"":Cye(e),b1e=Sye;function TE(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function y1e(e){const t=vn(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(vn(e.named.count)||vn(e.named.n))?vn(e.named.count)?e.named.count:vn(e.named.n)?e.named.n:t:t}function S1e(e,t){t.count||(t.count=e),t.n||(t.n=e)}function C1e(e={}){const t=e.locale,n=y1e(e),o=Et(e.pluralRules)&&je(t)&&Kt(e.pluralRules[t])?e.pluralRules[t]:TE,r=Et(e.pluralRules)&&je(t)&&Kt(e.pluralRules[t])?TE:void 0,i=b=>b[o(n,b.length,r)],a=e.list||[],l=b=>a[b],s=e.named||Nt();vn(e.pluralIndex)&&S1e(n,s);const u=b=>s[b];function c(b){const S=Kt(e.messages)?e.messages(b):Et(e.messages)?e.messages[b]:!1;return S||(e.parent?e.parent.message(b):h1e)}const d=b=>e.modifiers?e.modifiers[b]:g1e,f=ht(e.processor)&&Kt(e.processor.normalize)?e.processor.normalize:m1e,p=ht(e.processor)&&Kt(e.processor.interpolate)?e.processor.interpolate:b1e,v=ht(e.processor)&&je(e.processor.type)?e.processor.type:v1e,m={list:l,named:u,plural:i,linked:(b,...S)=>{const[C,$]=S;let x="text",P="";S.length===1?Et(C)?(P=C.modifier||P,x=C.type||x):je(C)&&(P=C||P):S.length===2&&(je(C)&&(P=C||P),je($)&&(x=$||x));const w=c(b)(m),O=x==="vnode"&&Yt(w)&&P?w[0]:w;return P?d(P)(O,x):O},message:c,type:v,interpolate:p,normalize:f,values:qn(Nt(),a,s)};return m}let Qd=null;function x1e(e){Qd=e}function $1e(e,t,n){Qd&&Qd.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const w1e=P1e("function:translate");function P1e(e){return t=>Qd&&Qd.emit(e,t)}const O1e=L$.__EXTEND_POINT__,pl=Mm(O1e),I1e={FALLBACK_TO_TRANSLATE:pl(),CANNOT_FORMAT_NUMBER:pl(),FALLBACK_TO_NUMBER_FORMAT:pl(),CANNOT_FORMAT_DATE:pl(),FALLBACK_TO_DATE_FORMAT:pl(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:pl(),__EXTEND_POINT__:pl()},D7=ut.__EXTEND_POINT__,gl=Mm(D7),Nr={INVALID_ARGUMENT:D7,INVALID_DATE_ARGUMENT:gl(),INVALID_ISO_DATE_ARGUMENT:gl(),NOT_SUPPORT_NON_STRING_MESSAGE:gl(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:gl(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:gl(),NOT_SUPPORT_LOCALE_TYPE:gl(),__EXTEND_POINT__:gl()};function si(e){return uu(e,null,void 0)}function H$(e,t){return t.locale!=null?EE(t.locale):EE(e.locale)}let Ib;function EE(e){if(je(e))return e;if(Kt(e)){if(e.resolvedOnce&&Ib!=null)return Ib;if(e.constructor.name==="Function"){const t=e();if(yye(t))throw si(Nr.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Ib=t}else throw si(Nr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw si(Nr.NOT_SUPPORT_LOCALE_TYPE)}function T1e(e,t,n){return[...new Set([n,...Yt(t)?t:Et(t)?Object.keys(t):je(t)?[t]:[n]])]}function N7(e,t,n){const o=je(n)?n:Ac,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let i=r.__localeChainCache.get(o);if(!i){i=[];let a=[n];for(;Yt(a);)a=_E(i,a,t);const l=Yt(t)||!ht(t)?t:t.default?t.default:null;a=je(l)?[l]:l,Yt(a)&&_E(i,a,!1),r.__localeChainCache.set(o,i)}return i}function _E(e,t,n){let o=!0;for(let r=0;r`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function A1e(){return{upper:(e,t)=>t==="text"&&je(e)?e.toUpperCase():t==="vnode"&&Et(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&je(e)?e.toLowerCase():t==="vnode"&&Et(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&je(e)?AE(e):t==="vnode"&&Et(e)&&"__v_isVNode"in e?AE(e.children):e}}let k7;function RE(e){k7=e}let L7;function R1e(e){L7=e}let F7;function D1e(e){F7=e}let B7=null;const N1e=e=>{B7=e},k1e=()=>B7;let H7=null;const DE=e=>{H7=e},L1e=()=>H7;let NE=0;function F1e(e={}){const t=Kt(e.onWarn)?e.onWarn:xye,n=je(e.version)?e.version:M1e,o=je(e.locale)||Kt(e.locale)?e.locale:Ac,r=Kt(o)?Ac:o,i=Yt(e.fallbackLocale)||ht(e.fallbackLocale)||je(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:r,a=ht(e.messages)?e.messages:Tb(r),l=ht(e.datetimeFormats)?e.datetimeFormats:Tb(r),s=ht(e.numberFormats)?e.numberFormats:Tb(r),u=qn(Nt(),e.modifiers,A1e()),c=e.pluralRules||Nt(),d=Kt(e.missing)?e.missing:null,f=xt(e.missingWarn)||za(e.missingWarn)?e.missingWarn:!0,p=xt(e.fallbackWarn)||za(e.fallbackWarn)?e.fallbackWarn:!0,v=!!e.fallbackFormat,h=!!e.unresolving,m=Kt(e.postTranslation)?e.postTranslation:null,b=ht(e.processor)?e.processor:null,S=xt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,C=!!e.escapeParameter,$=Kt(e.messageCompiler)?e.messageCompiler:k7,x=Kt(e.messageResolver)?e.messageResolver:L7||f1e,P=Kt(e.localeFallbacker)?e.localeFallbacker:F7||T1e,w=Et(e.fallbackContext)?e.fallbackContext:void 0,O=e,I=Et(O.__datetimeFormatters)?O.__datetimeFormatters:new Map,_=Et(O.__numberFormatters)?O.__numberFormatters:new Map,T=Et(O.__meta)?O.__meta:{};NE++;const A={version:n,cid:NE,locale:o,fallbackLocale:i,messages:a,modifiers:u,pluralRules:c,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:v,unresolving:h,postTranslation:m,processor:b,warnHtmlMessage:S,escapeParameter:C,messageCompiler:$,messageResolver:x,localeFallbacker:P,fallbackContext:w,onWarn:t,__meta:T};return A.datetimeFormats=l,A.numberFormats=s,A.__datetimeFormatters=I,A.__numberFormatters=_,__INTLIFY_PROD_DEVTOOLS__&&$1e(A,n,T),A}const Tb=e=>({[e]:Nt()});function z$(e,t,n,o,r){const{missing:i,onWarn:a}=e;if(i!==null){const l=i(e,n,t,r);return je(l)?l:t}else return t}function Iu(e,t,n){const o=e;o.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function B1e(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function H1e(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let o=n+1;oz1e(n,e)}function z1e(e,t){const n=e1e(t);if(n==null)throw Zd(0);if(B$(n)===1){const i=t1e(n);return e.plural(i.reduce((a,l)=>[...a,kE(e,l)],[]))}else return kE(e,n)}function kE(e,t){const n=n1e(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const o=o1e(t).reduce((r,i)=>[...r,j1(e,i)],[]);return e.normalize(o)}}function j1(e,t){const n=B$(t);switch(n){case 3:return Pp(t,n);case 9:return Pp(t,n);case 4:{const o=t;if(Dr(o,"k")&&o.k)return e.interpolate(e.named(o.k));if(Dr(o,"key")&&o.key)return e.interpolate(e.named(o.key));throw Zd(n)}case 5:{const o=t;if(Dr(o,"i")&&vn(o.i))return e.interpolate(e.list(o.i));if(Dr(o,"index")&&vn(o.index))return e.interpolate(e.list(o.index));throw Zd(n)}case 6:{const o=t,r=r1e(o),i=i1e(o);return e.linked(j1(e,i),r?j1(e,r):void 0,e.type)}case 7:return Pp(t,n);case 8:return Pp(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const z7=e=>e;let Xs=Nt();function j7(e,t={}){let n=!1;const o=t.onError||Eye;return t.onError=r=>{n=!0,o(r)},{...Zye(e,t),detectError:n}}const j1e=(e,t)=>{if(!je(e))throw si(Nr.NOT_SUPPORT_NON_STRING_MESSAGE);{xt(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||z7)(e),r=Xs[o];if(r)return r;const{code:i,detectError:a}=j7(e,t),l=new Function(`return ${i}`)();return a?l:Xs[o]=l}};function W1e(e,t){if(__INTLIFY_JIT_COMPILATION__&&!__INTLIFY_DROP_MESSAGE_COMPILER__&&je(e)){xt(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||z7)(e),r=Xs[o];if(r)return r;const{ast:i,detectError:a}=j7(e,{...t,location:!1,jit:!0}),l=Eb(i);return a?l:Xs[o]=l}else{const n=e.cacheKey;if(n){const o=Xs[n];return o||(Xs[n]=Eb(e))}else return Eb(e)}}const LE=()=>"",cr=e=>Kt(e);function FE(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:r,messageCompiler:i,fallbackLocale:a,messages:l}=e,[s,u]=W1(...t),c=xt(u.missingWarn)?u.missingWarn:e.missingWarn,d=xt(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,f=xt(u.escapeParameter)?u.escapeParameter:e.escapeParameter,p=!!u.resolvedMessage,v=je(u.default)||xt(u.default)?xt(u.default)?i?s:()=>s:u.default:n?i?s:()=>s:"",h=n||v!=="",m=H$(e,u);f&&V1e(u);let[b,S,C]=p?[s,m,l[m]||Nt()]:W7(e,s,m,a,d,c),$=b,x=s;if(!p&&!(je($)||fi($)||cr($))&&h&&($=v,x=$),!p&&(!(je($)||fi($)||cr($))||!je(S)))return r?Am:s;let P=!1;const w=()=>{P=!0},O=cr($)?$:V7(e,s,S,$,x,w);if(P)return $;const I=G1e(e,S,C,u),_=C1e(I),T=K1e(e,O,_),A=o?o(T,s):T;if(__INTLIFY_PROD_DEVTOOLS__){const R={timestamp:Date.now(),key:je(s)?s:cr($)?$.key:"",locale:S||(cr($)?$.locale:""),format:je($)?$:cr($)?$.source:"",message:A};R.meta=qn({},e.__meta,k1e()||{}),w1e(R)}return A}function V1e(e){Yt(e.list)?e.list=e.list.map(t=>je(t)?xE(t):t):Et(e.named)&&Object.keys(e.named).forEach(t=>{je(e.named[t])&&(e.named[t]=xE(e.named[t]))})}function W7(e,t,n,o,r,i){const{messages:a,onWarn:l,messageResolver:s,localeFallbacker:u}=e,c=u(e,o,n);let d=Nt(),f,p=null;const v="translate";for(let h=0;ho;return u.locale=n,u.key=t,u}const s=a(o,U1e(e,n,r,o,l,i));return s.locale=n,s.key=t,s.source=o,s}function K1e(e,t,n){return t(n)}function W1(...e){const[t,n,o]=e,r=Nt();if(!je(t)&&!vn(t)&&!cr(t)&&!fi(t))throw si(Nr.INVALID_ARGUMENT);const i=vn(t)?String(t):(cr(t),t);return vn(n)?r.plural=n:je(n)?r.default=n:ht(n)&&!_m(n)?r.named=n:Yt(n)&&(r.list=n),vn(o)?r.plural=o:je(o)?r.default=o:ht(o)&&qn(r,o),[i,r]}function U1e(e,t,n,o,r,i){return{locale:t,key:n,warnHtmlMessage:r,onError:a=>{throw i&&i(a),a},onCacheKey:a=>gye(t,n,a)}}function G1e(e,t,n,o){const{modifiers:r,pluralRules:i,messageResolver:a,fallbackLocale:l,fallbackWarn:s,missingWarn:u,fallbackContext:c}=e,f={locale:t,modifiers:r,pluralRules:i,messages:p=>{let v=a(n,p);if(v==null&&c){const[,,h]=W7(c,p,t,l,s,u);v=a(h,p)}if(je(v)||fi(v)){let h=!1;const b=V7(e,p,t,v,p,()=>{h=!0});return h?LE:b}else return cr(v)?v:LE}};return e.processor&&(f.processor=e.processor),o.list&&(f.list=o.list),o.named&&(f.named=o.named),vn(o.plural)&&(f.pluralIndex=o.plural),f}function BE(e,...t){const{datetimeFormats:n,unresolving:o,fallbackLocale:r,onWarn:i,localeFallbacker:a}=e,{__datetimeFormatters:l}=e,[s,u,c,d]=V1(...t),f=xt(c.missingWarn)?c.missingWarn:e.missingWarn;xt(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const p=!!c.part,v=H$(e,c),h=a(e,r,v);if(!je(s)||s==="")return new Intl.DateTimeFormat(v,d).format(u);let m={},b,S=null;const C="datetime format";for(let P=0;P{K7.includes(s)?a[s]=n[s]:i[s]=n[s]}),je(o)?i.locale=o:ht(o)&&(a=o),ht(r)&&(a=r),[i.key||"",l,i,a]}function HE(e,t,n){const o=e;for(const r in n){const i=`${t}__${r}`;o.__datetimeFormatters.has(i)&&o.__datetimeFormatters.delete(i)}}function zE(e,...t){const{numberFormats:n,unresolving:o,fallbackLocale:r,onWarn:i,localeFallbacker:a}=e,{__numberFormatters:l}=e,[s,u,c,d]=K1(...t),f=xt(c.missingWarn)?c.missingWarn:e.missingWarn;xt(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const p=!!c.part,v=H$(e,c),h=a(e,r,v);if(!je(s)||s==="")return new Intl.NumberFormat(v,d).format(u);let m={},b,S=null;const C="number format";for(let P=0;P{U7.includes(s)?a[s]=n[s]:i[s]=n[s]}),je(o)?i.locale=o:ht(o)&&(a=o),ht(r)&&(a=r),[i.key||"",l,i,a]}function jE(e,t,n){const o=e;for(const r in n){const i=`${t}__${r}`;o.__numberFormatters.has(i)&&o.__numberFormatters.delete(i)}}Qye();/*! * vue-i18n v9.14.4 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */const X1e="9.14.4";function Y1e(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Fi().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Fi().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Fi().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Fi().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Fi().__INTLIFY_PROD_DEVTOOLS__=!1)}const q1e=I1e.__EXTEND_POINT__,Ii=Am(q1e);Ii(),Ii(),Ii(),Ii(),Ii(),Ii(),Ii(),Ii(),Ii();const G7=Nr.__EXTEND_POINT__,Mo=Am(G7),Mn={UNEXPECTED_RETURN_TYPE:G7,INVALID_ARGUMENT:Mo(),MUST_BE_CALL_SETUP_TOP:Mo(),NOT_INSTALLED:Mo(),NOT_AVAILABLE_IN_LEGACY_MODE:Mo(),REQUIRED_VALUE:Mo(),INVALID_VALUE:Mo(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:Mo(),NOT_INSTALLED_WITH_PROVIDE:Mo(),UNEXPECTED_ERROR:Mo(),NOT_COMPATIBLE_LEGACY_VUE_I18N:Mo(),BRIDGE_SUPPORT_VUE_2_ONLY:Mo(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:Mo(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:Mo(),__EXTEND_POINT__:Mo()};function Wn(e,...t){return uu(e,null,void 0)}const U1=Qa("__translateVNode"),G1=Qa("__datetimeParts"),X1=Qa("__numberParts"),X7=Qa("__setPluralRules"),Y7=Qa("__injectWithOption"),Y1=Qa("__dispose");function ef(e){if(!Et(e)||fi(e))return e;for(const t in e)if(Dr(e,t))if(!t.includes("."))Et(e[t])&&ef(e[t]);else{const n=t.split("."),o=n.length-1;let r=e,i=!1;for(let a=0;a{if("locale"in l&&"resource"in l){const{locale:s,resource:u}=l;s?(a[s]=a[s]||Nt(),$g(u,a[s])):$g(u,a)}else je(l)&&$g(JSON.parse(l),a)}),r==null&&i)for(const l in a)Dr(a,l)&&ef(a[l]);return a}function q7(e){return e.type}function J7(e,t,n){let o=Et(t.messages)?t.messages:Nt();"__i18nGlobal"in n&&(o=Dm(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const r=Object.keys(o);r.length&&r.forEach(i=>{e.mergeLocaleMessage(i,o[i])});{if(Et(t.datetimeFormats)){const i=Object.keys(t.datetimeFormats);i.length&&i.forEach(a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])})}if(Et(t.numberFormats)){const i=Object.keys(t.numberFormats);i.length&&i.forEach(a=>{e.mergeNumberFormat(a,t.numberFormats[a])})}}}function WE(e){return g(ta,null,e,0)}const VE="__INTLIFY_META__",KE=()=>[],J1e=()=>!1;let UE=0;function GE(e){return(t,n,o,r)=>e(n,o,Jt()||void 0,r)}const Z1e=()=>{const e=Jt();let t=null;return e&&(t=q7(e)[VE])?{[VE]:t}:null};function j$(e={},t){const{__root:n,__injectWithOption:o}=e,r=n===void 0,i=e.flatJson,a=Dh?ae:se,l=!!e.translateExistCompatible;let s=xt(e.inheritLocale)?e.inheritLocale:!0;const u=a(n&&s?n.locale.value:je(e.locale)?e.locale:Ac),c=a(n&&s?n.fallbackLocale.value:je(e.fallbackLocale)||Yt(e.fallbackLocale)||ht(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:u.value),d=a(Dm(u.value,e)),f=a(ht(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),p=a(ht(e.numberFormats)?e.numberFormats:{[u.value]:{}});let v=n?n.missingWarn:xt(e.missingWarn)||za(e.missingWarn)?e.missingWarn:!0,h=n?n.fallbackWarn:xt(e.fallbackWarn)||za(e.fallbackWarn)?e.fallbackWarn:!0,m=n?n.fallbackRoot:xt(e.fallbackRoot)?e.fallbackRoot:!0,b=!!e.fallbackFormat,S=Kt(e.missing)?e.missing:null,C=Kt(e.missing)?GE(e.missing):null,$=Kt(e.postTranslation)?e.postTranslation:null,x=n?n.warnHtmlMessage:xt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,P=!!e.escapeParameter;const w=n?n.modifiers:ht(e.modifiers)?e.modifiers:{};let O=e.pluralRules||n&&n.pluralRules,I;I=(()=>{r&&DE(null);const ee={version:X1e,locale:u.value,fallbackLocale:c.value,messages:d.value,modifiers:w,pluralRules:O,missing:C===null?void 0:C,missingWarn:v,fallbackWarn:h,fallbackFormat:b,unresolving:!0,postTranslation:$===null?void 0:$,warnHtmlMessage:x,escapeParameter:P,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};ee.datetimeFormats=f.value,ee.numberFormats=p.value,ee.__datetimeFormatters=ht(I)?I.__datetimeFormatters:void 0,ee.__numberFormatters=ht(I)?I.__numberFormatters:void 0;const ue=F1e(ee);return r&&DE(ue),ue})(),Iu(I,u.value,c.value);function T(){return[u.value,c.value,d.value,f.value,p.value]}const A=E({get:()=>u.value,set:ee=>{u.value=ee,I.locale=u.value}}),R=E({get:()=>c.value,set:ee=>{c.value=ee,I.fallbackLocale=c.value,Iu(I,u.value,ee)}}),H=E(()=>d.value),M=E(()=>f.value),D=E(()=>p.value);function N(){return Kt($)?$:null}function L(ee){$=ee,I.postTranslation=ee}function F(){return S}function B(ee){ee!==null&&(C=GE(ee)),S=ee,I.missing=C}const j=(ee,ue,xe,Pe,_e,Ce)=>{T();let we;try{__INTLIFY_PROD_DEVTOOLS__,r||(I.fallbackContext=n?L1e():void 0),we=ee(I)}finally{__INTLIFY_PROD_DEVTOOLS__,r||(I.fallbackContext=void 0)}if(xe!=="translate exists"&&vn(we)&&we===Rm||xe==="translate exists"&&!we){const[Oe,Me]=ue();return n&&m?Pe(n):_e(Oe)}else{if(Ce(we))return we;throw Wn(Mn.UNEXPECTED_RETURN_TYPE)}};function z(...ee){return j(ue=>Reflect.apply(FE,null,[ue,...ee]),()=>W1(...ee),"translate",ue=>Reflect.apply(ue.t,ue,[...ee]),ue=>ue,ue=>je(ue))}function G(...ee){const[ue,xe,Pe]=ee;if(Pe&&!Et(Pe))throw Wn(Mn.INVALID_ARGUMENT);return z(ue,xe,qn({resolvedMessage:!0},Pe||{}))}function Q(...ee){return j(ue=>Reflect.apply(BE,null,[ue,...ee]),()=>V1(...ee),"datetime format",ue=>Reflect.apply(ue.d,ue,[...ee]),()=>ME,ue=>je(ue))}function Y(...ee){return j(ue=>Reflect.apply(zE,null,[ue,...ee]),()=>K1(...ee),"number format",ue=>Reflect.apply(ue.n,ue,[...ee]),()=>ME,ue=>je(ue))}function oe(ee){return ee.map(ue=>je(ue)||vn(ue)||xt(ue)?WE(String(ue)):ue)}const re={normalize:oe,interpolate:ee=>ee,type:"vnode"};function ne(...ee){return j(ue=>{let xe;const Pe=ue;try{Pe.processor=re,xe=Reflect.apply(FE,null,[Pe,...ee])}finally{Pe.processor=null}return xe},()=>W1(...ee),"translate",ue=>ue[U1](...ee),ue=>[WE(ue)],ue=>Yt(ue))}function X(...ee){return j(ue=>Reflect.apply(zE,null,[ue,...ee]),()=>K1(...ee),"number format",ue=>ue[X1](...ee),KE,ue=>je(ue)||Yt(ue))}function te(...ee){return j(ue=>Reflect.apply(BE,null,[ue,...ee]),()=>V1(...ee),"datetime format",ue=>ue[G1](...ee),KE,ue=>je(ue)||Yt(ue))}function W(ee){O=ee,I.pluralRules=O}function U(ee,ue){return j(()=>{if(!ee)return!1;const xe=je(ue)?ue:u.value,Pe=fe(xe),_e=I.messageResolver(Pe,ee);return l?_e!=null:fi(_e)||cr(_e)||je(_e)},()=>[ee],"translate exists",xe=>Reflect.apply(xe.te,xe,[ee,ue]),J1e,xe=>xt(xe))}function J(ee){let ue=null;const xe=N7(I,c.value,u.value);for(let Pe=0;Pe{s&&(u.value=ee,I.locale=ee,Iu(I,u.value,c.value))}),be(n.fallbackLocale,ee=>{s&&(c.value=ee,I.fallbackLocale=ee,Iu(I,u.value,c.value))}));const ce={id:UE,locale:A,fallbackLocale:R,get inheritLocale(){return s},set inheritLocale(ee){s=ee,ee&&n&&(u.value=n.locale.value,c.value=n.fallbackLocale.value,Iu(I,u.value,c.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:H,get modifiers(){return w},get pluralRules(){return O||{}},get isGlobal(){return r},get missingWarn(){return v},set missingWarn(ee){v=ee,I.missingWarn=v},get fallbackWarn(){return h},set fallbackWarn(ee){h=ee,I.fallbackWarn=h},get fallbackRoot(){return m},set fallbackRoot(ee){m=ee},get fallbackFormat(){return b},set fallbackFormat(ee){b=ee,I.fallbackFormat=b},get warnHtmlMessage(){return x},set warnHtmlMessage(ee){x=ee,I.warnHtmlMessage=ee},get escapeParameter(){return P},set escapeParameter(ee){P=ee,I.escapeParameter=ee},t:z,getLocaleMessage:fe,setLocaleMessage:pe,mergeLocaleMessage:ve,getPostTranslationHandler:N,setPostTranslationHandler:L,getMissingHandler:F,setMissingHandler:B,[X7]:W};return ce.datetimeFormats=M,ce.numberFormats=D,ce.rt=G,ce.te=U,ce.tm=de,ce.d=Q,ce.n=Y,ce.getDateTimeFormat=he,ce.setDateTimeFormat=V,ce.mergeDateTimeFormat=q,ce.getNumberFormat=ie,ce.setNumberFormat=me,ce.mergeNumberFormat=Se,ce[Y7]=o,ce[U1]=ne,ce[G1]=te,ce[X1]=X,ce}function Q1e(e){const t=je(e.locale)?e.locale:Ac,n=je(e.fallbackLocale)||Yt(e.fallbackLocale)||ht(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=Kt(e.missing)?e.missing:void 0,r=xt(e.silentTranslationWarn)||za(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,i=xt(e.silentFallbackWarn)||za(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,a=xt(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,s=ht(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=Kt(e.postTranslation)?e.postTranslation:void 0,d=je(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,p=xt(e.sync)?e.sync:!0;let v=e.messages;if(ht(e.sharedMessages)){const P=e.sharedMessages;v=Object.keys(P).reduce((O,I)=>{const _=O[I]||(O[I]={});return qn(_,P[I]),O},v||{})}const{__i18n:h,__root:m,__injectWithOption:b}=e,S=e.datetimeFormats,C=e.numberFormats,$=e.flatJson,x=e.translateExistCompatible;return{locale:t,fallbackLocale:n,messages:v,flatJson:$,datetimeFormats:S,numberFormats:C,missing:o,missingWarn:r,fallbackWarn:i,fallbackRoot:a,fallbackFormat:l,modifiers:s,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,translateExistCompatible:x,__i18n:h,__root:m,__injectWithOption:b}}function q1(e={},t){{const n=j$(Q1e(e)),{__extender:o}=e,r={id:n.id,get locale(){return n.locale.value},set locale(i){n.locale.value=i},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(i){n.fallbackLocale.value=i},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(i){},get missing(){return n.getMissingHandler()},set missing(i){n.setMissingHandler(i)},get silentTranslationWarn(){return xt(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(i){n.missingWarn=xt(i)?!i:i},get silentFallbackWarn(){return xt(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(i){n.fallbackWarn=xt(i)?!i:i},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(i){n.fallbackFormat=i},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(i){n.setPostTranslationHandler(i)},get sync(){return n.inheritLocale},set sync(i){n.inheritLocale=i},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(i){n.warnHtmlMessage=i!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(i){n.escapeParameter=i},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(i){},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...i){const[a,l,s]=i,u={};let c=null,d=null;if(!je(a))throw Wn(Mn.INVALID_ARGUMENT);const f=a;return je(l)?u.locale=l:Yt(l)?c=l:ht(l)&&(d=l),Yt(s)?c=s:ht(s)&&(d=s),Reflect.apply(n.t,n,[f,c||d||{},u])},rt(...i){return Reflect.apply(n.rt,n,[...i])},tc(...i){const[a,l,s]=i,u={plural:1};let c=null,d=null;if(!je(a))throw Wn(Mn.INVALID_ARGUMENT);const f=a;return je(l)?u.locale=l:vn(l)?u.plural=l:Yt(l)?c=l:ht(l)&&(d=l),je(s)?u.locale=s:Yt(s)?c=s:ht(s)&&(d=s),Reflect.apply(n.t,n,[f,c||d||{},u])},te(i,a){return n.te(i,a)},tm(i){return n.tm(i)},getLocaleMessage(i){return n.getLocaleMessage(i)},setLocaleMessage(i,a){n.setLocaleMessage(i,a)},mergeLocaleMessage(i,a){n.mergeLocaleMessage(i,a)},d(...i){return Reflect.apply(n.d,n,[...i])},getDateTimeFormat(i){return n.getDateTimeFormat(i)},setDateTimeFormat(i,a){n.setDateTimeFormat(i,a)},mergeDateTimeFormat(i,a){n.mergeDateTimeFormat(i,a)},n(...i){return Reflect.apply(n.n,n,[...i])},getNumberFormat(i){return n.getNumberFormat(i)},setNumberFormat(i,a){n.setNumberFormat(i,a)},mergeNumberFormat(i,a){n.mergeNumberFormat(i,a)},getChoiceIndex(i,a){return-1}};return r.__extender=o,r}}const W$={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function eSe({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,r)=>[...o,...r.type===Le?r.children:[r]],[]):t.reduce((n,o)=>{const r=e[o];return r&&(n[o]=r()),n},Nt())}function Z7(e){return Le}const tSe=le({name:"i18n-t",props:qn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>vn(e)||!isNaN(e)}},W$),setup(e,t){const{slots:n,attrs:o}=t,r=e.i18n||V$({useScope:e.scope,__useComponent:!0});return()=>{const i=Object.keys(n).filter(d=>d!=="_"),a=Nt();e.locale&&(a.locale=e.locale),e.plural!==void 0&&(a.plural=je(e.plural)?+e.plural:e.plural);const l=eSe(t,i),s=r[U1](e.keypath,l,a),u=qn(Nt(),o),c=je(e.tag)||Et(e.tag)?e.tag:Z7();return Vr(c,u,s)}}}),XE=tSe;function nSe(e){return Yt(e)&&!je(e[0])}function Q7(e,t,n,o){const{slots:r,attrs:i}=t;return()=>{const a={part:!0};let l=Nt();e.locale&&(a.locale=e.locale),je(e.format)?a.key=e.format:Et(e.format)&&(je(e.format.key)&&(a.key=e.format.key),l=Object.keys(e.format).reduce((f,p)=>n.includes(p)?qn(Nt(),f,{[p]:e.format[p]}):f,Nt()));const s=o(e.value,a,l);let u=[a.key];Yt(s)?u=s.map((f,p)=>{const v=r[f.type],h=v?v({[f.type]:f.value,index:p,parts:s}):[f.value];return nSe(h)&&(h[0].key=`${f.type}-${p}`),h}):je(s)&&(u=[s]);const c=qn(Nt(),i),d=je(e.tag)||Et(e.tag)?e.tag:Z7();return Vr(d,c,u)}}const oSe=le({name:"i18n-n",props:qn({value:{type:Number,required:!0},format:{type:[String,Object]}},W$),setup(e,t){const n=e.i18n||V$({useScope:e.scope,__useComponent:!0});return Q7(e,t,U7,(...o)=>n[X1](...o))}}),YE=oSe,rSe=le({name:"i18n-d",props:qn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},W$),setup(e,t){const n=e.i18n||V$({useScope:e.scope,__useComponent:!0});return Q7(e,t,K7,(...o)=>n[G1](...o))}}),qE=rSe;function iSe(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function aSe(e){const t=a=>{const{instance:l,modifiers:s,value:u}=a;if(!l||!l.$)throw Wn(Mn.UNEXPECTED_ERROR);const c=iSe(e,l.$),d=JE(u);return[Reflect.apply(c.t,c,[...ZE(d)]),c]};return{created:(a,l)=>{const[s,u]=t(l);Dh&&e.global===u&&(a.__i18nWatcher=be(u.locale,()=>{l.instance&&l.instance.$forceUpdate()})),a.__composer=u,a.textContent=s},unmounted:a=>{Dh&&a.__i18nWatcher&&(a.__i18nWatcher(),a.__i18nWatcher=void 0,delete a.__i18nWatcher),a.__composer&&(a.__composer=void 0,delete a.__composer)},beforeUpdate:(a,{value:l})=>{if(a.__composer){const s=a.__composer,u=JE(l);a.textContent=Reflect.apply(s.t,s,[...ZE(u)])}},getSSRProps:a=>{const[l]=t(a);return{textContent:l}}}}function JE(e){if(je(e))return{path:e};if(ht(e)){if(!("path"in e))throw Wn(Mn.REQUIRED_VALUE,"path");return e}else throw Wn(Mn.INVALID_VALUE)}function ZE(e){const{path:t,locale:n,args:o,choice:r,plural:i}=e,a={},l=o||{};return je(n)&&(a.locale=n),vn(r)&&(a.plural=r),vn(i)&&(a.plural=i),[t,l,a]}function lSe(e,t,...n){const o=ht(n[0])?n[0]:{},r=!!o.useI18nComponentName;(xt(o.globalInstall)?o.globalInstall:!0)&&([r?"i18n":XE.name,"I18nT"].forEach(a=>e.component(a,XE)),[YE.name,"I18nN"].forEach(a=>e.component(a,YE)),[qE.name,"I18nD"].forEach(a=>e.component(a,qE))),e.directive("t",aSe(t))}function sSe(e,t,n){return{beforeCreate(){const o=Jt();if(!o)throw Wn(Mn.UNEXPECTED_ERROR);const r=this.$options;if(r.i18n){const i=r.i18n;if(r.__i18n&&(i.__i18n=r.__i18n),i.__root=t,this===this.$root)this.$i18n=QE(e,i);else{i.__injectWithOption=!0,i.__extender=n.__vueI18nExtend,this.$i18n=q1(i);const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}}else if(r.__i18n)if(this===this.$root)this.$i18n=QE(e,r);else{this.$i18n=q1({__i18n:r.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}else this.$i18n=e;r.__i18nGlobal&&J7(t,r,r),this.$t=(...i)=>this.$i18n.t(...i),this.$rt=(...i)=>this.$i18n.rt(...i),this.$tc=(...i)=>this.$i18n.tc(...i),this.$te=(i,a)=>this.$i18n.te(i,a),this.$d=(...i)=>this.$i18n.d(...i),this.$n=(...i)=>this.$i18n.n(...i),this.$tm=i=>this.$i18n.tm(i),n.__setInstance(o,this.$i18n)},mounted(){},unmounted(){const o=Jt();if(!o)throw Wn(Mn.UNEXPECTED_ERROR);const r=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,r.__disposer&&(r.__disposer(),delete r.__disposer,delete r.__extender),n.__deleteInstance(o),delete this.$i18n}}}function QE(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[X7](t.pluralizationRules||e.pluralizationRules);const n=Dm(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const cSe=Qa("global-vue-i18n");function uSe(e={},t){const n=__VUE_I18N_LEGACY_API__&&xt(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,o=xt(e.globalInjection)?e.globalInjection:!0,r=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,i=new Map,[a,l]=dSe(e,n),s=Qa("");function u(f){return i.get(f)||null}function c(f,p){i.set(f,p)}function d(f){i.delete(f)}{const f={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return r},async install(p,...v){if(p.__VUE_I18N_SYMBOL__=s,p.provide(p.__VUE_I18N_SYMBOL__,f),ht(v[0])){const b=v[0];f.__composerExtend=b.__composerExtend,f.__vueI18nExtend=b.__vueI18nExtend}let h=null;!n&&o&&(h=SSe(p,f.global)),__VUE_I18N_FULL_INSTALL__&&lSe(p,f,...v),__VUE_I18N_LEGACY_API__&&n&&p.mixin(sSe(l,l.__composer,f));const m=p.unmount;p.unmount=()=>{h&&h(),f.dispose(),m()}},get global(){return l},dispose(){a.stop()},__instances:i,__getInstance:u,__setInstance:c,__deleteInstance:d};return f}}function V$(e={}){const t=Jt();if(t==null)throw Wn(Mn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Wn(Mn.NOT_INSTALLED);const n=fSe(t),o=gSe(n),r=q7(t),i=pSe(e,r);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw Wn(Mn.NOT_AVAILABLE_IN_LEGACY_MODE);return bSe(t,i,o,e)}if(i==="global")return J7(o,e,r),o;if(i==="parent"){let s=hSe(n,t,e.__useComponent);return s==null&&(s=o),s}const a=n;let l=a.__getInstance(t);if(l==null){const s=qn({},e);"__i18n"in r&&(s.__i18n=r.__i18n),o&&(s.__root=o),l=j$(s),a.__composerExtend&&(l[Y1]=a.__composerExtend(l)),mSe(a,t,l),a.__setInstance(t,l)}return l}function dSe(e,t,n){const o=fS();{const r=__VUE_I18N_LEGACY_API__&&t?o.run(()=>q1(e)):o.run(()=>j$(e));if(r==null)throw Wn(Mn.UNEXPECTED_ERROR);return[o,r]}}function fSe(e){{const t=ze(e.isCE?cSe:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Wn(e.isCE?Mn.NOT_INSTALLED_WITH_PROVIDE:Mn.UNEXPECTED_ERROR);return t}}function pSe(e,t){return Mm(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function gSe(e){return e.mode==="composition"?e.global:e.global.__composer}function hSe(e,t,n=!1){let o=null;const r=t.root;let i=vSe(t,n);for(;i!=null;){const a=e;if(e.mode==="composition")o=a.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const l=a.__getInstance(i);l!=null&&(o=l.__composer,n&&o&&!o[Y7]&&(o=null))}if(o!=null||r===i)break;i=i.parent}return o}function vSe(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function mSe(e,t,n){Ke(()=>{},t),Zn(()=>{const o=n;e.__deleteInstance(t);const r=o[Y1];r&&(r(),delete o[Y1])},t)}function bSe(e,t,n,o={}){const r=t==="local",i=se(null);if(r&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw Wn(Mn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const a=xt(o.inheritLocale)?o.inheritLocale:!je(o.locale),l=ae(!r||a?n.locale.value:je(o.locale)?o.locale:Ac),s=ae(!r||a?n.fallbackLocale.value:je(o.fallbackLocale)||Yt(o.fallbackLocale)||ht(o.fallbackLocale)||o.fallbackLocale===!1?o.fallbackLocale:l.value),u=ae(Dm(l.value,o)),c=ae(ht(o.datetimeFormats)?o.datetimeFormats:{[l.value]:{}}),d=ae(ht(o.numberFormats)?o.numberFormats:{[l.value]:{}}),f=r?n.missingWarn:xt(o.missingWarn)||za(o.missingWarn)?o.missingWarn:!0,p=r?n.fallbackWarn:xt(o.fallbackWarn)||za(o.fallbackWarn)?o.fallbackWarn:!0,v=r?n.fallbackRoot:xt(o.fallbackRoot)?o.fallbackRoot:!0,h=!!o.fallbackFormat,m=Kt(o.missing)?o.missing:null,b=Kt(o.postTranslation)?o.postTranslation:null,S=r?n.warnHtmlMessage:xt(o.warnHtmlMessage)?o.warnHtmlMessage:!0,C=!!o.escapeParameter,$=r?n.modifiers:ht(o.modifiers)?o.modifiers:{},x=o.pluralRules||r&&n.pluralRules;function P(){return[l.value,s.value,u.value,c.value,d.value]}const w=E({get:()=>i.value?i.value.locale.value:l.value,set:J=>{i.value&&(i.value.locale.value=J),l.value=J}}),O=E({get:()=>i.value?i.value.fallbackLocale.value:s.value,set:J=>{i.value&&(i.value.fallbackLocale.value=J),s.value=J}}),I=E(()=>i.value?i.value.messages.value:u.value),_=E(()=>c.value),T=E(()=>d.value);function A(){return i.value?i.value.getPostTranslationHandler():b}function R(J){i.value&&i.value.setPostTranslationHandler(J)}function H(){return i.value?i.value.getMissingHandler():m}function M(J){i.value&&i.value.setMissingHandler(J)}function D(J){return P(),J()}function N(...J){return i.value?D(()=>Reflect.apply(i.value.t,null,[...J])):D(()=>"")}function L(...J){return i.value?Reflect.apply(i.value.rt,null,[...J]):""}function F(...J){return i.value?D(()=>Reflect.apply(i.value.d,null,[...J])):D(()=>"")}function B(...J){return i.value?D(()=>Reflect.apply(i.value.n,null,[...J])):D(()=>"")}function j(J){return i.value?i.value.tm(J):{}}function z(J,de){return i.value?i.value.te(J,de):!1}function G(J){return i.value?i.value.getLocaleMessage(J):{}}function Q(J,de){i.value&&(i.value.setLocaleMessage(J,de),u.value[J]=de)}function Y(J,de){i.value&&i.value.mergeLocaleMessage(J,de)}function oe(J){return i.value?i.value.getDateTimeFormat(J):{}}function Z(J,de){i.value&&(i.value.setDateTimeFormat(J,de),c.value[J]=de)}function re(J,de){i.value&&i.value.mergeDateTimeFormat(J,de)}function ne(J){return i.value?i.value.getNumberFormat(J):{}}function X(J,de){i.value&&(i.value.setNumberFormat(J,de),d.value[J]=de)}function te(J,de){i.value&&i.value.mergeNumberFormat(J,de)}const W={get id(){return i.value?i.value.id:-1},locale:w,fallbackLocale:O,messages:I,datetimeFormats:_,numberFormats:T,get inheritLocale(){return i.value?i.value.inheritLocale:a},set inheritLocale(J){i.value&&(i.value.inheritLocale=J)},get availableLocales(){return i.value?i.value.availableLocales:Object.keys(u.value)},get modifiers(){return i.value?i.value.modifiers:$},get pluralRules(){return i.value?i.value.pluralRules:x},get isGlobal(){return i.value?i.value.isGlobal:!1},get missingWarn(){return i.value?i.value.missingWarn:f},set missingWarn(J){i.value&&(i.value.missingWarn=J)},get fallbackWarn(){return i.value?i.value.fallbackWarn:p},set fallbackWarn(J){i.value&&(i.value.missingWarn=J)},get fallbackRoot(){return i.value?i.value.fallbackRoot:v},set fallbackRoot(J){i.value&&(i.value.fallbackRoot=J)},get fallbackFormat(){return i.value?i.value.fallbackFormat:h},set fallbackFormat(J){i.value&&(i.value.fallbackFormat=J)},get warnHtmlMessage(){return i.value?i.value.warnHtmlMessage:S},set warnHtmlMessage(J){i.value&&(i.value.warnHtmlMessage=J)},get escapeParameter(){return i.value?i.value.escapeParameter:C},set escapeParameter(J){i.value&&(i.value.escapeParameter=J)},t:N,getPostTranslationHandler:A,setPostTranslationHandler:R,getMissingHandler:H,setMissingHandler:M,rt:L,d:F,n:B,tm:j,te:z,getLocaleMessage:G,setLocaleMessage:Q,mergeLocaleMessage:Y,getDateTimeFormat:oe,setDateTimeFormat:Z,mergeDateTimeFormat:re,getNumberFormat:ne,setNumberFormat:X,mergeNumberFormat:te};function U(J){J.locale.value=l.value,J.fallbackLocale.value=s.value,Object.keys(u.value).forEach(de=>{J.mergeLocaleMessage(de,u.value[de])}),Object.keys(c.value).forEach(de=>{J.mergeDateTimeFormat(de,c.value[de])}),Object.keys(d.value).forEach(de=>{J.mergeNumberFormat(de,d.value[de])}),J.escapeParameter=C,J.fallbackFormat=h,J.fallbackRoot=v,J.fallbackWarn=p,J.missingWarn=f,J.warnHtmlMessage=S}return cf(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw Wn(Mn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const J=i.value=e.proxy.$i18n.__composer;t==="global"?(l.value=J.locale.value,s.value=J.fallbackLocale.value,u.value=J.messages.value,c.value=J.datetimeFormats.value,d.value=J.numberFormats.value):r&&U(J)}),W}const ySe=["locale","fallbackLocale","availableLocales"],e3=["t","rt","d","n","tm","te"];function SSe(e,t){const n=Object.create(null);return ySe.forEach(r=>{const i=Object.getOwnPropertyDescriptor(t,r);if(!i)throw Wn(Mn.UNEXPECTED_ERROR);const a=Ut(i.value)?{get(){return i.value.value},set(l){i.value.value=l}}:{get(){return i.get&&i.get()}};Object.defineProperty(n,r,a)}),e.config.globalProperties.$i18n=n,e3.forEach(r=>{const i=Object.getOwnPropertyDescriptor(t,r);if(!i||!i.value)throw Wn(Mn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${r}`,i)}),()=>{delete e.config.globalProperties.$i18n,e3.forEach(r=>{delete e.config.globalProperties[`$${r}`]})}}Y1e();__INTLIFY_JIT_COMPILATION__?RE(W1e):RE(j1e);R1e(p1e);D1e(N7);if(__INTLIFY_PROD_DEVTOOLS__){const e=Fi();e.__INTLIFY__=!0,x1e(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const CSe={conversation:"Conversation",plan:"Plan Execution",backHome:"Back to Home",noPageTip:"The page you are looking for does not exist.",init:{welcome:"Welcome to JManus",welcomeStep:"Welcome to JManus",description:"To get started, you need to configure an LLM service to enable AI features. You can choose Alibaba Cloud DashScope or configure any OpenAI-compatible API service.",languageStepDescription:"Please select your language preference, which will be used as the default interface language.",stepLanguage:"Language",stepModel:"Model Setup",selectLanguageLabel:"Select Language",continueToModel:"Continue to Model Setup",back:"Back",configModeLabel:"Configuration Mode",dashscopeMode:"Alibaba Cloud DashScope (Recommended)",dashscopeModeDesc:"Use Alibaba Cloud DashScope service, just provide API key to get started quickly",customMode:"Custom OpenAI Compatible Service",customModeDesc:"Configure any OpenAI API compatible service, such as Ollama, LocalAI, etc.",apiKeyLabel:"DashScope API Key",apiKeyPlaceholder:"Enter your API key",apiKeyHint:"You can get your API key from Alibaba Cloud Bailian Console.",getApiKey:"Get API Key",baseUrlLabel:"API Base URL",baseUrlPlaceholder:"https://api.openai.com or your custom URL",baseUrlHint:"OpenAI compatible API base URL, e.g. http://localhost:11434",customApiKeyLabel:"API Key",customApiKeyPlaceholder:"Enter your API key",modelNameLabel:"Model Name",modelNamePlaceholder:"gpt-4.1 or your model name",modelNameHint:"Enter the model name you want to use, e.g. gemini-2.5-pro, gpt-4.1, etc.",modelDisplayNameLabel:"Model Display Name (Optional)",modelDisplayNamePlaceholder:"Display name for the model",saveAndContinue:"Save and Continue",saving:"Saving...",apiKeyRequired:"API key is required",baseUrlRequired:"API base URL is required",modelNameRequired:"Model name is required",saveFailed:"Failed to save configuration",networkError:"Network error, please check your internet connection",successMessage:"Configuration saved successfully! Redirecting to home page...",restartRequired:`API key saved successfully! The application needs to be restarted for the configuration to take effect. + */const X1e="9.14.4";function Y1e(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Fi().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Fi().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Fi().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Fi().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Fi().__INTLIFY_PROD_DEVTOOLS__=!1)}const q1e=I1e.__EXTEND_POINT__,Ii=Mm(q1e);Ii(),Ii(),Ii(),Ii(),Ii(),Ii(),Ii(),Ii(),Ii();const G7=Nr.__EXTEND_POINT__,Mo=Mm(G7),Mn={UNEXPECTED_RETURN_TYPE:G7,INVALID_ARGUMENT:Mo(),MUST_BE_CALL_SETUP_TOP:Mo(),NOT_INSTALLED:Mo(),NOT_AVAILABLE_IN_LEGACY_MODE:Mo(),REQUIRED_VALUE:Mo(),INVALID_VALUE:Mo(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:Mo(),NOT_INSTALLED_WITH_PROVIDE:Mo(),UNEXPECTED_ERROR:Mo(),NOT_COMPATIBLE_LEGACY_VUE_I18N:Mo(),BRIDGE_SUPPORT_VUE_2_ONLY:Mo(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:Mo(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:Mo(),__EXTEND_POINT__:Mo()};function Wn(e,...t){return uu(e,null,void 0)}const U1=Qa("__translateVNode"),G1=Qa("__datetimeParts"),X1=Qa("__numberParts"),X7=Qa("__setPluralRules"),Y7=Qa("__injectWithOption"),Y1=Qa("__dispose");function ef(e){if(!Et(e)||fi(e))return e;for(const t in e)if(Dr(e,t))if(!t.includes("."))Et(e[t])&&ef(e[t]);else{const n=t.split("."),o=n.length-1;let r=e,i=!1;for(let a=0;a{if("locale"in l&&"resource"in l){const{locale:s,resource:u}=l;s?(a[s]=a[s]||Nt(),xg(u,a[s])):xg(u,a)}else je(l)&&xg(JSON.parse(l),a)}),r==null&&i)for(const l in a)Dr(a,l)&&ef(a[l]);return a}function q7(e){return e.type}function J7(e,t,n){let o=Et(t.messages)?t.messages:Nt();"__i18nGlobal"in n&&(o=Rm(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const r=Object.keys(o);r.length&&r.forEach(i=>{e.mergeLocaleMessage(i,o[i])});{if(Et(t.datetimeFormats)){const i=Object.keys(t.datetimeFormats);i.length&&i.forEach(a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])})}if(Et(t.numberFormats)){const i=Object.keys(t.numberFormats);i.length&&i.forEach(a=>{e.mergeNumberFormat(a,t.numberFormats[a])})}}}function WE(e){return g(ta,null,e,0)}const VE="__INTLIFY_META__",KE=()=>[],J1e=()=>!1;let UE=0;function GE(e){return(t,n,o,r)=>e(n,o,Jt()||void 0,r)}const Z1e=()=>{const e=Jt();let t=null;return e&&(t=q7(e)[VE])?{[VE]:t}:null};function j$(e={},t){const{__root:n,__injectWithOption:o}=e,r=n===void 0,i=e.flatJson,a=Rh?ae:se,l=!!e.translateExistCompatible;let s=xt(e.inheritLocale)?e.inheritLocale:!0;const u=a(n&&s?n.locale.value:je(e.locale)?e.locale:Ac),c=a(n&&s?n.fallbackLocale.value:je(e.fallbackLocale)||Yt(e.fallbackLocale)||ht(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:u.value),d=a(Rm(u.value,e)),f=a(ht(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),p=a(ht(e.numberFormats)?e.numberFormats:{[u.value]:{}});let v=n?n.missingWarn:xt(e.missingWarn)||za(e.missingWarn)?e.missingWarn:!0,h=n?n.fallbackWarn:xt(e.fallbackWarn)||za(e.fallbackWarn)?e.fallbackWarn:!0,m=n?n.fallbackRoot:xt(e.fallbackRoot)?e.fallbackRoot:!0,b=!!e.fallbackFormat,S=Kt(e.missing)?e.missing:null,C=Kt(e.missing)?GE(e.missing):null,$=Kt(e.postTranslation)?e.postTranslation:null,x=n?n.warnHtmlMessage:xt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,P=!!e.escapeParameter;const w=n?n.modifiers:ht(e.modifiers)?e.modifiers:{};let O=e.pluralRules||n&&n.pluralRules,I;I=(()=>{r&&DE(null);const ee={version:X1e,locale:u.value,fallbackLocale:c.value,messages:d.value,modifiers:w,pluralRules:O,missing:C===null?void 0:C,missingWarn:v,fallbackWarn:h,fallbackFormat:b,unresolving:!0,postTranslation:$===null?void 0:$,warnHtmlMessage:x,escapeParameter:P,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};ee.datetimeFormats=f.value,ee.numberFormats=p.value,ee.__datetimeFormatters=ht(I)?I.__datetimeFormatters:void 0,ee.__numberFormatters=ht(I)?I.__numberFormatters:void 0;const ue=F1e(ee);return r&&DE(ue),ue})(),Iu(I,u.value,c.value);function T(){return[u.value,c.value,d.value,f.value,p.value]}const A=E({get:()=>u.value,set:ee=>{u.value=ee,I.locale=u.value}}),R=E({get:()=>c.value,set:ee=>{c.value=ee,I.fallbackLocale=c.value,Iu(I,u.value,ee)}}),H=E(()=>d.value),M=E(()=>f.value),D=E(()=>p.value);function N(){return Kt($)?$:null}function L(ee){$=ee,I.postTranslation=ee}function F(){return S}function B(ee){ee!==null&&(C=GE(ee)),S=ee,I.missing=C}const j=(ee,ue,xe,Pe,_e,Ce)=>{T();let we;try{__INTLIFY_PROD_DEVTOOLS__,r||(I.fallbackContext=n?L1e():void 0),we=ee(I)}finally{__INTLIFY_PROD_DEVTOOLS__,r||(I.fallbackContext=void 0)}if(xe!=="translate exists"&&vn(we)&&we===Am||xe==="translate exists"&&!we){const[Oe,Me]=ue();return n&&m?Pe(n):_e(Oe)}else{if(Ce(we))return we;throw Wn(Mn.UNEXPECTED_RETURN_TYPE)}};function z(...ee){return j(ue=>Reflect.apply(FE,null,[ue,...ee]),()=>W1(...ee),"translate",ue=>Reflect.apply(ue.t,ue,[...ee]),ue=>ue,ue=>je(ue))}function G(...ee){const[ue,xe,Pe]=ee;if(Pe&&!Et(Pe))throw Wn(Mn.INVALID_ARGUMENT);return z(ue,xe,qn({resolvedMessage:!0},Pe||{}))}function Q(...ee){return j(ue=>Reflect.apply(BE,null,[ue,...ee]),()=>V1(...ee),"datetime format",ue=>Reflect.apply(ue.d,ue,[...ee]),()=>ME,ue=>je(ue))}function Y(...ee){return j(ue=>Reflect.apply(zE,null,[ue,...ee]),()=>K1(...ee),"number format",ue=>Reflect.apply(ue.n,ue,[...ee]),()=>ME,ue=>je(ue))}function oe(ee){return ee.map(ue=>je(ue)||vn(ue)||xt(ue)?WE(String(ue)):ue)}const re={normalize:oe,interpolate:ee=>ee,type:"vnode"};function ne(...ee){return j(ue=>{let xe;const Pe=ue;try{Pe.processor=re,xe=Reflect.apply(FE,null,[Pe,...ee])}finally{Pe.processor=null}return xe},()=>W1(...ee),"translate",ue=>ue[U1](...ee),ue=>[WE(ue)],ue=>Yt(ue))}function X(...ee){return j(ue=>Reflect.apply(zE,null,[ue,...ee]),()=>K1(...ee),"number format",ue=>ue[X1](...ee),KE,ue=>je(ue)||Yt(ue))}function te(...ee){return j(ue=>Reflect.apply(BE,null,[ue,...ee]),()=>V1(...ee),"datetime format",ue=>ue[G1](...ee),KE,ue=>je(ue)||Yt(ue))}function W(ee){O=ee,I.pluralRules=O}function U(ee,ue){return j(()=>{if(!ee)return!1;const xe=je(ue)?ue:u.value,Pe=fe(xe),_e=I.messageResolver(Pe,ee);return l?_e!=null:fi(_e)||cr(_e)||je(_e)},()=>[ee],"translate exists",xe=>Reflect.apply(xe.te,xe,[ee,ue]),J1e,xe=>xt(xe))}function J(ee){let ue=null;const xe=N7(I,c.value,u.value);for(let Pe=0;Pe{s&&(u.value=ee,I.locale=ee,Iu(I,u.value,c.value))}),be(n.fallbackLocale,ee=>{s&&(c.value=ee,I.fallbackLocale=ee,Iu(I,u.value,c.value))}));const ce={id:UE,locale:A,fallbackLocale:R,get inheritLocale(){return s},set inheritLocale(ee){s=ee,ee&&n&&(u.value=n.locale.value,c.value=n.fallbackLocale.value,Iu(I,u.value,c.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:H,get modifiers(){return w},get pluralRules(){return O||{}},get isGlobal(){return r},get missingWarn(){return v},set missingWarn(ee){v=ee,I.missingWarn=v},get fallbackWarn(){return h},set fallbackWarn(ee){h=ee,I.fallbackWarn=h},get fallbackRoot(){return m},set fallbackRoot(ee){m=ee},get fallbackFormat(){return b},set fallbackFormat(ee){b=ee,I.fallbackFormat=b},get warnHtmlMessage(){return x},set warnHtmlMessage(ee){x=ee,I.warnHtmlMessage=ee},get escapeParameter(){return P},set escapeParameter(ee){P=ee,I.escapeParameter=ee},t:z,getLocaleMessage:fe,setLocaleMessage:pe,mergeLocaleMessage:ve,getPostTranslationHandler:N,setPostTranslationHandler:L,getMissingHandler:F,setMissingHandler:B,[X7]:W};return ce.datetimeFormats=M,ce.numberFormats=D,ce.rt=G,ce.te=U,ce.tm=de,ce.d=Q,ce.n=Y,ce.getDateTimeFormat=he,ce.setDateTimeFormat=V,ce.mergeDateTimeFormat=q,ce.getNumberFormat=ie,ce.setNumberFormat=me,ce.mergeNumberFormat=Se,ce[Y7]=o,ce[U1]=ne,ce[G1]=te,ce[X1]=X,ce}function Q1e(e){const t=je(e.locale)?e.locale:Ac,n=je(e.fallbackLocale)||Yt(e.fallbackLocale)||ht(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=Kt(e.missing)?e.missing:void 0,r=xt(e.silentTranslationWarn)||za(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,i=xt(e.silentFallbackWarn)||za(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,a=xt(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,s=ht(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=Kt(e.postTranslation)?e.postTranslation:void 0,d=je(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,p=xt(e.sync)?e.sync:!0;let v=e.messages;if(ht(e.sharedMessages)){const P=e.sharedMessages;v=Object.keys(P).reduce((O,I)=>{const _=O[I]||(O[I]={});return qn(_,P[I]),O},v||{})}const{__i18n:h,__root:m,__injectWithOption:b}=e,S=e.datetimeFormats,C=e.numberFormats,$=e.flatJson,x=e.translateExistCompatible;return{locale:t,fallbackLocale:n,messages:v,flatJson:$,datetimeFormats:S,numberFormats:C,missing:o,missingWarn:r,fallbackWarn:i,fallbackRoot:a,fallbackFormat:l,modifiers:s,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,translateExistCompatible:x,__i18n:h,__root:m,__injectWithOption:b}}function q1(e={},t){{const n=j$(Q1e(e)),{__extender:o}=e,r={id:n.id,get locale(){return n.locale.value},set locale(i){n.locale.value=i},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(i){n.fallbackLocale.value=i},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(i){},get missing(){return n.getMissingHandler()},set missing(i){n.setMissingHandler(i)},get silentTranslationWarn(){return xt(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(i){n.missingWarn=xt(i)?!i:i},get silentFallbackWarn(){return xt(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(i){n.fallbackWarn=xt(i)?!i:i},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(i){n.fallbackFormat=i},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(i){n.setPostTranslationHandler(i)},get sync(){return n.inheritLocale},set sync(i){n.inheritLocale=i},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(i){n.warnHtmlMessage=i!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(i){n.escapeParameter=i},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(i){},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...i){const[a,l,s]=i,u={};let c=null,d=null;if(!je(a))throw Wn(Mn.INVALID_ARGUMENT);const f=a;return je(l)?u.locale=l:Yt(l)?c=l:ht(l)&&(d=l),Yt(s)?c=s:ht(s)&&(d=s),Reflect.apply(n.t,n,[f,c||d||{},u])},rt(...i){return Reflect.apply(n.rt,n,[...i])},tc(...i){const[a,l,s]=i,u={plural:1};let c=null,d=null;if(!je(a))throw Wn(Mn.INVALID_ARGUMENT);const f=a;return je(l)?u.locale=l:vn(l)?u.plural=l:Yt(l)?c=l:ht(l)&&(d=l),je(s)?u.locale=s:Yt(s)?c=s:ht(s)&&(d=s),Reflect.apply(n.t,n,[f,c||d||{},u])},te(i,a){return n.te(i,a)},tm(i){return n.tm(i)},getLocaleMessage(i){return n.getLocaleMessage(i)},setLocaleMessage(i,a){n.setLocaleMessage(i,a)},mergeLocaleMessage(i,a){n.mergeLocaleMessage(i,a)},d(...i){return Reflect.apply(n.d,n,[...i])},getDateTimeFormat(i){return n.getDateTimeFormat(i)},setDateTimeFormat(i,a){n.setDateTimeFormat(i,a)},mergeDateTimeFormat(i,a){n.mergeDateTimeFormat(i,a)},n(...i){return Reflect.apply(n.n,n,[...i])},getNumberFormat(i){return n.getNumberFormat(i)},setNumberFormat(i,a){n.setNumberFormat(i,a)},mergeNumberFormat(i,a){n.mergeNumberFormat(i,a)},getChoiceIndex(i,a){return-1}};return r.__extender=o,r}}const W$={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function eSe({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,r)=>[...o,...r.type===Le?r.children:[r]],[]):t.reduce((n,o)=>{const r=e[o];return r&&(n[o]=r()),n},Nt())}function Z7(e){return Le}const tSe=le({name:"i18n-t",props:qn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>vn(e)||!isNaN(e)}},W$),setup(e,t){const{slots:n,attrs:o}=t,r=e.i18n||V$({useScope:e.scope,__useComponent:!0});return()=>{const i=Object.keys(n).filter(d=>d!=="_"),a=Nt();e.locale&&(a.locale=e.locale),e.plural!==void 0&&(a.plural=je(e.plural)?+e.plural:e.plural);const l=eSe(t,i),s=r[U1](e.keypath,l,a),u=qn(Nt(),o),c=je(e.tag)||Et(e.tag)?e.tag:Z7();return Vr(c,u,s)}}}),XE=tSe;function nSe(e){return Yt(e)&&!je(e[0])}function Q7(e,t,n,o){const{slots:r,attrs:i}=t;return()=>{const a={part:!0};let l=Nt();e.locale&&(a.locale=e.locale),je(e.format)?a.key=e.format:Et(e.format)&&(je(e.format.key)&&(a.key=e.format.key),l=Object.keys(e.format).reduce((f,p)=>n.includes(p)?qn(Nt(),f,{[p]:e.format[p]}):f,Nt()));const s=o(e.value,a,l);let u=[a.key];Yt(s)?u=s.map((f,p)=>{const v=r[f.type],h=v?v({[f.type]:f.value,index:p,parts:s}):[f.value];return nSe(h)&&(h[0].key=`${f.type}-${p}`),h}):je(s)&&(u=[s]);const c=qn(Nt(),i),d=je(e.tag)||Et(e.tag)?e.tag:Z7();return Vr(d,c,u)}}const oSe=le({name:"i18n-n",props:qn({value:{type:Number,required:!0},format:{type:[String,Object]}},W$),setup(e,t){const n=e.i18n||V$({useScope:e.scope,__useComponent:!0});return Q7(e,t,U7,(...o)=>n[X1](...o))}}),YE=oSe,rSe=le({name:"i18n-d",props:qn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},W$),setup(e,t){const n=e.i18n||V$({useScope:e.scope,__useComponent:!0});return Q7(e,t,K7,(...o)=>n[G1](...o))}}),qE=rSe;function iSe(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function aSe(e){const t=a=>{const{instance:l,modifiers:s,value:u}=a;if(!l||!l.$)throw Wn(Mn.UNEXPECTED_ERROR);const c=iSe(e,l.$),d=JE(u);return[Reflect.apply(c.t,c,[...ZE(d)]),c]};return{created:(a,l)=>{const[s,u]=t(l);Rh&&e.global===u&&(a.__i18nWatcher=be(u.locale,()=>{l.instance&&l.instance.$forceUpdate()})),a.__composer=u,a.textContent=s},unmounted:a=>{Rh&&a.__i18nWatcher&&(a.__i18nWatcher(),a.__i18nWatcher=void 0,delete a.__i18nWatcher),a.__composer&&(a.__composer=void 0,delete a.__composer)},beforeUpdate:(a,{value:l})=>{if(a.__composer){const s=a.__composer,u=JE(l);a.textContent=Reflect.apply(s.t,s,[...ZE(u)])}},getSSRProps:a=>{const[l]=t(a);return{textContent:l}}}}function JE(e){if(je(e))return{path:e};if(ht(e)){if(!("path"in e))throw Wn(Mn.REQUIRED_VALUE,"path");return e}else throw Wn(Mn.INVALID_VALUE)}function ZE(e){const{path:t,locale:n,args:o,choice:r,plural:i}=e,a={},l=o||{};return je(n)&&(a.locale=n),vn(r)&&(a.plural=r),vn(i)&&(a.plural=i),[t,l,a]}function lSe(e,t,...n){const o=ht(n[0])?n[0]:{},r=!!o.useI18nComponentName;(xt(o.globalInstall)?o.globalInstall:!0)&&([r?"i18n":XE.name,"I18nT"].forEach(a=>e.component(a,XE)),[YE.name,"I18nN"].forEach(a=>e.component(a,YE)),[qE.name,"I18nD"].forEach(a=>e.component(a,qE))),e.directive("t",aSe(t))}function sSe(e,t,n){return{beforeCreate(){const o=Jt();if(!o)throw Wn(Mn.UNEXPECTED_ERROR);const r=this.$options;if(r.i18n){const i=r.i18n;if(r.__i18n&&(i.__i18n=r.__i18n),i.__root=t,this===this.$root)this.$i18n=QE(e,i);else{i.__injectWithOption=!0,i.__extender=n.__vueI18nExtend,this.$i18n=q1(i);const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}}else if(r.__i18n)if(this===this.$root)this.$i18n=QE(e,r);else{this.$i18n=q1({__i18n:r.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}else this.$i18n=e;r.__i18nGlobal&&J7(t,r,r),this.$t=(...i)=>this.$i18n.t(...i),this.$rt=(...i)=>this.$i18n.rt(...i),this.$tc=(...i)=>this.$i18n.tc(...i),this.$te=(i,a)=>this.$i18n.te(i,a),this.$d=(...i)=>this.$i18n.d(...i),this.$n=(...i)=>this.$i18n.n(...i),this.$tm=i=>this.$i18n.tm(i),n.__setInstance(o,this.$i18n)},mounted(){},unmounted(){const o=Jt();if(!o)throw Wn(Mn.UNEXPECTED_ERROR);const r=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,r.__disposer&&(r.__disposer(),delete r.__disposer,delete r.__extender),n.__deleteInstance(o),delete this.$i18n}}}function QE(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[X7](t.pluralizationRules||e.pluralizationRules);const n=Rm(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const cSe=Qa("global-vue-i18n");function uSe(e={},t){const n=__VUE_I18N_LEGACY_API__&&xt(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,o=xt(e.globalInjection)?e.globalInjection:!0,r=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,i=new Map,[a,l]=dSe(e,n),s=Qa("");function u(f){return i.get(f)||null}function c(f,p){i.set(f,p)}function d(f){i.delete(f)}{const f={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return r},async install(p,...v){if(p.__VUE_I18N_SYMBOL__=s,p.provide(p.__VUE_I18N_SYMBOL__,f),ht(v[0])){const b=v[0];f.__composerExtend=b.__composerExtend,f.__vueI18nExtend=b.__vueI18nExtend}let h=null;!n&&o&&(h=SSe(p,f.global)),__VUE_I18N_FULL_INSTALL__&&lSe(p,f,...v),__VUE_I18N_LEGACY_API__&&n&&p.mixin(sSe(l,l.__composer,f));const m=p.unmount;p.unmount=()=>{h&&h(),f.dispose(),m()}},get global(){return l},dispose(){a.stop()},__instances:i,__getInstance:u,__setInstance:c,__deleteInstance:d};return f}}function V$(e={}){const t=Jt();if(t==null)throw Wn(Mn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Wn(Mn.NOT_INSTALLED);const n=fSe(t),o=gSe(n),r=q7(t),i=pSe(e,r);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw Wn(Mn.NOT_AVAILABLE_IN_LEGACY_MODE);return bSe(t,i,o,e)}if(i==="global")return J7(o,e,r),o;if(i==="parent"){let s=hSe(n,t,e.__useComponent);return s==null&&(s=o),s}const a=n;let l=a.__getInstance(t);if(l==null){const s=qn({},e);"__i18n"in r&&(s.__i18n=r.__i18n),o&&(s.__root=o),l=j$(s),a.__composerExtend&&(l[Y1]=a.__composerExtend(l)),mSe(a,t,l),a.__setInstance(t,l)}return l}function dSe(e,t,n){const o=fS();{const r=__VUE_I18N_LEGACY_API__&&t?o.run(()=>q1(e)):o.run(()=>j$(e));if(r==null)throw Wn(Mn.UNEXPECTED_ERROR);return[o,r]}}function fSe(e){{const t=ze(e.isCE?cSe:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Wn(e.isCE?Mn.NOT_INSTALLED_WITH_PROVIDE:Mn.UNEXPECTED_ERROR);return t}}function pSe(e,t){return _m(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function gSe(e){return e.mode==="composition"?e.global:e.global.__composer}function hSe(e,t,n=!1){let o=null;const r=t.root;let i=vSe(t,n);for(;i!=null;){const a=e;if(e.mode==="composition")o=a.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const l=a.__getInstance(i);l!=null&&(o=l.__composer,n&&o&&!o[Y7]&&(o=null))}if(o!=null||r===i)break;i=i.parent}return o}function vSe(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function mSe(e,t,n){Ke(()=>{},t),Zn(()=>{const o=n;e.__deleteInstance(t);const r=o[Y1];r&&(r(),delete o[Y1])},t)}function bSe(e,t,n,o={}){const r=t==="local",i=se(null);if(r&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw Wn(Mn.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const a=xt(o.inheritLocale)?o.inheritLocale:!je(o.locale),l=ae(!r||a?n.locale.value:je(o.locale)?o.locale:Ac),s=ae(!r||a?n.fallbackLocale.value:je(o.fallbackLocale)||Yt(o.fallbackLocale)||ht(o.fallbackLocale)||o.fallbackLocale===!1?o.fallbackLocale:l.value),u=ae(Rm(l.value,o)),c=ae(ht(o.datetimeFormats)?o.datetimeFormats:{[l.value]:{}}),d=ae(ht(o.numberFormats)?o.numberFormats:{[l.value]:{}}),f=r?n.missingWarn:xt(o.missingWarn)||za(o.missingWarn)?o.missingWarn:!0,p=r?n.fallbackWarn:xt(o.fallbackWarn)||za(o.fallbackWarn)?o.fallbackWarn:!0,v=r?n.fallbackRoot:xt(o.fallbackRoot)?o.fallbackRoot:!0,h=!!o.fallbackFormat,m=Kt(o.missing)?o.missing:null,b=Kt(o.postTranslation)?o.postTranslation:null,S=r?n.warnHtmlMessage:xt(o.warnHtmlMessage)?o.warnHtmlMessage:!0,C=!!o.escapeParameter,$=r?n.modifiers:ht(o.modifiers)?o.modifiers:{},x=o.pluralRules||r&&n.pluralRules;function P(){return[l.value,s.value,u.value,c.value,d.value]}const w=E({get:()=>i.value?i.value.locale.value:l.value,set:J=>{i.value&&(i.value.locale.value=J),l.value=J}}),O=E({get:()=>i.value?i.value.fallbackLocale.value:s.value,set:J=>{i.value&&(i.value.fallbackLocale.value=J),s.value=J}}),I=E(()=>i.value?i.value.messages.value:u.value),_=E(()=>c.value),T=E(()=>d.value);function A(){return i.value?i.value.getPostTranslationHandler():b}function R(J){i.value&&i.value.setPostTranslationHandler(J)}function H(){return i.value?i.value.getMissingHandler():m}function M(J){i.value&&i.value.setMissingHandler(J)}function D(J){return P(),J()}function N(...J){return i.value?D(()=>Reflect.apply(i.value.t,null,[...J])):D(()=>"")}function L(...J){return i.value?Reflect.apply(i.value.rt,null,[...J]):""}function F(...J){return i.value?D(()=>Reflect.apply(i.value.d,null,[...J])):D(()=>"")}function B(...J){return i.value?D(()=>Reflect.apply(i.value.n,null,[...J])):D(()=>"")}function j(J){return i.value?i.value.tm(J):{}}function z(J,de){return i.value?i.value.te(J,de):!1}function G(J){return i.value?i.value.getLocaleMessage(J):{}}function Q(J,de){i.value&&(i.value.setLocaleMessage(J,de),u.value[J]=de)}function Y(J,de){i.value&&i.value.mergeLocaleMessage(J,de)}function oe(J){return i.value?i.value.getDateTimeFormat(J):{}}function Z(J,de){i.value&&(i.value.setDateTimeFormat(J,de),c.value[J]=de)}function re(J,de){i.value&&i.value.mergeDateTimeFormat(J,de)}function ne(J){return i.value?i.value.getNumberFormat(J):{}}function X(J,de){i.value&&(i.value.setNumberFormat(J,de),d.value[J]=de)}function te(J,de){i.value&&i.value.mergeNumberFormat(J,de)}const W={get id(){return i.value?i.value.id:-1},locale:w,fallbackLocale:O,messages:I,datetimeFormats:_,numberFormats:T,get inheritLocale(){return i.value?i.value.inheritLocale:a},set inheritLocale(J){i.value&&(i.value.inheritLocale=J)},get availableLocales(){return i.value?i.value.availableLocales:Object.keys(u.value)},get modifiers(){return i.value?i.value.modifiers:$},get pluralRules(){return i.value?i.value.pluralRules:x},get isGlobal(){return i.value?i.value.isGlobal:!1},get missingWarn(){return i.value?i.value.missingWarn:f},set missingWarn(J){i.value&&(i.value.missingWarn=J)},get fallbackWarn(){return i.value?i.value.fallbackWarn:p},set fallbackWarn(J){i.value&&(i.value.missingWarn=J)},get fallbackRoot(){return i.value?i.value.fallbackRoot:v},set fallbackRoot(J){i.value&&(i.value.fallbackRoot=J)},get fallbackFormat(){return i.value?i.value.fallbackFormat:h},set fallbackFormat(J){i.value&&(i.value.fallbackFormat=J)},get warnHtmlMessage(){return i.value?i.value.warnHtmlMessage:S},set warnHtmlMessage(J){i.value&&(i.value.warnHtmlMessage=J)},get escapeParameter(){return i.value?i.value.escapeParameter:C},set escapeParameter(J){i.value&&(i.value.escapeParameter=J)},t:N,getPostTranslationHandler:A,setPostTranslationHandler:R,getMissingHandler:H,setMissingHandler:M,rt:L,d:F,n:B,tm:j,te:z,getLocaleMessage:G,setLocaleMessage:Q,mergeLocaleMessage:Y,getDateTimeFormat:oe,setDateTimeFormat:Z,mergeDateTimeFormat:re,getNumberFormat:ne,setNumberFormat:X,mergeNumberFormat:te};function U(J){J.locale.value=l.value,J.fallbackLocale.value=s.value,Object.keys(u.value).forEach(de=>{J.mergeLocaleMessage(de,u.value[de])}),Object.keys(c.value).forEach(de=>{J.mergeDateTimeFormat(de,c.value[de])}),Object.keys(d.value).forEach(de=>{J.mergeNumberFormat(de,d.value[de])}),J.escapeParameter=C,J.fallbackFormat=h,J.fallbackRoot=v,J.fallbackWarn=p,J.missingWarn=f,J.warnHtmlMessage=S}return cf(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw Wn(Mn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const J=i.value=e.proxy.$i18n.__composer;t==="global"?(l.value=J.locale.value,s.value=J.fallbackLocale.value,u.value=J.messages.value,c.value=J.datetimeFormats.value,d.value=J.numberFormats.value):r&&U(J)}),W}const ySe=["locale","fallbackLocale","availableLocales"],e3=["t","rt","d","n","tm","te"];function SSe(e,t){const n=Object.create(null);return ySe.forEach(r=>{const i=Object.getOwnPropertyDescriptor(t,r);if(!i)throw Wn(Mn.UNEXPECTED_ERROR);const a=Ut(i.value)?{get(){return i.value.value},set(l){i.value.value=l}}:{get(){return i.get&&i.get()}};Object.defineProperty(n,r,a)}),e.config.globalProperties.$i18n=n,e3.forEach(r=>{const i=Object.getOwnPropertyDescriptor(t,r);if(!i||!i.value)throw Wn(Mn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${r}`,i)}),()=>{delete e.config.globalProperties.$i18n,e3.forEach(r=>{delete e.config.globalProperties[`$${r}`]})}}Y1e();__INTLIFY_JIT_COMPILATION__?RE(W1e):RE(j1e);R1e(p1e);D1e(N7);if(__INTLIFY_PROD_DEVTOOLS__){const e=Fi();e.__INTLIFY__=!0,x1e(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const CSe={conversation:"Conversation",plan:"Plan Execution",backHome:"Back to Home",noPageTip:"The page you are looking for does not exist.",init:{welcome:"Welcome to JManus",welcomeStep:"Welcome to JManus",description:"To get started, you need to configure an LLM service to enable AI features. You can choose Alibaba Cloud DashScope or configure any OpenAI-compatible API service.",languageStepDescription:"Please select your language preference, which will be used as the default interface language.",stepLanguage:"Language",stepModel:"Model Setup",selectLanguageLabel:"Select Language",continueToModel:"Continue to Model Setup",back:"Back",configModeLabel:"Configuration Mode",dashscopeMode:"Alibaba Cloud DashScope (Recommended)",dashscopeModeDesc:"Use Alibaba Cloud DashScope service, just provide API key to get started quickly",customMode:"Custom OpenAI Compatible Service",customModeDesc:"Configure any OpenAI API compatible service, such as Ollama, LocalAI, etc.",apiKeyLabel:"DashScope API Key",apiKeyPlaceholder:"Enter your API key",apiKeyHint:"You can get your API key from Alibaba Cloud Bailian Console.",getApiKey:"Get API Key",baseUrlLabel:"API Base URL",baseUrlPlaceholder:"https://api.openai.com or your custom URL",baseUrlHint:"OpenAI compatible API base URL, e.g. http://localhost:11434",customApiKeyLabel:"API Key",customApiKeyPlaceholder:"Enter your API key",modelNameLabel:"Model Name",modelNamePlaceholder:"gpt-4.1 or your model name",modelNameHint:"Enter the model name you want to use, e.g. gemini-2.5-pro, gpt-4.1, etc.",modelDisplayNameLabel:"Model Display Name (Optional)",modelDisplayNamePlaceholder:"Display name for the model",saveAndContinue:"Save and Continue",saving:"Saving...",apiKeyRequired:"API key is required",baseUrlRequired:"API base URL is required",modelNameRequired:"Model name is required",saveFailed:"Failed to save configuration",networkError:"Network error, please check your internet connection",successMessage:"Configuration saved successfully! Redirecting to home page...",restartRequired:`API key saved successfully! The application needs to be restarted for the configuration to take effect. -Click "OK" to restart now, or "Cancel" to restart manually later.`},common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",edit:"Edit",save:"Save",reset:"Reset",close:"Close",add:"Add",create:"Create",update:"Update",submit:"Submit",clear:"Clear",search:"Search",loading:"Loading...",success:"Success",error:"Error",warning:"Warning",info:"Info",yes:"Yes",no:"No",enable:"Enable",disable:"Disable",copy:"Copy",paste:"Paste",cut:"Cut",undo:"Undo",redo:"Redo",select:"Select",selectAll:"Select All",deselectAll:"Deselect All",previous:"Previous",next:"Next",finish:"Finish",retry:"Retry",refresh:"Refresh",import:"Import",export:"Export",upload:"Upload",download:"Download",preview:"Preview",expand:"Expand",collapse:"Collapse",maximize:"Maximize",minimize:"Minimize",fullscreen:"Fullscreen",exitFullscreen:"Exit Fullscreen",parameters:"Parameters",thinking:"Thinking",input:"Input",total:"Total",loadFailed:"Load Failed"},config:{title:"Configuration Management",loading:"Loading configuration...",notFound:"No configuration items found",reset:"Reset",resetGroupConfirm:"Reset all configurations in this group to default values",modified:"Modified",saved:"Configuration saved",saveFailed:"Save failed",search:"Search configuration items...",mcpSearch:"Search MCP servers...",mcpConfigPlaceholder:"Please enter MCP server configuration (JSON format)...",types:{string:"String",text:"Text",number:"Number",boolean:"Boolean",select:"Select",textarea:"Textarea",checkbox:"Checkbox"},range:"Range",min:"Minimum",max:"Maximum",categories:{basic:"Basic Configuration",agent:"Agent Configuration",model:"Model Configuration",mcp:"Tools/MCP Configuration",prompt:"Dynamic Prompt Configuration",namespace:"Namespace Configuration"},subGroupDisplayNames:{agent:"Agent",browser:"Browser",interaction:"Interaction",system:"System",performance:"Performance",general:"General",agents:"Multi - Agent",infiniteContext:"Infinite Context",filesystem:"File System",mcpServiceLoader:"MCP Service Loader"},agentConfig:{title:"Agent Configuration",import:"Import",export:"Export",configuredAgents:"Configured Agents",agentCount:"agents",noAgent:"No agent configuration",createNew:"Create New Agent",selectAgentHint:"Please select an agent to configure",newAgent:"New Agent",agentName:"Agent Name",agentNamePlaceholder:"Enter agent name",description:"Description",descriptionPlaceholder:"Describe the function and purpose of this agent",nextStepPrompt:"Agent Prompt (personality, requirements, and next step guidance)",nextStepPromptPlaceholder:"Set the agent's personality, requirements, and next step guidance...",toolConfiguration:"Tool Configuration",assignedTools:"Assigned Tools",noAssignedTools:"No assigned tools",addRemoveTools:"Add/Remove Tools",deleteConfirm:"Delete Confirmation",deleteConfirmText:"Are you sure you want to delete",deleteWarning:"This operation cannot be undone.",requiredFields:"Please fill in the required fields",createSuccess:"Agent created successfully",createFailed:"Failed to create agent",saveSuccess:"Agent saved successfully",saveFailed:"Failed to save agent",deleteSuccess:"Agent deleted successfully",deleteFailed:"Failed to delete agent",importSuccess:"Agent imported successfully",importFailed:"Failed to import agent",exportSuccess:"Agent exported successfully",exportFailed:"Failed to export agent",loadDataFailed:"Failed to load data",loadDetailsFailed:"Failed to load agent details",invalidFormat:"Invalid agent configuration format: missing required fields",modelConfiguration:"Model Configuration",modelConfigurationLabel:"Select Model"},modelConfig:{title:"Model Configuration",import:"Import",export:"Export",configuredModels:"Configured Models",modelCount:"models",noModel:"No model configurations available",createNew:"Create New Model",selectModelHint:"Please select a model to configure",newModel:"New Model",type:"Model Type",typePlaceholder:"Select model type",baseUrl:"Base Url",baseUrlPlaceholder:"Enter base url",apiKey:"API Key",apiKeyPlaceholder:"Enter API key",modelName:"Model Name",modelNamePlaceholder:"Enter model name",description:"Description",descriptionPlaceholder:"Enter model description",deleteConfirm:"Delete Confirmation",deleteConfirmText:"Are you sure you want to delete",deleteWarning:"This action cannot be undone.",requiredFields:"Please fill in all required fields",createSuccess:"Model created successfully",createFailed:"Failed to create model",saveSuccess:"Model saved successfully",saveFailed:"Failed to save model",deleteSuccess:"Model deleted successfully",deleteFailed:"Failed to delete model",importSuccess:"Model imported successfully",importFailed:"Failed to import model",exportSuccess:"Model exported successfully",exportFailed:"Failed to export model",loadDataFailed:"Failed to load data",loadDetailsFailed:"Failed to load model details",invalidFormat:"Model configuration format is invalid: missing required fields",validateConfig:"Validate Config",validationSuccess:"Validation successful",validationFailed:"Validation failed",pleaseEnterBaseUrlAndApiKey:"Please enter Base URL and API Key",selectModel:"Select Model",availableModels:"Available Models",searchModels:"Search models...",getModelsCount:"Found {count} available models",default:"Default",setAsDefault:"Set as Default",currentDefault:"Current Default",setDefaultSuccess:"Model set as default successfully",setDefaultFailed:"Failed to set model as default",validatingBeforeSave:"Validating API key before saving...",validationFailedCannotSave:"API key validation failed, cannot save",temperature:"Temperature",temperaturePlaceholder:"Leave empty to use model default",topP:"Top P",topPPlaceholder:"Leave empty to use model default",headers:"Headers",headersPlaceholder:"Request headers (JSON format)"},mcpConfig:{title:"MCP Server Configuration",mcpServers:"MCP Servers",addMcpServer:"Add MCP Server",serverList:"Server List",noServers:"No MCP server configuration",connectionType:"Connection Type",configJsonLabel:"MCP JSON Configuration:",configJsonPlaceholder:"Please enter MCP server configuration (JSON format)...",instructions:"Instructions:",instructionStep1:"Find the configuration JSON for your MCP server:",instructionStep1Local:"Local (STDIO)",instructionStep1LocalDesc:"Available at mcp.so, requires Node.js environment and understanding of each item in the configuration JSON for proper adjustments like setting access keys",instructionStep1Remote:"Remote Service (SSE/STREAMING)",instructionStep1RemoteDesc:"Available at mcp.higress.ai/, offers SSE and STREAMING types, currently STREAM protocol is more complete",instructionStep2:"Copy the JSON configuration to the input box above, select STUDIO for local, STREAMING or SSE for remote, then submit",instructionStep3:"This will successfully register the MCP tools.",instructionStep4:"Then you need to create a new agent in Agent Configuration, and add the specific MCP tools you just added, which can greatly reduce conflicts and enhance the accuracy of tools being selected by agents",configRequired:"Please enter MCP server configuration",invalidJson:"Configuration JSON format is incorrect, please check syntax",addFailed:"Failed to add MCP server, please try again",deleteFailed:"Failed to delete MCP server, please try again",formatJson:"Format",jsonStatusEmpty:"Please enter JSON configuration",jsonStatusValid:"JSON format is valid",jsonStatusInvalid:"JSON format is invalid",missingMcpServers:"❌ Missing mcpServers property - Please ensure JSON contains mcpServers object",invalidServerConfig:"❌ Invalid server configuration: {serverId} - Server config must be an object",invalidArgs:"❌ args field must be an array: {serverId} - Please change args to array format",invalidEnv:"❌ env field must be an object: {serverId} - Please change env to object format",invalidArgsType:"❌ args array elements must be strings: {serverId}, index: {index} - Please ensure all arguments are strings",invalidEnvType:"❌ env object values must be strings: {serverId}, key: {key} - Environment variable values must be strings",missingUrl:"❌ Missing url field: {serverId} - Must have url when no command is present",invalidUrl:"❌ Invalid url format: {serverId} - Please check if URL format is correct",studioExample:`Please enter MCP server configuration JSON. +Click "OK" to restart now, or "Cancel" to restart manually later.`,simplifiedChinese:"Simplified Chinese"},common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",edit:"Edit",save:"Save",reset:"Reset",close:"Close",add:"Add",create:"Create",update:"Update",submit:"Submit",clear:"Clear",submitFailed:"Submit Failed",unknownError:"Unknown Error",search:"Search",loading:"Loading...",parameters:"Parameters"},language:{zh:"中文",en:"English",success:"Success",error:"Error",warning:"Warning",info:"Info",yes:"Yes",no:"No",enable:"Enable",disable:"Disable",copy:"Copy",paste:"Paste",cut:"Cut",undo:"Undo",redo:"Redo",select:"Select",selectAll:"Select All",deselectAll:"Deselect All",previous:"Previous",next:"Next",finish:"Finish",retry:"Retry",refresh:"Refresh",import:"Import",export:"Export",upload:"Upload",download:"Download",preview:"Preview",expand:"Expand",collapse:"Collapse",maximize:"Maximize",minimize:"Minimize",fullscreen:"Fullscreen",exitFullscreen:"Exit Fullscreen",parameters:"Parameters",thinking:"Thinking",input:"Input",total:"Total",loadFailed:"Load Failed",switch:"Switch Language"},config:{title:"Configuration Management",loading:"Loading configuration...",notFound:"No configuration items found",reset:"Reset",resetGroupConfirm:"Reset all configurations in this group to default values",modified:"Modified",saved:"Configuration saved",saveFailed:"Save failed",search:"Search configuration items...",mcpSearch:"Search MCP servers...",mcpConfigPlaceholder:"Please enter MCP server configuration (JSON format)...",types:{string:"String",text:"Text",number:"Number",boolean:"Boolean",select:"Select",textarea:"Textarea",checkbox:"Checkbox"},range:"Range",min:"Minimum",max:"Maximum",categories:{basic:"Basic Configuration",agent:"Agent Configuration",model:"Model Configuration",mcp:"Tools/MCP Configuration",prompt:"Dynamic Prompt Configuration",namespace:"Namespace Configuration"},subGroupDisplayNames:{agent:"Agent",browser:"Browser",interaction:"Interaction",system:"System",performance:"Performance",general:"General",agents:"Multi - Agent",infiniteContext:"Infinite Context",filesystem:"File System",mcpServiceLoader:"MCP Service Loader"},agentConfig:{title:"Agent Configuration",import:"Import",export:"Export",configuredAgents:"Configured Agents",agentCount:"agents",noAgent:"No agent configuration",createNew:"Create New Agent",selectAgentHint:"Please select an agent to configure",newAgent:"New Agent",agentName:"Agent Name",agentNamePlaceholder:"Enter agent name",description:"Description",descriptionPlaceholder:"Describe the function and purpose of this agent",nextStepPrompt:"Agent Prompt (personality, requirements, and next step guidance)",nextStepPromptPlaceholder:"Set the agent's personality, requirements, and next step guidance...",toolConfiguration:"Tool Configuration",assignedTools:"Assigned Tools",noAssignedTools:"No assigned tools",addRemoveTools:"Add/Remove Tools",deleteConfirm:"Delete Confirmation",deleteConfirmText:"Are you sure you want to delete",deleteWarning:"This operation cannot be undone.",requiredFields:"Please fill in the required fields",createSuccess:"Agent created successfully",createFailed:"Failed to create agent",saveSuccess:"Agent saved successfully",saveFailed:"Failed to save agent",deleteSuccess:"Agent deleted successfully",deleteFailed:"Failed to delete agent",importSuccess:"Agent imported successfully",importFailed:"Failed to import agent",exportSuccess:"Agent exported successfully",exportFailed:"Failed to export agent",loadDataFailed:"Failed to load data",loadDetailsFailed:"Failed to load agent details",invalidFormat:"Invalid agent configuration format: missing required fields",modelConfiguration:"Model Configuration",modelConfigurationLabel:"Select Model"},modelConfig:{title:"Model Configuration",import:"Import",export:"Export",configuredModels:"Configured Models",modelCount:"models",noModel:"No model configurations available",createNew:"Create New Model",selectModelHint:"Please select a model to configure",newModel:"New Model",type:"Model Type",typePlaceholder:"Select model type",baseUrl:"Base Url",baseUrlPlaceholder:"Enter base url",apiKey:"API Key",apiKeyPlaceholder:"Enter API key",modelName:"Model Name",modelNamePlaceholder:"Enter model name",description:"Description",descriptionPlaceholder:"Enter model description",deleteConfirm:"Delete Confirmation",deleteConfirmText:"Are you sure you want to delete",deleteWarning:"This action cannot be undone.",requiredFields:"Please fill in all required fields",createSuccess:"Model created successfully",createFailed:"Failed to create model",saveSuccess:"Model saved successfully",saveFailed:"Failed to save model",deleteSuccess:"Model deleted successfully",deleteFailed:"Failed to delete model",importSuccess:"Model imported successfully",importFailed:"Failed to import model",exportSuccess:"Model exported successfully",exportFailed:"Failed to export model",loadDataFailed:"Failed to load data",loadDetailsFailed:"Failed to load model details",invalidFormat:"Model configuration format is invalid: missing required fields",validateConfig:"Validate Config",validationSuccess:"Validation successful",validationFailed:"Validation failed",pleaseEnterBaseUrlAndApiKey:"Please enter Base URL and API Key",selectModel:"Select Model",availableModels:"Available Models",searchModels:"Search models...",getModelsCount:"Found {count} available models",default:"Default",setAsDefault:"Set as Default",currentDefault:"Current Default",setDefaultSuccess:"Model set as default successfully",setDefaultFailed:"Failed to set model as default",validatingBeforeSave:"Validating API key before saving...",validationFailedCannotSave:"API key validation failed, cannot save",temperature:"Temperature",temperaturePlaceholder:"Leave empty to use model default",topP:"Top P",topPPlaceholder:"Leave empty to use model default",headers:"Headers",headersPlaceholder:"Request headers (JSON format)"},mcpConfig:{title:"MCP Server Configuration",mcpServers:"MCP Servers",addMcpServer:"Add MCP Server",serverList:"Server List",noServers:"No MCP server configuration",connectionType:"Connection Type",configJsonLabel:"MCP JSON Configuration:",configJsonPlaceholder:"Please enter MCP server configuration (JSON format)...",instructions:"Instructions:",instructionStep1:"Find the configuration JSON for your MCP server:",instructionStep1Local:"Local (STDIO)",instructionStep1LocalDesc:"Available at mcp.so, requires Node.js environment and understanding of each item in the configuration JSON for proper adjustments like setting access keys",instructionStep1Remote:"Remote Service (SSE/STREAMING)",instructionStep1RemoteDesc:"Available at mcp.higress.ai/, offers SSE and STREAMING types, currently STREAM protocol is more complete",instructionStep2:"Copy the JSON configuration to the input box above, select STUDIO for local, STREAMING or SSE for remote, then submit",instructionStep3:"This will successfully register the MCP tools.",instructionStep4:"Then you need to create a new agent in Agent Configuration, and add the specific MCP tools you just added, which can greatly reduce conflicts and enhance the accuracy of tools being selected by agents",configRequired:"Please enter MCP server configuration",invalidJson:"Configuration JSON format is incorrect, please check syntax",addFailed:"Failed to add MCP server, please try again",deleteFailed:"Failed to delete MCP server, please try again",formatJson:"Format",jsonStatusEmpty:"Please enter JSON configuration",jsonStatusValid:"JSON format is valid",jsonStatusInvalid:"JSON format is invalid",missingMcpServers:"❌ Missing mcpServers property - Please ensure JSON contains mcpServers object",invalidServerConfig:"❌ Invalid server configuration: {serverId} - Server config must be an object",invalidArgs:"❌ args field must be an array: {serverId} - Please change args to array format",invalidEnv:"❌ env field must be an object: {serverId} - Please change env to object format",invalidArgsType:"❌ args array elements must be strings: {serverId}, index: {index} - Please ensure all arguments are strings",invalidEnvType:"❌ env object values must be strings: {serverId}, key: {key} - Environment variable values must be strings",missingUrl:"❌ Missing url field: {serverId} - Must have url when no command is present",invalidUrl:"❌ Invalid url format: {serverId} - Please check if URL format is correct",studioExample:`Please enter MCP server configuration JSON. Example: { @@ -547,20 +547,20 @@ Example: } } } -}`,selectServerHint:"Please select an MCP server on the left or click to create a new MCP configuration",jsonEditor:"JSON Editor",jsonConfigEmpty:"JSON configuration cannot be empty",jsonFormatError:"JSON format error",jsonConfigSaved:"JSON configuration saved",confirmDelete:"Confirm Delete",deleteConfirmMessage:"Are you sure you want to delete this MCP server configuration? This action cannot be undone.",deleteWarningText:"This action cannot be undone. Please proceed with caution.",noServerSelected:"No MCP server selected",updateSuccess:"Updated successfully",saveFailed:"Save failed, please retry",operationFailed:"Operation failed",mcpServerNamePlaceholder:"Please enter MCP server name",enabled:"Enabled",disabled:"Disabled",newMcpConfig:"New MCP Config",importAll:"Import All",exportAll:"Export All",command:"Command",args:"Args",env:"Env",url:"URL",save:"Save",delete:"Delete",reset:"Reset",import:"Import",cancel:"Cancel",exportSuccess:"Export successful",exportFailed:"Export failed",statusToggleSuccess:"Status toggle successful",statusToggleFailed:"Status toggle failed",missingUrlField:"Missing url field: {serverId} - must have url or baseUrl when no command",urlFieldTip:"💡 Please provide url or baseUrl field",serverConfigWarning:"Server {serverId} has no command but also no url or baseUrl",jsonSyntaxError:"❌ JSON syntax error - please check brackets, commas, quotes and other symbols",jsonIncomplete:"❌ JSON incomplete - please check if ending brackets or quotes are missing",jsonNumberError:"❌ JSON number format error - please check number format",jsonStringError:"❌ JSON string format error - please check if quotes are paired",jsonSyntaxErrorWithMessage:"❌ JSON syntax error: {message}",correctFormatExample:'💡 Correct format example: {"mcpServers": {"server-id": {"name": "Server Name", "url": "Server URL"}}}',commandPlaceholder:"e.g.: uvx",urlPlaceholder:"e.g.: https://mcp.example.com/server",argsPlaceholder:`One parameter per line, e.g.: +}`,selectServerHint:"Please select an MCP server on the left or click to create a new MCP configuration",jsonEditor:"JSON Editor",jsonConfigEmpty:"JSON configuration cannot be empty",jsonFormatError:"JSON format error",jsonConfigSaved:"JSON configuration saved",confirmDelete:"Confirm Delete",deleteConfirmMessage:"Are you sure you want to delete this MCP server configuration? This action cannot be undone.",deleteWarningText:"This action cannot be undone. Please proceed with caution.",noServerSelected:"No MCP server selected",updateSuccess:"Updated successfully",saveFailed:"Save failed, please retry",operationFailed:"Operation failed",mcpServerNamePlaceholder:"Please enter MCP server name",enabled:"Enabled",disabled:"Disabled",newMcpConfig:"New MCP Config",importAll:"Import All",exportAll:"Export All",mcpName:"MCP Name",usageInstructions:"Usage Instructions",getMcpServiceList:"Get MCP Service List",findMcpServices:"You can find available MCP services on mcp.higress.ai, mcp.so, modelscope.cn",batchImportTip:"If you need to batch configure MCP services, you can use the import all function in the top right corner",configureMcpService:"Configure MCP Service",fillServiceName:"Fill in service name",selectConnectionType:"Select connection type: choose STUDIO for local and input Command, Args and Env. Choose SSE or STREAMING for remote and input URL",clickSaveToComplete:"Click save button to complete MCP configuration, MCP tools will be automatically registered to the system",configureAgentUsage:"Configure Agent Usage",createAgentTip:"Create a new Agent on the Agent configuration page, add the just configured MCP service to the Agent, this can reduce tool conflicts and improve Agent tool selection accuracy",copyJsonConfig:"Copy the complete JSON configuration to the input box above (you can refer to configuration examples), then click import",command:"Command",args:"Args",env:"Env",url:"URL",save:"Save",delete:"Delete",reset:"Reset",import:"Import",cancel:"Cancel",exportSuccess:"Export successful",exportFailed:"Export failed",statusToggleSuccess:"Status toggle successful",statusToggleFailed:"Status toggle failed",missingUrlField:"Missing url field: {serverId} - must have url or baseUrl when no command",urlFieldTip:"💡 Please provide url or baseUrl field",serverConfigWarning:"Server {serverId} has no command but also no url or baseUrl",jsonSyntaxError:"❌ JSON syntax error - please check brackets, commas, quotes and other symbols",jsonIncomplete:"❌ JSON incomplete - please check if ending brackets or quotes are missing",jsonNumberError:"❌ JSON number format error - please check number format",jsonStringError:"❌ JSON string format error - please check if quotes are paired",jsonSyntaxErrorWithMessage:"❌ JSON syntax error: {message}",correctFormatExample:'💡 Correct format example: {"mcpServers": {"server-id": {"name": "Server Name", "url": "Server URL"}}}',commandPlaceholder:"e.g.: uvx",urlPlaceholder:"e.g.: https://mcp.example.com/server",argsPlaceholder:`One parameter per line, e.g.: --from mysql_mcp_server_pro --mode stdio`,envPlaceholder:`Key-value format, one per line, e.g.: MYSQL_HOST:127.0.0.1 MYSQL_PORT:3306 -MYSQL_USER:root`,connectionTypePlaceholder:"Please select connection type",argsFormatError:"Args format error, please enter a valid JSON array",envFormatError:"Env format error, please enter a valid JSON object",argsStringError:"Args format error, each parameter must be a string",envStringError:"Env format error, each value must be a string",importSuccess:"Import successful",importFailed:"Import failed",importInvalidJson:"Imported JSON is invalid"},basicConfig:{title:"Basic Configuration",browserSettings:{headless:"Whether to use headless browser mode",requestTimeout:"Browser request timeout (seconds)"},general:{debugDetail:"Debug mode: The model will output more content to facilitate problem - finding, but it will be slower",baseDir:"Manus root directory"},interactionSettings:{openBrowser:"Automatically open the browser on startup"},agentSettings:{maxSteps:"Max Steps",userInputTimeout:"User input form waiting timeout (seconds)",maxMemory:"Maximum number of messages that can be remembered",parallelToolCalls:"Parallel tool calls"},agents:{forceOverrideFromYaml:"Force override of agents with the same name using the YAML configuration file"},infiniteContext:{enabled:"Whether to enable infinite context",parallelThreads:"Number of parallel processing threads",taskContextSize:"Character count threshold for triggering infinite context (number of characters)"},fileSystem:{allowExternalAccess:"Whether to allow file operations beyond the working directory"},mcpServiceLoader:{connectionTimeoutSeconds:"MCP connection timeout (seconds)",maxRetryCount:"MCP connection max retry count",maxConcurrentConnections:"MCP max concurrent connections"},systemSettings:{systemName:"System Name",language:"Language",maxThreads:"Max Threads",timeoutSeconds:"Request Timeout (seconds)"},totalConfigs:"Total Configurations",modified:"Modified",exportConfigs:"Export Configurations",importConfigs:"Import Configurations",search:"Search",loading:"Loading",saveSuccess:"Configuration saved successfully",exportSuccess:"Configuration exported successfully",exportFailed:"Failed to export configuration",invalidFormat:"Configuration file format is invalid",importSuccess:"Configuration imported successfully",resetSuccess:"Configuration reset successfully",notFound:"No configuration items found",noModified:"No modified configurations",resetGroupConfirm:"Reset all configurations in this group to default values",isDefault:"This group configuration is default",reset:"Reset",requestTimeout:"Request timeout (seconds)",browserTimeout:"Browser request timeout (seconds)",loadConfigSuccess:"Configuration loaded successfully",loadConfigFailed:"Failed to load configuration, please refresh and try again",saveFailed:"Save failed, please try again",resetFailed:"Reset failed, please try again",importFailed:"Import failed, please check file format",groupDisplayNames:{manus:"Manus",browser:"Browser",interaction:"Interaction",system:"System",performance:"Performance"}},promptConfig:{title:"Dynamic Prompt Configuration",configuredprompts:"Configured Prompts",loadDetailsFailed:"Failed to load prompt details",promptCount:"prompt(s)",noPrompts:"No prompts configured",createNew:"Create New Prompt",promptName:"Prompt Name",placeholder:"Please enter",promptContent:"Prompt Content",messageType:"Message Type",type:"Category Type",builtIn:"Built-in",custom:"Custom",namespace:"Namespace",promptNamePlaceholder:"Enter prompt name",selectPromptHint:"Please select a prompt to configure",promptContentPlaceholder:"Enter prompt content",descriptionPlaceholder:"Describe the function and purpose of this prompt",description:"Description",requiredFields:"Please fill in all required fields",newPrompt:"New Dynamic Prompt",saveSuccess:"Prompt saved successfully",saveFailed:"Failed to save prompt",deleteSuccess:"Prompt deleted successfully",deleteFailed:"Failed to delete prompt",deleteConfirm:"Delete Confirmation",deleteConfirmText:"Are you sure you want to delete",deleteWarning:"This action cannot be undone.",exportSuccess:"Configuration exported successfully",exportFailed:"Failed to export configuration",importSuccess:"Configuration imported successfully",importFailed:"Failed to import configuration",resetToLanguageDefault:"Reset to Language Default",selectLanguage:"Select Language",resetToLanguageDefaultSuccess:"Reset to language default successfully",resetToLanguageDefaultFailed:"Failed to reset to language default",resetLanguageWarning:"This will overwrite current content with the default version of selected language",batchSwitchLanguage:"Batch Switch Language",batchSwitchLanguageSuccess:"Batch language switch successful",batchSwitchLanguageFailed:"Failed to batch switch language",batchSwitchLanguageWarning:"This will overwrite all prompt content and descriptions with the default version of selected language"},namespaceConfig:{title:"Namespace Configuration",name:"Namespace Name",code:"Namespace Code",host:"Host",description:"Namespace Description",loadDetailsFailed:"Failed to load namespace details",selectNameSpaceHint:"Please select a namespace to configure",createNew:"Create New Namespace",placeholder:"Please enter",saveSuccess:"Saved successfully",saveFailed:"Save failed",deleteSuccess:"Deleted successfully",deleteFailed:"Delete failed",deleteConfirm:"Delete Confirmation",deleteConfirmText:"Are you sure you want to delete",deleteWarning:"This action cannot be undone.",configured:"Configured Namespaces",namespace:{selectNamespace:"Please select a namespace",namespace:"Namespace"}}},agent:{title:"Agent Configuration",name:"Agent Name",description:"Description",prompt:"Agent Prompt (personality, requirements, and next step guidance)",tools:"Tools",addAgent:"Add Agent",editAgent:"Edit Agent",deleteAgent:"Delete Agent",deleteConfirm:"Are you sure you want to delete?",deleteWarning:"This action cannot be undone.",namePlaceholder:"Enter agent name",descriptionPlaceholder:"Describe the function and purpose of this agent",promptPlaceholder:"Set the agent's personality, requirements, and next step guidance...",toolSelection:"Tool Selection",availableTools:"Available Tools",selectedTools:"Selected Tools",selectTools:"Select Tools",required:"*",saveSuccess:"Agent saved successfully",saveFailed:"Failed to save agent",deleteSuccess:"Agent deleted successfully",deleteFailed:"Failed to delete agent",multiLanguage:{title:"Agent Multi-Language Management",resetAll:"Reset All Agents",resetAllConfirm:"Reset All Agents Confirmation",resetAllWarning:"This operation will delete all existing agent configurations and reload the specified language version. This action cannot be undone!",selectLanguage:"Select Language",resetSuccess:"All agents have been reset to the specified language version",resetFailed:"Failed to reset agents",currentLanguage:"Current Language",supportedLanguages:"Supported Languages",resetInProgress:"Resetting agents...",confirmReset:"Confirm Reset",cancel:"Cancel"}},model:{title:"Model Configuration",switch:"Switch Model",name:"Model Name",description:"Description",addModel:"Add Model",editModel:"Edit Model",deleteModel:"Delete Model",deleteConfirm:"Are you sure you want to delete?",deleteWarning:"This action cannot be undone.",namePlaceholder:"Enter model name",descriptionPlaceholder:"Model Description",required:"*",saveSuccess:"Model saved successfully",saveFailed:"Failed to save model",deleteSuccess:"Model deleted successfully",deleteFailed:"Failed to delete model"},modelConfig:{title:"Model Configuration",import:"Import",export:"Export",configuredModels:"Configured Models",modelCount:"models",noModel:"No model configurations available",createNew:"Create New Model",selectModelHint:"Please select a model to configure",newModel:"New Model",modelName:"Model Name",modelNamePlaceholder:"Enter model name",description:"Description",descriptionPlaceholder:"Describe the model and its use cases",deleteConfirm:"Delete Confirmation",deleteConfirmText:"Are you sure you want to delete",deleteWarning:"This action cannot be undone.",requiredFields:"Please fill in all required fields",createSuccess:"Model created successfully",createFailed:"Failed to create model",saveSuccess:"Model saved successfully",saveFailed:"Failed to save model",deleteSuccess:"Model deleted successfully",deleteFailed:"Failed to delete model",importSuccess:"Model imported successfully",importFailed:"Failed to import model",exportSuccess:"Model exported successfully",exportFailed:"Failed to export model",loadDataFailed:"Failed to load data",loadDetailsFailed:"Failed to load model details",invalidFormat:"Model configuration format is invalid: missing required fields"},planTemplate:{title:"Plan Template Configuration",generator:"Plan Generator",execution:"Plan Execution",prompt:"Generation Prompt",promptPlaceholder:"Describe the plan you want to generate...",generating:"Generating...",generate:"Generate Plan",updatePlan:"Update Plan",executing:"Executing...",execute:"Execute Plan",executionParams:"Execution Parameters",executionParamsPlaceholder:"Enter execution parameters (optional)...",apiUrl:"API Call URL",clearParams:"Clear Parameters",versionControl:"Version Control",rollback:"Rollback",restore:"Restore",currentVersion:"Current Version",saveTemplate:"Save Template",loadTemplate:"Load Template",templateSaved:"Template saved",templateLoaded:"Template loaded",executionSuccess:"Execution successful",executionFailed:"Execution failed",generationSuccess:"Generation successful",generationFailed:"Generation failed"},chat:{botName:"TaskPilot:",thinkingLabel:"TaskPilot Thinking/Processing",processing:"Processing...",step:"Step",stepNumber:"Step {number}",stepExecutionDetails:"Step Execution Details",status:{executing:"Executing",completed:"Completed",pending:"Pending",failed:"Failed"},userInput:{message:"Please enter the required information:",submit:"Submit"},thinking:"Thinking...",thinkingAnalyzing:"Analyzing task requirements...",thinkingExecuting:"Executing: {title}",thinkingResponse:"Organizing response for you...",thinkingProcessing:"Processing your request...",preparingExecution:"Preparing to execute plan...",preparing:"Preparing...",response:"Response",retry:"Retry",regenerate:"Regenerate",copy:"Copy",scrollToBottom:"Scroll to Bottom",waitingDecision:"Waiting for Decision",executionCompleted:"Execution Completed",noTool:"No Tool",noToolParameters:"No Tool Parameters",executionError:"Execution Error",newMessage:"New Message",networkError:"Network connection issue, please check your network connection and try again",authError:"Access permission issue, please contact administrator or try later",formatError:"Request format might be incorrect, could you please rephrase your request?",unknownError:"Encountered some issues while processing your request, please try again later",thinkingOutput:"Thinking Output"},input:{placeholder:"Send a message to JManus",send:"Send",planMode:"PLAN-ACT Template Mode",waiting:"Waiting for task completion...",maxLength:"Max Length",charactersRemaining:"Characters Remaining"},sidebar:{title:"PLAN-ACT Templates",templateList:"Template List",configuration:"Configuration",newPlan:"New Plan",loading:"Loading...",retry:"Retry",noTemplates:"No available plan templates",unnamedPlan:"Unnamed Plan",noDescription:"No description",deleteTemplate:"Delete this plan template",jsonTemplate:"JSON Template",rollback:"Rollback",restore:"Restore",jsonPlaceholder:"Step 2: Here you can directly modify the execution plan generated in Step 1 to make it more accurately follow your intentions. Then you can click Execute Plan to run this plan with high certainty.",planGenerator:"Plan Generator",generatorPlaceholder:"Step 1: Enter the task you want to accomplish here in natural language, as detailed as possible. Then click Generate Plan to create a precise, repeatable plan.",generating:"Generating...",generatePlan:"Generate Plan",updatePlan:"Update Plan",executionController:"Execution Controller",executionParams:"Execution Parameters",executionParamsPlaceholder:"Enter execution parameters...",executionParamsHelp:'When executing repeatedly, you can set some content in Step 2 as variables, then specify the specific values for those variables here. For example, set "Variable1" in the JSON, then set "Variable1=Alibaba" here to achieve function parameter-like effects.',clearParams:"Clear Parameters",apiUrl:"HTTP GET URL",statusApiUrl:"Status Query API",executing:"Executing...",executePlan:"Execute Plan",newTemplate:"New Template",templateName:"Template Name",templateDescription:"Template Description",lastModified:"Last Modified",createTime:"Create Time",expand:"Expand",collapse:"Collapse",pin:"Pin",unpin:"Unpin",favorite:"Favorite",unfavorite:"Unfavorite",share:"Share",duplicate:"Duplicate",rename:"Rename",move:"Move",archive:"Archive",unarchive:"Unarchive",selectTemplateFailed:"Failed to select plan template",confirmDelete:'Are you sure you want to delete plan template "{name}"? This action cannot be undone.',templateDeleted:"Plan template has been deleted.",deleteTemplateFailed:"Failed to delete plan template",saveCompleted:`Save completed: {message} +MYSQL_USER:root`,connectionTypePlaceholder:"Please select connection type",argsFormatError:"Args format error, please enter a valid JSON array",envFormatError:"Env format error, please enter a valid JSON object",argsStringError:"Args format error, each parameter must be a string",envStringError:"Env format error, each value must be a string",importSuccess:"Import successful",importFailed:"Import failed",importInvalidJson:"Imported JSON is invalid"},basicConfig:{title:"Basic Configuration",browserSettings:{headless:"Whether to use headless browser mode",requestTimeout:"Browser request timeout (seconds)"},general:{debugDetail:"Debug mode: The model will output more content to facilitate problem - finding, but it will be slower",baseDir:"Manus root directory"},interactionSettings:{openBrowser:"Automatically open the browser on startup"},agentSettings:{maxSteps:"Max Steps",userInputTimeout:"User input form waiting timeout (seconds)",maxMemory:"Maximum number of messages that can be remembered",parallelToolCalls:"Parallel tool calls"},agents:{forceOverrideFromYaml:"Force override of agents with the same name using the YAML configuration file"},infiniteContext:{enabled:"Whether to enable infinite context",parallelThreads:"Number of parallel processing threads",taskContextSize:"Character count threshold for triggering infinite context (number of characters)"},fileSystem:{allowExternalAccess:"Whether to allow file operations beyond the working directory"},mcpServiceLoader:{connectionTimeoutSeconds:"MCP connection timeout (seconds)",maxRetryCount:"MCP connection max retry count",maxConcurrentConnections:"MCP max concurrent connections"},systemSettings:{systemName:"System Name",language:"Language",maxThreads:"Max Threads",timeoutSeconds:"Request Timeout (seconds)"},totalConfigs:"Total Configurations",modified:"Modified",exportConfigs:"Export Configurations",importConfigs:"Import Configurations",search:"Search",loading:"Loading",saveSuccess:"Configuration saved successfully",exportSuccess:"Configuration exported successfully",exportFailed:"Failed to export configuration",invalidFormat:"Configuration file format is invalid",importSuccess:"Configuration imported successfully",resetSuccess:"Configuration reset successfully",notFound:"No configuration items found",noModified:"No modified configurations",resetGroupConfirm:"Reset all configurations in this group to default values",isDefault:"This group configuration is default",reset:"Reset",requestTimeout:"Request timeout (seconds)",browserTimeout:"Browser request timeout (seconds)",loadConfigSuccess:"Configuration loaded successfully",loadConfigFailed:"Failed to load configuration, please refresh and try again",saveFailed:"Save failed, please try again",resetFailed:"Reset failed, please try again",importFailed:"Import failed, please check file format",groupDisplayNames:{manus:"Manus",browser:"Browser",interaction:"Interaction",system:"System",performance:"Performance"}},promptConfig:{title:"Dynamic Prompt Configuration",configuredprompts:"Configured Prompts",loadDetailsFailed:"Failed to load prompt details",promptCount:"prompt(s)",noPrompts:"No prompts configured",createNew:"Create New Prompt",promptName:"Prompt Name",placeholder:"Please enter",promptContent:"Prompt Content",messageType:"Message Type",type:"Category Type",builtIn:"Built-in",custom:"Custom",namespace:"Namespace",promptNamePlaceholder:"Enter prompt name",selectPromptHint:"Please select a prompt to configure",promptContentPlaceholder:"Enter prompt content",descriptionPlaceholder:"Describe the function and purpose of this prompt",description:"Description",requiredFields:"Please fill in all required fields",newPrompt:"New Dynamic Prompt",saveSuccess:"Prompt saved successfully",saveFailed:"Failed to save prompt",deleteSuccess:"Prompt deleted successfully",deleteFailed:"Failed to delete prompt",deleteConfirm:"Delete Confirmation",deleteConfirmText:"Are you sure you want to delete",deleteWarning:"This action cannot be undone.",exportSuccess:"Configuration exported successfully",exportFailed:"Failed to export configuration",importSuccess:"Configuration imported successfully",importFailed:"Failed to import configuration",resetToLanguageDefault:"Reset to Language Default",selectLanguage:"Select Language",resetToLanguageDefaultSuccess:"Reset to language default successfully",resetToLanguageDefaultFailed:"Failed to reset to language default",resetLanguageWarning:"This will overwrite current content with the default version of selected language",batchSwitchLanguage:"Batch Switch Language",batchSwitchLanguageSuccess:"Batch language switch successful",batchSwitchLanguageFailed:"Failed to batch switch language",batchSwitchLanguageWarning:"This will overwrite all prompt content and descriptions with the default version of selected language"},namespaceConfig:{title:"Namespace Configuration",name:"Namespace Name",code:"Namespace Code",host:"Host",description:"Namespace Description",loadDetailsFailed:"Failed to load namespace details",selectNameSpaceHint:"Please select a namespace to configure",createNew:"Create New Namespace",placeholder:"Please enter",saveSuccess:"Saved successfully",saveFailed:"Save failed",deleteSuccess:"Deleted successfully",deleteFailed:"Delete failed",deleteConfirm:"Delete Confirmation",deleteConfirmText:"Are you sure you want to delete",deleteWarning:"This action cannot be undone.",configured:"Configured Namespaces",namespace:{selectNamespace:"Please select a namespace",namespace:"Namespace"}}},agent:{title:"Agent Configuration",name:"Agent Name",description:"Description",prompt:"Agent Prompt (personality, requirements, and next step guidance)",tools:"Tools",addAgent:"Add Agent",editAgent:"Edit Agent",deleteAgent:"Delete Agent",deleteConfirm:"Are you sure you want to delete?",deleteWarning:"This action cannot be undone.",namePlaceholder:"Enter agent name",descriptionPlaceholder:"Describe the function and purpose of this agent",promptPlaceholder:"Set the agent's personality, requirements, and next step guidance...",toolSelection:"Tool Selection",availableTools:"Available Tools",selectedTools:"Selected Tools",selectTools:"Select Tools",required:"*",saveSuccess:"Agent saved successfully",saveFailed:"Failed to save agent",deleteSuccess:"Agent deleted successfully",deleteFailed:"Failed to delete agent",multiLanguage:{title:"Agent Multi-Language Management",resetAll:"Reset All Agents",resetAllConfirm:"Reset All Agents Confirmation",resetAllWarning:"This operation will delete all existing agent configurations and reload the specified language version. This action cannot be undone!",selectLanguage:"Select Language",resetSuccess:"All agents have been reset to the specified language version",resetFailed:"Failed to reset agents",currentLanguage:"Current Language",supportedLanguages:"Supported Languages",resetInProgress:"Resetting agents...",confirmReset:"Confirm Reset",cancel:"Cancel"}},model:{title:"Model Configuration",switch:"Switch Model",name:"Model Name",description:"Description",addModel:"Add Model",editModel:"Edit Model",deleteModel:"Delete Model",deleteConfirm:"Are you sure you want to delete?",deleteWarning:"This action cannot be undone.",namePlaceholder:"Enter model name",descriptionPlaceholder:"Model Description",required:"*",saveSuccess:"Model saved successfully",saveFailed:"Failed to save model",deleteSuccess:"Model deleted successfully",deleteFailed:"Failed to delete model"},modelConfig:{title:"Model Configuration",import:"Import",export:"Export",configuredModels:"Configured Models",modelCount:"models",noModel:"No model configurations available",createNew:"Create New Model",selectModelHint:"Please select a model to configure",newModel:"New Model",modelName:"Model Name",modelNamePlaceholder:"Enter model name",description:"Description",descriptionPlaceholder:"Describe the model and its use cases",deleteConfirm:"Delete Confirmation",deleteConfirmText:"Are you sure you want to delete",deleteWarning:"This action cannot be undone.",requiredFields:"Please fill in all required fields",createSuccess:"Model created successfully",createFailed:"Failed to create model",saveSuccess:"Model saved successfully",saveFailed:"Failed to save model",deleteSuccess:"Model deleted successfully",deleteFailed:"Failed to delete model",importSuccess:"Model imported successfully",importFailed:"Failed to import model",exportSuccess:"Model exported successfully",exportFailed:"Failed to export model",loadDataFailed:"Failed to load data",loadDetailsFailed:"Failed to load model details",invalidFormat:"Model configuration format is invalid: missing required fields"},planTemplate:{title:"Plan Template Configuration",generator:"Plan Generator",execution:"Plan Execution",prompt:"Generation Prompt",promptPlaceholder:"Describe the plan you want to generate...",generating:"Generating...",generate:"Generate Plan",updatePlan:"Update Plan",executing:"Executing...",execute:"Execute Plan",executionParams:"Execution Parameters",executionParamsPlaceholder:"Enter execution parameters (optional)...",apiUrl:"API Call URL",clearParams:"Clear Parameters",versionControl:"Version Control",rollback:"Rollback",restore:"Restore",currentVersion:"Current Version",saveTemplate:"Save Template",loadTemplate:"Load Template",templateSaved:"Template saved",templateLoaded:"Template loaded",executionSuccess:"Execution successful",executionFailed:"Execution failed",generationSuccess:"Generation successful",generationFailed:"Generation failed",invalidJson:"Invalid JSON format, please correct and save again",executePlanTemplate:"Execute Plan Template"},chat:{botName:"TaskPilot:",thinkingLabel:"TaskPilot Thinking/Processing",processing:"Processing...",step:"Step",stepNumber:"Step {number}",stepExecutionDetails:"Step Execution Details",status:{executing:"Executing",completed:"Completed",pending:"Pending",failed:"Failed"},userInput:{message:"Please enter the required information:",submit:"Submit"},thinking:"Thinking...",thinkingAnalyzing:"Analyzing task requirements...",thinkingExecuting:"Executing: {title}",thinkingResponse:"Organizing response for you...",thinkingProcessing:"Processing your request...",preparingExecution:"Preparing to execute plan...",preparing:"Preparing...",response:"Response",retry:"Retry",regenerate:"Regenerate",copy:"Copy",scrollToBottom:"Scroll to Bottom",waitingDecision:"Waiting for Decision",executionCompleted:"Execution Completed",noTool:"No Tool",noToolParameters:"No Tool Parameters",executionError:"Execution Error",newMessage:"New Message",networkError:"Network connection issue, please check your network connection and try again",authError:"Access permission issue, please contact administrator or try later",formatError:"Request format might be incorrect, could you please rephrase your request?",unknownError:"Encountered some issues while processing your request, please try again later",thinkingOutput:"Thinking Output",defaultResponse:"I understand. Is there anything else I can help you with?",anythingElse:"Is there anything else I can help you with?",okayDone:"Okay, {text}",ifOtherQuestions:"If you have any other questions, please feel free to let me know",hopeHelpful:"I hope this answer is helpful to you!",great:"Great!",ifOtherHelp:"If you need any other help, please feel free to let me know",completedRequest:"I have completed your request: {result}"},input:{placeholder:"Send a message to JManus",send:"Send",planMode:"PLAN-ACT Template Mode",waiting:"Waiting for user input...",maxLength:"Max Length",charactersRemaining:"Characters Remaining",attachFile:"Attach File"},sidebar:{title:"PLAN-ACT Templates",templateList:"Template List",configuration:"Configuration",newPlan:"New Plan",loading:"Loading...",retry:"Retry",noTemplates:"No available plan templates",unnamedPlan:"Unnamed Plan",noDescription:"No description",deleteTemplate:"Delete this plan template",jsonTemplate:"JSON Template",rollback:"Rollback",restore:"Restore",jsonPlaceholder:"Step 2: Here you can directly modify the execution plan generated in Step 1 to make it more accurately follow your intentions. Then you can click Execute Plan to run this plan with high certainty.",planGenerator:"Plan Generator",generatorPlaceholder:"Step 1: Enter the task you want to accomplish here in natural language, as detailed as possible. Then click Generate Plan to create a precise, repeatable plan.",generating:"Generating...",generatePlan:"Generate Plan",updatePlan:"Update Plan",executionController:"Execution Controller",executionParams:"Execution Parameters",executionParamsPlaceholder:"Enter execution parameters...",executionParamsHelp:'When executing repeatedly, you can set some content in Step 2 as variables, then specify the specific values for those variables here. For example, set "Variable1" in the JSON, then set "Variable1=Alibaba" here to achieve function parameter-like effects.',clearParams:"Clear Parameters",apiUrl:"HTTP GET URL",statusApiUrl:"Status Query API",executing:"Executing...",executePlan:"Execute Plan",newTemplate:"New Template",templateName:"Template Name",templateDescription:"Template Description",lastModified:"Last Modified",createTime:"Create Time",expand:"Expand",collapse:"Collapse",pin:"Pin",unpin:"Unpin",favorite:"Favorite",unfavorite:"Unfavorite",share:"Share",duplicate:"Duplicate",rename:"Rename",move:"Move",archive:"Archive",unarchive:"Unarchive",selectTemplateFailed:"Failed to select plan template",confirmDelete:'Are you sure you want to delete plan template "{name}"? This action cannot be undone.',templateDeleted:"Plan template has been deleted.",deleteTemplateFailed:"Failed to delete plan template",saveCompleted:`Save completed: {message} Current version count: {versionCount}`,saveSuccess:`Save successful: {message} -Current version count: {versionCount}`,saveStatus:"Save status: {message}",saveFailed:"Failed to save plan modifications",generateSuccess:"Plan generated successfully! Template ID: {templateId}",generateFailed:"Failed to generate plan",updateSuccess:"Plan updated successfully!",updateFailed:"Failed to update plan",executeFailed:"Failed to execute plan",unknown:"Unknown",newTemplateName:"New Execution Plan",newTemplateDescription:"Please use the plan generator to create a new plan template",generatedTemplateDescription:"Plan template created by generator",defaultExecutionPlanTitle:"Execution Plan"},modal:{close:"Close",cancel:"Cancel",confirm:"Confirm",save:"Save",delete:"Delete",edit:"Edit"},editor:{format:"Format",undo:"Undo",redo:"Redo",find:"Find",replace:"Replace",gotoLine:"Go to Line",selectAll:"Select All",toggleWordWrap:"Toggle Word Wrap",toggleMinimap:"Toggle Minimap",increaseFontSize:"Increase Font Size",decreaseFontSize:"Decrease Font Size",resetFontSize:"Reset Font Size"},language:{switch:"Switch Language",current:"Current Language",zh:"中文",en:"English"},theme:{switch:"Switch Theme",light:"Light Theme",dark:"Dark Theme",auto:"Follow System"},error:{notFound:"Page Not Found",notFoundDescription:"Sorry, the page you are looking for does not exist",serverError:"Server Error",serverErrorDescription:"Server encountered some issues, please try again later",networkError:"Network Error",networkErrorDescription:"Network connection failed, please check your network settings",backToHome:"Back to Home",retry:"Retry"},validation:{required:"This field is required",email:"Please enter a valid email address",phone:"Please enter a valid phone number",url:"Please enter a valid URL",minLength:"At least {min} characters required",maxLength:"Maximum {max} characters allowed",min:"Value cannot be less than {min}",max:"Value cannot be greater than {max}",pattern:"Invalid format",confirmation:"The two inputs do not match"},time:{now:"Just now",unknown:"Unknown time",minuteAgo:"{count} minutes ago",hourAgo:"{count} hours ago",dayAgo:"{count} days ago",weekAgo:"{count} weeks ago",monthAgo:"{count} months ago",yearAgo:"{count} years ago",today:"Today",yesterday:"Yesterday",tomorrow:"Tomorrow",thisWeek:"This Week",lastWeek:"Last Week",nextWeek:"Next Week",thisMonth:"This Month",lastMonth:"Last Month",nextMonth:"Next Month",thisYear:"This Year",lastYear:"Last Year",nextYear:"Next Year"},stats:{total:"Total",count:"Count",percentage:"Percentage",average:"Average",median:"Median",min:"Minimum",max:"Maximum",sum:"Sum",growth:"Growth",decline:"Decline",noData:"No data",loading:"Loading data...",error:"Failed to load data"},home:{welcomeTitle:"Welcome to JManus!",welcomeSubtitle:"Your Java AI intelligent assistant, helping you build and complete various tasks.",tagline:"Java AI Agent",inputPlaceholder:"Describe what you want to build or accomplish...",directButton:"Enter Workbench Directly",examples:{stockPrice:{title:"Query Stock Price",description:"Get today's latest stock price for Alibaba (Agent can use browser tools)",prompt:"Use browser based on Baidu to query today's Alibaba stock price and return the latest stock price"},weather:{title:"Query Weather",description:"Get today's weather in Beijing (Agent can use MCP tool services)",prompt:"Use browser, based on Baidu, to query today's weather in Beijing"},queryplan:{title:"Query Person Info",description:"Query all information about Shenxun Ali (to demonstrate infinite context capability)",prompt:"Use browser, based on Baidu, to query person info"},ainovel:{title:"AI Novel Creation",description:"AI gradually defeats humanity themed novel (to demonstrate long-form content output)",prompt:"Create a novel about artificial intelligence gradually defeating humanity, including 10 chapters"}}},rightPanel:{stepExecutionDetails:"Step Execution Details",noStepSelected:"No Step Selected",selectStepHint:"Please select an execution step in the left chat area to view details",stepExecuting:"Step is executing, please wait...",step:"Step",executingAgent:"Executing Agent",description:"Description",request:"Request",callingModel:"Calling Model",executionResult:"Execution Result",executing:"Executing...",thinkAndActionSteps:"Think & Action Steps",thinking:"Thinking",action:"Action",input:"Input",output:"Output",tool:"Tool",toolParameters:"Tool Parameters",noStepDetails:"No detailed step information available",scrollToBottom:"Scroll to Bottom",status:{completed:"Completed",executing:"Executing",waiting:"Waiting"},tabs:{details:"Step Execution Details",chat:"Chat",code:"Code"},chatBubbles:{analyzeRequirements:{title:"Analyze Requirements",content:"Breaking down your request into actionable steps: 1) Create user entity, 2) Implement user service, 3) Build REST endpoints, 4) Add validation and error handling."},generateCode:{title:"Generate Code",content:"Creating Spring Boot REST API with user management CRUD operations. Including proper HTTP status codes and error handling."},codeGenerated:{title:"Code Generated",content:"Successfully generated UserController with all CRUD operations. The code includes proper REST conventions, error handling, and follows Spring Boot best practices."}},timeAgo:{justNow:"Just now",minutesAgo:"{n} minutes ago",hoursAgo:"{n} hours ago",daysAgo:"{n} days ago"},defaultStepTitle:"Step {number}"},direct:{configuration:"Configuration",panelResizeHint:"Drag to resize panel, double-click to reset",aboutExecutionDetails:"About Integrated Execution Details"},cronTask:{title:"Cron Task Management",addTask:"Cron Task",noTasks:"No cron tasks",taskName:"Task Name",taskNamePlaceholder:"Please enter task name",cronExpression:"Cron Expression",cronExpressionPlaceholder:"e.g: 0 0 12 * * ?",cronExpressionHelp:"Format: second minute hour day month week year",taskDescription:"Task Description",taskDescriptionPlaceholder:"Please enter task description",taskStatus:"Task Status",taskDetail:"Task Detail",executeOnce:"Execute Once",edit:"Edit",operations:"Operations",enable:"Enable",disable:"Disable",delete:"Delete",deleteConfirm:"Confirm Delete",deleteConfirmMessage:'Are you sure you want to delete task "{taskName}"? This action cannot be undone.',nextExecution:"Next Execution Time",createTime:"Create Time",updateTime:"Update Time",active:"Active",inactive:"Inactive",template:"Example: Help me collect today's AI news every day at 8 AM",planTemplate:"Plan Template",linkTemplate:"Link Template",noTemplate:"No Template",selectTemplate:"Select Template",templateHelpText:"After selection, the cron task will execute according to the defined plan",createTask:"Create Cron Task",selectCreateMethod:"Please select creation method",createWithJmanus:"Create with Jmanus",createWithJmanusDesc:"Create cron task with AI assistant guidance",createManually:"Create Manually",createManuallyDesc:"Fill in task information yourself"}},xSe={conversation:"对话",plan:"计划执行",backHome:"返回首页",noPageTip:"您访问的页面不存在。",init:{welcome:"欢迎使用 JManus",welcomeStep:"欢迎使用 JManus",description:"首次使用需要配置 LLM 服务来启用 AI 功能。您可以选择使用阿里云百炼服务或自定义 OpenAI 兼容的 API 服务。",languageStepDescription:"请选择您的语言偏好,这将作为默认界面语言。",stepLanguage:"语言选择",stepModel:"模型配置",selectLanguageLabel:"选择语言",continueToModel:"继续配置模型",back:"返回",configModeLabel:"配置模式",dashscopeMode:"阿里云百炼(推荐)",dashscopeModeDesc:"使用阿里云百炼服务,只需提供 API 密钥即可快速开始",customMode:"自定义 OpenAI 兼容服务",customModeDesc:"配置任何兼容 OpenAI API 格式的服务,如 Ollama、LocalAI 等",apiKeyLabel:"DashScope API 密钥",apiKeyPlaceholder:"请输入您的 API 密钥",apiKeyHint:"您可以从阿里云百炼控制台获取 API 密钥。",getApiKey:"获取 API 密钥",baseUrlLabel:"API 基础地址",baseUrlPlaceholder:"https://api.openai.com 或您的自定义地址",baseUrlHint:"OpenAI 兼容的 API 基础地址,如 http://localhost:11434",customApiKeyLabel:"API 密钥",customApiKeyPlaceholder:"请输入您的 API 密钥",modelNameLabel:"模型名称",modelNamePlaceholder:"gpt-4.1 或您使用的模型名称",modelNameHint:"请输入您要使用的模型名称,如 gemini-2.5-pro、gpt-4.1 等",modelDisplayNameLabel:"模型显示名称(可选)",modelDisplayNamePlaceholder:"模型的显示名称",saveAndContinue:"保存并继续",saving:"保存中...",apiKeyRequired:"API 密钥不能为空",baseUrlRequired:"API 基础地址不能为空",modelNameRequired:"模型名称不能为空",saveFailed:"保存配置失败",networkError:"网络错误,请检查您的网络连接",successMessage:"配置保存成功!正在跳转到主页面...",restartRequired:`API密钥已保存成功!为了使配置生效,需要重启应用程序。 +Current version count: {versionCount}`,saveStatus:"Save status: {message}",saveFailed:"Failed to save plan modifications",generateSuccess:"Plan generated successfully! Template ID: {templateId}",generateFailed:"Failed to generate plan",updateSuccess:"Plan updated successfully!",updateFailed:"Failed to update plan",executeFailed:"Failed to execute plan",unknown:"Unknown",newTemplateName:"New Execution Plan",newTemplateDescription:"Please use the plan generator to create a new plan template",generatedTemplateDescription:"Plan template created by generator",defaultExecutionPlanTitle:"Execution Plan"},toolSelection:{title:"Select Tools",searchPlaceholder:"Search tools...",sortByGroup:"Sort by Service Group",sortByName:"Sort by Name",sortByStatus:"Sort by Status",summary:"{groups} service groups, {tools} tools ({selected} selected)",enableAll:"Enable All",noToolsFound:"No tools found"},direct:{planTemplateIdNotFound:"Plan template ID not found",executionFailedNoPlanId:"Plan execution failed: No valid plan ID returned",executionFailed:"Plan execution failed"},modal:{close:"Close",cancel:"Cancel",confirm:"Confirm",save:"Save",delete:"Delete",edit:"Edit"},editor:{format:"Format",undo:"Undo",redo:"Redo",find:"Find",replace:"Replace",gotoLine:"Go to Line",selectAll:"Select All",toggleWordWrap:"Toggle Word Wrap",toggleMinimap:"Toggle Minimap",increaseFontSize:"Increase Font Size",decreaseFontSize:"Decrease Font Size",resetFontSize:"Reset Font Size"},validation:{required:"Content cannot be empty"},theme:{switch:"Switch Theme",light:"Light Theme",dark:"Dark Theme",auto:"Follow System"},error:{notFound:"Page Not Found",notFoundDescription:"Sorry, the page you are looking for does not exist",serverError:"Server Error",serverErrorDescription:"Server encountered some issues, please try again later",networkError:"Network Error",networkErrorDescription:"Network connection failed, please check your network settings",backToHome:"Back to Home",retry:"Retry"},time:{now:"Just now",unknown:"Unknown time",minuteAgo:"{count} minutes ago",hourAgo:"{count} hours ago",dayAgo:"{count} days ago",weekAgo:"{count} weeks ago",monthAgo:"{count} months ago",yearAgo:"{count} years ago",today:"Today",yesterday:"Yesterday",tomorrow:"Tomorrow",thisWeek:"This Week",lastWeek:"Last Week",nextWeek:"Next Week",thisMonth:"This Month",lastMonth:"Last Month",nextMonth:"Next Month",thisYear:"This Year",lastYear:"Last Year",nextYear:"Next Year"},stats:{total:"Total",count:"Count",percentage:"Percentage",average:"Average",median:"Median",min:"Minimum",max:"Maximum",sum:"Sum",growth:"Growth",decline:"Decline",noData:"No data",loading:"Loading data...",error:"Failed to load data"},home:{welcomeTitle:"Welcome to JManus!",welcomeSubtitle:"Your Java AI intelligent assistant, helping you build and complete various tasks.",tagline:"Java AI Agent",inputPlaceholder:"Describe what you want to build or accomplish...",directButton:"Enter Workbench Directly",examples:{stockPrice:{title:"Query Stock Price",description:"Get today's latest stock price for Alibaba (Agent can use browser tools)",prompt:"Use browser based on Baidu to query today's Alibaba stock price and return the latest stock price"},weather:{title:"Query Weather",description:"Get today's weather in Beijing (Agent can use MCP tool services)",prompt:"Use browser, based on Baidu, to query today's weather in Beijing"},queryplan:{title:"Query Person Info",description:"Query all information about Shenxun Ali (to demonstrate infinite context capability)",prompt:"Use browser, based on Baidu, to query person info",planTitle:"Query all information about Shenxun Ali (to demonstrate infinite context capability)",step1:"[BROWSER_AGENT] Search for Shenxun Ali through Baidu, get the first page HTML data, merge and aggregate to html_data directory",step1Output:"Storage directory path",step2:"[BROWSER_AGENT] Find all valid web links about Shenxun Ali from html_data directory, output to link.md",step2Output:"URL address, description"},ainovel:{title:"AI Novel Creation",description:"AI gradually defeats humanity themed novel (to demonstrate long-form content output)",prompt:"Create a novel about artificial intelligence gradually defeating humanity, including 10 chapters",planTitle:"AI Gradually Defeats Humans Novel Creation Plan",step1:'[TEXT_FILE_AGENT] Create a file with novel title and chapter titles, expecting a novel with 10 chapters, output outline to novel.md, each chapter uses secondary title, only write chapter titles in current step, novel title is "AI Gradually Defeats Humans"',step1Output:"File name",step2:"[TEXT_FILE_AGENT] Get chapter title information from novel.md file, then improve each chapter content in sequence, only improve one chapter content per round, use replace to update content, each chapter requires 3000 words, do not query all document content after updating each chapter",step2Output:"File name"}}},rightPanel:{stepExecutionDetails:"Step Execution Details",noStepSelected:"No Step Selected",selectStepHint:"Please select an execution step in the left chat area to view details",stepExecuting:"Step is executing, please wait...",step:"Step",executingAgent:"Executing Agent",description:"Description",request:"Request",callingModel:"Calling Model",executionResult:"Execution Result",executing:"Executing...",thinkAndActionSteps:"Think & Action Steps",thinking:"Thinking",action:"Action",input:"Input",output:"Output",tool:"Tool",toolParameters:"Tool Parameters",noStepDetails:"No detailed step information available",scrollToBottom:"Scroll to Bottom",stepInfo:"Step Information",stepName:"Step Name",noExecutionInfo:"No detailed execution information available for this step",subPlan:"Sub Execution Plan",subStep:"Sub Step",subPlanId:"Sub Plan ID",title:"Title",stepNumber:"Step {number}",status:{label:"Status",completed:"Completed",executing:"Executing",pending:"Pending"},tabs:{details:"Step Execution Details",chat:"Chat",code:"Code"},chatBubbles:{analyzeRequirements:{title:"Analyze Requirements",content:"Breaking down your request into actionable steps: 1) Create user entity, 2) Implement user service, 3) Build REST endpoints, 4) Add validation and error handling."},generateCode:{title:"Generate Code",content:"Creating Spring Boot REST API with user management CRUD operations. Including proper HTTP status codes and error handling."},codeGenerated:{title:"Code Generated",content:"Successfully generated UserController with all CRUD operations. The code includes proper REST conventions, error handling, and follows Spring Boot best practices."}},timeAgo:{justNow:"Just now",minutesAgo:"{n} minutes ago",hoursAgo:"{n} hours ago",daysAgo:"{n} days ago"},defaultStepTitle:"Step {number}"},cronTask:{title:"Cron Task Management",addTask:"Cron Task",noTasks:"No cron tasks",taskName:"Task Name",taskNamePlaceholder:"Please enter task name",cronExpression:"Cron Expression",cronExpressionPlaceholder:"e.g: 0 0 12 * * ?",cronExpressionHelp:"Format: second minute hour day month week year",taskDescription:"Task Description",taskDescriptionPlaceholder:"Please enter task description",taskStatus:"Task Status",taskDetail:"Task Detail",executeOnce:"Execute Once",edit:"Edit",operations:"Operations",enable:"Enable",disable:"Disable",delete:"Delete",deleteConfirm:"Confirm Delete",deleteConfirmMessage:'Are you sure you want to delete task "{taskName}"? This action cannot be undone.',nextExecution:"Next Execution Time",createTime:"Create Time",updateTime:"Update Time",active:"Active",inactive:"Inactive",template:"Example: Help me collect today's AI news every day at 8 AM",planTemplate:"Plan Template",linkTemplate:"Link Template",noTemplate:"No Template",selectTemplate:"Select Template",templateHelpText:"After selection, the cron task will execute according to the defined plan",createTask:"Create Cron Task",selectCreateMethod:"Please select creation method",createWithJmanus:"Create with Jmanus",createWithJmanusDesc:"Create cron task with AI assistant guidance",createManually:"Create Manually",createManuallyDesc:"Fill in task information yourself"}},xSe={conversation:"对话",plan:"计划执行",backHome:"返回首页",noPageTip:"您访问的页面不存在。",init:{welcome:"欢迎使用 JManus",welcomeStep:"欢迎使用 JManus",description:"首次使用需要配置 LLM 服务来启用 AI 功能。您可以选择使用阿里云百炼服务或自定义 OpenAI 兼容的 API 服务。",languageStepDescription:"请选择您的语言偏好,这将作为默认界面语言。",stepLanguage:"语言选择",stepModel:"模型配置",selectLanguageLabel:"选择语言",continueToModel:"继续配置模型",back:"返回",configModeLabel:"配置模式",dashscopeMode:"阿里云百炼(推荐)",dashscopeModeDesc:"使用阿里云百炼服务,只需提供 API 密钥即可快速开始",customMode:"自定义 OpenAI 兼容服务",customModeDesc:"配置任何兼容 OpenAI API 格式的服务,如 Ollama、LocalAI 等",apiKeyLabel:"DashScope API 密钥",apiKeyPlaceholder:"请输入您的 API 密钥",apiKeyHint:"您可以从阿里云百炼控制台获取 API 密钥。",getApiKey:"获取 API 密钥",baseUrlLabel:"API 基础地址",baseUrlPlaceholder:"https://api.openai.com 或您的自定义地址",baseUrlHint:"OpenAI 兼容的 API 基础地址,如 http://localhost:11434",customApiKeyLabel:"API 密钥",customApiKeyPlaceholder:"请输入您的 API 密钥",modelNameLabel:"模型名称",modelNamePlaceholder:"gpt-4.1 或您使用的模型名称",modelNameHint:"请输入您要使用的模型名称,如 gemini-2.5-pro、gpt-4.1 等",modelDisplayNameLabel:"模型显示名称(可选)",modelDisplayNamePlaceholder:"模型的显示名称",saveAndContinue:"保存并继续",saving:"保存中...",apiKeyRequired:"API 密钥不能为空",baseUrlRequired:"API 基础地址不能为空",modelNameRequired:"模型名称不能为空",saveFailed:"保存配置失败",networkError:"网络错误,请检查您的网络连接",successMessage:"配置保存成功!正在跳转到主页面...",restartRequired:`API密钥已保存成功!为了使配置生效,需要重启应用程序。 -点击"确定"立即重启,点击"取消"稍后手动重启。`},common:{cancel:"取消",confirm:"确认",delete:"删除",edit:"编辑",save:"保存",reset:"重置",close:"关闭",add:"添加",create:"创建",update:"更新",submit:"提交",clear:"清空",search:"搜索",loading:"加载中...",success:"成功",error:"错误",warning:"警告",info:"信息",yes:"是",no:"否",enable:"启用",disable:"禁用",copy:"复制",paste:"粘贴",cut:"剪切",undo:"撤销",redo:"重做",select:"选择",selectAll:"全选",deselectAll:"取消全选",previous:"上一步",next:"下一步",finish:"完成",retry:"重试",refresh:"刷新",import:"导入",export:"导出",upload:"上传",download:"下载",preview:"预览",expand:"展开",collapse:"收起",maximize:"最大化",minimize:"最小化",fullscreen:"全屏",exitFullscreen:"退出全屏",parameters:"参数",thinking:"思考",input:"输入",actions:"操作",total:"总计",loadFailed:"加载失败"},config:{title:"配置管理",loading:"正在加载配置...",notFound:"未找到配置项",reset:"重置",resetGroupConfirm:"重置该组所有配置为默认值",modified:"已修改",saved:"配置已保存",saveFailed:"保存失败",search:"搜索配置项...",mcpSearch:"搜索MCP服务器...",mcpConfigPlaceholder:"请输入MCP服务器的配置(JSON格式)...",types:{string:"字符串",text:"文本",number:"数值",boolean:"布尔值",select:"选择",textarea:"多行",checkbox:"复选框"},range:"范围",min:"最小值",max:"最大值",categories:{basic:"基础配置",agent:"Agent配置",model:"Model配置",mcp:"Tools/MCP配置",prompt:"动态Prompt配置",namespace:"命名空间配置"},subGroupDisplayNames:{agent:"Agent",browser:"浏览器",interaction:"交互",system:"系统",performance:"性能",general:"通用",agents:"多智能体",infiniteContext:"无限上下文",filesystem:"文件系统",mcpServiceLoader:"MCP服务加载器"},agentConfig:{title:"Agent配置",import:"导入",export:"导出",configuredAgents:"已配置的Agent",agentCount:"个",noAgent:"暂无Agent配置",createNew:"新建Agent",selectAgentHint:"请选择一个Agent进行配置",newAgent:"新建Agent",agentName:"Agent名称",agentNamePlaceholder:"输入Agent名称",description:"描述",descriptionPlaceholder:"描述这个Agent的功能和用途",nextStepPrompt:"Agent提示词(人设,要求,以及下一步动作的指导)",nextStepPromptPlaceholder:"设置Agent的人设、要求以及下一步动作的指导...",modelConfiguration:"模型配置",modelConfigurationLabel:"选择模型",toolConfiguration:"工具配置",assignedTools:"已分配工具",noAssignedTools:"暂无分配的工具",addRemoveTools:"添加/删除工具",deleteConfirm:"删除确认",deleteConfirmText:"确定要删除",deleteWarning:"此操作不可恢复。",requiredFields:"请填写必要的字段",createSuccess:"Agent创建成功",createFailed:"创建Agent失败",saveSuccess:"Agent保存成功",saveFailed:"保存Agent失败",deleteSuccess:"Agent删除成功",deleteFailed:"删除Agent失败",importSuccess:"Agent导入成功",importFailed:"导入Agent失败",exportSuccess:"Agent导出成功",exportFailed:"导出Agent失败",loadDataFailed:"加载数据失败",loadDetailsFailed:"加载Agent详情失败",invalidFormat:"Agent配置格式不正确:缺少必要字段"},modelConfig:{title:"Model配置",import:"导入",export:"导出",configuredModels:"已配置的Model",modelCount:"个",noModel:"暂无Model配置",createNew:"新建Model",selectModelHint:"请选择一个Model进行配置",newModel:"新建Model",type:"模型类型",typePlaceholder:"选择模型类型",baseUrl:"Base Url",baseUrlPlaceholder:"输入 Base Url",headers:"请求头信息",headersPlaceholder:"输入 Headers 需满足JSON对象格式",apiKey:"API密钥",apiKeyPlaceholder:"输入API密钥",modelName:"模型名称",modelNamePlaceholder:"输入模型名称",description:"描述",descriptionPlaceholder:"输入模型描述",deleteConfirm:"删除确认",deleteConfirmText:"确定要删除",deleteWarning:"此操作不可恢复。",requiredFields:"请填写必要的字段",createSuccess:"Model创建成功",createFailed:"创建Model失败",saveSuccess:"Model保存成功",saveFailed:"保存Model失败",deleteSuccess:"Model删除成功",deleteFailed:"删除Model失败",importSuccess:"Model导入成功",importFailed:"导入Model失败",exportSuccess:"Model导出成功",exportFailed:"导出Model失败",loadDataFailed:"加载数据失败",loadDetailsFailed:"加载Model详情失败",invalidFormat:"Model配置格式不正确:缺少必要字段",validateConfig:"验证配置",validationSuccess:"验证成功",validationFailed:"验证失败",pleaseEnterBaseUrlAndApiKey:"请输入Base URL和API Key",selectModel:"选择模型",availableModels:"可用模型",searchModels:"搜索模型...",getModelsCount:"获取到 {count} 个可用模型",default:"默认",setAsDefault:"设为默认",currentDefault:"当前默认",setDefaultSuccess:"已成功设置为默认模型",setDefaultFailed:"设置默认模型失败",validatingBeforeSave:"保存前正在校验API密钥...",validationFailedCannotSave:"API密钥校验失败,无法保存",temperature:"温度",temperaturePlaceholder:"留空使用模型默认值",topP:"Top P",topPPlaceholder:"留空使用模型默认值"},mcpConfig:{title:"MCP服务器配置",mcpServers:"MCP服务器",addMcpServer:"添加MCP服务器",serverList:"服务器列表",noServers:"暂无MCP服务器配置",connectionType:"连接类型",configJsonLabel:"mcp json配置:",configJsonPlaceholder:"请输入或粘贴MCP配置的JSON内容...",instructions:"使用说明:",instructionStep1:"找到你要用的mcp server的配置json:",instructionStep1Local:"本地(STDIO)",instructionStep1LocalDesc:"本地mcp server,目前市面上主流的是这个",instructionStep1Remote:"远程服务(SSE/STREAMING)",instructionStep1RemoteDesc:"mcp.higress.ai/ 上可以找到,有SSE和STREAMING两种,目前STREAM协议更完备一些",instructionStep2:"将json配置复制到上面的输入框,本地选STUDIO,远程选STREAMING或SSE,提交",instructionStep3:"这样mcp tools就注册成功了。",instructionStep4:"然后需要在Agent配置里面,新建一个agent,然后增加指定你刚才添加的mcp tools,这样可以极大减少冲突,增强tools被agent选择的准确性",configRequired:"请输入MCP服务器配置",invalidJson:"配置JSON格式不正确,请检查语法",addFailed:"添加失败",deleteFailed:"删除失败",deleteConfirm:"确定要删除这个MCP服务器配置吗?此操作不可恢复。",addSuccess:"添加成功",deleteSuccess:"删除成功",formatJson:"格式化JSON",jsonStatusEmpty:"请输入JSON配置...",jsonStatusValid:"JSON格式有效",jsonStatusInvalid:"JSON格式无效",missingMcpServers:"❌ 缺少mcpServers属性 - 请确保JSON包含mcpServers对象",invalidServerConfig:"❌ 服务器配置无效: {serverId} - 服务器配置必须是对象",invalidArgs:"❌ args字段必须是数组: {serverId} - 请将args改为数组格式",invalidEnv:"❌ env字段必须是对象: {serverId} - 请将env改为对象格式",invalidArgsType:"❌ args数组元素必须是字符串: {serverId}, 索引: {index} - 请确保所有参数都是字符串",invalidEnvType:"❌ env对象值必须是字符串: {serverId}, 键: {key} - 环境变量值必须是字符串",missingUrl:"❌ 缺少url字段: {serverId} - 没有command时必须有url",invalidUrl:"❌ url格式无效: {serverId} - 请检查URL格式是否正确",studioExample:`请输入MCP服务器配置JSON。 +点击"确定"立即重启,点击"取消"稍后手动重启。`,simplifiedChinese:"简体中文"},common:{cancel:"取消",confirm:"确认",delete:"删除",edit:"编辑",save:"保存",reset:"重置",close:"关闭",add:"添加",create:"创建",update:"更新",submit:"提交",clear:"清空",submitFailed:"提交失败",unknownError:"未知错误",search:"搜索",loading:"加载中...",parameters:"参数"},language:{zh:"中文",en:"English",success:"成功",error:"错误",warning:"警告",info:"信息",yes:"是",no:"否",enable:"启用",disable:"禁用",copy:"复制",paste:"粘贴",cut:"剪切",undo:"撤销",redo:"重做",select:"选择",selectAll:"全选",deselectAll:"取消全选",previous:"上一步",next:"下一步",finish:"完成",retry:"重试",refresh:"刷新",import:"导入",export:"导出",upload:"上传",download:"下载",preview:"预览",expand:"展开",collapse:"收起",maximize:"最大化",minimize:"最小化",fullscreen:"全屏",exitFullscreen:"退出全屏",parameters:"参数",thinking:"思考",input:"输入",actions:"操作",total:"总计",loadFailed:"加载失败",switch:"切换语言"},config:{title:"配置管理",loading:"正在加载配置...",notFound:"未找到配置项",reset:"重置",resetGroupConfirm:"重置该组所有配置为默认值",modified:"已修改",saved:"配置已保存",saveFailed:"保存失败",search:"搜索配置项...",mcpSearch:"搜索MCP服务器...",mcpConfigPlaceholder:"请输入MCP服务器的配置(JSON格式)...",types:{string:"字符串",text:"文本",number:"数值",boolean:"布尔值",select:"选择",textarea:"多行",checkbox:"复选框"},range:"范围",min:"最小值",max:"最大值",categories:{basic:"基础配置",agent:"Agent配置",model:"Model配置",mcp:"Tools/MCP配置",prompt:"动态Prompt配置",namespace:"命名空间配置"},subGroupDisplayNames:{agent:"Agent",browser:"浏览器",interaction:"交互",system:"系统",performance:"性能",general:"通用",agents:"多智能体",infiniteContext:"无限上下文",filesystem:"文件系统",mcpServiceLoader:"MCP服务加载器"},agentConfig:{title:"Agent配置",import:"导入",export:"导出",configuredAgents:"已配置的Agent",agentCount:"个",noAgent:"暂无Agent配置",createNew:"新建Agent",selectAgentHint:"请选择一个Agent进行配置",newAgent:"新建Agent",agentName:"Agent名称",agentNamePlaceholder:"输入Agent名称",description:"描述",descriptionPlaceholder:"描述这个Agent的功能和用途",nextStepPrompt:"Agent提示词(人设,要求,以及下一步动作的指导)",nextStepPromptPlaceholder:"设置Agent的人设、要求以及下一步动作的指导...",modelConfiguration:"模型配置",modelConfigurationLabel:"选择模型",toolConfiguration:"工具配置",assignedTools:"已分配工具",noAssignedTools:"暂无分配的工具",addRemoveTools:"添加/删除工具",deleteConfirm:"删除确认",deleteConfirmText:"确定要删除",deleteWarning:"此操作不可恢复。",requiredFields:"请填写必要的字段",createSuccess:"Agent创建成功",createFailed:"创建Agent失败",saveSuccess:"Agent保存成功",saveFailed:"保存Agent失败",deleteSuccess:"Agent删除成功",deleteFailed:"删除Agent失败",importSuccess:"Agent导入成功",importFailed:"导入Agent失败",exportSuccess:"Agent导出成功",exportFailed:"导出Agent失败",loadDataFailed:"加载数据失败",loadDetailsFailed:"加载Agent详情失败",invalidFormat:"Agent配置格式不正确:缺少必要字段"},modelConfig:{title:"Model配置",import:"导入",export:"导出",configuredModels:"已配置的Model",modelCount:"个",noModel:"暂无Model配置",createNew:"新建Model",selectModelHint:"请选择一个Model进行配置",newModel:"新建Model",type:"模型类型",typePlaceholder:"选择模型类型",baseUrl:"Base Url",baseUrlPlaceholder:"输入 Base Url",headers:"请求头信息",headersPlaceholder:"输入 Headers 需满足JSON对象格式",apiKey:"API密钥",apiKeyPlaceholder:"输入API密钥",modelName:"模型名称",modelNamePlaceholder:"输入模型名称",description:"描述",descriptionPlaceholder:"输入模型描述",deleteConfirm:"删除确认",deleteConfirmText:"确定要删除",deleteWarning:"此操作不可恢复。",requiredFields:"请填写必要的字段",createSuccess:"Model创建成功",createFailed:"创建Model失败",saveSuccess:"Model保存成功",saveFailed:"保存Model失败",deleteSuccess:"Model删除成功",deleteFailed:"删除Model失败",importSuccess:"Model导入成功",importFailed:"导入Model失败",exportSuccess:"Model导出成功",exportFailed:"导出Model失败",loadDataFailed:"加载数据失败",loadDetailsFailed:"加载Model详情失败",invalidFormat:"Model配置格式不正确:缺少必要字段",validateConfig:"验证配置",validationSuccess:"验证成功",validationFailed:"验证失败",pleaseEnterBaseUrlAndApiKey:"请输入Base URL和API Key",selectModel:"选择模型",availableModels:"可用模型",searchModels:"搜索模型...",getModelsCount:"获取到 {count} 个可用模型",default:"默认",setAsDefault:"设为默认",currentDefault:"当前默认",setDefaultSuccess:"已成功设置为默认模型",setDefaultFailed:"设置默认模型失败",validatingBeforeSave:"保存前正在校验API密钥...",validationFailedCannotSave:"API密钥校验失败,无法保存",temperature:"温度",temperaturePlaceholder:"留空使用模型默认值",topP:"Top P",topPPlaceholder:"留空使用模型默认值"},mcpConfig:{title:"MCP服务器配置",mcpServers:"MCP服务器",addMcpServer:"添加MCP服务器",serverList:"服务器列表",noServers:"暂无MCP服务器配置",connectionType:"连接类型",configJsonLabel:"mcp json配置:",configJsonPlaceholder:"请输入或粘贴MCP配置的JSON内容...",instructions:"使用说明:",instructionStep1:"找到你要用的mcp server的配置json:",instructionStep1Local:"本地(STDIO)",instructionStep1LocalDesc:"本地mcp server,目前市面上主流的是这个",instructionStep1Remote:"远程服务(SSE/STREAMING)",instructionStep1RemoteDesc:"mcp.higress.ai/ 上可以找到,有SSE和STREAMING两种,目前STREAM协议更完备一些",instructionStep2:"将json配置复制到上面的输入框,本地选STUDIO,远程选STREAMING或SSE,提交",instructionStep3:"这样mcp tools就注册成功了。",instructionStep4:"然后需要在Agent配置里面,新建一个agent,然后增加指定你刚才添加的mcp tools,这样可以极大减少冲突,增强tools被agent选择的准确性",configRequired:"请输入MCP服务器配置",invalidJson:"配置JSON格式不正确,请检查语法",addFailed:"添加失败",deleteFailed:"删除失败",deleteConfirm:"确定要删除这个MCP服务器配置吗?此操作不可恢复。",addSuccess:"添加成功",deleteSuccess:"删除成功",formatJson:"格式化JSON",jsonStatusEmpty:"请输入JSON配置...",jsonStatusValid:"JSON格式有效",jsonStatusInvalid:"JSON格式无效",missingMcpServers:"❌ 缺少mcpServers属性 - 请确保JSON包含mcpServers对象",invalidServerConfig:"❌ 服务器配置无效: {serverId} - 服务器配置必须是对象",invalidArgs:"❌ args字段必须是数组: {serverId} - 请将args改为数组格式",invalidEnv:"❌ env字段必须是对象: {serverId} - 请将env改为对象格式",invalidArgsType:"❌ args数组元素必须是字符串: {serverId}, 索引: {index} - 请确保所有参数都是字符串",invalidEnvType:"❌ env对象值必须是字符串: {serverId}, 键: {key} - 环境变量值必须是字符串",missingUrl:"❌ 缺少url字段: {serverId} - 没有command时必须有url",invalidUrl:"❌ url格式无效: {serverId} - 请检查URL格式是否正确",studioExample:`请输入MCP服务器配置JSON。 例如: { @@ -588,29 +588,29 @@ Current version count: {versionCount}`,saveStatus:"Save status: {message}",saveF } } } -}`,selectServerHint:"请选择左侧的MCP服务器,或点击新建MCP配置",jsonEditor:"JSON编辑器",jsonConfigEmpty:"JSON配置不能为空",jsonFormatError:"JSON格式错误",jsonConfigSaved:"JSON配置已保存",confirmDelete:"确认删除",deleteConfirmMessage:"确定要删除这个MCP服务器配置吗?此操作不可恢复。",deleteWarningText:"删除后无法恢复,请谨慎操作。",noServerSelected:"未选择MCP服务器",updateSuccess:"更新成功",saveFailed:"保存失败,请重试",operationFailed:"操作失败",mcpServerNamePlaceholder:"请输入MCP服务器名称",enabled:"启用",disabled:"禁用",newMcpConfig:"新建MCP配置",importAll:"全部导入",exportAll:"全部导出",command:"Command",args:"Args",env:"Env",url:"URL",save:"保存",delete:"删除",reset:"重置",import:"导入",cancel:"取消",exportSuccess:"导出成功",exportFailed:"导出失败",statusToggleSuccess:"状态切换成功",statusToggleFailed:"状态切换失败",missingUrlField:"缺少url字段: {serverId} - 没有command时必须有url或baseUrl",urlFieldTip:"💡 需要提供 url 或 baseUrl 字段",serverConfigWarning:"Server {serverId} has no command but also no url or baseUrl",jsonSyntaxError:"❌ JSON语法错误 - 请检查括号、逗号、引号等符号是否正确",jsonIncomplete:"❌ JSON不完整 - 请检查是否缺少结束括号或引号",jsonNumberError:"❌ JSON数字格式错误 - 请检查数字格式",jsonStringError:"❌ JSON字符串格式错误 - 请检查引号是否配对",jsonSyntaxErrorWithMessage:"❌ JSON语法错误: {message}",correctFormatExample:'💡 正确格式示例: {"mcpServers": {"server-id": {"name": "服务器名称", "url": "服务器地址"}}}',commandPlaceholder:"例如: uvx",urlPlaceholder:"例如: https://mcp.example.com/server",argsPlaceholder:`每行一个参数,例如: +}`,selectServerHint:"请选择左侧的MCP服务器,或点击新建MCP配置",jsonEditor:"JSON编辑器",jsonConfigEmpty:"JSON配置不能为空",jsonFormatError:"JSON格式错误",jsonConfigSaved:"JSON配置已保存",confirmDelete:"确认删除",deleteConfirmMessage:"确定要删除这个MCP服务器配置吗?此操作不可恢复。",deleteWarningText:"删除后无法恢复,请谨慎操作。",noServerSelected:"未选择MCP服务器",updateSuccess:"更新成功",saveFailed:"保存失败,请重试",operationFailed:"操作失败",mcpServerNamePlaceholder:"请输入MCP服务器名称",enabled:"启用",disabled:"禁用",newMcpConfig:"新建MCP配置",importAll:"全部导入",exportAll:"全部导出",mcpName:"MCP名称",usageInstructions:"使用说明",getMcpServiceList:"获取MCP服务列表",findMcpServices:"可以在mcp.higress.ai,mcp.so,modelscope.cn上查找可用的MCP服务",batchImportTip:"如果需要批量配置MCP服务,可以使用右上角的全部导入功能",configureMcpService:"配置MCP服务",fillServiceName:"填写服务名称",selectConnectionType:"选择连接类型:本地选择 STUDIO 以及输入 Command、Args和Env。远程选择 SSE 或 STREAMING 以及输入 URL",clickSaveToComplete:"点击保存按钮完成MCP配置,MCP工具将自动注册到系统中",configureAgentUsage:"配置Agent使用",createAgentTip:"在Agent配置页面创建新的Agent,为Agent添加刚配置的MCP服务,这样可以减少工具冲突,提高Agent选择工具的准确性",copyJsonConfig:"把完整的JSON配置复制到上面的输入框(可以参考配置示例),然后点击导入",command:"Command",args:"Args",env:"Env",url:"URL",save:"保存",delete:"删除",reset:"重置",import:"导入",cancel:"取消",exportSuccess:"导出成功",exportFailed:"导出失败",statusToggleSuccess:"状态切换成功",statusToggleFailed:"状态切换失败",missingUrlField:"缺少url字段: {serverId} - 没有command时必须有url或baseUrl",urlFieldTip:"💡 需要提供 url 或 baseUrl 字段",serverConfigWarning:"Server {serverId} has no command but also no url or baseUrl",jsonSyntaxError:"❌ JSON语法错误 - 请检查括号、逗号、引号等符号是否正确",jsonIncomplete:"❌ JSON不完整 - 请检查是否缺少结束括号或引号",jsonNumberError:"❌ JSON数字格式错误 - 请检查数字格式",jsonStringError:"❌ JSON字符串格式错误 - 请检查引号是否配对",jsonSyntaxErrorWithMessage:"❌ JSON语法错误: {message}",correctFormatExample:'💡 正确格式示例: {"mcpServers": {"server-id": {"name": "服务器名称", "url": "服务器地址"}}}',commandPlaceholder:"例如: uvx",urlPlaceholder:"例如: https://mcp.example.com/server",argsPlaceholder:`每行一个参数,例如: --from mysql_mcp_server_pro --mode stdio`,envPlaceholder:`键值对格式,每行一个,例如: MYSQL_HOST:127.0.0.1 MYSQL_PORT:3306 -MYSQL_USER:root`,connectionTypePlaceholder:"请选择连接类型",argsFormatError:"Args格式错误,请输入有效的JSON数组",envFormatError:"Env格式错误,请输入有效的JSON对象",argsStringError:"Args格式错误,每个参数必须是字符串",envStringError:"Env格式错误,每个值必须是字符串",importSuccess:"导入成功",importFailed:"导入失败",importInvalidJson:"导入的JSON无效"},basicConfig:{title:"基础配置",browserSettings:{headless:"是否使用无头浏览器模式",requestTimeout:"浏览器请求超时时间(秒)"},general:{debugDetail:"debug模式 :会要求模型输出更多内容,方便查找问题,但速度更慢",baseDir:"manus根目录"},interactionSettings:{openBrowser:"启动时自动打开浏览器"},agentSettings:{maxSteps:"智能体执行最大步数",userInputTimeout:"用户输入表单等待超时时间(秒)",maxMemory:"能记住的最大消息数",parallelToolCalls:"并行工具调用"},agents:{forceOverrideFromYaml:"强制使用YAML配置文件覆盖同名Agent"},infiniteContext:{enabled:"是否开启无限上下文",parallelThreads:"并行处理线程数",taskContextSize:"触发无限上下文的字符数阈值(字符数)"},fileSystem:{allowExternalAccess:"是否允许文件操作超出工作目录"},mcpServiceLoader:{connectionTimeoutSeconds:"MCP连接超时时间(秒)",maxRetryCount:"MCP连接最大重试次数",maxConcurrentConnections:"MCP最大并发连接数"},systemSettings:{systemName:"系统名称",language:"语言",maxThreads:"最大线程数",timeoutSeconds:"请求超时时间(秒)"},totalConfigs:"总配置数",modified:"已修改",exportConfigs:"导出配置",importConfigs:"导入配置",search:"搜索",loading:"加载中",saveSuccess:"配置保存成功",exportSuccess:"配置导出成功",exportFailed:"导出配置失败",invalidFormat:"配置文件格式不正确",loadConfigSuccess:"配置加载成功",resetSuccess:"配置重置成功",importSuccess:"配置导入成功",notFound:"未找到配置项",noModified:"没有需要保存的修改",resetGroupConfirm:"重置该组所有配置为默认值",isDefault:"该组配置已是默认值",reset:"重置",requestTimeout:"请求超时时间(秒)",browserTimeout:"浏览器请求超时时间(秒)",loadConfigFailed:"加载配置失败,请刷新重试",saveFailed:"保存失败,请重试",resetFailed:"重置失败,请重试",importFailed:"导入失败,请检查文件格式",groupDisplayNames:{manus:"Manus",browser:"浏览器",interaction:"交互",system:"系统",performance:"性能"}},promptConfig:{title:"动态Prompt配置",configuredprompts:"已配置的Prompt",loadDetailsFailed:"加载Prompt详情失败",promptCount:"个",noPrompts:"没有配置的Prompt",createNew:"新建Prompt",promptName:"Prompt名称",placeholder:"请输入",promptContent:"内容",messageType:"消息类型",type:"领域类型",builtIn:"内置",custom:"自定义",namespace:"命名空间",promptNamePlaceholder:"输入Prompt名称",selectPromptHint:"请选择一个prompt进行配置",promptContentPlaceholder:"请输入Prompt内容",descriptionPlaceholder:"输入Prompt功能和用途",description:"描述",requiredFields:"请填写必要的字段",newPrompt:"新建动态Prompt",saveSuccess:"Prompt保存成功",saveFailed:"Prompt保存失败",deleteSuccess:"Prompt删除成功",deleteFailed:"Prompt删除失败",deleteConfirm:"删除确认",deleteConfirmText:"确定要删除",deleteWarning:"此操作不可恢复。",exportSuccess:"配置导出成功",exportFailed:"导出配置失败",importSuccess:"配置导入成功",importFailed:"导入配置失败",resetToLanguageDefault:"重置为语言默认值",selectLanguage:"选择语言",resetToLanguageDefaultSuccess:"重置为语言默认值成功",resetToLanguageDefaultFailed:"重置为语言默认值失败",resetLanguageWarning:"此操作将覆盖当前内容为所选语言的默认版本",batchSwitchLanguage:"批量切换语言",batchSwitchLanguageSuccess:"批量切换语言成功",batchSwitchLanguageFailed:"批量切换语言失败",batchSwitchLanguageWarning:"此操作将覆盖所有Prompt的内容和描述为所选语言的默认版本"},namespaceConfig:{title:"命名空间配置",name:"命名空间名称",code:"命名空间编码",host:"域名",description:"命名空间描述",loadDetailsFailed:"加载namespace详情失败",selectNameSpaceHint:"请选择一个命名空间进行配置",createNew:"新建命名空间",placeholder:"请输入",saveSuccess:"保存成功",saveFailed:"保存失败",deleteSuccess:"删除成功",deleteFailed:"删除失败",deleteConfirm:"删除确认",deleteConfirmText:"确定要删除",deleteWarning:"此操作不可恢复。",configured:"已配置的命名空间",namespace:{selectNamespace:"请选择命名空间",namespace:"命名空间"}}},agent:{title:"Agent 配置",name:"Agent名称",description:"描述",prompt:"Agent提示词(人设,要求,以及下一步动作的指导)",tools:"工具",addAgent:"新建Agent",editAgent:"编辑Agent",deleteAgent:"删除Agent",deleteConfirm:"确定要删除吗?",deleteWarning:"此操作不可恢复。",namePlaceholder:"输入Agent名称",descriptionPlaceholder:"描述这个Agent的功能和用途",promptPlaceholder:"设置Agent的人设、要求以及下一步动作的指导...",toolSelection:"工具选择",availableTools:"可用工具",selectedTools:"已选工具",selectTools:"选择工具",required:"*",saveSuccess:"Agent保存成功",saveFailed:"Agent保存失败",deleteSuccess:"Agent删除成功",deleteFailed:"Agent删除失败",multiLanguage:{title:"Agent多语言管理",resetAll:"重置所有Agent",resetAllConfirm:"重置所有Agent确认",resetAllWarning:"此操作将删除所有现有Agent配置并重新加载指定语言版本。此操作不可恢复!",selectLanguage:"选择语言",resetSuccess:"所有Agent已重置为指定语言版本",resetFailed:"重置Agent失败",currentLanguage:"当前语言",supportedLanguages:"支持的语言",resetInProgress:"正在重置Agent...",confirmReset:"确认重置",cancel:"取消"}},model:{title:"Model 配置",switch:"切换模型",name:"Model名称",description:"描述",addModel:"新建Model",editModel:"编辑Model",deleteModel:"删除Model",deleteConfirm:"确定要删除吗?",deleteWarning:"此操作不可恢复。",namePlaceholder:"输入Model名称",descriptionPlaceholder:"Model描述",required:"*",saveSuccess:"Model保存成功",saveFailed:"Model保存失败",deleteSuccess:"Model删除成功",deleteFailed:"Model删除失败"},planTemplate:{title:"计划模板配置",generator:"计划生成器",execution:"计划执行",prompt:"生成提示",promptPlaceholder:"描述您想要生成的计划...",generating:"生成中...",generate:"生成计划",updatePlan:"更新计划",executing:"执行中...",execute:"执行计划",executionParams:"执行参数",executionParamsPlaceholder:"输入执行参数(可选)...",apiUrl:"API 调用地址",clearParams:"清空参数",versionControl:"版本控制",rollback:"回滚",restore:"恢复",currentVersion:"当前版本",saveTemplate:"保存模板",loadTemplate:"加载模板",templateSaved:"模板已保存",templateLoaded:"模板已加载",executionSuccess:"执行成功",executionFailed:"执行失败",generationSuccess:"生成成功",generationFailed:"生成失败"},chat:{botName:"TaskPilot:",thinkingLabel:"TaskPilot 思考/处理",processing:"处理中...",step:"步骤",stepNumber:"步骤 {number}",stepExecutionDetails:"步骤执行详情",status:{executing:"执行中",completed:"已完成",pending:"待执行",failed:"失败"},userInput:{message:"请输入所需信息:",submit:"提交"},thinking:"正在思考...",thinkingAnalyzing:"正在分析任务需求...",thinkingExecuting:"正在执行: {title}",thinkingResponse:"正在组织语言回复您...",thinkingProcessing:"正在处理您的请求...",preparingExecution:"准备执行计划...",preparing:"准备执行...",response:"回复",retry:"重试",regenerate:"重新生成",copy:"复制",scrollToBottom:"滚动到底部",waitingDecision:"等待决策中",executionCompleted:"执行完成",noTool:"无工具",noToolParameters:"无工具参数",executionError:"执行出现错误",newMessage:"新消息",networkError:"网络连接有问题,请检查您的网络连接后再试一次",authError:"访问权限出现了问题,请联系管理员或稍后再试",formatError:"请求格式可能有些问题,能否请您重新表述一下您的需求?",unknownError:"处理您的请求时遇到了一些问题,请稍后再试",thinkingOutput:"思考输出"},input:{placeholder:"向 JManus 发送消息",send:"发送",planMode:"PLAN-ACT计划模式",waiting:"等待任务完成...",maxLength:"最大长度",charactersRemaining:"剩余字符"},sidebar:{title:"PLAN-ACT 计划模板",templateList:"模板列表",configuration:"配置",newPlan:"新建计划",loading:"加载中...",retry:"重试",noTemplates:"没有可用的计划模板",unnamedPlan:"未命名计划",noDescription:"无描述",deleteTemplate:"删除此计划模板",jsonTemplate:"JSON 模板",rollback:"回滚",restore:"恢复",jsonPlaceholder:"step2 : 你可以在这里直接修改在step1中生产出的执行计划,让他更精准的按照你的希望执行。然后你可以点击执行计划,高确定性的执行这个计划",planGenerator:"计划生成器",generatorPlaceholder:"step1 : 在这里用自然语言输入你希望完成的任务,尽可能详细,然后点击生成计划,就可以生产一个可重复执行的精确计划",generating:"生成中...",generatePlan:"生成计划",updatePlan:"更新计划",executionController:"执行控制器",executionParams:"执行参数",executionParamsPlaceholder:"输入执行参数...",executionParamsHelp:"在重复执行时,你可以将step2里面的一些内容设置为变量,然后在这里指定该变量的具体值。例如json里面设置 变量1 ,然后在这里则设置 变量1=阿里巴巴 。 就可以实现类似函数的参数的效果。",clearParams:"清空参数",apiUrl:"HTTP GET URL",statusApiUrl:"状态查询 API",executing:"执行中...",executePlan:"执行计划",newTemplate:"新建模板",templateName:"模板名称",templateDescription:"模板描述",lastModified:"最后修改",createTime:"创建时间",expand:"展开",collapse:"收起",pin:"固定",unpin:"取消固定",favorite:"收藏",unfavorite:"取消收藏",share:"分享",duplicate:"复制",rename:"重命名",move:"移动",archive:"归档",unarchive:"取消归档",selectTemplateFailed:"选择计划模板失败",confirmDelete:'确定要删除计划模板 "{name}" 吗?此操作不可恢复。',templateDeleted:"计划模板已删除。",deleteTemplateFailed:"删除计划模板失败",saveCompleted:`保存完成:{message} +MYSQL_USER:root`,connectionTypePlaceholder:"请选择连接类型",argsFormatError:"Args格式错误,请输入有效的JSON数组",envFormatError:"Env格式错误,请输入有效的JSON对象",argsStringError:"Args格式错误,每个参数必须是字符串",envStringError:"Env格式错误,每个值必须是字符串",importSuccess:"导入成功",importFailed:"导入失败",importInvalidJson:"导入的JSON无效"},basicConfig:{title:"基础配置",browserSettings:{headless:"是否使用无头浏览器模式",requestTimeout:"浏览器请求超时时间(秒)"},general:{debugDetail:"debug模式 :会要求模型输出更多内容,方便查找问题,但速度更慢",baseDir:"manus根目录"},interactionSettings:{openBrowser:"启动时自动打开浏览器"},agentSettings:{maxSteps:"智能体执行最大步数",userInputTimeout:"用户输入表单等待超时时间(秒)",maxMemory:"能记住的最大消息数",parallelToolCalls:"并行工具调用"},agents:{forceOverrideFromYaml:"强制使用YAML配置文件覆盖同名Agent"},infiniteContext:{enabled:"是否开启无限上下文",parallelThreads:"并行处理线程数",taskContextSize:"触发无限上下文的字符数阈值(字符数)"},fileSystem:{allowExternalAccess:"是否允许文件操作超出工作目录"},mcpServiceLoader:{connectionTimeoutSeconds:"MCP连接超时时间(秒)",maxRetryCount:"MCP连接最大重试次数",maxConcurrentConnections:"MCP最大并发连接数"},systemSettings:{systemName:"系统名称",language:"语言",maxThreads:"最大线程数",timeoutSeconds:"请求超时时间(秒)"},totalConfigs:"总配置数",modified:"已修改",exportConfigs:"导出配置",importConfigs:"导入配置",search:"搜索",loading:"加载中",saveSuccess:"配置保存成功",exportSuccess:"配置导出成功",exportFailed:"导出配置失败",invalidFormat:"配置文件格式不正确",loadConfigSuccess:"配置加载成功",resetSuccess:"配置重置成功",importSuccess:"配置导入成功",notFound:"未找到配置项",noModified:"没有需要保存的修改",resetGroupConfirm:"重置该组所有配置为默认值",isDefault:"该组配置已是默认值",reset:"重置",requestTimeout:"请求超时时间(秒)",browserTimeout:"浏览器请求超时时间(秒)",loadConfigFailed:"加载配置失败,请刷新重试",saveFailed:"保存失败,请重试",resetFailed:"重置失败,请重试",importFailed:"导入失败,请检查文件格式",groupDisplayNames:{manus:"Manus",browser:"浏览器",interaction:"交互",system:"系统",performance:"性能"}},promptConfig:{title:"动态Prompt配置",configuredprompts:"已配置的Prompt",loadDetailsFailed:"加载Prompt详情失败",promptCount:"个",noPrompts:"没有配置的Prompt",createNew:"新建Prompt",promptName:"Prompt名称",placeholder:"请输入",promptContent:"内容",messageType:"消息类型",type:"领域类型",builtIn:"内置",custom:"自定义",namespace:"命名空间",promptNamePlaceholder:"输入Prompt名称",selectPromptHint:"请选择一个prompt进行配置",promptContentPlaceholder:"请输入Prompt内容",descriptionPlaceholder:"输入Prompt功能和用途",description:"描述",requiredFields:"请填写必要的字段",newPrompt:"新建动态Prompt",saveSuccess:"Prompt保存成功",saveFailed:"Prompt保存失败",deleteSuccess:"Prompt删除成功",deleteFailed:"Prompt删除失败",deleteConfirm:"删除确认",deleteConfirmText:"确定要删除",deleteWarning:"此操作不可恢复。",exportSuccess:"配置导出成功",exportFailed:"导出配置失败",importSuccess:"配置导入成功",importFailed:"导入配置失败",resetToLanguageDefault:"重置为语言默认值",selectLanguage:"选择语言",resetToLanguageDefaultSuccess:"重置为语言默认值成功",resetToLanguageDefaultFailed:"重置为语言默认值失败",resetLanguageWarning:"此操作将覆盖当前内容为所选语言的默认版本",batchSwitchLanguage:"批量切换语言",batchSwitchLanguageSuccess:"批量切换语言成功",batchSwitchLanguageFailed:"批量切换语言失败",batchSwitchLanguageWarning:"此操作将覆盖所有Prompt的内容和描述为所选语言的默认版本"},namespaceConfig:{title:"命名空间配置",name:"命名空间名称",code:"命名空间编码",host:"域名",description:"命名空间描述",loadDetailsFailed:"加载namespace详情失败",selectNameSpaceHint:"请选择一个命名空间进行配置",createNew:"新建命名空间",placeholder:"请输入",saveSuccess:"保存成功",saveFailed:"保存失败",deleteSuccess:"删除成功",deleteFailed:"删除失败",deleteConfirm:"删除确认",deleteConfirmText:"确定要删除",deleteWarning:"此操作不可恢复。",configured:"已配置的命名空间",namespace:{selectNamespace:"请选择命名空间",namespace:"命名空间"}}},agent:{title:"Agent 配置",name:"Agent名称",description:"描述",prompt:"Agent提示词(人设,要求,以及下一步动作的指导)",tools:"工具",addAgent:"新建Agent",editAgent:"编辑Agent",deleteAgent:"删除Agent",deleteConfirm:"确定要删除吗?",deleteWarning:"此操作不可恢复。",namePlaceholder:"输入Agent名称",descriptionPlaceholder:"描述这个Agent的功能和用途",promptPlaceholder:"设置Agent的人设、要求以及下一步动作的指导...",toolSelection:"工具选择",availableTools:"可用工具",selectedTools:"已选工具",selectTools:"选择工具",required:"*",saveSuccess:"Agent保存成功",saveFailed:"Agent保存失败",deleteSuccess:"Agent删除成功",deleteFailed:"Agent删除失败",multiLanguage:{title:"Agent多语言管理",resetAll:"重置所有Agent",resetAllConfirm:"重置所有Agent确认",resetAllWarning:"此操作将删除所有现有Agent配置并重新加载指定语言版本。此操作不可恢复!",selectLanguage:"选择语言",resetSuccess:"所有Agent已重置为指定语言版本",resetFailed:"重置Agent失败",currentLanguage:"当前语言",supportedLanguages:"支持的语言",resetInProgress:"正在重置Agent...",confirmReset:"确认重置",cancel:"取消"}},model:{title:"Model 配置",switch:"切换模型",name:"Model名称",description:"描述",addModel:"新建Model",editModel:"编辑Model",deleteModel:"删除Model",deleteConfirm:"确定要删除吗?",deleteWarning:"此操作不可恢复。",namePlaceholder:"输入Model名称",descriptionPlaceholder:"Model描述",required:"*",saveSuccess:"Model保存成功",saveFailed:"Model保存失败",deleteSuccess:"Model删除成功",deleteFailed:"Model删除失败"},planTemplate:{title:"计划模板配置",generator:"计划生成器",execution:"计划执行",prompt:"生成提示",promptPlaceholder:"描述您想要生成的计划...",generating:"生成中...",generate:"生成计划",updatePlan:"更新计划",executing:"执行中...",execute:"执行计划",executionParams:"执行参数",executionParamsPlaceholder:"输入执行参数(可选)...",apiUrl:"API 调用地址",clearParams:"清空参数",versionControl:"版本控制",rollback:"回滚",restore:"恢复",currentVersion:"当前版本",saveTemplate:"保存模板",loadTemplate:"加载模板",templateSaved:"模板已保存",templateLoaded:"模板已加载",executionSuccess:"执行成功",executionFailed:"执行失败",generationSuccess:"生成成功",generationFailed:"生成失败",invalidJson:"JSON 格式无效,请修正后再保存",executePlanTemplate:"执行计划模板"},chat:{botName:"TaskPilot:",thinkingLabel:"TaskPilot 思考/处理",processing:"处理中...",step:"步骤",stepNumber:"步骤 {number}",stepExecutionDetails:"步骤执行详情",status:{executing:"执行中",completed:"已完成",pending:"待执行",failed:"失败"},userInput:{message:"请输入所需信息:",submit:"提交"},thinking:"正在思考...",thinkingAnalyzing:"正在分析任务需求...",thinkingExecuting:"正在执行: {title}",thinkingResponse:"正在组织语言回复您...",thinkingProcessing:"正在处理您的请求...",preparingExecution:"准备执行计划...",preparing:"准备执行...",response:"回复",retry:"重试",regenerate:"重新生成",copy:"复制",scrollToBottom:"滚动到底部",waitingDecision:"等待决策中",executionCompleted:"执行完成",noTool:"无工具",noToolParameters:"无工具参数",executionError:"执行出现错误",newMessage:"新消息",networkError:"网络连接有问题,请检查您的网络连接后再试一次",authError:"访问权限出现了问题,请联系管理员或稍后再试",formatError:"请求格式可能有些问题,能否请您重新表述一下您的需求?",unknownError:"处理您的请求时遇到了一些问题,请稍后再试",thinkingOutput:"思考输出",defaultResponse:"我明白了,还有什么我可以帮您的吗?",anythingElse:"还有什么需要我帮助的吗?",okayDone:"好的,{text}",ifOtherQuestions:"如果您还有其他问题,请随时告诉我",hopeHelpful:"希望这个回答对您有帮助!",great:"很好!",ifOtherHelp:"如果您还有其他需要帮助的地方,请随时告诉我",completedRequest:"我已经完成了您的请求:{result}"},input:{placeholder:"向 JManus 发送消息",send:"发送",planMode:"PLAN-ACT计划模式",waiting:"等待用户输入...",maxLength:"最大长度",charactersRemaining:"剩余字符",attachFile:"附加文件"},sidebar:{title:"PLAN-ACT 计划模板",templateList:"模板列表",configuration:"配置",newPlan:"新建计划",loading:"加载中...",retry:"重试",noTemplates:"没有可用的计划模板",unnamedPlan:"未命名计划",noDescription:"无描述",deleteTemplate:"删除此计划模板",jsonTemplate:"JSON 模板",rollback:"回滚",restore:"恢复",jsonPlaceholder:"step2 : 你可以在这里直接修改在step1中生产出的执行计划,让他更精准的按照你的希望执行。然后你可以点击执行计划,高确定性的执行这个计划",planGenerator:"计划生成器",generatorPlaceholder:"step1 : 在这里用自然语言输入你希望完成的任务,尽可能详细,然后点击生成计划,就可以生产一个可重复执行的精确计划",generating:"生成中...",generatePlan:"生成计划",updatePlan:"更新计划",executionController:"执行控制器",executionParams:"执行参数",executionParamsPlaceholder:"输入执行参数...",executionParamsHelp:"在重复执行时,你可以将step2里面的一些内容设置为变量,然后在这里指定该变量的具体值。例如json里面设置 变量1 ,然后在这里则设置 变量1=阿里巴巴 。 就可以实现类似函数的参数的效果。",clearParams:"清空参数",apiUrl:"HTTP GET URL",statusApiUrl:"状态查询 API",executing:"执行中...",executePlan:"执行计划",newTemplate:"新建模板",templateName:"模板名称",templateDescription:"模板描述",lastModified:"最后修改",createTime:"创建时间",expand:"展开",collapse:"收起",pin:"固定",unpin:"取消固定",favorite:"收藏",unfavorite:"取消收藏",share:"分享",duplicate:"复制",rename:"重命名",move:"移动",archive:"归档",unarchive:"取消归档",selectTemplateFailed:"选择计划模板失败",confirmDelete:'确定要删除计划模板 "{name}" 吗?此操作不可恢复。',templateDeleted:"计划模板已删除。",deleteTemplateFailed:"删除计划模板失败",saveCompleted:`保存完成:{message} 当前版本数:{versionCount}`,saveSuccess:`保存成功:{message} -当前版本数:{versionCount}`,saveStatus:"保存状态:{message}",saveFailed:"保存计划修改失败",generateSuccess:"计划生成成功!模板ID: {templateId}",generateFailed:"生成计划失败",updateSuccess:"计划更新成功!",updateFailed:"更新计划失败",executeFailed:"执行计划失败",unknown:"未知",newTemplateName:"新建的执行计划",newTemplateDescription:"请使用计划生成器创建新的计划模板",generatedTemplateDescription:"通过生成器创建的计划模板",defaultExecutionPlanTitle:"执行计划"},modal:{close:"关闭",cancel:"取消",confirm:"确认",save:"保存",delete:"删除",edit:"编辑"},editor:{format:"格式化",undo:"撤销",redo:"重做",find:"查找",replace:"替换",gotoLine:"跳转到行",selectAll:"全选",toggleWordWrap:"切换自动换行",toggleMinimap:"切换迷你地图",increaseFontSize:"增大字体",decreaseFontSize:"减小字体",resetFontSize:"重置字体大小"},language:{switch:"切换语言",current:"当前语言",zh:"中文",en:"English"},theme:{switch:"切换主题",light:"浅色主题",dark:"深色主题",auto:"跟随系统"},error:{notFound:"页面未找到",notFoundDescription:"抱歉,您访问的页面不存在",serverError:"服务器错误",serverErrorDescription:"服务器出现了一些问题,请稍后再试",networkError:"网络错误",networkErrorDescription:"网络连接失败,请检查您的网络设置",backToHome:"返回首页",retry:"重试"},validation:{required:"此字段为必填项",email:"请输入有效的邮箱地址",phone:"请输入有效的手机号码",url:"请输入有效的网址",minLength:"至少需要 {min} 个字符",maxLength:"最多只能输入 {max} 个字符",min:"值不能小于 {min}",max:"值不能大于 {max}",pattern:"格式不正确",confirmation:"两次输入不一致"},time:{now:"刚刚",unknown:"未知时间",minuteAgo:"{count} 分钟前",hourAgo:"{count} 小时前",dayAgo:"{count} 天前",weekAgo:"{count} 周前",monthAgo:"{count} 个月前",yearAgo:"{count} 年前",today:"今天",yesterday:"昨天",tomorrow:"明天",thisWeek:"本周",lastWeek:"上周",nextWeek:"下周",thisMonth:"本月",lastMonth:"上月",nextMonth:"下月",thisYear:"今年",lastYear:"去年",nextYear:"明年"},stats:{total:"总计",count:"数量",percentage:"百分比",average:"平均",median:"中位数",min:"最小值",max:"最大值",sum:"总和",growth:"增长",decline:"下降",noData:"暂无数据",loading:"数据加载中...",error:"数据加载失败"},home:{welcomeTitle:"欢迎使用 JManus!",welcomeSubtitle:"您的 Java AI 智能助手,帮助您构建和完成各种任务。",tagline:"Java AI 智能体",inputPlaceholder:"描述您想构建或完成的内容...",directButton:"直接进入工作台",examples:{stockPrice:{title:"查询股价",description:"获取今天阿里巴巴的最新股价(Agent可以使用浏览器工具)",prompt:"用浏览器基于百度,查询今天阿里巴巴的股价,并返回最新股价"},weather:{title:"查询天气",description:"获取北京今天的天气情况(Agent可以使用MCP工具服务)",prompt:"用浏览器,基于百度,查询北京今天的天气"},queryplan:{title:"查询一个人的信息",description:"查询 沈询 阿里的所有信息(用于展示无限上下文能力)",prompt:"用浏览器,基于百度,查询计划"},ainovel:{title:"AI小说创作",description:"人工智能逐步击败人类主题小说(用于展示超长内容的输出)",prompt:"创建一个关于人工智能逐步击败人类的小说,包含10个章节"}}},rightPanel:{stepExecutionDetails:"步骤执行详情",noStepSelected:"未选择执行步骤",selectStepHint:"请在左侧聊天区域选择一个执行步骤查看详情",stepExecuting:"步骤正在执行中,请稍候...",step:"步骤",executingAgent:"执行智能体",description:"描述",request:"请求",callingModel:"调用模型",executionResult:"执行结果",executing:"执行中...",thinkAndActionSteps:"思考与行动步骤",thinking:"思考",action:"行动",input:"输入",output:"输出",tool:"工具",toolParameters:"工具参数",noStepDetails:"暂无详细步骤信息",scrollToBottom:"滚动到底部",stepInfo:"步骤信息",stepName:"步骤名称",noExecutionInfo:"该步骤暂无详细执行信息",subPlan:"子执行计划",status:{completed:"已完成",executing:"执行中",waiting:"等待执行"},tabs:{details:"步骤执行详情",chat:"Chat",code:"Code"},chatBubbles:{analyzeRequirements:{title:"分析需求",content:"将您的请求分解为可操作的步骤:1) 创建用户实体,2) 实现用户服务,3) 构建 REST 端点,4) 添加验证和错误处理。"},generateCode:{title:"生成代码",content:"创建具有用户管理 CRUD 操作的 Spring Boot REST API。包括正确的 HTTP 状态代码和错误处理。"},codeGenerated:{title:"代码已生成",content:"成功生成具有所有 CRUD 操作的 UserController。代码包含正确的 REST 约定、错误处理,并遵循 Spring Boot 最佳实践。"}},timeAgo:{justNow:"刚刚",minutesAgo:"{n} 分钟前",hoursAgo:"{n} 小时前",daysAgo:"{n} 天前"},defaultStepTitle:"步骤 {number}"},direct:{configuration:"配置",panelResizeHint:"拖拽调整面板大小,双击重置",aboutExecutionDetails:"关于集成执行详情"},cronTask:{title:"定时任务管理",addTask:"定时任务",noTasks:"暂无定时任务",taskName:"任务名称",taskNamePlaceholder:"请输入任务名称",cronExpression:"Cron表达式",cronExpressionPlaceholder:"例如: 0 0 12 * * ?",cronExpressionHelp:"格式: 秒 分 时 日 月 周 年",taskDescription:"任务描述",taskDescriptionPlaceholder:"请输入任务描述",taskStatus:"任务状态",taskDetail:"任务详情",executeOnce:"执行一次",edit:"编辑",operations:"操作",enable:"启用",disable:"禁用",delete:"删除",deleteConfirm:"确认删除",deleteConfirmMessage:'确定要删除任务 "{taskName}" 吗?此操作不可撤销。',nextExecution:"下次执行时间",createTime:"创建时间",updateTime:"更新时间",active:"启用",inactive:"禁用",template:"示例:每天帮我早上8点,帮我收集当天的AI新闻吧",planTemplate:"计划模板",linkTemplate:"关联模板",noTemplate:"不关联",selectTemplate:"请选择模板",templateHelpText:"选择后,定时任务将按照制定好的计划执行",createTask:"创建定时任务",selectCreateMethod:"请选择创建方式",createWithJmanus:"让Jmanus帮忙创建",createWithJmanusDesc:"通过AI助手引导创建定时任务",createManually:"手动创建",createManuallyDesc:"自己填写定时任务信息"}},ek="LOCAL_STORAGE_LOCALE",tk=rt({locale:localStorage.getItem(ek)??"en",opts:[{value:"en",title:"English"},{value:"zh",title:"中文"}]}),nk=uSe({legacy:!1,locale:tk.locale,fallbackLocale:"en",messages:{en:CSe,zh:xSe}}),$Se=async e=>{localStorage.setItem(ek,e),nk.global.locale.value=e,tk.locale=e,console.log(`Successfully switched frontend language to: ${e}`)},sOe=async e=>{await $Se(e);try{const t=await fetch("/api/agent-management/initialize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({language:e})});if(t.ok){const n=await t.json();console.log(`Successfully initialized agents with language: ${e}`,n)}else{const n=await t.json();throw console.error(`Failed to initialize agents with language: ${e}`,n),new Error(n.error||"Failed to initialize agents")}}catch(t){throw console.error("Error initializing agents during language change:",t),t}};function ok(e){return ev()?(pS(e),!0):!1}function ql(e){return typeof e=="function"?e():Bt(e)}const Nm=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const wSe=Object.prototype.toString,PSe=e=>wSe.call(e)==="[object Object]",fc=()=>{},OSe=ISe();function ISe(){var e,t;return Nm&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function rk(e,t){function n(...o){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(r).catch(i)})}return n}const ik=e=>e();function TSe(e,t={}){let n,o,r=fc;const i=l=>{clearTimeout(l),r(),r=fc};return l=>{const s=ql(e),u=ql(t.maxWait);return n&&i(n),s<=0||u!==void 0&&u<=0?(o&&(i(o),o=null),Promise.resolve(l())):new Promise((c,d)=>{r=t.rejectOnCancel?d:c,u&&!o&&(o=setTimeout(()=>{n&&i(n),o=null,c(l())},u)),n=setTimeout(()=>{o&&i(o),o=null,c(l())},s)})}}function ESe(e=ik){const t=ae(!0);function n(){t.value=!1}function o(){t.value=!0}const r=(...i)=>{t.value&&e(...i)};return{isActive:nv(t),pause:n,resume:o,eventFilter:r}}function _Se(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const o=t;t=void 0,o&&await o},n}function MSe(e){return Jt()}function Ui(e,t=200,n={}){return rk(TSe(t,n),e)}function ASe(e,t,n={}){const{eventFilter:o=ik,...r}=n;return be(e,rk(o,t),r)}function RSe(e,t,n={}){const{eventFilter:o,...r}=n,{eventFilter:i,pause:a,resume:l,isActive:s}=ESe(o);return{stop:ASe(e,t,{...r,eventFilter:i}),pause:a,resume:l,isActive:s}}function gs(e,t=!0,n){MSe()?Ke(e,n):t?e():ot(e)}function DSe(e,t,n={}){const{immediate:o=!0}=n,r=ae(!1);let i=null;function a(){i&&(clearTimeout(i),i=null)}function l(){r.value=!1,a()}function s(...u){a(),r.value=!0,i=setTimeout(()=>{r.value=!1,i=null,e(...u)},ql(t))}return o&&(r.value=!0,Nm&&s()),ok(l),{isPending:nv(r),start:s,stop:l}}function io(e,t,n){const o=be(e,(r,i,a)=>{r&&(n!=null&&n.once&&ot(()=>o()),t(r,i,a))},{...n,once:!1});return o}function Fu(e){var t;const n=ql(e);return(t=n==null?void 0:n.$el)!=null?t:n}const tf=Nm?window:void 0,ak=Nm?window.navigator:void 0;function Fl(...e){let t,n,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,r]=e,t=tf):[t,n,o,r]=e,!t)return fc;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const i=[],a=()=>{i.forEach(c=>c()),i.length=0},l=(c,d,f,p)=>(c.addEventListener(d,f,p),()=>c.removeEventListener(d,f,p)),s=be(()=>[Fu(t),ql(r)],([c,d])=>{if(a(),!c)return;const f=PSe(d)?{...d}:d;i.push(...n.flatMap(p=>o.map(v=>l(c,p,v,f))))},{immediate:!0,flush:"post"}),u=()=>{s(),a()};return ok(u),u}let t3=!1;function NSe(e,t,n={}){const{window:o=tf,ignore:r=[],capture:i=!0,detectIframe:a=!1}=n;if(!o)return fc;OSe&&!t3&&(t3=!0,Array.from(o.document.body.children).forEach(f=>f.addEventListener("click",fc)),o.document.documentElement.addEventListener("click",fc));let l=!0;const s=f=>r.some(p=>{if(typeof p=="string")return Array.from(o.document.querySelectorAll(p)).some(v=>v===f.target||f.composedPath().includes(v));{const v=Fu(p);return v&&(f.target===v||f.composedPath().includes(v))}}),c=[Fl(o,"click",f=>{const p=Fu(e);if(!(!p||p===f.target||f.composedPath().includes(p))){if(f.detail===0&&(l=!s(f)),!l){l=!0;return}t(f)}},{passive:!0,capture:i}),Fl(o,"pointerdown",f=>{const p=Fu(e);l=!s(f)&&!!(p&&!f.composedPath().includes(p))},{passive:!0}),a&&Fl(o,"blur",f=>{setTimeout(()=>{var p;const v=Fu(e);((p=o.document.activeElement)==null?void 0:p.tagName)==="IFRAME"&&!(v!=null&&v.contains(o.document.activeElement))&&t(f)},0)})].filter(Boolean);return()=>c.forEach(f=>f())}function kSe(){const e=ae(!1),t=Jt();return t&&Ke(()=>{e.value=!0},t),e}function lk(e){const t=kSe();return E(()=>(t.value,!!e()))}function n3(e,t={}){const{controls:n=!1,navigator:o=ak}=t,r=lk(()=>o&&"permissions"in o);let i;const a=typeof e=="string"?{name:e}:e,l=ae(),s=()=>{i&&(l.value=i.state)},u=_Se(async()=>{if(r.value){if(!i)try{i=await o.permissions.query(a),Fl(i,"change",s),s()}catch{l.value="prompt"}return i}});return u(),n?{state:l,isSupported:r,query:u}:l}function LSe(e={}){const{navigator:t=ak,read:n=!1,source:o,copiedDuring:r=1500,legacy:i=!1}=e,a=lk(()=>t&&"clipboard"in t),l=n3("clipboard-read"),s=n3("clipboard-write"),u=E(()=>a.value||i),c=ae(""),d=ae(!1),f=DSe(()=>d.value=!1,r);function p(){a.value&&b(l.value)?t.clipboard.readText().then(S=>{c.value=S}):c.value=m()}u.value&&n&&Fl(["copy","cut"],p);async function v(S=ql(o)){u.value&&S!=null&&(a.value&&b(s.value)?await t.clipboard.writeText(S):h(S),c.value=S,d.value=!0,f.start())}function h(S){const C=document.createElement("textarea");C.value=S??"",C.style.position="absolute",C.style.opacity="0",document.body.appendChild(C),C.select(),document.execCommand("copy"),C.remove()}function m(){var S,C,$;return($=(C=(S=document==null?void 0:document.getSelection)==null?void 0:S.call(document))==null?void 0:C.toString())!=null?$:""}function b(S){return S==="granted"||S==="prompt"}return{isSupported:u,text:c,copied:d,copy:v}}const Op=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ip="__vueuse_ssr_handlers__",FSe=BSe();function BSe(){return Ip in Op||(Op[Ip]=Op[Ip]||{}),Op[Ip]}function HSe(e,t){return FSe[e]||t}function zSe(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const jSe={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},o3="vueuse-storage";function WSe(e,t,n,o={}){var r;const{flush:i="pre",deep:a=!0,listenToStorageChanges:l=!0,writeDefaults:s=!0,mergeDefaults:u=!1,shallow:c,window:d=tf,eventFilter:f,onError:p=_=>{console.error(_)},initOnMounted:v}=o,h=(c?se:ae)(typeof t=="function"?t():t);if(!n)try{n=HSe("getDefaultStorage",()=>{var _;return(_=tf)==null?void 0:_.localStorage})()}catch(_){p(_)}if(!n)return h;const m=ql(t),b=zSe(m),S=(r=o.serializer)!=null?r:jSe[b],{pause:C,resume:$}=RSe(h,()=>P(h.value),{flush:i,deep:a,eventFilter:f});d&&l&&gs(()=>{Fl(d,"storage",O),Fl(d,o3,I),v&&O()}),v||O();function x(_,T){d&&d.dispatchEvent(new CustomEvent(o3,{detail:{key:e,oldValue:_,newValue:T,storageArea:n}}))}function P(_){try{const T=n.getItem(e);if(_==null)x(T,null),n.removeItem(e);else{const A=S.write(_);T!==A&&(n.setItem(e,A),x(T,A))}}catch(T){p(T)}}function w(_){const T=_?_.newValue:n.getItem(e);if(T==null)return s&&m!=null&&n.setItem(e,S.write(m)),m;if(!_&&u){const A=S.read(T);return typeof u=="function"?u(A,m):b==="object"&&!Array.isArray(A)?{...m,...A}:A}else return typeof T!="string"?T:S.read(T)}function O(_){if(!(_&&_.storageArea!==n)){if(_&&_.key==null){h.value=m;return}if(!(_&&_.key!==e)){C();try{(_==null?void 0:_.newValue)!==S.write(h.value)&&(h.value=w(_))}catch(T){p(T)}finally{_?ot($):$()}}}}function I(_){O(_.detail)}return h}function K$(e,t,n={}){const{window:o=tf}=n;return WSe(e,t,o==null?void 0:o.localStorage,n)}function kh(e){"@babel/helpers - typeof";return kh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kh(e)}var VSe=/^\s+/,KSe=/\s+$/;function ke(e,t){if(e=e||"",t=t||{},e instanceof ke)return e;if(!(this instanceof ke))return new ke(e,t);var n=USe(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}ke.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,o,r,i,a,l;return n=t.r/255,o=t.g/255,r=t.b/255,n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),r<=.03928?l=r/12.92:l=Math.pow((r+.055)/1.055,2.4),.2126*i+.7152*a+.0722*l},setAlpha:function(t){return this._a=sk(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=i3(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i3(this._r,this._g,this._b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+o+"%, "+r+"%)":"hsva("+n+", "+o+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=r3(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=r3(this._r,this._g,this._b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+o+"%, "+r+"%)":"hsla("+n+", "+o+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return a3(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return qSe(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Zt(this._r,255)*100)+"%",g:Math.round(Zt(this._g,255)*100)+"%",b:Math.round(Zt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Zt(this._r,255)*100)+"%, "+Math.round(Zt(this._g,255)*100)+"%, "+Math.round(Zt(this._b,255)*100)+"%)":"rgba("+Math.round(Zt(this._r,255)*100)+"%, "+Math.round(Zt(this._g,255)*100)+"%, "+Math.round(Zt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:sCe[a3(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+l3(this._r,this._g,this._b,this._a),o=n,r=this._gradientType?"GradientType = 1, ":"";if(t){var i=ke(t);o="#"+l3(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+n+",endColorstr="+o+")"},toString:function(t){var n=!!t;t=t||this._format;var o=!1,r=this._a<1&&this._a>=0,i=!n&&r&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return i?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(o=this.toRgbString()),t==="prgb"&&(o=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(o=this.toHexString()),t==="hex3"&&(o=this.toHexString(!0)),t==="hex4"&&(o=this.toHex8String(!0)),t==="hex8"&&(o=this.toHex8String()),t==="name"&&(o=this.toName()),t==="hsl"&&(o=this.toHslString()),t==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},clone:function(){return ke(this.toString())},_applyModification:function(t,n){var o=t.apply(null,[this].concat([].slice.call(n)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(eCe,arguments)},brighten:function(){return this._applyModification(tCe,arguments)},darken:function(){return this._applyModification(nCe,arguments)},desaturate:function(){return this._applyModification(JSe,arguments)},saturate:function(){return this._applyModification(ZSe,arguments)},greyscale:function(){return this._applyModification(QSe,arguments)},spin:function(){return this._applyModification(oCe,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(aCe,arguments)},complement:function(){return this._applyCombination(rCe,arguments)},monochromatic:function(){return this._applyCombination(lCe,arguments)},splitcomplement:function(){return this._applyCombination(iCe,arguments)},triad:function(){return this._applyCombination(s3,[3])},tetrad:function(){return this._applyCombination(s3,[4])}};ke.fromRatio=function(e,t){if(kh(e)=="object"){var n={};for(var o in e)e.hasOwnProperty(o)&&(o==="a"?n[o]=e[o]:n[o]=Bu(e[o]));e=n}return ke(e,t)};function USe(e){var t={r:0,g:0,b:0},n=1,o=null,r=null,i=null,a=!1,l=!1;return typeof e=="string"&&(e=fCe(e)),kh(e)=="object"&&(Ti(e.r)&&Ti(e.g)&&Ti(e.b)?(t=GSe(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ti(e.h)&&Ti(e.s)&&Ti(e.v)?(o=Bu(e.s),r=Bu(e.v),t=YSe(e.h,o,r),a=!0,l="hsv"):Ti(e.h)&&Ti(e.s)&&Ti(e.l)&&(o=Bu(e.s),i=Bu(e.l),t=XSe(e.h,o,i),a=!0,l="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=sk(n),{ok:a,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function GSe(e,t,n){return{r:Zt(e,255)*255,g:Zt(t,255)*255,b:Zt(n,255)*255}}function r3(e,t,n){e=Zt(e,255),t=Zt(t,255),n=Zt(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i,a,l=(o+r)/2;if(o==r)i=a=0;else{var s=o-r;switch(a=l>.5?s/(2-o-r):s/(o+r),o){case e:i=(t-n)/s+(t1&&(d-=1),d<1/6?u+(c-u)*6*d:d<1/2?c:d<2/3?u+(c-u)*(2/3-d)*6:u}if(t===0)o=r=i=n;else{var l=n<.5?n*(1+t):n+t-n*t,s=2*n-l;o=a(s,l,e+1/3),r=a(s,l,e),i=a(s,l,e-1/3)}return{r:o*255,g:r*255,b:i*255}}function i3(e,t,n){e=Zt(e,255),t=Zt(t,255),n=Zt(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i,a,l=o,s=o-r;if(a=o===0?0:s/o,o==r)i=0;else{switch(o){case e:i=(t-n)/s+(t>1)+720)%360;--t;)o.h=(o.h+r)%360,i.push(ke(o));return i}function lCe(e,t){t=t||6;for(var n=ke(e).toHsv(),o=n.h,r=n.s,i=n.v,a=[],l=1/t;t--;)a.push(ke({h:o,s:r,v:i})),i=(i+l)%1;return a}ke.mix=function(e,t,n){n=n===0?0:n||50;var o=ke(e).toRgb(),r=ke(t).toRgb(),i=n/100,a={r:(r.r-o.r)*i+o.r,g:(r.g-o.g)*i+o.g,b:(r.b-o.b)*i+o.b,a:(r.a-o.a)*i+o.a};return ke(a)};ke.readability=function(e,t){var n=ke(e),o=ke(t);return(Math.max(n.getLuminance(),o.getLuminance())+.05)/(Math.min(n.getLuminance(),o.getLuminance())+.05)};ke.isReadable=function(e,t,n){var o=ke.readability(e,t),r,i;switch(i=!1,r=pCe(n),r.level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7;break}return i};ke.mostReadable=function(e,t,n){var o=null,r=0,i,a,l,s;n=n||{},a=n.includeFallbackColors,l=n.level,s=n.size;for(var u=0;ur&&(r=i,o=ke(t[u]));return ke.isReadable(e,o,{level:l,size:s})||!a?o:(n.includeFallbackColors=!1,ke.mostReadable(e,["#fff","#000"],n))};var J1=ke.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},sCe=ke.hexNames=cCe(J1);function cCe(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function sk(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Zt(e,t){uCe(e)&&(e="100%");var n=dCe(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function km(e){return Math.min(1,Math.max(0,e))}function Wo(e){return parseInt(e,16)}function uCe(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function dCe(e){return typeof e=="string"&&e.indexOf("%")!=-1}function kr(e){return e.length==1?"0"+e:""+e}function Bu(e){return e<=1&&(e=e*100+"%"),e}function ck(e){return Math.round(parseFloat(e)*255).toString(16)}function c3(e){return Wo(e)/255}var Ar=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+o),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+o),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+o),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Ti(e){return!!Ar.CSS_UNIT.exec(e)}function fCe(e){e=e.replace(VSe,"").replace(KSe,"").toLowerCase();var t=!1;if(J1[e])e=J1[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Ar.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Ar.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Ar.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Ar.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Ar.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Ar.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Ar.hex8.exec(e))?{r:Wo(n[1]),g:Wo(n[2]),b:Wo(n[3]),a:c3(n[4]),format:t?"name":"hex8"}:(n=Ar.hex6.exec(e))?{r:Wo(n[1]),g:Wo(n[2]),b:Wo(n[3]),format:t?"name":"hex"}:(n=Ar.hex4.exec(e))?{r:Wo(n[1]+""+n[1]),g:Wo(n[2]+""+n[2]),b:Wo(n[3]+""+n[3]),a:c3(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Ar.hex3.exec(e))?{r:Wo(n[1]+""+n[1]),g:Wo(n[2]+""+n[2]),b:Wo(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function pCe(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}var hs=hs||{};hs.stringify=function(){var e={"visit_linear-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return e.visit_gradient(t)},"visit_radial-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return e.visit_gradient(t)},visit_gradient:function(t){var n=e.visit(t.orientation);return n&&(n+=", "),t.type+"("+n+e.visit(t.colorStops)+")"},visit_shape:function(t){var n=t.value,o=e.visit(t.at),r=e.visit(t.style);return r&&(n+=" "+r),o&&(n+=" at "+o),n},"visit_default-radial":function(t){var n="",o=e.visit(t.at);return o&&(n+=o),n},"visit_extent-keyword":function(t){var n=t.value,o=e.visit(t.at);return o&&(n+=" at "+o),n},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return e.visit(t.value.x)+" "+e.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_calc:function(t){return"calc("+t.value+")"},visit_literal:function(t){return e.visit_color(t.value,t)},visit_hex:function(t){return e.visit_color("#"+t.value,t)},visit_rgb:function(t){return e.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return e.visit_color("rgba("+t.value.join(", ")+")",t)},visit_hsl:function(t){return e.visit_color("hsl("+t.value[0]+", "+t.value[1]+"%, "+t.value[2]+"%)",t)},visit_hsla:function(t){return e.visit_color("hsla("+t.value[0]+", "+t.value[1]+"%, "+t.value[2]+"%, "+t.value[3]+")",t)},visit_var:function(t){return e.visit_color("var("+t.value+")",t)},visit_color:function(t,n){var o=t,r=e.visit(n.length);return r&&(o+=" "+r),o},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var n="",o=t.length;return t.forEach(function(r,i){n+=e.visit(r),i0&&n("Invalid input not EOF"),z}function r(){return C(i)}function i(){return a("linear-gradient",e.linearGradient,s)||a("repeating-linear-gradient",e.repeatingLinearGradient,s)||a("radial-gradient",e.radialGradient,d)||a("repeating-radial-gradient",e.repeatingRadialGradient,d)}function a(z,G,Q){return l(G,function(Y){var oe=Q();return oe&&(B(e.comma)||n("Missing comma before color stops")),{type:z,orientation:oe,colorStops:C($)}})}function l(z,G){var Q=B(z);if(Q){B(e.startCall)||n("Missing (");var Y=G(Q);return B(e.endCall)||n("Missing )"),Y}}function s(){var z=u();if(z)return z;var G=F("position-keyword",e.positionKeywords,1);return G?{type:"directional",value:G.value}:c()}function u(){return F("directional",e.sideOrCorner,1)}function c(){return F("angular",e.angleValue,1)||F("angular",e.radianValue,1)}function d(){var z,G=f(),Q;return G&&(z=[],z.push(G),Q=t,B(e.comma)&&(G=f(),G?z.push(G):t=Q)),z}function f(){var z=p()||v();if(z)z.at=m();else{var G=h();if(G){z=G;var Q=m();Q&&(z.at=Q)}else{var Y=m();if(Y)z={type:"default-radial",at:Y};else{var oe=b();oe&&(z={type:"default-radial",at:oe})}}}return z}function p(){var z=F("shape",/^(circle)/i,0);return z&&(z.style=L()||h()),z}function v(){var z=F("shape",/^(ellipse)/i,0);return z&&(z.style=b()||M()||h()),z}function h(){return F("extent-keyword",e.extentKeywords,1)}function m(){if(F("position",/^at/,0)){var z=b();return z||n("Missing positioning value"),z}}function b(){var z=S();if(z.x||z.y)return{type:"position",value:z}}function S(){return{x:M(),y:M()}}function C(z){var G=z(),Q=[];if(G)for(Q.push(G);B(e.comma);)G=z(),G?Q.push(G):n("One extra comma");return Q}function $(){var z=x();return z||n("Expected color definition"),z.length=M(),z}function x(){return w()||A()||T()||I()||O()||_()||P()}function P(){return F("literal",e.literalColor,0)}function w(){return F("hex",e.hexColor,1)}function O(){return l(e.rgbColor,function(){return{type:"rgb",value:C(H)}})}function I(){return l(e.rgbaColor,function(){return{type:"rgba",value:C(H)}})}function _(){return l(e.varColor,function(){return{type:"var",value:R()}})}function T(){return l(e.hslColor,function(){var z=B(e.percentageValue);z&&n("HSL hue value must be a number in degrees (0-360) or normalized (-360 to 360), not a percentage");var G=H();B(e.comma);var Q=B(e.percentageValue),Y=Q?Q[1]:null;B(e.comma),Q=B(e.percentageValue);var oe=Q?Q[1]:null;return(!Y||!oe)&&n("Expected percentage value for saturation and lightness in HSL"),{type:"hsl",value:[G,Y,oe]}})}function A(){return l(e.hslaColor,function(){var z=H();B(e.comma);var G=B(e.percentageValue),Q=G?G[1]:null;B(e.comma),G=B(e.percentageValue);var Y=G?G[1]:null;B(e.comma);var oe=H();return(!Q||!Y)&&n("Expected percentage value for saturation and lightness in HSLA"),{type:"hsla",value:[z,Q,Y,oe]}})}function R(){return B(e.variableName)[1]}function H(){return B(e.number)[1]}function M(){return F("%",e.percentageValue,1)||D()||N()||L()}function D(){return F("position-keyword",e.positionKeywords,1)}function N(){return l(e.calcValue,function(){for(var z=1,G=0;z>0&&G0&&n("Missing closing parenthesis in calc() expression");var Y=t.substring(0,G-1);return j(G-1),{type:"calc",value:Y}})}function L(){return F("px",e.pixelValue,1)||F("em",e.emValue,1)}function F(z,G,Q){var Y=B(G);if(Y)return{type:z,value:Y[Q]}}function B(z){var G,Q;return Q=/^[\n\r\t\s]+/.exec(t),Q&&j(Q[0].length),G=z.exec(t),G&&j(G[0].length),G}function j(z){t=t.substr(z)}return function(z){return t=z.toString().trim(),t.endsWith(";")&&(t=t.slice(0,-1)),o()}}();var gCe=hs.parse,hCe=hs.stringify,Do="top",xr="bottom",$r="right",No="left",U$="auto",Nf=[Do,xr,$r,No],Rc="start",nf="end",vCe="clippingParents",uk="viewport",Tu="popper",mCe="reference",u3=Nf.reduce(function(e,t){return e.concat([t+"-"+Rc,t+"-"+nf])},[]),dk=[].concat(Nf,[U$]).reduce(function(e,t){return e.concat([t,t+"-"+Rc,t+"-"+nf])},[]),bCe="beforeRead",yCe="read",SCe="afterRead",CCe="beforeMain",xCe="main",$Ce="afterMain",wCe="beforeWrite",PCe="write",OCe="afterWrite",ICe=[bCe,yCe,SCe,CCe,xCe,$Ce,wCe,PCe,OCe];function bi(e){return e?(e.nodeName||"").toLowerCase():null}function Zo(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jl(e){var t=Zo(e).Element;return e instanceof t||e instanceof Element}function hr(e){var t=Zo(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function G$(e){if(typeof ShadowRoot>"u")return!1;var t=Zo(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function TCe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var o=t.styles[n]||{},r=t.attributes[n]||{},i=t.elements[n];!hr(i)||!bi(i)||(Object.assign(i.style,o),Object.keys(r).forEach(function(a){var l=r[a];l===!1?i.removeAttribute(a):i.setAttribute(a,l===!0?"":l)}))})}function ECe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(o){var r=t.elements[o],i=t.attributes[o]||{},a=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:n[o]),l=a.reduce(function(s,u){return s[u]="",s},{});!hr(r)||!bi(r)||(Object.assign(r.style,l),Object.keys(i).forEach(function(s){r.removeAttribute(s)}))})}}const _Ce={name:"applyStyles",enabled:!0,phase:"write",fn:TCe,effect:ECe,requires:["computeStyles"]};function pi(e){return e.split("-")[0]}var Bl=Math.max,Lh=Math.min,Dc=Math.round;function Z1(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function fk(){return!/^((?!chrome|android).)*safari/i.test(Z1())}function Nc(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var o=e.getBoundingClientRect(),r=1,i=1;t&&hr(e)&&(r=e.offsetWidth>0&&Dc(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Dc(o.height)/e.offsetHeight||1);var a=Jl(e)?Zo(e):window,l=a.visualViewport,s=!fk()&&n,u=(o.left+(s&&l?l.offsetLeft:0))/r,c=(o.top+(s&&l?l.offsetTop:0))/i,d=o.width/r,f=o.height/i;return{width:d,height:f,top:c,right:u+d,bottom:c+f,left:u,x:u,y:c}}function X$(e){var t=Nc(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function pk(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&G$(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function Qi(e){return Zo(e).getComputedStyle(e)}function MCe(e){return["table","td","th"].indexOf(bi(e))>=0}function nl(e){return((Jl(e)?e.ownerDocument:e.document)||window.document).documentElement}function Lm(e){return bi(e)==="html"?e:e.assignedSlot||e.parentNode||(G$(e)?e.host:null)||nl(e)}function d3(e){return!hr(e)||Qi(e).position==="fixed"?null:e.offsetParent}function ACe(e){var t=/firefox/i.test(Z1()),n=/Trident/i.test(Z1());if(n&&hr(e)){var o=Qi(e);if(o.position==="fixed")return null}var r=Lm(e);for(G$(r)&&(r=r.host);hr(r)&&["html","body"].indexOf(bi(r))<0;){var i=Qi(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function kf(e){for(var t=Zo(e),n=d3(e);n&&MCe(n)&&Qi(n).position==="static";)n=d3(n);return n&&(bi(n)==="html"||bi(n)==="body"&&Qi(n).position==="static")?t:n||ACe(e)||t}function Y$(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function gd(e,t,n){return Bl(e,Lh(t,n))}function RCe(e,t,n){var o=gd(e,t,n);return o>n?n:o}function gk(){return{top:0,right:0,bottom:0,left:0}}function hk(e){return Object.assign({},gk(),e)}function vk(e,t){return t.reduce(function(n,o){return n[o]=e,n},{})}var DCe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,hk(typeof t!="number"?t:vk(t,Nf))};function NCe(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,l=pi(n.placement),s=Y$(l),u=[No,$r].indexOf(l)>=0,c=u?"height":"width";if(!(!i||!a)){var d=DCe(r.padding,n),f=X$(i),p=s==="y"?Do:No,v=s==="y"?xr:$r,h=n.rects.reference[c]+n.rects.reference[s]-a[s]-n.rects.popper[c],m=a[s]-n.rects.reference[s],b=kf(i),S=b?s==="y"?b.clientHeight||0:b.clientWidth||0:0,C=h/2-m/2,$=d[p],x=S-f[c]-d[v],P=S/2-f[c]/2+C,w=gd($,P,x),O=s;n.modifiersData[o]=(t={},t[O]=w,t.centerOffset=w-P,t)}}function kCe(e){var t=e.state,n=e.options,o=n.element,r=o===void 0?"[data-popper-arrow]":o;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||pk(t.elements.popper,r)&&(t.elements.arrow=r))}const LCe={name:"arrow",enabled:!0,phase:"main",fn:NCe,effect:kCe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function kc(e){return e.split("-")[1]}var FCe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function BCe(e,t){var n=e.x,o=e.y,r=t.devicePixelRatio||1;return{x:Dc(n*r)/r||0,y:Dc(o*r)/r||0}}function f3(e){var t,n=e.popper,o=e.popperRect,r=e.placement,i=e.variation,a=e.offsets,l=e.position,s=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=a.x,p=f===void 0?0:f,v=a.y,h=v===void 0?0:v,m=typeof c=="function"?c({x:p,y:h}):{x:p,y:h};p=m.x,h=m.y;var b=a.hasOwnProperty("x"),S=a.hasOwnProperty("y"),C=No,$=Do,x=window;if(u){var P=kf(n),w="clientHeight",O="clientWidth";if(P===Zo(n)&&(P=nl(n),Qi(P).position!=="static"&&l==="absolute"&&(w="scrollHeight",O="scrollWidth")),P=P,r===Do||(r===No||r===$r)&&i===nf){$=xr;var I=d&&P===x&&x.visualViewport?x.visualViewport.height:P[w];h-=I-o.height,h*=s?1:-1}if(r===No||(r===Do||r===xr)&&i===nf){C=$r;var _=d&&P===x&&x.visualViewport?x.visualViewport.width:P[O];p-=_-o.width,p*=s?1:-1}}var T=Object.assign({position:l},u&&FCe),A=c===!0?BCe({x:p,y:h},Zo(n)):{x:p,y:h};if(p=A.x,h=A.y,s){var R;return Object.assign({},T,(R={},R[$]=S?"0":"",R[C]=b?"0":"",R.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+h+"px)":"translate3d("+p+"px, "+h+"px, 0)",R))}return Object.assign({},T,(t={},t[$]=S?h+"px":"",t[C]=b?p+"px":"",t.transform="",t))}function HCe(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=o===void 0?!0:o,i=n.adaptive,a=i===void 0?!0:i,l=n.roundOffsets,s=l===void 0?!0:l,u={placement:pi(t.placement),variation:kc(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,f3(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:s})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,f3(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const zCe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:HCe,data:{}};var Tp={passive:!0};function jCe(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,i=r===void 0?!0:r,a=o.resize,l=a===void 0?!0:a,s=Zo(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,Tp)}),l&&s.addEventListener("resize",n.update,Tp),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Tp)}),l&&s.removeEventListener("resize",n.update,Tp)}}const WCe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:jCe,data:{}};var VCe={left:"right",right:"left",bottom:"top",top:"bottom"};function wg(e){return e.replace(/left|right|bottom|top/g,function(t){return VCe[t]})}var KCe={start:"end",end:"start"};function p3(e){return e.replace(/start|end/g,function(t){return KCe[t]})}function q$(e){var t=Zo(e),n=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:n,scrollTop:o}}function J$(e){return Nc(nl(e)).left+q$(e).scrollLeft}function UCe(e,t){var n=Zo(e),o=nl(e),r=n.visualViewport,i=o.clientWidth,a=o.clientHeight,l=0,s=0;if(r){i=r.width,a=r.height;var u=fk();(u||!u&&t==="fixed")&&(l=r.offsetLeft,s=r.offsetTop)}return{width:i,height:a,x:l+J$(e),y:s}}function GCe(e){var t,n=nl(e),o=q$(e),r=(t=e.ownerDocument)==null?void 0:t.body,i=Bl(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Bl(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-o.scrollLeft+J$(e),s=-o.scrollTop;return Qi(r||n).direction==="rtl"&&(l+=Bl(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:l,y:s}}function Z$(e){var t=Qi(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function mk(e){return["html","body","#document"].indexOf(bi(e))>=0?e.ownerDocument.body:hr(e)&&Z$(e)?e:mk(Lm(e))}function hd(e,t){var n;t===void 0&&(t=[]);var o=mk(e),r=o===((n=e.ownerDocument)==null?void 0:n.body),i=Zo(o),a=r?[i].concat(i.visualViewport||[],Z$(o)?o:[]):o,l=t.concat(a);return r?l:l.concat(hd(Lm(a)))}function Q1(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function XCe(e,t){var n=Nc(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function g3(e,t,n){return t===uk?Q1(UCe(e,n)):Jl(t)?XCe(t,n):Q1(GCe(nl(e)))}function YCe(e){var t=hd(Lm(e)),n=["absolute","fixed"].indexOf(Qi(e).position)>=0,o=n&&hr(e)?kf(e):e;return Jl(o)?t.filter(function(r){return Jl(r)&&pk(r,o)&&bi(r)!=="body"}):[]}function qCe(e,t,n,o){var r=t==="clippingParents"?YCe(e):[].concat(t),i=[].concat(r,[n]),a=i[0],l=i.reduce(function(s,u){var c=g3(e,u,o);return s.top=Bl(c.top,s.top),s.right=Lh(c.right,s.right),s.bottom=Lh(c.bottom,s.bottom),s.left=Bl(c.left,s.left),s},g3(e,a,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function bk(e){var t=e.reference,n=e.element,o=e.placement,r=o?pi(o):null,i=o?kc(o):null,a=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,s;switch(r){case Do:s={x:a,y:t.y-n.height};break;case xr:s={x:a,y:t.y+t.height};break;case $r:s={x:t.x+t.width,y:l};break;case No:s={x:t.x-n.width,y:l};break;default:s={x:t.x,y:t.y}}var u=r?Y$(r):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case Rc:s[u]=s[u]-(t[c]/2-n[c]/2);break;case nf:s[u]=s[u]+(t[c]/2-n[c]/2);break}}return s}function of(e,t){t===void 0&&(t={});var n=t,o=n.placement,r=o===void 0?e.placement:o,i=n.strategy,a=i===void 0?e.strategy:i,l=n.boundary,s=l===void 0?vCe:l,u=n.rootBoundary,c=u===void 0?uk:u,d=n.elementContext,f=d===void 0?Tu:d,p=n.altBoundary,v=p===void 0?!1:p,h=n.padding,m=h===void 0?0:h,b=hk(typeof m!="number"?m:vk(m,Nf)),S=f===Tu?mCe:Tu,C=e.rects.popper,$=e.elements[v?S:f],x=qCe(Jl($)?$:$.contextElement||nl(e.elements.popper),s,c,a),P=Nc(e.elements.reference),w=bk({reference:P,element:C,placement:r}),O=Q1(Object.assign({},C,w)),I=f===Tu?O:P,_={top:x.top-I.top+b.top,bottom:I.bottom-x.bottom+b.bottom,left:x.left-I.left+b.left,right:I.right-x.right+b.right},T=e.modifiersData.offset;if(f===Tu&&T){var A=T[r];Object.keys(_).forEach(function(R){var H=[$r,xr].indexOf(R)>=0?1:-1,M=[Do,xr].indexOf(R)>=0?"y":"x";_[R]+=A[M]*H})}return _}function JCe(e,t){t===void 0&&(t={});var n=t,o=n.placement,r=n.boundary,i=n.rootBoundary,a=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,u=s===void 0?dk:s,c=kc(o),d=c?l?u3:u3.filter(function(v){return kc(v)===c}):Nf,f=d.filter(function(v){return u.indexOf(v)>=0});f.length===0&&(f=d);var p=f.reduce(function(v,h){return v[h]=of(e,{placement:h,boundary:r,rootBoundary:i,padding:a})[pi(h)],v},{});return Object.keys(p).sort(function(v,h){return p[v]-p[h]})}function ZCe(e){if(pi(e)===U$)return[];var t=wg(e);return[p3(e),t,p3(t)]}function QCe(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,a=n.altAxis,l=a===void 0?!0:a,s=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,v=p===void 0?!0:p,h=n.allowedAutoPlacements,m=t.options.placement,b=pi(m),S=b===m,C=s||(S||!v?[wg(m)]:ZCe(m)),$=[m].concat(C).reduce(function(Q,Y){return Q.concat(pi(Y)===U$?JCe(t,{placement:Y,boundary:c,rootBoundary:d,padding:u,flipVariations:v,allowedAutoPlacements:h}):Y)},[]),x=t.rects.reference,P=t.rects.popper,w=new Map,O=!0,I=$[0],_=0;_<$.length;_++){var T=$[_],A=pi(T),R=kc(T)===Rc,H=[Do,xr].indexOf(A)>=0,M=H?"width":"height",D=of(t,{placement:T,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),N=H?R?$r:No:R?xr:Do;x[M]>P[M]&&(N=wg(N));var L=wg(N),F=[];if(i&&F.push(D[A]<=0),l&&F.push(D[N]<=0,D[L]<=0),F.every(function(Q){return Q})){I=T,O=!1;break}w.set(T,F)}if(O)for(var B=v?3:1,j=function(Y){var oe=$.find(function(Z){var re=w.get(Z);if(re)return re.slice(0,Y).every(function(ne){return ne})});if(oe)return I=oe,"break"},z=B;z>0;z--){var G=j(z);if(G==="break")break}t.placement!==I&&(t.modifiersData[o]._skip=!0,t.placement=I,t.reset=!0)}}const exe={name:"flip",enabled:!0,phase:"main",fn:QCe,requiresIfExists:["offset"],data:{_skip:!1}};function h3(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function v3(e){return[Do,$r,xr,No].some(function(t){return e[t]>=0})}function txe(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,a=of(t,{elementContext:"reference"}),l=of(t,{altBoundary:!0}),s=h3(a,o),u=h3(l,r,i),c=v3(s),d=v3(u);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const nxe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:txe};function oxe(e,t,n){var o=pi(e),r=[No,Do].indexOf(o)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],l=i[1];return a=a||0,l=(l||0)*r,[No,$r].indexOf(o)>=0?{x:l,y:a}:{x:a,y:l}}function rxe(e){var t=e.state,n=e.options,o=e.name,r=n.offset,i=r===void 0?[0,0]:r,a=dk.reduce(function(c,d){return c[d]=oxe(d,t.rects,i),c},{}),l=a[t.placement],s=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=u),t.modifiersData[o]=a}const ixe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:rxe};function axe(e){var t=e.state,n=e.name;t.modifiersData[n]=bk({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const lxe={name:"popperOffsets",enabled:!0,phase:"read",fn:axe,data:{}};function sxe(e){return e==="x"?"y":"x"}function cxe(e){var t=e.state,n=e.options,o=e.name,r=n.mainAxis,i=r===void 0?!0:r,a=n.altAxis,l=a===void 0?!1:a,s=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,v=n.tetherOffset,h=v===void 0?0:v,m=of(t,{boundary:s,rootBoundary:u,padding:d,altBoundary:c}),b=pi(t.placement),S=kc(t.placement),C=!S,$=Y$(b),x=sxe($),P=t.modifiersData.popperOffsets,w=t.rects.reference,O=t.rects.popper,I=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,_=typeof I=="number"?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,A={x:0,y:0};if(P){if(i){var R,H=$==="y"?Do:No,M=$==="y"?xr:$r,D=$==="y"?"height":"width",N=P[$],L=N+m[H],F=N-m[M],B=p?-O[D]/2:0,j=S===Rc?w[D]:O[D],z=S===Rc?-O[D]:-w[D],G=t.elements.arrow,Q=p&&G?X$(G):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:gk(),oe=Y[H],Z=Y[M],re=gd(0,w[D],Q[D]),ne=C?w[D]/2-B-re-oe-_.mainAxis:j-re-oe-_.mainAxis,X=C?-w[D]/2+B+re+Z+_.mainAxis:z+re+Z+_.mainAxis,te=t.elements.arrow&&kf(t.elements.arrow),W=te?$==="y"?te.clientTop||0:te.clientLeft||0:0,U=(R=T==null?void 0:T[$])!=null?R:0,J=N+ne-U-W,de=N+X-U,fe=gd(p?Lh(L,J):L,N,p?Bl(F,de):F);P[$]=fe,A[$]=fe-N}if(l){var pe,ve=$==="x"?Do:No,he=$==="x"?xr:$r,V=P[x],q=x==="y"?"height":"width",ie=V+m[ve],me=V-m[he],Se=[Do,No].indexOf(b)!==-1,ce=(pe=T==null?void 0:T[x])!=null?pe:0,ee=Se?ie:V-w[q]-O[q]-ce+_.altAxis,ue=Se?V+w[q]+O[q]-ce-_.altAxis:me,xe=p&&Se?RCe(ee,V,ue):gd(p?ee:ie,V,p?ue:me);P[x]=xe,A[x]=xe-V}t.modifiersData[o]=A}}const uxe={name:"preventOverflow",enabled:!0,phase:"main",fn:cxe,requiresIfExists:["offset"]};function dxe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function fxe(e){return e===Zo(e)||!hr(e)?q$(e):dxe(e)}function pxe(e){var t=e.getBoundingClientRect(),n=Dc(t.width)/e.offsetWidth||1,o=Dc(t.height)/e.offsetHeight||1;return n!==1||o!==1}function gxe(e,t,n){n===void 0&&(n=!1);var o=hr(t),r=hr(t)&&pxe(t),i=nl(t),a=Nc(e,r,n),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(o||!o&&!n)&&((bi(t)!=="body"||Z$(i))&&(l=fxe(t)),hr(t)?(s=Nc(t,!0),s.x+=t.clientLeft,s.y+=t.clientTop):i&&(s.x=J$(i))),{x:a.left+l.scrollLeft-s.x,y:a.top+l.scrollTop-s.y,width:a.width,height:a.height}}function hxe(e){var t=new Map,n=new Set,o=[];e.forEach(function(i){t.set(i.name,i)});function r(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(l){if(!n.has(l)){var s=t.get(l);s&&r(s)}}),o.push(i)}return e.forEach(function(i){n.has(i.name)||r(i)}),o}function vxe(e){var t=hxe(e);return ICe.reduce(function(n,o){return n.concat(t.filter(function(r){return r.phase===o}))},[])}function mxe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function bxe(e){var t=e.reduce(function(n,o){var r=n[o.name];return n[o.name]=r?Object.assign({},r,o,{options:Object.assign({},r.options,o.options),data:Object.assign({},r.data,o.data)}):o,n},{});return Object.keys(t).map(function(n){return t[n]})}var m3={placement:"bottom",modifiers:[],strategy:"absolute"};function b3(){for(var e=arguments.length,t=new Array(e),n=0;n{localStorage.setItem(ek,e),nk.global.locale.value=e,tk.locale=e,console.log(`Successfully switched frontend language to: ${e}`)},lOe=async e=>{await $Se(e);try{const t=await fetch("/api/agent-management/initialize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({language:e})});if(t.ok){const n=await t.json();console.log(`Successfully initialized agents with language: ${e}`,n)}else{const n=await t.json();throw console.error(`Failed to initialize agents with language: ${e}`,n),new Error(n.error||"Failed to initialize agents")}}catch(t){throw console.error("Error initializing agents during language change:",t),t}};function ok(e){return Qh()?(pS(e),!0):!1}function ql(e){return typeof e=="function"?e():Bt(e)}const Dm=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const wSe=Object.prototype.toString,PSe=e=>wSe.call(e)==="[object Object]",fc=()=>{},OSe=ISe();function ISe(){var e,t;return Dm&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function rk(e,t){function n(...o){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(r).catch(i)})}return n}const ik=e=>e();function TSe(e,t={}){let n,o,r=fc;const i=l=>{clearTimeout(l),r(),r=fc};return l=>{const s=ql(e),u=ql(t.maxWait);return n&&i(n),s<=0||u!==void 0&&u<=0?(o&&(i(o),o=null),Promise.resolve(l())):new Promise((c,d)=>{r=t.rejectOnCancel?d:c,u&&!o&&(o=setTimeout(()=>{n&&i(n),o=null,c(l())},u)),n=setTimeout(()=>{o&&i(o),o=null,c(l())},s)})}}function ESe(e=ik){const t=ae(!0);function n(){t.value=!1}function o(){t.value=!0}const r=(...i)=>{t.value&&e(...i)};return{isActive:tv(t),pause:n,resume:o,eventFilter:r}}function _Se(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const o=t;t=void 0,o&&await o},n}function MSe(e){return Jt()}function Ui(e,t=200,n={}){return rk(TSe(t,n),e)}function ASe(e,t,n={}){const{eventFilter:o=ik,...r}=n;return be(e,rk(o,t),r)}function RSe(e,t,n={}){const{eventFilter:o,...r}=n,{eventFilter:i,pause:a,resume:l,isActive:s}=ESe(o);return{stop:ASe(e,t,{...r,eventFilter:i}),pause:a,resume:l,isActive:s}}function gs(e,t=!0,n){MSe()?Ke(e,n):t?e():ot(e)}function DSe(e,t,n={}){const{immediate:o=!0}=n,r=ae(!1);let i=null;function a(){i&&(clearTimeout(i),i=null)}function l(){r.value=!1,a()}function s(...u){a(),r.value=!0,i=setTimeout(()=>{r.value=!1,i=null,e(...u)},ql(t))}return o&&(r.value=!0,Dm&&s()),ok(l),{isPending:tv(r),start:s,stop:l}}function io(e,t,n){const o=be(e,(r,i,a)=>{r&&(n!=null&&n.once&&ot(()=>o()),t(r,i,a))},{...n,once:!1});return o}function Fu(e){var t;const n=ql(e);return(t=n==null?void 0:n.$el)!=null?t:n}const tf=Dm?window:void 0,ak=Dm?window.navigator:void 0;function Fl(...e){let t,n,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,r]=e,t=tf):[t,n,o,r]=e,!t)return fc;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const i=[],a=()=>{i.forEach(c=>c()),i.length=0},l=(c,d,f,p)=>(c.addEventListener(d,f,p),()=>c.removeEventListener(d,f,p)),s=be(()=>[Fu(t),ql(r)],([c,d])=>{if(a(),!c)return;const f=PSe(d)?{...d}:d;i.push(...n.flatMap(p=>o.map(v=>l(c,p,v,f))))},{immediate:!0,flush:"post"}),u=()=>{s(),a()};return ok(u),u}let t3=!1;function NSe(e,t,n={}){const{window:o=tf,ignore:r=[],capture:i=!0,detectIframe:a=!1}=n;if(!o)return fc;OSe&&!t3&&(t3=!0,Array.from(o.document.body.children).forEach(f=>f.addEventListener("click",fc)),o.document.documentElement.addEventListener("click",fc));let l=!0;const s=f=>r.some(p=>{if(typeof p=="string")return Array.from(o.document.querySelectorAll(p)).some(v=>v===f.target||f.composedPath().includes(v));{const v=Fu(p);return v&&(f.target===v||f.composedPath().includes(v))}}),c=[Fl(o,"click",f=>{const p=Fu(e);if(!(!p||p===f.target||f.composedPath().includes(p))){if(f.detail===0&&(l=!s(f)),!l){l=!0;return}t(f)}},{passive:!0,capture:i}),Fl(o,"pointerdown",f=>{const p=Fu(e);l=!s(f)&&!!(p&&!f.composedPath().includes(p))},{passive:!0}),a&&Fl(o,"blur",f=>{setTimeout(()=>{var p;const v=Fu(e);((p=o.document.activeElement)==null?void 0:p.tagName)==="IFRAME"&&!(v!=null&&v.contains(o.document.activeElement))&&t(f)},0)})].filter(Boolean);return()=>c.forEach(f=>f())}function kSe(){const e=ae(!1),t=Jt();return t&&Ke(()=>{e.value=!0},t),e}function lk(e){const t=kSe();return E(()=>(t.value,!!e()))}function n3(e,t={}){const{controls:n=!1,navigator:o=ak}=t,r=lk(()=>o&&"permissions"in o);let i;const a=typeof e=="string"?{name:e}:e,l=ae(),s=()=>{i&&(l.value=i.state)},u=_Se(async()=>{if(r.value){if(!i)try{i=await o.permissions.query(a),Fl(i,"change",s),s()}catch{l.value="prompt"}return i}});return u(),n?{state:l,isSupported:r,query:u}:l}function LSe(e={}){const{navigator:t=ak,read:n=!1,source:o,copiedDuring:r=1500,legacy:i=!1}=e,a=lk(()=>t&&"clipboard"in t),l=n3("clipboard-read"),s=n3("clipboard-write"),u=E(()=>a.value||i),c=ae(""),d=ae(!1),f=DSe(()=>d.value=!1,r);function p(){a.value&&b(l.value)?t.clipboard.readText().then(S=>{c.value=S}):c.value=m()}u.value&&n&&Fl(["copy","cut"],p);async function v(S=ql(o)){u.value&&S!=null&&(a.value&&b(s.value)?await t.clipboard.writeText(S):h(S),c.value=S,d.value=!0,f.start())}function h(S){const C=document.createElement("textarea");C.value=S??"",C.style.position="absolute",C.style.opacity="0",document.body.appendChild(C),C.select(),document.execCommand("copy"),C.remove()}function m(){var S,C,$;return($=(C=(S=document==null?void 0:document.getSelection)==null?void 0:S.call(document))==null?void 0:C.toString())!=null?$:""}function b(S){return S==="granted"||S==="prompt"}return{isSupported:u,text:c,copied:d,copy:v}}const Op=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ip="__vueuse_ssr_handlers__",FSe=BSe();function BSe(){return Ip in Op||(Op[Ip]=Op[Ip]||{}),Op[Ip]}function HSe(e,t){return FSe[e]||t}function zSe(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const jSe={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},o3="vueuse-storage";function WSe(e,t,n,o={}){var r;const{flush:i="pre",deep:a=!0,listenToStorageChanges:l=!0,writeDefaults:s=!0,mergeDefaults:u=!1,shallow:c,window:d=tf,eventFilter:f,onError:p=_=>{console.error(_)},initOnMounted:v}=o,h=(c?se:ae)(typeof t=="function"?t():t);if(!n)try{n=HSe("getDefaultStorage",()=>{var _;return(_=tf)==null?void 0:_.localStorage})()}catch(_){p(_)}if(!n)return h;const m=ql(t),b=zSe(m),S=(r=o.serializer)!=null?r:jSe[b],{pause:C,resume:$}=RSe(h,()=>P(h.value),{flush:i,deep:a,eventFilter:f});d&&l&&gs(()=>{Fl(d,"storage",O),Fl(d,o3,I),v&&O()}),v||O();function x(_,T){d&&d.dispatchEvent(new CustomEvent(o3,{detail:{key:e,oldValue:_,newValue:T,storageArea:n}}))}function P(_){try{const T=n.getItem(e);if(_==null)x(T,null),n.removeItem(e);else{const A=S.write(_);T!==A&&(n.setItem(e,A),x(T,A))}}catch(T){p(T)}}function w(_){const T=_?_.newValue:n.getItem(e);if(T==null)return s&&m!=null&&n.setItem(e,S.write(m)),m;if(!_&&u){const A=S.read(T);return typeof u=="function"?u(A,m):b==="object"&&!Array.isArray(A)?{...m,...A}:A}else return typeof T!="string"?T:S.read(T)}function O(_){if(!(_&&_.storageArea!==n)){if(_&&_.key==null){h.value=m;return}if(!(_&&_.key!==e)){C();try{(_==null?void 0:_.newValue)!==S.write(h.value)&&(h.value=w(_))}catch(T){p(T)}finally{_?ot($):$()}}}}function I(_){O(_.detail)}return h}function K$(e,t,n={}){const{window:o=tf}=n;return WSe(e,t,o==null?void 0:o.localStorage,n)}function Nh(e){"@babel/helpers - typeof";return Nh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nh(e)}var VSe=/^\s+/,KSe=/\s+$/;function ke(e,t){if(e=e||"",t=t||{},e instanceof ke)return e;if(!(this instanceof ke))return new ke(e,t);var n=USe(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}ke.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,o,r,i,a,l;return n=t.r/255,o=t.g/255,r=t.b/255,n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),r<=.03928?l=r/12.92:l=Math.pow((r+.055)/1.055,2.4),.2126*i+.7152*a+.0722*l},setAlpha:function(t){return this._a=sk(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=i3(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i3(this._r,this._g,this._b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+o+"%, "+r+"%)":"hsva("+n+", "+o+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=r3(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=r3(this._r,this._g,this._b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+o+"%, "+r+"%)":"hsla("+n+", "+o+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return a3(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return qSe(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Zt(this._r,255)*100)+"%",g:Math.round(Zt(this._g,255)*100)+"%",b:Math.round(Zt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Zt(this._r,255)*100)+"%, "+Math.round(Zt(this._g,255)*100)+"%, "+Math.round(Zt(this._b,255)*100)+"%)":"rgba("+Math.round(Zt(this._r,255)*100)+"%, "+Math.round(Zt(this._g,255)*100)+"%, "+Math.round(Zt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:sCe[a3(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+l3(this._r,this._g,this._b,this._a),o=n,r=this._gradientType?"GradientType = 1, ":"";if(t){var i=ke(t);o="#"+l3(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+n+",endColorstr="+o+")"},toString:function(t){var n=!!t;t=t||this._format;var o=!1,r=this._a<1&&this._a>=0,i=!n&&r&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return i?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(o=this.toRgbString()),t==="prgb"&&(o=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(o=this.toHexString()),t==="hex3"&&(o=this.toHexString(!0)),t==="hex4"&&(o=this.toHex8String(!0)),t==="hex8"&&(o=this.toHex8String()),t==="name"&&(o=this.toName()),t==="hsl"&&(o=this.toHslString()),t==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},clone:function(){return ke(this.toString())},_applyModification:function(t,n){var o=t.apply(null,[this].concat([].slice.call(n)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(eCe,arguments)},brighten:function(){return this._applyModification(tCe,arguments)},darken:function(){return this._applyModification(nCe,arguments)},desaturate:function(){return this._applyModification(JSe,arguments)},saturate:function(){return this._applyModification(ZSe,arguments)},greyscale:function(){return this._applyModification(QSe,arguments)},spin:function(){return this._applyModification(oCe,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(aCe,arguments)},complement:function(){return this._applyCombination(rCe,arguments)},monochromatic:function(){return this._applyCombination(lCe,arguments)},splitcomplement:function(){return this._applyCombination(iCe,arguments)},triad:function(){return this._applyCombination(s3,[3])},tetrad:function(){return this._applyCombination(s3,[4])}};ke.fromRatio=function(e,t){if(Nh(e)=="object"){var n={};for(var o in e)e.hasOwnProperty(o)&&(o==="a"?n[o]=e[o]:n[o]=Bu(e[o]));e=n}return ke(e,t)};function USe(e){var t={r:0,g:0,b:0},n=1,o=null,r=null,i=null,a=!1,l=!1;return typeof e=="string"&&(e=fCe(e)),Nh(e)=="object"&&(Ti(e.r)&&Ti(e.g)&&Ti(e.b)?(t=GSe(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ti(e.h)&&Ti(e.s)&&Ti(e.v)?(o=Bu(e.s),r=Bu(e.v),t=YSe(e.h,o,r),a=!0,l="hsv"):Ti(e.h)&&Ti(e.s)&&Ti(e.l)&&(o=Bu(e.s),i=Bu(e.l),t=XSe(e.h,o,i),a=!0,l="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=sk(n),{ok:a,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function GSe(e,t,n){return{r:Zt(e,255)*255,g:Zt(t,255)*255,b:Zt(n,255)*255}}function r3(e,t,n){e=Zt(e,255),t=Zt(t,255),n=Zt(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i,a,l=(o+r)/2;if(o==r)i=a=0;else{var s=o-r;switch(a=l>.5?s/(2-o-r):s/(o+r),o){case e:i=(t-n)/s+(t1&&(d-=1),d<1/6?u+(c-u)*6*d:d<1/2?c:d<2/3?u+(c-u)*(2/3-d)*6:u}if(t===0)o=r=i=n;else{var l=n<.5?n*(1+t):n+t-n*t,s=2*n-l;o=a(s,l,e+1/3),r=a(s,l,e),i=a(s,l,e-1/3)}return{r:o*255,g:r*255,b:i*255}}function i3(e,t,n){e=Zt(e,255),t=Zt(t,255),n=Zt(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i,a,l=o,s=o-r;if(a=o===0?0:s/o,o==r)i=0;else{switch(o){case e:i=(t-n)/s+(t>1)+720)%360;--t;)o.h=(o.h+r)%360,i.push(ke(o));return i}function lCe(e,t){t=t||6;for(var n=ke(e).toHsv(),o=n.h,r=n.s,i=n.v,a=[],l=1/t;t--;)a.push(ke({h:o,s:r,v:i})),i=(i+l)%1;return a}ke.mix=function(e,t,n){n=n===0?0:n||50;var o=ke(e).toRgb(),r=ke(t).toRgb(),i=n/100,a={r:(r.r-o.r)*i+o.r,g:(r.g-o.g)*i+o.g,b:(r.b-o.b)*i+o.b,a:(r.a-o.a)*i+o.a};return ke(a)};ke.readability=function(e,t){var n=ke(e),o=ke(t);return(Math.max(n.getLuminance(),o.getLuminance())+.05)/(Math.min(n.getLuminance(),o.getLuminance())+.05)};ke.isReadable=function(e,t,n){var o=ke.readability(e,t),r,i;switch(i=!1,r=pCe(n),r.level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7;break}return i};ke.mostReadable=function(e,t,n){var o=null,r=0,i,a,l,s;n=n||{},a=n.includeFallbackColors,l=n.level,s=n.size;for(var u=0;ur&&(r=i,o=ke(t[u]));return ke.isReadable(e,o,{level:l,size:s})||!a?o:(n.includeFallbackColors=!1,ke.mostReadable(e,["#fff","#000"],n))};var J1=ke.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},sCe=ke.hexNames=cCe(J1);function cCe(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function sk(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Zt(e,t){uCe(e)&&(e="100%");var n=dCe(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Nm(e){return Math.min(1,Math.max(0,e))}function Wo(e){return parseInt(e,16)}function uCe(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function dCe(e){return typeof e=="string"&&e.indexOf("%")!=-1}function kr(e){return e.length==1?"0"+e:""+e}function Bu(e){return e<=1&&(e=e*100+"%"),e}function ck(e){return Math.round(parseFloat(e)*255).toString(16)}function c3(e){return Wo(e)/255}var Ar=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+o),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+o),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+o),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Ti(e){return!!Ar.CSS_UNIT.exec(e)}function fCe(e){e=e.replace(VSe,"").replace(KSe,"").toLowerCase();var t=!1;if(J1[e])e=J1[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Ar.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Ar.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Ar.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Ar.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Ar.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Ar.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Ar.hex8.exec(e))?{r:Wo(n[1]),g:Wo(n[2]),b:Wo(n[3]),a:c3(n[4]),format:t?"name":"hex8"}:(n=Ar.hex6.exec(e))?{r:Wo(n[1]),g:Wo(n[2]),b:Wo(n[3]),format:t?"name":"hex"}:(n=Ar.hex4.exec(e))?{r:Wo(n[1]+""+n[1]),g:Wo(n[2]+""+n[2]),b:Wo(n[3]+""+n[3]),a:c3(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Ar.hex3.exec(e))?{r:Wo(n[1]+""+n[1]),g:Wo(n[2]+""+n[2]),b:Wo(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function pCe(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}var hs=hs||{};hs.stringify=function(){var e={"visit_linear-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return e.visit_gradient(t)},"visit_radial-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return e.visit_gradient(t)},visit_gradient:function(t){var n=e.visit(t.orientation);return n&&(n+=", "),t.type+"("+n+e.visit(t.colorStops)+")"},visit_shape:function(t){var n=t.value,o=e.visit(t.at),r=e.visit(t.style);return r&&(n+=" "+r),o&&(n+=" at "+o),n},"visit_default-radial":function(t){var n="",o=e.visit(t.at);return o&&(n+=o),n},"visit_extent-keyword":function(t){var n=t.value,o=e.visit(t.at);return o&&(n+=" at "+o),n},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return e.visit(t.value.x)+" "+e.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_calc:function(t){return"calc("+t.value+")"},visit_literal:function(t){return e.visit_color(t.value,t)},visit_hex:function(t){return e.visit_color("#"+t.value,t)},visit_rgb:function(t){return e.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return e.visit_color("rgba("+t.value.join(", ")+")",t)},visit_hsl:function(t){return e.visit_color("hsl("+t.value[0]+", "+t.value[1]+"%, "+t.value[2]+"%)",t)},visit_hsla:function(t){return e.visit_color("hsla("+t.value[0]+", "+t.value[1]+"%, "+t.value[2]+"%, "+t.value[3]+")",t)},visit_var:function(t){return e.visit_color("var("+t.value+")",t)},visit_color:function(t,n){var o=t,r=e.visit(n.length);return r&&(o+=" "+r),o},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var n="",o=t.length;return t.forEach(function(r,i){n+=e.visit(r),i0&&n("Invalid input not EOF"),z}function r(){return C(i)}function i(){return a("linear-gradient",e.linearGradient,s)||a("repeating-linear-gradient",e.repeatingLinearGradient,s)||a("radial-gradient",e.radialGradient,d)||a("repeating-radial-gradient",e.repeatingRadialGradient,d)}function a(z,G,Q){return l(G,function(Y){var oe=Q();return oe&&(B(e.comma)||n("Missing comma before color stops")),{type:z,orientation:oe,colorStops:C($)}})}function l(z,G){var Q=B(z);if(Q){B(e.startCall)||n("Missing (");var Y=G(Q);return B(e.endCall)||n("Missing )"),Y}}function s(){var z=u();if(z)return z;var G=F("position-keyword",e.positionKeywords,1);return G?{type:"directional",value:G.value}:c()}function u(){return F("directional",e.sideOrCorner,1)}function c(){return F("angular",e.angleValue,1)||F("angular",e.radianValue,1)}function d(){var z,G=f(),Q;return G&&(z=[],z.push(G),Q=t,B(e.comma)&&(G=f(),G?z.push(G):t=Q)),z}function f(){var z=p()||v();if(z)z.at=m();else{var G=h();if(G){z=G;var Q=m();Q&&(z.at=Q)}else{var Y=m();if(Y)z={type:"default-radial",at:Y};else{var oe=b();oe&&(z={type:"default-radial",at:oe})}}}return z}function p(){var z=F("shape",/^(circle)/i,0);return z&&(z.style=L()||h()),z}function v(){var z=F("shape",/^(ellipse)/i,0);return z&&(z.style=b()||M()||h()),z}function h(){return F("extent-keyword",e.extentKeywords,1)}function m(){if(F("position",/^at/,0)){var z=b();return z||n("Missing positioning value"),z}}function b(){var z=S();if(z.x||z.y)return{type:"position",value:z}}function S(){return{x:M(),y:M()}}function C(z){var G=z(),Q=[];if(G)for(Q.push(G);B(e.comma);)G=z(),G?Q.push(G):n("One extra comma");return Q}function $(){var z=x();return z||n("Expected color definition"),z.length=M(),z}function x(){return w()||A()||T()||I()||O()||_()||P()}function P(){return F("literal",e.literalColor,0)}function w(){return F("hex",e.hexColor,1)}function O(){return l(e.rgbColor,function(){return{type:"rgb",value:C(H)}})}function I(){return l(e.rgbaColor,function(){return{type:"rgba",value:C(H)}})}function _(){return l(e.varColor,function(){return{type:"var",value:R()}})}function T(){return l(e.hslColor,function(){var z=B(e.percentageValue);z&&n("HSL hue value must be a number in degrees (0-360) or normalized (-360 to 360), not a percentage");var G=H();B(e.comma);var Q=B(e.percentageValue),Y=Q?Q[1]:null;B(e.comma),Q=B(e.percentageValue);var oe=Q?Q[1]:null;return(!Y||!oe)&&n("Expected percentage value for saturation and lightness in HSL"),{type:"hsl",value:[G,Y,oe]}})}function A(){return l(e.hslaColor,function(){var z=H();B(e.comma);var G=B(e.percentageValue),Q=G?G[1]:null;B(e.comma),G=B(e.percentageValue);var Y=G?G[1]:null;B(e.comma);var oe=H();return(!Q||!Y)&&n("Expected percentage value for saturation and lightness in HSLA"),{type:"hsla",value:[z,Q,Y,oe]}})}function R(){return B(e.variableName)[1]}function H(){return B(e.number)[1]}function M(){return F("%",e.percentageValue,1)||D()||N()||L()}function D(){return F("position-keyword",e.positionKeywords,1)}function N(){return l(e.calcValue,function(){for(var z=1,G=0;z>0&&G0&&n("Missing closing parenthesis in calc() expression");var Y=t.substring(0,G-1);return j(G-1),{type:"calc",value:Y}})}function L(){return F("px",e.pixelValue,1)||F("em",e.emValue,1)}function F(z,G,Q){var Y=B(G);if(Y)return{type:z,value:Y[Q]}}function B(z){var G,Q;return Q=/^[\n\r\t\s]+/.exec(t),Q&&j(Q[0].length),G=z.exec(t),G&&j(G[0].length),G}function j(z){t=t.substr(z)}return function(z){return t=z.toString().trim(),t.endsWith(";")&&(t=t.slice(0,-1)),o()}}();var gCe=hs.parse,hCe=hs.stringify,Do="top",xr="bottom",$r="right",No="left",U$="auto",Nf=[Do,xr,$r,No],Rc="start",nf="end",vCe="clippingParents",uk="viewport",Tu="popper",mCe="reference",u3=Nf.reduce(function(e,t){return e.concat([t+"-"+Rc,t+"-"+nf])},[]),dk=[].concat(Nf,[U$]).reduce(function(e,t){return e.concat([t,t+"-"+Rc,t+"-"+nf])},[]),bCe="beforeRead",yCe="read",SCe="afterRead",CCe="beforeMain",xCe="main",$Ce="afterMain",wCe="beforeWrite",PCe="write",OCe="afterWrite",ICe=[bCe,yCe,SCe,CCe,xCe,$Ce,wCe,PCe,OCe];function bi(e){return e?(e.nodeName||"").toLowerCase():null}function Zo(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jl(e){var t=Zo(e).Element;return e instanceof t||e instanceof Element}function hr(e){var t=Zo(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function G$(e){if(typeof ShadowRoot>"u")return!1;var t=Zo(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function TCe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var o=t.styles[n]||{},r=t.attributes[n]||{},i=t.elements[n];!hr(i)||!bi(i)||(Object.assign(i.style,o),Object.keys(r).forEach(function(a){var l=r[a];l===!1?i.removeAttribute(a):i.setAttribute(a,l===!0?"":l)}))})}function ECe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(o){var r=t.elements[o],i=t.attributes[o]||{},a=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:n[o]),l=a.reduce(function(s,u){return s[u]="",s},{});!hr(r)||!bi(r)||(Object.assign(r.style,l),Object.keys(i).forEach(function(s){r.removeAttribute(s)}))})}}const _Ce={name:"applyStyles",enabled:!0,phase:"write",fn:TCe,effect:ECe,requires:["computeStyles"]};function pi(e){return e.split("-")[0]}var Bl=Math.max,kh=Math.min,Dc=Math.round;function Z1(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function fk(){return!/^((?!chrome|android).)*safari/i.test(Z1())}function Nc(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var o=e.getBoundingClientRect(),r=1,i=1;t&&hr(e)&&(r=e.offsetWidth>0&&Dc(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Dc(o.height)/e.offsetHeight||1);var a=Jl(e)?Zo(e):window,l=a.visualViewport,s=!fk()&&n,u=(o.left+(s&&l?l.offsetLeft:0))/r,c=(o.top+(s&&l?l.offsetTop:0))/i,d=o.width/r,f=o.height/i;return{width:d,height:f,top:c,right:u+d,bottom:c+f,left:u,x:u,y:c}}function X$(e){var t=Nc(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function pk(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&G$(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function Qi(e){return Zo(e).getComputedStyle(e)}function MCe(e){return["table","td","th"].indexOf(bi(e))>=0}function nl(e){return((Jl(e)?e.ownerDocument:e.document)||window.document).documentElement}function km(e){return bi(e)==="html"?e:e.assignedSlot||e.parentNode||(G$(e)?e.host:null)||nl(e)}function d3(e){return!hr(e)||Qi(e).position==="fixed"?null:e.offsetParent}function ACe(e){var t=/firefox/i.test(Z1()),n=/Trident/i.test(Z1());if(n&&hr(e)){var o=Qi(e);if(o.position==="fixed")return null}var r=km(e);for(G$(r)&&(r=r.host);hr(r)&&["html","body"].indexOf(bi(r))<0;){var i=Qi(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function kf(e){for(var t=Zo(e),n=d3(e);n&&MCe(n)&&Qi(n).position==="static";)n=d3(n);return n&&(bi(n)==="html"||bi(n)==="body"&&Qi(n).position==="static")?t:n||ACe(e)||t}function Y$(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function gd(e,t,n){return Bl(e,kh(t,n))}function RCe(e,t,n){var o=gd(e,t,n);return o>n?n:o}function gk(){return{top:0,right:0,bottom:0,left:0}}function hk(e){return Object.assign({},gk(),e)}function vk(e,t){return t.reduce(function(n,o){return n[o]=e,n},{})}var DCe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,hk(typeof t!="number"?t:vk(t,Nf))};function NCe(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,l=pi(n.placement),s=Y$(l),u=[No,$r].indexOf(l)>=0,c=u?"height":"width";if(!(!i||!a)){var d=DCe(r.padding,n),f=X$(i),p=s==="y"?Do:No,v=s==="y"?xr:$r,h=n.rects.reference[c]+n.rects.reference[s]-a[s]-n.rects.popper[c],m=a[s]-n.rects.reference[s],b=kf(i),S=b?s==="y"?b.clientHeight||0:b.clientWidth||0:0,C=h/2-m/2,$=d[p],x=S-f[c]-d[v],P=S/2-f[c]/2+C,w=gd($,P,x),O=s;n.modifiersData[o]=(t={},t[O]=w,t.centerOffset=w-P,t)}}function kCe(e){var t=e.state,n=e.options,o=n.element,r=o===void 0?"[data-popper-arrow]":o;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||pk(t.elements.popper,r)&&(t.elements.arrow=r))}const LCe={name:"arrow",enabled:!0,phase:"main",fn:NCe,effect:kCe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function kc(e){return e.split("-")[1]}var FCe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function BCe(e,t){var n=e.x,o=e.y,r=t.devicePixelRatio||1;return{x:Dc(n*r)/r||0,y:Dc(o*r)/r||0}}function f3(e){var t,n=e.popper,o=e.popperRect,r=e.placement,i=e.variation,a=e.offsets,l=e.position,s=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=a.x,p=f===void 0?0:f,v=a.y,h=v===void 0?0:v,m=typeof c=="function"?c({x:p,y:h}):{x:p,y:h};p=m.x,h=m.y;var b=a.hasOwnProperty("x"),S=a.hasOwnProperty("y"),C=No,$=Do,x=window;if(u){var P=kf(n),w="clientHeight",O="clientWidth";if(P===Zo(n)&&(P=nl(n),Qi(P).position!=="static"&&l==="absolute"&&(w="scrollHeight",O="scrollWidth")),P=P,r===Do||(r===No||r===$r)&&i===nf){$=xr;var I=d&&P===x&&x.visualViewport?x.visualViewport.height:P[w];h-=I-o.height,h*=s?1:-1}if(r===No||(r===Do||r===xr)&&i===nf){C=$r;var _=d&&P===x&&x.visualViewport?x.visualViewport.width:P[O];p-=_-o.width,p*=s?1:-1}}var T=Object.assign({position:l},u&&FCe),A=c===!0?BCe({x:p,y:h},Zo(n)):{x:p,y:h};if(p=A.x,h=A.y,s){var R;return Object.assign({},T,(R={},R[$]=S?"0":"",R[C]=b?"0":"",R.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+h+"px)":"translate3d("+p+"px, "+h+"px, 0)",R))}return Object.assign({},T,(t={},t[$]=S?h+"px":"",t[C]=b?p+"px":"",t.transform="",t))}function HCe(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=o===void 0?!0:o,i=n.adaptive,a=i===void 0?!0:i,l=n.roundOffsets,s=l===void 0?!0:l,u={placement:pi(t.placement),variation:kc(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,f3(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:s})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,f3(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const zCe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:HCe,data:{}};var Tp={passive:!0};function jCe(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,i=r===void 0?!0:r,a=o.resize,l=a===void 0?!0:a,s=Zo(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,Tp)}),l&&s.addEventListener("resize",n.update,Tp),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Tp)}),l&&s.removeEventListener("resize",n.update,Tp)}}const WCe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:jCe,data:{}};var VCe={left:"right",right:"left",bottom:"top",top:"bottom"};function $g(e){return e.replace(/left|right|bottom|top/g,function(t){return VCe[t]})}var KCe={start:"end",end:"start"};function p3(e){return e.replace(/start|end/g,function(t){return KCe[t]})}function q$(e){var t=Zo(e),n=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:n,scrollTop:o}}function J$(e){return Nc(nl(e)).left+q$(e).scrollLeft}function UCe(e,t){var n=Zo(e),o=nl(e),r=n.visualViewport,i=o.clientWidth,a=o.clientHeight,l=0,s=0;if(r){i=r.width,a=r.height;var u=fk();(u||!u&&t==="fixed")&&(l=r.offsetLeft,s=r.offsetTop)}return{width:i,height:a,x:l+J$(e),y:s}}function GCe(e){var t,n=nl(e),o=q$(e),r=(t=e.ownerDocument)==null?void 0:t.body,i=Bl(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Bl(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-o.scrollLeft+J$(e),s=-o.scrollTop;return Qi(r||n).direction==="rtl"&&(l+=Bl(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:l,y:s}}function Z$(e){var t=Qi(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function mk(e){return["html","body","#document"].indexOf(bi(e))>=0?e.ownerDocument.body:hr(e)&&Z$(e)?e:mk(km(e))}function hd(e,t){var n;t===void 0&&(t=[]);var o=mk(e),r=o===((n=e.ownerDocument)==null?void 0:n.body),i=Zo(o),a=r?[i].concat(i.visualViewport||[],Z$(o)?o:[]):o,l=t.concat(a);return r?l:l.concat(hd(km(a)))}function Q1(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function XCe(e,t){var n=Nc(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function g3(e,t,n){return t===uk?Q1(UCe(e,n)):Jl(t)?XCe(t,n):Q1(GCe(nl(e)))}function YCe(e){var t=hd(km(e)),n=["absolute","fixed"].indexOf(Qi(e).position)>=0,o=n&&hr(e)?kf(e):e;return Jl(o)?t.filter(function(r){return Jl(r)&&pk(r,o)&&bi(r)!=="body"}):[]}function qCe(e,t,n,o){var r=t==="clippingParents"?YCe(e):[].concat(t),i=[].concat(r,[n]),a=i[0],l=i.reduce(function(s,u){var c=g3(e,u,o);return s.top=Bl(c.top,s.top),s.right=kh(c.right,s.right),s.bottom=kh(c.bottom,s.bottom),s.left=Bl(c.left,s.left),s},g3(e,a,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function bk(e){var t=e.reference,n=e.element,o=e.placement,r=o?pi(o):null,i=o?kc(o):null,a=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,s;switch(r){case Do:s={x:a,y:t.y-n.height};break;case xr:s={x:a,y:t.y+t.height};break;case $r:s={x:t.x+t.width,y:l};break;case No:s={x:t.x-n.width,y:l};break;default:s={x:t.x,y:t.y}}var u=r?Y$(r):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case Rc:s[u]=s[u]-(t[c]/2-n[c]/2);break;case nf:s[u]=s[u]+(t[c]/2-n[c]/2);break}}return s}function of(e,t){t===void 0&&(t={});var n=t,o=n.placement,r=o===void 0?e.placement:o,i=n.strategy,a=i===void 0?e.strategy:i,l=n.boundary,s=l===void 0?vCe:l,u=n.rootBoundary,c=u===void 0?uk:u,d=n.elementContext,f=d===void 0?Tu:d,p=n.altBoundary,v=p===void 0?!1:p,h=n.padding,m=h===void 0?0:h,b=hk(typeof m!="number"?m:vk(m,Nf)),S=f===Tu?mCe:Tu,C=e.rects.popper,$=e.elements[v?S:f],x=qCe(Jl($)?$:$.contextElement||nl(e.elements.popper),s,c,a),P=Nc(e.elements.reference),w=bk({reference:P,element:C,placement:r}),O=Q1(Object.assign({},C,w)),I=f===Tu?O:P,_={top:x.top-I.top+b.top,bottom:I.bottom-x.bottom+b.bottom,left:x.left-I.left+b.left,right:I.right-x.right+b.right},T=e.modifiersData.offset;if(f===Tu&&T){var A=T[r];Object.keys(_).forEach(function(R){var H=[$r,xr].indexOf(R)>=0?1:-1,M=[Do,xr].indexOf(R)>=0?"y":"x";_[R]+=A[M]*H})}return _}function JCe(e,t){t===void 0&&(t={});var n=t,o=n.placement,r=n.boundary,i=n.rootBoundary,a=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,u=s===void 0?dk:s,c=kc(o),d=c?l?u3:u3.filter(function(v){return kc(v)===c}):Nf,f=d.filter(function(v){return u.indexOf(v)>=0});f.length===0&&(f=d);var p=f.reduce(function(v,h){return v[h]=of(e,{placement:h,boundary:r,rootBoundary:i,padding:a})[pi(h)],v},{});return Object.keys(p).sort(function(v,h){return p[v]-p[h]})}function ZCe(e){if(pi(e)===U$)return[];var t=$g(e);return[p3(e),t,p3(t)]}function QCe(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,a=n.altAxis,l=a===void 0?!0:a,s=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,v=p===void 0?!0:p,h=n.allowedAutoPlacements,m=t.options.placement,b=pi(m),S=b===m,C=s||(S||!v?[$g(m)]:ZCe(m)),$=[m].concat(C).reduce(function(Q,Y){return Q.concat(pi(Y)===U$?JCe(t,{placement:Y,boundary:c,rootBoundary:d,padding:u,flipVariations:v,allowedAutoPlacements:h}):Y)},[]),x=t.rects.reference,P=t.rects.popper,w=new Map,O=!0,I=$[0],_=0;_<$.length;_++){var T=$[_],A=pi(T),R=kc(T)===Rc,H=[Do,xr].indexOf(A)>=0,M=H?"width":"height",D=of(t,{placement:T,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),N=H?R?$r:No:R?xr:Do;x[M]>P[M]&&(N=$g(N));var L=$g(N),F=[];if(i&&F.push(D[A]<=0),l&&F.push(D[N]<=0,D[L]<=0),F.every(function(Q){return Q})){I=T,O=!1;break}w.set(T,F)}if(O)for(var B=v?3:1,j=function(Y){var oe=$.find(function(Z){var re=w.get(Z);if(re)return re.slice(0,Y).every(function(ne){return ne})});if(oe)return I=oe,"break"},z=B;z>0;z--){var G=j(z);if(G==="break")break}t.placement!==I&&(t.modifiersData[o]._skip=!0,t.placement=I,t.reset=!0)}}const exe={name:"flip",enabled:!0,phase:"main",fn:QCe,requiresIfExists:["offset"],data:{_skip:!1}};function h3(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function v3(e){return[Do,$r,xr,No].some(function(t){return e[t]>=0})}function txe(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,a=of(t,{elementContext:"reference"}),l=of(t,{altBoundary:!0}),s=h3(a,o),u=h3(l,r,i),c=v3(s),d=v3(u);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const nxe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:txe};function oxe(e,t,n){var o=pi(e),r=[No,Do].indexOf(o)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],l=i[1];return a=a||0,l=(l||0)*r,[No,$r].indexOf(o)>=0?{x:l,y:a}:{x:a,y:l}}function rxe(e){var t=e.state,n=e.options,o=e.name,r=n.offset,i=r===void 0?[0,0]:r,a=dk.reduce(function(c,d){return c[d]=oxe(d,t.rects,i),c},{}),l=a[t.placement],s=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=u),t.modifiersData[o]=a}const ixe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:rxe};function axe(e){var t=e.state,n=e.name;t.modifiersData[n]=bk({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const lxe={name:"popperOffsets",enabled:!0,phase:"read",fn:axe,data:{}};function sxe(e){return e==="x"?"y":"x"}function cxe(e){var t=e.state,n=e.options,o=e.name,r=n.mainAxis,i=r===void 0?!0:r,a=n.altAxis,l=a===void 0?!1:a,s=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,v=n.tetherOffset,h=v===void 0?0:v,m=of(t,{boundary:s,rootBoundary:u,padding:d,altBoundary:c}),b=pi(t.placement),S=kc(t.placement),C=!S,$=Y$(b),x=sxe($),P=t.modifiersData.popperOffsets,w=t.rects.reference,O=t.rects.popper,I=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,_=typeof I=="number"?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,A={x:0,y:0};if(P){if(i){var R,H=$==="y"?Do:No,M=$==="y"?xr:$r,D=$==="y"?"height":"width",N=P[$],L=N+m[H],F=N-m[M],B=p?-O[D]/2:0,j=S===Rc?w[D]:O[D],z=S===Rc?-O[D]:-w[D],G=t.elements.arrow,Q=p&&G?X$(G):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:gk(),oe=Y[H],Z=Y[M],re=gd(0,w[D],Q[D]),ne=C?w[D]/2-B-re-oe-_.mainAxis:j-re-oe-_.mainAxis,X=C?-w[D]/2+B+re+Z+_.mainAxis:z+re+Z+_.mainAxis,te=t.elements.arrow&&kf(t.elements.arrow),W=te?$==="y"?te.clientTop||0:te.clientLeft||0:0,U=(R=T==null?void 0:T[$])!=null?R:0,J=N+ne-U-W,de=N+X-U,fe=gd(p?kh(L,J):L,N,p?Bl(F,de):F);P[$]=fe,A[$]=fe-N}if(l){var pe,ve=$==="x"?Do:No,he=$==="x"?xr:$r,V=P[x],q=x==="y"?"height":"width",ie=V+m[ve],me=V-m[he],Se=[Do,No].indexOf(b)!==-1,ce=(pe=T==null?void 0:T[x])!=null?pe:0,ee=Se?ie:V-w[q]-O[q]-ce+_.altAxis,ue=Se?V+w[q]+O[q]-ce-_.altAxis:me,xe=p&&Se?RCe(ee,V,ue):gd(p?ee:ie,V,p?ue:me);P[x]=xe,A[x]=xe-V}t.modifiersData[o]=A}}const uxe={name:"preventOverflow",enabled:!0,phase:"main",fn:cxe,requiresIfExists:["offset"]};function dxe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function fxe(e){return e===Zo(e)||!hr(e)?q$(e):dxe(e)}function pxe(e){var t=e.getBoundingClientRect(),n=Dc(t.width)/e.offsetWidth||1,o=Dc(t.height)/e.offsetHeight||1;return n!==1||o!==1}function gxe(e,t,n){n===void 0&&(n=!1);var o=hr(t),r=hr(t)&&pxe(t),i=nl(t),a=Nc(e,r,n),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(o||!o&&!n)&&((bi(t)!=="body"||Z$(i))&&(l=fxe(t)),hr(t)?(s=Nc(t,!0),s.x+=t.clientLeft,s.y+=t.clientTop):i&&(s.x=J$(i))),{x:a.left+l.scrollLeft-s.x,y:a.top+l.scrollTop-s.y,width:a.width,height:a.height}}function hxe(e){var t=new Map,n=new Set,o=[];e.forEach(function(i){t.set(i.name,i)});function r(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(l){if(!n.has(l)){var s=t.get(l);s&&r(s)}}),o.push(i)}return e.forEach(function(i){n.has(i.name)||r(i)}),o}function vxe(e){var t=hxe(e);return ICe.reduce(function(n,o){return n.concat(t.filter(function(r){return r.phase===o}))},[])}function mxe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function bxe(e){var t=e.reduce(function(n,o){var r=n[o.name];return n[o.name]=r?Object.assign({},r,o,{options:Object.assign({},r.options,o.options),data:Object.assign({},r.data,o.data)}):o,n},{});return Object.keys(t).map(function(n){return t[n]})}var m3={placement:"bottom",modifiers:[],strategy:"absolute"};function b3(){for(var e=arguments.length,t=new Array(e),n=0;n * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */function y3(e){return Object.prototype.toString.call(e)==="[object Object]"}function xxe(e){var t,n;return y3(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(y3(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}function vd(){return vd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}const $xe={silent:!1,logLevel:"warn"},wxe=["validator"],Sk=Object.prototype,Ck=Sk.toString,Pxe=Sk.hasOwnProperty,xk=/^\s*function (\w+)/;function S3(e){var t;const n=(t=e==null?void 0:e.type)!==null&&t!==void 0?t:e;if(n){const o=n.toString().match(xk);return o?o[1]:""}return""}const Zl=xxe,Oxe=e=>e;let ao=Oxe;const Lc=(e,t)=>Pxe.call(e,t),Ixe=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},Fc=Array.isArray||function(e){return Ck.call(e)==="[object Array]"},Bc=e=>Ck.call(e)==="[object Function]",Fh=e=>Zl(e)&&Lc(e,"_vueTypes_name"),$k=e=>Zl(e)&&(Lc(e,"type")||["_vueTypes_name","validator","default","required"].some(t=>Lc(e,t)));function Q$(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function vs(e,t,n=!1){let o,r=!0,i="";o=Zl(e)?e:{type:e};const a=Fh(o)?o._vueTypes_name+" - ":"";if($k(o)&&o.type!==null){if(o.type===void 0||o.type===!0||!o.required&&t===void 0)return r;Fc(o.type)?(r=o.type.some(l=>vs(l,t,!0)===!0),i=o.type.map(l=>S3(l)).join(" or ")):(i=S3(o),r=i==="Array"?Fc(t):i==="Object"?Zl(t):i==="String"||i==="Number"||i==="Boolean"||i==="Function"?function(l){if(l==null)return"";const s=l.constructor.toString().match(xk);return s?s[1]:""}(t)===i:t instanceof o.type)}if(!r){const l=`${a}value "${t}" should be of type "${i}"`;return n===!1?(ao(l),!1):l}if(Lc(o,"validator")&&Bc(o.validator)){const l=ao,s=[];if(ao=u=>{s.push(u)},r=o.validator(t),ao=l,!r){const u=(s.length>1?"* ":"")+s.join(` + */function y3(e){return Object.prototype.toString.call(e)==="[object Object]"}function xxe(e){var t,n;return y3(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(y3(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}function vd(){return vd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}const $xe={silent:!1,logLevel:"warn"},wxe=["validator"],Sk=Object.prototype,Ck=Sk.toString,Pxe=Sk.hasOwnProperty,xk=/^\s*function (\w+)/;function S3(e){var t;const n=(t=e==null?void 0:e.type)!==null&&t!==void 0?t:e;if(n){const o=n.toString().match(xk);return o?o[1]:""}return""}const Zl=xxe,Oxe=e=>e;let ao=Oxe;const Lc=(e,t)=>Pxe.call(e,t),Ixe=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},Fc=Array.isArray||function(e){return Ck.call(e)==="[object Array]"},Bc=e=>Ck.call(e)==="[object Function]",Lh=e=>Zl(e)&&Lc(e,"_vueTypes_name"),$k=e=>Zl(e)&&(Lc(e,"type")||["_vueTypes_name","validator","default","required"].some(t=>Lc(e,t)));function Q$(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function vs(e,t,n=!1){let o,r=!0,i="";o=Zl(e)?e:{type:e};const a=Lh(o)?o._vueTypes_name+" - ":"";if($k(o)&&o.type!==null){if(o.type===void 0||o.type===!0||!o.required&&t===void 0)return r;Fc(o.type)?(r=o.type.some(l=>vs(l,t,!0)===!0),i=o.type.map(l=>S3(l)).join(" or ")):(i=S3(o),r=i==="Array"?Fc(t):i==="Object"?Zl(t):i==="String"||i==="Number"||i==="Boolean"||i==="Function"?function(l){if(l==null)return"";const s=l.constructor.toString().match(xk);return s?s[1]:""}(t)===i:t instanceof o.type)}if(!r){const l=`${a}value "${t}" should be of type "${i}"`;return n===!1?(ao(l),!1):l}if(Lc(o,"validator")&&Bc(o.validator)){const l=ao,s=[];if(ao=u=>{s.push(u)},r=o.validator(t),ao=l,!r){const u=(s.length>1?"* ":"")+s.join(` * `);return s.length=0,n===!1?(ao(u),r):u}}return r}function Xo(e,t){const n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(r){return r===void 0?(Lc(this,"default")&&delete this.default,this):Bc(r)||vs(this,r,!0)===!0?(this.default=Fc(r)?()=>[...r]:Zl(r)?()=>Object.assign({},r):r,this):(ao(`${this._vueTypes_name} - invalid default value: "${r}"`),this)}}}),{validator:o}=n;return Bc(o)&&(n.validator=Q$(o,n)),n}function gi(e,t){const n=Xo(e,t);return Object.defineProperty(n,"validate",{value(o){return Bc(this.validator)&&ao(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info: -${JSON.stringify(this)}`),this.validator=Q$(o,this),this}})}function C3(e,t,n){const o=function(s){const u={};return Object.getOwnPropertyNames(s).forEach(c=>{u[c]=Object.getOwnPropertyDescriptor(s,c)}),Object.defineProperties({},u)}(t);if(o._vueTypes_name=e,!Zl(n))return o;const{validator:r}=n,i=yk(n,wxe);if(Bc(r)){let{validator:s}=o;s&&(s=(l=(a=s).__original)!==null&&l!==void 0?l:a),o.validator=Q$(s?function(u){return s.call(this,u)&&r.call(this,u)}:r,o)}var a,l;return Object.assign(o,i)}function Fm(e){return e.replace(/^(?!\s*$)/gm," ")}const Txe=()=>gi("any",{}),Exe=()=>gi("function",{type:Function}),_xe=()=>gi("boolean",{type:Boolean}),Mxe=()=>gi("string",{type:String}),Axe=()=>gi("number",{type:Number}),Rxe=()=>gi("array",{type:Array}),Dxe=()=>gi("object",{type:Object}),Nxe=()=>Xo("integer",{type:Number,validator:e=>Ixe(e)}),kxe=()=>Xo("symbol",{validator:e=>typeof e=="symbol"});function Lxe(e,t="custom validation failed"){if(typeof e!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return Xo(e.name||"<>",{type:null,validator(n){const o=e(n);return o||ao(`${this._vueTypes_name} - ${t}`),o}})}function Fxe(e){if(!Fc(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.join('", "')}".`,n=e.reduce((o,r)=>{if(r!=null){const i=r.constructor;o.indexOf(i)===-1&&o.push(i)}return o},[]);return Xo("oneOf",{type:n.length>0?n:void 0,validator(o){const r=e.indexOf(o)!==-1;return r||ao(t),r}})}function Bxe(e){if(!Fc(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,n=[];for(let r=0;rn.indexOf(r)===i);const o=n.length>0?n:null;return Xo("oneOfType",t?{type:o,validator(r){const i=[],a=e.some(l=>{const s=vs(Fh(l)&&l._vueTypes_name==="oneOf"?l.type||null:l,r,!0);return typeof s=="string"&&i.push(s),s===!0});return a||ao(`oneOfType - provided value does not match any of the ${i.length} passed-in validators: -${Fm(i.join(` +${JSON.stringify(this)}`),this.validator=Q$(o,this),this}})}function C3(e,t,n){const o=function(s){const u={};return Object.getOwnPropertyNames(s).forEach(c=>{u[c]=Object.getOwnPropertyDescriptor(s,c)}),Object.defineProperties({},u)}(t);if(o._vueTypes_name=e,!Zl(n))return o;const{validator:r}=n,i=yk(n,wxe);if(Bc(r)){let{validator:s}=o;s&&(s=(l=(a=s).__original)!==null&&l!==void 0?l:a),o.validator=Q$(s?function(u){return s.call(this,u)&&r.call(this,u)}:r,o)}var a,l;return Object.assign(o,i)}function Lm(e){return e.replace(/^(?!\s*$)/gm," ")}const Txe=()=>gi("any",{}),Exe=()=>gi("function",{type:Function}),_xe=()=>gi("boolean",{type:Boolean}),Mxe=()=>gi("string",{type:String}),Axe=()=>gi("number",{type:Number}),Rxe=()=>gi("array",{type:Array}),Dxe=()=>gi("object",{type:Object}),Nxe=()=>Xo("integer",{type:Number,validator:e=>Ixe(e)}),kxe=()=>Xo("symbol",{validator:e=>typeof e=="symbol"});function Lxe(e,t="custom validation failed"){if(typeof e!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return Xo(e.name||"<>",{type:null,validator(n){const o=e(n);return o||ao(`${this._vueTypes_name} - ${t}`),o}})}function Fxe(e){if(!Fc(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.join('", "')}".`,n=e.reduce((o,r)=>{if(r!=null){const i=r.constructor;o.indexOf(i)===-1&&o.push(i)}return o},[]);return Xo("oneOf",{type:n.length>0?n:void 0,validator(o){const r=e.indexOf(o)!==-1;return r||ao(t),r}})}function Bxe(e){if(!Fc(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,n=[];for(let r=0;rn.indexOf(r)===i);const o=n.length>0?n:null;return Xo("oneOfType",t?{type:o,validator(r){const i=[],a=e.some(l=>{const s=vs(Lh(l)&&l._vueTypes_name==="oneOf"?l.type||null:l,r,!0);return typeof s=="string"&&i.push(s),s===!0});return a||ao(`oneOfType - provided value does not match any of the ${i.length} passed-in validators: +${Lm(i.join(` `))}`),a}}:{type:o})}function Hxe(e){return Xo("arrayOf",{type:Array,validator(t){let n="";const o=t.every(r=>(n=vs(e,r,!0),n===!0));return o||ao(`arrayOf - value validation error: -${Fm(n)}`),o}})}function zxe(e){return Xo("instanceOf",{type:e})}function jxe(e){return Xo("objectOf",{type:Object,validator(t){let n="";const o=Object.keys(t).every(r=>(n=vs(e,t[r],!0),n===!0));return o||ao(`objectOf - value validation error: -${Fm(n)}`),o}})}function Wxe(e){const t=Object.keys(e),n=t.filter(r=>{var i;return!((i=e[r])===null||i===void 0||!i.required)}),o=Xo("shape",{type:Object,validator(r){if(!Zl(r))return!1;const i=Object.keys(r);if(n.length>0&&n.some(a=>i.indexOf(a)===-1)){const a=n.filter(l=>i.indexOf(l)===-1);return ao(a.length===1?`shape - required property "${a[0]}" is not defined.`:`shape - required properties "${a.join('", "')}" are not defined.`),!1}return i.every(a=>{if(t.indexOf(a)===-1)return this._vueTypes_isLoose===!0||(ao(`shape - shape definition does not include a "${a}" property. Allowed keys: "${t.join('", "')}".`),!1);const l=vs(e[a],r[a],!0);return typeof l=="string"&&ao(`shape - "${a}" property validation error: - ${Fm(l)}`),l===!0})}});return Object.defineProperty(o,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(o,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),o}const Vxe=["name","validate","getter"],Kxe=(()=>{var e;return(e=class{static get any(){return Txe()}static get func(){return Exe().def(this.defaults.func)}static get bool(){return _xe().def(this.defaults.bool)}static get string(){return Mxe().def(this.defaults.string)}static get number(){return Axe().def(this.defaults.number)}static get array(){return Rxe().def(this.defaults.array)}static get object(){return Dxe().def(this.defaults.object)}static get integer(){return Nxe().def(this.defaults.integer)}static get symbol(){return kxe()}static get nullable(){return{type:null}}static extend(t){if(Fc(t))return t.forEach(s=>this.extend(s)),this;const{name:n,validate:o=!1,getter:r=!1}=t,i=yk(t,Vxe);if(Lc(this,n))throw new TypeError(`[VueTypes error]: Type "${n}" already defined`);const{type:a}=i;if(Fh(a))return delete i.type,Object.defineProperty(this,n,r?{get:()=>C3(n,a,i)}:{value(...s){const u=C3(n,a,i);return u.validator&&(u.validator=u.validator.bind(u,...s)),u}});let l;return l=r?{get(){const s=Object.assign({},i);return o?gi(n,s):Xo(n,s)},enumerable:!0}:{value(...s){const u=Object.assign({},i);let c;return c=o?gi(n,u):Xo(n,u),u.validator&&(c.validator=u.validator.bind(c,...s)),c},enumerable:!0},Object.defineProperty(this,n,l)}}).defaults={},e.sensibleDefaults=void 0,e.config=$xe,e.custom=Lxe,e.oneOf=Fxe,e.instanceOf=zxe,e.oneOfType=Bxe,e.arrayOf=Hxe,e.objectOf=jxe,e.shape=Wxe,e.utils={validate:(t,n)=>vs(n,t,!0)===!0,toType:(t,n,o=!1)=>o?gi(t,n):Xo(t,n)},e})();function Uxe(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var t;return(t=class extends Kxe{static get sensibleDefaults(){return vd({},this.defaults)}static set sensibleDefaults(n){this.defaults=n!==!1?vd({},n!==!0?n:e):{}}}).defaults=vd({},e),t}let dt=class extends Uxe(){};var x3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ew(e){var t={exports:{}};return e(t,t.exports),t.exports}var Ep=function(e){return e&&e.Math==Math&&e},An=Ep(typeof globalThis=="object"&&globalThis)||Ep(typeof window=="object"&&window)||Ep(typeof self=="object"&&self)||Ep(typeof x3=="object"&&x3)||function(){return this}()||Function("return this")(),qt=function(e){try{return!!e()}catch{return!0}},ur=!qt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),$3={}.propertyIsEnumerable,w3=Object.getOwnPropertyDescriptor,Gxe={f:w3&&!$3.call({1:2},1)?function(e){var t=w3(this,e);return!!t&&t.enumerable}:$3},Bm=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Xxe={}.toString,Gi=function(e){return Xxe.call(e).slice(8,-1)},Yxe="".split,Hm=qt(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return Gi(e)=="String"?Yxe.call(e,""):Object(e)}:Object,ja=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},du=function(e){return Hm(ja(e))},jn=function(e){return typeof e=="object"?e!==null:typeof e=="function"},tw=function(e,t){if(!jn(e))return e;var n,o;if(t&&typeof(n=e.toString)=="function"&&!jn(o=n.call(e))||typeof(n=e.valueOf)=="function"&&!jn(o=n.call(e))||!t&&typeof(n=e.toString)=="function"&&!jn(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")},qxe={}.hasOwnProperty,$n=function(e,t){return qxe.call(e,t)},eS=An.document,Jxe=jn(eS)&&jn(eS.createElement),wk=function(e){return Jxe?eS.createElement(e):{}},Pk=!ur&&!qt(function(){return Object.defineProperty(wk("div"),"a",{get:function(){return 7}}).a!=7}),P3=Object.getOwnPropertyDescriptor,nw={f:ur?P3:function(e,t){if(e=du(e),t=tw(t,!0),Pk)try{return P3(e,t)}catch{}if($n(e,t))return Bm(!Gxe.f.call(e,t),e[t])}},xo=function(e){if(!jn(e))throw TypeError(String(e)+" is not an object");return e},O3=Object.defineProperty,aa={f:ur?O3:function(e,t,n){if(xo(e),t=tw(t,!0),xo(n),Pk)try{return O3(e,t,n)}catch{}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},vr=ur?function(e,t,n){return aa.f(e,t,Bm(1,n))}:function(e,t,n){return e[t]=n,e},ow=function(e,t){try{vr(An,e,t)}catch{An[e]=t}return t},Ql=An["__core-js_shared__"]||ow("__core-js_shared__",{}),Zxe=Function.toString;typeof Ql.inspectSource!="function"&&(Ql.inspectSource=function(e){return Zxe.call(e)});var Bh,md,Hh,Ok=Ql.inspectSource,I3=An.WeakMap,Qxe=typeof I3=="function"&&/native code/.test(Ok(I3)),Ik=ew(function(e){(e.exports=function(t,n){return Ql[t]||(Ql[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.8.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),e$e=0,t$e=Math.random(),rw=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++e$e+t$e).toString(36)},T3=Ik("keys"),iw=function(e){return T3[e]||(T3[e]=rw(e))},zm={},n$e=An.WeakMap;if(Qxe){var Es=Ql.state||(Ql.state=new n$e),o$e=Es.get,r$e=Es.has,i$e=Es.set;Bh=function(e,t){return t.facade=e,i$e.call(Es,e,t),t},md=function(e){return o$e.call(Es,e)||{}},Hh=function(e){return r$e.call(Es,e)}}else{var Eu=iw("state");zm[Eu]=!0,Bh=function(e,t){return t.facade=e,vr(e,Eu,t),t},md=function(e){return $n(e,Eu)?e[Eu]:{}},Hh=function(e){return $n(e,Eu)}}var Wa={set:Bh,get:md,has:Hh,enforce:function(e){return Hh(e)?md(e):Bh(e,{})},getterFor:function(e){return function(t){var n;if(!jn(t)||(n=md(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Va=ew(function(e){var t=Wa.get,n=Wa.enforce,o=String(String).split("String");(e.exports=function(r,i,a,l){var s,u=!!l&&!!l.unsafe,c=!!l&&!!l.enumerable,d=!!l&&!!l.noTargetGet;typeof a=="function"&&(typeof i!="string"||$n(a,"name")||vr(a,"name",i),(s=n(a)).source||(s.source=o.join(typeof i=="string"?i:""))),r!==An?(u?!d&&r[i]&&(c=!0):delete r[i],c?r[i]=a:vr(r,i,a)):c?r[i]=a:ow(i,a)})(Function.prototype,"toString",function(){return typeof this=="function"&&t(this).source||Ok(this)})}),_b=An,E3=function(e){return typeof e=="function"?e:void 0},jm=function(e,t){return arguments.length<2?E3(_b[e])||E3(An[e]):_b[e]&&_b[e][t]||An[e]&&An[e][t]},a$e=Math.ceil,l$e=Math.floor,fu=function(e){return isNaN(e=+e)?0:(e>0?l$e:a$e)(e)},s$e=Math.min,Qo=function(e){return e>0?s$e(fu(e),9007199254740991):0},c$e=Math.max,u$e=Math.min,zh=function(e,t){var n=fu(e);return n<0?c$e(n+t,0):u$e(n,t)},d$e=function(e){return function(t,n,o){var r,i=du(t),a=Qo(i.length),l=zh(o,a);if(e&&n!=n){for(;a>l;)if((r=i[l++])!=r)return!0}else for(;a>l;l++)if((e||l in i)&&i[l]===n)return e||l||0;return!e&&-1}},Tk={indexOf:d$e(!1)},f$e=Tk.indexOf,Ek=function(e,t){var n,o=du(e),r=0,i=[];for(n in o)!$n(zm,n)&&$n(o,n)&&i.push(n);for(;t.length>r;)$n(o,n=t[r++])&&(~f$e(i,n)||i.push(n));return i},jh=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],p$e=jh.concat("length","prototype"),g$e={f:Object.getOwnPropertyNames||function(e){return Ek(e,p$e)}},h$e={f:Object.getOwnPropertySymbols},v$e=jm("Reflect","ownKeys")||function(e){var t=g$e.f(xo(e)),n=h$e.f;return n?t.concat(n(e)):t},m$e=function(e,t){for(var n=v$e(t),o=aa.f,r=nw.f,i=0;i1?arguments[1]:void 0)}});(function(){function e(){ms(this,e)}return bs(e,null,[{key:"isInBrowser",value:function(){return typeof window<"u"}},{key:"isServer",value:function(){return typeof window>"u"}},{key:"getUA",value:function(){return e.isInBrowser()?window.navigator.userAgent.toLowerCase():""}},{key:"isMobile",value:function(){return/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion)}},{key:"isOpera",value:function(){return navigator.userAgent.indexOf("Opera")!==-1}},{key:"isIE",value:function(){var t=e.getUA();return t!==""&&t.indexOf("msie")>0}},{key:"isIE9",value:function(){var t=e.getUA();return t!==""&&t.indexOf("msie 9.0")>0}},{key:"isEdge",value:function(){var t=e.getUA();return t!==""&&t.indexOf("edge/")>0}},{key:"isChrome",value:function(){var t=e.getUA();return t!==""&&/chrome\/\d+/.test(t)&&!e.isEdge()}},{key:"isPhantomJS",value:function(){var t=e.getUA();return t!==""&&/phantomjs/.test(t)}},{key:"isFirefox",value:function(){var t=e.getUA();return t!==""&&/firefox/.test(t)}}]),e})();var E$e=[].join,_$e=Hm!=Object,M$e=aw("join",",");go({target:"Array",proto:!0,forced:_$e||!M$e},{join:function(e){return E$e.call(du(this),e===void 0?",":e)}});var _s,Wh,la=function(e){return Object(ja(e))},Hc=Array.isArray||function(e){return Gi(e)=="Array"},Mk=!!Object.getOwnPropertySymbols&&!qt(function(){return!String(Symbol())}),A$e=Mk&&!Symbol.sham&&typeof Symbol.iterator=="symbol",_p=Ik("wks"),bd=An.Symbol,R$e=A$e?bd:bd&&bd.withoutSetter||rw,dn=function(e){return $n(_p,e)||(Mk&&$n(bd,e)?_p[e]=bd[e]:_p[e]=R$e("Symbol."+e)),_p[e]},D$e=dn("species"),Wm=function(e,t){var n;return Hc(e)&&(typeof(n=e.constructor)!="function"||n!==Array&&!Hc(n.prototype)?jn(n)&&(n=n[D$e])===null&&(n=void 0):n=void 0),new(n===void 0?Array:n)(t===0?0:t)},zc=function(e,t,n){var o=tw(t);o in e?aa.f(e,o,Bm(0,n)):e[o]=n},Ab=jm("navigator","userAgent")||"",A3=An.process,R3=A3&&A3.versions,D3=R3&&R3.v8;D3?Wh=(_s=D3.split("."))[0]+_s[1]:Ab&&(!(_s=Ab.match(/Edge\/(\d+)/))||_s[1]>=74)&&(_s=Ab.match(/Chrome\/(\d+)/))&&(Wh=_s[1]);var Vh=Wh&&+Wh,N$e=dn("species"),lw=function(e){return Vh>=51||!qt(function(){var t=[];return(t.constructor={})[N$e]=function(){return{foo:1}},t[e](Boolean).foo!==1})},k$e=lw("splice"),L$e=pu("splice",{ACCESSORS:!0,0:0,1:2}),F$e=Math.max,B$e=Math.min;go({target:"Array",proto:!0,forced:!k$e||!L$e},{splice:function(e,t){var n,o,r,i,a,l,s=la(this),u=Qo(s.length),c=zh(e,u),d=arguments.length;if(d===0?n=o=0:d===1?(n=0,o=u-c):(n=d-2,o=B$e(F$e(fu(t),0),u-c)),u+n-o>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(r=Wm(s,o),i=0;iu-o+n;i--)delete s[i-1]}else if(n>o)for(i=u-o;i>c;i--)l=i+n-1,(a=i+o-1)in s?s[l]=s[a]:delete s[l];for(i=0;i0&&(!i.multiline||i.multiline&&e[i.lastIndex-1]!==` -`)&&(s="(?: "+s+")",c=" "+c,u++),n=new RegExp("^(?:"+s+")",l)),kb&&(n=new RegExp("^"+s+"$(?!\\s)",l)),Nb&&(t=i.lastIndex),o=Kh.call(a?n:i,c),a?o?(o.input=o.input.slice(u),o[0]=o[0].slice(u),o.index=i.lastIndex,i.lastIndex+=o[0].length):i.lastIndex=0:Nb&&o&&(i.lastIndex=i.global?o.index+o[0].length:t),kb&&o&&o.length>1&&W$e.call(o[0],n,function(){for(r=1;r")!=="7"}),F3="a".replace(/./,"$0")==="$0",B3=dn("replace"),H3=!!/./[B3]&&/./[B3]("a","$0")==="",X$e=!qt(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return n.length!==2||n[0]!=="a"||n[1]!=="b"}),Fk=function(e,t,n,o){var r=dn(e),i=!qt(function(){var d={};return d[r]=function(){return 7},""[e](d)!=7}),a=i&&!qt(function(){var d=!1,f=/a/;return e==="split"&&((f={}).constructor={},f.constructor[U$e]=function(){return f},f.flags="",f[r]=/./[r]),f.exec=function(){return d=!0,null},f[r](""),!d});if(!i||!a||e==="replace"&&(!G$e||!F3||H3)||e==="split"&&!X$e){var l=/./[r],s=n(r,""[e],function(d,f,p,v,h){return f.exec===rf?i&&!h?{done:!0,value:l.call(f,p,v)}:{done:!0,value:d.call(p,f,v)}:{done:!1}},{REPLACE_KEEPS_$0:F3,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:H3}),u=s[0],c=s[1];Va(String.prototype,e,u),Va(RegExp.prototype,r,function(d,f){return c.call(d,this,f)})}o&&vr(RegExp.prototype[r],"sham",!0)},Y$e=dn("match"),Bk=function(e){var t;return jn(e)&&((t=e[Y$e])!==void 0?!!t:Gi(e)=="RegExp")},cw=function(e){if(typeof e!="function")throw TypeError(String(e)+" is not a function");return e},q$e=dn("species"),J$e=function(e){return function(t,n){var o,r,i=String(ja(t)),a=fu(n),l=i.length;return a<0||a>=l?e?"":void 0:(o=i.charCodeAt(a))<55296||o>56319||a+1===l||(r=i.charCodeAt(a+1))<56320||r>57343?e?i.charAt(a):o:e?i.slice(a,a+2):r-56320+(o-55296<<10)+65536}},Hk={charAt:J$e(!0)},Z$e=Hk.charAt,zk=function(e,t,n){return t+(n?Z$e(e,t).length:1)},nS=function(e,t){var n=e.exec;if(typeof n=="function"){var o=n.call(e,t);if(typeof o!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return o}if(Gi(e)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return rf.call(e,t)},Q$e=[].push,ewe=Math.min,Ms=!qt(function(){return!RegExp(4294967295,"y")});Fk("split",2,function(e,t,n){var o;return o="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(r,i){var a=String(ja(this)),l=i===void 0?4294967295:i>>>0;if(l===0)return[];if(r===void 0)return[a];if(!Bk(r))return t.call(a,r,l);for(var s,u,c,d=[],f=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(r.sticky?"y":""),p=0,v=new RegExp(r.source,f+"g");(s=rf.call(v,a))&&!((u=v.lastIndex)>p&&(d.push(a.slice(p,s.index)),s.length>1&&s.index=l));)v.lastIndex===s.index&&v.lastIndex++;return p===a.length?!c&&v.test("")||d.push(""):d.push(a.slice(p)),d.length>l?d.slice(0,l):d}:"0".split(void 0,0).length?function(r,i){return r===void 0&&i===0?[]:t.call(this,r,i)}:t,[function(r,i){var a=ja(this),l=r==null?void 0:r[e];return l!==void 0?l.call(r,a,i):o.call(String(a),r,i)},function(r,i){var a=n(o,r,this,i,o!==t);if(a.done)return a.value;var l=xo(r),s=String(this),u=function($,x){var P,w=xo($).constructor;return w===void 0||(P=xo(w)[q$e])==null?x:cw(P)}(l,RegExp),c=l.unicode,d=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(Ms?"y":"g"),f=new u(Ms?l:"^(?:"+l.source+")",d),p=i===void 0?4294967295:i>>>0;if(p===0)return[];if(s.length===0)return nS(f,s)===null?[s]:[];for(var v=0,h=0,m=[];h1?arguments[1]:void 0,t.length)),o=String(e);return z3?z3.call(t,o,n):t.slice(n,n+o.length)===o}});var As=function(e){return typeof e=="string"},Rs=function(e){return e!==null&&Wk(e)==="object"},af=function(){function e(){ms(this,e)}return bs(e,null,[{key:"isWindow",value:function(t){return t===window}},{key:"addEventListener",value:function(t,n,o){var r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];t&&n&&o&&t.addEventListener(n,o,r)}},{key:"removeEventListener",value:function(t,n,o){var r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];t&&n&&o&&t.removeEventListener(n,o,r)}},{key:"triggerDragEvent",value:function(t,n){var o=!1,r=function(a){var l;(l=n.drag)===null||l===void 0||l.call(n,a)},i=function a(l){var s;e.removeEventListener(document,"mousemove",r),e.removeEventListener(document,"mouseup",a),document.onselectstart=null,document.ondragstart=null,o=!1,(s=n.end)===null||s===void 0||s.call(n,l)};e.addEventListener(t,"mousedown",function(a){var l;o||(document.onselectstart=function(){return!1},document.ondragstart=function(){return!1},e.addEventListener(document,"mousemove",r),e.addEventListener(document,"mouseup",i),o=!0,(l=n.start)===null||l===void 0||l.call(n,a))})}},{key:"getBoundingClientRect",value:function(t){return t&&Rs(t)&&t.nodeType===1?t.getBoundingClientRect():null}},{key:"hasClass",value:function(t,n){return!!(t&&Rs(t)&&As(n)&&t.nodeType===1)&&t.classList.contains(n.trim())}},{key:"addClass",value:function(t,n){if(t&&Rs(t)&&As(n)&&t.nodeType===1&&(n=n.trim(),!e.hasClass(t,n))){var o=t.className;t.className=o?o+" "+n:n}}},{key:"removeClass",value:function(t,n){if(t&&Rs(t)&&As(n)&&t.nodeType===1&&typeof t.className=="string"){n=n.trim();for(var o=t.className.trim().split(" "),r=o.length-1;r>=0;r--)o[r]=o[r].trim(),o[r]&&o[r]!==n||o.splice(r,1);t.className=o.join(" ")}}},{key:"toggleClass",value:function(t,n,o){t&&Rs(t)&&As(n)&&t.nodeType===1&&t.classList.toggle(n,o)}},{key:"replaceClass",value:function(t,n,o){t&&Rs(t)&&As(n)&&As(o)&&t.nodeType===1&&(n=n.trim(),o=o.trim(),e.removeClass(t,n),e.addClass(t,o))}},{key:"getScrollTop",value:function(t){var n="scrollTop"in t?t.scrollTop:t.pageYOffset;return Math.max(n,0)}},{key:"setScrollTop",value:function(t,n){"scrollTop"in t?t.scrollTop=n:t.scrollTo(t.scrollX,n)}},{key:"getRootScrollTop",value:function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}},{key:"setRootScrollTop",value:function(t){e.setScrollTop(window,t),e.setScrollTop(document.body,t)}},{key:"getElementTop",value:function(t,n){if(e.isWindow(t))return 0;var o=n?e.getScrollTop(n):e.getRootScrollTop();return t.getBoundingClientRect().top+o}},{key:"getVisibleHeight",value:function(t){return e.isWindow(t)?t.innerHeight:t.getBoundingClientRect().height}},{key:"isHidden",value:function(t){if(!t)return!1;var n=window.getComputedStyle(t),o=n.display==="none",r=t.offsetParent===null&&n.position!=="fixed";return o||r}},{key:"triggerEvent",value:function(t,n){if("createEvent"in document){var o=document.createEvent("HTMLEvents");o.initEvent(n,!1,!0),t.dispatchEvent(o)}}},{key:"calcAngle",value:function(t,n){var o=t.getBoundingClientRect(),r=o.left+o.width/2,i=o.top+o.height/2,a=Math.abs(r-n.clientX),l=Math.abs(i-n.clientY),s=l/Math.sqrt(Math.pow(a,2)+Math.pow(l,2)),u=Math.acos(s),c=Math.floor(180/(Math.PI/u));return n.clientX>r&&n.clientY>i&&(c=180-c),n.clientX==r&&n.clientY>i&&(c=180),n.clientX>r&&n.clientY==i&&(c=90),n.clientXi&&(c=180+c),n.clientX1?o-1:0),i=1;i]*>)/g,Swe=/\$([$&'`]|\d\d?)/g,Cwe=function(e,t,n,o,r,i){var a=n+e.length,l=o.length,s=Swe;return r!==void 0&&(r=la(r),s=ywe),bwe.call(i,s,function(u,c){var d;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(a);case"<":d=r[c.slice(1,-1)];break;default:var f=+c;if(f===0)return u;if(f>l){var p=mwe(f/10);return p===0?u:p<=l?o[p-1]===void 0?c.charAt(1):o[p-1]+c.charAt(1):u}d=o[f-1]}return d===void 0?"":d})},xwe=Math.max,$we=Math.min;Fk("replace",2,function(e,t,n,o){var r=o.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=o.REPLACE_KEEPS_$0,a=r?"$":"$0";return[function(l,s){var u=ja(this),c=l==null?void 0:l[e];return c!==void 0?c.call(l,u,s):t.call(String(u),l,s)},function(l,s){if(!r&&i||typeof s=="string"&&s.indexOf(a)===-1){var u=n(t,l,this,s);if(u.done)return u.value}var c=xo(l),d=String(this),f=typeof s=="function";f||(s=String(s));var p=c.global;if(p){var v=c.unicode;c.lastIndex=0}for(var h=[];;){var m=nS(c,d);if(m===null||(h.push(m),!p))break;String(m[0])===""&&(c.lastIndex=zk(d,Qo(c.lastIndex),v))}for(var b,S="",C=0,$=0;$=C&&(S+=d.slice(C,P)+T,C=P+x.length)}return S+d.slice(C)}]});(function(){function e(){ms(this,e)}return bs(e,null,[{key:"camelize",value:function(t){return t.replace(/-(\w)/g,function(n,o){return o?o.toUpperCase():""})}},{key:"capitalize",value:function(t){return t.charAt(0).toUpperCase()+t.slice(1)}}]),e})();(function(){function e(){ms(this,e)}return bs(e,null,[{key:"_clone",value:function(){}}]),e})();var Vk=dn("isConcatSpreadable"),wwe=Vh>=51||!qt(function(){var e=[];return e[Vk]=!1,e.concat()[0]!==e}),Pwe=lw("concat"),Owe=function(e){if(!jn(e))return!1;var t=e[Vk];return t!==void 0?!!t:Hc(e)};go({target:"Array",proto:!0,forced:!wwe||!Pwe},{concat:function(e){var t,n,o,r,i,a=la(this),l=Wm(a,0),s=0;for(t=-1,o=arguments.length;t9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");zc(l,s++,i)}return l.length=s,l}});var Fb,Ff=function(e,t,n){if(cw(e),t===void 0)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(o){return e.call(t,o)};case 2:return function(o,r){return e.call(t,o,r)};case 3:return function(o,r,i){return e.call(t,o,r,i)}}return function(){return e.apply(t,arguments)}},j3=[].push,W3=function(e){var t=e==1,n=e==2,o=e==3,r=e==4,i=e==6,a=e==7,l=e==5||i;return function(s,u,c,d){for(var f,p,v=la(s),h=Hm(v),m=Ff(u,c,3),b=Qo(h.length),S=0,C=d||Wm,$=t?C(s,b):n||a?C(s,0):void 0;b>S;S++)if((l||S in h)&&(p=m(f=h[S],S,v),e))if(t)$[S]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return S;case 2:j3.call($,f)}else switch(e){case 4:return!1;case 7:j3.call($,f)}return i?-1:o||r?r:$}},Kk={find:W3(5),findIndex:W3(6)},Iwe=ur?Object.defineProperties:function(e,t){xo(e);for(var n,o=uw(t),r=o.length,i=0;r>i;)aa.f(e,n=o[i++],t[n]);return e},Twe=jm("document","documentElement"),Uk=iw("IE_PROTO"),Bb=function(){},V3=function(e){return" + diff --git a/spring-ai-alibaba-jmanus/ui-vue3/package.json b/spring-ai-alibaba-jmanus/ui-vue3/package.json index e649bf4fc7..a8234cc556 100644 --- a/spring-ai-alibaba-jmanus/ui-vue3/package.json +++ b/spring-ai-alibaba-jmanus/ui-vue3/package.json @@ -21,7 +21,9 @@ "refactor:check": "pnpm run type-check && pnpm run lint:check", "refactor:fix": "pnpm run lint && pnpm run format", "check:all": "pnpm run type-check && pnpm run lint:check && pnpm run test:unit", - "dev:strict": "vite --mode development" + "dev:strict": "vite --mode development", + "check:chinese": "python3 scripts/check-chinese-content.py --dir src", + "check:chinese:fail": "python3 scripts/check-chinese-content.py --dir src --fail-on-found" }, "dependencies": { "@ant-design/icons-vue": "^7.0.1", diff --git a/spring-ai-alibaba-jmanus/scripts/check-chinese-content.py b/spring-ai-alibaba-jmanus/ui-vue3/scripts/check-chinese-content.py similarity index 70% rename from spring-ai-alibaba-jmanus/scripts/check-chinese-content.py rename to spring-ai-alibaba-jmanus/ui-vue3/scripts/check-chinese-content.py index 18b1a0d099..08fa549af5 100644 --- a/spring-ai-alibaba-jmanus/scripts/check-chinese-content.py +++ b/spring-ai-alibaba-jmanus/ui-vue3/scripts/check-chinese-content.py @@ -18,8 +18,8 @@ # """ -Spring AI Alibaba Jmanus Chinese Content Checker -Tool for checking Chinese content in Java code for GitHub Actions +Spring AI Alibaba JManus UI-Vue3 Chinese Content Checker +Tool for checking Chinese content in frontend code for GitHub Actions """ import os @@ -48,8 +48,43 @@ def __init__(self, target_dir: str): r'@time\s+\d{4}/\d{1,2}/\d{1,2}', # Time information ] + # Exclude i18n configuration files + self.exclude_files = [ + 'zh.ts', # Chinese i18n file + 'en.ts', # English i18n file (may contain Chinese in comments) + 'index.ts', # i18n index file + 'type.ts', # i18n type definitions + 'sortI18n.ts', # i18n sorting utility + ] + + # Exclude directories + self.exclude_dirs = [ + 'node_modules', + 'dist', + 'build', + '.git', + 'coverage', + ] + self.issues = [] + def should_exclude_file(self, file_path: Path) -> bool: + """Check if file should be excluded from checking""" + # Check if it's an i18n configuration file + if file_path.name in self.exclude_files: + return True + + # Check if it's in i18n directory + if 'i18n' in file_path.parts: + return True + + # Check if it's in excluded directories + for exclude_dir in self.exclude_dirs: + if exclude_dir in file_path.parts: + return True + + return False + def has_real_chinese_content(self, text: str) -> bool: """Check if text contains real Chinese content (excluding false positives)""" # First check if there are Chinese characters or Chinese punctuation @@ -75,6 +110,7 @@ def check_file(self, file_path: Path) -> List[Dict]: lines = f.readlines() in_multiline_comment = False + in_template_section = False for line_num, line in enumerate(lines, 1): original_line = line.rstrip() @@ -88,7 +124,7 @@ def check_file(self, file_path: Path) -> List[Dict]: continue # Analyze the type of location where Chinese content appears - content_type = self._analyze_content_type(line_stripped, in_multiline_comment) + content_type = self._analyze_content_type(line_stripped, in_multiline_comment, in_template_section) # Update multiline comment status if '/*' in line_stripped: @@ -96,6 +132,13 @@ def check_file(self, file_path: Path) -> List[Dict]: if '*/' in line_stripped: in_multiline_comment = False + # Update template section status for Vue files + if file_path.suffix == '.vue': + if '' in line_stripped: + in_template_section = False + issues.append({ 'file': str(file_path.relative_to(self.target_dir.parent)), 'line': line_num, @@ -109,7 +152,7 @@ def check_file(self, file_path: Path) -> List[Dict]: return issues - def _analyze_content_type(self, line: str, in_multiline_comment: bool) -> str: + def _analyze_content_type(self, line: str, in_multiline_comment: bool, in_template_section: bool) -> str: """Analyze the type of Chinese content location""" if in_multiline_comment or line.startswith('/*'): return "multiline comment" @@ -122,12 +165,22 @@ def _analyze_content_type(self, line: str, in_multiline_comment: bool) -> str: if self.has_real_chinese_content(comment_part): return "inline comment" + # Check Vue template content + if in_template_section: + return "Vue template" + # Check string literals string_matches = re.finditer(r'"([^"]*)"', line) for match in string_matches: if self.has_real_chinese_content(match.group(1)): return "string literal" + # Check template literals + template_matches = re.finditer(r'`([^`]*)`', line) + for match in template_matches: + if self.has_real_chinese_content(match.group(1)): + return "template literal" + # Check character literals char_matches = re.finditer(r"'([^']*)'", line) for match in char_matches: @@ -137,6 +190,7 @@ def _analyze_content_type(self, line: str, in_multiline_comment: bool) -> str: # Check identifiers temp_line = re.sub(r'"[^"]*"', '', line) # Remove strings temp_line = re.sub(r"'[^']*'", '', temp_line) # Remove characters + temp_line = re.sub(r'`[^`]*`', '', temp_line) # Remove template literals temp_line = re.sub(r'//.*$', '', temp_line) # Remove single line comments if self.has_real_chinese_content(temp_line): @@ -150,16 +204,22 @@ def check_directory(self) -> bool: print(f"::error::Directory does not exist: {self.target_dir}") return False - java_files = list(self.target_dir.rglob("*.java")) + # Find Vue, TypeScript, and JavaScript files + frontend_files = [] + for pattern in ['**/*.vue', '**/*.ts', '**/*.js', '**/*.jsx', '**/*.tsx']: + frontend_files.extend(list(self.target_dir.rglob(pattern))) + + # Filter out excluded files + frontend_files = [f for f in frontend_files if not self.should_exclude_file(f)] - if not java_files: - print(f"::notice::No Java files found in {self.target_dir}") + if not frontend_files: + print(f"::notice::No frontend files found in {self.target_dir}") return True - print(f"::notice::Found {len(java_files)} Java files, starting check...") + print(f"::notice::Found {len(frontend_files)} frontend files, starting check...") - for java_file in java_files: - file_issues = self.check_file(java_file) + for frontend_file in frontend_files: + file_issues = self.check_file(frontend_file) self.issues.extend(file_issues) return len(self.issues) == 0 @@ -167,7 +227,7 @@ def check_directory(self) -> bool: def report_issues(self) -> None: """Report discovered issues""" if not self.issues: - print("::notice::✅ No Java files with Chinese content found") + print("::notice::✅ No frontend files with Chinese content found") return print(f"::error::❌ Found {len(self.issues)} Chinese content issues") @@ -186,14 +246,15 @@ def report_issues(self) -> None: # Output modification suggestions print("\n::notice::Modification suggestions:") print("::notice::1. Change Chinese comments to English comments") - print("::notice::2. Extract Chinese strings to resource files or configuration files") + print("::notice::2. Extract Chinese strings to i18n configuration files") print("::notice::3. Change Chinese identifiers to English identifiers") - print("::notice::4. For test data, consider using English or placeholders") + print("::notice::4. Use i18n keys like $t('key') instead of hardcoded Chinese text") + print("::notice::5. For test data, consider using English or placeholders") def main(): - parser = argparse.ArgumentParser(description='Check Chinese content in Java code') + parser = argparse.ArgumentParser(description='Check Chinese content in frontend code') parser.add_argument('--dir', '-d', - default='src/main/java', + default='src', help='Directory path to check (relative to current directory)') parser.add_argument('--fail-on-found', '-f', action='store_true', diff --git a/spring-ai-alibaba-jmanus/ui-vue3/src/base/i18n/en.ts b/spring-ai-alibaba-jmanus/ui-vue3/src/base/i18n/en.ts index 07d6813c52..74b14ef53f 100644 --- a/spring-ai-alibaba-jmanus/ui-vue3/src/base/i18n/en.ts +++ b/spring-ai-alibaba-jmanus/ui-vue3/src/base/i18n/en.ts @@ -61,6 +61,7 @@ const words: I18nType = { networkError: 'Network error, please check your internet connection', successMessage: 'Configuration saved successfully! Redirecting to home page...', restartRequired: 'API key saved successfully! The application needs to be restarted for the configuration to take effect.\n\nClick "OK" to restart now, or "Cancel" to restart manually later.', + simplifiedChinese: 'Simplified Chinese', }, // Common buttons and actions @@ -77,8 +78,17 @@ const words: I18nType = { update: 'Update', submit: 'Submit', clear: 'Clear', + submitFailed: 'Submit Failed', + unknownError: 'Unknown Error', search: 'Search', loading: 'Loading...', + parameters: 'Parameters', + }, + + // Language + language: { + zh: '中文', + en: 'English', success: 'Success', error: 'Error', warning: 'Warning', @@ -116,6 +126,7 @@ const words: I18nType = { input: 'Input', total: 'Total', loadFailed: 'Load Failed', + switch: 'Switch Language', }, // Configuration related @@ -326,6 +337,18 @@ const words: I18nType = { newMcpConfig: 'New MCP Config', importAll: 'Import All', exportAll: 'Export All', + mcpName: 'MCP Name', + usageInstructions: 'Usage Instructions', + getMcpServiceList: 'Get MCP Service List', + findMcpServices: 'You can find available MCP services on mcp.higress.ai, mcp.so, modelscope.cn', + batchImportTip: 'If you need to batch configure MCP services, you can use the import all function in the top right corner', + configureMcpService: 'Configure MCP Service', + fillServiceName: 'Fill in service name', + selectConnectionType: 'Select connection type: choose STUDIO for local and input Command, Args and Env. Choose SSE or STREAMING for remote and input URL', + clickSaveToComplete: 'Click save button to complete MCP configuration, MCP tools will be automatically registered to the system', + configureAgentUsage: 'Configure Agent Usage', + createAgentTip: 'Create a new Agent on the Agent configuration page, add the just configured MCP service to the Agent, this can reduce tool conflicts and improve Agent tool selection accuracy', + copyJsonConfig: 'Copy the complete JSON configuration to the input box above (you can refer to configuration examples), then click import', command: 'Command', args: 'Args', env: 'Env', @@ -626,6 +649,8 @@ const words: I18nType = { executionFailed: 'Execution failed', generationSuccess: 'Generation successful', generationFailed: 'Generation failed', + invalidJson: 'Invalid JSON format, please correct and save again', + executePlanTemplate: 'Execute Plan Template', }, // Chat component @@ -669,6 +694,14 @@ const words: I18nType = { formatError: 'Request format might be incorrect, could you please rephrase your request?', unknownError: 'Encountered some issues while processing your request, please try again later', thinkingOutput: 'Thinking Output', + defaultResponse: 'I understand. Is there anything else I can help you with?', + anythingElse: 'Is there anything else I can help you with?', + okayDone: 'Okay, {text}', + ifOtherQuestions: 'If you have any other questions, please feel free to let me know', + hopeHelpful: 'I hope this answer is helpful to you!', + great: 'Great!', + ifOtherHelp: 'If you need any other help, please feel free to let me know', + completedRequest: 'I have completed your request: {result}' }, // Input component @@ -676,9 +709,10 @@ const words: I18nType = { placeholder: 'Send a message to JManus', send: 'Send', planMode: 'PLAN-ACT Template Mode', - waiting: 'Waiting for task completion...', + waiting: 'Waiting for user input...', maxLength: 'Max Length', charactersRemaining: 'Characters Remaining', + attachFile: 'Attach File', }, // Sidebar @@ -752,6 +786,25 @@ const words: I18nType = { defaultExecutionPlanTitle: 'Execution Plan', }, + // Tool Selection + toolSelection: { + title: 'Select Tools', + searchPlaceholder: 'Search tools...', + sortByGroup: 'Sort by Service Group', + sortByName: 'Sort by Name', + sortByStatus: 'Sort by Status', + summary: '{groups} service groups, {tools} tools ({selected} selected)', + enableAll: 'Enable All', + noToolsFound: 'No tools found' + }, + + // Direct execution page + direct: { + planTemplateIdNotFound: 'Plan template ID not found', + executionFailedNoPlanId: 'Plan execution failed: No valid plan ID returned', + executionFailed: 'Plan execution failed' + }, + // Modal modal: { close: 'Close', @@ -778,12 +831,9 @@ const words: I18nType = { resetFontSize: 'Reset Font Size', }, - // Language switching - language: { - switch: 'Switch Language', - current: 'Current Language', - zh: '中文', - en: 'English', + // Validation + validation: { + required: 'Content cannot be empty', }, // Theme @@ -806,20 +856,6 @@ const words: I18nType = { retry: 'Retry', }, - // Form validation - validation: { - required: 'This field is required', - email: 'Please enter a valid email address', - phone: 'Please enter a valid phone number', - url: 'Please enter a valid URL', - minLength: 'At least {min} characters required', - maxLength: 'Maximum {max} characters allowed', - min: 'Value cannot be less than {min}', - max: 'Value cannot be greater than {max}', - pattern: 'Invalid format', - confirmation: 'The two inputs do not match', - }, - // Time related time: { now: 'Just now', @@ -885,11 +921,21 @@ const words: I18nType = { title: 'Query Person Info', description: "Query all information about Shenxun Ali (to demonstrate infinite context capability)", prompt: 'Use browser, based on Baidu, to query person info', + planTitle: 'Query all information about Shenxun Ali (to demonstrate infinite context capability)', + step1: '[BROWSER_AGENT] Search for Shenxun Ali through Baidu, get the first page HTML data, merge and aggregate to html_data directory', + step1Output: 'Storage directory path', + step2: '[BROWSER_AGENT] Find all valid web links about Shenxun Ali from html_data directory, output to link.md', + step2Output: 'URL address, description', }, ainovel: { title: 'AI Novel Creation', description: 'AI gradually defeats humanity themed novel (to demonstrate long-form content output)', prompt: 'Create a novel about artificial intelligence gradually defeating humanity, including 10 chapters', + planTitle: 'AI Gradually Defeats Humans Novel Creation Plan', + step1: '[TEXT_FILE_AGENT] Create a file with novel title and chapter titles, expecting a novel with 10 chapters, output outline to novel.md, each chapter uses secondary title, only write chapter titles in current step, novel title is "AI Gradually Defeats Humans"', + step1Output: 'File name', + step2: '[TEXT_FILE_AGENT] Get chapter title information from novel.md file, then improve each chapter content in sequence, only improve one chapter content per round, use replace to update content, each chapter requires 3000 words, do not query all document content after updating each chapter', + step2Output: 'File name', }, }, }, @@ -916,11 +962,19 @@ const words: I18nType = { toolParameters: 'Tool Parameters', noStepDetails: 'No detailed step information available', scrollToBottom: 'Scroll to Bottom', - // Step status + stepInfo: 'Step Information', + stepName: 'Step Name', + noExecutionInfo: 'No detailed execution information available for this step', + subPlan: 'Sub Execution Plan', + subStep: 'Sub Step', + subPlanId: 'Sub Plan ID', + title: 'Title', + stepNumber: 'Step {number}', status: { + label: 'Status', completed: 'Completed', executing: 'Executing', - waiting: 'Waiting', + pending: 'Pending' }, // Tab labels tabs: { @@ -957,13 +1011,6 @@ const words: I18nType = { defaultStepTitle: 'Step {number}', }, - // Direct page - direct: { - configuration: 'Configuration', - panelResizeHint: 'Drag to resize panel, double-click to reset', - aboutExecutionDetails: 'About Integrated Execution Details', - }, - // Cron Task cronTask: { title: 'Cron Task Management', diff --git a/spring-ai-alibaba-jmanus/ui-vue3/src/base/i18n/zh.ts b/spring-ai-alibaba-jmanus/ui-vue3/src/base/i18n/zh.ts index 5a056bbe9f..ea508377b0 100644 --- a/spring-ai-alibaba-jmanus/ui-vue3/src/base/i18n/zh.ts +++ b/spring-ai-alibaba-jmanus/ui-vue3/src/base/i18n/zh.ts @@ -61,6 +61,7 @@ const words: I18nType = { networkError: '网络错误,请检查您的网络连接', successMessage: '配置保存成功!正在跳转到主页面...', restartRequired: 'API密钥已保存成功!为了使配置生效,需要重启应用程序。\n\n点击"确定"立即重启,点击"取消"稍后手动重启。', + simplifiedChinese: '简体中文', }, // 通用按钮和操作 @@ -77,8 +78,17 @@ const words: I18nType = { update: '更新', submit: '提交', clear: '清空', + submitFailed: '提交失败', + unknownError: '未知错误', search: '搜索', loading: '加载中...', + parameters: '参数', + }, + + // 语言 + language: { + zh: '中文', + en: 'English', success: '成功', error: '错误', warning: '警告', @@ -117,6 +127,7 @@ const words: I18nType = { actions: '操作', total: '总计', loadFailed: '加载失败', + switch: '切换语言', }, // 配置相关 @@ -327,6 +338,18 @@ const words: I18nType = { newMcpConfig: '新建MCP配置', importAll: '全部导入', exportAll: '全部导出', + mcpName: 'MCP名称', + usageInstructions: '使用说明', + getMcpServiceList: '获取MCP服务列表', + findMcpServices: '可以在mcp.higress.ai,mcp.so,modelscope.cn上查找可用的MCP服务', + batchImportTip: '如果需要批量配置MCP服务,可以使用右上角的全部导入功能', + configureMcpService: '配置MCP服务', + fillServiceName: '填写服务名称', + selectConnectionType: '选择连接类型:本地选择 STUDIO 以及输入 Command、Args和Env。远程选择 SSE 或 STREAMING 以及输入 URL', + clickSaveToComplete: '点击保存按钮完成MCP配置,MCP工具将自动注册到系统中', + configureAgentUsage: '配置Agent使用', + createAgentTip: '在Agent配置页面创建新的Agent,为Agent添加刚配置的MCP服务,这样可以减少工具冲突,提高Agent选择工具的准确性', + copyJsonConfig: '把完整的JSON配置复制到上面的输入框(可以参考配置示例),然后点击导入', command: 'Command', args: 'Args', env: 'Env', @@ -594,6 +617,8 @@ const words: I18nType = { executionFailed: '执行失败', generationSuccess: '生成成功', generationFailed: '生成失败', + invalidJson: 'JSON 格式无效,请修正后再保存', + executePlanTemplate: '执行计划模板', }, // 聊天组件 @@ -637,6 +662,14 @@ const words: I18nType = { formatError: '请求格式可能有些问题,能否请您重新表述一下您的需求?', unknownError: '处理您的请求时遇到了一些问题,请稍后再试', thinkingOutput: '思考输出', + defaultResponse: '我明白了,还有什么我可以帮您的吗?', + anythingElse: '还有什么需要我帮助的吗?', + okayDone: '好的,{text}', + ifOtherQuestions: '如果您还有其他问题,请随时告诉我', + hopeHelpful: '希望这个回答对您有帮助!', + great: '很好!', + ifOtherHelp: '如果您还有其他需要帮助的地方,请随时告诉我', + completedRequest: '我已经完成了您的请求:{result}' }, // 输入组件 @@ -644,9 +677,10 @@ const words: I18nType = { placeholder: '向 JManus 发送消息', send: '发送', planMode: 'PLAN-ACT计划模式', - waiting: '等待任务完成...', + waiting: '等待用户输入...', maxLength: '最大长度', charactersRemaining: '剩余字符', + attachFile: '附加文件', }, // 侧边栏 @@ -719,6 +753,25 @@ const words: I18nType = { defaultExecutionPlanTitle: '执行计划', }, + // 工具选择 + toolSelection: { + title: '选择工具', + searchPlaceholder: '搜索工具...', + sortByGroup: '按服务组排序', + sortByName: '按名称排序', + sortByStatus: '按启用状态排序', + summary: '共 {groups} 个服务组,{tools} 个工具 (已选择 {selected} 个)', + enableAll: '启用全部', + noToolsFound: '没有找到工具' + }, + + // 直接执行页面 + direct: { + planTemplateIdNotFound: '没有找到计划模板ID', + executionFailedNoPlanId: '执行计划失败:未返回有效的计划ID', + executionFailed: '执行计划失败' + }, + // 模态框 modal: { close: '关闭', @@ -745,12 +798,9 @@ const words: I18nType = { resetFontSize: '重置字体大小', }, - // 语言切换 - language: { - switch: '切换语言', - current: '当前语言', - zh: '中文', - en: 'English', + // 验证 + validation: { + required: '内容不能为空', }, // 主题 @@ -773,20 +823,6 @@ const words: I18nType = { retry: '重试', }, - // 表单验证 - validation: { - required: '此字段为必填项', - email: '请输入有效的邮箱地址', - phone: '请输入有效的手机号码', - url: '请输入有效的网址', - minLength: '至少需要 {min} 个字符', - maxLength: '最多只能输入 {max} 个字符', - min: '值不能小于 {min}', - max: '值不能大于 {max}', - pattern: '格式不正确', - confirmation: '两次输入不一致', - }, - // 时间相关 time: { now: '刚刚', @@ -850,11 +886,21 @@ const words: I18nType = { title: '查询一个人的信息', description: '查询 沈询 阿里的所有信息(用于展示无限上下文能力)', prompt: '用浏览器,基于百度,查询计划', + planTitle: '查询 沈询 阿里的所有信息(用于展示无限上下文能力)', + step1: '[BROWSER_AGENT] 通过 百度 查询 沈询 阿里 , 获取第一页的html 百度数据,合并聚拢 到 html_data 的目录里', + step1Output: '存放的目录路径', + step2: '[BROWSER_AGENT] 从 html_data 目录中找到所有的有效关于沈询 阿里 的网页链接,输出到 link.md里面', + step2Output: 'url地址,说明', }, ainovel: { title: 'AI小说创作', description: '人工智能逐步击败人类主题小说(用于展示超长内容的输出)', prompt: '创建一个关于人工智能逐步击败人类的小说,包含10个章节', + planTitle: '人工智能逐步击败人类小说创作计划', + step1: '[TEXT_FILE_AGENT] 创建小说的大标题和子章节标题的文件,期望是一有10个子章节的的小说,提纲输出到novel.md里,每一个子章节用二级标题,在当前步骤只需要写章节的标题即可,小说的大标题是《人工智能逐步击败人类》', + step1Output: '文件的名字', + step2: '[TEXT_FILE_AGENT] 从novel.md文件获取子标题信息,然后依次完善每一个章节的具体内容,每个轮次只完善一个子章节的内容,用replace来更新内容,每个章节要求有3000字的内容,不要每更新一个章节就查询一下文档的全部内容', + step2Output: '文件的名字', }, }, }, @@ -885,11 +931,15 @@ const words: I18nType = { stepName: '步骤名称', noExecutionInfo: '该步骤暂无详细执行信息', subPlan: '子执行计划', - // 步骤状态 + subStep: '子步骤', + subPlanId: '子计划ID', + title: '标题', + stepNumber: '步骤 {number}', status: { + label: '状态', completed: '已完成', executing: '执行中', - waiting: '等待执行', + pending: '待执行' }, // Tab 标签 tabs: { @@ -926,13 +976,6 @@ const words: I18nType = { defaultStepTitle: '步骤 {number}', }, - // 直接页面 - direct: { - configuration: '配置', - panelResizeHint: '拖拽调整面板大小,双击重置', - aboutExecutionDetails: '关于集成执行详情', - }, - // 定时任务 cronTask: { title: '定时任务管理', diff --git a/spring-ai-alibaba-jmanus/ui-vue3/src/components/GroupedSelect.vue b/spring-ai-alibaba-jmanus/ui-vue3/src/components/GroupedSelect.vue index fc7dc92e1d..33ee0c211a 100644 --- a/spring-ai-alibaba-jmanus/ui-vue3/src/components/GroupedSelect.vue +++ b/spring-ai-alibaba-jmanus/ui-vue3/src/components/GroupedSelect.vue @@ -91,8 +91,8 @@ interface Props { } const props = withDefaults(defineProps(), { - placeholder: '请选择模型', - dropdownTitle: '可用模型' + placeholder: 'Please select a model', + dropdownTitle: 'Available Models' }) const emit = defineEmits<{ @@ -104,18 +104,18 @@ const { t } = useI18n() const isOpen = ref(false) const searchText = ref('') -// 按类别分组模型 +// Group models by category const groupedOptions = computed(() => { const groups: { [key: string]: ModelOption[] } = {} - + props.options.forEach(option => { if (!groups[option.category]) { groups[option.category] = [] } groups[option.category].push(option) }) - - // 按优先级排序分组 + + // Sort groups by priority const priorityOrder = ['Turbo', 'Plus', 'Max', 'Coder', 'Math', 'Vision', 'TTS', 'Standard'] return priorityOrder .filter(category => groups[category]) @@ -125,12 +125,12 @@ const groupedOptions = computed(() => { })) }) -// 过滤搜索结果 +// Filter search results const filteredGroups = computed(() => { if (!searchText.value) { return groupedOptions.value } - + return groupedOptions.value.map(group => ({ ...group, models: group.models.filter(model => @@ -141,7 +141,7 @@ const filteredGroups = computed(() => { })).filter(group => group.models.length > 0) }) -// 当前选中的选项 +// Currently selected option const selectedOption = computed(() => { return props.options.find(option => option.id === props.modelValue) }) @@ -163,7 +163,7 @@ const selectModel = (model: ModelOption) => { closeDropdown() } -// 点击外部关闭下拉框 +// Close dropdown when clicking outside const handleClickOutside = (event: Event) => { const target = event.target as HTMLElement if (!target.closest('.grouped-select')) { @@ -411,7 +411,7 @@ onUnmounted(() => { margin-top: 4px; } -/* 响应式设计 */ +/* Responsive design */ @media (max-width: 768px) { .models-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); @@ -423,4 +423,4 @@ onUnmounted(() => { grid-template-columns: 1fr; } } - + diff --git a/spring-ai-alibaba-jmanus/ui-vue3/src/components/chat/index.vue b/spring-ai-alibaba-jmanus/ui-vue3/src/components/chat/index.vue index 2d37dc2af7..91a9ff9f2c 100644 --- a/spring-ai-alibaba-jmanus/ui-vue3/src/components/chat/index.vue +++ b/spring-ai-alibaba-jmanus/ui-vue3/src/components/chat/index.vue @@ -70,7 +70,7 @@

{{ $t('chat.stepExecutionDetails') }}

- +
- 子执行计划 + {{ $t('rightPanel.subPlan') }}
{{ subStep }} - 子步骤 + {{ $t('rightPanel.subStep') }}
@@ -496,7 +496,7 @@ const handleDirectMode = async (query: string) => { // Add a thinking state message const assistantMessage = addMessage('assistant', '', { - thinking: '正在理解您的请求并准备回复...', + thinking: t('chat.thinkingProcessing'), }) // Execute directly @@ -539,23 +539,23 @@ const generateDirectModeResponse = (response: any, _originalQuery: string): stri // Generate an error response const generateErrorResponse = (error: any): string => { - const errorMsg = error?.message ?? error?.toString() ?? '未知错误' + const errorMsg = error?.message ?? error?.toString() ?? t('chat.unknownError') // Common error types with friendly prompts - if (errorMsg.includes('网络') || errorMsg.includes('network') || errorMsg.includes('timeout')) { - return `抱歉,似乎网络连接有些问题。请检查您的网络连接后再试一次,或者稍等几分钟再重新提问。` + if (errorMsg.includes('network') || errorMsg.includes('timeout')) { + return t('chat.networkError') } - if (errorMsg.includes('认证') || errorMsg.includes('权限') || errorMsg.includes('auth')) { - return `抱歉,访问权限出现了问题。这可能是系统配置的问题,请联系管理员或稍后再试。` + if (errorMsg.includes('auth') || errorMsg.includes('unauthorized')) { + return t('chat.authError') } - if (errorMsg.includes('格式') || errorMsg.includes('参数') || errorMsg.includes('invalid')) { - return `抱歉,您的请求格式可能有些问题。能否请您重新表述一下您的需求?我会尽力理解并帮助您。` + if (errorMsg.includes('invalid') || errorMsg.includes('format') || errorMsg.includes('parameter')) { + return t('chat.formatError') } // Generic error response - return `抱歉,处理您的请求时遇到了一些问题(${errorMsg})。请稍后再试,或者换个方式表达您的需求,我会尽力帮助您的。` + return `${t('chat.unknownError')} (${errorMsg})` } const scrollToBottom = (force = false) => { @@ -627,7 +627,7 @@ const handleSendMessage = (message: string) => { // Get agent execution status based on index const getAgentExecutionStatus = (message: Message, index: number): string => { const agentExecutionSequence = message.planExecution?.agentExecutionSequence ?? [] - // 使用安全的索引检查来避免越界访问 + // Use safe index checking to avoid out-of-bounds access if (index < 0 || index >= agentExecutionSequence.length) { return 'IDLE' } @@ -687,9 +687,9 @@ const getSubPlanSteps = (message: Message, stepIndex: number): string[] => { if (typeof step === 'string') { return step } else if (typeof step === 'object' && step !== null) { - return step.title || step.description || `子步骤` + return step.title || step.description || t('rightPanel.subStep') } - return `子步骤` + return t('rightPanel.subStep') }) } } @@ -851,8 +851,8 @@ const updateStepActions = (message: Message, planDetails: PlanExecutionRecord) = ) } else { lastStepActions[index] = { - actionDescription: '思考中', - toolParameters: '等待决策', + actionDescription: t('chat.thinking'), + toolParameters: t('chat.waitingDecision'), thinkInput: latestThinkAct.thinkInput ?? '', thinkOutput: latestThinkAct.thinkOutput ?? '', status: planDetails.currentStepIndex !== undefined && index === planDetails.currentStepIndex ? 'current' : 'pending', @@ -862,26 +862,26 @@ const updateStepActions = (message: Message, planDetails: PlanExecutionRecord) = } } else { lastStepActions[index] = { - actionDescription: planDetails.currentStepIndex !== undefined && index < planDetails.currentStepIndex ? '已完成' : '等待中', - toolParameters: '无工具参数', + actionDescription: planDetails.currentStepIndex !== undefined && index < planDetails.currentStepIndex ? t('chat.status.completed') : t('chat.status.pending'), + toolParameters: t('chat.noToolParameters'), thinkInput: '', thinkOutput: '', status: planDetails.currentStepIndex !== undefined && index < planDetails.currentStepIndex ? 'completed' : 'pending', } console.log( - `[ChatComponent] 步骤 ${index} 无执行细节, 状态设为: ${lastStepActions[index].status}` + `[ChatComponent] Step ${index} has no execution details, status set to: ${lastStepActions[index].status}` ) } } } else { - console.log('[ChatComponent] 没有执行序列数据') + console.log('[ChatComponent] No execution sequence data') } message.stepActions = [...lastStepActions] console.log( - '[ChatComponent] 步骤动作更新完成:', + '[ChatComponent] Step actions update completed:', JSON.stringify(lastStepActions.map(a => a?.actionDescription)) ) @@ -904,7 +904,7 @@ const handleDialogRoundStart = (planId: string) => { if (existingAssistantMsg === -1) { addMessage('assistant', '', { planExecution: { currentPlanId: planId } as PlanExecutionRecord, - thinking: '正在准备执行计划...', + thinking: t('chat.preparingExecution'), }) console.log('[ChatComponent] Created new assistant message for planId:', planId) } else { @@ -975,7 +975,7 @@ const handlePlanUpdate = (rootPlanId: string) => { if (lastAssistantIndex !== -1) { message = messages.value[lastAssistantIndex] - // 更新 planExecution 以确保后续更新能找到它 + // Update planExecution to ensure subsequent updates can find it if (!message.planExecution) { message.planExecution = {} as PlanExecutionRecord } @@ -1003,11 +1003,11 @@ const handlePlanUpdate = (rootPlanId: string) => { console.log('[ChatComponent] Handling simple response without steps') if (planDetails.completed) { - // 直接设置最终回复,清除所有处理状态 + // Directly set the final response, clear all processing states delete message.thinking const finalResponse = - planDetails.summary ?? planDetails.result ?? planDetails.message ?? '处理完成' + planDetails.summary ?? planDetails.result ?? planDetails.message ?? t('chat.executionCompleted') // Ensure the response is natural message.content = generateNaturalResponse(finalResponse) @@ -1015,7 +1015,7 @@ const handlePlanUpdate = (rootPlanId: string) => { } else { // If there is a title or status information, update the thinking state if (planDetails.title) { - message.thinking = `正在执行: ${planDetails.title}` + message.thinking = `${t('chat.thinkingExecuting', { title: planDetails.title })}` } } @@ -1037,9 +1037,9 @@ const handlePlanUpdate = (rootPlanId: string) => { } // If it's an object, extract the title for display else if (typeof step === 'object' && step !== null) { - return step.title || step.description || `步骤` + return step.title || step.description || t('chat.step') } - return `步骤` + return t('chat.step') }) // Update the step information in planExecution @@ -1050,7 +1050,7 @@ const handlePlanUpdate = (rootPlanId: string) => { // Process the execution sequence and step actions - Refer to the logic in chat-handler.js if (planDetails.agentExecutionSequence && planDetails.agentExecutionSequence.length > 0) { console.log( - '[ChatComponent] 发现执行序列数据,数量:', + '[ChatComponent] Found execution sequence data, count:', planDetails.agentExecutionSequence.length ) @@ -1072,7 +1072,7 @@ const handlePlanUpdate = (rootPlanId: string) => { ? latestThinkAct.thinkOutput.substring(0, maxLength) + '...' : latestThinkAct.thinkOutput - message.thinking = `正在思考: ${displayOutput}` + message.thinking = `${t('chat.thinking')}: ${displayOutput}` } } } @@ -1082,13 +1082,13 @@ const handlePlanUpdate = (rootPlanId: string) => { const currentStepIndex = message.planExecution.currentStepIndex ?? 0 const currentStep = message.planExecution.steps?.[currentStepIndex] const stepTitle = typeof currentStep === 'string' ? currentStep : '' - message.thinking = `正在执行: ${stepTitle}` + message.thinking = `${t('chat.thinkingExecuting', { title: stepTitle })}` } } // Handle the user input waiting state if (planDetails.userInputWaitState && message.planExecution) { - console.log('[ChatComponent] 需要用户输入:', planDetails.userInputWaitState) + console.log('[ChatComponent] User input required:', planDetails.userInputWaitState) // Attach the user input waiting state to planExecution if (!message.planExecution.userInputWaitState) { @@ -1106,7 +1106,7 @@ const handlePlanUpdate = (rootPlanId: string) => { formInputsStore[message.id] ??= {} // Clear the thinking state and display the message waiting for user input - message.thinking = '等待用户输入...' + message.thinking = t('input.waiting') } else { // If there is no user input waiting state, clear the previous state if (message.planExecution?.userInputWaitState) { @@ -1127,7 +1127,7 @@ const handlePlanUpdate = (rootPlanId: string) => { } else if (planDetails.result) { finalResponse = planDetails.result } else { - finalResponse = '任务已完成' + finalResponse = t('chat.executionCompleted') } // Generate natural, human-like responses @@ -1148,31 +1148,34 @@ const handlePlanUpdate = (rootPlanId: string) => { // Helper function to generate natural responses const generateNaturalResponse = (text: string): string => { - if (!text) return '我明白了,还有什么我可以帮您的吗?' + if (!text) return t('chat.defaultResponse') // If it's already in a natural conversation format, return it directly if ( - text.includes('我') || - text.includes('您') || - text.includes('您好') || - text.includes('可以') + text.includes('I ') || + text.includes('you') || + text.includes('hello') || + text.includes('can') || + text.includes('I') || + text.includes('you') || + text.includes('can') ) { return text } // Generate a more natural response based on the text content if (text.length < 10) { - return `${text}!还有什么需要我帮助的吗?` + return `${text}! ${t('chat.anythingElse')}` } else if (text.length < 50) { - return `好的,${text}。如果您还有其他问题,请随时告诉我。` + return `${t('chat.okayDone', { text })}. ${t('chat.ifOtherQuestions')}` } else { - return `${text}\n\n希望这个回答对您有帮助!还有什么我可以为您做的吗?` + return `${text}\n\n${t('chat.hopeHelpful')} ${t('chat.anythingElse')}` } } // Generate a natural response for a completed plan const generateCompletedPlanResponse = (text: string): string => { - if (!text) return '任务已完成!还有什么我可以帮您的吗?' + if (!text) return `${t('chat.executionCompleted')}! ${t('chat.anythingElse')}` else{ return `${text}`; } @@ -1198,13 +1201,13 @@ const handlePlanCompleted = (rootPlanId: string) => { const message = messages.value[messageIndex]; delete message.thinking; - const summary = details.summary ?? details.result ?? '任务已完成'; + const summary = details.summary ?? details.result ?? t('chat.executionCompleted'); let finalResponse = summary; - if (!finalResponse.includes('我') && !finalResponse.includes('您')) { - if (finalResponse.includes('成功') || finalResponse.includes('完成')) { - finalResponse = `很好!${finalResponse}。如果您还有其他需要帮助的地方,请随时告诉我。`; + if (!finalResponse.includes('I') && !finalResponse.includes('you')) { + if (finalResponse.includes('success') || finalResponse.includes('complete') || finalResponse.includes('finished')) { + finalResponse = `${t('chat.great')}${finalResponse}. ${t('chat.ifOtherHelp')}`; } else { - finalResponse = `我已经完成了您的请求:${finalResponse}`; + finalResponse = `${t('chat.completedRequest', { result: finalResponse })}`; } } @@ -1248,7 +1251,7 @@ const formatResponseText = (text: string): string => { // Handle user input form submission const handleUserInputSubmit = async (message: Message) => { if (!message.planExecution?.currentPlanId || !message.planExecution.userInputWaitState) { - console.error('[ChatComponent] 缺少planExecution.currentPlanId或userInputWaitState') + console.error('[ChatComponent] Missing planExecution.currentPlanId or userInputWaitState') return } @@ -1269,7 +1272,7 @@ const handleUserInputSubmit = async (message: Message) => { inputData.genericInput = message.genericInput ?? '' } - console.log('[ChatComponent] 提交用户输入:', inputData) + console.log('[ChatComponent] Submitting user input:', inputData) // Submit user input via API const response = await CommonApiService.submitFormInput( @@ -1285,11 +1288,11 @@ const handleUserInputSubmit = async (message: Message) => { // Continue polling for plan updates (should resume automatically after submission) planExecution.startPolling() - console.log('[ChatComponent] 用户输入提交成功:', response) + console.log('[ChatComponent] User input submitted successfully:', response) } catch (error: any) { - console.error('[ChatComponent] 用户输入提交失败:', error) - // 可以在UI中显示错误消息 - alert(`提交失败: ${error?.message || '未知错误'}`) + console.error('[ChatComponent] User input submission failed:', error) + // Can display error message in UI + alert(`${t('common.submitFailed')}: ${error?.message || t('common.unknownError')}`) } } @@ -1921,7 +1924,7 @@ defineExpose({ border-radius: 4px; cursor: pointer; transition: all 0.2s ease; - margin-left: 20px; /* 缩进显示父子关系 */ + margin-left: 20px; /* Indent to show parent-child relationship */ &:hover { background: rgba(255, 255, 255, 0.05); diff --git a/spring-ai-alibaba-jmanus/ui-vue3/src/components/cron-task-modal/index.vue b/spring-ai-alibaba-jmanus/ui-vue3/src/components/cron-task-modal/index.vue index 782b27dcec..cf65adaf02 100644 --- a/spring-ai-alibaba-jmanus/ui-vue3/src/components/cron-task-modal/index.vue +++ b/spring-ai-alibaba-jmanus/ui-vue3/src/components/cron-task-modal/index.vue @@ -867,7 +867,7 @@ watch(() => props.modelValue, (newValue) => { cursor: not-allowed; } -/* 过渡动画 */ +/* Transition animations */ .modal-enter-active, .modal-leave-active { transition: opacity 0.3s ease; @@ -878,7 +878,7 @@ watch(() => props.modelValue, (newValue) => { opacity: 0; } -/* 确认模态框样式 */ +/* Confirmation modal styles */ .confirm-modal { background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.15)); border: 1px solid rgba(255, 255, 255, 0.1); diff --git a/spring-ai-alibaba-jmanus/ui-vue3/src/components/input/index.vue b/spring-ai-alibaba-jmanus/ui-vue3/src/components/input/index.vue index 97fc029f6e..bb40d802dc 100644 --- a/spring-ai-alibaba-jmanus/ui-vue3/src/components/input/index.vue +++ b/spring-ai-alibaba-jmanus/ui-vue3/src/components/input/index.vue @@ -16,7 +16,7 @@